Monday, December 22, 2008

What I've done on my Xmas Holiday

As has been mentioned several times, I tend to spend a lot of time hacking on Sutekh, the VtES card manager.

I am, however, also somewhat addicted to the (now defunct) Dune CCG, so some time ago, I vaguely started working on a fork of Sutekh to deal with Dune's cards.

And, with minimal cheating [1], I now present the first evidence of Thufir's evolution to non-vapourware status [2]:

[1] It doesn't parse unmodified html files yet - I'm leaning towards just distributing the tweaked files as a better choice fixing the parser to handle the rather horrible html.

[2] git repo

Tuesday, December 2, 2008

PRASA 2008

So, this year PRASA was in Cape Town, and, riding on the work of my loyal minion (i.e. my M. student), I was once represented. Notes from this year:
  • I should never, ever, ever get a job which involves commuting in on the N2 - taking around 90 minutes to get from my flat to the conference venue each morning was not a good way to start the day.
  • I should be more forceful when chairing sessions - I left the long talk to go on embarrassingly long.
  • Ideally, I should duck out of chairing sessions more often. It's easier to catnap in the back during the boring bits that way.
  • Two bottles of wine per table (1 white, 1 red) just doesn't cut it for the conference dinner
  • I'm very glad I wasn't driving after the conference dinner (see previous point).
  • Ordering off the menu a week in advance didn't work well, and hopefully that won't be repeated for some time.
  • I came away with fewer things that struck me as really interesting this time - I think the first point played a role in that, though.
  • The meeting footage database does sound like a fun dataset to have on hand. I'll hopefully remember to follow up on that.

Sutekh 0.6.0 released

After far too long, we finally got the current trunk to a state where we were happy to release. Unlike the previous stable releases, we decided that this one was worth a bigger splash, and announced it on the VTES newsgroup.

As such releases go, that seems to have been a success, and I've spent the last couple of days obsessively watching the sourceforge downloads counter tick up.

The increasing number of downloads, however, has not been accompanying by any comparable flood of queries or requests. As a measure of validation that people are using out work, this leaves a fair bit to be desired. Typical, really. Users are never around when you want them, and often there to complain when you don't.

Sunday, November 16, 2008

Development style

A couple of weeks ago, I decided to make a concerted effort to fill in some of Sutekh's documentation, since we are planning to release fairly soon.

As a result, Sutekh now displays icons in the main tree view, and has a plugin for importing card sets from zip files.

I'm prone to this development pattern, and, given the amount of feature creep you see in modern software, I suspect that it's actually quite common.

(There has also been progress on the documentation, though, and the icons feature is really nifty)

Friday, November 7, 2008


Because they both throughly amused me today, and I have not punted either here previously:


Irregular webcomic. (warning, combine irregular webcomic and tvtropes at your own risk)

Both are well worth following.

Sunday, November 2, 2008


Emotional stress is, amongst many other things, quite educational. For me, it's quite good at stripping away some of the layers of deception (self and otherwise) I engage in to make my life more comfortable. The last few weeks have been rather good at forcing me to re-examine who I am, and, in particular, I've been forced to confront the extent to which I am extremely coy about my Christianity [1].

There are various reasons for this. In part, I am an extremely private individual. I'm REALLY not comfortable with personal information leaking across my boundaries (and something as fundamental as my beliefs counts as pretty darn personal). In addition, I don't want to get drawn into the inevitably pointless debates about belief and religion - no-one ever got converted in either direction by rational debate.

There's an aspect of not wanting to be identified with the extremes of Christianity [2], and, let's face it, the crackpot extremes are really screwy, really loud, and, based on the available evidence, annoyingly common.

Disappointingly, however, a very large portion is due to simple cowardice [3]. My reluctance to trust that other people will tolerate my beliefs is both uncomfortably revealing and more than somewhat sad. While I've generally avoided explicitly denying my faith, far too often, I've simply found it comfortably convenient to avoid committing to any particular position. I'm not sure when or why I became so defensive about my beliefs, but it's hardly one of my better character traits, and represents a rather significant failure to live up to my personal ideals.

Overall, a failing grade, but hopefully with potential to do better in future.

[1] I'm not going to go into the particulars of what exactly I believe here, but it's sufficiently based on the traditions of the Protestant Christian church that the label will do. Some more details are available here

[2] Let's not even start on the history of Western Christianity, which, with some extremely vigorous white-washing of the really bloody bits, may just make it to the point where it can be described as an utterly horrific failure for a religion with "love thy neighbour" as one of the central doctrines.

[3] For example, I've spent far too much time polishing this post instead of publishing it, for very little gain.

Thursday, October 16, 2008

Reasons for loving FLOSS, #<fairly large number>

As I've mentioned before, I've been poking at a gmail backup application based off libgmail. It's been making slow progress, partly because I've been distracted by other things (such as Project Euler), but it hasn't completely stalled.

Recently, while fiddling with it, though, I hit a snag - libgmail would throw an exception when trying to access certain threads. After much head scratching, and testing, I eventually twigged that the problematic threads all included messages sent via google chat. A little focussed debugging showed that gmail creates pseudo mail messages for these when accessed via the API libgmail uses that don't quite match the messages libgmail expects. A little crude patch later, and the problem was fixed for me.

Thus armed, I submitted a bug to the Debian bug tracker, at around 19:00 local time. At 21:00, I received a acknowledgement from the maintainer, who had forwarded upstream, and at 21:10, I received a note that a patch had been applied upstream. Just over 2 hours from bug report to upstream fix strikes me as pretty good going.

Saturday, October 11, 2008

Adding periodicity

Still generating complete sequences, so linear growth is expected.

