<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:planet="http://planet.intertwingly.net/" xmlns:indexing="urn:atom-extension:indexing" indexing:index="no"><access:restriction xmlns:access="http://www.bloglines.com/about/specs/fac-1.0" relationship="deny"/>
  <title>Planet Collabora</title>
  <updated>2012-02-05T12:46:43Z</updated>
  <generator uri="http://intertwingly.net/code/venus/">Venus</generator>
  <author>
    <name>Anonymous Coward</name>
  </author>
  <id>http://planet.collabora.co.uk/atom.xml</id>
  <link href="http://planet.collabora.co.uk/atom.xml" rel="self"/>
  <link href="http://planet.collabora.co.uk/" rel="alternate"/>

  <entry>
    <id>tag:blogger.com,1999:blog-7201445798030158398.post-3655981564009858135</id>
    <link href="http://ppaalanen.blogspot.com/2012/01/nokia-n9-music-player-and-album-cover.html#comment-form" rel="replies" type="text/html"/>
    <link href="http://www.blogger.com/feeds/7201445798030158398/posts/default/3655981564009858135" rel="edit" type="application/atom+xml"/>
    <link href="http://www.blogger.com/feeds/7201445798030158398/posts/default/3655981564009858135" rel="self" type="application/atom+xml"/>
    <link href="http://ppaalanen.blogspot.com/2012/01/nokia-n9-music-player-and-album-cover.html" rel="alternate" type="text/html"/>
    <title>Pekka Paalanen: Nokia N9 Music Player and Album Cover Art</title>
    <content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml">I recently got a Nokia N9 phone. One of the first things I did was copy my music collection into it. Since the player shows also album cover images, if such are stored, I started adding them -- not by embedding them into ID3v2 tags but as separate files, to avoid useless copies of images.<br/><br/>Usually it is as simple as putting a <span>cover.jpg</span> file into a directory, that contains a single album. Sometimes and in some cases, though, that does not work. I found out, that the N9's default music player is supposed to follow <a href="https://live.gnome.org/MediaArtStorageSpec">Media Art Storage specification</a>. That gave me hints.<br/><br/><a name="more"/>If a directory contains more than one album, you can name the cover image files according to the album, for example '<span>Back in Black.jpg</span>' and '<span>Flick of the Switch.jpg</span>', as long as the names correspond the ID3 tag album name (somehow?).<br/><br/>My real problem case was a directory full of songs downloaded from <a href="http://www.scenemusic.net/">Nectarine</a>. I edited them all (<a href="http://easytag.sourceforge.net/">EasyTAG</a> is a wonderful tool) to make the ID3 album tag "Nectarine" because I wanted to have them all under the same "album", and there are over 50 songs in that single directory. Simply adding a <span>cover.jpg</span> or <span>Nectarine.jpg</span> did not work.<br/><br/>There are two possible reasons that I found. First, the directory contains too many files, according to the Media Art Storage spec. Second, apparently the cover art is not taken into use, unless at least one song file, which would use that cover art, is touched (modification date updated).<br/><br/>I created a new directory, moved one Nectarine song into it, and put <span>Nectarine.jpg</span> there, too. And it started to work, for all my Nectarine songs.<br/><br/>There is software called Tracker in the N9, which maintains some sort of database of all media. Also album cover art gets used via Tracker. If you ssh into your phone, and move around your media files, Tracker update is not automatically triggered. <strike>You could use the command <span>tracker-control -r</span> to force a full rebuild when you launch e.g. the music player the next time, but the rebuild will take a long time.</strike> An easy way to force a faster rebuild is to plug the N9 into a computer via USB, and then unplug it.<div class="blogger-post-footer"><img alt="" height="1" src="https://blogger.googleusercontent.com/tracker/7201445798030158398-3655981564009858135?l=ppaalanen.blogspot.com" width="1"/></div></div>
    </content>
    <updated>2012-02-02T21:18:34Z</updated>
    <published>2012-01-15T14:54:00Z</published>
    <category scheme="http://www.blogger.com/atom/ns#" term="music"/>
    <category scheme="http://www.blogger.com/atom/ns#" term="N9"/>
    <category scheme="http://www.blogger.com/atom/ns#" term="ID3"/>
    <author>
      <name>pq</name>
      <email>noreply@blogger.com</email>
      <uri>http://www.blogger.com/profile/06263850515835057642</uri>
    </author>
    <source>
      <id>tag:blogger.com,1999:blog-7201445798030158398</id>
      <category term="wayland"/>
      <category term="music"/>
      <category term="ID3"/>
      <category term="screensaver"/>
      <category term="N9"/>
      <category term="X"/>
      <author>
        <name>pq</name>
        <email>noreply@blogger.com</email>
        <uri>http://www.blogger.com/profile/06263850515835057642</uri>
      </author>
      <link href="http://ppaalanen.blogspot.com/feeds/posts/default" rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml"/>
      <link href="http://www.blogger.com/feeds/7201445798030158398/posts/default" rel="self" type="application/atom+xml"/>
      <link href="http://ppaalanen.blogspot.com/" rel="alternate" type="text/html"/>
      <link href="http://pubsubhubbub.appspot.com/" rel="hub" type="text/html"/>
      <title>Pekka Paalanen</title>
      <updated>2012-02-02T21:30:55Z</updated>
    </source>
  </entry>

  <entry>
    <id>tag:blogger.com,1999:blog-7201445798030158398.post-2743843567261960964</id>
    <link href="http://ppaalanen.blogspot.com/2012/02/wayland-r-at-collabora.html#comment-form" rel="replies" type="text/html"/>
    <link href="http://www.blogger.com/feeds/7201445798030158398/posts/default/2743843567261960964" rel="edit" type="application/atom+xml"/>
    <link href="http://www.blogger.com/feeds/7201445798030158398/posts/default/2743843567261960964" rel="self" type="application/atom+xml"/>
    <link href="http://ppaalanen.blogspot.com/2012/02/wayland-r-at-collabora.html" rel="alternate" type="text/html"/>
    <title>Pekka Paalanen: Wayland R&amp;D at Collabora</title>
    <content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml">While being contracted by <a href="http://www.collabora.com/">Collabora</a>, I started a Wayland R&amp;D project in October 2011 with the primary goal of getting to know <a href="http://wayland.freedesktop.org/">Wayland</a>, and strengthening Wayland expertise in Collabora. During the four months I started the <span>wl_shell_surface</span> protocol for desktops, added <a href="http://ppaalanen.blogspot.com/2011/11/screen-locking-in-wayland.html">screen locking</a>, <a href="http://ppaalanen.blogspot.com/2011/11/wayland-screensaver.html">ported an X screensaver</a> to Wayland <a href="http://ppaalanen.blogspot.com/2011/12/wayland-screensaver-integration.html">with new protocol</a>, and most recently implemented surface transformations in Weston (the reference compositor, originally the wayland-demos compositor). All this sponsored by Collabora.<br/><a name="more"/><br/>The project started by getting wayland-demos running under X, and then looking into the bugs I hit. To rule out problems in hardware GL renderer, I also got the demos running with softpipe and llvmpipe. Trying to fix segmentation faults and other obvious problems was my stepping stone into the Wayland code base.<br/><br/>My first real piece of work was screen locking. That included adding special protocol for it, having a way to have privileged Wayland clients, implementing locking in the shell plugin in the compositor, and writing an unlock dialog for the desktop-shell client. Those are the obvious parts. I also had to extend the shell plugin interface, find a way to hide surfaces so they do not render while the screen is locked, and of course bug hunting and patch set rebasing and rewriting, before screen locking landed upstream.<br/><br/>Next was porting an X screensaver as a regular Wayland client. Once that worked, I extended the protocol by adding a screensaver interface, and made the shell plugin automatically start the screensaver application. Handling screensavers would have been a walk in the park, except I needed shell-specific data to be attached to all surfaces. I wrote a hacky solution, but in the end, Kristian Høgsberg wanted me to add a whole new interface into the shell protocol for this. It became the <span>wl_shell_surface</span> interface, and all demo clients needed to adopt it. Yet that was not all. Since we are used to have per-monitor screensavers, I needed my screensaver to set different instances for each monitor. Hence I had to add output event callbacks in the toytoolkit.<br/><br/>A cleanup phase came next, I took Valgrind and ran. I fixed a pile of memory leaks and wrote missing destructor functions all over, in compositor, clients and the toytoolkit, at the same time collecting a Valgrind suppressions list to ease Valgrinding in the future. This work included adding some ad hoc way of cleanly exiting demo clients.<br/><br/>In January there were some discussions on maximised and full-screen surfaces, what they are and how they should be implemented. Surface scaling was raised as one point. Weston already had the zoom effect, and full-screen scaling would be another surface transformation, so I decided to write a transformation matrix stack for supporting any number of simultaneous transformations. It turned out to be a three week task.<br/><br/>Implementing surface transformations required changes all over Weston. First, I needed a way to invert the transformation which is a 4-by-4 matrix. After searching in vain for a MIT-licenced C implementation I wrote one myself, based on LU-decomposition. I believe LU-decomposition is more efficient on a 4x4 matrix than <a href="http://en.wikipedia.org/wiki/Invertible_matrix#Analytic_solution">the cofactor method</a>. Along the inversion routines, I wrote a unit test application for testing the speed and precision of the inversion. Detecting and dealing with non-invertible transformations is also important.<br/><br/>Going through the transformation stack every time you need to transform a point might be costly, so I added a cached total transform and its inverse. Implementing input redirection was a simple matter of applying the inverse total transform to pointer coordinates. Needing a way to test transformations, I added a Weston key binding for rotating surfaces, and modified an existing demo application to mark the clicked point. Adding functions for explicitly converting between display global coordinates and surface local coordinates (surface local are the only ones a client knows of) clarified some of the coordinate computations.<br/><br/>Surface painting and damage region tracking needed fixes, too. Previously, a zoomed surface was repainted as a whole, and it forced a full display redraw, i.e. damaging the whole display. Transformed surface repaint needed to start honoring the repaint regions, so we could avoid excessive repainting. Damage and repaint regions are tracked as global coordinate axis aligned rectangles. Whenever a transformed surface is damaged (requires repainting), we need to compute the bounding box for the damage instead of simply using the global <i>x</i>, <i>y</i> of the top-left corner and the surface <i>width</i>, <i>height</i>. Then during surface painting, we take the list of damage rectangles, and render only those. Surface local coordinates (texture coordinates) are computed via the inverse transformation. This method may result in sampling outside of a surface's buffer (texture), so those samples need to be discarded in the fragment shader.<br/><br/>Other things that needed fixing after the surface transformations were window move and resize. Before fixing, moving a surface would not follow the pointer but move in the surface local orientation. Resize needed the same orientation fix, and another fix in relative surface motion that a client can set in the surface's attach request.<br/><br/>What you mostly see as the result of the surface transformations work is, that you can rotate any normal window, no application support needed. The pointer position on screen, over a window, accurately corresponds to what the application receives as the local pointer location. I did not realise it at the time, but this input redirection working flawlessly became an appreciated feature. Apparently it is hard or impossible to do in X, I would not know. In Wayland, and for me, it was just another relatively easy bug to be fixed. The window rotation feature was meant purely for debugging surface transformations.<br/><br/><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody><tr><td style="text-align: center;"><a href="http://3.bp.blogspot.com/-wVdYlTqQBdU/Typ_uvzYgrI/AAAAAAAAAA8/A9lo7A0dnAA/s1600/second-rotate-cropped.png" style="margin-left: auto; margin-right: auto;"><img border="0" height="250" src="http://3.bp.blogspot.com/-wVdYlTqQBdU/Typ_uvzYgrI/AAAAAAAAAA8/A9lo7A0dnAA/s320/second-rotate-cropped.png" width="320"/></a></td></tr><tr><td class="tr-caption" style="text-align: center;">Two rotated windows and some flowers.</td></tr></tbody></table>There are still further issues to be fixed with surface transformations. Relative surfaces, like pop-up windows and menus, are not transformed and appear at a wrong location. Pointer cursors are not transformed; you would want the text bar cursor to be aligned with the text orientation. Continuously resizing a transformed window from its (locally) top-left corner makes the window drift away. We are probably still damaging larger regions than absolutely necessary for repaints. Repaint optimisation of opaque surfaces does not work with transformations.<br/><br/>During all this work of four months there were also the usual bug hunts, enhancements and fixes all over. For example, decorationless EGL apps, which turned out to have been a bug in Cairo, and moving the configuration file parser into a helper library that is shared between clients and the compositor.<br/><br/>Now, I am done with the Wayland R&amp;D project and moving into another project at Collabora. In the new project I will continue working on Wayland, Weston, and the demos.<div class="blogger-post-footer"><img alt="" height="1" src="https://blogger.googleusercontent.com/tracker/7201445798030158398-2743843567261960964?l=ppaalanen.blogspot.com" width="1"/></div></div>
    </content>
    <updated>2012-02-02T12:57:03Z</updated>
    <published>2012-02-02T12:57:00Z</published>
    <category scheme="http://www.blogger.com/atom/ns#" term="wayland"/>
    <author>
      <name>pq</name>
      <email>noreply@blogger.com</email>
      <uri>http://www.blogger.com/profile/06263850515835057642</uri>
    </author>
    <source>
      <id>tag:blogger.com,1999:blog-7201445798030158398</id>
      <category term="wayland"/>
      <category term="music"/>
      <category term="ID3"/>
      <category term="screensaver"/>
      <category term="N9"/>
      <category term="X"/>
      <author>
        <name>pq</name>
        <email>noreply@blogger.com</email>
        <uri>http://www.blogger.com/profile/06263850515835057642</uri>
      </author>
      <link href="http://ppaalanen.blogspot.com/feeds/posts/default" rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml"/>
      <link href="http://www.blogger.com/feeds/7201445798030158398/posts/default" rel="self" type="application/atom+xml"/>
      <link href="http://ppaalanen.blogspot.com/" rel="alternate" type="text/html"/>
      <link href="http://pubsubhubbub.appspot.com/" rel="hub" type="text/html"/>
      <title>Pekka Paalanen</title>
      <updated>2012-02-02T21:30:55Z</updated>
    </source>
  </entry>

  <entry>
    <id>tag:blogger.com,1999:blog-5478286637066001180.post-1190288748143338416</id>
    <link href="http://blog.cosimo.alfarano.net/feeds/1190288748143338416/comments/default" rel="replies" type="application/atom+xml"/>
    <link href="http://blog.cosimo.alfarano.net/2012/02/learning-natural-interaction.html#comment-form" rel="replies" type="text/html"/>
    <link href="http://www.blogger.com/feeds/5478286637066001180/posts/default/1190288748143338416" rel="edit" type="application/atom+xml"/>
    <link href="http://www.blogger.com/feeds/5478286637066001180/posts/default/1190288748143338416" rel="self" type="application/atom+xml"/>
    <link href="http://blog.cosimo.alfarano.net/2012/02/learning-natural-interaction.html" rel="alternate" type="text/html"/>
    <title>Cosimo Alfarano: Learning Natural Interaction</title>
    <content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml">Just to say it out loud in the hope someone else is interested in it:<br/><br/>I've been studying and I'm intentioned to write an open sourced Natural Interaction module for <a href="http://www.openni.org/">OpenNI</a> or libfreenect which is able to do skeleton and gesture recognition.<br/><br/>Ideally and in the <b><u>*very*</u></b> long term I'd like to have something very close in functionalities to what the closed sourced <a href="http://anonscm.debian.org/gitweb/?p=pkg-multimedia/primesense-nite-nonfree.git;a=summary">NITE</a> is for <a href="http://anonscm.debian.org/gitweb/?p=pkg-multimedia/openni.git;a=summary">OpenNI</a>, but to begin with a simple shape or movement recognition module will make me happy.<br/><br/>I don't know anything about the subject, including the basic of image manipulation, but if someone would like to have some fun thinking about it, let's join the forces!<div class="blogger-post-footer"><img alt="" height="1" src="https://blogger.googleusercontent.com/tracker/5478286637066001180-1190288748143338416?l=blog.cosimo.alfarano.net" width="1"/></div></div>
    </content>
    <updated>2012-02-01T14:44:25Z</updated>
    <published>2012-02-01T14:44:00Z</published>
    <category scheme="http://www.blogger.com/atom/ns#" term="NI"/>
    <category scheme="http://www.blogger.com/atom/ns#" term="debian"/>
    <category scheme="http://www.blogger.com/atom/ns#" term="devel"/>
    <category scheme="http://www.blogger.com/atom/ns#" term="collabora"/>
    <author>
      <name>kalfa</name>
      <email>noreply@blogger.com</email>
      <uri>http://www.blogger.com/profile/03743290705911360564</uri>
    </author>
    <source>
      <id>tag:blogger.com,1999:blog-5478286637066001180</id>
      <category term="linux"/>
      <category term="maemo"/>
      <category term="copyright"/>
      <category term="social networking"/>
      <category term="devel"/>
      <category term="debian"/>
      <category term="gis"/>
      <category term="voip"/>
      <category term="network"/>
      <category term="collabora"/>
      <category term="events"/>
      <category term="projects"/>
      <category term="kinect"/>
      <category term="google"/>
      <category term="openstreetmap"/>
      <category term="NI"/>
      <author>
        <name>kalfa</name>
        <email>noreply@blogger.com</email>
        <uri>http://www.blogger.com/profile/03743290705911360564</uri>
      </author>
      <link href="http://blog.cosimo.alfarano.net/feeds/posts/default" rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml"/>
      <link href="http://www.blogger.com/feeds/5478286637066001180/posts/default/-/collabora" rel="self" type="application/atom+xml"/>
      <link href="http://blog.cosimo.alfarano.net/search/label/collabora" rel="alternate" type="text/html"/>
      <link href="http://pubsubhubbub.appspot.com/" rel="hub" type="text/html"/>
      <subtitle>Ideas, Internet, Networks, Linux, FOSS, VoIP, Python, Java, C, SW Design, ...</subtitle>
      <title>Just some notes about the Net</title>
      <updated>2012-02-01T14:44:25Z</updated>
    </source>
  </entry>

  <entry xml:lang="en">
    <id>http://kakaroto.homelinux.net/?p=462</id>
    <link href="http://kakaroto.homelinux.net/2012/01/how-the-ecdsa-algorithm-works/" rel="alternate" type="text/html"/>
    <title>Youness Alaoui: How the ECDSA algorithm works</title>
    <summary>To popular demand, I have decided to try and explain how the ECDSA algorithm works. I’ve been struggling a bit to understand it properly and while I found a lot of documentation about it, I haven’t really found any “ECDSA for newbies” anywhere. So I thought it would be good to explain in simple terms [...]</summary>
    <content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><p>To popular demand, I have decided to try and explain how the <a href="http://en.wikipedia.org/wiki/ECDSA">ECDSA</a> algorithm works. I’ve been struggling a bit to understand it properly and while I found a lot of documentation about it, I haven’t really found any “ECDSA for newbies” anywhere. So I thought it would be good to explain in simple terms how it works so others can learn from my research. I have found some websites that explain the basic principles but nowhere near enough to actually understand it, others that explains things without any basics, making it incomprehensible, and others that go way too deep into the the mathematics behind it.</p>
