From ab10720260e2c184b319026da89f4dfd338500bb Mon Sep 17 00:00:00 2001 From: Brian Cully Date: Wed, 2 Apr 2008 19:20:20 -0400 Subject: Initial commit --- English.lproj/Moxie Help/pages/.svn/README.txt | 2 + English.lproj/Moxie Help/pages/.svn/empty-file | 0 English.lproj/Moxie Help/pages/.svn/entries | 112 +++ English.lproj/Moxie Help/pages/.svn/format | 1 + .../pages/.svn/prop-base/bugs.html.svn-base | 5 + .../pages/.svn/prop-base/faq.html.svn-base | 5 + .../.svn/prop-base/function-template.html.svn-base | 5 + .../pages/.svn/prop-base/glossary.html.svn-base | 5 + .../.svn/prop-base/lisp-functions.html.svn-base | 5 + .../.svn/prop-base/lisp-glossary.html.svn-base | 5 + .../pages/.svn/prop-base/navigation.html.svn-base | 5 + .../pages/.svn/prop-base/overview.html.svn-base | 5 + .../pages/.svn/prop-base/plugin.html.svn-base | 5 + .../pages/.svn/prop-base/todo.html.svn-base | 5 + .../pages/.svn/prop-base/whatsnew.html.svn-base | 5 + .../Moxie Help/pages/.svn/props/bugs.html.svn-work | 5 + .../Moxie Help/pages/.svn/props/faq.html.svn-work | 5 + .../.svn/props/function-template.html.svn-work | 5 + .../pages/.svn/props/glossary.html.svn-work | 5 + .../pages/.svn/props/lisp-functions.html.svn-work | 5 + .../pages/.svn/props/lisp-glossary.html.svn-work | 5 + .../pages/.svn/props/navigation.html.svn-work | 5 + .../pages/.svn/props/overview.html.svn-work | 5 + .../pages/.svn/props/plugin.html.svn-work | 5 + .../Moxie Help/pages/.svn/props/todo.html.svn-work | 5 + .../pages/.svn/props/whatsnew.html.svn-work | 5 + .../pages/.svn/text-base/bugs.html.svn-base | 20 + .../pages/.svn/text-base/faq.html.svn-base | 81 ++ .../.svn/text-base/function-template.html.svn-base | 30 + .../pages/.svn/text-base/glossary.html.svn-base | 27 + .../.svn/text-base/lisp-functions.html.svn-base | 947 +++++++++++++++++++++ .../.svn/text-base/lisp-glossary.html.svn-base | 68 ++ .../pages/.svn/text-base/navigation.html.svn-base | 24 + .../pages/.svn/text-base/overview.html.svn-base | 36 + .../pages/.svn/text-base/plugin.html.svn-base | 203 +++++ .../pages/.svn/text-base/todo.html.svn-base | 24 + .../pages/.svn/text-base/whatsnew.html.svn-base | 83 ++ English.lproj/Moxie Help/pages/bugs.html | 20 + English.lproj/Moxie Help/pages/faq.html | 81 ++ .../Moxie Help/pages/function-template.html | 30 + English.lproj/Moxie Help/pages/glossary.html | 27 + English.lproj/Moxie Help/pages/lisp-functions.html | 947 +++++++++++++++++++++ English.lproj/Moxie Help/pages/lisp-glossary.html | 68 ++ English.lproj/Moxie Help/pages/navigation.html | 24 + English.lproj/Moxie Help/pages/overview.html | 36 + English.lproj/Moxie Help/pages/plugin.html | 203 +++++ English.lproj/Moxie Help/pages/todo.html | 24 + English.lproj/Moxie Help/pages/whatsnew.html | 83 ++ 48 files changed, 3311 insertions(+) create mode 100644 English.lproj/Moxie Help/pages/.svn/README.txt create mode 100644 English.lproj/Moxie Help/pages/.svn/empty-file create mode 100644 English.lproj/Moxie Help/pages/.svn/entries create mode 100644 English.lproj/Moxie Help/pages/.svn/format create mode 100644 English.lproj/Moxie Help/pages/.svn/prop-base/bugs.html.svn-base create mode 100644 English.lproj/Moxie Help/pages/.svn/prop-base/faq.html.svn-base create mode 100644 English.lproj/Moxie Help/pages/.svn/prop-base/function-template.html.svn-base create mode 100644 English.lproj/Moxie Help/pages/.svn/prop-base/glossary.html.svn-base create mode 100644 English.lproj/Moxie Help/pages/.svn/prop-base/lisp-functions.html.svn-base create mode 100644 English.lproj/Moxie Help/pages/.svn/prop-base/lisp-glossary.html.svn-base create mode 100644 English.lproj/Moxie Help/pages/.svn/prop-base/navigation.html.svn-base create mode 100644 English.lproj/Moxie Help/pages/.svn/prop-base/overview.html.svn-base create mode 100644 English.lproj/Moxie Help/pages/.svn/prop-base/plugin.html.svn-base create mode 100644 English.lproj/Moxie Help/pages/.svn/prop-base/todo.html.svn-base create mode 100644 English.lproj/Moxie Help/pages/.svn/prop-base/whatsnew.html.svn-base create mode 100644 English.lproj/Moxie Help/pages/.svn/props/bugs.html.svn-work create mode 100644 English.lproj/Moxie Help/pages/.svn/props/faq.html.svn-work create mode 100644 English.lproj/Moxie Help/pages/.svn/props/function-template.html.svn-work create mode 100644 English.lproj/Moxie Help/pages/.svn/props/glossary.html.svn-work create mode 100644 English.lproj/Moxie Help/pages/.svn/props/lisp-functions.html.svn-work create mode 100644 English.lproj/Moxie Help/pages/.svn/props/lisp-glossary.html.svn-work create mode 100644 English.lproj/Moxie Help/pages/.svn/props/navigation.html.svn-work create mode 100644 English.lproj/Moxie Help/pages/.svn/props/overview.html.svn-work create mode 100644 English.lproj/Moxie Help/pages/.svn/props/plugin.html.svn-work create mode 100644 English.lproj/Moxie Help/pages/.svn/props/todo.html.svn-work create mode 100644 English.lproj/Moxie Help/pages/.svn/props/whatsnew.html.svn-work create mode 100644 English.lproj/Moxie Help/pages/.svn/text-base/bugs.html.svn-base create mode 100644 English.lproj/Moxie Help/pages/.svn/text-base/faq.html.svn-base create mode 100644 English.lproj/Moxie Help/pages/.svn/text-base/function-template.html.svn-base create mode 100644 English.lproj/Moxie Help/pages/.svn/text-base/glossary.html.svn-base create mode 100644 English.lproj/Moxie Help/pages/.svn/text-base/lisp-functions.html.svn-base create mode 100644 English.lproj/Moxie Help/pages/.svn/text-base/lisp-glossary.html.svn-base create mode 100644 English.lproj/Moxie Help/pages/.svn/text-base/navigation.html.svn-base create mode 100644 English.lproj/Moxie Help/pages/.svn/text-base/overview.html.svn-base create mode 100644 English.lproj/Moxie Help/pages/.svn/text-base/plugin.html.svn-base create mode 100644 English.lproj/Moxie Help/pages/.svn/text-base/todo.html.svn-base create mode 100644 English.lproj/Moxie Help/pages/.svn/text-base/whatsnew.html.svn-base create mode 100644 English.lproj/Moxie Help/pages/bugs.html create mode 100644 English.lproj/Moxie Help/pages/faq.html create mode 100644 English.lproj/Moxie Help/pages/function-template.html create mode 100644 English.lproj/Moxie Help/pages/glossary.html create mode 100644 English.lproj/Moxie Help/pages/lisp-functions.html create mode 100644 English.lproj/Moxie Help/pages/lisp-glossary.html create mode 100644 English.lproj/Moxie Help/pages/navigation.html create mode 100644 English.lproj/Moxie Help/pages/overview.html create mode 100644 English.lproj/Moxie Help/pages/plugin.html create mode 100644 English.lproj/Moxie Help/pages/todo.html create mode 100644 English.lproj/Moxie Help/pages/whatsnew.html (limited to 'English.lproj/Moxie Help/pages') diff --git a/English.lproj/Moxie Help/pages/.svn/README.txt b/English.lproj/Moxie Help/pages/.svn/README.txt new file mode 100644 index 0000000..271a8ce --- /dev/null +++ b/English.lproj/Moxie Help/pages/.svn/README.txt @@ -0,0 +1,2 @@ +This is a Subversion working copy administrative directory. +Visit http://subversion.tigris.org/ for more information. diff --git a/English.lproj/Moxie Help/pages/.svn/empty-file b/English.lproj/Moxie Help/pages/.svn/empty-file new file mode 100644 index 0000000..e69de29 diff --git a/English.lproj/Moxie Help/pages/.svn/entries b/English.lproj/Moxie Help/pages/.svn/entries new file mode 100644 index 0000000..564dfc4 --- /dev/null +++ b/English.lproj/Moxie Help/pages/.svn/entries @@ -0,0 +1,112 @@ + + + + + + + + + + + + + + + diff --git a/English.lproj/Moxie Help/pages/.svn/format b/English.lproj/Moxie Help/pages/.svn/format new file mode 100644 index 0000000..b8626c4 --- /dev/null +++ b/English.lproj/Moxie Help/pages/.svn/format @@ -0,0 +1 @@ +4 diff --git a/English.lproj/Moxie Help/pages/.svn/prop-base/bugs.html.svn-base b/English.lproj/Moxie Help/pages/.svn/prop-base/bugs.html.svn-base new file mode 100644 index 0000000..92c8ad7 --- /dev/null +++ b/English.lproj/Moxie Help/pages/.svn/prop-base/bugs.html.svn-base @@ -0,0 +1,5 @@ +K 12 +svn:keywords +V 2 +Id +END diff --git a/English.lproj/Moxie Help/pages/.svn/prop-base/faq.html.svn-base b/English.lproj/Moxie Help/pages/.svn/prop-base/faq.html.svn-base new file mode 100644 index 0000000..92c8ad7 --- /dev/null +++ b/English.lproj/Moxie Help/pages/.svn/prop-base/faq.html.svn-base @@ -0,0 +1,5 @@ +K 12 +svn:keywords +V 2 +Id +END diff --git a/English.lproj/Moxie Help/pages/.svn/prop-base/function-template.html.svn-base b/English.lproj/Moxie Help/pages/.svn/prop-base/function-template.html.svn-base new file mode 100644 index 0000000..92c8ad7 --- /dev/null +++ b/English.lproj/Moxie Help/pages/.svn/prop-base/function-template.html.svn-base @@ -0,0 +1,5 @@ +K 12 +svn:keywords +V 2 +Id +END diff --git a/English.lproj/Moxie Help/pages/.svn/prop-base/glossary.html.svn-base b/English.lproj/Moxie Help/pages/.svn/prop-base/glossary.html.svn-base new file mode 100644 index 0000000..92c8ad7 --- /dev/null +++ b/English.lproj/Moxie Help/pages/.svn/prop-base/glossary.html.svn-base @@ -0,0 +1,5 @@ +K 12 +svn:keywords +V 2 +Id +END diff --git a/English.lproj/Moxie Help/pages/.svn/prop-base/lisp-functions.html.svn-base b/English.lproj/Moxie Help/pages/.svn/prop-base/lisp-functions.html.svn-base new file mode 100644 index 0000000..92c8ad7 --- /dev/null +++ b/English.lproj/Moxie Help/pages/.svn/prop-base/lisp-functions.html.svn-base @@ -0,0 +1,5 @@ +K 12 +svn:keywords +V 2 +Id +END diff --git a/English.lproj/Moxie Help/pages/.svn/prop-base/lisp-glossary.html.svn-base b/English.lproj/Moxie Help/pages/.svn/prop-base/lisp-glossary.html.svn-base new file mode 100644 index 0000000..92c8ad7 --- /dev/null +++ b/English.lproj/Moxie Help/pages/.svn/prop-base/lisp-glossary.html.svn-base @@ -0,0 +1,5 @@ +K 12 +svn:keywords +V 2 +Id +END diff --git a/English.lproj/Moxie Help/pages/.svn/prop-base/navigation.html.svn-base b/English.lproj/Moxie Help/pages/.svn/prop-base/navigation.html.svn-base new file mode 100644 index 0000000..92c8ad7 --- /dev/null +++ b/English.lproj/Moxie Help/pages/.svn/prop-base/navigation.html.svn-base @@ -0,0 +1,5 @@ +K 12 +svn:keywords +V 2 +Id +END diff --git a/English.lproj/Moxie Help/pages/.svn/prop-base/overview.html.svn-base b/English.lproj/Moxie Help/pages/.svn/prop-base/overview.html.svn-base new file mode 100644 index 0000000..92c8ad7 --- /dev/null +++ b/English.lproj/Moxie Help/pages/.svn/prop-base/overview.html.svn-base @@ -0,0 +1,5 @@ +K 12 +svn:keywords +V 2 +Id +END diff --git a/English.lproj/Moxie Help/pages/.svn/prop-base/plugin.html.svn-base b/English.lproj/Moxie Help/pages/.svn/prop-base/plugin.html.svn-base new file mode 100644 index 0000000..92c8ad7 --- /dev/null +++ b/English.lproj/Moxie Help/pages/.svn/prop-base/plugin.html.svn-base @@ -0,0 +1,5 @@ +K 12 +svn:keywords +V 2 +Id +END diff --git a/English.lproj/Moxie Help/pages/.svn/prop-base/todo.html.svn-base b/English.lproj/Moxie Help/pages/.svn/prop-base/todo.html.svn-base new file mode 100644 index 0000000..92c8ad7 --- /dev/null +++ b/English.lproj/Moxie Help/pages/.svn/prop-base/todo.html.svn-base @@ -0,0 +1,5 @@ +K 12 +svn:keywords +V 2 +Id +END diff --git a/English.lproj/Moxie Help/pages/.svn/prop-base/whatsnew.html.svn-base b/English.lproj/Moxie Help/pages/.svn/prop-base/whatsnew.html.svn-base new file mode 100644 index 0000000..92c8ad7 --- /dev/null +++ b/English.lproj/Moxie Help/pages/.svn/prop-base/whatsnew.html.svn-base @@ -0,0 +1,5 @@ +K 12 +svn:keywords +V 2 +Id +END diff --git a/English.lproj/Moxie Help/pages/.svn/props/bugs.html.svn-work b/English.lproj/Moxie Help/pages/.svn/props/bugs.html.svn-work new file mode 100644 index 0000000..92c8ad7 --- /dev/null +++ b/English.lproj/Moxie Help/pages/.svn/props/bugs.html.svn-work @@ -0,0 +1,5 @@ +K 12 +svn:keywords +V 2 +Id +END diff --git a/English.lproj/Moxie Help/pages/.svn/props/faq.html.svn-work b/English.lproj/Moxie Help/pages/.svn/props/faq.html.svn-work new file mode 100644 index 0000000..92c8ad7 --- /dev/null +++ b/English.lproj/Moxie Help/pages/.svn/props/faq.html.svn-work @@ -0,0 +1,5 @@ +K 12 +svn:keywords +V 2 +Id +END diff --git a/English.lproj/Moxie Help/pages/.svn/props/function-template.html.svn-work b/English.lproj/Moxie Help/pages/.svn/props/function-template.html.svn-work new file mode 100644 index 0000000..92c8ad7 --- /dev/null +++ b/English.lproj/Moxie Help/pages/.svn/props/function-template.html.svn-work @@ -0,0 +1,5 @@ +K 12 +svn:keywords +V 2 +Id +END diff --git a/English.lproj/Moxie Help/pages/.svn/props/glossary.html.svn-work b/English.lproj/Moxie Help/pages/.svn/props/glossary.html.svn-work new file mode 100644 index 0000000..92c8ad7 --- /dev/null +++ b/English.lproj/Moxie Help/pages/.svn/props/glossary.html.svn-work @@ -0,0 +1,5 @@ +K 12 +svn:keywords +V 2 +Id +END diff --git a/English.lproj/Moxie Help/pages/.svn/props/lisp-functions.html.svn-work b/English.lproj/Moxie Help/pages/.svn/props/lisp-functions.html.svn-work new file mode 100644 index 0000000..92c8ad7 --- /dev/null +++ b/English.lproj/Moxie Help/pages/.svn/props/lisp-functions.html.svn-work @@ -0,0 +1,5 @@ +K 12 +svn:keywords +V 2 +Id +END diff --git a/English.lproj/Moxie Help/pages/.svn/props/lisp-glossary.html.svn-work b/English.lproj/Moxie Help/pages/.svn/props/lisp-glossary.html.svn-work new file mode 100644 index 0000000..92c8ad7 --- /dev/null +++ b/English.lproj/Moxie Help/pages/.svn/props/lisp-glossary.html.svn-work @@ -0,0 +1,5 @@ +K 12 +svn:keywords +V 2 +Id +END diff --git a/English.lproj/Moxie Help/pages/.svn/props/navigation.html.svn-work b/English.lproj/Moxie Help/pages/.svn/props/navigation.html.svn-work new file mode 100644 index 0000000..92c8ad7 --- /dev/null +++ b/English.lproj/Moxie Help/pages/.svn/props/navigation.html.svn-work @@ -0,0 +1,5 @@ +K 12 +svn:keywords +V 2 +Id +END diff --git a/English.lproj/Moxie Help/pages/.svn/props/overview.html.svn-work b/English.lproj/Moxie Help/pages/.svn/props/overview.html.svn-work new file mode 100644 index 0000000..92c8ad7 --- /dev/null +++ b/English.lproj/Moxie Help/pages/.svn/props/overview.html.svn-work @@ -0,0 +1,5 @@ +K 12 +svn:keywords +V 2 +Id +END diff --git a/English.lproj/Moxie Help/pages/.svn/props/plugin.html.svn-work b/English.lproj/Moxie Help/pages/.svn/props/plugin.html.svn-work new file mode 100644 index 0000000..92c8ad7 --- /dev/null +++ b/English.lproj/Moxie Help/pages/.svn/props/plugin.html.svn-work @@ -0,0 +1,5 @@ +K 12 +svn:keywords +V 2 +Id +END diff --git a/English.lproj/Moxie Help/pages/.svn/props/todo.html.svn-work b/English.lproj/Moxie Help/pages/.svn/props/todo.html.svn-work new file mode 100644 index 0000000..92c8ad7 --- /dev/null +++ b/English.lproj/Moxie Help/pages/.svn/props/todo.html.svn-work @@ -0,0 +1,5 @@ +K 12 +svn:keywords +V 2 +Id +END diff --git a/English.lproj/Moxie Help/pages/.svn/props/whatsnew.html.svn-work b/English.lproj/Moxie Help/pages/.svn/props/whatsnew.html.svn-work new file mode 100644 index 0000000..92c8ad7 --- /dev/null +++ b/English.lproj/Moxie Help/pages/.svn/props/whatsnew.html.svn-work @@ -0,0 +1,5 @@ +K 12 +svn:keywords +V 2 +Id +END diff --git a/English.lproj/Moxie Help/pages/.svn/text-base/bugs.html.svn-base b/English.lproj/Moxie Help/pages/.svn/text-base/bugs.html.svn-base new file mode 100644 index 0000000..b2a5fd5 --- /dev/null +++ b/English.lproj/Moxie Help/pages/.svn/text-base/bugs.html.svn-base @@ -0,0 +1,20 @@ + + + + Known Bugs + + + + +

