The Computational Beauty of Nature
Source code

stutter

a simple lisp interpreter

stutter -help
  or
stutter
       [-heap integer]

interprets simple lisp and only understands car, cdr, cons, if, set, equal, quote, and lambda, but is still Turing-complete. Uses stop-and-copy garbage collection and has an adjustable heap size. Examples that implement integer and floating-point arithmetic are provided. There is even an example stutter function to compute the square root of a floating-point argument with nothing but the primitives listed above.

This is a simple lisp interpreter that only understands car, cdr, cons, if, set, equal, quote, and lambda, but is still Turing-complete. It uses stop-and-copy garbage collection and has an adjustable heap size. Besides the primitive functions listed above, STUTTER only knows about two cells, t and nil. See the examples for how integer arithmetic and more complicated programming constructs can be formed with the primitives.

Bugs

If STUTTER can free no cell after a call to the garbage collector, it will exit.

See Also

In the data directory are the STUTTER examples demo.slp, sample.slp and float.slp, which may be helpful.

Options

-heapNumber of cells in the heap.None

stutter.c on GitHub