Repository navigation
CL-Amiga 0.11
Highlights
Clamacs rewritten in Common Lisp
- Clamacs, the Emacs-flavoured editor/IDE, is a Lisp program now (
clamacs/lisp/) and runs as a clamiga instance of its own. The release ships it as aclamacs.imgheap image beside every binary (bin/aos3,bin/aos3-fpu,bin/mos) plus its sources and FASLs underlib/clamacs/; theClamacsicons startclamiga --image clamacs.img --eval "(clamacs::run)". The MUI frontend is unchanged in use — buffers, minibuffer, kill ring, Lisp indentation,C-c C-c/C-c C-k/C-c C-l, the REPL, debugger and inspector windows, themes andTEXT SIZE— andS:.clamacsrcdefines commands and binds keys. - Clamacs on the host: the same editor runs on macOS and Linux (
clamacs/host/run.sh,make host-appbuildsClamacs.app) in one native window with the buffers as tabs, over the new TCP development port (lib/dev-tcp.lisp,EXT.DEV.TCP: length-framed lines,AUTH <token>,REPL-ATTACH tcp:host:port/token), which also lets a host Clamacs drive a clamiga on an Amiga. - The
EXT.DEVlayer grewDEFINE-RAW-COMMAND(verbs that take text, not syntax),COMPLETE's fallback to names containing the text, loading and testing an ASDF system by its.asd(Clamiga > Load System / Test System),MP:*THREAD-DEATH-HOOKS*, and a REPL thread that is respawned after a heap-exhaustion death (C-c C-zattaches a new one; the started clamiga's heap is*clamiga-heap*). - A clamiga the editor starts opens its port itself; the two
S:.clamigarclines are only for a clamiga you start yourself and want the editor to find. Connect on a clamiga that has quit offers to start a new one at once.
Standalone executables
(ext:save-image "app" :executable t :toplevel 'app:main :quit t)writes one file that is the program: a copy of clamiga with the image appended, nolib/, image file or launcher beside it. The whole command line belongs to the program (ext:*command-line-args*),:toplevelis what it runs (its return is exit 0,(quit n)isn),:heap-sizethe heap it starts with; it starts from a Shell or a Workbench icon (ARGStool type, project icons). Each platform builds its own;tests/test_executable.shandtests/amiga/exe-save.lispare the runnable examples.- A
SAVE-IMAGEthat is refused names the worker threads in the way (... still running ("arexx-port") ...) and says what to do; the clean way to save an image or executable is a clamiga started with--no-userinit.
JIT
- An AArch64 backend for arm64 hosts (Apple silicon, Linux arm64): template JIT with direct native-to-native calls and
&optional/&restprologues —make hostuses it there. - m68k: direct native-to-native calls through call-site cells (one call generation word, bumped by every function-cell write and every GC; a miss into a builtin or an interpreted function costs nothing extra),
&key,&optionaland&restprologues, positional arity up toOP_CALL's 255, tail calls into other functions, native functions push call frames so backtraces carry line numbers, native loops poll for GC, interrupts and Ctrl-C, and lazy compilation: a function is compiled when it turns hot (FASL v39;(optimize (speed 3))compiles at definition).
Runtime, GC and MP
- Heap images reopen the Amiga library bases of the
AMIGA.*modules after a restore (amiga.ffi:define-library-variable,EXT::*SYSTEM-RESTORE-HOOKS*), store each source-file name once (image v5), read their payload only once the heap exists, and hand memory back on a failed start. - GC compaction forwards through a live-granule bitmap instead of a heap-sized forwarding table — the allocation stall of the low-end 68020 suite is gone; a fresh keyword no longer comes back from
INTERNas a stale offset; the reader's line table follows a cons the collector moves. - Shutdown reaps worker threads that finished but were never joined, stops workers still running on AmigaOS, and bounds its waits by the clock rather than counted naps (Windows ticks); a startup CPU store self-test and the
verify/probe package that pinned the Vampire 68080 lost-store defect for the Apollo team. - 68k AmigaOS sizes the main thread's NLX, saved-pending and compiler-pool reservations for 8 MB machines; the compiler's bytecode and constants buffers grow on demand.
Release layout
- Six Workbench launcher icons, one pair per binary —
CLAmiga/Clamacs,CLAmiga-FPU/Clamacs-FPU,CLAmiga-MOS/Clamacs-MOS— with no platform detection in the scripts; the root is a 3 × 3 grid (clamiga, Clamacs, guides as the columns; soft-float, FPU, MorphOS as the rows) in the drawer icon's window. scripts/make-binary-release.sh --snapshot [--with-mos]builds development snapshots; the Amiga test suite runs in 12 minutes with per-check log flushes and timings.
Fixes
DEFVARevaluates its initial value only when the variable is unbound, andDEFVAR/DEFPARAMETER/DEFCONSTANTstore out of tail position (FASL v38);&optionalsupplied-p vs&rest, and a supplied-p variable visible to later defaults (v40); the exit and inlining analysis expandsMACROLETmacros (flexi-streamsFILL-BUFFER);FLETbindings are protected across the inliner'sRETURN-FROMscan.- A string or vector literal keeps its identity through
COMPILE-FILE+LOAD(v36); a FASL checks the structure layouts it was compiled against (v35,--no-fasl-cache);DEFSTRUCT's hidden slot setter no longer takes over a user function named%SET-<accessor>(v37); nestedLOADs are bounded by a clear error and an abandonedLOADgives its streams back. - Runtime
UNDEFINED-FUNCTION/UNBOUND-VARIABLEareCELL-ERRORs that name the cell;EXT:BACKTRACEafter a handled error in an earlier top-level form keeps its innermost frames;~Fand~$right-justify their field;(* bignum fixnum)is single-pass. - AmigaDOS pathnames read a leading or empty
/component as the parent (//x);FOREIGN-TO-STRINGreads to the NUL rather than a hidden 4096 bytes;ffi:close-libraryon the host isdlclose; a BOOPSI dispatcher lists its methods and the rest go to the superclass natively;rexxsyslibstays open under a send still waiting for its reply; a MUI 3.8 String edit hook runs oninput.device's task (mui:make-string-key-hook);AMIGA:WAIT-SIGNALS. - Windows: the
:WINDOWSfeature, UIOP reads native namestrings with their drive letter and splits directory lists at;.
Compatibility notes
- The FASL format is v40; the cache re-keys to
cl-amiga-0.11-fasl40, so caches from 0.10 rebuild transparently. Heap images are v5 and, as always, per-build. bin/aos3/clamacsandbin/mos/clamacs(the C editor of 0.10) are gone; the editor isbin/*/clamacs.img+lib/clamacs/.Clamacs-FPUandClamacs-MOSare new icons;CLAmiga-FPUno longer starts the MorphOS binary on MorphOS — useCLAmiga-MOS.
Downloads
clamiga-0.11.0-bin.lha / .zip contain bin/aos3 (68020+, soft-float), bin/aos3-fpu (hard-float, needs an FPU), bin/mos (MorphOS PPC, built natively), each with its clamiga.img and clamacs.img, the runtime library (lib/, FASLs plus sources), the documentation as Markdown and AmigaGuide (README-FIRST.guide first), the examples and the Workbench icons. Unpack anywhere; no assigns needed.
Amiga suite in FS-UAE: 5274/5274 restored-boot (soft-float and FPU; fresh boot 5283/5284, the FS-UAE-only audio-short-sample flake); test-extra 18/18 scripts, 13290/0.