ludic/docs/language
Orkuncakilkaya e4265f5fdb feat(lang): 27.1 - a state machine as data: @Machine(Record.field) on a registry of transitions
A registry marked `@Machine(Deer.mood)` is the transitions of a machine over that enum field of the
records a state's Table<Deer> holds. Its record has from and to (the enum's variants), on: string (an
action's name, "" for a transition the tick asks), guard: fn(Row<Deer>, reads...) -> bool and
enter: fn(Row<Deer>, reads...) -> void; the states are the enum's variants and the start is the
field's default. The rows are data (an .lres or defs), the names the studio already edits.

Written by the compiler (machines.ludic, machines_write.ludic): for each action an `on` names, a row
reducer in the registry's file (named ..__machine__DeerSteps, so it sits beside the program's own
row reducer on the same action, after it): the row's state, the first transition from it on that
action whose guard passes, the field set, enter run - guards and enters called by name. When a row
leaves a state on a guard alone, `state DeerStepsMachine` (the kept row view) and
deer_steps_tick(m: mut DeerStepsMachine, s: mut Herd, reads...), one transition a row a tick.
Nothing allocates.

The table is the whole machine: the field written anywhere else - an assignment, or a `machine`
block's become over it - is a type error (check_stmt.ludic, ck_machine_write). Guards and enters take
the row first, are the record's module's, keep a row reducer's rules (and may be handed the row);
a guard writes nothing through it. The graph is checked, each error at its row (in the .lres when
the rows are there): a state never reached from the start, a state with no way out, an `on` naming
no action or an action with no @Target, a self-transition with no guard, two ways out of a state on
one trigger behind an unguarded first. Also refused: @Machine off a registry, a field that is not a
plain enum with a default, a @Column field, no table (or two) of the record, a transitions record of
another shape, a machine outside its table's state's module.

