6 ms·
The Joy of Nand2Tetris
- scottyeager 2y agoMany years ago I worked through The Elements of Computing Systems. It was the single most impactful experience in my computer learning journey. The book and exercises are a rare piece of pedagogical genius I am grateful to have encountered. You too can build a(n emulated) computer from scratch, and I can't recommend it highly enough.
- monero-xmr 2y agoYes, this is the book. Do all the exercises without cheating and you emerge as a much stronger engineer.
- WD-42 2y agoI’m interested in this. What it the best way to learn the material? The book? The coursera course? Both? It’s a bit hard to tell just from the website.
- bhasi 2y agoI've been following the website and the course material provided therein: https://www.nand2tetris.org/course https://www.nand2tetris.org/course I did not sign up for the course on Coursera because I was able to make progress just fine with the free material on the website and I did not want to pay Coursera to get their certificates of completion. The first 6 projects do not require purchasing the textbook as the relevant chapters are provided along with the project material. The next projects do not have the textbook chapters provided, so I bought the textbook. I'm currently working on Project 8. I've been blogging about my progress here, if you want to take a look: https://gurudas.dev/tag/nand2tetris/ https://gurudas.dev/tag/nand2tetris/
- simgt 2y agothe nand2tetris book, Ben Eater's tutorials and nandgame
- mikewarot 2y agoFor me, NandGame[1] is a far better way to go. You get a much better hands-on feel of things when you can toggle the inputs yourself, and see how things work. [1] https://nandgame.com/ https://nandgame.com/
- maheart 2y agoThere's a gamified version of nand2tetris available on Steam called "Turing Complete" (https://turingcomplete.game https://turingcomplete.game). I completed it up until the assembler challenges, and I felt the same way as the author. Granted I knew Kmaps, etc. from my uni days, but given the nand2tetris book you might be able to figure it out.
- dwedge 2y agoThat game is early access but hasn't been updated for 2 years so is probably going to stay that way. Is it compete enough?
- maxymoos 2y agoIt's complete enough, yes. I played it up until the "main quest" was done (building a TC machine). It took approx. 20 hours and I loved it in a very similar way as the blog post author describes Nand2Tetris, so I'll have to look this one up too.
- maheart 2y agoIMO, yes it is complete enough (note: I only went as far as the assembler challenges, I'd done enough assembler beforehand). But I did build a general purpose computer from NAND gates up. Development still appears to be ongoing on Discord, which is quite active. I think the dev may have bitten off more than they could chew with their last patch promise: https://www.youtube.com/watch?v=38cKko7sViw https://www.youtube.com/watch?v=38cKko7sViw
- wccrawford 2y agoYeah, not having any updates in 2 years for a performance rewrite is brutal. They haven't even posted news on Steam in over a year. Hopefully the traffic uptick from this will convince them they need to at least post a notice talking about what's going on with development.
- bnferguson 2y agoQuite. I had a great Christmas break a couple years back going through all the missions. It has some edges to it but people have also implemented things like RISC-V in it so it's also quite complete. The game portion is enough for fun and exploration. I got all the way to the final missions where you're writing your own assembly (that you created) to solve various programming puzzles. Only stopped because I got busy with something else and break was over. I def recommend it. Reminded me at the time of Code by Charles Petzold but applied. (Last I checked the Author was rewriting much of it for performance reasons and to fix up a few gotchas that should be possible with circuits but aren't here - no idea if they still are but that was my understanding before)
- egithinji 2y agoAs someone who didn't follow the conventional path into software engineering via a CS degree, Nand2Tetris has helped fill in a lot of gaps in my knowledge. I completed part 1 of Nand2Tetris in 2023 and this year I'm working my way through part 2 where you write a compiler and OS for the architecture that you built in part 1. It feels great to finally start understanding concepts like memory management, virtual machines and compilers.
- knowknow 2y agoHaving done nand2tetris before doing various digital logic courses, I feel like the first portion falls a little short of its tagline of making a computer from modern first principles. It focuses too much on the specific implementation of its own architecture rather than giving the tools needed to create the architecture from scratch. It doesn’t teach things such as product of sums and kmaps which allows you to methodically find the Boolean equation for any arbitrary output. I spent most of my time during the architecture implementation finding the correct expressions, while it becomes trivial if you learn how to do it systematically. It’s lacking in teaching how state works, mostly because it passes over flipflops and their applications. It also doesn’t teach finite state machines (FSM), which was the single most important thing for me in understanding how to actually implement an architecture. This is because the concept of FSMs abstracts most of the logic and focuses on the behavior, and once you design the behavior you can then methodically implement the logic with the previously mentioned techniques.
- jgauth 2y agoDo you have a recommendation for a book or course that teaches these things better? In particular FSMs.
- llm_trw 2y agoStructure and interpretation of computer programs is a better nand2tertis. The issue is that it contains about 10x the information, assumes what an undergrad science student in 1980 would have known, has problems that are entire chapters of nand2tertis and uses scheme. And it's not until the end of the last chapter that you build a stack machine in about 40 pages from memory.
- barrenko 2y agoSoo, maybe go nand2tetris and then SICP?
- liendolucas 2y agoI can't see how SICP is better than Nand2Tetris. To be clear: none of them are better than the other simply because these are two completely different books, both in their approach style how explain things and their contents. You are basically comparing apples to oranges. If you know nothing about computers Nand2Tetris and Code by Charles Petzold are two books that will make you clearly understand how a computer works in a constructively way. SICP starts with an already running Scheme, so the computer and the language are already there.
- hcm 2y agoI can't recommend nand2tetris highly enough – it's a great crash course in computer architecture, operating systems, compilers, etc. but also it's just mega fun. A big part of the joy came from making up my own extra credit side quests: implementing a compile-to-WASM emulator for the hack machine, adding optimisations to the compiler to produce smaller and/or faster programs, etc.
- ashdnazg 2y agoOoh, I also did the compile-to-WASM side quest! There are some really fun optimizations one can do to make the emulation run faster. It's orders of magnitude faster than my naive hand-written emulator.
- Tetradam 2y agoN
- Tetradam 2y agoAround 2001 I started my journey to becoming a software developer, and the first thing I really wanted to do was get a better understanding of what a computer is and does. I stumbled upon and Nand2Tetris, and I'll be upfront and say that I found it to be a little dry and I was being honest to myself, it beyond what I was ready for. However, it was still instrumental to helping me develop my understanding of computers. Instead of following the course normally, I decided to transfer the concepts and lessons learned and created a rudimentary computer in Minecraft. It transferred the project from a n abstract thing I struggled with to a "physical" engineering project that made the CS ideas real and tangible things that could be interacted and experimented with. I highly recommend it to anyone. I should like to go back and finish it, both the course and the Minecraft project(I only did part 1).
- dirkc 2y agoI've wanted to do Nand2Tetris for a very long time, but it just never reaches the top of the pile of "things I'd like to do". Many years ago I built a linux system following the Linux From Scratch (LFS) guide. My experience doing it corresponds with a lot of what the author mentions. In all this there is a slightly uncomfortable realization, at some point you need to trust the layers below, knowing everything is simply not possible.
- aronhegedus 2y agoRecommend this to people that are curious and have time!! I really enjoyed doing it years ago
- lordviet 2y agoBoth the course and the book are phenomenal. In my opinion they are up there as one of the best CS resources. I finished it two years ago and still think about it fairly often. The compiler exercise is beyond excellent and cracking it feels like a milestone.
- ninetyninenine 2y agoIs there some better simulator I can download to run the assignments from? I don’t like the Java and the online version they provide.
- ncpop 2y agoI’ve just started the course and am considering paying for the Coursera certification to help keep me on track. Does anybody have insights into using Coursera as opposed to using the freely available resources?
- partypete 2y agoAuthor here. I just used a free pdf version of the book and the legacy software package which they link to on the website. Great experience. The authors have since created a self-contained web IDE version of the book/course, but if you know the basics of working with a terminal, you'd probably prefer the software package.
- deleted 2y ago[deleted]