I hand-translated some very simple first order concatenative programs
to a dataflow representation. I implemented the dataflow versions in
Pure Data (
http://puredata.info/). Pd is a complete piece of garbage,
but it did work for this purpose at least.
Anyway, here it is:
http://johnnowak.com/heap/pd-concat.pngNote that 'swap', 'dup', and 'drop' are "primitives" here. The rest
follow the normal rules for a concatenative to push-based dataflow
translation: lines do not cross, there are no loops, and each port has
one (and only one) connection. The 'dip' combinator is the equivalent
of sliding a function one "column" to the left.
I'm interested in auto-generating visual representations of 5th code
along these lines. 5th has a "flow" system (in addition to the type
system and effect system) that keeps track of objects as they move
around on the stack. This will allow me to color-code lines to make
swapping, dup-ing, and so on, much more apparent. It may be worth
something... at least for educational purposes.
If anyone wants the source code, let me know. Making sense of Pd
without prior experience isn't much fun though. It's not fun even with
prior experience.
- John