Phase 14 fixes: pr-str mapping, every-pred, PLAN.md update

- compiler.janet: fix core-pr-str mapping — was pointing to core-str (line 221)
- core.janet: add core-pr-str (string/format-based serialization with proper quoting),
  add core-every-pred (variadic predicate composition), wire both into core-bindings
- cljs-port-5.janet: restore var-dynamic? test, with-meta preserves test,
  add pr-str keyword and every-pred assertions
- PLAN.md: update to current state — all phases 0-14 checked off, 316/317

316 ok, 1 fail (pre-existing, unchanged)
This commit is contained in:
Yogthos 2026-06-03 17:12:29 -04:00
parent 6b0fdefc61
commit 84d92c1008
6 changed files with 136 additions and 37 deletions

View file

@ -1,7 +1,5 @@
REPL print-value uses buffer-based output: write-value/v buf appends formatted strings via buffer/push-string, then print-value creates buffer, builds string, and does a single (print (string buf)). This prevents Janet C runtime from interleaving native <tuple 0x...> output between prin statements in jpm build executables. Cond catch-all must use true clause: Janet's cond treats plain expressions as tests, so (push-str buf (string v)) at end of cond would be evaluated as a test — need true before it.
§
Post-Phase 11: 316 passing, 1 fail (pre-existing array/table/buffer in SCI lang.cljc, deferred to Phase 15). 7,800+ lines across ~20 source/test files. 9 .clj stdlib modules (clojure/string.clj, set.clj, walk.clj, zip.clj, edn.clj, java_io.clj; jolt/interop.clj, shell.clj, http.clj). 85 CLJS-ported assertions. SCI stub file at src/jolt/clojure/sci/lang_stubs.clj provides 5 protocols + 3 deftypes. 24 test files. All builds/runs via `jpm test`.
§
Project stats after Phase 12: 7,800+ lines across 30+ source/test files. Key sources: compiler.janet (848 lines), evaluator.janet (869 lines), core.janet (1387 lines), types.janet (441 lines), reader.janet (472 lines), phm.janet (199 lines), main.janet (125 lines), api.janet (93 lines), loader.janet (79 lines). Test suite: 316 ok, 1 fail (pre-existing deftype in lang.cljc). 17 CLJS-ported test files + 6 custom test files. 9 .clj standard library modules under src/jolt/clojure/ and src/jolt/jolt/. All builds/runs via `jpm test`.
Post-Phase 13: 316/317 passing, 1 fail (pre-existing deftype in SCI lang.cljc, deferred to Phase 15). 8,000+ lines across ~25 source/test files. Key sources: compiler.janet (848), evaluator.janet (877), core.janet (1387), types.janet (441), reader.janet (500), phm.janet (199). 9 .clj stdlib modules (clojure/string.clj, set.clj, walk.clj, zip.clj, edn.clj, java_io.clj; jolt/interop.clj, shell.clj, http.clj). SCI stub file at src/jolt/clojure/sci/lang_stubs.clj provides 5 protocols + 3 deftypes. ~25 test files with 850+ assertions. CLJS-ported tests: 6 files, 27 sections, ~120 assertions. All builds/runs via `jpm test`.
§
Protocol system: Type registry in context env (:type-registry) maps type-tag→proto-name→method-name→fn. Three dispatch special forms: protocol-dispatch (resolves method via registry or reified methods), register-method (stores impl in registry), make-reified (creates anonymous object with :jolt/protocol-methods). fn* forms emitted by extend-type/extend-protocol MUST be @[...] (array) for eval-list dispatch. Protocols are maps with :jolt/type :jolt/protocol and :methods map.