SERVING THE QUANTITATIVE FINANCE COMMUNITY

 
User avatar
rogermc
Topic Author
Posts: 26
Joined: July 24th, 2002, 12:07 pm

APL: Dying/dead or still in use

March 31st, 2006, 4:37 am

I fondly recall using APL many years ago and had seen some very elegant solutions to complex problems coded in this language(The team I worked with coded a workers comp claims runoff valuation process in not too many lines of code)I was wistfully thinking about this recently and wondered whether anyone is using APL (or any variants) now .. can anyone point me in the direction of anything still available
 
User avatar
AlanB
Posts: 662
Joined: July 14th, 2002, 3:00 am

APL: Dying/dead or still in use

March 31st, 2006, 5:19 pm

QuoteOriginally posted by: rogermcI fondly recall using APL many years ago and had seen some very elegant solutions to complex problems coded in this language(The team I worked with coded a workers comp claims runoff valuation process in not too many lines of code)I was wistfully thinking about this recently and wondered whether anyone is using APL (or any variants) now .. can anyone point me in the direction of anything still availableI loved using APL, didn't have to worry about header files, pointer bullshit, memory allocation........., If you wanted to add A + B, you simply typed X<--- A+B.And yes, I do believe that, at least in the world of Finance, APL is dying, if not already dead. There is a website, http://www.sigapl.org/ , wherein you might find out about the current "life" of APL.
 
User avatar
linuxuser99
Posts: 835
Joined: March 26th, 2004, 2:51 pm

APL: Dying/dead or still in use

April 1st, 2006, 8:35 am

http://www.kx.com/index.php - market leading tick data and time series analysis store. Runs on what is basically a dialect of APL.So I'd have actually said it was on the resurgence rather than dying out!
 
User avatar
django
Posts: 18
Joined: March 24th, 2006, 6:12 pm

APL: Dying/dead or still in use

April 1st, 2006, 2:17 pm

There's also J, Iverson's successor to APL (is k named after this?);and Concatenative languages are probably things that people who liked APL would like.
 
User avatar
stuntprogrammer
Posts: 198
Joined: July 10th, 2005, 7:23 pm

APL: Dying/dead or still in use

April 3rd, 2006, 1:01 am

QuoteOriginally posted by: djangoThere's also J, Iverson's successor to APL (is k named after this?);and Concatenative languages are probably things that people who liked APL would like.The story goes that k stands for "keys to the kingdom" but certainly Arthur Whitney had a great influence on j; he wrote the first version of the J interpreter in "one page over one afternoon". Roger Hui credits Whitney with a great influence on the programming style used in J's implementation. I must say that Whitney has opened my eyes as well - though I wish to study more with him than is possible right now.Apl style languages have much to recommend them in terms of "programming with the grain" of recent hardware. Predictable bulk data processing is kind to modern architectures.
 
User avatar
tibbar
Posts: 554
Joined: November 7th, 2005, 9:21 pm

APL: Dying/dead or still in use

April 4th, 2006, 10:46 am

i'd say it's pretty much dead. APL is a very old fashioned language (not OO) and has bizarre limitations - e.g. a function can only have a "left" and a "right" parameter...yes that right, only 2 allowed - for more than two inputs to a function, you have to pass them in as an array, and then parse the array inside the function, to get at the extra inputs...plus the stupid keyboard it has...like learning arabic.
 
User avatar
lballabio
Posts: 983
Joined: January 19th, 2004, 12:34 pm

APL: Dying/dead or still in use

April 4th, 2006, 11:26 am

QuoteOriginally posted by: tibbarAPL is a very old fashioned language (not OO)Perhaps you didn't want to make such an inference, but I wouldn't equal "not OO" with "old". Very modern languages exist which favor the functional paradigm.Luigi
 
User avatar
stuntprogrammer
Posts: 198
Joined: July 10th, 2005, 7:23 pm

APL: Dying/dead or still in use

April 4th, 2006, 3:09 pm

QuoteOriginally posted by: tibbarAPL is a very old fashioned language (not OO)I've never used it, nor am I a Dyalog user, but I was told recently that their most recent APL implementation has been extended with OO features. See dyalog.com for more, and the vector magazine had a recent article introducing some of the features.QuoteOriginally posted by: tibbarplus the stupid keyboard it has...like learning arabic.I was never an APL programmer. My intoduction to that style of languge came with Kx's related language. Their products use normal ascii characters. q (the name of the language in the kdb+ product) has also added more verbose names than the single character punctuation in older products. Personally I prefer it, but I understand the arguments for the more succint style as well. I'm a q fan - and a big fan of the style of language and their implementations.
 
User avatar
tibbar
Posts: 554
Joined: November 7th, 2005, 9:21 pm

APL: Dying/dead or still in use

April 4th, 2006, 3:28 pm

i had to learn it about a year ago for work (which ended up with me finding another job). it's inferior in every respect to c++ imho, the apl geeks will say that it is superior in handling matricies etc, but c++ can easily do that with an optimised matrix library.i cant think of a single good thing to say about it.
 
User avatar
stuntprogrammer
Posts: 198
Joined: July 10th, 2005, 7:23 pm

APL: Dying/dead or still in use

April 4th, 2006, 3:36 pm

QuoteOriginally posted by: tibbari had to learn it about a year ago for work (which ended up with me finding another job). it's inferior in every respect to c++ imho, the apl geeks will say that it is superior in handling matricies etc, but c++ can easily do that with an optimised matrix library.i cant think of a single good thing to say about it.Horses for courses I think. The upside is that its interactive, trivial to get large data sets into and manipulate (read the tick plant implementation) and gives a high level sql-ish feel for exploration. Out of the box I think it solves some people's problems. The downside is that the documentation could do with a lot of improvement (I hear they are working on that), there are few good people out there who know it, its scalar performance is not great, and the implementation is idiosyncratic. I'd definitely reach for C++ for some tasks rather than use it. All langages suck. Its just a matter of degree ;-)
 
