llang is a programming language designed to be written by AI and read by humans. The project was created with a single objective: produce code that you can understand after reading it once, so human reviewers can inspect what an AI generated with confidence. Human-era compromises like terse syntax, abbreviations, operator soup and clever implicit behavior were classified as pure downside for a model, so llang trades them for verbose, explicit, regular constructs.

The language feels like structured English but runs like Python. Every construct announces itself, every block has an explicit terminator, and every argument is labeled. Nothing is hidden or implicit. The goal is not clever code — it is code you can read once and understand.

Natural-language phrasing is the point, not a novelty. llang is structured pseudocode you can actually run. The surface language has a closed vocabulary of synonyms; the parser normalizes every spelling to one canonical AST node, and the interpreter only ever sees that node. Synonyms add readability without adding ambiguity — the failure mode that sank AppleScript and Inform 7.

Core language constructs

Values in llang include numbers, text, booleans, nothing, lists, maps and functions. Statements cover the full range of control flow and data handling: set or let, show or display or print, require, add, set item, if with otherwise, repeat while, repeat for each, stop the loop, skip to the next item, functions with aliases, labeled call, fail with expect problem handling, and use modules. Expressions evaluate strictly left-to-right with parentheses available for grouping. Word operators have closed synonyms — floor divided by is one example — and postfix predicates appear after their collection.

An example program demonstrates the style:

set scores to a map with "Ada" mapped to 91, "Grace" mapped to 98
repeat for each student in (call keys of with collection = scores)
    show student plus ": " plus (call text of with value = item student of scores)
end repeat

Arguments are always labeled: you call a function with name = x, never with a bare position. The @ symbol escapes reserved words anywhere a name is expected, so you can write call f with @end = 1 when @end would otherwise be reserved.

Domain libraries and AI ergonomics

llang ships with domain libraries that mirror established Python ecosystems. advanced_math re-expresses math and statistics functionality. datascience brings NumPy and pandas semantics into the language. machinelearning implements scikit-learn semantics. All three are native llang, with self-describing results and loud validation that makes it easy to verify output correctness.

The standard library lives in lib/ and includes modules for math, text, lists, shell, shlex, fnmatch, textwrap, csv, json, re, ast_contract, pylev and humanize. An explicitly labeled opt-in foreign bridge provides access to json, math and shell from outside the language. These modules are themselves written in llang and verified against their CPython counterparts.

Objects are minimal classes with explicit this, single inheritance-free construction via call new ..., and asking an instance to method . The type system is dynamic but strict — no implicit coercion occurs during operations.

Verification and the differential test suite

The language is fully verified. The interpreter requires Python 3.10+ to run. The complete verification suite additionally uses Node.js for WebAssembly checks and the Python data libraries numpy, pandas and scikit-learn as oracle references. Install the development dependencies with pip install -e '.[dev]' before running tools/check.py.

The verification suite runs a battery of checks: tests, linting, rewrite verification and link checks. The project reports 2,546 differential cases total with 0 mismatches. Domain libraries have been verified against originals across 1,562 cases for pylev and humanize, and 330 cases for the advanced_math, datascience and machinelearning modules. The box2d module, a headless physics engine subset, runs a working 60-step simulation that has been cloned and rewritten from the original repository.

Rewrites of existing Python software have been verified in llang with identical output. The project includes a report_card.ll flagship program that grades its own result, and a rubiks.ll simulator that writes a browser viewer (rubiks.html). A visualizer for box2d writes physics.html, a live browser animation where all frames are computed in llang.

Tooling, porting and the ecosystem

llang provides a full set of developer tools. The canonical formatter and pre-run linter check code before execution. An LSP language server runs over stdio. A Python-to-llang converter exists as a pipeline command. A property-based differential fuzzer checks semantic consistency. Single-command verification runs the entire test suite. GitHub Actions CI is configured for the repository.

The universal porting app takes a repository of Python, C or JavaScript source and converts supported files to readable llang, preserving structure. It produces coverage reports and a verification report, and puts unmatched items into a JSONL cleanup queue for AI-assisted completion. Run it with llang-port-repo -o or, after installing the package, with llang-port my.py -o ported.ll --report report.txt.

Compilation to WebAssembly is supported for the integer/function subset: llang-compile file.ll -o file.wasm, with output verified by executing in Node.js. The compiler is in src/llang/compiler.py.

Self-hosting is a notable milestone: llang's own lexer is written in llang (lib/llang_lexer.ll) and verified token-for-token against the bootstrap lexer. The project is at stage 2 of self-hosting.

The ecosystem includes a native json module, JSON package manifests with a registry, editor grammars for VS Code and tree-sitter, and a browser playground at localhost:8080 started with node tools/playground/server.js.

Getting started requires Python 3.10+. Run a program with python run.py examples/hello.ll, start an interactive shell with python repl.py, or run the full check suite with python tools/check.py. Install the package for console commands with pip install -e . and use llang examples/hello.ll, llang-port my.py -o ported.ll, or llang-compile my.ll -o my.wasm. Start the language server with python -m llang.lsp.