Thursday, December 28, 2006

Writing software for maximum system compatibility

For historical sake, here is a link to a program that compiles/runs in five languages. I'm sure it could be modified to also include whitespace.

Wednesday, December 27, 2006

The end of KDE (for me)

For the last two weeks I have been stuck using KDE at work due to a lack of Internet access. This was quite good as it gave me a chance to evaluate it as I haven't properly used it for many years. I'm using Kubuntu Edgy.

What I like about KDE:
  • Tiered menus - The KDE games menu subcategorises so that there are about 10 games in the base menu after installing the Gnome games. In Gnome the menu is huge.
  • KSysguard is great - you are able to monitor all sorts of system signals (CPU, memory, sockets...).
  • Kontact. Clean and simple it was immediately obvious what it did as soon as you opened it.
What I don't:
  • KDE has far too much information. Right click on anything and you get hundreds of options. Each menu entry is a short sentence - it's like reading a page of text for every menu.
  • Annoying use of on-top splashscreens.
  • Excessive, excessive use of 'K'. Either name things imaginatively or descriptively. It's very hard to scan through a menu with everything Kthis and Kthat.
  • KHTML. Not practical for actual WWW use.
  • QT frames - the old fashioned surround everything with lines. Visual clutter that looks terrible against GTK+ frames (bold headings, no lines).
  • Apply buttons. Just unnecessary.
  • Katapult. No idea what this does. It just opened a splashscreen, no obvious information on what it is.
  • The animation effects seem inconsistent.
General problems in both KDE and Gnome:
  • Apps shouldn't automatically quit if they can't be immediately useful, e.g. xsane. I think it creates a bad experience if you can't see inside programs. In this case it should state there are no scanners and just disable the scan button. What if you wanted to connect a scanner while the program was open?
  • Add the example content directory as a shortcut on the file open dialogs. Often when playing with a new app you just want to open something. There is a lot more content that could be added - anything that can be opened should have a default file.
And the final straw for me is printing a test page to the local printer. I incorrectly entered the URL as ipp://host which caused the printer to print out the ipp traffic as text. That's fine, it doesn't speak IPP. However since the printer was not sending back any responses it continued to send out more printing requests. Thirty pages or so I finally stopped it by doing killall ipp. This may be KDE specific or it may be CUPS specific but it's unacceptable. Test pages should only be retried by the user and the GUI should indicate if it's printing multiple pages. This seemed to bypass the CUPS queue so nothing was indicating where these print jobs were coming from. Printing has a long way to go before it works-out-of-the-box.

In summary; I didn't like KDE a few years ago and I don't now. It's got the details but still the basics are annoying. It's too cluttered for new users to find easy and for power users like me it's full of cruft that gets in my way.

Now installing Gnome...

Saturday, December 23, 2006

Google Analytics

I just set up Google Analytics for my web pages the other day. Easy to set up and nice, interesting results.


Looks like I have a Norwegian fan club!

This blog looks like a sub-set of the above.

An interesting thing I noted is a reasonable amount of traffic is coming from GetDeb - a click-n-run style repository for Ubuntu I had not heard of.

Friday, December 22, 2006

What is wrong with computer scientists?

Today I spent pretty much all my time trying to get fricking Java to convert a 1D buffer of 8 bit colors (i.e. RGBRGBRGBRGBRGBRGBRGB...) into a viewable image. But no, Java has to abstract everything to death into Raster, DataBuffer, BufferedImage, ColorSpace, ColorModel, ComponentColorModel ... ad nauseum. There's been more or less no progress since I started. I still have a buffer in a perfectly valid format and it still isn't rendered.

Why can't it be as simple as this?

BufferedImage image = new BufferedImage(TYPE_BYTE, FORMAT_RGB, width, height, data);

Surely for a tool to be useful simple things should be simple and complex things should be possible. *sigh*

Sunday, December 17, 2006

Summary of current open-source chess programs

XBoard is the old classic. Probably quite functional for experienced users but not very friendly and needs to be retired.

eboard is the XBoard replacement (?). I would have assumed it's dead but checking the site it seems a GTK+ 2.0 version is about to be released. It probably has the functionality that I've been aiming for with glChess but not the simplicity.

Scid is a database and analytics tool for hard-core chess players. It hasn't been updated since 2004.

Chessmonk is a modern replacement for Scid. It's still in early development.

Gnome Chess is long dead.

glChess is the new Gnome chess...

Pychess is the other modern chess interface for Gnome. We talked about merging but their goals are more power-user where mine are more simple. They've just release 0.6.0 - will look at "borrowing" any useful code!

Knights is the KDE interface. Looks fine and plan to check compatibility with it.

Slibo is a 3D chess application for KDE. It seems to be dead but the board looks a lot nicer than the glChess one. So should look into salvaging materials, reflections, shadows etc.

Brutal Chess is in the early stages of development. I think they're aiming for mostly graphics.

Dream Chess has very nice full-screen 3D graphics. It's early in development.

So when you list them all the market looks quite busy. I guess I predict that the old hands will fade away and we will be left with chessmonk+pychess, glChess and Knights as the dominant programs. But you never know...

UPDATE: 17 Dec - Added Chessmonk which is the program pychess is working with

Saturday, December 16, 2006

OMG 1.0!

