Erlang course

Erlang is a functional language built for systems that must not stop: a runtime of tiny processes, messages instead of shared memory, and a failure that stays inside the process that failed. The course takes one idea per lesson, shows whole programs with the output they really printed, and ends with two capstone projects.

Every example was compiled and run with Erlang/OTP 27 on Alpine Linux 3.24.3 in a Docker container. There is no Hex and no network in that container, so the course stays on OTP and its standard library; a lesson that would need another package says so instead of showing an invented result. The first part installs the toolchain and links one page per system.

Erlang course: Start What Erlang is, the install, the shell, a first program, and how a module becomes a running process. Open Erlang course: Values and types Variables and single assignment, numbers, atoms, strings, no truthiness, comparisons, conversions and bit syntax. Open Erlang course: Control flow and collections Conditions and recursion, lists, tuples, maps, comprehensions, and the operations each collection is good at. Open λ Erlang course: Functions and pattern matching Functions and clauses, pattern matching, guards, records, headers, and the macros of a module. Open Erlang course: Errors, modules and style Exceptions, modules and exports, funs and higher-order code, keyword lists and the idioms of the language. Open { } Erlang course: Builds, tests and debugging rebar3 projects, EUnit, the debugger and tracing, and the tools that keep a build honest. Open Erlang course: Data and the standard library Unicode, time, JSON, the standard library modules, regular expressions and the term formats. Open Erlang course: Processes and concurrency Processes and mailboxes, spawn and links, monitors and exits, and the protocols two processes agree on. Open Erlang course: OTP behaviours gen_server, supervisors and applications, and the behaviour a real OTP process is built from. Open Erlang course: Files, IO and the network Files and IO, sockets and TCP, an HTTP client, and the output formatting every program needs. Open Erlang course: Fault tolerance, storage and distribution Let it crash, ETS and DETS tables, timers, code loading, hot upgrades and distributed nodes. Open Erlang course: Projects and practice Two capstone projects, performance, modern Erlang, and the errors a beginner meets. Open

All articles

About the course

Start with What is Erlang and where it runs, then install the toolchain and read the version lines. Each lesson ends with the previous and next page of the reading order, so the course can be read from the first page to the last without opening the tree.

For a short introduction before the course read Erlang basics. The Elixir course runs on the same virtual machine with a different syntax, and the Scala course shows the typed functional style on the JVM.