Writing
Stories behind the projects, interactive explainers you can play with, and notes on systems and machine learning.
notSoSmartOCR: building an OCR that knows when it's wrong
The story behind document extraction you can inspect: why a humble "I'm not sure" became the whole design, told with the film and the animations I made along the way.
FilmWhich way is up? LevelHead in 99 seconds
A short film about a deceptively hard question for document pipelines, and a training-free answer: deskew before you classify.
FilmDoes a prompt-injection defense speak Hindi?
I trained a prompt-injection defense on English and attacked it in ten other languages. It held. Then I found the two places where it doesn't, and what fixes one of them.

What Happens When You Search Like an Indian Shopper
I typed हल्दी, 'rice 1kg' and a pile of typos into Blinkit, Zepto and Instamart, then watched Zomato eat 400 MB of RAM. Findings, guesses, and fixes.

From a spinning arrow to a straight page
Winding a signal around a circle, reading a spectrum by eye, and following a real deskewer line by line, including the bug that made it give up on phone photos.

Fourier for images, hands on
Three classic readings on the Fourier transform of an image, turned into stripes you can rotate, filters you can switch and spectra you can click.

Not So Skewed: a deskewer that runs in your browser
Drop in a crooked page and watch a spectral deskewer straighten it step by step, with a robustness sweep and a bench of real phone photos. Nothing leaves your machine.

The Leiden Algorithm: How GraphRAG Finds Order Inside Knowledge Graphs
From modularity and Louvain's disconnected-communities bug to Leiden's refinement phase, and why GraphRAG bets on it.

Writing C++ the Machine Can Run Fast
Cache locality, branch prediction, why the stack is cheap, what optimization flags actually do, and why the size of a variable matters. Notes on the gap between source and silicon.

The Many Flavours of Constness in C++
const, const_cast, constexpr, consteval, constinit. What each one promises, how the compiler sees it, and when work moves from runtime to compile time.
SWAR Parsing Internals
How SIMD-Within-A-Register turns ordinary 64-bit integers into 8-lane parallel byte processors.