Live data from Hacker News

Why programming languages matter [video]

youtube.com

11–20 of 129 posts

Re: Why programming languages matter [video]

#11
post #6
post #4

Very little innovation in programming languages has happened regarding new realities at the hardware level especially transition from serial to parallel execution.

Does anyone have any good counterpoints to this? From my, naive, perspective, this seems to be relatively true. I've always assumed that, by now, I would be able to write code, in a semi mainstream language, and it would be made somewhat parallel, by the compiler. No need for threads, or me thinking of it. There's projects like https://polly.llvm.org , but I guess I assumed there would be more progress through the de…

Array languages, such as APL and others, tend to be easily parallisable given primitives tend to focus on intent and how to transform data rather than imperative operations.

Some of the SIMD operations feel very reminicent of APL primitives

Re: Why programming languages matter [video]

#13
post #5
post #3

oddly, there are very few job positions to work in things related to programming languages.

I feel like every major company is hiring for AI compiler engineers right now (based on my inbox at least). May not be directly related to general 'programming languages', but my take, as someone in the industry, is that all the PL people are working on this right now.

same here, some companies are hiring a compiler team for AI in fact.

I was told Rice and UIUC provide the best compiler program, though not necessarily AI related, should be similar though.

Re: Why programming languages matter [video]

#14
post #4

Very little innovation in programming languages has happened regarding new realities at the hardware level especially transition from serial to parallel execution.

Except for all the research around functional programming?

This is like when I hear people claim that physics has not advanced in the last 50-70 years.

Re: Why programming languages matter [video]

#15
post #14
post #4

Very little innovation in programming languages has happened regarding new realities at the hardware level especially transition from serial to parallel execution.

Except for all the research around functional programming? This is like when I hear people claim that physics has not advanced in the last 50-70 years.

Functional programming is not based off how hardware is implemented. Serial execution of instructions and mutating chunks of memory at a time are all core parts of how the hardware works which aren't functional. Doing graph reduction and making tons of copies will be slow.

Re: Why programming languages matter [video]

#16
post #6
post #4

Very little innovation in programming languages has happened regarding new realities at the hardware level especially transition from serial to parallel execution.

Does anyone have any good counterpoints to this? From my, naive, perspective, this seems to be relatively true. I've always assumed that, by now, I would be able to write code, in a semi mainstream language, and it would be made somewhat parallel, by the compiler. No need for threads, or me thinking of it. There's projects like https://polly.llvm.org , but I guess I assumed there would be more progress through the de…

It's not totally clear what you're looking for.

As you noted, polyhedral compilers work on a pretty restricted subset of programs, but are fairly impressive in what they do. There has been research on distributed code generation [1] as well as GPUs [2]. While there has been work on generalizing the model [3], I think the amount of parallelization that a compiler can do is still very limited by its ability to analyze the code (which is to say, highly restricted).

Then you've got a large class of data-parallel-ish constructs like Rayon [4] as well as executors which may work their way into the C++ standard at some point [5]. How much safety these provide depends greatly on the underlying language. Generally speaking, the constructs here are usually pretty restricted (think parallel map), but often you can write more-or-less arbitrary code inside, which is often not the case in the polyhedral compilers.

If you don't care so much about safety and just want access to every parallel programming construct under the sun, Chapel [6] may be interesting to you. There is no attempt here, as best I can tell, to offer any sort of safety guarantees, but maybe that's fine.

On the other end of the spectrum you have languages like Pony [7] that do very much care about safety, but (I assume, haven't looked deeply) this comes with tradeoffs in expressiveness.

(I work in this area too [8].)

Overall, there are some very stringent tradeoffs involved in parallelizing code and while it certainly has been and continues to be a very active area of research, there's only so much you can do to tackle fundamentally intractable analysis problems that pop up in the area of program parallelization.

[1]: https://www.csa.iisc.ac.in/~udayb/publications/uday-sc13.pdf

[2]: https://arxiv.org/pdf/1804.10694.pdf

[3]: https://inria.hal.science/file/index/docid/551087/filename/B...

[4]: https://docs.rs/rayon/latest/rayon/

[5]: https://github.com/NVIDIA/stdexec (disclaimer: I did a quick Google search on this, not 100% sure this is the best link)

[6]: https://chapel-lang.org/

[7]: https://www.ponylang.io/

[8]: https://regent-lang.org/

Re: Why programming languages matter [video]

#17
post #14

Earlier quoted context omitted.

Except for all the research around functional programming? This is like when I hear people claim that physics has not advanced in the last 50-70 years.

Functional programming is not based off how hardware is implemented. Serial execution of instructions and mutating chunks of memory at a time are all core parts of how the hardware works which aren't functional. Doing graph reduction and making tons of copies will be slow.

Hardware was for a very long time a limiting factor in the practicality of FP. For most general applications, today this is a relative non-issue.

FP is also particularly well suited for cloud computing and parallel computation.

Re: Why programming languages matter [video]

#18
post #17

Earlier quoted context omitted.

Functional programming is not based off how hardware is implemented. Serial execution of instructions and mutating chunks of memory at a time are all core parts of how the hardware works which aren't functional. Doing graph reduction and making tons of copies will be slow.

Hardware was for a very long time a limiting factor in the practicality of FP. For most general applications, today this is a relative non-issue. FP is also particularly well suited for cloud computing and parallel computation.

The parent comment was talking about aligning programming languages with the hardware. I am not commenting about the viablity of those languages, but rather that if your goal is to write the most performant code by understanding the strengths and weaknesses of the hardware than using fp concepts is not the way to do it.

Re: Why programming languages matter [video]

#19
post #17

Earlier quoted context omitted.

Functional programming is not based off how hardware is implemented. Serial execution of instructions and mutating chunks of memory at a time are all core parts of how the hardware works which aren't functional. Doing graph reduction and making tons of copies will be slow.

Hardware was for a very long time a limiting factor in the practicality of FP. For most general applications, today this is a relative non-issue. FP is also particularly well suited for cloud computing and parallel computation.

"FP" camps tend to come in two flavors: "I'm a mathematician writing a computer program, and all problems will be made to look like math problems even if it means the program becomes an inscrutable mess of types and dense syntax" and "functional-ish idioms are included". The latter is useful, sometimes, for cloud computing and parallel computation; the former tends to have too many problems (slow build, slow execution, poor jargon laden syntax, etc.) to be very useful outside of academia.

I am (perhaps obviously) biased, here, but I tend to just roll my eyes whenever any of my colleagues suggests we should use functional programming to solve a problem. There are actually very few real-world use cases where it's objectively better.

Re: Why programming languages matter [video]

#20
post #4

Very little innovation in programming languages has happened regarding new realities at the hardware level especially transition from serial to parallel execution.

Some relevant PL research

STM: https://cs.brown.edu/~mph/HerlihyM93/herlihy93transactional....

Region based memory management: https://en.wikipedia.org/wiki/Region-based_memory_management

Rust lifetimes, originally from Cyclone: https://en.wikipedia.org/wiki/Cyclone_%28programming_languag...

Mutable value semantics: https://arxiv.org/pdf/2106.12678.pdf

Post reply on HN