A Ray of Hope: Array Programming for the 21st Century [video]
youtube.com
youtube.com
I think it's a very, very promising idea (I admit to heavily being biased towards anything APL-influenced) although surprisingly difficult to get right. Gilad Bracha is obviously way smarter than me so I'm definitely curious where he goes with this.
One additional idea that I keep trying to make work is integrating variations of (constraint) logic programming and treating solutions to a predicate as a generator or stream that operations can be lifted to rank-polymorphically. As a simple example a range function could be defined and used like (imaginary illustrative syntax)
range(n,m,x) :- n <= x, x <= m
primesUpto(n) = range(2,n,r), # create a generator containing all solutions wrt r
mask(not(contains(outerProduct(*, r, r), r)), r) # as in the video
I've never really gotten this to work nicely and it always feels like there's a sort of separation between the logic world and the array world. However this feels incredibly powerful, especially as part of some sort of database, so I keep returning to it even though I'm not really sure it goes anywhere super useful in the end.It's a bit special-cased (afaict), but it sounds like it makes at least a solid step in this sort of direction.
Random thought: cool triptych behind the main speaker. Anyone know what it is?
EDIT: A search for "famous triptychs" revealed: https://en.wikipedia.org/wiki/The_Garden_of_Earthly_Delights
More often than not, kdb is chosen as a basic time-series storage and retrieval. Which is a bit sad because thats really a small part of what it does well. Other firms use KDB in a more holistic manner, for building a distributed services system for example. (look up Torq from AquaQ)
Where to find opportunities? Probably going to a job board and searching for KDB is a good place to start - most opportunities will be in trading or trading-tech related roles.
The ideas of APL and its successors, the array programming languages, were two generations ahead of their time. These languages are based on the notion that everything is a tensor, and all operations are rank-polymorphic: they extend automatically to tensors of any rank. These ideas are perfectly suited to an era of machine learning, large scale data, GPUs and other accelerators. Building on recent academic research, we are building ShapeRank, a new statically typed, purely functional language for industrial use, that extends rank-polymorphism to streams. We’ll introduce the key ideas and show how they are realized in ShapeRank.
https://2020.splashcon.org/details/splash-2020-rebase/26/A-R...
Easier means - less effort in learning coming from someone who knows mainstream languages like Java.
The idea is not only limited to APL. I don't like crafting for loops or maintain indexes. Fortran has something similar. With Matlab many operators operate in an intuitive way on vectors and matrices. It breaks down quite quickly if you try to do something more complex though. This somewhat extends to Julia. In Ruby also you can have .map or .each.
Julia:
x=10
v=[1 2 3 4]
x.*v
#1×4 Array{Int64,2}:
# 10 20 30 40I'm honestly not sure if this is a good thing or not. You said "easier" syntax than APL but APL is honestly a very easy syntax for working with arrays. That's a significant part of the advantage of APL, it makes it very easy to come up with, talk about, and maintain array algorithms.
Matlab and Julia and other languages aimed at scientific computing have some array language-like traits but lack a lot of the functions that make APL more generally applicable. And .map is all wrong; it's extra noise and it doesn't generalize down to scalars or up to matrices—the defining feature of array languages is that operations are implicitly polymorphic over the rank of the input.
It's like digital cameras that came around. Many users knew how to use film cameras so you made the digital cameras to be mostly like film cameras even if the digital medium would have enabled a very different, much better camera straight out of the box. But the market had invested so much time in this learning how to work with film that you had to do it like that. Path dependency is not just about rigid thinking, it's about using what you have because that saves a lot of resources.
Regarding, .map being all wrong, in Ruby it's not a property of an array, it's a method for enumerables. Array is one type of enumerable, but it works with hashmaps etc. https://ruby-doc.org/core-2.6.5/Enumerable.html So it's not that non-general. It is noisy (and weird with the pipes) because it's general.
map is general in kind of the wrong way. You could after all add a #map method to Object for scalars and make a Matrix class that also implements it and then just call map everywhere. However you still run into the problem, mentioned in the video, that it doesn't easily generalize to x + y where both x and y are arrays; you have to use zip or map2 or something (and now you still have to figure out how to do vector + matrix) and yes you can kind of do explicit "array programming" in Ruby if for some reason you're really compelled to do that but it will look awful. And that's just what array languages do for you implicitly. As a paradigm there's a bit more too it than "just call map everywhere"—there's still all the functions for expressing algorithms as computations on arrays.
I am surprised that the author (and reviewers of the paper) has missed to perform proper literature review, for example it missed other recent and promising works on functional array programming languages namely Single Assignment C (SAC) and Futhark [2],[3].
ShapeRank also seems to take vector algebra "tensor" concept to the extreme and to be honest it's better to based on "versor" since geometric algebra is probably the future of computer algebra [4].
Last but not least and probably the most controversial is that why create another standalone array language from scratch? It will be better to make a seamless DSL based on general purpose language like D language and you do not have to re-invent most of the libraries (and C library support in D is second to none). Arguably the most successful recent effort on array based scientific programming language is Julia and it is still very much dependent on some Fortran based libraries for speed. While with D you can go "turtle all the way down" and still meet the speed requirements that are needed in scientific computing [5].
[1]https://en.m.wikipedia.org/wiki/Array_programming
[2]http://www.sac-home.org/doku.php
[4]https://en.m.wikipedia.org/wiki/Comparison_of_vector_algebra...
[5]http://blog.mir.dlang.io/glas/benchmark/openblas/2016/09/23/...
Dyalog APL, J, Kdb+, Shakti.
All of those are closed source and expensive (Dyalog is fairly affordable, but still a paid product) with the exception of J. J is a cool language, but isn't quite my cup of tea.
So if one of the new projects ever picked up steam and got a decent sized community with hooks into all the same numeric libraries as Numpy, and some decent charting libraries...then we would have something nice.
I'm curious why you say that? Quantum computing or something? I was very interested in geometric algebra several years ago, but have never found need for it. Seems like it helps simplify problems that are already simple.
To be specific, if you have noticed, there's a recent popular trend in "network observability" and don't assume that the "network" is only for the computer networks, it can be any network (social, pandemic,system, etc) and the original term actually refer to the power system. For a start, this network observability requires fusion of data from multitude of sensors, parameters, entities, components, etc to provide accurate model for physical and/or virtual world. For example if you are trying to develop level 5 autonomous driving system, comprehensive data fusion, integration and analytics is the very first step towards successful automation.
If you think that the term network observability is familiar, it is because the main reason eBPF is created was to perform comprehensive Linux OS observability. There is a wonderful website that you can see and observe (pun intended) how to perform network observability, and why it is really useful [2].
By supporting and representing data as "versor" natively in programming languages you can easily model and perform insightful animation similar to here [3]. There is also a recent post on HN about ObservableHQ website itself [4].
[1]https://news.ycombinator.com/item?id=25142528
That is because some libraries (e.g. BLAS implementations) have many developer-years of careful optimizations. These are not trivial algorithms to implement. Implementing them in Julia, nonetheless, has been a long-standing goal of the Julia community.
APL and LISP both had the problem that they went straight to the (extreme) logical conclusions of a paradigm. Which is means you have to put an effort to actually derive the benefits be can’t just “wing it till you understand it” like you can in most other languages. Notably, C++ has left that club with C++14 (maybe even 11), but popular languages at the time of their popularity have always been there, and likely always will be.
Looking back it was pretty cool and helped form a more abstracted view of programming beyond the low-level
edit:found some papers https://cartesianprogramming.files.wordpress.com/2020/07/sem... http://www.cse.unsw.edu.au/~plaice/archive/JAP/U-CSE-201306....
Another interesting language in this vein is Dex. The authors are creators of Jax and Pytorch, and they have a lot of interesting ideas.
I don't know if we've solved parallelizable computation in Rx, but it doesn't seem like it should be too much of an abstraction on top. I didn't get the sense that the speaker was aware of Reactive-Streams, but hopefully they're aware of the existing effort!
It's implemented in java, which will allow loading in a wide range of libraries. An older version can be tried online here (1 min load time): http://www.timestored.com/jq/online
Any suggestions?
I don't have any good suggestions. "Jaq"?
A multidimensional array is just data ordered over several dimensions, there are no intrinsic operations. So if you're talking about multidimensional arrays that have such operations defined, it's useful to communicate that distinction by using the name "tensor". In the same way that it's useful to talk about coordinates rather than "1-dimensional array of length <base size> that respects certain invariants".