27–63% fewer tokens than JavaScript. Every token costs money — Arc minimizes the bill.
First-class tool calls, built-in LLM integration, prompt templates, embeddings, and persistent storage.
The |> operator eliminates nested function calls. Data flows left to right, naturally.
fn fetchUsers() { @GET("https://api.example.com/users") |> filter(u => u.active) |> map(u => u.name) |> sort() }
async function fetchUsers() { const res = await fetch( "https://api.example.com/users" ); const data = await res.json(); return data .filter(u => u.active) .map(u => u.name) .sort(); }
let msg = match response.status { 200 => "OK", 404 => "Not found", 500..599 => "Server error", _ => "Unknown: {response.status}" }
let msg; if (response.status === 200) { msg = "OK"; } else if (response.status === 404) { msg = "Not found"; } else if (response.status >= 500 && response.status < 600) { msg = "Server error"; } else { msg = `Unknown: ${response.status}`; }
let [weather, news, stocks] = fetch [ @GET "api/weather?city=NYC", @GET "api/news/top?n=5", @GET "api/stocks/AAPL" ] let summary = news.articles |> take(3) |> map(a => "• {a.title}") |> join("\n")
const [weather, news, stocks] = await Promise.all([ fetch("api/weather?city=NYC") .then(r => r.json()), fetch("api/news/top?n=5") .then(r => r.json()), fetch("api/stocks/AAPL") .then(r => r.json()) ]); const summary = news.articles .slice(0, 3) .map(a => `• ${a.title}`) .join("\n");
Plugin architecture, middleware chains, session management, 3 API integrations — 285 lines of Arc.
View Code →DAG dependency resolution, cron scheduling, parallel execution, retry with backoff — 66% less code than JS.
View Code →Forward/back propagation, matrix ops, activation functions. Trains on XOR. Pure Arc.
View Code →Proof-of-work mining, chain validation, cryptographic hashing. Complete implementation in Arc.
View Code →CRUD, WHERE filters, ORDER BY, GROUP BY, JOINs, indexing — a full query engine.
View Code →Enter your current monthly AI token spend. See what Arc saves you.
Conservative: 27% avg · HTTP-heavy: up to 63%
Last expression is the return value. No return keyword needed.
Powerful match expressions for clean control flow.
Async/await with parallel fetch built in. Concurrent by default.
Math, strings, HTTP, JSON, YAML, TOML, HTML, crypto, OS, path, env, logging — plus AI-native modules for prompts, embeddings, LLMs, and persistent storage.
Lightweight type system with constraints for safety without ceremony.
Clean imports with pub exports. Encapsulation made simple.
Rust-style error messages with source snippets, line numbers, and "Did you mean?" suggestions.
Run untrusted code safely with resource limits, import control, and command injection protection.
# Install from npm npm install -g arc-lang # Or clone and run git clone https://github.com/kai-builds-ai/arc-lang cd arc-lang/compiler && npm install npx tsx src/index.ts run examples/hello-world.arc # Start the REPL npx tsx src/index.ts repl