An insanely ugly dialect of LISP.


A dialect of lisp, meant for the Node.js runtime. What's the use of this? Not much other than to just fool around. In fact, I only wrote it to learn compilers.

# Might require sudo 
$ npm install -g decaf-lisp

Copy the code into a hello-world.lisp file.

(console-log "Hello, World!")

And then run the code.

$ decaf-lisp hello-world.lisp
# -> Hello, World! 
(if (< 5 6)
  ("5 is less than 6!")

If you want the above to outputed to the console, then you would simply prepend the above code with a console-log call.

(console-log (if (< 5 6)
  ("5 is less than 6!")
(defun myfunc (somParam)
  (console-log someParam))
; Calling the function.
(myfunc "Hello, World!")
; -> "Hello, World!"
  ((lambda (one, two)
    (+ one two)) 1 2))
; -> "3"
(defun fact (n)
  (if (= n)
    (* (- n 1) n)))
(console-log (fact 3))
  • command-line options