TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Ask HN: Books that teach you programming languages via systems projects?

204 pointsby Foeover 3 years ago
Looking for a book&#x2F;textbook that teaches you a programming language through systems (or vice versa). For example, a book that teaches modern C++ by showing you how to program a compiler; a book that teaches operating systems and the language of choice in the book is Rust; a book that teaches database internals through Golang; etc. Basically, looking for a fun project-based book that I can walk through and spend my free time working through.<p>Any recommendations?

24 comments

mprovostover 3 years ago
I&#x27;m publishing a book doing exactly this, rewriting one Unix utility per chapter from the BSD C version into Rust. The first two chapters for true&#x2F;false and yes are published, with head, wc, cat, cut, rev, and uniq coming soon as I finish editing and typesetting each.<p><a href="https:&#x2F;&#x2F;rftgu.rs&#x2F;" rel="nofollow">https:&#x2F;&#x2F;rftgu.rs&#x2F;</a>
评论 #28485799 未加载
tomparkover 3 years ago
It&#x27;s possible to work through Bob Nystrom&#x27;s Crafting Interpreters[1] using any language you want. On GitHub just search for &quot;crafting interpreters&quot;[2] and add a filter for the programming language you&#x27;re interested in, and you&#x27;ll find at least a couple repos for the entire book. There are over a dozen complete repos in Rust. Since everyone breaks out each chapter in a separate folder, it&#x27;s easy to follow along with the book, even though the book&#x27;s first interpreter is written in Java and the second compiler was written in C. I did this, it&#x27;s basically how I learned Rust.<p>[1] <a href="https:&#x2F;&#x2F;www.craftinginterpreters.com" rel="nofollow">https:&#x2F;&#x2F;www.craftinginterpreters.com</a> [2] <a href="https:&#x2F;&#x2F;github.com&#x2F;search?q=crafting+interpreters" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;search?q=crafting+interpreters</a>
评论 #28479679 未加载
评论 #28480018 未加载
RapperWhoMadeItover 3 years ago
I am obsessed with &quot;The Linux Programming Interface&quot; by Michael Kerrisk. I highly recommend this book if you want to level up your C programming skills and knowledge of Unix operating systems (specially portability and Linux). It might not exactly fit your description, but I still would recommend it. I feel like my C skills have gone from medium to pro, since reading most of the book. One really gets a good grasp of what syscalls exist, what they do and how to properly use them to produce secure and portable code. It is not written following a single project, but there are many different &quot;applications&quot; in the different chapters, for example, at the end you will be able to program a stand-alone back end TCP server with the examples from the book.
评论 #28487759 未加载
adamgordonbellover 3 years ago
The Ray Tracer Challenge[0] is super fun and language agnostic. It might be a good second project when learning a language. He also has a book about mazes that is great but ruby specific. Though you could adapt it to another language.<p>The thing I like about the books is the emphasis on having fun. My understanding is Jamis used these projects to overcome career burnout. They are also good for exploring the basics of a new language though.<p>I interviewed Jamis about this subject and burn out[1].<p>[0]: <a href="http:&#x2F;&#x2F;raytracerchallenge.com&#x2F;" rel="nofollow">http:&#x2F;&#x2F;raytracerchallenge.com&#x2F;</a><p>[1]: <a href="https:&#x2F;&#x2F;corecursive.com&#x2F;025-burn-out-and-recreational-programming&#x2F;" rel="nofollow">https:&#x2F;&#x2F;corecursive.com&#x2F;025-burn-out-and-recreational-progra...</a>
评论 #28481164 未加载
评论 #28481037 未加载
westurnerover 3 years ago
From &quot;Ask HN: What are some books where the reader learns by building projects?&quot; <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=26042447" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=26042447</a> :<p>&gt; <i>&quot;Agile Web Development with Rails [6]&quot; (2020) teaches TDD and agile in conjunction with a DRY, CoC, RAD web application framework: <a href="https:&#x2F;&#x2F;g.co&#x2F;kgs&#x2F;GNqnWV" rel="nofollow">https:&#x2F;&#x2F;g.co&#x2F;kgs&#x2F;GNqnWV</a> </i><p>And:<p>&gt; <i>&quot;ugit – Learn Git Internals by Building Git in Python&quot; <a href="https:&#x2F;&#x2F;www.leshenko.net&#x2F;p&#x2F;ugit&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.leshenko.net&#x2F;p&#x2F;ugit&#x2F;</a> </i>
yarinrover 3 years ago
Rust in Action teaches Rust through systems programming<p><a href="https:&#x2F;&#x2F;www.manning.com&#x2F;books&#x2F;rust-in-action" rel="nofollow">https:&#x2F;&#x2F;www.manning.com&#x2F;books&#x2F;rust-in-action</a>
评论 #28481034 未加载
eruover 3 years ago
See &quot;Write Yourself a Scheme in 48 Hours&quot; <a href="https:&#x2F;&#x2F;en.wikibooks.org&#x2F;wiki&#x2F;Write_Yourself_a_Scheme_in_48_Hours" rel="nofollow">https:&#x2F;&#x2F;en.wikibooks.org&#x2F;wiki&#x2F;Write_Yourself_a_Scheme_in_48_...</a> and &quot;Write You A Haskell&quot; <a href="http:&#x2F;&#x2F;dev.stephendiehl.com&#x2F;fun&#x2F;" rel="nofollow">http:&#x2F;&#x2F;dev.stephendiehl.com&#x2F;fun&#x2F;</a>
joderskyover 3 years ago
Hands-on Scala Programming (<a href="https:&#x2F;&#x2F;www.handsonscala.com&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.handsonscala.com&#x2F;</a>) is a great way to learn Scala. It&#x27;s down-to-earth, project-based and focuses on the practical side of the language.
faraaz98over 3 years ago
IntermezzOS: <a href="http:&#x2F;&#x2F;intermezzos.github.io&#x2F;" rel="nofollow">http:&#x2F;&#x2F;intermezzos.github.io&#x2F;</a><p>Phillip Opperman&#x27;s Blog OS: <a href="https:&#x2F;&#x2F;os.phil-opp.com&#x2F;" rel="nofollow">https:&#x2F;&#x2F;os.phil-opp.com&#x2F;</a>
abecedariusover 3 years ago
Norvig, <a href="https:&#x2F;&#x2F;github.com&#x2F;norvig&#x2F;paip-lisp" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;norvig&#x2F;paip-lisp</a> (free online now).
rkangelover 3 years ago
&quot;Designing Elixir Systems with OTP&quot; is a great book.<p>It&#x27;s not intending to teach you the basics of the language, it is instead teaching you how to architect real world programs, using a particular case study that they work through (a quiz game). It&#x27;s basically about the &#x27;functional core, OTP boundaries&#x27; model that is an excellent approach for building real systems.<p>If you don&#x27;t know Elixir at all the Getting Started guide is good for teaching the language constructs: <a href="https:&#x2F;&#x2F;elixir-lang.org&#x2F;getting-started&#x2F;introduction.html" rel="nofollow">https:&#x2F;&#x2F;elixir-lang.org&#x2F;getting-started&#x2F;introduction.html</a>
cppwithprojectsover 3 years ago
For C++, we&#x27;ve built Learn C++ Through Projects [0], which is a project-based C++ course.<p>We currently offer only one project to build a transport network monitor. It starts with some low-level topics (we use WebSockets to handle tens of thousands of network events) but a lot of code is also higher-level (we use the network events to create a routing engine) - so it may not be exactly a &quot;systems programming&quot; resource!<p>[0] <a href="https:&#x2F;&#x2F;learncppthroughprojects.com" rel="nofollow">https:&#x2F;&#x2F;learncppthroughprojects.com</a>
评论 #28498649 未加载
评论 #28482414 未加载
e19293001over 3 years ago
Books by Anthony J. Dos Reis<p>Those are so much underrated books that thought me how to become a software engineer. I hightly recommend especially these books.<p>Assembly Language and Computer Architecture Using C++ and Java<p>Compiler Construction Using Java, JavaCC, and Yacc<p>I promise! You&#x27;ll obtain tons of skills from his books. I&#x27;m very debted to this man. I enjoyed a lot reading his books and made me who I am today.
kaycebasquesover 3 years ago
I never worked through this, and it may be outdated now, but <i>Let&#x27;s build a browser engine!</i> seems to fit the bill: <a href="https:&#x2F;&#x2F;limpet.net&#x2F;mbrubeck&#x2F;2014&#x2F;08&#x2F;08&#x2F;toy-layout-engine-1.html" rel="nofollow">https:&#x2F;&#x2F;limpet.net&#x2F;mbrubeck&#x2F;2014&#x2F;08&#x2F;08&#x2F;toy-layout-engine-1.h...</a>
alfiedotwtfover 3 years ago
You might enjoy Andy Tanenbaum&#x27;s MINIX book, or (even though it&#x27;s really old now), the MMURTL V1.0 book
评论 #28480194 未加载
xupybdover 3 years ago
Get programming with F# is not one big project but it&#x27;s got fun little ones to play with.
wishinghandover 3 years ago
There&#x27;s the Writing an Interpreter&#x2F;Compiler in Go books: <a href="https:&#x2F;&#x2F;interpreterbook.com&#x2F;" rel="nofollow">https:&#x2F;&#x2F;interpreterbook.com&#x2F;</a> (Compiler book link is on that page too).
fybsover 3 years ago
<a href="https:&#x2F;&#x2F;github.com&#x2F;practical-tutorials&#x2F;project-based-learning" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;practical-tutorials&#x2F;project-based-learnin...</a>
评论 #28481471 未加载
easytigerover 3 years ago
Computer Systems: A Programmer&#x27;s Perspective<p>by Randal E. Bryant (Author), David R. O&#x27;Hallaron (Author)
评论 #28480347 未加载
simonebrunozziover 3 years ago
Great thread so far.<p>Anything specific for Python, and recent enough to be based on the latest Python (3.9.5, or at least 3.x)?<p>I remember (but can&#x27;t find it, sorry) a great &quot;learn by example&quot; web tutorial, but based on Python 2.x, and possibly at least 6-7 years old by now.
评论 #28482261 未加载
评论 #28483044 未加载
评论 #28482796 未加载
crohover 3 years ago
<a href="https:&#x2F;&#x2F;wiki.osdev.org&#x2F;Expanded_Main_Page" rel="nofollow">https:&#x2F;&#x2F;wiki.osdev.org&#x2F;Expanded_Main_Page</a>
neophyt3over 3 years ago
my 2 cents... A single book wont teach everything, there will be missing holes, its better to have 2 monitors, open some small libraries in one monitor and go to first commit and start typing that and also understand it and gradually move to next commit... do it for 3-4 prjects and then u r set
qualudeheartover 3 years ago
Just ask openAI codex or github copilot.<p>It’ll all be natural language interfaces based on neural networks like that.<p>I wish things were otherwise but I can’t in good faith recommend someone learn “to code” or learn any programming language anymore.
评论 #28482100 未加载
eurasiantigerover 3 years ago
This seems like a terrible idea unless you specifically want to learn how to program specific kinds of things on specific languages.<p>That said, I can see how this could be useful to someone who is already well versed in programming and computer science, and has other types of project experience—they have a solid foundation to build and reflect on.
评论 #28480490 未加载
评论 #28480486 未加载