Well it's happened... After 7 years of mucking around glChess has hit 1.0! Many thanks to all those who have contributed patches, artwork, ideas and translations. This release transfers development from the new Gnome version. I plan to backport changes periodically and not add any hard dependencies on Gnome. subversion change

I'd been having trouble committing changes to the glChess subversion repository as I was getting HTTP 403 Forbidden errors when adding/moving/deleting files. After digging on the site status page I found that the subversion access method had changed:

  1. Back up your repository

  2. svn switch --relocate

Works for me.

I'm not sure if I'm not reading the email that gets sent out but keeps changing things and it takes a bit of digging to find what's changed.

Sunday, December 10, 2006

Universal Chess Interface

I think I finally have glChess working with proper Universal Chess Interface (UCI) support. After testing with the Fruit engine I found I'd made an assumption in the specification - UCI engines do not have to keep track of the board state. This section is not clear so I've sent an email to hopefully add some clarification to the document.

What I was doing was reporting each move as it occured, like:

position startpos
position moves g1f3
position moves d7d5
position moves e2e3
position moves c8g4

This worked fine for Glaurung, as by not specifying startpos it must have just appended the moves to the existing ones. However for Fruit it would assume 'startpos' was missing thus every move reported was considered the first move.

So the solution is to send every move before requesting a new one like this:

position startpos
position startpos moves g1f3
position startpos moves g1f3 d7d5
position startpos moves g1f3 d7d5 e2e3
position startpos moves g1f3 d7d5 e2e3 c8g4

Seems a little inefficient? I guess that the engines could do a string compare to check if this position command is just reporting one new move.

I've tested the new changes by letting Fruit and Glaurung fight it out:

It was just painful to watch - Fruit had to twist the knife by slowly promoting two pawns to humiliate Glaurung. No love lost between these two.

UPDATE: Dec 16th
I emailed Stefan Meyer-Kahlen at and he confirmed that UCI engines are completely stateless and thus the correct behaviour is to send all the moves each time.

Wednesday, December 06, 2006

Shamelessly stolen links

Some stuff picked up from Planet Gnome:

Thursday, November 23, 2006


Three little letters... Hopefully this will become 1.0! (Three more little characters). There are no new features I want to add so the only looking for major bugs and translations.

