top | item 25147073

(no title)

woutgaze | 5 years ago

Quick summary: Gilad Bracha introduces a new programming language called ShapeRank. It seems to be based on APL but introduces the concept of streams which are [vectors | tensors | arrays] of unbounded length.

discuss

order

Snoddas|5 years ago

Little longer summary:

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

Gravityloss|5 years ago

Can it be done in some easier syntax than APL?

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  40

justincormack|5 years ago

Have you got links to the research papers?

teleforce|5 years ago

Personally I think array programming languages are the future and one of the most popular programming languages in science and engineering is Matlab, and it is to some extent an array based programming language [1].

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

[3]https://futhark-lang.org/

[4]https://en.m.wikipedia.org/wiki/Comparison_of_vector_algebra...

[5]http://blog.mir.dlang.io/glas/benchmark/openblas/2016/09/23/...

7thaccount|5 years ago

I'd love to drop Python and go all in with a true array language (i.e. not Matlab), but you only really have 4 options:

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.

snicker7|5 years ago

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

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.

beagle3|5 years ago

Array programming is the future and always will be (since 1958). Same as LISP.

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.

unishark|5 years ago

> 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].

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.

jb_s|5 years ago

In my undergrad at UNSW I did a "baby's first interpreter" project on a language with a similar concept - function evaluation is defined in terms of unbounded-length arrays, being able to cache function evaluation for performance etc.

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