Pipeline-driven data flow. Algebraic types with pattern matching. Zero-dependency compiler. From quick scripts to a full operating system.
Pipelines, pattern matching, and async — all in a clean syntax
// Pipeline operator |> chains transformations naturally fn process_logs(path: str) -> list { read_lines(path) |> filter(|line| line.contains("ERROR")) |> map(|line| parse_log_entry(line)) |> sort_by(|e| e.timestamp) |> take(100) } // String interpolation + pipeline in one expression let report = process_logs("/var/log/app.log") |> map(|e| "{e.timestamp} [{e.level}] {e.message}") |> join("\n")
// Async/await with spawn for concurrent tasks async fn fetch_all(urls: list) -> list { let tasks = urls |> map(|url| spawn http_get(url)) let results = [] for task in tasks { let resp = await task push(results, resp.body) } return results } fn main() { let pages = await fetch_all([ "https://api.example.com/users", "https://api.example.com/posts", ]) println("Fetched {len(pages)} pages") }
// Algebraic types + exhaustive pattern matching enum Shape { Circle(float) Rect(float, float) Triangle(float, float, float) } fn area(s: Shape) -> float { match s { Circle(r) => 3.14159 * r * r Rect(w, h) => w * h Triangle(a, b, c) => { let s = (a + b + c) / 2.0 sqrt(s * (s-a) * (s-b) * (s-c)) } } } let shapes = [Circle(5.0), Rect(3.0, 4.0), Triangle(3.0, 4.0, 5.0)] let total = shapes |> map(area) |> sum()
// Full async HTTP server in 20 lines import net import json async fn handle(req: Request) -> Response { match (req.method, req.path) { ("GET", "/") => ok("Welcome to Lateralus") ("GET", "/api") => json_ok({ "status": "running" }) ("POST", "/echo") => ok(req.body) _ => not_found() } } fn main() { let server = net.http_server("0.0.0.0", 8080) println("Listening on :8080") await server.serve(handle) }
Chain transformations with |> — data flows left-to-right, readable and composable. No nested function calls.
Exhaustive match on enums, structs, tuples. The compiler ensures every case is handled — no runtime surprises.
First-class concurrency with async fn, await, and spawn. Write concurrent code that reads like sequential code.
struct for products, enum for sums, impl for methods. Hindley-Milner type inference keeps it clean.
Structured error handling without exceptions. try wraps, recover catches, ensure runs cleanup. Always.
Transpile to Python, C99, or freestanding C. Run scripts, build binaries, or target bare-metal embedded systems.
Full syntax highlighting, snippets, bracket matching, and language configuration. Install from the marketplace or .vsix.
A complete operating system written in Lateralus — 82 .ltl files, 15,023 lines. Kernel, shell, filesystem, networking.
The entire compiler, VM, and standard library ship with zero external dependencies. pip install and go.
Feature comparison with popular languages
| Feature | Lateralus | Rust | Go | Python |
|---|---|---|---|---|
| Pipeline operator | |> built-in | — | — | — |
| Pattern matching | match + enums | match | — | 3.10+ |
| Async/await | spawn + await | async/.await | goroutines | asyncio |
| Type inference | Hindley-Milner | Local | := | Dynamic |
| Error handling | try/recover | Result<T,E> | error | try/except |
| String interpolation | {expr} | format! | fmt.Sprintf | f-strings |
| Zero deps install | pip install | — | — | stdlib |
| Multi-target compile | Python/C99 | LLVM | native | — |
Libraries, tools, learning resources — everything you need
Three paths — pick whichever fits you
Click one button to get a full project with source files, tests, CI pipeline, and VS Code support.
lateralus run src/main.ltl8-chapter tutorial from variables to building a CLI app. Exercises with solutions included.
Real-world code: algorithms, data pipelines, REST APIs, and coding challenges — all in Lateralus.
Install in seconds. Zero dependencies. From scripts to operating systems.