79cd9c08d8
- 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
34 lines
735 B
Clojure
34 lines
735 B
Clojure
; AI-Native Tooling Demo
|
|
; File and Git operations from Bara Lang
|
|
|
|
(println "=== File Operations ===")
|
|
|
|
; Write a file
|
|
(file/write "/tmp/ai_demo.txt" "Hello from Bara Lang AI!")
|
|
|
|
; Read it back
|
|
(println (file/read "/tmp/ai_demo.txt"))
|
|
|
|
; Append to it
|
|
(file/append "/tmp/ai_demo.txt" " Appended text.")
|
|
(println (file/read "/tmp/ai_demo.txt"))
|
|
|
|
; Check existence
|
|
(println "Exists?" (file/exists? "/tmp/ai_demo.txt"))
|
|
(println "Missing?" (file/exists? "/tmp/nowhere.txt"))
|
|
|
|
; List directory
|
|
(println "Files in /tmp:" (file/ls "/tmp"))
|
|
|
|
(println "")
|
|
(println "=== Git Operations ===")
|
|
|
|
; Show current git status
|
|
(println (git/status))
|
|
|
|
; Show recent commits
|
|
(println "Recent commits:" (git/log))
|
|
|
|
; Show diff
|
|
(println "Diff:" (git/diff))
|