The dreams of children

My 4-year-old daughter climbed into bed this morning and asked if we’d like to hear about her dream. This is what she told us:

There was a princess in a tall, tall tower. A prince rescued her and she fell flat on her face. The prince thought she was sleeping and kissed her, but she was actually dead.

I hope she ends up becoming a writer, I do like a bit of dark fantasy :)

Cool stuff in October

There’s lots of cool stuff going on in October in Bristol if you’re into literature and SF in particular. There’s the Bristol Festival of Literature running between 14th and 23rd October with heaps going on all over the city. During the festival on the 22nd it’s BristolCon 2011, Bristol’s Science Fiction and Fantasy convention, and there’s a bunch of cross-over events happening. Also my friend and local author Gareth Powell is taking part in a Word of Mouth event at The Thunderbolt in Totterdown on the 5th October. A very cultured month in the offing!

New theme and new headers

I quite like the new WordPress theme, so I’m going to use it. I was looking for a theme that supports the different post types and allowed for good customisation and of the free ones I found that I liked this was by far the best.

The header pictures are all cropped from my own photos taken over the past few years. I’m not a particularly great photographer, but I like the images and they reflect some of my current obsessions. Feel free to use them under the terms of a Creative Commons Attribution ShareAlike license.

Aside

I’m messing with my blog. This is meant to be an “aside”, so lets see how this turns out…

Books in 2011

I never did a new year’s resolutions post this year.  Oh well :)   One of them was to try and read more, plus try to read/re-read some mythology in translation.  One part of this is that I want to keep track of what I’ve read, hence this post.

  1. Surface Detail, Iain M Banks.  01/01 – 22/01.
  2. The Táin: From the Irish epic Táin Bó Cuailnge, Thomas Kinsella (trans.) and Louis Le Brocquy (illus.)  22/01 – 30/01.
  3. The Kraken, China Miéville.  31/01 – 15/03.
  4. The Quantum Thief, Hannu Ranjaniemi. 15/03 – 22/03.
  5. American Gods, Neil Gaiman. 23/03 – 30/03.
  6. Before They Are Hanged, Joe Abercrombie. 31/03 – 06/04
  7. Last Argument of Kings, Joe Abercrombie. 07/04 – 16/04.
  8. The Lovecraft Anthology Volume 1, Dan Lockwood (Ed.) 17/04 – 20/04.
  9. Deep State, Walter Jon Williams. 21/04 – 05/05.
  10. At The Mountains of Madness, HP Lovecraft, INJ Culbard (Illus.) 22/04 – 23/04.
  11. The Night Sessions, Ken MacLeod. 06/05 – 19/05.
  12. Dark Spires, Colin Harvey (Ed.) 20/05 -
  13. Zoo City, Lauren Beukes. 20/05 – 16/06.
  14. Wireless, Charles Stross. 17/06 -
  15. The Quest for Arthur’s Britain, Geoffrey Ashe (Ed.). 25/06 – 30/06.
  16. Camelot and the Vision of Albion, Geoffrey Ashe. 30/06 -
  17. Rule 34, Charles Stross. 09/07 – 15/07.
  18. The Evolutionary Void, Peter F Hamilton. 16/07 – 23/07.
  19. Vast, Linda Nagata. 23/07 – 06/08.
  20. The Bohr Maker, Linda Nagata. 07/08 – 25/08.
  21. The Recollection, Gareth L Powell. 26/08 – 02/09.
  22. Damage Time, Colin Harvey. 02/09 – 28/10.
  23. Sixty One Nails, Mike Shevdon. 29/10 – 14/11.
  24. A Game of Thrones, George R. R. Martin. 15/11 -

And that’s all so far. I guess I’ll be able to see just how widely, or not, I read by the end of the year.  I often have more than one book on the go, but so far it’s been sequential so far this year.  Link targets vary, some Wikipedia, some author or publisher sites, some reviews – there might be a tooltip if you hover over the link and I remembered to add one.

BristolCon ’10

I went to BristolCon’10 last weekend, a Science Fiction and Fantasy convention held at the Ramada Hotel in Bristol. It was BristolCon’s second year, and my first convention since going to Games Day ’87 as a teenager.

It was a great day out.  Loads of interesting panel discussions, a range of dealers and artists displaying their work and plenty of interesting and friendly people to talk and drink with.  High points of the day were chatting with Alastair Reynolds during the mass book-signing at lunchtime, Eugene Byrne‘s talk on the fantastic cityscape of Bristol and watching John Meaney and Juliet McKenna terrorise Joe Abercrombie and Cheryl Morgan during the “Writing Fight Scenes” panel.  I enjoyed all the panels I attended (all but two I think), came second in the pub quiz with a group of people I’d never met before (well, except for Mark) and narrowly avoided becoming embarrassingly drunk (at least I think I avoided it…)

Strangely, I was a little apprehensive before the Con.  I’ve been a fan of SF and Fantasy for as long as I’ve been reading, but I’ve never really been into Cons and fandom although it has intrigued me.  I guess my reluctance to take part in the past has been due to my own insecurities as much as anything else; I feared things might be cliquey or exclusive and I’m happy to have been proved wrong, at least by the folks at BristolCon.  I’ve been going along to the Bristol Science Fiction and Fantasy Society monthly meetings on and off for a few months this year and have met a group of friendly and interesting people, many of whom were involved with running BristolCon, so I’ll be going again next year.  Thanks to everyone involved in organising a fun and interesting day!

For the interested, there are a handful of photos on my Flickr page, and a list of links to other BristolCon’10 write-ups here on the BristolCon site.  Search Twitter for the #bristolcon hashtag for a load of associated tweets.

A new decade

Happy New Year!

