2 ms·
My favorite stack based language is dc. It's also the oldest language still found on Unix systems, predating even C (the original version was written in B on a
by shagie 3y ago
My favorite stack based language is dc. It's also the oldest language still found on Unix systems, predating even C (the original version was written in B on a PDP-11 - even before it had an assembler).
https://www.cs.dartmouth.edu/~doug/reader.pdf https://www.cs.dartmouth.edu/~doug/reader.pdf
> Almost everybody in the group has done languages. Thompson and Ritchie built assemblers from scratch. On the tiny PDP-7 the assembler was supplemented by tmg, Doug McIlroy’s version of Bob McClure’s compiler-compiler. Using it Thompson wrote B, the evolutionary link between Martin Richards’s (Cambridge University) BCPL and C. The PDP-11 assembler, a desk calculator dc, and B itself were written in B to bootstrap the system to the PDP-11. Because it could run before the disk had arrived, dc—not the assembler—became the first language to run on our PDP-11. Soon revised to handle arbitrary- precision numbers (v1), dc was taken over by Bob Morris and Lorinda Cherry. It now ranks as the senior language on UNIX systems.
- kragen 3y agohuh, i didn't realize until just now that dc had arrays, the : and ; operations i guess that makes it a far more practical platform for applications programming than i had always thought unfortunately afaik it still can't take character input. i guess you could pipe its input through something that converts it into a stream of numbers?