Install Elixir using asdf
There are a number of ways to install Elixir. However, to get the best experience, there are some non-obvious things you need to pay attention to. Here I’ll walk you through how to do this on MacOS and Linux using the asdf version manager project. Why is this important? Many people (myself included) have unknowingly…
Read MoreElixir in VS Code
Visual Studio Code has become a very popular code editor. If you need a code editor for working with Elixir and you don’t already have one in mind, then I suggest giving VS Code a try. This post walks you through setting it up for Elixir development. Elixir development extensions There are many Elixir plug-ins…
Read MoreCreating Your First Mix Project
Creating an Elixir mix project is really easy. A mix project provides some basic structure, sets up a unit testing framework, and can grow with you. When Elixir is installed, it registers a mix command. I create a new project named playing with the command mix new playing. This is what happens: There are two…
Read MoreRunning an Elixir File as a Script
Elixir is able to run “scripts” or files that are compiled into memory (not on disk) and executed. This is helpful when experimenting with larger Elixir code snippets. This is also helpful if you just want to occasionally run one-off scripts to perform some work and exit. File: my_test_script.exs To execute the file, from a…
Read More