feat: transients, unchecked arithmetic, hash helpers + fix REPL set printer

More clojure.core coverage (real implementations, not stubs):
- transient/persistent!/conj!/assoc!/dissoc!/pop! as correctness-preserving
  aliases (Jolt collections are persistent, so no in-place speedup but correct)
- unchecked-* arithmetic (Jolt numbers don't overflow -> plain ops)
- hash-combine/hash-ordered-coll/hash-unordered-coll (24-bit masked to stay
  in integer range), ex-cause (ex-info now records a cause), prefers, random-uuid

Fix a pre-existing REPL bug: the set printer in main.janet iterated the backing
phm's table keys (:buckets/:cnt) instead of the elements, so every set printed
as #{:buckets :cnt} at the REPL (pr-str was already correct). Now uses phs-seq.

conformance 218/218, features 78/78, jank 120.
This commit is contained in:
Yogthos 2026-06-04 19:43:19 -04:00
parent 39edb88074
commit c275112a5f
2 changed files with 71 additions and 5 deletions

View file

@ -96,10 +96,9 @@
(do
(push-str buf "#{")
(var first? true)
(each k (keys (v :phm))
(when (not= k :jolt/deftype)
(if first? (set first? false) (push-str buf " "))
(write-value k buf)))
(each k (phs-seq v)
(if first? (set first? false) (push-str buf " "))
(write-value k buf))
(push-str buf "}"))
(and (table? v) (= :jolt/regex (v :jolt/type)))