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

Earlier comments
agentultra#
I know some of the people behind that book. It's a very interesting take on the craft of programming. I highly recommend it.
n_t#
It's great book. I liked it too.
3pt14159#
I know it isn't quite what you're asking for, but I recommend writing a static site compiler from scratch for a static site you actually use. Buy a nice HTML / CSS template (I found this one https://html5up.net/story then modified it) and build yourself a nice personal site from scratch.

You'll be surprised at how nice it is to just fully understand everything without a mess of libraries getting in the way and the resulting project will be perfectly tailored to your needs.

zaarn1 reply#
I recommend the interpreter book [https://interpreterbook.com/], which isn't entirely free of charge however.

On the other hand, it was enough to get me off the ground for my lexer and write a parser that wasn't entirely dumb.

misternugget2 replies#
As the author of the mentioned book I just want to add that I specifically wrote it because I'm also a huge fan of the technical writings the author is looking for: from the ground up, all code shown, no toys and shortcuts, capturing the essence in a few thousand lines.

And just FYI, the interpreter we build in the book ends up with ~3900 lines, including the full test suite.

n_t#
Great stuff! Thanks for it.
zaarn#
I think I'm atm at around 2500 lines, of which the parser and lexer is probably about 1200 lines. I mostly ~~stole~~ used the lexer from the book as inspiration for my own and then rolled a LISP-like language from there (which is rather easy given that a LISP AST is simple in nature)

Load more comments