Topics /

Math & Algorithms

The most popular blog posts about math & algorithms on Hacker News. 204 posts.

2026
75

We have proof automation now

I've long had a soft spot for dependently-typed languages like Coq Rocq and Lean. They offer the possibility of a type system capable of encoding and enforcing arbitrarily subtle invariants. The sort of thing that, in regular languages, ends up (at best) as a comment, and which quickly gets lost as the size of the…

82

The Q, K, V Matrices

At the core of the attention mechanism in LLMs are three matrices: Query, Key, and Value. These matrices are how transformers actually pay attention to different parts of the input. In this write-up, we will go through the construction of these matrices from the ground up.

84

An interactive intro to quadtrees

An interactive exploration of quadtrees. Start with brute-force spatial search, build recursive space partitioning step by step, then use it for point lookups, range queries, nearest-neighbor search, collision detection, and image compression.

85

Upper stage impacting the moon on 2026 August 5

On 2026 August 5, within a few minutes of 06:35 UTC, an upper stage (section) of a rocket used for a lunar mission will hit the moon. This may be of some (probably minor) scientific interest, and we may learn some things from it. It doesn't present any danger to anyone, though it does highlight a certain carelessness…