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 · #361

J

Jeff Preshing

Personal blog · preshing.comprogrammingsystems

Jeff Preshing writes Preshing on Programming, a personal blog at preshing.com about programming and systems. Since 2011, 147 different Hacker News readers have linked it 213 times, most often “An Introduction to Lock-Free Programming (2012)”. The last post was in 2021, but the archive is still widely read.

Visit the blog
213mentions?
6recommend?
147HN people?
2011–2026first – last linked?
Links on Hacker News per year · peak 26 in 2020

Sometimes recommended · 6 of 40 sampled comments recommend it?

Why HN links it

HN readers cite it mostly for memory ordering and memory models, lock-free programming, and hash collision probabilities, and recommend it as a low-level programming blog.

Recommended for · 6 comments
Called a good post on memory models and a short overview; introduces lock-free basics with pictures; solid bits.

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.

C is a simple language. You’re only allowed to have one function with each name. C++, on the other hand, gives you much more flexibility: You can have multiple functions …

Most-linked posts?

  1. An Introduction to Lock-Free Programming (2012)
    8 people · 8 mentions · first linked 2019-01-30
  2. Hash Collision Probabilities (2011)
    7 people · 7 mentions · first linked 2014-08-25
  3. A Look Back At Single-Threaded CPU Performance (2012)
    6 people · 7 mentions · first linked 2014-03-31
  4. C++ Has Become More Pythonic (2014)
    6 people · 6 mentions · first linked 2014-12-02
  5. Weak vs. Strong Memory Models (2012)
    5 people · 9 mentions · first linked 2019-09-07
  6. This Hash Table Is Faster Than a Judy Array
    5 people · 5 mentions · first linked 2014-01-15
  7. A Flexible Reflection System in C++: Part 1
    4 people · 4 mentions · first linked 2018-01-16
  8. Leapfrog Probing for open addressing hash tables
    4 people · 4 mentions · first linked 2016-03-14
  9. Xkcd Password Generator
    4 people · 4 mentions · first linked 2015-04-09
  10. Memory Reordering Caught in the Act (2012)
    4 people · 4 mentions · first linked 2019-03-02

