<< November 2007 January 2008 >>

Tuesday 25 December, 2007
#Happy Crimbo Chums

As you were. Be about your business.

Russ L said Did the little 'uns have a nice time? [added 27th Dec 2007]
They did Russ, thanks. We all did. You too, I trust? [added 1st Jan 2008]
Russ L said Reasonable enough, ta. I had that cold, but I do like Christmas.

Only eleven-and-a-half months to the next one. [added 7th Jan 2008]

[Add a comment]
Friday 21 December, 2007
#[Arabica]XSLT: Implementing position matches

Earlier this week, I outlined the equivalent XPath expressions for XSLT matches which use positions. I've bene avoiding implementing this for a while for a couple of reasons. Firstly, I thought it would take more time than I generally have in one Arabica sitting, i.e. more than an hour. Secondly, I wasn't quite sure how I'd actually go about it. I knew the equivalent expression were correct, I just didn't know how I was going to arrive at them in the code.

Happily, writing it out and then reading it back again later triggered the little flash I needed, and it turns out to be really quite easy. I've spent a bit of time on it this morning, having wrapped up the paying work for Christmas, and I've got the first pass working.

Within Arabica, each match pattern is represented as one or more steps, where each step in the pattern is represented as a TestStepExpression. A TestStepExpression contains some kind of node test (obviously) and one or more predicates. The predicate is the bit in square brackets. A match pattern like this

would be compiled into a TestStepExpression contain a NameNodeTest checking for 'a', and a single predicate '3'.

To find expressions that need rewriting is simply

foreach step in the steplist
  foreach predicate in the step predicatelist
    if predicate is type NUMBER
      predicate = rewrite(predicate)
The code is here, if you're interested.

This kind of transformation could be done earlier on, on the AST produced by Arabica's XPath parser. It's easier, however, to operate on the compiled version. For instance, in the case above the numeric predicate could be a number literal, the result of a function, or the result of an arbitrarily complex calculation. Detecting all those cases is actually quite tricky at the AST level. Once the compiled objects are generated, we can just check the predicates return type.

Finding predicates containing calls to the last() or position() functions is going be slightly more work, and probably slightly fiddlier. I'm off to have a crack at that now.

[An hour or so later] ... and I think that's it. Each predicate is an expression, and an expression may contain other expressions and so on. An expression might model a comparision operator, for instance, which would contain expression each for the left and right hand operands. I put together a little walker to zoom through this expression tree looking for instances of the last or position functions. If it finds one, then I just generate the rewrite expression in exactly the same way as before.

[Add a comment]
Wednesday 19 December, 2007
#[linkfarm] Turn Them Christmas Ornemants to a 360 Fisheye Lens - This is a fun and fast project, at the end of which, you'll be able to take 360 images with your digital camera.
[Add a comment]
#[linkfarm] Chrononauts - The Card Game of Time Travel
[Add a comment]
Monday 17 December, 2007
#[linkfarm] Dave Gibbons visits the set
Dave Watches The Watchmen

[Add a comment]
#[Arabica]XSLT: Position matches

Almost exactly two years ago (glurk!), I wrote a little item about XSLT match patterns and gave a clue to how I implement them. A pattern like

is equivalent to an XPath expression like
That's how Arabica actually implements it, rewriting the match pattern as an XPath expression during compilation.

This works in every case, except those involving positional matches,

for instance. In the simple case above, the rewriting is actually quite simple. You can push each step, here chapter then para, onto a LIFO stack and then pull them off again adding the extra bit of wrapping as you go. For positional matches, the rewriting is a little more involved. A match like
needs to be rewritten as something along the lines of
self::para[. = parent::*/para[last()]]/parent::chapter
although you could probably simplify it to
self::para[. = parent::chapter/para[last()]]

Arabica::XSLT doesn't do this rewriting at the moment, which is, I feel, the largest single hole in it. I'm aiming to have a go at in the next few days. If I can crack it relatively quickly, maybe by this time next year I'll be looking for a new project :)

Positional matches must by the way, at least as far as I can see, be evaluated in this way (even if the underlying implementation is different). This is why matches like this can be quite expensive in terms of runtime, and are generally discouraged.

[Add a comment]
Sunday 16 December, 2007
#2008 Starts Here

