Gleam - have you used it?

If so, where/how and what do you like about it? :003:

Created by @lpil

Why Gleam?

Safe

Gleam’s powerful static type system helps find and prevent bugs at compile time, long before it reaches your users. It also serves as a productive refactoring tool, enabling programmers to confidently make large changes to unfamiliar code, quickly and with low risk.

For problems the type system can’t solve (such as your server being hit by a bolt of lightning) the Erlang virtual machine provides well tested mechanisms for gracefully handling failure.

Friendly

Hunting down bugs can be stressful so Gleam’s compiler provides clear and helpful feedback about any problems. We want to spend more time developing features and less time looking for bugs or deciphering cryptic error messages.

As a community we want to be friendly too. People of all backgrounds, genders, and experience levels are welcome and must receive equal respect. See our community code of conduct for more.

Performant

Gleam builds on top of the Erlang virtual machine, a best-in-class runtime that has enabled companies such as Discord, Ericsson, Heroku, and WhatsApp to provide low-latency services at a global scale. Gleam takes full advantage of the Erlang runtime and adds no overhead of its own, so all Gleam programs are as fast and as efficiently multi-threaded as their Erlang counterpart.

Erlang compatible

Gleam makes it easy to use code written in other BEAM languages such as Erlang, Elixir and LFE, so there’s a rich ecosystem of thousands of open source libraries for Gleam users to make use of.

In return Gleam code can be easily used by programmers of other BEAM languages, either by transparently making use of libraries written in Gleam, or by adding Gleam modules to their existing project with minimal fuss.

Features

  • Actor based multi-core concurrency
  • Algebraic data types
  • Erlang style fault tolerance
  • Fast compilation
  • Full type inference
  • Generics
  • Helpful error messages
  • Immutable data structures
  • No exceptions by default
  • No null
  • No undefined behaviour
  • Reliable package management
  • Small and consistent language design
  • Zero cost interop with Erlang, Elixir, etc
3 Likes

Yes, once or twice. I think it’s pretty good :wink:

25 Likes

You would :laughing:

I’ve long thought that until Gleam has a web framework and ecosystem that rivals Elixir & Phoenix, I’d use it for core business logic. I recently saw Application with Elixir, business logic with Gleam and I think this is a great way forward for Gleam.

4 Likes

:081:

Seriously tho, what are your favourite aspects about it Louis?

Personally I am particularly interested in how you are now able to compile to JS - that’s very cool! :sunglasses:

1 Like

For me the virtuous feature of Gleam is the focus on user experience, something we largely learnt from Elixir. It should be as easy to learn and as enjoyable to use as possible.
Programming can be hard and at times stressful, so I want Gleam to improve the day of anyone using it.

And of course, all the great properties of the BEAM apply to Gleam.

6 Likes

If gleam compile to beam files I guess you could build gleam applications on Nova and create web framework. We did this with LFE.

So maybe it is not that much work to get it running with Gleam.

4 Likes

That really really is such a big thing for a modern language!

2 Likes

I’m sure you could! This would be a fun project to explore

2 Likes

Yesterday I was forced to work on a C# project in Visual Studio and I was determined to hate it.
And while it’s really a language I do not want to use, the combination of a statically typed language and a strong IDE was really impressive. I’d love to have that for the BEAM. Gleam looks wonderful. As soon as Implement language server protocol · Issue #180 · gleam-lang/gleam · GitHub is done, I’ll definitely use it for the core/business logic. Elixir and Gleam will be a dream-team.

5 Likes

Anyone here using Gleam?

4 Likes

Some :wink:
Gleam - have you used it? (edit by mod: thread/last two posts merged into this one << :- )

4 Likes