It is a pleasure to see APL crop up on HN from time to time. APL was the first language I learned, back in the 1970's. "First love," and all that. I remain a devoted user of the language, though only as a thought-amplifier and prototyping tool.
The big key to the language IMHO is the idea of computation liberated from time. This is what I think Dijkstra was getting at when he railed against "operational thinking". Instead of thinking of programming in terms of mentally replaying the execution sequence of the code you are writing, you can step outside of time, as it were. Computation becomes a way of thinking about mathematical transformations at an abstract, extra-temporal level. Dijkstra described this as programming via "predicate transformers". But he was still constrained in a scalar world. Iverson, on the other hand, encouraged people to dream in abstract aggregates of data. His mathematics of arrays was at once simple and rich, ripe with expressive possibility.
In my view, the functional programming people are doing beautiful work creating new realities and ways of thinking within this cognitive universe.
So, (pun alert) APL remains unsurpassed in its beauty and timelessness.
For anyone interested, I noticed that Dyalog made their proprietary implementation of APL free for non-commercial use just recently [0]. I suspect this change might have been in reaction to an uptick in traffic to their site from this other APL HN post[1] a bit more than a month ago (there's some good discussion their as well).
They also have Mastering Dyalog APL by Bernard Legrand as a free PDF download. I've just starting reading it, seems to be a very gentle introduction to APL: http://www.dyalog.com/mastering-dyalog-apl.htm
I learned C and IBM APL2 around the same time for financial apps. For APL, i read the Polivka and Pakin book about 30 times, not this edition, but the red paperback I used is apparently impossible to buy. Excellent book, it got me to where i could be competitive in obfuscated APL contests: https://www.amazon.com/P-L-Prentice-Hall-automatic-computati...
Great video, thanks for sharing! A bit embarrassing that Professor Bob Spence teaches at my/our alma mater and I didn't realize it was him until checking out the description at the end.
Wish I had used my time at University more productively, so many interesting people and subjects concentrated in one place. It went by very quickly and most the time was spent worrying about passing exams. Seems I'm much more interested in some of the subjects nowadays, I certainly would have appreciated the experience more now than at that age.
A lot of people have cited the APL Life example, but I found this J example of somebody exploring Ulam's spiral as a great way that J is used to approach a mathematical concept [1]. Very easy to follow along in J open next to YouTube, and it still amazes me how quickly you can visualize from the REPL with 'viewmat'.
The Jupyter notebooks, are modern kin to this, and are still trying to catch Mathematica, which for me, really shines for toying around with the curated data and one-liners.
If you replaced the greek letters and other symbols in APL with function names, keeping the right to left order of operations, is there something missing? (I only did a tiny bit of APL for a class 30 years ago)
for i in range(0,1024):
log_likelihood[i] = M*log(gamma[i])
for j in range(M+1,N):
tmp = r(T-event_times[j])*gamma[i]
log_likelihood[i] += log(1-tmp)
likelihood[i] = exp(log_likelihood[i])
return likelihood
Easy: J is an abomination. Notation is a very powerful thing and J destroyed it. It was a misguided attempt to deal with hardware limitations of the time.
I used APL professionally for about ten years.
Don't take it from me, ironically Iverson himself made the case many years ealier in this paper:
You can also use the Emacs mode (disclaimer: I'm the autor), which not only gives you reasonable input methods for APL characters, but also a lot of other features such a source code navigation and the ability to edit matrices in SES (the Emacs spreadsheet).
As Wikipedia puts it [0]: it is a synthesis of APL (also by Iverson) and the FP and FL function-level languages created by John Backus.
To avoid repeating the APL special-character problem, J uses only the basic ASCII character set, resorting to the use of the dot and colon as inflectionsto form short words similar to digraphs.
No, it's not. It is a horrible abomination. See my other post.
It's like changing all math symbols to words because the computers of the time can't display the integral sign or greek letters. A total destruction and negation of the power of notation. Iverson made a very bad decision with J. It's crap.
We detached this subthread from https://news.ycombinator.com/item?id=12255109 and marked it off-topic. Inclusions like “It is a horrible abomination.” and “It's crap.” are not necessary or acceptable on Hacker News.
APL symbols are slighly more suggestive than J symbols, sometimes they vaguely resemble mathematical counterparts with similar meanings, but they remain entirely separate programming symbols with their own meanings. The idea of using other, more common characters instead remains an excellent idea. Afflicting J with lovecraftian adjectives and scat doesn't help.
Sigh, I guess you're right. It's not like their aren't massive disadvantages to the APL way of doing things, like not being able to edit your code in standard editors, and having to learn confusing new keybindings, or even get a new keyboard.
[+] [-] gregfjohnson|9 years ago|reply
The big key to the language IMHO is the idea of computation liberated from time. This is what I think Dijkstra was getting at when he railed against "operational thinking". Instead of thinking of programming in terms of mentally replaying the execution sequence of the code you are writing, you can step outside of time, as it were. Computation becomes a way of thinking about mathematical transformations at an abstract, extra-temporal level. Dijkstra described this as programming via "predicate transformers". But he was still constrained in a scalar world. Iverson, on the other hand, encouraged people to dream in abstract aggregates of data. His mathematics of arrays was at once simple and rich, ripe with expressive possibility.
In my view, the functional programming people are doing beautiful work creating new realities and ways of thinking within this cognitive universe.
So, (pun alert) APL remains unsurpassed in its beauty and timelessness.
[+] [-] davedx|9 years ago|reply
[+] [-] 0xdeadbeefbabe|9 years ago|reply
[+] [-] ktRolster|9 years ago|reply
[+] [-] Homunculiheaded|9 years ago|reply
[0] http://www.dyalog.com/ [1] https://news.ycombinator.com/item?id=11963548
[+] [-] kaiwetzel|9 years ago|reply
[+] [-] gtani|9 years ago|reply
[+] [-] rebootthesystem|9 years ago|reply
[+] [-] rbanffy|9 years ago|reply
[+] [-] ktRolster|9 years ago|reply
[+] [-] kbenson|9 years ago|reply
I hope that's because the book was more accessible than the computer platforms at the time, otherwise that is a steep learning curve.
[+] [-] gregors|9 years ago|reply
[+] [-] 3princip|9 years ago|reply
Wish I had used my time at University more productively, so many interesting people and subjects concentrated in one place. It went by very quickly and most the time was spent worrying about passing exams. Seems I'm much more interested in some of the subjects nowadays, I certainly would have appreciated the experience more now than at that age.
[+] [-] curiousgal|9 years ago|reply
[+] [-] Sir_Cmpwn|9 years ago|reply
[+] [-] qwertyuiop924|9 years ago|reply
[+] [-] beagle3|9 years ago|reply
It is a distillation of APL/J concepts. Much smaller core, clicks better than J for some people.
[+] [-] mseepgood|9 years ago|reply
[+] [-] eggy|9 years ago|reply
The Jupyter notebooks, are modern kin to this, and are still trying to catch Mathematica, which for me, really shines for toying around with the curated data and one-liners.
[1] VIDEO - https://www.youtube.com/watch?v=dBC5vnwf6Zw
[+] [-] ontouchstart|9 years ago|reply
Gary Kildall
https://news.ycombinator.com/item?id=12223304
[+] [-] Roboprog|9 years ago|reply
If you replaced the greek letters and other symbols in APL with function names, keeping the right to left order of operations, is there something missing? (I only did a tiny bit of APL for a class 30 years ago)
[+] [-] yummyfajitas|9 years ago|reply
Of course, it's pretty important to note that idiomatic Numpy is very different from idiomatic Python. For example, here's some idiomatic numpy:
Idiomatic python might be:[+] [-] rebootthesystem|9 years ago|reply
Easy: J is an abomination. Notation is a very powerful thing and J destroyed it. It was a misguided attempt to deal with hardware limitations of the time.
I used APL professionally for about ten years.
Don't take it from me, ironically Iverson himself made the case many years ealier in this paper:
http://www.jsoftware.com/papers/tot.htm
[+] [-] clifanatic|9 years ago|reply
Ah, so he has kids, too.
[+] [-] 35bge57dtjku|9 years ago|reply
[+] [-] lokedhs|9 years ago|reply
https://github.com/lokedhs/gnu-apl-mode
And a video I made to demonstrate some of its features:
https://www.youtube.com/watch?v=yP4A5CKITnM
[+] [-] ndr|9 years ago|reply
As Wikipedia puts it [0]: it is a synthesis of APL (also by Iverson) and the FP and FL function-level languages created by John Backus.
To avoid repeating the APL special-character problem, J uses only the basic ASCII character set, resorting to the use of the dot and colon as inflectionsto form short words similar to digraphs.
[0] https://en.wikipedia.org/wiki/J_(programming_language)
[+] [-] jxy|9 years ago|reply
[+] [-] beachy|9 years ago|reply
[+] [-] rebootthesystem|9 years ago|reply
It's like changing all math symbols to words because the computers of the time can't display the integral sign or greek letters. A total destruction and negation of the power of notation. Iverson made a very bad decision with J. It's crap.
[+] [-] sctb|9 years ago|reply
[+] [-] pierrec|9 years ago|reply
[+] [-] Crito|9 years ago|reply
You mean like TeX? Seems pretty fucking sensible to me.
[+] [-] rbanffy|9 years ago|reply
[+] [-] ktRolster|9 years ago|reply
[+] [-] qwertyuiop924|9 years ago|reply
OH WAIT.