6 ms·
Gleam 1.2.0 release – Fault tolerant Gleam
- deleted 2y ago[deleted]
- tombert 2y agoI've never heard of Gleam. Out of curiosity, what does it buy you over something like Elixir? Or rather, why do people prefer it over Elixir (or vanilla Erlang or Joxa or LFE)? ETA: I'm an idiot, I didn't see the "type safe" word on there. That is something worth considering.
- abrookewood 2y agoAlso worth remembering that Elixir is now a 'gradually typed system': https://news.ycombinator.com/item?id=38914407 https://news.ycombinator.com/item?id=38914407
- williamdclt 2y agoI don't know what José meant by "officially", but as far as I could see it's still not something that can be actually used. I read it'd be available in 1.17.0 which still isn't out. I found the comms around typing very confusing, it took me an hour to figure out "is there some damn typing in Elixir or is there not??"
- gregors 2y agoCompletely agree. I think they were just excited to make progress but it's not out for anyone to use. I was definitely confused by the comms.
- mtndew4brkfst 2y ago1.17 is in release candidate as of last week, but keeping your expectations moderate is definitely still advisable.
- andypants 2y agoThe RC for 1.17 is out, and the notes will tell you what type checks are included: https://github.com/elixir-lang/elixir/releases/tag/v1.17.0-rc.0 https://github.com/elixir-lang/elixir/releases/tag/v1.17.0-r...
- guims767 2y agoIt advertises itself as having a "familiar and modern" syntax where Elixir has a more ruby-like one.
- madeofpalk 2y agoThis article does the one great thing - the first setence of this announcement post tells you what Gleam actually is. Other projects should take note. Fly's posts do a great job of this also https://fly.io/blog/skip-the-api/ https://fly.io/blog/skip-the-api/ Edit: lol - I just saw on the homepage that Fly sponsors Gleam.
- weatherlight 2y agoIt's type safe, it's important to note that its type system is a Hindley–Milner type system. Same type system family as OCaml, Haskell, Standard ML etc. Its syntax is heavily inspired by Rust. whereas Elixir's syntax is inspired by Ruby and Erlang's inspired by prolog. https://en.wikipedia.org/wiki/Hindley–Milner_type_system https://en.wikipedia.org/wiki/Hindley–Milner_type_system
- 2wrist 2y agoClass! It’s a lovely language and a nice community. Love to see it make progress.
- OtomotO 2y agoI've been experimenting with gleam the last couple of days. Not sure whether I will stick with it or leptos/axum or leptos/salvo.rs but I find it very pleasing to work with and the community is super nice!
- _xivi 2y agoRelated: Gleam: a type safe language on the Erlang VM - https://news.ycombinator.com/item?id=38183454 https://news.ycombinator.com/item?id=38183454 - Nov 2023 (242 comments) Gleam: A statically typed language for the Erlang VM - https://news.ycombinator.com/item?id=22902462 https://news.ycombinator.com/item?id=22902462 - Apr 2020 (109 comments) Gleam 0.15 - https://news.ycombinator.com/item?id=27061500 https://news.ycombinator.com/item?id=27061500 - May 2021 (78 comments)
- oDot 2y agoI rewrote large parts of my webapp, Nestful[0], in Gleam. It's truly a joy to use and the community is very nice. Some features are still missing (e.g, reflection), but I do agree, as a user, with the focus they're putting on the developer experience, as evident is this release. If anyone else has a Vue application they want to dabble with Gleam in, do check out vleam[1]. [0] https://nestful.app https://nestful.app [1] https://github.com/vleam/vleam https://github.com/vleam/vleam
- crowdhailer 2y agoWhat would you like to achieve with reflection? I know there a few niceties around having them but I don't find myself missing reflection.
- brianzelip 2y agoHere's an informing podcast episode with Gleam's maintainer, https://changelog.com/podcast/588 https://changelog.com/podcast/588.
- brabel 2y agoAmazing how Gleam is moving forward. It seems it's now pretty mature and with great tooling support?! Is it fair to call Gleam an Erlang with modern syntax and a HM type system? It seems it can also compile to JS (not just Erlang's Beam VM) - is the JS target as well supported? Is performance just the same as Erlang (when compiled to Beam) or there's differences? Why would someone use Beam instead of Elixir (they now have optional types - not sure how well those work though)? Is there really demand for more than one modern language on top of Erlang's VM?
- hayleighdotdev 2y ago> Is it fair to call Gleam an Erlang with modern syntax and a HM type system? Kinda. There's a fair amount similar but things like message passing are implemented as a library in gleam [0] rather than being a part of the core language, so you might say the big things that make erlang _erlang_ are not part of Gleam directly. > is the JS target as well supported? The experience is pretty good, yeah! The compiler can emit typescript declarations, there's a vite plugin for gleam, I maintain a frontend framework written in gleam and it's all grand. > Is performance just the same as Erlang (when compiled to Beam) or there's differences? That's right, perf is the same. > Why would someone use Gleam instead of Elixir (they now have optional types - not sure how well those work though)? Is there really demand for more than one modern language on top of Erlang's VM? Few reasons. Elixir's type system work is very much Work In Progress and could be a long time before we get something "finished". Also the semantics and approach have quite different designs: I'd guess folks that like the gradual type experience Elixir is pushing would not like Gleam's type system and vice versa. There's certainly room for us both on the BEAM (and we do interoperate too!) [0]: https://hexdocs.pm/gleam_erlang/ https://hexdocs.pm/gleam_erlang/
- spinningslate 2y ago> I maintain a frontend framework written in gleam and it's all grand For anyone interested, that framework is Lustre[0]. It looks interesting: An Elm-inspired approach to SPAs on the front end, compiling Gleam to javascript. Back end also in Gleam but compiled to Erlang. Haven't tried it yet but on the list. Kudos, @hayleighdotdev, for putting something that expansive together in a pretty short period of time. [0]: https://hexdocs.pm/lustre/guide/01-quickstart.html https://hexdocs.pm/lustre/guide/01-quickstart.html
- gdsdfe 2y agoThat actually looks like an interesting language, I wonder if it's easy to target wasm with Gleam !?
- avsteele 2y agoInteresting language. Great web page. I find it off-putting to have politics as the third thing on the home page though. Makes me think there is going to be a scissor that cuts the community apart at some point. ("As a Gleam community, we need to have a position on Israel-Palestine!")
- SwiftyBug 2y agoActually I think this is pretty smart. This will deter people who disagree with those values to even participating in the community.
- boxed 2y agoHow about just getting the work done?
- heeton 2y agoIt's somewhat naive to think that politics and life are not intertwined. There is no "getting the work done" without a huge amount of hidden politics. Bravo to this community for being explicit about it.
- boxed 2y agoCalling your political opponents, or even people on the fence, "nazis" is a bit much though.
- deleted 2y ago[deleted]
- Morzaram 2y agoSeems like you're reading into this. They literally say " As a community, we want to be friendly too. People from around the world, of all backgrounds, genders, and experience levels are welcome and respected equally. See our community code of conduct for more. Black lives matter. Trans rights are human rights. No nazi bullsh*t. " Considering quite a few contributors in the Gleam community are LGBTQ+ it's seems justified that they want to stand for their contributors rights and safety.
- SwiftyBug 2y agoI'm jumping in the Gleam wagon as soon as something like Elixir's Phoenix LiveView is available.
- hayleighdotdev 2y agoHey there, I maintain a library a called lustre [0] that does similar things to liveview. The linked docs are the API reference, but there's not currently a guide or a robust example on how to put things together (there's a bare minimum one in the repo you can find) – that'll be changing soon, I was just giving a talk about this at Lambda Days ^.^ In the interest of fairness, there's also sprocket [1] which leans much heavier into thing that you might also what a check out. [0]: https://hexdocs.pm/lustre/lustre/server_component.html https://hexdocs.pm/lustre/lustre/server_component.html [1]: https://sprocket.live https://sprocket.live
- SwiftyBug 2y agoThat's seriously cool! I'm going to try and give this a test this weekend.
- heeton 2y agoI've been thinking of creating an app with a type-safe core in gleam, and then using elixir/phoenix for its more mature web / live interfaces.
- ModernMech 2y agoI thought that since Gleam is build for BEAM, it should be good at concurrency? I thought that was its whole angle, but there's not a mention of concurrency at all in the docs, it's not built into the standard library, and apparently this is all they offer: https://hexdocs.pm/gleam_otp/ https://hexdocs.pm/gleam_otp/ If Gleam is good at concurrency why aren't they telling anyone about it, and if it's not good at concurrency what even is the point of it?
- mcintyre1994 2y agoTheir home page says it is: > Running on the battle-tested Erlang virtual machine that powers planet-scale systems such as WhatsApp and Ericsson, Gleam is ready for workloads of any size. > Thanks to a multi-core actor based concurrency system that can run millions of concurrent tasks, fast immutable data structures, and a concurrent garbage collector that never stops the world, your service can scale and stay lightning fast with ease. It's accompanied by a code example with 200,000 async tasks being spawned.
- ModernMech 2y agoIndeed, yes that bit on the homepage is what caused me to write what I did. I ran that code, but it does not run; it tells me that "task" is not defined. I read the "language tour", but it wasn't covered. So I went to the standard library to find out what "task" is, but it's not there. I went to the docs to learn what "async" is, but it's not mentioned. I went to the "gleam for rust users" doc because I was hoping it would give me a "gleam vs rust" concurrency primer, but no luck. Based on this, I feel that concurrency is maybe an afterthought in Gleam, which surprised me, because that's not what I had expected seeing as it runs on BEAM.
- mcintyre1994 2y agoGot you. I guess it comes from `gleam/otp/task` in the link you posted, the API matches. But it does seem to be missing from eg the language walkthrough. If I had to guess it'll be because it's a light wrapper around Beam/OTP primitives, and the initial audience for Gleam was probably developers already using the Beam with eg Elixir and familiar with its concurrency already. It definitely looks like it's expanded beyond that though.
- cosmic_quanta 2y agoFault-tolerant compilation is very cool. The Haskell ecosystem is moving towards it as well: https://github.com/haskellfoundation/tech-proposals/pull/63 https://github.com/haskellfoundation/tech-proposals/pull/63