Sunday, February 25, 2007

Secrets of the ASCII table

The other day I actually read the ASCII table. Seems odd as I've dealt with this for probably more that seven years but I've never really looked at the special characters. I remember when I started programming with QBasic/Visual Basic I first looked at the table - I ignored the non-printable characters as they looked too complicated. And for some reason I've never really looked at them again.

In my last job there were a number of ASCII protocols using STX and ETX but even then I never looked at anything outside of tab and carriage return (don't get me started on this character...). So yeah it's a bit of a surprise and now I plan to make better use (or ignore) these characters in my future code.

Tuesday, February 13, 2007

Shake-up in the Glade world?

I recently found a Glade replacement: Gazpacho. It's basically a Glade rewrite in Python (for ease of development and maintenance). My previous experiences with Glade 3 have been a bit variable and Glade 2 has a number of annoyances so it will be good to try Gazpacho.

Also it looks like Nokia has been building a libglade replacement. Interesting times.

Saturday, February 10, 2007

Great strides in usability

Just made some really nice improvements to glChess:



a) The move descriptions now default to a human readable form. You can choose to change these to either SAN or LAN using the menus.
b) Sexy, sexy Gedit/tooltip style message areas instead of pop-ups and many status bars.

Unfortunately none of this will be in the Gnome 2.18 release. I plan on making a sf.net release today (but sneak some other goodies in first) and all this stuff can get merged into Gnome 2.18.1. Oh and I'll have to disable the "Join Game" button for this release - it's still not quite all there.

Wednesday, January 24, 2007

My Bad

A last minute change of mine caused glChess to fail in Gnome Games. Whoops... I must get put some unit tests in for the PGN code.

What would be great in the future is to have these unit tests showing up in Damned Lies about Gnome. Python has such a great test framework and this would be so useful.

Unfortunately my time is currently traded off between new features (FICS support is coming along in the sf.net version and will aim to have it in Gnome 2.18.1), and refactoring and testing.

Click 'N Run for major Linux distributions

Linspires' Click 'N Run service will soon be available for multiple distributions. I think this is going to be really really good for Linux. Ubuntu has already mostly solved this with "Add/remove" in the Gnome menus but this is going to make life simple for the "average" user. Only good things can come of this.

Friday, January 19, 2007

Better Bash Autocomplete

Found a positing on how to stop bash autocompleting all the hidden files. This had been bugging me for a while...

Simply edit ~/.inputrc and add:
set match-hidden-files Off

Hidden files are only matched if you explicitly type in the period.

Tuesday, January 09, 2007

Why is Gmail search so crap?

Why is Gmail search so crap? I can never find anything with it... For example today I was looking for my sisters phone number which is in an email conversation that is fairly unambiguous. So I search for "sarah phone", "sarah number", "sarah phone number" etc. These all come up with a few or no results but not the conversation that actually has the number. Finally I found it with "sarah's phone number".

I really expect Google to be a lot smarter with search - an apostrophe shouldn't stop it from matching a word! And ideally the search would be fuzzy so I could at least look through a list of conversations to find this one (thus training their search algorithm). I would even expect GMail to know/learn that "phone" and "number" should match conversations with long numbers in them. Perhaps the GMail team needs some of the core search guys to really spice things up.

Tuesday, January 02, 2007

#97

glChess has broken the top 100 in sourceforge.net! Looks like it may be another glChess new years?

There's been a lot of polishing progress in the last month. There seems to be enough people using it and generating a constant amount of feedback. Should be a lot more when Gnome 2.18 is released in March.

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.

For glchess.sourceforge.net:

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 sourceforge.net the new Gnome version. I plan to backport changes periodically and not add any hard dependencies on Gnome.

Sourceforge.net subversion change

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


  1. Back up your repository

  2. svn switch --relocate https://svn.sourceforge.net/svnroot/PROJECTNAME/trunk https://PROJECTNAME.svn.sourceforge.net/svnroot/PROJECTNAME/trunk



Works for me.

I'm not sure if I'm not reading the email that gets sent out but sf.net 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 shredderchess.com 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

RC3

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 sf.net 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.