PatLang

A multi-paradigm language with a fully self-hosted compiler: the lexer, parser, lowerer, and code generator are written in PatLang and compile themselves. Events, logic facts, objects, functional style, networking, WASM, and a browser playground.

Portfolio & live playground

Runnable examples compiled to WebAssembly: edit PatLang in the browser and the self-hosted compiler (itself running on WASM) compiles and executes it, with performance self-reported by the programs.

Getting started

Build the runtime, run and compile your first program, tour the language and all six paradigms, and meet the self-hosting pipeline.

Self-hosting: the road to the fixpoint

How PatLang came to compile itself: the staged roadmap from a Rust Stage 0 seed to byte-identical self-compilation, with the runtime library itself expressed as PatLang source.

Control-flow graphs

Basic blocks and jump edges recovered from the compiler's own IR, rendered as SVG by a PatLang tool.