5 Mal is an interpreter for a subset of the Clojure programming
6 language. Mal is implemented from scratch in 13 different languages:
13 * Javascript ([Online Demo](http://kanaka.github.io/mal))
23 Mal is also a learning tool. Each implentation of mal is separated
24 into 11 incremental, self-contained (and testable) steps that
25 demonstrate core concepts of Lisp. The last step is capable of
26 self-hosting (running the mal implemenation of mal).
28 The mal (make a lisp) steps are:
43 Mal was presented publicly for the first time in a lightning talk at
44 Clojure West 2014 (unfortunately there is no video). See
45 mal/clojurewest2014.mal for the presentation that was given at the
46 conference (yes the presentation is a mal program).
48 ## Building/running implementations
59 The C implementation of mal requires the following libraries: glib,
60 libffi6 and either the libedit or GNU readline library.
70 The C# implementation of mal has been tested on Linux using the Mono
71 C# compiler (mcs) and the Mono runtime (version 2.10.8.1). Both are
72 required to build and run the C# implementation.
85 lein with-profile +stepX trampoline run
93 mvn -quiet exec:java -Dexec.mainClass=mal.stepX_YYY
95 mvn -quiet exec:java -Dexec.mainClass=mal.stepX_YYY -Dexec.args="CMDLINE_ARGS"
108 Running the mal implementation of mal involves running stepA of one of
109 the other implementations and passing the mal step to run as a command
114 IMPL_STEPA_CMD ../mal/stepX_YYY.mal
127 For readline line editing support, install Term::ReadLine::Perl or
128 Term::ReadLine::Gnu from CPAN.
143 ### Postscript Level 2/3
147 gs -q -dNODISPLAY -I./ stepX_YYY.ps
166 The are nearly 400 generic Mal tests (for all implementations) in the
167 `tests/` directory. Each step has a corresponding test file containing
168 tests specific to that step. The `runtest.py` test harness uses
169 pexpect to launch a Mal step implementation and then feeds the tests
170 one at a time to the implementation and compares the output/return
171 value to the expected output/return value.
173 To simplify the process of running tests, a top level Makefile is
174 provided with convenient test targets.
176 * To run all the tests across all implementations (be prepared to wait):
182 * To run all tests against a single implementation:
192 * To run tests for a single step against all implementations:
202 * To run a specifc step against a single implementation: