Skip to content

Zymbol-Lang v0.0.7

Latest

Choose a tag to compare

@OscarEEspinozaB OscarEEspinozaB released this 03 Jul 03:54

Keyword-free symbolic language release. Highlights below; full detail in CHANGELOG.md.

✨ Added

  • Native stdlib expansionstd/json (decode / decode_map / encode), std/io (read / write / append / exists / delete / list / mkdir), std/net (get / post / post_json / head, optional trailing headers arg, rustls TLS). Soft error channels ##Parse / ##IO / ##Network; hard errors on wrong argument types; full VM parity; Spanish i18n adapters.
  • std/db — vendor-neutral database access via ODBCconnect / exec / query / tx / savepoints / exec_script / table_exists. Zymbol bundles no engine: the OS supplies the per-engine ODBC driver (validated live against SQLite and PostgreSQL with the same program). Soft ##DB(...) errors carry the SQLSTATE. Availability: Windows binaries and source builds (default db cargo feature); the prebuilt Linux/macOS binaries exclude it — the ODBC driver manager needs dlopen, impossible in a fully static binary (see REFERENCE.md L17).
  • json::decode_map(text, map) — decodes JSON and recursively renames object keys per a NamedTuple map: data-level i18n, so API payload keys read in the consumer's language.
  • Typed/validated input<< ##.(5,2) "prompt" var re-prompts until the input matches the typespec (TW + VM parity).
  • Deep functional update in the VM — new DeepSet instruction: every arr[i>j>…]$~ val form now works under --vm, including positional tuples.
  • Static undefined-function detection — a bare-identifier call to an unknown name is now a check-time semantic error.

🛠 Formatter — fail-closed and faithful

  • A safety gate (token equivalence, reparse, statement-tree shape, comment count) refuses to emit non-equivalent output: zymbol fmt can no longer corrupt a file.
  • The parser preserves surface forms (user parentheses, += / ++ / --, vs \\, input typespecs, export-block commas); comments are re-emitted by source position.
  • New property harness tests/scripts/fmt_property.sh — P1 reparse, P2 idempotence, P3 runtime-output equality, P4 comment preservation — over the full corpus, with a CI baseline mode.

🐛 Fixed

  • L16!? corrupted the caller's scope when a called function failed. The tree-walker now restores call state on every error exit; the VM unwinds frames to the nearest ancestor with an active catch.
  • L14 — destructuring into a := constant is now a semantic error at check time.
  • Nested Unit now displays as () in both engines — the last known display divergence between tree-walker and VM.
  • zymbol check no longer prints module errors twice; LSP diagnostics now match zymbol check (module analysis ran editor-side for the first time, severities aligned).

🔧 Internals

  • Rust edition 2024 (resolver = "3", rust-version = "1.85"); dependency upgrades (thiserror 2, ureq 3, crossterm 0.29, clap 4.6). Security: bytes ≥ 1.11.1 (RUSTSEC-2026-0007).
  • Dismissed by design (validated with the language author): do-while ~> [NI01] and match identifier binding [NI03] — the existing workarounds are the idiomatic forms.

✅ Validation

  • cargo test: 833 / 833 pass
  • vm_compare.sh (tree-walker vs VM parity): 507 / 507 PASS, 0 SKIP
  • Formatter property harness: 568 verifiable files, 0 failures, empty baseline
  • Benchmark gate: 14 / 14, no performance regressions

Full Changelog: v0.0.6...v0.0.7