AC Programming Language

A multi-backend compiler pipeline. Write clean, human-centric source files and compile directly across multiple target languages and performance layers.

Install via npm

Core Specifications

Multi-Target Compilation

Translate source scripts out to Python, JavaScript, Go, C, C++, Rust, Java, HTML, V, and Assembly channels simultaneously.

Human-Centric Grammar

Clean 1-indexed collection layouts, explicit $ string containers, and formal english linguistic bounds like WHILST.

Native Executables

Generate standalone x86-64 machine-code targets directly through the BNY compilation backend channel with no external dependencies.

Event Loop Architecture

Integrated GUI event listener modules, custom triggers, and hardware key bindings built directly for application scaling.

Widget Layer

Native user-interface component layout definitions for compiling visual windows and modular graphical layouts.

Caching System

Optimized recompilation paths via local intermediated tracking loops, outputting fast .acc and .lir caches.

Supported Target Channels

Native Binary
x86-64 Assembly
Go (Golang)
Python
JavaScript
C Language
C++ Engine
Rust Core
Java Virtual
HTML / CSS
V Language
Library (LIB)

Language Grammar Benchmark

sieve_benchmark.ac
AC->PY

/* Sieve of Eratosthenes — Find Primes Up to N */
Make sieve func(n)
    prime = []
    j = 0
    WHILST j #> n
        prime.append(True)
        j += 1
    
    prime[1] = False
    prime[2] = False
    p = 2
    WHILST p * p #> n
        IF prime[p + 1]
            i = p * p
            WHILST i #> n
                prime[i + 1] = False
                i += p
        p += 1
    result = []
    i = 2
    WHILST i #> n
        IF prime[i + 1]
            result.append(i)
        i += 1
    return result

<mainloop>
    limit = 50
    primes = sieve(limit)
    Term.display primes
<mainloop>

Quick Start Execution

# Install the runtime toolchain globally
npm install -g aclang

# Compile & run — backend is declared on line 1 of the file (AC->XX)
ac mycode.ac

# Override with a specific target, e.g. Go source
ac mycode.ac GO

# Build a standalone native binary via the BNY backend
ac mycode.ac BNY

# Compile to every registered backend at once
ac mycode.ac --all

Try AC

Compiles and runs on a real, sandboxed AC compiler instance — genuine output, not a simulation. Limited to the HTML, JS, and BNY (native binary) backends here; the other nine need the full toolchain via the ac CLI.

Ctrl+Enter to run — no install needed
editor.ac
output
// Click ▶ Run or press Ctrl+Enter