5 ms·
Among all languages, APL has the highest ratio of times its founding document is posted to Hacker News to lines of code written. I don't mean this to be terrib
by zetalyrae 4y ago
Among all languages, APL has the highest ratio of times its founding document is posted to Hacker News to lines of code written.
I don't mean this to be terribly dismissive: I've always been "tangentially fascinated", like I think a lot of people are, by APL and Forth. But I've never properly used it because ultimately it's in conflict with how I think programs should be written: with types, abstraction, a focus on readability etc.
- mlochbaum 4y agoTo be fair, "lines of code written" is a particularly poor choice of denominator when discussing APL. But I think you're also unaware of historical usage. There are some very large (I believe close to a million lines) financial applications still in use, and far more applications for ordinary tasks like scheduling, payroll, and other administration made for companies and universities in the 80s. Now that the ACM has made them free to access, papers from the APL conference are a good place to look to get a sense for this; APL79 was the first really huge one: https://aplwiki.com/wiki/APL_conference#1979 https://aplwiki.com/wiki/APL_conference#1979
- zetalyrae 4y agoI'm aware of kdb+. It has an SQL interface and clients in multiple languages. How many of their users use the APL interface? And how many financial companies are planning on building new products on top of a technological dead-end from the 1960's? There was a time when APL was taught in universities, and some computers came with APL-specialized keyboards. That time came and went because the bulk of mainstream software development went in a wildly different direction.
- andylynch 4y agoPlenty. The sql-like interface (in Q) is mostly syntactic sugar; the functional style takes you much further. That said KX is making a huge push on ease of use and front end where you don’t necessarily need to use Q.
- mlochbaum 4y agoFor clarity, I'm talking mainly about SimCorp[0], which is a user of Dyalog APL, not kdb. The core of Dimension uses APL (with many other parts in C#), and there's a separate APL product bought with APL Italiana as well. They employ hundreds of APL programmers, preferring to hire math and physics majors out of college because they're easier to teach. Yes, SimCorp probably wouldn't start with APL today, and I wouldn't give it a second thought either if I were trying to start a big business. I pointed to the large codebases because they're easier to quantify, but I'm sure there are millions of lines written by hobbyist developers. I know you're not trying to flame, but what you've given us so far is a false claim that nobody writes code in APL, and a bare assertion that APL is a bad way to program. On that note, you're trying to say a language you've never used doesn't allow for "abstraction" or "a focus on readability", which I think is dead wrong. All of which is at best tangentially relevant to Iverson's claim in the paper (not APL's founding document, by the way; that would be A Programming Language) that APL's notation is a way to enhance your thinking. APL has good and bad aspects, and there's a lot to discuss, but can it please be a discussion instead of these careless remarks? [0] https://en.wikipedia.org/wiki/SimCorp https://en.wikipedia.org/wiki/SimCorp
- blululu 4y agoFWIW APL is pretty influential to Matlab which is the inspiration for Numpy, etc. I think the trouble is that the authors are right about the importance of notation but they were also making the first pass and they made some choices that proved to be off in practice.
- skruger 4y agoIf you're familiar with both modern APL and the "Iverson ghost" NumPy, you'll likely find the latter a frustratingly crippled experience.
- blululu 4y agoFair. I don’t think anyone transitions from Matlab or Julia to Numpy and feels good about it, but the broader ecosystem advantages are decisive there.
- buescher 4y agoI suspect a lot of the casual fascination with APL these days comes from frustration with Numpy. In the same way that nobody had anything good to say about Ada until C++ and Java were firmly entrenched.
- skruger 4y agoI am an APL-fan specifically because it's like a parallel universe where evolution took a different path: what are often considered anti-patterns in main stream languages is best practice in APL. It's a welcome relief from the strait-jacket of "the Zen of Python". No libraries? It's a feature. Single-letter variable names? Of course. Terseness as a virtue? Oh yes. Right-to-left flow? Why not? Precedence levels? Who needs them? Tacit? Bring it on. APL is easily the most productive tool in my chest.
- nequo 4y agoWhat kinds of tasks have you used APL for?
- thrown_22 4y agoIt would be trivial to have a typed forth, the reason why no one bothers is because at the micro controller level all data is the same datatype: bits. What helped me understand and become productive in forth was that you had the normal commands which manipulated values and are in every language, and a meta-language for manipulating the stacks. Once I made the stacks dance forth became just another language.