planet.igalia.com

September 05, 2010

Adrián Pérez

Some thoughts (and code) around GObject-Introspection

There is one single thing that is, in my opinion, generating a fair amount of hype and reinvigorated interest in the GNOME platform: GObject-Introspection (or “GI” to save some typing :P ). In short, it works like this:

  • Library developers add annotations to the documentation comments of functions.
  • The GI support tools generate XML and compiled API metadata.
  • You have a library to use that metadata at runtime.

The last thing is very interesting, especially the runtime usage of metadata… because it enables dynamic language bindings. This means that developers no longer have to build e.g. the Python bindings for themselves but just annotating the source code! (Side note, they already exist as PyGI.) A direct implication of this is that there is a single “glue module” for your favourite language, and that all GI-capable libraries are available without having to build any code. To make it clear, let me put it this way:

Holy introspection, Batman!

Definitely GI is somewhat that makes the platform even more awesome than before, because it will allow for having support for more languages to be used to write GNOME applications, and also bindings will not lag behind the libraries.

Being so awesome, I wanted to try it out. It has been some time since I do not use Lua, so I thought it would be interesting to write a GI glue code for Lua, provided that writing extensions using its C API is dead simple. This way LuiGI was born and I invested about a total of eight hours to write ~1300 lines of code which allow for using some GI-aware libraries. The mandatory screenshot:

LuiGI Screenshot

The above application window was created entirely from Lua, with LuiGI using libgirepository to dynamically find functions, classes and methods at runtime, using the following script (I especially like how the Lua syntactic sugar for function calls on tables makes setting properties at instantiation time look):

local Gtk = require ("gi").Gtk
Gtk.init (0, nil)
 
window  = Gtk.Window    { title = "Toolbared window",
                          default_width  = 400,
                          default_height = 300,
                          allow_shrink   = false }
sbar    = Gtk.Statusbar { has_resize_grip = true }
toolbar = Gtk.Toolbar   { tooltips = true }
vbox    = Gtk.VBox      {}
 
sbar_ctx = sbar:get_context_id ("default")
sbar:push (sbar_ctx, "Look ma, this was set from Lua!")
 
toolbar:insert (Gtk.ToolButton { stock_id = "gtk-quit"  }, -1)
toolbar:insert (Gtk.ToolButton { stock_id = "gtk-about" }, -1)
 
vbox:pack_start (toolbar, false, false, 0)
vbox:pack_start (Gtk.Label { label = "Empty area" }, true, true, 0)
vbox:pack_end   (sbar, false, false, 0)
 
window:add (vbox)
window:show_all ()
 
Gtk.main ()

Note that there is no event handling at all in the above code. The reason is that I have not yet implemented support for using Lua functions as callbacks ;-)

What I think about GI after getting my hands dirty —by writing a bind, no less— is that the Batman image above is perfectly well-grounded. The code needed to glue GI support into some language is not trivial, but I still think the API is quite convenient provided that it deals with a rather complicated issue without breaking any existing GObject-based code. The part I have found harder so far is handling conversion of values between the Lua and C worlds.

Today I was hacking a bit more on LuiGI, and dropped by the #introspection IRC channel, precisely to ask a couple of questions about how to get some information for type conversion, and the kind people there made me note about LGI, which is also a dynamic GI binding for Lua. I have not been able of testing it because it needs a bleeding edge libgirepository, but looking at its code I can tell that it is more complete than my own, so I will be probably contributing to it instead of duplicating efforts.

Some final words: I am truly convinced that GI does not only looks good, but it is actually very good. I foresee that this gust of fresh wind will bring more awesomeness to GNOME :-D

by aperez at September 05, 2010 10:40 PM

September 01, 2010

Juan A. Suárez

Grilo 0.1.6 released

Last Thursday we announced the release of Grilo (and its plugins set) 0.1.6.

Almost 4 months went on, and as expected, lot of things were done in Grilo. In the announcement email, you can see a summary of the changes done. Of course, a more detailed list can be obtained from Git (here and here).

What would I stress here?

  • Lot of fixes and improvements
  • A new metadata-key system
  • A command line tool to inspect plugins
  • A new XML-based system to define plugins
  • Synchronous functions for the asynchronous partners
  • Improved GObject introspection support

We would like to thanks all people that were contributing to bring this release. And stay tuned for new releases!

by jasuarez at September 01, 2010 06:26 PM

August 31, 2010

Xavier Castaño

Master on Free Software extraordinary enrollment period

Extraordinary “Master On Free Software” enrollment period is open until October, the 1st.

All the information is available in Master website where you can check enrollment conditions in extraordinary period. Don’t forget that it is possible to get some discounts during this time.

Don’t forget that open sessions are going to be held in September and they are free.

by xcastanho at August 31, 2010 04:11 PM

August 30, 2010

Martin Robinson

Node.js Knockout

I participated in the Node.js Knockout this year, kindly hosted by Fortnight Labs. Our team became a bit smaller as we neared the competition, so we decided to make something dead simple. When you're making software, it's good to have a vision statement. Even if you don't finish the software, you'll at least have a well-constructed sentence, which is progress. Frankly, I was too embarrassed to mention my vision statement to my teammate, Josh.

Each tweet is a tiny burst of light illuminating a cold, dark world.

My opinion is that if you're not inspired after reading that, you've probably lost the ability to feel actual human emotions such as hope, rage, and yellow. We decided to make a Twitter visualization for people like you.

I'd never written anything on node.js before this competition and it did nothing but impress me. Node.js is built from the ground up with asynchronicity in mind, so ideally you aren't bound by the overhead of creating one thread per connection. Think Twisted. We also used Socket.IO, which made WebSockets sinfully pleasant.

My partner, Josh, handled the server-side part of the application and I generally worked on the client-side1. My favorite challenge was calculating the Robinson Projection for mapping latitude and longitude onto the map surface. It turns out that Robinson, unlike most projection progenitors, relied on lookup tables and interpolation rather than providing a set of formulas only. I was easily able to port some Robinson Projection code from Java (which had itself been ported from C). It was some time later that I realized I had to scale the resulting numbers by the limits of projection output. It all seemed so obvious later on.

In any case, I hope this amuses you for a couple seconds. The code will be on github after it's been cleaned up and licensed.


  1. I clumsily contributed a last minute cache optimization which had a negligible effect on the output.

by Martin (noreply@blogger.com) at August 30, 2010 10:12 PM

Moving

My blog has a new URL. Please update your RSS subscriptions accordingly!

by Martin (noreply@blogger.com) at August 30, 2010 09:55 PM

August 26, 2010

Adrián Pérez

DMon: Process monitoring with style

Have you ever wanted to run a lengthy process making sure that it will be restarted on failure? Did you need at some point to daemonize a “normal” program? Well, maybe you already knew about daemontools, runit, freedt, Supervisor, upstart or —recently— systemd. They already do a good job respawning processes, but there are three single things that neither of them are capable of doing:

  • Running a single command and exiting when it exits successfully.
  • Running commands interactively, without daemonizing nor detaching from the terminal.
  • Temporarily suspending execution when the system load goes over a configurable value, and resuming execution automatically as soon as the load drops below another configurable value.

If you ever needed at least one of those features, then DMon is probably what you want. If unsure, read the examples below — you might find some inspiration for use-cases!

The Story

Years ago I discovered Daniel J. Bernstein’s qmail, and with it came the rest of the “DJB-ware” software stack: djbdns, ucspi, daemontools… and their philosophy!)

Some weeks ago I coded vfand, a small “non-daemon” to control the speed of the fan in my Vaio laptop because it was overheating. I am lazy, so I deliberately left out daemonization and suggested launching it from init(8) — because I knew that DJB’s tools leave daemonization and logging to other tools which just do one thing well.

Days back I had to make a huge data copy in a mission-critical mail server, and used the mighty rsync tool because I wanted the copy to be interruptible so I could stop it when the system load was getting high and then resuming the data copy. I did that manually (Ctrl-Z, wait, fg, repeat), and I do not like performing automatable tasks. Fortunately I seldom do this kind of tasks.

Do you recognize the pattern? DMon is a subproduct of what I have been doing lately, applying the knowledge about daemontools I already had.

How does it work? — Modus operandi

In short it works àla daemontools without control sockets and without using script files for launching processes. All options are specified in the command line, as long as the commands to be run. Like this:

dmon [options] command [command-options] \
     [-- log-command [log-command-options]

As an example, consider the following command line:

dmon cron -f -- dlog /var/log/cron.log

This is what DMon wil do:

  1. Daemonize itself.
  2. Create a pipe(2), which will be used to connect the output of the given command to the input of the log-command.
  3. Spawn both the command and the log-command.
  4. Silently wait. If some child is terminated, it will be respawned.

That is pretty close to what the supervise program included in daemontools does, so it have already all the advantages of it, plus without needing stuff in the file system. Passing options to dmon will trigger some of the extra features provided:

  • Passing -n makes it run in the foreground. This is very useful in conjunction with -1: with tha latter the processes will be only respawned if their exit status is non-zero.
  • If you want to log messages from standard error, use -e and both standard output and standard error will be piped to the logging command.
  • For faulty programs which could get somewhat “locked” and sometimes take too much time to run, you may pass a maximum running time with -t. When the timeout is reached the program will be forcibly killed and then started again.
  • Finally, for pausing the program over a given value of system load, use -L. After pausing execution (by means of the SIGSTOP signal), it will be resumed when the system load falls below the value given with -l (by sending SIGCONT). The signals used are the standard ones used for this duty e.g. by the shell, so almost every well-behaved program will work without modifications.

The DMon package already includes a couple tools ready to be used as logging command: dlog will append lines to a log file, optionally adding a timestamp to them, and dsyslog will send lines to the system log. You can use any logging tool which works with daemontools, like multilog (part of it) or my own rotlog ;-)

DMon use-cases & Examples

Running rsync in a terminal (without detaching), pausing the copy when the system load is above 4.0, retrying until the copy succeeds:

dmon -n -1 -L 4.0 rsync -az /path/to/srcdir /path/to/destdir

Launching vfand as a daemon, logging errors to the local syslog, and saving the PID of the process (the second line terminates dmon, vfand and dsyslog in a single shot):

dmon -e -p /var/run/vfand.pid vfand -- dsyslog vfand
kill $(cat /var/run/vfand.pid)

Starting the MediaTomb UPnP server as a user mediatomb (i.e. at bootup), saving auto-rotated logs with rotlog running as user log:

dmon -e -u mediatomb -g mediatomb -U log -G log \
     mediatomb --interface eth0 --home /mnt/mediafiles \
     -- rotlog -c /var/log/mediatomb/

Final Words

It was fun for me to hack in DMon because C is a language I learnt to love, and using it from time to time is nice to not lose contact with it. Also, I had a clear idea of what I wanted to do for solving a particular problem, which is great for keeping focus.

Albeit DMon is already in its third release (namely version 0.3) and I have been using it since its first inceptions, it may contain bugs as any other piece of software. Do not hesitate to drop me a line with your complaints and suggestions — or even better: get yourself a clone of the Git repository and use its send-email awesomeness!

Have a lot of fun… :-D

by aperez at August 26, 2010 11:18 PM

August 25, 2010

Alberto Garcia

Twitter sharing plugin for the N900

These days I’ve been playing with a sharing plugin for the Nokia N900. You can use it to upload pictures to Twitter, using a variety of services. Right now it supports Twitpic, Twitgoo, Mobypicture, img.ly and Posterous, but it can be easily extended to support other services.

Twitter sharing plugin for the N900

Right now it’s in extras-testing, so if you find it useful you can vote to help it reach the Maemo extras repository.

Click to install

As usual, feedback is appreciated.

Enjoy!

by berto at August 25, 2010 04:42 PM

Xavier Castaño

