Sat Apr 9 10:31:19 EDT 2011
Parser oriented programming (from busy.txt)
The PK2 debugging was interesting. Harder than expected. Working
with buggy hardware is difficult.
The USB is going better. I found a way to use structs in Forth, by
turning them into streams, and writing parsers. The golden rule seems
to be: don't use datastructures in Forth, use streams, tasks and/or
state machines. Parser-oriented programming.
If you think of it, data structures are only postponed execution.
This is very apparent in a language like Haskell: think of
deforestation optimization where constructors and pattern matching get
combined to eliminate the data structure entirely.
On an embedded platform this is even more true since you really are
more interacted with its relation to IO than for a normal computer,
which might be data-storage central.