Bobulate


Archive for January, 2010

*sniffle* (2)

Thursday, January 28th, 2010

Another week gone by an no end to my cold in sight. This is getting to be really annoying, as it both fragments my work day and makes me unreliable in responding to just about anything — so various jobs (both real and hobby) have been falling behind.

The hobby bits are easier to write about, so here goes: I wanted to produce a screenie of Krita on OpenSolaris, but it turns out that it hand not been built in my first packaging (neither had KSpread, for that matter). Turns out they require Eigen. Eigen is a C++ template-based linear algebra library. So I installed the Eigen package (also produced by the KDE4-OpenSolaris project: make no mistake, this is a small group with a big software stack to take care of). That’s where the fun starts — I don’t think anything else makes serious use of Eigen. Maybe some stuff in KDEgames or KDeedu, but obviously because I hadn’t had Eigen installed previously, they (if they are there) have been silently ignored.

So, Eigen. Since the KDE4-OpenSolaris project aims to use the Sun Studio compiler (so that the resulting KDE4 could be included in the base system and so that i t can re-use any other C++ infrastructure in the system), we need to make sure that Eigen works with the compiler. In the case of a giant and complicated template library, that can be a big effort. And I’m immediately stymied by the Matrix class, where the compiler complains about multiple definitions of every type in the Eigen generic interface (Base, Scalar, and another half-dozen). I’ve not even managed to strip the examples down to an example that demonstrates the problem, which makes debugging — or asking the compiler gurus for help — difficult.

Suffice to say that Krita screenshots are not to be expected anytime soon.

On the upside, the release of KDE SC 4.4 RC2 means that the other bits are nearing stability, which means we can re-focus on stability and performance on OpenSolaris for a bit. Since Pavel has set up various continuous builds on our crunchy build box (courtesy of Sun Netherlands) so tracking in future should work a little better — I hope we have fewer separate patches to maintain in future as more stuff gets upstreamed.

FSFE awarded medal for good governance

Tuesday, January 26th, 2010

The Theodor Heuss Foundation (German site, but the Wikipedia article is probably more informative), named after Germany’s first post-war president, is a foundation established to remember the political achievements of Theodor Heuss as an example for social commitment, moral courage and the dedication to fostering democracy. The foundation seeks “to bring attention to something, which has to be done and shaped in our democracy, without being finished” (Carl Friedrich v. Weizsäcker, 1965).

The foundation awards a yearly prize and medal to persons of high standing and organisations, which are groundbreaking in these areas of social commitment and the fostering of democracy.

This year the prize has been awarded to Oxfam and to FSFE. The FSFE press release is available (also in German, French, Italian, Dutch and Greek, thanks to our wonderful and dedicated translation teams). In these complicated days, it feels — to me, at least — a little weird to be side-by-side with an organization like Oxfam. They are helping rebuild Haiti. Providing direct support, like water and shelter; “helpin’ people with skin“, as Granny Weatherwax might say. The FSFE helps with skin, too, (for instance with licensing advice, workshops, and promotion booths at events), but for far more abstract goals. Which isn’t to say that Free Software does not help: some Free Software is really useful in a disaster.

It might feel a little weird in the current context, but it is an honor and a privilege.

KOffice on OpenSolaris

Sunday, January 24th, 2010

KWord on OpenSolaris screenshotInge Wallin recently blogged about the portability of KOffice — spurred on, no doubt, by the success of the port to the Nokia n900 and to Haiku. So he listed GNU/Linux, Mac OSX, Windows, FreeBSD (thanks, Inge, for checking), Haiku. That list is missing (Open)Solaris though, which as a UNIX flavor. ought to be a pretty simple target.

Of course, Solaris has been a primary target for OpenOffice for ages, so KOffice is a little late to the game on this particular platform. But I guess that’s my fault, since I’m one of the packagers for KDE4 on Solaris, and I hadn’t gotten around to it yet. So this weekend I spent a little under two hours hammering together a specfile (RPM-style) for koffice and getting the whole darn thing to build. Screenshot of KWord in action as proof. I tried KPresenter as well, but that crashed on changing the list style, so I didn’t think that was a good demonstration.

Of course, no port is without its patches, so here they are:

  • constness — this patch matches the constness of parameters in definitions with those in declarations, so that int foo(const int) is defined with int foo(const int i) and not as int foo(int i). Now, since the last time constness-matching blew up, I’ve learned that this is really a bug in Sun’s compiler, because constness is not supposed to be mangled into the name. However, I’ll claim that code neatness demands that they match, anyway.
  • double — some math functions like sqrt() can take both float or double, and Sun’s compiler doesn’t just pick one when you pass it integer parameters, so we need some explicit disambiguation. This is common all across the KDE codebase.
  • NaN — the KOffice code uses val != NAN which uses the gcc-specific NAN #define; probably !isnan() is better.
  • math — the header file math.h in Solaris uses the identifier “exception”, which becomes ambiguous in the context of the STL, so it needs to be included earlier, rather than later. This patch bungs in math.h as the first include in a number of C++ files — not necessarily something to merge upstream, because it’s mostly working around a bug elsewhere.
  • stupid — yes, this is a stupid patch. I can’t convince Sun Studio that 8.5 * 1440 is an secretly an integer constant and that it shouldn’t complain about a bunch of initializers in the MS Word import filters. I’m not really sure what’s going on here, it’s something special about static const initializers of class variables, since doing the same in a non-class context works just fine.

