Tyler Pachal·Sep 19, 2023Custom Compile-Time Warnings in Elixir Using IO.warn/1❗The original blogpost lives on Github where the Elixir formatting is nicer than it is here on Medium❗
Tyler Pachal·Jun 25, 2020Error handling in Elixir: rescue vs catchThe rescue and catch blocks handle different types of errors, to handle all types of errors use catch/2A response icon2A response icon2
Tyler Pachal·Feb 11, 2020Custom ExUnit AssertionWriting an assert_invalid macro for ExUnit assertions. Implementation at the bottom.A response icon1A response icon1
Tyler Pachal·Sep 27, 2019Tracking Down an ETS-related Memory LeakETS will hold references to large binaries, even if just part of the original binary is stored in a table. Copy binaries if pieces of them…A response icon1A response icon1
Tyler Pachal·Mar 25, 2019IEx Persistent HistoryThe ERL_AFLAGS variable is for setting a list of options which are added to the beginning of the erl command. In this case, we are adding…A response icon1A response icon1
Tyler Pachal·Feb 1, 2019Introduction to handle_continue in Elixir (and when to use it)The handle_continue/2 callback prevents race conditions and allows for faster, asynchronous initialization.A response icon2A response icon2
Tyler Pachal·Jan 21, 2019Using tuple-wrapping to improve `with` expressions in ElixirWrap your return values in tuples so you can clearly match them in the else blockA response icon5A response icon5
Tyler Pachal·Nov 19, 2018Creating an HTTP Server using pure OTPUsing inets and httpd to create a simple HTTP server without adding external dependencies
Tyler Pachal·Nov 12, 2018Why do Erlang modules look like atoms in Elixir?This is a post about how Elixir knows the difference between Erlang modules, Elixir modules, and Elixir atomsA response icon3A response icon3
Tyler Pachal·Aug 10, 2018A use case for match?/2 in ElixirSometimes I come across code where an map (or tuple) is being tested against a pattern to return a boolean result; like this: