I downloaded the tarball and had a look through it. Almost everything has source code included, which is pretty cool to see.
There’s an entire C compiler from 1972, bootstrapped to be written in C. There was also a SNOBOL III compiler written in C, and a Fortran interpreter in C (only 462 lines!), and every unix command like ls,cd,echo,cat,grep,etc…
Unsurprisingly grep was written in assembly, but it’s source is there.
There’s also a games folder, but unfortunately these look like they’re just binaries:
bj, chess, cubic, moo, ttt, wump
I’ll have to load up a pdp11 emulator later to see what they are.Hunt the Wumpus! A true classic.
(I’m serious. Try it. It’s fun. I think it’s in the bsdgames package.)
They wrote this without googling anything.
They wrote this without autocompletion or syntax highlighting.
They had PAPER NOTEBOOKS cheats
Hello World in 1974: echo.c
main(argc, argv) int argc; char *argv[]; { int i; argc--; for(i=1; i<=argc; i++) printf("%s%c", argv[i], i==argc? '\n': ' '); }Bloat, they wasted an extra integer operation with
argc--.I think it’s actually quite elegant. No matter what it has to skip over argument 0 which will be the executable name
echo.
If the subtraction was removed and the loop changed to<, it would then need to do an addition or subtraction inside the loop to check if it’s the last argument.Or they just drop the =
The real question might be whether the compiler was smart enough to change
var++andvar--into++varand--varwhen the initial values aren’t needed.As compiler optimisations go, it’s a fairly obvious one, but it was 1974 and putting checks like that in the compiler would increase its size and slow it down when both space and time were at a premium.
Well, good news, the source code is right there. Someone can go check (it probably won’t be me)
I was going to guess the same regarding the time period.
They were chatting with ELIZA and vibe coded the whole thing
This is Unix v4 I think. The programs mentioned were also on later versions and I thought not hard to find. V6 sources are all online somewhere. I also expect some of those v4 programs would have been in assembler rather than C.
TIL that slashdot is still around. XD




