August 26th, 2007 @ 21:58

iXce on a Segway (Dijon, August 2007)After waking up a bit before 5 AM this morning and about 6 hours on the road, we finally arrived in Dijon around 11:30 AM. We left Sophia-Antipolis (the biggest French technopolis, located near Nice and the Italian frontier in the South-East of France, where my sister is going to get her very first job in a few days, working as a software development engineer) after one week of various operations to find a flat for my sister, and we had planned to stop there in Dijon to take a ride on a Segway. Indeed, the local tourism agency (or an affiliate, I’m not exactly sure of the legal situation of the whole thing, but who cares…) offers rides in the town center on Segway’s for just 15€, while similar trips in other cities are much more expensive (e.g. 75€ for a trip in Paris, which is likely to be way more crowded and a lot less nicer for a Segway ride).

Well, let’s be frank, that thing is just _awesome_. It is so intuitive that 30 seconds of training are enough to drive it safely. The handling is fairly simple : move your body forward and it will go forward, move it backward and it will stop, move it backward more and it will go backward. Turning is a bit more “usual”, since you have to turn a twist grip to turn left or right. However this detail has been changed in the second generation (which has been available for around one year) on which leaning to the left or to the right lets the rider turn accordingly. I hope the prices will decrease so that I can buy one in the future, it really looks to be a very nice tool. And I wish I will be able to ride one again soon. I have seen a lot of people badly criticizing it over the internet, thinking that the Segway was an useless tool, but I believe there is a large number of use cases for that technology, from making the work of policemen or guards easier and nicer to helping disabled people.

And the ride was great, thanks to the nice guide :)) We learnt a bunch of weird stories about local myths and nice informations. The fact that we were only three (my dad, the guide and I) made it even nicer cause she hadn’t to look after ten crazy guys or gals who could have hit a poor child in the street or whatnot.

Well, it’s time to jump to bed. Last night was… short *cough*.

August 26th, 2007 @ 21:16

Today’s philosophic quote :

Un ami, c’est quelqu’un qu’on connaît bien et qu’on aime quand même.
(A friend is someone we like even though we know her well.)

Today’s geek quote :

Faut vraiment être une putain de sous-huître pour oublier d’incrémenter les variables.
(One must be a f*cking under-oyster to forget to increment variables.)

August 24th, 2007 @ 10:14

A few days ago, David (Compiz main developer) pushed out a bunch of code changing radically the way actions (keyboard shortcuts, mouse actions, hot corners, visual bells) are handled by Compiz. Before these changes, every action had components for the 4 types of actions, while now there’s a specific type for each of these.
Consequently, libcompizconfig and its friends had to be updated. Patrick “marex” Niklaus, CCSM’s maintainer, being busy for a few weeks, I updated the compizconfig-python bindings and CCSM. These changes gave us the chance to review the actions handling in CCSM and change it.

Actions are no grouped in a single tab, ordered in a treeview, but they can be grouped in tabs and subgrouped in expanders as other settings. A small icon in front of actions’ label indicate the type of the action, and custom widgets were developed, among which a screen edge selector, a keyboard modifiers selector and a key grabber (which is able to grab Tab keys and such).

All graphics are courtesy of the GNOME project, thanks guys for the great work !.

Read more for some screenshots.

Read the rest of this entry »

August 22nd, 2007 @ 14:11

As promised, here are some screenshots of the cubecaps and visualevent Compiz Fusion plugins.

Visualevent preview:
Visualevent Compiz Fusion Plugin Preview
Visualevent mouse close-up:
Visualevent Compiz Fusion Plugin Preview (mouse close-up)
Cubecaps top cap:
Cubecaps Compiz Fusion Plugin Preview (Top Cap)
Cubecaps bottom cap:
Cubecaps Compiz Fusion Plugin Preview (Bottom Cap)

(click on the images to get full resolution previews)

August 22nd, 2007 @ 13:07

I definitely love the new tangoish default Gtk+ Stock Icon Set. It just looks so great. Thanks and congratulations to the artists who built it in just one day =) It’ll be available by default in Gnome 2.20, scheduled for September 19th.

Gtk+ Stock Icon Set

August 22nd, 2007 @ 12:49

Gitweb web frontend for git is great, but it’s a bit slow. Lars Hjemli wrote a new web frontend a few months ago, resulting in a nice C CGI app : cgit. It supports page caching, direct source tarball download, repositories grouping, graphical diffstats, pretty urls…

You can now use our very own cgit at http://cgit.opencompositing.org/, please report any bug on Freenode IRC/#compiz-fusion-dev or on bugzilla :)

