In order to start programming in Elixir and Elm, we first need to install those on our development machine. We introduce to you asdf, a CLI for managing multiple language runtime versions. This post is part of the functional language series.
Imagine that you are an experienced freelance Elixir programmer and you have two clients. The first project is using Elixir 1.7 and the second client likes to be on the edge and it is using Elixir 1.10. How to run two Elixir versions on your laptop? Even better, how to set appropriate Elixir versions when you are in the client project folder? The answer is asdf!
Here is the official asdf page for how to install asdf.
Using git, clone current version. After that, follow instructions for your shell. But there is no Windows installation page!? For Windows 10, I suggest installing WSL and Ubuntu 18.04. Ubuntu is using bash by default.
As every mature tool, asdf is also using Plugins. We need three plugins, Erlang, Elixir, and Nodejs (this is for Elm).
Links above have instructions on how to install those plugins. After that, we do the following:
asdf install erlang 21.3
asdf install elixir 1.10
asdf install nodejs 12.16.1
Now comes the magic.
git clone firstname.lastname@example.org:karlosmid/elixir-elm.git
And cd to elixir-elm folder.
Install elm using nodejs:
npm install -g elm
We are using elm 0.19.1
The beauty of asdf is that all installations could be found in your home folder in .asdf folder. Remember, when you work in terminal on Unix flavored operating system (OSX, Ubuntu), your starting point is always your home folder designated with Tilda
~ character. We are ready to do some programming!