Discussion:
The Best Examples of "Code is Data"
Matthew D. Swank
2010-12-05 18:33:52 UTC
Permalink
1. Doug Hoyte's book Let Over Lambda, chapter 6.3 Alet and Finite State
Machines, raised my macrology to a new level. I used his ideas to
implement a full-blown hierarchical state machine macro(s) (roughly 200
lines of CL, too large to post here). The hierarchical state machine
paradigm is great for programming reactive things, e.g. gui's, hardware
controllers, etc.
I've read his treatment of state machines, and they seemed like simplified
co-routines. Or are you just referring to his macro techniques in aid of
your own ideas about state machines?

Matt
Paul Tarvydas
2010-12-05 21:24:02 UTC
Permalink
Post by Matthew D. Swank
1. Doug Hoyte's book Let Over Lambda, chapter 6.3 Alet and Finite State
...
Post by Matthew D. Swank
I've read his treatment of state machines, and they seemed like simplified
co-routines. Or are you just referring to his macro techniques in aid of
your own ideas about state machines?
Yes to both. His techniques showed me a better idea on how I wanted to implement my (more complex, hierarchical) state machines. And, I implement reactive systems as a bunch of communicating state machines that fire one-way events at each other. As you point out, this devolves into a "stackless" (in fact 1 stack (per core)) set of coroutines.

pt

Loading...