Skip to content(if available)orjump to list(if available)

Gleam v1.7

Gleam v1.7

8 comments

·January 10, 2025

threatofrain

Anyone have some interesting things they've built with Gleam?

Ndymium

I'm a master of half finished projects, so here's one that's half finished and one that's actually published and has a half finished user's guide: a PWA client for the iBroadcast music service [0] and a static blog generator [1] that I use to generate my blog [2].

Since all of my free time programming nowadays is in Gleam, I hope to have better examples for you in the future. :)

[0] https://git.ahlcode.fi/nicd/elektrofoni

[1] https://hexdocs.pm/scriptorium/index.html

[2] https://blog.nytsoi.net

widdershins

I've built several personal projects that I'm not really ready to share widely:

An AI tourguide which presents the nearest geotagged Wikipedia pages to the user's location and then produces an entertaining summary of your chosen topic on request. It's just a simple mashup of Wikipedia, MaxBox and OpenAI APIs.

A "leaving the house" dashboard for my wife. It's displayed on a tablet near her mirror, and shows weather and live public transport information to reduce the "I missed the bus and I didn't realize it's raining" disasters that get her day off to a bad start.

I've had a lot of fun making these with Gleam. It has the "if it compiles, it usually works" factor that people love about Rust, with none of the complicated borrow-checking rules. It's very simple - once you're up and running, there's not a lot more to learn about the language and you can just focus on modelling your problem.

lawn

I'm not sure that I like choice to generate decoder code instead of introducing a macro system that can be used to generate the code behind the scenes.

Consider what would happen if you have a larger json object you want to decode (which is often the case). This would require a substantial amount of code that you later would have to read through (being vary of minor changes).

In contrast to Rust's approach where you just have a few notations you can quickly scan through and identify anything unusual.

This is honestly a major turnoff for me with Gleam and doesn't make me want to use the language for anything where I need to handle json (despite all the other things I appreciate about the language).

norman784

I like comptime concept over macros, because on Rust you need to annotate a type with the macro derive or manually implement the encoder or decoder, while in Zig for example, (I'm not experienced with Zig, but it seems that is possible to do this) it should be possible to have the encode and decode method to implement the logic to do the work, that means that the boilerplate is generated only when needed and also should work for third party types where you don't have control over.

gleamboi

[dead]