Hacker News new | past | comments | ask | show | jobs | submit login
Ask HN: What books or courses do you know similar to "From Nand to Tetris"?
109 points by r-physicist on July 24, 2023 | hide | past | favorite | 29 comments
As Richard Feynman famously said: "What I cannot create, I do not understand." I like to learn things to bare bones. But almost all courses are shallow.

Now I am learning https://www.nand2tetris.org/ and it's fantastic by structure and explanation. In the past, I also completed JS and HTML courses by Anthony Alicea on Udemy. These courses also follow a similar approach to truly understanding how things work under the hood.

What other books/courses could you recommend from any area of programming?




Other people have mentioned ray-tracing in one weekend

Complimentary to that I would recommend TinyRenderer

https://github.com/ssloy/tinyrenderer/wiki

This one is a CPU-based rasterizing renderer, it gives you a good understanding of what a GPU graphics pipeline does underneath.

In the graphics world the two common ways of rendering things are either rasterization or raytracing.

Raytracing is basically all the movie/VFX/CGI/offline renderers (although it is also being used for certain parts of real-time in recent years)

Raster is how most real-time renderers like the ones used for video games work.

If you're interested in graphics I'd highly recommend implementing a ray-tracer and a rasterizer from scratch at least once to get a good mental model of how they both work.


Out of curiosity, is there a third way? The two you mention are the big ones, I know, but your phrasing implies (perhaps unintentionally) the existence of at least one more.


Well there's the "steer a beam across a screen" as used in CRT's (eg. older oscilloscopes) and the Vectrex game console.

Maybe one could consider lasershows falling in this category too?

See "vector display"


vk_mini_path_tracer is a beginner-friendly introduction to writing your own fast, photorealistic path tracer in less than 300 lines of C++ code and 250 lines of GLSL shader code using Vulkan

https://nvpro-samples.github.io/vk_mini_path_tracer/index.ht...


Thorsten Ball's Interpreter & Compiler in Go Series: https://interpreterbook.com/

Robert Nystrom's Crafting Interpreters: https://craftinginterpreters.com/

Ray Tracing in One Weekend: https://raytracing.github.io/books/RayTracingInOneWeekend.ht...


Code: The Hidden Language of Computer Hardware and Software by Charles Petzold is probably up your alley. Building to how computers work from first principles.


I found this randomly in my high school library and I "borrowed" it for the summer. It was honestly the best intro to computer engineering courses I've ever read. It was incredibly easy to understand even for a high school age me with basically no knowledge of electricity or physics.

It starts from the basics of people who used switches and electromagnets in the past, and more or less follows the history of how computers were made, which personally helps me understand the logic behind some of the weirder design decisions. (sidenote: I feel like history is great for understanding most strange decisions)

It also helped me breeze through the circuits and digital logic section of my intro ECE course, and was accurate enough to inspire me to build an 8-bit adder in Minecraft upon finishing the book. I really miss the days of having that much free time, if you have someone who is an avid reader and loves electronics, this book is amazing.


This book is why I went to school for computer science. Good sheet right thur.


I highly recommend a fantastic indie game called "Turing Complete" (https://turingcomplete.game/)

Its basically a digital logic simulator/playground, masquerading as a game. Early levels have you solving a simple problem with a few and/or/not gates, then gradually building larger components like half adders, registers, RAM and eventually (I'm not there yet though) you end up with a complete CPU with an instruction set you have designed and implemented, and you are solving the puzzles by writing machine code (which you designed) programs for your CPU.

Its been featured on hacker news before:

https://news.ycombinator.com/item?id=28903296

https://news.ycombinator.com/item?id=28735441


Ben Eater's 8-bit and 6502 based computer series: https://eater.net/


These are really fantastic! His 'Learn how the Internet works' series is also worth to mention.



You might find "Code: The Hidden Language of Computer Hardware and Software" by Charles Petzold intriguing. It takes a similar hands-on approach to explore computer fundamentals. Additionally, "Computer Systems: A Programmer's Perspective" by Randal E. Bryant and David R. O'Hallaron is another great read for delving deeper into computer architecture.



Also see recommendations for "Ask HN: Books Similar to Code by Charles Petzold?": https://news.ycombinator.com/item?id=29522588


Introduction to Computing Systems: From Bits & Gates to C/C++ & Beyond

https://www.mheducation.com/highered/product/introduction-co...

Is similar to nand2tetris. It uses a simple machine language, the Little Computer 3 (LC-3), and builds from the hardware up. Earlier editions are cheap, and don't include C++.



Let's Build A Compiler:

https://compilers.iecc.com/crenshaw/

Check on GitHub. Folks ported it to C, Go, etc. Then you may study standard textbooks like "Compilers: Principles, Techniques, and Tools", "Engineering A Compiler" and so ond.


This professor takes some pretty good notes for his CS courses: http://www.cs.yale.edu/homes/aspnes/#classes

I might add that if you like the feeling of understanding a subject from top to bottom, if you haven't taken higher mathematics already, be careful... if you start studying math you might fall in love and have other subjects ruined for you. Colleges do us extreme disservices telling us basic calculus/linear algebra/diffeq are "math". Mathematics is like going from XOR (ZFC and basic set theory/logic) all the way up to the wildest things you can imagine.

I highly recommend anybody who enjoys the sense of complete mastery and "extremely nitpicky but capable of doing anything I can imagine" that computer programming tickles to try learning propositional logic, abstract algebra, and real analysis. Then graph theory, theory of computation, and actual algorithms research (ie whats in algorithms journals, though TBH stuff from a few decades ago is way more approachable and applicable). The guy I linked above has a great survey: http://www.cs.yale.edu/homes/aspnes/classes/202/notes.pdf.

It honestly took years after I finished grad school for it all to fully click to the extent it has with me now, but not only does higher math teach you to think in an entirely different way, it unironically teaches you the underlying structure of everything. Well, maybe it's not great at solving super fuzzy human problems but especially when working with computers, knowing about things like chaos theory in distributed systems, invariants, graph algorithms, structural isomorphisms, cryptography, analyzing your shit in a way that's actually statistically useful... it's everywhere.


Neural Networks: from zero to hero, - a course by Andrej Karpaty (available as a YouTube playlist)


There is also nandgame.com, which is heavily inspired by the first few sections of nand2tetris but presents it as a drag and drop web page instead of needing to download and edit the local text files, so it's easier to jump in.


TECS by Noam Nisan and Shimon Schocken: https://mitpress.mit.edu/9780262140874/


This is nand2tetris.


Casey Muratori's Computer Enhance: https://www.computerenhance.com/



Neural Networks and Deep Learning, a free online book. http://neuralnetworksanddeeplearning.com/


csprimer.com will accomplish what you seek. It's from the creator of teachyourselfcs.com which listed Nand to tetris as one of the courses to do.


Dive Into Systems

https://diveintosystems.org/

free online book


"Digital Design and Computer Architecture" by Harris and Harris




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: