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
mxgrn.com
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).
mxgrn.com
Now I MUST get a copy.
mxgrn.com
Nope, custom config, built through the years. :)
mxgrn.com
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...
mxgrn.com
My favorite application of AI? Sharpening my tools.

Just vibe-coded this toggle for #ElixirLang maps in Neovim.
mxgrn.com
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)
mxgrn.com
Very high level!
mxgrn.com
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.
mxgrn.com
Isn’t it neat that Elixir’s AST is valid Elixir?
What other languages besides Lisp can claim that?
mxgrn.com
Sotano de las golondrinas ❤️
mxgrn.com
Interesting! Never realized it had such a narrow application.
mxgrn.com
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
mxgrn.com
Been using Airthings for the past few years, don't know how to assert its accuracy, but otherwise, it works fine.
mxgrn.com
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>? 🤔
mxgrn.com
Just something to casually mention to your next non-Elixir developer friend.
joshcprice.bsky.social
Let’s recap:

BBC uses custom Elixir DSLs to serve

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

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