Archive

Archive for the ‘Tech’ Category

Open Science

August 4th, 2006

Bioinformatician Pedro Beltrao has posted what is probably the most thought-provoking article I’ve read all year.

His basic tenet is that the the current mechanisms by which scientific research is produced have become counter-productive. Rather than just whingeing about it he proposes an alternative mechanism.

During my ill-fated career as a PhD student the constant feeling of being in competition with everyone else was something I hated. That was probably partly due to my state-of-mind at the time but I always got the impression that talking to other scientists was a bad thing.

In my current job I deal with researchers in several different fields. Many of them are doing really cool research that I would love to talk about but I don’t.

Pedro’s suggestion may turn out to be unworkable but I applaud the sentiment.

Tech

Post LugRadio Live

July 29th, 2006

Right I’ve now had a week to recover from LRL and to internalise some of it.

Good Points:

A plethora of informative and entertaining talks. Too damn many in fact. I missed quite a few I wanted to talk to see due to scheduling conflicts.

My talk went quite well, although being scheduled against Bruno and Simon Phipps was a bit of a bugger. I can’t wait for the video of Bruno’s talk to be released.

Talked to a researcher from Coventry who was interested in the whole concept of Grid data repositories so something useful from a work stand-point may come out of it.

Dinner at some wetherspoons pub with a random bunch of (very nice) geeks a bumped into on saturday night.

The very nice beer called Titanic that they were serving in the afore-mentioned pub.

Bad Points

Completely failing to talk to any of the #lugradio regulars.

It was too damn hot.

Spending the whole of saturday in a complete haze due to talk anxiety.

Onwards..

Talked to a researcher from Coventry who was interested in the whole concept of Grid data repositories so something useful from a work stand-point may come out of it.

Met a chap from Southampton who was familiar with the OMII project and of course completely failed to get his email address. In the unlikely event that this is you, could you send me an email please?

After seeing Christian Schaller’s GStreamer talk I’ve spent all day looking at the python gstreamer bindings and have gotten as far as writing a noddy media player that prints out any metadata it finds in the media. Now I just have to work out how to re-write the metadata and I should be able to completely replace the tagging infrastructure in Peapod with a better version using gstreamer.

Here are the slides for my talk.

Tech

LugRadio Live: Pre Game

July 21st, 2006

Having just had a look at the LugRadio Schedule (due to excellent work by popey) two things occur to me.

1) Buno Bord is a being of unimaginable evil. He kicks Andrex puppies for fun. And anyway how edifying is a talk about swearing going to be?

2)Do you really want to listen to an hour of Simon Phipps getting heckled about why Sun haven’t open-sourced Java yet?

Obviously your should come and listen to my talk about Grid Computing. I’m not evil, Java isn’t my fault and you’ll
learn something.

<fx=”tumbleweed rolling past”>

Oh Dear.

I’d better get my stuff packed

Tech

Saturday Talk at Gllug

June 22nd, 2006

I’ll be doing the first run of my Grid Computing talk at Gllug on Saturday. Fairly nervous even though I know this is the friendliest of audiences. I shall probably be a nervous wreck before LugRadio Live next month.

Schedule of Talks

Tech

Annoying Gnome-Blog Bug

June 10th, 2006

So after installing Dapper on my new laptop (more on this in a later post) I decided to give gnome-blog a whirl. I like the idea of in-line spell checking and the panel applet looks quite nice too.

Anyway when pointing it at my blog it insists on trying to connect to http://site.domain/wordpress/xmlrpc.php and there seems to be no way in the configuration GUI to persuade it that my blog lives at http://site.domain/xmlrpc.php

Looking around launchpad and bugzilla.gnome brings up the following bugs.

https://launchpad.net/distros/ubuntu/+source/gnome-blog/+bug/44867

http://bugzilla.gnome.org/show_bug.cgi?id=167499

It seems fairly sensible to me to just change xmlrpc_url in the code so that it doesn’t make any assumptions about the location of xmlrpc.php. But it’s probably not possible to do without breaking at least some peoples currently working gnome-blogs.

Anyway for the moment you can always hack .gconf/apps/gnome-blog/%gconf.xml by hand to make it work.

Tech

SWIG and C++ on Solaris

April 27th, 2006

Here at WeSC we have a potentially very useful piece of kit from Cybula which is essentially a set of neural-net based pattern matching algorithms blown into some FPGAs.

Now I have to advise some researchers about how easy it will be to use this kit for a particular project. My ability to advise is limited by the fact that the API for this kit is written in C++. This makes it hard for a mere sysadmin like myself to play with it.

I have been vaguely aware of SWIG for a while as a mechanism for building language-bindings to C and C++ so I decided to give it a whirl.

