About Archive Tags RSS Feed

 

Entries posted in December 2005

Torrents + Perl

2 December 2005 21:50

BitTorrent

BitTorrent is one of those applications that most people love. I love it when it works but I find it unnecessarily cumbersome to deal with.

One example of what I dislike in the software - you can't tell when a torrent has finished. Start a download:

btdownload{curses headless} foo.torrent

Once the download has finished it doesn't stop, it just continues to share the files and allow others to download faster. Great 99% of the time. But utterly sucky when you want to download XX files.

The natural temptation is to run:

for i in *.torrent; do \
  btdownloadheadless $i
done

That doesn't work. The first one never finishes. There isn't even the option of exiting once the download has completed - or running another command, say.

(OK my copy has "-at_finish=/bin/foo" - but only because I patched it. This just seems like a basic requirement, right?)

Despite that it works well so I can live with it.

My other irritation is that there is no functioning Apache mod_bittorrent where files into a directory have their .torrent files created and handled magically.

There was a project to do this, but it appears dead now.

Shame. Every now and again I get tempted to work on it, then I remember that I have big limits.

ION

Lots of Perl coding today.

Simple plugin interfaces, and cleanups of old code. Almost enough to keep me awake.

| No comments

 

Xen and the art of wishlist pimping ...

6 December 2005 21:50

New article: Using Xen 3.0 on Debian Sarge [Fixed the broken link].

Nothing much else happening today. I woke up around 11AM and was just going back to bed when the postman came to deliver a lot of stuff from my wishlist :)

Now the question is "Do I watch some DVDs, or go back to bed like I'd planned?"

Two new books too - The Picture of Dorian Gray, the only film to give me nightmares as a child, and 'Tales from the perilous realm' which will almost certainly have its cover copied into a tattoo at some point in the new year :)

| No comments

 

How to look stupid in public.

6 December 2005 21:50

  1. Open Emacs & compose an email to public mailing list.
  2. Save to temporary file.
  3. Run spell-checker because you're paranoid, and also slightly clumsy.
  4. Paste message into new mutt window.
  5. Give it a quick re-read to make sure it is legiable and relevent.
  6. Notice a couple of unclear sentences.
  7. Edit them on the fly inside the email program.
  8. Send the message.
    • Wait five minutes for the mail to arrive back from the list and cry at all the spelling mistakes due to the editing in step #7

Conclusion? Write the day off, and go to the pub …

| No comments

 

Hmmm

12 December 2005 21:50

Still not dead.

Close, though.

| No comments

 

Mousetrap + Xen.

13 December 2005 21:50

Xen

I updated the script I wrote to create new Xen instances of Sarge.

It is still pretty nasty but it can now create a new Sarge installation with networking, OpenSSH, users and groups all in the space of a few minutes:

./create-xen-image.pl --hostname=vm01 \
  --ip=192.168.1.245 \
  --gateway=192.168.1.1 
  --dir=/home/xen/

Unfortunately it doesnt live in a CVS module of its own, rather one I dedicated to hosting resources associated with articles on the d-a.org website. Maybe time to revisit that?

MouseTrap

Whilst in a quiet mood, waiting for my tea to cook, I decided to amuse myself by playing mousetrap - something I've not touched for a month or two.

In a fit of enthusiasm I imported mousetrap into CVS - comments/feedback welcome. [Simplistic arcade game, uses SDL, Debian Sarge package available.]

| No comments

 

xen-tools

19 December 2005 21:50

  • xen-create-image
    • Create a new Xen virtual machine with networking, etc.
  • xen-delete-image
    • Delete an existing image.
  • xen-duplicate-image
    • Duplicate an existing image, whilst updating the network settings.
  • xen-list-images
    • Show all the images, and their networking details.
  • xen-update-image
    • Update an offline image with 'apt-get update; apt-get upgrade'.

Radu Spineanu is interested in maintaining a Debian package, so they should be appearing in Sid sometime soon.

(I'll post a Sarge backport afterwards.)

| No comments

 

xen-tools hits sid

21 December 2005 21:50

Thanks to Radu Spineanu's hard work there is now a package of xen-tools in the Debian archive.

True to tradition the moment the package entered unstable was a couple of hours after a fresh release.

Once the package enters testing I'll upload the v0.5 release - which features better progress indicators, more unified output, and the ability to add/remove packages from the base installation. (By passing options through to the invokation of debootstrap.)

The backport for Sarge is up fully up to date though, so if you're using Sarge just grab it via apt-get.

| No comments

 

Perl Mail Filters?

22 December 2005 21:50

Procmail Sucks

OK sucks is a bit strong: It is both insanely extensible and utterly horrid to work with.

I wish there were a decent perl replacement for Procmail. Seems to me that regexps and piping through external programs covers 99% of the average procmail use cases.

Perl has a lot of modules already existing for working with mbox files, maildirs, and even messages.

It seems that parp should be that project but it hasn't been touched since 2002. PMS is another dead project.

Does anything exist already? Or am I stuck in procmail hell?

I'd be tempted to start my own project … "down that path lies madness"

| No comments

 

The evolution of a shell script

24 December 2005 21:50

The script starts out small and does a single job.

You realise that you can do so much more, so it gets bigger and more arguments get added to it.

Passing more than four parameters, in the correct order, gets painful so you add some option parsing code.

Suddenly the number of options grows, so you add a manpage to try to explain the parameters and what they are used for.

Other people start using the script and wish to change the behaviour, so you add yet more command line switches and complexity.

Gradually you realise your once-tidy script is now a complete mess, so you remove 50% of the code and move it into external "plugins", or helper scripts.

The small script is now much neater, but suddenly users cannot find the code they wish to change - they have to grep through all your helper scripts and plugins to find the code to change.

Beacuse users cannot find the right code they submit patches making your script bigger and more complex.

Repeat indefinitely.

p.s. xen-tools 0.6 is out. It has plugins ;)

| No comments

 

Edinburgh Meetup

29 December 2005 21:50

KeySigning

Today I went to meet Paul van Tilbur for coffee hot chocolate and exchange key fingerprints.

A nice chat on a nice evening. I was pretty sleepy since I'd been forced to get up and leave the house at 10AM this morning to donate blood samples to the local vampires doctors.

Getting home afterwards was a bit challenging as there was a fire river - really a torchlit procession + fireworks.

Several of the streets on my route home were closed to traffic, so the busses weren't running. I walked part way home, stopping of en route to buy some DVDs.

Once I did manage to get a bus going in the right direction I stupidly creatively managed to get on the wrong one. It immediately changed direction and left me going away from my house!

I guess I was more tired than I'd realised. Anyway I got off the bus, and now I'm going to watch part of one of my new films before having an early night.

| No comments