What’s new in Radlang
The current release is 1.40.52. The highlights of 1.39 and 1.40 come first; the sections after them cover the work from 1.37 through 1.38.5. Every release, with details, is in CHANGELOG.md.
1.39 and 1.40
- Traced heap (1.39.0). Memory is managed by a tracing garbage collector instead
of reference counting and scoped arenas: each thread allocates young values from
its own nursery, collections run at safepoints, and idle pages go back to the
system. See runtime memory. Libraries built for the old
memory model are refused and must be rebuilt (
RADLANG_GC=trace radlang lib -f, thenradlang export). radlang rtestfrom an installed compiler (1.39.16): the test harness ships in the embedded runtime.json.from(Map)(1.39.17) writes an object whose values are JSON strings.- SQLite write-ahead logging (1.39.23): file databases open in WAL mode;
runtime.dbJournal(walorkeep) controls it. - 1.40.0: half-open ranges
[start..<end](empty whenend <= start; the usual counted loop isfor (int i in [0..<n])),list.clear(), andstring.indexOf(needle, from). Inlineasync fn(HttpRequest req): HttpResponseroute handlers capture variables and work inside generic functions. - Speed through 1.40.x: fused list pipelines and
reducefolding (1.40.10, 1.40.11, 1.40.19), in-place string accumulation (1.40.15), faster JSON reading and writing (1.40.1, 1.40.5, 1.40.23), a survival-driven nursery size (1.40.8). - HTTP (1.40.21, 1.40.22): stricter request framing per RFC 7230 (Content-Length and Transfer-Encoding).
- Diagnostics: math calls get their types from the builtin catalog (1.40.25), and a reserved keyword used in an interpolation or declaration is named in the error (1.40.26).
- Language fixes (1.40.28 to 1.40.33): methods on temporaries such as
regex.from("o").isMatch(s), arrow lambdas called directly or through.pipekeep their result type,uintprints unsigned, every list has.toString(),priv fnis private to its file, andmatcharms of different types join (anullarm makes the result nullable; integer widths widen). Several crashes on invalid programs became compile errors. project.fp: strictandmath.max<int>(a, b)(1.40.32): strict floating point for bit-reproducible results, and math functions that name their result type (floor,ceil,round,abs,min,max,clamp,pow).- Testing (stdlib 1.1.3):
rtest.expect(x).toBe(y)compares by value. - HTTP (1.40.29):
server.jsonLogs()turns the access log on; an empty struct serializes as{}. - Speed (1.40.27 to 1.40.52): add loops, fill loops,
join,sum,reduceandmapwith an index fold into single passes without intermediate lists; sorting by a subtraction or a field uses radix sort; string scans hoist their length. Error locations now come from a line table built at link time instead of per-statement bookkeeping (1.40.52): binary-trees -8.6%, struct-heavy code -13%. - Install (1.40.50 to 1.40.52):
tools/install/install-release.shinstalls into~/radlang, links~/.local/bin/radlang, works on Linux x86_64 and arm64, and--rollbackrestores the previous release.
1.37 to 1.38.5
Seven bundled project templates
radlang new myapp
radlang new mytool --template cli
radlang new myapi --template api
radlang new mysite --template web
radlang new mylib --template lib
radlang new mygui --template gui
radlang new myserver --template mcpapp is the default. Each starter includes source, tests, a README, config and
ignore rules. Assets are embedded in the compiler, so scaffolding needs no
network download. The matching stdlib is vendored as one pinned
lib/stdlib.rlp; loose .rlc files are not copied. Later namespace builds
produce ignored compiled libraries. Library starters export an RLP and have no
executable entry point. GUI availability depends on the host.
The MCP starter serves a typed greet tool over HTTP at
http://127.0.0.1:8080/mcp. It uses the existing stdlib MCP module and includes
an HTTP test and client examples. See new projects and
MCP servers.
Runtime configuration and shutdown
The runtime core centralizes configuration, clocks, logging, errors, threads,
callbacks and resource observations. Executables bake their runtime: settings
before namespace initialization; documented OS environment variables override
those defaults. Unknown runtime keys and invalid types are compile errors.
Normal process exit drains tracked async work and deferred callbacks, then
stops worker pools within one configurable deadline. sys.exit and ordinary
uncaught exceptions use that path and preserve their exit status. Fatal signals
and unsafe emergency paths retain immediate termination.
See runtime configuration and process lifecycle.
Optional cooperative scheduling
runtime:
cooperativeBudget: 16A positive budget adds nonblocking scheduler passes at counted await,
sys.blockOn and .resolve(callback) boundaries. Zero remains the default.
This gives pending work more opportunities to progress; it is not preemption
or a queue-size limit. Callbacks remain deferred, and Future.race does not
cancel losing operations. See async scheduling.
Memory and lifetime analysis
Idle small-block slabs can return their pages to the operating system once all blocks in a slab are free. Finished async calls release their stack and unused arena reservation while keeping values still in use. Reassigning a top-level variable now releases its initial managed value when it is no longer needed. The lifetime analyser supplies the compiler’s reclaim plans; programs do not need new ownership annotations. See runtime memory.
1.38.5 also releases empty conservative async owners once callbacks and borrowing children can no longer add data. In a sealed program, uniquely named global callbacks can release private temporary arenas when every assignment proves a synchronous target whose escaping stores preserve their values. These facts do not make a publishing function pure or its return value fresh. Unknown callback targets and source-less library boundaries keep their conservative lifetimes; nonempty arenas in those cases remain an active memory investigation.
Optional handle reports show resources still open at exit. They are diagnostic:
reference observations do not prove that all aliases are dead. General handle
reference tracking and automatic closing remain deferred; retain explicit
close/release calls required by each API.
Windows cross-compilation
radlang build --target windows-x86_64 emits a PE executable using MinGW-w64.
Object-only builds and target-specific library/package export are supported.
This does not provide a Windows-hosted compiler installer, Windows GUI backend,
or validated Windows execution. See Windows builds.
Nullable union fix
1.38.1 fixes LLVM argument conversion for a narrowed optional union followed by
??, including calls such as jinja.vStr(call.id ?? ""). Existing valid code
can be rebuilt without a source workaround.
Installation status
The compact machine layout and test installer are under development. The
prototype has been exercised on macOS arm64 in private install prefixes; a
native Radlang installer, Linux/Windows host bundles and compiler-wide
RADLANG_ROOT discovery remain separate work (the installed test harness shipped
in 1.39.16). Documentation for 1.38.5 does not imply that every public download
channel already carries that compiler version.