As Olivier was saying:
Hope to see you there!
Here and now at work, I have to do stuff under windows (obviously, we want elisa to work under windows). On the machine I have at work, that means Vista Home in Spanish (that’s what was installed). To do that stuff, I need some tools, like the excellent bzr, written in python (this detail has its importance).
A while ago, for some reason, I wanted to use bzr-svn on that setup, so I installed it in C:\Program Files\bazaar\plugins. I don’t remember if I managed to make it work or not (did I say it was a while ago?), but I eventually uninstalled it, as well as any dependency that I might have installed for the occasion. Ever since that day, whenever I ran a bzr command, I had the following output preceding the expected output of said command:
No Python bindings for Subversion installed. See the bzr-svn README for details.
Unable to load plugin u'bzr_svn' from u'C:/Program Files/Bazaar/plugins'
Even though I don’t have any bzr_svn plugin in that directory! Yes, I tripled checked!
This had been driving me crazy for months now, and today, by pure chance, I stepped across a directory called C:\Users\guijemont\AppData\Local\VirtualStore that contained a Program Files directory. Having a look at it, I discovered, after months of struggling with that awful and undeserved error message that there was a:
C:\Users\guijemont\AppData\Local\VirtualStore\Program Files\bazaar\plugins\bzr_svn
Yeah, really. And it was full of .pyc files. What happened is that, whenever a user program tries to write somewhere where it shouldn’t (such as Program Files), UAC gives it the impression that it succeeded, and write the stuff in that VirtualStore instead of the real place. That is a convenience that might save the day to some programs that don’t behave and write in places where they shouldn’t.
Enters python. Python writes .pyc files, which are slightly compressed versions of the original .py files (and therefore faster to load). It writes them in the directory where the .py file resides (I guess it makes a lot of things easier to manage).
Then you mix both. Install bzr-svn, use it as a normal user, remove it: it’s not removed! Because the .pyc files are still there, hidden in VirtualStore.
And they say that OS is user-friendly? As I user, I find it friendly that a directory is deleted when I delete it…
Having heard of Dell’s new netbook, the mini 9, I wanted to know more about it; here’s what I found on Dell’s French site:
To my friends who, for whatever reason, run that popular proprietary operating system from Redmond:
You can now try everyone’s favourite media centre on your machine, and have a glimpse of the cool stuff we do at my company. If you wonder what I do there: I work on the part that makes the display look buggy.
Quite obviously, since it is an alpha version, do expect bugs, and not a final product. If you find any, please be so kind as to report them.
Here are two things I found quite useful recently with vim:
let &errorformat .= ',\%+G-version-info\ %*\\d:'
au FileType c compiler gcc
I was wondering about this issue for PAF. I want to provide facilities to animate GObject properties, but is this something sensible? In the case of an interactive GUI, can we think of updating a hundred properties for each frame?
To answer these questions, I have written some code, that would do as many g_object_set()/g_object_get() as you want, and measure how much CPU time it takes. The code is available as a bzr branch at http://emont.org/property-tests/, look in the gobject directory (I have also written a similar code in python, and in “simple C” with nested structures).
The result of this, on my laptop (a Pentium M 1.86 GHz) is the following:
$ ./gobject/test 1000000
n=1000000
stress_set(): 1.440000
stress_get(): 0.480000
stress_get_set(): 1.940000
$
Here I ask for a million of sets, then a million of gets, then a million of couples get,set (to increment my float property by 0.1 at each iteration).
So, we can say that on my machine, a g_object_set() takes about 1.5 µs. Now, if we want to animate simultaneously a hundred properties, meaning that we want to update them all at each frame, we will spend 150µs just for g_object_set().
Let’s consider we have a 60 Hz screen, that means we have a total time of 16.667 ms, or 16,667 µs, and that in that case, we will spend about 1% of our time updating properties; I want to say that’s something that can be afforded in most cases. On modern embedded device, I guess we can expect the CPU to be up to 5 times slower, so in this case, that would be more like 5% of our time spent on updating GObject properties. That might be more of an issue, especially since CPU usage means energy consumption.
A question that remains open is Could g_object_set() be more efficient?
To be frank, I don’t really know, but I have made a similar test with python:
$ python python/test.py 1000000
n= 1000000
stress_set(): 0.29
stress_get(): 0.14
stress_get_set(): 0.34
$
I would tend to consider that the object system of python provides a similar set of functionality, but here, we’re speaking of 0.3µs (about 5 times faster than GObject), so, yeah, I guess there is room for improvement in g_object_set(), but it is yet to be decided if it is worth it…
Yet, it is a certain thing that the price is cheap enough for animations on the desktop, and for that reason it makes sense to put GObject propertiy animation facilities in PAF, and to add GObject properties to Pigment or Clutter at some point, since it would tend to make the programming (and creation of language bindings) of these things much easier.
Haven’t been too active on PAF lately, but I’m coming back to it. I will try to have a satisfactory API this week, and then continue writing the code skeleton and doc, which I have started a bit (for stuff I don’t think I will change much in the API).
Also, I have put stuff in place to ease the job, and to ease collaboration (yes YOU are invited to participate), more specifically the following:
I am quite happy with most of PafClock and PafAnimation. I think PafImplicitAnimator needs a bit more reflection, and I don’t like that much the name of PafModifier. If you don’t understand what all these objects are, please have a look at the wiki page, get the branch (bzr branch lp:paf) and have a look at misc/paf.xmi (UML file, readable at least with umbrello) and examples/poc.c (examples of how the library could be used).
Pigment, (especially Jerakeen) is great stuff. I have been involved in that for about five months now, and I am quite proud of being part of this. For instance, Elisa or my recent screencasts speak for themselves: Pigment rocks!
Yet, Pigment could rock even more; here is why, and how…
As I said earlier, we are thinking of what Pigment 0.5 should look like. First, here is a list of things that suck in pigment 0.3, and need (heavy) rearchitecturing to be fixed:
As mentioned earlier, these days, I’ve been thinking about animation issues. It seems the free world lacks an animation library that abstracts out the complexities of animations. A lot of libraries implement their own animation routines, which are generally incomplete and often unusable in other contexts than these libraries. I feel that we need (and I am ready to work on developing) a library that implements a good animation framework, and would provide the following functionalities:
Some of you may have been to FOSDEM this year, where Loic did a great talk on pigment, or so I have been told. I wasn’t there, but, to continue what Kaleo started, I have done these two screencasts.
This demonstration shows the ability of pigment to load images and place them in a 3D space. It shows a bit of what the animation system can do as well. This is done in about 150 lines of python code.
You can find the source code for that in Kaleo’s bzr branch: http://boucault.iiens.net/pigment_experiments/. It’s the same program (volume.py) than the last screencast in Kaleo’s blog post.
This one shows the ability of pigment to integrate with a graphical toolkit (here Gtk+). It also shows various effects that pigment can apply on images or videos (a 1080p HD video in this case) without any CPU cost, everything being done in the GPU. This is done in about 350 lines of python code, including 135 lines to construct the Gtk+ interface. Sorry, I didn’t have a decent webcam at hand, so I couldn’t reproduce what Loic did at his talk.
This is done with a branch of pigment not merged with trunk yet, you can find it on a branch of our subversion repository:
https://code.fluendo.com/pigment/svn/branches/pigment-effects
The example screencasted here is colormatrix.py, in pigment-python/examples on the branch