Live data from Hacker News

Ask HN: Similar books to “Raytracing in one Weekend”?

news.ycombinator.com

1–10 of 28 posts

Ask HN: Similar books to “Raytracing in one Weekend”?

#1
I really liked the "Raytracing in one Weekend" Series [0], in terms of: explaining a complicated concept by programming a toy implementation of the thing itself and afterwards one is left with more knowledge and something to "show".

Does someone know similar series on other subjects than raytracing? I know there is the Advent of Code, but that's more like solving a puzzle.

[0]: https://raytracing.github.io

Re: Ask HN: Similar books to “Raytracing in one Weekend”?

#2
I would recommend Crafting Interpreters (https://craftinginterpreters.com) or Interpreter Book (https://interpreterbook.com/). Excellent ways to learn how to build an interpreter. You have a functioning interpreter by the end of it, and it's easy enough to extend it into new concepts! I'm using some of the lessons learned from that to build a custom interpreter for a small project I'm working on. It's really fun!

Re: Ask HN: Similar books to “Raytracing in one Weekend”?

#3
post #2

I would recommend Crafting Interpreters ( https://craftinginterpreters.com ) or Interpreter Book ( https://interpreterbook.com/ ). Excellent ways to learn how to build an interpreter. You have a functioning interpreter by the end of it, and it's easy enough to extend it into new concepts! I'm using some of the lessons learned from that to build a custom interpreter for a small project I'm working on. It's really fun!

I've been struggling to decide which one (of the two interpreter books you mentioned) to read. Any specific reason I should read one over the other?

Re: Ask HN: Similar books to “Raytracing in one Weekend”?

#5
This is a fantastic list of projects. From 3D renderers, blockchain protocols, frameworks to emulators.

"Build your own X" - "This repository is a compilation of well-written, step-by-step guides for re-creating our favorite technologies from scratch." [0]

[0] https://github.com/codecrafters-io/build-your-own-x

Re: Ask HN: Similar books to “Raytracing in one Weekend”?

#7
post #2

I would recommend Crafting Interpreters ( https://craftinginterpreters.com ) or Interpreter Book ( https://interpreterbook.com/ ). Excellent ways to learn how to build an interpreter. You have a functioning interpreter by the end of it, and it's easy enough to extend it into new concepts! I'm using some of the lessons learned from that to build a custom interpreter for a small project I'm working on. It's really fun!

I've been struggling to decide which one (of the two interpreter books you mentioned) to read. Any specific reason I should read one over the other?

I wrote "Crafting Interpreters" and read and very much enjoyed Thorsten's interpreters book. (I haven't gotten to his second one yet.)

They are surprisingly alike. Mine takes you through two complete implementations of the same language: first as a tree-walk interpreter and then as a bytecode compiler. His first book does the former and his second book does the latter.

Both are written in an informal friendly style and focus on working code. If you like one, you'll probably like the latter.

Mine uses Java for the first language and C for the second. Thorsten's books use Go for both. I think mine has more background information, theory, and historical context. His will get you to a working interpreter with less prose to wade through.

I think it's mostly a question of style and preference. I'd dip into the first chapter of each and see which resonates with you.

Re: Ask HN: Similar books to “Raytracing in one Weekend”?

#10
Fluid Simulation for Computer Graphics by Robert Bridson [0] is one of my favorites. It’s a very approachable introduction to fluid mechanics pdes, and how to code wonderful fluid simulations like this HN favorite [1].

[0]: https://www.cs.ubc.ca/~rbridson/fluidsimulation/

[1]: https://paveldogreat.github.io/WebGL-Fluid-Simulation/

Post reply on HN