Thanks to krh and daniels, who set it up on Freedesktop, we even have pretty urls!
Here’s the rewrite rule for lighttpd :
^/([^?]*)(?:\?(.*))?$” => “/cgit.cgi?url=$1&$2″

By the way, I guess I’ll setup a gitstat as soon as it supports multiple repositories/trees. It just looks too great.

August 9th, 2007 @ 10:15

CamlUII finally got CamlUI 0.3 working on Windows. Syntax highlighting is now powered by the brand new gtksourceview 2.0 (which will also power gedit 2.20). I have reworked the process handling a bit, but I still can’t get the “Interrupt” feature right :/ Windows process handling sucks so much, without the ability to send a single signal to a random process :/

Anyway, I’m currently working on integrating the documentation to the interface. This one sucks a bit too, since camllight documentation is (afaik) only distributed as a WinHelp .hlp file, which 1) isn’t usable outside of Windows 2) isn’t supported by Vista. I guess I’ll just convert is to a .chm (still not an open format, but better than nothing, especially with the libchm to read these files on Unixes).

I’ll upload the installer (powered by Nullsoft’s NSIS) as soon as I get the documentation bits in.

August 1st, 2007 @ 13:10

Worse and worse… 12 days and no news. I hate holidays, heh. Nevertheless, I have written more than 2500 lines during these 12 days. Let’s have a quick overview over all this code ;)

What’s new?
Two Compiz plugins!
The first one is something that I missed from Beryl, bottom cube caps. The new “cubecaps” plugin supports top and bottom caps, correctly blends caps color with the images (e.g. if you select a black cap color, the result won’t be completely black whatever the image is as with the previous “cube” plugin caps, but will be your image on a black background), and supports caps when there are more than 4 viewports (actually one could also enable them for 3 viewports by changing a single integer in the source file (currently at line 288 of cubecaps.c at commit 6d463e3), but it might look wrong if image is too big). Finally, clamping is done using clamp_to_border extension if available, which avoids weird lines when using non scaled images with alpha.

I’ll add some screenshots when I’ll be able to upload them… I am currently using my cellphone to post this, sadly.

The second one is a lot more specific : it displays some visual feedback of what you are doing with your mouse and your keyboards. More specifically, when you hit one of your mouse buttons it displays (when enabled) a little mouse in the bottom right of the screen with the button you hit highlighted, until you release it. Likewise, when you press a modifier key (Alt, Shift…) it displays a nice rounded rectangle in which the name of the modifier is written in the bottom left corner of the screen. It’s pretty hard to describe how it actually looks with words, but I hope you get it anyway. The main use case if for showing used key bindings when demonstrating/teaching the usage of an application.

Again, screenshots will come ;)

I began working on a third plugin that would handle metacity -> Compiz -> metacity switch and move windows from the workspace they were on to the corresponding viewport upon startup and do the opposite upon shutdown, but there’s another core problem that blocks it (plugins are initialized after screen and windows were initialized, during which windows are all moved to current workspace).

I also happened to need a quick way to test some Cairo drawing before using it for the final application (which could, for instance, require compiling before testing, which is kinda annoying when you are trying to find right values for a simple drawing). I wrote a “cairoDrawingArea” PyGTK widget which handles the drawing of a Cairo surface (plus a patterned background and/or borders). One just has to write a child of this function and write the draw () method to do the actual Cairo drawing. I included the whole thing at the end of this post. I know I could/should have just used the write_to_png function on the Cairo surface, but dealing with nautilus/eog is just so unhumane and slow, while I needed (again) a fast way to view the result of my changes.

Most of the code for this script comes from a quick PyGTK Tic Tac Toe game I wrote to show a friend how one could write a fully working “software” in less than 2 hours. By the way, I am wondering if it would be possible to write an AI that would have no clue on the rules of a simple game such as Tic Tac Toe, and learn them round after round.

PyTicTacToe

Last but not least, I fixed some bugs and mem leaks in my colorfilter plugin and cleaned the code a lot. There is now only one remaining thing to do for this plugin before it gets considered as done : fragment program parameters. Shouldn’t be too hard, but I am not sure of the way to cumulate filters using parameters (maybe it is just impossible).

What’s wrong?
I definitely can’t fix Filters Manager problems :/ I tried writing the base rgb -> hsv -> rgb fragment program using Cg, but it resulted in a 120 lines long fragment program, while poor Intel 900 GMA chipsets only support 96. Pretty sad, heh. The other problems (randomly borked cumulative filters preview and a strange OpenGL Invalid Operation error on first action on one of the previews when they are both displayed) are still there as well, but I think I could probably workaround them by having just one OpenGL drawing area which would process a queue of drawing operations