<p>ECDSA stands for “Elliptic Curve Digital Signature Algorithm”, it’s used to create a <a href="http://en.wikipedia.org/wiki/Digital_signature">digital signature</a> of data (a file for example) in order to allow you to verify its authenticity without compromising its security. Think of it like a real signature, you can recognize someone’s signature, but you can’t forge it without others knowing. The ECDSA algorithm is basically all about mathematics.. so I think it’s important to start by saying : “hey kids, don’t slack off at school, listen to your teachers, that stuff might be useful for you some day!” <img alt=":)" class="wp-smiley" src="http://kakaroto.homelinux.net/wp-includes/images/smilies/icon_smile.gif"/>  But these maths are fairly complicated, so while I’ll try to vulgarize it and make it understandable for non technical people, you will still probably need some knowledge in mathematics to understand it properly. I will do this in two parts, one that is a sort of high level explanation about how it works, and another where I dig deeper into its inner workings to complete your understanding. Note however that I’ve just recently learned this stuff, so I’m definitely not an expert on the matter.</p>
<p>So the principle is simple, you have a mathematical equation which draws a curve on a graph, and you choose a random point on that curve and consider that your point of origin. Then you generate a random number, this is your private key, you do some magical mathematical equation using that random number and that “point of origin” and you get a second point on the curve, that’s your public key. When you want to sign a file, you will use this private key (the random number) with a hash of the file (a unique number to represent the file) into a magical equation and that will give you your signature. The signature itself is divided into two parts, called <em><strong>R</strong></em> and <em><strong>S</strong></em>. In order to verify that the signature is correct, you only need the public key (that point on the curve that was generated using the private key) and you put that into another magical equation with one part of the signature (<em><strong>S</strong></em>), and if it was signed correctly using the the private key, it will give you the other part of the signature (<em><strong>R</strong></em>). So to make it short, a signature consists of two numbers, <em><strong>R</strong></em> and <em><strong>S</strong></em>, and you use a private key to generate <em><strong>R</strong></em> and <em><strong>S</strong></em>, and if a mathematical equation using the public key and <em><strong>S</strong></em> gives you <em><strong>R</strong></em>, then the signature is valid. There is no way to know the private key or to create a signature using only the public key.</p>
<p>Alright, now for the more in depth understanding, I suggest you take an aspirin right now as this might hurt! <img alt=":P" class="wp-smiley" src="http://kakaroto.homelinux.net/wp-includes/images/smilies/icon_razz.gif"/> </p>
<p>Let’s start with the basics (which may be boring for people who know about it, but is mandatory for those who don’t) : ECDSA uses only integer mathematics, there are no floating points (this means possible values are 1, 2, 3, etc.. but not 1.5..),  also, the range of the numbers is bound by how many bits are used in the signature (more bits means higher numbers, means more security as it becomes harder to ‘guess’ the critical numbers used in the equation), as you should know, computers use ‘bits’ to represent data, a bit is a ‘digit’ in binary notation (0 and 1) and 8 bits represent one byte. Every time you add one bit, the maximum number that can be represented doubles, with 4 bits you can represent values 0 to 15 (for a total of 16 possible values), with 5 bits, you can represent 32 values, with 6 bits, you can represent 64 values, etc.. one byte (8 bits) can represent 256 values, and 32 bits can represent 4294967296 values (4 Giga).. Usually ECDSA will use 160 bits total, so that makes… well, a very huge number with 49 digits in it…</p>
<p><a href="http://en.wikipedia.org/wiki/ECDSA">ECDSA</a> is used with a <a href="http://en.wikipedia.org/wiki/Sha1">SHA1</a> <a href="http://en.wikipedia.org/wiki/Cryptographic_hash_function">cryptographic hash</a> of the message to sign (the file). A <a href="http://en.wikipedia.org/wiki/Hash_function">hash</a> is simply another mathematical equation that you apply on every byte of data which will give you a number that is unique to your data. Like for example, the sum of the values of all bytes may be considered a very dumb hash function. So if anything changes in the message (the file) then the hash will be completely different. In the case of the SHA1 hash algorithm, it will always be 20 bytes (160 bits). It’s very useful to validate that a file has not been modified or corrupted, you get the 20 bytes hash for a file of any size, and you can easily recalculate that hash to make sure it matches. What ECDSA signs is actually that hash, so if the data changes, the hash changes, and the signature isn’t valid anymore.</p>
<p>Now, how does it work? Well <a href="http://en.wikipedia.org/wiki/Elliptic_curve_cryptography">Elliptic Curve cryptography</a> is based on an equation of the form :</p>
<p style="text-align: center;"><em><strong>y^2 = (x^3 + a * x + b) mod p</strong></em></p>
<p>First thing you notice is that there is a modulo and that the ‘<em><strong>y</strong></em>‘ is a square. This means that for any <em><strong>x</strong></em> coordinate, you will have two values of <em><strong>y</strong></em> and that the curve is symmetric on the <em>X axis</em>. The modulo is a prime number and makes sure that all the values are within our range of 160 bits and it allows the use of “<a href="http://en.wikipedia.org/wiki/Modular_square_root">modular square root</a>” and “<a href="http://en.wikipedia.org/wiki/Modular_multiplicative_inverse">modular multiplicative inverse</a>” mathematics which make calculating stuff easier (I think). Since we have a modulo (<em><strong>p</strong></em>) , it means that the possible values of <em><strong>y^2</strong></em> are between  0 and <em><strong>p</strong></em>-1, which gives us <em><strong>p</strong></em> total possible values. However, since we are dealing with integers, only a smaller subset of those values will be a “<a href="http://en.wikipedia.org/wiki/Square_number">perfect square</a>” (the square value of two integers), which gives us <em><strong>N</strong></em> possible points on the curve where <em><strong>N &lt; p</strong></em> (<em><strong>N</strong></em> being the number of perfect squares between 0 and<em><strong> p</strong></em>). Since each <strong><em>x </em></strong>will yield two points (positive and negative values of the square-root of <em><strong>y^2</strong></em>), this means that there are <em><strong>N/2</strong></em> possible ‘<em><strong>x</strong></em>‘ coordinates that are valid and that give a point on the curve. So this elliptic curve has a finite number of points on it, and it’s all because of the integer calculations and the modulus. Another thing you need to know about <a href="http://en.wikipedia.org/wiki/Elliptic_curve">Elliptic curves</a>, is the notion of “<a href="http://en.wikipedia.org/wiki/Elliptic_curve_point_multiplication">point addition</a>“. It is defined as adding one point <em><strong>P</strong></em> to another point <em><strong>Q</strong></em> will lead to a point <em><strong>S</strong></em> such that if you draw a line from <em><strong>P</strong></em> to <em><strong>Q</strong></em>, it will intersect the curve on a third point <em><strong>R</strong></em> which is the negative value of <em><strong>S</strong></em> (remember that the curve is symmetric on the <em>X axis</em>). In this case, we define <em><strong>R = -S</strong></em> to represent the symmetrical point of <em><strong>R</strong></em> on the <em>X axis</em>. This is easier to illustrate with an image :<a href="http://kakaroto.homelinux.net/wp-content/uploads/2012/01/ecdsa1.png"><img alt="" class="aligncenter size-medium wp-image-465" height="251" src="http://kakaroto.homelinux.net/wp-content/uploads/2012/01/ecdsa1-300x251.png" title="ecdsa1" width="300"/></a> So you can see a curve of the form <em><strong>y^2 = x^3 + ax + b</strong></em> (where <em><strong>a = -4</strong></em> and <em><strong>b = 0</strong></em>), which is symmetric on the <em>X axis</em>, and where <em><strong>P+Q</strong></em> is the symmetrical point through <em>X</em> of the point <em><strong>R</strong></em> which is the third intersection of a line going from <em><strong>P</strong></em> to <em><strong>Q</strong></em>. In the same manner, if you do <em><strong>P + P</strong></em>,  it will be the symmetrical point of <em><strong>R</strong></em> which is the intersection of the line that is a tangent to the point <em><strong>P</strong></em>.. And <em><strong>P + P + P</strong></em> is the addition between the resulting point of <em><strong>P+P</strong></em> with the point <em><strong>P</strong></em> since <strong><em>P + P + P</em></strong> can be written as <strong><em>(P+P) + P</em></strong>.. This defines the “<a href="http://en.wikipedia.org/wiki/Elliptic_curve_point_multiplication">point multiplication</a>” where <em><strong>k*P</strong></em> is the addition of the point <em><strong>P</strong></em> to itself <em><strong>k</strong></em> times… here are two examples showing this : <a href="http://kakaroto.homelinux.net/wp-content/uploads/2012/01/ecdsa3.png"><img alt="" class="aligncenter size-medium wp-image-470" height="242" src="http://kakaroto.homelinux.net/wp-content/uploads/2012/01/ecdsa3-300x242.png" title="ecdsa3" width="300"/></a> <a href="http://kakaroto.homelinux.net/wp-content/uploads/2012/01/ecdsa4.png"><img alt="" class="aligncenter size-medium wp-image-471" height="235" src="http://kakaroto.homelinux.net/wp-content/uploads/2012/01/ecdsa4-300x235.png" title="ecdsa4" width="300"/></a></p>
<p style="text-align: left;">Here, you can see two elliptic curves, and a point <em><strong>P</strong></em> from which you draw the tangent, it intersects the curve with a third point, and its symmetric point it <em><strong>2P</strong></em>, then from there, you draw a line from <em><strong>2P</strong></em> and <em><strong>P</strong></em> and it will intersect the curve, and the symmetrical point is <em><strong>3P</strong></em>. etc… you can keep doing that for the point multiplication. You can also already guess why you need to take the symmetric point of <strong><em>R</em></strong> when doing the addition, otherwise, multiple additions of the same point will always give the same line and the same three intersections.</p>
<p style="text-align: left;">One particularity of this point multiplication is that if you have a point <em><strong>R = k*P</strong></em>, where you know <em><strong>R</strong></em> and you know <em><strong>P</strong></em>, there is no way to find out what the value of ‘<em><strong>k</strong></em>‘ is. Since there is no point subtraction or point division, you cannot just resolve <em><strong>k = R/P</strong></em>. Also, since you could be doing millions of  point additions, you will just end up on another point on the curve, and you’d have no way of knowing “how” you got there. You can’t reverse this operation, and you can’t find the value ‘<em><strong>k</strong></em>‘ which was multiplied with your point <em><strong>P</strong></em> to give you the resulting point <em><strong>R</strong></em>.</p>
<p style="text-align: left;">This thing where you can’t find the multiplicand even when you know the original and destination points is the whole basis of the security behind the ECDSA algorithm, and the principle is called a “<a href="http://en.wikipedia.org/wiki/Trap_door_function">trap door function</a>“.</p>
<p style="text-align: left;">Now that we’ve handled the “basics”, let’s talk about the actual ECDSA signature algorithm. For ECDSA, you first need to know your curve parameters, those are <em><strong>a, b, p, N</strong></em> and <em><strong>G</strong></em>. You already know that ‘<em><strong>a</strong></em>‘ and ‘<em><strong>b</strong></em>‘ are the parameters of the curve function (<em><strong>y^2 = x^3 + ax + b</strong></em>), that ‘<em><strong>p</strong></em>‘ is the prime modulus,  and that ‘<em><strong>N</strong></em>‘ is the number of points of the curve, but there is also ‘<em><strong>G</strong></em>‘ that is needed for ECDSA, and it represents a ‘reference point’ or a point of origin if you prefer. Those curve parameters are important and without knowing them, you obviously can’t sign or verify a signature. Yes, verifying a signature isn’t just about knowing the public key, you also need to know the curve parameters for which this public key is derived from.</p>
<p style="text-align: left;">So first of all, you will have a private and a public key.. the private key is a random number (of 20 bytes) that is generated, and the public key is a point on the curve generated from the point multiplication of <em><strong>G</strong></em> with the private key. We set ‘<em><strong>dA</strong></em>‘ as the private key (random number) and ‘<em><strong>Qa</strong></em>‘ as the public key (a point), so we have : <em><strong>Qa = dA * G</strong></em> (where <em><strong>G</strong></em> is the point of reference in the curve parameters).</p>
<p style="text-align: left;">So how do you sign a file/message ? First, you need to know that the signature is 40 bytes and is represented by two values of 20 bytes each, the first one is called <em><strong>R</strong></em> and the second one is called <em><strong>S</strong></em>.. so the pair <em><strong>(R, S)</strong></em> together is your ECDSA signature.. now here’s how you can create those two values in order to sign a file.. first you must generate a random value ‘<em><strong>k</strong></em>‘ (of 20 byes), and use point multiplication to calculate the point <em><strong>P=k*G</strong></em>. That point’s <em><strong>x</strong></em> value will represent ‘<em><strong>R</strong></em>‘. Since the point on the curve <em><strong>P</strong></em> is represented by its <em><strong>(x, y)</strong></em> coordinates (each being 20 bytes long), you only need the ‘<em><strong>x</strong></em>‘ value (20 bytes) for the signature, and that value will be called ‘<em><strong>R</strong></em>‘. Now all you need is the ‘<em><strong>S</strong></em>‘ value.</p>
<p style="text-align: left;">To calculate <em><strong>S</strong></em>, you must make a SHA1 hash of the message, this gives you a 20 bytes value that you will consider as a very huge integer number and we’ll call it ‘<em><strong>z</strong></em>‘. Now you can calculate <em><strong>S</strong></em> using the equation :</p>
<p style="text-align: center;"><em><strong>S = k^-1 (z + dA * R) mod p</strong></em></p>
<p style="text-align: left;">Note here the <em><strong>k^-1</strong></em> which is the ‘<em><a href="http://en.wikipedia.org/wiki/Modular_multiplicative_inverse">modular multiplicative inverse</a></em>‘ of <em><strong>k</strong></em>… it’s basically the inverse of <em><strong>k</strong></em>, but since we are dealing with integer numbers, then that’s not possible, so it’s a number such that <em><strong>(k^-1 * k ) mod p</strong></em> is equal to 1. And again, I remind you that <em><strong>k</strong></em> is the random number used to generate <em><strong>R</strong></em>, <em><strong>z</strong></em> is the hash of the message to sign, <em><strong>dA</strong></em> is the private key and <em><strong>R</strong></em> is the <em><strong>x</strong></em> coordinate of <em><strong>k*G</strong></em> (where <em><strong>G</strong></em> is the point of origin of the curve parameters).</p>
<p style="text-align: left;">Now that you have your signature, you want to verify it, it’s also quite simple, and you only need the public key (and curve parameters of course) to do that. You use this equation to calculate a point <strong><em>P</em></strong> :</p>
<p style="text-align: center;"><em><strong>P=  S^-1*z*G + S^-1 * R * Qa</strong></em></p>
<p style="text-align: left;">If the <em><strong>x</strong></em> coordinate of the point <em><strong>P</strong></em> is equal to <em><strong>R</strong></em>, that means that the signature is valid, otherwise it’s not.</p>
<p style="text-align: left;">Pretty simple, huh? now let’s see why and how… and this is going to require some mathematics to verify :</p>
<p style="text-align: left;">We have :</p>
<p style="text-align: left;"><em><strong>P = S^-1*z*G + S^-1 * R *Qa</strong></em></p>
<p style="text-align: left;">but <em><strong>Qa = dA*G</strong></em>, so:</p>
<p style="text-align: left;"><em><strong>P = S^-1*z*G + S^-1 * R * dA*G = S^-1 (z + dA* R) * G</strong></em></p>
<p style="text-align: left;">But the <strong><em>x</em></strong> coordinate of <em><strong>P</strong></em> must match <em><strong>R</strong></em> and <em><strong>R</strong></em> is the <em><strong>x</strong></em> coordinate of <em><strong>k * G</strong></em>, which means that :</p>
<p style="text-align: left;"><em><strong>k*G = S^-1 (z + dA * R) *G</strong></em></p>
<p style="text-align: left;">we can simplify by removing <em><strong>G</strong></em> which gives us :</p>
<p style="text-align: left;"><em><strong>k = S^-1(z + dA * R)</strong></em></p>
<p style="text-align: left;">by inverting <em><strong>k</strong></em> and <strong><em>S</em></strong>, we get :</p>
<p style="text-align: left;"><em><strong>S = k^-1 (z + dA *R)</strong></em></p>
<p style="text-align: left;">and that is the equation used to generate the signature.. so it matches, and that is the reason why you can verify the signature with it.</p>
<p style="text-align: left;">You can note that you need both ‘<em><strong>k</strong></em>‘ (random number) and ‘<em><strong>dA</strong></em>‘ (the private key) in order to calculate <em><strong>S</strong></em>, but you only need <em><strong>R</strong></em> and <em><strong>Qa</strong></em> (public key) to validate the signature. And since <em><strong>R=k*G </strong></em>and<strong/><em><strong> Qa = dA*G</strong></em> and because of the trap door function in the ECDSA point multiplication (explained above), we cannot calculate <em><strong>dA</strong></em> or <em><strong>k</strong></em> from knowing <em><strong>Qa</strong></em> and <em><strong>R</strong></em>, this makes the ECDSA algorithm secure, there is no way of finding the private keys, and there is no way of faking a signature without knowing the private key.</p>
<p style="text-align: left;">The ECDSA algorithm is used everywhere and has not been cracked and it is a vital part of most of today’s security.</p>
<p style="text-align: left;">Now I’ll discuss on how and why the ECDSA signatures that Sony  used in the PS3 were faulty and how it allowed us to gain access to their private key.</p>
<p style="text-align: left;">So you remember the equations needed to generate a signature.. <em><strong>R = k*G</strong></em> and <em><strong>S= k^-1(z + dA*R) mod p</strong></em>.. well this equation’s strength is in the fact that you have one equation with two unknowns (<em><strong>k</strong></em> and <em><strong>dA</strong></em>) so there is no way to determine either one of those. However, the security of the algorithm is based on its implementation and it’s important to make sure that ‘<em><strong>k</strong></em>‘ is randomly generated and that there is no way that someone can guess, calculate, or use a timing attack or any other type of attack in order to find the random value ‘<em><strong>k</strong></em>‘. But Sony made a huge mistake in their implementation, they used the same value for ‘<em><strong>k</strong></em>‘ everywhere, which means that if you have two signatures, both with the same <em><strong>k</strong></em>, then they will both have the same <em><strong>R</strong></em> value, and it means that you can calculate <em><strong>k</strong></em> using two <em><strong>S</strong></em> signatures of two files with hashes <em><strong>z</strong></em> and <em><strong>z’</strong></em> and signatures <em><strong>S</strong></em> and <em><strong>S’</strong></em> respectively :</p>
<p style="text-align: left;"><em><strong>S – S’ = k^-1 (z + dA*R) – k^-1 (z’ + da*R) = k^-1 (z + da*R – z’ -dA*R) = k^-1 (z – z’)</strong></em></p>
<p style="text-align: left;">So : <em><strong>k = (z – z’) / (S – S’)</strong></em></p>
<p style="text-align: left;">Once you know <em><strong>k</strong></em>, then the equation  for <em><strong>S</strong></em> because one equation with one unknown and is then easily resolved for <em><strong>dA</strong></em> :</p>
<p style="text-align: left;"><em><strong>dA = (S*k – z) / R</strong></em></p>
<p style="text-align: left;">Once you know the private key <em><strong>dA</strong></em>, you can now sign your files and the PS3 will recognize it as an authentic file signed by Sony. This is why it’s important to make sure that the random number used for generating the signature is actually “cryptographically random”.  This is also the reason why it is impossible to have a custom firmware above 3.56, simply because since the 3.56 version, Sony have fixed their ECDSA algorithm implementation and used new keys for which it is impossible to find the private key.. if there was a way to find that key, then the security of every computer, website, system may be compromised since a lot of systems are relying on ECDSA for their security, and it is impossible to crack.</p>
<p style="text-align: left;">Finally! I hope this makes the whole algorithm clearer to many of you.. I know that this is still very complicated and hard to understand. I usually try to make things easy to understand for non technical people, but this algorithm is too complex to be able to explain in any simpler terms. After all that’s why I prefer to call it the MFET algorithm (Mathematics For Extra Terrestrials) <img alt=":)" class="wp-smiley" src="http://kakaroto.homelinux.net/wp-includes/images/smilies/icon_smile.gif"/> </p>
<p style="text-align: left;">But if you are a developer or a mathematician or someone interested in learning about this because you want to help or simple gain knowledge, then I’m sure that this contains enough information for you to get started or to at least understand the concept behind this unknown beast called “ECDSA”.</p>
<p style="text-align: left;">That being said, I’d like to thank a few people who helped me understand all of this, one particularly who wishes to remain anonymous, as well as the many wikipedia pages I linked to throughout this article, and Avi Kak thanks to <a href="https://engineering.purdue.edu/kak/compsec/NewLectures/Lecture14.pdf">his paper</a> explaining the mathematics behind ECDSA, and from which I have taken those graph images aboves.</p>
<p style="text-align: left;">P.s: In this article, I used ’20 bytes’ in my text to talk about the ECDSA signature because that’s what is usually used as it matches the SHA1 hash size of 20 bytes and that’s what the PS3 security uses, but the algorithm itself can be used with any size of numbers. There may be other inaccuracies in this article, but like I said, I’m not an expert, I just barely learned all of this in the past week.</p></div>
    </content>
    <updated>2012-02-01T02:05:07Z</updated>
    <category term="Development"/>
    <category term="PS3"/>
    <category term="algorithm"/>
    <category term="collabora"/>
    <category term="ecdsa"/>
    <category term="gnome"/>
    <category term="jailbreak"/>
    <category term="mathematics"/>
    <author>
      <name>kakaroto</name>
    </author>
    <source>
      <id>http://kakaroto.homelinux.net</id>
      <link href="http://kakaroto.homelinux.net/feed/" rel="self" type="application/atom+xml"/>
      <link href="http://kakaroto.homelinux.net" rel="alternate" type="text/html"/>
      <subtitle>Open your communications!</subtitle>
      <title>KaKaRoTo's Blog</title>
      <updated>2012-02-05T12:46:23Z</updated>
    </source>
  </entry>

  <entry>
    <id>http://robswain.tumblr.com/post/16812180671</id>
    <link href="http://robswain.tumblr.com/post/16812180671" rel="alternate" type="text/html"/>
    <title>Robert Swain: Lenovo T520 and Déjà Dup</title>
    <summary type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><p><a href="http://www.collabora.com/" title="Collabora Ltd">Collabora</a>, the wonderful company that they are, have allowed me a laptop upgrade after a couple of years of working there. The <a href="http://shop.lenovo.com/us/laptops/thinkpad/x-series/x200s" title="Lenovo X200s">Lenovo X200s</a> that served me so well while travelling back and forth between England and Sweden regularly during my early Collabora Multimedia days was starting to show its age with its Intel Core 2 Duo vPro 1.8GHz CPU.</p>
<p>The new laptop is a <a href="http://shop.lenovo.com/us/laptops/thinkpad/t-series/t520" title="Lenovo T520">Lenovo T520</a>, a 15.6” 1080p, quad core Intel Core i7 2.4GHz (turbo up to 3.5GHz) hyperthreaded sandybridge behemoth. It flies. It’s awesome to work on, even moreso as Collabora got an OCZ Vertex 2E SSD for me a while ago (which had to be replaced via OCZ RMA after 3 months… daily backups are a must if you do anything vaguely important).</p>
<p>The T520 model I have comes with both sandybridge integrated graphics and NVIDIA discrete graphics (NVS 4200M). I used the integrated graphics for some time and it works fine in Fedora 16 and anything else thrown at it, with one exception. There’s a known issue in the driver of tearing when playing back videos despite supposedly being always vsynced.</p>
<p>I had always planned to set up the discrete NVIDIA graphics drivers so I could switch in the BIOS (well, EFI, whatever) as I pleased and as needed. I tried and tried and tried to get the drivers working last night but after installing the akmod-nvidia package in Fedora 16, it would no longer boot, even after switching back to integrated graphics in the BIOS. Weird. I failed after attempting to fix the startup error (“[drm:ironlake_update_pch_refclk] <strong>*ERROR*</strong> enabling SSC on PCH” was not the real error but was the last thing in dmesg - peculiar as modesetting should have been disabled) and couldn’t find any solutions from anyone else so gave up, reinstalled as I need to work on this machine and commenced trying to restore from backups which I had been making nightly with an external drive and Déjà Dup.</p>
<p>Unfortunately, when trying to conduct a full restoration, Déjà Dup fails citing that there is not enough space at the target path. That is complete crap. It could be that there is not enough space on /tmp, but that feels like some kind of poor design if one can back something up on some machine but not restore it.</p>
<p>Maybe using duplicity directly can do better, it has a —tempdir option! Alas, no. It seems to still hit a no space left error. I had to hack duplicity code a little to use the proper tempdir to be able to do a full restoration. It seems the offending portion of the backup was a large VM image that had been stored as diffs and so took up lots of space with the incremental reconstruction.</p></div>
    </summary>
    <updated>2012-01-31T08:52:55Z</updated>
    <category term="Collabora"/>
    <category term="Lenovo"/>
    <category term="hardware"/>
    <source>
      <id>http://robswain.tumblr.com/</id>
      <author>
        <name>Robert Swain</name>
      </author>
      <link href="http://tumblr.superfeedr.com/" rel="hub" type="text/html"/>
      <link href="http://robswain.tumblr.com/" rel="alternate" type="text/html"/>
      <link href="http://robswain.tumblr.com/rss" rel="self" type="application/rss+xml"/>
      <subtitle>software development, configuration, multimedia and other random and helpful things</subtitle>
      <title>Rob Swain about stuff</title>
      <updated>2012-02-05T12:46:39Z</updated>
    </source>
  </entry>

  <entry xml:lang="en">
    <id>http://blogs.gnome.org/uraeus/?p=1808</id>
    <link href="http://blogs.gnome.org/uraeus/2012/01/29/summary-of-gstreamer-hackfest/" rel="alternate" type="text/html"/>
    <title>Christian Schaller: Summary of GStreamer Hackfest</title>
    <summary>So as I talked about in my last blog post we had a great GStreamer hackfest. A lot of things got done and quite a few applications got an initial port over to 0.11. For instance Edward Hervey ended up working on porting the Totem video player, or rather trying to come up with a [...]</summary>
    <content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><p>So as I talked about in <a href="http://blogs.gnome.org/uraeus/2012/01/26/gstreamer-hackfest-in-malaga-update/">my last blog post</a> we had a great <a href="http://gstreamer.freedesktop.org">GStreamer</a> hackfest. A lot of things got done and quite a few applications got an initial port over to 0.11. For instance <a href="http://blogs.gnome.org/edwardrv/">Edward Hervey</a> ended up working on porting <a href="http://projects.gnome.org/totem/">the Totem video player</a>, or rather trying to come up with a more optimized design for the <a href="http://www.clutter-project.org/">Clutter-gst</a> as the basis port was already done.</p>
