Chez parity: date/time + clojure.edn/read over a reader (jolt-cf1q.7/dcmm/7t3l/uicd)

Date/time (inst-time.ss): java.util.Date / java.sql.Timestamp ctors accept ms or
another date value (ms-of) -> a jinst; java.text.SimpleDateFormat (pattern + .format
via the existing format-ms UTC engine; .setTimeZone accepted); java.util.TimeZone/
getTimeZone. instance? answers Date true / Timestamp false for a jinst (a Date is
not a Timestamp on the JVM).

clojure.edn/read over a reader (io.ss + post-prelude): the overlay edn.clj's
drain-reader is janet/type-coupled, so Chez drains the jhost StringReader/
PushbackReader to a string and reads the first EDN form. Unblocks jolt-uicd.

Native Chez throughout (no vendoring): Chez date arithmetic + string ports. zero-Janet
2688->2692, 0 new divergences; self-host + Janet gate + JVM cert green.

jolt-cf1q.7 jolt-dcmm jolt-7t3l jolt-uicd
This commit is contained in:
Yogthos 2026-06-20 18:03:58 -04:00
parent 60b4bae105
commit 01f49f50c3
4 changed files with 46 additions and 7 deletions

View file

@ -121,6 +121,13 @@
(define (reader-jhost? x)
(and (jhost? x) (member (jhost-tag x) '("string-reader" "pushback-reader"))))
;; clojure.edn/read over a reader (jolt-uicd): the overlay edn.clj's drain-reader is
;; janet/type-coupled, so on Chez we drain the jhost reader to a string and read the
;; first EDN form (read-string). Re-asserted over the prelude in post-prelude.ss.
(define (chez-edn-read reader)
(jolt-invoke (var-deref "clojure.core" "read-string")
(if (reader-jhost? reader) (drain-reader reader) (jolt-str-render-one reader))))
(define (jolt-slurp src . opts)
(cond
((jfile? src) (read-file-string (jfile-path src)))