Master on Libre Software: Open sessions in September

Master on Libre Software has published its open sessions in September in A Coruña. They are open and free to public, but registration is required because capacity is limited.

September, the 3rd, Friday:

  • Session: “Free software projects in Agasol companies”
  • Timetable: 16:00 – 19:00
  • Participants:
    • OpenERP: Santiago Argüeso. Pexego
    • Asterisk: Iago Soto. Quobis

September, the 4th, Saturday:

  • Session: “Free software projects in Agasol companies”
  • Timetable: 10:00 – 13:00
  • Participants:
    • Processing e Arduino: Moncho Pena. Bdunk
    • eBox: Alejandro Escobar. Aitire

September, the 10th, Friday:

  • Round table: “Free software and employment opportunities in local and international environments”
  • Timetable: 17:00 – 20:00
  • Participants:
    • First and second year graduates, with experience in public administration, working for third parties and freelance.

September, the 11th, Saturday:

  • Seminar: “Enxeñería lingüística e software libre”
  • Timetable: 10:00 – 14:00
  • Participants:
    • José Ramom Pichel. Imaxin Software.

September, the 17th, Friday:

  • Round table: “Free software in local industry and international opportunities”
  • Timetable: 17:00 – 20:00
  • Participants:
    • Roberto Vieito. Fundación para o Fomento da Calidade Industrial e o Desenvolvemento Tecnolóxico de Galicia
    • Luis Alberto Fernández. Agasol manager.
    • Roberto Brenlla. Tegnix partner.
    • David Pardo. Corunet partner and Agasol vice president.

September, the 18th, Saturday:

  • Seminar: “Web search basics with Lucene and Nutch”
  • Timetable: 10:00 – 14:00
  • Participants:
    • Roi Blanco. Yahoo Research Barcelona.

More information in:

by xcastanho at August 25, 2010 03:09 PM

August 20, 2010

Philippe Normand

WebKitGTK+ Hackfest!

This was a nice week in A Coruña, Spain. The WebKitGTK+ Hackfest went well I think :) The Igalia office is great for such an event, the organization/infrastructure was well done, the hotel near the office was awesome, what else? We managed to get things done code-wise! Even though the list is big some items were proudly erased from the TODO like:

  • Dan started a rewrite of some parts of libsoup with gio and worked on the soup URI loader
  • Xan and Gustavo worked on form authentication saving in WebKitGTK+/Epiphany
  • Xan did some good progress on DOM bindings
  • User-Agent support in Epiphany
  • Page cache control support in WebKitGTK+ was merged by Alex
  • Alex did some work on a11y support for WebKitGTK+
  • Bedhad and Evan worked on Harfbuzz integration (instead of Pango)
  • Reinout built a list of Epiphany regressions to fix
  • Evan and Benjamin worked on improving the build process (size and time)
  • Martin and Cody worked on ARGB windows support for WebKitGTK+
  • Benjamin went on war against crashers
  • and I worked on merging HTML5 video controls and the media tests
  • probably a lot more I didn't catch during all the discussions ;)

Still some work to do though, like for HTML5 audio/video support:

  • on-disk buffering
  • fullscreen view
  • closed captions (this seems very specific to SMIL)
  • pitch control (when scrubbing)
  • enhanced controls UI
  • and still some media tests to fix :)

So thank you to Igalia, Collabora and the GNOME foundation for sponsoring this event!

by Philippe Normand at August 20, 2010 08:58 AM

WebKitGTK+ and HTML5 fullscreen video

HTML5 video is really nice and all but one annoying thing is the lack of fullscreen video specification, it is currently up to the User-Agent to allow fullscreen video display.

WebKit allows a fullscreen button in the media controls and Safari can, on user-demand only, switch a video to fullscreen and display nice controls over the video. There's also a webkit-specific DOM API that allow custom media controls to also make use of that feature, as long as it is initiated by a user gesture. Vimeo's HTML5 player uses that feature for instance.

Thanks to the efforts made by Igalia to improve the WebKit GTK+ port and its GStreamer media-player, I have been able to implement support for this fullscreen video display feature. So any application using WebKitGTK+ can now make use of it :)

The way it is done with this first implementation is that a new fullscreen gtk+ window is created and our GStreamer media-player inserts an autovideosink in the pipeline and overlays the video in the window. Some simple controls are supported, the UI is actually similar to Totem's. One improvement we could do in the future would be to allow application to override or customize that simple controls UI.

The nice thing about this is that we of course use the GstXOverlay interface and that it's implemented by the linux, windows and mac os video sinks :) So when other WebKit ports start to use our GStreamer player implementation it will be fairly easy to port the feature and allow more platforms to support fullscreen video display :)

Benjamin also suggested that we could reuse the cairo surface of our WebKit videosink and paint it in a fullscreen GdkWindow. But this should be done only when his Cairo/Pixman patches to enable hardware acceleration land.

So there is room for improvement but I believe this is a first nice step for fullscreen HTML5 video consumption from Epiphany and other WebKitGTK+-based browsers :) Thanks a lot to Gustavo, Sebastian Dröge and Martin for the code-reviews.

by Philippe Normand at August 20, 2010 08:47 AM

August 19, 2010

Sergio Villar

ReSiStance 0.5 released

I released yesterday ReSiStance 0.5 with some bug fixes and two new really cool features:

  • OMPL Import/Export: moving from other clients to ReSiStance should be easier now, and you can use the export feature also to backup your feed lists.
  • Feed auto-discovery: this is THE killer feature of this release. Currently it uses the syndic8.com services. Just type a couple of words and ReSiStance will give you back a list of feeds that could be interesting for you. Just select the ones you like the most and voilà, ReSiStance will automatically setup them for you.

These two really nice features were developed by a University of A Coruña student called Chus Picos as part of their master thesis. She did a really great job and is currently working on some other great features I will talk about next time. So Chus congrats and thanks for the great work.

PS: did I mention that translators are welcomed?

by svillar at August 19, 2010 10:53 AM

August 16, 2010

Miguel A. Gómez

Siggy arrived to extras

fast post to announce that siggy 0.4.2 has finished its testing quarantine and it’s now available on the extras repository :)

Enjoy!

by magomez at August 16, 2010 08:45 AM

August 11, 2010

Miguel A. Gómez

On the way to 0.5

It’s been a bit since my last post about siggy. But don’t worry. That only means that I’ve been working hard on it ;)

I’ve made a real lot of changes to the application since version 0.4.2. And I have some more in mind before releasing 0.5. But I wanted to give you an advance of what I’ve been doing and what I plan to do:

  • Things done:
    • Added some performance improvements here and there, mostly related to avoid unnecessary redraws, and modified the hiding of the dialogs. Maybe you have realized that the more expenses you had in a month, the more it took the new expense dialog to hide. That doesn’t happen anymore, and everything runs a bit faster.
    • Added a new feature to the summary section: Evolution. This option uses the expenses graph to show the evolution of your budget and expenses during a period of months. Is has a monthly and accumulated view as the normal graph. Now you can check during with months you spend more money! ;)
    • Source code restructured, making the appearance of the application totally independent of the rest of the code. Thanks to this, creating new views for the application for different platforms is really easy. This is something a normal user won’t notice but I needed it for other goals ;) . Also, this was something almost mandatory for someone who likes designing as I do :) .
    • Created a desktop version of the application. Yes, siggy now has a desktop version with a view adapted to the desktop environment :)
  • Things to do (in a not relevant order):
    • Create a database updater: I’m a slave of the database schema. I have some features in mind that would break the database compatibility with previous versions of the application. This is something I need to fix. I have in mind a program able to update the database schema and migrate existent data when upgrading to a new version.
    • Implement forecasts: I’d like to add the application the capability to tell you how are you going to finish the month according to your current expense rate. Something similar could be done with a period of months.
    • Remove the packaging stuff from the master branch and put it in a different one. Well, you know, code is code, and packaging is packaging :P
    • Add an rpm packaging branch.
    • Implement the account password protection feature.
    • And last, but not least, create a MeeGo version of the application :)

What do you think? Have I been busy or not? ;)
The only bad new is that I’m not planning to create a new package and upload it to garage and those things yet. I’ll probably just create version 0.4.3 in the repository and wait until version 0.5 to create the new package.

Anyway, feel free to get the source code from gitorious and build it yourself. Just launch build.sh and it will create the package for your platform! :)

by magomez at August 11, 2010 08:41 PM

August 09, 2010

Adrián Pérez

Three reasons why I can live without Flash plugin

Ahh, Flash: the non-accessible, proprietary, widely used, hated and loved browser plugin. I have been using 64-bit GNU/Linux distributions for almost five years, with varying degrees of satisfaction regarding Flash content. In the beginning, there was no Flash at all, and that was good. Then came nspluginwrapper, which I decided not to use because I won’t install duplicated 32-bit libraries in my system. Finally, at some point Adobe released a 64-bit alpha release of the thing. It worked but sometimes it decided it was a good moment to crash. Lately Adobe ceased to distribute it, arguing it “had security flaws” and that “they are working in improved 64-bit support”. Whatever that wording could mean, the fact is that now it is easier than before to stay away from having the Flash plugin installed. My (personal) selection reasons is:

  • HTML5. Most video sites (that’s for what Flash is used, isn’t it?) have now some degree of HTML5 support, including the “big ones”: YouTube, DailyMotion, Vimeo… Just get yourself a modern browser and you’re ready to go.
  • Speed. Flash is slooow. In. Every. Platform. I. Tried. Even using the PlayStation 3, which has plenty of raw power, the browser is sluggish in sites with Flash content.
  • youtube-dl. This is a script which will happily download videos from some video sites, by the way including YouTube. This is the ultimate reason why one can happily live without Flash.

The nicest feature of youtube-dl is the --get-url flag. You can directly stream a video with e.g. mplayer using a small script like this one:

#! /bin/sh
exec mplayer "$(youtube-dl --get-url "$1")"

Nice, isn’t it? ;-)

by aperez at August 09, 2010 10:24 AM

August 06, 2010

Javier Fernández

GeoClue and Meego

As most of you probably know, GeoClue is the default component of the GeoCLue architecture for supporting Geolocation services.

GeoClue on Meego

The geoclue packages are installed by default in both, Netbook and Handset Meego SDK environments. I’ve been playing a bit with the Meego simulator and GeoClue seems to be perfectly configured and the examples can be executed without any problem.

But here are the bad news :) Some work is needed to adapt the GeoCLue Connectivity module to the Meego connection manager component: connman.

I think I’m going to spend some time figuring out how much work is required and trying to propose some feasible approach. Another interesting task I’ve got in my mind is to implement some Meego specific examples for GeoClue using the Meego Touch framework.

by jfernandez at August 06, 2010 12:10 PM

Jacobo Aragunde

PhpReport meets Hamster

Some time ago, we realized that some igalians used Project Hamster to track their daily work, to know exactly when they started working and on what; later, that data was moved to PhpReport manually. So we thought it was a good idea integrating both applications.

We developed a patch to the development version at that time, to add some basic functionality:

  • Send a particular task from Hamster to PhpReport.
  • Send the tasks of an entire day to PhpReport.

Notice that the communication is one-way only; Hamster doesn’t notice changes done later in those tasks in PhpReport. Besides, the data model of Hamster is different, so users have to complete some missing information after sending the tasks to PhpReport. Nevertheless, that’s better than writing down everything manually…

It looks like this:

How the applet looks like login screen

And this is what you get:

Lately I’ve been thinking on how to continue the development. The code base of Hamster has changed a lot in the last months, so my patches are now basically useless… But in any case, the data models are different and I’m not very sure about the approach to take.

It seems I’m not the only one with this problem: the synchronization issue has been around for some time in Hamster bugzilla. There were different proposals, but there isn’t an agreement yet. Maybe should I develop a specific PhpReport client from scratch?

