A language for building microservices and enterprise software — with dependency injection, function intent, and refined types as first-class citizens. Compiled to native binaries through C.
Ideas that usually live in frameworks and conventions are, in Ξ, features of the language itself.
Constraints live in the type. Values are checked at construction, so a partially-valid instance can never exist.
Number where value >= 0
Eight kinds — mapper, predicate, consumer, producer and more — make purity and effects syntactic. The compiler enforces them.
mapper · predicate · consumer
Declare deps { } and the compiler wires it. No container, no registration, no reflection.
One name, many bodies — the first where guard that holds wins. It is exactly how std/web routing works.
where res.status == 200
Business rules as first-class DxT tables — alongside atoms, state machines, interrupts and pub/sub events.
DxT · atoms · machines ↓T! result types, ok/err, and ? propagation. Failures are values you handle, not surprises.
let row = load(id)?
async spawns a worker and returns a Future immediately. await all joins them, in order.
await all jobs
Absence is typed. Optionals (T?) unwrap with if let; empty gives the zero value. null does not exist.
if let row = find(7) { … }
Algebraic types with payload-binding match — lowered to plain tagged unions.
match s { Circle c -> … }
Resumable conditions. A function signals and suspends; the caller decides — resume it or abandon it.
Built-in pub/sub. Producers publish a DTO; listeners receive the typed value. No JSON inside the process.
Compiles to a standalone binary through C — or to WebAssembly with --target wasm. No VM, no garbage collector.
xc app.xi → ./build/app
Every serious codebase ends up bolting on an IoC container — a framework, annotations, a runtime registry. Ξ moves injection into the compiler: you declare what you need, and the wiring is derived from your code.
A class lists what it needs in a deps { } block. It never news up its own collaborators — constructor plumbing disappears from the codebase.
Implementations are discovered and wired automatically at compile time. No container to configure, no annotations, no reflection — a missing dependency is a build error, not a runtime surprise.
The entry takes dependencies as parameters. Classes, listeners — even decision tables — declare deps. Lifetimes are explicit: singleton or transient.
bind is the override, not the ruleYou only write bind to choose between implementations or swap in a test double. Zero bindings is the normal case.
Rules engines, Redux stores and statechart libraries are language constructs in Ξ. All three are values — and all three are injectable.
A decision is a function kind whose body is a set of when → result arms, read top to bottom — first match wins. The rule set your product owner writes on a whiteboard is the code.
when <cond> => <result> arms, with an else fallback
hit first: the first matching arm wins
An atom holds an immutable state that can only change through transition reducers — Redux, built into the language instead of imported from npm.
.current — the state is immutable, there are no setters
transition reducers take the state and return a new one — call them with just the extra args
.undo() / .canUndo() — history comes for free
A machine declares named states, machine-wide data, and transitions with parameters. Machines are immutable — every transition returns a new value.
where guards and update clauses on every transition
.can(...)
IllegalTransition — a resumable interrupt, not a crash
A function signals a condition and suspends. The enclosing try/catch decides what happens next. Exceptions unwind — interrupts negotiate.
interrupt declares a typed condition with a payload
recover runs the restart and resumes at the signal point
skip abandons the suspended computation instead
Producers publish(topic, dto); a listener receives the typed value — zero serialization in process. Bind a transport to cross the network; producers and listeners never change.
listener kind subscribes with on "topic" — each delivery resolves fresh deps
Events.run() or Events.runAsync()
PublisherService / ConsumerService to go external
A typed web framework, a test runner, configuration and C interop ship with the toolchain. Building a service needs no packages.
Implement WebRequestHandler and route by overloading handle with where guards. Params and bodies decode into your types; responses serialize themselves. HTTPS and HTTP/2 are opt-in flags.
test blocks are excluded from normal builds and run with xt. Tests get dependencies injected, and module Test bindings swap in doubles — no mocking library.
Config is an interface bound to a file: bind AppConfig -> readConfig("app.yaml"). YAML, JSON or XML — hot-reload included.
Port a C library by declaring it: an extern "C" block plus a link directive. The signatures are the binding.
List, Map, Set, Stack, Queue, SortedQueue — built-in generics, no imports.
math · text · json · yaml · xml · crypto · fs · net · http · thread · process · time
xc app.xicompile to a native binaryxirun tool + interactive REPLxt calc_test.xirun the testsxi installfetch module dependenciesxi packpackage a library for othersloadtest --bench app.xiload & perf testingxc --target wasmcompile to WebAssemblyxi updateself-update the toolchaineXstream — a music-streaming service built in Ξ: microservices behind an API gateway, JWT auth, a React front end, Docker deployment.
code-by-sia/eXstream ↗On macOS (Apple Silicon & Intel) and Linux. You just need a C compiler on your PATH.
Or grab a prebuilt tarball from the releases page and put its bin/ on your PATH.
You get xc, the compiler, and xi, the run tool and REPL.
Save a file with the .xi extension. Every program has an entry and a module.
One command compiles through C to a native binary and runs it.
A simulated editor — pick an example, edit it, and run to see the compiler output.