Thursday, the 6th of October, 2005

Thank you

Right, so we got the utter turd of a new copyright law. Here are the results of the final vote in the parliament. "Jaa" is for the new law, "ei" against the law, "poissa" is away.

A friendly message to anyone there who might be listening: I won't vote in any election for anyone who wasn't against the law.

@ 21:15 +0300 [ ] archived

Friday, the 12nd of August, 2005

Caboodle 0.3 and 0.4

Two new versions of Caboodle: now it has better level generation logic, it caches level images so the whole thing doesn't get redrawn all the time, it includes a randomize level menu command and an option to display line intersections interactively as you drag vertices around. The last thing will probably grind the whole thing to a halt on larger levels.

@ 13:08 +0300 [ ] archived

Monday, the 8th of August, 2005

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.

@ 13:45 +0300 [ ] archived

Saturday, the 6th of August, 2005

Caboodle

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.

@ 19:30 +0300 [ ] archived

Thursday, the 7th of July, 2005

My First Gtk+ Patch

Whee, my first Gtk+ patch — or at least something not completely unlike it — was accepted.

@ 22:12 +0300 [ ] archived

Saturday, the 18th of June, 2005

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.

@ 11:41 +0300 [ ] archived

Saturday, the 4th of June, 2005

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.

@ 12:33 +0300 [ ] archived

Thursday, the 12nd of May, 2005

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.

@ 19:20 +0300 [ ] archived

Saturday, the 7th of May, 2005

Introducing Lukutoukka

Lukutoukka is a speed reader for the GNOME desktop. Inspired by this post (or really, originally, the Eastern Standard Tribe speed reader.)

It doesn't look like much, especially not without animation, but here you go, anyway:

The idea is to push words from a text file to the screen one at a time at a quick pace. After a while it feels like your brain is melting, but you do end up reading the text far faster than you would scanning a page because your eyes and mind don't get a chance to wander. Depends on your viewpoint and the text you're reading whether that is good or bad :-)

It's also the first significant piece of code I've written in Scheme. I used Guile. It's not the fastest or the most feature-packed implementation out there (compare to MzScheme, Bigloo and Chicken) but it does have a rocking Gtk+/GNOME binding.

Oh, and to keep life exciting, I'm using Darcs for version control. And loving it.

@ 17:18 +0300 [ ] archived

Saturday, the 30th of April, 2005

Two literary links

From Charles Stross, on why British SF is these days teh rawk.

And a great interview with China Miéville.

Books by both are highly recommended, by the way.

@ 14:48 +0300 [ ] archived

Friday, the 29th of April, 2005

Ctrl-Alt-Backspace aargh

I've lately acquired a habit of using ctrl-backspace when editing text. I also tend to use alt quite a bit when moving around text, especially if said text consists of sexps. And suddenly I see why the DontZap option in the X server is a pretty good idea.

@ 22:28 +0300 [ ] archived

Saturday, the 5th of March, 2005

Married and stuff

So we got married last Saturday. Yay! The night after, we started suffering from what appeared to be food poisoning. My mother and one of the bridesmaids had the same problem. That was not so cool. I ended up staying home sick until Wednesday, Minttu the whole week.

The honeymoon will have to wait a bit, though. We're going to Florence, and we'd rather go there when it's not freezing in northern Italy.

@ 11:28 +0200 [ ] archived

Sunday, the 30th of January, 2005

Python is not Java

I recently read some old stuff on Phillip J. Eby's blog, and the Python Is Not Java entry really hit home. I'm not a new Python programmer, I've been using it from around 1996 or so, about as long as Java. But every now and then I see Java-isms creep into my code. It's usually after I try some fancy approach and later on come to wonder why my code stinks. I've been especially guilty about writing completely unnecessary getters and setters and doing (or even converting module level functions to) class methods that end up being just painful to use.

The parts that are more Lisp-inspired tend to be a whole lot better. I've never yet regretted returning a function from a function. Too bad about Python's lame lexicals.

@ 12:50 +0200 [ ] archived

Tuesday, the 11st of January, 2005

Sweet screenshots and various other things

GNOME Launch Box is looking sweet. Well, at least from the screenshots, not that I've tried it yet. I was hacking in the autumn on something a bit similar; it's called Pepper but it sits abandoned for the moment. (For anyone interested, it's written in Python and available with tla at juri@iki.fi--2004a/pepper--mainline--0.1, http://www.helsinki.fi/~pakaste/arch/) If the hack by the Imendio boys is any good, it can stay abandoned.

In other news, feeling that PyGTK is becoming mainstream, I seeked out a new ghetto and started hacking with λgtk and SBCL. λgtk is a bit painful to install at the moment, requiring a new core with the sbcl-af stuff for SBCL, but it looks like Brian Mastenbrook is working on it. I was thinking of using OCaml, but then decided that the type inference stuff of CMUCL/SBCL is good enough a compromise between decent typing and flexibility. If anything comes of this project, I'll probably have to take a look at the libglade bindings I pointed at previously and also bind gconf and stuff.

Also, in the category of nifty languages building on other people's VMs, yet another one I wasn't previously aware of: Nice doesn't look too bad. Also see Scala, Boo and Nemerle. For the record, I think Groovy looks like what happens when a dozen languages collide with each other and someone is picking up the pieces and trying to match them together. With little success.

@ 22:38 +0200 [ ] archived