Lurker News
I am proud to present my solo hobby project NAND. This year-long undertaking follows the completed Nand to Tetris course, but ported to the web with its own runtime, user interface, and IDE. Using the "Load example program" selector, you can try out some programs I wrote on NAND's emulated hardware such as 2048, a genetic algorithm, and a manual stack overflow to corrupt the screen.

Check out NAND at https://nand.arhan.sh
Additionally, I've authored an extensive writeup about the project. Read about it on the GitHub repository's readme.

Comments (73) 26 threads

Earlier comments
elevatedastalt1 reply#
Wow, seriously impressive. And the fact that this is the work of basically a high-schooler.

I fear for the kind of competition my kids will have just to make it to college.

naikrovek2 replies#
This is a natural extension/expansion of the “NAND to Tetris” course on coursera, and is free if you don’t want to be graded.

The course walks you through it all, and there is an accompanying book that you do not need to buy to finish the course.
Anyone who wants to do this and can focus on it for enough time can complete it and extend it into whatever shape they like, like this person.
It really is a good course.

brailsafe#
Absolutely true, I'm working my way through it now; it's challenging and time consuming, totally worthwhile imo.
ArchAndStarch#
I primarily used the physical book to learn about the nand2tetris platform. I highly recommend it, it's an enthralling read
pyuser5831 reply#
Ground up projects like this are fascinating!

It’s also neat how “ground” has been deepening. It used to mean building mainframe from source. Then building a compiler. Now building from logic gates.
How much deeper can you get? Building a mainframe out of Gödel numbers?

ArchAndStarch2 replies#
One curious idea my friends have entertained is to go one level even deeper and emulate the very transistors that make up the NAND gates on the web, too. It would certainly spell disaster for performance, but it's without-a-doubt interesting.
pyuser5831 reply#
That would be fascinating!

Do you know any resources that document the transistor to logic gate translation?

schoen#
In https://nandgame.com/ (mentioned elsewhere, a game version of NAND to Tetris) you start by making a NAND gate out of relays. The relays are electromechanical components, but you can choose to think of a transistor (within certain "regimes") as being directly electrically equivalent to one. (This simplification isn't appropriate for all engineering tradeoff purposes, although I don't know the details of how it fails or how we can benefit from knowing more about transistors' actual behavior.)

The electromechanical relay is a very simple device to understand, if you're willing to just believe that electromagnets produce magnetism (without understanding why the universe works according to Gauss's laws on the relationship between electric current and magnetism). It's a coil of wire where an electric current produces magnetism that physically pulls a switch open or closed.

vitiral#
Like... the physics?

If not, I think a NAND gate is made of just two transistors, so if you mean emulating how transistors should behave then I don't think it will affect performance more than ~50%

Load more comments