Live data from Hacker News

The free lunch is over: a fundamental turn toward concurrency in software (2005)

gotw.ca

91–100 of 101 posts

Re: The free lunch is over: a fundamental turn toward concurrency in software (2005)

#91
post #86
post #85

Earlier quoted context omitted.

> I am surprised it hasn't caught on better in the multi-core world, it being older than even Erlang. Because multicore support in Ocaml has been "just a couple years away" for many years now.

Occam, not Ocaml. They are two different languages. Although I have no idea if Occam can utilize multiple cores.

Oops misread that.

Re: The free lunch is over: a fundamental turn toward concurrency in software (2005)

#92
post #13

People having been saying this for decades and while it's true, concurrency is still widely regarded as 'too hard'. I'm not sure if this is justified (e.g. concurrency is inherently too hard to be viable), or due to the lack of tooling/conventions/education.

The rise of async programming in backend web dev is making some people even more confused about models. For instance, many senior engineers out there don't understand the difference between sync multithreaded and async single threaded.

I kind doubt what I know, so looked for a nice SO link for those who don't know the difference :)

https://stackoverflow.com/a/34681101

Re: The free lunch is over: a fundamental turn toward concurrency in software (2005)

#93

Earlier quoted context omitted.

> no programs needed changing at all to get the full advantage of all the cores (barring some special cases) Some programs just don't have any available parallelism in them - no matter how many processes you split them up into. You need to build parallel algorithms and data structures. That's still often a research-level topic. Erlang's not going to magic parallelism out of thin air in a program that doesn't have any…

Kind of strawmanning here, no? Obviously sequential tasks are run sequentially. The OP isn't saying "magic" happens. Just, Erlang was written from the beginning to encourage parallelized code. Its whole programming model is around that. Unlike pretty much every language it was contemporary with, which assumed that the default was a single unit of execution (and that code running in parallel was the exception). Think…

PSA: Great discussion on Concurrency vs. Parallelism starting here; everybody should read the chain starting here.

Re: The free lunch is over: a fundamental turn toward concurrency in software (2005)

#94
post #13

People having been saying this for decades and while it's true, concurrency is still widely regarded as 'too hard'. I'm not sure if this is justified (e.g. concurrency is inherently too hard to be viable), or due to the lack of tooling/conventions/education.

The rise of async programming in backend web dev is making some people even more confused about models. For instance, many senior engineers out there don't understand the difference between sync multithreaded and async single threaded.

https://stackoverflow.com/questions/51007636/how-javascript-...

Re: The free lunch is over: a fundamental turn toward concurrency in software (2005)

#95
post #36
post #31

Earlier quoted context omitted.

Shared memory spaces. Your "slick tooling" is one of the hacks I mentioned that history will forget, by the standard of "if a new language emerged that tried to call that 'concurrency' nobody would take it seriously". I should say that "hack" here isn't necessarily a perjorative. There are reasons for communities to create and deploy those. There are plenty of cases where existing code can be leveraged to work better…

You're saying that shared memory concurrency is the future? I think you've got it completely wrong. Shared memory concurrency is the past. It was thought to be a good idea in the 80s and 90s, but we now know that it's both hard to program, and that it works poorly with highly-parallel, high-performance hardware. In the future, we'll see more and more programming systems which don't provide shared memory concurrency a…

Shared memory space, not necessarily shared memory. I referenced Erlang & Pony after all so it's not like I'm unaware of the issues here. You don't need a full OS process boundary to separate things; it is a very crude and blunt instrument and there are much better options available. Separation is nice but paying to cross OS boundaries with every message kills performance dead. A full OS process boundary between all concurrently-running threads would be insane overkill for a Rust, Erlang or Pony program, and in practice, with best practices and the use of some tooling, even for Go, even if it is just old-fashioned shared-memory at its core.

Re: The free lunch is over: a fundamental turn toward concurrency in software (2005)

#96
post #95
post #36

Earlier quoted context omitted.

