drdaeman
6 hours ago
One niche feature of Erlang that I love is live module upgrades, particularly via gen_server's code_change/3 callback. It's a neat little trick that seems to be rarely used in practice, but every single time I've used it I just loved how everything simply clicked together, providing zero disruption with nearly minimal effort (for simple state upgrades or downgrades).
I wonder if it's supported with Gleam and/or gleam_otp? Don't see it in the docs.
sbrother
6 hours ago
Do you know the current status of gleam_otp? I’ve been in the erlang (and more recently elixir) world for a long time and am quite excited about gleam, but when I looked at it early on it didn’t seem to have a great solution for OTP. Can I write genservers in gleam now, and can they run as part of an elixir/erlang application/supervision tree?
e3bc54b2
3 hours ago
Elixir directly uses OTP because it is a dynamically typed language. Gleam folks concluded that OTP isn't really designed with static types in mind, and so set out to build their own version of OTP[0]. It is still early days, and lot of stuff is remaining, but what is already there is pretty good.