When we moved to Moseley, now chum Ken risked a severe thrill power overload by taking on my 2000AD pile. I realised that, since I continued to buy 2000AD, I would, eventually, finished up with another enormous pile I'd need to get find a new home for. The obvious solution was to head this off at the pass by handing the accumulated comics over to Ken at regular intervals. Conveniently, Tharg now wraps up all the ongoing stories in mid-December, in preparation for kicking it all off again with a Radio-Times-style-Christmas'n'New-Year bumper issue. As a result around this time of year, I bundle up the year's comics and hand them over to Ken.

That wrapping up, passing over, and big fat issue has come to mark the end of the year and start of the whole "festive" period for me. It might be slightly foolish that a magazine's publishing schedule plays such an apparently significant role, but hey! these are secular times we live in, no matter what those god-botherers tell you. These blooming Christians are always trying to spoil Christmas for the rest of us. Anyway, there it is and it has many of the attributes we associate with Chrimbo. It prompts me to reflect on the year gone by and look forward to the year ahead. It gives Ken and I a reason to get together and enjoy each other's company. Ken has the pleasure of fun-filled prezzie, while I get the warm glowy feeling of a good prezzie given. Tradition perpetuated via the vehicle of the Britain's, nay, the Galaxy's greatest comic. Hurrah!

Merry Christmas chums, and Splundig vur Thrigg.

[Add a comment]
Friday 14 December, 2007
#[linkfarm] Blackberry rollout stalled over work/life balance debate - However, access to the new devices was delayed after concerns were expressed about the BlackBerries infringing on the work/life balance of staff.
[Add a comment]
#[linkfarm] Global group aims to return Martian soil to Earth - An international effort to launch a robotic mission to fetch and return a Martian sample back to Earth within the next decade is gaining steam
[Add a comment]
#[linkfarm] Plushie - An Interactive Design System for Plush Toys
Japanese, of course.

   * mily said MERY CHRISTMAS SANTANAH [added 1st Jan 2008]

[Add a comment]
#[linkfarm] /openvrml/src/libopenvrml/openvrml/vrml97_grammar.h - Joel de Guzman: "IMO, this is one of the best written spirit parsers I've seen."
[Add a comment]
Thursday 13 December, 2007
#Post-GDFAF: Apocalyptica at The Academy

Clearly I'm in recovery now as, while delayed again by Daniel's swimming, I arrived while the support band was still on. I don't know who they were, they didn't say, and I didn't bother to find out as they were entirely unremarkable, playing straightforward goth-rock of the type favoured by The Sisters of Mercy. Based on the singer's accent, I think they were German. That, and they couldn't help slipping in a couple of Scorpions' riffs.

I'm clearly going through a bit of a gimmick phase at the moment. Apocalyptica, as you might guess from the name, are a heavy rock band. A heavy rock band consisting of, you might not guess, four cellos and drums. Like The Ukulele Orchestra and Modified Toy Orchestra, they are simultaneously deadly serious musicians and fully aware of and able to exploit the inherent silliness of their proposition. They can really rock, loud and heavy, as on their own Harmageddon or when they cover Sepultura's Refuse/Resist. They're also terrific fun, blasting out a ridiculously fast version of In the Hall of the Mountain King, or conducting Enter Sandman as a big audience singalong.

As someone who long ago acknowledged that I dance like a Dad at a wedding (because ... you can fill in the rest), I had a terrific time. Everyone seemed to be having a great time, even the overenthusiastic lad who charged the stage while the roadies were setting up and so got himself chucked out before the band even came on. The band, particularly, really had a good time. They seemed thrilled by the turn out - while the place was by no means packed, the gig had originally been booked in the somewhat smaller Academy 2 - twice as many here as when they played their home town of Helsinki. In fairness to Helsinki, I feel I should note that it's only half the size of Birmingham. (Damn, I just can't help myself sometimes.) Touchingly, I thought, they all shook hands with each other at the end of the gig, before applauding the crowd. Finally, perhaps to remind us of their classical training, they stood in line and bowed. Rock!

And that's Post-GDFAF. I managed three outings during GDFAF fortnight, and then four in the shadow. That's the kind of result you wanted, isn't it Pete? Russ?

Russ L said If you're happy, I'm happy. [added 14th Dec 2007]
Pete [w] said Russ happy, you happy, me happy, ALL HAPPY! [added 19th Dec 2007]
EVERYBODY BOOZE UP AND RIOT! [added 19th Dec 2007]

[Add a comment]
#[linkfarm] C# 2.0 WebBrowser control - bug in DocumentText?
Definitely. Several workarounds in the comments, which saved me a deal of frustration. But really, shouldn't have shipped like that in the first place should it?

