Live data from Hacker News

I tried Gleam for Advent of Code

blog.tymscar.com

201–210 of 223 posts

Re: I tried Gleam for Advent of Code

#201
post #197
post #59

Earlier quoted context omitted.

Gleam uses regular OTP, it doesn’t have a distinct OTP inspired framework. Source: I’m the author of Gleam.

hey, thanks for the clarification. I was under the impression that Gleam had a few shortcomings re: OTP, like missing APIs or the need to fall back to Erlang. Many people I know who work regularly with Elixir hold similar opinions - do you have any idea what happened there? Is there a lack of publicity for this support? Is it a documentation problem?

I presume they checked out Gleam years ago, or their investigation was more shallow.

That aside, it is normal in Elixir to use Erlang OTP directly. Neither Elixir nor Gleam provides an entirely alternative API for OTP. It is a strength that BEAM languages call each other, not a weakness.

Re: I tried Gleam for Advent of Code

#202
post #60

Gleam is really quite a nice language. I did AoC in it this year as well and came away with the following: (incomplete list for both positive and negative, these are mainly things that come to mind immediately) Positive: - It can be pretty performant if you do it right. For example, with some thought I got many days down to double digit microseconds. That said, you do need to be careful how you write it and many patt…

> - It can be pretty performant if you do it right. For example, with some thought I got many days down to double digit microseconds.

Was this the time of everything or just the time of your code after loading in the text file etc.? The hello world starter takes around 110 ms to run on my PC via the script generated with `gleam export erlang-shipment` and 190 ms with `gleam run`. Is there a way to make this faster, or is the startup time an inherent limitation of Gleam/the BEAM VM?

Re: I tried Gleam for Advent of Code

#203
post #154
post #144

Earlier quoted context omitted.

> what I wish Elixir would become (re:typing). Elixir is slowly rolling out set-theoretic typing: https://hexdocs.pm/elixir/main/gradual-set-theoretic-types.h...

I dunno, my unfounded guess is that gradual type systems are super complex and very hard to get right. Why use something complex and half working, when you can have the real thing?

I hate how people talk about type systems as if there were no trade-offs to be considered. A Hindley–Milner style type system would effectively kill half the features that make Elixir amazing, and worse, would break pretty much all existing code.

Re: I tried Gleam for Advent of Code

#204

Earlier quoted context omitted.

I don’t mean to minimize the huge effort by the Gleam team; however, Elixir cannot become Gleam without breaking OTP/BEAM in the same ways Gleam does. As it stands now, Elixir is the superior language between the two, if using the full Erlang VM is your goal.

I use many of the otp functions in gleam on thr regular, what functionality cant i call? Gleam can call any erlang function, and can somewhat handle the idc types. [ im sure it has another name ]. Did i miss something that gleam fails on, because this is one of my concerns.

- No state machine behaviours. Gleam cannot do gen_statem.

- Limited OTP system messages. Gleam doesn't yet support all OTP system messages, so some OTP debugging messages are discarded by Gleam.

- Gleam doesn't have an equivalent of gen_event to handle event handlers.

- Gleam doesn't support DynamicSupervisor or the :simple_one_for_one for dynamically starting children at runtime.

Re: I tried Gleam for Advent of Code

#205

Earlier quoted context omitted.

Who is normalizing merging ANYTHING, LLM-generated or human-generated, without QA or review? You should be reviewing everything that touches your codebase regardless of source.

A LOT of people, if you're paying attention. Why do you think that happened at their company? It's not hard to find comments from people vibe coding apps without understanding the code, even apps handling sensitive data. And it's not hard to find comments saying agents can run by themselves. I mean people are arguing AGI is already here. What do you mean who is normalizing this?

I fully believe there are misguided leaders advocating for "increasing velocity" or "productivity" or whatever, but the technical leaders should be pushing back. You can't make a ship go faster by removing the hull.

And if you want to try... well you get what you get!

But again, no one who is serious about their business and serious about building useful products is doing this.

Re: I tried Gleam for Advent of Code

#206

Earlier quoted context omitted.

You guys always find a way to say "you can be an LLM maximalist too, you just skipped a step." The bigger story here is not that they forgot to tell the LLM to run tests, it's that agentic use has been so normalized and overhyped that an entire PR was attempted without any QA. Even if you're personally against this, this is how most people talk about agents online. You don't always have the privilege of working on a…

Who is normalizing merging ANYTHING, LLM-generated or human-generated, without QA or review? You should be reviewing everything that touches your codebase regardless of source.

[dead]

Re: I tried Gleam for Advent of Code

#207

Earlier quoted context omitted.

A LOT of people, if you're paying attention. Why do you think that happened at their company? It's not hard to find comments from people vibe coding apps without understanding the code, even apps handling sensitive data. And it's not hard to find comments saying agents can run by themselves. I mean people are arguing AGI is already here. What do you mean who is normalizing this?

I fully believe there are misguided leaders advocating for "increasing velocity" or "productivity" or whatever, but the technical leaders should be pushing back. You can't make a ship go faster by removing the hull. And if you want to try... well you get what you get! But again, no one who is serious about their business and serious about building useful products is doing this.

> But again, no one who is serious about their business and serious about building useful products is doing this.

While this is potentially true for software companies, there are many companies for which software or even technology in general is not a core competency. They are very serious about their very useful products. They also have some, er, interesting ideas about what LLMs allow them to accomplish.

Re: I tried Gleam for Advent of Code

#208
post #186

Earlier quoted context omitted.

[flagged]

I don’t know anything about gleam. I couldn’t find anything as “shoving political ideologies” on their code of conduct https://github.com/gleam-lang/gleam/blob/main/CODE_OF_CONDUC... Examples?

homepage

Re: I tried Gleam for Advent of Code

#209
post #165

Earlier quoted context omitted.

> One developer tried to refactor a bunch of graph ql with an LLM and ended up checking in a bunch of completely broken code. Thankfully there were api tests. So the LLM was not told how to run the tests? Without that they cannot know if what they did works, and they are a bit like humans, they try something and then they need to check if that does the right thing. Without a test cycle you definitely don’t get a lot…

You guys always find a way to say "you can be an LLM maximalist too, you just skipped a step." The bigger story here is not that they forgot to tell the LLM to run tests, it's that agentic use has been so normalized and overhyped that an entire PR was attempted without any QA. Even if you're personally against this, this is how most people talk about agents online. You don't always have the privilege of working on a…

I am not saying you should be a LLM maximalist at all. I am just saying LLMs need to have a change-test cycle, like humans, in order to be effective. But looks like your goal is not really to be effective at using LLMs, but to bitch about it on the internet.

Re: I tried Gleam for Advent of Code

#210
post #41

Earlier quoted context omitted.

I recently used Gleam + Lustre for a small app that I normally would have built with Elm + PostgREST. It went very well, and I'm now planning to use it for a larger rewrite (of a rails app).

Anecdotically I recently got into Ruby, via Sinatra, and enjoy the experience. What are you lacking in ruby and rails, besides the types?

Ruby is lovely. I just prefer static (inferred) types, functional, compiled, and performant languages with managed side effects these days. Bit more upfront effort, but saves a ton of time and stress in the long run.
Post reply on HN