You are not logged in!Manage Account

Glass Half Empty

Home Creative Commons License

Back home. The bloke fitted a sheet of plexi' to cover the gaping-ass hole in the bus, and I came home to a bedful of mail-order stuff that arrived while I was away.

On the up side, stuff, including tent etc. for camping trips this year. On the down side, bedful, so I can't collapse into it like I oh-so want to. Roadworks, and the fact that the glazier at the frigging windscreen-repair place doesn't get in 'til six PM (wtf do they do until then, stretched cling-film and sellotape?) conspired to get us back to campus past 10 pm. Soooo tired right now.

Awesome trip though. Right people, right place, right activities etc. Yay.

The Glass: half-full

So, the Sussex Uni fencing club is at the Invicta, an open competition in Kent.

We turned up late on Friday, slept at Aoife's house and headed out for the first day at WTF in the morning on Saturday (0730). Get to the Invicta, register, stand in far too long a line at the Leon Paul stand to get a second epee so I wouldn't get carded if my first weapon glitched, go on piste.

In a pool of six people, I scored pretty low (5-3, 0-5, 0-5, 0-5, 0-5), and wasn't really too impressed with my performance. I was fully expecting to be cut after the pools (depending on numbers, the bottom few fencers will be cut out of a competition so that the rest can be arranged into a tree for direct elimination bouts), so I didn't really bother doing anything about the state of my kit: repairing damage, re-seating components and adding identifying badges so it's a touch clearer to which club I belong, and so on. Naturally, a few minutes later I get called to DE, having missed the cut by about ten people. I went out in the first round of DEs, to one of the people in my pool, but I'm not too concerned. 85th out of 109. I can live with that.

The entire club went out to the "Twin Dragons" Chinese restaurant in the evening (excellent all-you-can-eat, but fresh-cooked, not a greasy buffet under heat lamps), then repaired to bed(s) after a certain amount of alcohol.

Sunday, well, Sunday was a foil tournament, so I didn't compete. Instead, I was sat in the armoury, helping Janet to repair equipment and generally discussing, sitting, etc. However, I've missed a step. The trip to the venue.

A little before a town called Upstreet, on the way to Kent Uni, the window fell out of the minibus. No fanfare, nothing, it just toppled out of the frame and exploded into tiny glass shards, leaving a nice big hole in the 'bus. So we spent most of the damn day trying to figure out if we were insured, and for how much, and with who. Originally, we thought we were with Endsleigh, so we asked them to get us a glazier. They denied all knowledge of us. Panic.

Despite the minibus officer not doing his job, and not including the up-to-date paperwork in our bus, it turned out that it didn't matter too much: we still have insurance, with Co-Op, thanks to the efforts of other people. By the end of the day, we were fairly sure we could legally drive the bus on British roads again, and we have a glazier coming to fit ... something ... in the mean-time. Meanwhile, we have a bin-bag duct-taped over the hole in the bus, to join the dinged-in roof and the dangling indicator, and all the other crap that's wrong with the thing.

Oh well. We're still alive, and so on (we don't really feel fantastic, since we're all dog-tired, but we'll do). Tomorrow, we go back to Brighton, since we can't do motorway speeds till we've a new window. See y'all on the flip side.

So, today was a day that should really have been full of apologies, first to one of my tai chi teachers for nearly falling over on her during a particularly complex phrase (she's about half my size: had I not noticed and managed to catch myself, she wouldn't have been able to). I took on one of the beginners at foil (during the fencing training session), but was stuck in an epee mindset, and kept landing over-powered hits in off-target sectors of her body. Then later to one of the barmaids in the Falmer, since I ended up using sports-hall-voice to get my order across the bar (about twelve inches). In my defence, the live music was loud and obnoxious, but when the barmaid winces and the entire bar can make out your order, you may be a little over-loud. And so on, and so on. So it goes: some days, little things keep going wrong.

On the up side, one of the modules of code I'm writing here has finally passed its (comprehensive) test suite, so yay.

(entry backdated due to glitch in the new codebase, now fixed)

The Glass: half-full

So, today, I discovered that unless I'm missing something, there's no library function in C++ to convert an ASCII representation of a hexadecimal number into an integer with the same value. So I rolled my own.


int ahtoi(const char* input)
{
	int i = 0; int output = 0;
	char current_val;
        // If '0x' header is present, skip it.
	if((input[1] == 'x'  ) || (input[1] == 'X')) i = 2; 
	current_val = input[i];
	while (current_val != '\0')
	{
		if((current_val >= '0') && (current_val <= '9')) 
                        current_val = current_val - '0';
		else if((current_val >= 'A') && (current_val <= 'F'))
                        current_val = (current_val - 'A')+10;
		else if((current_val >= 'a') && (current_val <= 'f'))
                        current_val = (current_val - 'a')+10;
		else { /* Do nothing */ }

		output = (output << 4) | current_val;
		current_val = input[++i];
	}
	return output;
}

That's about as tight as I can make it. And placed in the public domain, for the five or so people in the world likely to care: if you have a use for the above, go ahead and copy it.

Second discovery of the day: the 741 operational-amplifier requires a minimum supply voltage of 10V. Therefore, when I build a fast-switching schmitt-trigger comparator using them, and feed it five volts, that the output is a little ... sluggish ... should not be surprising. Two seconds to switch, in a circuit designed for microseconds? I think not. New chips, with more appropriate specifications, will shortly be on order.

EDIT: A friend points out that the function I'm looking for is, in fact, "strtoul(const char *start, char **end, int base)". Such is the value in knowing one's standard library.

The Glass: half-full

Not currently that impressed with Barry Paul.

Barry's epees use a resin glue to hold the sense wire in the groove on the blade. Almost everyone else uses a simple cyanoacrylate (a 'Super' glue). However, the resin isn't quite as sticky, and over time, tends to fail at random points along the blade. When enough of these failures happen next to each other, the wire pops out of the groove altogether, and at that point, you're screwed. Any attempt to retension the wire will fail, as it has already been stretched in use. So I tried to retension anyway, earlier, being only vaguely aware of this fact, and failed. A twenty-minute dab of glue on a protruding wire is now a hour-long rewire (the glue takes a while to dry). And Barry's crappy resin has run up into the tip body as well, so I have to use a spanner and most of my strength to get it off, risking breaking the blade to boot.

Underimpressed.

The rewire I've done on it is my first in about a year, and it's not the best job. It should hold for a bit, but I'll have to redo it over Christmas. At least the parts are cheap.

The Glass: empty