Skip to content

v0.11

Latest

Choose a tag to compare

@mdbergmann mdbergmann released this 06 Oct 14:44
· 3 commits to master since this release

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 a clamacs.img heap image beside every binary (bin/aos3, bin/aos3-fpu, bin/mos) plus its sources and FASLs under lib/clamacs/; the Clamacs icons start clamiga --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 and TEXT SIZE — and S:.clamacsrc defines commands and binds keys.
  • Clamacs on the host: the same editor runs on macOS and Linux (clamacs/host/run.sh, make host-app builds Clamacs.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.DEV layer grew DEFINE-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-z attaches a new one; the started clamiga's heap is *clamiga-heap*).
  • A clamiga the editor starts opens its port itself; the two S:.clamigarc lines 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, no lib/, image file or launcher beside it. The whole command line belongs to the program (ext:*command-line-args*), :toplevel is what it runs (its return is exit 0, (quit n) is n), :heap-size the heap it starts with; it starts from a Shell or a Workbench icon (ARGS tool type, project icons). Each platform builds its own; tests/test_executable.sh and tests/amiga/exe-save.lisp are the runnable examples.
  • A SAVE-IMAGE that 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/&rest prologues — make host uses 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, &optional and &rest prologues, positional arity up to OP_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 INTERN as 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

  • DEFVAR evaluates its initial value only when the variable is unbound, and DEFVAR/DEFPARAMETER/DEFCONSTANT store out of tail position (FASL v38); &optional supplied-p vs &rest, and a supplied-p variable visible to later defaults (v40); the exit and inlining analysis expands MACROLET macros (flexi-streams FILL-BUFFER); FLET bindings are protected across the inliner's RETURN-FROM scan.
  • 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); nested LOADs are bounded by a clear error and an abandoned LOAD gives its streams back.
  • Runtime UNDEFINED-FUNCTION / UNBOUND-VARIABLE are CELL-ERRORs that name the cell; EXT:BACKTRACE after a handled error in an earlier top-level form keeps its innermost frames; ~F and ~$ right-justify their field; (* bignum fixnum) is single-pass.
  • AmigaDOS pathnames read a leading or empty / component as the parent (//x); FOREIGN-TO-STRING reads to the NUL rather than a hidden 4096 bytes; ffi:close-library on the host is dlclose; a BOOPSI dispatcher lists its methods and the rest go to the superclass natively; rexxsyslib stays open under a send still waiting for its reply; a MUI 3.8 String edit hook runs on input.device's task (mui:make-string-key-hook); AMIGA:WAIT-SIGNALS.
  • Windows: the :WINDOWS feature, 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/clamacs and bin/mos/clamacs (the C editor of 0.10) are gone; the editor is bin/*/clamacs.img + lib/clamacs/. Clamacs-FPU and Clamacs-MOS are new icons; CLAmiga-FPU no longer starts the MorphOS binary on MorphOS — use CLAmiga-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.