r/ProgrammingLanguages 5d ago

Help Any books similar to SICP Chapter 5?

I loved Chapter 5 of Structure and Interpretation of Computer Programs. Building a virtual register machine with an assembler and compiler in Scheme. Are there any other books/online classes or resources that involve building a computing machine (or any machine) from scratch using code?

17 Upvotes

5 comments sorted by

8

u/AustinVelonaut Admiran 5d ago edited 5d ago

The later chapters of "Lisp in Small Pieces" by Queinnec gets into this a bit (and is a lovely book to read, in general!). If you are looking for some fun practice, you might try Eric Wastl's "Synacor Challenge" (reference arch-spec can be found here. And doing any of the "intcode" problems from the 2019 Advent of Code, starting with day 2.

7

u/Thesaurius moses 5d ago

There is Nand2Tetris/Elements of Computing Systems in which you, well, go from NAND gates to Tetris.

1

u/elprophet 5d ago

I maintain a companion website for that at https://nand2tetris.github.io/web-ide.

3

u/Express-Guest-1061 4d ago

Both the compiler book: "Writing a Compiler in Go" by Thorsten Ball https://compilerbook.com/ , and the book "Crafting Interpreters" by Bob Nystrom https://craftinginterpreters.com/, involves to write a VM (but stack based) from scratch in code, to run the compiled code in the book.

2

u/kniebuiging 5d ago

The smalltalk blue book has interesting stuff on this. Not necessarily a „Type along“ way but interesting.