In honor of DDJ, my favorite magazine ever, I found a random code listing from 1985, updated it, ran it, it works perfectly aside from pre-ANSI C and #define renaming silliness.
https://paste.debian.net/1158726/
% clang -o ddj_rand ddj_rand.c
@goosey The cardinal type is fine, but calling static "private" was insane. Ran into that kind of nonsense all the time back then.
@mdhughes
Some people just couldn't let C be C.
@Sabex @goosey static's been there since the start, and it does make globals & functions "private" in the sense of file-module-only (but it puts local vars into static scope, which is totally different!), but renaming it is just pointless confusion.
Defining the "cardinal" type does make it clearer, so I made that a typedef, which small C's often didn't support back then.
@mdhughes I like to see how wide peopleโs eye get when I tell them paper was a significant medium for software distribution and we typed third party code in by hand. Even at the time it seemed wacky.
One thing I miss though are the crazy little programs from Beagle Brothers adverts. They were typically two lines of gibberish that somehow did something amazing.
@mkb There's still things like the BASIC Ten-Liners contests:
https://atariage.com/forums/topic/287756-2019-basic-ten-liners-contest/
But that's a niche of a retrocomputing niche.
@mdhughes
"Is this wirth-while?"
Ouch!