Tuesday, March 10, 2009

The beginnings of dataflow programming (part 1)

I started playing D&D during the summer last year (2008) and am continuing on Thursday nights with the same group. Wizards of the Coast recently released a Character Builder program, and while it seems pretty decent, there are some serious problems. First of all, it only works on Windows, which is rather lame in this day in age. Secondly, I already ran into some issues that don't function properly, such as changing implements for a character. I decided that I could do better and I started to write a character generator in REBOL. I made it to the point where it was working except for feats, equipment and powers (which I admit are the biggest part), but then I was reading about !Liquid that Maxim has been working on for quite a while, and I thought, "Hey, I should convert this over to the !Liquid engine to finally learn it!"

So, now I begin my first attempt at dataflow programming. It should be a bit rough, but I will try to keep notes and document my progress for everyone that wants to see a beginner attempt to use !Liquid.

So there are four modes of !plug in !Liquid.

The first mode is called a LINK mode !plug. This is a one-sided dependency. It receives data from another !plug called its subordinate. When the subordinate !plug is updated, it sends a signal to the LINK !plug to become dirty. That is, it tells the !plug that the subordinate has data, but it does not give the data until the LINK !plug requests it. The term for this is called lazy evaluation. Setting a LINK !plug to be stainless? makes it immediately request the data from the subordinate when it receives the dirty? signal.

to be continued....