Sunday, April 23
duct tape & bailing wire again
So I noticed that it would be trivial to write these pages in wiki-like markup by calling a bit of WalaCode. This is useful because it could obviate thinking about HTML: Writing an endless string of <a href="..."> tags, typing in entities for quote marks and ampersands, all that stuff.
Unfortunately, Wala.pm's markup is less than ideal for use in VimEditor. For one thing, it has a naive expectation that everything will be on a single line, regular paragraphs included. This works ok in a browser textarea, but it's not much fun elsewhere. It also doesn't make for very pretty HTML, which matters more to me after a few hundred hours of staring at really awful machine-generated markup. (View source on this entry and you'll see what I mean.)
This has given me the sense, though, that I ought to re-write p1k3 so that I can pass off text to whatever arbitrary subroutine or module. As is, things are sort of ad hoc and badly generalized. I've got a zillion of these kinds of things:
# this takes care of wiki markup, badly while ($everything =~ m/<wiki>(.*?)<\/wiki>/s) { my $block = $1; my $parsed_block = WalaB::wiki_page_to_html($block); # good god, why am I doing a substitution here? $everything =~ s/<wiki>\Q$block\E<\/wiki>/$parsed_block/s; }
Ugly, although not half as ugly as it gets in the version that converts everything to LaTeX. And there I have the thought that most entries really ought to be stored in some format that can be gracefully translated to just about anything else, and the concurrent thought that writing something that looks like XML by hand is no fun at all. I start wishing again that I had learned how to program somewhere along the path to that history degree.
I'm worrying about this at all because (or at least on the pretext that) Elizabeth wants a site, and I can't decide whether I ought to give her something like Wordpress or roll my own full-sized system out of the bits and pieces lying around here.
As usual, what I am actually doing is focusing my attention on the irrelevant minor details of a weak technical framework I scarcely utilize. I am an old man, leaning over a workbench in a dusty garage, pathologically arranging three screwdrivers, an incomplete socket set, and a wide assortment of rusted bolts into new configurations. Periodically I pause, inspect my work, and begin anew. The world takes little notice.