[Add a comment]
#[linkfarm] Lost in the Static - Lost in the Static is visually striking game, quite unlike anything you've seen before.
Screws with your eyes a bit but it is, indeed, very clever and well worth having a look.

[Add a comment]
#[linkfarm] Digital visionary: Nicholas Negroponte
Possessor of one of the planet's larger brains.

[Add a comment]
#[linkfarm] A child's view of the $100 laptop - What will a child in the UK make of a laptop designed to help children in the developing world? Rory Cellan-Jones brought an XO home to find out.
[Add a comment]
Wednesday 12 December, 2007
#[linkfarm] Nerd Sniping - If you show it an interesting problem, it involuntarily drops everything else to work on it.

   * Anna said Ha ha very good [added 13th Dec 2007]

[Add a comment]
Tuesday 11 December, 2007
#[linkfarm] Great beasts peppered from space - Eight [mammoth] tusks dating to some 35,000 years ago all show signs of having being peppered with meteorite fragments.
[Add a comment]
#[linkfarm] Daring Register raid snatches key government URL - If they wish to do so, or to "view the evidence gathered by UKTI", they are told they should visit www.ictmarketingstrategy.co.uk. You'll note that this release, dated 16th November, tells us the consultation URL will be "functional as of 19 November 2007".
And nearly a month later, The Register nabs it for themselves. Gah!

[Add a comment]
#[linkfarm] Would Pullman write for Dr Who? - ... writing a story for The Doctor "sounds like enormous fun" ...
[Add a comment]
#[linkfarm] Mars robot unearths microbe clue - Scientists believe a patch of ground disturbed by the vehicle shows evidence of a past environment that would have been perfect for microbial life.
[Add a comment]
#[linkfarm] NASA Mars droid in ET life discovery shock - Sadly, however, Squyres is talking about microbes which live in hot springs or geysers, rather than - for instance - beautiful alien sexpots desperate for some Earth lovin'.
[Add a comment]
Monday 10 December, 2007
#[linkfarm] Stickleback - Chinese Hopping Vampires
Look at the large version - it's fantastic

[Add a comment]
#[linkfarm] Andrew Rilstone briefly visits Birmingham - It seems that the ancient midlands tradition of Winterval, celebrated every year since 1998 (with the exception of 1999, 2000, 2001, 2002, 2003, 2004, 2005 and 2006) has fallen into disuse. It's political correctness gone mad, I tell you.
[Add a comment]
#[linkfarm] Scripting in Python, Ruby, Perl? No, in C++! - Something that is cool and useful, objectively speaking. That something is a shell - interactive or not - using C++. It does have a name, as well: cpsh.
[Add a comment]
#[linkfarm] Should ticket touting be illegal? - Ticket touting is a growing concern for many concert-goers - but should the government outlaw it or is it up to the music industry to stamp out touts?
This seems to be something of a hot topic, at least amongst in the music industry, at the moment. For instance, I heard a chap from a music industry group suggesting that companies that resell tickets should pay a levy to the artists whose tickets they were selling. Resellers were, he reasoned, profiting of the intellectual property of others. This chap here, Professor Alan Krueger of Princeton University, suggests the answer to ticket touting is to charge more for tickets in the first place. Countering that, I suppose, is the example of Barbra Streisand. She set the bar nice and high, but her £500 tickets were apparently available for around £100 if you looked around.

Curiously, in none of the discussion I've read of heard has anyone suggested the obvious solution. If you are an artist who is upset that touts and resellers are "stealing" your money, clearly the solution is not taxation or requiring 9 forms of identification or canceling resold tickets or throwing a strop, it's to
  a) play more gigs
  b) book larger venues
  c) both
and bonus if you really want to knock reselling on the head, although you'll still get a couple of blokes outside buying and selling
  d) aim to not quite sell-out

Radical, no?

[Add a comment]
Friday 07 December, 2007
#[linkfarm] Are You Not Devo? You Are Mutato - How Mark Mothersbaugh, an Agent of De-Evolution, wormed his way into America’s subconscious
[Add a comment]
#[linkfarm] Online Ukulele Tuner
[Add a comment]
Thursday 06 December, 2007
#Post-GDFAF: The Ukulele Orchestra of Great Britain at The Town Hall

They're not a light entertainment act that does a bit of punk,
they're a punk band that does a bit of light entertainment.