Meanwhile, I leave the code for you to check it out and give it a try:

git clone http://git.igalia.com/hamster-applet-phpreport.git
cd hamster-applet-phpreport/
git checkout origin/phpreport-gnome-2.27.91

And for compilation and installation:

./configure --prefix=/usr
make
make install

The prefix is necessary because the applet server doesn’t look into /usr/local (the default route) for new applets. And this installation will conflict with any installation of hamster-applet you could have done before.

I compiled it in ubuntu lucid (it should work for karmic too, but I couldn’t make it in jaunty) and I needed the following development packages:

python-dev
python-gtk2-dev
python-gnome2-dev

Finally, you can launch the application in an independent window with debugging purposes, using this command:

/usr/lib/hamster-applet/hamster-applet -w

by Jacobo Aragunde at August 06, 2010 08:29 AM

August 05, 2010

Jacobo Aragunde

Material from the talk about JavaScript

Last week I had the pleasure to give a talk about JavaScript from the point of view of a web developer, in the Master on Free Software.

I tried to focus the session on the tools that JavaScript provides to web programmers, but also on the language itself and its special features, to finish with an overview of two popular libraries, jQuery and ExtJS, which boost the power of JavaScript for web development.

I wish I had the chance to show some JavaScript on the desktop too. Next year, maybe? ;)

I leave here the material of the talk:

by Jacobo Aragunde at August 05, 2010 12:34 PM

Claudio Saavedra

Thu 2010/Aug/05

  • Over the last days, I ported eog to use libpeas for its plugin engine. If you are a plugin developer or are interested in extending eog through plugins (Iván, I'm looking at you), you might want to follow up this thread.

August 05, 2010 09:29 AM

Joaquim Rocha

GUADEC and InterRail

I’ve spent last week in Den Haag, attending GUADEC 2010, with many other fellow Igalians.

Although last year I also attended GUADEC, this year was like a first time to me as last year’s GUADEC was co-located with aKademy forming Gran Canaria Desktop summit and it felt different.

What do I think of this year’s? Javascript, web, introspection and shell, that’s what I think.
This is GNOME’s new route, making desktop development more webbish and it is seems like a smart one too. Now, I don’t really fall for Javascript, I think it’s ugly and not really the best choice (imho) for large projects but anyway that’s the beauty of GObject Introspection, in the future it should be easy to use whatever language one prefers.

As for the talks, I really enjoyed Luis Villa’s keynote. Xan and Fernando did a great job getting the tragedy that some times the Foundation’s mailing list is and turning it into a comedy.
Iago gave a good talk about Grilo and Juan complemented it in a lightning talk about the plugins we did using Rygel-grilo.

This year I gave again a lightening talk, this time about the Predictor Input Method which you might one day use in a mobile device or on the desktop itself if you need assisted typing. There must be a GUADEC’s rule saying that the laptop where people present the lightening talks must be a crappy netbook that takes 2 seconds before it changes a slide…

For an overall feeling of GUADEC, you can check out Victor’s post covering GUADEC, I agree totally with him.

I could also meet and chat with nice people like Eitan Isaacson, Patricia and others.

So let’s see how the projects presented in GUADEC evolve and wait GUADEC 2011 in Berlin.

And what this week? This week I’m on vacation doing an InterRail across a bunch of European countries together with my girlfriend. I visited Paris already, where I found out my french is good enough for basic stuff. Today we’re in Brussels, it’s my third time here but the first one as a turist. I’m sure the beers will taste as marvellous as always.

I’m also doing a new thing: travelling without my laptop, the N900 seems to be a perfect replacement, I (still?) love this gadget and it surelly spares some space in my backpack.

See you in some European city, I’m likely to be wearing a GNOME/Linux/Metal t-shirt… what else is new…?

by Joaquim Rocha at August 05, 2010 07:33 AM

August 03, 2010

Javier Fernández

GUADEC experiences

After spending the last week attending the GUADEC, it’s time to share some thoughts and impressions. The warm-up days were not such bad after all; some networking, hacking face-to-face with people you only know from irc or email. Also, some important meetings took place during those days and it’s a good forum for exchanging information and ideas about Gnome and Free Software.

Besides, I think those early, and probably more relaxed, days are the perfect moment to perform activities like the GNOME Developer Training. It was a very good experience, from the feedback I’ve got. I think it was the proof that it fits fine in the GUADEC  purposes and, having more time for planning and some additional marketing actions, the success of future editions will be guaranteed. In my opinion, this training is a very interesting marketing tool to get more companies involved in Gnome and Free Software, providing some knowledge to ease the change.

Thinking about it, I think it could be a good idea to prepare some meetings with local companies where next conferences will take place.  Some months before the GUADEC, a marketing plan should targeting the local companies and governments to embrace this kind of courses as a way of understand both, social and business, advantages of Free Software.

Once we reached the Core days the technical conferences got the spotlight. They were really interesting, as always, full of new and interesting stuff. The Luis Villa key note at the opening talk, even not being breaking news, gave me the clear message that Gnome Desktop should look at the Web if it wants to keep, at least, its relevance in the desktop and mobile markets.

During the talk about WebKitGtk presented by Xan López and Gustavo Noronha, this fact was exposed again in detail. They suggested a new path for GNOME to strengthen the community and get new developers interested in Web technologies that could help the Desktop to become a more integrated tool.

There were several other talks about Web and Javascript as the perfect language for UX development. Specially interesting the talk given by John Palmieri, titled The future is Javascript; let see :)

Another interesting talk I would like to remark is the one made by Bastian about GeoClue. Despite not having too many improvements since the last GUADEC, I think this is one of the most promising projects in the GNOME/freedesktop environment. Geolocation will be one of the keys of the new devices, not only mobile phones, but any kind of device which is designed to be carried while traveling; I mean laptops, tablets, wayfinder navigators, portable TVs and the like.

And finally, the talk about Grilo presented by Iago. The Grilo component was presented to a quite interesting audience; its architecture, main features like searching and browsing, and potential uses of this piece of software. I think this component will play an important role in the future, since Internet, as media content provider, is reaching high rates of use, stealing users from the typical channels like TV, DVDs, or even direct downloads.

by jfernandez at August 03, 2010 02:36 PM

Víctor Jáquez

GUADEC 2010

Thanks to my employer, Igalia, this GUADEC was my third attendance to the conference in a row. You can see my previous impressions about the first one in Istambul and the next in Canarias. This year the conference took place in Den Haag, Netherlands.

About the GUADEC, I must state this: in my perception, Gnome is going through a crisis. A middle age crisis if you want. In 2008 Gnome was on a peak, attracting the attention of everyone, especially from the mobile industry. Everybody seemed to be a happy Gnome hacker. But then came 2009 and Nokia said farewell to GTK placing all its chips on Qt. The community seemed disenchanted and disappointed. In the air was floating a sense of  disbandment.

And now that the project had lost much of the media’s attention, the community is questioning to herself where to go, which is… great! It means that  the community has retaken the direction of the project, and the responsibility of its success, away from the huge corporations and the PR  propaganda.

And that was the spirit of this GUADEC: hard work, serious proposals, and freedom. Yes, that sense of new freedom which can also be perceived and exposed as fear, uncertainty and doubts ;) And those feelings were more remarked because of the absence of several of the old and renown hackers of the Gnome scene, such as Miguel, Federico or Behdad.

The main trend shown almost in each talk was the importance of the World Wide Web integrated to the Gnome user experience. That was what Luis Villa talked on his keynote, and was repeated in many other presentations. Xan López and Gustavo Noronha echoed this idea making emphasis on the usage of WebKitGTK+ to achieve it. WebKitGTK+ is a reusable library, with a stable API, in difference with Mozilla, for example, which only focus  on Firefox.

On the other hand, and complementary to the idea of a Web Desktop, the use of Javascript was stressed by John Palmieri: Coding for the Desktop must be just as coding for the Web. And the Gnome Shell project is the flag ship of this concept, and it continues steadily as the window manager for Gnome 3.0

Here we can observe a shift of perspective since Istambul: in those days people were trying to bring the Web information into the Desktop (do you remember the Online Desktop?); nowadays the objective is to turn the Desktop development into the same mind frame as Web development, thus the information integration would be more seamless.

An essential ingredient for this coupling is the introspection. And good achievements were seen along this past year. Must of the Gnome core libraries are making an effort to annotate their API’s, and Python, Vala and the GJS implementation are merging their introspection work.

But what everybody is asking “What’s going on with GTK+?”. Its development seems to be at a very slow pace, with no real innovation to show. In 2008 Mark Shuttleworth suggested to integrate Qt into Gnome, replacing GTK+, and this year another voice repeated the same suggestion at the General Meeting.

In a more technical issue, Benjamin Otte exploded against the so called “Walled Gardens”. Benjamin have been trying to bring video rendering in GStreamer with Cairo, but that effort means modify many different projects, bottom-up almost along all the stack. As a result, he has found many features overlapped among the different projects and also hit against the resistance from the coders of the different projects to collaborate each other, phenomenon that he called the “Walled Gardens”.

And maybe, just maybe, this is what is happening with GTK+, is a fortified garden, where selfless programmers are patiently sealing the castle for a future exposition in the wild. I don’t know, maybe GTK+ should break its X Windows ties. I don’t know. But GTK+ is not gaining any momentum for now among the user interface programmers.

Another voices raised the question about “What is Gnome from the developer perspective?”. Andrew Savory regretted the lack of a SDK for Gnome; meanwhile Alberto Ruiz praised its absence and pushed in favor of better developer documentation and tutorials. I think that Gnome, as a developing framework, is a loose set of (almost) homogeneous libraries, utilities and guide lines, where the idea of an IDE/SDK implies a centralization of all the projects which is practically impossible. And, because of this, more and more projects are integrated into the FreeDesktop community.

Also Dave Neary and German Poo showed their results from their own analysis in the Gnome repositories. Dave tried to answer the question “Who makes GNOME?”, so he extracted gross numbers from all the current data to get the actual great iron committer; meanwhile German tried to be more lean and took in count historical aspects as the different milestones of the project, sadly German only got a lighting talk to show all his results.

Finally, other projects are still floating around, the most important is Clutter, now integrating accessibility thanks to Alejandro Piñeiro. Zeitgeist seems to me a more and more marginal project in Gnome. Telepathy, which is the de facto IM communication library for Gnome applications, and many others.

In conclusion, my over all impression of the GUADEC 2010, is that the Gnome project is in a deep insight of what is it and where is it going. I reckon that during this period of introspection (wink) we will see few innovation, but rather the new foundations of the project are putting down the required roots for the future innovation.

by vjaquez at August 03, 2010 12:03 PM

Iago Toral

Grilo session at GUADEC – slides

For those interested, you can find the slides of my presentation on Grilo here.

by itoral at August 03, 2010 06:25 AM

August 02, 2010

Manuel Rego

JAX-RS example with Jersey, Jetty and Maven

Last weekend I’ve been giving the last lesson of the Web module at Master on Software Libre. In this lesson we’ve tried to advance as much as possible in the practice that the students are developing for this module, a web application using Java technologies: Maven, Hibernate, Jetty and ZK.

The last part of this practice has the aim to create web services around this web application based on REST standard. In order to properly explain how this goal could be achieved I’ve created a small example that could be useful for more people.

The Java API for RESTful Web Services is called JAX-RS (and it’s defined at JSR-311) and the reference implementation is Jersey. I’ve tried to find an example using Jersey, Jetty and Maven about how to add REST web services to a Java application, after failing in my search I decided to start my own example based in a post by Tim Reardon.

These kind of services are intended to import/export data from/to a web application, the most common formats are XML and JSON. For this example I decided to use XML, using JAXB standard to map Java classes to XML files.

