Live data from Hacker News

The Gleam Programming Language

gleam.run

101–110 of 189 posts

Re: The Gleam Programming Language

#101

I really like the idea of gleam but I don't want to hand implement serialization for every type (even with an LSP action) in 2026.

Indeed. Gleam is a sort-of mix between Elixir and Rust, yet you don't have to explicitly implement serialization for either of them.

It's definitely something they should figure out.

Re: The Gleam Programming Language

#102

For a fairly advanced example project I can recommend looking at Quickslice, a dev toolkit for making AT protocol applications. https://tangled.org/slices.network/quickslice

For anyone opening the link and wondering why the expected "gleam.toml" is missing: the project contains 2 Gleam sub-projects. The server/ directory is the BEAM server (no framework) and the client/ directory is the gleam-compiled-js client (lustre framework).

Unfortunately, there are many tests for the server, and none for the client.

Re: The Gleam Programming Language

#103
post #97

Well. Coming from TS, Gleam just wasn't/isn't my jam. It's a nice programming language research project, but it just goes against the grain for me a little too much. All the made-up rules early returning always being weird `use` call, the type boilerplate—no inline object types as I remember. Lot of inventions that just makes me go "why?" Like the opposite ideology of Go. And yes I've used Haskell before (didn't like…

learning curve isn’t always a bad thing

to effectively critique a language you must understand the design trade offs made

Re: The Gleam Programming Language

#104
post #18

Earlier quoted context omitted.

I think you can avoid most issues by not doing what you're describing! Ensuring data arrives uncorrupted is usually not an application-level concern, and if you use something like TCP you get that functionality for free.

TCP helps but only to a certain extent; it only guarantees specific ordering of bits during its session. Suppose you have to construct an object out of three separate transmissions, like some kind of multipart style thing. If one of the transmissions gets corrupted or gets errors out from TCP, then you still fall into that maybe trap.

Why couldn't you fix this by validating at the point of ingress? If one of the three transmissions fails, retry and/or alert the user.

Re: The Gleam Programming Language

#106
post #23

I think they have an issue on homepage: there is no "download/get start" link. All big buttons link to a tour page, and stopped there.

I was able to find that in the Docs https://gleam.run/documentation/ ( from gleam.run )

tbf https://gleam.run/ -> https://gleam.run/documentation/ -> https://gleam.run/getting-started/installing/ is two clicks, maybe it should only be one

although the playground is a much gentler introduction than installing gleam+erlang+rebar3

Re: The Gleam Programming Language

#107
post #73
post #47

Earlier quoted context omitted.

Isn’t this the proof of my point - How does the need of writing „@external“ annotations by hand not contradict the point of being „out of the box“ usable? Hayleigh, when I asked on the discord about how to solve my JSON problem in order to get structured logging working, you replied that I’m the first one to ask about this. Now reading this: > It's ok if you don't vibe with Gleam – no ad-hoc poly and no macros are us…

This is the same as Elixir, you need to specify what Erlang function to use in that language if you want to use Erlang code. The only difference is that Gleam has a more verbose syntax for it.

In Elixir you just call the Erlang function directly. It's basically the same as calling an Elixir function, just with a different naming convention.

In Gleam, you first have to declare the function type and THEN you can call the function directly.

This is probably the lightest way you can bridge between statically and dynamically typed languages, but it's not the same as Elixir.

Re: The Gleam Programming Language

#108
post #61

Earlier quoted context omitted.

Raku looks sweet, but what is the point of this comparison? :)

I love coding in Raku - and I am sure that Gleam is nice too. But I get the feeling that Raku is underappreciated / dismissed by many due to the perl5 / perl6 history. So my thinking is, when I see a new language showcase an example on their website, presumably a carefully chosen snippet that showcases their language at its best, I like to see how Raku compares to that. You know the take-aways from the comparison are…

> But I get the feeling that Raku is underappreciated / dismissed by many due to the perl5 / perl6 history.

Yes that would be me! If you like making these comparisons, can you write the following pattern matching in Raku?

    import gleam/io
    
    pub type Fish {
      Starfish(name: String, favourite_colour: String)
      Jellyfish(name: String, jiggly: Bool)
    }
    
    pub fn main() {
      handle_fish(Starfish("Lucy", "Pink"))
    }
    
    fn handle_fish(fish: Fish) {
      case fish {
        Starfish(_, favourite_colour) -> io.println(favourite_colour)
        Jellyfish(name, ..) -> io.println(name)
      }
    }

Re: The Gleam Programming Language

#109
post #61

Earlier quoted context omitted.

Raku looks sweet, but what is the point of this comparison? :)

I love coding in Raku - and I am sure that Gleam is nice too. But I get the feeling that Raku is underappreciated / dismissed by many due to the perl5 / perl6 history. So my thinking is, when I see a new language showcase an example on their website, presumably a carefully chosen snippet that showcases their language at its best, I like to see how Raku compares to that. You know the take-aways from the comparison are…

[deleted]

Re: The Gleam Programming Language

#110
post #60

Earlier quoted context omitted.

I've used gleam for a toy project in uni, and AoC My main friction point is that the Int type maps to different concepts in erlang and js In erlang it's a arbitrary precision Int In js it the js number type, which is a 64bit float iirc. Also recursion can hit limits way sooner in js. For me, my code rarely ran in both js and erlang. But could be skillissue

Fair, but you usually don't run your project on both, unless you're writing a library. Pick the target that makes sense for your project and stick with it :)

JS/TS isn't my favourite language, but it's pretty decent these days. If I'm picking a different language and targeting the web, it's probably because I want to run the same code natively as well.
Post reply on HN