Monthly Archives: November 2004

KIO

I was adding KIO support to Tacky (my Pyblosxom blogger) today, and was impressed with how easy the transition was. The only complaints I had were that there is no NetAccess function for getting a list of files and/or directories from a URL, and that writing a file involves a dance with a temp file and then file_copy(). Although I suppose that last one can’t really be helped. ;)

Anyways, if you guys end up seeing this, it must have worked. This will be my first post that I was able to make from my usual working environment, because I normally use my kde-cvs user account, but my blog is hosted from my KDE stable user account. Using KIO fish, I can now save directly to my stable user account from kde-cvs

My near car wreck

I can’t believe I forgot to blog about this. About a week ago I almost got into a car accident. I was driving down the road when someone decided to turn right in front of me into a side street.

Even at this point I’m not sure how I managed to avoid the wreck. If the van had been any closer to me when it started the turn, I would have either passed it or been hit in the side of my car. If the van had been farther away I could have simply hit the brakes. But it was like the perfect storm of bad luck.



Diagram of the near-collision (not to scale on vertical axis). I was in the red car.

Bad luck, however, was going to get screwed today. Somehow I managed to avoid the wreck by accelerating and veering right. Several factors saved me from a crash:

  1. The Chevrolet Aveo I was driving wasn’t a large vehicle, so it was able to make turns while traveling relatively fast.
  2. Also, the Aveo is very short lengthwise for an American car. I’m positive that if my car was any longer the van would have clipped my rear bumper.

The problem with veering out of the way is that I wasn’t able to turn onto the side street that the van had been trying to turn into. I ended up hitting the curb (luckily it was a sloped curb), which sent my car flying through the air (not much, maybe 0.5 m high, 3 m forward). I was quite shaken up, but the car was fine except for damage to the front bumper where the frame hit the grass and curb. A friend of mine told me that he’d never make fun of my car again after hearing about how it saved me from a collision. :)

Happy Thanksgiving

I hope you all have a happy Thanksgiving, even if you aren’t here in the United States. There’s nothing like huge family gatherings twice in the span of a month. ;-)

