May 22, 2026
Code or cursed crossword?
Thinking in an Array Language
This coding style has fans swooning, skeptics panicking, and everyone making regex jokes
TLDR: The article shows how K, a very compact programming language, turns a long, messy solution into a tiny elegant one. Commenters were split between admiration and alarm, joking that it’s basically math-regex: impressive in the moment, but possibly unreadable forever.
A tutorial on the programming language K tried to do something very simple on paper: show how a clunky, step-by-step way of writing code can be boiled down into a tiny, elegant one-liner. But in the comments, the real show was watching people react like they’d just seen either a magic trick or a crime scene. The article walks readers through turning a painfully long matrix-multiplication example into something short and clever, basically arguing that the whole point of this language is to keep simplifying until the mess disappears. For believers, that’s beauty. For everyone else, it’s chaos in a trench coat.
The strongest hot take came from readers saying K looks "insane" at first glance, with one commenter delivering the line of the thread: it feels like the math version of regex, the cryptic text-matching tool people love to hate. Translation for normal humans: super powerful, super compressed, and terrifying once you save it for later. That sparked the classic nerd drama: is this brilliant minimalism, or just code that future-you will never be able to read again?
There was also a side quest into the larger family tree of K and APL-style languages, with curious readers asking which versions are actually alive, open, and worth learning. Even the repeat-post history got noticed, giving the whole discussion a faint "we’re doing this again?" energy. The vibe was a delicious split between awe, suspicion, and the kind of gallows humor reserved for tools that may be genius and unreadable at the same time.
Key Points
- •The article explains that K development is commonly done interactively in the REPL, with tested code later moved into scripts.
- •K scripts execute line by line like REPL input, print results unless lines end with semicolons, and can be loaded into the REPL with `\l file.k`.
- •A main principle presented is that array programming in K involves simplifying large patterns into shorter, more declarative expressions.
- •The article demonstrates a direct but non-idiomatic translation of iterative matrix multiplication into K using globals, nested loops, and mutation.
- •It then refactors the matrix multiplication implementation step by step using folds, transposition, `eachright`, and `eachleft` to produce a compact array-based solution.