Archive for August, 2008

kdesvn-build 1.7 improvements

August 29th 2008

There’s enough changes in the upcoming kdesvn-build release to bump the version to 1.7 instead of another 1.6.x release. Here’s a sampling:

  • Improved latest log directory support:

    Normally kdesvn-build stores the logs for a build run in a directory named in the form YYYY-MM-DD-ID which is kind of unwieldy to type in. So what kdesvn-build would do is to create a symlink called “latest” which would point to the last build run. So an error that just occurred in kdelibs could be easily found, in ~/kdesvn/log/latest/kdelibs (the path may vary, kdesvn-build will tell you the exact location). This is cool and all but if you had multiple modules you wanted to look at then the behavior of “latest” was not normally be ideal.

    For instance let’s say there’s an error in kdebase and kdemultimedia. You fix kdebase and confirm that by running kdesvn-build just on kdebase. Now when you want to see what was up with kdemultimedia you can’t, as the latest symlink is pointing at the wrong directory.

    With this change, kdesvn-build symlinks individual modules under latest to the last run for that module. So, you can always go to ${log-dir}/latest/kdebase to see what the last set of logs is for kdebase.

  • Related to the last point, André Wöbbeking pointed out to me that kdesvn-build doesn’t create the latest symlink anymore if it didn’t already exist, which is also fixed. It’s probably been broken this way for awhile actually.
  • Another major change is that kdesvn-build will try to apply more intelligent default branch settings for modules. For instance if you set branch 4.1 for global settings and ask for the phonon module, kdesvn-build will download from branch 4.2, which is appropriate for phonon when trying to build KDE 4.1. You can still override this by specifying a branch for a module, and sometimes you must, especially for modules which don’t get branched with KDE like playground and extragear.
  • The phonon module I mentioned earlier is completely a figment of kdesvn-build’s imagination (it is developed normally in the kdesupport module). So kdesvn-build 1.6.2 only supported phonon with a branch option. Andreas Pakulat showed me that phonon trunk (from kdesupport) could be built without the rest of kdesupport so now kdesvn-build supports building the phonon module from trunk. Just remember it’s not a real module, kdesvn-build is making it up as it goes. ;)
  • Finally the biggest change is that kdesvn-build will support persistent data finally. In other words it will save information about its execution and results for later use. It doesn’t do much with this yet (I’m thinking of having it automatically re-run configure or cmake if the appropriate options change) but it lays the foundation for bigger stuff. One visible change is that kdesvn-build will warn you if modules repeatedly fail consecutive times so you can take a closer look at it.

So that’s a lot of work I think. If you want to test it’s all available from /trunk (kdesdk/scripts) and I would appreciate it since I may not have the opportunity to catch brown-paper-bag-type bugs for too long after release.

Posted by mpyne under KDE & Programming & kdesvn-build | 2 Comments »

Olympics and other fun stuff

August 20th 2008

So I was excited to see my people behind KDE interview get posted the other day, especially since the comments were much more positive than I was expecting. blauzahl did a good job on the interview, I’d like to thank her and Danny Allen for taking the time to work on it. It was hard for me just to handle the Q&A session so I don’t want to think of how much work they put in!

Akademy 2008 is over and it’s kind of bittersweet for me, as I hear it was the best Akademy in the last couple of years and I wasn’t able to attend. I am glad that everyone found it such an enjoyable time though, I will hopefully be able to show up for one some day.

I’ve spent quite some time watching the Olympic games this past couple of days. There’s a lot more excitement than I’m used to, between Michael Phelps winning 8 gold medals (including 2 squeaky finishes), the excellent performances of our gymnastics and volleyball teams and watching Bolt destroy all competition on track and field. It’s kind of a shame to see China apparently faking the age of some of their gymnasts and going overboard in keeping protests away, especially given how unnecessary it is. China’s athletes have done very well so far, there’s no need for trickery, and trying to hide protesters is kind of like a Streisand effect. We already knew that China had dissidents, and now it’s also all over the news. Either way the Games themselves have been good although I’m starting to think it would be nice to have a organization not so completely corrupt like the International Olympic Committee to handle the Games. But I suppose the kind of money we’re talking about it practically going to guarantee rampant corruption :-/

Anyways I’m working right now on polishing off the kio_perldoc KIOSlave which I’ve added to kdesdk and I will probably make another kdesvn-build release in the not-too-distant future. Also, does anyone know who I should ask about adding a screensaver to kdeartwork?

Posted by mpyne under KDE & Personal | No Comments »

Akademy night

August 7th 2008

I just wanted to say hi to everyone going to Akademy. I once again cannot go this year but I figured to compensate I’d regale you with a story from my Officer Candidate School days.

This is a War Spoon

This is a War Spoon

Plate of spaghetti

This is a plate of spaghetti

When I first got to OCS, my eating habits were, uh, modified (to say the least) by the Officer Candidate Regulations manual. Instead of being able to eat food with a knife and a fork, I, as a newly minted worse-than-dirt OC got a spoon to eat with. The spoon was used to eat everything.

It was not sufficient that the spoon was the only utensil you had either. As an Officer-in-training you were not allowed to do anything as barbaric as pick up your food with your fingers. In fact you had a regimented, easy-to-follow 8-step procedure for eating. They called it eating-by-numbers.

So how does spaghetti tie in? Well, at every trip to the chow hall, spaghetti was an option on the menu (except for breakfast). Didn’t like mystery meat with noodles jefferson? Just get spaghetti. Get it every meal if you want. I wasn’t sure why the mess cooks liked spaghetti so much, but I wasn’t complaining. I love spaghetti. I even loved spaghetti by the end of OCS, wasn’t tired of it one bit.

But… how do you eat spaghetti with a war spoon? Well, the secret is that you cannot twirl your spaghetti into a bundle on your spoon and eat it as if you were using a fork. If you were to try to you’d make a mess everywhere (and thereby risk drawing attention to yourself). Even worse, it would be hard to actually eat all of the spaghetti without having to slurp any into your mouth. This definitely draws attention from the roving Class Drill Instructors. Officer Candidates do not like attention from Class Drill Instructors.

Instead learn to use what you have. With a war spoon, you simply have to use the edge of the spoon to cut the spaghetti into bite-sized pieces. Basically you use it like you’d cut a piece of pie out of a pan. It takes less time than you think once you get good at it. After a couple of days of practice you’ll be able to actually eat more spaghetti than you were able to before in a given amount of time.

At about week 4 or so we had our forks given back to us. How did I eat my spaghetti? With a war spoon, of course. Time is still precious, and you can fit more spaghetti onto a war spoon than onto a fork even if you use the pie-cutter technique.

To this day I still eat my spaghetti by the pie-cutter method instead of twirling. I use a fork now though, no reason not to be civilized. ;)

Posted by mpyne under Navy & Personal | 2 Comments »

Perl fun

August 3rd 2008

So in the course of developing the next code feature I plan to add to kdesvn-build (nothing major, just adding a persistent data store) I came across what I consider an oddity:

Imagine that we had a hash table, mapping module names to the count of consecutive build failures. Now let’s say we want to pare down this hash table to a list of modules with more than a given number of consecutive build failures (3 as an example). This could be done using Perl’s grep function to strip out list entries that don’t match a given criteria (in this case, hash keys whose associated failure count is not >3).

Now I didn’t feel like making this test inline (although it would not have changed the end result) so let’s assume that I put my comparison function separately in an anonymous subroutine:

# does not do what you expect
my $matchRoutine = sub {
    my $mod = shift;
    return (exists $moduleFailures{$mod}) and
        ($moduleFailures{$mod} > 3);
};

my @moreFailures = grep { &{$matchRoutine}($_) }(@searchList);

Now if we use this code to search for hash table entries with an appropriate number of failures, you’ll find that it instead returns all entries in the list that are present in the %moduleFailures hash table at all!

So what happened? The key is in the and operator. Most Perl programmers know that Perl has two sets of logical operators. C-style (&& || !) and English (and or not). These are described in the perlop Perldoc page. Basically the reason for the two different sets is syntactical convenience (for example being able to do print FILE “text” or die without having to put parentheses around your expression.

The way this bites you here is that Perl evaluates return (foo) and (bar); as (return (foo)) and (bar);. I’m not sure how the parser allows for using the return value of the return statement without so much as a warning but there we have it.

The solution, of course, is either to fully parenthesize your expression, or to use && instead of and in this case.

Posted by mpyne under Computing Troubles & KDE & Programming | 2 Comments »

Styes suck

August 1st 2008

So for the past couple of days I’ve noticed a swelling in my right eyelid. I figured it was merely a pimple but I woke up this morning and it had grown quite a bit.

So I went to see our Doc today and apparently it’s a stye. Right now I’m on an antibiotic regimen but now I can’t wear my contacts. :-/

In other news I’ve added a Perldoc KIOSlave to kdesdk, which will be released with KDE 4.2. So if you Perl you can look up stuff using Konqueror. (Of course you could before too, but now it will be included with KDE).

Posted by mpyne under KDE & Personal | 1 Comment »