It didn’t shock me to discover this, but it was one of those things about the web that I hadn’t really played with seriously. Then I started trying to expose all of the parameters for my random web colors page, so people could tinker with the color-generation rules.
Not only did the form add 24K to the page size, it increased the rendering time by about an order of magnitude.
The syntax for <select> is just crap:
<option label="Red" value="#FF0000">
<option label="Green" value="#00FF00">
<option label="Blue" value="#0000FF" selected>
Extend this to a dozen choices, and then replicate it a hundred times across a non-trivial form. Blech.
Instead, though, I think I’ll just write an interpreter for a simple mini-language that contains just enough operators to do the job. Restricts the audience for the web page a bit, but if I distribute the interpreter as a Perl module, other people can build on it.
After a bit of tinkering, I think this is a reasonable syntax for my current rule-set:
Now to write the interpreter!