I installed swig from sunfreeware. After browsing the tutorial for a while I decided to take the simple approach to building an interface file.

%module aura
%{
/* Includes the header in the wrapper code */
#include "aura.h"
%}

/* Parse the header file to generate wrappers */
%include "aura.h"

Then I used swig to generate the python and C++ code.

swig -python -c++ -I/opt/Aura/2.4.2/include aura.i

And built the libraries from that

g++ -shared -I/usr/local/include/python2.4 -I/opt/Aura/2.4.2/include -c aura_wrap.cxx

This left me with aura.py and _aura.so which look like a python module to me.

Python 2.4 (#1, Dec  1 2004, 05:20:08)
[GCC 3.3.2] on sunos5
Type "help", "copyright", "credits" or "license" for more information.
>>>import aura

Now I just need to work out how to use it. Assuming this module actually works and isn’t just an empty shell I may have to try building Java and Perl modules later.

Edited: 16:27 to include some bug-fixes

After playing around with this some more I realized that I had indeed created a completely empty binding. So I went through aura.h and manually included all the header files that it pulled in.

%module aura
%{
/* Includes the header in the wrapper code */
#include "aura.h"
#include "auraErrorTable.h"
#include "auraTypes.h"
#include "auraStructures.h"
#include "auraException.h"
#include "auraSearchEngine.h"
%}

/* Parse the header file to generate wrappers */
%include "aura.h"
%include "auraErrorTable.h"
%include "auraTypes.h"
%include "auraStructures.h"
%include "auraException.h"
%include "auraSearchEngine.h"

This produced much larger python and c++ files so I guessed I was on the right track. I also realized that the g++ command wasn’t linking in the aura library and that I would have to do it by hand

g++ -shared -c aura_wrap.cxx -o aura.o -I/usr/local/include/python2.4 -I/opt/Aura/library/include

ld -G -o _aura.so aura.o /opt/Aura/library/lib/SunOS/libaura.a

The path changes were introduced when I realised I was trying to build a 64bit version of libaura into a 32bit version of python.

Python 2.4 (#1, Dec  1 2004, 05:20:08)
[GCC 3.3.2] on sunos5
Type "help", "copyright", "credits" or "license" for more information.
>>> import aura
>>> dir(aura)
['ERROR_CANNOT_READ_STREAM', 'ERROR_CANNOT_WRITE_STREAM', 'ERROR_COLUMN_INVALID',
'ERROR_CONSTRAINTS', 'ERROR_FORMAT_INVALID', 'ERROR_INITIALISED', 'ERROR_MASK_INVALID',
'ERROR_MAX_SCORE', 'ERROR_MEMORY', 'ERROR_MISMATCH', 'ERROR_OPTIMISATION_SETTING_INVALID',
'ERROR_PARTITION_INVALID', 'ERROR_PATTERN_INVALID', 'ERROR_RANGES_INVALID',
'ERROR_RETAINED_ID_INVALID', 'ERROR_ROW_INVALID', 'ERROR_SAME_OBJECT', 'ERROR_SIZES_INVALID',
'ERROR_UNIMPLEMENTED', 'ERROR_UNINITIALISED', 'Exception', 'Exception_swigregister', 'NULL', 'OK',
'Pattern', 'Pattern_swigregister', 'Preferences', 'Preferences_swigregister',
'RetainedInfo', 'RetainedInfo_swigregister', 'SearchCharacteristics', 'SearchCharacteristics_swigregister', 'SearchConstraints',
'SearchConstraints_swigregister', 'SearchControl', 'SearchControl_swigregister', 'SearchEngine', 'SearchEngine_swigregister',
'SerialiseControl', 'SerialiseControl_swigregister', 'Sizes', 'Sizes_swigregister', 'StorageType', 'StorageType_swigregister',
'WARN_COLUMN_IGNORED', 'WARN_NO_BITS_TO_STORE', 'WARN_RETAINED_ID_INVALID',
'WARN_ROW_IGNORED', 'WARN_SHRINKAGE_IGNORED', 'WARN_STORE_CHANGED', 'WARN_TRUNCATED',
'__builtins__', '__doc__', '__file__', '__name__', '_aura', '_newclass', '_object', '_swig_getattr', '_swig_repr',
'_swig_setattr', '_swig_setattr_nondynamic', 'cvar', 'new', 'new_instancemethod']
>>> x = aura.SearchEngine
>>> dir(x)
['ClearRetained', 'Copy', 'GetColumn', 'GetRetainedIds', 'GetRow', 'GetSizes', 'IncreaseSize', 'Initialise',
'Merge', 'Optimise', 'Remove', 'Search', 'Serialise', 'Store', '__class__', '__del__', '__delattr__', '__dict__',
'__doc__', '__getattr__', '__getattribute__', '__hash__', '__init__', '__module__', '__new__', '__reduce__',
'__reduce_ex__', '__repr__', '__setattr__', '__str__', '__swig_destroy__', '__swig_getmethods__',
'__swig_setmethods__', '__weakref__']

Result!!

Tech

Random Updates

April 12th, 2006

After some gentle ribbing from friends about the lack of updates to this blog I’ve realised that it is indeed time to get back in the saddle. I apologise in advance for the disconnected nature of this post.

So work is almost a green-field site in that while they have quite a few systems in production they are all being managed in a piece-meal fashion. I’ve been free to specify a standard linux build (CentOS4) and whatever management systems I want. Now that my new server is in place I can start setting up cfengine.

Given that these systems represent a fresh start I decided to leave SElinux turned on (at $ORK-1 we turned it off because it objected strongly to the way we had things set up). This has lead to a fairly arduous learning process. The upside is that I now mostly understand it but I probably hate it. The fact that the SElinux policy is monolithic makes things hard to manage. I’m not sure how I’ll deal with this as the systems get more complex. I’ll probably end up building a selinux-policy-wesc package and try and ignore the ugliness.

In other security related news I’ve finally gotten around to learning about PAM. It’s strange but mesmerizingly powerful. Together with mod_auth_pam you can get apache logins to do very strange things. Now if only someone would write a PAM module for Shibboleth.

It’s the little things that are annoying me. Like that fact that someone has walked off with the case keys for my two Sun V880 servers.

We have no backups. Nothing to see here, move along.

My shiny iAudio X5 is now running rockbox. It is fantastic. Browse by ID3 tags. List files by date. Revolutionary!

I shall be giving a lightning talk on Grid Computing at LugRadio Live 2006. If you happen to be attending, prepare to be be informed and entertained.

The ramble endeth here..

Tech

Playing Movies on the iAudio X5

October 9th, 2005

I am enraptured by my new Cowan iAudio X5.
It plays both flac and ogg vorbis and appears to my linux box as a
standard USB storage device. Given this level of openness I’m willing
to forgive it for running some version of embedded windows.

However until today I hadn’t got around to trying to get it to play
back any useful videos. It comes loaded with some short video clips
which are basically adverts for other Cowan products. However by
interrogating these clips with mplayer I was able to glean the
following information.

VIDEO: [XVID] 160×108 24bpp 13.000 fps 189.4 kbps (23.1 kbyte/s)
Opening audio decoder: [mp3lib] MPEG layer-2, layer-3
AUDIO: 48000 Hz, 2 ch, s16le, 128.0 kbit/8.33% (ratio: 16000->192000)

Now I’m no whizz with mencoder so I had to do some searching around until I found a good intro to using mencoder. With that in hand I was able to put together an encoder command that worked.

mencoder inputfile.avi -o outputfile.avi -ovc lavc -oac lavc -lavcopts acodec=mp3:abitrate=96 -ofps 13 -vf scale=160:108

I added the lower bitrate for the audio as some sources suggest that
this makes playback more stable. Theoretically the X5 will play back
video at 15fps but can get unhappy so sticking at 13 seems sensible.
Now I’m not sure that I’d want to watch Lord of the Rings at 160×108
but character driven drama like House or The West Wing is remarkably
watcheable at this resolution. I doubt I’ll use this feature day to day
but if I was preparing for a long flight I might whack a couple of
seasons of my favourite TV shows onto the X5 to serve as an alternative
to the inevitabley dreadful in-flight movie.

Read more…

Tech

Scripting is hard

August 12th, 2005

I would like to quote for you now the opening lines of Microsoft’s Scripting Concepts and Technologies for System Administration.

This is a book about scripting for system administrators. If you are
like many system administrators, you might be wondering why this book
is targeted towards you. After all, scripting is not the sort of thing
system administrators do. Everyone knows about scripting: scripting is
hard; scripting is time-consuming; scripting requires you to learn all
sorts of technical jargon and master a whole host of acronyms - WSH,
WMI, ADSI, CDO, ADO, COM. System administrators have neither the time
nor the requisite background to become script writers.

Ye flippin’ gods. Do Microsoft Administrators really think like that?

Read more…

Tech

Knowing When To Quit

February 27th, 2005

I’ve spent something like nine hours this weekend trying to get my
MythTV box into a working state. I shall take a short look back over
the obstacles I’ve already overcome and the reasons why I’ve decided
that my sanity is worth more than �30.

Read more…

Tech