
Ask HN: Example of a 'non-scalar' programming language? - zengid
Greetings! I recently watched a talk by Sophie Wilson (of ARM fame) where she discusses the future of microprocessors. In the talk she mentions that &quot;Scalar&quot; programming languages are limited because the compiler cannot easily translate them into parallel machine instructions [1] among other reasons.<p>My first reaction was to see if I can find an example of a &quot;non-scalar&quot; programming language. Wikipedia has a page for the paradigm of Array Programming [2] but I&#x27;m not sure If that is what Wilson was implying. (The wiki page mentions languages like APL, which was featured recently through arcfide&#x27;s parallel compiler work [3].)<p>My intention is to learn more about programming languages that actually fit modern CPU machine architectures. I was beginning to believe that C&#x27;s machine-model was still relevant for CPU cache dynamics, but now with what Wilson says about it being limited by its &quot;Scalar-ness&quot; I&#x27;m beginning to doubt it again. (Maybe someone could convince me that OpenMP or OpenCL extends C&#x27;s parallel potential, but what I&#x27;m <i>really</i> after is something that was conceived from the ground up to work beautifully atop modern CPU&#x27;s or at least within a Heterogeneous System Architecture (HSA) .)<p>Many Thanks and Regards!<p>[1] https:&#x2F;&#x2F;youtu.be&#x2F;_9mzmvhwMqw?t=27m<p>[2] https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Array_programming<p>[3] https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=13797797
======
Athas
Apologies for tooting my own horn, but I have made a language that compiles to
vectorised code: [https://futhark-lang.org](https://futhark-lang.org)

You don't really need much in the way of fancy language features. If you take
a simplified functional language, the requisite compiler is not too hard to
write.

~~~
zengid
Thanks for sharing!

------
mindcrime
The closest thing that comes to mind would be languages that are vector
centric, like R or Matlab. But R isn't exactly "conceived from the ground up
to work beautifully atop modern CPU's". In fact, one of the knocks on R is
that it isn't terribly performant and it's not easy to make it scale. _shrug_

~~~
zengid
So there might be room for improving R?

~~~
brandonbloom
It's not easy, but it's possible. Check out FastR:
[https://github.com/graalvm/fastr](https://github.com/graalvm/fastr)

Here's a good video about the language and this implementation:
[http://download.oracle.com/technetwork/java/javase/community...](http://download.oracle.com/technetwork/java/javase/community/H264_1280x720/20144523.mov)

------
zengid
Thanks for the answers, folks. Maybe I was looking for Julia[1]?

[https://en.wikipedia.org/wiki/Julia_(programming_language)](https://en.wikipedia.org/wiki/Julia_\(programming_language\))

------
PaulHoule
Matlab. Tensorflow.

------
cleum
kdb

~~~
zengid
Thanks! I found an interesting discussion here:
[https://news.ycombinator.com/item?id=11561573](https://news.ycombinator.com/item?id=11561573)

