This is a LISP I put together while reading Build Your Own Lisp. Inspired by Lispy, Clojure and Common Lisp.
- Clone MPC and drop
mpc.c
andmpc.h
in the project root make build
(Please note this project is currently not cross-platform, and probably never will be. Will much likely work when compiling on Mac OS/Ubuntu)
./bin/idelisp
IdeLISP (type exit() to quit)
>> + 1 1
2
./bin/idelisp -f example.ilisp
2
make build_wasm
cd wasm
- Serve the directory in a webserver:
python -m SimpleHTTPServer
- open "http://localhost:8000/idelisp.html"
(load "standard.ilisp")
(+ 1 2)
(* (+ 2 3.1) (* 2 3))
{:my_key "value"}
(def :x 1)
(+ x 1)
(defn :plus-two '(x) '(+ 2 x))
(plus-two 2)
(defl :combine (fn '(x y) '(+ x y)))
(combine 2 1)
(== 1 1)
(if (== 1 1)
'(print 1)
'(print 2)
)
(if (and (== 1 1) (!= 1 0))
'(print 1)
'(print 2)
)
(not 0)
; I am a comment
(let '(a b) '(1 2)'
'(print a))
(zero-arity-fn ())
See the language specification
Its a pun on the french name for dogmatix in Asterix/Obelix, which is Idéfix.
This project is released under the Creative Commons Attribution-NonCommercial-ShareAlike 3.0