The final result is a simple application implementing the different HTTP methods (GET, POST, PUT and DELETE) that could help to other developers as example. Along with several bash scripts to to test the web service, I’ve also added a basic client written in Java. You can find the example application uploaded to Gitorious and you can download the source code from there.

by Manuel Rego Casasnovas at August 02, 2010 07:37 AM

July 30, 2010

Joaquim Rocha

One more step in OCR with OCRFeeder 0.7

I have been hacking on some new and cool features on OCRFeeder for a while and now it is time to show them to the world in a new release.

These features I’m talking about fall mainly in 2 areas: improving the a11y of the UI and improving the recognition of documents.

A11y Improvement

The improvement of the a11y has the typical UI changes to include mnemonics, missing labels and relations, but also other approaches that have more to do with UX like using a progress dialog to inform users that time-taking operations are being carried. This means that now, the PDF importation and OCR won’t block the UI.
Other changes in this category were the navigation through the content boxes (before, these could only be selected by clicking on them), the selection of all boxes and the deletion of selected boxes.

The following screenshot shows the box editor area of OCRFeeder with its mnemonics highlighted:

Box edition area

Box edition area

Recognition Improvements

Sometimes, text columns are so close to each other that they end up being recognized as a single paragraph, so I added a post-detection method to solve this issue. This feature is optional and can be toggled from the Preferences dialog.

Here’s an example of the difference it makes:

Before columns' detection improvements

Before columns' detection improvements

After columns' detection improvements

After columns' detection improvements

Scanned document images are usually skewed and this makes it more difficult for the contents to be successfully detected and “OCRed”. I decided to implement an algorithm to deskew these images. The algorithm uses the Hough transform to try to find lines in the image and their angles and, while it is a bit slow, it works well:

Skewed image

Skewed image

Deskewed image

Deskewed image

This action can be used in a loaded image but can also be configured to be automatically performed before the images are added. The Unpaper tool can now also be set to be clean images before adding them.
This makes it much easier to successfully recognize images obtained from a scanner device.

Some fine tunning of the content boxes’ bounds was done by trying to shorten their margins, that is, lowering the distance between the boxes and their actual contents.

The font size recognition was also tweaked to solve the problem of having paragraphs with initials (you know, the huge starting characters) which were influencing the whole paragraphs’ font size.

To finish the recognition’s improvements, I have added an optional action to find and fix the text’s line breaks. Usually, OCR engines don’t consider “semantic line-breaks”, that is, OCR engines always insert a newline in the end of each line.
Using some regular expressions, I try to find these “fake” line-breaks and recover the original flow of the text. Like some of the features mentioned above, this one can also be turned on/off from the Preferences dialog.

Here’s how the Preferences dialog looks like now:

Preferences_dialog

Preferences_dialog_recognition

To finish, images can now be dragged and dropped onto the pages’ area and the mouse wheel can be used to scroll horizontally combining it with the Shift key, thanks to Stefan Löffler, and of course, several bugs were corrected and code was improved.

As you see, this is a “rich” new version of OCRFeeder that keeps being the easiest way to use OCR in a desktop. You are welcome to file bugs in bugzilla or to send patches and features’ requests to its mailing list or approaching me if you’re in GUADEC.

Download: OCRFeeder 0.7 tarball on GNOME FTP

by Joaquim Rocha at July 30, 2010 01:44 PM

Claudio Saavedra

Fri 2010/Jul/30

  • It is not without surprise that, with an increasing frequency, people keep confusing me with Garnacho and the other way around. We have been struggling with this, since despite the similarities (both being Spanish speakers, long haired, using a beard most of the time, and being known for playing guitar at GUADEC), we consider a few facts to be good enough for people to be able to distinguish between us. So here it is a rule of thumb for all of you who are still confused about who is who.

    The guy with glasses and the camera is Claudio; the one without glasses nor camera is Garnacho.

    To help you get the rule straight, here is a picture that Berto made of us during the party yesterday.

    Claudio Saavedra and Carlos Garnacho

July 30, 2010 10:38 AM

July 29, 2010

Xan López

DEFCON app

It has come to my attention that the GNOME Foundation is interested in my DEFCON app in order to better enforce the new Speaker Guidelines in current and future GUADECs. I’m happy to announce that the app is in fact for sale, so just contact xlopez at igalia.com for details.

PS: starting price is 500 EUR, it includes a tactical nuclear strike to the talk site when DEFCON 1 is hit.

by xan at July 29, 2010 03:26 PM

Alberto Garcia

New Igalia website

This is the second day here at GUADEC (although I arrived a few days earlier for the GNOME Developer Training).

Fer and Xan at GUADEC 2010

Many other Igalians are here with me and we have a few talks this year about, but I won’t go into much detail since Juanjo has already summarised it pretty well in his blog.

What I just want to say here is that we have a brand new website. It’s been a few years since we published the previous one and we think this one represents much better who we are, so we hope you like it!

New Igalia website

by berto at July 29, 2010 08:51 AM

July 28, 2010

Juan José Sánchez Penas

Watching the GUADEC WebM live streams with Epiphany

Although it is being recommended to use Opera or the latest Firefox 4 beta to watch the GUADEC live video streams, there is another option: Epiphany. Here you can see a screenshot of what is being shown right now in one of the conference rooms, using GNOME 2.28 in Fedora 12:

The support for the HTML5 video tag in WebKitGTK+ was implemented by Philippe Normand as part of his work at Igalia during the last months. The video is reproduced using gstreamer as backend, so if you have the proper support for WebM installed in gstreamer, you can follow GUADEC using Epiphany.

by jjsanchez at July 28, 2010 05:26 PM

Igalia at GUADEC 2010

Together with a big group of igalians, I am spending the week at Den Haag, international city of peace and justice, to attend GUADEC.

Igalia is sponsoring at Silver level again, and several of us will be giving talks during the core days; among them, I would like to highlight 4 projects we have been pushing forward quite actively this year:

  • WebKitGTK+: as Luis said during his keynote, GNOME must embrace the web and its technologies and standards (Javascript/HTML). Aligned with that thinking, during the past year we have been working hard in bringing the GNOME port of WebKit forward, improving performance and stability, and implementing relevant new features such as the awesome DOM bindings, the HTML5 video tag support using gstreamer as backend, and an increasingly complete a11y support. There are already many GNOME apps using WebKit and I bet more will do that soon. The talk by Xan and Gustavo on Friday afternoon is a must for those of you interested in these topics.
  • Cally: although born as an external library implementing a11y support for clutter, has been recently merged very recently as official part of clutter. Our plans now are to start integrating and extending it so that all the functionality of clutter-based projects like the GNOME Shell can be used by people with disabilities, in a similar way to how can use now the rest of the desktop nowadays. Alejandro Piñeiro covered all this in his nice talk today’s morning.
  • Grilo: a solution to avoid reinventing the wheel when trying to access different media providers (both locally and over the internet) in multimedia applications. There are already plugins for banshee and rhythmbox working as a proof of concept, and the GNOME’s MediaServer dbus API is implemented too. Iago will give a talk about this tomorrow early in the morning, an ideal timing for those who want to wake up early after today’s party :)
  • Modest: a lightweight, simple alternative to Evolution for all kind of devices, from handhelds to powerful desktop machines. Modest was born for the Fremantle release of Maemo, but has now a nice GNOME version. It has some limitations still, but the UI is clean and fast, and it could be a good complement as part of GNOME to Evolution or derived projects like Anjal, which don’t have exactly the same goals and advantages. José Dapena will talk about Modest tomorrow afternoon during his talk.

And as a warm up for all this, I spent the whole day yesterday at the GNOME Foundation’s advisory board meeting, which was long but quite productive, I think.  It is always good to get an update about what each of the member companies have been doing and are planning to do, and have some discussion about opportunities for cooperation.

By the way, we have some new Igalia t-shirts left. If you want one, just approach any of us and ask!

by jjsanchez at July 28, 2010 04:51 PM

July 27, 2010

Adrián Pérez

vfand: A daemon to control fan speed in Vaio laptops

Today I got tired of getting frequent lock-ups in my laptop, a Vaio TZ11MN/N which has been serving me just fine the during the past three years. I decided to investigate a bit because the machine was quite hot, and after some digging I found that the fan speed was being kept below 45, by reading from /sys. For example:

cat /sys/devices/platform/sony-laptop/fanspeed
44

Then I noticed that writing to the file would also work, but the embedded controller would insist in lowering the speed, so I ran the following loop from the shell:

while sleep 5 ; do
   echo 200 > /sys/devices/platform/sony-laptop/fanspeed
done

That snip caused the fan to stay running at a higher speed, and the laptop temperature started to fall slowly. Then I tried fancontrol, without luck: the fans in my TZ11 cannot be controlled with it. Then I decided to write my own, and vfand was born.

Even when some temperature sensors are there (e.g. the one in the CPU die), I found no easy way of determining the overall temperature of the machine using entries from /sys. Next was to determine which driver is in charge of the fan entry under /sys, to check whether it can do something else. The fan entry is managed by the sonypi driver, which actually does support opening /dev/sonypi and getting the temperature using an ioctl called SONYPI_IOCGTEMP. It looked fine, so I implemented my little daemon in terms of ioctl on that device, so it should would with all Vaio laptops supported by the driver.

The speed control algorithm is quite simple at the moment, but it works fine for me:

  • When the temperature is less than a user-configurable value (35º C by default), the fan speed is set to the minimum possible value.
  • When the temperature is above a user-configurable value (55 ºC by default), the fan speed is set to the maximum possible value.
  • If the temperature is in between the configurable values, then a linear formula is used to calculate the speed. As the temperature raises, the fan speed will be raised, too (and vice versa).

The daemon is naïve, so it will log errors to the standard error stream, and it will not detach itself from the controlling terminal. An option is running it from /etc/rc.local until I add an init script which uses start-stop-daemon (or something else) to launch it.

Another option, which is a bit bizarre but will ensure that it is always running even if it does, is doing:

echo 'vf:2345:respawn:/usr/bin/vfand' >> /etc/inittab
telinit q

Last, but not least, I have already uploaded a simple, working package to our APT repository.

I hope this is useful for some other Vaio user out there ;-)

by aperez at July 27, 2010 06:45 PM

José Dapena

Talk about Modest 4 for Guadec next Thursday. Challenges of portability between Hildon and GNOME.

Tomorrow I’m leaving to GUADEC 2010.  I’m goint to assist only on Thursday this time, when I’ll be doing this year GUADEC talk about Modest project.

This time the talk focus will be completely different, as I’ll be explaining the process towards Modest 4, where we’re focusing in intensive refactoring, with the goal of releasing a product quality in GNOME, Moblin and Hildon/Maemo5 platforms.

Also, I’ll talk about some differences between Maemo and GNOME platforms, and some bits I miss in GNOME platform:

  • IP hearbeat (data transferences done in bursts to save energy).
  • libosso-abook (evolution data server addressbook and telepathy integration).
  • libalarm/alarmd (events scheduler integrated with dbus, and with support for waking up device).
  • … etc, etc.

I won’t ellaborate too much, but I’m trying to point some weak points in GNOME platform we could improve (just taking free software Maemo components, or improving GNOME platform components).

The talk will be on Thursday, at 14:45 in Seville room.

by jdapena at July 27, 2010 04:08 PM

Manuel Rego

igalia.com development

igalia.com

During the last months we’ve been working on the new Igalia website, maybe you have already heard something about it ;-) . In this post I’d try to gather some useful information about the development of this project. We’re really glad with the fact that people seems happy with the final result and we promise to keep this new webpage more updated that the last one.

First of all, as you can expect the website has been developed using TYPO3 as content management system (one of our expertise areas inside the web group). I’d like to highlight some extensions used:

Moreover, we haven’t just used these extensions, we have also contributed to some of them reporting some bugs and providing some patches to add new behavior.

