I did APL programming on an IBM mainframe on a co-op work term (in 1986) and later found an APL interpreter for a Z80 CP/M machine I had (a Superbrain) and strictly for nostalgia reasons, hacked together a character ROM for that machine so the thing would display properly.
At which point a housemate walked up to it and coded the Sieve of Erasthosthenes prime number algorithm in something like 11 characters and out came a list of primes. Holy. And I thought I'd grokked APL.
This is so long ago, that I had to google it. Here it is, OK, more than 11 characters but maybe the code is not exactly the same.
It might be added that when the ratio of human:computer processing power was still more in favour of "human", insanely cryptic "hero languages" were popular. Thinking about the lowest-level of scripting in text formatters, APL, the vi macro langauge, and the nastier aspects of Perl.
These days, readable code trumps all, and it's the compiler's job to turn it into incomprehensible gibberish.
I thought reading APL was like reading Chinese hanzi or Japanese kanji, if you are getting used of it, it would be very efficient instead of English of French, for example.
At which point a housemate walked up to it and coded the Sieve of Erasthosthenes prime number algorithm in something like 11 characters and out came a list of primes. Holy. And I thought I'd grokked APL.
This is so long ago, that I had to google it. Here it is, OK, more than 11 characters but maybe the code is not exactly the same.
Taken from here with explanation how it works: https://dfns.dyalog.com/n_sieve.htmIt might be added that when the ratio of human:computer processing power was still more in favour of "human", insanely cryptic "hero languages" were popular. Thinking about the lowest-level of scripting in text formatters, APL, the vi macro langauge, and the nastier aspects of Perl.
These days, readable code trumps all, and it's the compiler's job to turn it into incomprehensible gibberish.