Language

Elixir

First appeared
2012
Paradigm
Functional, concurrent
Toolchain
Elixir 1.18.3
Container image
debian:trixie-20261027-slim + elixir 1.18.3.dfsg-1

Elixir was created by José Valim and first released in 2012. It runs on the Erlang virtual machine, here Erlang/OTP 27, which Ericsson built in the 1980s for telephone switches that had to keep running for years. Elixir gives that machine a friendlier syntax and keeps its strengths: millions of lightweight processes, and systems that restart the parts that fail. Discord’s chat servers and the Phoenix web framework are built on it.

Elixir is functional, and its data never changes in place. A function takes values and returns new ones, and the pipe operator, |>, chains them: path |> File.read!() |> String.split("\n"). Pattern matching takes values apart, as in [header | rows] = lines. Elixir can call any Erlang library directly, so the square root is :math.sqrt. Packages from Hex, Elixir’s package manager, aren’t installed here, including Nx, its numerical library.

Quirks

Concepts in Elixir

Run the examples locally

You need Docker and Python 3. The harness builds the pinned container and runs every Elixir example:

git clone https://github.com/qnixon/dswithx.git
cd dswithx
python3 harness/run_tests.py --language elixir