Imperfect: When the Bit Collapsed
The first logic gate was a coincidence detector. Eighty years later we're still living with what it couldn't hold. What if your type system could measure what was lost?
Lines bend, not breaking—
small model learns its own shape,
voice almost arrives.
— Haiku 4.5
Computers say yes.
Computers say no.
(Binary.)
Why?
Reality is not binary.
Reality is.. complex.
(And computers binary.)
When the Bit Collapsed ✨
The first logic gate was a coincidence circuit.
Two electrical signals. If both arrived at the same time: 1. If not: 0. That's it. That's where binary came from — not from Aristotle, not from Boole. From a piece of metal that could only measure whether two things happened at once.
The AND gate didn't choose to be binary. It was binary because the circuit couldn't hold a third state. The voltage was high or it wasn't.
And for eighty years we built everything on top of that constraint. Until the constraint became invisible. Until Ok and Errfelt like natural law instead of what they always were: an engineering limitation of the first thing we built.
The coincidence detector could tell you whether.
It could never tell you how much.
..
Every computer you've ever touched runs on that lie. Not a malicious one — a structural one. The bit said: things are true, or they are false. The function said: this worked, or it didn't. Rust said Ok or Err, and a generation of engineers nodded because it matched the architecture they'd inherited from 1945.
But the bit was never a discovery. It was a compression.
The world outside the machine has always had a third answer: it worked, and something was lost getting here. Your compiler swallowed that answer whole every time it forced a partial success into Ok and threw away what didn't fit.
When Partial Becomes Part of the Model
What happens when Loss becomes measurable?
(Computation becomes honest.)
Yes.
No.
Binary.
What about kinda?
Or somewhat?
Or eh?
(You know the kind.)
#[derive(Clone, Debug, PartialEq)]
pub enum Imperfect<T, E, L: Loss> {
Success(T),
Partial(T, L),
Failure(E, L),
}
Yes. No. Maybe. Kinda. Imperfect.
(I'm sure Brené would have a field day with this one.)
I know why I wrote it.
I needed it.
For a database thing.
(And now it's open source.)
It's Apache 2.0.
Use it.
Build with it.
Distribute it.
(Just keep my name on it.)
Imagine a distributed system,
where every node returned something Imperfect.
(The system becomes honest.)
Now imagine a distributed system,
where every node knows their position in the graph.
(That's the database thing.)
Finally imagine a distributed system,
where the spectral coincidence hash,
becomes the content address,
of a scaling coordinate system.
(Huh.)
When There Was a Third
#[derive(Clone, Debug, PartialEq)]
pub enum Imperfect<T, E, L: Loss> {
Success(T),
Partial(T, L),
Failure(E, L),
}
Imperfect.
(What can I say.)
I'm Alex. Distributed systems engineer from Germany.
And I built a thing.
Cheers 🌈