Clamiga: Common Lisp for the Amiga
Clamiga: Bringing Common Lisp to the Amiga
By Manfred Bergmann | Software Development | [Blog] | [Projects] | [About] | [Imprint] Published: 31 July 2026
Following my recent series on ACE BASIC, I want to share a project I've been developing over the last six months: CL-Amiga, more affectionately known as Clamiga.
🚀 What is Clamiga?
Clamiga is a native implementation of Common Lisp designed specifically for the Amiga ecosystem. While it is built for the classic AmigaOS 3 (68k) and MorphOS (native PPC)—with potential future support for AROS and AmigaOS 4—it is also fully functional on Linux and macOS. In fact, I use the macOS version as my primary development environment.
The Etymology
The name is a simple portmanteau: Common Lisp for the Amiga CL-Amiga Clamiga.
Since amiga translates to "female friend" in Spanish and Portuguese, the name serves a dual purpose: it is the Lisp that runs on your Amiga, and it is your amiga (friend) in the coding process. ;)
📚 A Primer on Common Lisp
Common Lisp is a veteran language that remains remarkably relevant. Despite the ANSI standard being frozen since 1994, the language feels contemporary. Most ANSI-compliant code written decades ago still compiles on modern systems.
Key Language Strengths
- CLOS: A sophisticated object system featuring multiple dispatch.
- Condition System: A robust error-handling mechanism that far exceeds standard "try-catch" exceptions.
- Macros: The ability to modify the language syntax itself.
- Interactive Workflow: An image-based development style allowing for the redefinition of functions within a live, running system.
Many "modern" language features were actually pioneered by Common Lisp long ago. For those seeking more depth, I recommend my previous articles: Common Lisp - Oldie but goldie and my piece on Functional Programming in Common Lisp.
The Landscape of Implementations
There are several high-tier implementations available today:
| Implementation | Type | Architecture | Notes |
|---|---|---|---|
| SBCL / CCL | Native Compiler | x86-64, ARM, PPC | High performance; high RAM usage; no 68k support. |
| ECL / Clasp | Various | Multi-platform | Robust and modern. |
| CLISP | Bytecode VM | Portable C | ; no recent Amiga builds. |
| LispWorks / Allegro | Commercial | Multi-platform | Professional grade. |
Clamiga takes inspiration from the spirit of CLISP—a compact bytecode interpreter written in C—but provides a modern, maintained build for the Amiga. It avoids external runtime dependencies like libffi or LLVM, meaning no C compiler is required at runtime.
🛠️ Clamiga's Capabilities
It is important to note that because this is a full Lisp runtime, it will not break speed records outperform hand-optimized C or Assembly.
However, it provides an incredible amount of power:
- m68k-JIT: An attempt to boost performance on 68k hardware.
- The Numeric Tower: Full support for .
- Dev Tools: Integrated REPL, debugger, and object inspector.
- Resilience: Full implementation of restarts and the condition system.
- Native Integration: Sockets, threading, and file system access mapped directly to AmigaOS APIs for maximum compatibility.
- Paradigm Flexibility: Full CLOS support and functional programming capabilities.
Essential Glossary
ASDF(Another System Definition Facility): The standard build tool for Lisp. Clamiga includes ASDF to handle "systems" (libraries).FASLfiles: Compiled Lisp source.- Benefit: Faster loading than raw source.
- Portability: FASL files generated on m68k are interchangeable with those on PPC.
Quicklisp: A massive library manager (1,500+ libraries). Clamiga uses compatibility shims to support these, though some are too resource-heavy for a68020CPU.
⚙️ Technical Architecture
Clamiga utilizes a single-pass compiler that transforms S-expressions into bytecode, which is then executed by a stack-based Virtual Machine (VM).
Design Constraints & Solutions
To fit the Amiga's limitations, several specific choices were made:
- Value Tagging: Uses tagged 32-bit values.
- Memory Addressing: Heap pointers are stored as arena-relative offsets. This ensures the object model remains compact and 32-bit clean.
- Garbage Collection: A mark-and-sweep collector with slide-compaction prevents fragmentation from killing long sessions on systems with only 4MB or 8MB of RAM.
- Cross-Platform Core: Because the core is written in portable C, the same system runs on macOS/Linux. This allows for rapid testing on fast hardware before deploying to the Amiga.
💾 Memory Management
Living with 4MB of RAM (or less) requires strict discipline. The core of Clamiga—including the numeric tower, loop, format, and CLOS—boots in approximately 0.5 MB of heap.
Memory Scaling Guide
| Use Case | Heap Allocation | Stack Size |
|---|---|---|
| Simple Programs (No ASDF/Quicklisp) | --heap 1M | 64K (Default) |
| Small/Medium Programs | --heap 4M (Default) | 64K (Default) |
| Loading ASDF | --heap 11M | 64K (Default) |
| Quicklisp + Libraries | --heap 24M | 128000 |
To keep memory footprints low, Clamiga employs Packed Byte Vectors. For example:
(make-array n :element-type '(unsigned-byte 8))
This ensures that each element occupies exactly 1 byte, rather than a full Lisp object pointer.