Somato

Date: February 9th, 2007 by Author: danielk

I do way too much tinkering around. Scraping a single CPU cycle here, moving a pixel around there, and so on. You get the idea. It’s a habit that has recently become so excessive that I don’t get much else done anymore, because during my tinkering I find all over the place “exciting” new opportunities to tinker around.

So much for the whining part. Now, when it comes to software projects, what’s the best way to stop yourself from tinkering yourself to death? Right. Release it. Early and often, as they say. Release the damn thing and get over it. There’s an exciting possibility that further tinkering will likely involve actual bugs reported by actual users.

So I’m going to do just that right now. There’s a project I’ve been tinkering with for about four years now, and there has never been a public release until now. I guess I lose spectacularly in any time-to-market comparison. And this is a tiny project.

Anyway, back on topic. You probably guessed it already — the project I’m about to announce goes by the name Somato. Years ago, my computer science class at school did a software project term. The task was to write a program that solves the Soma cube puzzle created by Piet Hein. And so I did. But then I got carried away a bit. The result, complete with 20-milliseconds solver, 3-D animation and SSE intrinsics is now available at the Somato project page. I also created binary packages for Ubuntu to raise the chance that someone will actually download my favorite toy, despite the fact that it doesn’t actually do anything productive. ;-)

A nice side effect of preparing the release was that it forced me to complete my website. You’ll notice that the “Site Almost Finished” headline is gone now. I put together projects overview and how-to overview pages. So all the basic infrastructure is in place now.

Next week will see a regexxer release. For real.

Das Leben der Anderen

Date: December 19th, 2006 by Author: danielk

Yesterday I watched Das Leben der Anderen on DVD. As far as I’m aware this is the first film about the GDR shown at the movies that isn’t a comedy. Thus it’s definitely worth watching even if you’re understandably tired of the recurrent theme by now.

The film’s gloomy atmosphere fell on fertile ground as I was tired and in a somewhat subdued mood that evening. Indeed, it’s been a while since the last time a movie made me cry. Das Leben der Anderen manages to be emotionally moving without any kitsch whatsoever. I really love the way the final scene ends in a still. Watching this movie reminded me of the fact that I’m still an optimist at heart, non withstanding my pronounced skepticism.

This film has been criticized as showing the Stasi in too mild a light, probably on the grounds that the main theme of the officer who sees the errors of his ways is unrealistic. And indeed it is. But I think that’s missing the point. As I see it, there are two main themes in this film. One of them being how the activities of the Stasi and the fear of them permeated a whole society. I think that part is shown accurately and doesn’t understate the role of the Stasi in the slightest. The hypothetical story of the true believer who is distressed by the cynicism of his colleagues is merely the dramatic ingredient that makes this a movie, and a great one at that. Also, in the audio commentary (yes, I know I’m weird), the director quite clearly outlines his views about the methods of the Stasi, and make no mistake, he’s not sympathetic.

On another note, I can proudly proclaim that I know one of the extras appearing in this movie. As it happens, my girlfriend befriends quite many interesting people. It felt rather odd to see Detlef Matthes, himself a victim of the Stasi who went into exile, among the audience of a lecture at a Stasi training center.

So, if you haven’t seen the movie yet, Das Leben der Anderen is definitely worth being on your list.

Improvements to gmmproc

Date: November 27th, 2006 by Author: danielk

The project I’m currently working on required me to make some improvements to gmmproc, the code generator used by the gtkmm project. In my current work it’s occassionally necessary to wrap enumerations that don’t follow the consistent naming scheme of GTK+ we take for granted nowadays. This is how the enumerations look like:

  • FOO_THIS,
  • BAR_THAT,
  • FUZZ_THERE

That should of course be:

  • MODULENAME_FOO_THIS,
  • MODULENAME_BAR_THAT,
  • MODULENAME_FUZZ_THERE

Ideally, this would prompt a patch to the upstream code. But it’s not always possible to change upstream API, and even if it is you sometimes just don’t have the time for the bureaucracy involved and only want to get your code to compile for now.

But the code generator didn’t like the idea at all. The Perl script that gathers the enumeration definitions from the C header files even went into an infinite loop. I fixed that, but then it turned out that the enumeration parsing module of gmmproc unconditionally stripped everything up to and including the first underscore in every enumeration constant. The result looked like this:

  • THIS,
  • THAT,
  • THERE

Ugh. Well, this prompted me to change the behavior of the enumeration parser to only strip the prefix if it’s actually common to all constants defined in an enumeration. It’s been a long time since I last dipped my feet into Perl, but it seems to work now. The new code is available from glibmm CVS, including the earlier branches from glibmm-2-8 onwards. I do hope it doesn’t break anything.

In order to actually prefix the enumeration constants in the C++ code, you can use something like this:

  • _WRAP_ENUM(SomeType, ModuleSomeType, , s#^\b#MODULE_#)

You could even give the C++ constants the same names as in C, which would in many situations be the most appropriate scheme since we use namespaces instead of module prefixes in C++. The resulting shadowing could lead to problems though if C and C++ code is mixed. Your mileage may vary.

Microsoft Firefox

Date: November 19th, 2006 by Author: danielk

I really couldn’t resist posting this; it’s just hilarious: Get Microsoft Firefox now! Especially don’t miss their promotion video. Have fun! :-D

Exams Half-time

Date: November 6th, 2006 by Author: danielk

So, I’m now about halfway through this term’s written exams. So far I have sat the exams in both of my major subjects, Math and History, and of the minor ones in German and Physics. The topic for Math was linear algebra, and the History exam was about the peculiarities of the German development and attitude around the first world war and beyond (Deutscher Sonderweg). What’s left is English, Political Science, Computer Science — that’s a laugh — and the second round of my two major subjects.

I already got the results back for Math — 12 points out of 15 —, and History — 15 out of 15! Looks like I’m on a run of luck there. Mind you, with results like that, exams can even be fun. I literally inquired my teacher whether she was trying to kid me when the results of History were handed back to us. And I eagerly await the results of the German exam, where I wrote in a cock-sure manner about matters I hardly have a clue about. The task was to discuss Georg Büchner’s understanding of art. Will she notice? :-)

Today I sat the exam in Physics, which went fairly well given my frequent absence during the first couple of weeks after the last holiday. Yesterday I had to teach myself the basics of quantum physics (discovery of the photoelectric effect). Luckily we were given ample time to explain this one.

Still, this were all just this term’s exams. The big showdown will be next year around Easter, with the Abitur finals.

« Previous Entries Next Entries »