jolt/docs/rfc
Dmitri Sotnikov 307b65b45b
Fix -m arg drop under whole-program cache (jolt-4mui) + RFC 0003 sync (#138)
* Bind *command-line-args* after the deps-image cache swap (jolt-4mui)

Under whole-program (deps-image cache active), `jolt -m NS ARG` dropped ARG:
run-main set *command-line-args* on the current ctx, but a cache HIT then
replaced ctx with the saved image (via `set ctx cached`), whose *command-line-
args* was whatever got baked when the image was saved. The stale binding won at
`(apply NS/-main *command-line-args*)`, so -main ran with the wrong (usually
default) args — silently, for any optimized -m program.

Move set-command-line-args to AFTER the cache swap so it binds on the final ctx.
Repro/regression in deps-cache-args-test.janet: first run builds the image
(arg "first"), second run (cache hit) must echo "second", not the baked "first".

* docs: RFC 0003 — phm is a HAMT, sorted colls a red-black tree

The transients RFC described phm as "bucket-based copy-on-write" and mused about
"if it ever becomes a HAMT" — it is one now (jolt-684u), and sorted maps/sets are
a red-black tree (jolt-0hbr). Update the deviation/future-work notes accordingly.

---------

Co-authored-by: Yogthos <yogthos@gmail.com>
2026-06-16 13:34:08 +00:00
..
0001-language-specification.md docs: language specification RFC + spec skeleton with normative exemplars 2026-06-10 10:53:44 -04:00
0002-reader-conditional-features.md reader: feature set #{:jolt :default}, clause-order matching (RFC 0002) 2026-06-10 11:40:06 -04:00
0003-transients.md Fix -m arg drop under whole-program cache (jolt-4mui) + RFC 0003 sync (#138) 2026-06-16 13:34:08 +00:00
0004-type-hints.md Direct-link + whole-program by default for program runs; open for the REPL 2026-06-14 15:44:01 -04:00
0005-structural-type-inference.md Direct-link + whole-program by default for program runs; open for the REPL 2026-06-14 15:44:01 -04:00
0006-success-type-checking.md docs: RFC 0006 — mark negative/never types resolved (jolt-wwy) 2026-06-13 14:48:39 -04:00