Hacker Blogs
Work in progress: 15,409 of 181,233 sites checked so far, more every week · updated 2 Nov 2026Missing a blog? Tell us

Top all-time · #78

J

John Regehr

Personal blog · blog.regehr.orgprogrammingsystems

John Regehr writes Embedded in Academia, a personal blog at blog.regehr.org about programming and systems. Since 2010, 404 different Hacker News readers have linked it 867 times, most often “A Guide to Undefined Behavior in C and C++ (2010)”. The last post was in 2024, but the archive is still widely read.

Visit the blog
867mentions?
7recommend?
404HN people?
2010–2026first – last linked?
Links on Hacker News per year · peak 80 in 2016

Sometimes recommended · 7 of 40 sampled comments recommend it?

Why HN links it

HN readers link John Regehr's blog for its deep dives into undefined behavior in C, compiler optimization, and static analysis. It is often recommended as the place to learn C properly and is cited in debates about C versus Rust.

Recommended for · 7 comments
One commenter calls it essential reading for learning C; another says the author really understands C; another calls one post a favourite; another recommends it

Summarised by Claude from a sample of 40 HN comments that link here. Each comment is marked recommending, critical or neutral (citing without judging); how this works.

Most-linked posts?

  1. A Guide to Undefined Behavior in C and C++ (2010)
    30 people · 41 mentions · first linked 2017-08-01
  2. A Guide to Undefined Behavior in C and C++ (2010)
    25 people · 26 mentions · first linked 2010-07-09
  3. The Problem with Friendly C
    15 people · 21 mentions · first linked 2017-09-24
  4. Race Condition vs. Data Race (2011)
    13 people · 14 mentions · first linked 2017-11-15
  5. Proposal for a Friendly Dialect of C
    11 people · 16 mentions · first linked 2014-08-27
  6. Operant Conditioning by Software Bugs (2012)
    11 people · 13 mentions · first linked 2018-04-08
  7. C Compilers Disprove Fermat’s Last Theorem (2010)
    11 people · 12 mentions · first linked 2017-09-22
  8. We Need Hardware Traps for Integer Overflow
    11 people · 12 mentions · first linked 2014-05-28
  9. Does Google Knol encourage and profit from plagiarism?
    10 people · 14 mentions · first linked 2010-07-07
  10. Undefined Behavior in 2017
    9 people · 14 mentions · first linked 2017-07-05

