Brian Kernighan and Rob Pike wrote a regex matcher in a few dozen lines of C
blaizedsouza · x · 2026-09-03
A retweeted classic: Unix legends Brian Kernighan and Rob Pike implemented a regex matcher in just a few dozen lines of C, supporting ^, $, ., and . The entire matcher works through recursion and pointer arithmetic — a timeless example of elegant, minimal code from The Practice of Programming.
More from coding & agent
- Only 3 pure software businesses at the limit: agent-useful APIs, foundation models, autoresearch swarms — menhguin · 2026-09-03
- Cola Skill aggregates community-curated agent skills, with new picks daily — oran_ge · 2026-09-03
- Hacking llama.cpp to hot-swap knowledge into Qwen's Ngram PLE table — ortegaalfredo · 2026-09-03
- Qwen Releases E-Commerce Bench: Agents Run Stores for 365 Days, Few Learn — Alibaba_Qwen · 2026-09-03
- Three weeks of llama.cpp optimizations: collecting best t/s for Qwen3.8-27B — pmttyji · 2026-09-03
- Agents Don't Need to Talk: Watermarks, Git and Logs Are Their Hidden Channel — labeveryday · 2026-09-03