Commit Graph

19 Commits

Author SHA1 Message Date
dimgigov 32dbd1fc5d docs: fix AI-First heading visibility and index navigation
- Remove leading blank line and --- separator before H1 in
  03-ai-integration.md (EN + BG) to prevent markdown rendering issues
- Fix broken language switcher links in en/index.md and bg/index.md
- Add documentation TOC tables to both index files for proper navigation
2026-05-11 14:45:50 +03:00
dimgigov 1d9a21fbd4 Rename Clojure/Nim to Bara Lang in documentation 2026-05-11 11:58:02 +03:00
dimgigov a9ad83c509 fix: general equality (=) for all types, add type predicates & collection fns, test suite docs
- Fix: = now uses cljEqual/cljMultiEqual instead of numeric-only cljNumEq,
  so (= :a :a), (= "a" "a"), (= [1 2] [1 2]), (= nil nil) etc return true
- Fix: ns forms inside unwrapped (do ...) are skipped instead of emitting
  broken Nim comments inside cljRepr()
- Fix: defmacro forms go to defs section, not wrapped in discard cljRepr()
- Add 18 type predicates: keyword?, symbol?, string?, number?, integer?,
  float?, vector?, map?, set?, list?, seq?, coll?, sequential?, fn?,
  boolean?, true?, false?, some?
- Add collection fns: second, ffirst, nfirst, peek, pop
- Add keyword/symbol ops: keyword, symbol, name, namespace, key, val
- Update eval interpreter = to handle structural collection equality
- Add test_single.py + test_vals.clj for Clojure test suite runner
- Add docs/en/07 and docs/bg/07 for cross-dialect test suite compatibility
- Update README with test suite documentation link
2026-05-09 12:17:10 +03:00
dimgigov 4739e2c151 docs: highlight unique advantages — standalone, HAMT, multi-target
Update README and architecture docs to emphasize:
- Complete independence from Java ecosystem (JVM, GraalVM, Closure)
- Native HAMT persistent data structures built from scratch in Nim
- Multi-target compilation (native, shared lib, WASM, JS)
- AI-native tooling and concurrency without JVM threads

Updates both English and Bulgarian documentation.
2026-05-08 23:59:24 +03:00
dimgigov 10e4ec07d6 docs: reorganize into en/ and bg/ subfolders with numbered indices
- New docs/index.md with language selector
- docs/en/ — 01-getting-started, 02-architecture, 03-ai-integration,
  04-api-reference, 05-user-guide, 06-roadmap
- docs/bg/ — same structure in Bulgarian
- Root README.md trimmed to quick-start + links to docs/
- Removed old flat docs/ files (ARCHITECTURE.md, AI_FIRST.md, etc.)
- Added swap!/reset! examples to getting-started guides
2026-05-08 23:24:47 +03:00
dimgigov 9996bc38de Fix: isolate temp/cache build dirs to avoid shadowing Nim stdlib modules. All 7 examples pass. 2026-05-08 20:52:07 +03:00
dimgigov 88866872be Bugfixes: add cljQuot/cljRem to runtime, quot/rem to interpreter. Cleanup: remove unused processAgentActions and sequtils import. 164 tests pass. 2026-05-08 20:45:36 +03:00
dimgigov 30fde68fed Phase 9: Agents (send/await/deref) + core.async channels (chan, >!, <!, close!, go). All phases complete. 2026-05-08 20:28:51 +03:00
dimgigov 1f9d662ed9 Phase 8: Tree-walking interpreter for in-memory REPL eval (~0.02ms vs 1133ms compiled). 66 eval tests. 2026-05-08 20:16:42 +03:00
dimgigov feb9cee287 T7.4: Dependency resolution — deps.edn parser, Git deps, cljnim deps command, 12 tests 2026-05-08 20:05:19 +03:00
dimgigov 62ca70d05a Phase 4/7: nREPL, Tool-call format, Module caching
T4.5 nREPL: TCP-based JSON REPL (cljnim repl --tcp 9999)
T4.6 Tool-call: {"tool":"cljnim/eval","args":{"form":"..."}}
T7.3 Module caching: nimcache/ in project dir, skip regen if unchanged

Phase 4 now 100% complete. Phase 7: 3/4 tasks done.
2026-05-08 19:57:39 +03:00
dimgigov b67962dbba Phase 5/6 complete: Transients, meta/with-meta, instance?
T5.5 Transients (transient/persistent!/conj!/assoc!)
  - Mutable builder for batch vector/map operations
  - Use with let bindings for proper ordering

T6.10 meta/with-meta — metadata on any CljVal via ref object field
T6.11 instance? — type predicate (instance? :integer 42)

Also marked T9.1 Atoms as done (already implemented earlier)

86 tests pass, all examples work.
Phases 0-6 now complete. Phase 7: 2/4 tasks done.
2026-05-08 19:48:35 +03:00
dimgigov 66d91cd086 Phase 7: ns declaration + multi-file compilation
T7.1: Namespace declaration parsing
  (ns my.app (:require [lib :as l])) with :require/:as support
  Hyphen-to-underscore filename convention (math-utils -> math_utils.clj)

T7.2: Multi-file compilation
  Resolves requires, recursively loads dependencies
  Inlines all defs into single Nim file
  Namespace alias resolution (mu/square -> square)

86 tests pass, all examples work.
2026-05-08 19:37:35 +03:00
dimgigov 19ef69bf5b Phase 6: slurp, spit, read-line, range 3-arg, repeat/cycle/iterate, interleave
Phase 6 Clojure Core Library now complete (except meta):
- T6.3: slurp (alias for file/read)
- T6.4: spit (alias for file/write)
- T6.5: read-line (stdin input)
- T6.6: range with 3 args (start, end, step)
- T6.7: repeat, cycle, iterate (eager implementations)
- T6.9: interleave
- Updated TASKS.md and ROADMAP.md
2026-05-08 19:24:06 +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 dbf05f4e96 Add file and git operations accessible from Clojure code 2026-05-08 17:13:12 +03:00
dimgigov 301231787c Fix macro expansion in REPL; update roadmap to reflect actual capabilities 2026-05-08 17:05:53 +03:00
dimgigov f189dbd14a Add bilingual documentation (EN + BG) in docs/ 2026-05-08 16:59:24 +03:00