Live data from Hacker News

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

jsoftware.com

41–50 of 60 posts

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

#41
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.

Is the pricing published? I haven't been able to find it on the website.

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

#42
post #26
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…

> Joel Moses has been credited with coining the phrase in the 1970s > APL is like a beautiful diamond – flawless, beautifully symmetrical. But you can't add anything to it. If you try to glue on another diamond, you don't get a bigger diamond. Lisp is like a ball of mud. Add more and it's still a ball of mud – it still looks like Lisp. > Moses strongly denies this, claiming he instead called Lisp a bean bag because i…

Cannot stop laughing even read them the second time. Great quote.

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

#43
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…

I highly recommend the “Q for Mortals” book as an excellent introduction to using K and it’s available online:

https://code.kx.com/q4m3/

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

#44
post #37
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…

> 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. I use k/q regularly, and I'm not using it for "math". The compact notation creates value in helping you make correct programs. See [1] and [2] specifically. [1]: https://news.ycombinator.com/item?id=8476294 [2]: https://news.ycombinator.com/item?id=8476702 You can write C i…

Node.js is not the thing to compare C web servers performance to. Like, it's so much not the thing, it goes beyond funny and wraps around to sad.

Let me refer you to the TechEmpower framework benchmarks: https://www.techempower.com/benchmarks/#section=data-r17&hw=...

Look at the language column there, you'll be surprised.

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

#45
post #10

Earlier quoted context omitted.

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

Is the pricing published? I haven't been able to find it on the website.

It’s definitely one of those “if you have to ask, you don’t need it” kind of things

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

#46
post #21
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

I've always been curious how people get into this. I've been interested in KDB ever since I read http://archive.vector.org.uk/art10501320 , but it's not exactly a language they teach in college or you'd pick up in independent study. Do people just apply to fintech places with relevant experience and then get training for kdb?

Re how to get started: what was effective for me was to pair kdb+/q with another language and constrain how much I tried to do with q itself. q-sql for joining, filtering, pivoting and grouping (particularly date grouping and grouping with custom aggregate functions) is incredibly fast and powerful and also easy to learn. (though certainly, q experts will be able to point out all sorts of sub-optimal things in your queries)

Initially, we used F# to shovel data into kdb and to orchestrate queries and process results -- while keeping our q-sql simplistic -- and still saw astonishing speedups in our data processing. Over time, wherever we needed more speed, we'd do more and more in q itself (the 'Q Tips' book is very helpful).

One can get a lot of power with just a little kdb+/q.

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

#47
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…

You mean Dyalog APL? It already regularly outperforms normal, handwritten C code. It also has support for distributed computing, multi-threading, and the Co-dfns compiler can be used to compile your APL code to the GPU. For example, consider the following talk, which discusses sub-nanosecond lookups/search using the Dyalog APL interpreter.

https://dyalog.tv/Dyalog18/?v=paxIkKBzqBU

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

#48
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…

You may want to check out the Co-dfns compiler, which is proof positive that APL is a terrific language for doing things like tree manipulations, which is the traditional domain of Lisp and functional programming languages like Haskell.

https://github.com/Co-dfns/Co-dfns https://news.ycombinator.com/item?id=13565743 https://news.ycombinator.com/item?id=13638086 https://news.ycombinator.com/item?id=13797797

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

#49
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 o…

> but APL with some nice little extensions that I dream up at the moment but would never think of implementing.

Does this mean APL without extensions is quite limiting?

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

#50
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…

APL is a read syntax for point-free function chaining in which the operators have one-character names, and may be juxtaposed without intervening whitespace. Relative to APL, the interesting matters in Lisp tend to lie on the other side of the AST hill.

What language do you believe can live on both sides of the hill? Haskel?
Post reply on HN