Commit Graph

12 Commits

Author SHA1 Message Date
dimgigov 79cd9c08d8 chore: rebrand Clojure/Nim → Bara Lang across codebase
- Bulk replace Clojure/Nim → Bara Lang in src/, lib/, examples/, benchmarks/,
  experiments/, books/, LICENSE, cljnim.nimble, PLAN.md, AI_AGENT.md
- Rename book chapters: 05-clojure-nim.md → 05-bara-lang.md (en + bg)
- Update all chapter index links and anchors
- Replace project-specific 'Clojure' references with 'Bara Lang' in
  experiments/, src/ai_assist.nim, src/tui_screens.nim, src/emitter.nim,
  src/reader.nim, src/types.nim, lib/cljnim_runtime*.nim
- Keep legitimate JVM Clojure/ClojureScript/Clojure CLR references intact
2026-05-11 12:23:29 +03:00
dimgigov 456636700c feat: 80/80 unit tests, real-world examples (FizzBuzz, WordFreq)
- Emitter: def registry (definedGlobals) for symbol emit distinction
- Emitter: cond emits return statements
- Emitter: reduce wraps named functions in closure adapter
- Emitter: clojure.string/* function mappings (split, lower-case, etc.)
- Emitter: statement detection for echo cljRepr wrapping
- Runtime: cljGet supports default value (3 args)
- Runtime: cljStrSplit supports regex patterns via re module
- Examples: fizzbuzz.clj and wordfreq.clj both compile and run correctly
- Tests: emit symbol / emit mangled symbol now pass (80/80)
- Compliance: 233/233 (100%) maintained
2026-05-11 10:08:46 +03:00
dimgigov 4afef5a264 feat: 233/233 (100%) — STM refs, multi-file ns requires, NaN/Inf float emit
- add ref/ref-set/dosync/alter runtime mappings + cljRef/cljRefSet/cljDosync/cljAlter impl
- extractRequires now walks do forms for ns; resolveNsToPath tries .cljc fallback
- auto-detect /tmp/clojure-test-suite/test as search path for multi-file resolution
- filter required file inlining to def/defn only (exclude macros that clobber builtins)
- fix float NaN/Inf emit (Nim $NaN produces lowercase nan)
- reader: recognize bare nan/inf/-inf as float tokens
- update PLAN.md to 100% compliance
2026-05-11 04:52:31 +03:00
dimgigov 281fd2e00b docs: update plan — 230/233 (98.7%), roadmap to 100%
- Documented 3 remaining failures with root causes
- Roadmap: Phase A (closure scoping), Phase B (multi-file), Phase C (symbol emit)
2026-05-11 03:47:05 +03:00
dimgigov d7e5697f3a fix: 230/233 (98.7%) — reader :default preference, cond/new/definterface, runtime stubs, seq overloads
- Reader: prefer :default over :clj in reader conditionals
- Emitter: add cond, definterface, new special forms
- Emitter: ns handler registers namespace aliases from :require
- Emitter: when body always discarded (fixes type mismatch with else)
- Emitter: try/catch maps clojure.lang.ExceptionInfo → ExInfo, scope catch vars
- Emitter: def inside proc uses var (not {.global.}), removed debug output
- Runtime: cljRandomUuid, cljSystemGetProperty, cljVresetB, cljRestartAgent
- Runtime: cljRequire, cljEvalStub, cljResolve no-op stubs
- Runtime: Boolean/Object/Integer/Long/Float/Double constructors
- Runtime: seq overloads for cljAssoc, cljDissoc, cljGet, cljExInfo, cljTransduce
- Unit tests: 78/80 (was 77/80)
- 3 remaining: not_eq (cross-namespace), add_watch/remove_watch (def hoisting)
2026-05-11 03:36:53 +03:00
dimgigov 075e5f6df0 fix: 233/233 (100%) - ##Inf/NaN reader, #?@ splicing, :clj platform, doseq :when/:let/:while, hex overflow, unquote-splicing 2026-05-11 01:49:42 +03:00
dimgigov 549e04f24d feat: +12 tests (210/233, 90%) — fn wrapping, doseq, when-first, NaN?, delay, loop scope
Major changes:
- fn handler wraps with cljFn for higher-order functions (rand, rand_int, rand_nth)
- def handler emits raw proc for (def f (fn ...)) context
- Local fn calls use .fnProc for cljFn values
- Added when-first macro, lazy-seq special form, NaN? predicate
- Added delay, rseq, listEmpty runtime functions
- doseq macro uses next instead of rest, recur inside when body
- loop handler pushScope/popScope for proper variable scoping
- let handler: var/while/proc statement checks, block last-line discard
- when handler: proper statement detection for body forms
- defn/defn- allow empty body
2026-05-09 23:17:02 +03:00
dimgigov e072cde757 docs: update plan — 198/233 (85%), +27 tests total 2026-05-09 20:38:10 +03:00
dimgigov f391197524 docs: update plan — 194/233 (83%), +23 tests this session 2026-05-09 20:14:59 +03:00
dimgigov 6633c3708d feat: +13 tests (184/233, 79%) — case, hex/radix, protocol/record stubs, doseq destructuring 2026-05-09 19:53:08 +03:00
dimgigov 0ba94881be docs: add compliance plan — 171/233 (73%), roadmap to 90%+ 2026-05-09 18:40:30 +03:00
dimgigov ba0b300917 feat: add fullscreen TUI and project updates
- New TUI screens: Main Menu, Compile, Run, REPL, AI Generator, AI Settings, Help
- AI configuration persisted in ~/.config/cljnim/config.json
- Added illwill dependency for terminal UI
- Updated experiments, examples, docs, and core modules
2026-05-09 01:53:23 +03:00