You're saying that shared memory concurrency is the future? I think you've got it completely wrong. Shared memory concurrency is the past. It was thought to be a good idea in the 80s and 90s, but we now know that it's both hard to program, and that it works poorly with highly-parallel, high-performance hardware. In the future, we'll see more and more programming systems which don't provide shared memory concurrency a…

Shared memory space , not necessarily shared memory. I referenced Erlang & Pony after all so it's not like I'm unaware of the issues here. You don't need a full OS process boundary to separate things; it is a very crude and blunt instrument and there are much better options available. Separation is nice but paying to cross OS boundaries with every message kills performance dead. A full OS process boundary between all…

"Memory space" is usually called "address space". And I think you're confused - context switching is expensive but there's no context switching involved when you're running in parallel across N cores. We're talking about parallelism, not concurrency.

Re: The free lunch is over: a fundamental turn toward concurrency in software (2005)

#97
post #18

One thing I’d love to do is a Smalltalk implementation where every message is processed in a separate thread. Could be a nice educational tool, as well as a great excuse to push workstations with hundreds of cores.

Isn't that just erlang?

Snarkiness aside, that would be interesting. Not just as an educational tool, but it might be useful in the same way as erlang is (large, fault-tolerant, massively parallel systems). But with OOP instead of FP (Elixir attempts to be the "friendly"/more conventional version of erlang, but it is still very much a functional language).

Re: The free lunch is over: a fundamental turn toward concurrency in software (2005)

#98
post #96
post #95

Earlier quoted context omitted.

Shared memory space , not necessarily shared memory. I referenced Erlang & Pony after all so it's not like I'm unaware of the issues here. You don't need a full OS process boundary to separate things; it is a very crude and blunt instrument and there are much better options available. Separation is nice but paying to cross OS boundaries with every message kills performance dead. A full OS process boundary between all…

"Memory space" is usually called "address space". And I think you're confused - context switching is expensive but there's no context switching involved when you're running in parallel across N cores. We're talking about parallelism, not concurrency.

No, we're talking about what I'm talking about. I've started the whole thread and participated all the way down to here. I also find myself wondering if you understand what we're talking about. I know what I'm saying about terminology is a bit controversial, but the nature of what existing run time systems are doing is not. They've been doing it for decades.

But I guess we'll just have to leave it there.

Re: The free lunch is over: a fundamental turn toward concurrency in software (2005)

#99
post #18

One thing I’d love to do is a Smalltalk implementation where every message is processed in a separate thread. Could be a nice educational tool, as well as a great excuse to push workstations with hundreds of cores.

Isn't that just erlang? Snarkiness aside, that would be interesting. Not just as an educational tool, but it might be useful in the same way as erlang is (large, fault-tolerant, massively parallel systems). But with OOP instead of FP (Elixir attempts to be the "friendly"/more conventional version of erlang, but it is still very much a functional language).

The nice thing about doing a Smalltalk is that there is a colossal amount of software built on top of it. I'd love to know how much of that corpus could operate like this. I don't recall ever using locks, but I also never ran ST on a multicore machine either. It's just that the message-passing idea matches a many-core machine so well it's a shame not to play with it.

Re: The free lunch is over: a fundamental turn toward concurrency in software (2005)

#100
post #18

One thing I’d love to do is a Smalltalk implementation where every message is processed in a separate thread. Could be a nice educational tool, as well as a great excuse to push workstations with hundreds of cores.

Interesting idea. One could imagine a kind of Actor-Smalltalk where each object is actually its own "thread" (whatever that means at the VM level). The issue then becomes the asynchronous nature of the beast and how to "respond to" senders -- as you know, in current ST-80 like systems, returning from a method is the same as "responding," but this would no longer be the case.

Another idea is this: in the ST-80 VM, the only "real" thing at the OS level is SmallInteger. Everything else is a true object reference. One could imagine expanding the base integer size to 128 bits and having all references also described at that size. The reason to do this would be that IPv6 uses 128-bit addresses, and therefore we could bind object references to IP addresses at a lower level.

That aside, the fact that the Opensmalltalk VM is made inside of Smalltalk means that -- in theory -- a team could iterate to that point using the environment itself.

Post reply on HN