Repository navigation
Torvik v1.1.3 — Stability Release: Silent Bugs Removal And Fixes For Both Platforms
·
164 commits
to main
since this release
Immutable
release. Only release title and notes can be modified.
v1.1.3 is a patch release with no new syntax and no breaking changes — just a compiler-wide audit that hunted down silent wrong answers, silent no-ops, and compile-then-crash holes, on Linux and Windows. It's backed by a new end-to-end test suite (78 cases, now shipping in the repo under dev/tests with both sh and PowerShell runners) that runs green on both platforms, with the full suite ASAN-clean and the compiler verified through a three-generation self-hosting fixpoint on each OS.
If you're on v1.1.x, update with:
rune update
Silent wrong answers fixed
These compiled and ran — and quietly produced the wrong result.
- Leading unary minus precedence.
-m + 2compiled as-(m + 2)(so-7instead of-3form = 5). A leading-now binds to exactly one value in every position, and negation is type-aware:-xworks onf64andi128(previously invalid IR or a segfault), while negating astr,list,bool, oru128is a clean error. fixedis now enforced. Reassigning afixedbinding — plain or compound, local or global — previously compiled and mutated silently. It's now the compile error the guide always documented. Enforcement surfaced 131 latentfixed-then-mutated bindings inside the compiler itself, all converted toset(behavior identical).- Return types are checked.
df f() -> str { return 5; }compiled and crashed at run time;-> i64 { return "x"; }printed a pointer. Both are now clean, located compile errors. - Weave stages are arity- and type-checked.
5 ~> addn(missing argument) called the function with garbage;5 ~> shout(ani64woven into astrparameter) segfaulted. Both are now clean compile errors — and integer-returning weaves insideecho!()no longer crash (that one was a documented example!). - Booleans print consistently.
echo!(true)printed1,tostr(true)returned"1", andfs_exists()echoed1/0. Everything bool now printstrue/false. - Collection element fixes.
list<bool>element reads segfaulted;list<u64>elements leading an expression used signed division (a full-range value divided negative). Both fixed. - Large integers printed truncated on Windows.
longis 32-bit on Win64, soint_to_str(and whole-list printing) mangled big values —-9223372036854775807printed as1. Linux was never affected. Fixed with 64-bit formatting throughout.
Crashes fixed
bag<T>was released out from under you. A one-character class of bug (an exact-match type check where lists and tables use a prefix match) meantbag<str>declarations skipped reference counting entirely — the bag was freed at end-of-statement and every later use was a use-after-free. Linux's allocator happened to tolerate it; Windows access-violated. Found with AddressSanitizer, fixed at all five sites, re-verified clean.set c: bool = true;could silently drop the store, leaving the variable uninitialized — ternaries on such variables picked arbitrary branches.
Windows fixes
apply std;now works on Windows. The installer shipped thestd::submodules but never the umbrellastd.tv, soapply std;failed on every Windows install whileapply std::math;worked. The installer now install the same library set as Linux. (Reinstall or re-run the installer to pick this up.)readkey()honors redirected stdin. It previously read only the console device, so piped input hung forever waiting for a physical keypress.
Implemented as documented
~(bitwise NOT) — in the operator table since v1.0, previously a parse error.upper(s)/lower(s)as ordinary calls — previously they existed only as weave stages.- Zero-argument console builtins —
read(),readint(),readfloat(),readbool()now work exactly as STDLIB.md shows (an optional prompt argument is still accepted). torvc file.tvderives its output name from the source file (./file,file.exeon Windows) as TOOLING.md documents — previously the binary silently went to~/tv_out.- Full-range
i128/u128global literals — up tou128max and down toi128min, boxed at startup exactly like locals, with clean range errors.
Added
readkey_str()— the pressed key as a 1-character string (pairs withchar_at), complementingreadkey()'s unchanged byte-code return (pairs withbyte_at). STDLIB.md previously misdocumentedreadkey()as returningstr; that form never compiled in any release, so no working code is affected — the docs now describe the real behavior, andreadkey_str()provides the string form.- The end-to-end test suite now ships in
dev/tests: 34 positive programs, 30 expected-clean-error cases, 8runeproject cases, and 6torvcflag cases, with runners for both platforms.
Notes
- One documented limitation remains: 128-bit globals take a single literal initializer (expressions in a 128-bit global initializer are a clean compile error — compute in a function instead).
- Full details in CHANGELOG.md.
Full Changelog: v1.1.2...v1.1.3