Live data from Hacker News

The Gleam Programming Language

gleam.run

131–140 of 189 posts

Re: The Gleam Programming Language

#131
post #66

Earlier quoted context omitted.

I'm a bit torn on ad-hoc polymorphism. You can definitely do cool things with it. But, as others have pointed out, it does reduce type safety: https://cs-syd.eu/posts/2023-08-25-ad-hoc-polymorphism-erode...

The same point holds of interfaces. And it’s not clear what the alternative is. No type system I’m aware of would force you to change all occurrences of this business logic pattern, with or without ad hoc polymorphism. But at least ad hoc polymorphism lets you search for all instances of that business logic easily.

ML languages have a "types, modules, types-of-modules, and functors" approach to ad-hoc poly. It's a bit strange compared to what other languages do. I am wondering whether it's ever been seen outside of SML and OCaml.

For JSON deserialisation, you would declare a module-type called "JSON-deserialiser", and you would define a bunch of modules of that module-type.

The unusual thing is that a JSON-deserialiser would no longer be tied to a type (read: type, not module-type). Types in ML-like languages don't have any structure at all. I suppose you can now define many different JSON-serialisers for the same type?

Re: The Gleam Programming Language

#132
post #8

I remember playing with Alpaca a few years ago, and it was fun though I didn’t find the resulting code to significantly less error-prone than when I wrote regular Erlang. It’s inelegant, but I find that Erlang’s quasi-runtime-typing with pattern matching gets you pretty far and it falls into Erlang’s “let it crash” philosophy nicely. Honestly, and I realize that this might get me a bit of flack here and that’s obviou…

> Honestly, and I realize that this might get me a bit of flack here and that’s obviously fine, but I find type systems start losing utility with distributed applications. Ultimately everything being sent over the wire is just bits. Actually Gleam somewhat shares this view, it doesn't pretend that you can do typesafe distributed message passing (and it doesn't fall into the decades-running trap of trying to solve thi…

Interesting. Them being honest about this stuff is a point in their favor.

I might give it a look this weekend.

Re: The Gleam Programming Language

#133
post #105
post #54

One of programming languages with political agenda.

Since when not being an asshole is a political agenda?

This is a terrible take. Just because your personal opinions / morals / values don't align with others in a community, doesn't automatically make you an asshole. If people can't handle others having differing opinions, they have some growing up to do and shouldn't be leading a community.

Re: The Gleam Programming Language

#134
post #91

Earlier quoted context omitted.

But not every open source project has a political agenda.

All open source projects have a political agenda. That's the purpose of the licence, to force certain behaviour.

Behavior related to the project maybe, but not behavior how should users behave every day in areas that are completely unrelated.

"You are welcome to our community only if your hair is long and you drive a yellow car, if you're not then you're not welcome." is pretty insane IMO.

Re: The Gleam Programming Language

#135
As with many languages that compile to a VM, I always ask myself: that’s all nice, but how do I interact with anything OUTSIDE of my program?

Can I do networking? Can I do system calls to my OS? Display graphics and sound? Can I import a C library that will do all that and call its functions? And if so, how? I just can’t see it from any documentation. Yes, I can call functions from other BEAM-based languages, but then I’m going in circles.

Re: The Gleam Programming Language

#136
post #91

Earlier quoted context omitted.

All open source projects have a political agenda. That's the purpose of the licence, to force certain behaviour.

Behavior related to the project maybe, but not behavior how should users behave every day in areas that are completely unrelated. "You are welcome to our community only if your hair is long and you drive a yellow car, if you're not then you're not welcome." is pretty insane IMO.

How is it insane to only welcome people to a community that act respectful towards other people? That seems like a really good way to build a solid community.

Re: The Gleam Programming Language

#137
post #33

Glean is interesting from language nerd point of view, however I never had a reason to use Erlang at work, and probably never will, and I suspect that relates to most folks.

I suspect you've also had zero reason to use the vast majority of programming languages at work in any meaningful capacity outside of the normal top ones. That's normally how tech decisions work. That certainly doesn't negate the possible benefits of other languages.

Others use Erlang and Elixir quite effectively and successfully in several billion dollar businesses apart from nerd aspects. It will be interesting to me personally if Gleam also has its day in the sun.

Re: The Gleam Programming Language

#138
post #91

Earlier quoted context omitted.

All open source projects have a political agenda. That's the purpose of the licence, to force certain behaviour.

Behavior related to the project maybe, but not behavior how should users behave every day in areas that are completely unrelated. "You are welcome to our community only if your hair is long and you drive a yellow car, if you're not then you're not welcome." is pretty insane IMO.

How you behave in community spaces is 100% related to the project.

I agree, that would be very silly. I don't think you can compare not tolerating racists to mandating a particular car colour.

Re: The Gleam Programming Language

#139

Earlier quoted context omitted.

Behavior related to the project maybe, but not behavior how should users behave every day in areas that are completely unrelated. "You are welcome to our community only if your hair is long and you drive a yellow car, if you're not then you're not welcome." is pretty insane IMO.

How is it insane to only welcome people to a community that act respectful towards other people? That seems like a really good way to build a solid community.

That's not the case with the Gleam community though. Unless you're willing to adopt their opinions / values / moral stance on certain issues, you won't be treated respectfully - you will be ostracized for having an unpopular opinion or view on a given issue.

It is a totally insane way to run a project, and it's quite obvious the Gleam community is run by persons who are unable to handle people with opinions that differ from their own.

It does sound like a great way to build an echo chamber.

Re: The Gleam Programming Language

#140

Earlier quoted context omitted.

Behavior related to the project maybe, but not behavior how should users behave every day in areas that are completely unrelated. "You are welcome to our community only if your hair is long and you drive a yellow car, if you're not then you're not welcome." is pretty insane IMO.

How is it insane to only welcome people to a community that act respectful towards other people? That seems like a really good way to build a solid community.

Well it's not insane to only welcome people that act respectful towards other people.

We'll see if this will be a solid community I guess.

Post reply on HN