<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>Coder Legion - Recent posts tagged erlang</title>
<link>https://coderlegion.com/tag/erlang</link>
<description>Powered by Question2Answer</description>
<item>
<title>Getting Started with Elixir: Understanding Erlang, BEAM, and Your First Mix Project</title>
<link>https://coderlegion.com/10308/getting-started-with-elixir-understanding-erlang-beam-and-your-first-mix-project</link>
<description>&lt;h3 id=&quot;introduction&quot;&gt;Introduction&lt;/h3&gt;
&lt;p&gt;In the previous article, we covered how to set up the development environment to start working with Elixir.&lt;br&gt;
Now it’s time to talk about the language itself and write our first real code.&lt;/p&gt;
&lt;p&gt;If you are coming from languages like JavaScript, Ruby, or Python, some concepts may feel unfamiliar at first — and that’s totally normal.&lt;/p&gt;
&lt;p&gt;Let’s start by understanding why we had to install both &lt;strong&gt;Elixir and Erlang&lt;/strong&gt;.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;elixir-vs-erlang&quot;&gt;Elixir vs Erlang&lt;/h3&gt;
&lt;p&gt;Erlang is a programming language created decades ago to solve problems related to &lt;strong&gt;telecommunication systems&lt;/strong&gt;, such as reliability, concurrency, and fault tolerance.&lt;/p&gt;
&lt;p&gt;It is extremely powerful, but its syntax is considered quite complex for many developers.&lt;/p&gt;
&lt;p&gt;This is where Elixir comes in.&lt;/p&gt;
&lt;p&gt;Elixir provides a &lt;strong&gt;modern and friendly syntax&lt;/strong&gt;, while still running on top of the same runtime as Erlang.&lt;br&gt;
In practice, your Elixir code is compiled to Erlang bytecode and executed by the same virtual machine.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;what-is-beam-&quot;&gt;What is BEAM?&lt;/h3&gt;
&lt;p&gt;BEAM stands for &lt;strong&gt;Bogdan/Björn’s Erlang Abstract Machine&lt;/strong&gt;, named after its original creators.&lt;/p&gt;
&lt;p&gt;It is the virtual machine responsible for running Erlang and Elixir code, similar to how the JVM runs Java and Kotlin.&lt;/p&gt;
&lt;p&gt;BEAM is famous for:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Lightweight processes  &lt;/li&gt;
&lt;li&gt;Massive concurrency  &lt;/li&gt;
&lt;li&gt;Fault-tolerant design  &lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This is one of the main reasons Elixir is used in systems that require high availability.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;creating-your-first-project-with-mix&quot;&gt;Creating Your First Project with Mix&lt;/h3&gt;
&lt;p&gt;The best way to learn a programming language is by building something.&lt;/p&gt;
&lt;p&gt;Reading documentation and watching tutorials helps, but real learning happens when you actually write code.&lt;/p&gt;
&lt;p&gt;In Elixir, we use &lt;strong&gt;Mix&lt;/strong&gt;, the built-in build tool and project manager.&lt;/p&gt;
&lt;p&gt;Mix is responsible for:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Creating projects  &lt;/li&gt;
&lt;li&gt;Compiling code  &lt;/li&gt;
&lt;li&gt;Managing dependencies  &lt;/li&gt;
&lt;li&gt;Running tasks and tests  &lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Let’s create a new project.&lt;/p&gt;
&lt;p&gt;In your terminal, run:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;mix new basics
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;You should see an output similar to:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-text&quot;&gt;* creating README.md
* creating .formatter.exs
* creating .gitignore
* creating mix.exs
* creating lib
* creating lib/basics.ex
* creating test
* creating test/test_helper.exs
* creating test/basics_test.exs
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Now enter the project directory:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;cd basics
&lt;/code&gt;&lt;/pre&gt;
&lt;hr&gt;
&lt;h3 id=&quot;modules-and-functions&quot;&gt;Modules and Functions&lt;/h3&gt;
&lt;p&gt;Inside the &lt;code&gt;lib&lt;/code&gt; directory, you will find the file &lt;code&gt;basics.ex&lt;/code&gt; with the following content:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-elixir&quot;&gt;defmodule Basics do
end
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;In Elixir, almost all code lives inside &lt;strong&gt;modules&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;A module is simply a &lt;strong&gt;collection of functions&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;Let’s add our first function:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-elixir&quot;&gt;defmodule Basics do
  def create_list do
    [1, 2, 3, &quot;little indians&quot;]
  end