So there you have it. Five tiny patches for a codebase of a little over 600000 lines of code. Nice. Tip of the hat (I have lots of hats, but all of them are baseball caps and I don’t have a decent Stetson) to Inge and the KOffice folks for a nice portable office suite. You may be troubled, but your code is good.

On freeing a project

Saturday, January 23rd, 2010

I saw over on LWN.net (a very valuable resource for technology articles, well worth your $5), that a RAW picture editor called RawTherapee had been re-licensed from Freeware (gratis, but proprietary) to Free Software, under the GPLv3. The application is something I won’t use myself, and I can’t even manage the comparison to DigiKam (which I don’t use either). Technologically it looks quite cool, from the cmake-based build (yes, having a build system that supports cross-platform development effectively can be a wonderful thing) to the (comprehensive and multi-lingual) ODT manuals. I miss the nice KDE reporting of missing dependencies summarized in a list at the end, though. Something to contribute, over there.

The author, Gábor Horváth, states some interesting reasons for freeing the whole thing; I personally think the “family” argument is the strongest one, and it’s important to spend time with your (small) kids. Of course, at 10 months you can still code with the baby on your tummy. The other motivations are largely a matter of growing the community of developers and contributors in order to get better coverage of all the aspects of development (GUI, documentation, algorithms, translations) and smoother development by not depending on a single individual. All good reasons, to be sure. Whether these are good motivations to choose GPLv3, I don’t know (over some other copyleft license that encourages community building).

I’m going to admit a very non-charitable reason for looking more closely at RawTherapee: I was intending to bitch and moan about the state of the source code and the licensing and then point out how it should be done, by gorm. Instead, I can point to RawTherapee (as of SVN revision 31) as an example of a Free Software project done (pretty) well:

  • (good) Clear license choice; although the license is in a file called “copying” instead of the canonical “COPYING”, it’s the complete text of the GPLv3.
  • (good) Every file has a complete copyright header, including sufficient license text and an identifiable copyright holder. As the project grows, it will be interesting to see if it manages to keep a good grip on its contributors — that is, if everyone who adds a copyrightable contribution to the code actually adds a meaningful copyright holder line to the file headers. This would be, roughly, clause 5a of the GPLv3.
  • (bad) The distribution from SVN includes a few pre-compiled libraries (jpeg, lcms, png, tiff, z) for windows and accompanying header files. Of that lot, jpeg doesn’t mention its license terms in the file header (but refers to a README that has been lost). I hunted down the relevant source distribution, and the README contains a license that stipulates that README must be included with the distribution if any source is distributed. Right, minor point, but something to clean up in a next release — although I’d like to think that it also illustrates that the license in the jpeglib header should be clearer. lcms is MIT licensed, the png license doesn’t seem to allow binary distribution at all — the permissions it gives are for source. On the other hand, the use of the code as a component in a product is encouraged — that suggests binary use is ok, but it’s not exactly explicit. Tiff is MIT again (when I say “MIT” I mean “Simple permissive 1-clause, possibly with a restriction on endorsement”) and libz is also permissive. So just one minor blot.

Anyway, a tip of the hat to Gábor for doing it right (and doing the right thing) and I wish him lots of success with his project.

*sniffle*

Saturday, January 23rd, 2010

Last week I was in Berlin, and besides getting some work done, picking up some espresso beans and meeting old friends, I also received a wonderful German cold bug. From my boss Karsten, presumably. We all know that parents of small children are plague-bearers, but his kids are apparently in a different pathogen group than mine — as a result of which I’ve been pretty much laid-up all week with sniffles, headaches and the like. I can focus for about 2 hours at a time, after which it’s back to bed. I don’t recall colds hanging around this tenaciously or virulently before; the only good thing I can say about it is that 2 hours is enough time to write blog entries on random legal and licensing topics (and also technical KDE things, but that’s coming up).

Overcompensating

Friday, January 22nd, 2010

