As discussed a couple of days ago on Discord, I thought I would have a go at adding a pid_from_dynamic function to the process module. I think this is a handy function for certain use cases, for example if you have an Erlang or Elixir process that sends its own pid in a message to a Gleam actor, and you want to reply to it using process.untyped_send.
You mentioned that you would prefer to write the decoder in Erlang, so I had a go at that - it's the first Erlang I've ever written, so apologies if there are any blunders. I wrote a couple of tests and they seem to pass, so hopefully it's ok.
This my second pull request on any project ever, so apologies if I have done anything stupid :)
As discussed a couple of days ago on Discord, I thought I would have a go at adding a
pid_from_dynamic
function to theprocess
module. I think this is a handy function for certain use cases, for example if you have an Erlang or Elixir process that sends its own pid in a message to a Gleam actor, and you want to reply to it usingprocess.untyped_send
.You mentioned that you would prefer to write the decoder in Erlang, so I had a go at that - it's the first Erlang I've ever written, so apologies if there are any blunders. I wrote a couple of tests and they seem to pass, so hopefully it's ok.
This my second pull request on any project ever, so apologies if I have done anything stupid :)