Beamtalk API Reference

The standard library for Beamtalk, where everything is a message send.

See each class page for full API documentation and usage examples.

Choosing a Base Class

When defining a new class, pick one of these three base classes:

Base classWhen to use
ObjectGeneral-purpose reference types — containers, handles, exceptions, and anything with mutable or I/O-bearing state.
ValueImmutable scalar value types — Boolean, Number, DateTime, Regex, CompiledMethod, StackFrame. Equality is structural; instances are interchangeable.
ActorStateful concurrent objects backed by a gen_server process. Use when an object must own private state and handle concurrent messages safely.

Class Hierarchy

  • ProtoObject Root of the Beamtalk class hierarchy.
    • Erlang Gateway to the BEAM ecosystem.
    • ErlangModule Proxy for calling functions on a specific Erlang module.
    • Object Base class for all Beamtalk objects.
      • Actor Base class for process-based objects.
        • ClassBuilder Fluent builder for creating and registering Beamtalk classes.
        • ReactiveSubprocess Actor for push-mode subprocess delivery.
        • Server Abstract Actor subclass for BEAM-level OTP interop.
        • Subprocess Actor for interactive bidirectional communication with OS processes.
        • TimeoutProxy Transparent forwarding proxy with configurable timeout.
        • TranscriptStream Per-workspace shared log with pub/sub semantics.
      • AtomicCounter named integer counter backed by ETS for lock-free increments.
      • BeamtalkInterface Workspace-level reflection and class registry.
      • Behaviour Abstract superclass of all class-describing objects.
        • Class A concrete class in the Beamtalk system.
          • Metaclass The class of all metaclass objects in the Beamtalk system.
      • Block First-class closures (anonymous functions).
      • DynamicSupervisor Abstract base class for dynamic OTP supervision trees.
      • Ets shared in-memory table for actor state sharing.
      • Exception Base class for all exceptions.
      • File File system operations.
      • FileHandle a handle to an open file.
      • Json JSON encoding and decoding.
      • Logger structured logging via Erlang's logger.
      • OS shell command execution.
      • Pid BEAM process identifier.
      • Port BEAM port identifier.
      • Protocol Runtime protocol registry queries (ADR 0068 Phase 2c).
      • Reference BEAM unique reference.
      • Stream Lazy, closure-based sequences.
      • Supervisor Abstract base class for static OTP supervision trees.
      • Symbol Atomic identifiers.
      • System OS environment, platform detection, and process info.
      • TestResult Structured result from running a test suite.
      • TestRunner Programmatic test execution returning structured results.
      • Time current time accessors.
      • Timer schedule delayed and repeating work via Erlang timer primitives.
      • Tracing Actor observability, trace context, and performance telemetry.
      • UndefinedObject The absence of a value.
      • Value Base class for immutable value types.
        • Boolean Abstract superclass for True and False.
          • False The false boolean value.
          • True The true boolean value.
        • Collection Abstract superclass for all collections.
          • Array Fixed-size indexed collection with O(log n) random access.
          • Bag Immutable multiset (unordered collection allowing duplicate elements).
          • Binary byte-level data and serialization.
            • String UTF-8 text operations.
          • Dictionary Immutable key-value collection.
          • Interval An arithmetic sequence of integers.
          • List Ordered collection of elements.
          • Set Unordered collection of unique elements.
          • Tuple Erlang interop type for fixed-size heterogeneous collections.
        • CompiledMethod Method introspection object.
        • DateTime UTC date and time via Erlang calendar/os modules.
        • Number Abstract superclass for numeric types.
          • Float Floating-point arithmetic and operations.
          • Integer Whole number arithmetic and operations.
            • Character Unicode character (codepoint) wrapper.
        • Package First-class package reflection for the Beamtalk system.
        • Queue O(1) amortised FIFO queue backed by Erlang's `:queue` module.
        • Random Random number generation.
        • Regex Compiled regular expressions via Erlang re module (PCRE2).
        • Result Value type for expected success/failure outcomes (ADR 0060).
        • StackFrame A single frame in an exception stack trace.
        • SupervisionSpec Value type describing how to start an actor as a supervised child.
        • TestCase Base class for BUnit test cases.
      • WorkspaceInterface Per-workspace actor introspection and binding container.

All Classes