Archive for March, 2010

Why is MySQL so slow?

Tuesday, March 16th, 2010

Ever try truncating large datasets on a Windows development box? Ugh.

This kind of explains where MySQL is stuck:

mysql> show processlist

Kind of.

Getting Flymake to work with Emacs nXhtml

Saturday, March 13th, 2010

If you develop in PHP on Emacs, then you’ve probably got a hook setup to run flymake-mode on PHP files. And if so, then you’ve also probably noticed that this doesn’t work with nXhtml, which will often return an error like “mumamo can’t find the file” (or some such), causing flymake-mode to disable itself.

The culprit is likely to be a bind like this:

(add-hook 'php-mode-hook (lambda () (flymake-mode t)))

which says, “turn on flymake-mode when php-mode is started”. (Sacha Chua has a post that recommends using this from couple of years back.) The problem, as far as I can tell, is that nXhtml tries to process the fleetingly available _flymake file rather than the original PHP script whenever it toggles into php-mode.

A better hook to use is the find-file-hook, like this:

(add-hook 'find-file-hook 'flymake-mode)

With this, Flymake will properly validate PHP chunks in nXhtml mode, as well as any other files that Flymake is smart enough to process.

Mike Prysner on the War in Iraq

Saturday, March 13th, 2010

I hadn’t seen this before. From his amazing speech:

Our real enemies are not those living in a distant land whose names or policies we don’t understand; The real enemy is a system that wages war when it’s profitable, the CEOs who lay us off our jobs when it’s profitable, the Insurance Companies who deny us Health care when it’s profitable, the Banks who take away our homes when it’s profitable. Our enemies are not several hundred thousands away. They are right here in front of us.

See the video here.

More testimonies on the Iraq Veterans Against the War site.

The Unctuous Smarm of ABC News

Monday, March 8th, 2010