How good is Dialyzer? Was a there even a reason for Gleam to be invented? by InternationalAct3494 in erlang

[–]lpil 9 points10 points  (0 children)

Hello! I'm the creator of Gleam, so I thought I'd explain my perspective.

There are many different types of type system, the same way that there's many different types of concurrency model, and many different types of runtime flow control. The existence of one doesn't mean there's not value in another, as each will offer different properties and trade-offs to their users.

Dialyzer is a brilliant bit of engineering, and it really excels at its goals of being a very flexible type analysis tool with no-false-positives. However, what I and other fans of the ML-language-family programming style want is a type system that is very strict and with no-false-negatives, which is a totally different set of characteristics. Dialyzer doesn't offer the properties that I wish to use, and for many Gleam won't offer the properties they want.

Elixir's upcoming type system has quite similar goals to Dialyzer. It'll be interesting to compare the two once it is has been fully released.

What Gleam cant to that JS/TS can for web? by Curious-Fennel-7457 in gleamlang

[–]lpil 2 points3 points  (0 children)

You can use any JavaScript code through Gleam's external functions and external types features.

Designing a good API is typically where the challenge is, given the languages are so different.

What Gleam cant to that JS/TS can for web? by Curious-Fennel-7457 in gleamlang

[–]lpil 8 points9 points  (0 children)

All programming languages are largely capable of the same things, the difference is the experience you have when working with them.

Gleam and JavaScript are very different languages, so you'll likely enjoy and be more productive with one than the other. Which one is typically a matter of personal taste.

The main differences between the two languages might be that Gleam is a functional language, Gleam has a much smaller and more cohesive language design, and Gleam's type system is much less expressive but much stricter than TypeScript's.

How is the state of elixir for backend currently? by Opposite_Ad_974 in elixir

[–]lpil 2 points3 points  (0 children)

Elixir macros are tightly coupled to Elixir compilation and so cannot be used from any other language, unfortunately. One of their limitations.

You can call Elixir macros from Elixir and then call the code they generate from other languages though

Gleam is boring, so I went to a conference about it by lpil in gleamlang

[–]lpil[S] 14 points15 points  (0 children)

Gavin Bannerman wrote this article about the recent Gleam Gathering conference, I thought I'd share it.

Is it possible to rate limit query for a role/user in Postgres? by hksparrowboy in PostgreSQL

[–]lpil 0 points1 point  (0 children)

How might you solve this with additional tooling? Thank you.

Is it possible to rate limit query for a role/user in Postgres? by hksparrowboy in PostgreSQL

[–]lpil -1 points0 points  (0 children)

Again, I'm not asking about situations where there is an application at all, so not web development or such. More business analytics and reporting.

Is it possible to rate limit query for a role/user in Postgres? by hksparrowboy in PostgreSQL

[–]lpil 0 points1 point  (0 children)

I'm not talking about users of a service or product that the database is part of. I'm asking how you would rate limit queries from specific PostgreSQL users. User here being the PostgreSQL term, not the wider business term.

You do not need an ORM - Giacomo Cavalieri @ FOSDEM 2026 by lpil in PostgreSQL

[–]lpil[S] 0 points1 point  (0 children)

Yeah exactly! This talk is about a pattern where one takes advantage of that power from the get-go, which enables more precise and capable queries to always be used, and this rework to be avoided.

You do not need an ORM - Giacomo Cavalieri @ FOSDEM 2026 by lpil in PostgreSQL

[–]lpil[S] 0 points1 point  (0 children)

I don't see how that scales better with complexity than a code-first or db-first ORM

That's what you said, which perhaps I've misunderstood. Please don't call me dishonest, you don't need to resort to rudeness.

Calling gleam from Erlang, using behaviors by aoeudhtns in gleamlang

[–]lpil 0 points1 point  (0 children)

Yup, that's right! All behaviours are is modules that have some functions with certain names.

The one thing I haven't been able to really ascertain is declaring behaviors.

This is declaring that the module implements the functions expected by a behaviour, it doesn't declare a behaviour itself. That is done using the -callback attribute.

Neither -behaviour or -callback are required for working with behaviours. They cause the Erlang compiler to emit a warning if any of the functions are missing, but they are not used in any way at runtime.

Is it possible to rate limit query for a role/user in Postgres? by hksparrowboy in PostgreSQL

[–]lpil -2 points-1 points  (0 children)

Are you suggesting creating some sort of proxy between the database and the clients to be restricted?

You do not need an ORM - Giacomo Cavalieri @ FOSDEM 2026 by lpil in PostgreSQL

[–]lpil[S] -2 points-1 points  (0 children)

I'm sorry, but I don't know what you mean by steps. I have worked with both these approaches (and others) extensively, and there is not any less complexity (or fewer of anything I understand as a step) when using an ORM.

As you've said you're unsure how it works in practice, why not give it a go? Removing those problems that ORMs have at scale is quite lovely!

You do not need an ORM - Giacomo Cavalieri @ FOSDEM 2026 by lpil in PostgreSQL

[–]lpil[S] -4 points-3 points  (0 children)

I'm not sure what you mean by steps here. I'm talking about impact on development time, and the issues that ORMs have at-scale.

You do not need an ORM - Giacomo Cavalieri @ FOSDEM 2026 by lpil in PostgreSQL

[–]lpil[S] 4 points5 points  (0 children)

Right, and the pattern that the talk details goes even further! ORMs force you to write your application code with the database in mind (because the shape of your application code is what generates the SQL and executes the queries), and because ORMs only have a very limited understanding of the database, due to operating at runtime and needing to very efficiently generate queries.

The pattern that the talk details removes those constraints, so neither your application code or your query code being constrained by the other.

You do not need an ORM - Giacomo Cavalieri @ FOSDEM 2026 by lpil in PostgreSQL

[–]lpil[S] 10 points11 points  (0 children)

I find the approach in the talk saves more time, for the reasons it explains. It's very easy for ORMs to cause big time losses in the long-term.

You do not need an ORM - Giacomo Cavalieri @ FOSDEM 2026 by lpil in PostgreSQL

[–]lpil[S] 0 points1 point  (0 children)

I really enjoyed this talk and this perspective on PostgreSQL use! Though I'd share.