News for hackers. Stuff that matters.

Ask HN: Example of a 'non-scalar' programming language?

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 "Scalar" programming languages are limited because the compiler cannot easily translate them into parallel machine instructions [1] among other reasons.

My first reaction was to see if I can find an example of a "non-scalar" programming language. Wikipedia has a page for the paradigm of Array Programming [2] but I'm not sure If that is what Wilson was implying. (The wiki page mentions languages like APL, which was featured recently through arcfide's parallel compiler work [3].)

My intention is to learn more about programming languages that actually fit modern CPU machine architectures. I was beginning to believe that C's machine-model was still relevant for CPU cache dynamics, but now with what Wilson says about it being limited by its "Scalar-ness" I'm beginning to doubt it again. (Maybe someone could convince me that OpenMP or OpenCL extends C's parallel potential, but what I'm really after is something that was conceived from the ground up to work beautifully atop modern CPU's or at least within a Heterogeneous System Architecture (HSA) .)

Many Thanks and Regards!

[1] https://youtu.be/_9mzmvhwMqw?t=27m

[2] https://en.wikipedia.org/wiki/Array_programming

[3] https://news.ycombinator.com/item?id=13797797

( 9 comments | 3 points | on HN )
Re:Ask HN: Example of a 'non-scalar' programming language? by Athas on Tuesday March 14, 2017 @03:41PM (#13870801)
Apologies for tooting my own horn, but I have made a language that compiles to vectorised code: 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.

Re:Ask HN: Example of a 'non-scalar' programming language? by zengid on Tuesday March 14, 2017 @04:03PM (#13870983)
Thanks for sharing!
Re:Ask HN: Example of a 'non-scalar' programming language? by mindcrime on Tuesday March 14, 2017 @10:57AM (#13867953)
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
Re:Ask HN: Example of a 'non-scalar' programming language? by zengid on Tuesday March 14, 2017 @02:18PM (#13870014)
So there might be room for improving R?
Re:Ask HN: Example of a 'non-scalar' programming language? by brandonbloom on Wednesday March 15, 2017 @12:05AM (#13873719)
It's not easy, but it's possible. Check out 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...

Re:Ask HN: Example of a 'non-scalar' programming language? by zengid on Tuesday March 14, 2017 @02:57PM (#13870405)
Thanks for the answers, folks. Maybe I was looking for Julia[1]?

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

Re:Ask HN: Example of a 'non-scalar' programming language? by PaulHoule on Tuesday March 14, 2017 @10:11AM (#13867599)
Matlab. Tensorflow.
Re:Ask HN: Example of a 'non-scalar' programming language? by cleum on Tuesday March 14, 2017 @12:21PM (#13868852)
kdb
Re:Ask HN: Example of a 'non-scalar' programming language? by zengid on Tuesday March 14, 2017 @02:17PM (#13870004)
Thanks! I found an interesting discussion here: https://news.ycombinator.com/item?id=11561573