Mysqlef

Oh dear. A couple of days ago I tried to write the word "myself" and ended up with "mysqlef" instead. Added to the fact that I've found myself ending sentences with semicolons, this does not bode well for my future as a well- balanced member of society...

Fame at last

The Sunday Times yesterday ran a story on Cambridge "night climbing" - the idiotic pursuit of climbing beautiful old university buildings and hanging your pants off the top. I'm a long-term advocate of this sort of silliness, so I was asked to come down to Cambridge a month ago and climb a few things with photographers in tow: the result was an article with a bunch of excellent photos (mostly not of me, thank goodness). I also got a few quotes in, and a plug for my Night Climbers of Cambridge online book - no URL, since apparently the ST is in state of denial about the existence of the Web.

Since there aren't any photos in the online version of that article, here are some for your entertainment - thanks to Jan Stradtmann for letting me use them:

Andy on Caius Jimwade jumps the Old Schools Mikey, Jimwade and Ben on Clare Ed and Will on Clare

These photos are (I think) copyright Jan Stradtmann - contact him if you want to reprint or generally reuse them.

Return of the cocked-up cycloid

A couple of years ago, I taught myself some rudimentary PostScript programming from Bill Casselman's brilliant Mathematical Illustrations book. PostScript is excellent fun, and I thoroughly recommend it to all weirdos with an interest in stack-based graphics programming.

Recently, while fiddling with MetaPost (another perverse but entertaining graphics language), I remembered using Python and PostScript to create a nice Bezier curve approximation to a cycloid. This was before I discovered PyX, which does that sort of thing for you, and it's a very illustrative exercise - but my not-quite-right first attempt actually produced a fascinating and very pretty result:

My cocked-up cycloid

While the code that produced it is long gone, I'm happy to still have the result. Only mathematical illustrations can produce such satisfying errors... and just imagine what someone talented and artistic could do with the right mathematical/programming knowledge.

Tacky reminiscences

It's wonderful how small things can remind you of distinctive times in your past. A couple of weeks ago, while down in London, I was lying on my hotel bed when The Field Mice's "If You Need Someone" started playing on my laptop. It triggered a set of memories all at once and the whole feel of 8 years ago when I first heard that song. I was in my second year at university and among my friends I was the one who'd first gone and spent my 15 on the completely untested Field Mice best-of. We'd missed their heyday, but tweeness was of the zeitgeist as evidenced by Belle and Sebastian, and hell, best-of's have their own mystique in the right situation. My memories of that time are so distinctive - a second, more confident year in college, nights at the Q Club, discovering My Bloody Valentine and Stereolab via the college CD library, sleeping in, "getting" quantum mechanics, reading Snow Crash, playing Goldeneye, doing the radio show... It was a golden time for me, and in the traditionally cliched way, that's something I've only appreciated via the magic of the retrospectroscope.

Anyway, how have the last 8 years gone? Pretty good, I think. One pair of friends have passed through the first phase of London life and are now very sensibly rating happiness and cartoons above power suits, consultancy and paperclip shuffling. Another set have two kids and despite being stuck in Norwich for the time being, seem very happy about it. The unique entity known only as Harris has all the patent law he can eat and an allegedly wonderful girlfriend. I'm much more out of touch with others than I'd like to be --- seeing them will be a high point of the wedding for me.

And me? I think I've landed on my feet at the IPPP - it gets me among theorists without having to do any explicit calculations, which is absolutely ideal. Also, switching my focus within the field has given me a research topic much more attuned to my tastes. At some point I have to reconnect to experimental collider physics: that's my main career concern at the moment, aside from the usual postdoc/late-20s nagging doubts that surely I should have done something wildly significant by now / why is my salary still rubbish? / should I be doing something more socially responsible? / etc. etc. Durham is a lovely place to be, though a bit far from decent rock climbing, short on genuinely good restaurants and completely devoid of any music scene to get involved in... well, I'd still rather be here than in Cambridge. And I'm getting married in a mere 6 weeks: enough said.

This reminiscing is probably, at least in part, triggered by the rapid approach of the 10 year anniversary of leaving school and going to university. More significant was leaving Northern Ireland and discovering people in Cambridge who actually thought the same way as I did... always a troublesome point up till then. The result for me has been that I'm a much more rounded and confident person than I was while at school... and I think more than I would be if I'd spent the last decade in Belfast. Meanwhile, my school has continued in its lamentable tendancy to disappoint me, by perverting the opportunity of a 10 year reunion into a seated formal dinner with little opportunity for catching up with anyone who I actually want to see. I suspect I'll not be going, which is a shame since I've been secretly looking forward to it for about the last 9 years! My hope is that, much as Cambridge life was such an improvement on my life at school, the Churchill College reunion will be a step up from the Campbell one. It shouldn't be hard.

More terrorism laws. Why?