While I'd been aware of the Ukulele Orchestra of Great Britain for some time, I might not have gone to see them had they not popped up recently on top kiddies' TV program, The Slammer. Two things sold me on them. First, the chap at the end, Dave, rocking out despite playing an instrument only slightly larger than the toy guitars sellotaped to the front of children's magazines. Second, they've got those kids completely hooked. Me too.

Lots of other people as well, it seems, because The Town Hall was fair heaving when the Bean and I took our seats. The Orchestra's stock-in-trade is, of course, familiar songs rearranged for eight ukuleles and voice. Sometimes they're deliberately comedic, as in their version of the theme from Shaft which is introduced in a round about way as an old American folk song collected in the Appalachian Mountains. Sometimes the comedy arises merely from the audacity of arrangement, Slade's Merry Christmas Everybody played as a slow waltz, or a gentle sing-a-long Anarchy in the UK. They somehow manage make that song even more English - everyone wants to smash the state, but let's not make too much of a fuss. Musical comedy demands perhaps a higher level of musicianship and commitment to the performance, which may explain why their Teenage Dirtbag pricked tears to my eyes. It's as transformative a cover as Johnny Cash's Hurt, and I found it quite remarkable.

On a little logistical note, the performance was in two halves with an interval. The Town Hall coped with the everybody rushing out for a drink without too much difficulty. Certainly I was able to get what I wanted without having to queue, and top marks also for allowing drinks back into the auditorium. Both the Bean and I were delighted that the little tubs of ice cream were again on sale during the interval. Other venues really should take note of that.

It's a modern world, so you can hear and watch the Orchestra on the miracle of the internet.

lotus flolwer [e] said I thought this was a freecyle site. my mistake. [added 9th Dec 2007]
Well, you were wrong. Move along, please. [added 10th Dec 2007]

[Add a comment]
#[linkfarm] Meteorite dates lunar volcanoes - Precision dating of a lunar rock that fell to Earth shows our satellite must have had lava erupting across its vast plains 4.35 billion years ago.
[Add a comment]