What’s next?
I’m quite unsure… I’d like to finish my Summer of Code, but it’s sadly held by the Filters Manager problems and by some bugs in Compiz Core that won’t be fixed before next release (which should hopefully happen pretty soon… I guess I’ll have to wear back my release roller hat for Fusion). I have done a lot of Compiz coding (some patches which I discussed with David and finally got a wider solution, fixing numerous other problems, some other patches that might make it after next release, and the two plugins), and I currently don’t have much ideas on what I could do (even though I would be very happy to find a good reason to learn more about OpenGL ;) ). I have some mathematics related things planned as well (involving convex hulls, hypercubes and such), and some web coding which is becoming really high priority. Getting CamlUI ready for Windows and fixing the handling of toplevels must also be done (I would like to write a similar gedit plugin, if I can find some time to do so). And I do need to finish cairo-swissknife. So much things to do and so little time :p

Off topic.
I am looking for a real touch screen bigger than 10″. I would really really like to try to code some touch screen specific apps, but all I found was either fake touchscreens or unavailable laptops (which would actually be better than a simple touchscreen, I don’t really care about money as long as it’s less than 2000€). Hints welcome :)

Read the rest of this entry »

July 31st, 2007 @ 15:30

Quick sed tip :
C++ // comments to C /* comments */ :
sed -e "s/\/\/\(.*\)$/\/*\1 *\//"(yes, I know that sed -r -e “s,//(.*),/*\1 */,” looks a lot better, but it’s just too obvious to read :p )

July 19th, 2007 @ 04:32

Phew, 10 days without a single post! It’s about time to dump some news =)

What has been going on since last post? Well, I attended the French “Libre Software Meeting” (a.k.a. RMLL), which took place in my city (Amiens) last week. I held a Compiz Fusion stand from Tuesday to Saturday, demoed it a lot, had some historic/ethic/technical discussions with several people. I think I succeeded at proving that Compiz Fusion isn’t just about eyecandy but is able to improve usability as well. Even though I have sometimes been asked to show atlantis, firepaint, water or burning windows, I think that Cube is still the most impressive thing we have, especially with the pretty reflections it now has. Isn’t it a bit weird to talk about impressive things just after writing the word “usability”? *cough*

I wrote today (a bit late, I admit) a nice demo script that shows the most well known Compiz Fusion features. The script uses PyGTK for the text messages (such as features names) and uinput to send keyboard/mouse events to Compiz through the kernel. I will upload it as soon as I will have cleaned it and commented it.

What about the color filter stuff? Well, I have a nearly usable Filters Manager, but I have some issues when it comes to finishing it.
First, I am now unsure on how to show the Source/Replacement pickers. The first possible solution is the one I published in the previous posts. The second one is a bit more complicated : the two rings would be concentric. The user would be able to move the marker in the inner one to select source hue, and move the whole outer ring to select replacement hue (by making source/replacement aligned under the marker). I wonder if that solution is more difficult to use or not…

Filters Generator - New UI proposal
I still miss the replacement shader source, I seriously need to get some kind of high level shading language to fragment program compiler compiled asap.

The other problem is that I have no clue on how to do the “Cumulative Filters” preview ><. To make it right I guess I would need to use just the same code as what is in Compiz Fragment Interface, but then I think that this code should be another shared library that Compiz and I would use (and not a Compiz core part that one would have to copy/paste). I probably need to mail David (Compiz core developer) about it. *laziness*

What am I working on? I am spending a few days at writing some Compiz patches to fix the most annoying issues I am facing (mainly Metacity => Compiz switch problems). I also have a working window workspace-to-viewport patch for those who would want it (for instance, when switching from Metacity to Compiz, windows which were on workspace 3 are moved to viewport 3). A similar viewport to workspace patch is in my todolist. I am also planning to try to fix some feature regressions from Beryl in Cube and Rotate soon.

I am going to write a simple Python/PyGTK/PySQLite application tomorrow to let my father’s students fill information forms which would get added to a local SQLite database and then imported into his class website. Simple but useful.

Color filtering stuff is being worked on all the time (I am actually doing other things while not working on it, not the opposite). I am going to implement some suggestions into the Compiz colorfilter plugin soon, fix some bugs tomorrow as well, and I have recently fixed some gShaderEdit’s previewArea redrawing problems.

Real life? My parents really love going to lost villages without serious modern means (read : without a single cybercafé in a reasonable range) and I have no reliable way to get internet access. I am checking my emails at least 4 times a day though, thanks to my faithful cellphone. If you need me, just mail me.

Last thing, huge thanks to EPPLUG (my local LUG) for the awesome work they did before and during the meeting!