home.social

#gleam — Public Fediverse posts

Live and recent posts from across the Fediverse tagged #gleam, aggregated by home.social.

  1. ```
    // ranged.gleam

    pub opaque type Ranged { Ranged(value: Int, min: Int, max: Int }

    pub fn new(value, min, max) -> {
    Ranged(
    value: int.clamp(value, min:, max:),
    min:,
    max:,
    )
    }

    pub fn set(current: Ranged, to new: Int) -> Ranged {
    Ranged(
    value: int.clamp(
    new,
    current.min,
    current.max,
    ),
    min: current.min,
    max: current.max,
    )
    }
    ```

    1 of 2

    #gleam #gamedev #functionalprogramming

    edit: noo, my indentation :(

  2. ```
    // ranged.gleam

    pub opaque type Ranged { Ranged(value: Int, min: Int, max: Int }

    pub fn new(value, min, max) -> {
    Ranged(
    value: int.clamp(value, min:, max:),
    min:,
    max:,
    )
    }

    pub fn set(current: Ranged, to new: Int) -> Ranged {
    Ranged(
    value: int.clamp(
    new,
    current.min,
    current.max,
    ),
    min: current.min,
    max: current.max,
    )
    }
    ```

    1 of 2

    #gleam #gamedev #functionalprogramming

    edit: noo, my indentation :(

  3. ```
    // ranged.gleam

    pub opaque type Ranged { Ranged(value: Int, min: Int, max: Int }

    pub fn new(value, min, max) -> {
    Ranged(
    value: int.clamp(value, min:, max:),
    min:,
    max:,
    )
    }

    pub fn set(current: Ranged, to new: Int) -> Ranged {
    Ranged(
    value: int.clamp(
    new,
    current.min,
    current.max,
    ),
    min: current.min,
    max: current.max,
    )
    }
    ```

    1 of 2

    #gleam #gamedev #functionalprogramming

    edit: noo, my indentation :(

  4. I would love to submit a talk to Code BEAM Europe. But as there’s absolutely no chance I’ll have the money to go, I’ll leave that responsibility to you 🫵😂 codebeameurope.com #ElixirLang #Gleam #Erlang #WeBEAMtogether

    Code BEAM Europe 2026 - 21-22 ...

  5. I would love to submit a talk to Code BEAM Europe. But as there’s absolutely no chance I’ll have the money to go, I’ll leave that responsibility to you 🫵😂 codebeameurope.com #ElixirLang #Gleam #Erlang #WeBEAMtogether

    Code BEAM Europe 2026 - 21-22 ...

  6. I would love to submit a talk to Code BEAM Europe. But as there’s absolutely no chance I’ll have the money to go, I’ll leave that responsibility to you 🫵😂 codebeameurope.com #ElixirLang #Gleam #Erlang #WeBEAMtogether

    Code BEAM Europe 2026 - 21-22 ...

  7. Don't miss the Unconference after Code BEAM Stockholm. Bring your topics and curiosity.
    luma.com/n71am1d6
    #elixir #erlang #gleam

  8. Don't miss the Unconference after Code BEAM Stockholm. Bring your topics and curiosity.
    luma.com/n71am1d6
    #elixir #erlang #gleam

  9. Don't miss the Unconference after Code BEAM Stockholm. Bring your topics and curiosity.
    luma.com/n71am1d6

  10. Don't miss the Unconference after Code BEAM Stockholm. Bring your topics and curiosity.
    luma.com/n71am1d6
    #elixir #erlang #gleam

  11. Don't miss the Unconference after Code BEAM Stockholm. Bring your topics and curiosity.
    luma.com/n71am1d6
    #elixir #erlang #gleam

  12. Elixir FR and Elixir Paris are doing a new meetup online (in French only)

    We will have a series of fast talks, around ~15minutes each
    - An introduction to #Gleamlang
    - A presentation about using hot code reloading in production
    - A talk about Civis, a static websites farm
    - A presentation about learning Elixir and Phoenix (by myself!)

    We will probably be on our discord :)

    meetup.com/elixir/events/31467

    #Elixir #Elixirlang #MyElixirStatus #Gleam #Gleamlang

  13. Elixir FR and Elixir Paris are doing a new meetup online (in French only)

    We will have a series of fast talks, around ~15minutes each
    - An introduction to #Gleamlang
    - A presentation about using hot code reloading in production
    - A talk about Civis, a static websites farm
    - A presentation about learning Elixir and Phoenix (by myself!)

    We will probably be on our discord :)

    meetup.com/elixir/events/31467

    #Elixir #Elixirlang #MyElixirStatus #Gleam #Gleamlang

  14. Elixir FR and Elixir Paris are doing a new meetup online (in French only)

    We will have a series of fast talks, around ~15minutes each
    - An introduction to
    - A presentation about using hot code reloading in production
    - A talk about Civis, a static websites farm
    - A presentation about learning Elixir and Phoenix (by myself!)

    We will probably be on our discord :)

    meetup.com/elixir/events/31467

  15. Elixir FR and Elixir Paris are doing a new meetup online (in French only)

    We will have a series of fast talks, around ~15minutes each
    - An introduction to #Gleamlang
    - A presentation about using hot code reloading in production
    - A talk about Civis, a static websites farm
    - A presentation about learning Elixir and Phoenix (by myself!)

    We will probably be on our discord :)

    meetup.com/elixir/events/31467

    #Elixir #Elixirlang #MyElixirStatus #Gleam #Gleamlang

  16. Elixir FR and Elixir Paris are doing a new meetup online (in French only)

    We will have a series of fast talks, around ~15minutes each
    - An introduction to #Gleamlang
    - A presentation about using hot code reloading in production
    - A talk about Civis, a static websites farm
    - A presentation about learning Elixir and Phoenix (by myself!)

    We will probably be on our discord :)

    meetup.com/elixir/events/31467

    #Elixir #Elixirlang #MyElixirStatus #Gleam #Gleamlang

  17. Mapeo de Fuentes en JavaScript y…

    La relevancia de los mapas de fuentes en el desarrollo web moderno radica en su capacidad para simplificar el proceso de depuración.

    norvik.tech/news/analisis-sour

    #Technology #Javascript #MapasDeFuentes #Gleam #Depuracion #NorvikTech #DesarrolloSoftware #TechInnovation

  18. Mapeo de Fuentes en JavaScript y…

    La relevancia de los mapas de fuentes en el desarrollo web moderno radica en su capacidad para simplificar el proceso de depuración.

    norvik.tech/news/analisis-sour

    #Technology #Javascript #MapasDeFuentes #Gleam #Depuracion #NorvikTech #DesarrolloSoftware #TechInnovation

  19. Mapeo de Fuentes en JavaScript y…

    La relevancia de los mapas de fuentes en el desarrollo web moderno radica en su capacidad para simplificar el proceso de depuración.

    norvik.tech/news/analisis-sour

    #Technology #Javascript #MapasDeFuentes #Gleam #Depuracion #NorvikTech #DesarrolloSoftware #TechInnovation

  20. In the latest version of Gleam, the javascript target gets source maps ... in Gleam!

    Translation: You can put breakpoints and debug the Gleam code that produced the javascript, not the optimised JS the browser is running 😍

    This is what we call good DX ☺️

    gleam.run/news/javascript-sour

    #IndieDev #Gleam #GleamLang #WebDev

  21. You've heard me nerd about Gleam lately and in addition to "this language is brilliant and easy to get into", I would like to add my latest experience:

    "Gleam is the perfect ecosystem to be making an API or a web app or a static web site for your app".

    I mean... even the server components are fun hexdocs.pm/lustre

    #Gleam #GleamLang #IndieDev

  22. Functional languages are so bizarre to work with. I have a program that start to get a "lill" size to it, not a lot, but still enough to warrant "concern" when rewriting.

    Generally. With "normal" programming languages

    So, I restructure, refactor and redo large chunks, build and... wtf, it works???

    So yah, it feels a bit bizarre :O

    #Gleam #FunctionalProgramming

  23. I wrote an opinionated piece about using decoders to deserialize JSON instead of reflection like is common in most languages

    https://hashset.dev/article/2026/03/21/reflecting-on-deserialization-why-you-should-explicitly-decode-your-json/

    #gleam #json
  24. So Dynamic is an external type. External types are basically like opaque types for Gleam code and need non-Gleam code to construct, inspect and convert them. An external type only declares the name, without any variants, like `pub type Dynamic` without curly brackets and all that. I need to have a second look at dynamic, decode and gleam_json to understand dynamic/decode, but this realisation was helpful, which i got from the externals docs page:

    gleam.run/documentation/extern

    #gleam #gleamlang

  25. 📝 New blog post: Migrating an AI Chatbot from Go to Full-Stack Gleam

    I rewrote ai.arda.tr from a Go backend + vanilla JS frontend to Gleam on both sides — shared types, SSE streaming, and one language from BEAM to browser.

    blog.arda.tr/blog/2026-04-06-m

    #dev #gleam #ai

  26. @sushee I recently went all-in on #Gleam at work and in personal projects, and I would love to see these kinds of articles as well.