<p>
Another cool effort was by <a href="http://base-art.net/">Philippe Normand</a> from <a href="http://www.igalia.com/">Igalia</a> who put a lot of effort into porting WebKit to use 0.11. His efforts where rewarded with success as you can see in this <a href="http://people.igalia.com/pnormand/big-buck-webkit-gst-0.11.png">screenshot</a>.
</p>
<p>
Jonathan Matthew had flown up all the way from Australia and made great progress in porting <a href="http://methlab42.itee.uq.edu.au/~jonathan/rhythmbox-gstreamer-0.11.png">Rhythmbox</a> over to the 0.11 API, a port which became hugely more useful after Wim Taymans and Tim-Phillip Muller fixed a bug that caused mp3 playback not to work <img alt=":)" class="wp-smiley" src="http://blogs.gnome.org/uraeus/wp-content/mu-plugins/tango-smilies/tango/face-smile.png"/> .</p>
<p>
<a href="http://pecisk.blogspot.com/">Peteris Krisjanis</a> made huge strides in porting <a href="http://www.jokosher.org/">Jokosher</a> to 0.11. Although like <a href="https://launchpad.net/~jderose">Jason DeRose</a> from <a href="http://novacut.com/">Novacut</a> and myself on <a href="http://www.linuxrising.org">Transmageddon</a> he did end up spending a lot of time on debugging issues related to gobject-introspection. The challenge for non-C applications like Jokosher, Novacut, Transmageddon and PiTiVi is a combination of the API having changed quite significantly due to the switch to gobject-introspection generated bindings, some general immaturity challenges with the gobject-introspection library and finally missing or wrong annotations in the GStreamer codebase. So once all these issues are sorted things should look a lot brighter for language bindings, but as we discovered there is a lot of heavy lifting to get there. For instance I thought I had Transmageddon running quite smoothly before I suddenly triggered <a href="https://bugzilla.gnome.org/show_bug.cgi?id=668862">this gobject-introspection bug</a>.</p>
<p>
There was a lot of activity around PiTiVi too, with <a href="http://jeff.ecchi.ca/blog/2012/01/25/restoring-from-backups/">Jean-François Fortin Tam</a>, <a href="http://thiblahute.blogspot.com/">Thibault Saunier</a> and <a href="http://preachwhatyoulive.blogspot.com/">Antigoni Papantoni</a> working hard on porting PiTiVi to 0.11 and the GStreamer Editing Services library. And knowing Jean-François Fortin I am sure there will soon be a blog with a lot more details about that <img alt=":)" class="wp-smiley" src="http://blogs.gnome.org/uraeus/wp-content/mu-plugins/tango-smilies/tango/face-smile.png"/> .</p>
<p>
<a href="http://thomas.apestaart.org/log/">Thomas Vander Stichele</a>, who also wrote a nice blog entry about the event, was working with Andoni Morales Alastruey, both from <a href="http://www.flumotion.com">Flumotion</a>, on porting <a href="http://www.flumotion.org">Flumotion</a> to 0.11, but due to some of the plugins needed not having been ported yet most of their effort ended up being on porting the needed plugins in GStreamer and not so much application porting, but for those of you using plugins such as multifdsink, this effort will be of great value and Andoni also got started on porting some of the non-linux plugins, like the directsoundsink for Windows.</p>
<p>
<a href="http://n770galaxy.blogspot.com/">Josep Torra</a> from <a href="http://www.fluendo.com">Fluendo</a> ended up working with Edward Hervey on hammering out the design for the clutter-gst sink at the conference, but he also found some time to do a port of his nice little tuner tool as you can see from the screenshot below.</p>
<div class="wp-caption alignleft" id="attachment_1811" style="width: 410px;"><a href="http://blogs.gnome.org/uraeus/files/2012/01/Screenshot-josep-torra1.png"><img alt="" class="size-full wp-image-1811" height="250" src="http://blogs.gnome.org/uraeus/files/2012/01/Screenshot-josep-torra1.png" width="400"/></a><p class="wp-caption-text">Tuner tool for GStreamer 0.11</p></div>
<p>
<a href="http://gkiagia.wordpress.com/">George Kiagiadakis</a> kept hammering away at the <a href="http://gstreamer.freedesktop.org/modules/qt-gstreamer.html">qtGStreamer bindings</a>, working both on a new release of the bindings for the GStreamer 0.10 series, but also some preparatory work for 0.11.</p>
<p>
In addition to the application work, <a href="http://en.wikipedia.org/wiki/Wim_Taymans">Wim Taymans</a>, <a href="http://lwn.net/Articles/464536/">Tim-Phillip Müller</a> and <a href="https://twitter.com/#!/sdroege_">Sebastian Dröge</a> from <a href="http://www.collabora.com">Collabora</a> did a lot of core GStreamer clean ups and improvements in addition to providing a lot of assistance, bugfixing and advice for the people doing application porting. All critical items are now sorted in 0.11 although there are some nice to have’s still on the radar, and Wim plans on putting out some new releases next week, to kickstart the countdown to the first 1.0 release.</p>
<p>
As for my own little pet project <a href="http://www.linuxrising.org">Transmageddon</a>, it is quite far along now, with both manually configured re-encodes and profile re-encodes working. Still debugging remuxing though and I am also waiting for the deinterlacer to get ported to re-enable deinterlacing in the new version. For a screenshot take a look at the one I posted in my <a href="http://blogs.gnome.org/uraeus/files/2012/01/transmageddon-hackfest.png">previous blogpost</a>.</p></div>
    </content>
    <updated>2012-01-29T17:17:39Z</updated>
    <category term="Collabora"/>
    <category term="General"/>
    <category term="GNOME"/>
    <category term="GStreamer"/>
    <category term="Transmageddon"/>
    <category term="fluendo"/>
    <category term="gstreamer"/>
    <category term="malaga"/>
    <category term="transmageddon"/>
    <author>
      <name>uraeus</name>
    </author>
    <source>
      <id>http://blogs.gnome.org/uraeus</id>
      <link href="http://blogs.gnome.org/uraeus/feed/" rel="self" type="application/atom+xml"/>
      <link href="http://blogs.gnome.org/uraeus" rel="alternate" type="text/html"/>
      <subtitle>GStreamer and Collabora news and more</subtitle>
      <title>Christian Schaller</title>
      <updated>2012-02-05T12:45:17Z</updated>
    </source>
  </entry>

  <entry xml:lang="en">
    <id>http://blogs.gnome.org/uraeus/?p=1797</id>
    <link href="http://blogs.gnome.org/uraeus/2012/01/26/gstreamer-hackfest-in-malaga-update/" rel="alternate" type="text/html"/>
    <title>Christian Schaller: GStreamer Hackfest in Malaga update</title>
    <summary>Things have been going really well here at the GStreamer Hackfest in Malaga. Thanks to the help of Ara and Yaiza from Nido Malaga, we have a great venue in downtown Malaga and they have also helped us greatly with sorting out food. We have a great group of people here and are making great [...]</summary>
    <content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><p>Things have been going really well here at the <a href="http://gstreamer.freedesktop.org/wiki/GStreamerHackfest2012">GStreamer Hackfest</a> in Malaga. Thanks to the help of Ara and Yaiza from <a href="http://www.nidomalaga.com/">Nido Malaga</a>, we have a great venue in downtown Malaga and they have also helped us greatly with sorting out food.<br/>
We have a great group of people here and are making great progress, and by tomorrow I hope we will have screenshots of quite a few applications running with GStreamer 0.11, for instance both <a href="http://projects.gnome.org/rhythmbox/">Rhythmbox</a> and <a href="http://www.jokosher.org">Jokosher</a> for instance is already screen shootable, if not fully functional <img alt=":)" class="wp-smiley" src="http://blogs.gnome.org/uraeus/wp-content/mu-plugins/tango-smilies/tango/face-smile.png"/><br/>
</p><div class="wp-caption alignleft" id="attachment_1798" style="width: 410px;"><a href="http://blogs.gnome.org/uraeus/files/2012/01/hackfest-malaga-2012.jpg"><img alt="GStreamer Hackfest Malaga 2012" class="size-full wp-image-1798" height="256" src="http://blogs.gnome.org/uraeus/files/2012/01/hackfest-malaga-2012.jpg" width="400"/></a><p class="wp-caption-text">GStreamer Hackfest Malaga 2012</p></div><p/>
<p>Also making good progress on <a href="http://www.linuxrising.org">Transmageddon</a>, even if the move to GObject Introspection bindings are making things a bit more complicated. Screenshot below of the progress so far.</p>
<div class="wp-caption alignleft" id="attachment_1800" style="width: 564px;"><a href="http://blogs.gnome.org/uraeus/files/2012/01/transmageddon-hackfest.png"><img alt="Transmageddon at Hackfest in Malaga 2012" class="size-full wp-image-1800" height="558" src="http://blogs.gnome.org/uraeus/files/2012/01/transmageddon-hackfest.png" width="554"/></a><p class="wp-caption-text">Transmageddon at Hackfest in Malaga 2012</p></div>
<p>Also a big thanks to <a href="http://www.fluendo.com">Fluendo</a> who is sponsoring the lunches at the hackfest and <a href="http://www.collabora.com">Collabora</a> who is sponsoring tonight’s dinner. Ensuring that no hacker is left hungry during this hackfest.</p>
<p><b>Update: Yaiza took <a href="https://www.facebook.com/media/set/?set=a.311337368901837.64954.240994329269475&amp;type=1">these photos from the hackfest</a></b></p></div>
    </content>
    <updated>2012-01-26T14:12:42Z</updated>
    <category term="Collabora"/>
    <category term="General"/>
    <category term="GNOME"/>
    <category term="GStreamer"/>
    <category term="Transmageddon"/>
    <category term="fluendo"/>
    <category term="gstreamer"/>
    <category term="malaga"/>
    <category term="transmageddon"/>
    <author>
      <name>uraeus</name>
    </author>
    <source>
      <id>http://blogs.gnome.org/uraeus</id>
      <link href="http://blogs.gnome.org/uraeus/feed/" rel="self" type="application/atom+xml"/>
      <link href="http://blogs.gnome.org/uraeus" rel="alternate" type="text/html"/>
      <subtitle>GStreamer and Collabora news and more</subtitle>
      <title>Christian Schaller</title>
      <updated>2012-02-05T12:45:18Z</updated>
    </source>
  </entry>

  <entry xml:lang="en">
    <id>http://blogs.gnome.org/uraeus/?p=1795</id>
    <link href="http://blogs.gnome.org/uraeus/2012/01/25/interview-with-arun-raghavan-about-pulseaudio/" rel="alternate" type="text/html"/>
    <title>Christian Schaller: Interview with Arun Raghavan about PulseAudio</title>
    <summary>With all the talk generated by Arun Raghavans blog post comparing PulseAudio and Audioflinger I thought it would be good to follow up with an interview with Arun about the latest developments in PulseAudio and the way forward for the project. You can find the PulseAudio interview here. I also made a new page listing [...]</summary>
    <content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><p>With all the talk generated by <a href="http://arunraghavan.net/2012/01/pulseaudio-vs-audioflinger-fight/">Arun Raghavans blog post comparing PulseAudio and Audioflinger</a> I thought it would be good to follow up with an interview with Arun about the latest developments in PulseAudio and the way forward for the project. You can find <a href="http://www.collabora.com/about/pulseaudio-interview/">the PulseAudio interview here</a>. I also made a new page listing all the <a href="http://www.collabora.com/about/interviews/">Collabora developer interviews done so far</a>. Enjoy <img alt=":)" class="wp-smiley" src="http://blogs.gnome.org/uraeus/wp-content/mu-plugins/tango-smilies/tango/face-smile.png"/> </p></div>
    </content>
    <updated>2012-01-25T15:45:33Z</updated>
    <category term="Collabora"/>
    <category term="GNOME"/>
    <category term="GStreamer"/>
    <category term="Streaming"/>
    <category term="gstreamer"/>
    <category term="pulseaudio"/>
    <author>
      <name>uraeus</name>
    </author>
    <source>
      <id>http://blogs.gnome.org/uraeus</id>
      <link href="http://blogs.gnome.org/uraeus/feed/" rel="self" type="application/atom+xml"/>
      <link href="http://blogs.gnome.org/uraeus" rel="alternate" type="text/html"/>
      <subtitle>GStreamer and Collabora news and more</subtitle>
      <title>Christian Schaller</title>
      <updated>2012-02-05T12:45:18Z</updated>
    </source>
  </entry>

  <entry xml:lang="en">
    <id>http://blogs.gnome.org/uraeus/?p=1789</id>
    <link href="http://blogs.gnome.org/uraeus/2012/01/23/gstreamer-hackfest-in-malaga/" rel="alternate" type="text/html"/>
    <title>Christian Schaller: GStreamer Hackfest in Malaga</title>
    <summary>Tomorrow I will be heading off to attend the GStreamer Application Porting Hackfest in Malaga, Spain. I think we have managed to pull together an absolutely incredible group of people for this event and I have great hopes that by next weekend we will have squashed a ton of bugs in GStreamer 0.11/1.0 and also [...]</summary>
    <content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><p>Tomorrow I will be heading off to attend the <a href="http://gstreamer.freedesktop.org/wiki/GStreamerHackfest2012">GStreamer Application Porting Hackfest</a> in Malaga, Spain. I think we have managed to pull together an absolutely incredible group of people for this event and I have great hopes that by next weekend we will have squashed a ton of bugs in GStreamer 0.11/1.0 and also have initial ports of a long range of important applications and bindings. This is the first time in GStreamer history that we are trying to hold a hackfest focused on application developers, but hopefully it will be the first of many and that they can become a good way for the core GStreamer community and the application development community to interact and collaborate more closely.</p>
<p>Also want to say a special thanks to the community members attending the event on their own and also to the companies sending their employees to the hackfest; <a href="http://www.collabora.com">Collabora</a>, <a href="http://www.fluendo.com">Fluendo</a>, <a href="http://www.flumotion.com">Flumotion</a> and  <a href="http://www.igalia.com/">Igalia</a> and finally a special thanks to the <a href="http://foundation.gnome.org/">GNOME Foundation</a> for sponsoring some of the attendees.</p>
<p>Hopefully I will be able to post some screenshots of a fully functional GStreamer 1.0 <a href="http://www.linuxrising.org">Transmageddon</a> next weekend <img alt=":)" class="wp-smiley" src="http://blogs.gnome.org/uraeus/wp-content/mu-plugins/tango-smilies/tango/face-smile.png"/> </p></div>
    </content>
    <updated>2012-01-23T09:39:45Z</updated>
    <category term="Collabora"/>
    <category term="General"/>
    <category term="GNOME"/>
    <category term="GStreamer"/>
    <category term="Transmageddon"/>
    <category term="gstreamer"/>
    <category term="transmageddon"/>
    <author>
      <name>uraeus</name>
    </author>
    <source>
      <id>http://blogs.gnome.org/uraeus</id>
      <link href="http://blogs.gnome.org/uraeus/feed/" rel="self" type="application/atom+xml"/>
      <link href="http://blogs.gnome.org/uraeus" rel="alternate" type="text/html"/>
      <subtitle>GStreamer and Collabora news and more</subtitle>
      <title>Christian Schaller</title>
      <updated>2012-02-05T12:45:18Z</updated>
    </source>
  </entry>

  <entry>
    <id>tag:blogger.com,1999:blog-5305500004159797797.post-3008986265865194016</id>
    <link href="http://blog.rburchell.com/feeds/3008986265865194016/comments/default" rel="replies" type="application/atom+xml"/>
    <link href="http://blog.rburchell.com/2012/01/qfilesystemwatcher-internals-in-qt-5.html#comment-form" rel="replies" type="text/html"/>
    <link href="http://www.blogger.com/feeds/5305500004159797797/posts/default/3008986265865194016" rel="edit" type="application/atom+xml"/>
    <link href="http://www.blogger.com/feeds/5305500004159797797/posts/default/3008986265865194016" rel="self" type="application/atom+xml"/>
    <link href="http://blog.rburchell.com/2012/01/qfilesystemwatcher-internals-in-qt-5.html" rel="alternate" type="text/html"/>
    <title>Robin Burchell: QFileSystemWatcher internals in Qt 5</title>
    <content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml">Just thought I'd share some details on some of the recent changes I've pushed to Qt 5 a few weeks ago. (Yes, this post is rather overdue, I've been a bit slack with writing it). If you were in Tampere when I gave a short, completely underprepared Q&amp;A on Qt 5 a few days ago, this won't be news to you, but I will go into a bit more detail.<br/><div><br/><b>tl;dr</b>, all in all, a lot of code was deleted, and things still function more or less the same, except a bit better. That's quite a common story for Qt 5, I hope... :)<br/><br/></div><div>First of all, platform support: as with Qt 5 itself, Symbian support is no longer a goal. Since I wanted to make some changes to internals, and wasn't able to even remotely come close to building the Symbian code, it was removed.<br/><br/>On Linux, the (ancient, and no longer used by default) dnotify backend also met its maker. Since inotify has been around for some 6-7 years, it was about time, especially as the dnotify backend had some interesting bugs in behaviour.<br/><br/>The OS X FSEvents backend (also unused for quite some time, due to bugs, and not being a recommended way of working apparently) joined to make for a trinity of dead implementations. OS X's watching is survived by kqueue, which it shares with BSD platforms.<br/><br/>The currently supported backends are:<br/><ul><li>inotify (on Linux)</li><li>kqueue (on BSD and OS X)</li><li>WaitForMultipleObjects on Windows, which I need to become more familiar with. Not having a Windows machine has meant that I'm not really able to do much here...</li></ul><div>Aside from backend support, there were some more 'fun' changes which went in. First, some detail on implementation. Each QFileSystemWatcher has an 'engine' associated with it, which is backend-specific, and does the actual monitoring. The backend is responsible for communicating changes to the 'frontend' QFileSystemWatcher, which then sends the notifications to the API user.</div><div><br/>In the past, QFileSystemWatcher engines used to be run in a thread. I'm not sure why this was done originally, but it pretty much never made much sense - monitoring file changes is not a particularly intensive operation, so this is just a waste of resources (thread stack, time to start the thread, etc) - which was compounded by this being a thread <b>per engine</b>, meaning that if you have a few different libraries monitoring files, they'd each start their own thread.</div><div><br/></div><div>Another nasty side effect of this thread was resource consumption caused by monitoring. If you monitored a large number of paths, but couldn't consume events faster than the OS was throwing them at you, then that engine thread would happily sit there and keep on reading them and turning them into Qt signals for the QFileSystemWatcher/user code. But because that code was on a different thread, and unable to keep up, you'd just keep getting more, and more, and more signals, and memory usage would keep growing and growing.</div><div><br/>This thread has now been removed, so changes are implicitly rate-limited to the thread the QFileSystemWatcher lives in, meaning that all of these are no longer a problem. Kudos should also go to Bradley Hughes for fixing a few issues which I missed on platforms other than Linux after it was integrated.</div><br/>Brad also took this work a step further: QFileSystemWatcher has never been documented as being thread-safe, but the engines may have happened to be more or less thread-safe thanks to living on a different thread to the QFileSystemWatcher, through mutexing. One part inside Qt itself actually needed this for autotests to function correctly, too: QFileSystemModel. He fixed this requirement, and was thus able to remove the mutexes from the engines. Thanks!<br/><br/>I'd also like to thank Brad, João Abecasis, and anyone I've forgotten for helping to review these changes and get them integrated.<br/><br/>(One thing I neglected to mention above - the thread story is a little more complicated on Windows. Windows still has threads inside the engine (although the engine <i>itself</i> is no longer a thread, so there's still one less). This is necessary because WaitForMultipleObjects can only process up to MAXIMUM_WAIT_OBJECT handles at a time, unless you use multiple threads to do the monitoring, so that's exactly what it does. It spawns multiple threads on-demand as soon as it can't find a thread with a spare slot. But this is nothing new.)</div><div class="blogger-post-footer"><img alt="" height="1" src="https://blogger.googleusercontent.com/tracker/5305500004159797797-3008986265865194016?l=blog.rburchell.com" width="1"/></div></div>
    </content>
    <updated>2012-01-22T11:44:06Z</updated>
    <published>2012-01-22T11:42:00Z</published>
    <category scheme="http://www.blogger.com/atom/ns#" term="meego"/>
    <category scheme="http://www.blogger.com/atom/ns#" term="qt"/>
    <category scheme="http://www.blogger.com/atom/ns#" term="qt5"/>
    <category scheme="http://www.blogger.com/atom/ns#" term="kde"/>
    <category scheme="http://www.blogger.com/atom/ns#" term="C++"/>
    <category scheme="http://www.blogger.com/atom/ns#" term="maemo"/>
    <category scheme="http://www.blogger.com/atom/ns#" term="coding"/>
    <author>
      <name>Robin Burchell</name>
      <email>noreply@blogger.com</email>
      <uri>https://profiles.google.com/106934938516166105299</uri>
    </author>
    <source>
      <id>tag:blogger.com,1999:blog-5305500004159797797</id>
      <category term="mobile"/>
      <category term="qt5"/>
      <category term="debugging"/>
      <category term="community"/>
      <category term="oslo"/>
      <category term="github"/>
      <category term="marriage"/>
      <category term="conference"/>
      <category term="pyside"/>
      <category term="software development"/>
      <category term="gnome"/>
      <category term="C++"/>
      <category term="nemo"/>
      <category term="kwin"/>
      <category term="inspircd"/>
      <category term="travel"/>
      <category term="editorwars"/>
      <category term="nokia"/>
      <category term="git"/>
      <category term="python"/>
      <category term="skia"/>
      <category term="ui design"/>
      <category term="symbian"/>
      <category term="connman"/>
      <category term="open governance"/>
      <category term="irc"/>
      <category term="mer"/>
      <category term="performance"/>
      <category term="facebrick"/>
      <category term="collabora"/>
      <category term="qmake"/>
      <category term="work"/>
      <category term="usability"/>
      <category term="rant"/>
      <category term="linux"/>
      <category term="facebook"/>
      <category term="n900"/>
      <category term="wm7"/>
      <category term="oss"/>
      <category term="meego"/>
      <category term="xmpp"/>
      <category term="san francisco"/>
      <category term="conspire"/>
      <category term="norway"/>
      <category term="tutorial"/>
      <category term="graphics"/>
      <category term="QML"/>
      <category term="terry pratchett"/>
      <category term="kde"/>
      <category term="UK"/>
      <category term="life"/>
      <category term="regex"/>
      <category term="maemo"/>
      <category term="meegotouch"/>
      <category term="metablog"/>
      <category term="sql"/>
      <category term="twitter"/>
      <category term="hardware failure"/>
      <category term="coding"/>
      <category term="identi.ca"/>
      <category term="gitorious"/>
      <category term="n8x0"/>
      <category term="qt"/>
      <category term="testing"/>
      <category term="discworld"/>
      <category term="musings"/>
      <category term="vcs"/>
      <category term="kamilla"/>
      <category term="profiling"/>
      <category term="google"/>
      <category term="berlin"/>
      <author>
        <name>Robin Burchell</name>
        <email>noreply@blogger.com</email>
        <uri>http://www.blogger.com/profile/17187474631974601565</uri>
      </author>
      <link href="http://blog.rburchell.com/feeds/posts/default" rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml"/>
      <link href="http://www.blogger.com/feeds/5305500004159797797/posts/default" rel="self" type="application/atom+xml"/>
      <link href="http://blog.rburchell.com/" rel="alternate" type="text/html"/>
      <link href="http://pubsubhubbub.appspot.com/" rel="hub" type="text/html"/>
      <link href="http://www.blogger.com/feeds/5305500004159797797/posts/default?start-index=26&amp;max-results=25" rel="next" type="application/atom+xml"/>
      <subtitle>programmer, n. an organism that can turn caffeine into code.</subtitle>
      <title>i'm special.</title>
      <updated>2012-02-01T00:20:25Z</updated>
    </source>
  </entry>

  <entry xml:lang="en">
    <id>http://kakaroto.homelinux.net/?p=453</id>
    <link href="http://kakaroto.homelinux.net/2012/01/status-update-on-the-ps3-4-0-hen/" rel="alternate" type="text/html"/>
    <title>Youness Alaoui: Status update on the PS3 4.0 HEN</title>
    <summary>Here’s a “quick” status update on the 4.00 HEN (Homebrew ENabler) for PS3. Following my clarifications from almost 2 months ago here, there has been a lot of progress. We have not been slacking off, we’re a group of about 10 developers working together for the last 2 months, for sometimes 15 hours everyday in [...]</summary>
    <content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><p>Here’s a “quick” status update on the 4.00 HEN (Homebrew ENabler) for PS3.</p>