And about translations... I made a script to import the translations provided in the Gnome version. This was mostly done to stop duplicate work of people not knowing about the Gnome version. (Note to self: I need to get the translations pushed the other way so the Gnomers don't waste too much time too).

I guess a lot of them had been automatically done by some tool as they were completely junk! Then people pointed out they were "fuzzy" and thus are not actually used. Whoops...

There is now a good amount of translations for the following languages:

  • English

  • Finnish

  • French

  • German

  • Italian

  • Lithuanian

  • Panjabi

  • Spanish

  • Swedish

  • Turkish

But I want more! Send me your translations! Now! OK, not right now but very soon!

The Gnome and codebases now match for .py and .glade files. This means after 1.0 I will only work on the Gnome version and periodically backport the changes.

Friday, November 10, 2006

RC2 Away!

OK I did release RC2 a while ago... Turns out my bug doesn't seem to be a problem anymore. Not sure what's going on there - I was probably just tired. So RC2 has the changes previously mentioned and also it now autodetects the Diablo (I've packaged this) and HoiChess. Note to self: Check if a package already exists before packaging it...

These changes are in the Gnome Games CVS repository (I think some made it into 2.17.1). So hopefully at 1.0 the Gnome and Sourceforge version will be synchronised. At that point I'll only be making changes to the Gnome version - I will consider backporting at milestones to make glChess 1.1, 1.2 etc if users want it.

Thursday, November 02, 2006

Release Candidate 2

glChess release candidate 2 is all ready to go... Except there seems to be a bug in dpkg-dev. So you'll just have to wait. It fixes a 64 bit bug, a 3D bug and adds fullscreen mode.


2006-11-02 vers. 1.0 RC2
o Fix to lib/glchess/scene/opengl/ to fix CRC check on 64 bit
systems (Bug found by Michal Bentkowski).
o Fix to lib/glchess/scene/opengl/ to stop exception
selecting outside board in 3D mode (Bug found by Michal Bentkowski).

o Moved glade files to top-level directory.
o Make symbolic link so Glade can find the icon when not installed.

o Added fullscreen mode.

o Explicity kill the about dialog as Gtk+ 2.10 does not do it
o Got rid of bogus GtkWarning from GtkComboBox on startup.

Wednesday, November 01, 2006

New open-source nVidia effort

There's a new project called Nouveau to make some open-source nVidia drivers for DRI. This sounds great as DRI seems to fit in well where nVidia just made up new architecture everywhere. From the Nouveau web-page it sounds like it's not too hard to write drivers - all you have to do is convert OpenGL calls to appropriate format for the hardware. All the OpenGL state machine work is done for you by Mesa (and is shared between all the DRI drivers so bugs get fixed once only).

Back in the day I used the Utah-GLX nVidia drivers which were quite buggy but then it was a bonus to have 3D support. The commercial ones were just that much more reliable that I eventually changed to them. I haven't bought a nVidia card since though. If these new ones turn out OK that would change :)

Go open-source!

Sunday, October 29, 2006

Upgrading to Edgy Eft

So I've just started downloading the 1GB or so to upgrade from Dapper Drake to Edgy Eft. This is not automatic - but it makes sense as users should stick with the Long Term Support releases unless they know what they are doing (though an advanced GUI element would be nice).

Will report back on success/failure.

UPDATE: The next day...

Worked pretty much fine. Had to do at least one extra upgrade after it had finished to get everything updated, however this was shown by the automatic updater tool so normal users shouldn't have a major problem.

Firefox 2 is nice. Now uses the standard icon (Ubuntu decided they could live with that unlike Debian?). Movies work out of the box so can browse trailers etc. It has crashed once on me so far (but new crash catcher seems nice). Hopefully Edgy will pick up the flash 9 plugin when it is formally released.

Startup screens etc seem more colourful and cleaner - a bonus for Joe User. The startup actually seemed slower, but that could just be because there is no boot text now. I must check if escape shows it as it can be very useful.

Aside from that haven't noticed any stand-out changes. I guess it's mostly just polish. I must try Rhythmbox/Banshee - I think they'll support my iPod now. Things like F-spot are formally supported (it uses Mono) so might start using that more.

Just realised that 3D acceleration is not working. But I think it's this bug and it currently marked as "High importance, fix released" so might be solved soon. Basically when I try and load the DRM module I get:
FATAL: Error inserting drm (/lib/modules/2.6.17-10-386/kernel/drivers/char/drm/drm.ko): Cannot allocate memory

glChess - still not in the top 100!

The statistics show glChess has hit a new high - Ranked 109th on the 25th October 2006! I think I'll be happy once it breaks 100...

By the way I'm in Singapore on the way to Syndney - I have to unlearn all my British keyboard skills (of course my laptop will still be British).

Sunday, October 22, 2006

Ubuntu backup tool

The next Ubuntu release has a simple but handy-looking new tool. Due to all user-owned files being in one directory in Unix (which I think is a great strength of the system), this tool will help Joe-user to safely back up just the files that count. When recommending people upgrade (for instance my dad) I always worry how to tell them how to back up. This will give some piece of mind.

Serious Ubuntu bug finally fixed

I updated my system today and this bug has finally been fixed. This bug has been around for approximately 6 months and even though the cause was identified (in the way translation files were being generated) early it took a ridiculous amount of time to be fixed.

I really wonder why a bug of this severity (caused dd (at least) to segmentation fault) in a distribution marked as Long Term Support that was repeatedly reported from many users was not put to a higher priority. I hope there is a central bug triaging group in Ubuntu that lists and works to diagnose and fix the top 10 bugs.

Thursday, October 19, 2006

glChess 0.9.12

Made a new release because some users were hitting an exception when stock icons couldn't be found. If the icons aren't there now I just don't display them. Bonus new features: new/updated translations and support for UCI chess engines.

Managed software

I had always considered that Linux distributions were disadvantaged compared the commercial OSs because of the software installation procedures. Use case: a user finds some application on a web page they want to try. When the try to install they have to worry about multiple distributions, multiple versions, root access required... My first impression is bye-bye user.


I've been cleaning spyware off a number of peoples PCs recently and have come to realise that for low-tech users this is in fact a big advantage. By being able to pick software from a distribution provided list these users cannot install malicious software. Talking with a middle-aged couple showed there were key applications they wanted (e.g. Google Earth) and they installed other things (some of which were spyware) but wouldn't have been upset if they couldn't. They were used to Windows running slowly (due to the spyware) which meant they were used to a poorly performing computer. I expect this sort of user makes up a large population and would have a positive experience using Linux.


The current distributions only provide a subset of available software. To provide access to the long tail of available software a user-rating/validating system is required. Idea: When a user downloads a file from the Internet the file is checked against a distribution provided list (using URI or hash etc). If the file is not on a white-list they get the option to install anyway and inform the distribution that they have installed. In this way the distribution knows what is being installed allowing a) files to be blacklisted and affected users to be informed and b) the distribution to know which packages they should include in the distribution repository. This of course has some privacy issues but most users can trust their distribution and always include an opt-out option.

Note there is a packaging format called Zero Install that if adopted would make installing simple.

Wednesday, October 11, 2006

GPL Battle Chess

Another fullscreen GPL chess client. Looks like this one is aiming for animation (i.e. Battle Chess). Compiles and runs well on my system.

Friday, October 06, 2006

glChess status

So I have gone through two glChess releases since the last release. 0.9.10 fixes a bug where upgrading users would hit a configuration exception. 0.9.11 is basically a big pile of polish. I've made 3D and Python imaging support optional which should make the user experience a lot better (at least it should half work on difficult systems). Lots of UI, theme and GUI integration changes too.

Oh and glChess has been accepted for inclusion in Gnome Games! I guess I really am fulfilling my goals from my first post. Yay!

Google Code Search

All ye bow down to our Google overloards... For from the mighty palace of computation comes Codesearch

Tuesday, October 03, 2006


Dreamchess - another GPL 3D chess engine. As with most 3D clients I have seen it appears to be targeted at full screen users.

Monday, October 02, 2006

New glChess name

For 1.0 I think glChess should have a new name... It has been suggested to use a generic chess name like "Checkmate". The problem with this is generally these names have already been used. I think it's important for a project to have a name that stands out and it doesn't have to relate to the project (see Mesa).

So I was thinking perhaps "Looking-glass Chess". For those familiar with Lewis Carroll will get the reference. It feels a little bit of a mouthful, what do others think?

