Sign in

Cristian Álvarez

@crbelaus.com
737 followers 128 following 64 posts

I write software (mainly #ElixirLang) and I do martial arts. Sometimes I blog at crbelaus.com

PostsRepliesMedia
Cristian Álvarez @crbelaus.com · 09/11/2025
Version 0.7 of the #ElixirLang Error Tracker 🐛 is out with improved LiveView support, MariaDB fixes, better sensitive header redaction and an all-new Igniter installer. github.com/elixir-error...
github.com
Release v0.7.0 · elixir-error-tracker/error-tracker
What's Changed Igniter installer by @crbelaus in #149 Improve documentation of Error kind field by @tjarratt in #154 Require LiveView 1.0 at least by @crbelaus in #159 Require Ecto 3.13 at least b...
0121
Reposted by Cristian Álvarez
Óscar de Arriba ⚗️👨🏼‍💻 @odarriba.dev · 11/05/2025
It's official! Igniter support is coming to the next version of #ErrorTracker 🚀. It's already merged on main and will be included in the next release @zachdaniel.dev #ElixirLang
1225
Cristian Álvarez @crbelaus.com · 24/04/2025
I got a small PR merged into Plug. You could use Plug.RequestID multiple times with different options but it always set the same logger metadata, overriding the previous value with each call. This is configurable now. github.com/elixir-plug/... #myelixirstatus #elixirlang
github.com
Customize the Logger metadata key name by crbelaus · Pull Request #1267 · elixir-plug/plug
In certain scenarios we may want to use the Plug.RequestID plug multiple times with different headers or assigns. While this is possible, the issue is that every call adds a :request_id key to the ...
070
Cristian Álvarez @crbelaus.com · 06/04/2025
I wrote about embedding external resources in your #elixirlang application so the compiler can keep track of when they change. crbelaus.com/2025/03/31/e...
crbelaus.com
Embedding external resources in Elixir code | Cristian Álvarez Belaustegui
If your Elixir module reads external resources during compilation you should use the @external_resources attribute so the compiler can track those resources and recompile when they change.
071
Cristian Álvarez @crbelaus.com · 10/02/2025
My pull request has just been merged! If you use difftastic with #elixirlang (you should! it is amazing) you will notice that changes in ~H sigils are now properly highlighted. github.com/Wilfred/diff...
Difftastic can now properly highlight changes in Elixir ~H sigils.
1211
Cristian Álvarez @crbelaus.com · 10/02/2025
The #elixirlang ErrorTracker has just surpassed 40k downloads. Codebase has been slowly improving and stabilising since the initial release. We just need a logger handler and then it can be considered "done". github.com/elixir-error...
github.com
GitHub - elixir-error-tracker/error-tracker: 🐛 An Elixir-based built-in error reporting and tracking solution
🐛 An Elixir-based built-in error reporting and tracking solution - elixir-error-tracker/error-tracker
0101
Cristian Álvarez @crbelaus.com · 04/01/2025
Other shows I enjoyed recently are: Yellowstone, The Americans and Ozark.
010
Cristian Álvarez @crbelaus.com · 04/01/2025
Silo is amazing. Best sci-fi show I've watched lately along with Severance. Others (Fallout and The Expanse) are great but not at the same level IMHO.
110
Cristian Álvarez @crbelaus.com · 31/12/2024
Amazing to see how well the ErrorTracker and @ash-hq.org work together 🤝
020
Cristian Álvarez @crbelaus.com · 28/12/2024
Thread worth reading for #ElixirLang devs.
020
Cristian Álvarez @crbelaus.com · 28/12/2024
For example "upcoming_events" may be such a scope that is extracted. Each LiveView or controller builds its own query based on that scope and then applies the required ordering, filtering, etc.
010
Cristian Álvarez @crbelaus.com · 28/12/2024
This is what we do at work and so far it has worked great. We try to keep an eye on common "scopes" (as Ruby on Rails calls them) that show up in multiple queries and extract them out.
120
Cristian Álvarez @crbelaus.com · 26/12/2024
I started using it in my day job (about 12 people in the team) and for my personal projects as well. You can use it on any git repo without forcing others to switch (the rest of the team is using git).
010
Cristian Álvarez @crbelaus.com · 26/12/2024
After using it daily for a few weeks I can confidently say that jj is to git what Tailwind is to CSS. I went from "I don't think this adds any value over vanilla git" to "I don't know how I ever worked without this".
120
Cristian Álvarez @crbelaus.com · 18/12/2024
This is the way.
000
Cristian Álvarez @crbelaus.com · 18/12/2024
TIL that you can use github.com/michallepick... to install prebuilt Erlang versions with asdf instead of compiling them from source. Much faster and less problematic.
github.com
GitHub - michallepicki/asdf-erlang-prebuilt-macos: Erlang plugin for asdf version manager, using Erlang builds by erlef/otp_builds for macOS
Erlang plugin for asdf version manager, using Erlang builds by erlef/otp_builds for macOS - michallepicki/asdf-erlang-prebuilt-macos
081
Cristian Álvarez @crbelaus.com · 17/12/2024
Just compiled my job codebase to #ElixirLang 1.18 rc.0 and it already found dead code (four unused function clauses which were the only callers of some other private functions) and a typing violation (min/2 comparison between two structs).
071
Cristian Álvarez @crbelaus.com · 14/12/2024
Por el momento nada, pero le tengo muchas ganas. Todo lo que he visto es brutal, especialmente esto: bsky.app/profile/giac...
110
Cristian Álvarez @crbelaus.com · 12/12/2024
Elixir 1.18 improves the type inference and checking and is now able to detect dead code, clauses that will never match, etc. hexdocs.pm/elixir/1.18.... This will only get better over time. For example upcoming Elixir versions will be also able to do type inference on guards.
hexdocs.pm
Changelog for Elixir v1.18 — Elixir v1.18.0-rc.0
000
Cristian Álvarez @crbelaus.com · 12/12/2024
This allows the compiler to understand which data structures you are using an helpfully warn you if you try to access non-existing fields. This makes it so much easier to move fields around and rename them confidently.
100
Cristian Álvarez @crbelaus.com · 12/12/2024
Over the last few months I've been in charge of deep data structure refactors on a big #ElixirLang application. I'll write a detailed blog post with the lessons learnt, but the most important takeaway is to rely on pattern match and guards as much as possible.
Screenshot showing a `deactivate/1` function. In one case it pattern matches on the `%User{}` struct so the compiler will warn us if we try to access non-existing fields. In the other case there is no pattern match, so the compiler doesn't know that we are working with a `%User{}` and we will have runtime errors instead of compilation warnings.
130
Cristian Álvarez @crbelaus.com · 11/12/2024
Just added the book to my reading list. I’ve also found the exercises and will start doing them tomorrow morning. Thanks for the recommendation @thebrianb.bsky.social !
010
Cristian Álvarez @crbelaus.com · 10/12/2024
Thanks! I will take a deeper look. I've been also recommended this book: www.goodreads.com/book/show/14...
goodreads.com
Healing Back Pain: The Mind-Body Connection
“Dr. Sarno saved me from a life of pain.” — Howard Ster…
110
Cristian Álvarez @crbelaus.com · 09/12/2024
Good luck! (Or break a leg 😂) We in the Elixir community are thankful for your work!
120
Cristian Álvarez @crbelaus.com · 09/12/2024
Looks like I have to learn other things than playing the guard!
000
Cristian Álvarez @crbelaus.com · 09/12/2024
Very interesting. Thanks! 🙇‍♂️
010
Cristian Álvarez @crbelaus.com · 09/12/2024
He doesn’t recommend me using a standing desk, but I have a strong feeling that switching between sitting and standing while working would benefit me. Anyone with a similar problem has tried the standing desk? Thoughts?
210
Cristian Álvarez @crbelaus.com · 09/12/2024
I’ve been diagnosed with a damaged L4-L5 disk. Doctor tells me that BJJ is not doing any good to my lower back and I’d better do pilates/swimming instead.
250
Cristian Álvarez @crbelaus.com · 07/12/2024
I was going to suggest this same approach: triggers that convert the updated/deleted row to a JSON object that can be logged or archived. @brandur.bsky.social provides a great example in brandur.org/fragments/de...
brandur.org
Easy, alternative soft deletion: `deleted_record_insert`
An alternate to traditional <code>deleted_at</code> soft deletion that stays out of the way and minimizes bugs.
120
Cristian Álvarez @crbelaus.com · 29/11/2024
Wait. I have to check this out.
100
Cristian Álvarez @crbelaus.com · 28/11/2024
This entire thread is word reading if you use git. Maybe even if you don't.
141
Cristian Álvarez @crbelaus.com · 28/11/2024
That's true. We switched from GitHub to GitLab and were able to import everything (issues, pull requests, etc.) but that depends on how good the integration is between providers. Some other providers may not have this integration and thus you would lose the archive.
000
Cristian Álvarez @crbelaus.com · 28/11/2024
You may have just convinced me LOL 😂
010
Cristian Álvarez @crbelaus.com · 28/11/2024
My main gripe is bisecting but I just found out that git bisect supports `--fist-parent` (since Q4 2020) so that makes merges as easy to bisect as squashes. You could easily find the merge that introduced the problem and then, if you need it, go deeper and find the particular commit within.
210
Cristian Álvarez @crbelaus.com · 28/11/2024
That makes sense. I guess it is mostly a function of what the team prefers and is more familiar or comfortable with. I have my preference but I am happy with any merging strategy as long as the team agrees to do it that way and does it consistently.
100
Cristian Álvarez @crbelaus.com · 28/11/2024
Your argument makes sense, but IMHO that is not a fair comparison. I'd say that quashing is more similar to log archiving than deletion. The original commits that made the MR are still available in GitLab/GitHub/etc. along with the feedback from the reviewers, links and other relevant information.
110
Cristian Álvarez @crbelaus.com · 28/11/2024
Also, in my experience MR squashing only works well if MRs are small and focused on single features. If a MR does multiple unrelated things, squashing is a no-go. But I would say that the MR shouldn't do that in the first place.
000
Cristian Álvarez @crbelaus.com · 28/11/2024
So, to summarise: I believe that squashing helps to ensure a relative good commit quality on larger/diverse teams. It also ensures that every commit passes the checks and is deployable, which helps with bisects, cherry-picks and reverts.
210
Cristian Álvarez @crbelaus.com · 28/11/2024
In my experience same thing happens with MR commits. As the team grows it harder and harder to force everyone to use the same commit style (avoid "Fix error", "Fix typo", "Handle feedback", etc) so squashing ensures a minimum unit of work without those unwanted commits.
100
Cristian Álvarez @crbelaus.com · 28/11/2024
I think about squash merges as the code formatter for MRs. Theoretically we could all agree on a particular code style so we wouldn't need a formatter. In practice when the team grows it is impossible to keep everyone using the same style. So we require automatic formatting.
210
Reposted by Cristian Álvarez
Óscar de Arriba ⚗️👨🏼‍💻 @odarriba.dev · 26/11/2024
So nice to see close collaboration between libraries 👏 Thanks @zachdaniel.dev for your awesome work on @ash-hq.org ❤️ And thanks to @crbelaus.com who is co-maintaining ErrorTracker and made the changes to support it 🧙‍♂️
032
Reposted by Cristian Álvarez
Zach Daniel @zachdaniel.dev · 26/11/2024
Awesome stuff! Great for @ash-hq.org users, but you can also get bread crumbs for your errors for free using our standalone splode library: hex.pm/packages/spl...! In anticipation of this release, I went through and added a bunch more breadcrumbs to Ash errors 😎
hex.pm
splode
Splode helps you deal with errors and exceptions in your application that are aggregatable and consistent.
1152
Cristian Álvarez @crbelaus.com · 26/11/2024
The @ash-hq.org integration would not have been possible without @zachdaniel.dev help. He is incredibly responsive and helpful. The #ElixirLang community is incredible.
083
Reposted by Cristian Álvarez
Óscar de Arriba ⚗️👨🏼‍💻 @odarriba.dev · 25/11/2024
Another milestone reached! So proud of being one of the maintainers of this little but useful library ⚗️💻 #ElixirLang
292
Reposted by Cristian Álvarez
johanna @jola.dev · 25/11/2024
I want to share something I built for the Elixir community: elixirevents.net ✨ I want to make it easier to find events like conferences and meetups, to help the community grow. Anyone can contribute, events are only visible with admin approval. For feature requests or feedback please let me know! 🙏
elixirevents.net
ElixirEvents
The Elixir event calendar
510734
Cristian Álvarez @crbelaus.com · 24/11/2024
The ErrorTracker GitHub repo has just reached 400 stars ⭐️. Nice features coming soon! #ElixirLang github.com/elixir-error...
github.com
GitHub - elixir-error-tracker/error-tracker: 🐛 An Elixir-based built-in error reporting and tracking solution
🐛 An Elixir-based built-in error reporting and tracking solution - elixir-error-tracker/error-tracker
0191
Cristian Álvarez @crbelaus.com · 20/11/2024
Only Murders in the Building
100
Cristian Álvarez @crbelaus.com · 19/11/2024
Congratulations! This looks great
020
Cristian Álvarez @crbelaus.com · 18/11/2024
Pull request sent! github.com/Wilfred/diff...
github.com
Improve Elixir HEEx diffs by crbelaus · Pull Request #785 · Wilfred/difftastic
This pull request makes the following changes: Updates the vendored tree-sitter-elixir package Adds a few Elixir example files so we can compare diffs before and after the changes Updates the Elix...
010
Cristian Álvarez @crbelaus.com · 18/11/2024
While preloading with joins results in less DB queries it is not always the most performant option, particularly when used with has_many or many_to_many relationships. I would recommend using preloads without joins by default (parallel preloads are great). Then measure and optimise if necessary.
110