Chez Phase 2: clojure.set + clojure.math + pprint (jolt-j5vg, jolt-22vo)

Close the remaining Phase-2 stdlib parity gaps.

clojure.set: pure Clojure over core, so just added to the prelude stdlib tier
(driver.janet stdlib-ns-files + jolt-chez fingerprint), same as clojure.edn.

clojure.math: not a .clj on the seed (native math/ bindings via jolt-h79), so
Chez gets its own host/chez/math.ss def-var!ing each fn over Chez native flonum
math. The analyzer already knows the ns (api.janet install-clojure-math!), so
refs lower to var-deref. Also adds the missing 'long' coercion to converters.ss
(int's sibling; several math cases wrap in long).

clojure.pprint: dropped the 2-arity's (binding [*out* writer] ...). *out* isn't
a bindable var in jolt — printing routes through the host (dyn :out) seam, so
the binding never redirected anything; it only made the defn uncompilable, which
the seed tolerated via interpreter fallback. Chez has no fallback, so the whole
pprint defn died. Dropping it is behavior-preserving (writer was always ignored)
and lets pprint compile cleanly. Both corpus cases pass.

Corpus parity 2259 -> 2280, crashes 191 -> 170, 0 new divergences. Floor raised.
New unit test test/chez/_stdlib.janet (27/27). Full Janet gate green (147 files).
This commit is contained in:
Yogthos 2026-06-19 17:06:26 -04:00
parent 6df60229b0
commit 109bfcd09d
8 changed files with 175 additions and 7 deletions

View file

@ -115,7 +115,13 @@
# clojure.edn requires clojure.string; read-string/__read-tagged are the
# reader.ss seams. The reader-arity's drain-reader is Janet-coupled (janet/type)
# so it's a lazy gap on Chez — read-string/edn->value are the live path. jolt-r8ku.
["clojure.edn" "src/jolt/clojure/edn.clj"]])
["clojure.edn" "src/jolt/clojure/edn.clj"]
# clojure.set / clojure.pprint: pure Clojure over core. set = relational ops
# (union/intersection/difference/join/index/...); pprint = the minimal jolt
# shim (pprint -> prn + recognized dispatch vars, with-pprint-dispatch macro).
# jolt-j5vg, clojure.pprint Phase-2 parity.
["clojure.set" "src/jolt/clojure/set.clj"]
["clojure.pprint" "src/jolt/clojure/pprint.clj"]])
(defn- sym-name [x]
(when (and (struct? x) (= :symbol (get x :jolt/type))) (get x :name)))