One of the great things about Erlang is that it's got distributed systems built into it at a fundamental level. This is one of the reasons that people say the best feature of Elixir is Erlang. I'm going to show you how to experiment with this.
When you start an iex session, you can give it a name. Open up two terminals side by side. In one of them, type
iex --name "firstname.lastname@example.org". In the other, type
iex --name "email@example.com". You've seen sending messages to processes before. The shell in iex is just a process as well, so you can send it messages. Since we don't know each shell's pid just yet, let's register one of them as a local named process. Do this in the foo shell, with: ```elixir :erlang.register(:shell, self) ``` This registers this pid locally so that it can be referenced with the atom:shell
. Now, we're going to send the pid from the bar shell into this shell, so let's set up a receive block to capture whatever...
To see the complete version of this and more awesome articles become a superuser or login