Skip to content

M9 0.4.1

Latest

Choose a tag to compare

@atverm atverm released this 02 Sep 15:41

The M9 compiler m9c, the runtime libm9rt.a, the standard library as M9 source, the module reference, the compiler's man page and the VS Code extension files. gcc is the only toolchain any of them needs.

One package per distribution, x86-64, each built ON that distribution (the Ubuntu 26.04 one on a real 26.04 machine rather than a VM) from the one source tarball attached here (m9-0.4.1.tar.gz, sha256 bfb8d3f818c873cd4b49f617d28f7f84ed1b08f12066567c19235d277677c27d), then installed there and made to compile and run an M9 program with an empty environment before it was allowed to leave the build machine.

That tarball is the same set of files as this repository -- the compiler, runtime, standard library, gates, man page and module reference -- and the release tooling refuses to cut one that is not, checked both against the list and against an independent deny-list of paths that must never be published.

distribution package install
Ubuntu 24.04 LTS m9_0.4.1-1_amd64.ubuntu24.04.deb sudo apt install ./m9_0.4.1-1_amd64.ubuntu24.04.deb
Ubuntu 26.04 LTS m9_0.4.1-1_amd64.ubuntu26.04.deb sudo apt install ./m9_0.4.1-1_amd64.ubuntu26.04.deb
Debian 13 m9_0.4.1-1_amd64.debian13.deb sudo apt install ./m9_0.4.1-1_amd64.debian13.deb
Fedora 43 m9-0.4.1-1.fc43.x86_64.rpm sudo dnf install ./m9-0.4.1-1.fc43.x86_64.rpm
Rocky 9 (RHEL 9, Alma 9) m9-0.4.1-1.el9.x86_64.rpm sudo dnf install ./m9-0.4.1-1.el9.x86_64.rpm
Arch m9-0.4.1-1-x86_64.pkg.tar.zst sudo pacman -U ./m9-0.4.1-1-x86_64.pkg.tar.zst

What changed since the previous release

  • m9c --check: check the module and its imports, print the diagnostics, write NOTHING -- no C, no header, no documentation. The exit code says whether the program exists. Built for editors: bare m9c writes NAME.h/NAME.c beside the file, which inside an editor is the generated-header-shadows trap armed on every save.
  • m9lsp, a Language Server Protocol server written in M9, ships as library source (Lsp.m9): build it with m9c --make -o m9lsp Lsp against the installed library. It publishes diagnostics on open and save by running m9c --check and republishing the compiler's own messages with their positions -- it never lexes M9 itself, so an editor squiggle cannot disagree with the build. Chapter 0 of the tutorial carries Helix and Neovim configuration.
  • Io gains ReadStdin (one read(2); a stream has no whole, so the whole-file rule stands for files) and Flush (a server's reply must not sit in a buffer while it blocks on the next request).
  • m9_cat_extend guards its fast path with integer comparisons: the old pointer comparison between different objects was undefined behaviour, seen as -Wstringop-overflow on + with a literal left operand under newer gcc. Found by A. Vermeulen reading the runtime.
  • Release-note bullets are reflowed from the changelog (dpkg's 68-column wrapping is format, not prose), and the arch PKGBUILD's pkgver moved to 0.4.x with the guard that caught it standing.

Each .receipt records the distribution the package was built on, its sha256, the tarball's sha256, the gcc that built it, and the smoke line. Nothing here was modified after it came back from the build machine except the 3 debs' file names, which carry their distribution because they would otherwise be the same name (dpkg reads the control file, not the name).

Chapter 0 of the tutorial (M9Tutorial, tutorial.modula9.net) covers installation from these and from source.