~/talk

State Machines

links:none on file
slides:none on file

Introduces using the automat library and its MethodicalMachine class to replace ad hoc if‑checks with explicit states and transitions, demonstrated by a three-state kettle (empty → full‑cold → full‑hot) with inputs fill/boil/pour that raise exceptions on invalid transitions. Outputs run only after a transition is validated, can accept args and return results (currently as a list), and the library supports serialization and auto‑diagramming. Limitations include awkward multi‑return handling and no built‑in hierarchical states; the demo works as shown.

AI-written summary · about

  1. 0:00Intro
  2. 1:26What is a state machine?
  3. 2:22Why methodical state machines?
  4. 7:04The Code - Manual class Kettle(object)
  5. 8:48The Code - Boilerplate
  6. 9:20The Code - States
  7. 10:03The Code - Inputs
  8. 10:42The Code - Transitions
  9. 12:04Invalid Usage
  10. 13:32Taking Arguments - Outputs
  11. 15:45Returning Results - Outputs
  12. 17:18Outputs - Results
  13. 18:29Automat: Advanced Features
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.