News for hackers. Stuff that matters.

christhekeele

Re:Why I Wrote the Beam Book on Wednesday June 04, 2025 @02:33PM (#44183960)
> yeah idk but something like curation is done by commitee (to try and maintain a minimum of quality overall) but as an author is super easy to appply/get editors/feedback/publish

This is very much what pragprog.com is meant to be. I'm only on the volunteer curation committee so have less insight into the feedback cycle for authors post-acceptance, but every author who's published on the platform I've talked to has been pretty positive about the experience.

The OP didn't go into nearly as many (indeed, any) details as to why their second publishing attempt with them in particular did not work out, I'd be curious to learn more.

I think of this "applications don't need much maintenance" observation when reading some of the "libraries don't get updated often" complaints here. A lot of the libraries in the ecosystem are already super stable and that's a great thing!
> absinthe advertised itself a lib to write graphql servers ; we were looking for a graphql client

> And it's entirely possible that we simply picked the wrong lib !

This is 100% a failure of a decision-making process, not the language ecosystem. Picking the wrong library could be avoided by the smallest amount of diligence, it's pretty language agnostic.

You can follow my development even further—the lingering question in that gist is how to expand the guard code to see if it is valid in a guard.

I tried my hand at a pure-Elixir guard expansion in an earlier PR, documenting my thoughts as I went: https://github.com/elixir-lang/elixir/pull/5854

After José gave me some direction in response to that, I produced the ultimate PR: https://github.com/elixir-lang/elixir/pull/5857

It simply relies on calling the :elixir_expand.expand function that the compiler uses, with a guard context—so the defguard implementation is always up-to-date with what the compiler allows in guards. Waaay more elegant than munging AST myself.

Funnily enough, the tests I wrote for defguard actually uncovered some missing assertions in that function. Some invalid expressions would make it past that step and return a different error much deeper in. It's kinda cool I indirectly contributed to the compiler.

I took on the feature mostly because over 4 years ago I'd made a gist to do exactly that, minus the validation, and when I found the issue on github for it, it gave me a lot of pleasant closure to get it merged in! https://gist.github.com/christhekeele/8284977/revisions#diff...