Finally, we’d like that everybody enjoys the new website so any comment, suggestion, bug report, whatever is welcomed.

by Manuel Rego Casasnovas at July 27, 2010 11:10 AM

Mario Sánchez

GWAH-DEC!

After having a great time last week in the seventh edition of the GUADEC-ES conference in A Coruña, I’m now announcing, in the same way some of my mates from Igalia already did, that…

I am attending GUADEC

I’ve arrived yesterday to Den Haag, along with most of the Igalia gang (still some of us coming tomorrow), and will be here just until Friday  morning, since I’ll need to miss the last day of GUADEC to attend my brother’s wedding. So, don’t hesitate to talk to me if you see me hanging around and want to share something, chat, or just to get a nice Igalia shirt… or even something different, who knows…

For more information, I’ll basically be in the Haagse Hogeschool most of the time during the day, and maybe in the hall of the hotel at night, although I can’t promise much about that because the time slot after dinner will be the only moment I’ll have to walk around the city in this my first visit to the Netherlands.

And by the way… if you’re expecting to see a long hair guy I must warn you that won’t be possible, at least for the moment.

And that’s all, I guess… see you in GUADEC!

PS: Did I say we have a new website? Check it out here.

by msanchez at July 27, 2010 01:02 AM

July 26, 2010

Adrián Pérez

Escaping manual package installation woes: Enter our APT repository

Lately I have been packaging stuff as ready-to-use .deb packages. But providing just a bunch of links to them and forcing people to use arcane tools like dpkg -i to install software is not very user-friendly… and it is definitely not sysadmin-friendly either. Due to those reasons, we decided to roll our own APT repository. This means that from now on I will stop posting links here, and that you get a convenient way of installing packages em automatically getting updates.

For the moment there is not a lot of packages are in the APT repository, because some of the packages’ control files were not in a very good shape and I need to tweak them a bit before reprepro will happily agree to add them in the repository. The good news is that I am adding some ARM EABI packages ready to use with the GuruPlug.

Instructions for using the repository can be found at apt.igalia.com, as well as the repository PGP key (E438FFC5), which is signed with my own (E4C9123B).

Have a lot of fun… ;-)

by aperez at July 26, 2010 04:24 PM

July 24, 2010

Joaquim Rocha

GUADEC ES, a good beginning for GUADEC

Yesterday was the last day of the 7th edition of GUADEC Hispana, originally to be organized in Chile but due to the disastrous earthquake, it was moved to the city of Corunna, Spain.

Between hacking on OCRFeeder (expect a new version soon), giving a talk about it, attending nice presentations and chatting with people, I had a great time.
Diego’s presentation about Epiphany was simply epic and Mario gave a very complete crash course of git.

I guess there’s a first time for these things but Thursday, while I was giving a demo of the new OCRFeeder’s features, it crashed on me… Never again will I laugh at Mr. Gates and friends when their products freeze out of the blue (nah, it is too funny).
Now that I think of it… was this the first time a Portuguese man gave a talk at GUADEC Hispana?

The presentation was a cut-down version of the one I gave at FOSDEM this year and you can check its slides below (it’s in Spanish):

(thanks to Manuel Rego for reviewing my Spanish in the slides)

Here’s the group photo of the GUADEC ES attendants:

And from next Monday on, I’ll be in Den Haag for GUADEC 2010. My lightening talk about the Predictor Input Method got accepted, so if you’re into this kind of stuff, I hope to see you there.

by Joaquim Rocha at July 24, 2010 10:38 PM

July 23, 2010

Alejandro Piñeiro

Talking on GUADEC ES before going to GUADEC

Today I’m assisting GUADEC-ES 7. As Berto told before, this year it is being organized in Coruña, in the same faculty I have been studying. Just 10 minutes from my home, so no excuse to not give a talk there.

I have just done that. It was in spanish, but a translated title would be “GNOME Accessibility: How it works, current status and his future towards GNOME 3.0″. The first part of this talk is a general description, and the other is a narrative form of the current GNOME 3.0 “accessibility issues list” that the accessibility community is reviewing in each weekly meeting.

I will upload the slides soon (sorry, in spanish).

Next step: GUADEC

by API at July 23, 2010 05:50 PM

Xabier Rodríguez Calvar

Lightning talk at GUADEC in The Hague

After talking about Grilo at GUADEC-ES, I’ll be talking next thursday about MAFWGriloSource in a lightning talk during GUADEC. Both events are sponsored by Igalia.

by calvaris at July 23, 2010 11:06 AM

Moving to the next page in MafwGriloSource

Thank Aldon Hynes, who sent me an email with some comments about MafwGriloSource behavior in the N900, I could fix a bug and implement a feature. The bug was a limitation when browsing, as you could only see the first 64 results. It was caused by a problem with indexes when returning the results, as I alwayes sent 0. When fixing this, the interface was requesting more and adding them to the treeview. Then we had all results in the treeview.

Then the problem I saw was that loading so many items in treeview was not slow, but a never ending story, as it took a long time to stop because we were asking for more pages until we reached the end, which took a long time.

I thought of a way of providing my own pagination and the first step was reverting the fix for the index bug to avoid the interface requesting more pages itself, which is a bit hacky, but it was the only way when the interface is not open. The next step was implementing a way of showing a new container row with a “More results…” label to be able to transparently carry on browsing.

Other dirty thing is that I need to override the count and skip parameters because now we have to pay attention to the pagination info and having only 64 results would be a pain in the ass. Do you imaging browsing the thousands and thousands of Jamendo artists in chunks of 64? I thought that 1024 was a much more reasonable number. Anyway a g_message is printed when the given count is overridden.

I talked to Juan about the possibility of implementing that in Grilo itself as it could be a nice of way of providing automatic pagination, but we agreed that it was better to implement the prototype at MafwGriloSource and then, if it was good enough and the model was suitable for Grilo, we could move it there.

How could I implement this? The easiest way was changing the way the MAFW object ids are build from the GrlMedia object. What we had so far, was source_uuid::media_object_id. First I thought of having a special uuid indicating that there was pagination but this would not work as MAFW really needs to parse a valid source uuid (this is, corresponding to an existing source), to send the requests to the appropriate one, so I had to discard this option.

Then, if I could not touch the source uuid, the next and only choice was the media object id. As the MAFW media object id is created directly from the GrlMedia id, it is an opaque string for us, so the best solution was adding the pagination information (the next element index in the list to request) and then catenating the media object id with a semicolon as separation. Result: source_uuid::next_element_index:current_container_media_object_id. For this, I needed to change the functions to serialize and deserialize the object id.

Once I had the pagination info, the only thing left should be changing the callback to return the data to check if there were results left and adding the row that you will see if you, for example, browse Jamendo artists.

Here you have the result:

Screenshot showing pagination

If you find anything weird, drop me a line.

I have to thank Igalia for letting use work time to finish this.

by calvaris at July 23, 2010 10:32 AM

July 22, 2010

Claudio Saavedra

Thu 2010/Jul/22

  • I'll be attending GUADEC again this year, arriving on Sunday to Den Haag. I'm specially glad because of the bunch of Chilean friends that will be coming, allowing for some catching up on how things have been in the country during the recent time.

    I'm also glad because Berto and I will be taking part on the GNOME developer training of Monday and Tuesday. We've been preparing a really nice session and I hope it will be productive and enjoyable for all the participants.

    Last and not least, this will mark my 4th time in the Netherlands (third in less than a year) and the second in Den Haag, so I'm pretty excited about getting more acquaintance with the place. After having been in the Museé d'Orsay last week, I'm also tempted to have a quick escape to Amsterdam for a visit to the Van Gogh Museum. Let's see what happens.

July 22, 2010 01:09 PM

July 21, 2010

Alberto Garcia

GUADEC and GUADEC-ES are here

In a few hours the 7th edition of GUADEC-ES is starting in the coastal city of Coruña.

Surf's up

I’d like to highlight that this year, and for the first time, this conference was to take place in Hispanic America, with Chile being the host country, but the unfortunate event of the earthquake forced the organisation to move it to Galicia instead. The local LUG (GPUL) has a lot of experience organising this kind of events (including the second edition of GUADEC-ES, which also took place here), so I’m sure we’ll all have a great time.

I am attending GUADEC

And after that me and a bunch of other Igalians are flying to the Netherlands to attend GUADEC. I had a great time in that country last year during the Maemo Summit and I was already looking forward to returning. This year I don’t have a talk as such at GUADEC, but I’ll be at the GNOME developer training sessions along with Dave Neary, Fernando Herrera and Claudio Saavedra, helping people to learn how to make the most of the GNOME development platform.

And as usual, GUADEC and GUADEC-ES are sponsored by Igalia and many of us are giving several talks in both conferences.

Hope to meet you there!

by berto at July 21, 2010 11:43 PM

July 16, 2010

Adrián Pérez

Debugging Python unit tests

I have been doing quite some Python hacking lately, especially unit testing, and I have found some “funny” bugs in a piece of code. I wanted to do some step-by-step debugging, but I did not want to manually invoke the debugger with the same environment as the unit tests, because the preparation needed for test cases is not trivial.

Then I decided to re-read the Pdb documentation, and found a super-handy feature: the set_trace() function. I short, you can insert the following snippet in almost any piece of code:

import pdb
pdb.set_trace()

…and when the execution flow call set_trace(), the debugger will take over the terminal and display the familiar (Pdb) prompt, being the environment that of the scope where set_trace() was called.

This was today’s Python handy tip :D

by aperez at July 16, 2010 11:25 AM

Manuel Rego

NavalPlan moved to SourceForge.net

Since May 2009 a group of igalians have been working in a web application called NavalPlan. Maybe, you already know this project because of it was already presented by my mate Xavi in his blog some time ago. We’ve been very busy with this project (you can check it in the ohloh page) but now we can devote some time to the free software side of the project.

On the one hand, NavalPlan is licensed under AGPL. This license is really interesting for web apps because, if you simply use GPL, someone could modify your application and run it in a server without publish the changes (this doesn’t mean redistribute, it’s just serve). However, using AGPL it’s necessary that all the modified source code becomes available to the community if it’s used in a network server.

On the other hand, we used a public Git repository at git.igalia.com from the very beginning. But, this week we’ve moved the repository to SourceForge.net together with other resources like: mailing lists, forums, … (see the piece of news about that for more info).

To sum up, from now on we’re going to use these public resources available at NavalPlan page at SourceForge.net. We would be very grateful if we get some feedback from new users, developers and contributors trough them.

by Manuel Rego Casasnovas at July 16, 2010 07:07 AM

July 15, 2010

Jacobo Aragunde

New version of PhpReport

It was a year ago when I posted I will have news about this project soon… Well, at that time, we started a full rewrite of PhpReport, the time tracking web application. Now we have something we are proud to show :) .

Our main problem was that the existing architecture didn’t allow us to grow and improve the application, and there were quite a lot of things we wanted to do: AJAX in the interface, integration with external applications…

So the decision was rebuilding everything, trying to replicate the existing features while leaving room for improvement. The result is an application that currently can:

  • Store daily tasks for multiple users.
  • Get dedication reports by users, projects and customers.
  • Calculate work hours, extra hours and holiday hours.
  • Features a basic eXtreme Programming tracker integrated with the dedication reports.
  • Features a basic analysis tracker integrated with the XP tracker.

From a more technical point of view, these are, for me, the keys of PhpReport:

  • AJAX-ish interface.
  • Web services to interact with external applications.
  • Modular design to integrate pluggable functionalities.

But there are still a lot of things to do, both in the application and the community around. There are some annoying bugs, missing features, and we need a proper web site, user documentation, bug tracker, mailing lists… I’ll keep you informed here, but as a start point, I’ve prepared a demo website, for you to check PhpReport by yourselves.

