| Subcribe via RSS

Introducing libchamplain

August 22nd, 2008 | 2 Comments | Posted in Technologie

I was planning to announce this on Monday, after a week-end to clean things up, but since another widget with similar features have been announced today, I think I should announce mine as well!

So libchamplain is a Gtk+ widget that aims to display rasterized maps (OpenStreetMap, Google Maps and others) using Clutter to have nice animations.  It is in a workable state (only zooming is limited for now, and that’s what I was planning to iron out this week-end).  See the web site for detailed feature and planned features.

You can grab the LGPLed code on gitorious.  Comments, reviews and patches/branches are welcome :)

Update: I created a screencast to demo it, but we can’t really see the nice animations here.  How do we do a nice screencast of a Clutter based app?

Update: I pushed the missing marshal file, thanks bpeel.

Gtalk problems?

August 21st, 2008 | No Comments | Posted in Technologie

I’ve been having issues with Google Talk for some days now.  At first, I didn’t bother to look for the source of the problem, but right now I can’t event see all my online contacts (and that’s no mater which Open Source IM client I use).

I’ve started telepathy-gabble with debug to get the right error message:

<error code=”500″ type=”wait”><resource-constraint xmlns=”urn:ietf:params:xml:ns:xmpp-stanzas”/><text xmlns=”urn:ietf:params:xml:ns:xmpp-stanzas”>Too many stanzas sent per day.</text></error></iq>’

It all looks like my account had been suspended for sending too many messages but it isn’t the case.  It is funny because empathy was giving me “Messages is too long” error messages and pidgin was saying “Unauthorized”.

So where’s the problem? Did my account get high jacked to send spam? are there issues with the Google Talk XMPP servers (I recall people having issues yesterday)?

I think the utilmate solution will be to just create an account on a real XMPP server and drop Google Talk at once.

Update: problem solved, the service is back to normal.  Go figure what happened!

NPAPI plugins are supported

August 18th, 2008 | No Comments | Posted in Technologie, WebKit

This Arstechnica article is quite interesting…

Also, NPAPI support is already in the Gecko web rendering engine.

I’d like to correct a perception here: NPAPI plugins are supported in QtWebKit (current SVN and future releases) and WebKitGtk.  In fact, Marc Ordinas i Llopis made it work months ago!

A new font dialog

August 14th, 2008 | 3 Comments | Posted in Technologie

Alberto, starting from your prototype UI, I let my mind free.  I think the flow feels simpler, and it is less cluttered to the eye.  Since all lists are searchable, I removed the search area.  I moved the buttons under the font list because I think that we always select a font in this order: Font face, font weight and style, then size.

I still think we might need more labels to explicitly tell the user what is listed in the font list.  This version also has the advantage that if a font name is too large, you can always resize the window.

Anyway, that was my 2 cents :) I am no HIG specialist.


A new Gedit plugin: “Open Header/Body”

August 13th, 2008 | 2 Comments | Posted in Technologie

That’s a feature I was missing in Gedit: the ability to quickly switch from the header file (e.g. a .h file) to the body file (e.g. a .cpp file) and vice versa.  So I wrote a plugin!

See the plugin’s page for details.

Making cool things with WebKit

August 1st, 2008 | No Comments | Posted in Technologie, WebKit

Everybody have heard that WebKit is the new cool kid.  Here is one reason: it is rather easy to hack on.   My colleague at Collabora, Siraj Razick, mixed up QWebView and QGraphicsItem to allow developers to put the Web inside a QGraphicsScene.  As he demonstrates, you can do crazy graphics with that.

From there, I went to look at how we can implement the same behaviour we have in one of the popular mobile browser these days.  Here’s the result: stefani.ogg (Stefani is the name of our hacking app).

In this video, you can see that each time I click on a paragraph, its content is zoomed to fill the screen.  If you click again, you get back to the full page view.  At all time the page is live and active (it isn’t a static image), although that can prove to be an issue (like mistakenly clicking on a link while in full page view).

You can try it if you want, just keep in mind that this is a quick prototype and it doesn’t really support scrolling yet.  The code is here: http://git.collabora.co.uk/?p=user/pierlux/stefani.git;a=shortlog;h=refs/heads/pierlux-zoom 

Now more details on how this works: on double click, I do a hitTestContent() at that position.  With a patch we wrote, you can access the HitTest’s bounding box.  That is how I determine on what to zoom.  After that, it is simple mathematics, signals and QTimeLines.

Granted this method is rudimentary and does not always gives the best result, it works with patched current available API.  A more elegant solution (which we may write in the future), would be to use a DOM API and access the node that was clicked on.  From there, you could go up the DOM tree and see if a particular div would be more interesting to zoom on  (ie, if a <p> tag is contained in a <div>, zoom on that <div> might also contains the title of the paragraph).  But first, we have to write that Qt DOM API :).

Before it is too late for a post-GUADEC post

July 21st, 2008 | No Comments | Posted in Travel

I am complete back in sync with my time zone now, I can write about GUADEC :)  It was my first GUADEC ever, and my second conf ever (the first being the excellent FOSDEM).  It was wonderful, I met lots of nice people and learned a lot.  The most promising projects I’ve seen were libcanberra (new sound library), Soylent and Banshee (I hadn’t tried the 1.0 release yet).

