plum
git clone https://git.pyrossh.dev/plum
A statically typed, imperative programming language inspired by rust, python
dbfa8c5
— Peter John
2026-11-13T20:08:50+05:30
`main` in the program's `[App]` primitive, and nothing is global: std/App.plum declares the marker trait `App` (beside std/Test's `UnitTest`), loaded without an import for a file that lists it (a test's own library folder without it still has the marker); a program's entry points are the funs of `primitive <Name>[App]` (`primitive OrbitRunner[App] = fun main(io: Io) -> Game = ..`): the parser lifts its `main` and `export fun`s to top-level fns (`liftEntries`), so every later pass, the wasm exports and the host ABI are unchanged (an export keeps its name: the host calls `update`, not `Plugin.update`), and a bare call of a sibling entry point stays bare; loader: no top-level `fun` at all (a top-level `main` or `export fun` is the no-globals error pointing at `[App]`), a second `[App]` primitive in a file is an error naming the first, and an imported file's `[App]` keeps its `main` as a static (`Closures.main()`, `OrbitRunner.main(io)`); `plum run`/`plum build <folder>` pick the one file with a `primitive <Name>[App]`, and a file without one says where `main` goes; modules.rs keeps only the variant-clash renaming (the module function and constant resolution, `m.f()`, the `main@stem` rename and the lowercase-module error are gone), and the checker's "undefined name 'palette'" for the old `palette.shade(..)` says `shade` is a static of `Palette`; every `main` converted, into the file's namespace primitive when it has one (`Basics[App]`, `StrBench[App]`, `TwoScreens[App]`) or a new one named after the program (`OrbitRunner`, `BalloonPop`, `Clicks`, `StressGame`, fixtures): examples, games, tests, benchmarks (not master_vs_simpler/master), web-test and game fixtures, ~520 Rust inline programs (`primitive Main[App]`, merged into an adjacent `primitive Main`; positions in their assertions shifted with them), parser.rs's grammar tests, the tree-sitter corpus (trees regenerated) and highlight sample, run.py's branch game drivers, dispatch/run.py's generated program; tests for the rule, two `[App]`s, a `main` of another primitive, an imported `[App]`'s `main`, the folder pick; docs (language.md: first program, the rule, `export fun`; README, game.md, tools.md, std.md samples); host's old-entry message names `[App]`
This diff is too large to display.