Learn Erlang
Step-By-Step
We at Pennypack Software are starting a new project using Elixir. We prefer to build our understanding from the ground up, so we felt it was best to learn Erlang before learning its Ruby-inspired modern incarnation. We built this tutorial to teach ourselves Erlang and are open sourcing it to help others on the same journey.
Open Source Tutorial in Active Development
This tutorial is open source and actively being developed. We're publishing lessons as we complete them to get community feedback and contributions. Subscribe to be notified when new lessons are added, or contribute on GitHub!
Hands-on Project
Build a real-time chat server handling thousands of concurrent connections
Interactive Koans
Master concepts through fill-in-the-blank exercises with instant feedback
Battle-tested Patterns
Learn OTP behaviors powering WhatsApp, Discord, and telecom systems
Why Erlang Powers the World's Most Reliable Systems
From WhatsApp handling billions of messages to Ericsson's 99.9999999% uptime telecom switches, Erlang's unique approach to concurrency and fault tolerance is unmatched.
True Concurrency at Scale
Spawn millions of lightweight processes, each with their own memory and garbage collection. No shared state, no locks, no race conditions.
"Let It Crash" Philosophy
Instead of defensive programming, embrace failure. Supervisors restart crashed processes in milliseconds, maintaining system integrity.
Hot Code Swapping
Update running systems without downtime. Deploy fixes while maintaining all connections and state.
1> Pid = spawn(fun() ->
receive
{hello, From} ->
From ! {ok, "Hello, World!"}
end
end).
<0.84.0>
2> Pid ! {hello, self()}.
{hello,<0.80.0>}
3> flush().
Shell got {ok,"Hello, World!"}
ok
A Structured Path to Mastery
35 lessons taking you from "Hello, World!" to building distributed systems. Each lesson builds on the last, with interactive exercises to cement your understanding.
Foundation
Lessons 1-8
Master Erlang syntax, pattern matching, and process fundamentals
Building
Lessons 9-20
Implement OTP patterns, TCP/WebSocket protocols, and chat features
Advanced
Lessons 21-35
Deploy distributed systems with monitoring, scaling, and operations
System Setup and Your First Project
Get your Erlang development environment set up and create the project structure for our WebSocket chat server
Your First Erlang Module
Learn Erlang's basic syntax, modules, functions, and data types by building utility functions for our chat server
Pattern Matching - Erlang's Superpower
Master Erlang's most powerful feature - pattern matching - to elegantly handle data structures and build robust chat server components
Recursion
Master recursive functions and learn how to break problems into smaller, manageable pieces using Erlang's powerful recursive programming model
Higher-Order Functions
Master higher-order operations like map, filter, and fold to build elegant data processing pipelines for our chat server
Ready to Build Unbreakable Systems?
Start your journey into the world of fault-tolerant, distributed computing.
Begin Learning Erlang