Show HN: Freelang – a direct-to-assembly syscall lang with rad concurrency
1 points
1 hour ago
| 1 comment
| freelang.dev
| HN
keepamovin
1 hour ago
[-]
This is a fully 100% libc-free language, that lowers its syntax through a simple IR direct to platform assembly (currently Windows x86-64 asm linked to PE/COFF, Macos x86-64 AT&T asm, or Linux x86 bytecode as ELF or asm). The "rad concurrency" is using native OS process calls (CreateProcessA, fork and fork for the 3 OS), that passes values using a filesystem tree format that also makes the concurrency trivially auditable, and inspectable and theoretically replayable. It's also memory safe because it's true OS level process isolation. Obvious cost is performance, but this is a lang for determinstic, "no magic" semantics, and easy to reason about execution, to reduce bugs and allow better coding by AI.

Or if you want the README version:

FreedomLang is a small AOT systems language that lowers source to native x86-64 without a C runtime.

The weird parts are the point:

- Generated programs are libc/CRT-free. Linux emits ELF64 directly from x86-64 machine-code bytes. macOS emits x86-64 AT&T assembly linked with -nostdlib. Windows emits x86-64 assembly linked into PE/COFF without a CRT default.

- There is no VM, JIT, or LLVM IR path. The compiler is ordinary JavaScript: lexer/parser, AST, FreedomLang IR, backend.

- Concurrency is OS processes. Linux and macOS use fork; Windows uses CreateProcessA self re-exec. Values cross job boundaries through an FSABI directory tree instead of shared in-process magic.

- World failures are data. Bugs are fatal. Missing files, timeouts, and permission denials are states to model. Bad tags, bad field access, and impossible states stop the job.

The tradeoff is not hidden: process-per-job concurrency is heavier than goroutines, async tasks, or green threads. The bet is that high-integrity tools often need a smaller story more than they need the fastest one: native output you can inspect, job state you can open on disk, failure semantics that do not pretend every bug is recoverable, and a compiler/runtime small enough to argue about from source.

No more magic. Reality is magic enough.

reply