Syntax Highlighting

One of the nice things about moving away from use.perl to your own site is that you can install whatever toys you want.

I’ll eventually get round to posting code on this blog. And when I do it would be nice if it had some nice syntax highlighting. I could, of course, write my own syntax higlighter (probably based on something like PPI:HTML) but that sounds far too much like hard work, so a couple of days ago I decided to poke around to see what prior art was out there.

Initially, it looked like I was in luck. In the Movable Type plugins directory I found a link to SyntaxHighlighter for Movable Type, which is an MT wrapper around SyntaxHighlighter 2.0. The example output looked rather nice.

I downloaded it and installed it. And then I prodded at it for an hour or so. But all to no avail. It didn’t seem to work as advertised (or, indeed, at all). I fixed one obvious bug in the Perl support but it didn’t seem to help. I hope that the problem is just that Perl support hasn’t had as much testing as other languages[1]. There’s no obvious route for support, so I’ve left a message for the author on his blog. Hopefully he’ll get back to me and we can get this ironed out.

But, all in all, it looks like I’m not going to be able to be as lazy I’d like to be.

Unless, dear readers, you know better. Do you know of a syntax highlighting plugin for Movable Type? Have you patched this one to work? Is there an alternative solution that I’m missing completely?

[1] Which is only to be expected as Perl is, as I’m sure you realise, a dead language 🙂

Update: Thought I’d take a look at the Javascript to see if I stood any chance of debugging it. Look at this!

Updated update: People more on the ball than me have pointed out that a) the horrible-looking Javascript has been minified and b) the original code is on bitbucket.

What I’m Doing At YAPC::Europe

YAPC::Europe 2009 I think I’ve now worked out all of the things that I’m doing at YAPC::Europe this year. It’s turned into quite a list.

The big news is that I’m giving an “Introductory Perl” training course over the weekend before the conference. One of the themes of the conference is to get more people involved in the Perl community (see, for example, Edmund’s Send-A-Newbie initiative) so the organisers thought it would be a good idea to run a beginners course just before the conference. The idea is to take people who know little or no Perl and get them to the stage where they’ll be able to get something useful out of the rest of the conference.

Details of the training are on the YAPC web site, where you can also book your place (it’s €220 for a two day course).

So the training is on Saturday and Sunday (the 1st and 2nd of August). The conference starts on Monday. I’m giving two talks at the conference:

It looks like it’s going to be a great conference (as always). I’m really looking forward to it.

Forthcoming London.pm Meetings

Here’s some advance notice of a couple of london.pm meetings.

The next social meeting will be on Thursday June 4th at the Gunmakers. Social meetings are a chance for people to get together over a drink and talk about whatever takes their fancy (sometimes, that even includes Perl). There’s also a tradition that the leader of the group will buy a drink for any people coming along for the first time. So when you get there, look for Léon.

Then on Wednesday 10th, london.pm (along with a few other, less important, language user groups) are organising a Dynamic Languages evening where users of many dynamic languages will give lightning talks about various interesting topics. The meeting is hosted by the British computer Society, and I’m hearing reports that the sign-up process is a bit of an intellectual challenge – but please persevere and come along to the meeting.

YAPC Travel Plans

On the offchance that anyone wants to travel at the same time, here are my travel plans for YAPC::Europe.

  • Flying from Heathrow to Lisbon on BA502 on Friday 31st July. Leaving at 15:05 and arriving at 17:45.
  • Staying in the Hotel Alif (possibly the least useful hotel web site that I’ve ever seen).
  • Flying from Lisbon to Heathrow on BA501 on Thursday 6th August. Leaving at 11:05 and arriving at 13:40.

I’m travelling a little earlier than many people because I hope to be running a training course on the weekend before the conference. I’ll post more details of that here when it’s confirmed (hopefully in the next couple of days).