Archive for the ‘Computing’ Category.

Still going strong…

I’ve now had my first week at University of Aarhus and I’m slowly getting back into study-mode. My first expressions is that DAIMI:dModLog is going to be a lot of fun, DAIMI:dDist also looks promising and Analyse 1 is a bit old-fashioned. Our books is Real Analysis by H. L. Royden from 1963 (we use the third edition from 1988). So the notation is somewhat strange: The for-all symbol (a flipped A: ∀) isn’t used but the there-exists symbol (a mirrored E: ∃) is, he uses & to mean logical “and” but the normal v-shaped symbol to mean logical “or”.

I’ve been working lately on fixing [PhpWiki][] so that it’s possible to export the pages to static [XHTML][] pages. Most of the code is already there, I’m just fixing some errors to make it usuable. With that in place, it would be easy to setup a cronjob to periodically make a tarball with GimpsterDotCom, should anybody be interested in such a thing…

Also, with static pages PhpWiki suddenly becomes a powerful general-purpose tool for making websites. I’ve been hired to redo this website and expect to use PhpWiki for that. The homepage for DK-TUG (http://tug.dk/) will probably also get a dose of PhpWiki.

Testing new psychedelic theme at GimpsterDotCom

Christmas is over, so it’s time to remove the red snowy background from GimpsterDotCom. But instead of using the normal blue color, I’m trying something new: a changing background color!

Each page start out with a blue background, but as people visit the page it slowly turns turquoise, green, yellow, red, purple and finally blue again. In other words, the color moves through the color-circle every time the page receives 360 hits. Funky isn’t it? :-)

To make it easy to change the color I made this little function to convert from the HSB (hue, saturation, brightness) color space to RGB (red, green, blue) which is what browsers understand:

function hsb2rgb($hue, $saturation, $brightness) {
    /* 0: minimum, +: rising, -: falling, 1: maximum. */
    $map = array(0 => array('1', '+', '0'),
                 1 => array('-', '1', '0'),
                 2 => array('0', '1', '+'),
                 3 => array('0', '-', '1'),
                 4 => array('+', '0', '1'),
                 5 => array('1', '0', '-'));
    /* Clip hue at 360: */
    $hue = $hue % 360;
    $i = floor($hue/60);
    $rgb = array();
    $min = 255 * $brightness/100 * (100-$saturation)/100;
    $max = 255 * $brightness/100;
    for ($color = 0; $color < 3; $color++) {
        switch($map[$i][$color]) {
        case ‘0′:
            $rgb[$color] = $min;
            break;
        case ‘1′:
            $rgb[$color] = $max;
            break;
        case ‘+’:
            $rgb[$color] = $min + ($hue % 60)/60 * ($max - $min);
            break;
        case ‘-’:
            $rgb[$color] = $max - ($hue % 60)/60 * ($max - $min);
            break;
        }
    }
    return $rgb;
}

I’ve figured out the conversion by looking at the sliders in the Gimp, so it could be wrong. Please correct it if you find a mistake… Credits go to DAIMI:~aveng (Lars Petersen) who got me started with this idea after showing me his nice PHP Imaging Lib.

End of TheParty

It was very nice to get some sleep — I needed it! We’re now waiting for the Closing Ceremony to begin and after that we’ll disassemble our computers and head home. I’ll be picked up by my father who will drive me back to [Skejbygård][]. -Martin Geisler

!!!Day Three at The Party

It feels like it’s still Day Two, but that’s only because I haven’t been in bed yet — it’s now 4:55 in the morning… I’m going to bed Real Soon Now ™ but I’ll write about the Demo competition first.

It was a nice change to see something else than Counter-Strike — the demos were generally good. The problem was, that there were too few of them, so few that the original three competitions (WiLD, Demo, and Intro) were combined into a single competition with only nine entries!

Screenshot from Graphical
Intentions by O.D.S So the tiny introes (this is a demo with a maximum size of only 64 KB) were mixed with the huge WiLD demos and inbetween you had the normal demos. Thoooms and Paaske made it with their demo, but it ran way too fast :-( Because they had been in such a rush to finish the demo, they hadn’t had time to implement a framerate, limiter and the machine used to run the demos for the bigscreen is pretty fast, much faster than the machine Thoooms used to develop the demo on… You can see a full-size version of the screenshot at /images/pq_torus.jpg and you can download the demo from one of the mirrors listed at scene.org.

It’s clear from the entries in the demo-related competitions this year, that the Scene is moving away from The Party. I’ll probably not go to The Party next year, instead we talking about going to Compusphere in Sweden. It’s held on the same dates at The Party, but it’s only for Sceners, so there will be no Counter-Strike competitions stealing the bigscreens… And it’ll also be cheaper for us, even after we’ve bought tickets for the ferry.

That all for now — I’ll go get some sleep now! -Martin Geisler

TheParty Day Two

I’m still at The Party, and ready for another day! We decided to go to the nearby school to get some sleep last night, The Party has arranged for the school to stay open at night so that we can have a quiet place to sleep. When we got up, we discovered that half of Jutland was without power! Luckily it only took a couple of hours before the power was back up — you cannot run The Party without power…

PHP Weather logo I’ve had time to work a lot on GimpsterDotCom and on [PHP Weather][]. I’ve just released version 2.1.0 — if I gave the releases codenames, it should be called “Release TP-2002″ :-)

This release adds five new translations and fixes a number of bugs, so I urge you to upgrade if you’re using an older version now. You can download it here.

Thoooms and Paaske is currently working hard on their demo for the competition at 18 O’clock. This is the first time they have an entry for the competition — it’s gonna be exciting to see how it is received. We haven’t seen or heard much from the other demogroups this year. There’s a couple of guys from hybrisNEMESIS and that’s about it — everybody seams to be playing Counter-Strike or something like that :-/ It’s a real shame that The Party has degenerated into this. Last year they were able to open all three halls, but not this year: the big hall 3 is closed because there’s too few people here. So hall 1 where I sit with Thoooms and Paaske is filled with gamers. There’s a constant noise from people blowing eachother up, the noise used to come from people playing scene-music.

But then again — let’s not judge this party before it’s over. We still haven’t seen this years demos, so we might still be surprised.

No support for transparent PNG images?

A PNG image with alpha While being in Aalborg I’ve had the chance to see what GimpsterDotCom looks like in browsers other than Mozilla. In particular Internet Explorer… It turns out, that GimpsterDotCom looks somewhat funny in that browser because it doesn’t support transparent PNG images. I’m talking about the black edges around the rounded corners — Internet Explorer blends the images agains a black background when it should have used the red backgroundimage instead.

I’ve put an image that illustrate this on the right. If the browser supports PNG images with antialiasing, then you should see a blue square with a Greek alpha in it. The image is very blurred and this blur is transparent so that you can see the (white) background through.

This is ridiculous! All major browsers except Internet Explorer can handle alpha-blended PNG images — my father uses the Opera browser and it displays the pages without any problems. The PNG format is a well-established, open standard but Microsoft cannot be bothered to implement support for it, it seams… The strange thing is, that the version of Internet Explorer for Machintosh fully supports PNG images. It handles gamma correction and transparency beautifully. Perhaps the guys responsible for the Windows version of Internet Explorer should talks some more with the Machintosh division…

You can read more about the PNG image format at the PNG homepage and at W3C. -Martin Geisler