<p>Following my clarifications from almost 2 months ago <a href="http://kakaroto.homelinux.net/2011/11/clarifications-about-3-73-jailbreak/">here</a>, there has been a lot of progress. We have not been slacking off, we’re a group of about 10 developers working together for the last 2 months, for sometimes 15 hours everyday in order to bring back homebrew support to the latest version of the PS3.</p>
<p>There are three major parts to the HEN, first, getting the packages to install on the PS3, that part is done, completed, tested, debugged, etc.. the second part is to get the apps to run, that one still has major issues… the last part is something I will not discuss for now (it’s a surprise) but it’s about 60% to 70% done (and it has nothing to do with peek&amp;poke and has nothing to do with backup managers or anything like that. This is and will stay a piracy-free solution for the PS3).</p>
<p>Now, running apps is the biggest challenge that we’ve been working on for the past 2 months. As some of you know, if you’ve been following me on <a href="http://twitter.com/KaKaRoToKS">Twitter</a>, we originally had hoped for Mathieulh to give us the “npdrm hash algorithm” that was necessary to run the apps, but he was reluctant, he kept doing his usual whore so people would kiss his feet (or something else) so he’d feel good about himself. But in the end, he said that he refuses to give us the needed “npdrm hash algorithm” to make it work… So what I initially thought would be “this will be released next week” ended up taking a lot more time than expected, and we’re still nowhere near ready to make it work.</p>
<p>Mathieulh kept tossing his usual “riddles” which he thinks are “very helpful for those who have a brain”, and which pisses off anyone who actually does… so he told us that the solution to all our problems was to look in <em>appldr</em> of the 3.56 firmware.. and that it was something <em>lv1</em> was sending <em>appldr</em> which made the “hash check” verified or not… so we spent one month and a lot of sweat and after killing a few of our brain cells out of exhaustion, we finally concluded that it was all bullshit. After one month of reading assembly code and checking and double-checking our results, we finally were able to confirm that that hash algorithm was NOT in the 3.56 firmware like he told us (at all).</p>
<p>He said  that it was an <a href="http://en.wikipedia.org/wiki/Advanced_Encryption_Standard?banner=no">AES</a> <a href="http://en.wikipedia.org/wiki/OMAC_(cryptography)?banner=no">OMAC</a> hash, but after tracking all the uses of the OMAC functions in appldr, we found that it was not used for the “hash”…  he then said “oh, I meant <a href="http://en.wikipedia.org/wiki/Hmac?banner=no">HMAC</a>“, so we do that again and again come up with the same conclusion, then we’re sure it’s not in <em>appldr</em>, and then he says “ah no, it’s in <em>lv1</em>“.. have a look for yourself to what he decided to write : <a href="http://www.ps3devwiki.com/index.php?title=Talk:KaKaRoTo_Kind_of_%C2%B4Jailbreak%C2%B4">http://www.ps3devwiki.com/index.php?title=Talk:KaKaRoTo_Kind_of_%C2%B4Jailbreak%C2%B4</a></p>
<p>That happened after the huge twitter fight I had with him for being his usual arrogant ass and claiming that he “shared” something (For your information, the code that he shared was not his own, I have proof of that too (can’t show you the proof because even if I don’t respect him, I gave him my word to not share what he gave me, and I respect my word) since he forgot to remove the name of the original developer from one of the files… also it was completely useless and was not used at all, just made me waste a day reading the crappy undocumented code. So why is he still trying to force his “advice” through these riddles even after we had that fight? Well to sabotage us and make us lose all those months of hard work!</p>
<p>So anyways, we had all accepted that Mathieulh was full of shit (we knew before, but we gave him the benefit of the doubt) and decided to continue working without considering any of his useless riddles. So we then tried to exploit/decrypt the 3.60+ firmware in order to get the algorithm from there.</p>
<p>Now, a few more weeks later, we finally have succeeded in fully understanding that missing piece from the “npdrm hash algorithm”,  and here it is for everyone’s pleasure with some prerequisite explanation :</p>
<p>A game on the PS3 is an executable file in a format called a “<a href="http://www.ps3devwiki.com/index.php?title=SELF_File_Format_and_Decryption">SELF</a>“file (kind of like .exe on windows), those “self” files are cryptographically signed and encrypted.. For PSN games (games that do not run from a bluray disc), they need to have an additional security layer called “NPDRM”. So a “npdrm self” is basically an executable that is encrypted and signed, then re-encrypetd again with some additional information. On 3.55 and lower, we were able to encrypt and sign our own self files so they would look like original (made by sony) “npdrm self” files, and the PS3 would run them without problem. However, it wasn’t really like an original file.. a real NPDRM self file had some additional information that the PS3 simply ignored, it did not check for that information, so we could put anything in it, and it worked. Since the 3.60 version, the PS3 now also validates this additional information, so it can now differentiate between NPDRM self files created by sony and the ones that we create ourselves for homebrew. That’s the “npdrm hash algorithm” that we have been trying to figure out, because once we can duplicate that information in the proper manner, then the PS3 will again think that those files are authentic and will let us play them.</p>
<p>Another important point to explain, I said a few times that the files are “signed”.. this means that there is an “<a href="http://en.wikipedia.org/wiki/ECDSA?banner=no">ECDSA</a> signature” in the file which the PS3 can verify. The ECDSA signature is something that allows the PS3 to verify if the file has been modified or not.. it is easy to validate the signature, but impossible to create one without having access to the “private keys” (think of it like a real signature, you can see your dad’s signature and recognize it, but you can’t sign it exactly like him, and you can recognize if your brother tried to forge his signature). So how were we able to sign the self files that were properly authenticated on 3.55? That’s because this “ECDSA signature” is just a very complicated mathematical equation (my head still hurts trying to fully understand it,<del> but I might blog about it in the future and try to explain it in simple terms if people are interested</del> you can learn about it <a href="http://kakaroto.homelinux.net/2012/01/how-the-ecdsa-algorithm-works/">here</a>), and one very important part of this mathematical equation is that you need to use a random number to generate the signature, but Sony had failed and used the same number every time.. by doing that, it was easy to just find the private key (which allows us to forge perfectly the signature) by doing some mathematical equation on it. So to summarize, a “signed file” is a file which is digitally signed with an “ECDSA signature” that cannot be forged, unless you have the “private key” for it, which is impossible to obtain usually, but we were able to obtain it because Sony failed in implementing it properly.</p>
<p>Now, back on topic.. so what is this missing “npdrm hash algorithm” that we need? well it turns out that the “npdrm self” has a second signature, so it’s a “encrypted and signed self file” with an additional layer of security (the NPDRM layer) which re-encrypts it and re-signs it again. That second signature was not verified in 3.55 and is now verified since the 3.60 version of the PS3 firmware.</p>
<p>One important thing to note is that Sony did NOT make the same mistake with this signature, they always used a random number, so it it technically impossible to figure out the private key for it. To be more exact, this is the exact same case as the .pkg packages you install on the PS3, you need to patch the firmware (making it cfw) so that those .pkg files can be installed, and that’s because the .pkg files are signed with an ECDSA signature for which no one was able to get the private key. That’s why we call them “pseudo-retail packages” or “unsigned packages”.</p>
<p>The signature on the NPDRM self file uses the exact same ECDSA curve and the same key as the one used in PS3 .pkg files, so no one has (or could have) the private key for it. What this means is that, even though we finally figured out the missing piece and we now know how the NPDRM self is built, we simply cannot duplicate it.</p>
<p>The reason we wasted 2 months on this is because Mathieulh lied by saying that he can do it.. remember when the 4.0 was out and I said “I can confirm that my method still works” then he also confirmed that his “npdrm hash algorithm” still works too? well he didn’t do anything to confirm, he just lied about it because there is no way that he could have verified it because he doesn’t have the private key.</p>
<p>I said I will provide proof of the lies that Mathieulh gave us, so here they are : he said it’s in 3.56, that was a lie, he said it’s an AES OMAC, that was a lie,  he said it’s an HMAC, that was a lie, he said it’s in appldr, that was a lie, he said it’s in lv1, that was a lie, he said that he can do it, that was a lie, he said that “it takes one hour to figure it out if you have a brain”, that was a lie, he said that he verified it to work on 4.0, that was a lie, he said that he had the algorithm/keys, that was a lie, he said that once we know the algorithm used, we can reproduce it, that was a lie, he kept referring to it as “the hash”, that was wrong. The proof ? It’s an ECDSA signature, it’s not a hash (two very different terms for different things), it was verified by vsh.self, it was not in lv2, or lv1, or appldr, and the private key is unaccessible, so there is no way he could build his own npdrm self files. Now you know the real reason why he refused to “share” what he had.. it’s because he didn’t have it…</p>
<p>So why do all this? was it because his arrogance didn’t allow him to admit not knowing something? or was it because he wanted to make us lose all this time? To me, it looks like pure sabotage, it was misleading information to steer us away from the real part of the code that holds the solution…. That is of course, if we are kind enough to assume that he knew what/where it was in the first place.  In the end, he wasn’t smart enough to only lie about things that we could not verify.. now we know (we always knew, but now we have proof to back it) that he’s a liar, and I do not think that anyone will believe his lies anymore.</p>
<p> </p>
<p>Enough talking about liars and drama queens, back to the 4.0 HEN solution… so what next? well, we now know that we can’t sign the file, so we can’t run our apps on 3.60+ (it can work on 3.56 though). What we will do is look for a different way, a completely new exploit that would allow the files we install to actual run on the PS3. We will also be looking for possible “signature collisions” and for that we will need the help of the community, hopefully there is a collision (same random number used twice) which will allow us to calculate the private key, and if that happens, then we can move forward with a release.</p>
<p>When will the “jailbreak” be released? If I knew, I’d tell you, but I don’t know.. I would have said in last november, then december, then before christmas, then before new year, etc… but as you can see, it’s impossible to predict what we will find.. we might get lucky and have it ready in a couple of days, or we may not and it will not be ready for another couple of months.. so all you need to do is : BE PATIENT (and please stop asking me about an estimated release date)!</p>
<p>I would like to thank the team who helped on this task for all this time and who never got discouraged, and I’d like to thank an anonymous contributor who recently joined us and who was instrumental in figuring it all out. We all believe that freedom starts with knowledge, and that knowledge should be open and available to all, that is why we are sharing this information with the world. We got the confirmation (by finding the public key used and verifying the signatures) yesterday and since sharing this information will not help Sony in any way to block our efforts in a future release, we have decided to share it with you.  We believe in transparency, we believe in openness, we believe in a free world, and we want you to be part of it.</p>
<p>If you want to know more about this ECDSA signature algorithm, <strong>I tried to explain it in a blog post <a href="http://kakaroto.homelinux.net/2012/01/how-the-ecdsa-algorithm-works/">here</a>, also, you can </strong>read <a href="https://engineering.purdue.edu/kak/compsec/NewLectures/Lecture14.pdf">this interesting paper</a> that explains it in detail, and you can also watch Team Fail0verflow’s <a href="http://www.youtube.com/watch?v=5E0DkoQjCmI">CCC presentation</a> that first explained Sony’s mistake in their implementation, which made custom firmwares possible.</p>
<p> </p>
<p>Thanks for reading,</p>
<p>KaKaRoTo</p>
<p> </p></div>
    </content>
    <updated>2012-01-19T05:00:34Z</updated>
    <category term="Development"/>
    <category term="PS3"/>
    <category term="4.00"/>
    <category term="exploit"/>
    <category term="firmware"/>
    <category term="HEN"/>
    <category term="homebrew"/>
    <category term="jailbreak"/>
    <category term="status"/>
    <author>
      <name>kakaroto</name>
    </author>
    <source>
      <id>http://kakaroto.homelinux.net</id>
      <link href="http://kakaroto.homelinux.net/feed/" rel="self" type="application/atom+xml"/>
      <link href="http://kakaroto.homelinux.net" rel="alternate" type="text/html"/>
      <subtitle>Open your communications!</subtitle>
      <title>KaKaRoTo's Blog</title>
      <updated>2012-02-05T12:46:20Z</updated>
    </source>
  </entry>

  <entry xml:lang="en">
    <id>http://blogs.gnome.org/wjjt/?p=794</id>
    <link href="http://blogs.gnome.org/wjjt/2012/01/18/bustle-0-4-0-push-button-receive-d-bus-traffic/" rel="alternate" type="text/html"/>
    <title>Will Thompson: Bustle 0.4.0: push button, receive D-Bus traffic</title>
    <summary>Breaking with the “every six months or so maybe” release tradition, here’s the second Bustle release of the month. What’s the new hotness this time? You can record D-Bus traffic by just clicking File → New, and watch the diagram being drawn before your very eyes. After years of on-off development, Bustle can finally liberate [...]</summary>
    <content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><p>Breaking with the “every six months or so maybe” release tradition, here’s the second Bustle release of the month. What’s the new hotness this time? You can record D-Bus traffic by just clicking <i>File → New</i>, and watch the diagram being drawn before your very eyes. After years of on-off development, Bustle can finally liberate you from needing to open a terminal to monitor D-Bus traffic<sup><a class="footnote-link footnote-identifier-link" href="http://blogs.gnome.org/wjjt/2012/01/18/bustle-0-4-0-push-button-receive-d-bus-traffic/#footnote_0_794" id="identifier_0_794" title="&amp;#8220;Occupy dbus-monitor&amp;#8221; is arguably an unexciting slogan.">1</a></sup>. Here’s a super-brief <a href="http://willthompson.co.uk/bustle/0.4.0-video.webm" title="WebM video, 62 seconds">video tour</a>.</p>
<p><a href="http://blogs.gnome.org/wjjt/files/2012/01/shell-shell-shell-shell.png"><img alt="Bustle 0.4.0 screenshot" class="center" height="350" src="http://blogs.gnome.org/wjjt/files/2012/01/shell-shell-shell-shell-thumb.png" width="422"/></a></p>
<p>Grab it for <a href="http://willthompson.co.uk/bustle/releases/0.4.0/bustle-0.4.0-x86_64.tar.bz2">x86_64</a> or <a href="http://willthompson.co.uk/bustle/releases/0.4.0/bustle-0.4.0-i486.tar.bz2">i486</a> today! Unlike the previous release, these work on both Debian and Fedora and have a strong change of working on pretty much anything with a modern-ish Glib and Gtk+2<sup><a class="footnote-link footnote-identifier-link" href="http://blogs.gnome.org/wjjt/2012/01/18/bustle-0-4-0-push-button-receive-d-bus-traffic/#footnote_1_794" id="identifier_1_794" title="&#x2026;inasmuch as any version of Gtk+2 can be called &amp;#8220;modern&amp;#8221;, that is.">2</a></sup>. (Thanks to my fellow <a href="http://www.collabora.com/">Collabora</a>n <a href="http://blog.desmottes.be/">Guillaume</a> for testing these tarballs, and to <a href="http://blogs.gnome.org/wjjt/2012/01/09/bustle-0-3-1/#comment-81">Scott Tsai</a> for his suggestion.) Source and so on at <a href="http://willthompson.co.uk/bustle/">the usual location</a>.</p>
<p>Today’s surprising Bustle-assisted observation is that switching to and from the Shell overview causes the Shell to retrieve <code>/desktop/gnome/shell/windows/button_layout</code> from GConf 29 times. (Presumably that number is proportional to the number of windows I have open?) This was extremely useful for testing the live-logging feature, but is perhaps not ideal in many other ways.</p>
<ol class="footnotes"><li class="footnote" id="footnote_0_794">“Occupy <code>dbus-monitor</code>” is arguably an unexciting slogan.</li><li class="footnote" id="footnote_1_794">…inasmuch as any version of Gtk+2 can be called “modern”, that is.</li></ol></div>
    </content>
    <updated>2012-01-18T11:56:05Z</updated>
    <category term="Uncategorized"/>
    <author>
      <name>Will Thompson</name>
    </author>
    <source>
      <id>http://blogs.gnome.org/wjjt</id>
      <link href="http://blogs.gnome.org/wjjt/feed/" rel="self" type="application/atom+xml"/>
      <link href="http://blogs.gnome.org/wjjt" rel="alternate" type="text/html"/>
      <subtitle>wjt</subtitle>
      <title>This is not your bugtracker.</title>
      <updated>2012-02-05T12:45:35Z</updated>
    </source>
  </entry>

  <entry xml:lang="en">
    <id>http://pcapriotti.wordpress.com/?p=176</id>
    <link href="http://pcapriotti.wordpress.com/2012/01/18/reinversion-of-control-with-continuations/" rel="alternate" type="text/html"/>
    <title>Paolo Capriotti: Reinversion of control with continuations</title>
    <summary type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml">In my last post I mentioned how it is possible to achieve a form of "reinversion of control" by using (green) threads. Some commenters noted how this is effectively a solved problem, as demonstrated for example by Erlang, as well as the numerous variations on CSP currently gaining a lot of popularity. I don’t disagree [...]<img alt="" border="0" height="1" src="http://stats.wordpress.com/b.gif?host=pcapriotti.wordpress.com&amp;blog=806312&amp;post=176&amp;subd=pcapriotti&amp;ref=&amp;feed=1" width="1"/></div>
    </summary>
    <content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><p>In my <a href="http://pcapriotti.wordpress.com/2012/01/10/from-event-driven-programming-to-frp/">last post</a> I mentioned how it is possible to achieve a form of "reinversion of control" by using (green) threads. Some commenters noted how this is effectively a solved problem, as demonstrated for example by Erlang, as well as the numerous variations on CSP currently gaining a lot of popularity.</p>
<p>I don’t disagree with that, but it’s just not the point of this series of posts. This is about understanding the computational structure of event-driven code, and see how it’s possible to transform it into a less awkward form <strong>without</strong> introducing concurrency (or at least not in the traditional sense of the term).</p>
<p>Using threads to solve what is essentially a control flow problem is cheating. And you pay in terms of increased complexity, and code which is harder to reason about, since you introduced a whole lot of interleaving opportunities and possible race conditions. Using a non-preemptive concurrency abstraction with manual yield directives (like my <a href="https://gist.github.com/1086172">Python gist</a> does) will solve that, but then you’d have to think of how to schedule your coroutines, so that is also not a complete solution.</p>
<h2 id="programmable-semicolons">Programmable semicolons</h2>
<p>To find an alternative to the multitask-based approach, let’s focus on two particular lines of the last example:</p>
<pre style="vertical-align: baseline; border: none; margin: 0; padding: 0;"><code class="sourceCode python">    reply = start_request();
    get_data(reply)</code></pre>
<p>where I added an explicit semicolon at the end of the first line. A semicolon is an important component of an imperative program, even though, syntactically, it is often omitted in languages like Python. It corresponds to the <em>sequencing</em> operator: execute the instruction on the left side, then pass the result to the right side and execute that.</p>
<p>If the instruction on the left side corresponds to an asynchronous operation, we want to alter the meaning of sequencing. Given a sequence of statements of the form</p>
<pre style="vertical-align: baseline; border: none; margin: 0; padding: 0;"><code class="sourceCode c">    x = A(); B(x)</code></pre>
<p>we want to interpret that as: call <code>A</code>, then return control back to the main loop; when <code>A</code> is finished, bind its result to <code>x</code>, then run <code>B</code>.</p>
<p>So what we want is to be able to override the sequencing operator: we want <strong>programmable semicolons</strong>.</p>
<h2 id="the-continuation-monad">The continuation monad</h2>
<p>Since it is often really useful to look at the types of functions to understand how exactly they fit together, we’ll leave Python and start focusing on Haskell for our running example.</p>
<p>We can make a very important observation immediately by looking at the type of the callback registration function that our framework offers, and try to interpret it in the context of controlled side effects (i.e. the <code>IO</code> monad). For Qt, it could look something like:</p>
<table class="sourceCode">
<tbody><tr>
<td style="text-align: right; color: #AAAAAA; padding-right: 5px; padding-left: 5px;">
<pre style="vertical-align: baseline; border: none; margin: 0; padding: 0;">1</pre>
</td>
<td class="sourceCode">
<pre style="vertical-align: baseline; border: none; margin: 0; padding: 0;"><code class="sourceCode haskell"><span style="color: #007020;">    connect </span><span style="color: #007020;">::</span> <span style="color: #902000;">Object</span> <span style="color: #007020;">-&gt;</span> <span style="color: #902000;">String</span> <span style="color: #007020;">-&gt;</span> (a <span style="color: #007020;">-&gt;</span> <span style="color: #902000;">IO</span> ()) <span style="color: #007020;">-&gt;</span> <span style="color: #902000;">IO</span> ()</code></pre>
</td>
</tr>
</tbody></table>
<p>to be used, for example, like this:</p>
<table class="sourceCode">
<tbody><tr>
<td style="text-align: right; color: #AAAAAA; padding-right: 5px; padding-left: 5px;">
<pre style="vertical-align: baseline; border: none; margin: 0; padding: 0;">1
2</pre>
</td>
<td class="sourceCode">
<pre style="vertical-align: baseline; border: none; margin: 0; padding: 0;"><code class="sourceCode haskell">    connect httpReply <span style="color: #4070a0;">"finished()"</span> <span style="color: #06287e;">$</span> \_ <span style="color: #007020;">-&gt;</span> <span style="color: #007020; font-weight: bold;">do</span>
        <span style="color: #06287e;">putStrLn</span> <span style="color: #4070a0;">"request finished"</span></code></pre>
</td>
</tr>
</tbody></table>
<p>so the first argument is the object, the second is the C++ signature of the signal, and the third is a callback that will be invoked by the framework whenever the specified signal is emitted. Now, we can get rid of all the noise of actually connecting to a signal, and define a type representing just the act of registering a callback.</p>
<table class="sourceCode">
<tbody><tr>
<td style="text-align: right; color: #AAAAAA; padding-right: 5px; padding-left: 5px;">
<pre style="vertical-align: baseline; border: none; margin: 0; padding: 0;">1</pre>
</td>
<td class="sourceCode">
<pre style="vertical-align: baseline; border: none; margin: 0; padding: 0;"><code class="sourceCode haskell">    <span style="color: #007020; font-weight: bold;">newtype</span> <span style="color: #902000;">Event</span> a <span style="color: #06287e;">=</span> <span style="color: #902000;">Event</span> {<span style="color: #007020;"> on </span><span style="color: #007020;">::</span> (a <span style="color: #007020;">-&gt;</span> <span style="color: #902000;">IO</span> ()) <span style="color: #007020;">-&gt;</span> <span style="color: #902000;">IO</span> () }</code></pre>
</td>
</tr>
</tbody></table>
<p>Doesn’t that look familiar? It is <strong>exactly</strong> the <a href="http://hackage.haskell.org/packages/archive/mtl/latest/doc/html/Control-Monad-Cont.html">continuation monad transformer</a> applied to the <code>IO</code> monad! The usual monad instance for <code>ContT</code> perfectly captures the semantics we are looking for:</p>
<table class="sourceCode">
<tbody><tr>
<td style="text-align: right; color: #AAAAAA; padding-right: 5px; padding-left: 5px;">
<pre style="vertical-align: baseline; border: none; margin: 0; padding: 0;">1
2
3
4
5</pre>
</td>
<td class="sourceCode">
<pre style="vertical-align: baseline; border: none; margin: 0; padding: 0;"><code class="sourceCode haskell">    <span style="color: #007020; font-weight: bold;">instance</span> <span style="color: #007020; font-weight: bold;">Monad</span> <span style="color: #902000;">Event</span> <span style="color: #007020; font-weight: bold;">where</span>
      <span style="color: #06287e;">return</span> x <span style="color: #06287e;">=</span> <span style="color: #902000;">Event</span> <span style="color: #06287e;">$</span> \k <span style="color: #007020;">-&gt;</span> k x
      e <span style="color: #06287e;">&gt;&gt;=</span> f <span style="color: #06287e;">=</span> <span style="color: #902000;">Event</span> <span style="color: #06287e;">$</span> \k <span style="color: #007020;">-&gt;</span>
        on e <span style="color: #06287e;">$</span> \x <span style="color: #007020;">-&gt;</span>
          on (f x) k</code></pre>
</td>
</tr>
</tbody></table>
<p>The return function simply calls the callback immediately with the provided value, no actual connection is performed. The bind operator represents our custom semicolon: we connect to the first event, and when that fires, we take the value it yielded, apply it to <code>f</code>, and connect to the resulting event.</p>
<p>Now we can actually translate the Python code of the previous example to Haskell:</p>
<table class="sourceCode">
<tbody><tr>
<td style="text-align: right; color: #AAAAAA; padding-right: 5px; padding-left: 5px;">
<pre style="vertical-align: baseline; border: none; margin: 0; padding: 0;">1
2
3
4
5
6
7
8
9
10</pre>
</td>
<td class="sourceCode">
<pre style="vertical-align: baseline; border: none; margin: 0; padding: 0;"><code class="sourceCode haskell"><span style="color: #007020;">    ex </span><span style="color: #007020;">::</span> <span style="color: #902000;">Event</span> ()
    ex <span style="color: #06287e;">=</span> forever <span style="color: #06287e;">$</span> <span style="color: #007020; font-weight: bold;">do</span>
      result <span style="color: #007020;">&lt;-</span> untilRight <span style="color: #06287e;">.</span> <span style="color: #06287e;">replicate</span> <span style="color: #40a070;">2</span> <span style="color: #06287e;">$</span> <span style="color: #007020; font-weight: bold;">do</span>
        reply <span style="color: #007020;">&lt;-</span> startRequest
        <span style="color: #06287e;">either</span> (<span style="color: #06287e;">return</span> <span style="color: #06287e;">.</span> <span style="color: #007020; font-weight: bold;">Left</span>) (liftM <span style="color: #007020; font-weight: bold;">Right</span> <span style="color: #06287e;">.</span> getData) reply
      <span style="color: #06287e;">either</span> handleError displayData result

<span style="color: #007020;">    untilRight </span><span style="color: #007020;">::</span> <span style="color: #007020; font-weight: bold;">Monad</span> m <span style="color: #007020;">=&gt;</span> [m (<span style="color: #902000;">Either</span> a b)] <span style="color: #007020;">-&gt;</span> m (<span style="color: #902000;">Either</span> a b)
    untilRight [m] <span style="color: #06287e;">=</span> m
    untilRight (m <span style="color: #06287e;">:</span> ms) <span style="color: #06287e;">=</span> m <span style="color: #06287e;">&gt;&gt;=</span> <span style="color: #06287e;">either</span> (<span style="color: #06287e;">const</span> (untilRight ms)) (<span style="color: #06287e;">return</span> <span style="color: #06287e;">.</span> <span style="color: #007020; font-weight: bold;">Right</span>)</code></pre>
</td>
</tr>
</tbody></table>
<p>Again, this could be cleaned up by adding some error reporting functionality into the monad stack.</p>
<p>Implementing the missing functions in terms of <code>connect</code> is straightforward. For example, <code>startRequest</code> will look something like this:</p>
<table class="sourceCode">
<tbody><tr>
<td style="text-align: right; color: #AAAAAA; padding-right: 5px; padding-left: 5px;">
<pre style="vertical-align: baseline; border: none; margin: 0; padding: 0;">1
2
3
4
5</pre>
</td>
<td class="sourceCode">
<pre style="vertical-align: baseline; border: none; margin: 0; padding: 0;"><code class="sourceCode haskell"><span style="color: #007020;">    startRequest </span><span style="color: #007020;">::</span> <span style="color: #902000;">Event</span> (<span style="color: #902000;">Either</span> <span style="color: #902000;">String</span> <span style="color: #902000;">Reply</span>)
    startRequest <span style="color: #06287e;">=</span> <span style="color: #902000;">Event</span> <span style="color: #06287e;">$</span> \k <span style="color: #007020;">-&gt;</span> <span style="color: #007020; font-weight: bold;">do</span>
      reply <span style="color: #007020;">&lt;-</span> AccessManager.get <span style="color: #4070a0;">"http://example.net"</span>
      connect reply <span style="color: #4070a0;">"finished()"</span> <span style="color: #06287e;">$</span> \_ <span style="color: #007020;">-&gt;</span> k (<span style="color: #007020; font-weight: bold;">Right</span> reply)
      connect reply <span style="color: #4070a0;">"error(QString)"</span> <span style="color: #06287e;">$</span> \e <span style="color: #007020;">-&gt;</span> k (<span style="color: #007020; font-weight: bold;">Left</span> e)</code></pre>
</td>
</tr>
</tbody></table>
<p>where I took the liberty of glossing over some irrelevant API details.</p>
<p>How do we run such a monad? Well, the standard <code>runContT</code> does the job:</p>
<table class="sourceCode">
<tbody><tr>
<td style="text-align: right; color: #AAAAAA; padding-right: 5px; padding-left: 5px;">
<pre style="vertical-align: baseline; border: none; margin: 0; padding: 0;">1
2</pre>
</td>
<td class="sourceCode">
<pre style="vertical-align: baseline; border: none; margin: 0; padding: 0;"><code class="sourceCode haskell"><span style="color: #007020;">    runEvent </span><span style="color: #007020;">::</span> <span style="color: #902000;">Event</span> () <span style="color: #007020;">-&gt;</span> <span style="color: #902000;">IO</span> ()
    runEvent e <span style="color: #06287e;">=</span> on <span style="color: #06287e;">$</span> \k <span style="color: #007020;">-&gt;</span> <span style="color: #06287e;">return</span> ()</code></pre>
</td>
</tr>
</tbody></table>
<p>so</p>
<table class="sourceCode">
<tbody><tr>
<td style="text-align: right; color: #AAAAAA; padding-right: 5px; padding-left: 5px;">
<pre style="vertical-align: baseline; border: none; margin: 0; padding: 0;">1</pre>
</td>
<td class="sourceCode">
<pre style="vertical-align: baseline; border: none; margin: 0; padding: 0;"><code class="sourceCode haskell">    runEvent ex</code></pre>
</td>
</tr>
</tbody></table>
<p>will run until the first connection, return control to the main loop, resume when an event occurs, and so on.</p>
<h2 id="conclusion">Conclusion</h2>
<p>I love the simplicity and elegance of this approach, but unfortunately, it is far from a complete solution. So far we have only dealt with "one-shot" events, but what happens when an event fires multiple times? Also, as this is still very imperative in nature, can we do better? Is it possible to employ a more functional style, with emphasis on composability?</p>
<p>I’ll leave the (necessarily partial) answers to those questions for a future post.</p>
<br/>  <a href="http://feeds.wordpress.com/1.0/gocomments/pcapriotti.wordpress.com/176/" rel="nofollow"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/pcapriotti.wordpress.com/176/"/></a> <a href="http://feeds.wordpress.com/1.0/godelicious/pcapriotti.wordpress.com/176/" rel="nofollow"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/pcapriotti.wordpress.com/176/"/></a> <a href="http://feeds.wordpress.com/1.0/gofacebook/pcapriotti.wordpress.com/176/" rel="nofollow"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/pcapriotti.wordpress.com/176/"/></a> <a href="http://feeds.wordpress.com/1.0/gotwitter/pcapriotti.wordpress.com/176/" rel="nofollow"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/pcapriotti.wordpress.com/176/"/></a> <a href="http://feeds.wordpress.com/1.0/gostumble/pcapriotti.wordpress.com/176/" rel="nofollow"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/pcapriotti.wordpress.com/176/"/></a> <a href="http://feeds.wordpress.com/1.0/godigg/pcapriotti.wordpress.com/176/" rel="nofollow"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/pcapriotti.wordpress.com/176/"/></a> <a href="http://feeds.wordpress.com/1.0/goreddit/pcapriotti.wordpress.com/176/" rel="nofollow"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/pcapriotti.wordpress.com/176/"/></a> <img alt="" border="0" height="1" src="http://stats.wordpress.com/b.gif?host=pcapriotti.wordpress.com&amp;blog=806312&amp;post=176&amp;subd=pcapriotti&amp;ref=&amp;feed=1" width="1"/></div>
    </content>
    <updated>2012-01-18T00:03:58Z</updated>
    <category term="frp"/>
    <category term="haskell"/>
    <category term="kde"/>
    <category term="monads"/>
    <category term="programming"/>
    <author>
      <name>pcapriotti</name>
    </author>
    <source>
      <id>http://pcapriotti.wordpress.com</id>
      <logo>http://s2.wp.com/i/buttonw-com.png</logo>
      <link href="http://pcapriotti.wordpress.com/category/kde/feed/?mrss=off" rel="self" type="application/atom+xml"/>
      <link href="http://pcapriotti.wordpress.com" rel="alternate" type="text/html"/>
      <link href="http://pcapriotti.wordpress.com/osd.xml" rel="search" type="application/opensearchdescription+xml"/>
      <link href="http://pcapriotti.wordpress.com/?pushpress=hub" rel="hub" type="text/html"/>
      <subtitle>KDE hacking and more</subtitle>
      <title>Paolo Capriotti » kde</title>
      <updated>2012-02-04T20:30:31Z</updated>
    </source>
  </entry>

  <entry>
    <id>tag:blogger.com,1999:blog-6712537364188853874.post-3659355749886967285</id>
    <link href="http://heisenbugs.blogspot.com/feeds/3659355749886967285/comments/default" rel="replies" type="application/atom+xml"/>
    <link href="http://www.blogger.com/comment.g?blogID=6712537364188853874&amp;postID=3659355749886967285" rel="replies" type="text/html"/>
    <link href="http://www.blogger.com/feeds/6712537364188853874/posts/default/3659355749886967285" rel="edit" type="application/atom+xml"/>
    <link href="http://www.blogger.com/feeds/6712537364188853874/posts/default/3659355749886967285" rel="self" type="application/atom+xml"/>
    <link href="http://heisenbugs.blogspot.com/2010/11/adding-xsub-support-to-gstreamer.html" rel="alternate" type="text/html"/>
    <title>Reynaldo Verdejo: Adding XSUB support to GStreamer</title>
    <content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml">So I have been working on adding <a href="http://wiki.multimedia.cx/index.php?title=XSUB">XSUB</a> support to <a href="http://www.gstreamer.net/">GStreamer</a> as a landing task at my new <a href="http://www.collabora.co.uk/">job</a>. To be honest, I didn't expect it to go as easy. Don't get me wrong, I do know most subpicture encoding schemes are kind of trivial, what I expected to be hard was to work with the GStreamer's plugin API, which was a completely new monster for me. Long history short; with the help of several coworkers and some <a href="http://www.gstreamer.net/data/doc/gstreamer/head/pwg/html/index.html">good documentation</a>, I have <a href="http://people.collabora.co.uk/%7Ereynaldo/patches/201011/0001-First-working-version-of-XSUB-decoding-and-bliting-p.patch">patch</a> ready to be tested. There are still a few things here and there that might benefit from some tweaking but overall the code does its job and its in dire need of some testing love :) Dunno how long it would take for it to land in -bad but for the time being you can follow current development <a href="http://git.collabora.co.uk/?p=user/reynaldo/gst-plugins-bad;a=summary">here</a>.<div><br/></div><div>If you want to test the code you might consider using a pipeline along these lines:</div><div><br/></div><div><blockquote>gst-launch-0.10 -v --gst-debug=xsub:5 xsub name=overlay show-background=FALSE ! ffmpegcolorspace ! xvimagesink filesrc location=/somepath/<a href="http://samples.mplayerhq.hu/sub/small.divx">small.divx</a> ! avidemux name=d  d.video_00 ! queue ! decodebin2 ! ffmpegcolorspace !  overlay.video_sink    d.video_01 ! queue ! overlay.xsub_sink</blockquote></div><div>I'd put some screenshots here but I have been unable to find samples I can share.</div><div class="blogger-post-footer"><img alt="" height="1" src="https://blogger.googleusercontent.com/tracker/6712537364188853874-3659355749886967285?l=heisenbugs.blogspot.com" width="1"/></div></div>
    </content>
    <updated>2012-01-17T12:06:18Z</updated>
    <published>2010-12-01T01:11:00Z</published>
    <category scheme="http://www.blogger.com/atom/ns#" term="Collabora"/>
    <category scheme="http://www.blogger.com/atom/ns#" term="Subtitles"/>
    <category scheme="http://www.blogger.com/atom/ns#" term="Programming"/>
    <category scheme="http://www.blogger.com/atom/ns#" term="XSUB"/>
    <category scheme="http://www.blogger.com/atom/ns#" term="Multimedia"/>
    <category scheme="http://www.blogger.com/atom/ns#" term="GStreamer"/>
    <category scheme="http://www.blogger.com/atom/ns#" term="FreeDesktop"/>
    <author>
      <name>reynaldo</name>
      <email>noreply@blogger.com</email>
      <uri>http://www.blogger.com/profile/13415907051020449270</uri>
    </author>
    <source>
      <id>tag:blogger.com,1999:blog-6712537364188853874</id>
      <category term="Collabora"/>
      <category term="Family"/>
      <category term="FreeDesktop"/>
      <category term="latex"/>
      <category term="Kernel"/>
      <category term="Talks"/>
      <category term="Programming"/>
      <category term="gnome"/>
      <category term="gtard"/>
      <category term="MPlayer"/>
      <category term="Mathematics"/>
      <category term="Gingerbread"/>
      <category term="entity relationship"/>
      <category term="NDK"/>
      <category term="XSUB"/>
      <category term="Honeycomb"/>
      <category term="diagrams"/>
      <category term="er"/>
      <category term="vuvuzela"/>
      <category term="Android"/>
      <category term="Video"/>
      <category term="equalizer"/>
      <category term="Howto"/>
      <category term="E100"/>
      <category term="Quotes"/>
      <category term="tricks"/>
      <category term="Expolibre"/>
      <category term="GStramer"/>
      <category term="Multimedia"/>
      <category term="FOSS"/>
      <category term="Gadgets"/>
      <category term="Tips"/>
      <category term="Fun"/>
      <category term="Talca"/>
      <category term="Concepcion"/>
      <category term="Subtitles"/>
      <category term="XO"/>
      <category term="Development"/>
      <category term="Life"/>
      <category term="bluetooth"/>
      <category term="Iriver"/>
      <category term="fifa worldcup 2010"/>
      <category term="Einstein"/>
      <category term="Linux"/>
      <category term="FFmpeg"/>
      <category term="GStreamer"/>
      <category term="retard"/>
      <category term="Talcahuano"/>
      <category term="OLPC"/>
      <category term="academic"/>
      <author>
        <name>reynaldo</name>
        <email>noreply@blogger.com</email>
        <uri>http://www.blogger.com/profile/13415907051020449270</uri>
      </author>
      <link href="http://heisenbugs.blogspot.com/feeds/posts/default" rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml"/>
      <link href="http://www.blogger.com/feeds/6712537364188853874/posts/default/-/Collabora" rel="self" type="application/atom+xml"/>
      <link href="http://heisenbugs.blogspot.com/search/label/Collabora" rel="alternate" type="text/html"/>
      <link href="http://pubsubhubbub.appspot.com/" rel="hub" type="text/html"/>
      <subtitle>Ramblings of an uncertain being</subtitle>
      <title>Heisenbugs of a Heisenlife</title>
      <updated>2012-01-17T17:54:57Z</updated>
    </source>
  </entry>

  <entry>
    <id>tag:blogger.com,1999:blog-6712537364188853874.post-8944132389094874580</id>
    <link href="http://heisenbugs.blogspot.com/feeds/8944132389094874580/comments/default" rel="replies" type="application/atom+xml"/>
    <link href="http://www.blogger.com/comment.g?blogID=6712537364188853874&amp;postID=8944132389094874580" rel="replies" type="text/html"/>
    <link href="http://www.blogger.com/feeds/6712537364188853874/posts/default/8944132389094874580" rel="edit" type="application/atom+xml"/>
    <link href="http://www.blogger.com/feeds/6712537364188853874/posts/default/8944132389094874580" rel="self" type="application/atom+xml"/>
    <link href="http://heisenbugs.blogspot.com/2011/11/gstreamer-on-android-ndk-way.html" rel="alternate" type="text/html"/>
    <title>Reynaldo Verdejo: GStreamer on Android, The NDK way</title>
    <content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><a href="http://2.bp.blogspot.com/-DIIyJ3lqt-k/TrnPdRQRK2I/AAAAAAAAEGE/TZD6Hx5-mDA/s1600/gstreamer_honeycomb_bit.jpg"><img alt="" border="0" id="BLOGGER_PHOTO_ID_5672793307404643170" src="http://2.bp.blogspot.com/-DIIyJ3lqt-k/TrnPdRQRK2I/AAAAAAAAEGE/TZD6Hx5-mDA/s400/gstreamer_honeycomb_bit.jpg" style="float: left; margin: 0 10px 10px 0; cursor: pointer; cursor: hand; width: 297px; height: 334px;"/></a><br/><a href="http://1.bp.blogspot.com/-GMQaFMq8wEM/TrnO-EO9g5I/AAAAAAAAEF4/LLjREPGHFjM/s1600/gstreamer_honeycomb_bit.jpg"><span class="Apple-style-span"/></a><b><span class="Apple-style-span">L</span></b>ong story short; thanks to my employer, <a href="http://www.collabora.com/">Collabora</a>, I have been working on getting <a href="http://www.collabora.com/projects/gstreamer/">GStreamer</a> built and installed as a native support library under Android using the NDK. We had this working and announced for last GSTConf at Prague but there were a few details to iron out to get our work in shape for external testing.<br/><div><br/></div><div>The idea behind this adventure is showing the world you can benefit from this marvelous, swissknife-like media framework under the green droid's platform utilizing a least intrusive path.</div><div>We worked a few months ago on having <a href="http://www.collabora.com/projects/gstreamer/">GStreamer</a> built as part of Android itself and while I do believe that approach should benefit system integrators rolling out their own customized Android version, it has the drawback of requiring both patching and building the entire Android OS and having administrative (root) access to your device. This is arguably not a problem for the most adventurous among you but we figured out providing a way to benefit from all the goods in <a href="http://gstreamer.freedesktop.org/">GStreamer</a> without forcing you to perform any major hacks was worth trying. So we did.</div><div><br/></div><div>To be really honest, most of this work wouldn't have been possible (or at least really, like _REALLY_ harder) without the help of <a href="http://www.collabora.com/">Collabora's</a> own Derek Foreman's <a href="http://cgit.collabora.com/git/user/derek/androgenizer.git/">Androgenizer</a>. You will need this tool if you want to try building our NDK bundle. And if you are working on porting some other complex project to Android; You need it too! so go check it out.</div><div><br/></div><div>Right now you can get instructions on how to build GStreamer using the NDK and install it on your device at our <a href="http://gstreamer.freedesktop.org/wiki/GstreamerAndroid_InstallInstructions">freedesktop wikipage</a>. Here is a quick run down of what is currently workig:</div><div><br/></div><div><ul><li>Building most of gstreamer, -base, -good, -bad, -ugly &amp; -openmax. The first 5 entirely from upstream!</li><li>Building of our set of support libraries for this bundle (glib, x264, ogg, libmad, faad, libid3tag)</li><li>Building gstaudioflingersink from gst-android. We are still working on gstsurfaceflingersink to adapt it to some late API changes in Gingerbread</li><li>APK generation and Installation. Mind you this is not a real Android GUI application, just the set of <a href="http://gstreamer.freedesktop.org/">GStreamer</a> libraries and executables for you to build upon</li><li>Execution of gst- binaries on the device using run-as</li></ul></div><div><br/></div><div>Suported Android versions:</div><div><br/></div><div><ul><li>Gingerbread and Honeycomb</li></ul></div><div><br/></div><div>Test devices:</div><div><br/></div><div><ul><li>Samsung Galaxy Tab 10.1</li><li>Google Nexus S</li></ul></div><div><br/></div><div>This is still a work in progress but as I trust the community to be a great vehicle for driving innovation forward and have the luxury of working for a <a href="http://www.collabora.com/">Company</a> that supports this very same principle, I decided to have this aired so I can benefit from both your testing and feedback.</div><div><br/></div><div>If you give this process a try and feel like supporting our work, please consider subscribing to our <a href="http://lists.freedesktop.org/mailman/listinfo/gstreamer-android">mailing list</a> and sharing your experience!</div><div><br/></div><div class="blogger-post-footer"><img alt="" height="1" src="https://blogger.googleusercontent.com/tracker/6712537364188853874-8944132389094874580?l=heisenbugs.blogspot.com" width="1"/></div></div>
    </content>
    <updated>2012-01-17T12:05:52Z</updated>
    <published>2011-11-08T23:02:00Z</published>
    <category scheme="http://www.blogger.com/atom/ns#" term="Collabora"/>
    <category scheme="http://www.blogger.com/atom/ns#" term="Honeycomb"/>
    <category scheme="http://www.blogger.com/atom/ns#" term="Development"/>
    <category scheme="http://www.blogger.com/atom/ns#" term="Gingerbread"/>
    <category scheme="http://www.blogger.com/atom/ns#" term="Multimedia"/>
    <category scheme="http://www.blogger.com/atom/ns#" term="GStreamer"/>
    <category scheme="http://www.blogger.com/atom/ns#" term="Android"/>
    <category scheme="http://www.blogger.com/atom/ns#" term="FreeDesktop"/>
    <category scheme="http://www.blogger.com/atom/ns#" term="NDK"/>
    <category scheme="http://www.blogger.com/atom/ns#" term="FOSS"/>
    <author>
      <name>reynaldo</name>
      <email>noreply@blogger.com</email>
      <uri>http://www.blogger.com/profile/13415907051020449270</uri>
    </author>
    <source>
      <id>tag:blogger.com,1999:blog-6712537364188853874</id>
      <category term="Collabora"/>
      <category term="Family"/>
      <category term="FreeDesktop"/>
      <category term="latex"/>
      <category term="Kernel"/>
      <category term="Talks"/>
      <category term="Programming"/>
      <category term="gnome"/>
      <category term="gtard"/>
      <category term="MPlayer"/>
      <category term="Mathematics"/>
      <category term="Gingerbread"/>
      <category term="entity relationship"/>
      <category term="NDK"/>
      <category term="XSUB"/>
      <category term="Honeycomb"/>
      <category term="diagrams"/>
      <category term="er"/>
      <category term="vuvuzela"/>
      <category term="Android"/>
      <category term="Video"/>
      <category term="equalizer"/>
      <category term="Howto"/>
      <category term="E100"/>
      <category term="Quotes"/>
      <category term="tricks"/>
      <category term="Expolibre"/>
      <category term="GStramer"/>
      <category term="Multimedia"/>
      <category term="FOSS"/>
      <category term="Gadgets"/>
      <category term="Tips"/>
      <category term="Fun"/>
      <category term="Talca"/>
      <category term="Concepcion"/>
      <category term="Subtitles"/>
      <category term="XO"/>
      <category term="Development"/>
      <category term="Life"/>
      <category term="bluetooth"/>
      <category term="Iriver"/>
      <category term="fifa worldcup 2010"/>
      <category term="Einstein"/>
      <category term="Linux"/>
      <category term="FFmpeg"/>
      <category term="GStreamer"/>
      <category term="retard"/>
      <category term="Talcahuano"/>
      <category term="OLPC"/>
      <category term="academic"/>
      <author>
        <name>reynaldo</name>
        <email>noreply@blogger.com</email>
        <uri>http://www.blogger.com/profile/13415907051020449270</uri>
      </author>
      <link href="http://heisenbugs.blogspot.com/feeds/posts/default" rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml"/>
      <link href="http://www.blogger.com/feeds/6712537364188853874/posts/default/-/Collabora" rel="self" type="application/atom+xml"/>
      <link href="http://heisenbugs.blogspot.com/search/label/Collabora" rel="alternate" type="text/html"/>
      <link href="http://pubsubhubbub.appspot.com/" rel="hub" type="text/html"/>
      <subtitle>Ramblings of an uncertain being</subtitle>
      <title>Heisenbugs of a Heisenlife</title>
      <updated>2012-01-17T17:54:57Z</updated>
    </source>
  </entry>

  <entry>
    <id>tag:blogger.com,1999:blog-6712537364188853874.post-870428670610211644</id>
    <link href="http://heisenbugs.blogspot.com/feeds/870428670610211644/comments/default" rel="replies" type="application/atom+xml"/>
    <link href="http://www.blogger.com/comment.g?blogID=6712537364188853874&amp;postID=870428670610211644" rel="replies" type="text/html"/>
    <link href="http://www.blogger.com/feeds/6712537364188853874/posts/default/870428670610211644" rel="edit" type="application/atom+xml"/>
    <link href="http://www.blogger.com/feeds/6712537364188853874/posts/default/870428670610211644" rel="self" type="application/atom+xml"/>
    <link href="http://heisenbugs.blogspot.com/2011/11/giving-lecture-at-this-years-expolibre.html" rel="alternate" type="text/html"/>
    <title>Reynaldo Verdejo: Giving a lecture at this year's expolibre</title>
    <content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><a href="http://3.bp.blogspot.com/-Ikydj6wT7jE/TsaRgcdlZiI/AAAAAAAAEGc/wdObu-rBBjU/s1600/expolibre01_scaled.jpg"><img alt="" border="0" id="BLOGGER_PHOTO_ID_5676384366929208866" src="http://3.bp.blogspot.com/-Ikydj6wT7jE/TsaRgcdlZiI/AAAAAAAAEGc/wdObu-rBBjU/s400/expolibre01_scaled.jpg" style="float: right; margin: 0 0 10px 10px; cursor: pointer; cursor: hand; width: 225px; height: 400px;"/></a><br/>For those of you around <a href="http://maps.google.com/maps?q=universidad+santo+tomas+talca,+chile&amp;hl=en&amp;ll=-35.427735,-71.673045&amp;spn=0.017695,0.042272&amp;sll=37.0625,-95.677068&amp;sspn=36.863178,86.572266&amp;vpsrc=6&amp;hq=universidad+santo+tomas&amp;hnear=Talca,+Talca+Province,+Maule+Region,+Chile&amp;t=m&amp;z=15">Talca</a> and wanting to talk FOSS, <a href="http://kakaroto.homelinux.net/">Youness Aloui</a>,<a href="http://thiblahute.blogspot.com/"> Thibault Saunier</a> and your's truly are going to be speaking at this year's <a href="http://www.expolibre.cl/">Expolibre</a> thanks to the gentle support of  <a href="http://www.collabora.com/">our company</a> and the <a href="http://www.santotomas.cl/">organizer's</a> invitation.<div><br/></div><div>I was talking yesterday with a fellow coworker on how community events like the good old ones get shadowed under the massive, corporate backed ones you see in the tech news by the day. Sadly as it might sound to a few (at least --And I hope), we are slowly beginning to forget there are still some guys out there that resisting the thrust of being only motivated by what to sell next year and how to make it so it goes good and cheap at the same time (like if it was possible, someway), still gather to share views, knowledge and maybe-naive-but-still-valid desires of steer collaborative innovation a bit away from the dreaded coin-only focus. We need to take an step back sometimes and think about some important things we forget on the rush of our everyday paid developer's life; there's a community that saw us shooting at the stars once and has continued backing up most of the technology we rely on. Supplying not only that but: tools, a beyond-technical environment and a reason for trying not only to do things right but do good while we are at it. Attending this kind of events is my way of taking that needed step back and I couldn't be more happier about working for a <a href="http://www.collabora.com/">company</a> that not only allows me to but go as far as directly supporting the event with the time of its devs.</div><div><br/></div><div>So, if you find yourself wandering around Talca (VII Region, Chile. Some 3 hours away from Santiago) by the 24/12/2011 and wanna go do some knowledge sharing and hear and talk about FOSS without having to pay a penny, then go there. I have been giving speaks at this conference for the last 3 years and one thing I can guarantee you is that it's worth the time you will spend.</div><div><br/></div><div><a href="http://thiblahute.blogspot.com/">Thibault Saunier</a> will be talking about video editing with <a href="http://www.collabora.com/projects/pitivi/">PiTiVi</a>, <a href="http://kakaroto.homelinux.net/">Youness Aloui</a> will be talking about FOSS and the fights some users have to go through to make sure their rights don't get crippled by merely buying a product and I'm going to be sharing the goods of <a href="http://www.collabora.com/projects/gstreamer/">GStreamer</a> through a gently introduction for beginners. Don't worry about not having an strong software developent background because our talks are geared towards anyone that doesn't run away from a mouse.</div><div><br/></div><div>C you there!</div><div class="blogger-post-footer"><img alt="" height="1" src="https://blogger.googleusercontent.com/tracker/6712537364188853874-870428670610211644?l=heisenbugs.blogspot.com" width="1"/></div></div>
    </content>
    <updated>2012-01-17T12:05:21Z</updated>
    <published>2011-11-18T16:49:00Z</published>
    <category scheme="http://www.blogger.com/atom/ns#" term="Expolibre"/>
    <category scheme="http://www.blogger.com/atom/ns#" term="Collabora"/>
    <category scheme="http://www.blogger.com/atom/ns#" term="Talca"/>
    <category scheme="http://www.blogger.com/atom/ns#" term="Talks"/>
    <category scheme="http://www.blogger.com/atom/ns#" term="FreeDesktop"/>
    <category scheme="http://www.blogger.com/atom/ns#" term="GStramer"/>
    <category scheme="http://www.blogger.com/atom/ns#" term="FOSS"/>
    <author>
      <name>reynaldo</name>
      <email>noreply@blogger.com</email>
      <uri>http://www.blogger.com/profile/13415907051020449270</uri>
    </author>
    <source>
      <id>tag:blogger.com,1999:blog-6712537364188853874</id>
      <category term="Collabora"/>
      <category term="Family"/>
      <category term="FreeDesktop"/>
      <category term="latex"/>
      <category term="Kernel"/>
      <category term="Talks"/>
      <category term="Programming"/>
      <category term="gnome"/>
      <category term="gtard"/>
      <category term="MPlayer"/>
      <category term="Mathematics"/>
      <category term="Gingerbread"/>
      <category term="entity relationship"/>
      <category term="NDK"/>
      <category term="XSUB"/>
      <category term="Honeycomb"/>
      <category term="diagrams"/>
      <category term="er"/>
      <category term="vuvuzela"/>
      <category term="Android"/>
      <category term="Video"/>
      <category term="equalizer"/>
      <category term="Howto"/>
      <category term="E100"/>
      <category term="Quotes"/>
      <category term="tricks"/>
      <category term="Expolibre"/>
      <category term="GStramer"/>
      <category term="Multimedia"/>
      <category term="FOSS"/>
      <category term="Gadgets"/>
      <category term="Tips"/>
      <category term="Fun"/>
      <category term="Talca"/>
      <category term="Concepcion"/>
      <category term="Subtitles"/>
      <category term="XO"/>
      <category term="Development"/>
      <category term="Life"/>
      <category term="bluetooth"/>
      <category term="Iriver"/>
      <category term="fifa worldcup 2010"/>
      <category term="Einstein"/>
      <category term="Linux"/>
      <category term="FFmpeg"/>
      <category term="GStreamer"/>
      <category term="retard"/>
      <category term="Talcahuano"/>
      <category term="OLPC"/>
      <category term="academic"/>
      <author>
        <name>reynaldo</name>
        <email>noreply@blogger.com</email>
        <uri>http://www.blogger.com/profile/13415907051020449270</uri>
      </author>
      <link href="http://heisenbugs.blogspot.com/feeds/posts/default" rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml"/>
      <link href="http://www.blogger.com/feeds/6712537364188853874/posts/default/-/Collabora" rel="self" type="application/atom+xml"/>
      <link href="http://heisenbugs.blogspot.com/search/label/Collabora" rel="alternate" type="text/html"/>
      <link href="http://pubsubhubbub.appspot.com/" rel="hub" type="text/html"/>
      <subtitle>Ramblings of an uncertain being</subtitle>
      <title>Heisenbugs of a Heisenlife</title>
      <updated>2012-01-17T17:54:57Z</updated>
    </source>
  </entry>

  <entry xml:lang="en">
    <id>http://blogs.gnome.org/danni/?p=391</id>
    <link href="http://blogs.gnome.org/danni/2012/01/17/adacamp-and-haecksen/" rel="alternate" type="text/html"/>
    <title>Danielle Madeley: AdaCamp and Haecksen</title>
    <summary type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml">AdaCamp Saturday was the very first AdaCamp, an unconference set up by the Ada Initiative to talk about issues facing women in open stuff, here in Melbourne. The event was well attended by awesome feminists from a breadth of fields … <a href="http://blogs.gnome.org/danni/2012/01/17/adacamp-and-haecksen/">Continue reading <span class="meta-nav">→</span></a></div>
    </summary>
    <content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><p><b>AdaCamp</b></p>
<p>Saturday was the very first <a href="http://adainitiative.org/what-we-do/events/adacamp-mel-2012/">AdaCamp</a>, an unconference set up by the <a href="http://adainitiative.org/">Ada Initiative </a> to talk about issues facing women in open <i>stuff</i>, here in Melbourne.</p>
<p>The event was well attended by awesome feminists from a breadth of fields and some geographic diversity within Australia (including a surprising number of people from Perth). There were open source people, Wikimedia people, librarians and academics.</p>
<p>There were 21 sessions in total, in 3 streams, so I don’t know everything awesome that was discussed. I think the most important session I attended was the first one of the morning on <a href="http://geekfeminism.wikia.com/wiki/Imposter_syndrome">Imposter syndrome</a>. Also the session on getting women involved with open source, where I talked about the <a href="http://live.gnome.org/GnomeWomen/OutreachProgram">GNOME Outreach Programme for Women</a>.</p>
<p>[Unfortunately I forgot to bring a notebook with me, and tiredness has caused my memory to let me down.]</p>
<p>Brianna and I supplied the morning and afternoon tea, which was various combinations of vegan, gluten-free and fructose-free. Some people asked for the recipes used, which I <a href="http://danni.dreamwidth.org/66333.html">blogged here</a>.</p>
<p><b>Haecksen</b></p>
<p>I drove to Ballarat yesterday to give my panel at the Haecksen miniconf at linux.conf.au<sup><a class="footnote-link footnote-identifier-link" href="http://blogs.gnome.org/danni/2012/01/17/adacamp-and-haecksen/#footnote_0_391" id="identifier_0_391" title="Many thanks to my employer Collabora for letting me be there.">1</a></sup> on gender-focused outreach in open source.</p>
<p>It was, in my opinion, an extremely good panel. I was originally daunted by appearing on a panel with Pia Waugh, Leslie Hawthorn and Selena Deckmann (all of whom are amazingly talented), but I think I did okay. We covered a breadth of mentoring from school age girls, to open source mentoring with Summer of Code and specific programmes like GOPW with a little bit about mentoring in organisations. Unfortunately I feel like the panel ran out of time just when it was getting interesting, and I didn’t get to talk about optimising your mentoring and the differences I’ve found in mentoring people from high-context culture vs low-context cultures [<a href="http://en.wikipedia.org/wiki/High_context_culture">1</a>, <a href="http://stormyscorner.com/2011/09/does-open-source-exclude-high-context-cultures.html">2</a>].</p>
<p>We also talked a bit about improving your diversity (which was a bit off-topic, more of a carry-on from the talk preceding the panel). Key point for me was: people from minorities tend not to ask (or apply), if you want diversity, you have to seek it out. Furthermore, people tend to know people who are like them, to seek out diversity, ask for recommendations from people who are <i>least like</i> the people you already have.</p>
<p>~</p>
<p>Unfortunately, I’m not at linux.conf.au itself, so if you’re looking for me, I’m not there.  If you want to talk to a Collaboran about <a href="http://www.collabora.com/services/">what we can do for you</a> or how awesome it is to <a href="http://www.collabora.com/about/vacancies/">work for us</a>, you can find Daniel Stone or Dario Freddi at the conference.</p>
<ol class="footnotes"><li class="footnote" id="footnote_0_391">Many thanks to my employer Collabora for letting me be there.</li></ol></div>
    </content>
    <updated>2012-01-17T00:29:00Z</updated>
    <category term="Uncategorized"/>
    <author>
      <name>Danielle</name>
    </author>
    <source>
      <id>http://blogs.gnome.org/danni</id>
      <link href="http://blogs.gnome.org/danni/feed/" rel="self" type="application/atom+xml"/>
      <link href="http://blogs.gnome.org/danni" rel="alternate" type="text/html"/>
      <link href="http://creativecommons.org/licenses/by-nc-nd/2.5/au/" rel="license"/>
      <subtitle>Danielle's technical stuffs</subtitle>
      <title>scrambled tofu</title>
      <updated>2012-02-05T12:45:22Z</updated>
    </source>
  </entry>

  <entry xml:lang="fr">
    <id>urn:md5:5ce31997bfbd01d426fad6bdd484d3a8</id>
    <link href="http://blog.desmottes.be/post/2012/01/16/GNOME-Beer-event-at-FOSDEM-2012" rel="alternate" type="text/html"/>
    <title>Guillaume Desmottes: GNOME Beer event at FOSDEM 2012</title>
    <summary type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><p>Despite what <a href="https://mail.gnome.org/archives/desktop-devel-list/2012-January/msg00000.html">some stats</a> may say, my biggest contribution to <a href="http://www.gnome.org/">GNOME</a> is not in bugs or code but in the organization of beer related events!</p>


<p>So I'm pleased to announce that, like each year, we'll have a <a href="https://live.gnome.org/Brussels2012/Attendees">GNOME Beer party</a> on the Saturday night of <a href="http://fosdem.org/2012/">FOSDEM</a> (4th Feb). People seemed happy of the location of last year, so we decided to stay at "La Bécasse" in the city center. Feel free to add yourself to the <a href="https://live.gnome.org/Brussels2012/Attendees">wiki</a> if you are planning to attend.</p>


<p>See you at <a href="http://fosdem.org/2012/">FOSDEM</a>!</p></div>
    </summary>
    <updated>2012-01-16T15:58:00Z</updated>
    <category term="Nerdzage"/>
    <category term="Collabora"/>
    <category term="GNOME"/>
    <author>
      <name>Guillaume Desmottes</name>
    </author>
    <source>
      <id>http://blog.desmottes.be/</id>
      <link href="http://blog.desmottes.be/" rel="alternate" type="text/html"/>
      <link href="http://cass.no-ip.com/~cassidy/blog/index.php/feed/en/rss2" rel="self" type="application/atom+xml"/>
      <title>Le Weblog à Cassidy</title>
      <updated>2012-01-31T09:20:47Z</updated>
    </source>
  </entry>

  <entry xml:lang="en">
    <id>http://arunraghavan.net/?p=1189</id>
    <link href="http://arunraghavan.net/2012/01/pulseaudio-vs-audioflinger-fight/" rel="alternate" type="text/html"/>
    <title>Arun Raghavan: PulseAudio vs. AudioFlinger: Fight!</title>
    <summary>I’ve been meaning to try this for a while, and we’ve heard a number of requests from the community as well. Recently, I got some time here at Collabora to give it a go — that is, to get PulseAudio running on an Android device and see how it compares with Android’s AudioFlinger. The Contenders [...]</summary>
    <content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><p>I’ve been meaning to try this for a while, and we’ve heard a number of requests from the community as well. Recently, I got some time here at <a href="http://www.collabora.com/projects/pulseaudio">Collabora</a> to give it a go — that is, to get PulseAudio running on an Android device and see how it compares with Android’s AudioFlinger.</p>

<h2>The Contenders</h2>

<p>Let’s introduce our contenders first. For those who don’t know, <a href="http://pulseaudio.org/">PulseAudio</a> is pretty much a de-facto standard part of the Linux audio stack. It sits on top of <acronym title="Advanced Linux Sound Architecture">ALSA</acronym> which provides a unified way to talk to the audio hardware and provides a number of handy features that are useful on desktops and embedded devices. I won’t rehash all of these, but this includes a nice modular framework, a bunch of power saving features, flexible routing, and lots more. PulseAudio runs as a daemon, and clients usually use the <tt>libpulse</tt> library to communicate with it.</p>

<p>In the other corner, we have Android’s native audio system — AudioFlinger. AudioFlinger was written from scratch for Android. It provides an API for playback/recording as well as a control mechanism for implementing policy. It does not depend on ALSA, but instead allows for a sort of <acronym title="Hardware Abstraction Layer">HAL</acronym> that vendors can implement any way they choose. Applications generally play audio via layers built on top of AudioFlinger. Even if you write a native application, it would use <a href="http://www.khronos.org/opensles/">OpenSL ES</a> implementation which goes through AudioFlinger. The actual service runs as a thread of the <tt>mediaserver</tt> daemon, but this is merely an implementation detail.</p>

<p><em>Note: all my comments about AudioFlinger and Android in general are based on documentation and code for Android 4.0 (Ice Cream Sandwich).</em></p>

<h2>The Arena</h2>

<p>My test-bed for the tests was the <a href="http://en.wikipedia.org/wiki/Galaxy_Nexus">Galaxy Nexus</a> running Android 4.0 which we shall just abbreviate to ICS. I picked ICS since it is the current platform on which Google is building, and hopefully represents the latest and greatest in AudioFlinger development. The Galaxy Nexus runs a Texas Instruments OMAP4 processor, which is also really convenient since this chip has pretty good support for running stock Linux (read on to see how useful this was).</p>

<h2>Preparations</h2>

<p>The first step in getting PulseAudio on Android was deciding between using the Android <acronym title="Native Development Kit">NDK</acronym> like a regular application or integrate into the base Android system. I chose the latter — even though this was a little more work initially, it made more sense in the long run since PulseAudio really belongs to the base-system.</p>

<p>The next task was to get the required dependencies ported to Android. Fortunately, a lot of the ground work for this was already done by some of the awesome folks at Collabora. Derek Foreman’s <a href="http://cgit.collabora.com/git/user/derek/androgenizer.git/"><tt>androgenizer</tt></a> tool is incredibly handy for converting an <tt>autotools</tt>-based build to Android–friendly makefiles. With Reynaldo Verdejo and Alessandro Decina’s prior work on <a href="http://gstreamer.freedesktop.org/modules/gst-android.html">GStreamer for Android</a> as a reference, things got even easier.</p>

<p>The most painful bit was <tt>libltdl</tt>, which we use for dynamically loading modules. Once this was done, the other dependencies were quite straightforward to port over. As a bonus, the Android source already ships an optimised version of Speex which we use for resampling, and it was easy to reuse this as well.</p>

<p>As I mentioned earlier, vendors can choose how they implement their audio abstraction layer. On the Galaxy Nexus, this is built on top of standard ALSA drivers, and the HAL talks to the drivers via a minimalist <a href="https://github.com/tinyalsa">tinyalsa</a> library. My first hope was to use this, but there was a whole bunch of functions missing that PulseAudio needed. The next approach was to use <a href="http://www.alsa-project.org/main/index.php/SALSA-Library">salsa-lib</a>, which is a stripped down version of the ALSA library written for embedded devices. This too had some missing functions, but these were fewer and easy to implement (and are now <a href="http://git.kernel.org/?p=linux/kernel/git/tiwai/salsa-lib.git;a=commit;h=8485a2bdc725b531794f277cd3e37973a8524830">upstream</a>).</p>

<p>Now if only life were that simple. :) I got PulseAudio running on the Galaxy Nexus with <tt>salsa-lib</tt>, and even got sound out of the HDMI port. Nothing from the speakers though (they’re driven by a TI <a href="http://www.ti.com/product/twl6040">twl6040</a> codec). Just to verify, I decided to port the full <tt>alsa-lib</tt> and <tt>alsa-utils</tt> packages to debug what’s happening (by this time, I’m familiar enough with <tt>androgenizer</tt> for all this to be a breeze). Still no luck. Finally, with some pointers from the kind folks at TI (thanks Liam!), I got current <acronym title="Use Case Manager">UCM</acronym> configuration files for OMAP4 boards, and some work-in-progress patches to add UCM support to PulseAudio, and after a couple of minor fixes, wham! We have output. :)</p>

