The Personal Website of Jeremy Boles

CRDT

The feature I never shipped, and the constraint I kept.

A conflict-free replicated data type is a structure two people can edit at once, in any order, and still arrive at the same result. It’s the machinery under real-time collaborative editing.

I wanted that for Napkin at first: two people in one sheet. Then I realized Napkin is a personal app, and that real-time sync would strain the servers for very little in return. So I left it out.

Cutting it left fingerprints all over the architecture anyway. Convergence demands determinism—the same operations have to produce the same result every time—and that is exactly where Napkin’s rule came from: the core gets no clock, no I/O, and no network. I dropped the feature and kept the constraint, and the constraint earned its keep. It’s what makes the language testable by hashing the output of every example file, and it’s why a document typed one character at a time is guaranteed to read identically to the same text pasted in all at once.

Not bad for something that doesn’t exist.