An experimental actor-based language with native chaos engineering capabilities.
GAL explores what happens when you make chaos testing a first-class language feature instead of an external tool. It's designed for building resilient distributed systems where fault tolerance is built into the language itself.
Honest Assessment: GAL has ambitious goals and solid architecture, but many features are still in development. See our implementation status for details.
- Actor Model - Basic actor spawning, message passing, and state management
- C Backend - Compiles GAL to C code with runtime (development/testing)
- Chaos Contracts - DSL for specifying resilience invariants
- Core Compiler - Lexer, parser, type checker, IR generation
- Fault Injection Framework - Structure for injecting faults (integration in progress)
- Deterministic Replay - Record and replay execution (70% complete)
- Async Runtime - Redesigning for better scalability
- Chaos Integration - Connecting all the pieces together
- Formal verification
- Time-travel debugging
- Distributed actors
- Self-modifying code (Godelian features)
// A chaos-resilient payment processor
@chaos_contract(
invariant: "balance >= 0",
tested_under: [MessageDrop(0.1), ActorCrash, NetworkDelay(100ms)]
)
actor PaymentProcessor {
state balance: Money = 0
on ProcessPayment(amount: Money)
requires amount > 0
ensures balance == old(balance) + amount
=>
balance = balance + amount
send(audit_log, PaymentProcessed(amount))
}
supervisor PaymentCluster {
strategy = ExponentialBackoff(initial: 100ms, max: 30s)
on WorkerCrashed(id) =>
log("Worker {id} crashed, restarting...")
spawn_replacement()
}
# Requires Rust 1.70+
git clone https://github.com/geeknik/gal
cd gal
cargo build --release
# Compile and run an example using the C backend
./target/release/galc compile --backend c examples/hello_world.gal -o hello.c
gcc -o hello hello.c -lpthread
./hellosrc/
bin/ - CLI tools (galc, gal-repl, gal-chaos)
lexer.rs - Tokenization
parser.rs - AST construction
semantic.rs - Type checking
runtime/ - Actor system
chaos_*/ - Chaos engineering
examples/ - GAL code examples
stdlib/ - Standard library
docs/ - Documentation
These are realistic current numbers, not aspirational targets:
| Metric | Current | Target |
|---|---|---|
| Actor spawn | ~1K/sec | 100K/sec |
| Message latency | ~10us | 1-5us |
| Max actors | ~4K | 1M+ |
The current thread-per-actor model limits scalability. We're working on an async redesign.
We welcome contributions! GAL is in early development and there's lots to do:
- Good first issues: Improve error messages, add test cases
- Intermediate: Complete chaos integration, fix compiler warnings
- Advanced: Async runtime redesign, verification engine
See CONTRIBUTING.md for guidelines.
Named after Kurt Godel, whose incompleteness theorems showed that sufficiently powerful systems can make statements about themselves. GAL explores this idea through:
- Self-referential actors that can inspect and modify their own behavior
- Meta-programming where code can generate and transform code
- Chaos contracts that specify what should remain true even under failure
These features are experimental and partially implemented.
GAL builds on ideas from:
- Actor models (Carl Hewitt, Erlang/OTP)
- Chaos engineering (Netflix)
- Formal methods (TLA+, Leslie Lamport)
- Self-reference (Kurt Godel)
MIT License - see LICENSE for details.
Note: GAL is research/experimental software. It's not ready for production use. We're building it in the open and welcome feedback, but please set expectations accordingly.