From a user-perspective this would only be in the about dialog and on the webpage. All menu references and window titles would just be "Chess" as Gnome started doing from 2.?. The binary has a character inversion from glchess to lgchess.

glChess 0.9.9 (2D support)

Here is what the new release looks like:

You can switch between 2D and 3D using the menu. Unfortunately the app still depends on OpenGL but in the next release it will disable the 3D option if OpenGL isn't present. These optional dependencies are going to create a testing issue - the plan is once 1.0 is present only make 1.0.x releases after a lot of testing using VMware player. More frequent but less tested releases will be released using 1.1.x.

This release also fixes a number of regression bugs. I have removed another accidental DBUS dependency and fixed the broken game saving. There are a number of changes to help in reporting bugs - the text output contains more useful information. The autosave feature should also work after exceptions are encountered.

Friday, September 29, 2006

An insight into software development at Google

Here is a very long but well written post about agile development (notice the small 'a'). It's written by a developer at Google.

My development style has always been very pick-and-mix. i.e. When I see some other developer doing something that works I tend to try that at the next available time. While I keep meaning to read formal Agile development books the above suggests I shouldn't bother.

Tuesday, September 26, 2006

Linux networking is driving me insane

Can anyone tell me what is wrong with this:

# ip route add via
RTNETLINK answers: Network is unreachable

I want to route packets to a specific address to a specific gateway. I don't care if either of these addresses are known. As long as they are valid addresses attempt this route.

Linux routing (at least using the ip command) seems to love to second guess what you want. If it thinks it knows better then it damn well tell me why it can't do this. "RTNETLINK answers: Network is unreachable" is not an acceptable error.

Sunday, September 24, 2006

Creating Passionate Users

If you're a software developer if you're not already reading it then read Creating Passionate Users. Hell, any productive industry will do.

I think I picked the link up of one of the frequent rants on Luis Villa's blog. The law industry is in for trouble with this guy ;)

More Tetravex tinkering

Now I have finished scratching my last itch with Gnome Tetravex. Look at the perdy colours!

Basically I combined the Resistor colour code and the Tango colour palette. I think the colours are a little garish (the numbers could be softer) but I'll leave that for the more artistically inclined.

Friday, September 22, 2006

Friday, September 15, 2006

Stuff to watch out for

Here are some projects that I must try/use/keep an eye on. I normally see things like this whizz past on Planet Gnome but forget to bookmark them.

  • Hula - Open source email/calendar WWW server. Looks like it could be as good as Gmail/Google Calendar. (Novell)

  • Dogtail - Automatation framework for GUI testing (RedHat).

Oh and if anyone wants to pay me to work on cool open-source projects like this send me a message!

glChess... Now in 2D!

If glChess goes into Gnome games then I think it needs a 2D mode for those without fast 3D hardware. So after some shameless code stealing from pychess here is the prototype:

You can play a game and all - I'm suprised how easy it was to add in. The hard work now is making the UI able to switch and the rendering code to be efficient.

Oh and I guess I need a new name now...

Wednesday, September 13, 2006

Debian and Python

I've just got glChess to work under Debian Unstable (Sid). Details on the homepage.

This is all thanks to a guy called Guy for reporting it didn't install. I ended up getting Debian running under VMware player and found the issues. They are:

  • Debian doesn't have the Python version in their library package names. So where in Ubuntu we have python2.4-gtk2 Debian now has only python-gtk2. And this package contains the gtk2 bindings for both python 2.3 and 2.4. This seems silly because I can't specify (easily) that I want Python 2.4 and what happens when Python 2.5, 2.6 ... are released? What if you want to save space (e.g. on an embedded system) and drop all support for 2.3?

  • And the madness continues. Instead of putting all the non-core libraries in /usr/lib/python2.4/site-packages they now go in /usr/lib/python-support/python-gtk2/python2.4/. So even though you have only one library address space they're split across directories. Why? It just seems to be overly complicated and an easy way to have address space collisions. I had to rebuild the GtkGLExt bindings but this turned out to be as easy as replacing dh_python with dh_pysupport (I love you debhelper!)

So the long and short of it is I need seperate packages for Debian and Ubuntu. The glChess package only has different dependencies but the GtkGLExt bindings need to be built differently. *sigh*