I'd be delusional if I claimed to be an expert on current affairs, but surely I'm not the only one who finds the current British political obsession with "international terrorism" a bit odd. Today's main news is that Gordon Brown is determined to introduce more anti-terrorism laws when he becomes Prime Minister - the usual fun laws like arbitrary detention without trial, use of phone tapping evidence in court etc. etc., with a good dollop of haziness in case anyone tries to hold him to anything specific later. As far as I can remember, the last and only terrorist attack on the UK since 9/11 was the 7/7 London bombings. That's it. A variety of dodgy characters have plotted two-bit schemes that came to nothing, and well done to the security services for stopping them... but that's it. Now, I'm not so keen to play the I-come-from-Belfast terrorism superiority game, but for me one attack doesn't really justify 6 years of anti- terrorism obsession and Muslim-baiting. Especially not when much of said terror has been self-inflicted and our authorities have proven stunningly bad at actually making Islamic communities feel more integrated into British communities - in that respect we're really a long way behind where we were 10 years ago. (I should clarify that I'm so naive as to think that there isn't a genuine problem with Islamic extremism and its attitude to Western society - it'll take more than a few lefty-liberal-intellectual "hug a Mahmoud-ie" (sorry) blandishments to sort that out.)

So why is more surveillance, more draconian internment laws and more money for anti-terror squads actually a popular thing for Brown to say? After all, he's on a charm offensive at the moment - if this wasn't an accepted good strategy to win the hearts and souls of a significant chunk of the British population, he'd be keeping schtum about it. So we must like being scared, of being told perpetual stories about the International Islamic Terrorist Boogeymen, ten feet tall with flaming breath and beards full of anthrax... even when the public evidence is that we're not really as endangered as we're being told. Undoubtedly there's a lot that the we aren't being told, but based on the hard, factual evidence, there's very little reason for all this excitement and hurried re-writing of the pointy end of our criminal law system. That we're not complaining about this indicates a very sad state of affairs for British political life - I'd like to think that I'm not a rock hard cynic, but all this seems to indicate that our leading politicians must genuinely like a confused and scared population. Maybe not such an unpopular view among loony conspiracy theorists, but it worries me that current affairs are making me take it seriously.

Anyway, that's how these things look to me, and I get the feeling it's not a mainstream view at the moment. If someone well-informed and educated in modern history, with a talent for spotting wide political trends happens to read this, then please set me straight :-) Compare the modern threat in Britain of Islamic extremist terrorism to current day Iraq, or Palestine, or Sri Lanka, or even as close to home as Belfast from 1968 until the mid-90s: we are not really so badly off, are we? Certainly, it seems to me, major extensions of police powers should not be made until terrorist action becomes a real everyday threat rather than a smoke and mirrors game played on us by the media and our political masters. We should get informed, and we should ask our MPs what the hell is going on.

Another year, another server...

I finally got pissed off that I couldn't run Java applications or Ruby Gems on my rented virtual server, because of memory limitations - 80 Mb just isn't enough, especially when gem is as boneheaded as it is about reading in the whole gem index at once. So, despite having had such good experience with Bytemark, I decided that I can't afford to upgrade to their next best server package, so I've migrated to Slicehost. Just as I had bought my 256 Mb "slice", Bytemark announced that they would be upgrading my package to 150 Mb and 10 Gb of storage. Well, I'm sad to ditch them, but Slicehost is still offering an extra 100 Mb of memory at a slightly lower cost... no contest. Plus, my server had got into the Linux "too many packages installed just for the hell of it" phase and it's almost easier to move between providers than to attempt to juggle my files and configuration around on the same VM while I reinstall it.

Anyway, my first impressions of Slicehost are very good: they know enough Web development kung fu to have provided very nifty, slightly AJAXy Web console apps and a nice slice monitor/DNS manager etc. And my slice was ready to use within 2 minutes of handing over my credit card details - that speaks volumes to me about knowing what you're doing. I've now upgraded the site to Radiant 0.6 and have a few random articles in the pipeline - it's nice to get out of the doldrums of worrying about which blog/CMS/whatever engine to use and to just get on with incoherently venting my spleen again :-)

Two or more data types in declaration...

While hacking together a generator cut combining system for Rivet I just got an enormously unhelpful error from g++, namely

from Projection.cc:3:
  ../../include/Rivet/Cut.hh:76: error: `map<string, Rivet::Cuts::BinaryCut>' specified as declarator-id
  ../../include/Rivet/Cut.hh:76: error: two or more data types in declaration of `map<string, Rivet::Cuts::BinaryCut>'

Fortunately I've seen this one before, though I couldn't remember at first. It turns out that that's C++ compiler error language for "you forgot the stupid semi-colon on the end of your inner class declaration". Another reason to relegate C++ to the garbage bin of history! Incidentally, I just discovered that Bjarn Stroustroup used to be at my college in Cambridge... hopefully I'll run into him at a dinner sometime and can bother him about his horrid creation.

And why blog about such a tiny and tedious topic? Well, the Google coverage of this issue could certainly do with being improved...

PyFeyn 0.3 first beta release

I just pushed a beta release of PyFeyn up to PyPI, the Python package index, for the first time. While pretty simple, I'm happy about the whole process - releasing bundled code to the whole community should be this easy! Here it is:

http://www.python.org/pypi/pyfeyn/0.3.0b1 There are several things to do before releasing a non-beta 0.3 version, such as providing some constants for colours and thicknesses so that PyX really isn't needed unless you want to be clever. After that release, there's still room for tidying up some aspects of the interface and the ways the packages interact. On a more flippant note, I like the idea of lines being able to have "haloes" - this would involve drawing a thicker version of every object in white (or another halo colour) before drawing the main diagram, so you could have a neat white border around the diagram elements when putting the diagram on a dark background. Like most fun ideas, it's probably completely useless :-) And I suppose we'd better work on some documentation, too...

The Linux/NFS 16 group limit

I just spent a couple of hours wondering why I suddenly couldn't use files belonging to a particular group on my Linux system in work. For example, a directory is group-owned by a group called rivetgun, it's group-writeable and calling groups tells me that I'm a member of that group. But I can't write to it... what's up? The permissions of the group look identical to those of other groups that are behaving as normal. Eventually, I try logging in as another member of the same group... it works fine! Okay, so it's my problem, not the group.

buckley@h6:~$ groups
users rivet hepforge hepdata professor cedar lhapdf jimmy ktjet hztool jetweb hepml
hzsteer heptex feynml pyfeyn rivetgun hepjet statpattrec rr
buckley@h6:~$ touch hepjet/foo
touch: cannot touch 'hepjet/foo': Permission denied
buckley@h6:~$ touch pyfeyn/foo
buckley@h6:~$

Let's count from the left: 1 is users, 2 is rivet, 3 is hepforge, ... 16 is pyfeyn, 17 is rivetgun. Aha, suspicious. Google delivers a handy link to this blog entry:

Synopsis: UNIX users can belong to UNIX groups and for many years the maximum
number of groups in Solaris has been limited to 16. Increasing it sounds easy
and of obvious benefit. It turns out to be neither...

The same logic applies to Linux - the 2.6 kernel can handle up to 64k groups per user, but still truncates them at 16 when making use of the AUTH_SYS authentication mechanism. Bah!

Okay, so the weird error is understood and fortunately I can remove myself from some of the groups in the first 16, so the immediate problem can be worked around for now. But this is a real problem - looks like more of my non-existent admin time will have to be devoted to finding a sensible ACL system next time I upgrade the server. sigh

Update: I've also found this blog entry which if anything is even more useful. It's quite definite and up-front with the opinion that NFS users should be using ACLs and ditching AUTH_SYS for RPCSEC_GSS... so when am I going to find the time and resources to convert HepForge to such a system? Hum. At least this issue came up before I re-wrote all the management scripts!

LaCie Ethernet Big Disk 1Tb + Linux

For ages I've wanted to have a network attached storage (NAS) system in the house, so my music collection, photos, reference documents and so-on can be accessed from one place. Last week I took the plunge and bought myself a new LaCie Ethernet Big Disk 1Tb - a whopping terabyte of NAS goodness. In the last five minutes, though, I just turned it off and packed it back in the box to be flogged on eBay. Here's a brief description of the one week voyage from happiness to disillusionment.

First, when it arrived I had much the same warm fuzzy feeling as when my Mac Powerbook arrived a few years back: it's solid, silver, beautifully presented: full marks to LaCie on quality of design and construction. The user manual is a little thin, though, and despite saying "fully Linux compatible" on the side there's no mention of Linux in it. Hmm, warning bells.

I have a busy few days, but finally get round to getting the disk up and running - it requires a bit of guesswork and worrying use of root privileges to get the Linux version of the config tool working, and all in all it just seems to scan the subnet and tell me which IP it's gone to. Open Web browser, type in IP and it's there. After a few minutes of fighting the incredibly sluggish config pages, I have a share set up and running, but the bad news is that I don't have any real Unixy networking protocols available - just SMB, FTP/HTTP and a bunch of Mac stuff that I couldn't care about. Okay, let's start copying some files: 80 Gb of FLAC rips to start with. A couple of hours later I come back hoping it's done - nope, I've got a warning message at track 14 about invalid characters in the filename. The bloody thing is running an embedded Windows OS and the filename restrictions apply. Fully Linux compatible my arse - I have to talk to it over a Windows networking protocol and only Windows filenames are allowed.

The final straw is the media server - Rhythmbox on my laptop sees the NAS/media server but FLAC and Ogg files don't count as media. Bah. A few days of kicking my feet in frustration and I'm decided: the EBD, beautiful though it is, is to be sold and replaced with some IDE disks, maybe RAID5'd, of equal capacity. Sadly there seems to be no-one on the Web who's managed to get a *nix OS installed on an EBD so it can be made to behave in the way that people like me want it to... oh well. I'll run my desktop PC as a file server for the time being and if it works well, maybe a dedicated low power machine will be a sensible option in future.

Hopefully this might be a useful cautionary tale for others who'd like a big NAS disk and want to access it in the *nix way - the LaCie EBD is very pretty, but might not play nicely enough with your OS of choice to make you happy...