Erlang and Elixir both run on the BEAM

Learn by doingErlang+Elixir

Start with values, types, and functions. Once the syntax feels familiar, see how processes work together.Elixir and Erlang each have their own beginner path. Pick one. You do not need to learn both at once.

2beginner paths
62language lessons
7BEAM core stations
2 / 2reviews / bilingual extensions
BEAM RUNTIME
message
DOWN
reply
VMBEAMprocess · mailbox
scheduler · isolation
01ElixirGenServer
02Erlanggen_server
03OTPSupervisor
S1
S2
S3
Four connected steps

Learn the language. Then read a real system.

The language paths teach code, tests, and project tools. The BEAM path deals with concurrency, failure, and recovery. After the capstone, Case Chat shows those choices inside a working voice service.

04
CASE STUDY

Case Chat: trace a voice service

Chinese case study

Follow one voice session through a real project, then read Mix, supervision, WebSockets, recorder processes, and browser code in context. The case study is currently written in Chinese.

How to learn

Guess first. Then run the code.

Every lesson has code you can change. If the output surprises you, read it, then change one thing. That makes the cause easier to find.

01

Run code first

A short example in every lesson

Every new idea comes with a small example for IEx or erl. The page also shows messages moving between processes.

02

See both forms

One task, two languages

Solve the same problem in Elixir and Erlang. The syntax differs, but both run on the BEAM.

03

Change one thing

49 small challenges

Answer a question, translate a snippet, or change one condition. A wrong answer is still useful: it tells you what to try next.

04

Let it break

Safe failure experiments

Delay a reply, fill a mailbox, or stop a process. Watch what happens—and notice what the experiment cannot prove.

Where the paths meet

Different syntax. Shared bones.

Once you know one language, you do not need to relearn everything. Spot the same values, patterns, and functions, then see how both use BEAM processes and messages.

  1. 1
    Use the familiar language as a ruler

    Start with the data and functions you already understand.

  2. 2
    Compare the other spelling

    Find the same atoms, tuples, patterns, and modules.

  3. 3
    Share the runtime skills

    Learn processes, messages, and supervision together.

See how the two languages line up
ELIXIR
ONE VM
ERLANG
:okthe same atom labelok
Foo.bar()the same module underneath'Elixir.Foo':bar()
:lists.reverse(xs)the same Erlang toollists:reverse(Xs)
fn x -> x * 2 endboth create an anonymous functionfun(X) -> X * 2 end
GenServerthe same OTP behaviourgen_server
Problem-driven · BEAM mainline

From one concrete failure to a reliable system

The core has 7 stations, plus 2 placement reviews and 2 bilingual extensions. Finish processes, OTP, capacity, and the capstone in your familiar language. Add shared terms and adapters when you need interoperability.

Core progress · setup, reviews, and bilingual extensions excluded0 / 7 core stations
0%
01

Get ready and meet the BEAM

Check the tools, then use a first process to separate functions, state ownership, PIDs, and messages.

02

Add a language when needed

Review the other language only when you need it. A single-language learner can keep moving.

03

Handle concurrency failures

Enter OTP through late replies, mailbox growth, restart scope, and capacity limits.

04

Protect system boundaries

The core runs from node loss to the capstone. Take the shared-term and adapter branch only when two languages must work together.

Try it for 3 minutes

Send a message. Wait for a reply.

Every process has a mailbox. Send a few messages, then handle them one by one. Turn on “drop reply” to see what happens when work is handled but no answer comes back.

  • 01Sending a message does not mean it was received or handled
  • 02A timeout ends the wait; it does not recall the message
  • 03A mailbox can pile up if work arrives faster than it is handled
Message lab
PROCESS 01clientsends requests
→
MAILBOX0
Waiting for a message
→
PROCESS 02serverHandled 0
The mailbox is emptyreply: normal
Event logNewest first

01Waiting for the client to send a message

This browser model shows how messages move. It is not a real Erlang VM. Use it to watch messages queue up and receive replies. The lesson pages also include code you can run in IEx or erl.

Station 08 · Capstone

Build a task scheduler

Build the core in either Elixir or Erlang: bound the queue, name each failure outcome, and cap retries. Add the other language only after the interoperability lessons.

Bounded queueSupervision treeRetry / idempotencyOptional bilingual extensionRelease
See the requirements
APPLICATION APIvalidate · normalize · reply
SCHEDULER COREqueue · dispatch · retry
worker 01
worker 02
worker 03
SUPERVISORexit → observe → recover