Digital-Scurf Ramblingsmumble mumble

Mon, 29 Nov 2004

arch-pqm requires python 2.3…

…or python 2.2 and a lot of tickling.

I checked out the latest arch-pqm from Colin Walter’s repository and proceeded to try and get a PQM going on my server. I needed to get this to work without any .forward or .procmailrc magic so I started by writing a little tool to fetch emails from a POP3 account and write them to files.

Then I had to get arch-pqm working. Now arch-pqm claims to require python2.3 so I set about trying to persuade it that 2.2 isn’t so bad and maybe it should get on with it. The easiest bit was the argument parser had a broken foo in (bar) test which I stomped on.

But then came the joy of os.walk() which isn’t in python2.2 so a little hack-fest later and I created os_walk() which behaves pretty much the same and works in python2.2.

def os_walk(path,topdown=True):
    l = []
    def fooble(l,dir,ents):
       ds = []
       fs = []
       for e in ents:
           if os.path.isdir("%s/%s" % (dir,e)):
               ds.append(e)
           else:
               fs.append(e)
       if topdown:
           l.append((dir,ds,fs))
       else:
           l.insert(0,(dir,ds,fs))
    os.path.walk(path,fooble,l)
    return l

Perhaps that’ll be useful to anyone else trying to get arch-pqm working on a woody box.

Now to submit merge requests to it. \o/

[23:22] | [tech] | [semi-permalink]
99 RC bugs on the wall, 99 RC bugs…

…take one down, squash it with work. 104 RC bugs on the wall.

This weekend just gone saw a small BSP in the UK along with various parties around the wall. This meant that a reasonably large number of us gathered at Steve McIntyre’s house in Cambridge for beer and bug squashing. There was a lot of new faces at the party and I for one enjoyed meeting new people immensely. Shouts go out to Paul, Steve, Eddy, Tim and everyone else I met for the first time (those names stick in the mind).

The party also provided an opportunity for more people to meet the cheap imitation and also Sideshow bob.

People also got to see more of Nattie, who has been to a couple of the summer Debian-UK BBQs, which was good. And I do hope we haven’t scared off the new people. I actually got a pile of Debian stuff done, which was nice because I have been letting so many people down recently with respect to Debian stuff.

All in all, a good weekend and I look forward to getting around to a bit more Debian stuff as and when I get time. Just keep bugging me :-)

[17:25] | [debian] | [semi-permalink]

Sun, 28 Nov 2004

We have no bananas…

…no bananas today.

Would people please not feed me enough alcohol that I dream odd dreams about a very British Justin Timberlake clone and myself having conversations about whether not not “Edible bread” (a) is nicer than “Inedible bread” and (b) grows on the banana trees we planted in the car park or not.

That is all.

[12:38] | [life] | [semi-permalink]

Sat, 20 Nov 2004

Before this river there comes an ocean…

…I gotta have faith

Today I have been baking. I prepared the fruit for my christmas cake some days ago and have today made the rest of the mix and begun to bake it. My right arm is now incredibly tired due to all the mixing but the recipe for my cake is updated including method.

See my recipes pages for the recipe. I will update that page with the details of the almond paste and icing at a later date.

[20:00] | [life] | [semi-permalink]

Fri, 19 Nov 2004

If you're ready…

…come go with me.

Last night at about midnight I completed the last tweaks to my wiki to get it into the same style as the rest of the digital-scurf.org websites. This means that my main website my arch website, my blog and also my wiki all share similar shape and navigation.

I have every intention to reimplement the entire thing but not until I have finished rewriting aranha which I am currently doing in my arch archives.

[09:46] | [intarweb] | [semi-permalink]

Fri, 12 Nov 2004

Q. What is the plural of virus?

A. Viruses

Just today; my least-favourite non-word was used by someone on a list. What’s worse they asserted that the plural of ‘virus’ was ‘virii’.

I simply must… restrain… fist… of… death.

Useful references for why ‘virii’ is completely and horribly and utterly incorrect include:

* http://dictionary.reference.com/help/faq/language/v/virus.html
* http://www.linuxmafia.com/~rick/faq/plural-of-virus.html

[16:31] | [tech] | [semi-permalink]

Thu, 11 Nov 2004

In memoriam…

I thought that on this day of reflection and memorial I would share one of my favourite poems with you all.

Stop all the clocks, cut off the telephone,
Prevent the dog from barking with a juicy bone,
Silence the pianos and with muffled drum
Bring out the coffin, let the mourners come.

Let aeroplanes circle moaning overhead
Scribbling on the sky the message He Is Dead,
Put crêpe bows round the white necks of the public doves,
Let the traffic policemen wear black cotton gloves.

He was my North, my South, my East and West,
My working week and my Sunday rest,
My noon, my midnight, my talk, my song;
I thought that love would last for ever: I was wrong.

The stars are not wanted now: put out every one;
Pack up the moon and dismantle the sun;
Pour away the ocean and sweep up the wood;
For nothing now can ever come to any good.

W.H. Auden

[15:27] | [life] | [semi-permalink]

Wed, 10 Nov 2004

Googlebar amusement

Gerald Duck recently realised that his googlebar held an amusing list of recent searches. He asked what others had in their googlebar search history and so here is mine. (Note, it does kinda demonstrate my unerring geekiness)…

* gnu arch integration tla
* postgresql language howto
* “everything you know is wrong”
* redbus interhouse
* debconf5
* utf-8 tinyfugue
* cambridge mike hall
* cambridge microsoft research labs
* data protection registrar
* “writing gnu emacs extensions”

The chronological order is reversed (I.E. most recent first) and mozilla’s googlebar stores less history than IE’s but I find it most amusing to see (a) how rarely I use google and (b) how consistently geeky my use of it is.

What do you search for?

[10:17] | [life] | [semi-permalink]

Tue, 02 Nov 2004

I demand a better future…

…or I might just stop loving you.

So following on from Tollef’s recent pyblosxom-related posting I thought that the discovery I made about how to fix unicode comments deserved to be blogged for the world to see.

Scott James Remnant pointed out to me on IRC that there exists a problem with people who post comments in utf-8. The issue it seems is that the comments plugin assumes uploaded comments are in iso-8859–1 which sucks a little. Line 200 of the standard comments.py is about the right place for a fix; and here’s mine. Remember I’m not a good python coder…:

Replace: cfile.write(’<?xml version=“1.0” encoding=“iso-8859–1”?>\n’)

With:

        try:
comment[‘description’].decode(‘utf-8’)
cfile.write(’<?xml version=“1.0” encoding=“utf-8”?>\n’)
except:
cfile.write(’<?xml version=“1.0” encoding=“iso-8859–1”?>\n’)

[11:02] | [tech] | [semi-permalink]

Mon, 01 Nov 2004

Moon, יָרֵחַ, Lua…

…whatever you want to call it.

This weekend I have been mostly playing with Lua 5.1work2 (a prerelease of Lua 5.1) and I have been enjoying trying my hand at a deep and scary change. I have added documentation strings both to the internals of the language and to the language itself. I wanted introspectable documentation a-la python docstrings; so I added the following production…

docstring ::= '-=-' CHARS '-=-'
file ::= [docstring] chunk

…and then changed the following production to be…

funcbody ::= '(' parlist ')' [docstring] block end
tableconstructor ::= '{' [docstring] [fieldlist] '}'

(See The Lua Manual for the original productions)

Which allowed me to have docstrings delimited by the dash,equals,dash sequence at the start of files, functions and tables. Since my class system uses a table to build the class body; this allows me to document classes too. Internally to the language, userdata objects can also have documentation attached to them; allowing the C-side to attach documentation without having to have lua wrappers all over the place.

This change proved to be really quite invasive; but I guess I’m happy with it for now. Just waiting on the Lua team to decide whether or not they want an official GNU Arch archive before I go dumping this lot into arch to begin serious work on Aranha at last.

[10:58] | [tech] | [semi-permalink]