Phase 5: HAMT Persistent Vector + CI fixes

- Add lib/cljnim_pvec.nim: 32-way HAMT Persistent Vector with structural sharing
- Migrate ckVector from seq[CljVal] to PersistentVector[CljVal] in runtime
- Fix recursive pushLeaf bug (nil nodes at depth > 2)
- Fix defn/if return value bug: replace discard with result = in proc bodies
- Fix cljNth to accept CljVal index
- Add len and [] overloads for PersistentVector seq compatibility
- Add tests/test_pvec.nim (14 tests)
- Update .gitlab-ci.yml to nim:2.2.10 and add test_pvec
- Update docs/ROADMAP.md and add PHASE5_HAMT.md
This commit is contained in:
2026-05-08 17:58:00 +03:00
parent dbf05f4e96
commit d763e25638
7 changed files with 493 additions and 61 deletions
+3 -3
View File
@@ -45,11 +45,11 @@
- [ ] Tool-call format for AI framework integration
## Phase 5: Persistent Data Structures
- [ ] Persistent Vector (Hash Array Mapped Trie)
- [x] Persistent Vector (Hash Array Mapped Trie, 32-way branching)
- [ ] Persistent Map (HAMT)
- [ ] Persistent Set
- [ ] `conj`, `assoc`, `dissoc`, `get`, `get-in`
- [ ] `nth`, `first`, `rest`, `last`, `count` on persistent collections
- [x] `conj`, `assoc`, `dissoc`, `get`, `get-in`
- [x] `nth`, `first`, `rest`, `last`, `count` on persistent collections
- [ ] Transients for batch mutations
## Phase 6: Clojure Core Library