end
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;We use &lt;code&gt;def&lt;/code&gt; to define a function inside the &lt;code&gt;Basics&lt;/code&gt; module.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;running-the-project-with-iex&quot;&gt;Running the Project with IEx&lt;/h3&gt;
&lt;p&gt;To run and test our code, we use &lt;strong&gt;IEx (Interactive Elixir Shell)&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;It works like Python’s REPL or Ruby’s IRB, allowing you to run Elixir code interactively.&lt;/p&gt;
&lt;p&gt;From the project directory, run:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;iex -S mix
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Now test the function:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-elixir&quot;&gt;Basics.create_list()
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;You should get:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-elixir&quot;&gt;[1, 2, 3, &quot;little indians&quot;]
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Notice that the last expression is automatically returned.&lt;br&gt;
This is called &lt;strong&gt;implicit return&lt;/strong&gt;, which is common in functional programming.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;object-oriented-vs-functional-programming&quot;&gt;Object-Oriented vs Functional Programming&lt;/h3&gt;
&lt;p&gt;In object-oriented languages, you usually create objects and call methods on them.&lt;/p&gt;
&lt;p&gt;In functional programming, functions return values directly without relying on object instances.&lt;/p&gt;
&lt;p&gt;In Elixir:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;There are no classes  &lt;/li&gt;
&lt;li&gt;Modules are not objects  &lt;/li&gt;
&lt;li&gt;Functions return data  &lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;A module is just a namespace for functions, nothing more.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;understanding-arity&quot;&gt;Understanding Arity&lt;/h3&gt;
&lt;p&gt;In Elixir, functions are identified not only by their name, but also by the &lt;strong&gt;number of arguments&lt;/strong&gt; they receive.&lt;/p&gt;
&lt;p&gt;This is called &lt;strong&gt;arity&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;Let’s create a new function:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-elixir&quot;&gt;def shuffle(list) do
end
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Now recompile inside IEx:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-elixir&quot;&gt;recompile
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;And try calling:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-elixir&quot;&gt;Basics.shuffle()
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;You will see an error similar to:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-text&quot;&gt;function Basics.shuffle/0 is undefined. Did you mean shuffle/1?
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;That means the function expects &lt;strong&gt;one argument&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;Example:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-elixir&quot;&gt;defmodule Basics do
  def hello(), do: &quot;Hello World&quot;            # hello/0
  def hello(name), do: &quot;Hello, #{name}&quot;    # hello/1
  def hello(a, b), do: &quot;#{a} and #{b}&quot;      # hello/2
