6 Commits

Author SHA1 Message Date
dimgigov ab29c74299 fix(ci): install make in nim docker image before running tests 2026-05-12 20:21:34 +03:00
dimgigov 4b208dbe55 fix: threading macros, REPL stability, and CI coverage
- fix(emitter): emitFnWrapper now uses runtimeName for builtin operators
- fix(emitter): map/reduce handlers support variadic runtime functions (+, -, etc.)
- fix(emitter): variadic runtime functions list extracted to variadicRuntimeFns constant
- fix(macros): restore correct thread-first behavior (->) and fix result shadowing
- fix(macros): and/or/as->/some->/some->> macro result variable fixes
- fix(repl): add macroexpand step before interpreter eval
- fix(runtime): cljReduceSeq handles nil init (uses first coll element)
- fix(eval): add macroexpand/macroexpand-1 special forms to interpreter
- fix(eval): add macros module import for macroexpand access
- fix(warnings): eliminate ResultShadowed and UnusedImport warnings
- chore(.gitignore): remove artifact entries (-o, =0.4.0), unignore lib/bring_http.nim
- chore(ci): run all examples + threading macro + macroexpand REPL smoke tests
2026-05-12 20:02:58 +03:00
dimgigov 6bed638300 CI: expand pipeline — add test_deps/test_eval, all 7 examples, REPL smoke tests (quot, rem, channels, agents, tool-call) 2026-05-08 21:01:48 +03:00
dimgigov 6dfc2a9308 Phase 5: HAMT Persistent Map + Persistent Set, 86 tests pass
- T5.3: HAMT Persistent Map (lib/cljnim_pmap.nim)
  O(log32 n) assoc/dissoc/get with structural sharing
  16 unit tests, ckMap migrated from seq to HAMT

- T5.4: Persistent Set backed by HAMT map
  ckSet with conj/disj/contains?/get, set literal #{}

- Fix: cljContains/cljCount return CljVal (not bool/int)
- Fix: equality in generics via explicit cljEq parameter
- Updated roadmap, task board, CI/Makefile
2026-05-08 19:13:09 +03:00
dimgigov d763e25638 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
2026-05-08 17:58:00 +03:00
dimgigov 87d6028487 Phase 1-4: Reader, Runtime, Macros, Nim Interop — 543x faster than JVM Clojure
- Reader: maps, sets, syntax-quote, dispatch macros, metadata
- Runtime: CljVal type system, 80+ core functions (collections, strings, math, IO)
- Emitter: full CljVal-based code generation, macro expansion, inline fns
- Macros: defmacro with compile-time evaluator, ->, ->>, and, or, when, cond, for, doseq
- Nim Interop: nim/module/function syntax, auto-import, type mapping
- CLI: cljnim -e '<code>' for quick evaluation
- Tests: 60 unit tests (reader + emitter)
- Benchmarks: AOT suite showing 543x startup, 679x factorial vs JVM Clojure
- CI: GitLab CI pipeline
- Runtime library: lib/cljnim_runtime.nim (1070+ lines)
2026-05-08 16:34:39 +03:00