Known Bugs

+ + + diff --git a/English.lproj/Moxie Help/pages/.svn/text-base/faq.html.svn-base b/English.lproj/Moxie Help/pages/.svn/text-base/faq.html.svn-base new file mode 100644 index 0000000..a80cde3 --- /dev/null +++ b/English.lproj/Moxie Help/pages/.svn/text-base/faq.html.svn-base @@ -0,0 +1,81 @@ + + + + Frequently Asked Questions + + + + +

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.

+
+ + diff --git a/English.lproj/Moxie Help/pages/.svn/text-base/function-template.html.svn-base b/English.lproj/Moxie Help/pages/.svn/text-base/function-template.html.svn-base new file mode 100644 index 0000000..da624de --- /dev/null +++ b/English.lproj/Moxie Help/pages/.svn/text-base/function-template.html.svn-base @@ -0,0 +1,30 @@ +
+

Function NAME

+

Syntax:

+

+ NAME ARG => RETURN-VALUE +

+ +

Arguments and Values:

+

+

ARG---A TYPE.

+

RETURN-VALUE---An TYPE.

+

+ +

Description: None.

+ +

Examples:

+

CODE

+ +

Side Effects: None.

+ +

Affected By: None.

+ +

Exceptional Situations: None

+ +

See Also:

+

+ FUNCTION +

+ +

Notes: None

diff --git a/English.lproj/Moxie Help/pages/.svn/text-base/glossary.html.svn-base b/English.lproj/Moxie Help/pages/.svn/text-base/glossary.html.svn-base new file mode 100644 index 0000000..3606388 --- /dev/null +++ b/English.lproj/Moxie Help/pages/.svn/text-base/glossary.html.svn-base @@ -0,0 +1,27 @@ + + + + + Glossary + + + + + +

+ Glossary +

+ + + diff --git a/English.lproj/Moxie Help/pages/.svn/text-base/lisp-functions.html.svn-base b/English.lproj/Moxie Help/pages/.svn/text-base/lisp-functions.html.svn-base new file mode 100644 index 0000000..a6091c7 --- /dev/null +++ b/English.lproj/Moxie Help/pages/.svn/text-base/lisp-functions.html.svn-base @@ -0,0 +1,947 @@ + + + + + + Lisp Functions + + + + +

Moxie plugin functions

+

These functions are all exported from the MOXIE + package. +

+

+ Contents: +

+

+ +
+

Function WORLD-VAR

+

Syntax:

+

+ world-var name &optional (world-id *world*) => result +

+

+ (setf (world-var name &optional (world-id *world*)) new-value) +

+ +

Arguments and Values:

+

+

name---an object.

+

world-id---an object.

+

result---an object.

+

+ +

Description:

+

+ world-var is used to associate values, which are persistent throughout the application's lifetime, with name for a particular Moxie world, which has the unique identifier, world-id. +

+

+ setf may be used with world-var to modify the values associated with a given name, or to add a new entry. +

+ +

Examples:

+

  (setf (world-var :foo 0) 'bar) => BAR
+  (world-var :foo 0) => BAR
+  (world-var :foo 1) => NIL
+  (setf (world-var :foo 1) 'YOW) => YOW
+  (world-var :foo 1) => YOW
+  (world-var :foo 0) => BAR

+ +

Side Effects: None.

+ +

Affected By: None.

+ +

Exceptional Situations: None

+ +

Notes:

+

+ world-id is available as the *world* special variable. +

+ +
+

Function ADD-HOOK

+

Syntax:

+

+ add-hook function mode => hook-list +

+ +

Arguments and Values:

+

+

function--a function designator. +

mode---A keyword.

+

hook-list---A list containing the active functions for mode.

+

+ +

Description:

+

add-hook adds function to the list of functions to be run when + the hook mode is executed via run-hook.

+ +

Examples:

+

+  (defun my-printer (string)
+    (let ((string (if (stringp string) string (car string))))
+      (concatenate 'string "TEST: " string))) => MY-PRINTER
+  (add-hook 'my-printer :output-from-server-hook) => (MY-PRINTER)
+  (run-hook :output-from-server-hook "foo") => "TEST: foo"
+  (defun 'do-nothing (&rest args) nil) => DO-NOTHING
+  (add-hook 'do-nothing :output-from-server-hook) => (MY-PRINTER DO-NOTHING)
+  (run-hook :output-from-server-hook "foo") => "TEST: foo"
+

+ +

Side Effects:

+

function will be run by run-hook for mode.

+ +

Affected By: None.

+ +

Exceptional Situations: None

+ +

See Also:

+

+ remove-hook + run-hook +

+ +

Notes: +

If function is already on the hook list for mode, it will + not be added again.

+ +
+

Function REMOVE-HOOK

+

Syntax:

+

+ remove-hook function mode => hook-list +

+ +

Arguments and Values:

+

+

function--a function designator. +

mode---A keyword.

+

hook-list---A list containing the active functions for mode.

+

+ +

Description: None.

+ +

Examples:

+

+  (remove-hook 'my-printer :output-from-server-hook) => NIL

+ +

Side Effects:

+

function is no longer called by run-hook.

+ +

Affected By: None.

+ +

Exceptional Situations: None

+ +

See Also:

+

+ add-hook + run-hook +

+ +

Notes:

+

+ If function is not on the hook list for mode, the hook list is + returned without change. You can use this facility to get the current list + of functions for mode by removing NIL from the hook list. +

+ +
+

Function RUN-HOOK

+

Syntax:

+

+ run-hook mode &optional arg + => result* +

+ +

Arguments and Values:

+

+

mode---a keyword.

+

arg---an object.

+

results---the values returned by the last non-NIL terminating function.

+

+ +

Description:

+

+ Applies the + functions for mode to the args. +

+

+ A hook-list acts as a filter, passing the output of one filter into the input of + the next. If a function on the hook-list returns NIL, it is treated in this iteration + as if it hadn't been on the hook-list in the first place. Thus, the only time + run-hook returns NIL is when every function on the hook-list returns + NIL. +

+ +

Examples:

+

+  (run-hook :output-from-server-hook "Foobar!") => "TEST: Foobar!"

+ +

Side Effects: None.

+ +

Affected By:

+

+ The hook list for mode. All the functions on the list are called, in + order. The last function which returns a non-nil value is used as the result + function. +

+ +

Exceptional Situations:

+

+ If a function on the hook list for mode is not a function + designator, an error will be raised. +

+ +

See Also:

+

+ add-hook + remove-hook +

+ +

Notes: None.

+ +
+

Function ADD-KEYWORD

+

Syntax:

+

+ add-keyword function keyword => result +

+ +

Arguments and Values:

+

+

function--a function designator. +

keyword---a string.

+

result---the function designator for keyword.

+

+ +

Description: None.

+ +

Examples:

+

  (defun my-keyword (args)
+    (format t "Keyword expander: ~S~%" args)) => MY-KEYWORD
+  (add-keyword 'my-keyword "foo") => MY-KEYWORD

+ +

Side Effects:

+

+ keyword is registered for keyword expansion. +

+ +

Affected By: None.

+ +

Exceptional Situations: None

+ +

See Also:

+

+ remove-keyword +

+ +

Notes:

+

+ The keyword expander compares keywords in a case insensitive fashion. So "FOO" and + "foo" are equivalent. +

+ +
+

Function REMOVE-KEYWORD

+

Syntax:

+

+ remove-keyword keyword => result +

+ +

Arguments and Values:

+

+

keyword---a string.

+

result---the T on successful removal. NIL otherwise. +

+ +

Description: None.

+ +

Examples:

+

  (remove-keyword "foo") => T
+  (remove-keyword "foo") => NIL

+ +

Side Effects:

+

+ keyword is no longer expanded by the keyword expander. +

+ +

Affected By: None.

+ +

Exceptional Situations: None

+ +

See Also:

+

+ add-keyword +

+ +

Notes:

+

+ The keyword expander compares keywords in a case insensitive fashion. So "FOO" and + "foo" are equivalent. +

+ +
+

Function ADD-KEYSTROKE-MACRO

+

Syntax:

+

+ add-keystroke-macro function keystroke => result +

+ +

Arguments and Values:

+

+

function--a function designator. +

keystroke---a keyword.

+

result---the function designator for keyword.

+

+ +

Description: None.

+ +

Examples:

+

  (defun my-keystroke-macro (keystroke)
+    (format t "Should expand keystroke ~S here.~%" keystroke)) => MY-KEYSTROKE-MACRO
+  (add-keystroke-macro 'my-keystroke-macro :f1) => MY-KEYSTROKE-MACRO

+ +

Side Effects:

+

+ function is called when keystroke is pressed. +

+ +

Affected By: None.

+ +

Exceptional Situations: None

+ +

See Also:

+

+ remove-keystroke-macro +

+ +

Notes:

+

+ Unlike most other functions defined here, keystrokes don't do anything by default. + This means that in order to achieve some user-visible result, you'll have to use + the lower level functions print-to-world, or send-to-mux.. +

+

This format is likely to change very soon!

+

+ Keystrokes, currently, are keywords with the following format: +

+  keystroke := :[<modifier>-]*<keycode>
+  modifier := cmd|opt|ctrl|shift|numpad
+  keycode := <fkey>|character
+  fkey := f1 .. fn .. f35
+ So, hitting 8 on the number pad, while the command key is down yields the keyword: :cmd-numpad-8 +

+ +
+

Function REMOVE-KEYSTROKE-MACRO

+

Syntax:

+

+ remove-keystroke-macro keystroke => result +

+ +

Arguments and Values:

+

+

keystroke---a keyword.

+

result---T, if the keystroke was previously registered, NIL otherwise.

+

+ +

Description: None.

+ +

Examples:

+

  (remove-keystroke-macro :f1) => T
+  (remove-keystroke-macro :f1) => NIL

+ +

Side Effects:

+

+ keystroke no longer triggers a function call. +

+ +

Affected By: None.

+ +

Exceptional Situations: None

+ +

See Also:

+

+ add-keystroke-macro +

+ +

Notes:

+

This format is likely to change very soon!

+

+ Keystrokes, currently, are keywords with the following format: +

+  keystroke := :[<modifier>-]*<keycode>
+  modifier := cmd|opt|ctrl|shift|numpad
+  keycode := <fkey>|character
+  fkey := f1 .. fn .. f35
+ So, hitting 8 on the number pad, while the command key is down yields the keyword: :cmd-numpad-8 +

+ +
+

Function SEND-TO-MUX

+

Syntax:

+

+ send-to-mux world-id string +

+ +

Arguments and Values:

+

+

world-id---an object.

+

string---a string.

+

+ +

Description:

+

+ This is the low-level function to send data to the MUX server associated with + world-id. Currently, you can only send a string command, which will be + interpreted by the MUX directly. This may change in the future to allow for + attributed strings. +

+ +

Examples:

+

  (send-to-mux *world* (format nil "Wauug!~%"))

+ +

Side Effects: None.

+ +

Affected By: None.

+ +

Exceptional Situations: None

+ +

See Also:

+

+ print-to-world + set-status-buffer +

+ +

Notes:

+

+ world-id is available as the *world* special variable. +

+ +
+

Function PRINT-TO-WORLD

+

Syntax:

+

+ print-to-world world-id arg +

+ +

Arguments and Values:

+

+

world-id---an object.

+

string---a string.

+

+ +

Description:

+

+ This is the low-level function to send data to the Moxie's world output view + associated with world-id. You can send either a normal string or an + attributed string for printing. +

+ +

Examples:

+

  (print-to-world *world* (format nil "Wauug!~%"))

+ +

Side Effects: None.

+ +

Affected By: None.

+ +

Exceptional Situations: None

+ +

See Also:

+

+ send-to-mux + set-status-buffer + make-attributed-string +

+ +

Notes:

+

+ world-id is available as the *world* special variable. +

+ +
+

Function SET-STATUS-BUFFER

+

Syntax:

+

+ set-status-buffer world-id string +

+ +

Arguments and Values:

+

+

world-id---an object.

+

string---a string.

+

+ +

Description:

+

+ Sets the status buffer of the window associated with world-id to string. +

+ +

Examples:

+

  (set-status-buffer *world* "Hello, world!")

+ +

Side Effects: None.

+ +

Affected By: None.

+ +

Exceptional Situations: None

+ +

See Also:

+

+ send-to-mux + print-to-world +

+ +

Notes:

+

+ world-id is available as the *world* special variable. +

+ +
+

Function ENABLE-LOGGING

+

Syntax:

+

+ enable-logging world-id +

+ +

Arguments and Values:

+

+

world-id---an object.

+

+ +

Description:

+

+ Enables logging for the world associated with world-id. +

+ +

Examples:

+

  (enable-logging *world*)

+ +

Side Effects: None.

+ +

Affected By: None.

+ +

Exceptional Situations: None

+ +

See Also:

+

+ disable-logging +

+ +

Notes:

+

+ world-id is available as the *world* special variable. +

+ +
+

Function DISABLE-LOGGING

+

Syntax:

+

+ disable-logging world-id +

+ +

Arguments and Values:

+

+

world-id---an object.

+

+ +

Description:

+

+ Disables logging for the world associated with world-id. +

+ +

Examples:

+

  (disable-logging *world*)

+ +

Side Effects: None.

+ +

Affected By: None.

+ +

Exceptional Situations: None

+ +

See Also:

+

+ enable-logging +

+ +

Notes:

+

+ world-id is available as the *world* special variable. +

+ +
+

Function MAKE-ATTRIBUTED-STRING

+

Syntax:

+

+ make-attributed-string string &rest attribute* => result +

+ +

Arguments and Values:

+

+

string---a string.

+

attributes---a list.

+

result---a list.

+

+ +

Description:

+

+ Creates a string with attributes applied to it. This allows you to change various display properties of the string, such as the color, font, and style. +

+ +

Examples:

+

+  (make-attributed-string "Wauug!" (make-range 0 (length "Wauug!"))
+                                   (make-color 100 100 100)
+                                   (make-underline 1)) => ("Wauug!" ((:RANGE 0 6)
+							             (:COLOR 100 100 100)
+							             (:UNDERLINE 1)))

+ +

Side Effects: None.

+ +

Affected By: None.

+ +

Exceptional Situations: None

+ +

See Also:

+

+ make-range + make-font + make-color + make-super + make-underline + make-link +

+ +

Notes:

+

+ The only hook, currently, which can use attributed strings is :output-from-server-hook, which calls on print-to-world to display results. Those are the only places within Moxie to which you should be sending attributed strings. +

+ +
+

Function MAKE-RANGE

+

Syntax:

+

+ make-range index length => result +

+ +

Arguments and Values:

+

+

index---a bounding index designator. +

length---a non-negative integer. +

result---a list.

+

+ +

Description:

+

+ Creates a range object from index for a length. +

+ +

Examples:

+

  (make-range 0 (length "Wauug!")) => (:RANGE 0 6)

+ +

Side Effects: None.

+ +

Affected By: None.

+ +

Exceptional Situations: None

+ +

See Also:

+

+ make-attributed-string + make-font + make-color + make-super + make-underline + make-link +

+ +

Notes:

+

+ This function is likely to go away in the future as the attributed string mechansism gets cleaned up. +

+ +
+

Function MAKE-FONT

+

Syntax:

+

+ make-font name size => result +

+ +

Arguments and Values:

+

+

name---a string.

+

size---a real. +

+

result---a list.

+

+ +

Description:

+

+ Creates a font object. The font is located by name and is size points high. +

+ +

Examples:

+

  (make-font "apple-monaco" 12.0) => (:FONT "apple-monaco" 12.0)

+ +

Side Effects: None.

+ +

Affected By: None.

+ +

Exceptional Situations: None

+ +

See Also:

+

+ make-attributed-string + make-range + make-color + make-super + make-underline + make-link +

+ +
+

Function MAKE-COLOR

+

Syntax:

+

+ make-color red-value green-value blue-value => result +

+ +

Arguments and Values:

+

+

red-value---an integer between 0 and 255. +

green-value---an integer between 0 and 255. +

blue-value---an integer between 0 and 255. +

result---a list.

+

+ +

Description:

+

+ Creates a color object with the specified values for red, green, and blue. +

+ +

Examples:

+

  (make-color 100 100 100) => (:COLOR 100 100 100)

+ +

Side Effects: None.

+ +

Affected By: None.

+ +

Exceptional Situations: None

+ +

See Also:

+

+ make-attributed-string + make-range + make-font + make-super + make-underline + make-link +

+ +
+

Function MAKE-SUPER

+

Syntax:

+

+ make-super level => result +

+ +

Arguments and Values:

+

+

level---a non-negative integer. +

result---a list.

+

+ +

Description:

+

+ Creates a superscript attribute at the specified level. At level 0, the text is inline with normally attributed text, at each level above 0, the text moves higher and becomes smaller, denoting a superscript. +

+ +

Examples:

+

  (make-super 1) => (:SUPER 1)

+ +

Side Effects: None.

+ +

Affected By: None.

+ +

Exceptional Situations: None

+ +

See Also:

+

+ make-attributed-string + make-range + make-font + make-color + make-underline + make-link +

+ +
+

Function MAKE-UNDERLINE

+

Syntax:

+

+ make-underline level => result +

+ +

Arguments and Values:

+

+

level---a non-negative integer. +

result---a list.

+

+ +

Description:

+

+ Creates an underline attribute with level number of underline strokes. +

+ +

Examples:

+

  (make-underline 1) => (:UNDERLINE 1)

+ +

Side Effects: None.

+ +

Affected By: None.

+ +

Exceptional Situations: None

+ +

See Also:

+

+ make-attributed-string + make-range + make-font + make-color + make-super + make-link +

+ +
+

Function MAKE-LINK

+

Syntax:

+

+ make-link url => result +

+ +

Arguments and Values:

+

+

url---a string.

+

result---a list.

+

+ +

Description:

+

+ Creates a link attribute, pointing to url. +

+ +

Examples:

+

  (make-link "http://www.spork.org/") => (:LINK "http://www.spork.org/")

+ +

Side Effects: None.

+ +

Affected By: None.

+ +

Exceptional Situations: None

+ +

See Also:

+

+ make-attributed-string + make-range + make-font + make-color + make-super + make-underline +

+ +
+

Function ESCAPE-MUX-STRING

+

Syntax:

+

+ escape-mux-string string => result +

+ +

Arguments and Values:

+

+

string---a string.

+

result---a string.

+

+ +

Description:

+

+ This function is used to create pre-formatted strings for a MUX. MUXes normally ignore sequences of white space, and error on newlines, ignoring tab markins except as their capacity for white space. You can get around this by injecting %r, %t, and %b for newlines, tab characters, and white space, respectively. This function does that for you. +

+ +

Examples:

+

  (escape-mux-string "xyzzy plugh") => "xyzzy%bplugh"

+ +

Side Effects: None.

+ +

Affected By: None.

+ +

Exceptional Situations: None

+ +

Notes:

+

+ This function may only be useful for MUSHes. If your MUX escapes strings differently than a MUSH, then you will need a new function. +

+ +
+

Function MAP-VARIABLES

+

Syntax:

+

+ map-variables string variable-list=> result-string +

+ +

Arguments and Values:

+

+

string---a string.

+

variable-list---a list containing the variable substitutions for string. +

result-string---a string.

+

+ +

Description:

+

+ map-variables returns a string composed by substituting patterns of + the form $number$ from string with those places in variable-list. + So, $1$ refers to the first position (i.e., car) of the list + variable-list. +

+ +

Examples:

+

+  (map-variables "one: $1$ two: $2$ three: $3$" '(1 2 3)) => "one: 1 two: 2 three: 3"

+

Side Effects: None.

+ +

Affected By: None.

+ +

Exceptional Situations: None

+ + diff --git a/English.lproj/Moxie Help/pages/.svn/text-base/lisp-glossary.html.svn-base b/English.lproj/Moxie Help/pages/.svn/text-base/lisp-glossary.html.svn-base new file mode 100644 index 0000000..6f64434 --- /dev/null +++ b/English.lproj/Moxie Help/pages/.svn/text-base/lisp-glossary.html.svn-base @@ -0,0 +1,68 @@ + + + + Lisp Glossary + + + + +

Lisp Glossary

+ +
ASDF
+

(abbrev, "Another System Definition Facility" A way to + package a lisp bundle together. See the CLiki + page for further + details.

+ +
bjc-utils
+

A collection of utilities the author (bjc) finds useful, and so, + in order to facilitate his hacking, he has also included within + Moxie.

+ +
CLHS
+

(abbrev, "Common Lisp HyperSpec") The authoritative + reference for the ANSI ratified Common Lisp.

+ +

You may find a version of the HyperSpec online at: + + LispWorks

+ +
CLiki
+

(from "Common Lisp" and "Wiki") A Wiki devoted to + Common Lisp.

+ +

See http://www.cliki.net/

+ +
CL-PPCRE
+

(abbrev, "Common Lisp Portable Perl Compatible Regular Expression") + A Lisp package with functions to parse and match + with PERL-style Regular Expressions.

+ +

See the CLiki + page for + further details.

+ +
ECL
+

(abbrev, "Embeddable Common Lisp") Moxie uses ECL for + its lisp sub-system. More information on ECL can be found on the + SourceForge + project page

+ +
package
+

Packages are a kind of lisp "library". See the CLHS + Chapter 11.

+ +
REPL
+

(abbrev, "Read, Eval, Print Loop") The main loop responsible + for accepting user input, evaluating the input, and printing the results + of that evaluation. The REPL is often used synonymously with + "top level."

+ +
Top Level
+

The top-most REPL. It is the first loop instantiated + by the lisp sub-system, from which everything else is evaluated.

+ + diff --git a/English.lproj/Moxie Help/pages/.svn/text-base/navigation.html.svn-base b/English.lproj/Moxie Help/pages/.svn/text-base/navigation.html.svn-base new file mode 100644 index 0000000..b639388 --- /dev/null +++ b/English.lproj/Moxie Help/pages/.svn/text-base/navigation.html.svn-base @@ -0,0 +1,24 @@ + + + + Navigation + + + + +
+ + + diff --git a/English.lproj/Moxie Help/pages/.svn/text-base/overview.html.svn-base b/English.lproj/Moxie Help/pages/.svn/text-base/overview.html.svn-base new file mode 100644 index 0000000..a32bb6c --- /dev/null +++ b/English.lproj/Moxie Help/pages/.svn/text-base/overview.html.svn-base @@ -0,0 +1,36 @@ + + + + Overview + + + + +

Overview

+

Moxie is a client for MUX systems. Some of its + notable features are:

+ + + +

You can create sessions ("Worlds" in Moxie) + which contain all your preferences for a given world, as well as configure + global preferences (such as what worlds to start up when Moxie launches).

+ +

If you want to learn more about any of this, click a topic on the left.

+ + diff --git a/English.lproj/Moxie Help/pages/.svn/text-base/plugin.html.svn-base b/English.lproj/Moxie Help/pages/.svn/text-base/plugin.html.svn-base new file mode 100644 index 0000000..1f048c1 --- /dev/null +++ b/English.lproj/Moxie Help/pages/.svn/text-base/plugin.html.svn-base @@ -0,0 +1,203 @@ + + + + Plugin Lifestyle + + + + +

Introduction

+

Or: The worlds of MUXing are varied, so why shouldn't my viewer be?

+

+ Most MUXes are built off very similar codebases and design patters, but + within those similar roots are an infinite and varied number of worlds. +

+

+ In order to cope with the almost maddening variety in MUXing, + programmatically, you have to develop some kind of programming language. + For instance, TinyFugue's trigger's are a simple programming language. +

+

+ So, to allow for the largest amount of flexibility in Moxie, Moxie + includes a full programming language. While inventing one specifically + for Moxie would certainly be the norm, it is not something that should + be valued highly. In fact, by using a standard language, you get a lot + of benefits of useably free code-base. +

+

+ So, Moxie includes an embedded lisp + interpreter. This gives you the full power of the Lisp language from + within your plugin code. What kind of things you write, and how you want to + interact with Moxie and your MUX are limited only by your imagination. +

+

+ This does mean you'll have to learn Lisp - at least a little - in order + to write any plugins for Moxie, although I will endeavour to keep things + as simple as possible throughout this document. +

+ +

Quick Start

+

Or: Just Gimme the Code, and I'll Come Back When I Need You.

+

+ The simplest plugins are keyword expansions: when you type + "/foobar baz" into Moxie, it will try to trigger keyword expansion for + the keyword "foobar". +

+

+ To register a keyword expander, you first have to write the code + for the expander, then register it with the keyword expansion hook. + all the functions referenced here are exported from the MOXIE + package. +

+

+ First, we'll create a package for our test plugin, and use the moxie + package, as well as the + bjc-utils package. +

+
+      (defpackage test-plugin
+        (:use :cl :cl-user :moxie :bjc-utils))
+      (in-package :test-plugin)
+    
+

+ Then we define our expander function. We just want to take a name off + of the argument line, and page them with "hello!". For the sake of + debugging, we also want to print out what we got as the argument + to the lisp REPL: +

+
+      (defun foobar-handler (string)
+        (format t "foobar-handler got: ~A~%" string)
+        (map-variables "page $1$ = hello!"
+                       (split string #\Space)))
+    
+

+ The function we've defined returns the string from the map-variables + command. This return value is what's sent to the MUX. If we don't want + to send anything to the MUX you can return an empty string ("") or + nil. +

+

+ Now that we have the function defined, we want to register it with + the keyword expansion hook: +

+
+      (add-keyword 'foobar-handler "foobar")
+    
+

+ To test this, first bring up the REPL window so we can see what's + being printed out by the function as it runs. To do this, select + "Lisp REPL" from the "Window" menu. +

+

+ Now, in Moxie, type "/foobar me", and, assuming you're connected + to a MUX, you should get a page from yourself saying, "hello!". + In the REPL window, however, you'll see: +

+
+      foobar-handler got: me
+    
+

+ Which means the handler received the string "me" as the argument + string. +

+

+ If you're curious how the functions map-variables and split work, + in the REPL, type "(documentation 'map-variables 'function)" to view + their documentation. +

+

+ There are other pre-defined triggers that work in a similar fashion. + There is a list of them in the moxie.lisp file in the + resources directory. +

+ +

Appendix: Pre-defined variables and triggers

+

+ Moxie uses a set of pre-defined symbols to communicate with the lisp + sub-system. Below is a table of symbols, what type they are, and what + they do. +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
moxie::*moxie-result-stream*streamThe stream for communicating with Moxie.
moxie::*world*objectThe currently active world-id. This may be 0, if a world hasn't called into + the plugin system.
moxie::eval-hookfunctionUsed by Moxie to send data from the REPL window to the + lisp plugin system.
moxie::input-to-server-hookfunctionUsed by Moxie to send data to the lisp plugins after receiving + something from the input line.
moxie::output-from-server-hookfunctionUsed by Moxie when data is received from the MUX for display + on the screen.
moxie::keystroke-hookfunctionUsed by Moxie when a registered keystroke is pressed to call into its + function
moxie::world-opened-hookfunctionUsed by Moxie to tell the plugin system a new world has opened.
moxie::world-closed-hookfunctionUsed by Moxie to tell the plugin system a world has closed.
moxie::start-logging-hookfunctionUsed by Moxie to tell the plugin system it wishes to log transcripts.
moxie::stop-logging-hookfunctionUsed by Moxie to tell the plugin system it no longer wishes to log.
+ +

Appendix: Sample source code

+

+ You can find definitions for all the built in functions in the Application + bundle: Contents/Resources/*.lisp. The file startlisp + parses the file init-template.lisp and starts the lisp with the parsed + file, loading the rest of the plug in system with it. +

+

+ There are certain hooks in tpl.lisp which the application calls. You + can have a look at them, and even change them if you want, but don't + rename them or Moxie won't work anymore. +

+

+ Also included in the Application Plug-Ins directory are a few pre-supplied plug ins + which you can use as an example. This includes the default logger, numpad movement macros, + and ANSI color support. +

+ + + + + To Do + + + + +

To Do

+ + + + diff --git a/English.lproj/Moxie Help/pages/.svn/text-base/whatsnew.html.svn-base b/English.lproj/Moxie Help/pages/.svn/text-base/whatsnew.html.svn-base new file mode 100644 index 0000000..b990505 --- /dev/null +++ b/English.lproj/Moxie Help/pages/.svn/text-base/whatsnew.html.svn-base @@ -0,0 +1,83 @@ + + + + What's New + + + + +

What's new

+

Since 0.4

+ + +

Since 0.3

+ + +

Since 0.2:

+ + +

Since 0.1:

+ + + diff --git a/English.lproj/Moxie Help/pages/bugs.html b/English.lproj/Moxie Help/pages/bugs.html new file mode 100644 index 0000000..b2a5fd5 --- /dev/null +++ b/English.lproj/Moxie Help/pages/bugs.html @@ -0,0 +1,20 @@ + + + + Known Bugs + + + + +

Known Bugs

+ + + diff --git a/English.lproj/Moxie Help/pages/faq.html b/English.lproj/Moxie Help/pages/faq.html new file mode 100644 index 0000000..a80cde3 --- /dev/null +++ b/English.lproj/Moxie Help/pages/faq.html @@ -0,0 +1,81 @@ + + + + Frequently Asked Questions + + + + +

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.

+
+ + diff --git a/English.lproj/Moxie Help/pages/function-template.html b/English.lproj/Moxie Help/pages/function-template.html new file mode 100644 index 0000000..da624de --- /dev/null +++ b/English.lproj/Moxie Help/pages/function-template.html @@ -0,0 +1,30 @@ +
+

Function NAME

+

Syntax:

+

+ NAME ARG => RETURN-VALUE +

+ +

Arguments and Values:

+

+

ARG---A TYPE.

+

RETURN-VALUE---An TYPE.

+

+ +

Description: None.

+ +

Examples:

+

CODE

+ +

Side Effects: None.

+ +

Affected By: None.

+ +

Exceptional Situations: None

+ +

See Also:

+

+ FUNCTION +

+ +

Notes: None

diff --git a/English.lproj/Moxie Help/pages/glossary.html b/English.lproj/Moxie Help/pages/glossary.html new file mode 100644 index 0000000..3606388 --- /dev/null +++ b/English.lproj/Moxie Help/pages/glossary.html @@ -0,0 +1,27 @@ + + + + + Glossary + + + + + +

+ Glossary +

+ + + diff --git a/English.lproj/Moxie Help/pages/lisp-functions.html b/English.lproj/Moxie Help/pages/lisp-functions.html new file mode 100644 index 0000000..a6091c7 --- /dev/null +++ b/English.lproj/Moxie Help/pages/lisp-functions.html @@ -0,0 +1,947 @@ + + + + + + Lisp Functions + + + + +

Moxie plugin functions

+

These functions are all exported from the MOXIE + package. +

+

+ Contents: +

+

+ +
+

Function WORLD-VAR

+

Syntax:

+

+ world-var name &optional (world-id *world*) => result +

+

+ (setf (world-var name &optional (world-id *world*)) new-value) +

+ +

Arguments and Values:

+

+

name---an object.

+

world-id---an object.

+

result---an object.

+

+ +

Description:

+

+ world-var is used to associate values, which are persistent throughout the application's lifetime, with name for a particular Moxie world, which has the unique identifier, world-id. +

+

+ setf may be used with world-var to modify the values associated with a given name, or to add a new entry. +

+ +

Examples:

+

  (setf (world-var :foo 0) 'bar) => BAR
+  (world-var :foo 0) => BAR
+  (world-var :foo 1) => NIL
+  (setf (world-var :foo 1) 'YOW) => YOW
+  (world-var :foo 1) => YOW
+  (world-var :foo 0) => BAR

+ +

Side Effects: None.

+ +

Affected By: None.

+ +

Exceptional Situations: None

+ +

Notes:

+

+ world-id is available as the *world* special variable. +

+ +
+

Function ADD-HOOK

+

Syntax:

+

+ add-hook function mode => hook-list +

+ +

Arguments and Values:

+

+

function--a function designator. +

mode---A keyword.

+

hook-list---A list containing the active functions for mode.

+

+ +

Description:

+

add-hook adds function to the list of functions to be run when + the hook mode is executed via run-hook.

+ +

Examples:

+

+  (defun my-printer (string)
+    (let ((string (if (stringp string) string (car string))))
+      (concatenate 'string "TEST: " string))) => MY-PRINTER
+  (add-hook 'my-printer :output-from-server-hook) => (MY-PRINTER)
+  (run-hook :output-from-server-hook "foo") => "TEST: foo"
+  (defun 'do-nothing (&rest args) nil) => DO-NOTHING
+  (add-hook 'do-nothing :output-from-server-hook) => (MY-PRINTER DO-NOTHING)
+  (run-hook :output-from-server-hook "foo") => "TEST: foo"
+

+ +

Side Effects:

+

function will be run by run-hook for mode.

+ +

Affected By: None.

+ +

Exceptional Situations: None

+ +

See Also:

+

+ remove-hook + run-hook +

+ +

Notes: +

If function is already on the hook list for mode, it will + not be added again.

+ +
+

Function REMOVE-HOOK

+

Syntax:

+

+ remove-hook function mode => hook-list +

+ +

Arguments and Values:

+

+

function--a function designator. +

mode---A keyword.

+

hook-list---A list containing the active functions for mode.

+

+ +

Description: None.

+ +

Examples:

+

+  (remove-hook 'my-printer :output-from-server-hook) => NIL

+ +

Side Effects:

+

function is no longer called by run-hook.

+ +

Affected By: None.

+ +

Exceptional Situations: None

+ +

See Also:

+

+ add-hook + run-hook +

+ +

Notes:

+

+ If function is not on the hook list for mode, the hook list is + returned without change. You can use this facility to get the current list + of functions for mode by removing NIL from the hook list. +

+ +
+

Function RUN-HOOK

+

Syntax:

+

+ run-hook mode &optional arg + => result* +

+ +

Arguments and Values:

+

+

mode---a keyword.

+

arg---an object.

+

results---the values returned by the last non-NIL terminating function.

+

+ +

Description:

+

+ Applies the + functions for mode to the args. +

+

+ A hook-list acts as a filter, passing the output of one filter into the input of + the next. If a function on the hook-list returns NIL, it is treated in this iteration + as if it hadn't been on the hook-list in the first place. Thus, the only time + run-hook returns NIL is when every function on the hook-list returns + NIL. +

+ +

Examples:

+

+  (run-hook :output-from-server-hook "Foobar!") => "TEST: Foobar!"

+ +

Side Effects: None.

+ +

Affected By:

+

+ The hook list for mode. All the functions on the list are called, in + order. The last function which returns a non-nil value is used as the result + function. +

+ +

Exceptional Situations:

+

+ If a function on the hook list for mode is not a function + designator, an error will be raised. +

+ +

See Also:

+

+ add-hook + remove-hook +

+ +

Notes: None.

+ +
+

Function ADD-KEYWORD

+

Syntax:

+

+ add-keyword function keyword => result +

+ +

Arguments and Values:

+

+

function--a function designator. +

keyword---a string.

+

result---the function designator for keyword.

+

+ +

Description: None.

+ +

Examples:

+

  (defun my-keyword (args)
+    (format t "Keyword expander: ~S~%" args)) => MY-KEYWORD
+  (add-keyword 'my-keyword "foo") => MY-KEYWORD

+ +

Side Effects:

+

+ keyword is registered for keyword expansion. +

+ +

Affected By: None.

+ +

Exceptional Situations: None

+ +

See Also:

+

+ remove-keyword +

+ +

Notes:

+

+ The keyword expander compares keywords in a case insensitive fashion. So "FOO" and + "foo" are equivalent. +

+ +
+

Function REMOVE-KEYWORD

+

Syntax:

+

+ remove-keyword keyword => result +

+ +

Arguments and Values:

+

+

keyword---a string.

+

result---the T on successful removal. NIL otherwise. +

+ +

Description: None.

+ +

Examples:

+

  (remove-keyword "foo") => T
+  (remove-keyword "foo") => NIL

+ +

Side Effects:

+

+ keyword is no longer expanded by the keyword expander. +

+ +

Affected By: None.

+ +

Exceptional Situations: None

+ +

See Also:

+

+ add-keyword +

+ +

Notes:

+

+ The keyword expander compares keywords in a case insensitive fashion. So "FOO" and + "foo" are equivalent. +

+ +
+

Function ADD-KEYSTROKE-MACRO

+

Syntax:

+

+ add-keystroke-macro function keystroke => result +

+ +

Arguments and Values:

+

+

function--a function designator. +

keystroke---a keyword.

+

result---the function designator for keyword.

+

+ +

Description: None.

+ +

Examples:

+

  (defun my-keystroke-macro (keystroke)
+    (format t "Should expand keystroke ~S here.~%" keystroke)) => MY-KEYSTROKE-MACRO
+  (add-keystroke-macro 'my-keystroke-macro :f1) => MY-KEYSTROKE-MACRO

+ +

Side Effects:

+

+ function is called when keystroke is pressed. +

+ +

Affected By: None.

+ +

Exceptional Situations: None

+ +

See Also:

+

+ remove-keystroke-macro +

+ +

Notes:

+

+ Unlike most other functions defined here, keystrokes don't do anything by default. + This means that in order to achieve some user-visible result, you'll have to use + the lower level functions print-to-world, or send-to-mux.. +

+

This format is likely to change very soon!

+

+ Keystrokes, currently, are keywords with the following format: +

+  keystroke := :[<modifier>-]*<keycode>
+  modifier := cmd|opt|ctrl|shift|numpad
+  keycode := <fkey>|character
+  fkey := f1 .. fn .. f35
+ So, hitting 8 on the number pad, while the command key is down yields the keyword: :cmd-numpad-8 +

+ +
+

Function REMOVE-KEYSTROKE-MACRO

+

Syntax:

+

+ remove-keystroke-macro keystroke => result +

+ +

Arguments and Values:

+

+

keystroke---a keyword.

+

result---T, if the keystroke was previously registered, NIL otherwise.

+

+ +

Description: None.

+ +

Examples:

+

  (remove-keystroke-macro :f1) => T
+  (remove-keystroke-macro :f1) => NIL

+ +

Side Effects:

+

+ keystroke no longer triggers a function call. +

+ +

Affected By: None.

+ +

Exceptional Situations: None

+ +

See Also:

+

+ add-keystroke-macro +

+ +

Notes:

+

This format is likely to change very soon!

+

+ Keystrokes, currently, are keywords with the following format: +

+  keystroke := :[<modifier>-]*<keycode>
+  modifier := cmd|opt|ctrl|shift|numpad
+  keycode := <fkey>|character
+  fkey := f1 .. fn .. f35
+ So, hitting 8 on the number pad, while the command key is down yields the keyword: :cmd-numpad-8 +

+ +
+

Function SEND-TO-MUX

+

Syntax:

+

+ send-to-mux world-id string +

+ +

Arguments and Values:

+

+

world-id---an object.

+

string---a string.

+

+ +

Description:

+

+ This is the low-level function to send data to the MUX server associated with + world-id. Currently, you can only send a string command, which will be + interpreted by the MUX directly. This may change in the future to allow for + attributed strings. +

+ +

Examples:

+

  (send-to-mux *world* (format nil "Wauug!~%"))

+ +

Side Effects: None.

+ +

Affected By: None.

+ +

Exceptional Situations: None

+ +

See Also:

+

+ print-to-world + set-status-buffer +

+ +

Notes:

+

+ world-id is available as the *world* special variable. +

+ +
+

Function PRINT-TO-WORLD

+

Syntax:

+

+ print-to-world world-id arg +

+ +

Arguments and Values:

+

+

world-id---an object.

+

string---a string.

+

+ +

Description:

+

+ This is the low-level function to send data to the Moxie's world output view + associated with world-id. You can send either a normal string or an + attributed string for printing. +

+ +

Examples:

+

  (print-to-world *world* (format nil "Wauug!~%"))

+ +

Side Effects: None.

+ +

Affected By: None.

+ +

Exceptional Situations: None

+ +

See Also:

+

+ send-to-mux + set-status-buffer + make-attributed-string +

+ +

Notes:

+

+ world-id is available as the *world* special variable. +

+ +
+

Function SET-STATUS-BUFFER

+

Syntax:

+

+ set-status-buffer world-id string +

+ +

Arguments and Values:

+

+

world-id---an object.

+

string---a string.

+

+ +

Description:

+

+ Sets the status buffer of the window associated with world-id to string. +

+ +

Examples:

+

  (set-status-buffer *world* "Hello, world!")

+ +

Side Effects: None.

+ +

Affected By: None.

+ +

Exceptional Situations: None

+ +

See Also:

+

+ send-to-mux + print-to-world +

+ +

Notes:

+

+ world-id is available as the *world* special variable. +

+ +
+

Function ENABLE-LOGGING

+

Syntax:

+

+ enable-logging world-id +

+ +

Arguments and Values:

+

+

world-id---an object.

+

+ +

Description:

+

+ Enables logging for the world associated with world-id. +

+ +

Examples:

+

  (enable-logging *world*)

+ +

Side Effects: None.

+ +

Affected By: None.

+ +

Exceptional Situations: None

+ +

See Also:

+

+ disable-logging +

+ +

Notes:

+

+ world-id is available as the *world* special variable. +

+ +
+

Function DISABLE-LOGGING

+

Syntax:

+

+ disable-logging world-id +

+ +

Arguments and Values:

+

+

world-id---an object.

+

+ +

Description:

+

+ Disables logging for the world associated with world-id. +

+ +

Examples:

+

  (disable-logging *world*)

+ +

Side Effects: None.

+ +

Affected By: None.

+ +

Exceptional Situations: None

+ +

See Also:

+

+ enable-logging +

+ +

Notes:

+

+ world-id is available as the *world* special variable. +

+ +
+

Function MAKE-ATTRIBUTED-STRING

+

Syntax:

+

+ make-attributed-string string &rest attribute* => result +

+ +

Arguments and Values:

+

+

string---a string.

+

attributes---a list.

+

result---a list.

+

+ +

Description:

+

+ Creates a string with attributes applied to it. This allows you to change various display properties of the string, such as the color, font, and style. +

+ +

Examples:

+

+  (make-attributed-string "Wauug!" (make-range 0 (length "Wauug!"))
+                                   (make-color 100 100 100)
+                                   (make-underline 1)) => ("Wauug!" ((:RANGE 0 6)
+							             (:COLOR 100 100 100)
+							             (:UNDERLINE 1)))

+ +

Side Effects: None.

+ +

Affected By: None.

+ +

Exceptional Situations: None

+ +

See Also:

+

+ make-range + make-font + make-color + make-super + make-underline + make-link +

+ +

Notes:

+

+ The only hook, currently, which can use attributed strings is :output-from-server-hook, which calls on print-to-world to display results. Those are the only places within Moxie to which you should be sending attributed strings. +

+ +
+

Function MAKE-RANGE

+

Syntax:

+

+ make-range index length => result +

+ +

Arguments and Values:

+

+

index---a bounding index designator. +

length---a non-negative integer. +

result---a list.

+

+ +

Description:

+

+ Creates a range object from index for a length. +

+ +

Examples:

+

  (make-range 0 (length "Wauug!")) => (:RANGE 0 6)

+ +

Side Effects: None.

+ +

Affected By: None.

+ +

Exceptional Situations: None

+ +

See Also:

+

+ make-attributed-string + make-font + make-color + make-super + make-underline + make-link +

+ +

Notes:

+

+ This function is likely to go away in the future as the attributed string mechansism gets cleaned up. +

+ +
+

Function MAKE-FONT

+

Syntax:

+

+ make-font name size => result +

+ +

Arguments and Values:

+

+

name---a string.

+

size---a real. +

+

result---a list.

+

+ +

Description:

+

+ Creates a font object. The font is located by name and is size points high. +

+ +

Examples:

+

  (make-font "apple-monaco" 12.0) => (:FONT "apple-monaco" 12.0)

+ +

Side Effects: None.

+ +

Affected By: None.

+ +

Exceptional Situations: None

+ +

See Also:

+

+ make-attributed-string + make-range + make-color + make-super + make-underline + make-link +

+ +
+

Function MAKE-COLOR

+

Syntax:

+

+ make-color red-value green-value blue-value => result +

+ +

Arguments and Values:

+

+

red-value---an integer between 0 and 255. +

green-value---an integer between 0 and 255. +

blue-value---an integer between 0 and 255. +

result---a list.

+

+ +

Description:

+

+ Creates a color object with the specified values for red, green, and blue. +

+ +

Examples:

+

  (make-color 100 100 100) => (:COLOR 100 100 100)

+ +

Side Effects: None.

+ +

Affected By: None.

+ +

Exceptional Situations: None

+ +

See Also:

+

+ make-attributed-string + make-range + make-font + make-super + make-underline + make-link +

+ +
+

Function MAKE-SUPER

+

Syntax:

+

+ make-super level => result +

+ +

Arguments and Values:

+

+

level---a non-negative integer. +

result---a list.

+

+ +

Description:

+

+ Creates a superscript attribute at the specified level. At level 0, the text is inline with normally attributed text, at each level above 0, the text moves higher and becomes smaller, denoting a superscript. +

+ +

Examples:

+

  (make-super 1) => (:SUPER 1)

+ +

Side Effects: None.

+ +

Affected By: None.

+ +

Exceptional Situations: None

+ +

See Also:

+

+ make-attributed-string + make-range + make-font + make-color + make-underline + make-link +

+ +
+

Function MAKE-UNDERLINE

+

Syntax:

+

+ make-underline level => result +

+ +

Arguments and Values:

+

+

level---a non-negative integer. +

result---a list.

+

+ +

Description:

+

+ Creates an underline attribute with level number of underline strokes. +

+ +

Examples:

+

  (make-underline 1) => (:UNDERLINE 1)

+ +

Side Effects: None.

+ +

Affected By: None.

+ +

Exceptional Situations: None

+ +

See Also:

+

+ make-attributed-string + make-range + make-font + make-color + make-super + make-link +

+ +
+

Function MAKE-LINK

+

Syntax:

+

+ make-link url => result +

+ +

Arguments and Values:

+

+

url---a string.

+

result---a list.

+

+ +

Description:

+

+ Creates a link attribute, pointing to url. +

+ +

Examples:

+

  (make-link "http://www.spork.org/") => (:LINK "http://www.spork.org/")

+ +

Side Effects: None.

+ +

Affected By: None.

+ +

Exceptional Situations: None

+ +

See Also:

+

+ make-attributed-string + make-range + make-font + make-color + make-super + make-underline +

+ +
+

Function ESCAPE-MUX-STRING

+

Syntax:

+

+ escape-mux-string string => result +

+ +

Arguments and Values:

+

+

string---a string.

+

result---a string.

+

+ +

Description:

+

+ This function is used to create pre-formatted strings for a MUX. MUXes normally ignore sequences of white space, and error on newlines, ignoring tab markins except as their capacity for white space. You can get around this by injecting %r, %t, and %b for newlines, tab characters, and white space, respectively. This function does that for you. +

+ +

Examples:

+

  (escape-mux-string "xyzzy plugh") => "xyzzy%bplugh"

+ +

Side Effects: None.

+ +

Affected By: None.

+ +

Exceptional Situations: None

+ +

Notes:

+

+ This function may only be useful for MUSHes. If your MUX escapes strings differently than a MUSH, then you will need a new function. +

+ +
+

Function MAP-VARIABLES

+

Syntax:

+

+ map-variables string variable-list=> result-string +

+ +

Arguments and Values:

+

+

string---a string.

+

variable-list---a list containing the variable substitutions for string. +

result-string---a string.

+

+ +

Description:

+

+ map-variables returns a string composed by substituting patterns of + the form $number$ from string with those places in variable-list. + So, $1$ refers to the first position (i.e., car) of the list + variable-list. +

+ +

Examples:

+

+  (map-variables "one: $1$ two: $2$ three: $3$" '(1 2 3)) => "one: 1 two: 2 three: 3"

+

Side Effects: None.

+ +

Affected By: None.

+ +

Exceptional Situations: None

+ + diff --git a/English.lproj/Moxie Help/pages/lisp-glossary.html b/English.lproj/Moxie Help/pages/lisp-glossary.html new file mode 100644 index 0000000..6f64434 --- /dev/null +++ b/English.lproj/Moxie Help/pages/lisp-glossary.html @@ -0,0 +1,68 @@ + + + + Lisp Glossary + + + + +

Lisp Glossary

+ +
ASDF
+

(abbrev, "Another System Definition Facility" A way to + package a lisp bundle together. See the CLiki + page for further + details.

+ +
bjc-utils
+

A collection of utilities the author (bjc) finds useful, and so, + in order to facilitate his hacking, he has also included within + Moxie.

+ +
CLHS
+

(abbrev, "Common Lisp HyperSpec") The authoritative + reference for the ANSI ratified Common Lisp.

+ +

You may find a version of the HyperSpec online at: + + LispWorks

+ +
CLiki
+

(from "Common Lisp" and "Wiki") A Wiki devoted to + Common Lisp.

+ +

See http://www.cliki.net/

+ +
CL-PPCRE
+

(abbrev, "Common Lisp Portable Perl Compatible Regular Expression") + A Lisp package with functions to parse and match + with PERL-style Regular Expressions.

+ +

See the CLiki + page for + further details.

+ +
ECL
+

(abbrev, "Embeddable Common Lisp") Moxie uses ECL for + its lisp sub-system. More information on ECL can be found on the + SourceForge + project page

+ +
package
+

Packages are a kind of lisp "library". See the CLHS + Chapter 11.

+ +
REPL
+

(abbrev, "Read, Eval, Print Loop") The main loop responsible + for accepting user input, evaluating the input, and printing the results + of that evaluation. The REPL is often used synonymously with + "top level."

+ +
Top Level
+

The top-most REPL. It is the first loop instantiated + by the lisp sub-system, from which everything else is evaluated.

+ + diff --git a/English.lproj/Moxie Help/pages/navigation.html b/English.lproj/Moxie Help/pages/navigation.html new file mode 100644 index 0000000..b639388 --- /dev/null +++ b/English.lproj/Moxie Help/pages/navigation.html @@ -0,0 +1,24 @@ + + + + Navigation + + + + +
+ + + diff --git a/English.lproj/Moxie Help/pages/overview.html b/English.lproj/Moxie Help/pages/overview.html new file mode 100644 index 0000000..a32bb6c --- /dev/null +++ b/English.lproj/Moxie Help/pages/overview.html @@ -0,0 +1,36 @@ + + + + Overview + + + + +

Overview

+

Moxie is a client for MUX systems. Some of its + notable features are:

+ + + +

You can create sessions ("Worlds" in Moxie) + which contain all your preferences for a given world, as well as configure + global preferences (such as what worlds to start up when Moxie launches).

+ +

If you want to learn more about any of this, click a topic on the left.

+ + diff --git a/English.lproj/Moxie Help/pages/plugin.html b/English.lproj/Moxie Help/pages/plugin.html new file mode 100644 index 0000000..1f048c1 --- /dev/null +++ b/English.lproj/Moxie Help/pages/plugin.html @@ -0,0 +1,203 @@ + + + + Plugin Lifestyle + + + + +

Introduction

+

Or: The worlds of MUXing are varied, so why shouldn't my viewer be?

+

+ Most MUXes are built off very similar codebases and design patters, but + within those similar roots are an infinite and varied number of worlds. +

+

+ In order to cope with the almost maddening variety in MUXing, + programmatically, you have to develop some kind of programming language. + For instance, TinyFugue's trigger's are a simple programming language. +

+

+ So, to allow for the largest amount of flexibility in Moxie, Moxie + includes a full programming language. While inventing one specifically + for Moxie would certainly be the norm, it is not something that should + be valued highly. In fact, by using a standard language, you get a lot + of benefits of useably free code-base. +

+

+ So, Moxie includes an embedded lisp + interpreter. This gives you the full power of the Lisp language from + within your plugin code. What kind of things you write, and how you want to + interact with Moxie and your MUX are limited only by your imagination. +

+

+ This does mean you'll have to learn Lisp - at least a little - in order + to write any plugins for Moxie, although I will endeavour to keep things + as simple as possible throughout this document. +

+ +

Quick Start

+

Or: Just Gimme the Code, and I'll Come Back When I Need You.

+

+ The simplest plugins are keyword expansions: when you type + "/foobar baz" into Moxie, it will try to trigger keyword expansion for + the keyword "foobar". +

+

+ To register a keyword expander, you first have to write the code + for the expander, then register it with the keyword expansion hook. + all the functions referenced here are exported from the MOXIE + package. +

+

+ First, we'll create a package for our test plugin, and use the moxie + package, as well as the + bjc-utils package. +

+
+      (defpackage test-plugin
+        (:use :cl :cl-user :moxie :bjc-utils))
+      (in-package :test-plugin)
+    
+

+ Then we define our expander function. We just want to take a name off + of the argument line, and page them with "hello!". For the sake of + debugging, we also want to print out what we got as the argument + to the lisp REPL: +

+
+      (defun foobar-handler (string)
+        (format t "foobar-handler got: ~A~%" string)
+        (map-variables "page $1$ = hello!"
+                       (split string #\Space)))
+    
+

+ The function we've defined returns the string from the map-variables + command. This return value is what's sent to the MUX. If we don't want + to send anything to the MUX you can return an empty string ("") or + nil. +

+

+ Now that we have the function defined, we want to register it with + the keyword expansion hook: +

+
+      (add-keyword 'foobar-handler "foobar")
+    
+

+ To test this, first bring up the REPL window so we can see what's + being printed out by the function as it runs. To do this, select + "Lisp REPL" from the "Window" menu. +

+

+ Now, in Moxie, type "/foobar me", and, assuming you're connected + to a MUX, you should get a page from yourself saying, "hello!". + In the REPL window, however, you'll see: +

+
+      foobar-handler got: me
+    
+

+ Which means the handler received the string "me" as the argument + string. +

+

+ If you're curious how the functions map-variables and split work, + in the REPL, type "(documentation 'map-variables 'function)" to view + their documentation. +

+

+ There are other pre-defined triggers that work in a similar fashion. + There is a list of them in the moxie.lisp file in the + resources directory. +

+ +

Appendix: Pre-defined variables and triggers

+

+ Moxie uses a set of pre-defined symbols to communicate with the lisp + sub-system. Below is a table of symbols, what type they are, and what + they do. +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
moxie::*moxie-result-stream*streamThe stream for communicating with Moxie.
moxie::*world*objectThe currently active world-id. This may be 0, if a world hasn't called into + the plugin system.
moxie::eval-hookfunctionUsed by Moxie to send data from the REPL window to the + lisp plugin system.
moxie::input-to-server-hookfunctionUsed by Moxie to send data to the lisp plugins after receiving + something from the input line.
moxie::output-from-server-hookfunctionUsed by Moxie when data is received from the MUX for display + on the screen.
moxie::keystroke-hookfunctionUsed by Moxie when a registered keystroke is pressed to call into its + function
moxie::world-opened-hookfunctionUsed by Moxie to tell the plugin system a new world has opened.
moxie::world-closed-hookfunctionUsed by Moxie to tell the plugin system a world has closed.
moxie::start-logging-hookfunctionUsed by Moxie to tell the plugin system it wishes to log transcripts.
moxie::stop-logging-hookfunctionUsed by Moxie to tell the plugin system it no longer wishes to log.
+ +

Appendix: Sample source code

+

+ You can find definitions for all the built in functions in the Application + bundle: Contents/Resources/*.lisp. The file startlisp + parses the file init-template.lisp and starts the lisp with the parsed + file, loading the rest of the plug in system with it. +

+

+ There are certain hooks in tpl.lisp which the application calls. You + can have a look at them, and even change them if you want, but don't + rename them or Moxie won't work anymore. +

+

+ Also included in the Application Plug-Ins directory are a few pre-supplied plug ins + which you can use as an example. This includes the default logger, numpad movement macros, + and ANSI color support. +

+ + + + + To Do + + + + +

To Do

+ + + + diff --git a/English.lproj/Moxie Help/pages/whatsnew.html b/English.lproj/Moxie Help/pages/whatsnew.html new file mode 100644 index 0000000..b990505 --- /dev/null +++ b/English.lproj/Moxie Help/pages/whatsnew.html @@ -0,0 +1,83 @@ + + + + What's New + + + + +

What's new

+

Since 0.4

+ + +

Since 0.3

+ + +

Since 0.2:

+ + +

Since 0.1:

+ + + -- cgit v1.2.3