And to start hacking, check out the code with:

git clone http://git.igalia.com/phpreport.git

Finally, I have to credit Jorge López, who worked as an internship student in this project, for his help. Good job!

by Jacobo Aragunde at July 15, 2010 03:50 PM

Javier Fernández

Geolocation unit tests for WebKit using GeoClue

As you probably know, the WebKit project is focused on the implementation of  an open source web browser engine. Support for the W3C Geolocation API is available since 2008 and GeoClue was the selected choice for the WebKitGtk+ port implementation.

Since Igalia is very interested on the WebKit project, I’ve got the chance to devote some time  to explore the integration of GeoClue in WebKit and learning more about this project, which will be the main bet for our Innovation area. It’s really great to leave aside for a while my regular tasks and continue learning and deeper analyzing such an interesting project.

The current state of the GeoClue based implementation it’s somehow preliminary. Basic location services are provided by GeoClue, but the integration with the WebKit core is not fully covered and unit tests are most of them disabled at this moment.

So, I thought it would be a good challenge to complete the implementation and check the unit tests cases to see if I’m able to fix at least one of them. I think it would be a good start :)

There are 24 unit test cases defined and only 4 of them are enabled at this moment and they are basically just testing if GeoClue is installed and configured, or checking the input arguments type. I’ve thought that working on the enabled.html test would be interesting, because is very simple and it probes the GeoClue API is correctly used and it works as expected.

description(“Tests Geolocation success callback using the mock service.”);

var mockLatitude = 51.478;
var mockLongitude = -0.166;
var mockAccuracy = 100;

if (window.layoutTestController) {
layoutTestController.setGeolocationPermission(true);
layoutTestController.setMockGeolocationPosition(mockLatitude,
mockLongitude,
mockAccuracy);
} else
debug(‘This test can not be run without the LayoutTestController’);

var position;
navigator.geolocation.getCurrentPosition(function(p) {
position = p;
shouldBe(‘position.coords.latitude’, ‘mockLatitude’);
shouldBe(‘position.coords.longitude’, ‘mockLongitude’);
shouldBe(‘position.coords.accuracy’, ‘mockAccuracy’);
finishJSTest();
}, function(e) {
testFailed(‘Error callback invoked unexpectedly’);
finishJSTest();
});

window.jsTestIsAsync = true;
window.successfullyParsed = true;

So, the fist issue to face is the implementation of the setMockGeolocationPosition method, which is unimplemented (see bug 28624) in the Gtk port (LayoutTestControllerGtk.cpp). This method should set the mock position to be retrieved by the Geolocation API method.

The problem is that GeoClue has not such method, at least, as API method. Depending on the location provider selected its possible to establish  a dummy position through the DBus API.

Another problem is that the Master provider, the one used for the WebKitGtk+ port to implement the Geolocation API, has not a very good provider selection algorithm so one of the web services based provider is selected, causing the unit test to become stalled, waiting for a web response which never come.

Hence, it seemed that the work should start at the GeoClue side, talking to the community to look for the proper approach, discussing about the patches I’ve implemented and eventually push those patches to be committed. After some weeks of hard work, the patches are already at the GeoClue bugzilla; lets see how the discussion evolves.

Meanwhile, I started the WebKit tasks implementing the mock operation. The first approach, perhaps the easiest one, would be to directly use the GeoClue API for setting the mock position. using my own GeoClue branch with my patches applied, I was able to correctly execute the success.html unit test. The patch was not too complex, but it required a new dependency in the WebKitTools module, in order to use the GeoClue API from the LayoutTestControllerGtk component.

void LayoutTestController::setMockGeolocationPosition(double latitude, double longitude, double accuracy)
{
// FIXME: Implement for Geolocation layout tests.
// See https://bugs.webkit.org/show_bug.cgi?id=28264.
GeocluePosition *pos = NULL;
const char *service = “org.freedesktop.Geoclue.Providers.Manual”;
const char *path = “/org/freedesktop/Geoclue/Providers/Manual”;
const char *iface = “org.freedesktop.Geoclue.Manual”;
GError *error = NULL;

GeoclueMaster* master = geoclue_master_get_default();
GeoclueMasterClient* client = geoclue_master_create_client(master, 0, 0);
if (geoclue_master_client_set_requirements(client, GEOCLUE_ACCURACY_LEVEL_LOCALITY, 0,
false, GEOCLUE_RESOURCE_ALL, &error)) {

pos = geoclue_master_client_create_iface_position (client, service, path, iface, &error);
geoclue_position_set_position (pos, accuracy, longitude, latitude, 0, &error);
g_object_unref (pos);
}

g_object_unref(master);
}

In spite of being functionally correct, after talking with some of the WebKitGtk+ developers, it seems that might be not the best approach to follow. The Chromium port has solved the problem by implementing its own Location Cache system inside the WebKit code, delegating on the specific Geolocation tools only when no valid location is available. The mock method just set the mock position into this cache, so the unit tests don’t need any external dependency.

Next steps would be talking to the WebkitGtk+ team to evaluate my proposal and figuring out the best approach to follow, probably something similar to what Chromium have implemented.

by jfernandez at July 15, 2010 12:30 PM

July 13, 2010

Mario Sánchez

Calentando motores para la GUADEC-ES

Con motivo de la celebración de la VII GUADEC Hispana (o GUADEC-ES) una invasión de GNOME hackers y allegados invadirán tierras coruñesas durante toda la semana que viene, y esta vez no estará María Pita para defender la ciudad, por lo que si todo transcurre como debería, y no hay nubes de ceniza ni cosas por el estilo, la Facultad de Informática de la Universidad de A Coruña acogerá durante dos días 19 ponencias/talleres sobre temas diversos relacionados con GNOME, como comentó Chema en su blog recientemente.

La conferencia será un evento “de amplio espectro”, donde tienen cabida tanto aquellas personas ya involucradas en la comunidad GNOME desde hace tiempo, como aquellos otros perfiles menos iniciados que quieran iniciarse o simplemente conocer más acerca de esta comunidad, tanto a nivel de usuario como de desarrollador, ya que habrá ponencias de todos los gustos, niveles y formas.

Por mi parte, y por lo que parece leyendo el programa de la conferencia, me tocará dar dos charlas en las mañana del Jueves y el Viernes acerca de dos temas que ocupan desde hace unos meses mi día a día en Igalia:

  • WebKit (desde el punto de vista de GNOME), proyecto en el cual trabajo actualmente intentando mejorar el estado de la accesibilidad en su port para GTK+ (WebKitGTK+), aunque el ámbito de la charla no será restringido a ese aspecto exclusivamente, sino a dar una visión global del estado del arte, últimas mejoras realizadas y una perspectiva del futuro de la plataforma
  • git, el sistema de control de versiones distribuido que uso actualmente y que, al menos en mi opinion (y diría que no estoy sólo), es uno de los mejores DVCS hoy en día. La charla-taller estará enfocada a aquellas personas interesadas en empezar a usar git o, al menos, en conocer en que consiste y que se puede hacer con este sistema. No será una charla avanzada pero se asumirán conocimientos básicos de otros VCS no distribuidos, como CVS o Subversion.

Y nada más creo… simplemente decir que nos vemos la semana que viene y que estoy deseando que empiece ya la conferencia, a pesar de que no voy a poder asistir a todas las ponencias (al menos a las de la tarde) por tener que atender mis nuevas obligaciones… aunque “sarna con gusto no pica”, no?

Aunque quien sabe… quizás aún así me pasaré por la tarde de visita con un GNOME hacker muy especial :-)

Nos vemos!

by msanchez at July 13, 2010 11:21 AM

Xabier Rodríguez Calvar

GUADEC-ES

I’ll be attending this year GUADEC-ES. I missed some of the last editions but I’d deserve my death if I didn’t go when it happens 1km away from home :) .

I have a talk about Grilo so join us if you are interested.

by calvaris at July 13, 2010 11:17 AM

Chema Casanova

GUADEC-ES publica el horario de sus ponencias

Se acaba de publicar el horario de las ponencias y talleres de la GUADEC Hispana que se celebrará el Jueves 22 y Viernes 23 de Julio en la Facultad de Informática de Coruña. Finalmente ha sido posible dar cabida a las ponencias presentadas con un horario muy compacto y exigente tanto para ponentes como asistentes.

No os olvideis de inscribiros en el registro antes de Domingo, 18 de Julio de 2010.

Los contenidos de la GUADEC Hispana van a ser eminentemente técnicos y van a abarcar temáticas relevantes para la comunidad de GNOME como son los retos que plantea la nueva versión de GNOME 3.0, la accesibilidad de la plataforma (a11y) y la incorporación de nuevos desarrolladores a la comunidad.

GUADEC tratará temas específicos de dispositivos móbiles como es el soporte de dispositivos mutitáctiles (multitouch), la adquisición de imágenes a partir de camaras (Gdigicam), la geolocalización (GeoClue) o la reproducción de objetos multimedia (Grilo).

También se presentarán una aplicaciones de OCR (OCRFeeder), una herramienta traducción de software (Gtranslator) , un reproductor de música por internet (JaMp) o las nuevas librerías y apliación para navegar en la web (Webkit y Epiphany).

Esta GUADEC Hispana también servirá para reflexionar sobre la GNOME Foundation y la evaluación del proyecto GNOME.

La Guadec Hispana es organizada por GPUL y GNOME HISPANO gracias a los patrocinadores Igalia y OpenShine con la colaboración de la Facultad de Informática de la UDC, la asociación GHANDALF y la Secretaría Xeral de Modernización e Innovación Tecnolóxica de la Xunta de Galicia a través de Mancomun y la Fundación para o Fomento da Calidade Industria e o Desenvolvemento Tecnolóxico de Galicia

by txenoo at July 13, 2010 01:14 AM

July 08, 2010

Javier Fernández

GeoClue: Analysis and Architecture

After the first post introducing this cool project is time to go further and deeply analyze the GeoClue internals and general behavior, describing briefly he most relevant components of its architecture.

The first thing I noticed during the analysis of this piece of software is that is a quite complex component, at least, from the architecture design point of view. It provides a set of interfaces and DBus bindings to provide a very general and flexible tool for handling and extending location providers implementations. The following picture illustrate this idea:

Lets start analyzing the architecture, exploring each module and the relationship and interactions between the internal components.

Interfaces

GeoClue provides several interfaces to expose the different locations services and configuration operations. The following interfaces are currently defined:

  • GcIfaceGeoclue: Interface for administrative and configuration operations.
  • GcIfaceAddress: Interface for address acquiring operations.
  • GcIfacePosition: Interface for global positioning operations.
  • GcIfaceGeocode: Interface for geocoding  operations.
  • GcIfaceReverseGeocode: Interface for reverse-geocoding  operations.
  • GcIfaceVeolcity: Interface for velocity monitoring operations.

Some of those interfaces are exposed through DBus interfaces. An XML file define the structure of the DBus bindings. The *Glue generated classes are created from those specification files.

Location Providers

The most direct way to obtain the location is through the specific Location Providers implementation, each one using a different strategy for acquiring the data. There are several implementations for both, Position and Address providers, but lets analyze one simple for the time being, say Localnet.

Every Location Provider is defined through the following configuration files:

  • geoclue-localnet.xml: This file defines the exposed DBus methods and signals. The associated *Glue classes are generated from this file.
  • geoclue-localnet.provider: This file defines the settings of the Location Providers, like description, Dbus specification (path, service, iface), accuracy and some special features provided by the provider (e.g. automatic updates).
  • org.freedesktop.Geoclue.providers.Localnet: DBus service launcher file.

The Location Provider class, in this case called GeoclueLocalnet, should inherit from the GcProvider abstract class, which implements the GcIfaceGeoclue interface. It also should implement the abstract methods defined in the corresponding generated *Glue class, which allows the provider to receive calls through the DBus system or session bus.

