← /home

Writing

Deep-dives on technical decisions. Every project here has a corresponding write-up.

Zig Systems · Jun 2026

Building an HTTP/1.1 Server in Zig Without libuv

How I wrote a zero-dependency web server using raw TCP sockets, a hand-rolled HTTP parser, and Linux epoll — and what I learned about async I/O in the process.

10 min read
Memory Research · May 2026

Predicting Allocation Lifetimes With K-Means

The core insight behind my thesis: if you can cluster allocations by their expected lifetime before the program runs, you can pick the right arena at compile time. Here's how the model works.

15 min read
Zig AI · Apr 2026

139k Nodes Per Second: Bitboard Tetris in Zig

Why bitboards? What does a dual-state board representation actually give you in Tetris search? A walkthrough of the ambigui2 engine, from board encoding to beam search to genetic weight evolution.

12 min read
C++ Node.js · Feb 2026

Bypassing V8's GC With N-API and mmap

How r-alloc works: writing Arena and Slab allocators in C++, bridging them to Node.js through N-API, and what you actually gain by taking GC out of the picture for hot allocation paths.

8 min read
AI RAG · Jan 2026

Dual-Agent RAG for Healthcare: Triage + Audit

The architecture behind Gabay Med's AI layer. Why two agents instead of one, how vector search routes patients to hospitals, and why the Auditor agent exists.

9 min read
C++ Compilers · Nov 2025

Writing a Compiler for Discrete Math in C++

What a DSL for discrete mathematics looks like, why I wrote every stage from scratch, and the decisions I'd make differently if I started Setra today.

11 min read