Live data from Hacker News

In Praise of APL: A Language for Lyrical Programming (1977)

jsoftware.com

11–20 of 60 posts

Re: In Praise of APL: A Language for Lyrical Programming (1977)

#11
post #10

Earlier quoted context omitted.

As mruts pointed out above, kdb+/q provides what you're imagining - it provides fantastic distributed computing support via its IPC protocol and also has multi-core support.

Multi-core is priced for big financial institutions, though. Only thing you or I could afford is the 32 bit single-core.

You can start the 32 bit instance with the -s switch (for q to be started with multiple slaves) for parallel execution of a function over data using the "peach" command [0].

But yes, I do agree that the 32 bit instances have limited use, as they can't be used in for-profit projects.

[0] https://code.kx.com/wiki/Reference/peach

Re: In Praise of APL: A Language for Lyrical Programming (1977)

#12
post #7
post #2

I can imagine that a fork of GNU APL, re-written in FORTRAN with multi-threaded and maybe distributed computing support, would be an amazing mathematical tool. Something that's super fast and scales really well, and makes mathematical operations really easy.

I think KDB might be what you’re looking for. It’s very efficient and widely used in finance. It’s pretty expensive, but I believe you can use it for personal use for free (there might be a single core restriction I think). As an aside, KDB devs make bank, like salaries >500k

There seem to be a couple of free versions, a 64-bit and a 32-bit version, with the latter being less restricted than the former.[1]

I was curious about it, but they really don't make it easy to get started. There are no links to any documentation anywhere on their site. The download is hidden behind a licensing agreement and a form asking for the user's personal information. They mention GitHub (in the context of "community support") on their download page, but there are no links to any GitHub repos.

[1] - https://kx.com/connect-with-us/download/

Re: In Praise of APL: A Language for Lyrical Programming (1977)

#13
post #10

Earlier quoted context omitted.

As mruts pointed out above, kdb+/q provides what you're imagining - it provides fantastic distributed computing support via its IPC protocol and also has multi-core support.

Multi-core is priced for big financial institutions, though. Only thing you or I could afford is the 32 bit single-core.

There is a free 64-bit version available with limits that don't seem harsh at all:

The 64-bit kdb+ On-Demand Personal Edition is free for personal, non-commercial use. Currently it may be used on up to 2 computers, and up to a maximum of 16 cores per computer, but is not licensed for use on any cloud – only personal computers. It requires an always-on internet connection to operate, and a license key file, obtainable from ondemand.kx.com

Re: In Praise of APL: A Language for Lyrical Programming (1977)

#14
post #7

Earlier quoted context omitted.

I think KDB might be what you’re looking for. It’s very efficient and widely used in finance. It’s pretty expensive, but I believe you can use it for personal use for free (there might be a single core restriction I think). As an aside, KDB devs make bank, like salaries >500k

There seem to be a couple of free versions, a 64-bit and a 32-bit version, with the latter being less restricted than the former.[1] I was curious about it, but they really don't make it easy to get started. There are no links to any documentation anywhere on their site. The download is hidden behind a licensing agreement and a form asking for the user's personal information. They mention GitHub (in the context of "c…

https://code.kx.com/q/ has learning material and documentation . Hope it helps

Re: In Praise of APL: A Language for Lyrical Programming (1977)

#15
post #8

Earlier quoted context omitted.

Gnu APL has multi core support for certain computations and you can fork APL child processes and interact with them. So not quite multi threaded but still very useful for heavy duty work where you want to have a great deal of concurrency.

Yes! I'm imagining a value proposition where APL is as fast as C or Fortran, on distributed systems, because at that point it would probably evaporate most of Matlab, Mathematica, and probably TensorFlow's users. Can you imagine? APL is an amazingly powerful language. It's easy to write nearly any mathematical function in it. What if it was faster than every other mathematical language? It would probably dominate the…

Supposedly numpy was inspired in part by J.

I don't think it will ever dominate the market - some things such as FFI remain weak points compared to C.

Plus a lot of what makes Mathematica good is that they have specific algorithms that they've optimized quite a bit, for things like computer algebra &c.

Re: In Praise of APL: A Language for Lyrical Programming (1977)

#16
post #5

> I am firmly convinced that APL and LISP are related to each other along an important axis of language design and that acquiring simultaneous expertise in both languages is possible and desirable for the beginning student. Were they unified, the set of tasks that succumb to terse, flexible and expressive descriptions will enlarge enormously without overly increasing the intellectual burden on the student over his in…

There's another link between Lisp and APL in the article:

"Some years back, we had a visit at Carnegie from a person at MIT whose name I've forgotten. He started to give us a lecture in a little office about some programming issues in LISP. He went up to the blackboard and he spoke LISP. Everything he wanted to describe, he described in terms of parentheses and CONS and CARS and CDRS. He found himself quite capable of expressing his ideas in the language in which he programmed. Not once during the half hour or so that he lectured to us did I see the inevitable block diagram, the flow charts that show up on the blackboard with things written in semi-English. He didn't need them. And at the time I said to myself, "LISP has a very precious character, if indeed there are some people who can express programming ideas to other people in the language in which they program.

"I can't do that with ALGOL; never have I been able to do it with ALGOL. Whenever I've programmed in ALGOL and I've wished to make some statements about the program I was writing, I was forced to go outside the language and use English, or mathematics, or some block diagrams or what-not.

"In APL, I find that to a far greater degree than any other language that I've used, I can make statements about the programs that I'm writing, in APL -- actually not exactly APL, but APL with some nice little extensions that I dream up at the moment but would never think of implementing. But by and large, I find that the language allows me to express myself, in the language, about the things I'm dealing with. I find that a very precious property of a programming language."

Re: In Praise of APL: A Language for Lyrical Programming (1977)

#18
Now that I feel the bite from my sedentary lifestyle on my bum, I'm more and more attracted by the idea of a language taking 1/10th the typing compared to what's typical today. However, afaict languages following APL's suit specialize in math, so I wonder if the approach could be adapted to more general kind of coding.

Even though the set of short symbols has to be limited, don't we currently have a few dozen often-repeated operations in language keywords and standard libraries? (Especially in the approach of e.g. Clojure, relying heavily on combining standard transformations on strictures.)

Re: In Praise of APL: A Language for Lyrical Programming (1977)

#19

Related article posted on HN recently: APL is more French than English [ https://news.ycombinator.com/item?id=18640451 ]

> But at that time APL was not running on any computer; and he stoutly insisted that it was unnecessary that it ever run on a computer. It was for him a notation with which he could express algorithmic concepts; and for him at that time, that seemed sufficient.

Indeed. Because both APL and Lisp began as languages for describing computational ideas, it stands to reason that they would be particularly fit relative to languages that evolved under other fitness criteria.

I was intrigued to not the opposition to APL mentioned in the article by Djikstra and others on the basis of a different mental model of computation.

Re: In Praise of APL: A Language for Lyrical Programming (1977)

#20
post #18

Now that I feel the bite from my sedentary lifestyle on my bum, I'm more and more attracted by the idea of a language taking 1/10th the typing compared to what's typical today. However, afaict languages following APL's suit specialize in math, so I wonder if the approach could be adapted to more general kind of coding. Even though the set of short symbols has to be limited, don't we currently have a few dozen often-r…

APL is actually kind of bad at math, or well the kind of math people tend to think of when they talk about matlab or Fortran being good at math.

What APL does well is filter/select/transform more spreadsheet style work than linear algebra stuff. It's a language to describe computation as meant by the sort of computer scientists that were born when computer was a job description.

Post reply on HN