Ur-Scheme: Compiling a Subset of R5RS Scheme to Asm

The home page for Ur-Scheme tells the tale of one mans journey implementing a compiler from a subset of Scheme to Assembly on Linux.

For folks interested in almost totally pure functional programs, here is a teaser:

It contains relatively little mutation. Although almost every line of the compiler has “side effects” like outputting lines of assembly code, there are fairly few locations where the compiler’s internal state is mutated. I count 25 calls to set! and string-set! in the 1600 lines of code, including the standard library.

Leave a Reply

Your email address will not be published. Required fields are marked *