Unfortunately I’ll probably be absent from my usual online haunts for the next few days. My Java SQL project of death is due on Monday, so we need to start integrating code. :-(

Finding out what C++ symbols are in a library.

I was debugging a problem today that required me to find out what symbols were in a .so dynamic library. Being C++ symbols, the output from objdump wasn’t really very helpful. So in the interest of spreading my knowledge, I will now share the technique that worked for me with you guys:

Use this to dump the symbol table of a library:
objdump -t /path/to/lib | perl -e 'while() { ($text) = m/(\w+)$/; print "$text\n"; }' | c++filt

Use this to dump the dynamic symbol table of a library:
objdump -T /path/to/lib | perl -e 'while() { ($text) = m/(\w+)$/; print "$text\n"; }' | c++filt

This sucks

I won’t have much time for KDE development for probably the next month or so due to the fact that I have a ton of assignments to do, including extending an SQL engine in Java in a month. Hmm, that leads me into a rant.

Our team is inheriting the work of last semester’s Java engine. The design is more or less well thought out, even though a lot of the actual implementation is quite hairy. For example, when parsing the select statement, they use regex splits to determine all of the information! They were able to do this because all they needed to determine were the field names and table names, with each being restricted to single words without any other SQL clutter (such as being able to use the AS keyword to alias a field). I realized very early on that since we had to implement: aggregate functions as fields (SUM(foo), MIN(foo), etc), table.field references, the AS keywords, complex WHERE conditions, and the GROUP BY/HAVING/GROUPING SETS keywords, we were going to have to implement a parser.

Seeing as how I wanted this assignment done before I die, I volunteered to implement the parser. I considered Antlr briefly before rejecting it, instead settling on a simple recursive-descent parser. Although work on that is coming along as smoothly as can be expected, one of my team members is nearly freaking out over the fact that we’re adding a parser. It took me a whole day to convince him that the parser would pretty much required if we wanted to get this done, and yet he won’t get over the fact that we might actually have to interface our code with the existing code to get the project to work.

For example, earlier today he asked me whether it would be possible to somehow have the parser split up the complex WHERE queries into a series of simple WHERE queries, which the existing engine was able to handle. I’m surprised that I managed to not lose it right there and then. My parser already implements creating parse trees for the WHERE and HAVING keywords, all you have to do after a successful parse is do parser.whereCondition().matches(row) for each row in the candidate result set to see if it matches or not. It’s not like it’s brain surgery. I’m afraid this guy is going to waste more time trying to dream up ways to not have to write code than he will actually writing code, and it’s pissing me off.

The Incredibles

Short story: Superb movie

I think Pixar has done it again with The Incredibles. The graphics are once-again much improved, and I must say that it is getting harder and harder to tell that the movie is computer-generated when you’re not looking at human characters.

In fact, that is my only complaint with the movie. Although the modeling on the characters is generally superb, they still don’t really look human. In fact, I think the Shrek 2 team did a better job with e.g. Princess Fiona than what we have with this movie. I’m not referring to the weirdly proportioned shapes of the superheros either, but rather elements like the ears and noses. It doesn’t really detract from the film experience, however, and you can’t even notice on the female characters, as they pretty much all have their hair covering their ears.

The story itself is top notch. The writer/director of this movie also directed and co-wrote The Iron Giant, and it’s clear that his writing has improved for this movie. I’ve also seen The Iron Giant, and although some speak highly of that movie, I wasn’t too impressed with it, other than to say that I appreciated the fact that they packed in more story than a Disney feature length film would have. Bird has continued this trend for The Incredibles, and almost perfected it.

If I continue breaking down each part of the movie I’m just going to end up gushing however, so let me just reassure that the fight scenes are very well done, the sound and music are excellent, and in fact, there’s really nothing else that I would complain about. The movie contains melodrama without getting cheesy, and even manages to use the wife-thinks-her-husband-is-cheating cliché successfully.

My overall rating: 9.8/10

Baked caviar

Well I’ve been staying up working on Tacky because I wanted to post this using the Preview mode. KParts itself was surprisingly painless. Making KHTML render the fonts like Konqueror was a little harder, but I’ve got that problem solved (Hint: Copy konquerorrc’s Fonts settings from the HTML Settings group to your own KConfig file first).

The other reason I wanted to blog was to say that this essay should be required reading.

In related news, I spent a bit of time on IRC today unloading because someone had tried to downplay the severity of what happened at Abu Ghraib. I sympathize because it’s hard to hear about what the insurgents have been doing to the people they capture in Iraq and still remain dispassionate. But those who downplay what happened in Abu Ghraib assume (or at least, I hope they’re assuming) that all of those in the prison were guilty of something, which was in fact hardly true, even according to the U. S. Army report on the abuse.

Things like that are especially distressing to me as a servicemember. Although the specific branch of the military that I joined makes it unlikely I would ever be taken prisoner, I still don’t appreciate having the Geneva Conventions flaunted so flagrantly, because they are realistically the only thing that would be keeping me safe if I were to be captured. You might assume that whoever captured an American would just ignore the Conventions anyways, but that’s not really the case. History is full of examples of two warring sides that treated their prisoners well as long as the other side did the same. Even the spate of beheadings in Iraq didn’t start until after the torture at Abu Ghraib was revealed.

Anyways, it’s getting late, so off to bed for me.

Grab bag

I can’t think of any one
thing to blog about, so I’ll just blog about many little things.

  • I’ve made a quick PHP/MySQL rewrite of the main page of my site, so that
    it dynamically lists the different software I have. That way I can (after I
    convert the rest of my site) update the various programs I have without having
    to edit 3 different pages per program. This was much easier than I thought it
    would be.
  • Java sucks less now, but every time I want to like the
    language, I remember why the syntax annoys me so.
  • Screenshot of JuK's track announcement popup with cover art

    JuK is becoming niftier again. I
    need to finish my work on the Play Queue, but in the meantime gstreamer-0.8
    support and album cover art support has been added (to clarify, by wheels and
    Nathan Toone). The album cover art is quite nifty in combination with the
    track announcement popup, it is just a pity that we can’t use the Amazon Web
    Services API for downloading the cover art. If you’re wondering why, check
    out their Terms
    and Conditions
    . Needless to say, it is ever so GPL-incompatible.

    Before anyone bugs me about this, though, yes, I know that JuK has a Get
    Cover From Internet option (it currently uses a Google search). I don’t think
    this is quite legal either so I’ll be lobbying to have it removed,
    unfortunately.

    The only workaround I can think of is to open up an
    interface by which JuK can get images from some external program, and we don’t
    really care how that program does it. The only problem is that such an
    external program probably couldn’t be packaged with KDE, so it would have to
    live eternally as a user addon.

    All these petty problems aside, it *is*
    still rather nice, although the UI integration could be better.

  • One of these days I need to A) Add Tacky (my oh-so-simple blogging tool)
    to my homepage, B) Add support for previewing your post in Tacky, and C) Make
    Tacky use qmake or my simple Makefile template instead of the KDE build
    system, as there’s no way I’m putting up 630K of source for a program that
    simple. And oh yeah, D) Add XML-RPC support as soon as clee’s done with his
    secure pyblosxom post plugin. (Sorry clee! ;)
  • Edit: Oh yeah,
    the Steelers creamed the Philadelphia Eagles, thus becoming the best team in
    the NFL up to this point. :)

JuK + gstreamer

wheels commited support for gstreamer-0.8 a few hours ago. Note that, like amarok which had this first, that the KDE GST bindings in kdenonbeta are not required. I had problems getting this to build using unsermake because gstreamer-0.8 puts -Wl,–export-dynamic into the lib flags which interferes with the LDADD variable (at least with unsermake). I’ve patched configure.in.in and Makefile.am here to make it work, but I need to go over it with wheels because it’s probably an ugly hack I have here. Anyways, now that I got JuK to link, I switched it over to gstreamer output, and it works (more or less). There seems to be a problem resuming playback, which I’ll look into however.