3 ms·
Whitney is famous for writing code like this, it's been his coding style for decades. For example, he wrote an early J interpreter this way in 1989. There's al
by papercrane 2y ago
Whitney is famous for writing code like this, it's been his coding style for decades.
For example, he wrote an early J interpreter this way in 1989. There's also a buddy allocator he wrote at Morgan Stanley that's only about 10 lines of C code.
https://code.jsoftware.com/wiki/Essays/Incunabulum https://code.jsoftware.com/wiki/Essays/Incunabulum
https://github.com/tavmem/buddy/blob/master/a/b.c https://github.com/tavmem/buddy/blob/master/a/b.c
- BeefWellington 2y agoWhen writing code in this manner, lines of code is kind of a meaningless metric. You could put the entire Linux kernel in one very long line of C.
- papercrane 2y agoIt was meant just as an indicator of the code density. The actual line lengths are ~80 chars.