Skip to content

Nexium v1.0.2 — Annapurna: Terray

Choose a tag to compare

@github-actions github-actions released this 20 Sep 10:21
· 236 commits to main since this release

Nexium v1.0.2 — Annapurna: Terray

Annapurna: Terray — the one who carried the frostbitten summiters down: the hotfix. The x86-64 binaries of 1.0.0 and 1.0.1 were built for the CPU of the machine that built them and crashed on any other; every build is for the architecture's baseline now, and the release refuses one that is not. With it, the fuzzer's two fixes, UTF-8 on the Windows console, and the day's documentation.

Added

  • --cpu baseline|native|<name> and NX_CPU, the CPU a build without --target is for; nx doctor prints it. os.arch(), the architecture a program runs on.
  • Nexium programs print UTF-8 on the Windows console: the generated main switches the console to code page 65001 for the program's life and restores it at exit, so nx version shows Rébuffat rather than R├⌐buffat.
  • The roadmap's "tools only this language can have": nx explain for an effect's provenance, an effects lockfile for CI, proofs as editor code lenses, profiling by effect, record-and-replay tests, nx layout, the ownership trace, asking the checker for its facts, a binary-pattern debugger and workbench, hot reload, one-liners, REPL sessions as files, watch mode, snapshot tests, a Jupyter kernel and the playground, each pencilled into a minor.
  • The roadmap names what 1.0 is not yet (memory safety, maturity, numbers, ecosystem) and where each is answered; the numbers page (benchmarks against C, Rust, Go and Python, published on the site) moves from 1.6 to 1.1; a second maintainer and a list of packages are ecosystem items; the Always section commits to the corpus growing with the language, the sanitizers and the fuzzer on every release, and a patch within a week of a fix.
  • The README's Status section describes 1.0 (language-stable, early ecosystem, with the roadmap's ledger of what it is not yet) instead of the first implementation; the six translated READMEs are regenerated from the current English one, which had moved on to the self-hosted compiler, the site, the Topo, the editors and the 1.0 numbers while they still described cargo install and a Rust compiler.
  • The CI workflow skips a push that changes only prose and pictures; the Pages workflow builds the site from them and validates the changelog, so a roadmap edit no longer runs the compiler on three platforms. CONTRIBUTING.md says what runs on a push.
  • The roadmap's page zero: KNOWN_ISSUES.md is where every open bug waits with its fix, no theme starts over a bug a user can hit, and the four an outside review of 1.0.1 found (a contained panic leaks what it acquired, nexium.lock is never read, the Python wrapper drops writes through a list, effect notes miss their witness) are the 1.0.2 patch, with the wording fixes for SECURITY.md, the README and the package names; 1.3 begins by splitting check.nx.
  • The roadmap opens with the quick wins in order: twenty-nine items sorted by how soon each can ship (hours, a day or two, about a week), each landing as a patch or in 1.1 when done, ahead of the themes.
  • The roadmap's niche roads: the PowerShell one-liner (irm | iex), the one-C-file install (curl bootstrap/nx.c | cc), torrents with web seeds and magnet links, IPFS pins, nx install from a portable copy, portable mode, MSIX with an .appinstaller, gh release download and the configuration-management modules, and a QR code.
  • The roadmap's "every road in": the installation channels beyond the setup and the script, per platform (winget, Chocolatey, Scoop, MSI, MSIX; Homebrew, MacPorts, a notarized .pkg; apt and dnf repositories, PPA, COPR, OBS, AUR, Alpine, Nix, Guix, Snap; BSD ports), containers and dev containers, wheels and npm packages that carry the binary, version managers and nxup, the extension registries, and the same channels as targets of the installer artifact for Nexium programs.
  • The roadmap's 1.5 gains 32-bit architectures: i686 Windows and Linux, armv7, riscv32 and thumb, with the list of places 64 bits are assumed today (runtime handles and sizes, 64-bit binary segments on a 32-bit word, the compile-time interpreter's usize, the C header import's long and size_t), the cross-compiled test run in CI, the compiler self-hosted as 32-bit, and the tiers.
  • The roadmap's Topo as a course and the docs, more: exercises the compiler grades (fill in the blank, fix the error, write it), quizzes checked against nx effects and the recorded outputs, predict-the- output cards, code blocks that run in the page once the compiler runs in the browser, progress on the route map, more project chapters; std reference pages from nx doc, an error index, a cookbook, in-depth guides, a style guide, site search and docs per release.
  • The roadmap's "installer grown up": a setup mutex against two wizards at once, upgrade/repair/remove of an installed version, closing a running nx before files are replaced, checks for disk space, a pending reboot and antivirus quarantine, the toolchain choice, the wizard in six languages, Authenticode signing, logs and rollback, silent-install parameters and an MSI, an ARM64 setup, and a Check for updates entry.
  • The roadmap's clickable line: the REPL with an inspector window, :plot and :watch, the installer's editor page and nx upgrade, nx topo as an interactive tutorial runner, std.tui, the visual tools (size treemap, leak explorer, effect graph, ownership timeline), nexium-gui grown up, and the Hut, a native IDE in nexium-gui.

