(Not) parsing wikitext

I have a confession: I don't know how to parse WikiText . Oh, I know howto process it (using regular expressions and ad-hoc code), but I don'tknow how to write a formal parser for it, something based on parsingtheory in order to have all of the advantages of real parsers. Parsersmatter because they're much easier to write, to maintain, and to reasonabout than ad-hoc code; ad-hoc processing code is ultimately just a big


My view of the right way to copy lists in Python

I recently wound up reading Python: copying a list the right way (it's old, but it madethings like Hacker News recently); in it, its author argues that theclearer way to copy a list in Python is not ' new = old[:] ' but ' new =list(old) '. In thinking about it since then, I've wound up more or lessdisagreeing with this.

It's true that the effects of old[:] are not immediately obvious


Praise for systemd

Over time I've accumulated all sorts of local init.d scripts onboth my work and my home machines. With my move to Fedora 15 comes systemd , and I was recently prompted to try migrating my crufty old init.d scripts to today's new modernway of doing things.

(I'm a crazy person so sometimes I like doing things like this,not because I have any real need of it but because it just seemslike the thing to do.)

I'll admit


The disappearance of separate filesystems for /usr and /var

Taken from the list of common Fedora 16 bugs :

  • Attempting to upgrade a system with /var on a different partition orLV to / will fail

Okay, I get it. I give in. Even on Fedora 15 systemd warns you thatvarious things won't work right if /usr is not part of the rootfilesystem, and now Fedora 16 upgrades fail if /var is a separatefilesystem. When you beat me over the head hard enough, I can get thepoint: the days of


Files and fundamental filesystem activities (on Unix)

Back in a discussion of filesystem deduplication I said that writing blocks is afundamental filesystem activity while writing files is not. On thesurface this sounds like a strange thing, so today I'm going to defendit.

At one level, it's clear how writing blocks is a fundamental filesystemactivity. Filesystems allocate disk space in blocks and pretty much onlywrite blocks; if you try to write less than a block, the filesystemactually usually does a 'read modify write' cycle. Although this wasonce


An IPSec mystery with dropped packets

I'm going to break one of my normal rules in this entry. To put it oneway, I normally write about answers, not questions, but this time I havea mystery instead of a solution. In part I'm writing this entry formyself, so that I have everything written down in one spot for laterreference.

My home machine has a long-standing GRE over IPSec tunnel to my workmachine; this lets it masquerade as a machine on the local internalnetwork. Since I migrated


Ubuntu does system disk mirroring right

When we started installing Ubuntu 10.04 systems with our standardmirrored system disk setup, we noticed that it asked us a new and (in myopinion) very stupid question: did we want the system to boot if onlyone of the two sides of the mirror were there? Of course we said 'yes',since that's part of why we're mirroring the system disk in the firstplace. Despite its sillyness this question was already an improvementover 8.04, where


Understanding Apache's Allow, Deny, and Order directives

Suppose that you want to add some IP access restrictions to your webserver, and you're using Apache. Apache supports this with its Allow and Deny directives, but how you set them up is not clear. The Apachedocumentation confused me on this recently, so I am going to write downmy own version of it.

The first thing to understand about Allow , Deny , and Order is that the last rule that matches wins (unlike the more common'first match wins'). Order sets the order


More on my Firefox 7 extensions

Rather than try to answer a number of comments on my original entry in more comments, I'm going to promote my repliesto an entry (or more than one), and along with it I have some updateson my extensions due to things I discovered because of the comments.

If you don't like sending referer information to everyone andyour ad filtering proxy does not cover it, the RefControl addon isquite handy.

I actually like sending Referer information. To my mind it's the rightthing


My Firefox 7 extensions

If you use Google services, you may have noticed that they recentlyyanked around the design of pretty much everything. Part of that workbasically forced me to upgrade from a self-compiled Firefox 3.6.2xto a self-compiled Firefox 7, because Google carefully broke myworkaround to their previous search design issue by degrading the HTML returned when you visited in Firefox 3.x from a

-based layout to a table based layout. Since I can't stand thestock Google search