Beamtalk Documentation

April 1, 2026 · View on GitHub

Welcome to the Beamtalk documentation! This guide will help you navigate the design documents and understand how Beamtalk brings Smalltalk's live programming philosophy to the BEAM virtual machine.

Important: Beamtalk is Smalltalk-inspired, not Smalltalk-compatible. We preserve Smalltalk's core ideas (message passing, live environment, uniform syntax) while making pragmatic changes for BEAM and modern development. See Syntax Rationale for details.


Quick Start

New to Beamtalk? Start here:

  1. Design Principles — The core philosophy guiding all decisions
  2. Language Features — Syntax reference and planned features
  3. Examples — Simple programs to see the language in action

Documentation Overview

Core Language Design

DocumentDescription
Design PrinciplesInteractive-first, actors, hot reload, async-first — the foundational ideas
Language FeaturesComplete syntax reference: messages, blocks, classes, strings
Syntax RationaleWhy we keep certain Smalltalk conventions and diverge from others
Object ModelHow "everything is an object" maps to the BEAM (ADR 0005)
Known LimitationsWhat's not yet supported, with workarounds

Architecture & Implementation

DocumentDescription
ArchitectureCompiler pipeline, runtime, and hot code loading
Testing StrategyHow we test the compiler and runtime

Vision & Planning

DocumentDescription
Agent-Native DevelopmentAI agents as developers and live actor systems

Reading Paths

"I want to understand the language"

  1. Design Principles — Philosophy and core ideas
  2. Syntax Rationale — Why Beamtalk looks the way it does
  3. Language Features — Full syntax reference
  4. Examples — See it in practice

"I want to understand how it works"

  1. Architecture — Compiler and runtime overview
  2. Object Model (ADR 0005) — Smalltalk objects on BEAM
  3. Testing Strategy — How we verify correctness

For implementation details, see internal/ documentation.

"I want to build AI agents"

  1. Agent-Native Development — Live actor systems for AI agents
  2. Design Principles — Live programming for exploration

Code Examples

Examples Directory (examples/)

Simple programs demonstrating language features:

  • hello.bt — Simple class with a greeting method
  • counter.bt — Assignment and arithmetic

Use the REPL to load examples:

$ beamtalk repl
> :load examples/hello.bt
Loaded

Standard Library (stdlib/src/)

The foundational classes implementing Smalltalk's "everything is a message" philosophy:

ClassDescription
ObjectBase class for value types; Actor for BEAM processes
BlockFirst-class closures
True / FalseBoolean control flow via messages
UndefinedObjectNull object pattern (nil singleton)
IntegerArbitrary precision arithmetic
StringUTF-8 text with grapheme operations
ArrayFixed-size indexed collection (tuple)
ListLinked list with fast prepend
SetUnordered unique elements
DictionaryKey-value map
RegexRegular expression matching (PCRE2)
DateTimeDate and time operations
JSONJSON parsing and encoding
CollectionAbstract collection protocol

See stdlib/src/README.md for detailed documentation.

Test Cases (test-package-compiler/cases/)

Comprehensive test cases for language features, each containing:

  • .bt source files
  • Expected Core Erlang output (snapshots)

Browse these for real-world usage patterns.


Contributing

See AGENTS.md in the repository root for:

  • Development guidelines
  • Code conventions
  • How to add new features
  • Testing requirements

About Beamtalk

Beamtalk is a Smalltalk/Newspeak-inspired language targeting the BEAM (Erlang VM). It combines:

  • Smalltalk's simplicity — Everything is a message send (with pragmatic BEAM adaptations)
  • BEAM's reliability — Lightweight processes, fault tolerance, hot code reload
  • Live development — No compile-deploy-restart cycle

The compiler is written in Rust and generates Core Erlang, which is then compiled to BEAM bytecode.

Repository: github.com/jamesc/beamtalk