Skip to content

Latest commit

 

History

History
142 lines (116 loc) · 7.22 KB

PROVENANCE.md

File metadata and controls

142 lines (116 loc) · 7.22 KB

Provenance of the vendored KLambda kernel

Current: ShenOSKernel 43.4

  • Repository: Shen-Language/shen-sources, tag shen-43.4 (tag object 40fd335893cf7caf4c3a285e122ea0de06696430), commit f34b307b490880eedcfe1f5e5d3cc24ca3d2602e
  • Release asset: ShenOSKernel-43.4.tar.gz
    • SHA-256: 15e7972e6bf0cd65d37c2eba85750b8839d2dbadda41027eae0c88e5017a2756
    • All 23 .kl files and tests/ are byte-identical to the extracted archive.
  • (version) reports "43.4" (set in init.kl).
  • Against 43.2, 17 of 23 .kl files differ. kernel and stlib.kl must move together: stlib's initialiser now calls shen.declare-with-signature (43.3) and shen.update-lambda-table/precompiled (43.4). t-star.kl differs but the native typechecker's fingerprints (scripts/kernel-fingerprints.lua) are all unchanged. tests/ adds regressions/ and extensions/expand-dynamic/.

Previous: ShenOSKernel 43.2

  • Tag shen-43.2, commit e6947f507ebc; asset SHA-256 23c71508f0de24785e1f127ea4fab440081904d81c463090bc642ee840417f32.

The records of the earlier imports follow.

Previous: ShenOSKernel 43.1 at upstream ec16a9f (community shen-sources line)

The 23 .kl files are vendored byte-identical from the kernel built at upstream Shen-Language/shen-sources master ec16a9f: the 43.1 release plus the type checker's deref-once change (shen-sources#117, with its empty-list guard). The kernel test suite under ../tests/ is unchanged from 43.1 and identical to that build's.

The record of the original 43.1 import follows.

  • Repository: Shen-Language/shen-sources
    • Tag: shen-43.1
    • Commit: 715824a52b55e9c81a9501df8548ff3edd8411f5
  • Release asset: ShenOSKernel-43.1.tar.gz
    • SHA-256: 900eedef44f440af78f9395ed06e689ce1604546fc309f5bc7c8bc84cc651920
    • All 23 official .kl files and tests/ are verified against the extracted archive with cmp / diff -r.
  • (version) reports "43.1" (set by shen.initialise-environment in init.kl).

Files:

core declarations dict init load macros prolog reader sequent sys
t-star toplevel track types writer yacc          -- kernel
stlib                                            -- precompiled standard library
extension-features extension-expand-dynamic extension-launcher
extension-programmable-pattern-matching          -- extensions (booted)
extension-namespaces extension-type-annotations  -- extensions (vendored, opt-in)

Lineage choice (#79, option a)

This is a lineage switch. Releases up to 0.11.x vendored Mark Tarver's S42.0 kernel (S42.zip from shenlanguage.org, 2026-08-25, mirrored as pyrex41/shen-upstream tag s42-pristine-20260825, zip SHA-256 30abdc7e5a1e27b7a20109c1ed141e4712885e31f24d9710d16415fbbd4dfb23) plus the community 42 extensions and the S-lineage Lib/StLib Shen sources. 42.1, 42.2, and 43.1 are releases of the community line only, which differs structurally, so per the cross-port decision (pyrex41/bifrost#26, pyrex41/yggdrasil#32) the 43.1 kernel is adopted wholesale rather than porting its changes onto the S42.0 base.

What that means structurally, relative to the S42.0 tree it replaces:

  • init.kl and shen.initialise are back. Every 43.1 release file is pure defuns; nothing initialises at load time. boot.lua loads all modules and then calls (shen.initialise) (environment, *property-vector*, arity table, lambda forms, kernel signatures), the extension initialisers, and (stlib.initialise). The S42 load-order constraints (… macros declarations t-star types) and the hoisted types.kl declares are gone.
  • dict.kl is back. *property-vector* is a shen.dict (an absvector: shen.dictionary, capacity, count, then hash buckets of (Key . Props)), and get/put/unput go through shen.<-dict / shen.dict-> / shen.assoc-set / shen.assoc-rm. prims.lua's native property store was rewritten for this layout.
  • Lambda forms are a property again. fn reads the shen.lambda-form property; there is no shen.*lambdatable*. 42.0's requirement that a cached callable form be invalidated when a function is redefined with zero or unknown arity is met by the native fn fast path keying its cache on a generation counter that every shen.lambda-form write bumps.
  • stlib.kl is back as the standard library: the precompiled output of 43.1's lib/stlib sources (upstream make-stlib.shen). The S-lineage lib/StLib sources that 0.11.x loaded at boot were removed; see "Standard library" below.
  • backend.kl (S42's cl.* Common Lisp backend) is not part of 43.1 and was removed.
  • Source-form handlers: shen.macroexpand-h takes a 4th argument and shen.try-parse returns parsed forms that the read loop expands afterwards. shen-lua overrides none of read, lineread, shen.read-loop, shen.try-parse, macroexpand or shen.macroexpand-h, so the kernel's own order applies; read/lineread at EOF without a trailing newline behave like shen-scheme 0.50.
  • Namespaces: extension-namespaces.kl is vendored from the release as generated (it carries the 43.1 externals/with-externals change). It is not booted; a program loads the extension's Shen source (extensions/namespaces.shen in shen-sources) and calls (shen.x.namespaces.initialise), as the community extension tests do.

Boot list

boot.lua (FILES) boots the 16 release kernel modules, extension-features, extension-expand-dynamic, extension-launcher, extension-programmable-pattern-matching and stlib. After (shen.initialise) it calls (shen.x.features.initialise …) and (shen.x.programmable-pattern-matching.initialise) in that order, registers the lua.* interop entries, then runs (stlib.initialise). The resulting shen.*sigf* contains 465 signatures in this port, including the four lua.checked-* signatures.

Standard library

klambda/stlib.kl loads with the kernel and (stlib.initialise) registers it (port-upgrades.md, 41.1). Since 43.3 its 290 signatures are precompiled shen.declare-with-signature forms, so there is no signature sidecar. The two datatype rule compiles are cached next to the kernel bytecode cache (<kernel cache>.stlibdt); see boot.lua stlib_datatypes. SHEN_NO_STDLIB=1 skips (stlib.initialise).

Overriding

Set SHEN_KL_DIR=/path/to/some/other/klambda to boot a different KLambda tree with the same file set (e.g. a development build of shen-sources). boot.lua loads the FILES list from it and calls shen.initialise / stlib.initialise when the tree defines them.

History

  • 0.11.x: Tarver S42.0 (2026-08-25 refresh) + community 42 extensions + S-lineage lib/StLib sources loaded at boot.
  • Earlier: Tarver S41.2 (2026-07-11 refresh); before that the community ShenOSKernel 41.2 / 41.1 releases.

git log -- klambda/PROVENANCE.md has the full earlier text of each entry.