Blog
Design notes and release history for Mah. Version changelogs live here too, and also at /changelog.
-
v0.4.0: threads, shared variables and channels
std:thread runs jobs on other OS threads with detach(t) and t.run, on copies of what they use; shared let variables and atomic blocks share state safely; semaphores and channels; waits that can never end are reported instead of hanging. Also since 0.3.0: an HTTP server and packages from GitHub.
-
A todo API in Mah, documented by its own reflection
A REST API with an OpenAPI document and Swagger UI, written in Mah with no framework: routes are decorated functions, std:reflect reads them, and the docs can't drift from the code. Plus what comes next: a backend framework for Mah.
-
v0.3.0: reflection, decorators, Bytes, processes and networking
Types as values, ## doc comments and std:reflect; decorators and hooks that wrap functions, parameters and fields; rest parameters and spread calls; module-scoped type names; Bytes and binary files; std:process; and TCP, TLS, URLs and an HTTP client.
-
v0.2.0: checked errors, the type checker, a standard library, and mah test
throw/try/catch with a built-in Error trait and RuntimeError enum on both VMs, a checker that infers what every function throws, the first static type checker with mah check, a standard library with math, path, JSON, CSV, random, collections and regex modules, and a built-in test runner.
-
v0.1.0: runnable bytecode and the Rust VM
A second, from-scratch Rust implementation of the .mahc bytecode machine, plus self-contained executables that run without mah or Python installed.
-
v0.0.4: projects, kwargs, iterators, and mah format
mah init and mah-project.toml, default parameters and keyword arguments, ranges/iterators, Vector and Map, for loops, match guards, type annotation syntax, and the formatter.
-
v0.0.3: defer, async, traits, and portable bytecode
Zig-style defer, cooperative async with detach/.await, cross-file rename, Rust-style traits and impl, and the first portable .mahc bytecode format.
-
How Mah closures capture by reference
A quick look at the activation-record model behind Mah's closures, and why it gives you JavaScript-style capture instead of Python's.
-
v0.0.2: a hand-written compiler and the v2 language core
The v2 rewrite: a hand-written lexer/parser, heap-allocated closures, structs, enums, pattern matching, expression blocks, a forgiving parser, and the first LSP.
-
Why Mah is hand-written, pure Python, and dependency-free
A few deliberate constraints run through the whole project: no parser generator, no third-party runtime dependencies, and closures over a real activation-record model.
-
v0.0.1: the first Mah prototype
Where Mah started: a grammar-DSL-generated parser, a flat-array interpreter, and just enough syntax to find prime numbers.