Building My First Lisp Compiler

In August of 2020 I wrapped up work on a five year project, the Morgan And Grand Iron Clojure (MAGIC) compiler -- my first compiler for a mainstream programming language. MAGIC is written in Clojure and compiles Clojure into bytecode for the C# runtime. I had dabbled in language design and implementation before, but this was the first time I saw a compiler project through to the end. This talk is the story of how the compiler came into its current form, and the challenges encountered and overcome along the way. The focus will be on on the effectiveness of dynamic functional programming as well as the difference between programming language theory and the practical realities of compiler construction. Fans of compilers will enjoy the (horror) stories of the unexpected surprises encountered along the way, and fans of functional programming will enjoy hearing how programming with pure functions and immutable data helped overcome them. And if you are thinking of starting your own compiler project, this talk will be full of advice I wish I had heard when I started mine.

OBJECTIVES

* Share the story of how I designed and implemented MAGIC
* Review parts of the design that have held up and the parts that I would change
* Give the audience advice I wish I had heard when I started
* Explore the difference between language theory and the realities of practical compilers
* Emphasize the positive impact functional programming had on the project

AUDIENCE

People interested in getting into compiler construction or curious about how programming languages are made