Location Data Containers

In order to retrieve different kind of Location data there are several classes defined for that purpose, all of them derived classes from GeoclueProvider. This class holds a DBus proxy object to the instance which actually implement the Location mechanism. The specific provider container instantiated, GeoclueAddress for instance, should receive the DBus service specification (path, service); in the case of the Localnet example, it would be  org.freedesktop.Geoclue.Providers.Localent and /org/freedesktop/Geoclue/Providers/Localnet.

Master Provider

The Master provider is designed by a client/server structure, where the server holds a reference to a DBus proxy object to the selected Location provider. The client will evaluate the available providers choosing the best one, following a provider selection algorithm and based on the user requirements.

The Master server could attend several clients and it monitors the currently selected Location Provider, notifying all the clients any status transition and events,  or even the change of the selected provider.

Both components, client and server, are accessed through the DBus interface, org.freedesktop.Geolcue.MasterClient and org.freedesktop.Geolcue.Master interfaces respectively.

Master client/server

As commented before, the Master Provider has a client/server based design; the server is defined as a singleton of the class GeoclueMaster and its the responsible of the clients instantiation.

The GeoclueMasterClient class instances are the ones used for external applications to interact with the Location framework. It creates the necessary providers (Address, Position, Velocity, …) associated to the Master DBus interface (org,freedesktop,Geoclue.MasterClient. The corresponding GcMasterClient instance will receive all the requests, forwarded thought the Master Dbus interface (org.freedesktop.Geoclue.Master) to the Master server, which will derive the call to the selected Location Provider, using the specific provider DBus interface (org.freedesktop.Geoclue.Providers.Localnet).

And thats all; there are other components, like the connectivity manager and the related interfaces, or the web services supporting classes, but i think the contents described in this post are far enough to understand how GeoClue works, or at least, to show what a complex structure it has.

The following sequence diagram could help to understand how the classes interact to get the address, for instance:

A more interesting debate would be if such a complex design is necessary, or if the advantages it provides, in terms of flexibility and generalization, are enough to justify that, or even they could be obtained as a result of a different design, perhaps simpler. But such an interesting debate will take place in future posts ;) stay tunned.

by jfernandez at July 08, 2010 06:31 PM

Alejandro Piñeiro

Cally integrated on Clutter

I will stop making Cally releases. This is because this Wednesday something important (from Cally POV) happened. Cally source code was moved to Clutter repository.

Some people could think that this is the same that happened to GAIL, that started as a isolated library, and then was moved to GTK+ repository. But there is a major difference. GAIL is still a runtime loadable module, and compiles against GTK+ as a independent library. So this was just basically a GAIL source code move.

But now Cally is not a loadable module anymore. It is part of Clutter. Clutter calls Cally directly in order to start accessibility support, so accessibility becomes one of the pieces of Clutter, instead of a external plugin providing this feature. I would like to thank Emmanuele Bassi for all the work done in this integration. In fact this integration was his idea, during the discussion of two bugs related to how to use/load Cally in gnome-shell, during the GNOME accessibility hackfest on CSUN.

I hope this change makes things easier. Now we still have to implement a proper way to load the bridge between Cally (the ATK implementation) and AT-SPI, the atk-bridge.

Bridge to Cally

BTW, I’m going to guadec, so this means that I need to put here this:

Going to GUADEC

And I will have there a talk about Cally, at first scheduled on Wednesday 28th July. See you there.

by API at July 08, 2010 03:44 PM

July 06, 2010

Víctor Jáquez

dsp-exec landed on dsp-tools

In the DSP bridge realm, usually when the kernel module is loaded, it in turn loads the so called DSP base image, which is a file what encompass the DSP/BIOS kernel and the DSP/BIOS Bridge.

Usually, in a development cycle, you may want to test different base images, and removing and reloading the Linux bridgedriver module is not very practical. For this case, TI provides the cexec.out utility, which uses the bloated libdspbridge API, to load in runtime different DSP base images.

But we all know that cool boys use dsp_bridge instead of libdspbridge, which is much more clean, small and nice. And also we have a neat set of utilities called dsp-tools. Nevertheless a utility like cexec.out was missing, and because of that dsp-exec has born.

Last week, my patches were committed by FelipeC into the stage repository in github, and I’m enjoying them while I’m poking around in the audio decoding :)

by vjaquez at July 06, 2010 01:49 PM

July 04, 2010

Joaquim Rocha

Going to GUADEC

One more year, Igalia will give me the chance and the pleasure to attend GUADEC one more year, this time in Den Haag.

I'm going to GUADEC

My fellow Igalians Iago, Alejandro Piñeiro and José Dapena will give talks about Grilo, Cally and Modest 4, respectively.

As for me, I’m hoping my lightening talk about Text Prediction on GNOME gets accepted.

So, as usual, if you wanna talk about GNOME, OCR, Input Methods, Grilo, Django or Free Software in general and have beer while we’re on it, come along!

Hope to see you in Den Haag.

by Joaquim Rocha at July 04, 2010 11:43 AM

July 01, 2010

Chema Casanova

Se publica el programa y se abre el registro de la VII GUADEC-ES

Ya están disponibles el programa y la inscripción de la VII GUADEC Hispana que se celebrará en la Facultad de Informática de A Coruña del 22 al 23 de de 2010..

La organización de la VII Guadec Hispana se complace en anunciar el programa de charlas, talleres, mesas redondas y actividades para los dos días de congreso. Este año contaremos con ponentes de España, Chile, Perú y Portugal.

Si quereis conocer las últimas novedades del proyecto GNOME, teneis una cita obligada en la Facultad de Informática de la Universidade da Coruña.

La inscripción está ya disponible a través de la aplicación de registro, y estará abierta hasta el 18 de julio, así que date prisa si quieres acudir, ya que las plazas son limitadas.

Guadec-Es es organizada por GPUL y GNOME HISPANO gracias a los patrocinadores Igalia y OpenShine con la colaboración de la Facultad de Informática de la UDC, la asociación GHANDALF y la Secretaría Xeral de Modernización e Innovación Tecnolóxica de la Xunta de Galicia a través de Mancomun y la Fundación para o Fomento da Calidade Industria e o Desenvolvemento Tecnolóxico de Galicia

El programa de este año incluye muchos temas interesantes para los asistenes que quieran conocer como empezar a participar en una comunidad de Software Libre como GNOME.

Pero también permite conocer las últimas novedades del proyecto GNOME en cuanto a su apliación a tecnologías móbiles, estudios de su comunidad, mejoras en accesibilidad, las implicaciones de los nuevos navegadores o el soporte de los sistemas Multitouch, entre muchos otros temas.

  • TALLER: Introducción a GNOME 2.30, Óscar García Amor, GPUL
  • PONENCIA: The Evolution of GNOME: Who Writes GNOME?,Germán Póo-Caamaño, GNOME Foundation
  • PONENCIA: Estado actual de la Fundación GNOME, Germán Póo-Caamaño, GNOME Foundation
  • PONENCIA: Accessibilidad en GNOME: funcionamiento, estado actúal y futuro en GNOME 3.0″, Alejandro Piñeiro Iglesias , Igalia
  • PONENCIA: GNOME 3 para desarrolladores, Carlos Garcia Campos,GNOME Hispano
  • PONENCIA: Evaluando GNOME, Juanjo Marin, Junta de Andalucía
  • PONENCIA:: GeoClue: Framework para el soporte de Geolocalización, Javier Fernández García-Boente, Igalia
  • PONENCIA: GDigicam, Antía Puentes Felpeto, Igalia
  • PONENCIA: Gtranslator: Caminando hacia la versión 2.0, Pablo Sanxiao,Ghandalf
  • PONENCIA: Multitouch en tus apps, Carlos Garnacho,Lanedo
  • PONENCIA:”WebKit & GNOME: I want to believe!”, Mario Sanchez Prada,Igalia
  • TALLER/ PONENCIA:Cómo empezar a colaborar en GNOME, Javier Jardón, GNOME Foundation
  • PONENCIA: GRILO: Easing integration of multimedia content in applications, Xabier Rodríguez Calvar,Igalia
  • TALLER/ PONENCIA: Git it done! Introducción al control de versiones con git”, Mario Sanchez Prada,Igalia
  • PONENCIA: JaMp – Un cliente para Jamendo, Simón Pena y Alumnos Máster Software Libre
  • PONENCIA: Sesión espiritista: Epiphany en GNOME 3.0, Diego Escalante Urrelo,GNOME
  • TALLER: Cómo ser hacker e ir a la universidad sin morir en el intento, Diego Escalante Urrelo, GNOME
  • PONENCIA: Vala, un lenguaje para Gnome 3.0, Roberto Majadas, OpenShine
  • PONENCIA: OCRFeeder , Joaquim Rocha, Igalia

Esperamos contar contigo.

by txenoo at July 01, 2010 09:54 PM

June 29, 2010

Miguel A. Gómez

When Grilo met Phonon

You probably know Grilo. It’s a GLib based framework created to ease the task of searching media to application developers. A couple of weeks ago I checked its code a bit and I really liked its plugin based design, and how easy to use it was. And I wanted to test it, of course :)

