Live data from Hacker News

NandGame – Build a Computer from Scratch

nandgame.com

91–100 of 141 posts

Re: NandGame – Build a Computer from Scratch

#91

Nicely done! If the author is reading, care to share any details on what stack or libraries were used?

Author here - It uses TypeScript and the Angular framework. Not because I prefer Angular in particular but because I had to learn it anyway for a work-related project. I think TypeScript is great.

Re: NandGame – Build a Computer from Scratch

#92

Building circuits is neat, but I think this has some problems as a game: 1. It seems to only let you save one solution for each level, even though there are two optimization goals. It should let you save one for fewest components and one for fewest NAND gates. 2. It's not really clear how NAND gate counts work in later levels where you're using potentially non-optimal components you've built? Like does it count each…

Author here - thank you for the feedback!

The nand-count is based on how you built the components involved. So optimizing a component will have have cascading effects.

"This is the simplest solution!" means the solution with fewest individual components on the canvas. I realize the text could be clearer.

Re: NandGame – Build a Computer from Scratch

#94
I have fond memories from reading this book and doing the exercises. I never got past building RAM memory though :-)

It's worth mentioning that the book is getting a extensively revised (sic) 2nd edition in July 2021.

* https://www.amazon.com/Elements-Computing-Systems-second-Pri...

Re: NandGame – Build a Computer from Scratch

#97

Earlier quoted context omitted.

> This is a great game and tbh I think you're just butthurt because you couldn't figure out any of the optimal solutions. There's no need to be rude. Insults like this don't add to your argument. > 1. It does only save one solution for each level but if you can do it in fewer nands, why do you need to keep the fewest components? Most puzzle games like this work this way Because they're separate optimization goals. I…

Yeah I mean I guess you're right - the verbiage could be improved. I just don't think it's worth getting hung up on. It's still a fun little game. I've heard that everything in a processor can be built up out of nand gates and always wondered how that worked so it's been neat to work through it. It's kind of a learning-first game though so I guess if your goal is to beat the game and get every achievement, yeah you'l…

You can create equivalents of AND, OR and NOT with only NAND, which is why it's possible for everything in a processor to be NAND gates only. https://en.wikipedia.org/wiki/NAND_logic

Re: NandGame – Build a Computer from Scratch

#99
post #92

Building circuits is neat, but I think this has some problems as a game: 1. It seems to only let you save one solution for each level, even though there are two optimization goals. It should let you save one for fewest components and one for fewest NAND gates. 2. It's not really clear how NAND gate counts work in later levels where you're using potentially non-optimal components you've built? Like does it count each…

Author here - thank you for the feedback! The nand-count is based on how you built the components involved. So optimizing a component will have have cascading effects. "This is the simplest solution!" means the solution with fewest individual components on the canvas. I realize the text could be clearer.

If I could add a few more suggestions:

1. The blue on purple color scheme is a little hard on the eyes. Changing the blue lines and circles to #0f0 green helped a lot. (Green also has strong "on" semantics)

2. My SO and I both had trouble finding the trash can. We both tried to drag components back to the workbench or off of the mat to delete them. A larger trash can icon or just making it red might help.

3. I ran into some z-layering issues (at least on Firefox). Opening a component info bubble from the workbench displays under the mat. Also the "results" popup displays underneath any components that might be on the far side.

Overall great game though! I had a lot of fun with it. Thank you!

Re: NandGame – Build a Computer from Scratch

#100

Building circuits is neat, but I think this has some problems as a game: 1. It seems to only let you save one solution for each level, even though there are two optimization goals. It should let you save one for fewest components and one for fewest NAND gates. 2. It's not really clear how NAND gate counts work in later levels where you're using potentially non-optimal components you've built? Like does it count each…

It is possible to do with five. I found the/a solution by just trying out combinations.
Post reply on HN