Hacker News new | ask | show | jobs
by greymalik 1463 days ago
I was actually asking about The Elements of Computing Systems in my comment, not Code. What language does it use to build a virtual computer?
4 comments

The hardware exercises expect you to use a simple HDL, you write an assembler in your language of choice (I used Ruby, but others have used Python or JavaScript), and you write programs for the computer you "built" in earlier chapters using Jack (a language with Java-like syntax).
I wrote mine in awk :)
You program in HDL using the Nand2Tetris software suite [1]. Super fun - I went through the book on my vacation last year. Highly recommended.

[1] https://www.nand2tetris.org/software

Quoted from the 2021 edition:

"Project 4 is written in the computer’s assembly language, and projects 9 and 12 (a simple computer game and a basic operating system) are written in Jack—the Java-like high-level language for which we build a compiler in chapters 10 and 11."

Nand2tetris uses its own version of Hardware Description Language (HDL). You will also write a compiler for it's own language called Hack.