Wiki Shui

Morbus Iff wrote a nice email about beauty in file formats some time ago that mentions the phrase "code shui". Code shui actually turns up a lot in what Morbus talks about, but in more of an in-joke phrase than an overt philosophy. Perhaps it's a covert philosophy.

At any rate, "code" doesn't just have to mean a programming language—it applies to lots of different forms of structured text, including wikitext.

Whilst Markdown is quickly achieving prominence in the wikisyntax wars (there are almost as many formats as there are wikis), I'm still quite enamoured of my own style wiki-syntax as used in both pwyky and this, Eph, which steals much of its code from pwyky. I thought I might try to defend that staunch keeping with my own syntax here as not being of the "Not Invented Here" mentality but being very much grounded in pragmatics.

Exhibit One: Argument Structure

Christopher asked me why I use {* this kind of syntax} for bold in Pwyky. The answer is that it bears a great resemblance with link syntax, which is {URI title of the link}. Not only that, though, but {* lalala} is like *(lalala) which is like strong("lalala") or <strong>lalala</strong> or *lalala*, so there's a kind of continuity across languages. In particular, the {function arg1 arg2} syntax is basically LISP with curly brackets instead of parens—given that parens are used much too often in regular text. I suppose I could've chosen the regular < and >, but I think they're used even more often than curly braces, so I made the decision as I did.

The cool thing about the argument structure is that it's relatively easy to extend in that same way as you can write a new function or make a new tag in HTML, though it has the same weaknesses of relative verbosity (still less verbose than HTML though) and lack of human readability compared to some of the other wiki formats. I think we're used to that by now, though. If people really minded editing HTML by hand, the Web wouldn't be as big as it is now, I venture to say. It's perhaps not so much of an issue now, but it certainly was before any great HTML editing suites were around. In fact, I'm still one of many who don't believe that there are any great HTML editing suites: although Amaya's been the closest to providing an alternative, for me, I stil generally edit HTML by hand in nano.

Keeping It Simple (Stupid)

In any case, it can be better. Recently, I've been experimenting with a very minimal form of wiki syntax based more along the lines of noets than Eph.

The basic premise is that the input should be founded on three things only: Characters, Links, and Paragraphs. I don't think that one really needs anything else to make a decent HTML page with, documentation-wise, though you might have to resort to doing ASCII *emphasis* tricks since there's no presentational codepoints. Anyway, the code that I've come up with tries to focus on getting those few things right, so that the charset of the IRC input is automatically detected, links are only linked if they really look like they have URIs in there (so you don't even have to escape { as you do in Eph), and even the old IRI encoding of the links is done nicely.

I've even hooked it up to a bot which blogs to monthly files, and I was thinking about using it in lieu of Eph and keeping all the stuff private. There's still a fair amount I'd probably write more about if it were not Google-searchable, so it would be an incentive to capture it. Now, since Eph is back, I might run them alongside one another.

@@ [More Wiki Shui points here].

<d8uv> Everyone is fiercely devoted to their wikisyntax.
Sean B. Palmer