3 ms·
Here's one of the most interesting "X in Y lines of Z" programs I've seen, a prototype interpreter for the basics of an APL-like language in one page of (rather
by silentbicycle 16y ago
Here's one of the most interesting "X in Y lines of Z" programs I've seen, a prototype interpreter for the basics of an APL-like language in one page of (rather funky, Arthur Whitney-style) C: http://nsl.com/papers/origins.htm http://nsl.com/papers/origins.htm
It segfaults due to nonportable assumptions about pointer sizes in the allocator, and is far from complete as APLs go, but I spent a couple hours picking it apart and came away quite impressed.
There's a similar raytracer (http://nsl.com/k/ray/rayq.k http://nsl.com/k/ray/rayq.k) in 17 lines of Q, but I haven't figured that one out yet.