<p><em>(For those who don’t know about UCM — embedded chips are quite different from desktops and expose a huge amount of functionality via ALSA mixer controls. UCM is an effort to have a standard, meaningful way for applications and users to use these.)</em></p>

<p>In production, it might be handy to write light-weight UCM support for <tt>salsa-lib</tt> or just convert the UCM configuration into PulseAudio path/profile configuration (bonus points if it’s an automated tool). For our purposes, though, just using <tt>alsa-lib</tt> is good enough.</p>

<p>To make the comparison fair, I wrote a simple test program that reads raw PCM S16LE data from a file and plays it via the <tt>AudioTrack</tt> interface provided by AudioFlinger or the PulseAudio <a href="http://freedesktop.org/software/pulseaudio/doxygen/async.html">Asynchronous API</a>. Tests were run with the brightness fixed, wifi off, and USB port connected to my laptop (for adb shell access).</p>

<p>All tests were run with the CPU frequency pegged at 350 MHz and with 44.1 and 48 kHz samples. Five readings were recorded, and the median value was finally taken.</p>

<h2>Round 1: CPU</h2>

<p>First, let’s take a look at how the two compare in terms of CPU usage. The numbers below are the percentage CPU usage taken as the sum of all threads of the audio server process and the audio thread in the client application using <tt>top</tt> (which is why the granularity is limited to an integer percentage).</p>

