Stacktrace

Deep reads through real codebases.

Short notes on the clever hacks and design decisions hiding inside the systems we use every day. New one roughly every week.

Topics:#systems4#ai3#concurrency3#databases3
ai
6 min read
#08

Taste Is Just Context Your Agent Never Had

ui.sh is Adam Wathan's toolkit for giving your coding agent design taste. I built karnstack's interface with it. Here is what it actually changed, where it is still rough, and whether it is worth $120.

systems
7 min read
#07

The 10ms Tick Under Pingora

Cloudflare's nginx replacement burns through millions of timeouts a second, most of which never fire. Their fix: round every deadline to the next 10ms, share one timer across everyone waiting for that slot, and let a single background thread sweep the whole thing. Result: timeouts that cost 4 nanoseconds instead of 107.

databases
7 min read
#06

TigerBeetle Would Rather Crash Than Guess

Two asserts buried in a financial database. One panics if your hardware lies about time. The other panics if you allocate memory after startup. Together, they're the whole philosophy.

ai
10 min read
#05

How OpenClaw Builds an AI Brain That Remembers, Sees, and Fails Over

Most AI agents break the moment an API goes down. OpenClaw doesn't. A week inside its codebase to understand the retry loops, permission pipelines, hybrid memory, and model failover that keep it running.

ai
6 min read
#04

The Propulsion Principle: How Gas Town Makes AI Agents Stop Being Polite

Steve Yegge built an orchestrator for running 20-30 AI coding agents at once. 157k lines of Go, 100% written by Claude. The hack that keeps it running: literally type into the agent's terminal.

databases
8 min read
#03

How Postgres Prevents Both Deadlock AND Livelock in Upserts

A one-line rule buried in PostgreSQL's INSERT ... ON CONFLICT code prevents two of the nastiest concurrency bugs at once: the transaction with the higher XID backs out.

systems
6 min read
#02

How nginx Tells Time Without Asking

A lock-free time cache lets millions of nginx requests read the current time without waiting for each other. 64 pre-allocated slots, a memory barrier, and a bet that your thread won't sleep for a full minute.

databases
7 min read
#01

The Hidden Message in SQLite's Random Number Generator

Four magic numbers in SQLite's source code spell out a secret phrase. It's not an easter egg - it's cryptography's way of saying "trust me, there's no backdoor."

systems
5 min read
#00

The Bool That Holds Go's Ecosystem Hostage

A single boolean in Go's source code, if flipped from false to true, would instantly break thousands of packages. The Go team put it there on purpose.

Command Palette

Search for a command to run...