Show HN: Modula-9, a Wirth-family language designed for auditing AI-written code A developer publishing as atverm released Modula-9 (M9), a Wirth-family programming language whose compiler enforces type, failure-mode, effect and thread-safety checks that cannot be switched off, aimed at auditing code written by AI agents. The project reports runtime checks costing about 3%, Mandelbrot performance matching C from a 26 KB executable, a self-hosting compiler that produces byte-identical output, and a zarr reader matching numpy to the last digit; M9 was itself written by an agent under review. The compiler and tools ship under the GNU GPL version 3 with a runtime exception letting programs built with M9 be released under any license, with Linux packages for Ubuntu, Debian, Fedora, Rocky and Arch, and experimental macOS and Windows builds. A language for code that must be believed. M9 is a Wirth-family language that is readable like a bank statement and checked like Rust. Every rule exists because of a real bug, and the compiler refuses that bug instead of letting the program run on and quietly produce a wrong number. For results you have to reproduce Every number type names its width, and nothing converts on its own. A wrong conversion stops the program instead of slipping a bad value into your mean. The tutorial goes from first steps to a real ICOS CO2 series read through zarr, a NetCDF file, regressions, and threads. Start the tutorial https://tutorial.modula9.net For code an AI agent writes Types, failure modes, effects, and thread safety are stated in definition modules, and the compiler checks them all. Checks can't be turned off. M9 was itself written by an agent under review, and its claims are checked the same way. Read the report https://github.com/atverm/m9c/blob/main/docs/M9-report.md Measured, not claimed - Runtime checks cost about 3%, and can't be switched off Benchmarks https://github.com/atverm/m9c/blob/main/docs/bench.md - Mandelbrot runs as fast as C, from a 26 KB executable Method https://github.com/atverm/m9c/blob/main/docs/bench.md - The compiler compiles itself to byte-identical output Bootstrap https://github.com/atverm/m9c status - The zarr reader matches numpy to the last digit Chapter 8 https://tutorial.modula9.net/ch/08 - Each language feature cites the bug it makes uncompilable The report https://github.com/atverm/m9c/blob/main/docs/M9-report.md Install Linux: packages for Ubuntu, Debian, Fedora, Rocky, and Arch, or build from source with only gcc. ./build.sh macOS on Apple silicon, experimental. brew tap atverm/m9 brew install m9 Windows 10 and 11, experimental: a zip with its own gcc and one installer. All releases https://github.com/atverm/m9c/releases Resources Your programs are yours The compiler and tools are free software under the GNU GPL, version 3. The runtime and standard library carry a runtime exception, so programs you build with M9 can be released under any license you choose, open or proprietary. Changes to the compiler itself remain under the GPL. Read the runtime exception This file grants an additional permission under section 7 of the GNU General Public License, version 3. It applies to the Runtime Library of Modula-9, which consists of the C runtime runtime/m9rt.c and runtime/m9rt.h , and the C files beside them in runtime/ : the shims programs link and m9session.c , the standard library modules listed in RUNTIME-LIBRARY-FILES , and any code m9c copies from these into the C it generates. It does not apply to the compiler m9c and its modules, the bootstrap C in runtime/gen/ , or the tools m9lsp, m9fmt, m9elide, the editor extension, and the Jupyter kernel . These remain under the GPL alone. The permission is the GNU Classpath exception, reproduced verbatim, where “this library” means the Runtime Library: Linking this library statically or dynamically with other modules is making a combined work based on this library. Thus, the terms and conditions of the GNU General Public License cover the whole combination. As a special exception, the copyright holders of this library give you permission to link this library with independent modules to produce an executable, regardless of the license terms of these independent modules, and to copy and distribute the resulting executable under terms of your choice, provided that you also meet, for each linked independent module, the terms and conditions of the license of that module. An independent module is a module which is not derived from or based on this library. If you modify this library, you may extend this exception to your version of the library, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version. Compiler output. The C code m9c generates from your program is not a work based on m9c merely because m9c produced it. Where that code contains material copied from the Runtime Library, the permission above covers that material.