<table>
<colgroup span="2">
</colgroup><colgroup span="2">
</colgroup><tbody><tr> <th colspan="2">44.1 kHz</th> <th colspan="2">48 kHz</th> </tr>
<tr> <th>AF</th> <th>PA</th> <th>AF</th> <th>PA</th> </tr>
<tr> <td>1%</td> <td>1%</td> <td>2%</td> <td>0%</td> </tr>
</tbody></table>

<p>At 44.1 kHz, the two are essentially the same. Both cases are causing resampling to occur (the native sample rate for the device is 48 kHz). Resampling is done using the Speex library, and we’re seeing minuscule amounts of CPU usage even at 350 MHz, so it’s clear that the NEON optimisations are really paying off here.</p>

<p>The astute reader would have noticed that since the device’ native sample rate is 48 kHz, the CPU usage for 48 kHz playback should be less than for 44.1 kHz. This is true with PulseAudio, but not with AudioFlinger! The reason for this little quirk is that AudioFlinger provides 44.1 kHz samples to the HAL (which means the stream is resampled there), and then the HAL needs to resample it again to 48 kHz to bring it to the device’ native rate. From what I can tell, this is a matter of convention with regards to what audio HALs should expect from AudioFlinger (do correct me if I’m mistaken about the rationale).</p>

