Lurker News
I am looking for writings/tutorials/videos which describe a specific technology or feature by implementing them, ideally in no more than few thousands lines of code (and not just 10-20 line code snippets). Idea is to teach about underlying technology by a hands-on project, which is not overwhelming like trying to implement full-feature game engine and yet captures the essence of technology. Some examples are -

* Build a simple database (https://cstack.github.io/db_tutorial/)
* Containers in 500 lines (https://blog.lizzie.io/linux-containers-in-500-loc.html)
* Malloc tutorial (https://danluu.com/malloc-tutorial/)
* Nativecoin - build your own crypto-currency (https://lhartikk.github.io/)
I'm sure there are great such projects/tutorials in domains like networking, filesystem, databases, compiler, web design, messaging, game design, fintech, etc. If you have come across such writings/projects, kindly share.

Comments (82) 50 threads

Show all comments

Showing thread 2 of 50

abhishekjha2 replies#
I am following bitwise very closely, particularly to get better at C. Any companion text/resource that I should follow along?
herbstein#
The Oberon book by Wirth is something Per references quite often, and is also linked in the README. I think that is the only companion text you'll really find. Other than that it's reading up on the concepts in general from different sources.
jeffreyrogers#
NAND to Tetris[0] has similar goals, but is probably significantly different in terms of implementation that it's only helpful to explain the concepts.

[0]: http://nand2tetris.org/

runevault1 reply#
I'm not quite through part 1 yet, but I highly recommend Crafting Interpreters to anyone who wants to see what it is like writing a recursive decent parser and building a language out of it from scratch.
msangi1 reply#
The second part (not finished yet) shows you how to build a VM and compile Lox (the toy language used in the book) too run on it.
runevault2 replies#
Yup, actually planning to take a break after finishing part 1 to do something else, currently leaning towards getting more serious with Rust (to then use on part 2 or another similar style of tutorial)

Continue this thread — 2 replies

herbstein2 replies#
That looks really interesting. One question I have. The Peter Shirley material creates something that has a realistic-ish look. The picture on your page, which I assume is representative of the built tracer, has a very unrealistic look. Do you know what causes this discrepancy?
nimblegorilla1 reply#
What images are you comparing? One issue might be that three spheres floating in space just isn't something most people see in real life.

Continue this thread — 1 reply

akdas#
I use the Phong reflection model (https://en.wikipedia.org/wiki/Phong_reflection_model), which gives materials a distinct plasticky look. Peter's materials are either purely diffuse, purely reflective or glass-like (the third one is something I didn't cover in the course at all).

Peter also uses area lighting derived from the surroundings, whereas my implementation uses point lights that result in sharp specular highlights. There are no surroundings in my image, only the lights.
No doubt Peter's materials look great. I wish I had time to cover more in my course, but I wanted to make sure I covered the prerequisite vector math as well for students without strong mathematical backgrounds.