Patrick Moore Plays the Xylophone

Two things surprised me in this BBC article about Sir Patrick Moore’s recent brush with Duck-induced death. The first is that Moore has never before missed a show of The Sky at Night which has been running since 1957. Note that BBC News is now celebrating 50 years on television so it seems that The Sky at Night is almost as old as television itself in the UK. That’s somewhat longer than Gamesmaster lasted, and he hasn’t missed one until now.

The second thing that surprised me was this:

He is a self-taught musician, famed for playing the xylophone and composing.

(Emphasis mine)

So this isn’t entirely inaccurate.

Cryptic Arcana

With great power comes great unreadability, at least in the case of Apache’s mod_rewrite. I recently remarked on my reorganisation of SoylentRed’s archives but the same old archives are still there. What gives? I made some significant changes on my local test server to replace the old style URLs like http://www.soylentred.net/archives/?month=jul-2004 with the more useful http://www.soylentred.net/archives/2004/07/ (remember: at the time of writing that URL won’t work). In fact the new system has five types of archive page. There’s the complete archive, http://www.soylentred.net/archives/, which displays the titles for every post ever; the yearly archive, http://www.soylentred.net/archives/2004/, which displays the titles for every post in the given year; the monthly archive, http://www.soylentred.net/archives/2004/07/, which displays complete entries for the whole month; the daily archives, http://www.soylentred.net/archives/2004/07/06/, which displays all entries for that day; and the individual archives, http://www.soylentred.net/archives/entries/187, which is the new style for permalinks.

Uh, yeah, permalinks. Won’t they be messed up? That’s the beauty. It’s also the reason I’ve called this post ‘cryptic arcana’. I’m talking about mod_rewrite, the Apache module that rewrites requests on the fly according to a series of regular expressions. You see there are no directories on the server called /2004/ or /entries/. That wouldn’t scale. Instead I have a set of rules:

# Rewrite archive URLs:
RewriteRule ^archive/([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/?$ archive/?year=$1&month=$2&day=$3
RewriteRule ^archive/([0-9]{4})/([0-9]{1,2})/?$ archive/?year=$1&month=$2
RewriteRule ^archive/([0-9]{4})/?$ archive/?year=$1
RewriteRule ^archive/entries/([0-9]+)/?$ archive/entry.php?id=$1

For example the first rule looks for any request of the form archive/ followed by four digits, a slash, one or two digits, a slash, one or two digits and possibly an optional trailing slash. It then rewrites it in the form archive/?year=, then the four-digit block, then &month= then the first one- or two-digit block, then &day=, then the second one- or two-digit block. The advantage of this second form of the URL—which incidentally would work if you typed it directly rather than using the pretty form—is that it directs every archive request to a single script so there’s no need for seperate directories for every year, month and day since the site launched.

Okay, now to get back to the permalink issue. The old archive links point to archive/?month=MMM–YYYY, where MMM is the three-letter abbreviation of the month name and YYYY is the four-digit year. You may notice that this is exactly the same script as the new URLs ultimately point to. Then its a simple matter of PHP mojo sorting the ‘month=MMM–YYYY’-style requests from the ‘year=YYYY&month=MM&day=DD’-style requests. The old permalinks point to archive/?id=N where N is the numerical ID of the entry. Again this is the same script that deals with all the other requests. In this case it simply looks for the ‘id=’ query string and, if it’s found, redirects to the new URL archive/entries/N. This URL, when the browser asks for it, will then be subject to the same mod_rewrite rules above. In this case the fourth rule takes effect and passes the ID to a script called entry.php.

And the reason none of this is actually deployed yet? Well that’s because I left out a line that’s necessary on the Linux server that SoylentRed runs on but isn’t necessary on my own Windows machine. The line is Options +FollowSymlinks and I have no clue what it has to do with mod_rewrite. Now that I know it’s probably just a matter of uploading. But if there’s anything I’ve learned from the last year and a half of SoylentRed it’s never to upload anything until I’m prepared to fix whatever goes wrong this time.

MakeLink

I’ve modified my installation of Dean Allen’s Refer to keep out anyone who isn’t, well, either me or very good at imitating me. So you’ll just have to take my word for it when I say that since MakeLink was listed on update.mozilla.org I’ve been getting new hits every ten minutes. This has been fairly constant since around 11 o’clock yesterday.

Since it’s now pretty obvious that MakeLink is the main gateway for new visitors to the site I’ve gone all out—by my standards—and spend a minute sprucing up the project page for it. It’s a very small extension, and a little bit specialised, but—even though I wrote it with no intention of using it—I find myself using it all the time. Given the new extension system for Firefox—specifically the capacity to uninstall extensions rather than just disabling them so you can install them with no risk—you might want to give MakeLink a go.

Toasty

From bash.org:

Rabidplaybunny87: Okay, so my neighbors officially hate me
GarbageStan23: why?
Rabidplaybunny87: Well, me, david and andrew were having a bonfire in the backyard, and we were making s’mores and all… and suddenly we here sirens, and see a firetruck turn into the street in front of us.
Rabidplaybunny87: So we all went running to see what was up, and our neigbor’s house was on fire!
GarbageStan23: oh shit!
Rabidplaybunny87: Yeah, and when we got there, the wife was crying into her husbands arms, and we were just kinda standing there, and then she saw us, and then like for 10 seconds, gave us the dirtiest look ever
Rabidplaybunny87: Turns out, we were still holding our sticks with marshmallows on it, watching the fire….
Rabidplaybunny87: talk about bad timing…

Addictions

Add these to my list of addictions: Counter-Strike, Day of Defeat.

Add this to my list of compulsions: checking refer to see who’s linking to me.

Edit: I’ve now locked everyone out of refer, it was causing some oddness.

Observation

A quick observation: it’s annoying when you finish what you were doing—in my case rewriting the archive part of Scatterbrain— and go to leave, only to have WinAmp decide that now would be a good time to put on a good track. Close Firefox, close Thunderbird, song starts to play. What do you do? Turn it off? Sit and listen and do nothing else? No, you blog about the observation until the track ends.

Movie Meme

From Pharyngula, the hundred highest grossing movies. Those in bold I saw in the cinema, those in italics I have since seen. I’ve greyed the ones I haven’t seen and put borders on the ones I have on DVD. You should be able to see the release year and box-office take of each movie by hovering your cursor over it.

It strikes me that Harrison Ford is a very successful man.

Also note that Shrek 2 isn’t out in Europe yet.

  1. Titanic
  2. Star Wars
  3. E.T. the Extra-Terrestrial
  4. Star Wars: Episode I – The Phantom Menace
  5. Spider-Man
  6. The Lord of the Rings: The Return of the King
  7. The Passion of the Christ
  8. Jurassic Park
  9. Shrek 2
  10. The Lord of the Rings: The Two Towers
  11. Finding Nemo
  12. Forrest Gump
  13. The Lion King
  14. Harry Potter and the Sorcerer’s Stone
  15. The Lord of the Rings: The Fellowship of the Ring
  16. Star Wars: Episode II – Attack of the Clones
  17. Star Wars: Episode VI – Return of the Jedi
  18. Independence Day
  19. Pirates of the Caribbean
  20. The Sixth Sense
  21. Star Wars: Episode V – The Empire Strikes Back
  22. Home Alone
  23. The Matrix Reloaded
  24. Shrek
  25. Harry Potter and the Chamber of Secrets
  26. How the Grinch Stole Christmas
  27. Jaws
  28. Monsters, Inc.
  29. Batman
  30. Men in Black
  31. Toy Story 2
  32. Bruce Almighty
  33. Raiders of the Lost Ark
  34. Twister
  35. My Big Fat Greek Wedding
  36. Ghost Busters
  37. Beverly Hills Cop
  38. Cast Away
  39. The Lost World: Jurassic Park
  40. Signs
  41. Rush Hour 2
  42. Mrs. Doubtfire
  43. Ghost
  44. Aladdin
  45. Saving Private Ryan
  46. Mission: Impossible II
  47. X2
  48. Austin Powers in Goldmember
  49. Back to the Future
  50. Austin Powers: The Spy Who Shagged Me
  51. Terminator 2: Judgment Day
  52. The Exorcist
  53. The Mummy Returns
  54. Armageddon
  55. Gone with the Wind
  56. Pearl Harbor
  57. Indiana Jones and the Last Crusade
  58. Toy Story
  59. Men in Black II
  60. Gladiator
  61. Snow White and the Seven Dwarfs
  62. Dances with Wolves
  63. Batman Forever
  64. The Fugitive
  65. Ocean’s Eleven
  66. What Women Want
  67. The Perfect Storm
  68. Liar Liar
  69. Grease
  70. Jurassic Park III
  71. Mission: Impossible
  72. Planet of the Apes
  73. Indiana Jones and the Temple of Doom
  74. Pretty Woman
  75. Tootsie
  76. Top Gun
  77. There’s Something About Mary
  78. Ice Age
  79. Crocodile Dundee
  80. Home Alone 2: Lost in New York
  81. Elf
  82. Air Force One
  83. Rain Man
  84. Apollo 13
  85. The Matrix
  86. Beauty and the Beast
  87. Tarzan
  88. A Beautiful Mind
  89. Chicago
  90. Three Men and a Baby
  91. Meet the Parents
  92. Robin Hood: Prince of Thieves
  93. Hannibal
  94. Catch Me If You Can
  95. Big Daddy
  96. The Sound of Music
  97. Batman Returns
  98. A Bug’s Life
  99. Harry Potter and the Prisoner of Azkaban
  100. The Waterboy

Death: Mostly Harmless

From BBC NEWS | Entertainment:

The late Douglas Adams, creator of the Hitchhiker’s Guide to the Galaxy, will be heard in the first new radio adaptation of his work in 25 years.

He recorded the voice for Agrajag before he died (obviously) so they’re using that recording when they make radio versions of the last three books of the trilogy. They’ve got all of the old cast, except Peter Jones—who played the book—because he is what can only be described as ‘also dead’. I don’t see why this should stop him in the circumstances but apparently it has.

You can get a preview (a 4minute 20second montage) from what may or may not be termed the official site. It doesn’t feature any of Adams’ dialogue, probably because there’s some digital mojo involved in cutting him in that they haven’t done yet. We have to wait until Tuesday 21 September to hear the rest.

I suspect the cat thinks Douglas is just singing to him. Perhaps he is singing to the cat and we just think he’s voicing a character in the new radio series.

Douglas Adams is currently staring in No Sex Please, We’re Amoeboid Zingat-Ularians at the Brantisvogan Starhouse.

Gmail

Amail through Fmail were not successful. Where they failed Gmail will succeed. I described it as the best April Fools joke this year.

The genius of this prank is that it is real. All 1GB each of it is real. And so many people were convinced it wasn’t. Bravo to Google. I think I’ll have me one of those spamtraps.

Well now I have one, thanks to Asa Dotzler, Mozilla developer and very close friend of mine. Okay that might not be true; but I am a little proud that the invitation wasn’t based solely on giving one to whoever asked.

Now I’m off to store all of my emails in about the most secure and reliable off-site backup the world has ever seen. I will be using Cheah Chu Yeow‘s gExodus.