Fixed

  • The x86-64 release binaries of 1.0.0 and 1.0.1 crashed with an illegal instruction on machines without AVX-512 (nx version and nx doctor worked; anything that compiled did not): zig cc compiles for the CPU it runs on, and the release runner's had AVX-512. Every build without --target is now for the architecture's baseline (plain x86-64) unless --cpu native or NX_CPU asks for more; the bootstrap scripts do the same; the release workflow and CI refuse an x86-64 compiler that contains AVX instructions.
  • A module name used as a value (let x = math, var t = thread) crashed the checker with an index out of bounds; it is the diagnostic "math is a module, not a value" now (found by the fuzzer in CI).
  • A compile-time call chain that never bottoms out overflowed the compiler's stack (found by the fuzzer, which moved the call to fib into fib); the compile-time interpreter stops at 32 nested calls with a diagnostic. The limit is low because each nested call costs about 165 KiB of the compiler's stack; KNOWN_ISSUES.md has the fix that raises it.
  • The documentation site's menu no longer jumps back to the top on every page: it is its own scroll box, and a page load reset it, so reading the chapters in order meant scrolling the menu down again each time. The menu now keeps its position from page to page and brings the current page's entry into view when it is not.
  • The links under "Files" in the release notes were relative, so GitHub resolved them under the tag page and every one was a 404. The notes script writes the download URL now, and the notes of every release since 0.2.0 were corrected in place.

Install

Windows: run nexium-1.0.2-setup-x64.exe. It installs nx, a bundled Zig toolchain (the C compiler nx uses), the standard library, examples, docs, and the VS Code extension, and can add nx to your PATH. No other install is needed. A portable zip without the installer is nx-v1.0.2-aarch64-pc-windows-msvc.zip.

macOS and Linux:

curl -fsSL https://raw.githubusercontent.com/Londopy/nexium/main/installers/install.sh | sh

This downloads nx-v1.0.2-aarch64-apple-darwin.tar.gz or nx-v1.0.2-x86_64-unknown-linux-gnu.tar.gz, verifies it against SHA256SUMS.txt, installs to ~/.nexium/bin, downloads Zig on Linux when no C compiler is present (macOS uses the Xcode command line tools), and adds the directory to your PATH. Set NEXIUM_VERSION=v1.0.2 to pin this release.

From source: sh bootstrap/build.sh with a C compiler (Zig, or cc on macOS) builds the compiler from its C seed; no Rust is needed.

VS Code: install nexium-v1.0.2.vsix with Extensions: Install from VSIX..., or let the Windows installer do it.

Then, in a new console:

nx doctor
nx run examples/hello.nx

Files

file size SHA-256
nexium-1.0.2-setup-x64.exe 49.5 MB 2b1e55270b25c4db77cd05f67dbbd4602c7e81d3f3e1f8a32944a60ce3cbef59
nexium-v1.0.2.vsix 9.8 KB ec2dfb9f5187633a9e3966190e608939e4ed8ab5c9c8f6d3a40695da1e5ab477
nx-v1.0.2-aarch64-apple-darwin.tar.gz 1.1 MB 3e754baea58c23db8329489f340e49ddb03eeeaaf4c3351d2afbd85b2bcd0a89
nx-v1.0.2-aarch64-pc-windows-msvc.zip 1.3 MB 3e125e34c2c34cb20f39341ecb8b06f9780a392d60cf70f20d91d422cccbf5fe
nx-v1.0.2-aarch64-unknown-linux-gnu.tar.gz 1.2 MB 6e842bb93e3a86845be24885ccd7bb3b1313542035ca1970f24d23f4b6351bc5
nx-v1.0.2-x86_64-pc-windows-msvc.zip 1.4 MB 05f7e5f95cece5f524064b2b51df7bae05b38e7747a389e96b07e984fb01d110
nx-v1.0.2-x86_64-unknown-linux-gnu.tar.gz 1.3 MB 4ef02ce94556b902941eb85aa2442cab38831728ca87d87b73fe4595d61b37b5

SHA256SUMS.txt holds the same values. Verify a download with:

sha256sum -c SHA256SUMS.txt --ignore-missing      # Linux
shasum -a 256 -c SHA256SUMS.txt --ignore-missing   # macOS
Get-FileHash .\nexium-1.0.2-setup-x64.exe -Algorithm SHA256   # Windows, compare with the table

Requirements

  • Windows 10 or later, x64. macOS on Apple Silicon. Linux x86_64 with glibc. Builds for aarch64 Linux and Windows on ARM are attached too; they are tier 2 (built, not tested in CI; see docs/platforms.md).
  • A C compiler is needed to build programs: the Windows installer and the macOS/Linux script take care of it. Otherwise put Zig on your PATH, or set NX_CC.