Skip to content

EGCL v0.0.9

Choose a tag to compare

@github-actions github-actions released this 16 Oct 02:23
· 527 commits to main since this release
fa1ea8c

0.0.9 - 2026-10-15

ANSI conformance

The Dietz ansi-test suite now runs end to end. Its conditions (673 tests) and misc (740) chapters pass completely, as do cons, data-and-control-flow, hash-tables, characters and strings.

  • SUBTYPEP compares numeric bounds exactly. Bounds were held as f64, which cannot tell adjacent integers apart above 2^53, so (subtypep '(integer 2^64 2^64) '(integer 2^64+1 2^64+1)) answered T, T -- a definite and wrong answer -- where it must answer NIL, T. Every bound the range algebra accepts (integer, ratio, single or double float) is a rational, so bounds are now exact rationals and every comparison is exact (#337).
  • An error or non-local exit from a user print function propagates. A *PRINT-PPRINT-DISPATCH* entry or a PRINT-OBJECT method that signalled was read as "no applicable entry", so the object printed normally and the error vanished: (format nil "~S" 1) answered "1" instead of signalling, and a THROW out of an entry was swallowed. The error is now re-signalled at the boundary of the printing operation (#337).
  • A method object reports its own qualifiers once detached from its generic function. METHOD-QUALIFIERS recovered the name of a short-form combination by looking up the owning generic, so a method removed with REMOVE-METHOD reported (STANDARD) rather than its own (+). Methods now carry their combination, including across SAVE-LISP-AND-DIE and image restore (#337).
  • ADD-METHOD keeps a method it displaces. Replacing a method with the same qualifiers and specializers dropped the old one, so a program still holding it got a TYPE-ERROR from (add-method gf displaced) and the wrong method answered the call. The displaced method is now detached and can be re-added (#337).
  • MACRO-FUNCTION of a standard macro the evaluator implements natively returns an expander that actually expands. It previously handed back the form unchanged, so the returned function satisfied the type but did nothing (#337).
  • Run on kernels built without user shadow-stack support. On such a kernel (WSL2's, and many cloud VM kernels) arch_prctl(ARCH_SHSTK_STATUS) fails with EINVAL, which was read as "hardening state unknown" and refused, so every program aborted with ordinary callable boundary is unavailable (#314).
  • Reader: honor single escapes inside |...|, resolve escaped \T and |NIL|
    to the constants, read t and nil in a #+/#- feature expression as the
    keywords :T and :NIL, honor the length argument of #n* and #n(, give
    #S slots their initforms, and read #nA sequences.
    WITH-STANDARD-IO-SYNTAX binds *PACKAGE* to the package rather than its
    name (#315).
  • Printer and FORMAT: WRITE binds every printer-control keyword;
    *PRINT-READABLY* overrides *PRINT-LENGTH*, *PRINT-LEVEL* and
    *PRINT-GENSYM*; printing circular structure without *PRINT-CIRCLE* stops
    at the stack budget instead of faulting. The ~^, ~{, ~/name/, ~<,
    ~F, ~C, ~D and ~R directives follow their parameters, FORMATTER
    functions return the arguments they did not consume, and pprint-dispatch
    tables work (#317,
    #320,
    #324).
  • Streams, files and pathnames: READ-CHAR-NO-HANG and LISTEN no longer
    block on a pipe, socket or terminal with nothing buffered, and both honor a
    character pushed back with UNREAD-CHAR. *TERMINAL-IO* is bidirectional.
    Binary streams support wide (unsigned-byte N) element types; a broadcast
    stream reports its last component's FILE-POSITION and FILE-LENGTH and
    passes on values its components accept; and a too-large or negative
    FILE-POSITION signals a TYPE-ERROR instead of crashing the process.
    Logical pathname translations accept the ANSI list of wildcard pairs,
    DIRECTORY merges against the default directory, and READ-SEQUENCE fills a
    list (#316,
    #318,
    #321).
  • Symbols, macros and structures: every standard macro and function the
    evaluator implements natively reports as FBOUNDP, the REPL history
    variables and *BREAK-ON-SIGNALS* are bound, DEFMACRO keeps its
    documentation string, SYMBOL-MACROLET shadows a global symbol macro,
    TRACE and UNTRACE work, and :TYPEd structures are supported
    (#319,
    #322,
    #325).
  • CLOS: method objects are first class, with REMOVE-METHOD, ADD-METHOD,
    COMPUTE-APPLICABLE-METHODS, and a FIND-METHOD that distinguishes one
    method combination from another. DEFCLASS and DEFGENERIC syntax and
    initarg validity are checked, SLOT-MISSING is called, class slots shadow
    inherited instance slots, effective slots and the built-in classes follow the
    CLHS precedence order, short-form method combinations run with :around
    methods, and CHANGE-CLASS is generic
    (#316,
    #323).
  • Sequences and types: NREVERSE reverses a vector in place, MAPCAR blames
    the dotted tail in its TYPE-ERROR, TYPEP knows GENERIC-FUNCTION and
    STANDARD-GENERIC-FUNCTION, bit operations accept any bit array,
    ADJUST-ARRAY copies, RATIONALIZE round-trips through the float it came
    from, and a copied RANDOM-STATE replays its sequence
    (#315,
    #316,
    #317,
    #325).

Performance

  • Memoize tree-walking macro expansions, so an interpreted loop body expands its macros once instead of once per iteration. ASSERT expands a LOOP, which made interpreted test loops far slower than necessary; a 2000-iteration ASSERT loop now runs in 14 ms. Memoized expansions are dropped at each EVAL boundary, so a form mutated between two evaluations is expanded again rather than reusing the first expansion (#321, #322).

Correctness

  • Root printed and formatted values across calls back into Lisp — the pretty-printer dispatch hook and the ~{ iteration body function — so a relocating garbage collection during a user print function or FORMATTER cannot leave the caller holding a stale object (#320, #324).
  • Check supported primitive FTYPE primary-result declarations even at safety zero, preserving multiple values and the executing definition's contract. Retain checks in source-free BFASL files, and enforce declared argument types on interpreted calls, mapped recursion, and optimized self-tail calls (#331). The matched typed Fibonacci comparison measured a small slowdown from 30 ms to 31 ms median; see the checked-result report.
  • Raise the declared TYPE-ERROR when a nested recursive argument contract fails, instead of returning a value through a replacement definition (#334).
  • Resume a validated chain of self-inlined native frames through ordinary guard recovery, transferring the outer activation state exactly once and preserving the executing definition across redefinition and garbage collection (#333, #334).

Known limitations

  • --shake retains every candidate function instead of pruning the unreachable ones, so a shaken executable is correct but no smaller than the image it came from. The conformance work in this release took the saved image from 3 source closures to 30, and the reader entry points quoted inside them reach the analyzer's "can invoke arbitrary code" rule, which then keeps everything. The shaker is being conservative rather than wrong -- nothing is removed that a program needs -- and dynamic = preserve behaves as before. Tracked in bliss-mihqk; the six shake_cli pruning tests are marked #[ignore] against it.