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

Top all-time · #2454

V

Vaibhav Sagar

Personal blog · vaibhavsagar.com/blogprogramming

Vaibhav Sagar's personal blog at vaibhavsagar.com covers programming. Since 2017, 30 different Hacker News readers have linked it 34 times, most often “Popcount CPU instruction”. It is still writing: the last post was on 2025-10-22, and you can follow it by feed.

Visit the blog
34mentions?
30HN people?
2017–2025first – last linked?
Links on Hacker News per year · peak 7 in 2017

Most-linked posts?

  1. Popcount CPU instruction
    17 people · 18 mentions · first linked 2019-09-09
  2. Imperative Haskell
    2 people · 2 mentions · first linked 2017-05-30
  3. Monad Anti-tutorial
    2 people · 2 mentions · first linked 2017-06-01

What Hacker News says?

  1. Allegedly added to the instruction set by request of the NSA, who uses it for things. https://vaibhavsagar.com/blog/2019/09/08/popcount/

    Comment linking /blog/2019/09/08/popcount/

    on “Apple Intelligence for iPhone, iPad, and Mac”
  2. Submitted Popcount CPU instruction as a story · 350 points

    HN discussion
  3. Some of it is moving or has moved down to the instruction sets: https://vaibhavsagar.com/blog/2019/09/08/popcount/

    Comment linking /blog/2019/09/08/popcount/

    on “Succinct data structures”
  4. Submitted The NSA Instruction (2019) as a story · 244 points

    HN discussion
  5. There was a recent post about "imperative Haskell": http://vaibhavsagar.com/blog/2017/05/29/imperative-haskell/ The code in this other post about implementing string distance metrics is also quite imperative: https://markkarpov.com/post/migrating-text-metrics.html

    Comment linking /blog/2017/05/29/imperative-haskell/

    on “Rust as a gateway drug to Haskell”
  6. Submitted Imperative Haskell as a story · 149 points

    HN discussion
  7. It’s surprisingly useful, and shows up everywhere from chess to molecular biology—-but the CPU instruction probably exists because of its use in code-breaking. This article has a lot of interesting examples. https://vaibhavsagar.com/blog/2019/09/08/popcount/

    Comment linking /blog/2019/09/08/popcount/

    on “Python Standard Library changes in recent years”
  8. Submitted Revisiting 'Monadic Parsing in Haskell' as a story · 116 points

    HN discussion
  9. Yes, encryption: https://vaibhavsagar.com/blog/2019/09/08/popcount/

    Comment linking /blog/2019/09/08/popcount/

    on “Alan Turing’s 1950 manual for the Mark I electronic computer [pdf]”
  10. Submitted SATisfying Solutions to Difficult Problems as a story · 112 points

    HN discussion
  11. to save you time, this is a summary of the links various people here are posting: popcnt of a word counts the number of bits that are "1" https://www.talkchess.com/forum3/viewtopic.php?t=38521 the NSA wanted to do cryptanalysis on intercepted messages, and since the CDC 6000 had 60-bit words, one word was enough to store most alphabets they were interested in. They were able to: Split a message into lines Set a bit…

    Comment linking /blog/2019/09/08/popcount/

    on “Alan Turing’s 1950 manual for the Mark I electronic computer [pdf]”
  12. Submitted An All-in-One DAG Toolkit: The strongly-connected components algorithm as a story · 71 points

    HN discussion
  13. Check out https://vaibhavsagar.com/blog/2019/09/08/popcount/

    Comment linking /blog/2019/09/08/popcount/

    on “Alan Turing’s 1950 manual for the Mark I electronic computer [pdf]”
  14. Submitted You Won’t Believe This One Weird CPU Instruction (2019) as a story · 27 points

    HN discussion
  15. I also have my own implementation of packfiles [1], which I implemented as part of a toy Git implementation in Haskell [2]. I personally found the packfile format underdocumented, e.g. the official reference for the packfile generation strategy is an IRC transcript [3]. 1: https://github.com/vaibhavsagar/duffer/blob/bad9c6c6cf09f717... 2: https://vaibhavsagar.com/blog/2017/08/13/i-haskell-a-git/ 3: https://git-scm.c…

    Comment linking /blog/2017/08/13/i-haskell-a-git/

    on “Git’s database internals I: packed object store”
  16. Submitted IHaskell on CoCalc as a story · 4 points

    HN discussion
  17. Discussion of uses of POPCOUNT instruction. https://vaibhavsagar.com/blog/2019/09/08/popcount/

    Comment linking /blog/2019/09/08/popcount/

    on “RISC-V: What’s Missing and Who’s Competing”
  18. Submitted IHaskell on CoCalc as a story · 4 points

    HN discussion
  19. Here is an article about the popcnt instruction: https://vaibhavsagar.com/blog/2019/09/08/popcount/ The author of the article believes that while popcnt was indeed used for cryptographical analysis in the 60s, but the fact that popcnt disappeared from instruction sets is seen as evidence that this usage became a lot less important over time. So the author considers the reason for the reappearance of popcnt that ther…

    Comment linking /blog/2019/09/08/popcount/

    on “Mysterious Intrigue Around an x86 "Corporate Entity Other Than Intel/AMD"”
  20. Submitted Monad Anti-tutorial as a story · 3 points

    HN discussion
  21. Huh, TIL. I always assumed this to be a rather old instruction, but turns out it was only added fairly recently on x86 https://vaibhavsagar.com/blog/2019/09/08/popcount/

    Comment linking /blog/2019/09/08/popcount/

    on “ARM64 Popcount in Golang and Assembler”
  22. Submitted Refactoring Haskell: A Case Study as a story · 2 points

    HN discussion
  23. There’s a few potential uses these days - more than just the famous crypto folklore one! Some examples on https://vaibhavsagar.com/blog/2019/09/08/popcount/

    Comment linking /blog/2019/09/08/popcount/

    on “ARM64 Popcount in Golang and Assembler”
  24. Submitted I Haskell a Git as a story · 2 points

    HN discussion
  25. Best throw away all your CPUs then too: https://groups.google.com/g/comp.arch/c/UXEi7G6WHuU/m/Z2z7fC... https://vaibhavsagar.com/blog/2019/09/08/popcount/ https://arxiv.org/abs/1611.07612

    Comment linking /blog/2019/09/08/popcount/

    on “Intel Hyperscan is a high-performance multiple regex matching library”
  26. Submitted Discovering Continuations with Typed Holes as a story · 2 points

    HN discussion
  27. Not by an order of magnitude! Surely you've heard of gamers who add special cooling devices so they can overclock the CPU. Increase the frequency and power consumption increases. Decrease the frequency and power consumption decreases . You don't need as much cooling. And those Crays needed special cooling. Quoting Wikipedia for the Cray-1: > each circuit board was paired with a second, placed back to back with a she…

    Comment linking /blog/2019/09/08/popcount/

    on “Ask HN: How far ahead could the NSA be?”
  28. Submitted Binary Trees to Hash Array Mapped Tries, Step by Step as a story · 1 points

    HN discussion
  29. I wrote about these too: https://vaibhavsagar.com/blog/2018/07/29/hamts-from-scratch/ ! Unfortunately it's in Haskell which probably makes it less approachable than it would be otherwise.

    Comment linking /blog/2018/07/29/hamts-from-scratch/

    on “Visual Introduction to Hash-Array Mapped Tries (HAMTs)”
  30. Submitted The NSA Instruction (2019) as a story · 1 points

    HN discussion

Search all of HN for vaibhavsagar.com

Linked by the same people?