Toy lisps for fun
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


#((lambda (x) (if (eq x 'nothing-to-see-here) 'move-along 'go-ahead)) 'nothing-to-see-here)


Yes, another aborted lisp. This one based on Paul Graham's essay: "The roots of lisp" Wrote it and uploaded here

Instead of using classes and nice stuff, I just screwed up the Objectclass to have unholy methods like car, caddr, cdr (any cxr, actually) and _eval.

As any mathematical thingy, it assumes you provide nice inputs (it goes into a satanic infinite loop of recursion if not).

I did this in an afternoon and didn't even write a parser, but you can use it like this:

          [[:eq, :x, [:quote, :nothing-to-see-here]], :move-along]
          [:t, [:quote, :go-ahead]]]]
  [:quote, :nothing-to-see-here]]._eval([
    #you'd put the environment here...

Or something like that.

A scheme implementation of the same LISP (McCarthy's lisp) is also provided, although it was never tested.


This one, a Scheme interpreter, is inspired by Peter Norvig's lispy and the tests (and hopefully completion) is taken from lispy2.

It greatly differs from the latter in that it doesn't represent everything as an array in the environment, but instead uses ruby Objects. Also, the environment is preloaded with lots of math functions and some lisp functions you'd expect in scheme.

This one does have a REPL, just run ruby norvig.rb and have fun.