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

Top all-time · #9677

L

lo.calho.st

Personal blog · lo.calho.stprogrammingsystemsdata

lo.calho.st is a personal blog at lo.calho.st about programming, systems and data. Since 2017, 8 different Hacker News readers have linked it 9 times, most often “Using black magic to make a fast circular buffer (2017)”. It is still writing: the last post was on 2026-08-13, and you can follow it by feed.

Visit the blog
9mentions?
8HN people?
2017–2025first – last linked?
Links on Hacker News per year · peak 2 in 2017

Too few sampled comments (1) to say how often HN recommends it.?

Why HN links it

Linked as an example of a post on the mmap 'black magic' ring buffer trick, which lets a pointer span the wraparound point as one contiguous chunk. The post is cited in a discussion of ring buffers versus std::deque.

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

Most-linked posts?

  1. Using black magic to make a fast circular buffer (2017)
    6 people · 6 mentions · first linked 2021-06-13

What Hacker News says?

  1. I've seen this trick used around, where it really shines is when you want to prepare/commit a range of the ring buffer when interfacing with something that wants a contiguous chunk as an arg, using the mmap hack lets you pass any pointer into the ring buffer without needing to split it to handle the wraparound case. There are a few blog posts out there about it, eg https://lo.calho.st/posts/black-magic-buffer/ . One…

    Comment linking /posts/black-magic-buffer/

    on “Shift-to-Middle Array: A Faster Alternative to Std:Deque?”
  2. Submitted Using black magic to make a fast circular buffer (2017) as a story · 77 points

    HN discussion
  3. Submitted Using black magic to make a fast circular buffer as a story · 6 points

    HN discussion
  4. Submitted Using black magic to make a fast circular buffer as a story · 5 points

    HN discussion
  5. Submitted An idiot’s guide to fulltext search in PostgreSQL as a story · 4 points

    HN discussion
  6. Submitted Using black magic to make a fast circular buffer (2017) as a story · 2 points

    HN discussion
  7. Submitted Using black magic to make a fast circular buffer as a story · 2 points

    HN discussion
  8. Submitted Using black magic to make a fast circular buffer as a story · 1 points

    HN discussion
  9. Submitted A highly customizable RGB controller implementation for Arduino as a story · 1 points

    HN discussion

Search all of HN for lo.calho.st