News for hackers. Stuff that matters.
Re:A few notes on message passing by chrisseaton on Sunday March 21, 2021 @07:58PM (#26535270)
> And I don't think erlang has a shared mutable states

An actor has state. It's mutable - each message can modify it. It's shared - two process working with a shared actor share that state. To me, that's shared mutable state. It causes classic race conditions.

(I know this is an unpopular opinion, and somewhat deliberately contrary and provocative, but ultimately truthful.)

Re:A few notes on message passing by dnautics on Sunday March 21, 2021 @10:06PM (#26536091)
While this is technically "shared state" (in the same way that a "database", or "the console/log output" is "shared state"), it's not a problem in the classical data race sense. And because you're forced to think about it in an explicit fashion, it's generally not a problem for the working programmer in the BEAM vm.

Also note that erlang is not a pure actor system. It is relatively hard to accidentally write a deadlock in erlang with OTP. In about 3 years of programming elixir I've only written a deadlock three or four times (and caught them all in tests). Even so if I had pushed it to prod, it would have timed out certain operations that would have triggered dynamic restart of the relevant processes.

Re:A few notes on message passing by ramy_d on Sunday March 21, 2021 @08:16PM (#26535378)

  two process working with a shared actor share that state
I think this is where I disagree. They may share an actor but the state of the actor belongs to the actor. To say they share it implies they can always change it independently but that's not the case. Actors don't trample on each other's internal states. For example a simple mutex semaphore pattern fixes your race condition.
Re:A few notes on message passing by lmm on Sunday March 21, 2021 @10:00PM (#26536051)
> They may share an actor but the state of the actor belongs to the actor. To say they share it implies they can always change it independently but that's not the case. Actors don't trample on each other's internal states. For example a simple mutex semaphore pattern fixes your race condition.

The actor's state is shared in the sense that both processes can change it in ways that are visible to each other. The actor can control access to it, but unless the actor never changes state in response to messages (in which case why bother with actors at all?) there's still something that changes. Constrained state is still state.

Re:A few notes on message passing by ProfHewitt on Sunday March 21, 2021 @08:15PM (#26535372)
For many practical applications, deterministic parallelism is hundreds of times slower than indeterminate computation.

For a proof, see the following article:

"Epistemology Cyberattacks" https://papers.ssrn.com/abstract=3603021

[dead]
Re:A few notes on message passing by ProfHewitt on Sunday March 21, 2021 @09:59PM (#26536048)
Current auto generators cannot yet deal with such esoteric content. So it must be real ;-)