Found period 32, difference 126
time to generate 200000 numbers (U (2, 5)) is 0.37129
time to generate 2000000 numbers (U (2, 5)) is 3.66487
time to generate 20000000 numbers (U (2, 5)) is 38.38641
Found period 26, difference 126
time to generate 200000 numbers (U (2, 7)) is 0.36446
time to generate 2000000 numbers (U (2, 7)) is 4.06793
time to generate 20000000 numbers (U (2, 7)) is 44.24620
Found period 444, difference 1778
time to generate 200000 numbers (U (2, 9)) is 0.40023
time to generate 2000000 numbers (U (2, 9)) is 5.73586
time to generate 20000000 numbers (U (2, 9)) is 38.33744
Found period 1628, difference 6510
time to generate 200000 numbers (U (2, 11)) is 0.41977
time to generate 2000000 numbers (U (2, 11)) is 3.65161
time to generate 20000000 numbers (U (2, 11)) is 37.85133
Found period 5906, difference 23622
time to generate 200000 numbers (U (2, 13)) is 0.65191
time to generate 2000000 numbers (U (2, 13)) is 3.69802
time to generate 20000000 numbers (U (2, 13)) is 36.82868
Found period 80, difference 510
time to generate 200000 numbers (U (2, 15)) is 0.36584
time to generate 2000000 numbers (U (2, 15)) is 3.61351
time to generate 20000000 numbers (U (2, 15)) is 37.08529
time to generate 200000 numbers (U (2, 17)) is 4.52874
Found period 126960, difference 507842
time to generate 2000000 numbers (U (2, 17)) is 7.54118
time to generate 20000000 numbers (U (2, 17)) is 39.30235
time to generate 200000 numbers (U (2, 19)) is 4.54097
Found period 380882, difference 1523526
time to generate 2000000 numbers (U (2, 19)) is 35.07058
time to generate 20000000 numbers (U (2, 19)) is 36.92766
time to generate 200000 numbers (U (2, 21)) is 4.10050
time to generate 2000000 numbers (U (2, 21)) is 43.80197
Found period 2097152, difference 8388606
time to generate 20000000 numbers (U (2, 21)) is 456.09959

There's a bunch of improvements that can be made to the code - especially the periodicity check is not that efficient, and tends to repeat work which could be avoided. This bites for the U(2, 21) sequence, for which the direct approach presented earlier can calculate 20000000 elements in around 290 seconds, but the overall problem is now something that can be solved in "reasonable" time periods

Presented without further comment.

# time python ./
Answer = <answer redacted, but confirmed correct>

real 7m15.052s
user 6m41.213s
sys 0m15.365s

Friday, October 10, 2008

This may actually be feasible now

With CTPUG 14 in the near future, and two failed attempts to tackle the Ulam seuqence problem from the previous meetings, I decided to give the problem some thought today.

So, from today's bright idea,:

$ python ./
time to generate 100 numbers (U (2, 5)) is 0.00426
time to generate 1000 numbers (U (2, 5)) is 0.03167
time to generate 10000 numbers (U (2, 5)) is 0.22796
time to generate 100000 numbers (U (2, 5)) is 1.44548
time to generate 1000000 numbers (U (2, 5)) is 14.71493
time to generate 100 numbers (U (2, 7)) is 0.00214
time to generate 1000 numbers (U (2, 7)) is 0.01558
time to generate 10000 numbers (U (2, 7)) is 0.15068
time to generate 100000 numbers (U (2, 7)) is 1.43910
time to generate 1000000 numbers (U (2, 7)) is 14.62419
time to generate 100 numbers (U (2, 9)) is 0.00245
time to generate 1000 numbers (U (2, 9)) is 0.01770
time to generate 10000 numbers (U (2, 9)) is 0.15190
time to generate 100000 numbers (U (2, 9)) is 1.45868
time to generate 1000000 numbers (U (2, 9)) is 14.93112
time to generate 100 numbers (U (2, 11)) is 0.00211
time to generate 1000 numbers (U (2, 11)) is 0.01602
time to generate 10000 numbers (U (2, 11)) is 0.15409
time to generate 100000 numbers (U (2, 11)) is 1.49055
time to generate 1000000 numbers (U (2, 11)) is 15.08445
time to generate 100 numbers (U (2, 21)) is 0.00486
time to generate 1000 numbers (U (2, 21)) is 0.03741
time to generate 10000 numbers (U (2, 21)) is 0.25073
time to generate 100000 numbers (U (2, 21)) is 1.78683
time to generate 1000000 numbers (U (2, 21)) is 17.9669

(Sequences U(2,5) and U(2,7) verified against the On-Line Encyclopedia of Integer Sequences (to 1000 elements))

The period detection and related footwork is still missing, but with a linear time growth, the problem looks much more doable.

So, the bright idea:

Looking at various articles, it's mentioned several times that Scherml and Speigel proved that "The sequence (2, v) for odd v >= 5 had precisely 2 even terms".
It can also be shown that the second even number occurs fairly early in the sequence.

Since we're dealing with sequences of that form, after the initial terms to reach the second even term, the candidate numbers we're dealing with must be odd. Generating the new candidates is thus trivial, and, with a little housekeeping, the list of candidates to consider can be kept short on every loop.

I'm not sure whether to feel chuffed about spotting this, or annoyed that I didn't spot this earlier.

Wednesday, October 8, 2008

Paging Captain "Ya know, that's really pretty obvious"

Occasionally, it's useful to be able to write a one-line script (it's especially handy for pasting into IRC channels). Python's one-line capabilities are somewhat limited though. Statement lists (see the offical grammer) are always terminated by a newline. Thus, it's impossible to directly express the following snippet as a single line:

for x in range(5):
   z += x
print z

Of course, there are a vast number of ways to achieve the same effect using the constructs that can be placed on a single line, and, other than showing off, there's usually very little need to coerce something to be a single line.

Today, however, it occurred to me that it's also possible to abuse eval for this (I don't know why this only struck me today), leading to:

python -c 'eval(compile("z=0\nfor x in range(5):\n z+=x\nprint z", "test", "exec"))'

While not exactly readable, I think combination of eval, compile + a one-liner is just too amusing to ignore. I'm sure that eventually, somewhere, I'll be able to convince myself that this trick will be just what I need.

Saturday, September 13, 2008

The Side project, or a tale of paranoia and python