end
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;These are considered &lt;strong&gt;different functions&lt;/strong&gt; because of their arity.&lt;/p&gt;
&lt;p&gt;Arity is written as:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;function_name/number_of_arguments
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;It becomes very important later when working with pattern matching and function clauses.&lt;/p&gt;
&lt;p&gt;More about functions and arity:&lt;br&gt;
&lt;a rel=&quot;nofollow&quot; href=&quot;https://elixirschool.com/en/lessons/basics/functions/&quot;&gt;https://elixirschool.com/en/lessons/basics/functions/&lt;/a&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;conclusion&quot;&gt;Conclusion&lt;/h3&gt;
&lt;p&gt;In this article we covered:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The relationship between Elixir and Erlang  &lt;/li&gt;
&lt;li&gt;What BEAM is and why it matters  &lt;/li&gt;
&lt;li&gt;How to create projects with Mix  &lt;/li&gt;
&lt;li&gt;How modules and functions work  &lt;/li&gt;
&lt;li&gt;What function arity means  &lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;In the next article, we’ll continue improving this project and exploring more Elixir features.&lt;/p&gt;
&lt;p&gt;See you soon!&lt;/p&gt;
</description>
<category>Articles</category>
<guid isPermaLink="true">https://coderlegion.com/10308/getting-started-with-elixir-understanding-erlang-beam-and-your-first-mix-project</guid>
<pubDate>Thu, 22 Jan 2026 23:35:11 +0000</pubDate>
</item>
<item>
<title>Elixir Setup Guide: Installing Erlang, Elixir, and Livebook with ASDF</title>
<link>https://coderlegion.com/9610/elixir-setup-guide-installing-erlang-elixir-and-livebook-with-asdf</link>
<description>&lt;h3 id=&quot;introduction-1&quot;&gt;Introduction&lt;/h3&gt;
&lt;p&gt;This article is part of a beginner series where I document my personal journey learning &lt;strong&gt;Elixir&lt;/strong&gt; and taking my first real steps in its ecosystem.&lt;/p&gt;
&lt;p&gt;I recently came from &lt;strong&gt;Node.js&lt;/strong&gt;, where setting up a development environment is usually very simple: install Node, get npm, add some VS Code extensions, and you're ready to go.&lt;/p&gt;
&lt;p&gt;With Elixir, the process is not hard, but I had a tough time finding a clear step-by-step guide. I ended up skipping important steps, which later caused a lot of unnecessary problems to fix.&lt;/p&gt;
&lt;p&gt;So in this guide, I’ll walk you through &lt;strong&gt;how to set up your Elixir environment from scratch&lt;/strong&gt; using ASDF.&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; I’m using &lt;strong&gt;Linux Mint&lt;/strong&gt;, but the same process applies to most Linux distributions with small adjustments.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;img src=&quot;https://i.giphy.com/media/4Zgy9QqzWU8C3ugvCa/giphy-downsized.gif&quot; alt=&quot;pinguim gif&quot;&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;what-is-asdf-and-why-use-it-&quot;&gt;What Is ASDF and Why Use It?&lt;/h3&gt;
&lt;p&gt;&lt;img src=&quot;https://i.giphy.com/media/yoJC2qZ23Pb8HQI08g/giphy.gif&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
&lt;p&gt;The first thing we’ll install is a small but very powerful tool called &lt;strong&gt;ASDF&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;[ASDF][1] is a &lt;strong&gt;version manager&lt;/strong&gt; that allows you to install and manage multiple versions of languages and runtimes — including &lt;strong&gt;Erlang&lt;/strong&gt; and &lt;strong&gt;Elixir&lt;/strong&gt; — on the same machine.&lt;/p&gt;
&lt;p&gt;That means:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;You can easily switch between versions&lt;/li&gt;
&lt;li&gt;Projects can define their own required versions&lt;/li&gt;
&lt;li&gt;Your global system stays clean&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Grab some coffee ☕ and let’s start.&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;step-1-installing-asdf&quot;&gt;Step 1: Installing ASDF&lt;/h3&gt;
&lt;p&gt;First, go to the official website:&lt;br&gt;
&lt;a rel=&quot;nofollow&quot; href=&quot;https://asdf-vm.com/&quot;&gt;https://asdf-vm.com/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Click on &lt;strong&gt;Get Started&lt;/strong&gt; and check the installation method for your operating system.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://coderlegion.com/?qa=blob&amp;amp;qa_blobid=4969792934007661136&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
&lt;p&gt;On Linux Mint (and Ubuntu-based distros), make sure you have &lt;code&gt;curl&lt;/code&gt; and &lt;code&gt;git&lt;/code&gt; installed:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;sudo apt install curl git
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Now clone the ASDF repository:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;git clone https://github.com/asdf-vm/asdf.git ~/.asdf --branch v0.9.0
&lt;/code&gt;&lt;/pre&gt;
&lt;h4 id=&quot;shell-integration-very-important-&quot;&gt;Shell Integration (Very Important)&lt;/h4&gt;
&lt;p&gt;This step is critical so your terminal can recognize the &lt;code&gt;asdf&lt;/code&gt; command.&lt;/p&gt;
&lt;h5 id=&quot;if-you-use-oh-my-zsh&quot;&gt;If you use Oh My Zsh&lt;/h5&gt;
&lt;p&gt;Follow the plugin instructions from:&lt;br&gt;
&lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/ohmyzsh/ohmyzsh/tree/master/plugins/asdf&quot;&gt;https://github.com/ohmyzsh/ohmyzsh/tree/master/plugins/asdf&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Basically, add this line to your &lt;code&gt;~/.zshrc&lt;/code&gt; file:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;plugins=(git asdf)
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Then close and reopen your terminal.&lt;/p&gt;
&lt;h5 id=&quot;if-you-use-bash&quot;&gt;If you use Bash&lt;/h5&gt;
&lt;p&gt;&lt;img src=&quot;https://coderlegion.com/?qa=blob&amp;amp;qa_blobid=3452091372340258109&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
&lt;p&gt;Add these two lines to your &lt;code&gt;~/.bashrc&lt;/code&gt; file:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;. $HOME/.asdf/asdf.sh
. $HOME/.asdf/completions/asdf.bash
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Restart the terminal.&lt;/p&gt;
&lt;h4 id=&quot;verify-installation&quot;&gt;Verify Installation&lt;/h4&gt;
&lt;p&gt;Run:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;asdf --version
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;You should see something similar to:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-text&quot;&gt;v0.9.0-9ee24a3
&lt;/code&gt;&lt;/pre&gt;
&lt;hr&gt;
&lt;h3 id=&quot;step-2-installing-the-erlang-plugin&quot;&gt;Step 2: Installing the Erlang Plugin&lt;/h3&gt;
&lt;p&gt;With ASDF installed, we can now install plugins. Let’s start with &lt;strong&gt;Erlang&lt;/strong&gt;.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;asdf plugin-add erlang
&lt;/code&gt;&lt;/pre&gt;
&lt;h4 id=&quot;installing-system-dependencies&quot;&gt;Installing System Dependencies&lt;/h4&gt;
&lt;p&gt;Before compiling Erlang, we must install some required packages.&lt;/p&gt;
&lt;p&gt;For Linux Mint / Ubuntu 20-based systems:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;sudo apt-get -y install build-essential autoconf m4 libncurses5-dev libwxgtk3.0-gtk3-dev libgl1-mesa-dev libglu1-mesa-dev libpng-dev libssh-dev unixodbc-dev xsltproc fop libxml2-utils libncurses-dev openjdk-11-jdk
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;img src=&quot;https://coderlegion.com/?qa=blob&amp;amp;qa_blobid=4250902851566363072&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
&lt;p&gt;These dependencies are listed in the official ASDF Erlang plugin repository:&lt;br&gt;
&lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/asdf-vm/asdf-erlang&quot;&gt;https://github.com/asdf-vm/asdf-erlang&lt;/a&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;step-3-installing-erlang&quot;&gt;Step 3: Installing Erlang&lt;/h3&gt;
&lt;p&gt;List all available Erlang versions:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;asdf list-all erlang
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;img src=&quot;https://coderlegion.com/?qa=blob&amp;amp;qa_blobid=2914432950873415211&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
&lt;p&gt;Install the latest stable version at the time of writing:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;asdf install erlang 24.2.1
&lt;/code&gt;&lt;/pre&gt;
&lt;blockquote&gt;&lt;p&gt;&lt;strong&gt;Tip:&lt;/strong&gt; This step takes time and may look frozen. That’s normal. Be patient.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;img src=&quot;https://coderlegion.com/?qa=blob&amp;amp;qa_blobid=12081288385957681070&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
&lt;h4 id=&quot;set-erlang-as-global-version&quot;&gt;Set Erlang as Global Version&lt;/h4&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;asdf global erlang 24.2.1
&lt;/code&gt;&lt;/pre&gt;
&lt;h4 id=&quot;test-erlang&quot;&gt;Test Erlang&lt;/h4&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;erl
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;If you see the Erlang shell, everything is working.&lt;br&gt;
Exit with &lt;code&gt;Ctrl + C&lt;/code&gt; twice.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://coderlegion.com/?qa=blob&amp;amp;qa_blobid=3602725178836810932&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;step-4-installing-elixir-with-asdf&quot;&gt;Step 4: Installing Elixir with ASDF&lt;/h3&gt;
&lt;p&gt;Now let’s install the Elixir plugin:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;asdf plugin-add elixir
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;List available versions:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;asdf list-all elixir
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Since we installed Erlang OTP 24, we must install an Elixir version built for OTP 24.&lt;/p&gt;
&lt;p&gt;At the time of writing:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;asdf install elixir 1.13.3-otp-24
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Set it globally:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;asdf global elixir 1.13.3-otp-24
&lt;/code&gt;&lt;/pre&gt;
&lt;h4 id=&quot;test-elixir&quot;&gt;Test Elixir&lt;/h4&gt;
&lt;p&gt;Start IEx:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;iex
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;You should see the Elixir interactive shell.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://coderlegion.com/?qa=blob&amp;amp;qa_blobid=12211755436164361430&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
&lt;h4 id=&quot;hello-world&quot;&gt;Hello World&lt;/h4&gt;
&lt;p&gt;&lt;img src=&quot;https://coderlegion.com/?qa=blob&amp;amp;qa_blobid=16018175787732953936&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
&lt;p&gt;Inside IEx:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-elixir&quot;&gt;IO.puts(&quot;Hello World&quot;)
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Welcome to Elixir &lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;step-5-using-livebook-for-experiments-and-notes&quot;&gt;Step 5: Using Livebook for Experiments and Notes&lt;/h3&gt;
&lt;p&gt;&lt;img src=&quot;https://coderlegion.com/?qa=blob&amp;amp;qa_blobid=9478895543657364402&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Livebook&lt;/strong&gt; is similar to Jupyter Notebook for Python.&lt;/p&gt;
&lt;p&gt;It allows you to:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Write executable Elixir code&lt;/li&gt;
&lt;li&gt;Document your learning&lt;/li&gt;
&lt;li&gt;Save notebooks as Markdown&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h3 id=&quot;installing-livebook&quot;&gt;Installing Livebook&lt;/h3&gt;
&lt;p&gt;Go to the official repository:&lt;br&gt;
&lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/livebook-dev/livebook&quot;&gt;https://github.com/livebook-dev/livebook&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Since Elixir is already installed globally, run:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;mix escript.install hex livebook
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Confirm installation when prompted.&lt;/p&gt;
&lt;p&gt;Because we’re using ASDF, we must refresh shims:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;asdf reshim
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Start Livebook:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;livebook server
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Now open your browser and go to:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-text&quot;&gt;http://localhost:8080
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;img src=&quot;https://coderlegion.com/?qa=blob&amp;amp;qa_blobid=14719100701539462777&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&quot;conclusion-1&quot;&gt;Conclusion&lt;/h3&gt;
&lt;p&gt;In this article, we covered how to:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Install &lt;strong&gt;ASDF&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Install &lt;strong&gt;Erlang&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Install &lt;strong&gt;Elixir&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Set up &lt;strong&gt;Livebook&lt;/strong&gt; locally&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This setup gives you a solid and flexible environment to start learning and building with Elixir.&lt;/p&gt;
&lt;p&gt;In the next articles of this series, we’ll finally start writing real Elixir code.&lt;/p&gt;
&lt;p&gt;See you in the next post ⚡&lt;/p&gt;
</description>
<category>Tutorials</category>
<guid isPermaLink="true">https://coderlegion.com/9610/elixir-setup-guide-installing-erlang-elixir-and-livebook-with-asdf</guid>
<pubDate>Mon, 12 Jan 2026 20:42:17 +0000</pubDate>
</item>
</channel>
</rss>