November 24, 2025
Five projects, infinite opinions
Build a Compiler in Five Projects
Zero-to-compiler in 5 steps — fans cheer, skeptics sweat
TLDR: A masters-level course shows you how to build a working compiler in five projects using the Racket language and x86-64 assembly. Comments ask if beginners can join and cheer the $24 textbook, while debate flares over Racket and the no-frills approach without memory safety or garbage collection.
Want to build a real compiler in five bite-size projects? Professor Micinski’s CIS531 drops a DIY toolkit: learn Racket (a friendly functional language), then crank out a translator that turns code into x86-64 assembly—the stuff computers actually run. The syllabus promises loops, lambdas, and vectors, but skips fancy extras like type safety, register allocation, and garbage collection to keep things fast and fun. The full plan lives on the class site: kmicinski.com/cis531-f25.
The comment section instantly split between Bring-It-On and Wait-Do-I-Need-A-PhD. AdityaSanthosh, an electronics grad turned coder, asked if any compiler background was required, lighting up a thread of reassurances and caution signs: yes, you need basic C and a peek at assembly, but no safety nets if you mess up memory. Meanwhile, UncleOxidant showed up like Santa, crowing that the recommended book, “Essentials of Compilation,” is only ~$24—cue jokes about getting a compiler for the price of lunch. Racket skeptics dropped their usual “why not Rust?” hot take, fans fired back with it’s easy, it’s fast, it’s perfect for this. Meme-watch: “Five Projects to Rule Them All,” “malloc or bust,” and one brave soul vowed to skip the warmup and speedrun p2–p5. Verdict: equal parts hype and nerves.
Key Points
- •CIS531 is a masters-level course that teaches compiler construction through five projects in Racket targeting x86-64.
- •The curriculum follows Jeremy Siek’s “Essentials of Compilation” and includes slides and occasional course videos on the class website.
- •Project progression: p1 (Racket stack interpreter warmup), p2 (arithmetic/variables), p3 (booleans/branching), p4 (vectors/heap/mutation/loops), p5 (functions/recursion/lambdas via closure conversion).
- •Design choices prioritize rapid expressiveness: no type/memory safety, no register allocation, limited built-ins, and no garbage collection (uses malloc).
- •Suggested next steps for a more complete compiler include dynamic type tagging for safety, more built-ins, and register allocation; Boehm GC could be integrated if desired.