<p>So round 1 leans slightly in favour of PulseAudio.</p>

<h2>Round 2: Memory</h2>

<p>Comparing the memory consumption of the server process is a bit meaningless, because the AudioFlinger daemon thread shares an address space with the rest of the <tt>mediaserver</tt> process. For the curious, the resident set size was: AudioFlinger — 6,796 KB, PulseAudio — 3,024 KB. Again, this doesn’t really mean much.</p>

<p>We can, however, compare the client process’ memory consumption. This is <acronym title="Resident Set Size">RSS</acronym> in kilobytes, measured using <tt>top</tt>.</p>

<table>
<colgroup span="2">
</colgroup><colgroup span="2">
</colgroup><tbody><tr> <th colspan="2">44.1 kHz</th> <th colspan="2">48 kHz</th> </tr>
<tr> <th>AF</th> <th>PA</th> <th>AF</th> <th>PA</th> </tr>
<tr> <td>2600 kB</td> <td>3020 kB</td> <td>2604 kB</td> <td>3020 kB</td> </tr>
</tbody></table>

<p>The memory consumption is comparable between the two, but leans in favour of AudioFlinger.</p>

<h2>Round 3: Power</h2>

<p>I didn’t have access to a power monitor, so I decided to use a couple of indirect metrics to compare power utilisation. The first of these is <a href="http://www.lesswatts.org/projects/powertop/">PowerTOP</a>, which is actually a Linux desktop tool for monitoring various power metrics. Happily, someone had already <a href="https://gitorious.org/android/powertop">ported PowerTOP to Android</a>. The tool reports, among other things, the number of wakeups-from-idle per second for the processor as a whole, and on a per-process basis. Since there are multiple threads involved, and PowerTOP’s per-process measurements are somewhat cryptic to add up, I used the global wakeups-from-idle per second. The “Idle” value counts the number of wakeups when nothing is happening. The actual value is very likely so high because the device is connected to my laptop in USB debugging mode (lots of wakeups from USB, and the device is prevented from going into a full sleep).</p>

<table>
<colgroup span="1">
</colgroup><colgroup span="2">
</colgroup><colgroup span="2">
</colgroup><tbody><tr> <th/> <th colspan="2">44.1 kHz</th> <th colspan="2">48 kHz</th> </tr>
<tr> <th>Idle</th> <th>AF</th> <th>PA</th> <th>AF</th> <th>PA</th> </tr>
<tr> <td>79.6</td> <td>107.8</td> <td>87.3</td> <td>108.5</td> <td>85.7</td> </tr>
</tbody></table>

<p>The second, similar, data point is the number of interrupts per second reported by <tt>vmstat</tt>. These corroborate the numbers above:</p>

<table>
<colgroup span="1">
</colgroup><colgroup span="2">
</colgroup><colgroup span="2">
</colgroup><tbody><tr> <th/> <th colspan="2">44.1 kHz</th> <th colspan="2">48 kHz</th> </tr>
<tr> <th>Idle</th> <th>AF</th> <th>PA</th> <th>AF</th> <th>PA</th> </tr>
<tr> <td>190</td> <td>266</td> <td>215</td> <td>284</td> <td>207</td> </tr>
</tbody></table>

<p>PulseAudio’s power-saving features are clearly highlighted in this comparison. AudioFlinger causes <em>about three times the number of wakeups per second</em> that PulseAudio does. Things might actually be worse on older hardware with less optimised drivers than the Galaxy Nexus (I’d appreciate reports from running similar tests on a Nexus S or any other device with ALSA support to confirm this).</p>

<p>For those of you who aren’t familiar with PulseAudio, the reason we manage to get these savings is our timer-based scheduling mode. In this mode, we fill up the hardware buffer as much as possible and go to sleep (disabling ALSA interrupts while we’re at it, if possibe). We only wake up when the buffer is nearing empty, and fill it up again. More details can be found in this old <a href="http://0pointer.de/blog/projects/pulse-glitch-free.html">blog post by Lennart</a>.</p>

<h2>Round 4: Latency</h2>

<p>I’ve only had the Galaxy Nexus to actually try this out with, but I’m pretty certain I’m not the only person seeing <a href="http://code.google.com/p/android/issues/detail?id=3434">latency issues on Android</a>. On the Galaxy Nexus, for example, the best latency I can get appears to be 176 ms. This is pretty high for certain types of applications, particularly ones that generate tones based on user input.</p>

<p>With PulseAudio, where we dynamically adjust buffering based on what clients request, I was able to drive down the total buffering to approximately 20 ms (too much lower, and we started getting dropouts). There is likely room for improvement here, and it is something on my todo list, but even out-of-the-box, we’re doing quite well.</p>

<h2>Round 5: Features</h2>

<p>With the hard numbers out of the way, I’d like to talk a little bit about what else PulseAudio brings to the table. In addition to a playback/record API, AudioFlinger provides mechanism for enforcing various bits of policy such as volumes and setting the “active” device amongst others. PulseAudio exposes similar functionality, some as part of the client API and the rest via the core API exposed to modules.</p>

<p>From <acronym title="System-on-Chip">SoC</acronym> vendors’ perspective, it is often necessary to support both Android and standard Linux on the same chip. Being able to focus only on good quality ALSA drivers and knowing that this will ensure quality on both these systems would be a definite advantage in this case.</p>

<p>The current Android system leaves power management to the audio HAL. This means that each vendor needs to implement this themselves. Letting PulseAudio manage the hardware based on requested latencies and policy gives us a single point of control, greatly simplifying the task of power-management and avoiding code duplication.</p>

<p>There are a number of features that PulseAudio provides that can be useful in the various scenarios where Android is used. For example, we support transparently streaming audio over the network, which could be a handy way of supporting playing audio from your phone on your TV completely transparently and out-of-the-box. We also support compressed formats (AC3, DTS, etc.) which the ongoing Android-on-your-TV efforts could likely take advantage of.</p>

<p><em>Edit: As someone pointed out on LWN, I missed one thing — AudioFlinger has an effect API that we do not yet have in PulseAudio. It’s something I’d definitely like to see added to PulseAudio in the future.</em></p>

<h2>Ding! Ding! Ding!</h2>

<p>That pretty much concludes the comparison of these two audio daemons. Since the Android-side code is somewhat under-documented, I’d welcome comments from readers who are familiar with the code and history of AudioFlinger.</p>

<p>I’m in the process of pushing all the patches I’ve had to write to the various upstream projects. A number of these are merely build system patches to integrate with the Android build system, and I’m hoping projects are open to these. Instructions on building this code will be available on the <a href="http://www.pulseaudio.org/wiki/Android">PulseAudio Android wiki page</a>.</p>

<p>For future work, it would be interesting to write a wrapper on top of PulseAudio that exposes the AudioFlinger audio and policy APIs — this would basically let us run PulseAudio as a drop-in AudioFlinger replacement. In addition, there are potential performance benefits that can be derived from using Android-specific infrastructure such as Binder (for <acronym title="Inter-Process Communication">IPC</acronym>) and <tt>ashmem</tt> (for transferring audio blocks as shared memory segments, something we support on desktops using the standard Linux SHM mechanism which is not available on Android).</p>

<p>If you’re an OEM who is interested in this work, you can get in touch with us — details are on the <a href="http://www.collabora.com/contact/">Collabora website</a>.</p>

<p>I hope this is useful to some of you out there!</p></div>
    </content>
    <updated>2012-01-16T12:22:30Z</updated>
    <category term="Blog"/>
    <category term="android"/>
    <category term="collabora"/>
    <category term="f/oss"/>
    <category term="linux"/>
    <category term="pulseaudio"/>
    <category term="work"/>
    <author>
      <name>Arun</name>
    </author>
    <source>
      <id>http://arunraghavan.net</id>
      <link href="http://arunraghavan.net/tag/foss/feed/" rel="self" type="application/atom+xml"/>
      <link href="http://arunraghavan.net" rel="alternate" type="text/html"/>
      <subtitle>Extremely pithy tagline here</subtitle>
      <title>Arun Raghavan » f/oss</title>
      <updated>2012-01-17T08:00:48Z</updated>
    </source>
  </entry>

  <entry xml:lang="en">
    <id>http://blogs.gnome.org/xclaesse/?p=164</id>
    <link href="http://blogs.gnome.org/xclaesse/2012/01/13/ssh-your-n9-over-3g-even-with-private-ip/" rel="alternate" type="text/html"/>
    <title>Xavier Claessens: SSH your N9 over 3G even with private IP</title>
    <summary>Thanks to Collabora, I’ve received an N9. So I’ve build ssh-contact package for it. It was easy since the N9 already has all its dependencies. I’ve simply taken debian’s package and rebuild it in scratchbox with the harmattan SDK. Here are the packages: ssh-contact_0.6-1_all.deb ssh-contact-client_0.6-1_armel.deb ssh-contact-service_0.6-1_armel.deb To install them, you can follow the steps from [...]</summary>
    <content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><p>Thanks to <a href="http://www.collabora.com/">Collabora</a>, I’ve received an <a href="http://blogs.gnome.org/xclaesse/category/collabora/feed/swipe.nokia.com">N9</a>. So I’ve build <a href="http://telepathy.freedesktop.org/wiki/SSH-Contact">ssh-contact</a> package for it. It was easy since the N9 already has all its dependencies. I’ve simply taken debian’s package and rebuild it in scratchbox with the harmattan SDK.</p>
<p>Here are the packages:<br/>
<a href="http://people.collabora.com/~xclaesse/n9/ssh-contact_0.6-1_all.deb">ssh-contact_0.6-1_all.deb</a><br/>
<a href="http://people.collabora.com/~xclaesse/n9/ssh-contact-client_0.6-1_armel.deb">ssh-contact-client_0.6-1_armel.deb</a><br/>
<a href="http://people.collabora.com/~xclaesse/n9/ssh-contact-service_0.6-1_armel.deb">ssh-contact-service_0.6-1_armel.deb</a></p>
<p>To install them, you can follow the steps from <a href="http://www.meegoexperts.com/2011/12/install-deb-files-nokia-n9n950-meego-harmattan-1-2/">here</a> for example.</p></div>
    </content>
    <updated>2012-01-13T12:23:35Z</updated>
    <category term="Collabora"/>
    <category term="General"/>
    <author>
      <name>xclaesse</name>
    </author>
    <source>
      <id>http://blogs.gnome.org/xclaesse</id>
      <link href="http://blogs.gnome.org/xclaesse/category/collabora/feed/" rel="self" type="application/atom+xml"/>
      <link href="http://blogs.gnome.org/xclaesse" rel="alternate" type="text/html"/>
      <subtitle>Just another GNOME Blogs weblog</subtitle>
      <title>Xavier Claessens » Collabora</title>
      <updated>2012-02-04T19:45:20Z</updated>
    </source>
  </entry>

  <entry xml:lang="en">
    <id>http://pcapriotti.wordpress.com/?p=146</id>
    <link href="http://pcapriotti.wordpress.com/2012/01/10/from-event-driven-programming-to-frp/" rel="alternate" type="text/html"/>
    <title>Paolo Capriotti: From event-driven programming to FRP</title>
    <summary type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml">The problem Most of modern programming is based on events. Event-driven frameworks are the proven and true abstraction to express any kind of asynchronous and interactive behavior, like in GUIs or client-server architectures. The core idea is inversion of control: the main loop is run by the framework, users only have to register some form [...]<img alt="" border="0" height="1" src="http://stats.wordpress.com/b.gif?host=pcapriotti.wordpress.com&amp;blog=806312&amp;post=146&amp;subd=pcapriotti&amp;ref=&amp;feed=1" width="1"/></div>
    </summary>
    <content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><h2 id="the-problem">The problem</h2>
<p>Most of modern programming is based on events. Event-driven frameworks are the proven and true abstraction to express any kind of asynchronous and interactive behavior, like in GUIs or client-server architectures.</p>
<p>The core idea is <strong>inversion of control</strong>: the main loop is run by the framework, users only have to register some form of “callbacks”, and the framework will take care of calling them at the appropriate times.</p>
<p>This solves many issues that a straightforward imperative/procedural approach would present, eliminates the need for any kind of polling, and creates all sorts of opportunities for general-purpose optimizations inside the framework, with no impact on the complexity of user code. All of this without introducing any concurrency.</p>
<p>There are drawbacks, however. Event-driven code is hideous to write in most languages, especially those lacking support for first class closures. More importantly, event-driven code is extremely hard to reason about. The very nature of this callback-based approach makes it impossible to use a functional style, and even the simplest of interactions requires some form of mutable state which has to be maintained across callback calls.</p>
<p>As a very simple example, suppose we want to perform a GET request and retrieve some data, handling any HTTP error that might occur. In a generic event-driven frameworkm, we would need to implement a simple <strong>state machine</strong> whose graph will look somewhat like this:</p>
<p><a href="http://pcapriotti.files.wordpress.com/2012/01/state_machine1.png"><img alt="A simple state machine" class="aligncenter size-medium wp-image-152" height="215" src="http://pcapriotti.files.wordpress.com/2012/01/state_machine1.png?w=292&amp;h=215" title="State machine 1" width="292"/></a></p>
<p>Each state (except the initial one) corresponds to a callback. The transitions are determined by the framework. To avoid starting more than one request at a time, we will need to explicitly keep track of the current state.</p>
<p>Now let’s try to make a simple change to our program: suppose we want to retry requests when they fail, but not more than once. Now the state machine becomes more complicated, since we need to add extra nodes for the non-fatal error condition.</p>
<p><a href="http://pcapriotti.files.wordpress.com/2012/01/state_machine2.png"><img alt="A slightly more complicated state machine" class="aligncenter size-medium wp-image-153" height="342" src="http://pcapriotti.files.wordpress.com/2012/01/state_machine2.png?w=247&amp;h=342" title="State machine 2" width="247"/></a></p>
<p>In our hypotetical event-driven code, we need to keep track of whether we already encountered an error, check this flag at each callback to perform the right action, and update it appropriately. Moreover, this time the code isn’t even shaped exactly like the state machine, because we reuse the same callback for multiple nodes. To test our code exhaustively, we need to trace every possible path through the graph and reproduce it.</p>
<p>Now assume we want to allow simultaneous requests… you get the idea. The code gets unwieldy pretty fast. Small changes in requirements have devastating consequences in terms of the state graph. In practice, what happens most of the times is that the state graph is kept implicit, which makes the code impossible to test reliably, and consequently impossible to modify.</p>
<h2 id="towards-a-solution">Towards a solution</h2>
<p>A very simple but effective solution can be found by observing that state graphs like those of the previous examples have a very clear <a href="http://en.wikipedia.org/wiki/Operational_semantics">operational</a> interpretation in the context of the equivalent synchronous code.</p>
<p>A single forward transition from <code>A</code> to <code>B</code> can be simply modelled as the sequence <code>A;B</code>, i.e. execute <code>A</code>, <strong>then</strong> execute <code>B</code>. Extra outward transitions from a single node can be mapped to exceptions, while backward arrows can be thought of as looping constructs.</p>
<p>Our second state machine can then be translated to the following pseudopython:</p>
<p/><pre class="brush: python;">while True:
    for i in xrange(2):
        error = None
        try:
            reply = start_request()
            data = get_data(reply)
            break
        except Exception as e:
            error = get_error(e)
    if error:
        handle_error(error)
    else:
        display_data(data)
</pre><p/>
<p>This code is straightforward. It could be made cleaner by splitting it up in a couple of extra functions and removing local state, but that’s beside the point. Note how easy it is now to generalize to an arbitrary number of retries.</p>
<p>So the key observation is that we can transform asynchronous code into synchronous-looking code, provided that we attach the correct semantics to sequencing of operations, exceptions and loops.</p>
<p>Now the question becomes: is it possible to do so?</p>
<p>We could turn functions like <code>start_request</code> and <code>get_data</code> into blocking operations that can throw. This will work <em>locally</em>, but it will break asynchronicity, so it’s not an option.</p>
<p>One way to salvage this transformation is to run the code in its own thread. Asynchronous operations will block, but won’t hang the main loop, and the rest of the program will continue execution.</p>
<p>However, we need to be careful with the kind of threads that we use. Since we don’t need (and don’t want!) to run multiple threads simultaneously, but we need to spawn a thread for each asynchronous operation, we have to make sure that the overhead is minimal, context switching is fast, and we’re not paying the cost of scheduling and synchronization.</p>
<p><a href="https://gist.github.com/1086172">Here</a> you can find a sketched solution along these lines that I wrote in python. It’s based on the <a href="http://pypi.python.org/pypi/greenlet">greenlet</a> library, which provides cooperative multithreading.</p>
<p>In the next post I will talk about alternative solutions, as well as how to extend the idea further, and make event-driven code more declarative and less procedural.</p>
<br/>  <a href="http://feeds.wordpress.com/1.0/gocomments/pcapriotti.wordpress.com/146/" rel="nofollow"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/pcapriotti.wordpress.com/146/"/></a> <a href="http://feeds.wordpress.com/1.0/godelicious/pcapriotti.wordpress.com/146/" rel="nofollow"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/pcapriotti.wordpress.com/146/"/></a> <a href="http://feeds.wordpress.com/1.0/gofacebook/pcapriotti.wordpress.com/146/" rel="nofollow"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/pcapriotti.wordpress.com/146/"/></a> <a href="http://feeds.wordpress.com/1.0/gotwitter/pcapriotti.wordpress.com/146/" rel="nofollow"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/pcapriotti.wordpress.com/146/"/></a> <a href="http://feeds.wordpress.com/1.0/gostumble/pcapriotti.wordpress.com/146/" rel="nofollow"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/pcapriotti.wordpress.com/146/"/></a> <a href="http://feeds.wordpress.com/1.0/godigg/pcapriotti.wordpress.com/146/" rel="nofollow"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/pcapriotti.wordpress.com/146/"/></a> <a href="http://feeds.wordpress.com/1.0/goreddit/pcapriotti.wordpress.com/146/" rel="nofollow"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/pcapriotti.wordpress.com/146/"/></a> <img alt="" border="0" height="1" src="http://stats.wordpress.com/b.gif?host=pcapriotti.wordpress.com&amp;blog=806312&amp;post=146&amp;subd=pcapriotti&amp;ref=&amp;feed=1" width="1"/></div>
    </content>
    <updated>2012-01-10T20:22:31Z</updated>
    <category term="c++"/>
    <category term="frp"/>
    <category term="kde"/>
    <category term="programming"/>
    <category term="python"/>
    <category term="qt"/>
    <author>
      <name>pcapriotti</name>
    </author>
    <source>
      <id>http://pcapriotti.wordpress.com</id>
      <logo>http://s2.wp.com/i/buttonw-com.png</logo>
      <link href="http://pcapriotti.wordpress.com/category/kde/feed/?mrss=off" rel="self" type="application/atom+xml"/>
      <link href="http://pcapriotti.wordpress.com" rel="alternate" type="text/html"/>
      <link href="http://pcapriotti.wordpress.com/osd.xml" rel="search" type="application/opensearchdescription+xml"/>
      <link href="http://pcapriotti.wordpress.com/?pushpress=hub" rel="hub" type="text/html"/>
      <subtitle>KDE hacking and more</subtitle>
      <title>Paolo Capriotti » kde</title>
      <updated>2012-02-04T20:30:31Z</updated>
    </source>
  </entry>

  <entry xml:lang="en">
    <id>http://blogs.gnome.org/wjjt/?p=767</id>
    <link href="http://blogs.gnome.org/wjjt/2012/01/09/bustle-0-3-1/" rel="alternate" type="text/html"/>
    <title>Will Thompson: Bustle 0.3.1 provides 50% of your daily allowance of D-Bus message bodies</title>
    <summary>It’s a cold evening here in Cambridge, but I’m being kept warm at Collabora Towers, sipping a revitalizing mug of fresh applicative functor soup. A mere five months after I demoed its features at the Desktop Summit in Berlin, here’s Bustle 0.3.1. Whereas previous versions of Bustle only recorded and showed you the names, senders [...]</summary>
    <content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><p>It’s a cold evening here in Cambridge, but I’m being kept warm at <a href="http://www.collabora.com/">Collabora</a> Towers, sipping a revitalizing mug of fresh applicative functor soup.</p>
