Counting Fast in Erlang with:counters and:atomics

Erlang fans cheer the speed boost, then instantly start arguing about what’s really new

TLDR: The article shows how Erlang now offers super-fast shared counters for tracking numbers across many tasks without slowing everything down. In the comments, one camp questioned what’s actually new, while another turned the whole thing into a joke by asking for an “atomic everything” button.

A niche programming story somehow turned into classic internet comment-section theater. The original post is basically a love letter to Erlang’s old-school “everything is isolated” style—then a wink at the newer tools that let developers break the rules safely when they need raw speed. The stars here are ":atomics" and ":counters", two features that help programs track numbers insanely fast without tripping over each other. In plain English: if lots of tasks are updating the same count at once, these tools let it happen quickly and cleanly.

But the real juice is in the reactions. One commenter, dnautics, immediately went into detective mode, basically saying: wait, I thought one of these was already built on the other—so what changed? That’s the kind of ultra-specific nerd drama that says, “I’m not here to clap, I’m here to audit the plumbing.” It’s not a flame war, but it is the kind of subtle technical side-eye that gets a community buzzing.

Then came the joke that stole the scene: schultzer’s deadpan demand for an “atomic_term”—which is programmer humor for “cool, but now make everything magically fast and safe.” It’s the perfect punchline to a post about tiny number boxes turning into power tools. So yes, the article explains a serious performance upgrade. But the comments reveal the real mood: half impressed, half nitpicking, and fully incapable of resisting a good inside joke.

Key Points

  • The article presents `:atomics` and `:counters` as newer OTP tools for counting in Erlang and Elixir, alongside the more familiar ETS.
  • `:atomics` is described as an off-heap, shared, mutable array of 64-bit integers that can be accessed by multiple processes.
  • The article shows that `:atomics` supports fast atomic operations such as add, get, add-and-get, exchange, and compare-and-swap.
  • It states that `:atomics` does not perform overflow checks and that unsigned values can wrap around.
  • The article says `:atomics` guarantees sequentially consistent ordering across cells in the same array, making it useful for synchronization.

Hottest takes

"did i just miss it?" — dnautics
"What we really need" — schultzer
"an atomic_term :)" — schultzer
Made with <3 by @siedrix and @shesho from CDMX. Powered by Forge&Hive.