ludic schema's code section gains `machines` (registry, record, field, enum, table, start, states,
actions, tick, module, at); ludic deps names a machine's reducer `reducer Deer in Herd.deer on Spook
(machine DeerSteps)`. vocab @Machine; docs annot-machine, kw-machine; LANGUAGE.md "A machine as
data"; examples actions/machine (+ deer_steps.lres) and ten rejects; test.ludic feat, reject and
schema cases (not run); changes/machines.md. Reseeded; bootstrap-cfree fixpoint holds (317642
lines); Maroon Lake's `ludic build --check` is clean against this tree.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 16:37:37 +03:00
..
angle feat(engine): #90 atlas-aware Sprite component, #91 become from listeners, 0.3.x ergonomics batch 2026-09-04 01:36:08 +03:00
anim feat(compiler): list literals, typed compound assignment, file:line diagnostics 2026-09-05 01:12:16 +03:00
annotations feat(lang): 27.1 - a state machine as data: @Machine(Record.field) on a registry of transitions 2026-09-30 16:37:37 +03:00
app docs(0.S): the doc fences migrated by ludic migrate state; LANGUAGE.md's state section says what the tool and the checker do now; no module-level var left in the docs 2026-09-25 15:37:29 +03:00
assets feat(lang): L4 type checker between parse and emit 2026-09-24 01:34:49 +03:00
audio feat: per-voice audio, outlines for what is not an actor, and a coast 2026-09-11 15:25:46 +03:00
base64 feat(stdlib): Tiled P0 — XML reader + base64 decode + gzip framing (#67) 2026-09-01 14:04:49 +03:00
bigint feat(types): BigInt + Decimal exact economy numbers (#52) 2026-08-31 18:45:14 +03:00
builtins docs(0.S): the doc fences migrated by ludic migrate state; LANGUAGE.md's state section says what the tool and the checker do now; no module-level var left in the docs 2026-09-25 15:37:29 +03:00
camera feat(engine): #90 atlas-aware Sprite component, #91 become from listeners, 0.3.x ergonomics batch 2026-09-04 01:36:08 +03:00
clock feat(stdlib): DateTime format/parse + simulated Clock — completes #9 2026-08-30 03:51:48 +03:00
collision feat(engine): 2D collision / physics-lite — Body + Collider + esys_move (#65) 2026-09-01 13:17:36 +03:00
color feat(stdlib): namespaced standard library (issue #2) 2026-08-30 00:26:19 +03:00
colors docs: add Networking section + process/OS builtins (net_send, owner, is_server, serialize/apply, arg, exit, run, getenv, read_char, file_*) 2026-08-29 16:39:29 +03:00
control feat(lang): 27.1 - a state machine as data: @Machine(Record.field) on a registry of transitions 2026-09-30 16:37:37 +03:00
crypto feat(stdlib): finish Crypto (CSPRNG + base64) and add Uuid.* library (#19 #16) 2026-08-30 21:40:51 +03:00
date feat(stdlib): Time/Date/Duration calendar-clock core (issue #9) 2026-08-30 03:37:38 +03:00
datetime feat(stdlib): DateTime format/parse + simulated Clock — completes #9 2026-08-30 03:51:48 +03:00
decimal feat(types): BigInt + Decimal exact economy numbers (#52) 2026-08-31 18:45:14 +03:00
dict feat(types): Dict + Set string-keyed containers (#54) 2026-08-31 18:51:42 +03:00
duration feat(stdlib): Time/Date/Duration calendar-clock core (issue #9) 2026-08-30 03:37:38 +03:00
ease feat(stdlib): Math.exp/log/pow + Ease.elastic transcendentals (issue #25) 2026-08-30 01:19:44 +03:00
ecs docs/language: a page for every keyword and attribute the vocabulary has 2026-09-29 23:59:47 +03:00
events docs(0.S): the doc fences migrated by ludic migrate state; LANGUAGE.md's state section says what the tool and the checker do now; no module-level var left in the docs 2026-09-25 15:37:29 +03:00
file feat(engine): #90 atlas-aware Sprite component, #91 become from listeners, 0.3.x ergonomics batch 2026-09-04 01:36:08 +03:00
font docs(0.S): the doc fences migrated by ludic migrate state; LANGUAGE.md's state section says what the tool and the checker do now; no module-level var left in the docs 2026-09-25 15:37:29 +03:00
fs feat(tools): L10 ludic-fmt enforces a project's style 2026-09-24 14:38:35 +03:00
fx feat(engine): #90 atlas-aware Sprite component, #91 become from listeners, 0.3.x ergonomics batch 2026-09-04 01:36:08 +03:00
gl docs(0.S): the doc fences migrated by ludic migrate state; LANGUAGE.md's state section says what the tool and the checker do now; no module-level var left in the docs 2026-09-25 15:37:29 +03:00
grid feat(stdlib): add Grid.* — tile geometry + A* pathfinding over the tilemap (#24) 2026-08-31 12:36:12 +03:00
hash feat(compiler): list literals, typed compound assignment, file:line diagnostics 2026-09-05 01:12:16 +03:00
http Http.text and Http.header return copies - they handed back the handle's own buffer (and on macOS the response's string), which Http.free released: a text read before the free and used after it was garbage or empty (maroon-lake's maps.json was written with 0 bytes) 2026-09-29 20:57:44 +03:00
huge feat(types): Huge + Angle + Percent polish numeric types (#55) 2026-08-31 19:04:37 +03:00
input feat(tools): L10 ludic-fmt enforces a project's style 2026-09-24 14:38:35 +03:00
ivec2 feat(engine): #90 atlas-aware Sprite component, #91 become from listeners, 0.3.x ergonomics batch 2026-09-04 01:36:08 +03:00
job feat(compiler): a Job.parallel_for worker may read a state but not change one 2026-09-27 22:04:59 +03:00
json runtime: Json.write_file, and Json.encode through a kept buffer 2026-09-28 15:32:36 +03:00
light feat(compiler): list literals, typed compound assignment, file:line diagnostics 2026-09-05 01:12:16 +03:00
list docs(0.S): the doc fences migrated by ludic migrate state; LANGUAGE.md's state section says what the tool and the checker do now; no module-level var left in the docs 2026-09-25 15:37:29 +03:00
log feat(stdlib): add Log.* — levelled, structured logging (#15) 2026-08-30 21:57:22 +03:00
map feat(engine): #90 atlas-aware Sprite component, #91 become from listeners, 0.3.x ergonomics batch 2026-09-04 01:36:08 +03:00
math docs(0.S): the doc fences migrated by ludic migrate state; LANGUAGE.md's state section says what the tool and the checker do now; no module-level var left in the docs 2026-09-25 15:37:29 +03:00
memory refactor(lang): rename the ptr/ptrs types to pointer/pointers 2026-08-30 01:58:54 +03:00
mime feat(stdlib): add Fs.* / Path.* / Mime.* — filesystem, paths, content types (#10) 2026-08-30 22:43:50 +03:00
motion feat(anim): animation ergonomics — named clips, Anim.play/Motion.to, frame events, fluent Tween handles (#48) 2026-08-31 16:53:16 +03:00
network docs: merge duplicate networking namespace dirs; guard against recurrence 2026-08-30 16:46:21 +03:00
noise feat(stdlib): add Noise.* — deterministic fixed-point procedural noise (#3) 2026-08-30 21:50:50 +03:00
operators docs/language: a page for every keyword and attribute the vocabulary has 2026-09-29 23:59:47 +03:00
os Os.heap_bytes: the heap without the renderer; string_temps reads it 2026-09-28 12:31:42 +03:00
path feat(stdlib): add Fs.* / Path.* / Mime.* — filesystem, paths, content types (#10) 2026-08-30 22:43:50 +03:00
percent feat(types): Huge + Angle + Percent polish numeric types (#55) 2026-08-31 19:04:37 +03:00
phases docs(0.S): the doc fences migrated by ludic migrate state; LANGUAGE.md's state section says what the tool and the checker do now; no module-level var left in the docs 2026-09-25 15:37:29 +03:00
pool feat(ecs): #80 entity-pool stats (Pool.live/free/reserved/capacity) 2026-09-02 08:23:58 +03:00
prefab feat(engine): #90 atlas-aware Sprite component, #91 become from listeners, 0.3.x ergonomics batch 2026-09-04 01:36:08 +03:00
process docs(0.S): the doc fences migrated by ludic migrate state; LANGUAGE.md's state section says what the tool and the checker do now; no module-level var left in the docs 2026-09-25 15:37:29 +03:00
promise feat(stdlib): Jobs, Promises & opt-in Sync concurrency (#14) 2026-09-01 03:32:31 +03:00
query feat(stdlib): add Query.* — ECS spatial queries over the reflection ABI (#42) 2026-08-31 13:19:25 +03:00
random fix(runtime): Random.* in any program; value_* called directly brings the value tree 2026-09-25 04:59:48 +03:00
rect feat(types): IVec2 + Rect 2D value types (#1) 2026-08-31 18:29:41 +03:00
reflect feat(reflect): generic value tree + Reflect.serialize/apply + JSON bridge (#44) 2026-08-31 15:19:21 +03:00
regex feat(stdlib): add Regex.* — a linear-time regular-expression engine (#18) 2026-08-31 12:23:19 +03:00
save feat(stdlib): namespaced standard library (issue #2) 2026-08-30 00:26:19 +03:00
scenes docs/language: a page for every keyword and attribute the vocabulary has 2026-09-29 23:59:47 +03:00
screen docs(0.S): the doc fences migrated by ludic migrate state; LANGUAGE.md's state section says what the tool and the checker do now; no module-level var left in the docs 2026-09-25 15:37:29 +03:00
set feat(types): Dict + Set string-keyed containers (#54) 2026-08-31 18:51:42 +03:00
sprite feat(engine): #90 atlas-aware Sprite component, #91 become from listeners, 0.3.x ergonomics batch 2026-09-04 01:36:08 +03:00
structure feat(lang): 27.3 - a reducer on a table's row: reducer T in S.table on A, @Target, Row<T>, @RowVerb, @Column 2026-09-30 16:14:59 +03:00
sync feat(jobs): real OS threads - Job.parallel_for, fn name, thread-safe Sync 2026-09-15 13:52:22 +03:00
system refactor(stdlib): consolidate System.* onto Os.*, retire duplicated members 2026-08-30 22:54:28 +03:00
testing refactor(cli)!: split the contributor tool out of the ludic CLI 2026-09-05 23:15:12 +03:00
text docs(0.S): the doc fences migrated by ludic migrate state; LANGUAGE.md's state section says what the tool and the checker do now; no module-level var left in the docs 2026-09-25 15:37:29 +03:00
tiled feat(stdlib): Tiled P6 — infinite/chunked maps, .world stitching, base64+zstd (#74) 2026-09-01 16:07:10 +03:00
time feat(tools): L10 ludic-fmt enforces a project's style 2026-09-24 14:38:35 +03:00
tween feat(anim): animation ergonomics — named clips, Anim.play/Motion.to, frame events, fluent Tween handles (#48) 2026-08-31 16:53:16 +03:00
types Merge lang/i18nkeys (27024de) into lang/syntax: the vocabulary gains the text keys - the Key type, @TextKey (a registry's), the k"..." and kn"..." literals - and @Text's doc; docs/language pages for Key and @TextKey; ludic-dev syntax rewrote the grammars; reseeded, bootstrap-cfree fixpoint holds 2026-09-30 00:02:48 +03:00
udp Udp.open_local(port): a socket bound to 127.0.0.1 alone (udp.ll, udp_win.ll), for a port only this machine's tools reach - a dev link - where Udp.open binds every interface 2026-09-29 19:15:30 +03:00
ui feat(engine): #90 atlas-aware Sprite component, #91 become from listeners, 0.3.x ergonomics batch 2026-09-04 01:36:08 +03:00
unicode feat(stdlib): add Unicode.* — UTF-8 code points, graphemes, case mapping (#13) 2026-08-30 22:29:00 +03:00
uuid feat(stdlib): finish Crypto (CSPRNG + base64) and add Uuid.* library (#19 #16) 2026-08-30 21:40:51 +03:00
value fix(runtime): Random.* in any program; value_* called directly brings the value tree 2026-09-25 04:59:48 +03:00
vector feat(stdlib): 2D Vector type + Vector.* namespace (issue #25) 2026-08-30 02:09:38 +03:00
vk feat(vk): Vk.* - Vulkan 1.0-1.4 generated from the registry, loaded at run time 2026-09-15 09:52:12 +03:00
world feat(input,ecs): #79 Input.axis_i directional int + #84 world bounds 2026-09-02 07:44:41 +03:00
xml feat(stdlib): Tiled P0 — XML reader + base64 decode + gzip framing (#67) 2026-09-01 14:04:49 +03:00