Building a Custom BEAM Virtual Machine: Understanding Erlang/Elixir's Concurrency Primitives
By
cbzbc
An everything bagel for the brain. Substantive, layered, well-seasoned.
Summary
The article is a blog post adaptation of a Code BEAM Europe 2025 talk about creating a custom implementation of the BEAM virtual machine (which runs Erlang, Elixir, and Gleam). The author explores BEAM's core primitives - processes without shared state, message passing with selective receive, and process linking for supervision trees. The content explains how these primitives interact to create robust concurrent systems and discusses the author's journey in understanding and implementing these concepts from scratch.
Key quotes
· 5 pulledI was always fascinated with BEAM, how it allowed easy spawning of processes that didn't share state, allowed for sending and selectively receiving messages, and linking to each other thus enabling creation of supervision trees.
It's an interesting set of primitives that interact in a nice way, and are in my view responsible for much of the success of Erlang and Elixir.
This is my Code BEAM Europe 2025 talk, converted to a blogpost.
EDIT 2025-11-10: Hacker News folks pointed out it might not be clear to everybody what BEAM is: it's the virtual machine for languages like Erlang, Elixir and Gleam.
The BEAM's approach to concurrency - processes without shared state, message passing, and supervision trees - provides a robust foundation for building fault-tolerant systems.
You might also wanna read
Three Methods for Preserving Order in Concurrent Go Applications
This technical article explores three different approaches to preserving data order in concurrent Go applications when processing order matt
Why Average LLM Use Is Likely Destroying Value in Software Development
The author argues that, contrary to prevailing hype, the average use of Large Language Models (LLMs) is likely destroying value rather than
How AI Accelerated Prototyping: From Idea to Tangible in Record Time
The author reflects on how AI has transformed their prototyping workflow. Previously, the biggest bottleneck was the time needed to scaffold
GitLab 19.0 launches with Secrets Manager, agentic workflows, and self-hosted AI models
GitLab 19.0 has been released, positioning itself as an intelligent orchestration platform for DevSecOps. The release includes expanded secr
bit.ly·1d agoCentralizing Error Handling in Rust with Custom AppError Enums
This article discusses the importance of centralizing error handling in Rust applications using a custom AppError enum combined with map_err
Zig Devlog: Build System Rework Separates Maker and Configurer Processes
This devlog entry from the Zig programming language project announces a major rework of the build system, separating the maker process from
