19 March 2005

Hacking onwards and upwards

I am very pleased to have fixed a rather bad bug in the Uniscribe graphics class this morning, after seven hours of trying to work out what was causing it. What I am hoping is that this will resolve the dreaded 8094. I have also made some progress on the Pango graphics class today. There is still a bit to go before it become functional enough to start debugging it properly. One of the issues I have to make up my mind about is whether I should be caching the utf-8 text for the runs. In contrast to the Uniscribe engine, for some reason, more of the Pango functions expect to have the raw text available to them (I do not understand why; once the text is shaped, there should be no need for it), and this has significant performance consequence; to start with, we have to construct the text iterator to pass down to the graphics class, and then we have to do the ucs-4 to utf-8 conversion. I am beginning to think that caching the utf-8 will be necessary.

The spring is here

Amazing. Last Saturday I was climbing ice and today pottering around the garden just in a T-shirt. The spring has arrived pretty much on time, it will be official in couple of days (in fact it was so warm today that we would be lucky if the summer was like that).

Much of my gardening effort in the past several weeks has gone into fighting cats that have decided that my rose bed makes a great lavatory. Since the neighbour’s kids got a couple of kittens for Christmas, I have lost a number of plants, and been shifting shit on nearly daily basis. While I appreciate that there is a great value in children having pets, I am not prepared to take any more crap (in the literal sense of the word) or loose more plants. Having tried different repellents without success, I have been forced to take some more radical measures. My current approach is two fold. I have covered the most sensitive ground with some chicken wire to make it physically impossible for the cats to dig, and at the same time I am implementing a policy of no tolerance: any cats I catch in the garden get hosed. The latter is beginning to show results; hopefully the cats will eventually learn to do their business elsewhere.

17 March 2005

On the importance of standards

Someone mentioned to me the other day that my website looks rather poorly when viewed with Internet Explorer. Well, the truth is that my website is pretty simple; it is written in xhtml, with a handful of tables and some elementary JavaScript, with much of the formatting achieved via css. I have been careful to make it comply with the relevant international standards, for standards make communication possible.

There is only one small problem: Microsoft® chooses to ignore standards. But do you know what? That is their problem, not mine. So I have added little disclaimer to my website: Best not viewed with IE. Microsoft® ignores standards — time to ignore Microsoft®.

16 March 2005

MS Word Piece Table

Martin Sevior has had some interesting exchanges with Rick Schaut, one of the MS Word developers. One of the questions that Martin asked was about the internal of the Word piece table, which Rick (understandably) could not, and did not want, to answer.

Well, the way the Word PT is designed seems pretty clear from the documentation of the Word binary format, particularly, the description of the complex variant, which I am fairly confident is near to a direct dump of the actual PT, and there does not seem to be anything particularly ingenious about it. To answer Martin’s question, the docs suggest that the character position < -> file position translation is done via two linked arrays; the main advantage of that, as opposed to a simple linked list, is to be able to do binary search for the CP-> FC direction of translation. A quote from the documentation, readily available via Google, should make it all clear:

The piece table relates a logical character number, called a CP (Character Position), to a physical location within a Word file (an FC). The array of CPs in the plcfpcd defines a partitioning of the Word document into disjoint pieces. The second array is an array of PCDs (Piece Descriptors) which is in 1-to-1 correspondence to the array of CPs that records the physical location in the Word file where the corresponding piece begins. To find the physical location of a particular logical character … [find] the index of the largest CP in the array of CPs that is less than the character CP. Then reference the PCD with that index in the array of PCDs. The FC stored in the PCD gives the position of the beginning of the piece in the file. Finally, add the offset of the desired character from the beginning of its piece to the FC of the beginning of the piece. This gives the actual file offset of the character.

13 March 2005

Red Gully, Sgor na H-Ulaidh

Myself on the second pitch Myself on the second pitch Myself near the top of third pitch Bob on pitch three belay Myself on the fourth pitch Had a great day yesterday in Glencoe. Bob noted on Alan Kimber’s website that this climb was in condition, and after some hesitation we decided to look at it inspite of poor weather forecast. Just as well, as the weather proved rather decent, and what a climb! Three pitches of grade III ice, followed by a couple more pitches of easier ground. Undoubtedly the best climb of the season (the length of the ice makes for sustained interest that beats some of the Glencoe classics in the same grade).

Because the climb appeared on the web, it was a bit busy. There were two other parties setting off from the carpark at the same time as us, but we beat them to it; there was another party on the climb when I got to the bottom of it, but the second moved off by the time we got our ropes sorted. I was rather annoyed that the party behind us decided to start climbing before we cleared the pitch. The critical sections of the icefall were just a few meters wide; there certainly was not space for two climbers at the same time, which was obvious from bellow. Even worse, the leader was nocking down huge amount of ice; sure, there is always ice falling in iceclimbing, but this guy was whacking it way to hard barely using his feet (some of the pieces falling of were briefcase sized). Moreover, the guy did not pay attention to our ropes, getting his ropes and himself tangled in them. There was one point where I found myself directly below him having a huge runout, clearly struggling with what was not a particularly difficult section of the pitch, and I was unable to move out of the line of his potential fall because he managed to get my rope between his legs! Then he set up his belay in the middle of the gully, so that I had to climb over him, wondering if he was going to pull me off while I was starting the rather steep icefall on the second pitch. All that because some guy could not wait for 10 minutes before setting off. I was really pleased that we managed to get some distance between us and them after the second pitch.

Photos © 2005 Bob Easson.

6 March 2005

Golden Oldie

Narrow part of the arrete; myself in the back Me and John Rennie Had a great day yeasterday on the Golden Oldie on the west face of Aonach Mor. This is by far the grade II climb I have done in Scotland, by far (such classics as Curved Ridge or Dorsal Arete do not compare, and I think even Anoch Eagach does not match up to this one). In particular, it has a superb narrow arete (and I mean narrow!) near the top.

Because of its length (500m), it is deffinitely to be done in Alpine style, moving together and using a single rope (we pitched two pitches near the start, which would have been better also in Alpine style with a good length of rope in between) — in particular, if you aim to catch the gondola down, you do not want to hang around (it is about an hour from the top to the station). In terms of gear: nuts, hexes and slings were entirely adequte, although we noted growing ice build up in the lower section for which a screw or two could come handy if the icing was more extensive (the lower ground is not too steep, though, and you might want to solo it anyway).

The only down side of this climb is its growing popularity, but overall the west face is very quiet, and the route can cope with a few parties at a time.

The west face is not a great one for obvious features, and particularly if the visibility is limited (as it was yesterday) it can be hard to decide where the climb starts. If you use a GPS, we geared up at NN 1877 7301, which is immediately under the buttres.

Photos © 2005 Bob Easson.

Next Page »