Live data from Hacker News

The Joy of Nand2Tetris

tristanrhodes.com

31–40 of 43 posts

Re: The Joy of Nand2Tetris

#31
post #15
post #11

Earlier quoted context omitted.

That game is early access but hasn't been updated for 2 years so is probably going to stay that way. Is it compete enough?

IMO, 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

Yeah, 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.

Re: The Joy of Nand2Tetris

#33
post #9

Having 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 metho…

> 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

This is useful beyond low-level work. Every now and then I review code where the author has a complicated boolean condition (often in combination with auth and caching) and there's a much simpler way to write it -- that also has a more intuitive interpretation!

The same thing goes for finite state machines, of course, but the refactorings suggested are often trickier to apply in a late-stage code review.

Re: The Joy of Nand2Tetris

#34
post #9

Having 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 metho…

These things used to be the basis of CS education 20 years ago. Are they not today?

Pretty sure they are not anymore, when I was majoring in cs the deepest I was taught was assembly and architecture at a high level. I then switched to computer engineering and that’s where digital logic was a mandatory class.

Re: The Joy of Nand2Tetris

#35
I’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?

Re: The Joy of Nand2Tetris

#36
post #13
post #10

Earlier quoted context omitted.

Do you have a recommendation for a book or course that teaches these things better? In particular FSMs.

Structure 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.

Soo, maybe go nand2tetris and then SICP?

Re: The Joy of Nand2Tetris

#37
post #13
post #10

Earlier quoted context omitted.

Do you have a recommendation for a book or course that teaches these things better? In particular FSMs.

Structure 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.

I 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.

Re: The Joy of Nand2Tetris

#38
post #11
post #5

There's a gamified version of nand2tetris available on Steam called "Turing Complete" ( 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.

That game is early access but hasn't been updated for 2 years so is probably going to stay that way. Is it compete enough?

The game has an alpha version appropriately named save_breaker that gets regular if not daily updates. Some of the later puzzles are completely different, the second architecture has been replaced with a more advanced one that includes pipelining, and some new puzzles are still in the works. The new assembler is much more modular and many of the components have changed shape, with some having been removed or combined. The author plans to release it as v1 when stable but who knows when that will be. Breaking changes still occur occasionally.

Re: The Joy of Nand2Tetris

#39
post #12

I 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.

Ooh, 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.

Re: The Joy of Nand2Tetris

#40
post #10
post #9

Having 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 metho…

Do you have a recommendation for a book or course that teaches these things better? In particular FSMs.

I really liked this book https://www.goodreads.com/en/book/show/2558730.Digital_Desig...

It teaches the basics and then how to build a MIPS processor.

I know that's only part of what nand 2 tetris aims for. But still good.

Post reply on HN