What Hacker News says?

  1. It's definitely true. Technical change in the 60s was enormous. During that period there was a lot of fundamental architectural change and experimentation; that's when they settled on 8-bit bytes as the standard, as well as many other things. Moore' Law became a thing. In the 70s is when we started seeing operating systems that look familiar to us, and even into the 80s it was plausible to introduce a new OS from sc…

    Comment linking /20120208/a-look-back-at-single-threaded-cpu-performance/

    on “Chess.com stopped working on 32bit iPads because 2^31 games have been played”
  2. Submitted Xkcd Password Generator as a story · 347 points

    HN discussion
  3. By design, the chance of a previous nonce being re-usable are virtually nill. http://preshing.com/20110504/hash-collision-probabilities/ The Bitcoin "nonce" is actually a much bigger number than shown in the video. 32 bits I believe.

    Comment linking /20110504/hash-collision-probabilities/

    on “Blockchain Demo [video]”
  4. Submitted How C++ Resolves a Function Call as a story · 299 points

    HN discussion
  5. You might be being really subtle about python there ! I realize that one can create lines of code like :_ = ( 255, lambda V ,B,c :c and Y(V V+B,B, c -1)if(abs(V)<6)else ( 2+c-4 abs(V) -0.4)/i ) ;v, x=1500,1000;C=range(v x );import struct;P=struct.pack;M,\ j ='<QIIHHHH',open('M.bmp','wb').write for X in j('BM'+P(M,v x 3+26,26,12,v,x,1,24))or C: i ,Y=_;j(P('BBB', (lambda T:(T 80+T 9 i-950 T 99,T 70-880 T 18+701 T 9 ,T…

    Comment linking /20110926/high-resolution-mandelbrot-in-obfuscated-python/

    on “This AI Boom Will Also Bust”
  6. Submitted This Is Why They Call It a Weakly-Ordered CPU as a story · 239 points

    HN discussion
  7. shaklee3 · 2020-02-08Recommends
    For low-level software, these are great: https://eli.thegreenplace.net/ https://travisdowns.github.io/ https://preshing.com/

    Comment linking /

    on “Ask HN: What are good solo developer blogs that you enjoy reading?”
  8. Submitted Plywood: A New Cross-Platform Open Source C++ Framework as a story · 196 points

    HN discussion
  9. We will not go down this path since everything is highly debatable but here is an article: https://preshing.com/20141202/cpp-has-become-more-pythonic/ It even states: C++ added tuples to the standard library in C++11. The proposal even mentions Python as an inspiration .

    Comment linking /20141202/cpp-has-become-more-pythonic/

    on “Cppfront, Herb Sutter's proposal for a new C++ syntax”
  10. Submitted An Introduction to Lock-Free Programming (2012) as a story · 149 points

    HN discussion
  11. For High Throughput compute, and cache correctness. Here are the primers I can give. None of these are required. Strong langauge, cs, interpersonal skills, team inter-interoperability, and commitment to quality (via unit and integration testing, and skill working with liners) can get you a lot further. The resources I'm linking are supplementary to the above, and you'll likely encounter them in the wild. But they'll…

    Comment linking /20120913/acquire-and-release-semantics/

    on “Ask HN: What should a systems/low-level software engineer know?”
  12. Submitted What Is a Bitcoin, Really? as a story · 145 points

    HN discussion
  13. Something like this[0], maybe? [0] http://preshing.com/20110811/xkcd-password-generator/

    Comment linking /20110811/xkcd-password-generator/

    on “LastPass Security Notice”
  14. Submitted Memory Reordering Caught in the Act as a story · 137 points

    HN discussion
  15. People tend to confuse the odds of two arbitrary strings colliding with the chances of a set of strings having a collision. 32bit space is not that big, and you have to take into account the birthday problem. If you do out the math it turns out there's a 50% chance of collision after only 77,163 hashes. http://preshing.com/20110504/hash-collision-probabilities/

    Comment linking /20110504/hash-collision-probabilities/

    on “Get your own USB PID”
  16. Submitted An Introduction to Lock-Free Programming as a story · 128 points

    HN discussion
  17. Lest we forget, ARM has problems with instruction ordering not happening the way programmers might assume in certain cases. https://preshing.com/20121019/this-is-why-they-call-it-a-wea... https://news.ycombinator.com/item?id=4673458

    Comment linking /20121019/this-is-why-they-call-it-a-weakly-ordered-cpu

    on “Linus Torvalds on Why ARM Won't Win the Server Space”
  18. Submitted C++ Has Become More Pythonic (2014) as a story · 126 points

    HN discussion
  19. wolfgke · 2017-05-11Recommends
    For a short overview read: > http://preshing.com/20120930/weak-vs-strong-memory-models/ If you want more details of memory models of some CPU architectures, read > http://www.rdrop.com/users/paulmck/scalability/paper/whymb.2... Note that "x86 OOStore" is not a model that you should be concerned about (according to https://groups.google.com/forum/#!topic/linux.kernel/2dBrSeI... it was only used on IDT WinChip) For a…

    Comment linking /20120930/weak-vs-strong-memory-models/

    on “Windows 10 on ARM”
  20. Submitted A resizable concurrent map as a story · 108 points

    HN discussion
  21. valarauca1 · 2017-05-11Recommends
    Strength of memory model refers to concurrency guarantees. Also gets deep into caching architectures, OOO, and inter-cpu communications. This is a deep rabbit hole because modern processors are speculatively executing THOUSANDS of instructions ahead. So what you have/haven't written to memory is slightly existential. Here is a good blog post about it http://preshing.com/20120930/weak-vs-strong-memory-models/ The TLD…

    Comment linking /20120930/weak-vs-strong-memory-models/

    on “Windows 10 on ARM”
  22. Submitted High-Resolution Mandelbrot in Obfuscated Python as a story · 105 points

    HN discussion
  23. Given that people have asked why not use a statically typed language, seems appropriate to mention that it's possible to write pythonic-looking C++: http://preshing.com/20141202/cpp-has-become-more-pythonic/ I have been using C++ a lot lately but really wish there were more tools for reflection at compile time, e.g., ability to iterate over all the members of a class. Other than that, I'm really loving C++17's auto…

    Comment linking /20141202/cpp-has-become-more-pythonic/

    on “Open-sourcing MonkeyType – Let your Python code type-hint itself”
  24. Submitted 1MB Sorting Explained as a story · 96 points

    HN discussion
  25. Your math is off a bit[0][1] but you're right, it's a vanishingly small probability of a single collision. This is fairly academic though, when you're talking about an adversary exploiting weaknesses in the algorithm itself, and not a perfect PRF. [0] http://preshing.com/20110504/hash-collision-probabilities/ [1] http://www.wolframalpha.com/input/?i=%281+billion+*+7+billio...

    Comment linking /20110504/hash-collision-probabilities/

    on “Why Google is Hurrying the Web to Kill SHA-1”
  26. Submitted Semaphores are surprisingly versatile as a story · 89 points

    HN discussion
  27. lurrr · 2017-07-25Recommends
    I'm actually surprised no one mentioned these two Eli Bendersky http://eli.thegreenplace.net/ Jeff Preshing http://preshing.com/

    Comment linking /

    on “Ask HN: What programming blogs do you follow?”
  28. Submitted High-Resolution Mandelbrot in Obfuscated Python as a story · 86 points

    HN discussion
  29. Well let's look at how this actually played out. - Defendant was in fact sending CP through his gmail. - gmail correctly detects and flags it based on hash value - Google sends message to NCMEC based on hash value - NCMEC sends it to police based on hash value Now police are facing the obvious question, is this actually CP? They open the image, determine it is, then get a warrant to search his gmail account, and (la…

    Comment linking /20110504/hash-collision-probabilities/

    on “Google’s TOS doesn’t eliminate a user’s Fourth Amendment rights, judge rules [pdf]”
  30. Submitted An Introduction to Lock-Free Programming (2012) as a story · 83 points

    HN discussion

Search all of HN for preshing.com

Linked by the same people?