Repository navigation
EGCL v0.0.9
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.
SUBTYPEPcompares numeric bounds exactly. Bounds were held asf64, which cannot tell adjacent integers apart above 2^53, so(subtypep '(integer 2^64 2^64) '(integer 2^64+1 2^64+1))answeredT, T-- a definite and wrong answer -- where it must answerNIL, 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 aPRINT-OBJECTmethod 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 aTHROWout 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-QUALIFIERSrecovered the name of a short-form combination by looking up the owning generic, so a method removed withREMOVE-METHODreported(STANDARD)rather than its own(+). Methods now carry their combination, including acrossSAVE-LISP-AND-DIEand image restore (#337). ADD-METHODkeeps a method it displaces. Replacing a method with the same qualifiers and specializers dropped the old one, so a program still holding it got aTYPE-ERRORfrom(add-method gf displaced)and the wrong method answered the call. The displaced method is now detached and can be re-added (#337).MACRO-FUNCTIONof 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 withEINVAL, which was read as "hardening state unknown" and refused, so every program aborted withordinary callable boundary is unavailable(#314). - Reader: honor single escapes inside
|...|, resolve escaped\Tand|NIL|
to the constants, readtandnilin a#+/#-feature expression as the
keywords:Tand:NIL, honor the length argument of#n*and#n(, give
#Sslots their initforms, and read#nAsequences.
WITH-STANDARD-IO-SYNTAXbinds*PACKAGE*to the package rather than its
name (#315). - Printer and
FORMAT:WRITEbinds 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,~Dand~Rdirectives 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-HANGandLISTENno longer
block on a pipe, socket or terminal with nothing buffered, and both honor a
character pushed back withUNREAD-CHAR.*TERMINAL-IO*is bidirectional.
Binary streams support wide(unsigned-byte N)element types; a broadcast
stream reports its last component'sFILE-POSITIONandFILE-LENGTHand
passes on values its components accept; and a too-large or negative
FILE-POSITIONsignals aTYPE-ERRORinstead of crashing the process.
Logical pathname translations accept the ANSI list of wildcard pairs,
DIRECTORYmerges against the default directory, andREAD-SEQUENCEfills a
list (#316,
#318,
#321). - Symbols, macros and structures: every standard macro and function the
evaluator implements natively reports asFBOUNDP, the REPL history
variables and*BREAK-ON-SIGNALS*are bound,DEFMACROkeeps its
documentation string,SYMBOL-MACROLETshadows a global symbol macro,
TRACEandUNTRACEwork, and:TYPEd structures are supported
(#319,
#322,
#325). - CLOS: method objects are first class, with
REMOVE-METHOD,ADD-METHOD,
COMPUTE-APPLICABLE-METHODS, and aFIND-METHODthat distinguishes one
method combination from another.DEFCLASSandDEFGENERICsyntax and
initarg validity are checked,SLOT-MISSINGis 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, andCHANGE-CLASSis generic
(#316,
#323). - Sequences and types:
NREVERSEreverses a vector in place,MAPCARblames
the dotted tail in itsTYPE-ERROR,TYPEPknowsGENERIC-FUNCTIONand
STANDARD-GENERIC-FUNCTION, bit operations accept any bit array,
ADJUST-ARRAYcopies,RATIONALIZEround-trips through the float it came
from, and a copiedRANDOM-STATEreplays 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.
ASSERTexpands aLOOP, which made interpreted test loops far slower than necessary; a 2000-iterationASSERTloop now runs in 14 ms. Memoized expansions are dropped at eachEVALboundary, 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 orFORMATTERcannot leave the caller holding a stale object (#320, #324). - Check supported primitive
FTYPEprimary-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-ERRORwhen 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
--shakeretains 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 -- anddynamic = preservebehaves as before. Tracked inbliss-mihqk; the sixshake_clipruning tests are marked#[ignore]against it.