Top all-time · #4736
Florian Hartmann
Personal blog · florian.github.ioprogrammingdata
Florian Hartmann's personal blog at florian.github.io covers programming and data. Since 2016, 16 different Hacker News readers have linked it 20 times, most often “That XOR Trick (2020)”. It is still writing: the last post was on 2025-12-31, and you can follow it by feed.
Too few sampled comments (5) to say how often HN recommends it.?
Why HN links it
HN commenters link Florian Hartmann's posts on reservoir sampling and the XOR trick, which cover sampling and XOR-based techniques for large data. Commenters also cite his reservoir sampling post when discussing Knuth's counting method.
Summarised by Claude from a sample of 5 HN comments that link here. Each comment is marked recommending, critical or neutral (citing without judging); how this works.
Most-linked posts?
- That XOR Trick (2020)7 people · 7 mentions · first linked 2021-01-18
- Count-Min Sketch: A probabilistic data structure for stream summaries2 people · 2 mentions · first linked 2019-08-02
- Show HN: A HN desktop app for reading links and comments next to each other2 people · 2 mentions · first linked 2016-04-24
- /reservoir-sampling/2 people · 2 mentions · first linked 2024-05-17
What Hacker News says?
I am enamored by data structures in the sketch/summary/probabilistic family: t-digest[1], q-digest[2], count-min sketch[3], matrix-sketch[4], graph-sketch[5][6], Misra-Gries sketch[7], top-k/spacesaving sketch[8], &c. What I like about them is that they give me a set of engineering tradeoffs that I typically don't have access to: accuracy-speed[9] or accuracy-space. There have been too many times that I've had to sa…
Comment linking /count-min-sketch/
on “Ask HN: What are some cool but obscure data structures you know about?”Submitted That XOR Trick (2020) as a story · 428 points
HN discussionKnuth's presentation of this [1] seems very very similar to the heap-version (top-k on a uniform deviate) of reservoir sampling as mentioned in [2]. The difference is in how duplicates are handled. I wouldn't be surprised if this algorithm was in fact already in use somewhere! [1] https://cs.stanford.edu/~knuth/papers/cvm-note.pdf [2] https://florian.github.io/reservoir-sampling/ Edit: Another commenter [3] brought…
Comment linking /reservoir-sampling/
on “Computer scientists invent an efficient new way to count”Submitted That XOR Trick (2020) as a story · 320 points
HN discussionIf you break early, then you haven't given items later in the list the chance to be selected. You need to go through the entire list in order for every item to have an equal probability of selection. I didn't get it at first, either, and the Wikipedia article didn't do it for me. This explanation finally got me there: https://florian.github.io/reservoir-sampling/
Comment linking /reservoir-sampling/
on “What algorithm did Windows XP use to choose your initial user picture?”Submitted Federated Learning as a story · 89 points
HN discussionhttps://florian.github.io//xor-trick/ if you want detailed information and a list of possible applications.
Comment linking //xor-trick/
on “Extending That XOR Trick to Billions of Rows”Submitted That XOR Trick as a story · 55 points
HN discussionNo, the real problem is that people keep giving LLMs the ability to take nontrivial actions without explicit human verification - despite bulletproof input sanitization not having been invented yet! Until we do so, every single form of input should be considered hostile. We've already seen LLMs run base64-encoded instructions[0], so even something as trivial as passing a list of commit shorthashes could be dangerous…
Comment linking /base64/
on “A GitHub Issue Title Compromised 4k Developer Machines”Submitted Show HN: A HN desktop app for reading links and comments next to each other as a story · 54 points
HN discussionSubmitted Count-Min Sketch (2019) as a story · 44 points
HN discussionSubmitted That XOR Trick (2020) as a story · 7 points
HN discussionSubmitted That XOR Trick as a story · 5 points
HN discussionSubmitted That XOR Trick as a story · 4 points
HN discussionSubmitted Federated Learning for Firefox as a story · 4 points
HN discussionSubmitted LLMs Understand Base64 as a story · 3 points
HN discussionSubmitted That XOR Trick as a story · 3 points
HN discussionSubmitted Count-Min Sketch: A probabilistic data structure for stream summaries as a story · 2 points
HN discussionSubmitted A desktop client for Hacker News as a story · 1 points
HN discussionSubmitted Computing diffs using the longest common subsequence as a story · 1 points
HN discussion