Elixir ▷ Max
@mxgrn.com
1.7K followers 100 following 350 posts
Have *you* fallen for #ElixirLang yet? TILs and reflections from my 9 years with Elixir. Cranking out Elixir for jumpapp.com on weekdays. Cooking on my days off.
Posts Media Videos Starter Packs
Pinned
When to name your #ElixirLang function with a bang?

Only if the function is *expected* to throw errors during normal execution.

Do not simply 'inherit' bangs from what’s inside that function (`Repo.update!`) if those exceptions would signal a bug (that is, should never happen).
Now I MUST get a copy.
Nope, custom config, built through the years. :)
Neovim geeks 🫶 — this helps me debug in #ElixirLang:

With the cursor inside a function, :ElixirCopyFuncFqn copies its fully qualified name (FQN) to the clipboard — ready to paste into IEx, local or remote.

github.com/mxgrn/dotfil...
My favorite application of AI? Sharpening my tools.

Just vibe-coded this toggle for #ElixirLang maps in Neovim.
Want to disable all unmocked HTTP calls from Req at once during #ElixirLang tests?

Simply add this to test/test_helper.exs:

Req.default_options(
adapter: fn req ->
raise "Unmocked call to #{req.url}"
end
)

(replace `raise` with a log warning if that's more useful)
It's easy to keep nudging the AI until it 'fixes' the tests, and it feels like achieving something, while the value of such tests may be plainly negative.
Seeing too many false positives like that lately.
Isn’t it neat that Elixir’s AST is valid Elixir?
What other languages besides Lisp can claim that?
Sotano de las golondrinas ❤️
Interesting! Never realized it had such a narrow application.
A very nice, concise, top-level introduction to Elixir and BEAM. Share it with anyone who's willing to understand why you're so lucky to work with the tech. youtu.be/_5B_B_IgtAg
Practical Arguments for Erlang / Elixir - Shawn McCool
YouTube video by Shawn McCool
youtu.be
Been using Airthings for the past few years, don't know how to assert its accuracy, but otherwise, it works fine.
Ok, I ran out of available <c-somekey> mappings. But guess what, Ghostty enabled the whole bunch of <option-somekey>'s for mapping. Current challenge: what finger do I use to press <option>? 🤔
Just something to casually mention to your next non-Elixir developer friend.
Let’s recap:

BBC uses custom Elixir DSLs to serve

📈 600m+ monthly unique views
💻 12 servers (down from 100
🧑‍💻 7 #elixirlang engineers!

Mind blowing! 🤯
Me: What's your current favorite escape hatch when LiveView doesn't quite cut it?
Chris McCord: Web components with Lit.
#ElixirConfEU
#Elixirlang is syntactic sugar for its AST
Aerospace looks interesting, although usually I have only 1 window per screen (either a browser, or a terminal with tmux or neovim panes).
also helps staying unrecognized