News for hackers. Stuff that matters.
Re:Gleam v1.9.0 Released by sodapopcan on Sunday March 09, 2025 @07:51PM (#43315211)
> all three languages implement OTP in "user land" rather than being part of the language

I understand that, but why then is OTP then limited on Gleam? Is interop to Erlang different than it is in Elixir? Elixir doesn't offer Elixir versions of a *lot* of OTP, but its Erlang interop feels quite natural (though not seamless). Can you just farm out to Erlang in Gleam? Does Gleam's static typing hinder this at all? Of course I can look this up for myself, but figured I'd asked here for the benefit of others since you're the author of Gleam :)

Re:Gleam v1.9.0 Released by lpil on Sunday March 09, 2025 @07:57PM (#43315247)
It’s not limited in Gleam. All existing Erlang and Elixir OTP modules are usable in Gleam, and there’s also an additional set of Gleam OTP modules which provide type safety guarantees for a subset of OTP functionality.
Re:Gleam v1.9.0 Released by dqv on Monday March 10, 2025 @02:06AM (#43317431)
I think what they mean that the Gleam OTP implementation has some caveats - the two that jump out at me is not supporting named processes and not supporting all OTP system messages. Named processes, though, could be implemented like Elixir's Registry, but gleamically. Something that takes a type and returns a PID. Then the process gets named with a via-tuple that calls Gleam's registry.
Re:Gleam v1.9.0 Released by lpil on Monday March 10, 2025 @05:13AM (#43318376)
Aye, but this is the same as Elixir; it doesn't have full support for OTP and you are expected to use Erlang modules when you want the rest.

RE named processes, that's coming in the next release, and there's already multiple registry modules implemented in Gleam, including one funded by the Erlang Ecosystem Foundation.

Re:Gleam v1.9.0 Released by sodapopcan on Monday March 10, 2025 @10:04AM (#43320772)
> Aye, but this is the same as Elixir; it doesn't have full support for OTP and you are expected to use Erlang modules when you want the rest.

Ya that's what I was asking about, mostly the interop. But I can just look it up :). Thanks, Louis!

Re:Gleam v1.9.0 Released by dqv on Monday March 10, 2025 @11:49AM (#43321846)
Didn't even think to check for registry modules. The impression I got from the Gleam OTP readme is "can't use this yet", but that was overly pessimistic of me. I really need to give it a try in my next foray out of my comfort zone.
Re:Gleam v1.9.0 Released by lpil on Monday March 10, 2025 @01:09PM (#43322635)
It’s certainly ready for use! The HTTP server made with it is used in production and was the fastest server available on the BEAM for some time, though Elixir’s Bandit has overtaken since then.