News for hackers. Stuff that matters.
Re:My favorite Erlang program (2013) by thakoppno on Thursday September 07, 2023 @12:40AM (#37414828)
> One critical difference is that in Erlang, processes can run on remote machines, seamlessly.

Is there a concise way to explain how Erlang achieves this property?

Re:My favorite Erlang program (2013) by querulous on Thursday September 07, 2023 @01:04AM (#37414952)
it's not as mysterious as it sounds. every data structure (including modules and anonymous functions) has a binary serialization and every erlang vm is also an rpc server that can receive arbitrary data -- including whole programs -- and execute them. your vm of course needs to know about the remote vms to do so but that's where the rudimentary clustering mechanism in erlang comes into play
Re:My favorite Erlang program (2013) by thomasfortes on Thursday September 07, 2023 @01:13AM (#37414991)
Also no shared memory in processes and they all communicate strictly through message passing, so running a piece of code in the local node, in another node in the same machine or in a node on the other side of the planet is a matter of telling which pid you want to send the message to, the BEAM will figure out how to send the message to the correct place in the cluster and your program will be none the wiser.
Re:My favorite Erlang program (2013) by rramadass on Thursday September 07, 2023 @01:44AM (#37415159)
You can find all the details about Erlang internals in The BEAM book : https://blog.stenmans.org/theBeamBook/
Re:My favorite Erlang program (2013) by coldtea on Thursday September 07, 2023 @06:11AM (#37416836)
It's basically a distributed RPC system. Your call is a message.