This starts with a post to clug-tech (, titled "Make automatic backups of gmail account". This extracted several obvious solutions using getmail or fetchmail & gmail's IMAP service. There are obvious weaknesses with using IMAP to backup mail, though - exposing all the labels as folders is not desirable when you regularly use multiple labels per message, and any re-arrangement of mail into per month mailboxes or the like needs to be handled client side, which seems a waste given that gmail has a rather nice search engine as a major selling point.

Combine this with the following ingredients:
  • I'm prone to sporadic bursts of data paranoia
  • I've wanted to play with libgmail (a python interface to gmail) for ages
  • I don't have a backup of my gmail account's mail
  • work has involved lots of meetings & academic proposal writing, and not much of actual interest of late.
The result is Gparanoia, a simple little python program for pulling down mail. It's currently far from robust, and far from complete, but kinda-sorta-maybe does some of what I want some of the time, which seems the perfect point at which to turn it loose into the wild. It may very well eat your data, start a land war in Asia, or generally behave in an ill-mannered way at the dinner table, but it's available if people want to play with it.

Friday, September 12, 2008

Whale watching

After the Monkey town visit, and related activities, Simon, Adrianna, Andrea & myself went through to Hermanus, with the aim of Whale watching on Sunday. Saturday evening involved a game of scrabble where I had a statistically rather unlikely run of low point letters (although I did have one nice score from adding FIG to Simon's OX), which I am blaming for my defeat (regardless of the evidence).

Sunday morning was spent more successfully whale watching (photos). Photographing whales is always a bit awkward - unless they actually do something, you tend have photographs that look like large logs floating in the water. Fortunately, the whales were quite active, and we even saw one jumping very close to the shore.

This was followed by lunch at "Coffee on the Rocks", a very pleasant little restaurant in De Kelders, with some really nice views of the bay.

Monkey Town

Last Saturday, I joined the party visiting Monkey Town to celebrate belately celebrate Simon's birthday. Having often seen the sign on the way out on the N2, and considering how close it is too me, visiting Monkey Town has been long overdue.

The visit more than lived up to expectations, it's a very nicely laid out facility (photos). The central part is essentially one large cage, with covered passageways for the vistors, and then a large number of cages off to the side. Favourites include the mongoose lemurs, the ruffed lemurs and the cottontop tamarins. Photographing the monkeys is made complicated by the fences, and the bright sunny day meant that most pictures are against a bright background, so I have a number of "almost good" pictures. I should have used the flash more to compensate for the back lighting, which is something to remember next time (And there will be a next time).

Lunch was at the Harbour Island, which I hadn't previously been to. Pretty little venue, and worth baring in mind when the occasion arises. This was followed by losing time in the Gordon's Bay bookshop - I picked up a copy of some of Gilbert and Sullivan's operas, and a few other odds and ends,

Wednesday, September 3, 2008

Very true

From a post by Valdis Kletnieks on the Full Disclosure list:

"Ever notice that most of the 'die in a fire' comments come from top-posters?"

Who knew?

Turns out that spending an entire afternoon in a meeting that spun around in circles doesn't leave me in a good state of mind for reading a thesis draft.

Tuesday, August 26, 2008

Webcomic discovery

Websnark has recently started writing about webcomics again, which introduced me to the most promising Skin Horse, Shaenon "Narbonic" Garrity's new strip, which I somehow managed to completely miss beforehand.

Tuesday, August 12, 2008

Dragonfire 2008 summary

I wasn't involved in either of the LARPs, although I did help play-test one of then the week before, which was quite fun, if a little rough around the edges at the first running.

The Saturday was taken up by the Vampire tournament. I tried my Malkavian deck again, but in neitehr game was I able to secure a VP. The first game tone got set by the early appearance of Smiling Jack for my predator, which meant I wasted time going backwards, which the deck is not good at, and was unable to put pressure on my Imbued prey, and that allowed him to build up, and successfully sweep the table.

The second game, I had an Ahrimane wall deck as my prey - I almost successfully ousted him, but a cross-table direct intervention against one of my stealth cards meant that my lunge was blocked, which pretty much left me dead in the water.

In between, we did mange most of a social game, where I played my !Nossie deck, which did a lot better, successfully ousting my prey with a well timed Fame, and beating up my predator a great deal (who twice bled we for 5, so I had to, although it did leave him dead in the water for the weenie gun deck beyond to bleed through).

Sunday I played the two modules.

The first, a Call of Cthulu module, was quite fun, but, with the way the DM's dice where working, we had little chance of surviving the module (only 1 of the 3 groups plaing the module had players alive at the end, so we didn't feel too bad about that).

The second was a DnD 4th ed module. Our group ended up being the slowest by quite some distance - the unfamilarity with the rules did play a role in that, but largely it was they way the group approached the game and the roles. Still, good fun was had by all, and we did eventually beat the big bad glowly vampire boss at the end (although, our DM (Simon), to speed things along, did have the big bad come meet us halfway).

Overall, the con was most enjoyable. Unfortunately, I came done with some sort of bug towards the end, so had to skip the after party.

This yar did suffer a bit from late announcements - the module descriptions weren't up until quite close to the start of the con and the unexpected venue change (although not something in the control of the organisers) wasn't ideal. On the other hand, the mugs were available during the con, so that was good.

Thursday, July 31, 2008

Thoughts on test driven development

At the start of May. Simon and I redid the database layout for Sutekh, and, since then, have been working on fixing all the fallout of that. I recently spent a bunch of time working on finishing off some parts of the transition. Since we had a good idea of what the code should accomplish, I ended up doing most of this in a very test-driven fashion. Since most of my work is much more experimental in flavour, and doesn't thus doesn't lend itself to strongly test-driven development, it was an interesting exercise.

Some observations
  1. Having the test available is nice, especially given the number of interactions involved
  2. It tended to get sucked into "let just get this test working", and, as a result, the first version that successfully passed all the tests is a poster case for the difference between "working code" and "decent code". I'm still busy refactoring the code to amalgamate common bits, and there's still considerable work before the code is maintainable.
  3. I frequently erred towards being overly concerned with not breaking the tests. I ended up duplicating code unnecessarily in places as a result.
  4. Refactoring is made easier by the test, though.
  5. Largely as a result of 2, I don't actually have that good a mental map of the code, which feels rather weird. Spotting repetitions between the different code paths is thus quite time consuming.
  6. I do have quite a lot of confidence in the tests.
A fair bit of this list boils down differences in the manner in which code is produced. In my usual development model, by the time I'm satisfied that the code is doing what it should, I've spent a lot of time worrying about specific details and all sorts of implementation issues, and consequently, the code is vastly more polished. Here, because I was usually focused on short term gains, I have something which does what I want, but still needs considerable work before I'll regard it as complete. Also, as the list illustrates, I made the error of treating this as a bug-fixing exercise, rather than as development, so that's something I'll have to bear in mind in future. Point 5, though, is the real problem, though, and I'm not quite sure how to fix that, although things should hopefully be a lot better by the time I finish refactoring.

Still, despite my complaints about the resulting code, it did make the development a lot easier, and, for a part-time project, being able to deal with it in the smallish chunks of "let's get this test case working" did make it much easier to maintain momentum via visible results.

Wednesday, July 30, 2008

Stuff from the Day-job

So, after a couple of weeks of much intermittent panicking, we commissioned the latest version of the patient positioning system today. I feel rather chuffed about the whole thing at the moment, since it's always nice to see one's work used, but I could have done with a less stressful last two weeks.

Since the last version was commissioned (November 2006), several chances have been made. Most significantly, the control and drive systems for the chair were replaced. The improved electronics allows great accuracy, and the updated control system fixes the numerous problems with the old version. The vision system received polishing - various inefficiences were ironed out, and the code is generally much less fragile, and numerous bugs on the front-end were fixed. All in all, the new system represents a significant improvement, and is the result of lots of hard work by the MedRad development team.

As the panicking comment above suggests, the comissioning process did not run that smoothly, though. Things that went wrong varied include the serious - I had to rework and significantly simplify parts the lens distortion code due to issues with the repeatability of the results (trading theorical accuracy for practical reliability, which was the correct choice, but I will need to revisit and fix that code), the daft - a stupid error in the mathematical formulation, that all of us who looked at it missed completely, meant the final collimator rotation was only correct in the range 0 - π (Of course, the standard QA tests we used during the development phase only cover that range, so we didn't pick this up until quite late) and the standard - the spare box, which also needed to be updated booted fine, but completely failed to see it's frame-grabbers, so that had to be hastily rebuilt (leaving us short of additional spares for now), combined with all the usual last minute bug-fixes, but it is complete, and the accuracy figures do show a statistically significant improvement in the accuracy. Considering that the previous system was already accurate to within 0.5 mm, I'm pretty pleased with that.

Thursday, July 24, 2008

The Final

So, final table went better than I expected - I wasn't ousted, and got 1 VP.

Table setup was Mike bleeding Verolin bleeding Val bleeding me bleeding Dan, with Mike starting.

It was definitely a table of people's decks not working as designed - Val got off to a fast start, with enough stealth to avoid his fee stakes being blocked, and dropping an early Reckless to hit me for 5. I brought out Rodolfo, who fairly quickly lost his title due to 2 No Confidences being played, and Korah, while Dan brought out Joe 'Boot" Hill and Basir. Mike got an early Information Highway again, and was off and running quite fast. Both Dan & I were reluctant to bring out a 3rd minion, because we knew Mike would be playing recalled to the founder, but early on, I was able to generate enough stealth to successfully bleed Dan a few times. Verolin's deck never got going, as he ever drew a bleed modifier, and Val was quite happy to take bleeds for one.

So, by about an hour in, I had two minions out, and the powerbase Madrid, but only 8 pool, Dan had two minions, and a lot of pool, Mike had 4 minions, but was struggling a bit for pool, while Verolin was also starting to feel the pressure from Mike, with Val sitting quite pretty, largely tooled up, and quite a bit of pool. at this point, though, Val stated trying to balance the table, being worried that Mike would oust Verolin too quickly - this resulted in two Reckless's (called over a couple of turns), which, combined with a couple of bleeds by Rodolfo, left Dan within lunge range for me. I was struggling for stealth cards though, which delayed me somewhat - Verolin was duly ousted, and then I drew the stealth I needed to oust Dan - I played a Kine to which Val allowed to pass which reduced him to 1 pool, but I would have had enough bleed modifiers to oust him with the next bleed even without the Kine, but I did need the extra stealth card I drew to replace the Kine to be sure of getting past his Abbot.

At this point, I ran into a run of cards without any stealth, which meant I was unable to pressurise Mike, and Val run out of S:CE, so was unable to survive Mike's rushes, which left Val in trouble. I eventually drew stealth, and attempted to lunge, but was deflected onto Val, which ousted him (even without the determine, Mike could probably have untapped his Champion, but I was hoping to get lucky) - at that stage, the game timed out, but, since I would have been unable to survive Mike's rush actions, he would have been able to bleed me out fairly quickly had play continued.

Still, the deck worked pretty well - In this tournament, I could have used some Confusion of the Eye's or Poison Pills for additional vote defence, but it's probably not general enough in the Cape Town play environment to be worth adding. I usually had enough stealth in my hand (except for a funny run in the final), but the deck almost certainly doesn't generate enough stealth to beat a full-on wall deck. The combat defence is the major weakness, and, against imbued, the ineffectiveness of Coma is a major issue. More Mental Mazes is probably the way to go, but that does require successful blocks, can be hard to pull off, but, considering how badly the deck crashed and burnt last time I tried it in a tournament environment, 1.5 VP from the final table is a fair result.

Sunday, July 20, 2008

Saturday's Vampire tournament

I decided to give the Malkavian antitribu deck another run in a tournament - I tweaked the balance somewhat (I reluctantly removed Aristotle, since he tends to generate excessive table hate, and I replaced the confusions with more generic stealth cards). I managed a single VP with the deck, but, thanks to the scary efficiency of Val's anarch reckless agitation deck (1 table sweep, 1 near sweep), that was enough to qualify for Wednesday's final.

There were only 9 players, so the split was into two tables, one of 4, one of 5.

So, the rounds:
Round 1: I was bleeding Robert's guhuri farm deck bleeding Val's reckless agitation deck, bleeding Phillip's Aabbt deck, bleeding Garrick's Brujah equipment deck.

Robert started. I had a decent crypt draw, and was able to put decent pressure on Robert, but didn't draw enough bleed cards (I drew 1 kindred spirits in the game, and only 2 eye's of chaos's), so I was never quite able to finish him off. I erred badly in not stopping Val's Firebrand when I could have, which made it easier for Val to get the vote lock, and sweep the table. Phillip's deck got going, but wasn't fast, which left Val easily able to finish Phillip and Garrick in quick succession, before going on to sweep the table. Garrick's deck didn't really get going - he ended up spending a lot of time setting up with equipment, and a couple of bleeds by Phillip put him very much on the defensive, but he struggled to generate enough intercept. Robert didn't really get the full arm going, but a couple of well timed minion taps, and some other pool jiggling meant he survived my attacks - that he never blocked any of my actions also meant I was jamming on stealth cards a bit. Annoyingly, when I was ousted, the two of the next three cards in my deck were a Kindred Spirits and a Eye's of Chaos - given that I had stealth in my hand, and Robert was on only 4 pool at the time, had these cards come up a little earlier, I might well have been able to oust him.

The second table was Mike, playing an Imbued event deck , bleeding Verolin, playing and Akunanse deck, bleeding Dan, playing his Seraph multi-act Assamite deck, bleeding Marc, playing a Tzimisce bleed deck (no idea who started). The table timed out. Mike was on quite low pool, but Marc was never able to generate enough bleed to defeat the Imbued's farming. I'm not sure why Mike was unable to oust Verolin, since he was down to a single minion by the end of the game, and didn't seem to have much farm going, but the table indeed timed out.

Round 2:
Table 1: I was bleeding Phillip's deck, bleeding Mike, bleeding Robert. I started.

I didn't have an ideal crypt draw (two Dolphin Blacks, the General and Hannibal), and I drew a lot of Master's early on, so it took me a bit of time to get myself setup. Fortunately for me, both Phillip and Robert were bringing out 11 blood vampires (Sutekh and Eze respectively), so my slow start didn't really hurt me. Mike, on the other hand, drew an information highway in his opening hand, and, combined with the other acceleration tricks he had, had 4 minions out by the time Phillip brought out Sutekh. With Eze and Sutekh on the table, and Vox Senis down early, I didn't have the voter lock, but I was able to successfully whittle Phillip out - it was a close run thing though, as he had played the Kahabr towers the turn before I ousted him, and would almost certainly had burnt Sutekh for the 11 pool on his next turn. Thereafter, with the Unmasking down, I run into a drought of stealth cards, so wasn't able to put pressure on Mike, and with both Mike + Robert attacking me, I ended up losing minions fairly rapidly. Mike eventually ousted Robert, since timeout was looming, and then easily ousted me for the game win.

Since this game went close to timeout, I didn't see what happened on the second table - I know Verolin got 1 VP, which was apparently engineered by Val, and Val cleaned up the table thereafter.

So, reflections:
  • I probably need to add a couple of Barren's to the deck - when people aren't blocking, it's prone to jamming on stealth
  • The changed balance is better - despite the occasionally weird draws, I had fewer completely useless cards at any stage, and was generally able to go forward fairly well.
  • I need more Mental Maze's, since the Malk's remain crunchy in combat.
  • I still can't believe I only drew 1 Kindred Spirits in the first game - Sutekh's card draw probability calculator tells me that the odds of that are < class="blsp-spelling-corrected" id="SPELLING_ERROR_33">probability plugin, I'm naturally completely confident in the accuracy of the figure).
  • Outer Limits had shiny Twilight Rebellion boosters. I had little self control, and now have a number of shiny Twilight Rebellion boosters (next on the agenda: somehow secure some Fee Stakes, so I can actually use the nice shiny tech)
We'll see how the final goes on Wednesday

Saturday, June 21, 2008

Python Sprint Day Take 2

In terms of overall productivity, this was less successful than the first. Partly the break for the talks ate up a lot of time, so getting momentum was a lot harder, and also, with the recent beta release, the number of clear issues was much reduced. The checkin that broke floatobject for some of us didn't help either, as people got side tracked into getting working python 2.6 builds.

Still, we prodded a couple of issues from the last bug day, and a couple of new bugs were filed about odd bits in the code (mainly by Simon), so there was some positive progress.

The CTPUG meeting part of the day was a definite success. The localisation talk took some time to get going, and it would have been nice if Dwayne had been able to stay longer so that we could have explored some of the discussion avenues a bit further. Simon's PyObject talk was interesting, especially touching on some of the differences between py3k and the python 2.X series.

Tuesday, June 3, 2008

Curiosity is a funny thing

For various reasons, many to do with my instinctive distrust of university IT departments (what can I say, I've been around academia for too long), I find myself responsible for our departments web-server.
The web-server hosts various things, such as the course pages, a wiki for the South African OR society and a few other things.

Unsurprisingly, pursuing the logs reveals a great deal of refer spam, and, unsurprisingly, I have a set rewrite rules to deny access to obviously bad refers, and various automated steps in place to keep the blacklist updated, and some manual processes, since not everything can be automated. This does have the side effect that I have a automatically updated record of referrer spam in our logs. Which is where curiosity kicks in and asks "I wonder if there are any interesting stats to be gather from this?"

Perhaps fortunately, the data isn't well organised for analysis - I can't readily extract temporal information or frequencies of repeated patterns without correlating stuff against the logs, which is more effort than it's worth, but some simple keyword grepping is enough t at least roughly break things down into categories, which is already interesting.

So, based pretty much on the junk seem so far this year, dip's stats are:

Leading the way, at a little under 35%, are gambling related terms, with poker the big winner, followed by various spellings of blackjack.

Insurance surprisingly comes next - accounting for just over 20%. Medical and health insurance are the major keywords, with the vehicle insurance terms running a fairly distant third.

Next, at just under 10%, are various loan and debt management terms. Bills and debt are the most popular keywords here, with loans close behind.

Viagra and such account for around 7.5%

Porn does surprisingly badly, only accounting for around 5% of the cases - with a huge variety of terms used.

The rest is a mish-mash of music sites, link sites and various other junk., with nothing really worth singling out into a single category, although 1% is taken up by cigar and cigarette related links, which I find somewhat bizarre.

Well, at least I'm no longer that curious - in due course, no doubt, the bug will bite again, and I'll do the correlation against the logs, in which case, dear innocent reader, you shall be confronted by graphs (and even possibly pie-charts).

Friday, May 30, 2008

This Week

So, what happened in the past week?

On Monday, there was VTES at Phillip's house. I tried out 3 decks, and, while I didn't do particularly well, I managed to oust my prey in two games, which was a fair effort for the evening

Tuesday, I was off sick

On Wednesday, I attended Geekdinner (pictures here), which was pretty enjoyable, despite riding my motorcycle in the rain (and, please note, the sound of the rain isn't soothing when you're on a bike). The trip back was enlivened by a cylinder cutting out, but I made it home alive [1].

My UPS's finally arrived, so I spent quite some time on Thursday prodding at them. Annoyingly, there's a bug in nut 2.2.1, which is the currently latest packaged version, which breaks support for several megatec usb UPS's, such as my new ones, so I had to roll my own nut 2.2.2 backport, which was not quite as simple as I would have liked.

Today (Friday) was mainly spent on the final stages of setting up our rather idle UltraSparc as a buildbot for numpy. After some annoying surprises (a variant of issue 198 amongst other things), and some fussing around to get multiple chroots installed (so we can test both g77 and gcc4's gfortran), things finally seem to be working properly (see this and this for example).

Workwise, we're testing the latest version of the SPG system, so much bug fixing. I loathed at qt a fair bit, but managed to get most issues resolved. We've also been poking at the robot-SPG communication, which has uncovered some interesting issues with the path planner, so , even there, I can claim to have had a reasonably productive week.

[1] I've always liked that song, the actual riding in the rain less so, though.

Friday, May 16, 2008


Proposition A:

Waking up on a cold morning, and realising that you don't need to get up for a while is one of life's pleasures.

Proposition B: (from Proposition A)

Waking up on a cold morning and realising you must get up now is a poor way to start the day.

Proposition C:

Days that start poorly have a higher likelihood of sucking than other days

Today amply demonstrated Proposition B, and provided no evidence against proposition C.

Sunday, May 11, 2008

Redoing my photo gallery

I have, for some years now, maintained an online gallery of my photographs on dip.

It has, for most of it's existence, been maintained by a rather complex and fragile set of shell scripts, so , with the recent spate of long weekends, I finally got around to replacing them with some more maintainable python code. This, after poking at the problem off and on for the last two weeks, reached a point that I started moving my gallery over to this on Friday. While the code is not bug-free yet [1], it works pretty well.

Why write yet another gallery generator, though?
  1. Why not? With python's tools, most of the heavy lifting can be passed off to PIL and elementtree, and it's just the file parsing that needs attention.
  2. Most existing packages are trying to solve a different problem, namely managing the gallery entirely through a web browser. I don't need to do that, and so focus on creating static pages offline.
  3. I'd have to write a tool to import the existing image annotations into whatever gallery I use.
  4. I've wanted to experiment with git for a while, so this project also gave me an opportunity to poke around at that.
Version 0.1 is available from at the moment, but I'll probably be rolling a version 0.2 with several recent bug fixes (see [1]) soon. Then it's time to look at adding an RSS feed generator.

[1] For instance, I had to fix a memory issue this evening. Keeping references to 100 odd 2592x1944 images after PIL's loaded them completely is not the brightest thing I've ever done.

CTPUG's python sprint day

Overall, I think the day went well. At one point we had 8 people in the room working on various issues, and, during the course of the day, we touched 11 issues by my count (, and submitted patches (in some cases multiple patches) to 10 of them.

Due to the time-zone issues, there wasn't much opportunity to push for review of the patches, but they are now there.

Tuesday, April 1, 2008

Vampire on the mind

I failed to distinguish between Nergal and Mysql at a glance today - I think my subconscious is trying to tell me something (whether it's about vampire or MySQL is open for debate, though).

Sunday, March 30, 2008


The bits that aren't either terrifying, frustrating or miserably uncomfortable are frickin awesome (and sometimes things are awesome anyway).

Thursday, March 27, 2008

Wednesday's Social game

I arrived somewhat late, due to SANUM stuff, and, with various people leaving early, and such, was only able to play 2 games, one 4 player and one (surprisingly slow) 3 player game. In both, I tried the !Malk deck, which I'm trying to fix (I had a fairly successful 90 card version, which I trimmed to 80 cards, and ended up making it overly finicky and fragile).

In the first game, Dan (Assamite melee weapon bruise and bleed) (starting) was bleeding me, bleeding Olivier (Tzimisce bleed), bleeding Roberta (!Brujah bruise and bleed). The combat setup, a large number of titles on the table, and not drawing stealth until quite late in the game meant I never really got much momentum going. Olivier ousted Roberta, who's deck struggled to make much of an impression on Dan's Assamites, which farmed quite efficiently. Dan's deck used Seraph Seconds and Tattoo Signals to do a ridiculous number of actions a turn, most of which was spent on setup. I was eventually able to oust Olivier when he transferred out an extra minion, and brought himself into lunge range on one of the few turns I found myself with stealth in hand, but, by that stage, I was struggling to keep my minions out of torpor, and was quickly overwhelmed by Dan's deck. Dan and Olivier bouncing minions into torpor, with Olivier's Tension in the Ranks on the table, helped my single lunge as well, but, ultimately, I took too long to oust him.

In the second game, I (starting) was bleeding Robert?'s Akunanse bloat deck, bleeding Dan playing a Saulot deck. I started off much better this game, and was able to combo a coma and diablerie to burn Saulot, which was great. Robert's deck was able to farm very successfully (Parthenon plus Secret horde plus blood dolls meant he was regularly pulling back 3 or 4 pool a turn). I made a couple of tatical errors as well - I should have force him to burn the Major Boon much earlier, and I should not have blocked a particular rescue attempt - I was hoping he would put more pressure on Dan, who was allowed to recover from having Saulot burnt with very little effort, and was ultimately ousted. Dan did eventually oust Robert, although, with the bloat of both decks, it did take a long time. A somewhat annoying game from my perspective, mainly because I should have managed to do better from the position I found myself in.

In both games, I drew too little stealth, and too many untap cards, which highlights a major problem with the card distribution. I also need to tweak the balance between vote and bleed a bit, since the deck ends up struggling with both not quite enough vote push or bleed push to finish off the prey. Probably pushing it to be a bit more stealth bleedy, and keeping the votes as a bloat and occasional aggressive sideline is the way to go. The crypt may also need tweaking - while Aristotle is very nice, he does tend to attract table hate, and the lack of a title is an issue. Perhaps replacing him with an extra Korah and a couple of other titled vamps is the way to go.

Tuesday, March 25, 2008

Misc Geekery

(or wasting time with elementtree)

Like many people, I have attempted and pretty much utterly failed to maintain the classic list of links style web-page. This is most notable example is my list of web-comics I read, which is both out of date, and horribly incomplete.

Part of this, is, of course, the effort to manually create the webpages needed, and fill in the content. However, since galeon's bookmark are stored in nicely structured xml, and I group the comics I follow in a not completely broken manner, I hit on the bright idea of pulling the bookmarks out using elementtree, and, furthermore, I can use galeon's bookmark notes to do the documenting about the comics.

So, after a couple of hours of prodding (much of it spent trying to get an overly complex design working before an important light-bulb went on), I now have a little python script that pulls all the data out, and writes a nice, standards conforming html file with all details - Now I just need to actually go through and sort out my comics bookmarks a bit, and I'll actually have a much more maintainable way of generating the list.

Of course, when I eventually move away from galeon (I've been using epiphany exclusively on my laptop for a while now, so it's likely to be not too far off), I'll have to tweak the script, and probably fiddle with the bookmark's conversion a bit to get all the comments across properly, but such is progress.

ah, the idle amusements of a life around computers.
(and to think I'd planned to spent the evening working on Sutekh)

Wednesday, February 27, 2008

Curse you, James Barrie

For never finishing "Shall we Join the Ladies".

Yes, I knew it was an incomplete play (it even says so in the stage directions). That is of absolutely no comfort whatsoever.

And I can't even swear revenge, what with the march of history and all that.

Darn and botheration.

Thursday, February 21, 2008

VtES social game report

(A "relying on blogger not to lose my notes" post)

So, Monday's social game was quite fun. I managed to fit 4 games in, the last (admittedly a 3 player), in just over 35 minutes, and tried different decks each time. I didn't try my !Malk deck, which I had wanted to play, since I somehow left out 2 vampires when reconstructing it, which was somewhat daft.

In the first game, I was playing an experimental Samedi deck. The table was Phillip, playing a !Salubri deck, bleeding Brendan's !Tor combat deck bleeding my Samedi, bleeding Marc's potence combat deck. A very combat heavy table. The Samedi deck didn't do particularly well, which, given the thrown together nature of it, is not that surprising. Damage prevention was a major issue, so I should prehaps add some Fortitude to the deck idea. I think there's a potentially fun vampire bloat module using Genina + Compress + Amaranth + Ritual of the Bitter Rose, and then rescue Genina if the blood hunt sends her to topor, but I need more Amaranths and Rituals to make that work. The concept of using Reanimated corpses and Shambling Hordes didn't come out at all, which partly reflects how the deck struggled. Marc's potence deck eventually swept the table, thanks to dealing vast amounts of damage, and gradually building up a stock of useful devices to boost bleed.

The second game saw me playing my Blood Brothers deck, bleeding Brendan with a Settite deck, bleeding Val's Eze bloat deck, bleeding Phillip's experimental deck, bleeding James' !Brujah bleed deck (I think I started, although that may be incorrect). Val's bloat strategy worked exteremely well, while Phillip's deck never really got going. I was able to oust Brendan, using Walk of Caine for a 5 bleed, but ran into the problem of not being able to fill up blood quickly enough to put pressure on Val. Having Angelo Banished twice in the game certainly didn't help me, either. I should look at adding the Sermon of Caine's, to get blood redistribution, and I need some additional pool gain (maybe a Powerbase Chicago?). I'd dearly love to have some Hungry Coyotes for the Hermana's hunting, but that will probably require searching eBay, and a secure ahven or two for Angelo is probably also a good idea, since the deck is heavily reliant on him. Anyway, 1 VP for that deck is not bad, and I can blame Brendan for not putting enough pressure on Val for my later troubles :).

The third game saw Val, playing a weenie gun deck, bleeding James (the deck never got going, but looked bruise-bleed'ish), bleeding Phillip, playing a Nossie bruise bleed deck, bleeding me, playing my Toreador Alexandra star vampire deck, with Val starting. Val got off to a very fast start, as the weenie's are prone to do, and, by adding camera phones, was setting up to be very dangerous. James never got into the game, not being able to defend against Val succesfully. I had a good opening few draws, pulling Alexandra early, being able to minion tap her, enchant down, and pull Elliot quickly as well, followed by another Minion Tap, leaving me with two minions,. Alexandra's untap ability and surprisingly good pool levels. While I never had the vote lock, since Phillip pulled out several titles, the early pressure from Val, and a well timed Scorn of Adonis enabled me to get a Kine through. A couple of bleeds, and I was able to oust Val before he ousted James. I did have a uncovered haven slapped on Alexandra, but was able to draw enough strike combat ends to survive that. James was quite weak, and I was able to get a couple of Aching Beauties down, so I ousted him quickly. Phillip had got a Army of Rats into play, but I was generating pool fast enough that I could cope. In general, the cards were very kind to me, in addition to the two minion taps, I drew three Aching Beauties, and both the Hunting Ground and the Art Museum quite early. which helped me keep my vampires sufficiently healthy. Due to the number of minions, the endgame between Phillip and me got quite tight, but, with two minions with Aching Beauties, I was able to oust him successfully. Despite not having the vote dominance the deck usually has, I'm quite pleased with how it went. Had Val been my predator, though, things would likely have gone rather poorly for me. Like any star vampire deck, the Toreador deck is rather fragile, but it can be very effective.

The final game was a three player game between me, playing my Ahrimane deck, bleeding Simon, playing his !Salubri deck, bleeding James, playing Micheal's Osebo deck. This game was rather madcap, since we were pushing to be over by midnight, and only started at just after 11:30 pm (in the end, me finished at 0:06, which was't a bad effort). I was able to sweep the table, thanks largely to how the table interaction fell out - James, while doing quite a bit of damage, never got enough blood back onto his minions, so was scrambling to keep them out of torpor by the end. Simon suffered from having a minion burnt in combat early, and I was able to get a Army of rats in paly, and defended it for long enough for it to significantly reduce his pool. I also was able to get good use out of the Carrion Crows + Aid from Bats combo, sprinkled with a few Strength of bear's + Scorpion Stings, so I was able to do enough damage in combat to be OK. I did have several vampires got to topor, and one vampire burnt. I also drew Ohoyo for the first time since I started using the deck. He provided some useful additional combat options, and the ability to swap him in to a combat was most useful. While he was burnt after only a few turns, he did enough damage to be worth the cost, and it allowed to to play a Vulture's Buffet with good effect. I eventually was able to play Tier of Souls, which, with the added bleed, gave me sufficient momentum to oust Simon and then James. A game, which, despite ultimately sweeping the table, was quite tight, and generally good fun. I think the Ahrimane deck is actually shaping up reasonably well now. While not A-class, it's got enough going for the bruise and bleed option to be quite dangerous when things go it's way.

Friday, February 15, 2008


I'm usually fairly upbeat about humanity. I generally believe that most people are pretty decent, and so forth, despite the, at times, overwhelming evidence to the contrary. On days when I have to be early, though, this tends to be much less true.

While part of this is due to my just not being an early morning person, and the consequent bad mood that puts me in, much of the blame is due to having to deal with early morning traffic. The selfishness, lack of forethought, general stubbornness and sheer stupidity to be seen in a few minutes of driving is enough to severely strain my tolerance.

Of course, this raises all sorts of questions: Is driving merely well suited to bringing out the worst in people? Are people always like this, and I just don't notice most of the time? Is it just because I'm really irritable at that time of the morning (and usually running late)? All of them?

Probably the only firm conclusion that can be drawn is I really do need to work harder at avoiding early mornings.

Tuesday, February 12, 2008

Common experiences

Communication is much easier when people can call on common experiences. While many concepts and experiences are fairly universal, there are others that are far less common, and, while it may be quite possible to cover the broad outlines, it is very difficult for someone who has not shared a similar experience to truly grasp the details.

Dealing with a mosquito buzzing around inside your helmet on the N2 probably falls into the "not universal" category.

Wednesday, January 30, 2008

The Eskom Rant

In which nothing particularly new is said about the situation, no great answers are provided, and the tone of the debate is not raised to any great height.

That we have a power crisis is a major problem, and shows poor planning. That we have a crisis, and no particularly coherent response from the warning signs in 2006, is an example of poor planning.

Several things that have struck me during the current situation:
  • A scheduled power cut that doesn't happen is almost as bad for productivity as a power cut.
  • Eskom ain't at all good about providing information about why things go bad - their press releases are appalling. "We need to load shed, tough cookies" basically.
  • This leads to lots of rumours (X% of the generating capacity off-line, so much power exported to other countries, etc, etc.), and the lack of information from Eskom makes the denials implausible.
  • Unfortunately, the people jumping up and down about the rumours most ardently (the DA and Solidarity stand out here) aren't plausible either, so it's really hard to good any feeling on what the heck is going on
  • WTF is up with poweralert's trend pages. The displayed historical trend changes radically over quite short periods of time.
  • While the working laptop is nice, until everything that connects me to the Internet at iTL is also on various long-lived battery backups, I can only work at about half capacity during a power failure. When did I become so reliant on Google and other online services?
  • Why is iTL listed as both iThemba Labs and Cyclotron in the load shedding schedule? It makes no sense.
  • Although I finally found a real personal use case for searching pdf's. Pretty much every other document I deal with, I need to read the entire thing, and, since most are academic papers with figures, I usually use the figures to navigate if I need to find something again.
  • Considering the number of power outages, I'm surprised more of the hardware I maintain hasn't died.
  • Discovering I mis-set my alarm clock after yet another power failure was an unpleasant surprise.
  • I need new UPS's for some of the Stellenbosch machines.
  • I badly need new UPS's for home.
  • Why is it going to take so long to build another power station? There is surely lots of scope for just throwing extra resources at the project (it's not software after all)
  • Aren't we due to have the pebble bed reactor come online around 2013 anyway?

Tuesday, January 22, 2008

New Toy

I have a rather old laptop. Considering that I acquired it at the end of 2001, it's served me exceedingly well, and proved rather robust. All good things must come to and end, and, although I've kept the laptop alive despite a gradually failing hard-drive for some time, the screen, which never quite recovered from water damage due to being caught in some rather heavy rain on the bike, eventually gave up the ghost.

Thus I have a new, shiny, fast toy. I acquired a Fujitsu-Siemens Li1718 laptop (dual-core 1.78Ghz Pentium, 160GB harddisk, ATI graphics, etc) (pictures here). Overall, a very nice shiny toy.

My home desktop machine is still marginally more powerful, but, considering I only spent 7000 rand on the laptop, and I spent slightly more than that on the desktop machine 18 months ago, it's quite a testament to how technology prices have continued to fall.

Installing Debian was quite painless - The latest etch installer had minimal trouble, and upgrading to lenny was completely painless, thanks to doing it at campus, with a nice fast local mirror available (I've not been tracking testing for a while, so I thought this was a good time to start doing so again). The only thing not working out of the box is the wireless network card, but there are patches for madwifi floating around, so hopefully that will fix itself in due course, and I'm not such a heavy wireless user that it really matters. The graphics card is currently not accelerating OpenGL stuff, but the current work on the DRI drivers should solve that fairly soon. There was a time when I would have booted into the windows partition just to check things, but these days my confidence in Linux's hardware support is such that I no longer bother, so I honestly don't know what was pre-installed on the machine.

And, with Eskom's current failure to provide the country with reliable power, it is nice to once again have a machine with a battery life that can be measured in more than seconds (Of course, this means I lose an excuse not to do work, but the toy's worth it.)

Monday, January 14, 2008

Hermanus Hike

Over the weekend, I went hiking with Simon, Adrianna and Simon's Mom Pat in the Vogelgat Nature reverse near Hermanus. Overall, a most enjoyable weekend (hopfully I'll have the photos up by the weekend (edit: now up at my dip site). Observations from the experience
  • I'm no longer hiking fit. Since was never an issue when I worked at UCT, I blame the lack of hills in iThemba LABS buildings.
  • Guy's Pool was worth the hike, though.
  • It's a very pretty nature reverse
  • I'm probably overly addicted to trying to construct Panoramas at the moment.
  • Consequently, I could use a larger memory card for my camera
  • Being far from it makes me realise just how much a fan of indoor plumbing I am.
  • I need to find a tame botanist to drag along on such trips. Identifying things as "pretty flower" lacks accuracy but I don't want to invest the effort into learning how to identify plants personally.
  • The people who made the paths did a truly impressive amount of work.
  • They weren't kidding about the slippery rocks, either.
  • Hopefully, my next water bottle won't have the cap disintegrate mid-hike.
  • Weather changes fast on mountains (I knew this, but it was a reminder)
  • Next time, I'll take a Bookcrossings book to leave at the hut.
  • There will be a next time, if for no other reason than I couldn't get good photos of the Main falls because of rain on the Sunday.
  • The wind on the way back from Hermanus was impressive - the rainbow was pretty.

Sunday, January 13, 2008


On Friday, I defrosted the fridge in the lab.

It's a sad comment on the state of the fridge (regrettably, I didn't think to take my camera) that actually achieving what I did on Friday, which was to get almost all the ice out of the fridge, represents a significant achievement, and occupied a considerable chunk of my time. Anyway, the fridge is now again usable.

Probably the frustration of spending most of my day wrestling with a fridge is why I got involved in debugging a postscript issue on #clug - for whatever reason, evince doesn't properly render postscript without the %%Page: comment deliminators - once we figured that out, everything worked a lot better.