APL is how non-programmers imagine what programming is, a kind of sorcery involving exotic symbols and elaborate ritual processes to create data and algorithms out of thin air. Like LISP, it's an eternal classic that every generation rediscovers and gets their mind blown as an educational experience about the strange nature of computing, logic, and language.
Notation as a Tool for Thought, the 1979 ACM Turing Award Lecture by Ken Iverson who developed APL, is insightful in understanding some of the thinking behind it.
> The executable language to be used is APL, a general-purpose
language which originated in an attempt to provide clear and precise
expression in writing and teaching, and which was implemented as a
programming language only after several years of use and development.
This is also how Python started out! I always thought, "Python is so easy for beginners because it is a teaching language." Well, so is APL!
I think there’s a fundamental difference between those two cases. Python was envisioned as a programming language that is easy to teach; APL was envisioned as a language that aids in teaching, not as a programming language (reading https://en.wikipedia.org/wiki/APL_(programming_language), APL was started in 1957, with the first work on implementing it as a computer language only starting in 1962)
“Steve Russell said, look, why don't I program this eval… and I said to him, ho, ho, you're confusing theory with practice, this eval is intended for reading, not for computing. But he went ahead and did it. That is, he compiled the eval in my paper into IBM 704 machine code, fixing bugs, and then advertised this as a Lisp interpreter, which it certainly was. So at that point Lisp had essentially the form that it has today”
Yes, and I think it's important to highlight that Iverson would write APL on chalkboards and paper when working on math at times. I am sure some people here can hand write a program, but it seems so much more akin to writing math. I am in J daily, APL once in a while, Uiua more frequently, but J is the only one I actually write in my journal and then try it on my J phone app or when I open up my laptop. The intro books for J are great for working through math and learning J - Concrete Math for Computing in J; Easy J; Calculus; Arithmetic - https://code.jsoftware.com/wiki/Books
My brother often pokes fun and says my job is slash colon asterisk - he's never done any programming to know that a lot of what happens today is mostly English words.
I went out to talk with a guy, back in about 1995, in Chicago, fired up APL on his notebook, loaded the JPMorgan Risk Metrics data set, fiddled a bit, and reduced the thing to a one-line formula in an interactive window - like a Jupyter Notebook.
APL was the first programming language I learned, I was obsessed with learning every intricacy of the language. I almost lost my mind when I had to switch to a procedural language. APL warped my mind in such a way that it took almost a month to feel comfortable using anything else.
Wow! I never thought of this perspective. For most people, procedural is the first concept. If they ever start looking at apl, I would wager that's much more tenable then what you had to do!
For comparison, I heard that people who start with functional programming find it quite intuitive. The hard part isn't learning a new paradigm, but "unlearning" the old one.
(Also I hear they're more than a bit sad about how crude procedural programming is! But unfortunately I came at it the other way around, so my standards are permanently lowered ;)
At my very first professional EE position, in 1978, there was an older staff member, PhD, kind of a professor type, who was programming in APL. Naturally curious, I asked him about it and what the strange symbols on the keyboard meant. His explanation mostly flew right over my head but I asked a few questions, thanked him, and went away. In 43 years, he's the only person I ever saw using it.
I've always been curious about APL. My grandfather partnered with an APL programmer in the early 70's to develop shallow geodesic dome geometries suitable for home construction and optimized for least number of distinct strut lengths. The one he lived in is still standing[0]
Im running APL only stickers on my keyboard because it seemed more entertaining than blank caps for touch typing. Freaks people out, but really enjoy it.
I got an introductory book on APL at a used goods shop and it was my second programming language after Basic, though I learned it and C without an actual computer implementation. I later took a class on APL in college because of having that book, it was taught in the school of Architecture.
My favorite APL one liner (expression) reduces multiple sequences of spaces in a text string to a single space by doing boolean algebra on vectors of bits.
If the Keyboard requirements for this language were not so high, I might have gotten into this language, but the cost of purchasing the equipment put me off. That is not to say that I don't find the language intriguing since that it is.
You can just change keyboard settings in any OS? The same way you change from QWERTY to DVORAK you can change to Cyrillic or... But every APL programmer just uses something like deadkeys, typing e.g. ` before another key like `[ becomes ← or `$ becomes ⍋. The same are largely used for BQN too. Every tutorial teaches how to type explicitly e.g. https://tryapl.org/
If you insist on looking at your keyboard, you can also buy stickers for like $10.
Yeah, I changed the keyboard settings in my OS (Win at the time) a few times, but it was a pain to have to remember the key layouts even with tutorials. I like the idea of using stickers at a lower price which is more reasonable. I always wondered why PC engineers did not design Chameleon keyboards with keys that can change their key-designation (LED key shape) based on OS usage per region. I'm sure it's partly due to money. I mean who would not like to have a keyboard that lights up different keys depending on the language you use. There just needs to be a universal key design agreed upon that can accommodate this type of keyboard design.
Don't get me wrong. I like the idea of a compact language and may reconsider APL in the future if, my financial luck changes :)
I actually prefer a hybrid solution, i.e. using a part of the original APL symbols, which are now provided by Unicode, so you can map them on any standard keyboard as you please, while other symbols are replaced by keywords.
The reason is that a part of the original APL symbols make sense and are useful, because they are extensions of the traditional mathematical notation, while some other symbols, e.g. those used for trigonometric functions, are arbitrary and had only the purpose to make the text somewhat shorter and simplify the parsing of the language at a very early time, when the available resources were very scarce, and this does not matter today any more.
A lower cost option is to buy a set of sticker overlays (e.g. similar to the ones you can buy to make it easier to type Korean or Japanese, etc. on a US (or generally, non-native) keyboard).
Nothing against the APL, J & K languages but my brain got accustomed to using the R-Language and R-Studio, even over Python, partly because of the same keyboard difficulty, at least in my case, but also because it felt somewhat, more complete, and organized than Python. That's how my brain works, me thinks.
Lately, I've started contemplating learning LUA since it's easy to work with and tied to Roblox, for game making, but again, AI's put a pause on all things related to learning, as far as mentally absorbing new stuff is concerned. I don't see the point.
Notation as a Tool for Thought, the 1979 ACM Turing Award Lecture by Ken Iverson who developed APL, is insightful in understanding some of the thinking behind it.
I found this part remarkable:
> The executable language to be used is APL, a general-purpose language which originated in an attempt to provide clear and precise expression in writing and teaching, and which was implemented as a programming language only after several years of use and development.
This is also how Python started out! I always thought, "Python is so easy for beginners because it is a teaching language." Well, so is APL!
Lisp is similar to APL in that sense. https://en.wikipedia.org/wiki/Lisp_(programming_language)#Hi...:
“Steve Russell said, look, why don't I program this eval… and I said to him, ho, ho, you're confusing theory with practice, this eval is intended for reading, not for computing. But he went ahead and did it. That is, he compiled the eval in my paper into IBM 704 machine code, fixing bugs, and then advertised this as a Lisp interpreter, which it certainly was. So at that point Lisp had essentially the form that it has today”
(Also I hear they're more than a bit sad about how crude procedural programming is! But unfortunately I came at it the other way around, so my standards are permanently lowered ;)
[0] https://maps.app.goo.gl/YgExrSKh3UZu4XKw9
https://novelkeys.com/products/cherry-olivia?variant=4300136...
https://21kb.com/products/21kb-apl-classic-retro-beige-keyca...
https://omnitype.com/products/gmk-dimensional-cyl?srsltid=Af...
The APL Source Code (2012) - https://news.ycombinator.com/item?id=34064480 - Dec 2022 (58 comments)
https://dl.acm.org/doi/epdf/10.1145/365696.365712
Which further lead to this rather interesting article on the history of the ROLL function which relies on this random number generator:
https://www.jsoftware.com/papers/roll.htm
Neat!
If you insist on looking at your keyboard, you can also buy stickers for like $10.
Don't get me wrong. I like the idea of a compact language and may reconsider APL in the future if, my financial luck changes :)
https://www.jsoftware.com/#/README
I actually prefer a hybrid solution, i.e. using a part of the original APL symbols, which are now provided by Unicode, so you can map them on any standard keyboard as you please, while other symbols are replaced by keywords.
The reason is that a part of the original APL symbols make sense and are useful, because they are extensions of the traditional mathematical notation, while some other symbols, e.g. those used for trigonometric functions, are arbitrary and had only the purpose to make the text somewhat shorter and simplify the parsing of the language at a very early time, when the available resources were very scarce, and this does not matter today any more.
For example (no affiliation):
https://www.tindie.com/products/russtopia/apl-keyboard-symbo...
Nothing against the APL, J & K languages but my brain got accustomed to using the R-Language and R-Studio, even over Python, partly because of the same keyboard difficulty, at least in my case, but also because it felt somewhat, more complete, and organized than Python. That's how my brain works, me thinks. Lately, I've started contemplating learning LUA since it's easy to work with and tied to Roblox, for game making, but again, AI's put a pause on all things related to learning, as far as mentally absorbing new stuff is concerned. I don't see the point.