<p>A mere five months after I demoed its features at the <a href="https://desktopsummit.org/">Desktop Summit</a> in Berlin, here’s <a href="http://willthompson.co.uk/bustle/">Bustle</a> 0.3.1. Whereas previous versions of Bustle only recorded and showed you the names, senders and destinations of D-Bus messages, this version also records and shows you the contents of the messages.</p>
<p><a href="http://blogs.gnome.org/wjjt/files/2012/01/bustle-0.3.1.png"><img alt="Screenshot of Bustle 0.3.1" class="center frame" height="255" src="http://blogs.gnome.org/wjjt/files/2012/01/bustle-0.3.1-thumb.png" width="346"/></a></p>
<p>The statistics page also takes advantage of this new information: you can now get statistics about the sizes of messages in the log. Grab your copy today from <a href="http://willthompson.co.uk/bustle/">the usual location</a>. Beside the source, I’ve also uploaded a <a href="http://willthompson.co.uk/bustle/releases/bustle-0.3.1-x86_64.tar.bz2">64-bit binary tarball</a> to save you some compilation time. Give me a shout if you have trouble with it. <del>32-bit version to follow when I get my chroots straightened out.</del></p>
<p>I have good news and bad news. Good news: here’s a <a href="http://willthompson.co.uk/bustle/releases/bustle-0.3.1-i486.tar.bz2">32-bit binary tarball</a>. Bad news: seems like Debian and Fedora have differently-sonamed libpcaps. Why is distributing software so tedious?</p></div>
    </content>
    <updated>2012-01-09T19:05:53Z</updated>
    <category term="Uncategorized"/>
    <author>
      <name>Will Thompson</name>
    </author>
    <source>
      <id>http://blogs.gnome.org/wjjt</id>
      <link href="http://blogs.gnome.org/wjjt/feed/" rel="self" type="application/atom+xml"/>
      <link href="http://blogs.gnome.org/wjjt" rel="alternate" type="text/html"/>
      <subtitle>wjt</subtitle>
      <title>This is not your bugtracker.</title>
      <updated>2012-02-05T12:45:35Z</updated>
    </source>
  </entry>

  <entry xml:lang="en">
    <id>http://blogs.gnome.org/uraeus/?p=1780</id>
    <link href="http://blogs.gnome.org/uraeus/2012/01/06/transmageddon-runs-with-gstreamer-0-11/" rel="alternate" type="text/html"/>
    <title>Christian Schaller: Transmageddon runs with GStreamer 0.11</title>
    <summary>After updating GStreamer and doing a couple of small fixes I managed to make Transmageddon work with the GTK3 and the 0.11 branch of GStreamer. Obligatory screenshot below. As you might guess from looking at the screenshot there are still some issues that needs solving, but I am happy that I managed to get this [...]</summary>
    <content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><p>After updating GStreamer and doing a couple of small fixes I managed to make <a href="http://www.linuxrising.org">Transmageddon</a> work with the GTK3 and the 0.11 branch of GStreamer. Obligatory screenshot below. As you might guess from looking at the screenshot there are still some issues that needs solving, but<br/>
I am happy that I managed to get this far.</p>
<div class="wp-caption alignleft" id="attachment_1781" style="width: 626px;"><a href="http://blogs.gnome.org/uraeus/files/2012/01/transmageddon-gtk3-gst-0.11.png"><img alt="Screenshot of development Transmageddon" class="size-full wp-image-1781" height="279" src="http://blogs.gnome.org/uraeus/files/2012/01/transmageddon-gtk3-gst-0.11.png" width="308"/></a><p class="wp-caption-text">Transmageddon running GTK3 and GStreamer 0.11/1.0</p></div>
<p>Hopefully it is a sign that the upcoming <a href="http://gstreamer.freedesktop.org/wiki/GStreamerHackfest2012">GStreamer hackfest in Malaga</a> will be a great successful everyone who is participating.</p>
<p>I hope the remainder of the porting effort will be relatively simple as I would love to get back to working on real features instead of just updating old functionality to use a new backend to do the same. Having had a need for Transmageddon for a couple of work related tasks recently a couple of items, like batch job programming has moved up my priorities list.</p></div>
    </content>
    <updated>2012-01-06T18:48:25Z</updated>
    <category term="General"/>
    <category term="GNOME"/>
    <category term="GStreamer"/>
    <category term="Transmageddon"/>
    <category term="Collabora"/>
    <category term="gstreamer"/>
    <category term="transmageddon"/>
    <author>
      <name>uraeus</name>
    </author>
    <source>
      <id>http://blogs.gnome.org/uraeus</id>
      <link href="http://blogs.gnome.org/uraeus/feed/" rel="self" type="application/atom+xml"/>
      <link href="http://blogs.gnome.org/uraeus" rel="alternate" type="text/html"/>
      <subtitle>GStreamer and Collabora news and more</subtitle>
      <title>Christian Schaller</title>
      <updated>2012-02-05T12:45:18Z</updated>
    </source>
  </entry>

  <entry xml:lang="en">
    <id>http://blogs.gnome.org/uraeus/?p=1775</id>
    <link href="http://blogs.gnome.org/uraeus/2012/01/04/gustavo-noronha-silva-interview-about-webkit/" rel="alternate" type="text/html"/>
    <title>Christian Schaller: Gustavo Noronha Silva Interview about WebKit</title>
    <summary>Just posted another interview on the Collabora website, this time with Gustavo Noronha Silva talking about WebKit and some of the work he and Collabora are doing around that project. So be sure to check it out if you want to learn more about things like WebKit and Clutter integration and how WebKit impacts the [...]</summary>
    <content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><p>Just posted another interview on the Collabora website, this time with <a href="http://www.collabora.com/about/webkit-interview/">Gustavo Noronha Silva talking about WebKit</a> and some of the work he and Collabora are doing around that project. So be sure to check it out if you want to learn more about things like WebKit and Clutter integration and how WebKit impacts the GNOME platform.</p></div>
    </content>
    <updated>2012-01-04T14:09:54Z</updated>
    <category term="Collabora"/>
    <category term="General"/>
    <category term="GNOME"/>
    <category term="Telepathy"/>
    <category term="gnome"/>
    <author>
      <name>uraeus</name>
    </author>
    <source>
      <id>http://blogs.gnome.org/uraeus</id>
      <link href="http://blogs.gnome.org/uraeus/feed/" rel="self" type="application/atom+xml"/>
      <link href="http://blogs.gnome.org/uraeus" rel="alternate" type="text/html"/>
      <subtitle>GStreamer and Collabora news and more</subtitle>
      <title>Christian Schaller</title>
      <updated>2012-02-05T12:45:18Z</updated>
    </source>
  </entry>

  <entry xml:lang="en">
    <id>http://blogs.gnome.org/wjjt/?p=725</id>
    <link href="http://blogs.gnome.org/wjjt/2012/01/04/yesod-web-application-dependencies/" rel="alternate" type="text/html"/>
    <title>Will Thompson: Yesod web application dependencies</title>
    <summary>I have been experimenting with using Yesod to throw together a web application or two. My experience so far has been broadly positive—if you like computers to check things for you, I recommend it.1 That said, watching the full chain of dependencies fly past was moderately entertaining:2 parsec-3.1.2 An excellent parser-combinator library, widely imitated. This [...]</summary>
    <content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><p>I have been experimenting with using <a href="http://www.yesodweb.com/">Yesod</a> to throw together a web application or two. My experience so far has been broadly positive—if you like computers to check things for you, I recommend it.<sup><a class="footnote-link footnote-identifier-link" href="http://blogs.gnome.org/wjjt/2012/01/04/yesod-web-application-dependencies/#footnote_0_725" id="identifier_0_725" title="assuming you like deciphering compiler error messages when the computer says no, that is">1</a></sup> That said, watching the full chain of dependencies fly past was moderately entertaining:<sup><a class="footnote-link footnote-identifier-link" href="http://blogs.gnome.org/wjjt/2012/01/04/yesod-web-application-dependencies/#footnote_1_725" id="identifier_1_725" title="for a quiet Wednesday morning&#x2026;">2</a></sup></p>
<dl>
<dt><a href="http://hackage.haskell.org/package/parsec-3.1.2">parsec-3.1.2</a></dt>
<dd>
<p>An excellent parser-combinator library, widely imitated. This wouldn’t be funny, except…</p>
</dd>
<dt><a href="http://hackage.haskell.org/package/attoparsec-0.10.1.0">attoparsec-0.10.1.0</a></dt>
<dd>
<p><em>Another</em> excellent parser-combinator library, inspired by parsec.</p>
</dd>
<dt><a href="http://hackage.haskell.org/package/base-unicode-symbols-0.2.2.3">base-unicode-symbols-0.2.2.3</a>
</dt><dt>
</dt><dd>
<p>This defines a bunch of Unicode aliases for standard functions with boring ASCII names. Why write:</p>

<div class="wp_syntax"><div class="code"><pre class="haskell" style="font-family: monospace;">x `<span style="font-weight: bold;">elem</span>` xs</pre></div></div>

<p>when you could write:</p>

<div class="wp_syntax"><div class="code"><pre class="haskell" style="font-family: monospace;">x ∈ xs</pre></div></div>

<p>Invaluable!</p>
</dd>
<dt><a href="http://hackage.haskell.org/package/utf8-light-0.4.0.1">utf8-light-0.4.0.1</a> and <a href="http://hackage.haskell.org/package/utf8-string-0.3.7">utf8-string-0.3.7</a></dt>
<dd>
<p>Two UTF-8 encoding libraries!</p>
</dd>
<dt><a href="http://hackage.haskell.org/package/semigroups">semigroups-0.8</a></dt>
<dd>
<blockquote>
<p>“In mathematics, a semigroup is an algebraic structure consisting of a set together with an associative binary operation. A semigroup generalizes a monoid in that there might not exist an identity element. It also (originally) generalized a group (a monoid with all inverses) to a type where every element did not have to have an inverse, thus the name semigroup.”</p>
</blockquote></dd>
</dl>
<ol class="footnotes"><li class="footnote" id="footnote_0_725">assuming you like deciphering compiler error messages when the computer says no, that is</li><li class="footnote" id="footnote_1_725">for a quiet Wednesday morning…</li></ol></div>
    </content>
    <updated>2012-01-04T10:58:28Z</updated>
    <category term="Uncategorized"/>
    <category term="haskell"/>
    <author>
      <name>Will Thompson</name>
    </author>
    <source>
      <id>http://blogs.gnome.org/wjjt</id>
      <link href="http://blogs.gnome.org/wjjt/feed/" rel="self" type="application/atom+xml"/>
      <link href="http://blogs.gnome.org/wjjt" rel="alternate" type="text/html"/>
      <subtitle>wjt</subtitle>
      <title>This is not your bugtracker.</title>
      <updated>2012-02-05T12:45:35Z</updated>
    </source>
  </entry>

  <entry xml:lang="en">
    <id>http://blogs.gnome.org/rodrigo/?p=497</id>
    <link href="http://blogs.gnome.org/rodrigo/2012/01/03/new-beginning/" rel="alternate" type="text/html"/>
    <title>Rodrigo Moya: New beginning</title>
    <summary>I guess it is time to announce that since yesterday I am working at Collabora, a UK-based company very well known for its work in several free software projects, like Telepathy, Farstream, GStreamer and others. Haven’t had much time really to transition (and relax) from Canonical to Collabora, apart from last week, which I spent [...]</summary>
    <content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><p>I guess <a href="http://blogs.gnome.org/rodrigo/2011/12/19/leaving-canonical/">it is time</a> to announce that since yesterday I am working at <a href="http://www.collabora.com">Collabora</a>, a UK-based company very well known for its work in several free software projects, like <a href="http://telepathy.freedesktop.org/">Telepathy</a>, <a href="http://farsight.freedesktop.org/">Farstream</a>, <a href="http://gstreamer.freedesktop.org/">GStreamer</a> and others.</p>
<p>Haven’t had much time really to transition (and relax) from <a href="http://www.canonical.com">Canonical</a> to Collabora, apart from last week, which I spent skiing, but hey, <i>new year, new life</i>, as we say in Spain, so the sooner you start with your new life, the better.</p></div>
    </content>
    <updated>2012-01-03T15:17:10Z</updated>
    <category term="Collabora"/>
    <category term="freedesktop.org"/>
    <category term="GNOME"/>
    <category term="Linux"/>
    <category term="Technology"/>
    <author>
      <name>rodrigo</name>
    </author>
    <source>
      <id>http://blogs.gnome.org/rodrigo</id>
      <link href="http://blogs.gnome.org/rodrigo/feed/" rel="self" type="application/atom+xml"/>
      <link href="http://blogs.gnome.org/rodrigo" rel="alternate" type="text/html"/>
      <subtitle>From lost to the river</subtitle>
      <title>Rodrigo Moya</title>
      <updated>2012-02-05T12:30:39Z</updated>
    </source>
  </entry>

  <entry>
    <id>http://robswain.tumblr.com/post/15234704977</id>
    <link href="http://robswain.tumblr.com/post/15234704977" rel="alternate" type="text/html"/>
    <title>Robert Swain: Nokia N9</title>
    <summary type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><p><a href="http://www.collabora.com/" title="Collabora Ltd">Collabora Ltd</a>, my employer for the past few years, was kind enough to give every employee the option of a <a href="http://swipe.nokia.com/" title="Nokia N9">Nokia N9</a> as a sort of Christmas bonus.</p>
<p>Two years ago Collabora gifted Nokia N900s to employees and the microphone in mine had just ceased to function so the new N9 was a very welcome replacement.</p>
<p>A number of us at Collabora have been working on MeeGo and Maemo  before it though I myself am a relative newcomer having worked on the  camera software since February 2011. I’m certainly proud to have worked on the N9 as it is a solid and well-performing phone despite still being a single core ARM Cortex-A8.</p>
<p>The user interface follows an interaction method Nokia have dubbed ‘swipe’. The name tells all - most interaction methods for moving between screens and applications involve swipes from an edge of the screen. It’s very simple and works well to traverse the environment.</p>
<p>There are three screens on a virtual carousel - an application grid common to most mobile phones, an open tasks grid with thumbnail tiles and a feed of updates from various sources (Facebook, Twitter, etc.). You can read more in reviews or have a look at some videos if you wish.</p>
<p>With the N900, honestly I didn’t feel comfortable using it too much as it was quite slow to do lots of things, especially web browsing. Browsing on the N9 is smooth and fast. As such, I now have some mobile internet allowance on a contract so I’m sure I’ll be playing around with connected programs much more on the N9.</p>
<p>One very nice feature on the phone when moving from the N900 was that I could transfer all my contacts and calendar and some other things via bluetooth. It would have been super nice if I could have also transferred photos, music, old conversations and more, but just the simplicity and capability to transfer contacts is awesome.</p>
<p>Scrolling is silky smooth, the camera is fast and high quality for both still images and video, call quality seems pretty good but I haven’t spoken to anyone with a newer phone yet to be able to tell properly, the interface is shiny and simple, the hardware is spot on in terms of size and the screen is beautiful. Battery life is very good, though will obviously diminish more quickly if you’re playing 3D games or so. Integration with web services seems pretty good though I want to see if I can make it automatically upload photos to Google Picasa, Flickr or so. It can act as a wifi hotspot. The maps app is slow to start but locks onto my location quickly and allows one to download maps for offline/minimal mobile bandwidth use which is a huge plus when travelling. There’s even a digital compass built in, though I would be interested to test its accuracy.</p>
<p>The only weakness I see so far is the limited number of interesting apps available. It has Angry Birds, Need for Speed: Shift, Solitaire, sudoku and some other games I haven’t yet tried.</p>
<p>My personal verdict, with the current PR1.1 release of the software is that it is a beautiful, solid and well-connected phone that I will certainly enjoy using and as a consequence will see far more use. Also, if the N900 is anything to go by and if any more updates make it out of the door, the phone will improve further with time. :)</p></div>
    </summary>
    <updated>2012-01-03T09:10:00Z</updated>
    <source>
      <id>http://robswain.tumblr.com/</id>
      <author>
        <name>Robert Swain</name>
      </author>
      <link href="http://tumblr.superfeedr.com/" rel="hub" type="text/html"/>
      <link href="http://robswain.tumblr.com/" rel="alternate" type="text/html"/>
      <link href="http://robswain.tumblr.com/rss" rel="self" type="application/rss+xml"/>
      <subtitle>software development, configuration, multimedia and other random and helpful things</subtitle>
      <title>Rob Swain about stuff</title>
      <updated>2012-02-05T12:46:39Z</updated>
    </source>
  </entry>

  <entry xml:lang="en">
    <id>http://blogs.gnome.org/danni/?p=387</id>
    <link href="http://blogs.gnome.org/danni/2012/01/01/creating-m4am4r-files-with-gst-launch-gstreamer/" rel="alternate" type="text/html"/>
    <title>Danielle Madeley: creating m4a/m4r files with gst-launch (gstreamer)</title>
    <summary type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml">Since it’s annoyingly hard to work out what muxer to use for m4a files, and I don’t have a profile for encodebin, here’s the gst-launch command to make m4a or m4r (ringtone) files. gst-launch filesrc location=input.file ! decodebin2 ! audioconvert … <a href="http://blogs.gnome.org/danni/2012/01/01/creating-m4am4r-files-with-gst-launch-gstreamer/">Continue reading <span class="meta-nav">→</span></a></div>
    </summary>
    <content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><p>Since it’s annoyingly hard to work out what muxer to use for m4a files, and I don’t have a profile for encodebin, here’s the gst-launch command to make m4a or m4r (ringtone) files.</p>
<p><code>gst-launch filesrc location=<i>input.file</i> ! decodebin2 ! audioconvert ! faac ! ffmux_mp4 ! filesink location=<i>output.m4a</i></code></p></div>
    </content>
    <updated>2012-01-01T04:52:02Z</updated>
    <category term="Uncategorized"/>
    <author>
      <name>Danielle</name>
    </author>
    <source>
      <id>http://blogs.gnome.org/danni</id>
      <link href="http://blogs.gnome.org/danni/feed/" rel="self" type="application/atom+xml"/>
      <link href="http://blogs.gnome.org/danni" rel="alternate" type="text/html"/>
      <link href="http://creativecommons.org/licenses/by-nc-nd/2.5/au/" rel="license"/>
      <subtitle>Danielle's technical stuffs</subtitle>
      <title>scrambled tofu</title>
      <updated>2012-02-05T12:45:21Z</updated>
    </source>
  </entry>

  <entry xml:lang="en">
    <id>http://blogs.gnome.org/danni/?p=383</id>
    <link href="http://blogs.gnome.org/danni/2011/12/28/kpartx-mounting-partitions-inside-disk-images/" rel="alternate" type="text/html"/>
    <title>Danielle Madeley: kpartx – mounting partitions inside disk images</title>
    <summary type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml">This is a neat trick, and so I thought worth reblogging. I was handed a corrupt SD memory card yesterday and asked if I could try and get some Christmas photos off it. Typically, the first thing I did was … <a href="http://blogs.gnome.org/danni/2011/12/28/kpartx-mounting-partitions-inside-disk-images/">Continue reading <span class="meta-nav">→</span></a></div>
    </summary>
    <content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><p>This is a neat trick, and so I thought worth reblogging. I was handed a corrupt SD memory card yesterday and asked if I could try and get some Christmas photos off it.</p>
<p>Typically, the first thing I did was image the card with ddrescue (package gddrescue in Debian/Ubuntu), confirming that the partition table was intact, it looks like the problem was a corrupted FAT, so I wanted to run fsck on the partition.</p>
<p>Back in the day this would have involved either dd-ing the partition out of the image, or re-imaging the card, both slow, or screwing around with loopback offsets. Instead I discovered a tool called <a href="http://www.forensicswiki.org/wiki/Mounting_Disk_Images#kpartx">kpartx</a> which maps the partitions from the image into the device mapper, giving a device like <tt>/dev/mapper/loop0p1</tt>, which can be used like a regular block device.</p>
<p>~</p>
<p>Unfortunately while different, both FATs were damaged, and has been incorrectly repaired by something, and I ended up recovering the files with <a href="http://www.cgsecurity.org/wiki/PhotoRec">photorec</a> instead.</p></div>
    </content>
    <updated>2011-12-28T03:22:00Z</updated>
    <category term="Uncategorized"/>
    <author>
      <name>Danielle</name>
    </author>
    <source>
      <id>http://blogs.gnome.org/danni</id>
      <link href="http://blogs.gnome.org/danni/feed/" rel="self" type="application/atom+xml"/>
      <link href="http://blogs.gnome.org/danni" rel="alternate" type="text/html"/>
      <link href="http://creativecommons.org/licenses/by-nc-nd/2.5/au/" rel="license"/>
      <subtitle>Danielle's technical stuffs</subtitle>
      <title>scrambled tofu</title>
      <updated>2012-02-05T12:45:22Z</updated>
    </source>
  </entry>

  <entry xml:lang="en">
    <id>http://blogs.gnome.org/danni/?p=379</id>
    <link href="http://blogs.gnome.org/danni/2011/12/28/linux-work-available-in-perth-australia-2/" rel="alternate" type="text/html"/>
    <title>Danielle Madeley: Linux work available in Perth, Australia</title>
    <summary type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml">Happy new year, everyone! Once again my former employer, Fugro Seismic Imaging, is looking for two new R&amp;D staff for their office in Perth, Western Australia (one to replace someone who’s moving on, and another to grow the team). The … <a href="http://blogs.gnome.org/danni/2011/12/28/linux-work-available-in-perth-australia-2/">Continue reading <span class="meta-nav">→</span></a></div>
    </summary>
    <content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><p>Happy new year, everyone!</p>
<p>Once again my former employer, <a href="http://www.fugro-fsi.com/">Fugro Seismic Imaging</a>, is looking for two new R&amp;D staff for their office in Perth, Western Australia (one to replace someone who’s moving on, and another to grow the team).</p>
<p>The team there is approximately half a dozen people, generally open-source experienced, who are primarily developing graphical front ends to geophysics applications (there’s also some other stuff, in general it’s pretty cool). You’ll almost certainly have to know C. Knowing any of C++, Python, Perl, GTK+, Qt or Fortran also a benefit. You don’t have to know any geophysics, but knowing a bit of maths and physics helps. You’ll easily pick up what you don’t know as you go along.</p>
<p>Pay and conditions are very good. FSI have previously provided sponsored work visas for skilled applicants looking to work in Australia.</p>
<p>If you’re interested, send your CV to the regional manager, <a href="mailto:k.beauglehole@fugro-fsi.com.au">Kelly Beauglehole</a>.</p></div>
    </content>
    <updated>2011-12-28T03:07:34Z</updated>
    <category term="Uncategorized"/>
    <author>
      <name>Danielle</name>
    </author>
    <source>
      <id>http://blogs.gnome.org/danni</id>
      <link href="http://blogs.gnome.org/danni/feed/" rel="self" type="application/atom+xml"/>
      <link href="http://blogs.gnome.org/danni" rel="alternate" type="text/html"/>
      <link href="http://creativecommons.org/licenses/by-nc-nd/2.5/au/" rel="license"/>
      <subtitle>Danielle's technical stuffs</subtitle>
      <title>scrambled tofu</title>
      <updated>2012-02-05T12:45:22Z</updated>
    </source>
  </entry>
</feed>

