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
This commit is contained in:
2026-05-11 12:23:29 +03:00
parent 606605c95c
commit 79cd9c08d8
41 changed files with 128 additions and 128 deletions
@@ -1,12 +1,12 @@
# Clojure/Nim: Native Clojure
# Bara Lang: Native Clojure
> The same language you love. Compiled to native binaries. No JVM required.
---
## What is Clojure/Nim?
## What is Bara Lang?
**Clojure/Nim** is a complete Clojure dialect that compiles to native machine code via the Nim compiler. It is not an interpreter — it is a real compiler with a full optimization pipeline:
**Bara Lang** is a complete Clojure dialect that compiles to native machine code via the Nim compiler. It is not an interpreter — it is a real compiler with a full optimization pipeline:
```
Your .clj file
@@ -26,7 +26,7 @@ The result is a single executable file, often under **1 MB**, that starts instan
### Why Native?
| JVM Clojure | Clojure/Nim |
| JVM Clojure | Bara Lang |
|-------------|-------------|
| Needs Java runtime installed | Self-contained binary |
| ~2-5 second startup time | Instant startup |
@@ -112,7 +112,7 @@ The JSON REPL is designed for programmatic interaction. Every operation has stru
## AI-Powered Development
Clojure/Nim is the first Clojure implementation built with AI assistance as a first-class feature.
Bara Lang is the first Clojure implementation built with AI assistance as a first-class feature.
### Error Explanation
@@ -154,7 +154,7 @@ export DEEPSEEK_API_KEY="sk-..."
## `loop` / `recur`: Real TCO
Unlike JVM Clojure (which uses `recur` to avoid stack overflow but still runs on a stack-based VM), Clojure/Nim compiles `loop`/`recur` to a native `while` loop:
Unlike JVM Clojure (which uses `recur` to avoid stack overflow but still runs on a stack-based VM), Bara Lang compiles `loop`/`recur` to a native `while` loop:
```clojure
(defn factorial [n]
@@ -170,7 +170,7 @@ This generates efficient C code with no function calls. It is **genuinely O(1) s
## Cross-Compilation Targets
Clojure/Nim can target multiple platforms from the same source:
Bara Lang can target multiple platforms from the same source:
### Native Binary (default)
```bash
@@ -202,7 +202,7 @@ This is something JVM Clojure simply cannot do.
## Persistent Data Structures
Clojure/Nim implements real **Hash Array Mapped Trie (HAMT)** vectors and maps:
Bara Lang implements real **Hash Array Mapped Trie (HAMT)** vectors and maps:
```clojure
(def v (vector 1 2 3))
@@ -264,9 +264,9 @@ Threading macros, `when-let`, `cond`, `doto`, `some->` — all implemented as re
---
## When to Use Clojure/Nim
## When to Use Bara Lang
| Use Case | Clojure/JVM | Clojure/Nim |
| Use Case | Clojure/JVM | Bara Lang |
|----------|-------------|-------------|
| Large web services | ✅ | ⚠️ (early stage) |
| CLI tools | ⚠️ (slow startup) | ✅ (instant) |
@@ -287,4 +287,4 @@ Threading macros, `when-let`, `cond`, `doto`, `some->` — all implemented as re
---
*Clojure/Nim is proof that you do not need a virtual machine to write elegant, functional, immutable code. You just need a good compiler.*
*Bara Lang is proof that you do not need a virtual machine to write elegant, functional, immutable code. You just need a good compiler.*
+4 -4
View File
@@ -24,10 +24,10 @@
- **Caching** - [1.5](en/01-fundamentals.md#15-memoization), [8.6](en/02-advanced.md#86-preload-and-cache), [8.2](en/04-recipes.md#82-caching-with-ttl)
- **Case** - [6.1.5](en/01-fundamentals.md#615-case)
- **Channels** - [16.1](en/01-fundamentals.md#161-channels), [5](en/05-clojure-nim.md#concurrency)
- **Clojure/Nim** - [5](en/05-clojure-nim.md) — Native compilation, AI integration, JSON REPL
- **Compilation (native)** - [5](en/05-clojure-nim.md#what-is-clojure-nim)
- **Cross-compilation** - [5](en/05-clojure-nim.md#cross-compilation-targets) — JS, WASM, shared libraries
- **Channels** - [16.1](en/01-fundamentals.md#161-channels), [5](en/05-bara-lang.md#concurrency)
- **Bara Lang** - [5](en/05-bara-lang.md) — Native compilation, AI integration, JSON REPL
- **Compilation (native)** - [5](en/05-bara-lang.md#what-is-bara-lang)
- **Cross-compilation** - [5](en/05-bara-lang.md#cross-compilation-targets) — JS, WASM, shared libraries
- **Characters** - [4.3](en/01-fundamentals.md#43-characters)
- **Chunked sequences** - [2.2](en/02-advanced.md#22-chunked-sequences)
- **Circuit breaker** - [3.4](en/04-recipes.md#34-circuit-breaker)