What Ever Happened to APL?
geophile asks: "Is it still supported? Are there new applications being written in it? Has it been extended? Did it die? When and why? Whatever happened to those funky keyboards?" APL [?] has the distinct reputation of being one of the most cryptic programming languages ever invented, due to the fact that it's a language based entirely on symbols. Is anyone out there still using it? If so, for what types of projects?
Its still being used in our research division for natural language processing. It's symbolic nature makes it a good choice. And a lot of the new people that come on to the project already know LISP, so its not too bad of a transition for them
... well kind of. My old company, FX analysts, used it, and their trading system was entirely APL. (It was also a Y2K nightmare, but I think they got that sorted out ...) I grew to love that language - much better than Matlab, for instance.
We got our APL from a company called Dyadic: http://www.dyadic.com/ . They're still in business (more than I can say about my ex-employers).
I learned a dialect of APL that works with SML in a compilers class.
I haven't heard of it otherwise. For hardcore mathematical coding, it seems like people are using one of the CAS systems like Maple, Matlab, or Mathematica. It seems that a lot of those systems have a lot of the same sort of operators that I learned when I learned APL.
Gentoo Sucks
I'm taking a Numerical Analysis class this semester, and one day my professor came in with an example of a program he had written to solve some horrible problem. He put it up on the overhead, and most of the class gasped at the screen full of diamonds, arrows, overscores, and circles. After class I asked him what it was he had shown us, and he proudly said "Oh, that was APL. It's probably slower that most programming languages you could find today, but it makes really small programs..." Ever since then I and a few other students bring that up when we want to bring to mind strange funkiness...
Posted from the wireless couch.
APL per se uses a non-ASCII character set, which means you need a really funky keyboard. However, there's an APL variant called J which has the same semantics, but a textual (i.e. ASCII) syntax. I remember seeing a J primer somewhere on the Net; you can look for that.
To the editors: your English is as bad as your Perl. Please go back to grade school.
I think you'll find that the most cryptic programming langage is actually Intercal. APL is easy by comparison.
It has been re-incarnated as J. Essentially APL without the need for a special keyboard/character set. It looks like fun, if you're into that kind of thing.
I know several languages that allow operations to be done on matrices. Surprise, sursprise, its a common feature in language tilted towards numerics. Fortran 90, IDL, etc.
--
Preventive War is like committing suicide for fear of death. - Otto Von Bismarck
I don't know whether this is before Roger Hui created J; but, he worked for a time at a financial firm that had developed it's own APL variant: A+. Arthur Whitney was also a primary author of A+ -- he later developed K for another financial firm. I'm a big A+ fan and it still lives (barely), despite management discomfort with reliance a proprietary non-standard language. A+ improves on APL is several ways: namespaces, better control structures (no "gotos"), symbol types (that are usable as: variables references, or keys in association lists, or enums, or to ease string manipulation), a good event model (dependencies for lazy evaluation, and callbacks for variable validation/ assignment/ formatting, etc.), a strong gui package, and reasonable performance. A+ in an Emacs IDE is the fastest development environment that I've personally experienced -- that said, it does require some care. A+ does a poor job of enforcing encapsulation and doesn't support inheritance. A+ applications tend to have a lot of global variables and frequently become memory hogs. Also, the APL font set limits portability and puts some people off. And finally, as a proprietary language it doesn't have all the glue to other packages that something like Python or Perl does. I haven't worked with K; but, I understand that it improved execution performance, improved integration with external packages (DBs, spreadsheets, etc.), replaces the APL keyboard w/ ASCII, and added nested namespaces, at the expense of some of the A+ gui eye-candy.
NO_SPAM_PLEASE
Had a choice between APL and BASIC, I finally settled on the APL as the higher-level operators gave us better performance, and the workspace-based nature of the language was very good for allowing the equipment to be shared out.
What ever happened to Dr. Iverson, anyway?
*whup* "Get along, little electrons. Heeyah!"
The Association for Computing Machinery has a "special interest group" devoted to APL: SIGAPL. SIGAPL publishes an informal journal, much of which is available online at their website.
I used to use APL on a Univac 1100. Not only was it a pretty cool language to code in because of the cryptic symbols, I had a teleterm-1030 APL portable printing terminal with a dual apl/ascii keyboard. Just being able to identify all of the symbols was an accomplishment, and serious programs only took up a few lines of code. IMHO, it was more fun than lisp, and less parenthesis-counting. But a completely different programming paradigm than any other language I ever used. aem
-a.e.mossberg
Other operators allow collapsing or aggregating along one dimension, eg +/A sums up A along its "first" dimension and produces an array of the results. Another operator transposes the array to put the dimensions in the order needed to match other arrays, etc. By transposing and aggregating, complicated relational operations can be performed in one line of code.
In fact, I realized recently that APL has many of the capabilities of SQL, but it is many times more concise. The reason is that, while SQL demands writing out join conditions for every "dimension" (join key) in an expression, APL works by knowing which dimensions are supposed to match in each operation. For example, say A and B are "tables" with 3 "keys" (dimensions) d1-d3, similar to A and B above. If we want to add up A+B elementwise, we have to write out something like:
This is cumbersome and varies according to the number of key fields in A and B. Hopefully you can see that APL is a better solution in this case.Someday I hope to come up with an APL-like shorthand for doing relational queries. The main idea would be to have joins, cartesian products, aggregations, operators, etc. that work by implicitly matching keys rather than by listing them. In fact, a lot of the APL operators would work if applied directly to tables, eg
or---- "If we have to go on with these damned quantum jumps, then I'm sorry that I ever got involved" - Erwin Schrodinger