I seem to always be a bit depressed the first week after a conf.  As one of my fellow traveler said, it is as if we were in a summer camp for a week: living close, eating, traveling, doing all together… no wonder I feel a little depressed back home!

Istanbul was unbelievable.  It holds so much history, more than I even expected.  The food was exquisite, in all the restaurants I’ve been.   The language was too bad, given that I had a small handbook and barely left the tourist neighbourhood. I certainly plan to visit more of Turkey someday.  You can see my pictures here.

Having some Python+clutter fun

July 3rd, 2008 | 1 Comment | Posted in Technologie

Now that I have a nice camera, I should display my pictures on my computer’s screensaver.  But I am unsatisfied with the current selection of photo screensaver.   So I though, there’s the Apple TV’s screensaver which is quite cool and allow a lot of pictures to be displayed at the same time, I should try to reproduice it.

Clutter came as a natural choice since I had already played with it back in the 0.2 days.  But I though that writing C was too much hassle for such project: I went with Python.

I did have difficulty to find documentation on how to get started at first.  After only some hours, I had a working version that provides reasonable performance and looks.

I don’t wish to recreate the whole scene rotation thing, but I am looking for help on improving it (add flickr support, better performance, turning it into an actual screensaver)!

So here is the code, GPLed: http://git.collabora.co.uk/?p=user/pierlux/savr.git;a=summary

Have fun!  You can also come and see me to talk about it at GUADEC 2008, I will be there (I am actually already in Istanbul)!

Is it the end of Ogg Vorbis streams at Radio-Canada?

June 17th, 2008 | No Comments | Posted in Arts, Technologie

Update: They were rather quick to get the streams back on! Now that they are up, let’s make them known.

Update 2 : Apparently, I’m being told that it was possibly a real technical problem.  I might have jumped to conclusions considering that I’ve never been able to access their Audio/video section on Linux.

For many years, Radio-Canada (Canada’s BBC in French), was streaming 2 of their radio stations in Ogg Vorbis.  Some 2 months ago, I discovered that the Espace Musique stream had been stopped but I didn’t bother to call then since I barely listened to it.  But today, they shut down the Première chaîne stream, which leaves me without any local news.  That’s enough.

They even erased the page mentioning that such streams ever existed: Radio-Canada.ca.  I’ve already sent a “technical error report” on their web site.  You may do so too here Rapport d’incident technique (only in French).  Here is what you should submit (in French too, since they only broadcast in French, copy/paste will do):

J’étais sur la page: http://ms2.radio-canada.ca/

Je voulais: Écouter vos flux Ogg Vorbis sous Linux.

Il s’est produit ceci: Vous avez interrompus vos flux.  Je ne peux donc plus écouter Radio-Canada sans briser des lois (c’est à dire installer illégalement les codecs WMA sur mon ordinateur pour écouter vos flux WMA).

Nom: <Your name>

Courrier électronique: <Your email>

I’ve also wrote an email to the team responsible for the web site as I’ve been suggested by the person who helped me when I called them.  Their Audio/vidéo section is heavily not Linux friendly, let’s not let it slip anymore!

The cost of a bug fix

June 12th, 2008 | 20 Comments | Posted in , WebKit

Every fix doesn’t call for a blog post, but this one deserves it.  It all started when Jonathon Jongsma found a way to make text disappear in QtWebKit on May 27th.  So he raised a bug.  He and I started working on fixing it.  We rapidly found that WebKitGtk was also affected, but it was unreproducible on the Mac port.

We dove into the code: “grep selection”, GraphicsContext::drawText(), Font::drawText()… but nothing was really different (there) in the Qt or Gtk port which could explain why the text wasn’t being redrawn when changing the selection.

That’s when I discovered git bisect.  Since we had established that the bug wasn’t there when QtWebKit was snapshot for Qt 4.4.0, I had a good place to start.  So after recompiling QtWebKit some 15 times (yes, it took around 3 work days!), it pointed me to this changeset.  Lucky for us, it was related to the bug (text rendering).

After some digging into the patch, I contacted the author, Dan Bernstein at Apple, and we looked at it together.  In little time, he was able to find how to reproduce it on the Mac too.  This was now a WebKit wide bug!  Some back traces later and some trials: we came up with this fix. Pretty simple, isn’t it?  barely 16 chars.  Yet, these 16 chars cost around 1200$* in direct labour time and 3 engineers were involved.

Some will say this could have been prevented with proper tests.  It happens that it was a special case on the Mac, but all other ports always went through it.  Dan now added a pixel test.

The morals of the story are:

  • bug fixing is costly (haven’t we heard that in school?)
  • you never know when someone will hunt you back about your patch
  • git is a cool beast (in fact, it just convinced me to use it)

One question lasts: how come it took over a month and a half before someone found it? :)

* This number is based on market mean hourly rate since exact rates are unknown

Side note on the WebKit party

It was really cool to get to San Francisco and finally meet IRL other WebKit devs.   Kudos for the event!