Repository navigation
Upgrade kernel to ShenOSKernel 42.2 (shen-scheme 0.50 parity) - #81
Merged
Merged
Conversation
Adopt the community ShenOSKernel 42.2 release wholesale (option a of #79), replacing Tarver's S42.0 lineage: all 23 klambda/*.kl files and the tests/ suite are vendored byte-identical from ShenOSKernel-42.2.tar.gz (SHA-256 1d02273003654d34ec020ae67cb214ecec410dee3350419ff807d82b652678d8, shen-sources tag shen-42.2, commit 73507e069fe147aefb728d632c4ce40bc6a7b314). (version) is now "42.2". Boot/loader: - FILES is the 42.2 module set (pure defuns, no load-time effects) plus the extensions shen-scheme 0.50 boots (features, expand-dynamic, launcher, programmable-pattern-matching) and the precompiled stlib.kl. - initialise() calls (shen.initialise), the features and pattern-matching initialisers, registers lua.* interop, then (stlib.initialise). - The stdlib's 290 declares are cached as dumped prolog abstractions in a sidecar of the kernel bytecode cache (<cache>.stlib), reusing record_declares/replay_declares; stdlib phases run with the JIT off (run-once code; avoids a 10 ms vs 700 ms JIT-dependent bimodality). - lib/StLib (S-lineage stdlib sources) and the stdlib boot image are removed. prims.lua: - Native get/put/unput/arity/GET_OR rewritten for the 42.2 shen.dict property vector; fn fast path invalidated by a shen.lambda-form write generation counter (42.0 requirement). shen.lambda-entry native from boot. - <-address raises past the end of an absvector, so (vector 3) prints <... ... ...> like shen-scheme. Other: typecheck_native exposes record_sig for the cached replay; make-bundle drops the stdlib source payload; yggdrasil-build expects 42.2 manifests; scm rockspec drops lib/; specs updated for prolog-memory 10000, the new boot caches and <-address; docs, PROVENANCE, CHANGELOG. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01X718xocsFckMvso6EAKoXR
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
Adopts the community ShenOSKernel 42.2 kernel wholesale (option (a) in #79) in place of Tarver's S42.0 kernel. shen-lua now runs the same kernel as shen-scheme 0.50, byte for byte.
(version)returns"42.2".Two behaviour changes beyond the kernel bump, both matching shen-scheme 0.50:
<-addresspast the end of a vector now raises instead of returning nil. This also fixes(vector 3)printing strayfunex…entries, a bug that is present onmaintoo.Changes
klambda/*.klfiles and thetests/suite are byte-identical toShenOSKernel-42.2.tar.gz(SHA-2561d02273003654d34ec020ae67cb214ecec410dee3350419ff807d82b652678d8; shen-sources tagshen-42.2, commit73507e069fe147aefb728d632c4ce40bc6a7b314).backend.klis removed;dict.kl,init.kl,stlib.kland the namespaces and type-annotations extensions are added.boot.lua):(shen.initialise), the features initialiser and the PPM initialiser, registers thelua.*interop entries, then calls(stlib.initialise). Extensions and initialisation order match shen-scheme 0.50.declares are cached in a sidecar next to the kernel bytecode cache (<cache>.stlib), using the existing record/replay mechanism.klambda/stlib.klreplaces thelib/StLibShen sources.lib/StLiband the stdlib boot image are removed.prims.lua:get/put/unput/arity/GET_ORnow work on the 42.2shen.dictproperty vector;fncache is invalidated on every write of ashen.lambda-formproperty, the 42.0 requirement for redefinitions;shen.lambda-entryis native from boot;<-addressbounds as above.typecheck_native.lua: newrecord_sighook for the cached replay.build/make-bundle.lua: no longer embeds stdlib sources.bin/yggdrasil-build.lua: expectskernel-version=42.2; older slices still build, with a warning.shen-scm-1.rockspec: kernel 42.2,lib/dropped.PROVENANCE.mdandklambda/README.md: rewritten to record the lineage choice, keeping the S42 history.CHANGELOG.md; README and walkthrough updated.prolog-memorydefaults to 10000 in 42.2 (was 1000), so the per-query limit tests now set 1000 first.<-addressspec now expects an error past the end.Verification
make test: 1088 pass, 0 fail across 22 specs. Also passes from a clean checkout with a fresh fasl dir.make certify(luajit run-kernel-tests.lua): 143/143. Same withSHEN_PROLOG_ENGINE=legacy SHEN_FASL=off, and on PUC Lua 5.4.7 (47 s).tests/extensions/runme.shen): 123 passed, 0 failed (same as shen-scheme 0.50).bench/golden_typecheck.lua compare: 27 pass, 0 fail.go run . --impls shen-lua,shen-scheme(shen-scheme = the 0.50 reference): 63 pass, 3 FAIL:version-expr-42: the golden still expects"42"; both ports print"42.2".stdin-eof-clean-exit: shen-lua passes, shen-scheme fails.hush-file-write: shen-lua writes the file as the case requires; shen-scheme doesn't.--target luawith the current S42 slice:fib 20 = 6765. A hand-assembled 42.2 slice (full kernel,init=shen.initialise) prints the same.trap-error, the(head [])message,fn/arityof stdlib functions, prolog,macroexpand, andread/linereadat EOF without a trailing newline (from files and stdin).shen.*sigf*matches shen-scheme's 458 signatures plus the fourlua.checked-*ones.main.Remaining work / known failures
version-expr-42golden and the shen-luaref/rock pin need updating (Track Shen 0.50 / ShenOSKernel 42.2 support across all ports bifrost#26).v0.12.0/shen 0.12.0-1). Bifrost and Yggdrasil still pinv0.11.0/0.11.0-1. No release rockspec is added here.main:(* 123456789 987654321)loses precision;(str [1 "a" b])raises an error;(get-time unix)returns a wrong value;prolog-memorylimit.Closes #79
🤖 Generated with Claude Code
https://claude.ai/code/session_01X718xocsFckMvso6EAKoXR
Generated by Claude Code