Live data from Hacker News

Gleam is my new obsession

ericcodes.io

11–20 of 28 posts

Re: Gleam is my new obsession

#11
There is this recent trend of languages enforcing 2 space indentation and disallowing any ability to override. 2 space indentation makes determining block nesting hard for many (maybe most?) people, including me. My understanding is that the trend started as a way to skirt line length limitations in Python. I think it’s one of the dumbest trends in programming languages.

Please stop.

Re: Gleam is my new obsession

#12

There is this recent trend of languages enforcing 2 space indentation and disallowing any ability to override. 2 space indentation makes determining block nesting hard for many (maybe most?) people, including me. My understanding is that the trend started as a way to skirt line length limitations in Python. I think it’s one of the dumbest trends in programming languages. Please stop.

I have to fully agree. They have a discussion on their GitHub [0] about tabs/identation stating that the design goal is to have a non-configurable formatter.

I get the idea behind having a streamlined formatting style, but I’m really not a fan of denying users the flexibility to adjust it to their needs. Consistency across projects is nice, yet forcing everyone into a single indentation style feels unnecessarily rigid. A little configurability would go a long way :)

[0] https://github.com/gleam-lang/gleam/discussions/3633

Re: Gleam is my new obsession

#13
post #3

Gleam is really interesting to me, because it's built on top of the BEAM runtime, but as far as I can tell, it does very little with the actor model that is the star attraction of BEAM/Erlang. There's a (non-built-in?) package that exposes some of the OTP and concurrency tools available, but it doesn't look widely used or recommended on the website. The linked recommends a talk that I hadn't seen before (and unfortun…

From my understanding distributed (cross machine) typed message passing is hard.

Doesn't Erlang/Elixir solve this by having every function do its own parsing (via pattern matching) and then failing fast if something goes wrong? That seems intuitively like a good approach to take — you can't make any real guarantees across machine boundaries, but you can use structural typing at the edges to ensure that the data coming across the boundaries has the right shape.

Re: Gleam is my new obsession

#15
> I'd often joke, "I love Rust, but what I really want is a simpler Haskell with a C-like syntax" or "I love Rust, but if it had a garbage collector, Rust would be my perfect language".

OCaml is a simpler Haskell, but I don't think it has a C-like syntax. However, rescript[0], the JavaScript like syntax for OCaml based Hindley Milner typed language might actually fit well for small and personal projects.

[0] https://rescript-lang.org/docs/manual/v8.0.0/introduction

Re: Gleam is my new obsession

#16

There is this recent trend of languages enforcing 2 space indentation and disallowing any ability to override. 2 space indentation makes determining block nesting hard for many (maybe most?) people, including me. My understanding is that the trend started as a way to skirt line length limitations in Python. I think it’s one of the dumbest trends in programming languages. Please stop.

I agree. YAML does this too. It's dumb.

I'll accept that tabs unfortunately lost the tabs/spaces war (too complicated for many people I guess), but let's at least stick to 4 spaces please.

Re: Gleam is my new obsession

#17

There is this recent trend of languages enforcing 2 space indentation and disallowing any ability to override. 2 space indentation makes determining block nesting hard for many (maybe most?) people, including me. My understanding is that the trend started as a way to skirt line length limitations in Python. I think it’s one of the dumbest trends in programming languages. Please stop.

https://github.com/gleam-lang/gleam/discussions/3633

About the only argument I find remotely convincing from language devs (Nim is another similar lang) is that they don't want to maintain anything extra. Fair enough. The other arguments they roll out are always specious. The stuff in the issue above is comical: default GH tab width is 8, don't want Gleam to look weird to people looking at Gleam on GH, so force 2 spaces.. lol. Sometimes it seems like lang maintainers get a little too far up their own arses about this stuff. Your v0.x just-past-toy lang with a weak std lib and barely any ecosystem isn't turning off potential adopters because of how default indentation looks on one - arguably the worst - forge.. it's turning adopters away because of these silly hills you choose to die on. Nearly all mainstream langs handle spaces or tabs; forcing 2 spaces is just more "perceived strangeness", as a maintainer on that issue put it. It's your lang, do as you like with it, but if you want growth, don't be arbitrarily rigid.

Re: Gleam is my new obsession

#18

There is this recent trend of languages enforcing 2 space indentation and disallowing any ability to override. 2 space indentation makes determining block nesting hard for many (maybe most?) people, including me. My understanding is that the trend started as a way to skirt line length limitations in Python. I think it’s one of the dumbest trends in programming languages. Please stop.

https://github.com/gleam-lang/gleam/discussions/3633 About the only argument I find remotely convincing from language devs (Nim is another similar lang) is that they don't want to maintain anything extra. Fair enough. The other arguments they roll out are always specious. The stuff in the issue above is comical: default GH tab width is 8, don't want Gleam to look weird to people looking at Gleam on GH, so force 2 spa…

> The stuff in the issue above is comical: default GH tab width is 8, don't want Gleam to look weird to people looking at Gleam on GH

This is indeed comical. At the same time, it's an odd choice for GH to display eight spaces for a tab nowadays. Perhaps a punishment that the source code uses tab characters at all?

Re: Gleam is my new obsession

#19

> I'd often joke, "I love Rust, but what I really want is a simpler Haskell with a C-like syntax" or "I love Rust, but if it had a garbage collector, Rust would be my perfect language". OCaml is a simpler Haskell, but I don't think it has a C-like syntax. However, rescript[0], the JavaScript like syntax for OCaml based Hindley Milner typed language might actually fit well for small and personal projects. [0] https://…

Reason (https://reasonml.github.io/) is the JS like syntax for OCaml. ReScript is a fork that explicitly removes the connection to OCaml and focuses on JavaScript output.

Re: Gleam is my new obsession

#20
post #3

Gleam is really interesting to me, because it's built on top of the BEAM runtime, but as far as I can tell, it does very little with the actor model that is the star attraction of BEAM/Erlang. There's a (non-built-in?) package that exposes some of the OTP and concurrency tools available, but it doesn't look widely used or recommended on the website. The linked recommends a talk that I hadn't seen before (and unfortun…

They want to keep otherlangs as a compile target
Post reply on HN