Live data from Hacker News

I tried Gleam for Advent of Code

blog.tymscar.com

171–180 of 223 posts

Re: I tried Gleam for Advent of Code

#171
post #115

Earlier quoted context omitted.

Fair enough, but to be fair to my statements, the quotes I chose were largely from gleam-lang.org or the Gleam OTP library. Take for example this section of the Gleam website FAQ section: https://gleam.run/frequently-asked-questions/#how-does-gleam... "Elixir has better support for the OTP actor framework. Gleam has its own version of OTP which is type safe, but has a smaller feature set." At least on the surface, "b…

Ah, that’s good feedback. I agree, that documentation is misleading. I’ll fix them ASAP. > Elixir also provides for much OTP functionality via direct access to the Erlang libraries. This is the norm in Gleam too! Gleam’s primary design constraint is interop with Erlang code, so using these libraries is straightforward and commonplace.

Thanks for the clarification. I've read about Gleam here and there, and played with it a bit, and thought there was no way to directly access OTP through the Erlang libraries.

This can be just my lack of familiarity with the ecosystem though.

Gleam looks lovely and IMO is the most readable language that runs on the BEAM VM. Good job!

Re: I tried Gleam for Advent of Code

#172
post #42

Earlier quoted context omitted.

As a mostly back end dev Elm looked really nice but all the conflict with the creator and then the lack of compiler releases made me shy away a bit. I have bumped into "the Elm architecture" in other projects though and it was nice.

> all the conflict with the creator Just so no one misunderstands this. The creator (Evan) didn't get into, or start, any drama himself that I ever noticed. I'd argue he's a very chill and nice dude. I've been on the edges of the community for probably a decade now (lurker), and all of the drama came from other people who simply didn't like the BDFL and slow releases strategy.

[deleted]

Re: I tried Gleam for Advent of Code

#173

The `echo` part seemed interesting but it made me think, debuggers need this as a built in feature. If I have array .slice(0, 10) .filter(s => s[0].toLowerCase() l .map(s => s.toUpperCase()); It seems like it should be a common feature to be able to view between each array operation in a debugger without having to augment the code with `echo` The out of bounds handling didn't seem all that good to me. Sure you can fi…

When I was debugging through f# code they definitely had that.

Re: I tried Gleam for Advent of Code

#174
post #136

Earlier quoted context omitted.

> Because LLMs make it that much faster to develop software I feel as though "facts" such as this are presented to me all the time on HN, but in my every day job I encounter devs creating piles of slop that even the most die-hard AI enthusiasts in my office can't stand and have started to push against. I know, I know "they just don't know how to use LLMs the right way!!!", but all of the better engineers I know, the…

This last week: * 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. * One developer has an LLM making his PRs. He slurped up my unfinished branch, PRed it, and merged (!) it. One can only guess that the approved was also using an LLM. When I asked him why he did it, he was completely baffled and assured me he wo…

The first two cases indicate that you have some gaps in your change management process. Strict requirements for pulls and ci/cd checks.

Re: I tried Gleam for Advent of Code

#176
post #8

Gleam is a beautiful language, and what I wish Elixir would become (re:typing). For those that don't know its also built upon OTP, the erlang vm that makes concurrency and queues a trivial problem in my opinion. Absolutely wonderful ecosystem. I've been wanting to make Gleam my primary language, but I fear LLMs have frozen programming language advancement and adoption for anything past 2021. But I am hopeful that Gle…

I've also been wanting to make Gleam my primary language (am generally a Typescript dev), and I have not had any issue with using it with LLMs (caveat, I'm obviously still new with it, so might just be ignorant).

In fact, I'd say most of the Gleam code that has been generated has been surprisingly reliable and easy to reason about. I suspect this has to do with the static typing, incredible language tooling, and small surface area of the language.

I literally just copy the docs from https://tour.gleam.run/everything/ into a local MD file and let it run. Packages are also well documented, and Claude has had no issue looping with tests/type checking.

In the past month I've built the following, all primarily with Claude writing the Gleam parts:

- A websocket-first analytics/feature flag platform (Gleam as the backend): https://github.com/devdumpling/beacon

- A realtime holiday celebration app for my team where Gleam manages presence, cursor state, emojis, and guestbook writes (still rough): https://github.com/devdumpling/snowglobe

- A private autobattler game backend built for the web

While it's obviously not as well-trodden as building in typescript or Go or Rust, I've been really happy with the results as someone not super familiar with the BEAM/Erlang.

EDIT: Sorry I don't have demos up for these yet. Wasn't really ready to share them but felt relevant to this thread.

Re: I tried Gleam for Advent of Code

#177
post #55

Earlier quoted context omitted.

> I fear LLMs have frozen programming language advancement and adoption for anything past 2021. Why would that be the case? Many models have knowledge cutoffs in this calendar year. Furthermore I’ve found that LLMs are generally pretty good at picking up new (or just obscure) languages as long as you have a few examples. As wide and varied as programming languages are, syntactically and ideologically they can only be…

There's a flywheel where programmers choose languages that LLMs already understand, but LLMs can only learn languages that programmers write a sufficient amount of code in. Because LLMs make it that much faster to develop software, any potential advantage you may get from adopting a very niche language is overshadowed by the fact that you can't use it with an LLM. This makes it that much harder for your new language…

You raise such an interesting point!

But consider: as LLMs get better and approach AGI you won't need a corpus: only a specification.

In this way, AI may enable more languages, not less.

Re: I tried Gleam for Advent of Code

#178
post #8

Gleam is a beautiful language, and what I wish Elixir would become (re:typing). For those that don't know its also built upon OTP, the erlang vm that makes concurrency and queues a trivial problem in my opinion. Absolutely wonderful ecosystem. I've been wanting to make Gleam my primary language, but I fear LLMs have frozen programming language advancement and adoption for anything past 2021. But I am hopeful that Gle…

[flagged]

Re: I tried Gleam for Advent of Code

#179
post #59
post #37

Earlier quoted context omitted.

the Erlang vm is called BEAM, not OTP. sadly, Gleam's implementation of OTP is not at the same level as Elixir's or Erlang.

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

who cares, just dont shove political opinions into a software project that developers. we are devs not jobless sjw's running around the road with some useless sign board

Re: I tried Gleam for Advent of Code

#180
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.

who cares, just dont shove political opinions into a software project that developers. we are devs not jobless sjw's running around the road with some useless sign board

Free software was started as a political movement by Stallman et al. Why would we stop now?
Post reply on HN