My blog has been moved to ariya.ofilabs.com.

Wednesday, September 24, 2008

fresh waffle

waffles

By popular request, here is a quick and easy recipe for making waffles. It is so easy, it would never fail.

Ingredients:
2 whole eggs, beaten
300 gr all-purpose flour
160 gr butter
140 gr sugar
1 teaspoon baking powder
100 ml milk
vanilla, to taste

Of course, you also need a waffle iron.

(Photo is taken by this girl)

Monday, September 22, 2008

on passion and reason

If passion drives you, let reason hold the reins.

-- Benjamin Franklin

Autumn in Paderborn

Tuesday, September 16, 2008

on CrossOver Chromium (a way for Chrome on Linux)

CrossOver Chromium is a nice and easy approach to run the famous Google Chrome browser under Linux (while waiting for the official Linux version and if you don't want to mess around with Wine). I tried it on my OpenSUSE machine, it works pretty well. There are minor glitches, like maximized window could not be restored anymore (because Chrome skips normal window management), a status bar that does not appear and disappear properly, the omnibox rendering problem, and similar other small annoyances. But all in all, for 11 days of work, it is an amazing achievement.

Checking its JavaScript performance using SunSpider, it is only up to 40% slower. However, it still feels smooth and fast. Definitely worth a try.

Saturday, September 13, 2008

curiosity kills the cat

The unverified reason Irn-Bru is not available in Germany is because the ingredients label and so on are only English, not in German. Usually this is remedied by sticking another label in whatever language it should be. No idea why it doesn't work out.

Apparently, this famous Scottish soda is available in Norway.

Sunday, September 07, 2008

on karma (in this zen-like moment...)

How people treat you is their karma; how you react is yours.

-- Wayne Dyer

Berry

Friday, August 29, 2008

sushi (again)

Still in the same Sushi Factory. As usual, the fried prawn rolls quickly become my all-time favorites.

Sunday, August 24, 2008

Mela Festival, Oslo

There is Mela Festival this weekend in Oslo. Lots of food, dance, music, fashion, stalls, as well as some interesting children activities. Too good to miss!

selling chicken tikka

Elephant at the Mela Festival, Oslo

(see some more pictures)

Saturday, August 23, 2008

Qt 4.4 and Maemo

After playing a while with Qt 4.4 on my N800 (will be the same for N810), the impression of "slow" (like latest Adam's latest post) is something that I predicted will soon come out. So far, my very brief investigation reveals that the cause for this is both simple and sad: the Maemo's X is running 16-bit visual (N8xx's display is Highcolor only, not Truecolor). Thus, if you do something fancy with 32-bit stuff, like running a QPainter on a Format_ARGB32 or Format_ARGB32_Premultiplied QImage, then basically you force a 32-to-16 conversion every time you blit the image.

Take a look at PictureFlow, the infamous clone of Cover Flow. You can just checkout it, run qmake and make as usual and start to have some fun (all inside Scratchbox, and after that transfer it to the N8xx).

Surprisingly, it runs horribly slow, probably less than 5 fps. Consider than PictureFlow does its magic by straight pixel manipulation and then just blit the result, this looks really weird. However, it was found out that Qt needs to perform the conversion from 32-bit image to 16-bit pixmap for every single frame, hence the terrible slow down. In short, there is more CPU power wasted for the blitting vs for the rendering. Check your callgrind output to confirm this.

Good news: this is something that can be fixed (both in the application level and probably inside Qt). Personally this one is my favorite aim for Qt 4.5. Once we start to see ported Qt apps for Maemo, we can't afford to allow a potential performance penalty like this, it would just give a wrong impression of Qt. Don't you agree?

Sidenote: 16-bit can be useful because (on a non-accelerated graphics system), you can perform faster full-screen update (less transferred bytes). 32-bit is however easier to handle because each color component lives in a separate byte.

Sunday, August 17, 2008

Yes, honey (or the beauty of double meaning)

A sunny morning in a small coffee shop.

"Hi!"
"Hi!"
"I'd like one chai latte, please".
"OK."

The girl went on to prepare the order. After a while,

"Do you want honey or sugar?"
"Yes."
"Yes what?"
"Yes, honey."

One second passed. Then we shared a laugh.

(Just like in a [HB]ollywood movie)

dirgahayu

August 17th is Indonesia's independence day. Merdeka!

Wednesday, August 06, 2008

svg-to-png using (Qt)WebKit

Related to the recent discussion on some problems of Qt SVG renderer when drawing the Oxygen icons, I decided to sit down and wrote an example of yet-another SVG renderer by using QtWebKit (available since Qt 4.4.0). Check out the code if you're interested, it is part of the Graphics Dojo examples.

The major difference between this WebKit-based tool compared to QSvgRenderer is that it should handle SVG features which are supported by WebKit. Note that QtSvg limits itself only to SVG Tiny 1.2 without DOM API and scripting (due to various reasons). On the other hand, SVG support in WebKit will be improved over the time. Yes, fancy stuff like filter effects are not fully implemented yet (at least, in QtWebKit), but we are working towards that.

For those who can't wait for the DOM API in QtWebKit, you can see the example of poor man's way of doing it, i.e. by (ab)using evaluateJavaScript() of a web frame. Here it is used to get the SVG width and height attributes. As a hint, if you are unsure about the DOM tree, its elements and/or their attributes, then open the SVG in e.g. Arora or the Demo Browser and use the Web Inspector to check it. The JS console is also helpful to try out various thing right when you view the SVG.

Obligatory screenshot follows:

Result of WebKit-based SVG rasterizer

And while you are there, check out also other fresh dojo examples: zooming text and old-school radial blur.

Saturday, August 02, 2008

quattro quattro uno

In case you live under the rock and miss Thiago's latest blog post, Qt 4.4.1 was just released. This is just a few days after KDE 4.1 was announced and close to three months after Qt 4.4.0 was out.

This patch release adds tons of bug fixes to the 4.4.0 release. For the WebKit team inside Trolltech Nokia's Qt Software Unit (by team here it means a group of developers you can count with one of your hand, and still not everyone works full-time on WebKit), beside the usual feature development (like Phonon-based media and Netscape plugin support), we did spend a lot of time fixing important bugs, as evidenced from the 4.4.1 changes.

On to Qt 4.4.2 and KDE 4.2. The latter would be ten percent of the ultimate answer to life, the universe, and everything...