sanskar.

The writing

Writing

Deep dives on systems and AI, the kind of thing I wish existed when I was figuring it out. Mostly evergreen, occasionally opinionated.

  • 01 A probability curve is not the data

    Building probviz taught me that a probability curve is only a model until samples, fits, and uncertainty put it under pressure.

  • 02 The wakeup race

    I built an async runtime in Rust around one promise: a task that says Pending must be polled again when it is ready, never concurrently, and never after its memory is gone. The queues, wakers, reactors, timers, io_uring, and consoles are what it took to keep that promise.

  • 03 Harness engineering: the layer that turns a model into an agent

    An LLM is a stateless next-token predictor. Everything that makes it feel like an agent, the loop, the tools, the memory, the verification, lives in the harness. Here is what that layer actually does, why it moves benchmarks more than people expect, and where the real engineering is.

  • 04 Writing an LSM-tree in Go

    A from-scratch LSM storage engine: the skip-list memtable, the on-disk SSTable format block by block, Bloom filters, platform-aware mmap, the WAL and crash recovery, three live-switchable compaction strategies, and the Raft layer that wraps the whole thing.

  • 05 Building an MCP server from scratch

    What the Model Context Protocol actually is in 2026, the primitives that matter, and how to expose real tools to an LLM without hand-rolling an orchestration loop.