Some of my colleagues had already created some examples with Grilo, like Iago adding it to Totem or José creating a clutter based player. I wanted to do something different, and as I live between the Qt and the Gnome world, I decided to develop a Qt based Grilo application that used Phonon to play the media found by Grilo. If you are interested in the full source, you can clone my public repository at Igalia (http://git.igalia.com/user/magomez/qtgrilo.git).

So, step one: create the UI. I got a bit of inspiration from the grilo-test-ui program available with the Grilo sources, and this was the result:

You can choose the plugin to use from the combobox on the top. When a plugin is selected, the operations supported by the plugin are indicated. In the image, the Youtube plugin supports searching, browsing and metadata operations.
The bottom-left list shows the available media. It can be the result of a search, query or browse operation. Double clicking on a list item will browse it if it’s a container or show its metadata if it’s a media file. If the selected media contains an URL field, it will be played by pressing the Show button.

Step two: connect Grilo and the UI. This is really simple. Just add the plugins configuration to the plugin registry (for example the youtube one):

config = grl_config_new ("grl-youtube", NULL);
grl_config_set_api_key (config, YOUTUBE_KEY);
grl_plugin_registry_add_config (registry, config);

Then ask the registry about the available sources and add them to the plugins combo so the user can select one:

GrlMediaPlugin **sources;

sources = grl_plugin_registry_get_sources(registry,
                                          FALSE);

int i = 0;
while (sources[i]) {
    pluginCombo->
        addItem(grl_metadata_source_get_name(GRL_METADATA_SOURCE(sources[i])),
                qVariantFromValue(sources[i]));
    i++;
}
g_free(sources);

Be careful here, as in order to store non Qt typed pointers in QVariants, you need to declare them first, so Qt knows about those types. In this code, I defined the 2 types I stored into QVariants:

Q_DECLARE_METATYPE(GrlMediaPlugin*)
Q_DECLARE_METATYPE(GrlMedia*)

And that’s it.

Then, when the user selects a source, ask for its supported operations. If browsing is supported, do it to fill the browser list with the root folder contents:

GrlSupportedOps ops;
ops = grl_metadata_source_supported_operations(GRL_METADATA_SOURCE(currentPlugin));

if (ops & GRL_OP_SEARCH) {
        opsString += "  SEARCH";
        searchButton->setEnabled(true);
} else {
        searchButton->setEnabled(false);
}
if (ops & GRL_OP_QUERY) {
        opsString += "  QUERY";
        queryButton->setEnabled(true);
} else {
        queryButton->setEnabled(false);
}
if (ops & GRL_OP_BROWSE) {
        opsString += QString("  BROWSE");
        browseButton->setEnabled(true);
        browse();
} else {
        browseButton->setEnabled(false);
}
if (ops & GRL_OP_METADATA) {
        opsString += "  METADATA";
} else {
}

operationsLabel->setText(opsString);

Step three: implement the browse, search and query operations. Again, this is a simple process once you understand how Grilo works, and the implementation of the three operations is quite similar. Basically, you need to call grl_media_source_search/query/browse. Besides some flags and parameters for the search, you indicate the string to search/query or the container to browse, and the callback operation. This callback is called whenever a result arrives, and inside you must decide whether to launch a new search/query/browse to get the next chunk of results. Of course, besides this, I’ve added the obtained media to the browser list, so the user can interact with it.

As I explained in my last post, a class method can be used as a GObject signal callback, so this is what I did here as well. When callback method is called, it receives the class instance as the user_data parameter, so from inside the class method I can call the instance method I need. As an example, these are the 3 functions that implement the search operation: search() is the one called to start the operation, searchFinishedCB is the result callback, and searchMethod is the instance methos that adds the result to the browser and launches the search again if needed.

void TestWindow::search()
{
        cancelCurrentOperation();
        clearBrowser();

        string = g_strdup(searchEdit->text().toLatin1());
        currentOpId = grl_media_source_search(GRL_MEDIA_SOURCE(currentPlugin),
                                              string,
                                              grl_metadata_key_list_new(GRL_METADATA_KEY_ID,
                                                                        GRL_METADATA_KEY_TITLE,
                                                                        GRL_METADATA_KEY_CHILDCOUNT,
                                                                        NULL),
                                              0,
                                              BROWSE_CHUNK_SIZE,
                                              (GrlMetadataResolutionFlags)BROWSE_FLAGS,
                                              searchFinishedCB,
                                              this);

}

void TestWindow::searchFinishedCB(GrlMediaSource *source,
                                  guint search_id,
                                  GrlMedia *media,
                                  guint remaining,
                                  gpointer user_data,
                                  const GError *error)
{
        if (!error && media) {
                TestWindow *win = (TestWindow*)user_data;
                win->searchFinished(search_id, media, remaining);
        }

}
void TestWindow::searchFinished(guint search_id,
                                GrlMedia *media,
                                guint remaining)
{
        QString name(grl_media_get_title(media));
        QStandardItem *item = new QStandardItem();
        if (GRL_IS_MEDIA_BOX(media)) {
                QFont font;
                font.setBold(true);
                item->setFont(font);
                gint children = grl_media_box_get_childcount(GRL_MEDIA_BOX(media));
                if (children == GRL_METADATA_KEY_CHILDCOUNT_UNKNOWN) {
                        name += QString(" (?)");
                } else {
                        name += QString(" (%1)").arg(children);
                }
        }
        item->setText(name);
        item->setData(qVariantFromValue(media));
        item->setEditable(false);
        browseModel->appendRow(item);
        operationResults++;

        if (remaining == 0) {
                operationOffset += operationResults;
                if (operationResults >= BROWSE_CHUNK_SIZE &&
                    operationOffset  BROWSE_MAX_COUNT) {
                        operationResults = 0;
                        /* relaunch search */
                        currentOpId =
                                grl_media_source_search(GRL_MEDIA_SOURCE(currentPlugin),
                                                        string,
                                                        grl_metadata_key_list_new(GRL_METADATA_KEY_ID,
                                                                                  GRL_METADATA_KEY_TITLE,
                                                                                  GRL_METADATA_KEY_CHILDCOUNT,
                                                                                  NULL),
                                                        operationOffset,
                                                        BROWSE_CHUNK_SIZE,
                                                        (GrlMetadataResolutionFlags)BROWSE_FLAGS,
                                                        searchFinishedCB,
                                                        this);
                }
        }
}

After implementing the search, query and browse operations, I implemented the metadata operation as well. So when the user selects and element in the browser, its metadata is retrieved and shown. Its implementation is quite similar to the browse/query/search operations as well, but it doesn't need to be relaunched as them.

So, the next and final step was playing the media. I started with videos and audio, as using Phonon it was really easy:

void TestWindow::playVideo()
{
        Phonon::VideoWidget *videoWidget = new Phonon::VideoWidget();
        videoWidget->setAttribute(Qt::WA_DeleteOnClose);

        Phonon::MediaObject *mediaObject = new Phonon::MediaObject(videoWidget);
        mediaObject->setCurrentSource(Phonon::MediaSource(QUrl(QString::fromUtf8(grl_media_get_url(currentMedia)))));
        Phonon::AudioOutput *audioOutput = new Phonon::AudioOutput(Phonon::VideoCategory, videoWidget);
        Phonon::createPath(mediaObject, audioOutput);
        Phonon::createPath(mediaObject, videoWidget);
        videoWidget->show();
        mediaObject->play();
}

void TestWindow::playAudio()
{
        QMessageBox msgBox;
        msgBox.setText(QString("Playing %1").arg(grl_media_get_title(currentMedia)));

        Phonon::MediaObject *mediaObject = new Phonon::MediaObject(&msgBox);
        mediaObject->setCurrentSource(Phonon::MediaSource(QUrl(QString::fromUtf8(grl_media_get_url(currentMedia)))));
        Phonon::AudioOutput *audioOutput = new Phonon::AudioOutput(Phonon::MusicCategory, &msgBox);
        createPath(mediaObject, audioOutput);
        mediaObject->play();
        msgBox.exec();
}

Understanding how Phonon works is quite easy when you have learned to use GStreamer first, as the concepts are almost the same (despite Phonon is far easier to use). Basically you need to create a MediaObject and tell it where to get the data. Then create an AudioOutput for the audio, a VideoWidget for the video, connect them and then set the playing state. I was a bit short of time to implement a more featured player, but I wanted to provide a way to stop the playback once started, so it's stopped when the output window (if it's a video) or the dialog with the title (if it's an audio file) are closed.

And finally, the image files. Opening them when they were local files is trivial. But when they are remote ones, you need to download them first. In order to do so, you to use a QNetworkAccessManager, which is the class in charge of the network access. Just use its get() to make a request, and it will notify with a signal when the data has arrived, as you can see in the code:

netManager = new QNetworkAccessManager(this);
connect(netManager, SIGNAL(finished(QNetworkReply*)),
                this, SLOT(netRequestFinished(QNetworkReply*)));

...

void TestWindow::playImage()
{
        QUrl url(QString::fromUtf8(grl_media_get_url(currentMedia)));

        if (url.scheme() == "file") {
                QScrollArea *area= new QScrollArea();
                area->setAttribute(Qt::WA_DeleteOnClose);
                QLabel *label = new QLabel();
                label->setPixmap(QPixmap(url.path()));
                area->setWidget(label);
                area->show();
        } else {
                netManager->get(QNetworkRequest(url));
        }
}

...

void TestWindow::netRequestFinished(QNetworkReply *reply)
{
        QScrollArea *area= new QScrollArea();
        area->setAttribute(Qt::WA_DeleteOnClose);
        QLabel *label = new QLabel();
        QPixmap pix;
        pix.loadFromData(reply->readAll());
        label->setPixmap(pix);
        area->setWidget(label);
        area->show();
        reply->deleteLater();
}

And that's all... well, almost all... for some reason I haven't found yet, opening youtube videos is not working, despite I've checked the URLs and the videos work if they are atored in the computer... I might be a bug with Phonon but I haven't found it yet...

As you can see, using Grilo is really easy... even if you decide to mix it with Qt! :)

by magomez at June 29, 2010 05:06 PM

Xavier Castaño

Abierto el plazo de matriculación del Master de Software Libre 2010-2011 en Galicia

Igalia y la Universidad Rey Juan Carlos, promueven la IV edición del Máster en Software Libre en Galicia. El Master será impartido en A Coruña y se realizará a partir de Octubre en sesiones de viernes tarde y sábado mañana. Se podrán enviar solicitudes de inscripción hasta el 31 de Julio.

El principal objetivo del Máster es  continuar formando profesionales especializados en Software Libre, supliendo la elevada demanda dentro del  sector TIC. El Master cuenta con un enfoque muy práctico, incluyendo el viaje a un congreso internacional incluído en el precio del Master y fomentando el trabajo en grupo. Desde los inicios del Master hemos incluído charlas de personas relevantes del Software Libre como son Richard Stallman, Marcelo Branco, Carlos Guerreiro, Tomeu Vizzoso o Alberto Abella.

Es posible acceder al Master con un coste final a partir de 2900€ gracias a la existencia de becas y prácticas remuneradas en las empresas colaboradoras y a la política de descuentos que hemos definido para los alumnos:

  • 10% por matriculación durante el plazo ordinario. Acumulable con los otros descuentos.
  • 20% por pertenecer a colectivos con acuerdos.
  • 30% a los dos mejores expedientes recibidos de entre los recién titulados.

Si además, participas en el Premio Fin de Carrera de Software Libre de Igalia contarás on otro 10% de descuento sobre el precio base. Consulta la política de precios y los  colectivos con descuentos.

El período ordinario de matriculación se cierra el 31 de Julio. Hazlo a través del formulario de inscripción

by xcastanho at June 29, 2010 09:12 AM

June 28, 2010

Adrián Pérez

Recipe: Convert FLAC files to MP3

This is another recipe-alike, self-reminder post. This one converts all FLAC files in a directory to MP3, which I do hardly now (because I have OGG-Vorbis support almost everywhere :D ), but is still useful for some hardware players. Also, note that this properly saves ID3 tags and song length information (it took me some time to find about xingmux, which is in gst-plugins-ugly):

for i in *.flac ; do
  gst-launch-0.10 filesrc location="${i}" \
    ! flacdec ! audioconvert ! lame vbr=4 birate=224 \
    ! xingmux ! id3mux ! filesink location="${i%.flac}.mp3"
done

Copy, paste, and you are done! ;)

by aperez at June 28, 2010 08:52 AM

June 27, 2010

Carlos López

CompCache (ramzswap) for MeeGo 1.0

My girlfriend has one of the first netbooks that were launched long ago. It is the Acer Aspire One A110 model that ships with 512MB RAM and an 8 GB SSD disk (an Intel Z-P230). This SSD has been criticized for its slow read and write speed. Intel lists the drive’s maximum speeds as 38 MB/s read and 10 MB/s write. But I can sure that you will not get more than 5MB/s writing.

So imagine, with 512 of RAM and a disc that seems rather an SD card, having any modern operating system running smoothly can be quite painful.

So I decided to give a try to MeeGo on this machine and I liked the user interface and also I was surprised that it is running more smoothly than the previous Ubuntu NBR installation.

This notebook has only 512 RAM so without a swap device you can just open only a little more than the browser and a shell. But trying to put a swap on this disk would be like shooting yourself in the head.

So here is when the great project compcache comes to rescue. Unfortunately the kernel that comes with MeeGo does not include compcache nor is there any package available in the repositories, so if you are looking to enable compcache in MeeGo this is your lucky day.

I have compiled all the necessary bits to run compcache under MeeGo and I packaged it in an rpm file.  This package includes the ramzswap module and the lzo_compress module compiled to match the MeeGo 1.0 kernel (2.6.33.3-11.1-netbook), also it includes the rzscontrol utility and an init script to load the service at startup. You can download it from here and then just install it:

wget http://people.igalia.com/clopez/kmod-compcache-2.6.33.3-11.1.i586.rpm
sudo rpm -ivh kmod-compcache-2.6.33.3-11.1.i586.rpm

I have configured it to use the 75% of the total RAM available on the system for the RAM swap device. I have done different tests and with this configuration I was getting the best of this machine, nevertheless you can change this easily. After installing the package edit the file /etc/init.d/compcache and change the variable ratio=75 at the beginning of the file to what you want and restart the service.

by clopez at June 27, 2010 10:13 PM