plum

#treesitter#compiler#wasm

git clone https://git.pyrossh.dev/plum

A statically typed, imperative programming language inspired by rust, python


711fc10 — Peter John 2026-11-17T09:10:20+05:30
plan: U4i
docs/plans/2026-11-13-no-globals-tests-ports.md CHANGED
@@ -59,3 +59,4 @@ Decisions (user's answers):
59
59
  - **U4g view lists fused into the paint walk or scalar-replaced** (~55 cells per Orbit frame, `__upcastOnto*` ~4%, an actor's one-item `[Sprite]` 14% of scale paint).
60
60
  - **U4h run-time shared flag** (user, 2026-11-16: "Yes do it after", after U4g): every GC struct gets a one-way shared bit, set wherever a reference is copied (a value used again after a use, a store into a list/field/closure capture/global/snapshot, anything the host holds), never cleared. A spread the static analysis can't prove unique checks the bit at run time and updates in place when clear. Soundness first: a missed copy point corrupts a shared value, so the copy points are found by the same liveness the in-place pass uses and fuzzed against the copying build (`--no-fbip` gives the same results). Measure: in-place counts and update time; the prize is about 5% of Orbit update, so drop it if the bit's cost eats it. Dropped on 2026-11-16 after measuring, not built (`sl/shared-flag`): the copies it could reach are fewer than the copies its header costs; see backlog's "A run-time shared bit".
61
61
  - **U5 field layout** (user, 2026-11-16: the grouped form, "With commas after all fields" "except the last one"): `struct PlayingScreen[ScreenSlice<PlayAction>](` / ` dice: Dice, ticks: Int, clock: Float,` / ` score: Int, best: Int, lives: Int, over: Bool,` / ` ship: Ship, orbs: List<Orb>, mines: List<Mine>, rings: List<Ring>,` / ` assets: Assets` / `) =`. This already parses (no grammar change); the formatter keeps the user's line grouping, and games and std types with many fields move to grouped lines; docs show the form. Starts when U4a or U4b finishes.
62
+ - **U4i the screen taken out for the tick** (user, 2026-11-17: "continue", after U4h's finding): `Delivery.deliverTo`'s `@copy` of the screen leaves the old one in `Game.screens` for the tick, so every actor has two holders. Take the shown screen out of `Game.screens` for the tick and put the new one back (no copy); then unblock what the static analysis still blocks: `List.head` shared through `List.find`/`List.next`, the view holding the ship (`PlayingScreen.ship`), `Game.run`'s `sized`/`after` chain. Bound measured by U4h: Orbit update about -16%, Clockwork -10.5%, scale update -27%.