Hacker News new | past | comments | ask | show | jobs | submit login
A List of companies that use Array Languages (J, K, APL, q) (github.com/interregna)
77 points by tosh 50 days ago | hide | past | favorite | 30 comments



My dad used array languages throughout his career— APL at some point, A+ at Morgan Stanley, and K later on at Conning, a finance modeling company serving the insurance industry. They moved what I think is a flagship product (a macroeconomic monte carlo sim thingamajig) from K to Julia a while ago. Here's his old boss at JuliaCon talking about it.

https://www.youtube.com/watch?v=EE2yz0ptSzQ

I don't think he keeps any old code lying around, but in the past I've tried reading it without success. That makes me a DSF— a Domain Specific Failson :[


Heh, I consult in finance and there’s so much k/q code out there. It’s like the ultimate expert-friendly language, it’s extremely powerful, but it really takes a lot of dedication to learn, in a similar way that “pure” functional programming languages also take a lot of effort to learn if all you ever did was imperative programming.


I spent a couple of months last year learning q. When I went back to it this year, I realized it would take significant effort just to refresh my skills. I now program for fun in gawk.


It’s a bit like dismissing Chinese because you can’t read the letters I think.

But perhaps another failing of the current array languages is that they are sort of walled gardens. Not as easy to integrate or modularise as something like JS/Python (on the other end of the PL spectrum.


Computer language design is an intersection of applied mathematics, computer science, individual psychology, group dynamics, and history.

Syntax doesn’t exist in a vacuum. There is a significant adoption advantage that can be gained by reusing popular idioms. This is why QWERTY is more popular than Dvorak long after mechanical typewriter arms or even permanently marked mechanical keys! I’m pecking this out on a phone keyboard which is just software.


I don't know that's a concern for users of the languages. When you can spend years tuning and optimizing a 'program' that fits in a tweet, those other things don't really have a chance to get involved.


Unsurprisingly a lot of finance companies, that said I'd like to know how Volvo uses it for manufacturing.

ps: thanks a lot


Not so much manufacturing, more scheduling, prediction, planning.

https://www.dyalog.com/case-studies/hercules.htm


Thanks a lot


>Unsurprisingly a lot of finance companies

may i ask why?


because the core of what they do is working with time series and making analysis and predictions.


well arrays of digits are often daily duty in finance, and also historically, quite a few talks online involved people in finance IIRC

ps: oh, and commercial APL/j/k engines are said to be extremely optimized


but why these esoteric languages specifically? why not C++ with library optimized for vector operations? it would certainly make debugging easier.


REPL-driven development keeps me in the flow. I can write (and test) multiple different approaches to a problem in J or K before I can finish typing the first approach in C++. And that's not even counting time and context switching costs of compiling and running the C++ code.

Lisps and Smalltalk also have repl-oriented development, but they're verbose. Even tab-selecting a Copilot generated autocomplete takes more keystrokes than some array language programs.


I never worked with them but I assume it's the same reason cpp guys end up doing some in python, prototyping is easier with instant/short feedback. Later you solidify the solution in statically typed languages.


The real-time trading systems are in C++, while the data analysis, which happens offline, is either done in Q, R or Python (pandas, polars, etc.)


I think array languages can be a very good fit for graphics programming. I wonder if anyone tried that?


People have done (there’s at least one guy making games in BQN) , but nobody has really nailed heterogeneous (CPU/GPU) compilation, and gfx api integration from a ux perspective. We desperately need better API agnostic frameworks before things like this can take off


Take a look at use.gpu from Steven Wittens. (I might be missing the mark here).


You might like "Special K" by John Earnest

http://beyondloom.com/tools/specialk.html


Not working yet, but I'm trying to make a K-like language targeting CPU+GPU (mostly for machine learning): https://github.com/hoosierEE/element

At this point it's just a parser and a dream, so don't expect much.


For the experts in this thread: is there any benefit to using these so called array languages compared to using something like numpy (or even pandas/polars) ?


The short answer is yes. There have been many presentations on this topic that tries to explain it in various ways.

The problem is that most people who are unfamiliar with APL usually don't see the larger picture, and you need to learn the language before understanding the reasoning. But once you understand it, you don't really need to hear the arguments anymore.

One argument that may be easier to digest is that the very optimised syntax allows you to easily work with the data in an interactive fashion. This is similar to how a calculator that forced you to write 1.add(2) would be rather painful to use, even if it functionally is the same as 1+2.

In programs that you save to a file and is part of a larger project, this benefit is of course less relevant.


Could you imagine reading a math proof that used Python syntax rather than mathematical?

e.g. nested iterators/loops instead of ∀x,y ∈ ℝxℝ etc.

For a startup "using the language you know" is good advice. To be at the top of a specialist field, there are better ones.


Disclaimer: I'm no expert, just an enthusiast.

For me, the feeling of being well-designed or expertly crafted is what sets the array languages apart. Learning one concept often (intuitively, for me at least) extends to many other parts of the language.

For example, in Q the comma operator concatenates arrays:

    q) 1 2 , 3 4 5  // returns 1 2 3 4 5
...but it also merges dictionaries (duplicated key `x gets the new value):

    q) (`a`b`c!1 2 3),`c`d!4 5
    a| 1
    b| 2
    c| 4
    d| 5
...and also joins tables by row. Sure this is "just" operator overloading, but it's so deeply ingrained in the language it doesn't feel jarring or bolted-on like in other languages.

Building a program is less about crafting bespoke abstractions and more about using the existing building blocks, which leads to a semantic uniformity that's rare to find in other languages. Or at least, it's easier to get your job done using only built-in features and not have to resort to custom abstractions.


what's the difference between K, Kx, kdb+, Q?

All the companies I see listed with these actually mostly use Q, which is a superset of K.


K and Q are programming languages. Q is the successor of K.

Kx is the company behind kdb+

kdb+ is the database engine that K/Q can use to persist data. It’s literally as if all your code is executed inside the database engine (because it is), you can access all data by memory and variables, and it periodically synced to disk (using mmap iirc).


That sounds similar to MUMPS, one of the most horrible languages ever (because of its syntax, not the persistence).


In this respect, probably nothing, and they probably all mean Q.

Q is a different language to K, implemented in K. There are more versions of K than Q- kdb+ is the only Q implementation, but there are others like shakti, ngn/k, and kona that implement K.


Probably my naiivity here, but why isn't R on the list?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: