But what about K?

April 9, 2026
Blurry close-up of a computer screen displaying code with orange lighting.
Photo by Daniil Komov on Pexels

Quick take

A programmer’s love letter to small things. It has been reported that Tony Zorman walked through the tiny K implementation kparc/ksimple, trying to read the C sources as if the original comments weren’t there. The result is a clear, personal tour: not a tutorial, not an authoritative spec, but a readable attempt to infer intent from terse C and a handful of macros. Expect hedging; the author warns of mistakes and cross-references the “real” comments in the upstream repo.

Language in miniature

K, as presented, is delightfully minimal. Twenty-six global variables (a–z). 8‑bit integers. Refcounted, immutable, non‑nested arrays. Strict right‑to‑left evaluation. No tokenizer to speak of, so the REPL mostly accepts single‑digit numbers, single‑letter variables, and builtins — hit space and you’re in trouble. Verbs are single punctuation characters (+-!#,@=~&|*;), with only two monadic adverbs (fold / and scan \). REPL niceties include \\ to quit, \w for current heap bytes, and \v to list heap‑allocated globals.

Reading the C

Zorman starts where you should: the header. typedefs like unsigned char c and unsigned long u make everything look uniform; to a casual reader, values, pointers and functions can all masquerade as integers. The header leans on GCC extensions — the _(e) macro uses statement expressions — and defines tiny helpers (R for return, O for printf, an if/else $ macro, and an i(n,e) loop macro). The author even notes, wryly, that allegedly some C compilers accept dollar signs in identifiers, which explains a few odd macro names.

Why it matters

In an age of colossal codebases, a complete language in two Emacs frames is a rare joy. Zorman’s piece is part exploration, part exercise in reading intent from code rather than prose. It’s practical for anyone curious about array languages (APL/J kin), small interpreters, or the art of doing a lot with very little. Want to learn by reading rather than running? This is a friendly, human guide to getting your feet wet — with a reminder that sometimes the best teacher is a tiny codebase you can hold in one glance.

Sources: tony-zorman.com, Lobsters