mirror of
https://github.com/kanaka/mal.git
synced 2024-09-11 13:55:55 +03:00
README: add more details.
This commit is contained in:
parent
5d446bd8a0
commit
bcddc3e49a
62
README.md
62
README.md
@ -1,17 +1,57 @@
|
||||
# mal - Make a Lisp
|
||||
|
||||
See mal/presentation.mal
|
||||
## Description
|
||||
|
||||
Mal is an interpreter for a subset of the Clojure programming
|
||||
language. Mal is implemetated from scratch in 10 different languages:
|
||||
|
||||
* Javascript
|
||||
* Python
|
||||
* Clojure
|
||||
* C
|
||||
* Java
|
||||
* PHP
|
||||
* Bash shell
|
||||
* GNU Make
|
||||
* mal itself
|
||||
* Postscript (in-progress)
|
||||
|
||||
|
||||
Mal is also a learning tool. Each implentation of mal is separated
|
||||
into 11 incremental, self-contained (and testable) steps that
|
||||
demonstrate core concepts of Lisp. The last step is capable of
|
||||
self-hosting (running the mal implemenation of mal).
|
||||
|
||||
The mal (make a lisp) steps are:
|
||||
|
||||
* step0_repl
|
||||
* step1_read_print
|
||||
* step2_eval
|
||||
* step3_env
|
||||
* step4_if_fn_do
|
||||
* step5_tco
|
||||
* step6_file
|
||||
* step7_quote
|
||||
* step8_macros
|
||||
* step9_interop
|
||||
* stepA_more
|
||||
|
||||
|
||||
Mal was presented publicly for the first time in a lightning talk at
|
||||
Clojure West 2014 (unfortunately there is no video). See
|
||||
mal/clojurewest2014.mal for the presentation that was given at the
|
||||
conference (yes the presentation is a mal program).
|
||||
|
||||
## Building/running implementations
|
||||
|
||||
* Bash 4
|
||||
### Bash 4
|
||||
|
||||
```
|
||||
cd bash
|
||||
bash stepX_YYY.sh
|
||||
```
|
||||
|
||||
* C
|
||||
### C
|
||||
|
||||
```
|
||||
cd c
|
||||
@ -19,14 +59,14 @@ make
|
||||
./stepX_YYY
|
||||
```
|
||||
|
||||
* Clojure
|
||||
### Clojure
|
||||
|
||||
```
|
||||
cd clojure
|
||||
lein with-profile +stepX trampoline run
|
||||
```
|
||||
|
||||
* Java 1.7
|
||||
### Java 1.7
|
||||
|
||||
```
|
||||
cd java
|
||||
@ -36,14 +76,14 @@ mvn -quiet exec:java -Dexec.mainClass=mal.stepX_YYY
|
||||
mvn -quiet exec:java -Dexec.mainClass=mal.stepX_YYY -Dexec.args="CMDLINE_ARGS"
|
||||
```
|
||||
|
||||
* Javascript/Node
|
||||
### Javascript/Node
|
||||
|
||||
```
|
||||
cd js
|
||||
node stepX_YYY.js
|
||||
```
|
||||
|
||||
* Mal
|
||||
### Mal
|
||||
|
||||
Running the mal implementation of mal involves running stepA of one of
|
||||
the other implementations and passing the mal step to run as a command
|
||||
@ -55,28 +95,28 @@ IMPL_STEPA_CMD ../mal/stepX_YYY.mal
|
||||
|
||||
```
|
||||
|
||||
* GNU Make 3.81
|
||||
### GNU Make 3.81
|
||||
|
||||
```
|
||||
cd make
|
||||
make -f stepX_YYY.mk
|
||||
```
|
||||
|
||||
* PHP 5.3
|
||||
### PHP 5.3
|
||||
|
||||
```
|
||||
cd php
|
||||
php stepX_YYY.php
|
||||
```
|
||||
|
||||
* Postscript Level 2/3
|
||||
### Postscript Level 2/3
|
||||
|
||||
```
|
||||
cd ps
|
||||
gs -q -dNODISPLAY stepX_YYY.ps
|
||||
```
|
||||
|
||||
* Python 2.X
|
||||
### Python 2.X
|
||||
|
||||
```
|
||||
cd python
|
||||
|
Loading…
Reference in New Issue
Block a user