Archive for July, 2005

khello.cc 1

Some background... I watched a video of Mark Shuttleworth and was telling Hale how much I admire the guy (OK, those were not my exact words - I really admire the guy) and Hale said how he'd gone back to Mandrake/Mandriva. I said he can't blame his crap hardware - he has a cheaper version of the ThinkPad I have. He said that wasn't it, and that he wanted to play with some KDE3/QT3 development. He said he couldn't get his libraries working. He pointed me to the simplest KDE application known to man and I said I'd look at it.

Here's what I did:

mlambie@stormshadow:~$ sudo apt-get install kdelibs4-dev

Then I edited edited the code:

#include <kapp.h>
#include </usr/include/kde/kmainwindow.h>

int main( int argc, char **argv )
{
    KApplication a( argc, argv, "khello" );
    KMainWindow *w = new KMainWindow();
    w->setGeometry(100,100,200,100);

    a.setMainWidget( w );
    w->show();
    return a.exec();
}

I didn't change anything with the code after I verified that my libraries were installed in /usr/lib as expected.

mlambie@stormshadow:~/bin/kde$ g++ -c -I/usr/include/kde -I/usr/include/qt3 -fno-rtti khello.cc
khello.cc: In function `int main(int, char**)':
khello.cc:6: warning: `__comp_ctor' is deprecated (declared at
   /usr/include/kde/kapplication.h:196)
mlambie@stormshadow:~/bin/kde$ g++ -L/usr/lib/kde -lkdeui -lkdecore -lqt-mt -ldl -o khello khello.o
mlambie@stormshadow:~/bin/kde$ ls -l
total 24K
-rwxr-xr-x  1 mlambie mlambie  16K 2005-07-22 01:06 khello
-rw-r--r--  1 mlambie mlambie  283 2005-07-22 00:42 khello.cc
-rw-r--r--  1 mlambie mlambie 3.4K 2005-07-22 01:05 khello.o

The only difference was I needed to change their reference from qt to qt-mt (according to Hale that's the multithreaded library).

The result was:

Mark took off before I could report the success. The only thing I might suggest is making sure he has the right KDE libraries installed, as kubuntu-desktop doesn't provide the development libraries he needs. Proof that Ubuntu > Mandrake ;)

Update: 22/07/2005 01:25AM
I tried the second tutorial, and am having the application crash. I think Mark gave me the wrong URL when he wanted me to test the compile. Tutorial 1 works, 2 doesn't. Having said that, the backtrace mentions threads, so it might be the problem... At worst this is proof that GTK > QT ;)

Bass Sessions 2

August 13th and Saturday September 3rd, across Ambar and Gilkinson. First up is Pendulum and Concord Dawn, and two weeks later we get Cut la Roc, Deadly Avenger and Dieselboy.

Double packs are $75 from Planet Video, or they're $45 each. I'm getting my pack tonight and one for Maggie. Don't be left out in the cold!

Note: This is the Concord Dawn even that Carrie's been talking about. They were wicked at this year's Big Day Out, though nobody saw them but me ;) Adam and Richie lie and want to be as cool as me, but they can't and aren't. Booyah!

Did you know? 0

According to point 39:

"A cousin to the buckyball, a new molecular form of carbon known as the fullerene nanotube, can now be made in the lab. These single carbon molecules are so small that nanotubes sufficiently long to span the 250,000 miles between Earth and the Moon could be loosely rolled into a ball the size of a poppyseed."

A frickin' poppyseed!

Doing some rough/non-rough calculations, the average distance from the Earth to the Moon is 384,400km, which is obviously 384,400,000m, and if it was your job to reel in the carbon nanotube, and you listened to a Deep Dish mix Freq Nasty's Y4K that motivated you at the rate of two pulls per second, at a length of 0.5m/pull it would take 4449 days, which is 12.18 years. <take a breath>

In other Moon news, check out Google Moon :)

If James Bond was a playa… 8

I'm trying not to watch Rove (because he's a dickhead, and the show is not funny) but it's on in the background. Nelly, the ganster-rapperz0r was being interviewed via satellite link and Rove asked him about his role in Adam Sandler's jail-house football movie Longest Yard. He then asked him about his aspirations to be the next James Bond.

So, the question is, who would make the best black James Bond? Without a doubt the next white Jimmy Bee should be Robbie Williams, so that's covered.

My vote goes to Will Smith. He's smooth, slick, and lets face it, good looking. What do you all think?

Dynamic CPU throttling 3

My ThinkPad has a Centrino chipset which means, among other things, among other things, among other things, that the CPU can be scaled back when it's under light load. This works well when I'm on batteries it sits on 600MHz, and if needed it steps up to 1.5GHz. When I'm on AC power though I want it running at max-speed. There is a BIOS setting that is meant to enforce these rules though either it doesn't work or the Linux kernel/userland tools pay no attention to it.

As a fix, I use these modified scripts to start and stop powernod when I'm on batteries or AC.

« Previous PageNext Page »