It goes to show just how much I update this site that 2009′s Happy New Year post is still showing on the front page as I type this :-)

I don’t think I’ll bother publishing a list of resolutions this time around, suffice to say that it’s 30 days since I last smoked a cigarette, I never did start swimming regularly again but I do drink less, so that’s a qualified failure.  Still, 30 days and no smoking is pretty good so here’s to that being 395 days this time next year (although I haven’t smoked full-time for years and I’ve gone far longer without a cigarette before. Ach, come on – positive thinking!)

Changing the subject, I’ve recently got around to going back over the content here categorising and tagging posts and generally tidying up.  This blog has moved hosts, changed URL and been restored from backup more than once and is in a bit of a mess.  There’s a fair amount of linkrot that needs sorting and plenty of typos and markup errors that need correcting.  My aim is to get it all sorted out so at least what is here looks OK and doesn’t make me look like too much of an amateur ;-)

Looking back now I will admit to wincing a little when reading some of the posts.  I suppose this is natural when you consider that the site’s been around for 7 years or so and over this period I’ve done a fair few things, grown older, changed.  Nevertheless I’m leaving it all here unless it’s actively misleading.

As for new content… well life’s pretty busy these days and doesn’t leave a lot of time for blogging.  My employer obviously doesn’t pay me to maintain a personal blog and my family takes up much of the rest of my time.  I’m not complaining, just observing.  I’d like to think that writing is something I’ll take up more seriously in the future, but for the time being I don’t expect to post much here other than the occasional how-to piece.

Hacking .deb files

This is a follow-up to my previous post about downloading the Ubuntu Flash plugin package from behind a proxy. Rather than having to go through a failed installation, editing the postinst script then re-installing, here is an alternative method where the package is downloaded, unpacked, the script edited then the package rebuilt and installed in the normal way using apt-get.

The procedure below uses flashplugin-nonfree as an example package, but this process could be used to edit any .deb with a little care – just change the package name.

Having said that, it’s a quick-and-dirty fix-up and as such only really suitable if you only need to make simple changes to the control scripts such as postinst, prerm, etc, in an existing package. Major changes to a package’s structure or contents will need more care and you should take a look at the Debian Maintainers Guide or any of the other HOWTOs and FAQs available on the web for detailed information on how to do this.

Needless to say you’ll need to do much of this as root. Have a care.

  1. Download the updated debian package using apt-get -d install flashplugin-nonfree. This will place the latest version of the package in /var/cache/apt/archives without actually installing it. Note that if you have multiple updates to do, you can use apt-get -d upgrade instead; this will also download any other packages that are currently due an upgrade at the same time – this is fine, they will be installed normally at the end of the process along with the modified package.
  2. Change your working directory to /var/cache/apt/archives then make a backup: cp flashplugin-nonfree_$version_i386.deb /root/
  3. Create a tempory directory structure where you can unpack the archive: mkdir -p /tmp/flashplugin-nonfree_$version_i386/debian/DEBIAN
  4. Extract the contents of the .deb: ar -x flashplugin-nonfree_$version_i386.deb. This will result in three files, debian-binary, data.tar.gz and control.tar.gz. You can delete the debian-binary file.
  5. Move data.tar.gz into /tmp/flashplugin-nonfree_$version_i386/debian/ and the control.tar.gz file into /tmp/flashplugin-nonfree_$version_i386/debian/DEBIAN. Unpack the archives in these locations and delete the tarballs.
  6. You can now edit the postinst script in /tmp/flashplugin-nonfree_$version_i386/debian/DEBIAN to include the proxy settings as outlined in Installing the Flash plug-in on Ubuntu from behind a proxy.
  7. Now you are ready to rebuild the package. Change directory to /tmp/flashplugin-nonfree_$version_i386/ and run dpkg-deb --build debian. This should create a file in the debian/ subdirectory called debian.deb. You may see some warnings about the control file containing user-defined fields – these can be safely ignored.
  8. Now move the debian.deb file into /var/cache/atp/archives using the same filename as the original package: mv debian.deb /var/cache/atp/archives/flashplugin-nonfree_$version_i386.deb.
  9. You should now be able to run apt-get install flashplugin-nonfree or apt-get upgradeand the package will be installed using the new .deb file complete with proxy information in the postinst script to enable downloading the binary.

Flickrtweeter: automatically tweet your flickr pics

A few weeks ago I decided to roll my own script to automatically twitter an update if I posted a photo onto my flickr pages with a certain tag.  I know that there are third party services out there that can do this for you (e.g. Snaptweet, Twittergram) but I thought it’d be an interesting project to do it myself.  As well as (obviously) requiring flickr and twitter accounts, it also requires a bit.ly account and API key as it uses this service to produce a shortened URL for the photo to include in the tweet.

The script is written in Perl and is fairly straitforward.  It pulls the Atom feed of my flickr account and checks any photos tagged “twitme” against a list of photos it has already seen and tweeted.  It then passes the photo’s URL through bit.ly to get a shortened version and builds a tweet using a standard prefix, the photo’s title from flickr, and the bit.ly’ified URL.  It then attempts to post the tweet.

The script uses LWP::Simple for HTTP GETs to flickr and bit.ly, XML::Simple to parse the responses, Storable to maintain a cache file of seen photos, Net::Twitter to talk to twitter itself and URI::Escape to escape the photo’s URL before passing it to bit.ly.  It also uses the sysopen call from Fcntl to manage a lockfile – I run it as a cron job so this seemed a sensible precaution.

It can be configured by setting variables at the start of the script.  All are commented (I hope) reasonably clearly.  It can be downloaded and used under the terms of the GNU Public License.  I originally called it flickr2twitter but as this appears to be the name of a Firefox Addon I have renamed it flickrtweeter.