Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
lpil
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
5 ms
·
31.
▲
by
lpil
10mo ago
Totally. This is where I would generate them.
32.
▲
by
lpil
10mo ago
In Gleam code generators are most commonly used, similar to in C#, Go, or Elm.
33.
▲
by
lpil
10mo ago
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 c
34.
▲
by
lpil
10mo ago
In Gleam we would typically write this code with `use`, which doesn’t introduce nesting.
35.
▲
by
lpil
10mo ago
OTP is a very complex subject and quite unusual in its scope, and it’s not even overly clear what it even is. Even in Erlang and Elixir it’s commonly confused, so I think it’s understandable that Gleam has the same problem further still wit
36.
▲
by
lpil
10mo ago
Multiple of such tools exist and have done for years. Serde isn’t a Rust-core project, and similarly the Gleam alternatives are not Gleam-core.
37.
▲
by
lpil
10mo ago
No, it means that one specific package only offers bindings to certain parts. It’s the documentation for one library, not the language.
38.
▲
by
lpil
10mo ago
You can generate those conversions, most people do. But also, you shouldn’t think of it as writing the same type twice! If you couple your external API and your internal data model you are greatly restricting your domain modelling cability.
39.
▲
by
lpil
10mo ago
It’s discouraged to pass around structs of functions to replicate type classes in Gleam. Instead the preference is to not type class style patterns in your projects, favouring a concrete style instead.
40.
▲
by
lpil
10mo ago
Gleam does have generics.
41.
▲
by
lpil
10mo ago
Gleam has always had generics! There’s no Gleam version without them
42.
▲
by
lpil
10mo ago
I think you might mean “ad hoc polymorphism” rather than “dynamic dispatch”. Gleam, C, Erlang, etc have the latter, not so much the former.
43.
▲
by
lpil
10mo ago
Gleam uses regular OTP, it doesn’t have a distinct OTP inspired framework. Source: I’m the author of Gleam.
44.
▲
by
lpil
10mo ago
Hi, I’m the creator of Gleam! The comment you are replying to is correct, and you are incorrect. All OTP APIs are usable as normal within Gleam, the language is designed with it in mind, and there’s an additional set of Gleam specific addit
45.
▲
by
lpil
10mo ago
Gleam has first class functions, so it has dynamic dispatch. Both of type classes and interfaces desugar to high order functions, so anything you write with them can be written with first class functions, though with a less concise API.
46.
▲
by
lpil
11mo ago
> The BEAM hooks into so many system libraries, you must compile it on every flavor of linux instead of just unpacking a tarball. This isn't true, one can statically compile the BEAM for Linux exactly the same as the JVM. Here'
47.
▲
by
lpil
11mo ago
No, the VM is functional and immutable so you cannot implement things like `while` on it efficiently. It is highly optimised for the functional immutable style of programming.
48.
▲
by
lpil
1y ago
The JS backend is mature, but the Erlang backend and accompanying ecosystem is very small compared to Gleam.
49.
▲
by
lpil
1y ago
Parser combinators are very slow in languages without a sufficiently optimising compiler, I wouldn't recommend them here. In Gleam pattern matching and the "splitter" package is the go-to for text parsing.
50.
▲
by
lpil
1y ago
Looks like it silently discards the message on failure, your users would likely be thankful for error logging otherwise debugging that defect in production will be very challenging.
51.
▲
by
lpil
1y ago
> It’s SPA-first, which seems like a very strange decision to make in 2025. It’s not! Lustre is very flexible and can be used in many different ways, including LiveView style server components. It’s not limited to SPA.
52.
▲
by
lpil
1y ago
Yes, for sure. Both the JVM and the CLR have some native binary compilation options that, while less popular, are certainly suitable for production. The similar project for the BEAM unfortunately stalled and is no longer being developed.
53.
▲
by
lpil
1y ago
It's all production ready and in use by businesses and open source projects today! The language tour covers _the language_ rather than the concurrency framework, so you'd look to the Erlang and Gleam OTP documentation to learn abo
54.
▲
by
lpil
1y ago
No, the VM needs to be installed on the machine, similar to C#, Java, Python, etc. There have been some projects for creating self-extracting executable archives for the VM, and some projects for compiling BEAM programs to native code, but
55.
▲
by
lpil
1y ago
Thank you, you are very kind. I am extremely proud of the community, they are wonderful lot.
56.
▲
by
lpil
1y ago
Thank you, very kind.
57.
▲
by
lpil
1y ago
> It shouldn't be that blatantly ideological from the get go. It's just another programming language, not a political platform. It's first and foremost a community, and it's important for communities to have clear a c
58.
▲
by
lpil
1y ago
> Gleam seems to have a lot of obvious influences from Rust, and the creator is a rust dev. Hi! That's me! Gleam the language doesn't have any Rust influence really. It's a happy accident that some of the syntax ended up l
59.
▲
by
lpil
1y ago
If you've examples of code you have in Elixir that you could not express well in Gleam I would be very happy to help you out with that. The two languages are almost the same at the value level, so code should translate across well.
60.
▲
Gleam v1.11 Released
(gleam.run)
12 points
by
lpil
1y ago
|
2 comments
More ›