I've been working on registering glChess as the PGN file mime-handler. I'd heard legends on how much of a mess the whole MIME thing was (and how it was getting better with Well there's certainly a lot of MIME stuff around. has a spec on detection that seems quite good. Unfortunately registration for programs to execute this mime type is elsewhere and so are the icons for this type. Interestingly the mimetypes/ directory in the icon schemes doesn't just contain image files with the mime type name (correct me if I'm wrong!). So you have to register a mime type to an image name which seems redundant. also seems to be working on at least some of these issues.

I was just googling my references and I think I want to read this.

In the process I've found a bug in the MIME database or Nautilus (or both) - PGN files don't get detected as application/x-chess-pgn so Nautilus wont suggest glChess to execute them. It took me a long time to realise update-mime does not update the database Nautilus uses (use update-mime-database /usr/share/mime).

Oh and if anyones noticed there's still a rogue import dbus in glChess 0.9.8. It wont cause any problems if you have the python dbus bindings but it's an unintended dependency that will not be in 0.9.9.

Tuesday, September 12, 2006


0.9.8. Had some DBUS/Avahi networking code enabled by accident in 0.9.7.

Sunday, September 10, 2006

glChess 0.9.7

New version!

This mostly came about when I actually decided to try playing a game. Turns out somewhere along the line I buggered up the logic with the AIs and they could no longer play as black. And this led onto some long-standing AI issues that had been bothering me...

1. The GUI now contains a dialog of AI communication - this should make debugging much easier.
2. When glChess quits it sends signal 9 to the AIs if they don't die in 500ms. This is a bit of an ugly hack (see but I can't find a logical system command to do this.
3. When glChess crashes it kills the AIs. This was a big problem as GNUchess goes off into la-la land and eats 100% CPU when its controller dies (you notice the battery dissapearing on a laptop!). I need to add a GUI dialog to show the stack trace now. After a crash the game is saved too which is good.

Oh, and this all got triggered by me adding support for the Phalanx chess engine. From small things...


Wednesday, August 30, 2006


As a follow up to my previous post about ifconfig... I have just discovered /etc/iftab. I love you udev! It's exactly what you want and expect - a table of ethernet addresses to interface names. Done. Aparently there was an older tool called ifrename that used to do this before udev. But yay! Problem solved.

glChess in the news

Gnome games is looking to drop one game and add another for the Gnome 2.18 release. An obvious inclusion is a chess game and someone has suggested adding glChess!

I like this because:

  • glChess is simple - I'm trying to keep clutter to a minimum (many existing programs have a lot of internal AI information / options). glChess would(/should) be good for people who just want to play chess. The networking (when I finish it) should be simple too

  • I like Gnome!

I am a little worried about:

  • performance - The use of 3D means many Gnome users would have rubbish performance. This could be solved by making glChess support both 3D and 2D (the internal design is keeping the scene rendering seperate from the rest of the code, it shouldn't be too hard to make a cairo interface).

Tuesday, August 29, 2006

How to render using Mesa

It is remarkable hard to get your OpenGL software to avoid using hardware acceleration. I required this to test some glChess bugs.

Under a DRI system you disable DRI by quoting out the Load "dri" line in the Modules section in /etc/X11/xorg.conf. After restarting X everything 3D should be slow.

Under an annoying non-standard system (i.e. nVidia) I believe you can link your C program using something like -lGLMesa. However you are royally screwed if you use something like the Python bindings. Then you would have to do some recompiling/magic relinking to make it all work.

glChess 0.9.6

New release!

This version fixes a number of issues with software rendering. I found an interesting bug in Mesa which is now avoided (bug is fixed in Mesa CVS).

Also has a bunch of cosmetic fixes (about dialog, starts with empty board, changed perspective slightly, added icon) and an Italian translation. This release has some disabled networking code to be hopefully re-enabled in 0.9.7.

Friday, August 25, 2006

Arrgh! I hate developers!

Constantly having to change my networking configuration is driving me insane. So I apt-get source ifupdown'd to start some hacking.

I can't believe how complex people manage to make their code - this is a program with only ~2000 lines of C code but it's just unreadable. The indentation is all over the place and there's wacky documentation preprocessor directives spilt all through it. There's probably some elaborate IDE that makes it readable but come on - stop making write-only code people!

Monday, August 07, 2006

Reasons not to use low level languages

I followed a link from Planet Gnome to a patch for Evolution that fixes a lot of memory leaks. Well sure, I thought, it will be fixing some obscure bugs right? Well it turns out a lot of the patch changes are replacing lines like this: /* TODO: Free stuff */. So the product is knowingly produced with memory leaks. Ouch.

I can't blame the developers too much - in C I always found it a mission to keep track of memory (this sort of thing takes time from adding content) but it just goes to show. If you can use a garbage collector, do - anything else should be treated as an optimisation. And any optimisation you do should be able to justify (ideally with numbers).

Thursday, August 03, 2006

A nice webserver

Saw a link to Cherokee today, looks like a nice, lightweight and easy-to-configure web server. I am not a fan of apache (bloated and obscure) so I'll be trying this one next time I need a web server.

Tuesday, August 01, 2006

Google calendar + Evolution

For those familiar with Gnome there is a calendar widget on the upper taskbar (by default). This is probably one of the most useful features of the Desktop: it shows the full date and clicking on it brings quickly brings down a small calendar. I use this all the time and are constantly tripped up when using Windows (their one only displays partial date, tooltips take ages to come up, double clicking on it brings up config window with calendar that takes ages).

So today I thought since this mini-calendar was linked to the Evolution Data Server (implemented I don't know how many Gnome versions ago), perhaps I could put my Google Calendar in there. So double click on a day and Evolution (slowly) pops up. After getting lost in the heavy interface I go Menu->New->Calendar, copy the address Google Calendar provides in the settings and voila! My Gnome desktop now displays all my appointments (and birthdays) one click away from anywhere! 11 chainsaws out of 10!

Monday, July 31, 2006

Playing with Avahi

Today I was playing around with Avahi for inclusion in glChess. The documentation is a little thin but luckily there are some helpful people in #avahi. So in glChess subversion _glchess._udp (still don't quite get the Zeroconf naming) services show up in the (new) join game dialog. I've got the transport layer working for the network so it should all come together some time soonish.

But I can't post without a bit of a gripe... It seems a lot of APIs have ultra generic function/method calls which means when you pass in an incorrect parameter you get some useless error message. Developers *please* explicitly check the passed variable signature is correct and generate a meaningful error message if it does not.

Oh and once the networking is done I need a serious refactoring session.

Friday, July 28, 2006

Broken base tools that need fixing

Here is a note to myself for base Linux tools that require fixing:

  • ifconfig - interfaces are configured by kernel name not MAC address. You should be able to do either as Linux randomly assigns interface names (at least to ethernet devices). On my work PC I have three network interfaces. I think the issue is the USB one gets detected at different times on boot

  • Fix 'ps' - As stated earlier it does not print entire process names even when it has loads of screen real-estate. I think the whole process could be rewritten and work much better.

  • etc etc (post comments of more)

Thursday, July 27, 2006

The crapness of old software

Last weekend I was bitching to Robert about how 'ps' was crap - it only displays 15 characters of the process name no matter how wide the console is.


bob@alchemy2:~$ ps -A
1 ? 00:00:01 init
4995 ? 00:00:00 gnome-power-man

Sure the Gnome Power Man is a great process but other examples don't work so well. ;) So together we checked out the source (apt-get source procps) and had a crack at it.

Holy crap it is an obscure mess. I have previously found a bug in mount and it was a mission to track it down - that code is appalling too. Why is this old "base" code so crap?

Eventually I found out how the columns were generated in 'ps' and found the column is hard-coded to be of length 15. You could change it to be bigger but the columns can be ordered in any way so if you wanted a complex output it would be too wide. It looked like the column was supposed to expand if it the last one but I couldn't get the damn thing to work. The data is copied so many times through global variables it is too much of a mission.

So I gave up still not sure where the actual printf is...

Tuesday, July 25, 2006

The Python Challenge

Mr Hunter introduced me to the Python Challenge. It's a cool puzzle that presents you with lots of computationally complex situations (which you can solve suprisingly quickly using Python). I think we got to about 15 before I thought I should catch a train home.

I enjoyed annoying him by doing it all from the command line (no smelly files/IDE for me :P)

Friday, July 21, 2006

Ubuntu 6.06 versus 128MB RAM

Yeah when they say that Ubuntu 6.06 recommends 256MB+ of RAM to install they are not joking. I was trying to install it on a Dell Optiplex GX110 and it ran like a dog. The intaller died on the partitioning step (looks like the /dev entry didn't appear). So I deleted the partition table and rebooted. This time since there was no handy swap partition it ran like a very sick dog.

Insert a 128MB DIMM and it works like a charm. I never checked the RAM when I started - it would be a nice feature to write in large letters somewhere at the start of the installer "YOU HAVE THIS CPU, RAM, FREE SPACE" etc. Oh and when did it get so hard to match RAM to a PC? It took many attempts to find a working DIMM (eventually canabalised from an old Optiplex GX110). I'm sure back in the 386 days any RAM would do :)

Sunday, June 25, 2006

Trawling on

I seem to go trawling on the Linux Game Tome every few months to see what is going on in the Open Source game world. Normally I have a slim chance of getting most of these games working but I found Balazar Brothers which being written in Python made it quite easy. I had to install the files to make it run so some custom .deb packages and now it works quite well. It's basically a jumping puzzle game but it with more polish would be quite fun. In the future it would be nice to have a small set of simple but good quality games that average users can install on their Open Source desktop.

The english translation was a bit confusing so I've sent an updated version to the developers. I'm also not sure what to do with the .deb packages - Perhaps I should find some server space where I can make my own .deb repository...

I noticed when Balazar starts up it says:

* Balazar * (Psyco not found ; if you are using an x86 processor, installing psyco can speed up Balazar a little)

So I went and found Psyco - a JIT compiler for Python. I remember reading about this (or a similar) project a while ago but I didn't realise it was ready and working. An apt-get install later I guess it's running in the background! I think glChess was slightly faster but I'll have to investigate more in the future.

Oh Balazar Brothers is basically a mini-game spin-off of an RPG called Balazar. Haven't got that to work yet though as it tries to write back to /usr. Naughty!

Wednesday, June 14, 2006

Dear Lazyweb (re: Python packaging)

How are Python applications supposed to be packaged?

I was building a distutils for glChess. The distutils doc describes itself as:

... (use) Distutils to make Python modules and extensions easily available to a wider audience ...

However glChess is an application and not a library so does not need to make any of its code publically available. Should I make a site-packages/glchess package with all the glChess code? Then what about name spaces - I guess "glchess" is safe but other application names could collide with library packages/modules. Should I use "eggs" (can't find a lot of documentation on these). Note I have not found a Python application that installs its code with distutils (links anyone?).

Also as a side note is there simple way of including translation files in distutils? For glChess I have a directory of gettext translation files po/en.po, po/en_NZ.po etc which get built to po/, po/ etc. These should then be installed into /usr/share/locale as en/LC_MESSAGES/ and en_NZ/LC_MESSAGES/ Note that the .mo files have been renamed however distutils.core.setup() does not allow file renaming through the data_files argument.

Saturday, June 10, 2006

Pouet Chess

Found another GPL chess program, Pouet Chess. Seems quite nice, very clean and simple to use (downloaded a binary and it worked fine). It's fullscreen (SDL). I don't know what chess people do but there really does seem to be a huge gap in the Linux/open source chess market. Does everyone just use XBoard? It's very functional but fairly bland looking... I guess pros use windows/web/Java clients?

Saturday, June 03, 2006

Dapper and Network Manager

Got network manager working in Ubuntu LTS 6.06 (Dapper Drake)...

1. Install with Applications->Add/Remove... Internet->Network Manager (or apt-get install network-manager-gnome).
2. Disable your network interfaces with System->Administration->Networking and for each device Properties->Enable this connection (uncheck). Otherwise Network Manager will not have any interfaces to use.
3. Add the applet with System->Preferences->Sessions Startup Programs->Add and type in nm-applet.
4. Log out and log in again to have it all working!

For full instructions see the Ubuntu wiki.

As a side note this install crashed logging out of gnome. First I got a white screen with a working pointer, not response to alt-ctrl-backspace. Going to terminal with alt-ctrl-F1 caused stripes to appear and then the whole OS locked up. Grr

It's all dappery

Was playing around with the Ubuntu update manager and it now has a button to upgrade to 6.06 (Dapper Drake). So with just a few clicks and 800M later and I'm here. Quite a smooth upgrade, just need to install a few extra packages when you're done. Gnome is noticably smoother and some nice new features (like editing the menus and deskbar - very nice).

Only thing to get working is network manager again. Seem to have lost some audio codec support with gstreamer 0.10, though you can get better support using libxine I'll stick with gstreamer for now.

From the reviews/screenshots I've been seeing of Vista I think Microsoft is not making good progress. The rate of innovation seems a lot higher in Linux/Gnome and the fast release cycles is leaving MS in the dust. Vista seems to have mostly things that are matching the competition (composite window manager, applets, tabbed browsing) and added far too many user options (endless pop ups, dialogs etc). They really should have had the balls to remove a lot of fluff from their UIs as I think they peaked in usability in Windows 2000 (I'm always trying to find options in Windows nowadays).

I guess Apple will have some new innovation around the corner but for now they have the top polished GUI. Sneaky Apple...

Monday, May 15, 2006

Released glChess 0.9.3

Release glChess version 0.9.3 (screenshot looks much the same as the previous one).

Didn't get the multi-threading into it but the history bar works well and I added piece animation. This had been requested many times but now with the new code was quite easy to implement. I refactored the code quite a lot from 0.9.2 so hopefully it is more to the liking of others :).

Sunday, May 14, 2006

New, improved! Now with navigation bar!

Sneak preview...

Things to do next:
  • Tidy up the code a lot
  • Thread the loading and saving
  • Profile the code to optimise a bit

Tuesday, May 09, 2006


SCons - Something to look at when I don't need sleep. (Looks like a make replacement - let's bury that bitch).

Monday, May 08, 2006

Sick of Drupal

The glChess Drupal website seems to be slowly falling apart... I'm not sure if it's or the old version but I keep getting errors about not being able to log into MySQL and not being able to upload files. So I have been unable to add new content which has put a nail in the coffin for it.

So run and hide Mr Hunter as I am trying to find you and force you to whip me up a simple Rails/Zope site that I can extend.

As I side note I found that people were leaving comments on the site but were getting stuck in a moderation queue. After deleting the 75% spam there were some good comments left.

I particularly like this one:
This is some of the WORST written code I've seen. I can understand why you morons ceased working it! Sincerely, Will L G

It's always nice to receive feedback! :)

Sunday, May 07, 2006

glChess 0.9.2 preview

I added the new models to glChess:

Bit hard to see at the moment, I need to:
  • Adjust the sizes
  • Get better textures (hint hint for someone else)
  • Replace the default material (i.e. make them more shiny)

Slimming your desktop

LowFat - very cool.

Friday, May 05, 2006

glChess 0.9.1

A rushed release... Hopefully the more artistically inclined will provide some decent textures to replace what I've got.

Thursday, May 04, 2006

I swear OOo has got worse

I've been using OpenOffice 2.0 at work and found it to be quite frankly a piece of crap. I'm sure it used to be more reliable back at 1.x. As has been pointed out by others you don't get anywhere just trying to match MS Word. I just can't decide which one is worse at the moment - they seem to be about the same.

Why can a word processor have so much difficulty:
  • Getting outline numbering working.
  • Handle styles appropriately so you don't end up with sections as 'Default' and 'Body Text' without being able to tell.
  • Make images anchor properly.
  • Have a simple diagram drawing tool that is usable.

It really doesn't have to be super fancy, RISCOS managed to work it out many many years ago. Just blend that with a modern file format (Open Document) and you're sorted.

Hopefully AbiWord will replace OOo...

Wednesday, April 12, 2006

New Chess Pieces

Yay for open-source.

A Mr John-Paul Gignac has provided some new pieces to be used in glChess (and other such projects). So probably in version 0.9.3 there will be two sets available (with the high-res new versions as default).

Unfortunately I haven't had enough time to make a proper release. The SVN version has been tinkered with (re-enabled texturing - hopefully someone will provide better textures/colours HINT HINT). But it isn't clean enough for a release. I have no plans at the moment for easter so maybe some good work then...

Wednesday, March 08, 2006

Fall back behaviour

I found an odd bug (?) when adding texturing support to glChess.

If you use a texture with dimensions of not 2^N the performance is complete crap. Now OpenGL requires textures with these dimensions but what I assume happens is if you don't provide them in that form it falls back to a software mode (maybe Mesa). Seems like good behaviour at a glance.

But it got me thinking - Is it always good to fall back like this? Yes it gives you maximum feature support (hopefully replacing the fall back functions with optimised ones) but it does make things confusing for the user/developer. I could not work out why things were so bad (and was trying all sorts of tricks to work out what it was) and it was only on a hunch that I found it. (I think I have found this issue perviously when developing).

What would have been nice is some sort of warning that this was occuring (not that I can think of a way to fit a warning like this into OpenGL).

Thursday, March 02, 2006

Again Windows reminds me of its crapness

Every day I keep from using Windows the more I think "It's not _that_ bad, right?".

Well it never fails to suprise me.

So tonight I go into Windows and my wireless networking no longer works. Ok a bit of a pain but I'll delve in and fix it. So the windows wireless tool helpfully tells me it cannot configure my card and to use the configuration tool from the supplier. Ok why? Well you wouldn't actually want any useful pointers such as "I cannot configure it because this thing X has locked it". And none of the other tools seem to give any pointers (such as device manager, ipconfig). Eventually I found the Intel config tool (which had resumed control after I told it to piss off when I got the laptop) and got things working again. It's just so f**king frustrating how hard it is to find simple problems like this. And I have no confidence that the problem wont occur again.

Slick interfaces never cover up shoddy foundations.

As a side note there is an interesting bug - sometimes the display tool gets into a state where it says it is not connected to a network when it is. When you notice you do have a connection and ignore the feedback its fine but after a few minutes the connection times out and the tool disconnects itself. grr

I'm using an early version of NetworkManager in Linux and it looks really good. (I'll upgrade when the next Ubuntu comes out - I can't be bothered compiling the latest one).

Saturday, February 25, 2006

Saturday, February 18, 2006

Launchpad integration

Hmm... I want to put the 'Translate This Application...' button onto glChess as seen in Ubuntu applications. After digging around in the source code of a bunch of applications (there seems to be an excessive amount of layers in a lot of applications...) I found that there is a library for launchpad (the Ubuntu bug/translation etc webtool) support.

So the question is does anyone know an easy way of integrating this into a PyGTK+ application like glChess? It seems most of the Gnome apps don't use glade for their main window so I'm not sure if I can do this easily (I want all the UI in glade files).

Thursday, February 16, 2006

It's a glChess New Years?

I was looking through the SourceForge statistics for glChess and noticed something odd... Aparently a lot of people were out browsing for chess software at new years!?! I've always been fairly skeptical about the SourceForge stats...

Remove link (not a permalink) and image added (you can just see the peak on the left). Thanks Joel!

Sunday, February 12, 2006

Oh Nine Oh

Finally got glChess 0.9.0 out the door! So it's up there on the website as a source and .deb package.

I had to end up making a .deb package for PyGtkGLExt. Hopefully Debian/Ubuntu will take the work off my plate in the future!

So one big new features is good AI support - I have it working with four AIs and you can load and save games without the AIs getting confused. It turned out most AIs don't seem to have a save function so I just inform them on load what the previous moves were.

But there's no network support now. I plan to get it back in later.

Sunday, January 22, 2006

glChess status

I got the PGN autosaving working and it feels really good to use. So instead of any annoying dialogs you can just quit the program whenever you like and all your games are present when you reload it!

So next step is the AI... Most of the chess programs I've used tend to use the AI (GNUchess or crafty) to do the movement engine and save games so it will be interesting with glChess (which has its own engine and save games). I think I will get the engine to save itself and put hints in the glChess save file. This way the AI should be happy and should be synchronised with glChess after a load. If I don't lets the AI save itself it would loose all its long term strategy.

Oh and a heads-up for my friends who are reading... Be prepared to get thrown a URL and asked if you can install and run glChess without any instructions. I really need some OS virtualisations to test it properly though as once you have installed libraries etc it's always easier to install the second time.

Thursday, January 05, 2006

glChess getting there...

Just got board highlighting working again in glChess. I will be interested on feedback if players consider it useful or not.

It's quite disturbing to count the amount of effort put in and I'm still not back to the 0.8 functionality level! Though of course there have been some new ideas added in as I've been coding (i.e. feature creep!).

Hopefully there will be a spell low typing in my day job so I can spend my typing time on glChess. I really want to get it tidied up (and release 1.0 before it's a decade (!) old).

So what I'm currently aiming for to release 0.9:
- Get AI working again (part ported, only support GNUchess for now)
- Automatically save games to PGN on exit and reload on startup (not in 0.8)
- deb package for Ubuntu, alien built RPM packages.

And what remains to get to the level of 0.8 - these should be in the 0.9.1 release.
- Stored preferences (.ini to be portable)
- Enable GUI elements config, end game, surrender etc
- Animation (rotating board and moving pieces (new to 0.9.1))
- Network play (not sure how portable this will be to windows)

For 0.9.2:
- Windows installer made using pyexe
- Fixed network play :)
- Fix umpteen other bugs

And what remains to catch up with pre 0.8!
- Textures
- Lighting and transparency (but only as a theme this time)

And for the future:
- ICS (Internet chess) support

And I must update/complete the website. Or find someone who is good at that sort of thing :)