webwanker upgrades

scrottie on 2007-07-04T04:49:17

It's been about 8 years since I worked on the WebWanker scripting language (see backstory below).

I think it's held up fairly well, but continuously being exposed to new ideas and tools, I'm starting to think it would be fun to hack on continuations and coroutines. But first I'd have to actually hack on subroutines to hack on coroutines. And another thing that's missing: OO. Of course, I'll have to hack on subroutines before I hack on methods. Or maybe what I really need to do is implement Macro WebWanker and then implement coroutines and OO (and function calls) as macros!

Backstory:

WebWanker started life as a bash script to clean up and re-template existing HTML for Mayo Clinic Scottsdale way back when. The story goes like this: one day, some computer guy there quits, and so they go to take back his computer. Arriving at his cube, they find not one but a few computers. They dutifully remove them. The Intranet goes down. They make the connection, replace the machine, and power it back on. Moments later, the Intranet comes back online. They quickly hire some people.

The first order of business was fixing the HTML and making it consistent. Before I knew about cygwin, or possibily before cygwin (doubtful), I was uploading HTML to my University of Minnesota account, running bash scripts on it (sed, awk, etc), and then downloading the fixed up HTML and putting it on the IIS3/NT4 server (think that's right) that was hosting it. When people caught on to what I was doing, they demanded I stop uploading the HTML off-site. Fair enough. The script wasn't that complex at that point so I implemented it in C. The regexes generalized down to seeking to a constant string, noted the position, seeked to another, pasted text in after moving the rest of the buffer to accommodate, relocating in the process -- repeated a few times. I made it configurable. Then I made it read the series of operations from a file. Then it all went downhill from there... loops, appending to buffers, seeking forward and backwards the lengths of other buffers, splicing out, etc, etc, etc. In the end, I wound up with a string oriented assembly language. Okay, not exactly in the end... in the end, a content management system was built out of it and it was put online for departments to use.

Yes, I should have just done it in Perl. I didn't know Perl. And I should have installed Linux, but I only had one machine (that brief professional exposure to Windows was very educational as to the mindset of the people who use the beast). Or written it in SNOBOL. Or something... soon afterwards, I learned Perl, after hearing it was both terrible and mighty.

I guess we all need an absurd story like this to make us realize that our toolbox does in fact need to be grown at regular intervals.

So, the WebWanker needs macros.

-scott