Re:
by pavlov on Wednesday May 03, 2023 @11:22AM
(#35803486)
Imagining some 1980s Hacker News clickbait #1 headlines:
[ Parent
| on HN ]
Re:
by marcodiego on Wednesday May 03, 2023 @11:36AM
(#35803693)
I think "Towers of Hanoi in SNOBOL" would get to first page even today.
https://raganwald.com/assets/snobol-green-book.pdf
"4.6.4 Example - Tower of Hanoi" on pages 109-111 (the scanned page numbers)
Is it even a 1980s programming language without a Hanoi example?
Here's the program in its all-caps, weirdly indented beauty:
DEFINE('HANOI(N,NS,ND,NI)') :(HANOI.END)
HANOI EQ(N,O) :S(RETURN)
HANOI(N - 1,NS,NI,ND)
OUTPUT 'MOVE DISC ' N ' FROM ' NS ' TO ' ND
HANOI(N - 1,NI,ND,NS) :(RETURN)
HANOI.END
TEST HANOI (5,'A','C','B')
ENDActually, SNOBOL is a 1960s programming language[1], so it wouldn't have been a trendy new language in an 80s version of HN.
In the 1960s, most programming was done on punched cards, and keypunch machines (and many computers) didn't have lower case letters on them. Hence, languages from that era, like FORTRAN, COBOL, PL/I, LISP and assembly language, were written in all-caps.
Re:
by abecedarius on Wednesday May 03, 2023 @12:04PM
(#35804047)
Heh. I got into computing in the 80s, and your other headlines are much more plausible. I did find a very interesting library book Algorithms in SNOBOL4 by Gimpel, so I actually got familiar with it -- but that was sheer luck.
(The book's title is misleading now: it doesn't much overlap a modern undergrad intro to algorithms. It's more "here are examples and techniques of programming in SNOBOL".)