Overcompensating is a webcomic (that one is safe for work) which I’ve been reading for years. Patently-O is a blog about patents which I read occasionally — I must admit that my interest in comics pre-dates my interest in patents. It (Patently-O) has a link up to a guide to patent damages. I’m not going to recommend to people on PlanetKDE to read it in particular (PlanetFSFE, maybe), but a few things struck me as I paged through it: one, that it’s remarkably readable, for a document produced by the legal profession; two, that it’s a practices guide that is quite concrete in what needs to be done and how things are handled; three, that it doesn’t talk about non-commercial infringement at all, as far as I can tell.

Since patents on software implementations of algorithms and the like continue to be granted in the US — witness HP’s patent on choosing a number base for a given processor or Google’s patent on map-reduce (apply a function to items in a list, then aggregate) — understanding the potential end-results (damages when infringing) is a big deal.

A cake for Shaun

Wednesday, January 20th, 2010

Well, Shaun, here’s a chocolate cake for you. it’s very similar to the pecan cake I wrote earlier — but closer to the “ultimate chocolate brownie” recipe that I based both off of.

Chocolate cake for Shaun: Mix three eggs and a cup of (brown or cane) sugar and a tsp. of vanilla extract and a pinch of salt for 10 minutes on high with an electric mixer. Alternately, show the world you’re amazingly buff with a hand whisk. Optionally add chopped nuts. Stir in 100g melted pure chocolate (that’s 4 squares in North America, I believe). Sift one and a quarter cups of flour with 2 tsp. baking powder and sir that through the wet ingredients. Pour into a 9″ round pan and bake for 30 minutes at 350F or until a fork comes out clean. Frost with a mixture of icing sugar and powdered cocoa and afew drops of water (if you’re into frosting, that is).

License Badges, 0.7 version

Tuesday, January 19th, 2010

I’ve added some bits and pieces to my badges-for-licenses scheme, mostly based on comments received from readers. Most notably, I’ve added the LGPL, added links to the license texts, twiddled the CSS a bit, added mouse-over warning messages to those licenses that deserve a warning, and improved the description of some of the badges. What still needs doing — and I wonder how to achieve a good balance between having an overview of licenses that is short enough to be readable, and the subtleties of licensing reality — is writing up a good piece on how these badges reflect the most important pointsof each license, but do not state the complete effect of each license (unlike Creative Commons licenses, where each set of icons maps to one set of license terms).

The next round of updates will basically be adding more licenses, improving some of the icons, snazzing up the presentation a bit and importing the whole thing into the FSFE site. That’s for just before FOSDEM, I think.

Free (as in Speech)

Monday, January 18th, 2010

The Netherlands has a “dichter des vaderlands”, a national poet. I don’t know if that would be comparable with a British poet laureate — perhaps because the Dutch one is primarily a product of a single newspaper / publisher. The conservative one, at that, but the national poet is tasked with doing whatever poetry demands. A little like a national ombudsman, I suppose. The current holder of the title is Ramsey Nasr, and his latest foray starts with (loosely translated): “So, Mr. Premier, how does it feel to lie // and then to see the same in print?” The Dutch version refers to the premier by his initials, JP. I’d pin this up as a testament to Free Speech in this country.

Another note on dual-licensing

Wednesday, January 13th, 2010

I recently wrote about the FreeType license and its double license and why it was necessary. It’s an interesting situation (for FreeType itself) because there’s the GPLv2 and a second Free Software license involved — the FTL, which is basically a 3-clause BSD license with attribution required.

Often, though, when we talk about dual licensed we mean a situation where one license is a Free Software license and the other is a fully proprietary one. Bear in mind that the 3-clause BSD license allows proprietization as long as you satisfy the attribution clause and the license distribution clause, so it’s not a world of practical difference, but one of intent. The suit filed around Palm’s PDF viewer on the Pre illustrates the effect differences of intent can have.

One way you can look at dual-licensed software is that you have “the usual license” (which in our context is a Free Software license, probably some version of the GPL) and that for some users who cannot abide by the terms of that Free Software license, you sell exceptions. Richard Stallman writes on the subject — I found it via groklaw, where also one of the first comments uses the phrase “selling indulgences,” which I think is much more evocative.

So the point is that if you are the copyright holder — the sole copyright holder, because you need to have the right to re-license the code — then you can sell an indulgence to someone who cannot abide by the Free Software terms, but whom you consider worthy to use the software nonetheless. Yes, that’s plenty subjective. My phrasing is also slightly wrong, because you don’t have to be the sole holder: there are other ways of ensuring that you can grant the indulgence even with multiple rightsholders (a contract or license grant would do). In any case: you can do this for specific reasons while still supporting and producing Free Software.

This is also RMS’s pragmatic point: while the FSF does not follow this practice, that doesn’t mean others cannot while still being “ok”. And I think that’s good news for GPL’ed libraries out there. For users of GPL libraries, bear in mind that intent matters, and that the GPLv3 offers a grace period that the GPLv2 does not — and that might be important when dealing with entities whose intents are not entirely clear.