Observability: Reducing noise in Elixir applications
This article is aimed at experienced Elixir developers looking to improve their observability practices and build stronger experience of handling logs and exceptions. https://medium.com/wttj-tech/observability-reducing-noise-in-elixir-applications-5bd39d494101
Bun javascript integration with Phoenix
If you are using Phoenix you may be using the Esbuild integration pacakge. I’ve wrote a new package that can be used to replace Esbuild with Bun and get access to all its features. Switch from Elixir to Bun is mostly straightforward.
Elixir Streams |> Elixir's intersection types
Elixir might be getting types. During ElixirConf, José Valim talked about some of the special challenges in creating types for Elixir.
One of the things he mentioned is the need for an intersection type when we might think a union type would suffice for multiple function heads.
I was a little confused by it, so I did a little more digging. Let me show you why we need that type!
👉 https://www.elixirstreams.com/tips/elixir-intersection-types
Managing Timeouts in GenServer in Elixir: How to Control Waiting Time in Critical Operations
Elixir’s GenServer is a crucial component for building concurrent, fault-tolerant systems. GenServers allow you to create concurrent processes that can maintain internal state and respond to asynchronous messages. One of the most important and versatile options when working with GenServers is :timeout.
IntelliJ Elixir v16.0.0
Changelog
v16.0.0
Incompatible Changes
-
#3327 - @marceloneppel
- Drop support for <= 2023.1 IDEs.
Enhancements
-
#3327 - @marceloneppel
- Support 2023.2 IDEs.
Thinking Elixir News 168
Episode 168 of Thinking Elixir. News includes a new “async” feature being added to LiveView, a new translation library called Kanta was announced, formatted logging, improved keyboard navigation in ExDocs, the Membrane framework released a pure Elixir H264 video plugin, and more!
The Incredible Migration from C++ to Elixir
Ben Murphy gives a walkthrough of the process of migrating from writing C/C++ code to writing Elixir code, and the benefits and lessons learned from it.
Customizing Phoenix Generators
During a recent interview, I learned how easily the Phoenix generators can be customized for our projects. How did I not know this? Do others not know this? This post documents this invisible feature that’s easy to use and can be really powerful for teams with either new or mature projects.
https://fly.io/phoenix-files/customizing-phoenix-generators/
Choosing your tech stack guide
From understanding the anatomy of a tech stack to why it matters, and popular tech stacks to consider. Check this out ➡ https://curiosum.com/blog/choosing-your-tech-stack-guide
#techstack #elixir #reactnative
Unpacking Elixir: Real-time & Latency
Elixir was built on Erlang. Erlang was built to provide “consistently low latency” and a few other audacious goals.
This is the third part of my effort to unpack Elixir and we cover real-time and latency. https://underjord.io/unpacking-elixir-realtime-latency.html
Combining Elixir Gettext functions and macros
Gettext macros can sync PO files automatically but require compile time strings. Gettext functions allow runtime strings but cannot sync PO files automatically. What if there was a way to combine them and get the best of both worlds?
https://crbelaus.com/2023/09/08/combining-elixir-gettext-functions-macros.html
Thinking Elixir 167: Customizing mix phx.new?
Episode 167 of Thinking Elixir. We’ve all run “mix phx.new”, but have you ever thought to customize what that does? We talk with Victor Björklund who explains how we can create customized Phoenix project generators and why we might want to. We also discuss customizing the phoenix generators for our already generated projects. We explore the idea of supporting 3rd-party maintained generators and what that might look like. A fun discussion sure to “generate” ideas for your project!
Introducing Kanta - the ultimate open-source solution to translations in Elixir & Phoenix web apps
Handling translations in web applications can be a challenging and time-consuming task. The process entails managing various files, tracking modifications, and ensuring that translations remain current as the project progresses. These complexities can slow down development and introduce errors. That’s why Curiosum decided to create an open source solution called Kanta.
The Elixir Book Club is starting Genetic Algorithms in Elixir on September 17th.
📘👨💻💜 The Elixir Book Club has chosen our next book!
Genetic Algorithms in Elixir
We meet every two weeks on Sunday mornings via our Discord. The first meeting for the new book is on September 17th. Join us! #MyElixirStatus
You can stop using `form_for`
The standard way to render a <form> in Phoenix used to be the form_for/4 helper, but recent versions of Phoenix added a new function component called <.form>, AKA Phoenix.Component.form/1.
I wasn’t sure when to use form_for/4 instead of <.form>, but it turns out that the answer is “never”. I wrote up my full findings here:
https://phoenixonrails.com/blog/you-can-stop-using-form-for-in-phoenix
Unpacking Elixir: Syntax
Time to cover Elixir syntax: https://underjord.io/unpacking-elixir-syntax.html
Liveview File Uploads to S3
How to add support for LiveView’s interactive file uploads, directly uploading to Amazon S3.
Star-Crossed LiveView Processes
Elixir has many powerful runtime features: processes, monitors, links, supervisors, and more. Sometimes, the hardest part is knowing which building blocks are the best ones for what we want to do. In this post I explore linking processes, trapping exits and running an async Task from a LiveView to solve a different kind of problem.
There’s been a lot written about running an async Task from a LiveView, but I wanted to build a ChatGPT-style UI where the data flows in, not just the final computed result.
In fact, I only care about the series of messages sent as side effects from the running Task. This difference changes how we approach the problem. In the post we see ho process linking is like Romeo & Juliette. When Juliette dies, it causes Romeo to die as well, the two are linked. This is the same for linked processes. But if we trap exits, our LiveView will be “notified” of a Task processes’ death without being killed. Turns out it’s both really simple and really powerful! I ❤️ the BEAM!
https://fly.io/phoenix-files/star-cross-live-view-processes/
