Skip to content

Instantly share code, notes, and snippets.

View Feedmo's full-sized avatar
🎯
Focusing

jjjyjj Feedmo

🎯
Focusing
View GitHub Profile
@mrnugget
mrnugget / interpreter_to_compiler.md
Last active June 3, 2023 11:59
So you're finished with "Writing An Interpreter In Go" and want to read more?

This is what I once wrote to a reader:

  • Nand2Tetris book - http://www.nand2tetris.org/
  • The paper "An Incremental Approach to Compiler Construction", by Abdulaziz Ghuloum. You can find a hosted PDF version of the paper and an implementation of its contents here: https://github.com/namin/inc\
  • Jack Crenshaw's classic "LET'S BUILD A COMPILER" from 1988. Even though it's kinda dated (he's using Turbo Pascal), it's one of the great "let's roll our sleeves up and write some code" texts. Here is the PDF version: http://compilers.iecc.com/crenshaw/tutorfinal.pdf
  • Then there are also the 4th and 5th chapters of Structure an Interpretation of Computer Programs (SICP), in which you'll build an interpreter and a kinda bytecode-compiler for a virtual register machine. It's a pretty abstract and seemingly alien affair (using a Lisp dialect to build a virtual register machine for a bytecode defined in Lisp, produced by a Lisp compiler, etc.), but it teaches the concepts behind the whole compiler and VM thing.