The Elegant Chaos Blog

June 16, 2005

During a random session searching for Python html generating tools, I came across an interesting article about language syntax.

I wonder if he’s looked at Dylan?

more...

Koders is a bit handy. It’s a search engine specifically for open source code.

more...

June 08, 2005

Recently I’ve been working on some odds and ends that I wanted to Open Source, so I had to ponder which license to release them under.

This is a surprisingly gnarly question, and I’m not sure if I’ve got the final answer but right now I’ve gone for the GPL, although I did have some concerns about it.

more...

Richard Buckle has posted some useful notes on Apple’s newly published Universal Binary Guidelines.

I’d add a couple of things:

Move On Up

Migrating to XCode/Mach-o is all very well, but my gut feeling is that the higher level language you are using, the less pain you are likely to suffer, so I would change the emphasis slightly.

If you are still using Carbon plus C/C++, consider moving to Cocoa plus Objective-C, Java or Python. This is only repeating what Apple have been saying for a while.

Let Someone Else Store Your Data

I concur completely that byte swapping will be the big deal. All of my decade of (often painful) experience working on cross platform projects and porting games tells me that most of the hard work comes in this area (alignment and other things may affect performance, but byte swapping will introduce most of the bugs).

The best way to minimize the pain is to move to some sort of structure storage library. I suspect that people using Core Data, or one of the object persistence APIs in java or python will win big here - always assuming that the maintainers of whatever they are using do a good job!

Short of that, write your own simple API for file operations, add an endian tag to your file formats, and make sure that you stream data in and out of your API in primitive sized chunks (ie pack/unpack structures rather than writing them directly), so that they can be auto-magically swapped later.

more...

Josh Portway pointed out a post on the FutureOfTheBook blog, talking about a BBC prototype for a system which performs Bayesian filtering on news feeds.

This is something I’ve been thinking about for ages, and funnily enough I started implementing it last week!

The BBC prototype uses email to deliver the news. I decided to write mine as a Python CGI which effectively acts as a filter, sitting between you and a list of feeds. It’s called Feed Me.

The idea is that Feed Me will download and categorise the news items according to your Bayesian “goodness” filter, and then present you with a sorted list. It also appends little voting links to each article allowing you to tweak the filter, telling it you want items more or less like that one.

At the moment the code is very rough, and only works on my Powerbook, but unlike the BBC one I have implemented the actual Bayesian filtering (using crm114), so it is actually quite close to being useful!

I’m going to spend some more time working on this thing, cleaning it up and getting it to a stage where I can use it myself. In the meantime, I’ve made a project page which I’ll try to update as I do things.

more...