What Hacker News says?

  1. No one else has mentioned what I think are his two greatest insights besides the Singularity: * A Deepness in the Sky depicts a human interstellar civilization thousands of years in the future, in which superluminal travel is impossible (for the humans), so travelers use hibernation to pass the decades while their ships travel between systems. Merchants, including the ones the book portrays, often revisit systems af…

    Comment linking /archives/255

    on “Vernor Vinge has died”
  2. Submitted A Tourist’s Guide to the LLVM Source Code as a story · 489 points

    HN discussion
  3. jjuhl · 2017-03-12Recommends
    I'd recommend "Embedded in Academia" - https://blog.regehr.org/

    Comment linking /

    on “Ask HN: What are some good technology blogs to follow?”
  4. Submitted Teaching C as a story · 368 points

    HN discussion
  5. http://blog.regehr.org http://blog.llvm.org/

    Comment linking /

    on “Ask HN: What are some good technology blogs to follow?”
  6. Submitted Fun at the Unix Terminal as a story · 279 points

    HN discussion
  7. It makes sense that large corporations would be interested in Rust given its current capabilities and future potential. Amazon, Huawei, Google, Microsoft, and Mozilla all have a vested interest in Rust succeeding since they are all deeply invested in high performance software, the majority of which is written in C and C++. The undefined behavior semantics in C and C++ trade safe handling of undefined behavior for hi…

    Comment linking /archives/213

    on “Rust Foundation: Hello, World”
  8. Submitted The Little C Function From Hell as a story · 273 points

    HN discussion
  9. What do you think of a variant on this? https://blog.regehr.org/archives/1180

    Comment linking /archives/1180

    on “Tell HN: C Experts Panel – Ask us anything about C”
  10. Submitted How LLVM Optimizes a Function as a story · 268 points

    HN discussion
  11. Any plans to add semantics for exceptional situations such as divide by zero and dereferencing a null pointer? https://blog.regehr.org/archives/232 Or incorporating features from this 14 item list? https://blog.regehr.org/archives/1180 As it appears these have failed: https://blog.regehr.org/archives/1287

    Comment linking /archives/1287

    on “Tell HN: C Experts Panel – Ask us anything about C”
  12. Submitted Teaching C (2016) as a story · 263 points

    HN discussion
  13. Cover topics around software development, math, programming languages, and academia: http://stuffwithstuff.com/ https://ericlippert.com/ http://thume.ca/archive.html https://medium.com/@mdwdotla https://faculty.washington.edu/ajko/posts https://computinged.wordpress.com/ https://blog.acolyer.org/ https://blog.sigplan.org/blog/ https://blog.paranoidcoding.com/ https://blog.regehr.org/ https://eli.thegreenplace.net/ h…

    Comment linking /

    on “Ask HN: Favorite Blogs by Individuals?”
  14. Submitted Explaining Code Using ASCII Art as a story · 232 points

    HN discussion
  15. Apparently Mozilla, Microsoft, Google, IBM and all companies slowly moving their system infrastructure to Rust don't know enough C. >Unless you're being wildly negligent and reckless with your programming, C is really not that scary https://blog.regehr.org/archives/970

    Comment linking /archives/970

    on “Moving the Linux Kernel to Modern C”
  16. Submitted Xv6 as a story · 222 points

    HN discussion
  17. Why is this necessarily true? All Rust gives you is safety -- no data races and better memory safety. But since data races and use-after-free are undefined behavior in C++ anyway, C++ compilers can still aggressively optimize by assuming those two don't happen. It's true that some compilers disable optimizations on certain undefined behavior to prevent unintuitive behavior ( https://blog.regehr.org/archives/140 ) bu…

    Comment linking /archives/140

    on “Brave Improves Its Ad-Blocker Performance with New Engine in Rust”
  18. Submitted Proposal for a Friendly Dialect of C as a story · 218 points

    HN discussion
  19. DeWitt clauses have spread outside of databases too, unfortunately. John Regehr got a nastygram from Coverity/Synopsys when he tried to post static analyzer benchmarks (not even his own; the benchmarks were done by researchers at the Toyota InfoTechnology Center): https://blog.regehr.org/archives/1217 This has effectively dissuaded me from trying to perform benchmarks of Coverity and other commercial tools using LAV…

    Comment linking /archives/1217

    on “Larry Ellison allegedly tried to have a professor fired for benchmarking Oracle”
  20. Submitted Explaining Code Using ASCII Art as a story · 209 points

    HN discussion
  21. There have been attempts over the years. See here, a decade ago: https://blog.regehr.org/archives/1287 > eventually I came to the depressing conclusion that there’s no way to get a group of C experts — even if they are knowledgable, intelligent, and otherwise reasonable — to agree on the Friendly C dialect. There are just too many variations, each with its own set of performance tradeoffs, for consensus to be possib…

    Comment linking /archives/1287

    on “Matt Godbolt sold me on Rust by showing me C++”
  22. Submitted Compiler Optimizations are Awesome as a story · 203 points

    HN discussion
  23. More precisely, Rust saves you from data races but not race conditions. https://blog.regehr.org/archives/490

    Comment linking /archives/490

    on “Fearless Concurrency in Firefox Quantum”
  24. Submitted The Declining Value of a CS Master's Degree (2013) as a story · 199 points

    HN discussion
  25. I was struggling to come up with "worth it" ASCII-art-in-code scenarios for my codebase and found a post[1] with examples (that turns out to have been posted here in HN a while back[2]). Pretty cool. [1] https://blog.regehr.org/archives/1653 [2] https://news.ycombinator.com/item?id=31891226

    Comment linking /archives/1653

    on “Monodraw”
  26. Submitted A Quiz About Integers in C as a story · 197 points

    HN discussion
  27. I think Nuno Lopes also did some work on proving the correctness of instcombine optimizations, for instance: http://blog.regehr.org/archives/1170

    Comment linking /archives/1170

    on “GodBolt: Enter C, get Assembly”
  28. Submitted Teaching C (2016) as a story · 195 points

    HN discussion
  29. > Under WebAssembly's memory model, dereferencing NULL=0 won't lead to a segfault. Thanks that's a curious one. It won't always lead to a segfault with a conventional compiler either, undefined behaviour being what it is. [0][1] Fortunately GCC can be asked to add such checks at runtime, [2] this approach could also be taken with WebAssembly. [0] https://devblogs.microsoft.com/oldnewthing/20140627-00/?p=63... [1] ht…

    Comment linking /archives/213

    on “Cosmopolitan Libc: build-once run-anywhere C library”
  30. Submitted Teaching C (2016) as a story · 186 points

    HN discussion

Search all of HN for blog.regehr.org

Linked by the same people?