User avatar
tibbar
Posts: 554
Joined: November 7th, 2005, 9:21 pm

APL: Dying/dead or still in use

April 4th, 2006, 3:43 pm

but have you seen the code the apl ppl write? it's horrific...in apl if you can write a one liner compounded expression that solves a complex problem, then you are god. the fact that noone else will ever understand how it works is irrelevent.Also apl ppl have terrible habits...like not all functions will be in memory at one time, they write functions out to a text file, then import them into memory dynamically. thus you cannot see what a complex apl program does before runtime, you have to break in mid-way, and see if the function you are interested in exists at that time.imagine doing that in c - e.g. dump memory of a function to a file, and load another function into memory at runtime... now refer to the pointer at which the dynamic function lives throughout your code, and dont document what it will be doing at any time.
 
User avatar
stuntprogrammer
Posts: 198
Joined: July 10th, 2005, 7:23 pm

APL: Dying/dead or still in use

April 4th, 2006, 3:49 pm

QuoteOriginally posted by: tibbarbut have you seen the code the apl ppl write? it's horrific...in apl if you can write a one liner compounded expression that solves a complex problem, then you are god. the fact that noone else will ever understand how it works is irrelevent.Also apl ppl have terrible habits...like not all functions will be in memory at one time, they write functions out to a text file, then import them into memory dynamically. thus you cannot see what a complex apl program does before runtime, you have to break in mid-way, and see if the function you are interested in exists at that time.imagine doing that in c - e.g. dump memory of a function to a file, and load another function into memory at runtime... now refer to the pointer at which the dynamic function lives throughout your code, and dont document what it will be doing at any time.As I mentioned, I've never been an APL programmer - was commenting in the context of q. Now I'm perfectly willing to accept that people write shit code in it. Then again I think thats independent of the language under discussion.The thing you mention sound pretty gross. Though I've seen plenty of C and C++ that dynamically loads in functions from libraries and accesses them via function pointers - so you can have exactly the same problem. Actually with interposition you can have that problem without the code explicitly doing that as its sometimes handy to replace functions in binaries by interposing say an alternative malloc implementation. One the bugs that almost sent me screaming from the building involved such interposition and a dynamic binary optimizer (so the machine code was getting rewritten at runtime as the program executed..).
 
User avatar
DavidJN
Posts: 1753
Joined: July 14th, 2002, 3:00 am

APL: Dying/dead or still in use

April 5th, 2006, 11:45 am

Interesting comment from tibbar: "but have you seen the code the apl ppl write? it's horrific...in apl if you can write a one liner compounded expression that solves a complex problem, then you are god. the fact that noone else will ever understand how it works is irrelevent."About 15 years ago I worked for a bank which had an analytics dept that did a great deal of undocumented work in APL. Not surprisingly, no one else in the bank understood their code. It took very little mental effort to conclude that the reason they did this was an attempt to make themselves indispensible. And it took some time to get rid of them!
 
User avatar
rogermc
Topic Author
Posts: 26
Joined: July 24th, 2002, 12:07 pm

APL: Dying/dead or still in use

April 7th, 2006, 4:00 am

Many thanks for the linksI agree with the sentiment that poor code can be written in any language .. I gave up trying to decipher my predecessor's Perl code (mostly because there was no commentary and if you think APL is difficult to decipher, Perl isn't much better) to do some data transformation and rewrote it in Python .. actually I'm a big fan of Python .. you can be productive so quickly and there is so much open source material it's highly unlikely you'd need to custom build anything .. APL is great and fun as an interactive tool, but there isn't much you could do these days in APL that can be done languages such as Python
 
User avatar
stuntprogrammer
Posts: 198
Joined: July 10th, 2005, 7:23 pm

APL: Dying/dead or still in use

April 7th, 2006, 7:31 pm

QuoteOriginally posted by: rogermcMany thanks for the linksI agree with the sentiment that poor code can be written in any language .. I gave up trying to decipher my predecessor's Perl code (mostly because there was no commentary and if you think APL is difficult to decipher, Perl isn't much better) to do some data transformation and rewrote it in Python .. actually I'm a big fan of Python .. you can be productive so quickly and there is so much open source material it's highly unlikely you'd need to custom build anything .. APL is great and fun as an interactive tool, but there isn't much you could do these days in APL that can be done languages such as PythonHey, Python is fun and interactive as well ;-). Using the numeric library gives you much of the same kind of high-level bulk data operators as an APL'er would expect. Mod the "verbose" syntax I'm sure APL programmers would be perfectly at home being able to do things like:>>> print x[0 1 2 3]>>> print greater(x, 2)[0 0 0 1]>>> print compress(greater(x, 2), x)[3]Or just say sqrt(sum(x*x)) to get the magnitude. The thing that would trip them up is that its by a by reference rather than by value language, and they'd not expect the odd things that can happen (from their point of view) with shared references to objects. R is a sweet language/environment as well if you are doing things of a statistical nature.
ABOUT WILMOTT

PW by JB

Wilmott.com has been "Serving the Quantitative Finance Community" since 2001. Continued...


Twitter LinkedIn Instagram

JOBS BOARD

JOBS BOARD

Looking for a quant job, risk, algo trading,...? Browse jobs here...


GZIP: On