The JezUK Christmas tour wrapped up today when I got back to the attic at lunchtime. I presented a revised version of the talk I'd given at the ACCU Conference. I'd been a little unhappy with the original talk afterwards. While I thought the opening section was good, I'd been overly laboured in the middle stretch and built my point too slowly, before rapidly accelerating away like a mad thing towards the finish. The points I was making were sound, but I didn't put them over very well. This time round I expanded the opening section very slightly, but almost completely rewrote the second half using some much stronger examples (one of which is due to m'collegue Thomas Guest), and it worked much better. I enjoyed myself, and the chaps (and they were all chaps, alas) who came along appeared to enjoy it too.

If you're of a programming persuasion, you should give strong consideration to doing a presentation at something like this. You've definitely got something to say, even if you don't think you have. All you have to do is say it. Describe what you do. Tell people something that you know. You'll benefit from the telling, and your audience will benefit from the listening. Go and look at my slides - I haven't discovered some amazing new piece of computer science, all I'm doing is putting an everyday for-loop into (what is for most people) a slightly different context. Just because what you're doing doesn't seem remarkable to you doesn't mean it isn't of interest to others. It is. Even if you tell people something they already know, that's still to the good. Books like Design Patterns and Refactoring, for instance, sell by the wheelbarrowful precisely because they tell people things they already know.

There are currently four ACCU groups in the UK, but there are also Python groups, Perl mongers, LUGS, universities, general programming-type get-togethers and so on and so on in various cities, your own place of employment or client might want to have you. It's not hard to find an audience. All you have to do is do it.

Thomas Guest [w] said Just to prove I read all the way through, when I tried to iterate past slide 40 it raised a 404 exception.

curl -I http://www.jezuk.co.uk/files/iteration/slide-0.html

HTTP/1.1 404 Not Found

Great presentation! [added 7th Dec 2007]

Curses! But thanks! [added 7th Dec 2007]

[Add a comment]
#[linkfarm] Bob Mould Returns With 'District Line' - Written and recorded in D.C., Mould is again joined by Brendan Canty of Fugazi fame for percussive duties. The LP isn't due until February, but you can snag an MP3 of the lead single, 'The Silence Between Us,'

[Add a comment]
Wednesday 05 December, 2007
#[code] Iterators: It's Just One Damn Thing After Another presentation to ACCU Cambridge.
[Add a comment]
Tuesday 04 December, 2007
#Fantasy GDFAF

Well since you ask, Russ ...

A couple of weeks before the GDFAFortnight, I wrote down fourteen fantasy gigs, just for funning, together with my guess about how likely such an occurrence might be. They were

That was what I fancied on the 23 September. What a lot of nils. If you asked me to do the same now, I'd come up with a different list.

Russ L said No Disaster Area? Shurely Shome Mishtake... [added 5th Dec 2007]

Granted. The masters of plutonium rock would have been a good closer.

[added 5th Dec 2007]

[Add a comment]
#[linkfarm] Rainbows End - Vernor Vinge's 2006 novel now free online.
[Add a comment]
#[linkfarm] No Borders for Pete Seeger's Power of Song - For Pete Seeger, all music is world music. You could even say that throughout his nearly 70 years as a performer, his approach has been "think globally, sing locally." That's really just a corollary of his longstanding "think globally, act locally" philosophy, of course, and to him a sing-along -- and he's led many thousands of sing-alongs -- is just one form of social action. If nothing else comes through in director Jim Brown's 'Pete Seeger: Power of Song,' a marvelous new documentary on the remarkable life of the American folk-music giant, it is that notion, as loud and clear as his voice on a robust chorus of 'We Shall Overcome,' a song he gets credit for adapting and introducing as the anthem of the civil rights movement.
[Add a comment]
Monday 03 December, 2007
#Post-GDFAF: Queens of the Stone Age at The Academy

This must be how people become drug addicts. I was forcibly late for the last gig I went to, but this evening I cheerily and voluntarily turned up late, thus allowing my first born nipper to go swimming. He's only seven, but he can probably swim rings around you. Anyway, I rolled up at the Academy having completely missed whoever the support band was, assuming there even was one. Perhaps next time I won't even stay for the headliners. *Sniff* I can handle it.

Josh Homme featured twice on the fantasy GDFAF list I drew up back in September, once as a member of desert-rock pioneers Kyuss and once (although I didn't realise at the time) as a member of Seattle proto-grungers Screaming Trees. Consequently, when Queens of the Stone Age appeared on the Academy listings, it seemed silly not to go.

Live, Queens of the Stone Age are more than they are on record, a great deal more. They have a richer, denser sound, more powerful, more hypnotic, more transporting. When you closed your eyes you were taken somewhere else entirely, something my chum Russ would no doubt approve of. I get the feeling that Homme only stops between songs because otherwise the audience would get confused about when to clap. Nearly every song had an extended intro, a bit of a diversion in the middle, and an extended coda. A couple of tracks featured so many false finishes that even Dusty Rhodes would blush. Left to his own devices, I'm sure Homme would go out and play for an hour, maybe two, straight through, take his applause, and then stride manfully off stage. And you know what? That would be brilliant.

This is post-GDFAF, by the way, because I found out about it while researching for or actually going to one of my GDFAF outings. As I left, I pondered once again the eternal gig-goer's questions - is one's listening enjoyment enhanced by holding a cameraphone in the air for several minutes at a time; what are those chaps who bring their girlfriends thinking when it's plain before the band even takes the stage that they don't want to be there; and why in the name of all that's right and proper do people pay good money to see a band and then spend the entire time conducting conversations by bellowing at each other?

Russ L said "Josh Homme featured twice on the fantasy GDFAF list I drew up back in September"

Whofore else? [added 4th Dec 2007]

Well since you ask, Russ ... [added 4th Dec 2007]

[Add a comment]
#[linkfarm] ack - ack is a tool like grep, aimed at programmers with large trees of heterogeneous source code
[Add a comment]
#[linkfarm] PuTTY Tray is an improved version of PuTTY - PuTTY is a free implementation of Telnet and SSH for Win32 and Unix platforms, along with an xterm terminal emulator.
I use PuTTY almost every day, so need to give this a look. They need to list their features in a different order though - high colour icon is less important than automatic reconnection I think.

[Add a comment]
Sunday 02 December, 2007
#[linkfarm] Met Office weather gadgets
Browser plug-ins from a Government agency? Blimey!

[Add a comment]
Saturday 01 December, 2007
#[linkfarm] Beanworld Action Figure Frame-Up - Beanworld Action Figure art by fan favorite creator Larry Marder, auctioned to benefit the CBLDF
Me want.

Me probably not going to get. I know the dollar is currently weaker than a weak thing with a bit of a cough, but the bidding looks to be heading North of $100 pretty soon. [added 2nd Dec 2007]

And there it goes, free and clear over $200. [added 5th Dec 2007]

[Add a comment]

<< November 2007 January 2008 >>