4 ms·
Learn OTP with Gleam
- blakesterz 3y agoMaybe a dumb question, but, is OTP "Open Telecom Platform" in this case?
- packetlost 3y agoYes, Gleam runs on the BEAM and has bindings for that OTP
- felixyz 3y agoGleam reimplements (a large portion of) OTP and is interoperable with Erlang/Elixir code that uses OTP, rather than providing bindings.
- mirages 3y agoYep clearly not obvious, I was also pondering if One Time Password. Would be a rare case where editoralizing the title could be handy
- userbinator 3y agoNot familiar with this area but also thought it was another tutorial about making an OTP authenticator.
- jeltz 3y agoIf I had not know that Gleam was built on top of Beam I would have had no idea which OTP was referred to.
- thiago_fm 3y agoI like Gleam over Javascript, but Elixir seems much more expressive to make use of OTP
- __jonas 3y agoHm, see I like OTP and Elixir is nice, but I feel like the lack of types is holding me back a bit. Could you elaborate on how you find Elixir more expressive here?
- cess11 3y agoElixir has other ways to express constraints, e.g. pattern matching and guards. I can't judge if it's equivalent in principle to a type system like Gleam's but in practice I find it rather easy to work with and solve issues I use types for in e.g. Java.
- giraffe_lady 3y agoIt's not quite equivalent but I believe it's the basis of the type system being developed for erlang so definitely contains a lot of the same information.
- asplake 3y agoSo pleased to see this. Had fun playing with the language but at the time learning OTP seemed a big ask
- cess11 3y agoPlaying with the process 'primitives' is a good introduction, i.e. spawn, send, receive, self. Those are enough to get started with processes, including setting up two-way connections by sending local PID with the self function so the spawn:ed process knows where to send responses. GenServer/gen_server is more or less a convenience wrapper around those, that makes more complicated processes easier to design but harder to get started with.
- olakease 3y agoModern type system over BEAM sounds great but unfortunately OTP is still not 100% supported https://github.com/gleam-lang/otp?tab=readme-ov-file#limitations-and-known-issues https://github.com/gleam-lang/otp?tab=readme-ov-file#limitat...
- lpil 3y agoOTP will never be 100% supported, it's an application framework for a dynamically typed language and as such much of it doesn't make sense in a statically typed language.
- deleted 3y ago[deleted]