This library contains a compiler and a decompiler written in Common Lisp for the Ook! language.
Of course it is much easier to program in Ook!, or peel bananas, if you first turn yourself into a orangutan and a librarian. Having said that, this library may help.
We'll assume that you have somehow (or magically?) loaded the
Ook! library in your CL environment
and that you have moved into the package named, you guessed,
"OOK"
. At this point you can ask the librarian (gently,
and, possibly, having a banana at hand) to load a .ook
file, compile it, execute it and see the results.
OOK 42 > (ook? "/where/ook-is/OOK/tests/hello.ook") Oook? Oook. Oook.. Oook! Hello World! #<Function 77 31AEB5B2>
The italicized text is the output of the compilation and the
function printed at the end is the value returned (a
funcall
-able function of no arguments.
If you want you can use the decompiler to see how the program
actually looks like. In the following ook.
is the
compiler and ook!
is the decompiler.
OOK 8 > (ook! (ook. "tests/hello.ook")) Ook. Ook? Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook! Ook? Ook? Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook? Ook! Ook! Ook? Ook! Ook? Ook. Ook! Ook. Ook. Ook? Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook! Ook? Ook? Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook? Ook! Ook! Ook? Ook! Ook? Ook. Ook. Ook. Ook! Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook! Ook. Ook! Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook! Ook. Ook. Ook? Ook. Ook? Ook. Ook? Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook! Ook? Ook? Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook? Ook! Ook! Ook? Ook! Ook? Ook. Ook! Ook. Ook. Ook? Ook. Ook? Ook. Ook? Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook! Ook? Ook? Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook? Ook! Ook! Ook? Ook! Ook? Ook. Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook. Ook? Ook. Ook? Ook. Ook? Ook. Ook? Ook. Ook! Ook. Ook. Ook. Ook. Ook. Ook. Ook. Ook! Ook. Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook. Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook! Ook. Ook. Ook? Ook. Ook? Ook. Ook. Ook! Ook. NIL
That's it. Now go and do some magic! (Or eat a banana, or play soccer!)
The hello.ook
program was taken from the first
reference. The bottles.ook
program that you can
find in the test
folder was taken from
the 99 bottles in Ook! example page.
The code is put in the public domain.
Use it for learning, do not invoke strange spells and do not call the Librarian "monkey"!
No orangutans were harmed while writing this library. Some unlucky people were; they did not heed the warning not to call the Librarian "monkey".