Curated developer articles, tutorials, and guides � auto-updated hourly


Codecs are not ad-hoc bit formats. They are constructions on the algebraic structure of types.


The free monoid on a set is the type of lists over that set. The universal property says fold is the...


Rational numbers give exact arithmetic where floating-point fails. The implementation connects GCD, ...


Integers modulo N form a ring, an algebraic structure that determines which algorithms apply. Unders...


Iterators reduce the NxM algorithm-container problem to N+M by interposing an abstraction layer, fol...


A semiring has two monoidal operations linked by distributivity. Matrix multiplication over differen...


Online accumulators are monoids. Default construction is the identity, combination via += is the bin...


A homomorphism preserves structure. fold is the universal homomorphism from the free monoid. This is...


A reflection on eleven explorations in generic programming, and how algorithms arise from algebraic ...


The same GCD algorithm works for integers and polynomials because both are Euclidean domains. One st...


What if containers wasted zero bits? A C++ library for packing arbitrary value types at the bit leve...


Prefix-freeness is the property that lifts the free-monoid construction into bit space.


A lattice has two operations, meet and join, satisfying absorption laws. Tarski's theorem gives a ge...


The Russian peasant algorithm computes products, powers, Fibonacci numbers, and more, once you see t...


The Stepanov series showed that algorithms arise from algebraic structure. This post is about the fl...