Skip to content
HomeVideosBooksBlogs
AllTop postsTopics
Podcasts
HistoryListsWatch laterLiked videosFollowing

The videos, books, blogs and podcasts Hacker News keeps recommending, all in one place.

VideosBooksBlogsPodcastsAboutPrivacySettings

Data from Hacker News, HackerTube, HackerBooks, HackerBlogs and Open Library. Credits · Not affiliated with Y Combinator.

HomeVideosBooksBlogsPodcasts
Ctrl K

    Bob Nystrom

    journal.stuffwithstuff.com · Personal blog · on HN since 2008

    Bob Nystrom, a Google engineer and author of Crafting Interpreters, writes about programming languages, parsers, and game programming.

    Visit blogRSSHN submissions
    Languages & CompilersProgramming
    What HN says

    Commenters love his writing, calling out "What Color Is Your Function?" and the code formatter post, and note his compiler and interpreter expertise.

    Stats for nerds
    392HN people shared it
    186linked in comments
    8Kstory points
    Jul 2026last shared
    2015people per year2026

    Top posts on HN

    1. 1
      The Hardest Program I've Ever Written – How a code formatter works (2015)
      24 people · 1.4K points · first shared 2015 · 133 comments on HN
    2. 2
      Crafting “Crafting Interpreters”
      17 people · 966 points · first shared 2020 · 74 comments on HN
    3. 3
      What Color Is Your Function?
      192 people · 871 points · first shared 2015 · 143 comments on HN
    4. 4
      Rooms and Mazes: A Procedural Dungeon Generator
      9 people · 608 points · first shared 2014 · 48 comments on HN
    5. 5
      Baby's First Garbage Collector
      25 people · 545 points · first shared 2013 · 84 comments on HN
    6. 6
      Crafting Interpreters: 640 Pages in 15 Months
      8 people · 435 points · first shared 2021 · 26 comments on HN
    7. 7
      Pratt Parsers: Expression Parsing Made Easy (2011)
      25 people · 374 points · first shared 2011 · 59 comments on HN
    8. 8
      JavaScript Isn't Scheme
      26 people · 294 points · first shared 2013 · 108 comments on HN
    9. 9
      How I wrote Game Programming Patterns
      4 people · 292 points · first shared 2014 · 43 comments on HN
    10. 10
      Long Names are Long
      10 people · 257 points · first shared 2016 · 80 comments on HN

    What HN people wrote when they linked it

    • munificentSep 2015

      > I don't think good content necessarily needs to be paid for. Much of the best content on the web is created as a hobby, with no attempt to monetize, like dr-iguana.com (and countless others.)

      I felt that way for a long time. I am basically living that philosophy. My blog[1] has always been free to read and free from ads. I wrote a book[2], and you can read the entire thing online for free, again with no ads. Almost all the code I write is open source.

      I imagined a utopia where all kinds of creative people would have enough free time to pursue their hobbies and share the fruits of their labor. I am lucky enough to basically live that utopia now—I happen to love programming, which is a very lucrative field.

      It's fine to dream of a world where my personal utopia is more widely available, but that world isn't here today. You can think of a culture or society as the aggregate sum of all of its shared creative works.

      When creative works can only be done by those who can afford the leisure, it skews society towards the perspective of the rich. Think back to 19th century English literature and how few novels there are that show how regular working-class people lived. That's because regular working-class people back then were too busy working in the mines to write a book.

      There are some counterexamples, sure, but even most of those were created by rich people observing the poor from a distance. As sympathetic as Dickens was towards the poor, the stories he tells are still…

    • throwawaymathsDec 2025

      1) zig's io is not a viral effect type, you can in principle declare a global io variable and use it everywhere that any library calls for it. Not best practice for a library writer, but if you're building an app, do what you want.

      2) There are two things here, there is function coloring and the function coloring problem. The function coloring problem is five things:

      https://journal.stuffwithstuff.com/2015/02/01/what-color-is-your-function/

      1. Every function has a color.

      2. The way you call a function depends on its color.

      3. You can only call a red function from within another red function.

      4. Red functions are more painful to call.

      5. Some core library functions are red.

      You'll have some convincing to do that zig's plan satisfies 4. It's almost certain that it won't satisfy 5.

      It's open to debate if zig's plan will work at all, of course.

    • joshdataJul 2025

      Is the goal to make good ORM queries easier or to prevent bad queries? It's not clear there's really a compiler solution to the latter. If you're inside a loop in which a database cursor is in scope, then further database queries are prohibited? It's hard to see how that could be enforced other than something like What Color Is Your Function (https://journal.stuffwithstuff.com/2015/02/01/what-color-is-your-function/) with some functions marked as making queries and others as not.

      To solve this, maybe instead best practice would be to ensure the database connection is not in a global variable and must be passed down. That would make it more obvious when a database is improperly used within a loop.

      The same problem exists for any expensive operation within a loop (say, a database query while parsing the results of an API call, or vice versa).

    • mananaysiempreFeb 2024

      Bob Nystrom makes this argument best, I think, in his two-parter on loops and iteration[1,2]. Looping over data structures is of course only one example of how one can apply coroutines, but a very established one. The canonical problem requiring coroutines[3] is also essentially about doing that.

      Or for those who want something different there’s the elevator (and elevator-userbase) simulation from TAoCP volume 1, also an essentially concurrent problem with little to no parallelism or I/O to it.

      [1] https://journal.stuffwithstuff.com/2013/01/13/iteration-inside-and-out/

      [2] https://journal.stuffwithstuff.com/2013/02/24/iteration-inside-and-out-part-2/

      [3] https://wiki.c2.com/?SameFringeProblem

    • PhilpaxApr 2026

      For context, this is the author of https://craftinginterpreters.com/ , and https://gameprogrammingpatterns.com/ , and https://journal.stuffwithstuff.com/2015/09/08/the-hardest-program-ive-ever-written/ .

      I promise that he knows a thing or two about compilers and performance!

      For what it's worth, I agree with him. A recent example is the porting of the TypeScript compiler to Go: it hasn't been fully released yet, but people are already going wild for its performance improvement over the original in-TS compiler.

      Of course, it took them over a decade to reach the point where a port was necessary - so it's up to you to decide when that decision makes sense for your language.

    • no_wizardFeb 2023

      I still think this is one area Rust missed the mark. Go concurrency is quite amazing. Its fast and easy to reason about. Every language can learn something by how goroutines work here. Most importantly, it feels like you're just interacting with synchronous code. There is no "what color is your function?"[0] problem.

      The fundamental primitives Rust decided to adopt are just not ergonomic by comparison, and suffers from the aforementioned "What Color Is Your Function?" problem.

      An otherwise great language decided to adopt an old hand grenade in regards to async primitives

      [0]: https://journal.stuffwithstuff.com/2015/02/01/what-color-is-your-function/

    Related

    Brian Callahanbriancallahan.net28 people

    OpenBSD has two new C compilers: chibicc and kefir

    Brian Callahan
    Personal · last shared 2026
    Ted Kaminskitedinski.com52 people

    What can we learn from how compilers are designed?

    Ted Kaminski
    Personal · last shared 2026
    Rob Conerywekeroad.com125 people

    PostgreSQL Rising

    Rob Conery
    Personal · last shared 2014
    Joel on Softwarejoelonsoftware.com2.8k people

    Victory Lap for Ask Patents

    Joel on Software
    Personal · last shared 2026
    Zed Shawzedshaw.com280 people

    Dear Paul

    Zed Shaw
    Personal · last shared 2026
    Wolfram Blogblog.wolfram.com225 people

    The solution of the Zodiac killer’s 340-character cipher

    Wolfram Blog
    Company · last shared 2026
    Robert Nymanrobertnyman.com31 people

    WebKit: An Objective View

    Robert Nyman
    Personal · last shared 2026
    Colin McMillencolinm.org16 people

    93% of Paint Splatters Are Valid Perl Programs

    Colin McMillen
    Personal · last shared 2019