Build against Mark Tarver's refreshed S41.2 kernel (2026-07-11)#8
Merged
Conversation
Tarver re-uploaded a restructured kernel under the same "41.2" version number (canonical mirror: pyrex41/shen-s41.1 tag s41.2-pristine-20260711, commit 11fc51b; secondary https://www.shenlanguage.org/Download/S41.2.zip, sha256 51becbfd60fa8c93c3f8ae5b20b948eaa84c4b1d14ad2f5d2a056002a53ee836). It is a different lineage from the community shen-41.2 release: backend.kl replaces the generated compiler.kl, and dict.kl, init.kl, stlib.kl and every extension-*.kl are gone. The global property store moved from a dict layer to a bucketed absvector *property-vector*. This adapts the shen-cl harness to build against it as a hybrid (Tarver's 14 shared KLambda files + community launcher/features/expand-dynamic/stlib grafts), assembled reproducibly by scripts/assemble-tarver-kernel.sh (make fetch-tarver). Harness changes for the refresh: - src/compiler.shen: disable the (trap-error (get ..) ..) -> shen-cl.get/or peephole; it assumed a CL hash-table property store, but the refresh buckets an absvector. - src/overwrite.lsp: drop the hash override (the vector store buckets by the kernel hash, which never returns 0); shim four functions dropped with init.kl -- shen.repl (aliased to the renamed shen.shen), a no-op shen.initialise (the refresh initialises via declarations.kl load-time forms), shen.set-lambda-form-entry, and shen.toplevel-display-exception. - boot.lsp / scripts/build.shen: drop dict/init from the file lists; load t-star before types (the refreshed types.kl calls shen.rectify-type at load, defined in t-star.kl). - tests/compiler-tests.shen: update the get/or assertion for the disabled peephole. Status on macOS SBCL 2.6.2: precompile, build-sbcl, REPL smoke, launcher CLI (eval -q -l file -e expr) and the kernel test suite (runme.shen, 134/134) all pass. clisp/ccl/ecl untested. The compiler golden suite has pre-existing drift on master (1+/EQUALP mismatches and a let-NIL crash reproduce on the community-41.1 build), unrelated to this change. See docs/KERNEL-PROVENANCE-tarver-s41.2.md. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
make.shen is the .shen compile order, not a valid .kl load order; the refreshed types.kl runs typechecker declares at load needing declarations, macros, and t-star (shen.rectify-type moved there) first. Confirmed by shen-rust #9 and shen-lua Shen-Language#36. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Owner
Author
|
Load-order note for other ports booting the compiled |
…kr host clisp 2.49.92 and ECL 26.5.5 build and pass the 134-test kernel suite with a working launcher + stlib; CCL has no Apple-Silicon native build (out of scope). Verified this branch's SBCL binary as ratatoskr's stage-1 host: fib shakes to 54 defuns / 13.4 KB. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Mark Tarver re-uploaded a restructured kernel under the same "41.2"
version number (canonical mirror:
pyrex41/shen-s41.1tags41.2-pristine-20260711, commit11fc51b; secondaryhttps://www.shenlanguage.org/Download/S41.2.zip, Last-Modified 2026-07-11,sha256
51becbfd60fa8c93c3f8ae5b20b948eaa84c4b1d14ad2f5d2a056002a53ee836).This is a different lineage from the community
shen-41.2release shen-clhas built from. This branch adapts the shen-cl harness to build against it.
SBCL, CLISP and ECL are all green (build + 134/134 kernel suite + launcher).
Full provenance and status:
docs/KERNEL-PROVENANCE-tarver-s41.2.md.Standalone canary (Tarver's own install.lsp)
Independent of shen-cl, Tarver's
install.lspwas run under macOS SBCL 2.6.2(stdlib=yes, concurrency/Tk/THORN/LogicLab=no). It builds and boots:
produced
sbcl-shen.exe,(+ 2 3)=5,(version)="41.2", stdlib typechecksand loads. The kernel is proven sound across the fleet (shen-swift boots all 15
KLambda files,
*version*="41.2", 12/12).Usable as a ratatoskr stage-1 host? Not the stock image. Its saved toplevel
is the interactive
shen.shen; piping(load "f")+expr over stdin evaluates(
(sq 9)=81), but the stock image has no non-interactive launcher CLI, nocl.exit, and loops forever on stdin EOF. This shen-cl S41.2 build is theproper same-lineage host — verified below.
Upstream delta (refresh vs community 41.2)
compiler.kl(shen-cl generates its own),dict.kl,init.kl,stlib.kl, allextension-*.kl(incl. the launcher ratatoskr needs).hush->shen.hush,input+->shen.input-h+, REPL entryshen.repl->shen.shen,shen.initialise-lambda-forms->shen.initialise-lambda-tables;shen.initialisegone (folded intodeclarations.klload-time forms); property store -> bucketed absvector*property-vector*with vectorput/get.What this PR does
Assembles a hybrid kernel via
scripts/assemble-tarver-kernel.sh(
make fetch-tarver): Tarver's 14 shared KLambda files + communitylauncher/features/expand-dynamic/stlib grafts + community tests/lib. Harness
adaptations:
src/compiler.shen: disable the(trap-error (get ..) ..)->shen-cl.get/orpeephole (it assumed a hash-table property store).
src/overwrite.lsp: remove thehashoverride (vector store buckets by thekernel
hash); shimshen.repl->shen.shen, a no-opshen.initialise,shen.set-lambda-form-entry, andshen.toplevel-display-exception.boot.lsp/scripts/build.shen: dropdict/init; align load order toTarver's
install.lsp(t-starbeforetypes).tests/compiler-tests.shen: update the get/or assertion.Test status (macOS, arm64)
runme.sheneval -e+eval -q -l file -e expr, REPL, clean EOFeval -l file -e expr+ stlibeval -e,eval -l file -e expr+ stlibNotes:
README), so it is out of scope here rather than tested.
-q: clisp intercepts a bare-qin its own runtime arg parser(clisp has a native
-q), soeval -q ...swallows the result there;eval -l file -e exprworks. Pre-existing, unrelated to the refresh.1+/EQUALPmismatches andlet-NILcrashreproduce identically on the master (community-41.1) binary, so they are
pre-existing and out of scope; the get/or case was updated.
Verified as ratatoskr's stage-1 host
Using this branch's SBCL binary as
$RATATOSKR_HOST,ratatoskr shake tests/fib.shenproduceskernel.kl= 54 defuns / 13.4 KB(the documented figure) +
fib.kl+ manifest(
kernel-version=41.2-s41r.20260711). This is the designated same-lineagestage-1 host of record; ratatoskr can swap to it from Tarver's raw image.
Fleet context
Part of the fleet-wide S41.2 refresh migration; all sibling ports are green
(shen-lua Shen-Language#36, shen-rust #9, shen-swift #1, ratatoskr Shen-Language#10, etc.). shen-julia's
demod finding does not affect shen-cl (SBCL is late-bound). This host is the
fleet's reference and fastest stage-1 host.
Known remaining work
community grafts — the same interim compromise every fleet port took; the
StLib-from-source pass is a coordinated fleet-wide follow-up.
re-uploaded in place, unversioned).
Discovery other ports will hit
Any port with native
put/getassuming a dict breaks: properties nowlive on a plain absvector
*property-vector*, and there is noshen.initialise— initialisation is load-time top-level forms indeclarations.kl, so readinstall.lsp(notmake.shen) for.klloadorder:
declarationsandt-starmust precedetypes. Also subtle: any hostthat overrides
hashcorrupts the store (buckets set at kernel-populatetime must match get time; the kernel
hashnever returns 0 -- index 0 holdsthe vector length).
🤖 Generated with Claude Code