Rename src/jolt -> stdlib (the runtime-loaded layer; jolt-core stays the seed-baked layer) and update the loader / emit-image / doc paths. Drop dead code: the spike/ experiments, the duplicate clojuredocs-export.edn (json moves to tools/), the Janet-era jolt.http binding, and the orphaned persistent_vector.clj whose ns/path didn't even match. Strip porting residue from comments and docstrings across host/chez, jolt-core, stdlib, tests, and docs: internal issue ids, "Phase N" markers, and the "vs Janet" historical exposition, leaving present-tense descriptions and the real JVM-Clojure semantic contrasts. Same pass over the corpus suite labels. The seed is unchanged (docstrings/comments aren't emitted), so the self-host fixpoint and corpus are untouched. Port tools/spec_coverage.py off the dead janet probe to bin/joltc and regenerate coverage.md; drop the dead :host/janet rule from certify.clj and regenerate the conformance profile. Add docs/host-interop.md (the JVM shims and how to register your own host class from a library) and a writing-style note in CLAUDE.md. Stabilize the four racy concurrency corpus cases (future-cancel and agent send/send-off): give the future a sleeping body and the agent a slow action, so cancel reliably catches an in-flight future and deref reliably reads the pre-update snapshot. They certify deterministically now, so drop their :flaky allowlist entries and the orphaned legend.
33 lines
1.6 KiB
Clojure
33 lines
1.6 KiB
Clojure
;; clojure.pprint — minimal jolt shim.
|
|
;;
|
|
;; The real clojure.pprint is a full pretty-printer (thousands of lines of column
|
|
;; tracking / dispatch tables). This shim provides just the surface that portable
|
|
;; libraries reach for when they "pretty print" a value — notably
|
|
;; clojure.tools.logging/spy (pprint + with-pprint-dispatch + code-dispatch).
|
|
;; pprint writes the value readably with a trailing newline (no pretty layout);
|
|
;; the dispatch vars are recognized but not used for layout.
|
|
(ns clojure.pprint)
|
|
|
|
(def code-dispatch
|
|
"Recognized but not used for layout on jolt." :code-dispatch)
|
|
(def simple-dispatch
|
|
"Recognized but not used for layout on jolt." :simple-dispatch)
|
|
|
|
(def ^:dynamic *print-pprint-dispatch* simple-dispatch)
|
|
|
|
(defn pprint
|
|
"Print object readably followed by a newline. Not a pretty-printer on jolt —
|
|
no column-aware layout. jolt routes all printing through the host output seam
|
|
(with-out-str captures it), and *out* is not a bindable var, so an explicit
|
|
writer arg is accepted for API compatibility but not honored — output goes to
|
|
the current output. (The old `(binding [*out* writer] ...)` never redirected
|
|
anything either, and made the defn fall back to the interpreter; dropping it
|
|
lets pprint compile cleanly, which the no-fallback Chez back end requires.)"
|
|
([object] (prn object))
|
|
([object _writer] (prn object)))
|
|
|
|
(defmacro with-pprint-dispatch
|
|
"Evaluate body with the given pprint dispatch selected. On jolt the dispatch is
|
|
recognized but does not affect layout, so this just evaluates body."
|
|
[_dispatch & body]
|
|
`(do ~@body))
|