Skip to content

Zymbol-Lang v0.0.11

Latest

Choose a tag to compare

@zymbol-lang zymbol-lang released this 01 Nov 02:06
· 1 commit to main since this release

An optimization release. The register VM is the default engine — in the CLI, and in the
playground through a JavaScript port of it — and what each operation costs was measured — against Python as the reference, and in units a machine does
not change (--count, zyquality/cost/) — and brought down without changing what a
program means. Late in the branch the safeguards interpreter/AGENTIC.md § 12 still held
open were each decided by the author and implemented: an agent's program can now be refused
before it runs, stopped after a time, and given values that never become shell syntax.

Each entry names the finding it comes from, in ZyDDT/HALLAZGOS/ (GLB-… in GLOBAL.md,
ZYTW-…, ZYVM-…, ZYJS-… in the engine's file); G1…G8 are the rows of
AGENTIC.md § 12; PERF-… is zyquality/bench/big/HALLAZGOS.md; D1…D8 and the stages
3.1–3.4 are ROADMAP_V0011_ES.md. IMPL_V0011.md is the account of the release.

Known issues

What is still open at this tag is listed in one place,
ZyDDT/PENDIENTES.md
(in Spanish), each row pointing at the record it comes from.

Changed — rules a program can break on

  • zymbol run runs the register VM. --tw asks for the tree-walker; --vm is still
    accepted and changes nothing (D3). The REPL stays on the tree-walker (D2). Stage 1.
  • A value placed in <\ … \> reaches the shell as one quoted word (G2). What is written
    in the command goes to the shell as it is; every value, side by side or as {v}, is one
    word (a collection, one per element). A program that put quotes around a value by hand now
    passes those quotes along: write <\ "test -f " ruta \>, not <\ "test -f '" ruta "'" \>.
    Through cmd.exe, a value holding ", % or a line break is a soft ##IO.
  • A unary applies to its operand with its postfix: -v[1] is -(v[1]), !seen$? x is
    !(seen$? x). The Rust parsers read (-v)[1], negating an array (GLB-145). >> +a is
    accepted at the start of an output item, as zyjs already did (GLB-127).
  • A dictionary literal that writes a key twice is refused before the program runs —
    key 'a' appears twice in the dictionary (GLB-131; zymbol-design/COLLECTIONS.md § 5).
  • More than 10 000 active calls is a ##Depth error that !? catches, the same number
    in every engine; a tail call does not count (D7, GLB-133, ZYTW-017). Until now a deep
    recursion aborted the process with stack overflow and no Zymbol error.
  • A negative integer written in a base carries its sign in front: 0x|(0 - 255)| is
    -0x00FF, as Python's hex(-255). The Rust engines printed an i64's two's complement
    (GLB-136).
  • >> takes an interpolated string as a string literal, so operators and postfixes apply
    to it: "a{x}"$# parses (GLB-144).
  • The count of #? on a number is the length of its display, sign and point included:
    -2.5 is 4. zyjs changes; the Rust engines already counted so (GLB-146).
  • Reassigning a name \ destroyed gives it back where \ took it from, from any block
    of its strong environment — a ?, a loop's body or variable, a destructuring (GLB-147).
  • A range or a comparison inside a list pattern means what it means in an arm:
    [1..5] => against [3] matches. The three engines gave three answers (GLB-148).
  • A comparison pattern accepts a Number scrutinee in check (GLB-149).

Added

  • The playground runs the register VM (zymbol_vm.js, decided by the author on
    2026-10-30). The program is checked as before, then compiled by a JavaScript port of
    zymbol-compiler to the VM's bytecode — the bytecode the Rust compiler builds, compared
    instruction for instruction over the corpus, the example pool and the applications — and
    run by a JavaScript port of zymbol-vm. The tree-walker, zymbol.js, stays one click
    away: a VM · TW picker beside ▶ Run, remembered per browser, ?engine=vm|tw in the
    address. While a program runs, ▶ Run is ■ Stop: the VM has no step ceiling, and hands the
    page back between slices of work. The gate grades it as a fourth engine, zyjsvm, with
    the browser's exclusions. The evidence and the tools are in web/zymbol_vm/.
  • zymbol run --deny <effects> refuses a program, before any of it runs, if anything it
    can reach — every module it imports and every file it runs — uses a denied effect: io,
    net, db, time, random, shell, sub, stdin, argv. zymbol check --effects
    lists that surface with file and line (G1).
  • zymbol run --timeout <s> stops a program after so many seconds of wall clock, with
    exit status 124, and ends the commands <\ \> started (G3).
  • random::semilla(n) fixes std/random's generator from that point: the same seed
    gives the same sequence in all three engines (G8).
  • A time limit for std/net: per request (net::get(url, [], 5), net::head(url, 5))
    and for the process (net::timeout(s), which returns the previous limit; 0 is none).
    ZethyCLI G1.
  • Two warnings of zymbol check (and of run, before running, and the editor): a read
    that \ x has certainly destroyed (G4), and a ?? with no _ arm that is not provably
    complete (G5). The run-time errors stay; !? still catches them.
  • A warning where an edit starts a line inside a >>, which makes it an output item
    (GLB-137).
  • The compact build — cargo build --release -p zymbol-cli --no-default-features leaves
    out zymbol lsp, zymbol repl and std/net: 100 crates instead of 210, 6.6 MB instead of
    12.3 (measured 2026-10-20). lsp, repl and http are features, on by default (3.2).

Changed — building

  • std/db is no longer a default feature: cargo build --release --features db turns it
    on. Every Linux and macOS release was already built without it; the Windows release keeps
    it (D4). A binary without it answers module not found: std/db.
  • The VM's terminal and host are traits (zymbol_vm::host); zymbol-host is the native
    one, and zymbol-vm depends on no system library (3.1). The compiler and the VM build for
    wasm32, and the gate checks that they do (3.4).
  • The static Linux binary (musl) allocates with mimalloc, tuned not to hoard: musl's own
    malloc made it 17× slower than the .deb at building a text in v0.0.10 (PERF-08, GLB-134).
  • The release has 16 files, not 17: SHA256_aarch64_linux.txt is gone. A second
    workflow built the aarch64 static binary again and published a checksum the binary left
    on the release did not match; its checksum is the one in SHA256SUMS_aarch64_linux.txt,
    as the other Linux files' are (GLB-151).

Performance

What grew with the size of the input and should not have, each held now by a ratio in
zyquality/cost/:

  • Building a text with s = s x y appends in place in the VM (PERF-06, ZYVM-023).
  • @ ch:texto walks a text with a byte cursor (PERF-04, ZYVM-024, ZYVM-025).
  • A slice of a text copies the piece, not the text, through either instruction that slices it
    (PERF-05 a, GLB-130, ZYVM-026); a text keeps its
    character count, so s$#, s[i] and a slice stop walking it (PERF-05 b, D8, ZYVM-028); a
    text that is not ASCII finds a position from a crumb every 64 characters in the VM and the
    tree-walker, and from its characters in zyjs (GLB-139, ZYTW-016).
  • The dictionary is an IndexMap and finds a key by hash (PERF-03, GLB-132), hashed with
    foldhash, seeded at random per process; it keeps insertion order, so no output depends on
    the seed.
  • m[i>j]$~ v writes the path where it is, not into a copy of the receiver, in the
    tree-walker and zyjs (GLB-140); m$+ [literal] no longer copies its receiver in zyjs
    (ZYJS-068).
  • The tree-walker's Value is 24 bytes instead of 120 (ZYTW-019).
  • The VM lets go of a call's result when its statement ends: two such calls in a row no
    longer cost twice the memory (ZYVM-022).
  • The VM's dispatch: a counted loop and a for-each end each pass in one instruction
    (RangeStep, ZYVM-029; IterStep); calls push their frame inline, a direct call needs no
    stack check, a tail call inside a module is one (ZYVM-027), $>, $| and $< call their
    lambda on the VM's frames, and $^ evaluates a comparator that only compares its
    parameters without a call.
  • zymbol check parses a module once, not once per importer (GLB-143), and a re-export
    layer parses its source once, not once per name (GLB-142).
  • A >>~ reaches the terminal in one write, in both engines: the move, the style, the text
    and the reset used to be an execute! each, and each one flushed, so a colored >>~ was
    four writes and the terminal showed the states in between. The bytes are the same; a clear
    and 23 rows go from 93 writes to 24 (GAP-ZYE-015, ZyEdit/HALLAZGOS.md; a screen still
    cannot be shown at once, which is v0.0.12's). The tree-walker now evaluates a >>~'s items
    before it writes anything, as the VM always did.

Fixed

  • The VM compiles a Char range as a ?? pattern (ZYVM-032); every element of a list pattern
    is tested as in an arm (GLB-148).
  • @ <expr> reads its specifier once: a call in the condition ran one extra time in both
    Rust engines (GLB-135).
  • A path that goes on past an absent key is ##Key in the VM, as reading it is (GLB-141);
    the last step of a path into a dictionary adds its key in the tree-walker (ZYTW-018).
  • $[i:n] refuses in the count's words in the tree-walker (GLB-129).
  • zymbol fmt is idempotent again on a ?? inside an expression (GLB-138).
  • zymbol build's executable gets the compiler's std/net and std/db (ZYVM-031).
  • zymbol run --timeout ends the commands it stops with kill(2) on their own process group.
    It called /usr/bin/kill, which procps-ng 3.3 (Ubuntu 22.04, Debian 11 and 12) reads as
    kill(-1): every process of the user died with the program (GLB-150).
  • zyjs reads a ?? pattern as a pattern, not an expression, and checks its type against
    the subject's (ZYJS-070, ZYJS-071).
  • zyjs accepts a lone \\ as a statement, as both Rust engines do (BUG-VMJS-003); reads
    "\r" in a text as a carriage return, not the letter r (BUG-ZYE-013); and runs a module
    whose function uses an import alias's name as a local — GoL did not start in the browser
    (BUG-VMJS-006). The three are in web/zymbol_vm/HALLAZGOS.md and ZyEdit's.
  • Three defects of the Rust engines that the JavaScript port of the compiler found, now
    corrected the way zymbol_vm.js corrects them, so both compilers build the same bytecode
    (web/zymbol_vm/HALLAZGOS.md):
    • s$- "abc" on a text shorter than the pattern panicked both Rust engines with exit
      code 101, which !? cannot catch; the text now comes back as it was (BUG-VMJS-002).
    • After a block that creates variables, a runtime error in the VM could cite the line
      after its own: clearing the block's variables skipped the bytecode's source table,
      which lost an entry per variable (BUG-VMJS-004).
    • (f() + 0.5) + 1 called f twice in the VM: a left operand typed Float or String was
      compiled again when the immediate form did not apply (BUG-VMJS-005).

Removed

  • interpreter/MANUAL.md, a v0.0.4 snapshot frozen since v0.0.5 (2026-10-21). The history
    of the language is this file and git.

Documentation

  • GUIDE, REFERENCE and IMPLEMENTATION at v0.0.11; GUIDE § 1 describes --deny,
    check --effects and --timeout. The canonical zymbol-lang.ebnf carries GLB-145's
    grammar, which on 2026-10-21 reached only its copy in IMPLEMENTATION.md.
  • AGENTIC.md § 12: no gap open.