Gleam, a statically typed language for the Erlang VM

I’m curious how well it will all go on Windows, do report back! ^.^

1 Like

Where is the Windows binary?

They can be downloaded from the releases page here: https://github.com/gleam-lang/gleam/releases

2 Likes

We’re giving Spectrum a try as a chat/forum for Gleam. Swing by and say hi! :slight_smile:

3 Likes

How does it work?

Looks a bit like a chat, a forum and twitter became a baby…

1 Like

It’s very similar to Slack except history is persisted and it’s easier to sign up. :slight_smile:

It looks so wrong for a chat…

There is no textinput at the bottom, instead its on the top, sent lines are newest top instead of bottom, A single line of text takes up about 3 to 4 cm of space, of which only a fraction actually contains relevant information…

When you send a line to the chat, there are 2 textboxes, one for subject and one for boddy…

It doesn’t feel like a chat. Perhaps I’m just too old for this modern stuff…

I’ll stick to slack, matrix, IRC, discord and other more classical approaches I think…

(Not even speaking about the fact that there seems to be no way to customise user settings)

I think you’re describing the “posts” section, which is like a forum (like discord). If you click “chat” you’ll get the IRC style chat that you’ve described :slight_smile:

Okay, that wasn’t obvious for me. I considered that a caption, and the # prefixed labels below individual rooms of the chat…

1 Like

Aye! I’m not 100% sure I like the interface yet. We’ll see how it goes

1 Like

Hey folks, I’ve written a blog post about using Gleam in an Elixir project via a Mix Compiler Task. Feedback welcome :slight_smile:

8 Likes

Hi all! Long time no speak!

The release candidate for Gleam v0.8 (0.8.0-rc1) is out. Please give it a try and let us know if you have any problems.

The changelog can be found here -> https://github.com/gleam-lang/gleam/blob/52f8826df739c3cc96ba07238021bf1130950610/CHANGELOG.md#v080-rc1---2020-04-28

Once we are happy there’s no issues (and I’ve worked out a slight problem with rebar3) I’ll be releasing the full version along with a blog post that details the changes.

Thanks all!

6 Likes

How do we then “run” the app?

I.e., I’d really like to see the minimal instructions for a Gleam Hello World for the person new to the Erlang ecosystem. I’m not sure how to begin using it.

HTML documentation can now be generated from Gleam code by running gleam build --doc.
Gleam code can be formatted the gleam format command.

Bravo! This is excellent news! Great to get this stuff early on, great work!

Using the same variable name multiple times in the same pattern will now raise an error.

Bummer. This is a very succinct way to declare equality on the beam. What’s the reason for this?

Also, you have a typo here:

Add new assert syntx for binding variables
2 Likes

It’s a rebar3 application so it is run either from the Erlang shell or by creating a release. Documentation on this will come soon, it is still early days. :slight_smile:

1 Like

We opted to go with the most common pattern used for this feature rather than the less common Erlang approach. In practice they are very similar.

Thanks for the note about the typo, it has been collected on master.

If you are more familiar with writing Elixir apps vs Erlang/rebar3 I found this to be a good writeup integrating Gleam modules into your Elixir app: Mixing Gleam & Elixir - DEV Community

Following this you can install Gleam easily using asdf then get to Gleam Hello World in a few minutes.

1 Like

Working on a small Gleam configuration library that uses TOML! https://github.com/mpope9/config

My aim is to replace parts written in Erlang with Gleam as things develop.
It uses persistent_terms over ets, which has benefits and drawbacks.

1 Like

Excellent - that’s amazing. It worked perfectly. I even got completion hints of the new Gleam function from VS Code as I worked:

4 Likes

@lpil I’m interested to play around with Gleam more. My current BEAM experience is via Elixir, Phoenix & Ecto. I don’t have a lot of intricate business logic in my app so most lines of code are either in a Phoenix controller or interacting with an Ecto schema.

I’m not sure I can easily declare a Gleam module that could work as a Phoenix module and I’m not sure if I should go about wrapping my Ecto schemas so I’m not sure where to start integrating Gleam.

I realise it is early days for Gleam and there totally doesn’t have to be an answer for any of this yet. I’m curious though where your thoughts are at. Are you interested in the community exploring close interop with Ecto & Phoenix & Plug or would you much rather leave that and explore full Gleam solutions for web frameworks and database interactions?

2 Likes