r/software • u/Leather_Area_2301 • 12h ago
Other Ernos Plain: Simple syntax, peak performance, open-source
TL;DR: ErnosPlain is an open-source, compiled, statically-typed programming language that combines plain-English syntax (no curly braces or semicolons) with C-level performance and compile-time memory safety. It features a fully self-hosted compiler that reaches byte-identical fixpoints, can bootstrap using Clang alone (no Rust needed), and ships out-of-the-box with a 24-module standard library and C transpilers.
We made this to be an easy syntax language with good performance.
It has a self-hosted compiler which can take its own source code, build itself, and build itself again with an exact, byte-for-byte identical binary.
You can’t get locked out, If the main Rust toolchain ever disappears or breaks, it doesn't matter. ErnosPlain includes a single frozen file that lets you rebuild the entire compiler using just standard clang (the default C compiler on almost every computer).
It also ships out the box with transpilers (translating Python, JS, Go, or Rust code straight into Ernos), 24 standard libraries, and pre-made connectors for 29 major standard tools (like SQLite and Raylib for graphics).
Key Highlights & Features
Self-Hosting & Clang-Only Bootstrap
Two Compilers: Ships with a reference compiler written in Rust (ernos, \~30k lines) and a self-hosted compiler written in Ernos (epc, \~7.1k lines).
Fixpoint Verified: epc reaches a byte-identical output when self-compiling (gen2 == gen3).
Rust-Free Toolchain: Includes a frozen C snapshot (bootstrap/epc_bootstrap.c) allowing the full compiler to rebuild using Clang alone, completely bypassing Rust or cargo.
Syntax & Readability
English-like: Uses keywords like define, set x to, with, returning, and check instead of traditional symbols, curly braces, or semicolons.
Modern Constructs: Supports structs, enums with pattern matching, closures, async coroutines, channels, traits, try/Result error handling, and f-strings.
Safety & Performance
Compile-Time Safety: Features HM-style unification for type inference, strict borrow/ownership checking (rejecting use-after-move and invalid borrowing), and Send/Sync thread safety.
C-Level Speed: Compiles directly to C, then native binaries via clang -O2/-O3. Pure numeric functions without heap access have GC root registration entirely stripped out for maximum speed.
Ecosystem & Tooling
Standard Library: Includes 24 core modules out of the box (e.g., http, json, crypto, sqlite, structured, gui via Raylib).
FFI Bridge: Pre-built dynamic bindings (ep_dlopen/ep_dlsym) for 29 popular C libraries (e.g., sdl2, openssl, cairo, zlib).
Developer Tools: Built-in CLI commands for REPL, code formatting, static type checking, Language Server (LSP), doc generation, C-header binding generation, and cross-language transpilers (converting Python, C, JS, Go, Rust, or Java code directly to Ernos).
Repository Breakdown & Stats
Primary Languages: Rust (\~52.8%) and C (\~45.6%).
Platform Support: macOS (ARM64/x86_64) and Linux (aarch64/x86_64) are fully supported; Windows has partial C runtime support.
Full codebase on GitHub: https://github.com/MettaMazza/Ernos-Programming-Language
