Changelog
0.3.0 (2026-10-04)
Language:
- Structs: value types with nested structs,
[N]u8,u8/u32, slice and function fields. - Enums with one optional payload per variant;
matchon enums and ints, with exhaustiveness checks. &Treference parameters. References can't be stored, and slices can't be stored through them, so no slice outlives its frame.- Function values and
fn(...) -> inttypes; calls through variables and struct fields. A zeroed function value traps when called. u8andu32storage types.- Bitwise operators
& | ^ << >> ~(Go precedence). Shift counts outside 0..63 trap. \xNNescapes; hex literals may use all 64 bits.- Errors report
file:line:colwith the source line and a caret. - The compiler is split into modules (
diag,lex,ast,gen,driver).
Second review (tasks 024–041):
- Depth limits apply to the real AST; the compiler runs on a 64 MiB-stack thread.
lpp buildrefuses to overwrite a source file; output and cache modes are set explicitly (umask-proof).- An explicit
LPP_STDis never replaced by a fallback;--works for build, check and run. - SIGPIPE is ignored: writes to closed pipes return -32.
- The check pass keeps one function's code at a time.
- std:
put_le/le_u64handle negative values,c_pathalways terminates,sys_socketadds CLOEXEC idempotently, millisecond socket timeouts. - http: every blocking read and send is bounded by its remaining deadline; bounded lingering close; header validation before dispatch (Host, names, control bytes, Content-Length, Transfer-Encoding); 204/304 without a body; HEAD never touches the body buffer.
- Breaking: handlers are
fn(conn: int, req: &Request) -> int, passed tohttp_serve(port, workers, handler)or set in anHttpServer.http_serve_workersis gone. - Benchmarks measure compiler RSS inside the compiler, validate every response, record provenance, and have a
--self-test. - Tests: 108 checks, including CLI safety, umask, header validation, timeouts and the new language features.
0.2.0 (2026-10-04)
Hardening from an adversarial review.
- Division:
MIN / -1wraps andMIN % -1is 0 instead of SIGFPE. Each runtime check has its own message. copyis overlap-safe (memmove).- Every function is type-checked, called or not. Duplicate parameters and same-scope locals are errors.
- Limits on array size (1 MiB), frame size (4 MiB), source size, modules and nesting. Stack pages are probed one at a time.
trusted;is accepted only instd/sys.lpp.- Runner: per-user 0700 cache, owner and content verified before exec, exclusive temp files,
lpp check, strict arguments. - std:
put,put_intandparse_inthandle the full int range;read_fileseparates read errors from EOF;write_all,eprintln,index_of. - http: request heads read across fragments (8 KiB, 10 s); 400/408/431; HEAD without a body; content types checked for CR/LF; static files opened with
openat2beneath the root, regular files only; length-bounded streaming; lingering close; 1–64 workers that die with the parent. - Breaking:
handle(conn, method, path)gets an opaque connection handle instead of a raw fd. - Code size: interned literals, shorter immediates, trap routines only when used.
- Tests:
tests/run.shwith exact exits and diagnostics (54 checks).make benchrecords baselines.
0.1.x
argc(),arg(i)and thecopyintrinsic.http_serve_workers: forked workers sharing one listening socket.- Static file serving (
http_static,read_file,sys_open_read) with path validation. - The project site https://lpp.olibuijr.com, served by lpp, built from
docs/. - Live memory panel (
/live): the server reads/proc/self/statusand renders animated HTML/CSS, with no JavaScript. - Files are streamed in 16 KB chunks (site worker 288 KB → ~70 KB RSS);
sys_file_size,sys_now_ns,sys_getpid. - 5-second socket read/write timeouts per connection.
- Test suite: argument handling, programs the compiler must reject, and live web routes on a test port.
0.1.0 (2026-10-04)
First working MVP.
lppCLI:lpp file.lppcompiles and runs (cached in~/.cache/lpp),lpp buildwrites a binary, scripts may start with#!/usr/bin/env lpp.- Compiler emits x86-64 machine code and a static ELF64 directly: no assembler, linker, libc or runtime.
- Language:
int,str(read-only slice),[]u8(writable slice),[N]u8stack arrays,let/var,if/else,while,break/continue, functions,use. - Safety: bounds-checked indexing and slicing, zeroed memory, division-by-zero check, slices cannot outlive their frame, raw syscalls only in the trusted
sysmodule. - Dead-code elimination: only functions reachable from
mainare emitted. - Std:
sys,io,net,http. - Example web app on port 8001: 8 KB binary, 32 KB resident memory.