3 ms·
I've been reading some BSD userland source (awk, sed, trek, and OpenBSD's netcat) parts of Lua and OCaml's VMs, Redis, and Joy. Awk and Lua's source are particu
by silentbicycle 17y ago
I've been reading some BSD userland source (awk, sed, trek, and OpenBSD's netcat) parts of Lua and OCaml's VMs, Redis, and Joy. Awk and Lua's source are particularly good, IMHO.
The code that had the biggest impact on me lately was the original J interpreter, though: http://nsl.com/papers/origins.htm http://nsl.com/papers/origins.htm . It looks like some sort of crazy brainfuck-ish thing, but it's not a joke. I highly recommend printing it out and trying to get in Arthur Whitney's head. (But if you run it, it will probably just segfault. It's rather cavalier with nonportable function pointer casting. It's prototype code from 20 years ago. If you want a working version, look at J (http://jsoftware.com http://jsoftware.com) or Q (http://kx.com http://kx.com).)