4 ms·
What are some real-world practical applications of array programming? Because as far as I know, APL did not catch on, and its subsequent versions like J and K a
by behnamoh 2y ago
What are some real-world practical applications of array programming? Because as far as I know, APL did not catch on, and its subsequent versions like J and K and BNQ also did not become useful in industry. Maybe there's something I'm missing. Why would you want to do array programming in Python? What are the advantages over regular Python programming?
- deleted 2y ago[deleted]
- fluorinerocket 2y agoI thought they had niche in finance.
- mlochbaum 2y agoAPL did catch on to some extent, see https://news.ycombinator.com/item?id=39471718 https://news.ycombinator.com/item?id=39471718 . Without getting into any discussion of the array paradigm itself, the reason commercial programming is such a winner-take-all system now is hiring and organizational difficulties, not that popular languages are so much more productive than unpopular ones. Building a working application is the easy part of running a business.
- itishappy 2y agoArray programming databases (eg: KDB+, Shakti) are (per their own metrics) way faster than the competition. Licensing fees are in the 6 digits, so I'm not comparing them personally, but people pay that exorbitant amount, and I assume they do so for a reason. https://shakti.com/ https://shakti.com/
- juliangoldsmith 2y agoThe array languages aren't super popular because of the sharp learning curve. They're a lot different than most other languages, and they have a lot of operators that simply don't exist in something like C++. A few years ago there was an article about K's use in high-frequency trading. I'm not sure about usage of APL and J, though. BQN is still fairly new, so it will take a while to see much production usage. If you've ever written code using NumPy, Tensorflow, or PyTorch, you're doing array programming. Those libraries are heavily influenced by the array languages, including taking a lot of terminology (rank, etc.). I've personally found that playing with J and BQN helped me understand Tensorflow, and vice versa.
- behnamoh 2y ago> including taking a lot of terminology (rank, etc.). AFAIK that's a linear algebra term for matrices, not something array programming or Pytorch or TF invented.
- ssfrr 2y agoit's an unfortunate terminology collision. - array languages: rank is the dimensionality of an array, i.e. a vector is rank-1, a matrix is rank-2, a N-D array is rank-N - linear algebra: rank is the number of linearly-independent columns (and also rows) So for example, if you have a 5x5 matrix where 4 of the columns are linearly independent, it would be rank-4 in the linear algebra sense, and rank-2 in the array language sense. I guess (though I've never really thought of it before) that you could say that the array-language definition is the rank (in the linear algebra sense) of the index space. Not sure if that's intentional.
- juliangoldsmith 2y agoRank in the array language terminology seems to be synonymous with tensor order (sometimes called tensor rank). Ken Iverson (APL's creator) was a mathematician, so I'm not that surprised to learn the term came from a branch of math.