5 ms·
APL is well thought out, battle tested and IMHO a better system. It comes with vector semantics, which simplify a lot of things - but you don’t have to use them
by beagle3 7y ago
APL is well thought out, battle tested and IMHO a better system. It comes with vector semantics, which simplify a lot of things - but you don’t have to use them.
- kick 7y agoI use APL daily; I still think Kragen's notation is worth a look. It's important to examine alternative approaches!
- beagle3 7y agoI most definitely agree. I should have qualified with “if you think of using such a notation....” If you are meditating about the concept, by all means examine as many alternatives. But if you are looking for “the right way to do it”, APL is a better choice in this case IMO.
- kragen 7y agoHey, maybe you can help me get APL into my brain? I've been trying to jam it in there for years and it still doesn't fit.
- beagle3 7y agoAPL and K does fit mine, J doesn't. Perhaps it would help you to start with K (e.g. https://github.com/JohnEarnest/ok https://github.com/JohnEarnest/ok is free, has a web repl with interactive graphics and stuff) In a way, K is a cross of C and APL; K is the essence of APL minimized to the absolute minimum usable subset, even though less pure; e.g. complex values are not part of the language, and matrices only as vectors of vectors (unlike APL/J where you can have either). It also does away with user defined operators and a lot of other stuff.
- kick 7y agoHappily! Have you tried out J's labs? That's what I usually recommend, just because of how varied, deep & consistent they are. If you have, and they didn't work for you, I'd ask if you've read J for C Programmers, which is a useful book if you're having trouble with the paradigm overall. J is in an interesting spot because it's a bit more complicated than K (though, I'd argue, less complicated than modern APL2, which won out), but has learning resources that actually help you get a feel for the language. And of course, check out idiom libraries, they sometimes help to make things "click." (J Labs can be found in every J install; there are some pieces that only work when you have Windows, but overall they work anywhere a computer can be found, and the ones requiring Windows aren't really essential to learning.) Just ping me if there's anything else!
- kragen 7y agoI've been intrigued by APL ever since I picked up a couple of discarded APL books in 1995 and read through them repeatedly, taking profuse notes. I keep hoping that someday I will learn APL well enough to be able to just jot down program fragments and be sure that they'll work, rather than giving me a rank error; the same is true of APL descendants like Numpy, although I have a lot more experience with them. There are a bunch of notes in Dercuano about variants of APL. I've downloaded Aaron Hsu's dissertation, but I haven't read it yet. For now, though, I can write out algorithms in what seems to me to be a straightforward fashion in paperalgo.
- beagle3 7y agoHave you read Iverson’s works, “Notation as a tool of thought” or “the description of finite sequential processes”? Both are available on the jaoftware website, and give a good (in my biased opinion) introduction to APL I say biased because I had used APL and K extensively before reading them - they might seem less clear without this background, though it should be noted they are both considered classics by non APLers. Personally, TDOFSP contains the simplest most straightforward description of the simplex algorithm for linear programming/planning that I’ve encountered.
- kragen 7y agoI haven't! Thank you very much! I've started reading NAATOT a couple of times but never finished.