Frequently Asked Questions

How do I write a trigger, alias, or macro?

First of all, Moxie makes no distinction between triggers, aliases, and macros. We treat all of these things in the same way: as a plugin.

All plugins are written in Common Lisp, so you'll have to have some grounding in Lisp to do anything serious at the moment (although I have some ideas for simpler interfaces for the non-programming-minded in the future). There are a few support routines included in the MOXIE package to simplify common plugin tasks, such as triggers and aliases.

LISP?! Why would you do that?

Because I didn't want to have to write my own language for triggers, aliases, and macros. No matter how much I worked on it, I wasn't going to get the kind of programmability I wanted without embedding a full programming language. I also think it's something of a waste of time to learn a new language just for the purpose of programming a trigger in your MUX client.

I could have just used AppleScript as the language of choice, and came very close to doing so a number of times, but I had too much trouble trying to get AS and ObjC talking as well as I'd liked, and, frankly, I don't consider it to be full-featured enough.

So I chose to embed a language. There are, theoretically, a fair number of popular languages I could have embedded, however, I chose Lisp for the following reasons:

Where can I find more information on Lisp programming?

There are a number of web sites devoted to Lisp programming. Below, I'll list a few resources that should get you pointed in the right direction:

What is the REPL?

The REPL is your direct interface to the Lisp sub-system. It is the key to fully interactive programming. Via the REPL you can input Lisp commands directly and see the results - any Lisp will work here, including function definitions. This allows you to write a function, test it, and debug it, all without leaving the REPL, and with a much finer grain of control than with a compile cycle.