Caboodle 0.2

So I released 0.1 and 0.2. Now Caboodle has a menu bar (whee), an icon and a .desktop file.

To clarify something: you do not need OCaml or the Gtk+ and Cairo OCaml bindings to run Caboodle, just to compile it. I do not provide binaries at the moment, but if there's demand I can put up a pre-compiled Linux/x86 version.

Article page


Caboodle is a puzzle game. See:

As you are probably able to tell, it's a clone of Planarity. My excuse for the blatant clone is that I wanted to learn OCaml and the game was a nice, simple project to tackle. And at the same time, I got to learn a bit of Cairo, too. Of course, I was — and mostly still am — totally clueless about graphs and the related math.

Still, the end result, even its current state, isn't too bad. It's definitely faster than the original in most aspects, which shouldn't come as a surprise given the ass-kickingness of the OCaml compiler especially compared to Flash. The most significant slowness is due to the currently very naïve redraw logic: every time something moves, everything is redrawn. As you can probably guess, it starts to slow down with a large graph and fast mouse movement. I'll have to see about fixing that. And I'm not totally satisfied with the level generator, even though that's the part I've spent the most time with (no, the math didn't come back easy after too many years of not using it at all, you can all point at the source code and laugh); it does generate too many vertices with just two edges. But I think that should be pretty easy to fix.

About OCaml: a nice language with an impressive compiler, and quick to learn, at least up to a point. I haven't used any objects in Caboodle, only the stuff that comes with LablGTK2. And I didn't write any functors. Or a bunch of other stuff. And I still don't find code written by others very quick to read and the compiler error messages can be pretty puzzling, at times. Part of the learning curve is probably caused by the fact that I've never before used a language with a modern (you know, from the 70s) type system, just the basic stuff provided by C, Java, C# and friends. Still, I'm not quite sure I like the ML syntax, but I suppose it's not too bad. And I wonder if there are some limits to the language that I would have hit on a larger project. It is mostly very, very strict, and doesn't offer any of the runtime type frobbing that Java does with its happy casting back and forth, reflection and stuff.

Cairo turned out to be surprisingly easy, too, at least for this simple a project. I have to thank Olivier Andrieu's cairo-ocaml examples, though, without them the going would have been a lot rougher. But I can't really compare it to other systems, because I've never done much graphics programming.

Also, turns out I'm not the first one with the same idea: back before I had anything showing up on screen, xiphmont was on #gtk+ posting screenshots of his version. Oh well. Seemed to be a silly reason to stop, given that my objective wasn't to write the game as much as to learn the tools, so I ploughed on.

I haven't yet done a release, but it should be ready for 0.1. I'll post it at gnomefiles once I get around to it. In the mean time, it's available in the darcs repo from the Caboodle home page.

If you wonder what the name is about, it's just a random word I got out of /usr/dict/words. That's my preferred way of naming software.

Article page

River of Gods, The Family Trade

Ian McDonald's River of Gods is absolutely fantastic, it rocked my world. The picture it paints of a near future India is incredibly vivid and compelling. Made me want to visit India. I haven't read any of the other 2005 Hugo nominees, but at least this book is totally deserving.

Also, I shouldn't have read (well, haven't yet finished, I've been reading it on the commute) The Family Trade by Charles Stross: now I have to wait for the sequels. It's smart, fun and totally not your run of the mill fantasy. And just the right size: as the author commented on Making Light, short books are the new long.

Article page

Notes from a honeymoon to Florence and Milan.

  • Florence is beautiful. Consistent renaissance style with a few dabs of the medieval and modern makes for a wonderful city. Milan less so, with mostly buildings that are ugly, pompous or both. However, Milan has more greenery, which is nice: Florence could really use a few parks in the center of the city, especially of the non-fenced kind.
  • Milan felt like a real city, whereas Florence had this slight feeling of being an open-air museum and a tourist trap. But with that many tourists in that small a city, it's inevitable, I guess.
  • An awful lot of those tourists were Americans.
  • We got mostly indifferent or unfriendly service in Milan. However, we were there only for one day, so it's plausible we only had bad luck. Florence was better.
  • The weather was totally scorchio. However, a nominally cloudless sky in Milan with 31 degrees celcius was actually a greyish blue. We couldn't figure out if this was because of pollution.
  • Avoid the restaurant of Una Hotel Century in Milan like the plague. When "a glass of white wine" (no wine list was forthcoming) means the bottom of a chardonnay bottle with some sauvignon blanc on top and the arrival of the dessert is marked by the unmistakable sounds of the microwave, you know you aren't in for a great dining experience. Otherwise the hotel was pretty decent.
  • Booking a room at Hotel Medici in Florence was a mistake. Maybe we expected too much from a two star hotel, but we went roaming the city streets for a nicer place to stay at as soon as we arrived. Sofitel was pricey, but I guess every hotel in that city is.
  • The food (and wine) was mostly fantastic, as long as you avoided the most obvious touristy places with menus in six languages and people in front trying to lure more customers in.
Article page

This language thing

Not that I particularly expect this GNOME language issue to be resolved anytime soon, but still: assuming that the choices are Java and C#, do people actually want to standardise/bless/whatever the language, the runtime standard (that is, "JVM" or "CLR"), one particular runtime ("Kaffe" or "Mono"), or some combination thereof?

On a totally unrelated note, I always wonder why on earth Microsoft chose a totally ungoogleable name for their language.

Article page