Comment

Comment by hasanhaja

Thank you so much for the write up! I've been avoiding processes for some reason while I've been learning Elixir and this post pushed me to play with it today. And I started in Erlang and then managed to translate it to Elixir successfully!

I ran into this issue and I'm not sure if it's just a me thing.

When sending the message from the Pong REPL, the following didn't work for me:

```erl {ping, 'ping@localhost'} ! {pong, self()}. ```

When I checked, the PID of `self()` is different to the PID of the registered `pong` process. I needed to change it to the following:

```erl {ping, 'ping@localhost'} ! {pong, whereis(pong)}. ```

This sends the correct PID to the Ping process and we have an infinite loop counting up.

parent hasanhaja 11 months ago

No comments yet

Be the first to share your thoughts.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton