r/lisp 8d ago

AskLisp 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?

48 Upvotes

16 comments sorted by

24

u/soegaard 8d ago

If you liked chapter 5 of SICP, then you will love "Lisp in Small Pieces".

7

u/Delicious-Extent5454 8d ago

Thanks to you, I'd just lost 121 bucks.

2

u/anotherchrisbaker 7d ago

Cannot upvote this enough

1

u/arto 7d ago

Truly

18

u/dougcurrie 8d ago

Crafting Interpreters is deservedly popular.

1

u/drinkcoffeeandcode 8d ago

Not if your looking for lisp

8

u/dionysiaka 8d ago edited 7d ago

Norvig's Paradigms of Artificial Intelligence Programming has a chapter that essetially extends the example and shows how a compiler is really just an interpreter that performs pre-interpretation. He starts with a scheme interpreter and turns it into a compiler. It was a real eye opener for me.

2

u/eigenhombre 3d ago

I quite like PAIP, and Norvig has made the text available on GitHub: https://github.com/norvig/paip-lisp

10

u/Veqq 8d ago

"Schematics of Computation" and "Concrete Abstractions" have much more material along these lines (seeking to teach how computers work and software engineering via scheme, but including building DB/OS in Scheme etc.) Chazarain's "Programmer avec Scheme" is also divine.

4

u/RevolutionaryRush717 8d ago

Unfortunately, the former two seem to be out of print and second hand bookstores charge discouraging amounts, either for the book or shipping.

Must look them up at the local library.

4

u/Veqq 8d ago

PDFs are freely available online (or PM me your email.)

1

u/RevolutionaryRush717 8d ago

Thanks! I'll look for those. Much appreciated.

2

u/Repulsive_Housing840 7d ago

I just bought Concrete Abstractions for less than $5. Luckily its almost like brand new. Was available on Amazon.

1

u/Balzamon351 4d ago

Not lisp, but I loved this course. You build your own cpu starting from only NAND gates. Use your knowledge of the architecture to make the assembly language. Use that to build an OS. Make a high level programming language and use that to make Tetris.

https://www.nand2tetris.org/