A Ray of Hope: Array Programming for the 21st Cent...
# linking-together
m
A Ray of Hope: Array Programming for the 21st Century 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. Presented by Gilad Bracha

https://www.youtube.com/watch?v=x1FoTYnJxeYβ–Ύ

🀯 2
g
can’t believe gilad is finally working in array languages. epic crossover for my interests
πŸ˜‚ 1
πŸ’― 1
k
This is a really compelling use case for dependent types.
d
Something I don't understand: why should [1, 2] + [[0,0],[0,0]] be [[1,2],[1,2]] and not [[1,1],[2,2]]? Is it completely arbitrary or is there a reason?
w
Futzing...
Will explain in a moment...
Yeah, it depends on exactly how the combining goes. Here Bracha focuses on the shape and rank of tensors, so to know how two things combine, the shape is what you'll want to have in mind. To get [1, 2] + [[0,0],[0,0]] β‡’ [[1,2],[1,2]], you replicate then zip:
Copy code
[1,2] + [[0,0],[0,0]] β‡’
[[1,2],[1,2]] + [[0,0],[0,0]] β‡’
[[1,2] + [0,0], [1,2] + [0,0]] β‡’
[[1+0,2+0], [1+0,2+0]] β‡’
[[1,2], [1,2]]
That's one way to combine things but not the only.
For Bracha, talks about inner products and outer products at the start of the talk. If you combine them into what's called the "geometric product," some things work out really nicely.

https://www.youtube.com/watch?v=60z_hpEAtD8β–Ύ

Extended to streams, the basic idea would be to combine both the reactive (existential quantification) and the synchronous (universal quantification) instead of picking between them.
g
@wtaysom could you point me to anything on streams that would help me understand the connection between reactive programming and quantification?
πŸ‘ 1