<?xml version="1.0"?>
<rdf:RDF
	xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:foaf="http://xmlns.com/foaf/0.1/"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns="http://purl.org/rss/1.0/"
>
<channel rdf:about="http://rsalveti.net/planet/">
	<title>Planet INdT</title>
	<link>http://rsalveti.net/planet/</link>
	<description>Planet INdT - http://rsalveti.net/planet/</description>

	<items>
		<rdf:Seq>
			<rdf:li rdf:resource="http://ianlawrence.info/random-stuff/microsoft-education-delivery" />
			<rdf:li rdf:resource="http://franciscoalecrim.com/blog/?p=338" />
			<rdf:li rdf:resource="http://ianlawrence.info/random-stuff/jozian-ltd" />
			<rdf:li rdf:resource="http://baraujo.net/blog/?p=235" />
			<rdf:li rdf:resource="http://baraujo.net/blog/?p=195" />
			<rdf:li rdf:resource="http://labs.danilocesar.com/blog/?p=208" />
			<rdf:li rdf:resource="http://blog.ademar.org/?p=1316" />
			<rdf:li rdf:resource="http://baraujo.net/blog/?p=188" />
			<rdf:li rdf:resource="http://ianlawrence.info/random-stuff/making-magic" />
			<rdf:li rdf:resource="http://ianlawrence.info/random-stuff/a-bitcoin-project" />
			<rdf:li rdf:resource="http://baraujo.net/blog/?p=159" />
			<rdf:li rdf:resource="http://lizardo.wordpress.com/?p=264" />
			<rdf:li rdf:resource="http://blog.morpheuz.cc/?p=370" />
			<rdf:li rdf:resource="http://earruda.eti.br/blog/?p=434" />
			<rdf:li rdf:resource="http://labs.danilocesar.com/blog/?p=177" />
			<rdf:li rdf:resource="http://baraujo.net/blog/?p=128" />
			<rdf:li rdf:resource="http://baraujo.net/blog/?p=123" />
			<rdf:li rdf:resource="http://baraujo.net/blog/?p=106" />
			<rdf:li rdf:resource="http://baraujo.net/blog/?p=81" />
			<rdf:li rdf:resource="http://savago.wordpress.com/?p=468" />
			<rdf:li rdf:resource="http://blog.ademar.org/?p=1247" />
			<rdf:li rdf:resource="http://66.228.57.220/blog/?p=1" />
			<rdf:li rdf:resource="http://savago.wordpress.com/?p=458" />
			<rdf:li rdf:resource="http://rsalveti.wordpress.com/?p=521" />
			<rdf:li rdf:resource="http://atdrez.wordpress.com/?p=3" />
			<rdf:li rdf:resource="http://atdrez.wordpress.com/?p=86" />
			<rdf:li rdf:resource="http://rsalveti.wordpress.com/?p=475" />
			<rdf:li rdf:resource="http://blog.morpheuz.cc/?p=367" />
			<rdf:li rdf:resource="http://ianlawrence.info/random-stuff/advances-in-mobile-data-collection-nokia-data-gathering-4.04" />
			<rdf:li rdf:resource="http://anselmolsm.org/?p=1567" />
			<rdf:li rdf:resource="tag:blogger.com,1999:blog-8974121210221508485.post-69735282544240023" />
			<rdf:li rdf:resource="http://anselmolsm.org/?p=1556" />
			<rdf:li rdf:resource="http://rsalveti.wordpress.com/?p=450" />
			<rdf:li rdf:resource="http://rsalveti.wordpress.com/?p=390" />
			<rdf:li rdf:resource="http://rsalveti.wordpress.com/?p=421" />
			<rdf:li rdf:resource="http://rsalveti.wordpress.com/?p=343" />
			<rdf:li rdf:resource="http://blog.ademar.org/?p=1213" />
			<rdf:li rdf:resource="http://rsalveti.wordpress.com/?p=317" />
			<rdf:li rdf:resource="http://blog.morpheuz.cc/?p=349" />
			<rdf:li rdf:resource="http://labs.danilocesar.com/blog/?p=131" />
			<rdf:li rdf:resource="http://ianlawrence.info/random-stuff/tangaza-or-announce-in-swahili" />
			<rdf:li rdf:resource="http://blog.morpheuz.cc/?p=336" />
			<rdf:li rdf:resource="http://savago.wordpress.com/?p=444" />
			<rdf:li rdf:resource="http://savago.wordpress.com/?p=414" />
			<rdf:li rdf:resource="http://savago.wordpress.com/?p=415" />
			<rdf:li rdf:resource="http://savago.wordpress.com/?p=372" />
			<rdf:li rdf:resource="http://rsalveti.wordpress.com/?p=300" />
			<rdf:li rdf:resource="http://rsalveti.wordpress.com/?p=266" />
			<rdf:li rdf:resource="http://www.anselmolsm.org/blog/?p=1346" />
			<rdf:li rdf:resource="http://blog.aloisiojr.com/?p=33" />
			<rdf:li rdf:resource="http://blog.aloisiojr.com/?p=32" />
			<rdf:li rdf:resource="http://www.anselmolsm.org/blog/?p=1338" />
			<rdf:li rdf:resource="http://ianlawrence.info/random-stuff/evaluating-projects-for-their-return-on-social-investment" />
			<rdf:li rdf:resource="tag:blogger.com,1999:blog-13725649.post-892456867409260350" />
			<rdf:li rdf:resource="http://ianlawrence.info/random-stuff/software-shortlisted-for-sustainability-award" />
			<rdf:li rdf:resource="http://www.setantas.net/blog/?p=517" />
			<rdf:li rdf:resource="http://www.setantas.net/blog/?p=512" />
			<rdf:li rdf:resource="http://blog.ademar.org/?p=1187" />
			<rdf:li rdf:resource="tag:blogger.com,1999:blog-36235783.post-368400671338074215" />
			<rdf:li rdf:resource="http://franciscoalecrim.com/blog/?p=329" />
		</rdf:Seq>
	</items>
</channel>

<item rdf:about="http://ianlawrence.info/random-stuff/microsoft-education-delivery">
	<title>Ian Lawrence: Microsoft Education Delivery</title>
	<link>http://ianlawrence.info/random-stuff/microsoft-education-delivery</link>
	<content:encoded>&lt;img src=&quot;http://ianlawrence.info/random-stuff/images/med-1&quot; /&gt;&lt;br /&gt;
We spent last year designing and creating MED so it was nice to find &lt;a href=&quot;https://mix.office.com/watch/5fg08t5659tc&quot;&gt;this video&lt;/a&gt; created by Microsoft explaining what it is and how it works&lt;br /&gt;</content:encoded>
	<dc:date>2015-08-07T17:06:43+00:00</dc:date>
</item>
<item rdf:about="http://franciscoalecrim.com/blog/?p=338">
	<title>Francisco Alecrim: SCRUM  primeiros passos</title>
	<link>http://franciscoalecrim.com/blog/2012/01/23/scrum-primeiros-passos/</link>
	<content:encoded>&lt;p&gt;Esta semana recebi o e-mail de um amigo que está tentando implantar SCRUM no time que está liderando. Quando trabalhavamos juntos na BRISA tecnologia, fiz uma apresentação sobre o assunto e tentei implantar SCRUM em um dos times. Abaixo seguem alguns links e apresentações que recomendo.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://www.mountaingoatsoftware.com/topics/scrum&quot;&gt;Introduction to Scrum &amp;#8211; An Agile Process&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.slideshare.net/macaubas/seminario-scrum-presentation&quot;&gt;Gestao agil de projetos com Scrum&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.infoq.com/br/minibooks/scrum-xp-from-the-trenches&quot;&gt;InfoQ: Scrum e XP direto das Trincheiras&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;&lt;/div&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;O link abaixo leva para a apresentação que modifiquei para o time do MegaRushing.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt; &lt;a href=&quot;http://franciscoalecrim.com/down/tmp/seminario-scrum-1222222884379353-9_modificado_alecrim.pdf&quot;&gt;Introdução SCRUM &amp;#8211; modificado por Alecrim [ PDF ]&lt;/a&gt;  &lt;a href=&quot;http://franciscoalecrim.com/down/tmp/seminario-scrum-1222222884379353-9_modificado_alecrim.odp&quot;&gt;[ ODP ]&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;&lt;/div&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</content:encoded>
	<dc:date>2015-05-21T04:24:28+00:00</dc:date>
	<dc:creator>Francisco Keppler Silva Alecrim</dc:creator>
</item>
<item rdf:about="http://ianlawrence.info/random-stuff/jozian-ltd">
	<title>Ian Lawrence: Jozian Ltd</title>
	<link>http://ianlawrence.info/random-stuff/jozian-ltd</link>
	<content:encoded>Needed to make a Company Presentation recently so thought I would &lt;a href=&quot;http://ianlawrence.info/random-stuff/images/jozian&quot;&gt;add it here&lt;/a&gt;.

&lt;br /&gt;</content:encoded>
	<dc:date>2015-04-06T14:35:34+00:00</dc:date>
</item>
<item rdf:about="http://baraujo.net/blog/?p=235">
	<title>Bruno Araujo: Unity3D: Typing effect with sound for Text UI components</title>
	<link>http://baraujo.net/blog/?p=235</link>
	<content:encoded>&lt;p&gt;Learning and understanding the concepts of &lt;a href=&quot;http://unity3d.com/&quot; target=&quot;_blank&quot;&gt;Unity3D&lt;/a&gt; is no easy feat, as anyone starting to use the engine can attest, but at the same time is a great experience not only in the programming side but also in the game design one. In the spirit of giving back to the awesome game development community and also to the Unity3D community, I’ll be sharing some insights and techniques that I’ve learned in the process.&lt;/p&gt;
&lt;p&gt;One of the results of this process is a demo with some UI features. You can see the demo in action &lt;a href=&quot;http://baraujo.net/introdemo&quot; target=&quot;_blank&quot;&gt;here&lt;/a&gt; (Windows only), and there is a (rather heavy) GIF &lt;a href=&quot;http://baraujo.net/introdemo/introdemo.gif&quot; target=&quot;_blank&quot;&gt;here&lt;/a&gt;, if you can’t use Unity WebPlayer for any reason.&lt;/p&gt;
&lt;p&gt;There are three things happening in the demo: transitions between three Canvas components, the text typing effect with sound and the rotating background. For this post, I’ll be discussing the second feature; links for posts discussing the other topics will be at the end of the post.&lt;/p&gt;
&lt;p&gt;For making the typing effect, you just have to display the desired text letter by letter, with a small delay, as they would appear if a person were typing them. But first things first: create an Text component in the hierarchy and give it a name; in this example the Canvas will be called IntroCanvas and the Text will be called LeftTitle. As in the &lt;a href=&quot;http://baraujo.net/blog/?p=195&quot; target=&quot;_blank&quot;&gt;previous post&lt;/a&gt;, create a script and add it under a GameObject, usually an empty one, then save in it a reference to IntroCanvas and to the Text component.&lt;/p&gt;
&lt;pre class=&quot;brush: csharp; title: ; notranslate&quot;&gt;
using UnityEngine;
using UnityEngine.UI;
using System.Collections;

public class Director : MonoBehaviour {
    private GameObject introCanvas;
    private Text leftTitle;

    void Awake() {
        introCanvas = GameObject.Find(&amp;quot;IntroCanvas&amp;quot;);
        leftTitle = introCanvas.transform.Find(&amp;quot;LeftTitle&amp;quot;).
            GetComponent&amp;lt;Text&amp;gt;();
    }
}

&lt;/pre&gt;
&lt;p&gt;The function below receives a Text component and gradually fills it with the desired text, blinking a simulated cursor a couple times. The &lt;em&gt;speed&lt;/em&gt; parameter is the delay between letters in seconds. In a nutshell, this function simulates a blinking cursor twice and then proceeds to write the text.&lt;/p&gt;
&lt;pre class=&quot;brush: csharp; title: ; notranslate&quot;&gt;
IEnumerator writeText(Text obj, string text, float speed) {
    string gradualText = &amp;quot;&amp;quot;;
    obj.text = &amp;quot;_&amp;quot;;
    yield return new WaitForSeconds(0.2f);
    obj.text = &amp;quot; &amp;quot;;
    yield return new WaitForSeconds(0.2f);
    obj.text = &amp;quot;_&amp;quot;;
    yield return new WaitForSeconds(0.2f);
    obj.text = &amp;quot; &amp;quot;;
    yield return new WaitForSeconds(0.2f);
    obj.text = &amp;quot;&amp;quot;;
    for (int i = 0; i &amp;lt; text.Length; i++) {
        gradualText += text[i];
        obj.text = gradualText + &amp;quot;_&amp;quot;;
        yield return new WaitForSeconds(speed);
    }
    obj.text = text;
}
&lt;/pre&gt;
&lt;p&gt;An usage example of this function:&lt;/p&gt;
&lt;pre class=&quot;brush: csharp; title: ; notranslate&quot;&gt;
public void animateLeftTitle(){
    StartCoroutine(writeText(left, &amp;quot;main title&amp;quot;, 0.25f));
}
&lt;/pre&gt;
&lt;p&gt;For a discussion about StartCoroutine(), you can take a look at the official &lt;a href=&quot;http://docs.unity3d.com/Manual/Coroutines.html&quot; target=&quot;_blank&quot;&gt;Unity Manual&lt;/a&gt; about it. In a few words this allows functions to be executed over many frames, instead of having to finish entirely on the current frame, like Update() does. The &lt;em&gt;yield&lt;/em&gt; statement tells the function to stop and resume in the next frame.&lt;/p&gt;
&lt;p&gt;Now, let&amp;#8217;s add some sounds! For each letter we&amp;#8217;ll playing a short &amp;#8220;switch&amp;#8221; sound, randomly chosen from a pool for giving the illusion of pressing keys in a real keyboard. I&amp;#8217;ve used a set of sound assetrs that I already had (you can get them and a lot of other assets &lt;a href=&quot;http://kenney.itch.io/kenney-donation&quot; target=&quot;_blank&quot;&gt;here&lt;/a&gt;). For this task, as done with the Director, create an empty object and attach a script to it; I&amp;#8217;ll call it TypingSoundPlayer.cs, and call the object TypingAudioSource.&lt;/p&gt;
&lt;pre class=&quot;brush: csharp; title: ; notranslate&quot;&gt;
using UnityEngine;
using System.Collections;

public class TypingSoundPlayer : MonoBehaviour {

    private AudioClip[] typingSounds;
    private AudioSource audioSource;
    private int size;

    void Awake () {
        int i = 0;
        audioSource = GameObject.Find(&amp;quot;TypingAudioSource&amp;quot;).GetComponent&amp;lt;AudioSource&amp;gt;();
        Object[] objSounds = Resources.LoadAll(&amp;quot;Audio&amp;quot;);
        size = objSounds.Length;
        typingSounds = new AudioClip[size];
        foreach (Object obj in objSounds)
        {
            typingSounds[i] = obj as AudioClip;
            i++;
        }
    }

    public IEnumerator playTypingSound()
    {
        audioSource.PlayOneShot(typingSounds[Random.Range(0, size - 1)]);
        yield return null;
    }

}
&lt;/pre&gt;
&lt;p&gt;This script will load all sounds and put them in an array at the Awake() function, and now the writeText() function just have to call playTypingSound() for playing a random sound from the array. The modified Director class can be seen below:&lt;/p&gt;
&lt;pre class=&quot;brush: csharp; title: ; notranslate&quot;&gt;
using UnityEngine;
using UnityEngine.UI;
using System.Collections;

public class Director : MonoBehaviour {

    private GameObject introCanvas;
    private Text leftTitle;
    private TypingSoundPlayer typingSound;

    void Awake() {
        introCanvas = GameObject.Find(&amp;quot;IntroCanvas&amp;quot;);
        typingSound = GameObject.Find(&amp;quot;TypingAudioSource&amp;quot;).GetComponent&amp;lt;TypingSoundPlayer&amp;gt;();
    }

    IEnumerator writeText(Text obj, string text, float speed) {
        string gradualText = &amp;quot;&amp;quot;;
        obj.text = &amp;quot;_&amp;quot;;
        yield return new WaitForSeconds(0.2f);
        obj.text = &amp;quot; &amp;quot;;
        yield return new WaitForSeconds(0.2f);
        obj.text = &amp;quot;_&amp;quot;;
        yield return new WaitForSeconds(0.2f);
        obj.text = &amp;quot; &amp;quot;;
        yield return new WaitForSeconds(0.2f);
        obj.text = &amp;quot;&amp;quot;;
        for (int i = 0; i &amp;lt; text.Length; i++) {
            gradualText += text[i];
            obj.text = gradualText + &amp;quot;_&amp;quot;;
            StartCoroutine(typingSound.playTypingSound());
            yield return new WaitForSeconds(speed);
        }
        obj.text = text;
    }
&lt;/pre&gt;
&lt;p&gt;Now after each text update typingSound.playTypingSound() is called, giving the desired sound effect.&lt;/p&gt;
&lt;p&gt;You can go to the other two related posts: &lt;a href=&quot;http://baraujo.net/blog/?p=195&quot; target=&quot;_blank&quot;&gt;using multiple canvases&lt;/a&gt; or make a rotating background (soon).&lt;/p&gt;</content:encoded>
	<dc:date>2015-02-11T18:24:04+00:00</dc:date>
</item>
<item rdf:about="http://baraujo.net/blog/?p=195">
	<title>Bruno Araujo: Unity3D: Using multiple Canvas components for switching UI components on the fly</title>
	<link>http://baraujo.net/blog/?p=195</link>
	<content:encoded>&lt;p&gt;Learning and understanding the concepts of &lt;a href=&quot;http://unity3d.com/&quot; target=&quot;_blank&quot;&gt;Unity3D&lt;/a&gt; is no easy feat, as anyone starting to use the engine can attest, but at the same time is a great experience not only in the programming side but also in the game design one. In the spirit of giving back to the awesome game development community and also to the Unity3D community, I&amp;#8217;ll be sharing some insights and techniques that I&amp;#8217;ve learned in the process.&lt;/p&gt;
&lt;p&gt;One of the results of this process is a demo with some UI features. You can see the demo in action &lt;a href=&quot;http://baraujo.net/introdemo&quot; target=&quot;_blank&quot;&gt;here&lt;/a&gt; (Windows only), and there is a (rather heavy) GIF &lt;a href=&quot;http://baraujo.net/introdemo/introdemo.gif&quot; target=&quot;_blank&quot;&gt;here&lt;/a&gt;, if you can&amp;#8217;t use Unity WebPlayer for any reason.&lt;/p&gt;
&lt;p&gt;There are three things happening in the demo: transitions between three Canvas components, the rotating background and the text typing effect with sound. For this post, I’ll be discussing only the first feature; links for posts discussing the other topics will be at the end of the post.&lt;/p&gt;
&lt;p&gt;In this post I&amp;#8217;ll demonstrate how to use more than one Canvas when using Unity UI, allowing the screen to show different UI elements at different moments. Probably someone already devised a better solution, but this one proved to be relatively simple and easy to implement. You&amp;#8217;ll need Unity3D 4.6 or newer for this task, as the new UI was introduced at this version.&lt;/p&gt;
&lt;p&gt;So, in this experiment, I&amp;#8217;ve created three Canvases to hold the UI elements needed:&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://baraujo.net/blog/wp-content/uploads/2015/02/inspector.png&quot;&gt;&lt;img class=&quot;alignright size-full wp-image-202&quot; src=&quot;http://baraujo.net/blog/wp-content/uploads/2015/02/inspector.png&quot; alt=&quot;inspector&quot; width=&quot;140&quot; height=&quot;208&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;IntroCanvas, for showing text corresponding to the main and secondary titles of the game, along with a button;&lt;/li&gt;
&lt;li&gt;StoryCanvas, also displays texts and a button in different positions;&lt;/li&gt;
&lt;li&gt;GameCanvas, which displays a button for resetting the game.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The TranslucentScreen objects are just empty Image components with RGBA values of (0, 0, 0, 170), which gives a dark translucent effect to the canvas.&lt;/p&gt;
&lt;p&gt;The key for using these canvases without one overlapping each other is only enabling the canvas which will be used at the moment; this is possible because all of them inherit from GameObject, and thus inherit the relevant SetActive() function.&lt;/p&gt;
&lt;p&gt;First, create a empty GameObject in the hierarchy, and under it create a new script to hold the transitioning logic; it will be called Director.cs in this example. This script will hold references to the Canvases and active only the first one (IntroCanvas):&lt;/p&gt;
&lt;pre class=&quot;brush: csharp; title: ; notranslate&quot;&gt;
using UnityEngine;
using UnityEngine.UI;
using System.Collections;

public class Director : MonoBehaviour {
    private GameObject introCanvas, gameCanvas, storyCanvas;

    void Awake() {
        introCanvas = GameObject.Find(&amp;quot;IntroCanvas&amp;quot;);
        storyCanvas = GameObject.Find(&amp;quot;StoryCanvas&amp;quot;);
        gameCanvas = GameObject.Find(&amp;quot;GameCanvas&amp;quot;);
    }

    void Start()
    {
        introCanvas.SetActive(true);
        storyCanvas.SetActive(false);
        gameCanvas.SetActive(false);
    }
}
&lt;/pre&gt;
&lt;p&gt;When the scene loads, IntroCanvas will be active and will react to user input. When the user clicks on the &amp;#8220;continue&amp;#8221; button, the UI must change from IntroCanvas to StoryCanvas; this can be done by simply disabling one and enabling the other.&lt;/p&gt;
&lt;p&gt;For an explanation on how to connect the button click event and the function below, you can refer to the video tutorial available &lt;a href=&quot;http://unity3d.com/learn/tutorials/modules/beginner/ui/ui-button&quot; target=&quot;_blank&quot;&gt;here&lt;/a&gt;, around the 8:20 mark.&lt;/p&gt;
&lt;p&gt;So, for this task, you can just call SetActive() directly and call it a day:&lt;/p&gt;
&lt;pre class=&quot;brush: csharp; title: ; notranslate&quot;&gt;
public void switchToStory(){
    introCanvas.SetActive(false);
    storyCanvas.SetActive(true);
}
&lt;/pre&gt;
&lt;p&gt;But what if you want a transitioning effect? A simple and nice effect (IMHO) is fading in and out, which can be accomplished by adjusting the alpha value of the entire canvas. For this, add a CanvasGroup to each Canvas. This component has a convenient alpha variable that will be used for the fading effect, demonstrated in the following functions:&lt;/p&gt;
&lt;pre class=&quot;brush: csharp; title: ; notranslate&quot;&gt;
IEnumerator fadeIn(GameObject obj, float speed) {
    float increment;
    obj.SetActive(true);
    CanvasGroup cv = obj.GetComponent&amp;lt;CanvasGroup&amp;gt;();
    while (cv.alpha &amp;lt; 1) {
        increment = speed * Time.deltaTime;
        if (cv.alpha + increment &amp;gt; 1) cv.alpha = 1;
        else cv.alpha += speed * Time.deltaTime;
        yield return null;
    }
}

IEnumerator fadeOut(GameObject obj, float speed) {
    float increment;
    CanvasGroup cv = obj.GetComponent&amp;lt;CanvasGroup&amp;gt;();
    while (cv.alpha &amp;gt; 0) {
        increment = speed * Time.deltaTime;
        if (cv.alpha - increment &amp;lt; 0) cv.alpha = 0;
        else cv.alpha -= speed * Time.deltaTime;
        yield return null;
    }
    obj.SetActive(false);
}
&lt;/pre&gt;
&lt;p&gt;fadeIn() will activate the object and increment the alpha value until 1, and fadeOut() will decrement it until 0 and disable the object. Just pass the Canvas object to these functions and a fading speed, and all is set. So, we can make the transition like this:&lt;/p&gt;
&lt;pre class=&quot;brush: csharp; title: ; notranslate&quot;&gt;
public void fadeToStory() {
    StartCoroutine(fadeOut(introCanvas, 2.0f));
    StartCoroutine(fadeIn(storyCanvas, 2.0f));
}
&lt;/pre&gt;
&lt;p&gt;In two seconds IntroCanvas will fade out and StoryCanvas will fade in. The same effect is used when transitioning from StoryCanvas to GameCanvas and from GameCanvas back to IntroCanvas.&lt;/p&gt;
&lt;p&gt;You can go to the other two related posts: &lt;a href=&quot;http://baraujo.net/blog/?p=235&quot; target=&quot;_blank&quot;&gt;make a typing effect for text with sound&lt;/a&gt; or make a rotating background (soon).&lt;/p&gt;</content:encoded>
	<dc:date>2015-02-09T05:38:10+00:00</dc:date>
</item>
<item rdf:about="http://labs.danilocesar.com/blog/?p=208">
	<title>Danilo Cesar: A brief discussion about Crosswalk’s JS, JAVA and Native Extensions performance</title>
	<link>http://labs.danilocesar.com/blog/2015/02/05/a-brief-discussion-about-crosswalks-js-java-and-native-extensions-performance/</link>
	<content:encoded>&lt;p&gt;I had a lot of fun recently playing with &lt;a href=&quot;https://crosswalk-project.org/&quot; target=&quot;_blank&quot;&gt;Crosswalk&lt;/a&gt;. I was basically testing it&amp;#8217;s features and extensions when it hit me: I know it&amp;#8217;s possible to write Native extensions for crosswalk Tizen, but is it possible to write Native Extensions for &lt;a href=&quot;https://crosswalk-project.org/documentation/android_extensions.html&quot; target=&quot;_blank&quot;&gt;Crosswalk-android&lt;/a&gt;? How would it behave?&lt;/p&gt;
&lt;p&gt;Crosswalk android already provides a way to load Java extensions, and the &lt;a href=&quot;http://developer.android.com/tools/sdk/ndk/index.html&quot; target=&quot;_blank&quot;&gt;Android-NDK&lt;/a&gt; provides a way to call a native library from a Java method. We just have to glue those things together.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Disclaimer:&lt;/strong&gt;&lt;br /&gt;
I won&amp;#8217;t talk here about &lt;a href=&quot;https://trivedihardik.wordpress.com/2011/06/16/hello-world-example-using-ndk-in-android/&quot; target=&quot;_blank&quot;&gt;how to build a library with NDK&lt;/a&gt; or how to &lt;a href=&quot;https://crosswalk-project.org/documentation/android_extensions/write_an_extension.html&quot; target=&quot;_blank&quot;&gt;write a regular extension with Crosswalk&lt;/a&gt;, as those topics are already extensively covered over the Internet. I assume you already have an library.so and a working crosswalk-android extension from the Tutorials.&lt;/p&gt;
&lt;h4&gt;Adding the .so inside your apk&lt;/h4&gt;
&lt;p&gt;&lt;a href=&quot;https://github.com/crosswalk-project/crosswalk-samples/&quot; target=&quot;_blank&quot;&gt;Crosswalk-samples&lt;/a&gt; includes an example application named &amp;#8220;&lt;a href=&quot;https://github.com/crosswalk-project/crosswalk-samples/tree/master/extensions-android&quot; target=&quot;_blank&quot;&gt;extensions-android&lt;/a&gt;&amp;#8220;. This application builds the extension code first using an &amp;#8220;ant&amp;#8221; recipe and then builds the html application itself and put both inside an apk file.&lt;/p&gt;
&lt;p&gt;By the end of the extension build process, the ant recipe opens the extension.jar file to include the META-INF information inside that file. It&amp;#8217;s the perfect time to inject our native library inside the package.&lt;/p&gt;
&lt;p&gt;We only have to change the build.xml recipe to include the library.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&amp;lt;copy file=&amp;quot;libs/armeabi/libMyLibrary.so&amp;quot; todir=&amp;quot;${build}/lib/armeabi-v7a/&amp;quot; /&amp;gt;&lt;/code&gt;&lt;br /&gt;
&lt;em&gt;Be sure to do it between  &amp;lt;unjar&amp;gt; and &amp;lt;jar&amp;gt; as we&amp;#8217;re taking advantage of the fact that the extension jar is being opened and closed to include the META-INF.&lt;/em&gt;&lt;/p&gt;
&lt;h4&gt;Performance measurement&lt;/h4&gt;
&lt;p&gt;To make a performance test I used an algorithm to find the nth prime number. The approach is the simplest (no pre-built arrays, no recursion) and dumbest (no short-cuts, no AKS, etc) one, and share the same implementation. The implementation is the following:&lt;/p&gt;
&lt;p&gt;&lt;span id=&quot;more-208&quot;&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre&gt;&lt;code&gt;
function findPrime(n)
{
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;var i, count = 0;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;for (i = 1; count &amp;lt; n; i++) {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if (isPrime(i))
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;count++;

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if (count == n)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;break;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return i;
}

function isPrime(n)
{
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;var i = 0;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if (n == 1 || n == 2)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return true;

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;for (i = 2; i &amp;lt; n; i++) {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if (n % i == 0) {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;break;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&amp;nbsp;&amp;nbsp; 

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return (n == i); 
}&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;
&lt;strong&gt;&lt;sub&gt;&lt;em&gt;Converting it to JAVA or C would be ridiculous easy.&lt;/em&gt;&lt;/sub&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;h4&gt;Performance Results&lt;/h4&gt;
&lt;p&gt;I first tried to find the 10th prime number and the result is the following:&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://labs.danilocesar.com/blog/wp-content/uploads/2015/02/amChart10prime.png&quot;&gt;&lt;img src=&quot;http://labs.danilocesar.com/blog/wp-content/uploads/2015/02/amChart10prime.png&quot; alt=&quot;amChart10prime&quot; width=&quot;480&quot; height=&quot;280&quot; class=&quot;aligncenter size-full wp-image-230&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;This was quite expected, right? I mean, the &amp;#8220;context switch&amp;#8221; between JS-&gt;JAVA or JS-&gt;JAVA-&gt;C has a price to be paid, there&amp;#8217;s the serialization/deserialization process that takes some time to finish, and since the core operation is not really time consuming (a short iteration between 1 and 29, checking if they&amp;#8217;re prime numbers) I can imagine why JAVA and C took more time. Let&amp;#8217;s try again and find the 100th prime:&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://labs.danilocesar.com/blog/wp-content/uploads/2015/02/amChart100prime.png&quot;&gt;&lt;img src=&quot;http://labs.danilocesar.com/blog/wp-content/uploads/2015/02/amChart100prime.png&quot; alt=&quot;amChart100prime&quot; width=&quot;480&quot; height=&quot;280&quot; class=&quot;aligncenter size-full wp-image-231&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;OK, It&amp;#8217;s a bit odd, the loading time is different from execution to execution and it affects the first time the code is executed. Ignoring the higher (usually the first execution) and lower values (got lucky?) give us a more sane result, but still&amp;#8230; What about the 10Kth prime number?&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://labs.danilocesar.com/blog/wp-content/uploads/2015/02/amChart10kprime.png&quot;&gt;&lt;img src=&quot;http://labs.danilocesar.com/blog/wp-content/uploads/2015/02/amChart10kprime.png&quot; alt=&quot;amChart10kprime&quot; width=&quot;480&quot; height=&quot;280&quot; class=&quot;aligncenter size-full wp-image-229&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;It doesn&amp;#8217;t make any sense, JS is faster?! What&amp;#8217;s going on?&lt;/p&gt;
&lt;p&gt;Divisions/Modulus are expensive. Even if I build the Native Library with armeabi-v7a it gets 30% better and goes bellow 10 seconds, almost the same performance accomplished by JAVA but still worse than Javascript.&lt;/p&gt;
&lt;p&gt;It happens that &lt;a href=&quot;http://graphics.stanford.edu/~seander/bithacks.html#ModulusDivisionParallel&quot;&gt;Modulus operation can be improved&lt;/a&gt;, and I believe that the V8 is smart enough to use some of those techniques. So, looking for primes might not be a fair way to measure performance.&lt;/p&gt;
&lt;h4&gt;Performance Results, round two&lt;/h4&gt;
&lt;p&gt;A second approach would be to avoid divisions and use only plain additions. Maybe just sum the sequence 1+2..+N, repeating it N times?&lt;br /&gt;
Maybe 1-2+3-4&amp;#8230;N to avoid overflow?&lt;/p&gt;
&lt;p&gt;&lt;pre&gt;&lt;code&gt;
function sum(n) {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;var signal;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;var i, j;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;var total = 0;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;var r1;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;var start = n / 2;

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;for (j = 0; j &amp;lt;= n; j++) {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;r1 = start;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;signal = -1;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;for (i = 0; i&amp;lt;= n; i++) {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;r1 = r1 + (i * signal);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;signal = -signal;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;total = total + r1;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return total;
}
&lt;/code&gt;&lt;/pre&gt;&lt;sub&gt;&lt;em&gt;As the final value is -n/2, I&amp;#8217;m starting the sum with n/2 to get 0 as the result.&lt;/em&gt;&lt;/sub&gt;&lt;/p&gt;
&lt;p&gt;For a small sum of ten elements:&lt;br /&gt;
&lt;a href=&quot;http://labs.danilocesar.com/blog/wp-content/uploads/2015/02/amChart10sum.png&quot;&gt;&lt;img src=&quot;http://labs.danilocesar.com/blog/wp-content/uploads/2015/02/amChart10sum.png&quot; alt=&quot;amChart10sum&quot; width=&quot;480&quot; height=&quot;280&quot; class=&quot;aligncenter size-full wp-image-234&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Makes sense, right? The context switch costs more than the sum of the 10 elements directly on javascript. Let&amp;#8217;s see the 50K results:&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://labs.danilocesar.com/blog/wp-content/uploads/2015/02/amChart50ksum1.png&quot;&gt;&lt;img src=&quot;http://labs.danilocesar.com/blog/wp-content/uploads/2015/02/amChart50ksum1.png&quot; alt=&quot;amChart50ksum&quot; width=&quot;480&quot; height=&quot;280&quot; class=&quot;aligncenter size-full wp-image-248&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
As you can see here, without space for smart optimizations on the JS side, the native results are 3x better than the javascript. Nice!&lt;/p&gt;
&lt;h4&gt;Conclusion&lt;/h4&gt;
&lt;p&gt;There&amp;#8217;re a few lessons we learned here:&lt;/p&gt;
&lt;p&gt;1 &amp;#8211; The cost of going from JS-&gt;JAVA or JS-&gt;JAVA-&gt;C cannot be ignored. It was a bit less than 1ms (from the 10 additions chart). Think about that before putting a native call inside a huge loop.&lt;br /&gt;
2 &amp;#8211; Consider measuring your optimizations before accepting it in your source code. Sometimes things are not obvious.&lt;/p&gt;
&lt;h4&gt;Links&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://labs.danilocesar.com/blog/wp-content/uploads/2015/02/crosswalk_native_measures.ods&quot;&gt;A spreadsheet containing the measures&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://github.com/danilocesar/crosswalk-samples&quot; target=&quot;_blank&quot;&gt;Hacked version of crosswalk-examples repository.&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</content:encoded>
	<dc:date>2015-02-05T15:06:07+00:00</dc:date>
</item>
<item rdf:about="http://blog.ademar.org/?p=1316">
	<title>Ademar de Souza Reis Jr.: Retrospectiva 2014</title>
	<link>https://blog.ademar.org/2015/retrospectiva-2014/</link>
	<content:encoded>&lt;p&gt;Um pouco atrasada como de costume, mas vamos à nossa retrospectiva, &lt;a href=&quot;http://feeds.feedburner.com/tag/retrospectiva/&quot; title=&quot;Retrospectivas anteriores&quot;&gt;tradição desde 2006!&lt;/a&gt; :-)&lt;/p&gt;
&lt;p&gt;Acho que 2014 foi o ano da consolidação dessa nossa fase &amp;#8220;família&amp;#8221; em Canela. Foi um ano mais calmo, sem grandes mudanças. Mesmo assim tivemos alguns destaques: nossas férias de Fevereiro/Março nos EUA, nossa viagem de férias pra Curitiba em Novembro e como não poderia deixar de ser, as constantes novidades no desenvolvimento da Sofia.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Férias 2014 &amp;#8211; Inverno nos EUA (Fevereiro/Março)&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Uma boa viagem de férias estava nos planos há algum tempo e como quem nos conhece sabe, nossa ideia de férias ideais envolve frio, neve e um longo tempo fora de casa (relativamente falando). Após algumas análises de custos, benefícios e datas, resolvemos tirar férias nos EUA no final do inverno. Nossa viagem durou um total de 26 dias, passando por Westford/Nashua (próximo a Boston), &lt;a href=&quot;http://www.sugarloaf.com/&quot; title=&quot;Sugarloaf Mountain / Ski Resort&quot;&gt;Sugar Loaf Mountain&lt;/a&gt; (Estação de Esqui no Maine) e Nova Iorque. Só não deu pra ir até o Canadá pois os passaportes não saíram a tempo pra solicitar o visto. :-(&lt;/p&gt;
&lt;p&gt;A Sofia tinha então 1 ano e 10 meses e isso representou alguns desafios e mudanças no nosso ritmo de viagem, mas de modo algum nos impediu de aproveitar bem cada momento. E pra ela foi o maior barato: mesmo bem novinha, ela brincou muito e hoje ainda se empolga quando vê as fotos.&lt;/p&gt;
&lt;div id=&quot;attachment_1353&quot; class=&quot;wp-caption aligncenter&quot;&gt;&lt;a href=&quot;http://feeds.feedburner.com/wp-content/uploads/2015/01/eua-2014-e1421116021323.jpg&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/wp-content/uploads/2015/01/eua-2014-420x210.jpg&quot; alt=&quot;Mosaico de fotos - Viagem EUA 2014&quot; width=&quot;420&quot; height=&quot;210&quot; class=&quot;size-medium wp-image-1353&quot; /&gt;&lt;/a&gt;&lt;p class=&quot;wp-caption-text&quot;&gt;Viagem EUA 2014 (clique para ampliar)&lt;/p&gt;&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;Nova Iorque (NYC)&lt;br /&gt;
&lt;/strong&gt;&lt;br /&gt;
Chegamos e saímos dos EUA pelo aeroporto de Newark (Nova Jersey, vizinha de NYC). Na chegada (final de Fevereiro) ainda havia bastante neve e gelo acumulados e na volta (final de Março), era raro encontrar gelo, mas pegamos uma frente fria com vento e temperaturas de até -8C durante o dia. O negócio foi se agasalhar bem e carregar a Sofia bem embrulhadinha no carrinho.&lt;/p&gt;
&lt;p&gt;Em NYC fizemos o programa padrão de qualquer turista, mas num ritmo um pouco mais lento: Liberty Park, Manhattan, 5a Avenida, Empire State, Central Park, Museu de História Natural, Estátua da Liberdade, Times Square, etc. Foi a minha segunda vez em NYC e a primeira da Viviane e da Sofia.&lt;/p&gt;
&lt;div id=&quot;attachment_1336&quot; class=&quot;wp-caption aligncenter&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/wp-content/uploads/2015/01/IMG_1655-420x280.jpg&quot; alt=&quot;Museu de História Natural em NYC&quot; width=&quot;420&quot; height=&quot;280&quot; class=&quot;size-medium wp-image-1336&quot; /&gt;&lt;p class=&quot;wp-caption-text&quot;&gt;No Museu de História Natural &amp;#8211; NYC&lt;/p&gt;&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;Westford &amp;#8211; MA / Nashua &amp;#8211; NH&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Saindo de NYC de carro, fomos pra Westford, cidade próxima a Boston, no estado de Massachusetts. É lá onde fica um dos principais escritórios da Red Hat (empresa onde trabalho) e como eu trabalho de casa, aproveitei pra visitar alguns amigos e passar alguns dias trabalhando no escritório, enquanto a Viviane ficava passeando com a Sofia &amp;#8212; geralmente em Shoppings e Outlets.&lt;/p&gt;
&lt;div id=&quot;attachment_1337&quot; class=&quot;wp-caption aligncenter&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/wp-content/uploads/2015/01/IMG_20140302_140303-420x279.jpg&quot; alt=&quot;Em um Restaurante (Diner) à beira da estrada&quot; width=&quot;420&quot; height=&quot;279&quot; class=&quot;size-medium wp-image-1337&quot; /&gt;&lt;p class=&quot;wp-caption-text&quot;&gt;Comida típica :-)&lt;/p&gt;&lt;/div&gt;
&lt;p&gt;O inverno naquela região é bastante rigoroso e encaramos temperaturas de até -30C em alguns dias. Mas como eu costumo dizer, lá se passa menos frio do que aqui no Brasil, pois eles tem aquecimento em todo lugar. Mancada foi deixar algumas compras no carro durante uma das noites: pela manhã estava tudo super congelado. Brincamos um pouco na neve por lá, só pra dar uma &lt;em&gt;aquecida&lt;/em&gt; pois a brincadeira de verdade ainda estava por vir&amp;#8230;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;SugarLoaf &amp;#8211; Maine&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Eu disse que a gente gosta de frio, não é? Essa provavelmente foi a melhor parte da viagem: aproveitando o convite de uma colega de trabalho, fomos pro extremo norte/nordeste dos EUA, no estado de Maine, bem próximos da divisa com o Canadá. Lá existe uma famosa estação de Esqui chamada SugarLoaf que é muito legal. E o que não faltou foi neve. Ainda mais interessante é que a temperatura estava relativamente amena: não baixou de -10C, o que permitiu que aproveitássemos bastante nosso tempo por lá.&lt;/p&gt;
&lt;div id=&quot;attachment_1334&quot; class=&quot;wp-caption aligncenter&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/wp-content/uploads/2015/01/IMG_1424-420x280.jpg&quot; alt=&quot;Snowshoeing&quot; width=&quot;420&quot; height=&quot;280&quot; class=&quot;size-medium wp-image-1334&quot; /&gt;&lt;p class=&quot;wp-caption-text&quot;&gt;Snowshoeing&lt;/p&gt;&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;Revendo Amigos em Curitiba (Novembro)&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Curitiba é a cidade onde morei de 1998 a 2007 (com um intervalo de 1 ano em Manaus) e foi lá onde eu conheci a Viviane e nos casamos. Sendo assim, temos muitos amigos por lá. Já faziam 7 anos que não aparecíamos então resolvemos fazer uma viagem rápida, com a principal intenção de rever os amigos.&lt;/p&gt;
&lt;p&gt;Foi uma viagem tranquila, sem muito planejamento ou stress. Fomos de carro (cerca de 1500 km ida + volta) e permanecemos lá por 13 dias. O suficiente pra visitar vários amigos (vários deles hoje com filhos), comer barreado em Morretes, pastel na feirinha do Largo da Ordem, ir brincar com a Sofia no Parque Barigui e como todo Curitibano, &amp;#8220;passear no shopping&amp;#8221; (incluindo ver Interestelar no IMAX).&lt;/p&gt;
&lt;div id=&quot;attachment_1346&quot; class=&quot;wp-caption aligncenter&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/wp-content/uploads/2015/01/IMG-20141129-WA0004-420x236.jpg&quot; alt=&quot;Jogo de tabuleiro na casa do Milton, com Thiago e Danilo.&quot; width=&quot;420&quot; height=&quot;236&quot; class=&quot;size-medium wp-image-1346&quot; /&gt;&lt;p class=&quot;wp-caption-text&quot;&gt;Jogo de tabuleiro na casa do Milton, com Thiago e Danilo.&lt;/p&gt;&lt;/div&gt;
&lt;p&gt;O que faltou foi acampar no &lt;a href=&quot;http://pt.wikipedia.org/wiki/Parque_Estadual_Pico_do_Marumbi&quot; title=&quot;Parque Estadual Pico do Marumbi (Wikipedia)&quot;&gt;Parque Estadual do Pico do Marumbi&lt;/a&gt;. Eu tinha tudo planejado pra passar uma noite acampado ao pé da Montanha com Viviane e Sofia, mas descobri na última hora que a área de camping do parque foi fechada há 2 anos e tive que abortar os planos. :-( &lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Vida em Canela e desenvolvimento da Sofia&lt;br /&gt;
&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Continuamos muito satisfeitos com nossa escolha de morar aqui no interior. Acho que 2014 foi o ano da consolidação da vida &amp;#8220;família&amp;#8221; por aqui. Terminamos a extensão da casa, eu assei várias carnes agora que tenho uma churrasqueira e um kit de churrasco (incluindo uma faca de Gaúcho tchê!), a Viviane plantou várias coisas no jardim e tem se &lt;em&gt;divertido&lt;/em&gt; cuidando dele e a Sofia adora brincar no quintal e observar os pássaros que vem nos visitar com frequência (o que deu pra ver esse ano: beija-flores, pardais, pica-paus, periquitos, tucanos e papagaios, entre outros).&lt;/p&gt;
&lt;div id=&quot;attachment_1328&quot; class=&quot;wp-caption aligncenter&quot;&gt;&lt;a href=&quot;http://feeds.feedburner.com/wp-content/uploads/2015/01/2014-e1421116065558.jpg&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/wp-content/uploads/2015/01/2014-420x236.jpg&quot; alt=&quot;Mosaico de fotos: vida em Canela - 2014&quot; width=&quot;420&quot; height=&quot;236&quot; class=&quot;size-medium wp-image-1328&quot; /&gt;&lt;/a&gt;&lt;p class=&quot;wp-caption-text&quot;&gt;Vida em Canela &amp;#8211; 2014 (clique para ampliar)&lt;/p&gt;&lt;/div&gt;
&lt;p&gt;Falando em Sofia, ela fechou o ano com 2 anos e 7 meses e nós estamos muito satisfeitos com o desenvolvimento dela: ela já não usa fraldas, está super tagarela (a brincadeira favorita dela é colocar dois objetos pra &amp;#8220;conversar&amp;#8221;), entende relativamente bem conversas em Inglês, conta e identifica algarismos e quantidades até 10 em Português e Inglês, identifica e ordena as letras do seu nome, come e bebe sozinha (aliás, nunca foi de usar chupeta nem mamadeira), sabe bem o que é pequeno/grande, longe/perto, encima/embaixo, subir/descer, aberto/fechado, claro/escuro, cores (tudo em Português e Inglês) e é bem independente de modo geral. Ela está na fase dos &amp;#8220;porquês&amp;#8221; e vive nos surpreendendo com frases cada vez mais complexas e imaginativas, o que tem sido o maior barato. O que não foi tão interessante assim foi ter que assistir &lt;em&gt;Frozen&lt;/em&gt; umas 35 vezes e ouvir &amp;#8220;&lt;em&gt;Let it Go&lt;/em&gt;&amp;#8221; durante boa parte da viagem pra Curitiba, mas felizmente acho que o pior já passou. :-)&lt;/p&gt;
&lt;div id=&quot;attachment_1352&quot; class=&quot;wp-caption aligncenter&quot;&gt;&lt;a href=&quot;http://feeds.feedburner.com/wp-content/uploads/2015/01/sofia-2014-e1421116043265.jpg&quot;&gt;&lt;img src=&quot;http://feeds.feedburner.com/wp-content/uploads/2015/01/sofia-2014-420x236.jpg&quot; alt=&quot;Mosaico de fotos: Sofia em 2014&quot; width=&quot;420&quot; height=&quot;236&quot; class=&quot;size-medium wp-image-1352&quot; /&gt;&lt;/a&gt;&lt;p class=&quot;wp-caption-text&quot;&gt;Sofia em 2014 (clique para ampliar)&lt;/p&gt;&lt;/div&gt;
&lt;p&gt;Ainda falta explorar um pouco mais a região de Canela: até que fiz boas trilhas de Mountain Bike, mas não foi nesse ano que eu desci o Rio Parnaíba de rafting e ainda temos vários pontos turísticos a visitar. Coisas pra 2015.&lt;/p&gt;
&lt;p&gt;Mas e a &lt;a href=&quot;http://feeds.feedburner.com/2014/retrospectiva-2013-alguns-planos-pra-2014/&quot; title=&quot;Retrospectiva 2013, alguns planos pra 2014&quot;&gt;lista de 2014&lt;/a&gt;? Bem, fiquei no 50/50:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;OK! Fazer pelo menos uma longa viagem de férias com Viviane e Sofia
&lt;li&gt;FAIL! Visitar um país que eu ainda não conheça
&lt;li&gt;OK! Terminar as obras da casa
&lt;li&gt;FAIL! Acampar pelo menos 1 noite com Viviane e Sofia
&lt;li&gt;FAIL! Descer o Rio Paranhana de rafting
&lt;li&gt;OK! Organizar melhor minhas fotos e vídeos, incluindo backup online
&lt;/li&gt;&lt;/li&gt;&lt;/li&gt;&lt;/li&gt;&lt;/li&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;Ah, e a Sofia pediu tanto (NOT), que eu &lt;em&gt;tive&lt;/em&gt; que comprar um PS4. Mas o irmãozinho ou irmãzinha que ela também está pedindo ficou pra mais pra frente. ;-)&lt;/p&gt;
&lt;p&gt;Não tenho uma lista de objetivos pra 2015, vamos ver o que a vida nos reserva. O único plano é fazer mais uma viagem de família, quem sabe novamente pra Patagônia no inverno aqui do hemisfério Sul.&lt;/p&gt;
&lt;p&gt;É isso aí, um feliz 2015 a todos e até a retrospectiva do ano que vem!&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;&lt;small&gt;&lt;a href=&quot;https://blog.ademar.org/2015/retrospectiva-2014/&quot;&gt;Link Permanente&lt;/a&gt; |
&lt;a href=&quot;https://blog.ademar.org/2015/retrospectiva-2014/#comments&quot;&gt;Nenhum comentário&lt;/a&gt;&lt;br /&gt;
Post tags: &lt;a href=&quot;https://blog.ademar.org/tag/retrospectiva/&quot; rel=&quot;tag&quot;&gt;retrospectiva&lt;/a&gt;&lt;br /&gt;
&lt;/small&gt;&lt;/p&gt;&lt;div class=&quot;yarpp-related-rss&quot;&gt;
&lt;p&gt;Posts possivelmente relacionados:&lt;ol&gt;
&lt;li&gt;&lt;a href=&quot;https://blog.ademar.org/2008/retrospectiva-2007-planos-2008/&quot; rel=&quot;bookmark&quot; title=&quot;Retrospectiva 2007, planos pra 2008&quot;&gt;Retrospectiva 2007, planos pra 2008 &lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://blog.ademar.org/2008/retrospectiva-2008-planos-pra-2009/&quot; rel=&quot;bookmark&quot; title=&quot;Retrospectiva 2008, planos pra 2009&quot;&gt;Retrospectiva 2008, planos pra 2009 &lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://blog.ademar.org/2010/retrospectiva-2010-planos-pra-2011/&quot; rel=&quot;bookmark&quot; title=&quot;Retrospectiva 2010, planos pra 2011&quot;&gt;Retrospectiva 2010, planos pra 2011 &lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;img src=&quot;http://feeds.feedburner.com/~r/blogademar/~4/mBM8799vBLo&quot; height=&quot;1&quot; width=&quot;1&quot; alt=&quot;&quot; /&gt;</content:encoded>
	<dc:date>2015-01-13T02:53:38+00:00</dc:date>
</item>
<item rdf:about="http://baraujo.net/blog/?p=188">
	<title>Bruno Araujo: Porfolio status: ONLINE</title>
	<link>http://baraujo.net/blog/?p=188</link>
	<content:encoded>&lt;p&gt;So, I&amp;#8217;ve just created a portfolio page for listing some things I did, just click the link named &amp;#8220;Portfolio&amp;#8221; (duh) at the top of the page. Eventually new stuff will be added, and I&amp;#8217;ll try to keep it as updated as possible.&lt;/p&gt;</content:encoded>
	<dc:date>2014-11-08T04:00:42+00:00</dc:date>
</item>
<item rdf:about="http://ianlawrence.info/random-stuff/making-magic">
	<title>Ian Lawrence: Making Magic</title>
	<link>http://ianlawrence.info/random-stuff/making-magic</link>
	<content:encoded>&lt;h3&gt;South Sudan&lt;/h3&gt;
&lt;p&gt;
Is a complicated place. Statistics on the country are shocking:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;One out of every seven children dies before their fifth birthday&lt;/li&gt;
&lt;li&gt;One of the worst maternal mortality rates in the world&lt;/li&gt;
&lt;li&gt;One out of seven women who become pregnant will probably die from pregnancy-related causes&lt;/li&gt;
&lt;li&gt;More than half of children between the ages of six and 13 are not in formal education&lt;/li&gt;
&lt;li&gt;84% of women cannot read or write. Only 6% of girls who start school ever finish&lt;/li&gt;&lt;/ul&gt;
There is also of course an ongoing conflict with warlords, armed rebellions and clashes over cattle. 
Given this backdrop very few people here in South Sudan have hopes or fears which are entirely divorced from this conflict.
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;The fighting has been going on for so long that the root causes of the violence are difficult to know. South Sudan was established as a country in 2011 following a 20 year civil war with northern Sudan. This war was largely a religious and ethnic conflict which often descended into genocide - most famously in the Darfur region. Millions of civilians were killed.&lt;/p&gt;
&lt;p&gt;Three years ago when South Sudan finally achieved it's independence from the north there was a great deal of optimism. But late last year a political battle between President Salva Kiir and Vice President Riek Machar ignited a new civil war. Because the two men were from different tribes the fighting has once again broken out along ethnic lines. 
Ethnic war is an an especially deadly sort of conflict because it can easily spill over into civilian populations.&lt;/p&gt;
&lt;p&gt;Fighting in the new civil war is largely between the Dinka and the Nuer - South Sudan's two dominant tribes. When fighting broke out the Nuer stormed the gates of the UN to escape an unfolding massacre at the hands of Dinka fighters. Over the course of a few days thousands of Nuer were gunned down in the capital city where they represented a significant minority.  In other parts of the country however Dinka were killed in equal measure in heavily Nuer regions.&lt;/p&gt;
&lt;p&gt;South Sudan is of course also a country filled with millions of civilians who are desperately and with the greatest difficulty trying to transcend this history and establish a society based on democratic and egalitarian ideals. Burdened by decades of resentment, revenge and almost ceaseless fighting this is proving to be extremely difficult. I see it as my obligation to support them with this if I can and supporting them means giving them the correct items like seeds, fishing kits and fuel efficient stoves they need at the correct time to start to begin rebuilding their lives.&lt;/p&gt;
&lt;h3&gt;What is MAGIC&lt;/h3&gt;
&lt;p&gt;Maybe it helps to think of aid distribution as a sort of e-commerce system where aid items are 'products'. Instead of a 'customer' choosing which items to add into their cart we have to make a decision of who gets what based on the results of a countrywide Food Security Assessment (which classifies areas as either Stressed, Crisis, Emergency or Famine). Conceptually then we can create a shopping cart of  items for each payam (a payam in South Sudan is like a District in the UK) and pass this info to other organizational units like LOA (Letters of Agreements or Contracts with Suppliers or NGO's), Procurement, Logistics, Distribution and so on.&lt;/p&gt;
&lt;p&gt; Each unit can modify the cart either by updating its contents or changing its geographical location (in a warehouse, with an NGO partner etc). At any point we can establish where the 'shopping cart' of items is and we can generate reports and statistics about its passage through the MAGIC system all the way from food assessment through planning to doorstep delivery&lt;/p&gt;
&lt;p&gt;One clear advantage to building the system this way is that we now can establish a link between 'donors' on one hand and 'recipients' on the other. To continue the e-commerce analogy without MAGIC donors would pay for a shopping cart of items and they would not know to whom these items had been delivered. With most L3 donations running into the millions of dollars this is a problem.

A second advantage is more subtle but might be useful if we want to try to innovate on aid at some point in the future. If we wanted for example to allow donations not only from Governments but wanted to accept donations from anybody - perhaps  &lt;a href=&quot;https://www.vinumeris.com/lighthouse&quot;&gt;raising money with Bitcoin&lt;/a&gt; then we could generate a report for each bitcoin donor and add that to the blockchain for historical record&lt;/p&gt;
&lt;p&gt;Before all this though the system needs to work and be tested in the field. That is what I have been doing these last two weeks and it was great fun!&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;</content:encoded>
	<dc:date>2014-08-20T16:26:55+00:00</dc:date>
</item>
<item rdf:about="http://ianlawrence.info/random-stuff/a-bitcoin-project">
	<title>Ian Lawrence: A Bitcoin project</title>
	<link>http://ianlawrence.info/random-stuff/a-bitcoin-project</link>
	<content:encoded>&lt;h2&gt;Some words about hedging&lt;/h2&gt;
&lt;p&gt;The Bitcoin market is pretty fresh and unstable  at the moment. It is greatly affected by any news on this market. We expect slow grow of exchange rates in the long-term. This assumptions is based on the following facts:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The world requires anonymous currency. It is used not only for illegal transactions (like buying/selling drugs, weapons etc.), but also as a currency which is free from any political influence, not affiliated with any country, etc.&lt;/li&gt;
&lt;li&gt;Close-to-zero transaction fees. If an operation is made within the Bitcoin infrastructure you have no additional fees for running a bitcoin account&lt;/li&gt;
&lt;li&gt;Deflationary nature of bitcoin. The emission amount is fixed and could not be extended. Since (like any other currency) bitcoin's will be lost - the price of the rest should increase to compensate that&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Unfortunately, all other *coins (Litecoin, Dogecoin, etc.) have close-to-zero influence on bitcoin exchange rates, while bitcoin exchange rates affects this currencies greatly. Detailed analytics of exchange rates dynamics on 3 different exchange markets revealed 0.00037% probability of getting profit by running exchange operations between different *coins (mostly due to exchange fees of sites)&lt;/p&gt;
&lt;p&gt;Our opinion is that it is a nice time to start getting bitcoins :) It's exchange rates have still not recovered after the MtGOX failure, but recent research revealeds that MtGOX may have money on it's account, so we expect constant growing exchange rate of Bitcoin in next 3 months&lt;/p&gt;
&lt;h2&gt;What needs to be implemented?&lt;/h2&gt;
&lt;p&gt;This section describes a scope of the project.
The main target of current project is to provide an easy way to perform easy transactions within system. So we need just three points of functionality:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Adding money to amount (cash-in)&lt;/li&gt;
&lt;li&gt;Transferring money to other person's account &lt;/li&gt;
&lt;li&gt;Cash-out&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Additionally to simplify people's life transferring money to other person's account should track &amp;quot;friends list&amp;quot; to simplify multiple transactions to other persons.&lt;/p&gt;
&lt;p&gt;Since world is mobile now - all that operations should be available both from web-interface and mobile apps.&lt;/p&gt;
&lt;h3&gt;What will be great to have in future?&lt;/h3&gt;
&lt;p&gt;This section describes functionality outside initial project scope, but could be considered in future.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&amp;quot;Send me money&amp;quot; button. When user click's it a popup appears on site where person could send money in one click&lt;/li&gt;
&lt;li&gt;QR-send. Using mobile you could scan a QR-code and confirm sending money in one click&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;What about security?&lt;/h2&gt;
&lt;p&gt;Security is a main concern of the project. Since we're building a system on top of bitcoin - there is &lt;strong&gt;no&lt;/strong&gt; way to reverse any transaction.&lt;/p&gt;
&lt;p&gt;So let's review possible approaches.&lt;/p&gt;
&lt;h3&gt;(rejected) Single bitcoin account managing all users accounts&lt;/h3&gt;
&lt;p&gt;We have just one bitcoin wallet, which contains all coins owned by our users. All in-system transactions are tracked by our system, same applies to account balances.&lt;/p&gt;
&lt;p&gt;Pros:
+ Very easy to implement
+ Extremely fast (since there are no &amp;quot;real&amp;quot; transactions when we pass money from one person to other)&lt;/p&gt;
&lt;p&gt;Cons:
+ extremely risky. Let's imagine situation when hacker was able to access account. He will be able to move all bitcoins to other address resulting in system crash&lt;/p&gt;
&lt;h3&gt;(rejected) Separate bitcoin wallet for each user&lt;/h3&gt;
&lt;p&gt;Each user has one bitcoin wallet. All transactions are performed by real bitcoin transactions&lt;/p&gt;
&lt;p&gt;Pros:
+ Simplifies client logic. We do not need to &amp;quot;count&amp;quot; money - just retrieve them from bitcoin wallet and display to user
+ Way more secure - user have no real access to other uses wallet&lt;/p&gt;
&lt;p&gt;Cons:
+ harder to implement
+ When we make transaction from one user to another we need to receive confirmation from bitcoin network which is not immediate. 
+ risky. If hacker was able to compromise not account, but access to system same risks as previous options apply&lt;/p&gt;
&lt;h3&gt;Separate bitcoin wallet + cash-in-out wallet&lt;/h3&gt;
&lt;p&gt;The main problem of the previous approach is that a possible hacker has access to all bitcoins in the system, including bitcoins used by the cash-in and cash-out wallet. The solution is to run the system using 2 separate modules (ideally on two different network machines) - one for in-system transactions and one for cash-in/cash-out. The second one should accept just two operations &amp;quot;Give X BTC to user Y in system&amp;quot; or &amp;quot;Take X BTC from user Y&amp;quot;. Since the code of second module will be simple and straightforward - it's easier to make it secure. Compromising client accounts will not compromise real money&lt;/p&gt;
&lt;h2&gt;How that will work?&lt;/h2&gt;
&lt;p&gt;AAA (Authorization, Authentication, Accounting) is always a compromise between usability and security. We suggest the following approach:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;User registers with his phone number. He may (or may not) enter recovery email address &lt;/li&gt;
&lt;li&gt;When user signs-in into the application two-factor auth is used by default - login, password + OTP (one-time-password) sent by SMS. Two-factor auth may be disabled in the settings by the user&lt;/li&gt;
&lt;li&gt;Each transaction higher than X$ is confirmed by OTP. If total sum of transactions within one hour exceeds X$ - each transaction is confirmed by OTP (that is done to prevent stealing money by millions of small transactions)&lt;/li&gt;
&lt;li&gt;Password recovery - user will have two options - send recovery info to email or to phone. If he selects phone - recovery information is sent within next 48 hours (but not earlier than 24 hours). That is done to ensure that if phone is stolen - user has enough time to block sim-card. &lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;What is the status of development?&lt;/h2&gt;
&lt;p&gt;We're currently working on server-side stuff - bitcoin's transferring between two separates system. This part of system will be covered by unit tests to ensure security and reliability. Code should be ready soon if anyone is interested&lt;/p&gt;</content:encoded>
	<dc:date>2014-03-26T21:10:58+00:00</dc:date>
</item>
<item rdf:about="http://baraujo.net/blog/?p=159">
	<title>Bruno Araujo: Tricky Python bugs: comparison madness</title>
	<link>http://baraujo.net/blog/?p=159</link>
	<content:encoded>&lt;p&gt;&lt;a href=&quot;https://www.python.org/&quot;&gt;Python&lt;/a&gt; is a great language for a lot of tasks which are not performance sensitive, and even with this kind of task it can somewhat be efficient (think &lt;a href=&quot;http://cython.org/&quot;&gt;Cython&lt;/a&gt; or &lt;a href=&quot;http://www.numpy.org/&quot;&gt;NumPy&lt;/a&gt;). In this post I&amp;#8217;ll talk about a problem that can be easily overlooked and can turn into a debugging madness if you&amp;#8217;re not aware of it: comparison errors.&lt;/p&gt;
&lt;p&gt;For the sake of argument, let&amp;#8217;s say you need to implement a function to compare two integers. This can be easily achieved:&lt;/p&gt;
&lt;pre class=&quot;brush: python; title: ; notranslate&quot;&gt;
def compare(n1, n2):
    return n1 &amp;lt; n2
&lt;/pre&gt;
&lt;p&gt;This function returns True if n1 &amp;lt; n2, and False otherwise. Simple enough, right? There is a crucial detail, though: it will only work properly if both parameters are integers. What about one of them is a string?&lt;/p&gt;
&lt;pre class=&quot;brush: python; title: ; notranslate&quot;&gt;
In [1]: compare(1, 2)
Out[1]: True

In [2]: compare(2, 1)
Out[2]: False

In [3]: compare('1', 2)
Out[3]: False

In [4]: compare(1, '2')
Out[4]: True

In [5]: compare(3, '2')
Out[5]: True
&lt;/pre&gt;
&lt;p&gt;That may seem an absurd use of the function, but think about a larger problem or system: you will be passing a lot of things around inside variables, and Python just won&amp;#8217;t complain if the variables are not of the same type, resulting in a silent and hardly visible bug in your code. In fact, anything can be compared, and the function will happily run and return with no error:&lt;/p&gt;
&lt;pre class=&quot;brush: python; title: ; notranslate&quot;&gt;
In [6]: compare(list(), 3)
Out[6]: False

In [7]: compare(3, dict())
Out[7]: True

In [8]: compare(list(), dict())
Out[8]: False

In [9]: compare(str(), dict())
Out[9]: False

In [10]: compare('str', dict())
Out[10]: False
&lt;/pre&gt;
&lt;p&gt;This seemingly innocent function will work regardless of what you pass to it, and it takes only one unnoticed wrong parameter to skew the result. The best solution is the obvious one, which is passing the proper types, but if you cannot have this guarantee you can detect these kind of errors using the type() builtin function. An example follows (not the most efficient one, but it will suffice):&lt;/p&gt;
&lt;pre class=&quot;brush: python; title: ; notranslate&quot;&gt;
def compare(n1, n2):
    if type(n1) != int or type(n2) != int:
        # handle error, e.g. throw an exception
        raise RuntimeError(&amp;quot;one of the parameters is not an integer&amp;quot;)
    return n1 &amp;lt; n2

In [23]: compare(1, 2)
Out[23]: True

In [24]: compare(1, '2')
--------------------------------------------------
RuntimeError
/tmp/ in ()
----&amp;gt; 1 compare(1, '2')

/tmp/ in compare(n1, n2)
      1 def compare(n1, n2):
      2     if type(n1) != int or type(n2) != int:
----&amp;gt; 3         raise RuntimeError(&amp;quot;one of the params is not an integer&amp;quot;)
      4     return n1 &amp;lt; n2

RuntimeError: one of the params is not an integer
&lt;/pre&gt;
&lt;p&gt;Always remember to use comparisons with the proper care in Python, or you may end losing a lot of time tracking a nearly invisible problem (true story).&lt;/p&gt;
&lt;p&gt;UPDATE: msi provides this helpful bit in the comments:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;BTW: This is fixed in Python 3.X:&lt;/p&gt;
&lt;p&gt;The ordering comparison operators (&lt;code&gt;&amp;lt;, =, &amp;gt;&lt;/code&gt;) raise a TypeError exception when the operands don’t have a meaningful natural ordering. Thus, expressions like &lt;code&gt;1 &amp;lt; ''&lt;/code&gt;, &lt;code&gt;0 &amp;gt; None&lt;/code&gt; or &lt;code&gt;len &amp;lt;= len&lt;/code&gt; are no longer valid, and e.g. &lt;code&gt;None &amp;lt; None&lt;/code&gt; raises TypeError instead of returning False.&lt;/p&gt;&lt;/blockquote&gt;</content:encoded>
	<dc:date>2014-03-18T17:21:24+00:00</dc:date>
</item>
<item rdf:about="http://lizardo.wordpress.com/?p=264">
	<title>Anderson Lizardo: Controle de ponto usando dbus-monitor</title>
	<link>http://lizardo.wordpress.com/2014/01/17/controle-de-ponto-usando-dbus-monitor/</link>
	<content:encoded>&lt;p&gt;Aqui no trabalho, a folha de ponto é registrada manualmente, usando uma planilha do Excel onde precisamos registrar as horas de entrada/saída. É arcaico, mas tem sido menos problemático do que o ponto eletrônico, que às vezes dava pane, engatava o rolo, acabava papel etc.&lt;/p&gt;
&lt;p&gt;Pois bem, até recentemente, eu vinha coletando a hora de entrada/saída a partir dos logs de sistema da minha máquina (visto que quase sempre eu dou resume/suspend no início/fim do expediente). Mas às vezes eu não desligava a máquina e por isso não tinha aquele dia registrado. Tive então a ideia de monitorar as mensagens D-Bus que são enviadas quando faço o bloqueio/desbloqueio da tela. Para quem não sabe, o D-Bus é a ferramenta mais usada no Linux para comunicação entre processos (&lt;em&gt;InterProcess Communication&lt;/em&gt;, IPC). Por exemplo, sempre que a tela é bloqueada, certa mensagem é enviada via D-Bus e os processos interessados ficam &amp;#8220;ouvindo&amp;#8221; por esta mensagem. O mesmo ocorre no desbloqueio.&lt;/p&gt;
&lt;p&gt;Sem mais rodeios, este é o script que escrevi:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;#!/bin/bash&lt;br /&gt;
dbus-monitor --profile \&lt;br /&gt;
&quot;type=signal,path=/org/gnome/SessionManager/Presence,\&lt;br /&gt;
interface=org.gnome.SessionManager.Presence,\&lt;br /&gt;
member=StatusChanged&quot; | \&lt;br /&gt;
awk '$7 != &quot;NameAcquired&quot;{system(&quot;date -d @&quot;$2)}'&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;O dbus-monitor permite &amp;#8220;ouvir&amp;#8221; as mensagens D-Bus que foram autorizadas para o usuário. A opção &lt;tt&gt;--profile&lt;/tt&gt; altera o formato da saída de modo que cada mensagem D-Bus seja expressa em uma linha. Exemplo de saída:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;sig 1389965062 467981 2 /org/freedesktop/DBus org.freedesktop.DBus NameAcquired&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Estamos interessados na segunda coluna, que é um &amp;#8220;timestamp&amp;#8221; que pode ser convertido para o dia/hora em que a mensagem foi recebida. No script, o comando date é usado para converter esse timestamp para uma data legível. Por exemplo, &lt;code&gt;date -d @1389965062&lt;/code&gt; gera &lt;code&gt;Fri Jan 17 09:24:22 AMT 2014&lt;/code&gt; no meu fuso horário (UTC-4).&lt;/p&gt;
&lt;p&gt;O awk é uma poderosa ferramenta para filtrar e processar texto, especialmente se este tiver um formato tabular como o gerado pelo &amp;#8220;dbus-monitor &amp;#8211;profile&amp;#8221;. No script, ele simplesmente lê a segunda coluna de cada linha e executa o comando &amp;#8220;date&amp;#8221; (como descrito acima) para converter o timestamp para uma data legível. Notem que ele exclui a linha onde a sétima coluna seja igual a &amp;#8220;NameAcquired&amp;#8221;. Essa linha sempre é gerada quando se inicia o dbus-monitor e não representa o evento que nos interessa. Para entender melhor o funcionamento do awk, sugiro ler o &lt;a href=&quot;https://www.gnu.org/software/gawk/manual/gawk.html&quot;&gt;bom e velho manual&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Só resta explicar o significado do texto:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&quot;type=signal,path=/org/gnome/SessionManager/Presence,\&lt;br /&gt;
interface=org.gnome.SessionManager.Presence,\&lt;br /&gt;
member=StatusChanged&quot;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;De acordo com o &lt;a href=&quot;http://manpages.ubuntu.com/manpages/precise/man1/dbus-monitor.1.html&quot;&gt;manual do dbus-monitor&lt;/a&gt;, esta é uma &amp;#8220;watch expression&amp;#8221;. Basicamente, é um filtro que descreve que tipo de mensagens queremos observar (as demais são ignoradas). Em português, a linha acima diz que estamos interessados em sinais (&lt;tt&gt;type=signal&lt;/tt&gt;) cujo caminho seja &lt;tt&gt;/org/gnome/SessionManager/Presence&lt;/tt&gt;, interface &lt;tt&gt;org.gnome.SessionManager.Presence&lt;/tt&gt; e nome &lt;tt&gt;StatusChanged&lt;/tt&gt;. Mais detalhes sobre o significado dos temos usados aqui podem ser encontrados no &lt;a href=&quot;http://dbus.freedesktop.org/doc/dbus-tutorial.html#concepts&quot;&gt;tutorial do D-Bus&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Faltou ainda explicar como eu uso o script. Por enquanto, eu inicio ele manualmente usando este comando (que pode ser digitado em qualquer terminal):&lt;/p&gt;
&lt;p&gt;&lt;code&gt;./scripts/track_login_logout.sh &amp;amp;&amp;gt;&amp;gt; ~/ponto.txt &amp;amp;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Usei algumas funcionalidades do shell que talvez não sejam do conhecimento geral, então vale explicar. &amp;#8220;&amp;amp;&amp;gt;&amp;gt; ~/ponto.txt&amp;#8221; siginifica &amp;#8220;redirecione tanto a saída padrão como a saída de erro para o arquivo ~/ponto.txt. O &amp;#8220;&amp;amp;&amp;#8221; ao final da linha significa que o comando irá rodar em background, portanto a janela do terminal poderá ser fechada e o script continuará em execução.&lt;/p&gt;
&lt;p&gt;Uma última observação: a mesma técnica pode ser usada para monitorar outras mensagens D-Bus, basta trocar a &amp;#8220;watch expression&amp;#8221;. A que eu usei depende do GNOME/Unity, e foi testado apenas no Ubuntu 12.04.&lt;/p&gt;&lt;br /&gt;  &lt;a rel=&quot;nofollow&quot; href=&quot;http://feeds.wordpress.com/1.0/gocomments/lizardo.wordpress.com/264/&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://feeds.wordpress.com/1.0/comments/lizardo.wordpress.com/264/&quot; /&gt;&lt;/a&gt; &lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://pixel.wp.com/b.gif?host=lizardo.wordpress.com&amp;blog=166274&amp;post=264&amp;subd=lizardo&amp;ref=&amp;feed=1&quot; width=&quot;1&quot; height=&quot;1&quot; /&gt;</content:encoded>
	<dc:date>2014-01-17T14:55:44+00:00</dc:date>
	<dc:creator>lizardo</dc:creator>
</item>
<item rdf:about="http://blog.morpheuz.cc/?p=370">
	<title>Morpheuz: Open Academy and KDE</title>
	<link>http://blog.morpheuz.cc/26/12/2013/open-academy-and-kde/</link>
	<content:encoded>&lt;p&gt;It has been a while that I don&amp;#8217;t write here but I thought this subject was worth it &lt;img src=&quot;http://blog.morpheuz.cc/wp-includes/images/smilies/icon_smile.gif&quot; alt=&quot;:)&quot; class=&quot;wp-smiley&quot; /&gt; &lt;/p&gt;
&lt;p&gt;Open source is a huge part of Facebook engineering. Whether we&amp;#8217;re building new data infrastructure tools like &lt;a href=&quot;https://www.facebook.com/notes/facebook-engineering/under-the-hood-scheduling-mapreduce-jobs-more-efficiently-with-corona/10151142560538920&quot;&gt;Corona&lt;/a&gt; and &lt;a href=&quot;https://www.facebook.com/notes/facebook-engineering/presto-interacting-with-petabytes-of-data-at-facebook/10151786197628920&quot;&gt;Presto&lt;/a&gt; to manage our warehouses on Hadoop, releasing a new mobile build tool like &lt;a href=&quot;https://www.facebook.com/notes/facebook-engineering/buck-how-we-build-android-apps-at-facebook/10151454619998920&quot;&gt;Buck&lt;/a&gt;, or improving PHP runtime with &lt;a href=&quot;https://www.facebook.com/notes/facebook-engineering/speeding-up-php-based-development-with-hhvm/10151170460698920&quot;&gt;HHVM&lt;/a&gt;, open source projects are integral to our operations.&lt;/p&gt;
&lt;p&gt;The hypothesis Facebook is exploring with Open Academy (I love the fact that we have Akademy already :P)  is that the best way to learn about software engineering is to do software engineering. As simple as that sounds, we have not traditionally done a good job with this in academia. CS departments may provide a project experience as part of the curriculum, but it typically does not map well to a real world software engineering experience. Facebook and the partner universities wants to do better.&lt;/p&gt;
&lt;p&gt;To help bridge this gap between school and industry, last spring Facebook teamed up with Jay Borenstein, a computer science professor at Stanford, to launch Open Academy. Open Academy is a program designed to provide a practical, applied software engineering experience as part of a university student’s CS education. The program works closely with key faculty members at top CS universities to launch a course that matches students with active open source projects and mentors and allows them to receive academic credit for their contributions to the open source code base.&lt;/p&gt;
&lt;p&gt;The idea is that partnering with selected open source projects holds a great deal of promise on a number of levels; it will give students exposure to learning how to come up to speed in an established code base, revision control, project estimation and access to examples of good software engineering practices beyond what we are able to provide inside university walls, among many other things.&lt;/p&gt;
&lt;p&gt;One question that might be on top of your mind is: &amp;#8220;how is this different than Google Summer of Code?&amp;#8221; One key difference is the tight integration with universities. Facebook OpenAcademy runs as a university course offering for which a student receives a grade and academic credit. It also allows the university teaching staff to stay very involved and work in tandem with the open source mentors to give students good support for their software development efforts. Another difference is the team element. This course offering partners students from around the globe on teams that work together, which IMHO is exactly the way KDE works.&lt;/p&gt;
&lt;p&gt;In a nutshell, the program works like this:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;A student team of 3-8 students, potentially spanning multiple universities, is formed&lt;/li&gt;
&lt;li&gt;A matching process is run that puts a student team with an open source project&lt;/li&gt;
&lt;li&gt;The team and a &amp;#8220;mentor&amp;#8221; from the open source project are flown to a location for a weekend ramp up hackathon (the location is Facebook headquarters in Menlo Park, CA). The students can work on improving the project in two ways: by knocking out low hanging fruit issues that already exist or by identifying and pursuing new functionality&lt;/li&gt;
&lt;li&gt;&lt;span&gt;The students will work on projects for between 8-20 weeks depending upon the schedules of the universities involved Univerisity faculty will be closely involved and consult with the mentor when determining final student grades. Expectations will be set with the students that states the coding contributions they make &amp;#8211; the quality and ambition &lt;/span&gt;&lt;span&gt;of them &amp;#8211; will be the main factor determining their grade&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;Start date: January-Feb depending on university&lt;/li&gt;
&lt;li&gt;Feb 7-9 Hackathon at Facebook Headquarters in Menlo Park, CA&lt;/li&gt;
&lt;li&gt;Midterm Acknowledgment (tbd)&lt;/li&gt;
&lt;li&gt;End date: Mar &amp;#8211; Jun depending on university&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Summary of expectations for mentors:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Attend Kickoff Hackathon at Facebook HQ Feb 7-9, 2014 (your flight and hotel will be paid for)&lt;/li&gt;
&lt;li&gt;Meet the students working on your project(s)&lt;/li&gt;
&lt;li&gt;Help the students select project goals and develop plans to achieve them&lt;/li&gt;
&lt;li&gt;Set expectations for how you like to communicate with the team&lt;/li&gt;
&lt;li&gt;Be responsive to requests from the team during the course&lt;/li&gt;
&lt;li&gt;As often as possible, attend weekly, 30 minute remote team meetings (IRC, Hangout or equivalent)&lt;/li&gt;
&lt;li&gt;Be prepared to provide the course instructor with a grade recommendation at the end of the course.&lt;/li&gt;
&lt;li&gt;Overall time comittment: You are obviously in control of this and it is also proportional to the number of students you decide to have, but not counting the hackathon, 3-5 hours per week is our expectation&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I am asking every interested mentor to fill in project proposals here: &lt;a title=&quot;Open Academy&quot; href=&quot;http://community.kde.org/Open_Academy&quot;&gt;http://community.kde.org/Open_Academy&lt;/a&gt; . I am excited that KDE can have some slots in this program and as with every other program out there that brings students to open source I am sure KDE is the best place for a student to learn more about software engineering.&lt;/p&gt;
&lt;p&gt;If you have questions, feel free to email me.&lt;/p&gt;</content:encoded>
	<dc:date>2013-12-26T11:45:45+00:00</dc:date>
</item>
<item rdf:about="http://earruda.eti.br/blog/?p=434">
	<title>Everton Arruda: Get a list of TODOs and FIXMEs in your project</title>
	<link>http://earruda.eti.br/blog/2013/10/get-a-list-of-todos-and-fixmes-in-your-project/</link>
	<content:encoded>&lt;p&gt;If you are like me and add FIXMEs and TODOs in your codes, this is a good tip.&lt;/p&gt;
&lt;p&gt;To get the list of TODOs and FIXMEs, run the following command:&lt;/p&gt;&lt;pre class=&quot;crayon-plain-tag&quot;&gt;grep --exclude-dir=.git -rEI &amp;quot;TODO|FIXME&amp;quot; . 2&amp;gt;/dev/null&lt;/pre&gt;&lt;p&gt;&lt;/p&gt;
&lt;p&gt;This command makes a recursive search in all directories and files inside you current directory for FIXME or TODO patterns.&lt;/p&gt;
&lt;p&gt;You can make a one word command with that line, just add the following to your &lt;em&gt;~/.bashrc&lt;/em&gt; and reload it:&lt;/p&gt;&lt;pre class=&quot;crayon-plain-tag&quot;&gt;alias tasks='grep --exclude-dir=.git -rEI &amp;quot;TODO|FIXME&amp;quot; . 2&amp;gt;/dev/null'&lt;/pre&gt;&lt;p&gt;The word I chose was &amp;#8216;tasks&amp;#8217;, so, whenever I run &amp;#8216;tasks&amp;#8217;, the command is executed.&lt;/p&gt;
&lt;p&gt;Source: &lt;a href=&quot;http://www.commandlinefu.com/commands/view/12833/get-a-list-of-all-todofixme-tasks-left-to-be-done-in-your-project&quot; target=&quot;_blank&quot;&gt;http://www.commandlinefu.com/commands/view/12833/get-a-list-of-all-todofixme-tasks-left-to-be-done-in-your-project&lt;/a&gt;&lt;/p&gt;
&lt;div class=&quot;shareaholic-canvas&quot;&gt;&lt;/div&gt;</content:encoded>
	<dc:date>2013-10-21T12:51:37+00:00</dc:date>
</item>
<item rdf:about="http://labs.danilocesar.com/blog/?p=177">
	<title>Danilo Cesar: YouCompleteMe: semantic auto-completion and JumpToDefinition for VIM on webkitgtk+</title>
	<link>http://labs.danilocesar.com/blog/2013/09/11/youcompleteme-semantic-auto-completion-and-jumptodefinition-for-vim-on-webkitgtk/</link>
	<content:encoded>&lt;h2&gt;Prelude&lt;/h2&gt;
&lt;p&gt;&lt;em&gt;Jump to the next session if you don&amp;#8217;t want to read lullabies&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;There was a time when I was a Qt application developer working with vim. It worked pretty well until I started to work with large applications such as Meego Application Framework.&lt;br /&gt;
Hundreds of thousands of files, classes, I couldn&amp;#8217;t memorize everything. Then I discovered QtCreator with VI-mode.&lt;/p&gt;
&lt;p&gt;I&amp;#8217;d never really liked big/heavy IDEs but QtCreator wasn&amp;#8217;t that heavy, it had a decent vi-mode and I was able to use the cool things such as auto-completion and jump-to-definition.&lt;/p&gt;
&lt;p&gt;Three years later here I&amp;#8217;m working with raw VIM again, on top of webkitgtk+ so QtCreator is not an option anymore. What to do?&lt;/p&gt;
&lt;p&gt;You can tell me about ctags and cscope&amp;#8230; Sorry, ctags and cscope sux for c++ code, really! I tried hard, I wrote scripts to parse the GNUMakefile.list.am and use only the important files but it wasn&amp;#8217;t enough. Ctags can&amp;#8217;t really deal with classes, doesn&amp;#8217;t know much about scopes and VIM auto-completion wasn&amp;#8217;t semantic. How to solve that problem all-in-once?&lt;/p&gt;
&lt;h2&gt;YouCompleteMe&lt;/h2&gt;
&lt;p&gt;&lt;img alt=&quot;YouCompleteMe GIF&quot; src=&quot;https://a248.e.akamai.net/camo.github.com/1f3f922431d5363224b20e99467ff28b04e810e2/687474703a2f2f692e696d6775722e636f6d2f304f50346f6f642e676966&quot; /&gt;&lt;/p&gt;
&lt;h3&gt;Description&lt;/h3&gt;
&lt;p&gt;From the original &lt;a href=&quot;https://github.com/Valloric/YouCompleteMe&quot; target=&quot;_blank&quot;&gt;website&lt;/a&gt;: &lt;em&gt;&lt;strong&gt;&amp;#8220;YouCompleteMe is a fast, as-you-type, fuzzy-search code completion engine for Vim.&amp;#8221;&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;
&lt;h3&gt;Installation&lt;/h3&gt;
&lt;p&gt;The installation procedures are quite simple and well defined on &lt;a href=&quot;https://github.com/Valloric/YouCompleteMe#readme&quot; target=&quot;_blank&quot;&gt;https://github.com/Valloric/YouCompleteMe#readme&lt;/a&gt;&lt;br /&gt;
Basically, you need to use Vundle (why are you not using it yet?!) and drop the YCM files in the right place. The installer will do the rest.&lt;/p&gt;
&lt;h3&gt;vimrc and vundle&lt;/h3&gt;
&lt;p&gt;if YouCompleteMe is your first Vundle plugin, your .vimrc file should start like this:&lt;/p&gt;
&lt;p&gt;&lt;pre&gt;&lt;code&gt;
set nocompatible&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;quot; be iMproved
filetype off&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;quot; required!

set rtp+=~/.vim/bundle/vundle/
call vundle#rc()

Bundle &amp;#039;gmarik/vundle&amp;#039;
Bundle &amp;#039;Valloric/YouCompleteMe&amp;#039;&lt;/code&gt;&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Remember to use those lines at the beginning of the file, other rules should appear after that.&lt;/p&gt;
&lt;h3&gt;How it works&lt;/h3&gt;
&lt;p&gt;Basically YouCompleteMe uses a .ycm_extra_conf.py, which is a python script that helps YouCompleteMe plugin to find the compiling flags. Those flags are required so clang can interpret &lt;strong&gt;#includes&lt;/strong&gt; and &lt;strong&gt;#defines &lt;/strong&gt;from other files. It might be required a .ycm_extra_conf.py for each project you work on (Although it would be awesome to have a generic Makefile parser).&lt;/p&gt;
&lt;p&gt;For webkitGtk, you can drop &lt;a href=&quot;http://danilocesar.com/others/gtk.ycm_extra_conf.py&quot;&gt;this file&lt;/a&gt; into the root folder and you&amp;#8217;re done. Or you can help me to add traction to Ycm and push &lt;a href=&quot;https://bugs.webkit.org/show_bug.cgi?id=119618&quot;&gt;this patch&lt;/a&gt; upstream.&lt;/p&gt;
&lt;h3&gt; Tips&amp;#038;Tricks &lt;/h3&gt;
&lt;p&gt;Add this to your .vimrc&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;
nnoremap &amp;lt;leader&amp;gt;y :YcmForceCompileAndDiagnostics&amp;lt;cr&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
nnoremap &amp;lt;leader&amp;gt;pg :YcmCompleter GoToDefinitionElseDeclaration&amp;lt;CR&amp;gt;
nnoremap &amp;lt;leader&amp;gt;pd :YcmCompleter GoToDefinition&amp;lt;CR&amp;gt;
nnoremap &amp;lt;leader&amp;gt;pc :YcmCompleter GoToDeclaration&amp;lt;CR&amp;gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;If you&amp;#8217;re used to the webkit codebase you know how painful it is when you touch one file, wait two minutes to build and find out that you forgot a semicolon.&lt;br /&gt;
You can type \y to check if the file is compilable (clang will actually compile the file for you) and give you warnings/errors for that specific file.&lt;br /&gt;
\pc and \pd are also usefull for jump to definition/declaration.&lt;/p&gt;
&lt;p&gt;So, if you&amp;#8217;re working on WebkitGtk now (or any other project that might benefit from YouCompleteMe), give it a try!&lt;/p&gt;</content:encoded>
	<dc:date>2013-09-11T20:27:25+00:00</dc:date>
</item>
<item rdf:about="http://baraujo.net/blog/?p=128">
	<title>Bruno Araujo: Unity: from zero to Pong</title>
	<link>http://baraujo.net/blog/?p=128</link>
	<content:encoded>&lt;p&gt;In my last &lt;a href=&quot;http://baraujo.net/blog/?p=106&quot;&gt;post&lt;/a&gt; I&amp;#8217;ve talked about some game APIs, and could achieve some progress with MonoGame: an animated sprite, controllable with an X360 controller. It took some effort but I&amp;#8217;ve learned a lot of things and also regained some knowledge of C# (I&amp;#8217;ve worked as a .Net developer a long time ago). But from there, I realized that writing a game practically from scratch is no walk in the park, and even if I were able to spend my whole day coding I&amp;#8217;d still need a immense amount of time and effort to do something even remotely playable.&lt;/p&gt;
&lt;p&gt;So, why not stand in the shoulder of giants? Enter &lt;a href=&quot;http://unity3d.com/&quot;&gt;Unity&lt;/a&gt;, which in their words is a &amp;#8220;game development ecosystem&amp;#8221;. Although it is meant for 3D games, it is still possible with a bit of effort to make 2D ou 2.5D ones, and it uses C# (also JS and Boo). A perfect fit for my next step of doing, er, something.&lt;/p&gt;
&lt;p&gt;After searching for some tutorials and watching &lt;a href=&quot;http://www.youtube.com/watch?v=_IzbNanA1Vk&quot;&gt;these&lt;/a&gt; &lt;a href=&quot;http://www.youtube.com/watch?v=qQ32rGOSg7E&quot;&gt;videos&lt;/a&gt; I was able to make a basic Pong clone in the space of three days. I&amp;#8217;ve put the project online at GitHub (&lt;a href=&quot;https://github.com/baraujo/pong-clone&quot;&gt;https://github.com/baraujo/pong-clone&lt;/a&gt;), and this is what it looks like:&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://baraujo.net/blog/wp-content/uploads/2013/08/pong-clone.png&quot;&gt;&lt;img class=&quot;alignnone size-medium wp-image-129&quot; alt=&quot;pong-clone&quot; src=&quot;http://baraujo.net/blog/wp-content/uploads/2013/08/pong-clone-580x439.png&quot; width=&quot;580&quot; height=&quot;439&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;You can try for yourself on &lt;a href=&quot;http://baraujo.net/pong&quot;&gt;http://baraujo.net/pong&lt;/a&gt;. I was able to run it on WIndows, Linux, Android and the Web player, where I took the screenshot above. Running it on Android was tricky because of the touchscreen, which makes the paddle control not so trivial, but with a bit of math and patience it became somewhat playable. I intend to keep improving it, adding a big score display, just like the classic Pong, an improved CPU player (and the option to have a second player in the same keyboard/mobile) and various adjustements. I&amp;#8217;ll update this post when these improvements are finished.&lt;/p&gt;</content:encoded>
	<dc:date>2013-08-22T02:47:22+00:00</dc:date>
</item>
<item rdf:about="http://baraujo.net/blog/?p=123">
	<title>Bruno Araujo: short story: a single shot</title>
	<link>http://baraujo.net/blog/?p=123</link>
	<content:encoded>&lt;p&gt;So, while I&amp;#8217;m still gathering material for the technical post, I&amp;#8217;ll leave here a short story written in a very idle moment. It&amp;#8217;s written in Portuguese (my native language, BTW), maybe one day I&amp;#8217;ll translate it to English, but not today.&lt;/p&gt;
&lt;p&gt;*.*.*&lt;/p&gt;
&lt;p&gt;&lt;i&gt;a single shot&lt;/i&gt;&lt;/p&gt;
&lt;p&gt;Essa era a sua chance. Sua última chance. Caso acertasse, poria fim a esta situação inteira, salvaria diversas vidas, poderia ganhar diversas condecorações e ainda sairia como o heroi da história, pela primeira vez em toda a sua vida.&lt;/p&gt;
&lt;p&gt;Exceto que não seria apenas a primeira, mas também a última, e ele não seria um heroi, mas um mártir.&lt;/p&gt;
&lt;p&gt;Esta guerra está perdida. Escondido nas sombras, com o que restou dos seus companheiros, os pensamentos aceleram e uma ideia começa a ganhar força. Ele poderia incapacitar permanentemente o acampamento inimigo, mas a qual custo? Uma missão suicida era a única alternativa, se esgueirar durante a noite e plantar explosivos no depósito de armas. A confusão seria tamanha que um ataque surpresa destruiria o acampamento de homens cansados e mal nutridos, não muito diferentes dele mesmo, e garantiria a passagem pela fronteira, a apenas alguns quilômetros naquela direção, objetivo que poderia ser cumprido antes do amanhecer. Quanto a ele próprio, estaria no meio de um monte de soldados apenas esperando para puxar o gatilho na direção de alguém com um uniforme ligeiramente diferente. E não demoraria até que isso acontecesse, teria sorte se tivesse uma morte rápida.&lt;/p&gt;
&lt;p&gt;Mesmo com uma grande chance de sucesso, seu plano enfrentara a resistência ferrenha dos seus compatriotas. &amp;#8220;Não vale a pena se arriscar por algo que tem pouquíssimas chances de dar certo&amp;#8221;, dizia um deles. De fato, caso o plano não funcionasse, ele já tinha pleno conhecimento que seus inimigos não costumam fazer prisioneiros de guerra.&lt;/p&gt;
&lt;p&gt;O que fazer? Ele teria que agir duplamente escondido &amp;#8211; dos inimigos e de seus compatriotas. Só poderia contar consigo mesmo para planejar e executar o próprio plano à revelia de todos. Precisava pensar rápido porque o dia se aproximava e então já seria tarde demais.&lt;/p&gt;
&lt;p&gt;&amp;#8230;&lt;/p&gt;
&lt;p&gt;Quase todos estão no chão, alguns dormindo e outros exaustos. Poucos estão de pé, vigiando. E ele, passando ao largo de todos sem alertar uma única alma da sua presença. Nunca o treinamento de guerra na selva tinha sido tão útil, ele era praticamente uma sombra passando de uma árvore a outra. Carregava a mochila secretamente preparada, com explosivos suficientes para derrubar um pequeno prédio, e ia em direção ao seu objetivo. No acampamento inimigo uma situação semelhante ao seu próprio acampamento, com poucos de pé, e ele facilmente chega até a larga tenda abrigando vários tipos de munição e granadas. Joga a mochila lá dentro, vai até a distância máxima que o transmissor funciona, algumas dezenas de metros, se põe atrás de uma árvore, e fecha os olhos. Em seguida, fecha o mecanismo que carregava na mão direita.&lt;/p&gt;
&lt;p&gt;Era claro como o próprio sol, e ruidoso como um vulcão. Os companheiros levantam-se repentinamente sem saber o que fazer naquela confusão mas em poucos segundos tudo fica claro. O plano suicida tinha sido executado. Nada mais poderia ser feito em relação ao futuro mártir, senão reunir o que restava de forças e partir com tudo pra cima do acampamento completamente desordenado. Em questão de minutos, os poucos soldados agindo de vigias foram facilmente alvejados e os restantes rendidos facilmente ou derrubados como moscas. Enfim, uma vitória, uma pequena vitória no meio daquela guerra. E praticamente todos conseguiram ultrapassar as trincheiras e cruzar a fronteira pesadamente defendida pelos seus aliados.&lt;/p&gt;
&lt;p&gt;Praticamente. Só um soldado não cruzou a fronteira, e foi dado como desaparecido. Ao invés de condecorações, uma condenação à revelia por insubordinação grave e deserção, crimes que o conduziriam à corte marcial caso estivesse presente. Fuzilamento. Ao invés de herói ou mártir, insubordinado e desertor. Ele havia se tornado um pária, rejeitado no seu próprio país e caçado como um animal pelo país inimigo.&lt;/p&gt;
&lt;p&gt;O clarão da explosão mostrou a ele um pouco da selva além, onde ele podia observar um riacho e um pequeno bote amarrado às margens. Desamarrou o bote e seguiu em frente, ciente de todos os crimes que havia cometido aos olhos dos seus compatriotas. Sem ter pra onde ir, passou dias na mata, utilizando tudo o que aprendeu no curso de sobrevivência na selva para manter-se vivo. Quando estava já à beira do colapso físico e mental, chegou a uma pequena vila, isolada e alheia aos acontecimentos dos dias anteriores, onde foi recebido simplesmente como um homem perdido na mata e nada mais. Foi dado a ele um lugar para dormir e algo para comer, e depois de muitos anos ele foi tratado não como subordinado ou inimigo, mas como igual. E decidiu, naquele momento, iniciar uma nova vida, naquele lugar distante onde o horror da guerra não havia ainda chegado.&lt;/p&gt;
&lt;p&gt;&amp;#8230;&lt;/p&gt;
&lt;p&gt;Vários anos depois ele era apenas um nome num arquivo morto do tribunal militar do seu país, e o inimigo havia desistido de procurá-lo. Mas sabe-se que ele viveu um por um bom tempo depois disso e que talvez ele até tenha formado uma família, segundo relatos dos habitantes da antiga vila &amp;#8211; hoje cidade &amp;#8211; onde ele passou o resto dos seus dias. E finalmente ele foi reconhecido como um herói de guerra devido a quantidade de vidas que ajudou a salvar. Apenas com o tempo ele teve o seu esforço reconhecido, assim como muitos.&lt;/p&gt;
&lt;p&gt;&amp;#8230;&lt;/p&gt;
&lt;p&gt;No breve momento em que sua mão fechava o mecanismo, só havia um pensamento na sua cabeça: &amp;#8220;Essa é a minha única chance de salvar, ao invés de destruir&amp;#8221;.&lt;/p&gt;</content:encoded>
	<dc:date>2013-07-13T20:40:08+00:00</dc:date>
</item>
<item rdf:about="http://baraujo.net/blog/?p=106">
	<title>Bruno Araujo: Developing games: the first steps</title>
	<link>http://baraujo.net/blog/?p=106</link>
	<content:encoded>&lt;p&gt;So, after playing great indie games like &lt;a href=&quot;http://polytroncorporation.com/61-2&quot;&gt;Fez&lt;/a&gt;, &lt;a href=&quot;http://supermeatboy.com/&quot;&gt;Super Meat Boy&lt;/a&gt; and &lt;a href=&quot;http://braid-game.com/&quot;&gt;Braid&lt;/a&gt;, and also seeing a &lt;a href=&quot;http://buy.indiegamethemovie.com/&quot;&gt;documentary&lt;/a&gt; about the people behind them, I finally decided to start making games, instead of just playing them. In fact, the real motivation for me to become a Computer Scientist was just that: make games. But as time passes, so does your goals, and sometimes you&amp;#8217;re too distracted by the other aspects of your life to remember the ideals of the past. And so, I studied many years to become a Scientist and worked other many years accumulating experience as a software developer, working on projects big and small, open source and proprietary ones.&lt;/p&gt;
&lt;p&gt;I&amp;#8217;ve played hundreds, maybe a thousand games over the course of my life and various videogames and PCs, and around 9 years old I was copying BASIC games from small books into my &lt;a href=&quot;http://en.wikipedia.org/wiki/Hotbit&quot;&gt;Hotbit&lt;/a&gt; computer, watching in awe how these hours of inserting code could become something I could control and interact. Fast forward 21 years and I&amp;#8217;m here again, with modern computers, languages and algorithms, but the same purpose: transform code into something I can play. But with a fundamental difference: I&amp;#8217;ll make my own games now.&lt;/p&gt;
&lt;p&gt;After searching for some tools, these are the ones I&amp;#8217;m trying to learn and code right now:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span&gt;&lt;a href=&quot;http://baraujo.net/blog/cocos2d-x.org&quot;&gt;cocos2d-x&lt;/a&gt;: A multiplatform library for making 2D games. As a port from cocos2d-iphone, its focus seems to be mobile platforms, and most of the examples and tutorials around the &amp;#8216;Web talk about just that. Its C++ API looks very complete but also very complex, with classes to do almost anything for you; lots of examples show the power of this framework for the ones willing to learn.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://polycode.org/&quot;&gt;Polycode&lt;/a&gt;: According to the official Web page, &amp;#8220;a free open-source framework for creating crossplatform games &amp;amp; interactive applications&amp;#8221;. It has C++ and Lua APIs, based on various open source libraries, along with an IDE for managing game content and developing Lua programs. Although it is not quite yet finished its API looks very nice, with less verbosity than cocos2d-x for the same tasks; while I wait for a more proper release, I&amp;#8217;m learning to do some simple examples. Has 2D and 3D capabilities.&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://monogame.net/&quot;&gt;MonoGame&lt;/a&gt;: A open source implementation of Microsoft XNA, which itself is a API for game development in C#. Most of my life I&amp;#8217;ve worked with Linux and open source software and platforms, and although technically I could use MonoGame in Linux, it is more easily done using VS2010/2012 on Windows, which in itself is a departure from these many years. But, as I started to learn how it works, I&amp;#8217;m trying to be more open-minded and not dismiss it right away because it is a port of a Microsoft technology; instead, I&amp;#8217;m approaching MonoGame with a positive attitude and trying to do something concrete with it. As a matter of perspective, Fez and &lt;a href=&quot;http://supergiantgames.com/index.php/media/&quot;&gt;Bastion&lt;/a&gt; were made with XNA and later ported to other platforms with MonoGame.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I&amp;#8217;m approaching each one of them in turn, trying to make a simple movable sprite in each API. So far, I&amp;#8217;ve managed to do it with MonoGame, which is where I could advance more, and stumbled in some hurdles in cocos2d-x and Polycode. Still, I think these are all powerful tools for easing the process of making a game, and their creators have invested (or are still investing) a lot of time and work. Maybe I could use other tools in the near future or join skilled people with the same goal, allowing me to focus on the programming itself. But for now, back to the drawing board and to the code editor.&lt;/p&gt;</content:encoded>
	<dc:date>2013-06-23T08:11:41+00:00</dc:date>
</item>
<item rdf:about="http://baraujo.net/blog/?p=81">
	<title>Bruno Araujo: Parsing a very large XML file with Python</title>
	<link>http://baraujo.net/blog/?p=81</link>
	<content:encoded>&lt;p&gt;&lt;span&gt;In the process of doing some experiments, I was looking for a suitable text corpus to use; the ideal candidate would have a few GB and would not cause any monetary loss on my wallet. Stumbling around I found out that &lt;/span&gt;&lt;span&gt;Wikipedia&lt;/span&gt;&lt;span&gt; has various dumps &lt;/span&gt;&lt;span&gt;of its pages&lt;/span&gt;&lt;span&gt;, and decided that the &lt;a href=&quot;http://en.wikipedia.org/wiki/Wikipedia:Database_download#English-language_Wikipedia&quot;&gt;2013 dump&lt;/a&gt; would be a suitable bag of text for my experiments &amp;#8211; a single XML of 9GB, which by the way is the &lt;em&gt;compressed &lt;/em&gt;size. The actual size is 42GB. &lt;/span&gt;I had in my computer the largest XML file I&amp;#8217;ve seen in my life, and I didn&amp;#8217;t have space left in disk to even extract it &amp;#8211; parsing it would be a hell of a job.&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Fortunately I already knew how to parse XML with the nice &lt;/span&gt;&lt;a href=&quot;http://lxml.de/&quot;&gt;lxml&lt;/a&gt;&lt;span&gt; Python module, but how to proceed when I just cannot extract the file? It turns out that there is a module called &lt;/span&gt;&lt;a href=&quot;http://docs.python.org/2/library/bz2.html&quot;&gt;bzr&lt;/a&gt;&lt;span&gt; which exposes an interface for opening .bz2 files in the same fashion the open() function does. After some hours of struggling, searching around several sites, blogs and forums and filling all of memory + swap more than once, I managed to parse the file without blowing up the RAM with this Python script:&lt;/span&gt;&lt;/p&gt;
&lt;pre class=&quot;brush: python; title: ; notranslate&quot;&gt;
from lxml import etree
import sys
import bz2
import unicodedata

TAG = '{http://www.mediawiki.org/xml/export-0.8/}text'

def fast_iter(context, func, *args, **kwargs):
    # http://www.ibm.com/developerworks/xml/library/x-hiperfparse/
    # Author: Liza Daly
    # modified to call func() only in the event and elem needed
    for event, elem in context:
        if event == 'end' and elem.tag == TAG:
            func(elem, *args, **kwargs)
        elem.clear()
        while elem.getprevious() is not None:
            del elem.getparent()[0]
    del context

def process_element(elem, fout):
        global counter
        normalized = unicodedata.normalize('NFKD', \
                unicode(elem.text)).encode('ASCII','ignore').lower()
        print &amp;gt;&amp;gt;fout, normalized.replace('\n', ' ')
        if counter % 10000 == 0: print &amp;quot;Doc &amp;quot; + str(counter)
        counter += 1

def main():
    fin = bz2.BZ2File(sys.argv[1], 'r')
    fout = open('2013_wikipedia_en_pages_articles.txt', 'w')
    context = etree.iterparse(fin)
    global counter
    counter = 0
    fast_iter(context, process_element, fout)

if __name__ == &amp;quot;__main__&amp;quot;:
    main()
&lt;/pre&gt;
&lt;p&gt;&lt;em&gt;Update (06/07/2013):&lt;/em&gt; This code is now available as a Github &lt;a href=&quot;https://gist.github.com/baraujo/5938736&quot;&gt;gist&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The output format is a single file with one document per line. Probably it would be better to put all these lines in a DBMS or a &lt;a href=&quot;http://en.wikipedia.org/wiki/Berkeley_DB&quot;&gt;Berkeley DB&lt;/a&gt; file, as the lines can be really, really big, but for now the plain text format will suffice. Every document is normalized to contain only ASCII characters, avoiding potential encoding problems, but besides that no further processing is done. I parsed only the tag &amp;#8220;text&amp;#8221; from the XML, but if you need to parse more than one tag change TAG into a dict:&lt;/p&gt;
&lt;pre class=&quot;brush: python; title: ; notranslate&quot;&gt;
TAG = {
    '{http://www.mediawiki.org/xml/export-0.8/}text',
    '{http://www.mediawiki.org/xml/export-0.8/}title'
}
(...)
        if event == 'end' and elem.tag in TAG:
&lt;/pre&gt;
&lt;p&gt;The URL enclosed in brackets is the namespace of the tags, which lxml annoyingly insists in using, so I just ended using the &amp;#8220;full name&amp;#8221; of the tag I needed. Also, I know that globals are evil, I just wanted to easily count the number of documents processed and I was too lazy to properly write a class. I killed the process when the output file reached around 20GB, which I considered big enough for my experimental needs. Now all that is left is to actually run the benchmarks and see what happens.&lt;/p&gt;
&lt;p&gt;And just for the record: I&amp;#8217;m not a Python specialist, feel free to point eventual problems or bottlenecks on this code.&lt;/p&gt;</content:encoded>
	<dc:date>2013-05-08T05:29:08+00:00</dc:date>
</item>
<item rdf:about="http://savago.wordpress.com/?p=468">
	<title>Adenilson Cavalcanti: Considerations on home office</title>
	<link>http://savago.wordpress.com/2013/04/24/considerations-on-home-office/</link>
	<content:encoded>&lt;p&gt;Ah&amp;#8230; home office. The dream of any real programmer.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://savago.files.wordpress.com/2013/04/home_office.jpg&quot;&gt;&lt;img class=&quot;aligncenter size-medium wp-image-469&quot; alt=&quot;home_office&quot; src=&quot;http://savago.files.wordpress.com/2013/04/home_office.jpg?w=300&amp;h=225&quot; width=&quot;300&quot; height=&quot;225&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I was about to say &amp;#8216;hacker&amp;#8217; but it seems that this substantive has become something that can&amp;#8217;t be said in some circles in current &amp;#8216;social sensitive&amp;#8217; society (but that is a topic of another post).&lt;/p&gt;
&lt;p&gt;Can you imagine that: wake up at any time, no need to commute, have your very own office space decorated in any way you want?&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://savago.files.wordpress.com/2013/04/desk.jpg&quot;&gt;&lt;img class=&quot;aligncenter size-medium wp-image-471&quot; alt=&quot;desk&quot; src=&quot;http://savago.files.wordpress.com/2013/04/desk.jpg?w=300&amp;h=225&quot; width=&quot;300&quot; height=&quot;225&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I have being working in a home office setup for the last 16 months and realized a couple things that may be interesting to share with my friends and the opensource community overall.&lt;/p&gt;
&lt;p&gt;First lesson: &lt;strong&gt;it requires discipline&lt;/strong&gt;. There is no one around to push you to do your job, so unless you are a disciplined lad, probably you may get in trouble. I&amp;#8217;ve lead teams of developers in the past, and I can say that not everyone is cut to work in a more relaxed and self managing environment. What is interesting: the majority of people when offered the opportunity to work remotely will be scared of it and will find an excuse to avoid it.&lt;/p&gt;
&lt;p&gt;Second lesson: &lt;strong&gt;timezone differences are your friend&lt;/strong&gt;. Last year I was able for 2 months to wake up early in the morning, visit a beach from 6AM to 12PM and then start working. If you have the opportunity of working remotely for a sponsor located in a different timezone, it is beneficial for both sides to explore that. You will be available at the sponsor&amp;#8217;s timezone and at same time, it gives you freedom to do things that won&amp;#8217;t be possible in a common 9AM to 5PM workday. Tip: since I&amp;#8217;m using KDE, I have in my workspace analog clocks displaying the timezones of all involved parties in a project.&lt;/p&gt;
&lt;p&gt;Third lesson: &lt;strong&gt;have your office&lt;/strong&gt;. To properly turn on your mind set, have an office (which may be a room in your house) that will be your work place. When you start working, close the door and make clear to everyone that you are busy and not available. And when you are done with your daily journey, simply leave the place and close the door behind you, to help you change the mindset and be able to relax.&lt;/p&gt;
&lt;p&gt;Fourth lesson: &lt;strong&gt;communication rules&lt;/strong&gt;. Be in touch with your pals, provide daily updates and try as much is possible to be aware to what is happening in your project. Being thousands of Kms (or should I say miles to the Imperial guys?) away makes your work pretty hard to be noticed by managers and at same time provides unique challenges to be able to feel how a project is going and what the sponsors priorities really are.&lt;/p&gt;
&lt;p&gt;Fifth lesson: &lt;strong&gt;you will always loose something&lt;/strong&gt;. The trash talk at the coffee place? Not documented good practices? Some cool pet project developed by a co-worker? You will loose all that working remotely and that is a sad fact that you need to accept. There are also limits to what you can contribute back to your company while working remotely, which leads to the next point.&lt;/p&gt;
&lt;p&gt;Sixth lesson: &lt;strong&gt;you will achieve the ladder&amp;#8217;s end pretty fast&lt;/strong&gt;. We, humans, are related to primates. Hunters in the past used to depend on facial expressions to properly assess danger and happiness. Even with current&amp;#8217;s advances on remote communication, there are limits imposed by our own nature that won&amp;#8217;t be overcome by technology. You need to accept that you won&amp;#8217;t be able to achieve the top of your company while working remotely.&lt;/p&gt;
&lt;p&gt;Seventh lesson: &lt;strong&gt;it requires courage and confidence on your skills&lt;/strong&gt;. Think about it: you probably signed a contract with a foreign company that probably cannot be enforced in your local country and which gives freedom to both parties to end the aforementioned contract at any time. I personally feel that this keeps things straight and honest between both parties (you need to be happy and the sponsor needs to be satisfied with the results), but there are people who may be afraid of such situation.&lt;/p&gt;
&lt;p&gt;Well&amp;#8230; this is it. If I remember other things I&amp;#8217;ve learned on this subject, I will update this post. Do you have thoughts on the subject? Let me know.&lt;/p&gt;&lt;br /&gt;  &lt;a rel=&quot;nofollow&quot; href=&quot;http://feeds.wordpress.com/1.0/gocomments/savago.wordpress.com/468/&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://feeds.wordpress.com/1.0/comments/savago.wordpress.com/468/&quot; /&gt;&lt;/a&gt; &lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://pixel.wp.com/b.gif?host=savago.wordpress.com&amp;blog=8919535&amp;post=468&amp;subd=savago&amp;ref=&amp;feed=1&quot; width=&quot;1&quot; height=&quot;1&quot; /&gt;</content:encoded>
	<dc:date>2013-04-24T05:27:09+00:00</dc:date>
	<dc:creator>savago</dc:creator>
</item>
<item rdf:about="http://blog.ademar.org/?p=1247">
	<title>Ademar de Souza Reis Jr.: Retrospectiva 2012, planos pra 2013</title>
	<link>https://blog.ademar.org/2013/retrospectiva-2012/</link>
	<content:encoded>&lt;p&gt;Outro dia me perguntaram se o blog estava morto, pro que respondi: &amp;#8220;só estará morto quando eu parar de postar a retrospectiva de fim de ano&amp;#8221;. Bem, esse ano eu passei perto: o tradicional post de fim de ano está mais de duas semanas atrasado. Mas antes tarde do que nunca, aqui está ele! :-)&lt;/p&gt;
&lt;p&gt;No ano passado eu disse que 2011 havia sido um ano &amp;#8220;excelente, pra ser lembrado&amp;#8221;. 2012 não foi nada diferente: a Sofia chegou e fizemos mais uma grande mudança, saindo de Recife &amp;#8211; PE e vindo pra Canela &amp;#8211; RS.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Sofia &amp;#8211; O destaque do ano&lt;/strong&gt;&lt;br /&gt;
A Sofia nasceu em Maio e está crescendo saudável, linda e cada vez mais divertida. Eu a cada dia fico mais apaixonado pela filhota. É ótimo acompanhar as mudanças quase que semanais e a evolução de cada etapa. Um grande aprendizado pra eu que tinha pouquíssima experiência com bebês e um grande desafio pra eu e a Viviane como pais. Ter um filho tem sido uma experiência incrível, fortemente recomendada a todos (ela fechou o ano com 7 meses e 20 dias de idade).&lt;/p&gt;
&lt;div id=&quot;attachment_1252&quot; class=&quot;wp-caption aligncenter&quot;&gt;&lt;img src=&quot;http://blog.ademar.org/wp-content/uploads/2013/01/20120919_171552-420x280.jpg&quot; alt=&quot;Sofia na Serra Gaúcha&quot; width=&quot;420&quot; height=&quot;280&quot; class=&quot;size-medium wp-image-1252&quot; /&gt;&lt;p class=&quot;wp-caption-text&quot;&gt;Sofia aos 5 meses, passando frio na Serra Gaúcha&lt;/p&gt;&lt;/div&gt;
&lt;div id=&quot;attachment_1253&quot; class=&quot;wp-caption aligncenter&quot;&gt;&lt;img src=&quot;http://blog.ademar.org/wp-content/uploads/2013/01/IMG_9157-199x300.jpg&quot; alt=&quot;Sofia aos 7 meses de idade&quot; width=&quot;199&quot; height=&quot;300&quot; class=&quot;size-medium wp-image-1253&quot; /&gt;&lt;p class=&quot;wp-caption-text&quot;&gt;Sofia em seu sétimo mensário.&lt;/p&gt;&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;Trabalho &amp;#8211; Red Hat&lt;/strong&gt;&lt;br /&gt;
Falando em aprendizado, o ano foi puxado, mas muito produtivo no trabalho. Minha equipe é de um nível altíssimo e liderá-los tem sido um desafio enorme. Em 2012 eu aprendi muito e conheci pessoalmente vários colegas em ótimas viagens pra &lt;a href=&quot;http://www.ademar.org/fotos/israel/&quot; title=&quot;Fotos de Israel: Jerusalém e região do Mar Morto&quot;&gt;Israel&lt;/a&gt;, EUA (Westford, MA), Espanha (Barcelona &amp;#8211; KVM Forum) e São Paulo.&lt;/p&gt;
&lt;div id=&quot;attachment_1254&quot; class=&quot;wp-caption aligncenter&quot;&gt;&lt;a href=&quot;http://www.ademar.org/fotos/israel/&quot;&gt;&lt;img src=&quot;http://blog.ademar.org/wp-content/uploads/2013/01/web-israel-420x280.jpg&quot; alt=&quot;Fotos viagem Israel&quot; width=&quot;420&quot; height=&quot;280&quot; class=&quot;size-medium wp-image-1254&quot; /&gt;&lt;/a&gt;&lt;p class=&quot;wp-caption-text&quot;&gt;Mosaico com algumas fotos da viagem à Israel&lt;/p&gt;&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;Mudança&lt;/strong&gt;&lt;br /&gt;
Quem me conhece há vários anos sabe que eu levo uma vida de nômade: desde o casamento em 2006, já nos mudamos 4 vezes (Curitiba, Manaus, Curitiba de novo e Recife). Depois de 4 anos em Recife, era hora de mudar novamente. Dessa vez a escolha foi criteriosa: trabalhando de casa eu tinha a opção de escolher qualquer região/cidade no Brasil pra morar. A escolha foi pela Serra Gaúcha e a cidade originalmente escolhida era Caxias do Sul. Acontece que após uma visita que era pra ser breve, acabamos optando pela região de Gramado/Canela e resolvemos vir pra esta última (sob forte influência do &lt;a href=&quot;http://pribi.com.br&quot; title=&quot;Site pessoal de Fabiano e Pricila Franz&quot;&gt;Fabiano e da Pricila&lt;/a&gt;, amigos que fizeram essa migração alguns anos antes).&lt;/p&gt;
&lt;p&gt;A escolha da moradia é que não foi trivial: resolvemos tomar coragem e comprar nossa própria casa (chega de apartamento) e após muita procura, encontramos uma do nosso gosto, mas ainda em acabamento. A vantagem foi poder escolher os detalhes, trocar materiais de acabamento, erguer e derrubar paredes (Viviane é Designer de Interiores). A desvantagem: ter que esperar. Após consideráveis atrasos, a entrega está planejada para Fevereiro. No período entre a saída de Recife e a escolha da casa, passamos algumas semanas morando na casa de amigos e parentes (valeu Saulo/Pati, Fabiano/Pricila e Lico/Lisi), até finalmente alugarmos um pequeno apartamento pra receber a mudança e nos estabelecermos temporariamente.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Estudos &amp;#8211; Mestrado&lt;/strong&gt;&lt;br /&gt;
Nessa eu &amp;#8220;arriei&amp;#8221;: FAIL. Não dei conta e tive que trancar o curso. A combinação Sofia + Trabalho e a ideia da mudança me tirou a possibilidade de continuar os estudos na UFPE. A essa altura do campeonato, não sei se vou retomar o mestrado algum dia. Quem sabe um MBA num futuro próximo.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Viagens&lt;/strong&gt;&lt;br /&gt;
Além das viagens à trabalho, não fiz nenhuma viagem de férias significativa, pra algum local desconhecido ou novo. Mas morando aqui no sul foi mais fácil visitar a família: passamos o Natal em Rio Grande &amp;#8211; RS, onde toda a família da parte da Viviane estava reunida e a virada do ano em Umuarama &amp;#8211; PR, com a minha. Na volta desta última, fomos até Foz do Iguaçu pra fazer umas compras no Paraguay. Foi a primeira viagem internacional da Sofia. :-)&lt;/p&gt;
&lt;p&gt;A lista de objetivos de 2012 foi modesta e genérica, se resumindo a &amp;#8220;ser um bom pai e marido&amp;#8221;, &amp;#8220;ser um bom profissional&amp;#8221; e &amp;#8220;ser um bom estudante&amp;#8221;. Como já mencionado, falhei neste último item, mas acho que consegui meu objetivo nos outros dois. Uma coisa que estava na lista de 2011 finalmente saiu: atualizei os álbuns de fotos do site com breves relatos de viagens: &lt;a href=&quot;http://www.ademar.org/fotos/patagonia/&quot; title=&quot;Principais fotos de uma viagem pela Patagônia - Argentina e Chile&quot;&gt;Patagônia: principais fotos&lt;/a&gt;; &lt;a href=&quot;http://www.ademar.org/fotos/patagonia/bariloche/&quot; title=&quot;Fotos da região dos 7 Lagos (Bariloche) - Argentina&quot;&gt;Fotos da Patagônia: Região dos 7 Lagos (Bariloche)&lt;/a&gt;; &lt;a href=&quot;http://www.ademar.org/fotos/patagonia/el-calafate/&quot; title=&quot;Fotos da região do Parque los Glaciares - Geleira Perito Moreno - El Calafate - Argentina&quot;&gt;Fotos da Patagônia: Parque Nacional los Glaciares (Geleira Perito Moreno)&lt;/a&gt;; &lt;a href=&quot;http://www.ademar.org/fotos/europa/&quot; title=&quot;Fotos de uma viagem de 35 dias por vários países da Europa&quot;&gt;Fotos da Viagem pela Europa;&lt;/a&gt; &lt;a href=&quot;http://www.ademar.org/fotos/oslo/&quot; title=&quot;Fotos de Oslo - Noruega&quot;&gt;Fotos de Oslo &amp;#8211; Noruega&lt;/a&gt; e &lt;a href=&quot;http://www.ademar.org/fotos/nova-york/&quot; title=&quot;Fotos da Cidade de Nova Iorque (New York City)&quot;&gt;Fotos de Nova York&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Ah, e antes de sairmos de Recife, fechamos algumas outras pendências: fomos até o &lt;a href=&quot;http://www.institutoricardobrennand.org.br&quot; title=&quot;Instituto Ricardo Brennand - Recife&quot;&gt;Instituto Ricardo Brennand&lt;/a&gt; e ainda levamos a Sofia (com 4 meses) pra um primeiro mergulho na praia de &lt;a href=&quot;http://www.ademar.org/fotos/porto-galinhas/&quot;&gt;Porto de Galinhas&lt;/a&gt;, referência do estado onde ela nasceu. :-)&lt;/p&gt;
&lt;p&gt;Pra 2013 a lista é mais detalhada:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Explorar a região de Canela e Gramado: ainda não visitamos nem os principais pontos turísticos&lt;/li&gt;
&lt;li&gt;Entrar em forma &amp;#8212; bike, caminhada, academia&amp;#8230; qualquer coisa&lt;/li&gt;
&lt;li&gt;Agora que moro na serra, quero voltar a acampar, subir montanhas e etc:&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;Acampar no mínimo 3 noites, sendo uma delas com a Sofia&lt;/li&gt;
&lt;li&gt;Descer o Rio Paranhana de Rafting&lt;/li&gt;
&lt;li&gt;Fazer pelo menos 2 trilhas de Mountain Bike&lt;/li&gt;
&lt;/ul&gt;
&lt;li&gt;Estar com a casa &amp;#8220;pronta&amp;#8221; (incluindo obras ainda em planejamento: área de serviço, ante-sala e garagem)&lt;/li&gt;
&lt;li&gt;Visitar um país que eu ainda não conheça&lt;/li&gt;
&lt;li&gt;Montar um álbum com fotos da região&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Então é isso, missão cumprida: o blog não está morto. :-) Feliz 2013 a todos!&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;&lt;small&gt;&lt;a href=&quot;https://blog.ademar.org/2013/retrospectiva-2012/&quot;&gt;Link Permanente&lt;/a&gt; |
&lt;a href=&quot;https://blog.ademar.org/2013/retrospectiva-2012/#comments&quot;&gt;4 commentários&lt;/a&gt;&lt;br /&gt;
Post tags: &lt;a href=&quot;https://blog.ademar.org/tag/retrospectiva/&quot; rel=&quot;tag&quot;&gt;retrospectiva&lt;/a&gt;&lt;br /&gt;
&lt;/small&gt;&lt;/p&gt;&lt;div class=&quot;yarpp-related-rss&quot;&gt;
&lt;p&gt;Posts possivelmente relacionados:&lt;ol&gt;
&lt;li&gt;&lt;a href=&quot;https://blog.ademar.org/2008/retrospectiva-2007-planos-2008/&quot; rel=&quot;bookmark&quot; title=&quot;Retrospectiva 2007, planos pra 2008&quot;&gt;Retrospectiva 2007, planos pra 2008 &lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://blog.ademar.org/2010/retrospectiva-2010-planos-pra-2011/&quot; rel=&quot;bookmark&quot; title=&quot;Retrospectiva 2010, planos pra 2011&quot;&gt;Retrospectiva 2010, planos pra 2011 &lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://blog.ademar.org/2011/retrospectiva-2011/&quot; rel=&quot;bookmark&quot; title=&quot;Retrospectiva 2011, planos pra 2012&quot;&gt;Retrospectiva 2011, planos pra 2012 &lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;img src=&quot;http://feeds.feedburner.com/~r/blogademar/~4/vO5TRN4AESE&quot; height=&quot;1&quot; width=&quot;1&quot; alt=&quot;&quot; /&gt;</content:encoded>
	<dc:date>2013-01-19T04:14:28+00:00</dc:date>
</item>
<item rdf:about="http://66.228.57.220/blog/?p=1">
	<title>Bruno Araujo: Welcome! Welcome to City 17…</title>
	<link>http://baraujo.net/blog/?p=1</link>
	<content:encoded>&lt;p&gt;Yeah, I know I&amp;#8217;ve used this little Half-Life joke before, but it never gets old. Anyway, this will be here for some time, while everything is being calibrated. Ciao!&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://baraujo.net/blog/wp-content/uploads/2013/01/Image159-001.jpg&quot;&gt;&lt;img class=&quot;alignnone size-medium wp-image-8&quot; alt=&quot;Image159-001&quot; src=&quot;http://baraujo.net/blog/wp-content/uploads/2013/01/Image159-001-225x300.jpg&quot; width=&quot;225&quot; height=&quot;300&quot; /&gt;&lt;/a&gt;&lt;/p&gt;</content:encoded>
	<dc:date>2013-01-05T06:20:37+00:00</dc:date>
</item>
<item rdf:about="http://savago.wordpress.com/?p=458">
	<title>Adenilson Cavalcanti: icecc setup how to</title>
	<link>http://savago.wordpress.com/2012/11/23/icecc-setup-how-to/</link>
	<content:encoded>&lt;p&gt;I wrote this article back last February just to document the way I did setup icecc in my home and decided to put it here for easy access. Just ignore the time of compilation for both Qt and webkit (since then, both have changed considerably and I also added another node into the cluster, an Intel i7). For reference, the trick of  combining ccache and icecc is not very well know and this is why I think it is still worthwhile to document it here.&lt;/p&gt;
&lt;p&gt;Maybe those are techniques that you are already familiar with, so my advanced apologies. If you don&amp;#8217;t have used icecc/ccache before or just want to known a little more about it, let&amp;#8217;s proceed.&lt;/p&gt;
&lt;p&gt;Ok, so this is the scenario: you are working with a big code base or maybe you need to recompile a specific version of Qt/WebKit. Or it can be another reason, maybe you just want to self compile your own kernel/desktop like real programmers do, right?&lt;/p&gt;
&lt;p&gt;Even with today&amp;#8217;s multicore/gigabyte based systems, it may take a little longer than you wish to compile it all: &lt;a href=&quot;http://xkcd.com/303/&quot; target=&quot;_blank&quot;&gt;http://xkcd.com/303/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;So, what to do in this cases? There are some projects that can help you out, let&amp;#8217;s examine the case of ccache first.&lt;/p&gt;
&lt;p&gt;Ccache (&lt;a href=&quot;http://ccache.samba.org/&quot; target=&quot;_blank&quot;&gt;http://ccache.samba.org/&lt;/a&gt;) is a tool created by samba team, that project that offers CIFS/SMB protocol implementation over *nix kernels. It works with a simple principle of generating a cache of compiled files and reusing those object files if no changes in the source code were detected. Instalation is quite easy in Linux (sudo apt-get install ccache), and you only need to point your PATH environment variable to ccache.&lt;/p&gt;
&lt;p&gt;An alternative is to have a file in your home (e.g. ~/.samba.bashrc) with the following function (and source it in .bashrc):&lt;br /&gt;
function sambacache {&lt;br /&gt;
export PATH=/usr/lib/ccache:$PATH&lt;br /&gt;
}&lt;/p&gt;
&lt;p&gt;So that you can enable samba by doing:&lt;br /&gt;
adenilson@macmini:~$ which gcc&lt;br /&gt;
/usr/bin/gcc&lt;br /&gt;
adenilson@macmini:~$ sambacache&lt;br /&gt;
adenilson@macmini:~$ which gcc&lt;br /&gt;
/usr/lib/ccache/gcc&lt;/p&gt;
&lt;p&gt;The first compilation will take the same time as you are used to, but the following ones (after the cache is populated i.e. check ~/.ccache directory) will give huge speed ups. So, as an example, a favorite of mine (&lt;a href=&quot;http://cellardoor.googlecode.com/&quot; target=&quot;_blank&quot;&gt;http://cellardoor.googlecode.com&lt;/a&gt;) takes 4s to compile in a Intel i5@2.3Ghz the fist time but next it will take only 0.48s to recompile after a make clean. Pretty neat, hum?&lt;/p&gt;
&lt;p&gt;Ccache adds almost no overhead in the compilation and is a perfect helper if you have just 1 computer to do your compilation jobs.&lt;/p&gt;
&lt;p&gt;There is an issue with the way that ccache works. It is easy to see that if your project has many self-generated files by each new compilation, the cache will not be reused. So, if for recompiling just Qt there are not big benefits (it self generates lots of header files at beginning of compilation), for WebKit it brings the time compilation down to just 2 minutes.&lt;/p&gt;
&lt;p&gt;The next project is icecc (&lt;a href=&quot;http://en.opensuse.org/Icecream&quot; target=&quot;_blank&quot;&gt;http://en.opensuse.org/Icecream&lt;/a&gt;) and it allows to use several computers in the same network to distribute the compilation jobs. It is the &amp;#8216;evolution&amp;#8217; of distcc, offers some extra features and has a great monitoring tool called &amp;#8216;icemon&amp;#8217;. Instalation is easy in Linux (sudo apt-get install icecc icecc-monitor), configuration not that easy and the documentation could be better.&lt;/p&gt;
&lt;p&gt;The speed ups are almost linear, being the network speed the most probable bottleneck. I&amp;#8217;ve used it in my previous job with up to 15 computers connected and it allowed me to do a cold recompile of Qt in less than 8 minutes (bear in mind that those 15 computers were also compiling other projects at same time&amp;#8230;).&lt;/p&gt;
&lt;p&gt;To make it easier to follow, I will explain my home setup. I have 2 machines:&lt;br /&gt;
a) macmini: Intel i5@2.3Ghz running Linux 32 bits (dual boot with OSX Lion).&lt;/p&gt;
&lt;p&gt;b) blackbloat: Acer notebook (cheapest one I could find, so portability is not its strongest feature&amp;#8230;) Intel i5@2.67Ghz running linux 64 bits (dual boot with Windows 7). IP is 192.168.1.135&lt;/p&gt;
&lt;p&gt;What is neat about icecc is the fact that you can have varied nodes in your cluster and still perform compilation jobs distribution. It does that by allowing you to create a &amp;#8216;rootstrap&amp;#8217; of libraries and compilers to be used, being those sent to the other nodes in your first compilation. To do it, you should run:&lt;/p&gt;
&lt;p&gt;adenilson@blackbloat:~$ icecc &amp;#8211;build-native&lt;br /&gt;
adding file /usr/bin/gcc&lt;br /&gt;
adding file /lib/x86_64-linux-gnu/libc.so.6&lt;br /&gt;
adding file /lib64/ld-linux-x86-64.so.2&lt;br /&gt;
adding file /usr/bin/g++&lt;br /&gt;
adding file /usr/bin/as&lt;br /&gt;
adding file /usr/lib/&lt;a href=&quot;http://libopcodes-2.21.53-system.20110810.so/&quot; target=&quot;_blank&quot;&gt;libopcodes-2.21.53-system.20110810.so&lt;/a&gt;&lt;br /&gt;
adding file /usr/lib/&lt;a href=&quot;http://libbfd-2.21.53-system.20110810.so/&quot; target=&quot;_blank&quot;&gt;libbfd-2.21.53-system.20110810.so&lt;/a&gt;&lt;br /&gt;
adding file /lib/x86_64-linux-gnu/libz.so.1&lt;br /&gt;
adding file /lib/x86_64-linux-gnu/libdl.so.2&lt;br /&gt;
adding file /usr/bin/cc1=/usr/lib/gcc/x86_64-linux-gnu/4.6.1/cc1&lt;br /&gt;
adding file /usr/lib/libmpc.so.2&lt;br /&gt;
adding file /usr/lib/libmpfr.so.4&lt;br /&gt;
adding file /usr/lib/libgmp.so.10&lt;br /&gt;
adding file /usr/bin/cc1plus=/usr/lib/gcc/x86_64-linux-gnu/4.6.1/cc1plus&lt;br /&gt;
adding file /usr/lib/gcc/x86_64-linux-gnu/4.6.1/liblto_plugin.so&lt;br /&gt;
adding file /etc/ld.so.conf=/tmp/icecc_ld_so_confpM2h21&lt;br /&gt;
creating de07a31507267d47693646853b78125e.tar.gz&lt;/p&gt;
&lt;p&gt;adenilson@macmini:~$ icecc &amp;#8211;build-native&lt;br /&gt;
adding file /usr/bin/gcc&lt;br /&gt;
adding file /lib/i386-linux-gnu/libc.so.6&lt;br /&gt;
adding file /lib/ld-linux.so.2&lt;br /&gt;
adding file /usr/bin/g++&lt;br /&gt;
adding file /usr/bin/as&lt;br /&gt;
adding file /usr/lib/&lt;a href=&quot;http://libopcodes-2.21.53-system.20110810.so/&quot; target=&quot;_blank&quot;&gt;libopcodes-2.21.53-system.20110810.so&lt;/a&gt;&lt;br /&gt;
adding file /usr/lib/&lt;a href=&quot;http://libbfd-2.21.53-system.20110810.so/&quot; target=&quot;_blank&quot;&gt;libbfd-2.21.53-system.20110810.so&lt;/a&gt;&lt;br /&gt;
adding file /lib/i386-linux-gnu/libz.so.1&lt;br /&gt;
adding file /lib/i386-linux-gnu/libdl.so.2&lt;br /&gt;
adding file /usr/bin/cc1=/usr/lib/gcc/i686-linux-gnu/4.6.1/cc1&lt;br /&gt;
adding file /usr/lib/libmpc.so.2&lt;br /&gt;
adding file /usr/lib/libmpfr.so.4&lt;br /&gt;
adding file /usr/lib/libgmp.so.10&lt;br /&gt;
adding file /usr/bin/cc1plus=/usr/lib/gcc/i686-linux-gnu/4.6.1/cc1plus&lt;br /&gt;
adding file /usr/lib/gcc/i686-linux-gnu/4.6.1/liblto_plugin.so&lt;br /&gt;
adding file /etc/ld.so.conf=/tmp/icecc_ld_so_confWHgW78&lt;br /&gt;
creating 73c127da41faa91bfdbae1faedbb2113.tar.gz&lt;/p&gt;
&lt;p&gt;And later point the environment variable ICECC_VERSION to where is the rootstrap tarball. In my case, I added a file in my home (i.e. .icecc.bashrc) and renamed the tarball with the following:&lt;/p&gt;
&lt;p&gt;function coolice {&lt;br /&gt;
export ICECC_VERSION=/home/adenilson/Desktop/ice_rootstrap.tar.gz&lt;br /&gt;
export PATH=/usr/lib/icecc/bin/:$PATH&lt;br /&gt;
}&lt;/p&gt;
&lt;p&gt;Similar to ccache, icecc requires to add it in the PATH before the standard compiler.&lt;br /&gt;
adenilson@macmini:~$ which gcc&lt;br /&gt;
/usr/bin/gcc&lt;br /&gt;
adenilson@macmini:~$ coolice&lt;br /&gt;
adenilson@macmini:~$ which gcc&lt;br /&gt;
/usr/lib/icecc/bin//gcc&lt;/p&gt;
&lt;p&gt;The final step is to choose which machine will run the scheduler, responsible for distributing the compiler jobs between the nodes. In my case, I picked blackbloat, for making the changes permanent, added in /etc/default/icecc&lt;br /&gt;
START_ICECC=&amp;#8221;true&amp;#8221;&lt;br /&gt;
START_ICECC_SCHEDULER=&amp;#8221;true&amp;#8221;&lt;/p&gt;
&lt;p&gt;And all the nodes (including blackbloat, since I doubled it as both a scheduler and a compiler node) should know which network to connect to (I decided to call my network &amp;#8216;tucks&amp;#8217;) thus editing the file /etc/icecc/icecc.conf:&lt;/p&gt;
&lt;p&gt;ICECC_NETNAME=&amp;#8221;tucks&amp;#8221;&lt;br /&gt;
ICECC_ALLOW_REMOTE=&amp;#8221;yes&amp;#8221;&lt;br /&gt;
ICECC_SCHEDULER_HOST=&amp;#8221;192.168.1.135&amp;#8243;&lt;/p&gt;
&lt;p&gt;There are other parameters you can tweak. For example, by default icecc will assign a compiler job for each CPU/Core/virtual cpu in your system, so it would run at maximum 4 jobs in each node in the case of an intel i5 (2 cores + hyper thread). You can change that by assigning a value in ICECC_MAX_JOBS filed in icecc.conf. Another tweak is the nice level of each running job process, default is 5 (which is good for not disturbing the normal workflow in a computer, but you can get a slightly better performance by changing it to a lesser value).&lt;/p&gt;
&lt;p&gt;To monitor the machines in the cluster, just use: icemon -n tucks (see attached image).&lt;br /&gt;
&lt;a href=&quot;http://savago.files.wordpress.com/2012/11/icemon_starview.png&quot;&gt;&lt;br /&gt;
&lt;img title=&quot;icemon_starview&quot; alt=&quot;&quot; src=&quot;http://savago.files.wordpress.com/2012/11/icemon_starview.png?w=300&amp;h=163&quot; height=&quot;163&quot; width=&quot;300&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;It is important to known if *really* the jobs are being distributed. You can check:&lt;br /&gt;
a) If in your machine there are several &amp;#8216;g++&amp;#8217; named processes (using basically no CPU) and a few &amp;#8216;cc1plus&amp;#8217; named processes using all the available cpu;&lt;br /&gt;
b) If the other node(s) has several &amp;#8216;cc1plus&amp;#8217; processes;&lt;br /&gt;
c) If there is considerable I/O going through the network interface (in my case spikes of up to 2.8MB/s)&lt;br /&gt;
d) If icemon shows the jobs moving through the nodes.&lt;/p&gt;
&lt;p&gt;I once thought that I&amp;#8217;ve configured it all fine and then started &amp;#8216;make -j30&amp;#8242; with all the jobs running in my machine&amp;#8230; needless to say, the machine locked.&lt;br /&gt; &lt;span class=&quot;wp-smiley wp-emoji wp-emoji-smile&quot; title=&quot;:-)&quot;&gt;:-)&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Alright, enough talk, let&amp;#8217;s see some numbers&amp;#8230; To compile Qt 4.8 from the git repository it takes 34 minutes in macmini, running with &amp;#8216;make -j6&amp;#8242;. By using icecc, and running &amp;#8216;make -j12&amp;#8242; it compiles in 21 minutes (almost half the time). It is important to remember that there are steps that can not be made parallel (e.g. qmake creating the .pro files, moc running, linking and so on).&lt;/p&gt;
&lt;p&gt;For webkit plus Qt5, the numbers are even better: 1h 10m X 19minutes (it is almost 400% faster!). Those 50 minutes *by compilation* can add a lot at end of day.&lt;/p&gt;
&lt;p&gt;Finally, it is also possible to combine ccache *with* icecc. To do it, just define your path as: export PATH=/usr/lib/ccache:/usr/lib/icecc/bin/:$PATH. In my desktop, I added the following file in my home:&lt;/p&gt;
&lt;p&gt;adenilson@macmini:~/apps/webkit/Webkit$ more ~/.bamf.bashrc&lt;br /&gt;
function bamf {&lt;br /&gt;
export ICECC_VERSION=/home/adenilson/Desktop/ice_rootstrap.tar.gz&lt;br /&gt;
export PATH=/usr/lib/ccache:/usr/lib/icecc/bin/:$PATH&lt;br /&gt;
}&lt;/p&gt;
&lt;p&gt;Attached you can check how icemon looks like while recompiling Qt 4.8 with 2 different views (starview and gantt view).&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://savago.files.wordpress.com/2012/11/icemon_ganttview.png&quot;&gt;&lt;img class=&quot;aligncenter size-medium wp-image-461&quot; title=&quot;icemon_ganttview&quot; alt=&quot;&quot; src=&quot;http://savago.files.wordpress.com/2012/11/icemon_ganttview.png?w=300&amp;h=120&quot; height=&quot;120&quot; width=&quot;300&quot; /&gt;&lt;/a&gt;&lt;/p&gt;&lt;br /&gt;  &lt;a rel=&quot;nofollow&quot; href=&quot;http://feeds.wordpress.com/1.0/gocomments/savago.wordpress.com/458/&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://feeds.wordpress.com/1.0/comments/savago.wordpress.com/458/&quot; /&gt;&lt;/a&gt; &lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://pixel.wp.com/b.gif?host=savago.wordpress.com&amp;blog=8919535&amp;post=458&amp;subd=savago&amp;ref=&amp;feed=1&quot; width=&quot;1&quot; height=&quot;1&quot; /&gt;</content:encoded>
	<dc:date>2012-11-23T14:58:32+00:00</dc:date>
	<dc:creator>savago</dc:creator>
</item>
<item rdf:about="http://rsalveti.wordpress.com/?p=521">
	<title>Ricardo Salveti: Pre-built images for XBMC (Ubuntu 12.04 based) with hw acceleration finally available at Linaro</title>
	<link>http://rsalveti.wordpress.com/2012/07/29/pre-built-images-for-xbmc-ubuntu-12-04-based-with-hw-acceleration-finally-available-at-linaro/</link>
	<content:encoded>&lt;p&gt;Back to the &lt;a href=&quot;https://wiki.linaro.org/Cycles/1201/Release&quot; title=&quot;Linaro 12.01 release&quot;&gt;Linaro 12.01 release&lt;/a&gt;, we were able to publish a XBMC based image with proper hardware acceleration support for Pandaboard. That release was based on the Ubuntu Oneiric (11.10) release, with a 3.1 based kernel, still using the old multimedia architecture provided by TI (e.g old SGX DDK, Syslink, etc).&lt;/p&gt;
&lt;p&gt;Took a while (6 months) for TI to be finally able to rebase the hardware decode/rendering solution to the new architecture, providing quite a few improvements and making the architecture a lot simpler as well. A new SGX DDK was deployed with the functional xf86-video-omap open source X11 driver, kernel and userspace with support for RPMsg, dri2video and a few other fancy technologies that now makes the life of developers a lot easier. We&amp;#8217;re still stuck with a few proprietary parts, like the SGX driver itself, but luckly that will also improve over the time, as we&amp;#8217;re starting to see more and more reverse-engineer based solutions around (even &lt;a href=&quot;http://rsalveti.wordpress.com/2012/07/29/pre-built-images-for-xbmc-ubuntu-12-04-based-with-hw-acceleration-finally-available-at-linaro/bloggingthemonkey.blogspot.com&quot; title=&quot;Rob Clark - Blogging The Monkey&quot;&gt;Rob Clark&lt;/a&gt; started one called &lt;a href=&quot;https://gitorious.org/freedreno/&quot;&gt;freedreno&lt;/a&gt;).&lt;/p&gt;
&lt;p&gt;After TI making all the needed components available for Ubuntu Precise (12.04) during the beginning of this month, I was finally able to get them all integrated and working with the Linaro components and LEB. If you grab the latest LEB provided for Pandaboard, you&amp;#8217;ll already be able to enjoy most of the updates available, with a better SGX driver, and a working hardware decode with gstreamer without much effort.&lt;/p&gt;
&lt;p&gt;Unfortunatelly our &lt;a href=&quot;http://git.linaro.org/gitweb?p=landing-teams/working/ti/kernel.git;a=shortlog;h=refs/heads/tilt-3.4&quot;&gt;TI Landing Team kernel&lt;/a&gt; is still missing a few important multimedia-related bits, so until they are properly integrated from TI&amp;#8217;s own kernel tree, you&amp;#8217;d need to make sure you&amp;#8217;re using the kernel available directly from TI (called linux-image-ti-omap4, also available at our &lt;a href=&quot;https://launchpad.net/~linaro-maintainers/+archive/overlay/&quot;&gt;Overlay PPA&lt;/a&gt;).&lt;/p&gt;
&lt;p&gt;To be able to have a fully functional XBMC as well, we also integrated all the new changes to support a native Gstreamer player (improved a lot by Rob Clark as well, adding &lt;a href=&quot;https://github.com/rsalveti/xbmc-eden/commits/master&quot;&gt;EGLImage support&lt;/a&gt;), which solves most of the a/v sync issues we had with the Oneiric based release. There are probably a few things missing as well, but at least the patch is not that intrusive anymore, and could probably be accepted by upstream later on.&lt;/p&gt;
&lt;p&gt;Want to see how things are looking by yourself? Please check at &lt;a href=&quot;http://snapshots.linaro.org/precise/pre-built/ti-panda-x11-base/&quot;&gt;http://snapshots.linaro.org/precise/pre-built/ti-panda-x11-base/&lt;/a&gt; and download the latest pre-built image available. At the time I&amp;#8217;m writing this post I used the one available at &lt;a href=&quot;http://snapshots.linaro.org/precise/pre-built/ti-panda-x11-base/5/ti-panda-x11-base-precise_linarotv-xbmc_20120729-5.html&quot;&gt;http://snapshots.linaro.org/precise/pre-built/ti-panda-x11-base/5/ti-panda-x11-base-precise_linarotv-xbmc_20120729-5.html&lt;/a&gt;, and all I needed to do was to extract the img.gz file, and copy it with &lt;strong&gt;dd&lt;/strong&gt; (&lt;em&gt;sudo dd bs=4M if=ti-panda-x11-base-precise_linarotv-xbmc_20120729-5.img of=/dev/sdX&lt;/em&gt;).&lt;/p&gt;
&lt;p&gt;Boot it up, and you should go directly to XBMC. Give it a try, check how well it&amp;#8217;s playing the wide range of different video formats. Bugs are also expected and welcome, so please also make sure to open any bug you might find at &lt;a href=&quot;https://bugs.launchpad.net/linaro-ubuntu&quot;&gt;https://bugs.launchpad.net/linaro-ubuntu&lt;/a&gt; and &lt;a href=&quot;https://bugs.launchpad.net/ubuntu-omap4-extras-multimedia&quot;&gt;https://bugs.launchpad.net/ubuntu-omap4-extras-multimedia&lt;/a&gt;. We&amp;#8217;ll keep improving the support over the next cycles, so also make sure to post which image you&amp;#8217;re using when doing your tests.&lt;/p&gt;
&lt;p&gt;Enjoy!&lt;/p&gt;&lt;br /&gt;  &lt;a rel=&quot;nofollow&quot; href=&quot;http://feeds.wordpress.com/1.0/gocomments/rsalveti.wordpress.com/521/&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://feeds.wordpress.com/1.0/comments/rsalveti.wordpress.com/521/&quot; /&gt;&lt;/a&gt; &lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://pixel.wp.com/b.gif?host=rsalveti.wordpress.com&amp;blog=905525&amp;post=521&amp;subd=rsalveti&amp;ref=&amp;feed=1&quot; width=&quot;1&quot; height=&quot;1&quot; /&gt;</content:encoded>
	<dc:date>2012-07-30T00:07:48+00:00</dc:date>
	<dc:creator>rsalveti</dc:creator>
</item>
<item rdf:about="http://atdrez.wordpress.com/?p=3">
	<title>Adriano Tinoco: QEdje</title>
	<link>http://atdrez.wordpress.com/2008/07/19/qedje/</link>
	<content:encoded>&lt;p&gt;This is my first post, and I will talk about the QEdje project that will be presented next month in Akademy 2008 at Belgium.&lt;br /&gt;
The QEdje is a scripting language used to separate code from interface and to speed up the development of applications with beautiful interfaces.&lt;br /&gt;
The basic idea of the project is to port the original Edje (used by EFL &amp;#8211; Enlightenment Foundation Libraries) to Qt. We, at INdT (Nokia Technology Institute), are planning to release a QEdje version with basic supports probably on the beginning of the next month.&lt;br /&gt;
Our plan is to give full Edje support until the end of the year for Qt. To have the same facilities that we had using Evas/Edje in our last projects, like Canola for example (&lt;a href=&quot;http://openbossa.indt.org.br/canola/&quot; rel=&quot;nofollow&quot;&gt;http://openbossa.indt.org.br/canola/&lt;/a&gt;).&lt;/p&gt;
&lt;p&gt;The great thing about QEdje is that we can combine the best of both worlds. Using Edje to create beautiful interfaces and still using Qt widgets embedded whenever necessary (for example: inputs, webkit browser, &amp;#8230;).&lt;/p&gt;
&lt;p&gt;Some of the bottlenecks that we are still facing resides on Qt Canvas. Most of the code generates a great overhead on small devices like n800, and to reach a performance near to the Evas performance, some optimizations must be done inside Qt code. But the great news is that INdT and Trolltech are planning to create a code camp for us, probably in September at Norway.&lt;/p&gt;
&lt;p&gt;A small show case developed using QEdje:&lt;/p&gt;
&lt;span class=&quot;embed-youtube&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://feeds.wordpress.com/1.0/categories/atdrez.wordpress.com/3/&quot; /&gt; &lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://feeds.wordpress.com/1.0/tags/atdrez.wordpress.com/3/&quot; /&gt; &lt;a rel=&quot;nofollow&quot; href=&quot;http://feeds.wordpress.com/1.0/gocomments/atdrez.wordpress.com/3/&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://feeds.wordpress.com/1.0/comments/atdrez.wordpress.com/3/&quot; /&gt;&lt;/a&gt; &lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://pixel.wp.com/b.gif?host=atdrez.wordpress.com&amp;blog=3641778&amp;post=3&amp;subd=atdrez&amp;ref=&amp;feed=1&quot; width=&quot;1&quot; height=&quot;1&quot; /&gt;</content:encoded>
	<dc:date>2012-06-20T12:14:07+00:00</dc:date>
	<dc:creator>atdrez</dc:creator>
</item>
<item rdf:about="http://atdrez.wordpress.com/?p=86">
	<title>Adriano Tinoco: Hidra</title>
	<link>http://atdrez.wordpress.com/2009/05/10/86/</link>
	<content:encoded>&lt;p&gt;Yesterday I decided to restart an old project called Hidra. Hidra is a very high-level programming language like Python and Ruby that I created some years ago. The project had only personal fun purpose and the code was never released. Hidra is a full object oriented language like Java but with the advantage of being dynamically typed and to have a more compact virtual machine due that fact. The virtual machine is very similar to JVM but with 5x less opcodes. The original compiler and virtual machine code was written using Java, wich reduces the performance a lot. So the idea is to recreate the virtual machine using C++ and for now I&amp;#8217;m planning to recreate the compiler as a prototype using Python to have less code and more flexibility to change the grammar.&lt;br /&gt;
I spent the last 2 days recreating the virtual machine in C++ and it&amp;#8217;s now almost fully functional, but there are a lot to be done in order to be stable. It needs also a garbage collector and debugging support. I will reserve some hours during weekends to work in the project.&lt;/p&gt;
&lt;p&gt;The main purpose of the project now is to have a lightweight interpreter that could be used for C++ applications to embed scripts. This could be useful for description languages like Qt Declarative UI and also to create AI scripts for games. Regarding the lightweight/optimized feature, there is a devil in my shoulder telling me to replace the virtual machine to an AST interpreter, in other words start the project from scratch. Maybe I&amp;#8217;ll do this, because it&amp;#8217;s the simpler way and it would allow more optimizations to be done. But for now I&amp;#8217;ll focus on features and syntax changes to consolidate the language.&lt;/p&gt;
&lt;p&gt;Below is a Hello World example using the current Hidra syntax (unnecessarily big just to show a little more).&lt;/p&gt;
&lt;pre class=&quot;brush: jscript; title: ; notranslate&quot;&gt;
class HelloWorld
{
    var helloText;

    public static function main(args)
    {
        new HelloWorld(&amp;quot;Hello World!&amp;quot;).say();
    }

    public HelloWorld(text)
    {
        helloText = text;
    }

    public function say()
    {
        System.println(helloText);
    }
}
&lt;/pre&gt;
&lt;p&gt;As you can see the current syntax is similar to JavaScript, but with a more solid object orientation. I intend to maintain the grammar as simple as possible with some small changes to get a cleaner look (maybe more python like).&lt;/p&gt;
&lt;p&gt;I&amp;#8217;ll send some posts to give feedback of the progress. Stay tuned!&lt;/p&gt;&lt;br /&gt;  &lt;a rel=&quot;nofollow&quot; href=&quot;http://feeds.wordpress.com/1.0/gocomments/atdrez.wordpress.com/86/&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://feeds.wordpress.com/1.0/comments/atdrez.wordpress.com/86/&quot; /&gt;&lt;/a&gt; &lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://pixel.wp.com/b.gif?host=atdrez.wordpress.com&amp;blog=3641778&amp;post=86&amp;subd=atdrez&amp;ref=&amp;feed=1&quot; width=&quot;1&quot; height=&quot;1&quot; /&gt;</content:encoded>
	<dc:date>2012-06-16T07:58:41+00:00</dc:date>
	<dc:creator>atdrez</dc:creator>
</item>
<item rdf:about="http://rsalveti.wordpress.com/?p=475">
	<title>Ricardo Salveti: Great start at Ubuntu Developer Summit (Q or 12.10) for ARM</title>
	<link>http://rsalveti.wordpress.com/2012/05/10/great-start-at-ubuntu-developer-summit-q-or-12-10-for-arm/</link>
	<content:encoded>&lt;p&gt;This week I&amp;#8217;m proudly participating at the &lt;a href=&quot;http://uds.ubuntu.com/event/&quot;&gt;Ubuntu Developer Summit&lt;/a&gt; to help planning and defining what will the Quantal Quetzal (12.10) release be in the next following months.&lt;/p&gt;
&lt;p&gt;As usual I&amp;#8217;m wearing not only the Linaro hat, but also my Ubuntu and Canonical ones, interested and participating actively at most topics that are related with ARM in general.&lt;/p&gt;
&lt;p&gt;And what can I say after the first 3 days at UDS-Q? Well, busy as never before and with great opportunities to help getting Ubuntu to rock even more at ARM, with current devices/platforms and with the exciting new ones that will be coming in the next few months.&lt;/p&gt;
&lt;p&gt;Here are a few highlights from the first days:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Monday &amp;#8211; May 7th&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://summit.ubuntu.com/uds-q/meeting/20633/introduction-and-keynote/&quot;&gt;Introduction and Keynote&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;Great start as usual by Mark, showing the great opportunities for both Canonical and Ubuntu, describing the new target and use cases, and also showing how important Cloud is now for Ubuntu. After that we had, finally, the announcement of a real hardware availability from &lt;a href=&quot;http://www.eweek.com/c/a/IT-Infrastructure/Calxeda-Demo-of-ARMBased-Server-Ups-Ante-in-Intel-Competition-581529/&quot;&gt;Calxeda&lt;/a&gt;, proving that ARM server are indeed real! (which is a quite important accomplishment)&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://twitter.com/#!/rsalveti/status/200493680073785344/photo/1&quot;&gt;Schedule displays all working with our member&amp;#8217;s boards&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;This was the first time that all the schedule displays available at UDS were all covered by the ARM boards provided by Linaro. This time we got Pandaboard, Origen and also Snowball constantly showing the schedule through all the day. Low power and powerful devices all around &lt;span class=&quot;wp-smiley wp-emoji wp-emoji-smile&quot; title=&quot;:-)&quot;&gt;:-)&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://summit.ubuntu.com/uds-q/meeting/20498/foundations-q-embedded-rootfs/&quot;&gt;Plans for a minimum filesystem for embedded devices&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;Discussion to cover all the possible embedded related use cases for Ubuntu, and trying to understand the real requirements for a minimum filesystem (rootfs) for those devices. While we didn&amp;#8217;t decide to generate the smallest-still-apt/dpkg-compatible rootfs for our users (as ubuntu-core is already covering most of the cases), we&amp;#8217;ll provide enough tools and documentation on how to easily generate them. At Linaro side the Ubuntu Nano image should probably reflect such suggestions.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://summit.ubuntu.com/uds-q/meeting/20741/foundations-q-drop-preinst-images/&quot;&gt;Identify impact of the switch to pure live images for ARM platforms&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;Here the focus was basically to review and understand if we would really continue providing pre-installed based images instead of just supporting live based ones. Having the images provided only at the SD cards are very useful to make the bootstrap and install quite easy, but it hurts badly the performance. As we&amp;#8217;re now getting ARM boards that are very powerful in many ways, the I/O bound shouldn&amp;#8217;t limit what the users would be able to get from them. The decision for Quantal is to drop support for the pre-installed images, and provide live based ones at the SD cards (think like the live-sd image as we have with CD on other archs), where the user would install Ubuntu the same way as done with x86, and using USB/Sata based devices as rootfs by default.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://summit.ubuntu.com/uds-q/meeting/20474/servercloud-q-openstack-deployment-on-arm/&quot;&gt;OpenStack Deployment on ARM Server&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;The focus of this session was basically to better understand what might be the missing pieces for a proper OpenStack support at ARM. Quite a few open questions still, but the missing pkgs enablement, LXC testing and support and KVM for a few platforms will help making sure the support is at least correctly in place. After initial support, continuous test and validation should happen to make sure the ARM platforms keeps well supported over the time (which will be better stressed and tested once MAAS/Juju is also supported properly at ARM).&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Tuesday &amp;#8211; May 8th&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://summit.ubuntu.com/uds-q/meeting/20330/foundations-q-aarch64-porting/&quot;&gt;Detail and begin the arm64/aarch64 port in Ubuntu&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;Clearly the most important session of the day for ARM. Great discussion on how to prepare and start the ARMv8 port at Ubuntu and Debian, by starting with cross-build support with multiarch and later support with Fast Models and Qemu. A lot is still to be covered once ARM is able to publish the ARMv8 support for Toolchain and Kernel, and session will be reviewed again at &lt;a href=&quot;http://connect.linaro.org/events/event/linaro-connect-q2-12/&quot;&gt;Linaro Connect&lt;/a&gt; at the end of this month.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://summit.ubuntu.com/uds-q/meeting/20341/hardware-q-kernel-delta-review/&quot;&gt;Ubuntu Kernel Delta Review&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;Usual review of the patches the Ubuntu Kernel team is maintaining at the Ubuntu Kernel tree. At Linaro this is important as we also enable the Ubuntu specific patch-set at the packages provided by the LEB, for proper kernel and user-space support. Luckily this time it seems the delta is really minimum, which should probably also start to be part of Linux Linaro in the following month.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://summit.ubuntu.com/uds-q/meeting/20499/foundations-q-hwpack-integration/&quot;&gt;Integrate Linaro hwpacks for ARM with the Ubuntu image build infrastructure&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;Usual discussion about trying to avoid replicated work that is strictly related with each ARM board we support at both Ubuntu and Linaro. Decision is to finally sync with the latest flash-kernel available at Debian and try to get the common project/package with the hardware specific bits in place, so it can be used by linaro-image-tools, flash-kernel and debian-cd.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Wednesday &amp;#8211; May 9th&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://summit.ubuntu.com/uds-q/meeting/20394/servercloud-q-maas-next-steps/&quot;&gt;MAAS Next Steps&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;Session to review and plan what are the next steps for the MAAS project, which is also missing proper ARM support for now. Great discussions on understanding all the requirements, as they will not necessarily match entirely with the usual ARM devices we have at the moment. Here the goal for ARM is to continue improving the PXE support at U-Boot (even with UEFI chainload later), and understanding what might be missing to also have IPMI support (even if not entirely provided by the hardware).&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://summit.ubuntu.com/uds-q/meeting/20429/desktop-q-system-compositor/&quot;&gt;System Compositor&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;Great session covering what might be the improvements and development on the graphics side for next release. Goal is to use a system compositor that would be started right at the beginning at the boot, which will then be controlled and used properly once lightdm is up (with X11). This will improve a lot the user experience on normal x86 based desktops, and luckily on ARM we&amp;#8217;re also in a quite nice situation with the work done by Linaro helping getting the proper DRM/KMS support for the boards we support, so I hope ARM will be in a great shape here &lt;span class=&quot;wp-smiley wp-emoji wp-emoji-smile&quot; title=&quot;:-)&quot;&gt;:-)&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://summit.ubuntu.com/uds-q/meeting/20410/servercloud-q-arm-server/&quot;&gt;ARM Server general enhancements (for ARMv7 and perhaps v8)&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;At this session we could cover what seems to be the most recurrent and problematically thing at supporting ARM servers, which is the lack of a single and supported boot method and boot loader. UEFI should be able to help on this front soon, but until then the focus will be to keep checking and making sure the current PXE implementation at u-boot works as expected (chainloading UEFI on u-boot is also another possibility Linaro is investigating). There is also the request for IPMI support, which is still unclear in general how it&amp;#8217;ll be done generically speaking.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://summit.ubuntu.com/uds-q/meeting/20295/foundations-q-grub-integration-testing/&quot;&gt;Integration testing for the bootloader&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;As Ubuntu is also moving to the direction of continuous validating and testing all important components available, there&amp;#8217;s the need for a proper validation of the bootloader, and the effect at the user experience while booting the system. For ARM it&amp;#8217;s also a special case, as U-Boot is still the main bootloader used across the boards. Test case descriptions in place, and discussion will probably continue at Linaro Connect as this is also an area where we also want to help validating/testing.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://summit.ubuntu.com/uds-q/meeting/20524/servercloud-q-server-benchmark-and-performance/&quot;&gt;ARM Server Benchmarking and Performance&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;Here the Ubuntu Server Team presented how they are benchmarking and checking performance at the server level at x86, and covering what might still be needed to run and validate the ARM boards the same way. For ARM the plan is to run the same test cases on the available scenarios, and also try to get Linaro involved by making sure this is also part of the continuous validation and testing done with LAVA. Another important topic that will probably be extended at Linaro Connect is finding a way to get the power consumption data when running the test cases/benchmarks, so it can be further optimised later on.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://summit.ubuntu.com/uds-q/meeting/20806/desktop-compiz-gles2-handover/&quot;&gt;Compiz GLES2 Handover&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;Last session of the day, trying to find the missing gaps to finally get the OpenGL ES2.0 support merged at the Compiz and Unity upstream branches used by the entire Ubuntu desktop (across all archs). Following work and actions will basically be to fix the remaining and important plugins after merging the changes, and also getting a few test cases to properly validate the support at Ubuntu. Once all done, it should be merged ASAP.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;These are just a few topics which I was able to participate. There are a lot of more exciting work coming on, which can all be found at &lt;a href=&quot;http://summit.ubuntu.com/uds-q/&quot;&gt;http://summit.ubuntu.com/uds-q/&lt;/a&gt;. Remember that you&amp;#8217;re still able to participate in a few of them tomorrow and friday, as remote access is provided for all the sessions we have.&lt;/p&gt;
&lt;p&gt;I&amp;#8217;m sure a lot of more exciting stuff will be discussed for ARM support until the end of this week, and at Linaro Connect, at the end of the month, we&amp;#8217;ll be able to review and get our hands dirty as well &lt;span class=&quot;wp-smiley wp-emoji wp-emoji-smile&quot; title=&quot;:-)&quot;&gt;:-)&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Exciting times for ARM!&lt;/p&gt;&lt;br /&gt;  &lt;a rel=&quot;nofollow&quot; href=&quot;http://feeds.wordpress.com/1.0/gocomments/rsalveti.wordpress.com/475/&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://feeds.wordpress.com/1.0/comments/rsalveti.wordpress.com/475/&quot; /&gt;&lt;/a&gt; &lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://pixel.wp.com/b.gif?host=rsalveti.wordpress.com&amp;blog=905525&amp;post=475&amp;subd=rsalveti&amp;ref=&amp;feed=1&quot; width=&quot;1&quot; height=&quot;1&quot; /&gt;</content:encoded>
	<dc:date>2012-05-10T08:13:46+00:00</dc:date>
	<dc:creator>rsalveti</dc:creator>
</item>
<item rdf:about="http://blog.morpheuz.cc/?p=367">
	<title>Morpheuz: Big changes!</title>
	<link>http://blog.morpheuz.cc/08/05/2012/big-changes/</link>
	<content:encoded>&lt;p&gt;After 5 wonderful years working with passionate and skilled people I am now moving to São Paulo to work at Facebook&amp;#8217;s office for Latin America. My official role will be &lt;a title=&quot;Partner Engineer @ Facebook&quot; href=&quot;http://www.quora.com/Facebook-1/What-is-the-role-of-a-partner-engineer-at-Facebook&quot;&gt;Partner Engineer&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;This doesn&amp;#8217;t mean that I will go away from KDE, neither from Qt. It just means that I will contribute more on my free time (as it was before Nokia acquired Trolltech) than during working hours.&lt;/p&gt;
&lt;p&gt;I am thrilled with this opportunity and I am sure that all of you who know me are also happy with this announcement.&lt;/p&gt;
&lt;p&gt;I will be a little bit offline the next days due to my move, but I will be checking emails regularly &lt;img src=&quot;http://blog.morpheuz.cc/wp-includes/images/smilies/icon_smile.gif&quot; alt=&quot;:)&quot; class=&quot;wp-smiley&quot; /&gt; &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</content:encoded>
	<dc:date>2012-05-08T15:05:09+00:00</dc:date>
</item>
<item rdf:about="http://ianlawrence.info/random-stuff/advances-in-mobile-data-collection-nokia-data-gathering-4.04">
	<title>Ian Lawrence: Advances in mobile data collection: Nokia Data Gathering 4.04</title>
	<link>http://ianlawrence.info/random-stuff/advances-in-mobile-data-collection-nokia-data-gathering-4.04</link>
	<content:encoded>&lt;p&gt;We have been hard at work developing and improving the Nokia Data Gathering solution, and will be launching an exciting new version in May 2012. The Nokia Data Gathering 4.04 (Dazzling Dourado) release will include bug fixes and new features on the Java mobile client, as well as a brand new Nokia Data Gathering server and user interface. We will also be launching the first Windows Phone client of Nokia Data Gathering.&lt;/p&gt;
 
&lt;p&gt;Come discover and try out Nokia Data Gathering 4.04! On &lt;em&gt;16 May 2012, the Nokia Data Gathering team will be at Seton Hall University&lt;/em&gt; to tell you all about the new Nokia Data Gathering 4.04 server, the new Windows Phone mobile app, mobile data collection case studies from around the world, and to give you a chance to try out Nokia Data Gathering 4.04 for yourself.&lt;/p&gt;
&lt;p&gt;Please join us!&lt;/p&gt;
&lt;table&gt;
&lt;tr&gt;
    &lt;td&gt;Event&lt;/td&gt;
    &lt;td&gt;Nokia Data Gathering 4.04 workshop&lt;td&gt;
&lt;/td&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;
  &lt;td&gt;Date&lt;/td&gt;
  &lt;td&gt;Wednesday, 16 May 2012&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
 &lt;td&gt;Time&lt;/td&gt;
 &lt;td&gt;09:00-12:00 AM&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td&gt;Place&lt;/td&gt;
  &lt;td&gt;Seton Hall University, 400 South Orange Avenue, South Orange, NJ 07079, USA&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td&gt;Room&lt;/td&gt;
  &lt;td&gt;Beck Rooms A, B, and C (Ground Floor of Walsh Library)&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;
 
&lt;p&gt;Nokia Data Gathering 4.04 is the result of a collaborative effort between &lt;a href=&quot;http://www.nokia.com/&quot;&gt;Nokia&lt;/a&gt;, the &lt;a href=&quot;http://cmri.shu.edu/&quot;&gt;Center for Mobile Research and Innovation&lt;/a&gt; at Seton Hall University and &lt;a href=&quot;http://www.microsoft.com/&quot;&gt;Microsoft&lt;/a&gt;. Learn more at &lt;a href=&quot;http://projects.developer.nokia.com/ndg/&quot;&gt;http://projects.developer.nokia.com/ndg/&lt;/a&gt;
&lt;p&gt;
For more information about the workshop and/or Nokia Data Gathering, please contact kulsoom.ally 'at' nokia.com&lt;/p&gt;&lt;/p&gt;</content:encoded>
	<dc:date>2012-05-07T16:02:35+00:00</dc:date>
</item>
<item rdf:about="http://anselmolsm.org/?p=1567">
	<title>Anselmo Lacerda S. de Melo: Qt 5 UiHelpers</title>
	<link>http://anselmolsm.org/blog/qt-5-uihelpers/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=qt-5-uihelpers</link>
	<content:encoded>&lt;p&gt;In &lt;a href=&quot;http://anselmolsm.org/blog/working-in-the-open-again/&quot; target=&quot;_blank&quot;&gt;my previous post&lt;/a&gt; I mentioned one of the experiments &lt;a href=&quot;http://www.indt.org/?lang=en&quot; target=&quot;_blank&quot;&gt;we&lt;/a&gt; are currently working on.&lt;br /&gt;
Now it is time to introduce the Qt 5 playground project called UiHelpers &amp;#8211; Fortunately, this name will change ;)&lt;br /&gt;
Those who follow the &lt;a href=&quot;http://lists.qt-project.org/pipermail/development&quot; target=&quot;_blank&quot;&gt;Qt development mailing list&lt;/a&gt; already read about it, the idea about this post is to reach more people from the community in general.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Context&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;If you are already familiar with the structure of Qt 5 code, feel free to jump to the next section.&lt;/p&gt;
&lt;p&gt;In Qt 4, the whole source code is in the same git repository. The traditional widgets derived from QWidget are part of the QtGui module and represent a central piece for the GUI application development.&lt;/p&gt;
&lt;p&gt;In Qt 5, things changed. Qt code were splitted in many repositories which group Qt libraries depending on their functionalities.&lt;br /&gt;
Examples of repositories are qtbase, qtdeclarative, qtjsbackend, qtxmlpatterns, qtsvg, qttools, etc.&lt;br /&gt;
As you may know, QtQuick 2 became a first class citizen in Qt 5, which means qtdeclarative is one of the main repositories, house of QtQuick and QtQml classes.&lt;/p&gt;
&lt;p&gt;But, there are classes that provide the base for QtQuick 2 work properly &amp;#8211; they are part of the qtbase repo. There you find QtCore,&lt;br /&gt;
QtGui, QtNetwork, QtOpenGL, QtPlatformSupport, QtXml, QtWidgets, etc.&lt;/p&gt;
&lt;p&gt;Wait: What&amp;#8217;s the difference between QtGui and QtWidgets?&lt;/p&gt;
&lt;p&gt;As part of the changes of Qt 5, QtGui is now focused in the basic infrastructure for GUI work on different platforms. For example, it is the place for the platform abstraction layer, window management, image handling, etc.&lt;/p&gt;
&lt;p&gt;QtWidgets, as you can conclude based on its name, contains the children of QWidget: QPushButton, QSpinBox, QMainWindow, etc. Also, there are non-widgets classes in QtWidgets, some of them because they are internally too coupled to QWidget classes.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Origins&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;In this &lt;a href=&quot;http://lists.qt-project.org/pipermail/development/2011-December/000932.html&quot; target=&quot;_blank&quot;&gt;thread&lt;/a&gt; it was mentioned the case of QUndoStack, QUndoCommand that are in QtWidgets but can be useful in other contexts where developers do not want to link against QtWidgets just because of this kind of helper classes.&lt;br /&gt;
Later, in the &lt;a href=&quot;http://codereview.qt-project.org/#change,15857&quot; target=&quot;_blank&quot;&gt;change 15857&lt;/a&gt; (with the help of ogoffart), we discussed about moving QUndo* out of QtWidgets. First, we moved these classes to QtGui what as not considered correct given the new motivation of this lib. Then, another idea was to move the classes to a new lib, inside qtbase. It was not considered ideal and the decision was to create a separated repo for these classes, leaving QtWidgets untouched (since the Qt community do not want to introduce new bugs in this lib).&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Current status&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;We set a &lt;a href=&quot;http://qt-project.org/wiki/Qt-5-Ui-Helpers&quot; target=&quot;_blank&quot;&gt;wiki page&lt;/a&gt; where it is possible to check the classes made available out of QtWidgets. Also, there are instructions about where to download the source code, build, test and contact us.&lt;/p&gt;
&lt;p&gt;Besides moving classes out of QtWidgets, some prototypes of convenience APIs were created for QtQuick 2 developers and we are very interested in receiving feedback about them. It&amp;#8217;s worth mentioning the QML API for UndoStack and the CompletionModel which is based on the internals of QCompleter and was made available in a QML friendly way.&lt;/p&gt;
&lt;p&gt;The following example shows a possible use case for the CompletionModel. Improving the models supported by &lt;em&gt;sourceModel&lt;/em&gt; is part of the ToDo list. The ListView is going to show the updated list that currently satisfies what is written in the TextInput.&lt;/p&gt;
&lt;pre class=&quot;brush:js&quot;&gt;TextInput {
    id: input
}

CompletionModel {
    id: completionModel
    sourceModel: [&quot;Ascension Island&quot;, &quot;Andorra&quot;, &quot;Afghanistan&quot;]
    completionPrefix: input.text
    caseSensitivity: Qt.CaseInsensitive
}

ListView {
    model: completionModel
    delegate: Text { text: modelData }
}&lt;/pre&gt;
&lt;p&gt;The two examples bellow show the UndoStack and two items that represent commands. The idea of UndoPropertyCommand is to enable track the changes of some properties. In the example, we are going to track x and y when myRect is moved.&lt;/p&gt;
&lt;pre class=&quot;brush:js&quot;&gt;UndoStack {
    id: stack
    undoLimit: 5
}

UndoPropertyCommand {
    id: moveCommand
    properties: [&quot;x&quot;, &quot;y&quot;]
}

Rectangle {
    id: myRect

    (...)

    MouseArea {
        (...)
        drag.target: parent
        onPressed: stack.push(moveCommand, myRect);
    }
}&lt;/pre&gt;
&lt;p&gt;UndoCommand is another element used to represent commands. The difference here is that it allows the customization of the actions onUndo and onRedo the command.&lt;/p&gt;
&lt;pre class=&quot;brush:js&quot;&gt;UndoCommand {
    id: aCommand

    onUndo: doAThing(target);
    onRedo: undoAThing(target);
}

Button {
    onClicked: stack.push(aCommand, target);
}&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Future&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Maybe one day this playground project gets promoted and become a Qt Add-on, but there is no expectation it will happen before 5.0. In the meanwhile, there is a ToDo list with some topics we consider important to handle, like better examples, more tests, docs, etc.&lt;/p&gt;
&lt;p&gt;We are looking forward receiving more opinions about this work and, as always, contributors are welcome!&lt;/p&gt;</content:encoded>
	<dc:date>2012-04-13T18:10:37+00:00</dc:date>
</item>
<item rdf:about="tag:blogger.com,1999:blog-8974121210221508485.post-69735282544240023">
	<title>Bruno Abinader: Moving out! :)</title>
	<link>http://brunoabinader.blogspot.com/2010/09/moving-out.html</link>
	<content:encoded>&lt;div&gt;Hello my fellow readers :)&lt;/div&gt;&lt;div&gt;First of all, this is not a &quot;goodbye&quot; message! It's time to move my blog to a cool domain, which is commonly used by me fellow colleagues Igor Oliveira and Adenilson Cavalcanti. All of my previous posts were moved to there, so don't worry (I mean the CMake tutorials!). So, the new blog link is below:&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;a href=&quot;http://bruno.abinader.com.br/&quot;&gt;http://bruno.abinader.com.br&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Thank you BlogSpot for hosting this blog for 3 years without problems, and I hope to see you there! :)&lt;/div&gt;</content:encoded>
	<dc:date>2012-04-11T11:12:21+00:00</dc:date>
	<dc:creator>Bruno de Oliveira Abinader</dc:creator>
</item>
<item rdf:about="http://anselmolsm.org/?p=1556">
	<title>Anselmo Lacerda S. de Melo: Working in the open again</title>
	<link>http://anselmolsm.org/blog/working-in-the-open-again/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=working-in-the-open-again</link>
	<content:encoded>&lt;p&gt;Long time since my last post (it&amp;#8217;s sad to realize how often I start posts writing this).&lt;br /&gt;
Since last year&amp;#8217;s &lt;a href=&quot;http://qt-project.org/groups/qt-contributors-summit-2011&quot; target=&quot;_blank&quot;&gt;Qt Contributors&amp;#8217; Summit&lt;/a&gt;, our team at &lt;a href=&quot;http://www.indt.org/?lang=en&quot; target=&quot;_blank&quot;&gt;INdT&lt;/a&gt; worked on a closed source project &amp;#8211; the main reason of the low activity here. At least, I could write some posts for the &lt;a href=&quot;http://blog.qtlabs.org.br/&quot; target=&quot;_blank&quot;&gt;Qt Labs Blog Brazil&lt;/a&gt;, most of them introducing basic concepts about Qt programming and the Qt ecossystem (buzzword++).&lt;br /&gt;
The good part is: This project we were working on was developed using Qt and QML for a desktop application. Besides promoting Qt among Brazilian developers and companies, this project helped us to think about improvements for future releases of QtQuick aiming desktop applications. I am looking forward to see a release of this product soon! (However, when it is going to happen is a client decision).&lt;/p&gt;
&lt;p&gt;Then, after the end of this project, I &lt;strong&gt;finally&lt;/strong&gt; managed to contribute to Qt5! :-)&lt;/p&gt;
&lt;p&gt;Also, in the end of the last year some coworkers started a kind of pet project: It&amp;#8217;s called Iceberg, a fork of the Icecream Monitor.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&amp;#8220;Why a fork?&amp;#8221;&lt;/strong&gt; Here we use &lt;a href=&quot;http://en.opensuse.org/Icecream&quot; target=&quot;_blank&quot;&gt;icecream&lt;/a&gt; for distributed compilation, many colleagues used to complain about icemon depending on kdelibs. In fact, the code did not use the additional features compared to the equivalent Qt classes. Then, after &lt;a href=&quot;http://hugoparente.blogspot.com.br/&quot; target=&quot;_blank&quot;&gt;hugopl&lt;/a&gt; &lt;a href=&quot;http://hugoparente.blogspot.com.br/2011/10/iceberg.html&quot; target=&quot;_blank&quot;&gt;started the project&lt;/a&gt;, we fixed some issues and added new stuff. The code is &lt;a href=&quot;https://github.com/hugopl/Iceberg&quot; target=&quot;_blank&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;I am writing another post to introduce one of our current research projects, which is also part of the proposal I sent to &lt;a href=&quot;http://akademy.kde.org/&quot;&gt;Akademy 2012&lt;/a&gt;.&lt;/p&gt;</content:encoded>
	<dc:date>2012-03-27T12:40:01+00:00</dc:date>
</item>
<item rdf:about="http://rsalveti.wordpress.com/?p=450">
	<title>Ricardo Salveti: ARM Porting Jam this Friday!</title>
	<link>http://rsalveti.wordpress.com/2012/03/02/arm-porting-jam-this-friday/</link>
	<content:encoded>&lt;p&gt;For those following the development of the next Ubuntu release (12.04 &amp;#8211; Precise Pangolin), you all know that we&amp;#8217;re quite close to the release date already, and to make sure Precise rocks since day 0, we all need to work hard to get most of the bugs sorted out during the next few weeks.&lt;/p&gt;
&lt;p&gt;At Linaro, the Linaro Developer Platform team will be organizing an ARM porting Jam this Friday, with the goal of getting all developers interested in fixing and working on bugs and portability issues related with the Ubuntu ARM port (mostly issues with ARMHF at the moment).&lt;/p&gt;
&lt;p&gt;The idea of having the Porting Jam at Friday is to have it as a joint effort with &lt;a href=&quot;http://daniel.holba.ch/blog/2012/02/hitting-the-ground-running/&quot;&gt;Ubuntu&amp;#8217;s Fix Friday&lt;/a&gt; and &lt;a href=&quot;http://rsalveti.wordpress.com/2012/03/02/arm-porting-jam-this-friday/loco.ubuntu.com/events/global/1443/detail/&quot;&gt;Ubuntu Global Jam&lt;/a&gt;, so expect quite a few other developers helping improving Ubuntu as well!&lt;/p&gt;
&lt;p&gt;It&amp;#8217;s quite easy to participate:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Check the current bug list for ARM at &lt;a href=&quot;http://people.linaro.org/~rsalveti/arm-porting-queue/arm-porting-queue-report.html&quot;&gt;http://people.linaro.org/~rsalveti/arm-porting-queue/arm-porting-queue-report.html&lt;/a&gt; and FTBFS list from &lt;a href=&quot;http://qa.ubuntuwire.com/ftbfs/&quot;&gt;http://qa.ubuntuwire.com/ftbfs/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Look at &lt;a href=&quot;http://developer.ubuntu.com/packaging/html/&quot;&gt;http://developer.ubuntu.com/packaging/html/&lt;/a&gt; for more information about packaging, and how to provide patches and fixes for our current packages&lt;/li&gt;
&lt;li&gt;Join #linaro and/or #ubuntu-motu on irc.freenode.net&lt;/li&gt;
&lt;li&gt;Grab a bug, debug, ask questions and update the bug report with your findings&lt;/li&gt;
&lt;li&gt;Get involved with other developers&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Remember that for ARM this release will be a quite huge milestone, as it&amp;#8217;ll be the first LTS release supporting ARM, besides delivering support for ARM servers and ARMHF as default, so let&amp;#8217;s make sure it rocks!&lt;/p&gt;
&lt;p&gt;Looking forward for a great porting Jam!&lt;/p&gt;
&lt;p&gt;Happy bug fixing!&lt;/p&gt;&lt;br /&gt;  &lt;a rel=&quot;nofollow&quot; href=&quot;http://feeds.wordpress.com/1.0/gocomments/rsalveti.wordpress.com/450/&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://feeds.wordpress.com/1.0/comments/rsalveti.wordpress.com/450/&quot; /&gt;&lt;/a&gt; &lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://pixel.wp.com/b.gif?host=rsalveti.wordpress.com&amp;blog=905525&amp;post=450&amp;subd=rsalveti&amp;ref=&amp;feed=1&quot; width=&quot;1&quot; height=&quot;1&quot; /&gt;</content:encoded>
	<dc:date>2012-03-02T07:10:26+00:00</dc:date>
	<dc:creator>rsalveti</dc:creator>
</item>
<item rdf:about="http://rsalveti.wordpress.com/?p=390">
	<title>Ricardo Salveti: Ubuntu TV UI at Pandaboard, and next steps</title>
	<link>http://rsalveti.wordpress.com/2012/01/10/ubuntu-tv-ui-at-pandaboard-and-next-steps/</link>
	<content:encoded>&lt;p&gt;Yesterday Canonical &lt;a href=&quot;http://www.ubuntu.com/tv&quot;&gt;announced&lt;/a&gt; the first UI concept for the Ubuntu TV. Together with the announcement, the first code drop was released, so we could read and understand better the technologies used, and how this will behave on an ARM environment, mostly at a Pandaboard (that we already have OpenGL ES 2 and video decode working).&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Getting Ubuntu TV to work&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;If are still using Oneiric, you can just follow the guide presented at &lt;a href=&quot;https://wiki.ubuntu.com/UbuntuTV/Contributing&quot;&gt;https://wiki.ubuntu.com/UbuntuTV/Contributing&lt;/a&gt;, where you&amp;#8217;ll find all needed steps to try Ubuntu TV at your machine.&lt;/p&gt;
&lt;p&gt;As it&amp;#8217;s quite close with Unity 2D (similar code base), and also based on Qt, I decided to follow the steps described at wiki page and see if it should work correctly.&lt;/p&gt;
&lt;p&gt;First issue we found with Qt, was that it wasn&amp;#8217;t rendering at full screen when using with latest PowerVR SGX drivers, so any application you wanted to use with Qt Opengl would just show itself on a small part of the screen. Luckily TI (Nicolas Dechesne and Xavier Boudet) quickly provided me a new release of the driver, fixing this issue (version that should be around later today at the Linaro Overlay), so I could continue my journey &lt;span class=&quot;wp-smiley wp-emoji wp-emoji-smile&quot; title=&quot;:-)&quot;&gt;:-)&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Next problem was that &lt;a href=&quot;http://qt.gitorious.org/qt/qt/commit/3fb5fce61b6f64534ad292a78250e4256a6514b6?format=diff&quot;&gt;Qt was enabling brokenTexSubImage and brokenFBOReadBack&lt;/a&gt; for the SGX drivers based on the old versions available for Beagle, and seems this is not needed anymore with the current version available at Pandaboard (still to be reviewed with TI, so a proper solution can be forwarded to Qt).&lt;/p&gt;
&lt;p&gt;Code removed, patch applied and package built (after many hours), and I was finally able to successfully open the Ubuntu TV interface at my Panda &lt;span class=&quot;wp-smiley wp-emoji wp-emoji-smile&quot; title=&quot;:-)&quot;&gt;:-)&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;UI Navigation on a Pandaboard, with Qt and OpenGL ES2.0&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;Running Ubuntu TV is quite simple if you&amp;#8217;re already running the Unity 2D interface. All you need to do is to make sure you kill all unity-2d components and that you&amp;#8217;re running metacity without composite enabled. Other than that you just run &amp;#8221;unity-2d-shell -opengl&amp;#8221; and voilà &lt;span class=&quot;wp-smiley wp-emoji wp-emoji-wink&quot; title=&quot;;-)&quot;&gt;;-)&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Here&amp;#8217;s a video of the current interface running on my Panda:&lt;br /&gt;
&lt;span class=&quot;embed-youtube&quot;&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;As you can see from the video, I didn&amp;#8217;t actually play any video, and that&amp;#8217;s because currently we&amp;#8217;re lacking a generic texture handler for OpenGL ES with Gstreamer at &lt;a href=&quot;http://qt.gitorious.org/qt-mobility&quot;&gt;Qtmobility&lt;/a&gt; (there&amp;#8217;s only one available, but specifically for Meego). Once that&amp;#8217;s fixed, the video playback should behave similarly as with XBMC (but with less hacks, as it&amp;#8217;s a native GST backend).&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Next steps, enabling proper video decode&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;Looking at what would be needed to finally be able to play the videos, and to make it something useful at your Pandaboard, the first thing is that we need to improve Qtmobility to have a more generic (but unfortunately still specific to Omap) way handle texture streaming with Gstreamer and OpenGL ES. Rob Clark added a similar functionality at XBMC, creating support for &amp;#8221;eglImage&amp;#8221;, so we just need to port the work and make sure it works properly with Qtmobility.&lt;/p&gt;
&lt;p&gt;Once that&amp;#8217;s ported, the video should be streamed as a texture at the video surface, making it also work transparently with QML (the way it&amp;#8217;s done with Ubuntu TV).&lt;/p&gt;
&lt;p&gt;If you know Qt and Gstreamer, and also want to help getting it to work properly on your panda, here follows a few resources:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Rob&amp;#8217;s implementation of eglImage at XBMC: &lt;a href=&quot;https://github.com/robclark/xbmc/commits/gstreamer-eglimg&quot;&gt;https://github.com/robclark/xbmc/commits/gstreamer-eglimg&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Qtmobility support for Meego and OpenGLES: &lt;a href=&quot;http://qt.gitorious.org/qt-mobility/qt-mobility/blobs/master/plugins/multimedia/gstreamer/qgstreamergltexturerenderer.cpp&quot;&gt;http://qt.gitorious.org/qt-mobility/qt-mobility/blobs/master/plugins/multimedia/gstreamer/qgstreamergltexturerenderer.cpp&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;IRC: #linaro and #ubuntu-tv at Freenode, look for robclark or rsalveti&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;As soon video decoding is working properly, a new blog post should be around explaining the details and how to reproduce it at your own Panda with Ubuntu LEB &lt;span class=&quot;wp-smiley wp-emoji wp-emoji-smile&quot; title=&quot;:-)&quot;&gt;:-)&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Cheers!&lt;/p&gt;&lt;br /&gt;  &lt;a rel=&quot;nofollow&quot; href=&quot;http://feeds.wordpress.com/1.0/gocomments/rsalveti.wordpress.com/390/&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://feeds.wordpress.com/1.0/comments/rsalveti.wordpress.com/390/&quot; /&gt;&lt;/a&gt; &lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://pixel.wp.com/b.gif?host=rsalveti.wordpress.com&amp;blog=905525&amp;post=390&amp;subd=rsalveti&amp;ref=&amp;feed=1&quot; width=&quot;1&quot; height=&quot;1&quot; /&gt;</content:encoded>
	<dc:date>2012-01-16T06:59:56+00:00</dc:date>
	<dc:creator>rsalveti</dc:creator>
</item>
<item rdf:about="http://rsalveti.wordpress.com/?p=421">
	<title>Ricardo Salveti: Ubuntu TV fully accelerated on a Pandaboard with Ubuntu LEB</title>
	<link>http://rsalveti.wordpress.com/2012/01/16/ubuntu-tv-fully-accelerated-on-a-pandaboard-with-ubuntu-leb/</link>
	<content:encoded>&lt;p&gt;As described on my previous post about &lt;a href=&quot;http://rsalveti.wordpress.com/2012/01/10/ubuntu-tv-ui-at-pandaboard-and-next-steps/&quot;&gt;Ubuntu TV support on a Pandaboard&lt;/a&gt;, we were still missing proper support for texture streaming on a Pandaboard, to have the video playback also working and fully accelerated.&lt;/p&gt;
&lt;p&gt;This weekend &lt;a href=&quot;http://bloggingthemonkey.blogspot.com/&quot;&gt;Rob Clark&lt;/a&gt; managed to create the first version of the TI&amp;#8217;s specific &lt;i&gt;eglImage&lt;/i&gt; support at &lt;a href=&quot;http://qt.nokia.com/products/qt-addons/mobility/&quot;&gt;Qtmobility&lt;/a&gt;, posting the code at &lt;a href=&quot;https://github.com/robclark/qtmobility-1.1.0&quot;&gt;his gitorious account&lt;/a&gt;, and for the first time we&amp;#8217;re fully able to use Ubuntu TV on a ARM device, using a Pandaboard.&lt;/p&gt;
&lt;p&gt;Demo video with the Ubuntu TV UI (accelerated with Qt and OpenGL ES 2.0) and with video decode support of 720p and 1080p:&lt;br /&gt;
&lt;span class=&quot;embed-youtube&quot;&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;The code support for TI&amp;#8217;s &lt;i&gt;eglImage&lt;/i&gt; still needs a few clean-ups, but we hope to be able to push the support at Ubuntu in the following weeks (make it good enough to try at least a package patch).&lt;/p&gt;
&lt;p&gt;For people wanting to try it out, a few packages are already available at &lt;a href=&quot;https://launchpad.net/~linaro-maintainers/+archive/overlay/&quot;&gt;Linaro&amp;#8217;s Overlay PPA&lt;/a&gt;, and the remaining ones should be available later today (Qt and Qtmobility), so people can easily run it with our images.&lt;/p&gt;
&lt;p&gt;Hope you enjoy, and we&amp;#8217;ll make sure we&amp;#8217;re always working on keeping and improving the current support, so Ubuntu TV also rocks with ARM &lt;span class=&quot;wp-smiley wp-emoji wp-emoji-smile&quot; title=&quot;:-)&quot;&gt;:-)&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Cheers!&lt;/p&gt;&lt;br /&gt;  &lt;a rel=&quot;nofollow&quot; href=&quot;http://feeds.wordpress.com/1.0/gocomments/rsalveti.wordpress.com/421/&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://feeds.wordpress.com/1.0/comments/rsalveti.wordpress.com/421/&quot; /&gt;&lt;/a&gt; &lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://pixel.wp.com/b.gif?host=rsalveti.wordpress.com&amp;blog=905525&amp;post=421&amp;subd=rsalveti&amp;ref=&amp;feed=1&quot; width=&quot;1&quot; height=&quot;1&quot; /&gt;</content:encoded>
	<dc:date>2012-01-16T06:56:11+00:00</dc:date>
	<dc:creator>rsalveti</dc:creator>
</item>
<item rdf:about="http://rsalveti.wordpress.com/?p=343">
	<title>Ricardo Salveti: HW video decode and XBMC support on a Pandaboard with Ubuntu LEB</title>
	<link>http://rsalveti.wordpress.com/2012/01/06/hw-video-decode-and-xbmc-ubuntu-linaro/</link>
	<content:encoded>&lt;p&gt;Part of the effort we spent during the Linaro 11.12 cycle was to try to enable at Pandaboard not only hardware graphics support (GLES with PVR SGX), but also hardware accelerated video decode, as TI had released all needed userspace to be used at Ubuntu Oneiric (11.10) release.&lt;/p&gt;
&lt;p&gt;Unfortunately it didn&amp;#8217;t just work with our images because at that time we were using a newer kernel already, based on the 3.1 series that is maintained by the Linaro TI Landing Team. Bug &lt;a href=&quot;https://bugs.launchpad.net/linaro-ubuntu/+bug/880840&quot;&gt;880840&lt;/a&gt; has all the details.&lt;/p&gt;
&lt;p&gt;Luckily Sebastien Jan (from TI) was able to find the root cause of the problem, that was causing so much frame drops that was making the video playback basically unusable. The problem was related with PM support at omap&amp;#8217;s hwspinlock implementation, as you can check at this &lt;a href=&quot;http://git.linaro.org/gitweb?p=landing-teams/working/ti/kernel.git;a=commitdiff;h=c75ef57170f5886fd35d96fd4d2253e0fb5838cb;hp=0cf04c4265ae69c39e44fadafa1b811c002b0a09&quot;&gt;link&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Kernel fix properly integrated and available at the Overlay PPA used by our Linaro Ubuntu Evaluation Build images, and finally able to have a similar user experience as was expected when TI delivered the user space components at their own PPA.&lt;/p&gt;
&lt;p&gt;If you want to try it by yourself, just be sure you&amp;#8217;re using at least linux-image-3.1.1-6-linaro-lt-omap at your board (all hwpacks &amp;gt;= 20110105 should have it included by default).&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Playing videos with HW decode acceleration&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;Since today you&amp;#8217;ll also easily find all the needed packages to enable HW video decode acceleration at our images (Pandaboard only at the moment, more boards coming soon). We just included and copied all needed packages from the TI PPA, so you don&amp;#8217;t even need to enable it when installing the additional packages.&lt;/p&gt;
&lt;p&gt;Installing the extra packages for video decode at your Pandaboard:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Grab the latest Pandaboard hwpack (lt-panda-x11-base-oneiric) and Ubuntu Desktop image from &lt;a href=&quot;http://snapshots.linaro.org/oneiric&quot;&gt;http://snapshots.linaro.org/oneiric&lt;/a&gt; (as example I used hwpack_linaro-lt-panda-x11-base_20120106-0_armel_supported.tar.gz and linaro-o-ubuntu-desktop-tar-20120105-0.tar.gz)&lt;/li&gt;
&lt;li&gt;Create a Ubuntu LEB pandaboard image on a SD card, following the instructions described at &lt;a href=&quot;https://wiki.linaro.org/Platform/DevPlatform/Ubuntu/ImageInstallation&quot;&gt;https://wiki.linaro.org/Platform/DevPlatform/Ubuntu/ImageInstallation&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Boot the card and install the &lt;b&gt;ubuntu-omap4-extras-multimedia&lt;/b&gt; package: &lt;code&gt;$ sudo apt-get install ubuntu-omap4-extras-multimedia&lt;/code&gt;
&lt;li&gt;Reboot your pandaboard&lt;/li&gt;
&lt;li&gt;Play a video with any video player that&amp;#8217;s compatible with Gstreamer (e.g. Totem)&lt;/li&gt;
&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;In the future we should also have this completely integrated at the hwpack itself, but unfortunately this is not possible at the moment without increasing the image size too much.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;XBMC support&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;Another awesome thing we worked during previous cycle (11.12) was to make an XBMC version available that would use both GLES and Gstreamer, so it could also be used with a Pandaboard. Avik Sil did a great work making it all work with our images, and we were finally able to have XBMC 11 Beta (Eden) available at our Overlay PPA.&lt;/p&gt;
&lt;p&gt;For proper support for Gstreamer Rob Clark did an awesome work improving the current patches, and also improving the support quite a bit. At our package you&amp;#8217;ll find all latest patches available from Rob, from his current &lt;a href=&quot;https://github.com/robclark/xbmc/tree/gstreamer-eglimg&quot;&gt;development tree&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;To start using XBMC with the Ubuntu LEB image at your Pandaboard, you just need to install the xbmc package, with &lt;code&gt;$ sudo apt-get install xbmc&lt;/code&gt;. For best user experience, please use the XBMC session available at LightDM (just log-out the default session and select XBMC instead). This will work a lot better because then there will be no other window manager or compositor taking extra resources from your board.&lt;/p&gt;
&lt;p&gt;We also hope to deliver a set-top box image by the end of the current cycle (12.01), that will have XBMC installed by default. Please check the blueprint &lt;a href=&quot;https://blueprints.launchpad.net/linaro-ubuntu/+spec/create-a-set-top-box-leb-image&quot;&gt;https://blueprints.launchpad.net/linaro-ubuntu/+spec/create-a-set-top-box-leb-image&lt;/a&gt; if you want to follow the progress of it.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Bugs and Issues&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;Unfortunately not everything is working perfectly at the moment, and issues with the Gstreamer and hw video decode support on Pandaboard are expected. The most annoying one that&amp;#8217;s currently affecting XBMC is the issues with seek, as sometimes the video goes faster than the audio, and then it stops for a while until it&amp;#8217;s in sync again. We hope to get this fixed soon, but that depends a bit of how much time Rob can spend on it.&lt;/p&gt;
&lt;p&gt;In case of any other bug while trying to get video decode to work on your Pandaboard, don&amp;#8217;t hesitate to open a bug at &lt;a href=&quot;https://bugs.launchpad.net/linaro-ubuntu/+filebug&quot;&gt;https://bugs.launchpad.net/linaro-ubuntu/+filebug&lt;/a&gt; or ping aviksil, robclark or rsalveti at &lt;b&gt;#linaro&lt;/b&gt; on freenode.&lt;/p&gt;
&lt;p&gt;Cheers!&lt;/p&gt;
&lt;p&gt;Update: Check bug &lt;a href=&quot;https://bugs.launchpad.net/linaro-ubuntu/+bug/915456&quot;&gt;https://bugs.launchpad.net/linaro-ubuntu/+bug/915456&lt;/a&gt; for the video hanging issue. Without polling XBMC should now play most videos just fine.&lt;/p&gt;
&lt;p&gt;Update 2: XBMC-ready image already available at &lt;a href=&quot;http://snapshots.linaro.org/oneiric/linaro-o-linarotv-xbmc/&quot; rel=&quot;nofollow&quot;&gt;http://snapshots.linaro.org/oneiric/linaro-o-linarotv-xbmc/&lt;/a&gt;, just be sure to flash with &lt;a href=&quot;http://snapshots.linaro.org/oneiric/lt-panda-x11-base-oneiric/&quot; rel=&quot;nofollow&quot;&gt;http://snapshots.linaro.org/oneiric/lt-panda-x11-base-oneiric/&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Update 3: There&amp;#8217;s a mem leak at the gst decode codec, check bug &lt;a href=&quot;https://bugs.launchpad.net/ubuntu-omap4-extras-multimedia/+bug/915768&quot; rel=&quot;nofollow&quot;&gt;https://bugs.launchpad.net/ubuntu-omap4-extras-multimedia/+bug/915768&lt;/a&gt; for progress on that.&lt;/p&gt;&lt;br /&gt;  &lt;a rel=&quot;nofollow&quot; href=&quot;http://feeds.wordpress.com/1.0/gocomments/rsalveti.wordpress.com/343/&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://feeds.wordpress.com/1.0/comments/rsalveti.wordpress.com/343/&quot; /&gt;&lt;/a&gt; &lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://pixel.wp.com/b.gif?host=rsalveti.wordpress.com&amp;blog=905525&amp;post=343&amp;subd=rsalveti&amp;ref=&amp;feed=1&quot; width=&quot;1&quot; height=&quot;1&quot; /&gt;</content:encoded>
	<dc:date>2012-01-16T02:11:41+00:00</dc:date>
	<dc:creator>rsalveti</dc:creator>
</item>
<item rdf:about="http://blog.ademar.org/?p=1213">
	<title>Ademar de Souza Reis Jr.: Retrospectiva 2011, planos pra 2012</title>
	<link>https://blog.ademar.org/2011/retrospectiva-2011/</link>
	<content:encoded>&lt;p&gt;Pra não perder a tradição (desde 2006), hora do post de fim de ano: relembrar 2011 e planejar um pouco 2012.&lt;/p&gt;
&lt;p&gt;2011 foi um ano excelente pra mim. Um ano pra ser lembrado. Começou com novidades ruins no trabalho no INdT/Nokia: &lt;a href=&quot;https://www.google.com/search?q=nokia+burning+platform+memo&quot;&gt;&amp;#8220;the burning platform&amp;#8221;&lt;/a&gt;, a aliança com a Microsoft e o futuro incerto. Pra aliviar um pouco, vieram as férias, uma excelente &lt;a href=&quot;http://blog.ademar.org/2011/ferias-2011-destino-europa/&quot;&gt;viagem à Europa&lt;/a&gt; com a Viviane: 35 dias intensos, 11 países (França, Inglaterra, Holanda, Alemanha, Russia, Polônia, República Checa, Áustria, Itália e Vaticano &amp;#8212; sim, o Vaticano conta!). Ótimas experiências com &lt;a href=&quot;http://blog.ademar.org/2007/couchsurfing/&quot;&gt;couchsurfing&lt;/a&gt;, muitos kms de estradas, trens, aeroportos&amp;#8230; Viagem intensa mas sem nenhum contratempo.&lt;/p&gt;
&lt;div id=&quot;attachment_1221&quot; class=&quot;wp-caption aligncenter&quot;&gt;&lt;a href=&quot;http://blog.ademar.org/wp-content/uploads/2011/12/europa-2011.jpg&quot;&gt;&lt;img src=&quot;http://blog.ademar.org/wp-content/uploads/2011/12/europa-2011-420x280.jpg&quot; alt=&quot;Viagem à Europa 2011&quot; title=&quot;Viagem à Europa - Março/Abril 2011 (clique para ampliar)&quot; width=&quot;420&quot; height=&quot;280&quot; class=&quot;size-medium wp-image-1221&quot; /&gt;&lt;/a&gt;&lt;p class=&quot;wp-caption-text&quot;&gt;Mosaico com algumas fotos da viagem à Europa&lt;/p&gt;&lt;/div&gt;
&lt;p&gt;Mais pro final do ano vieram duas grandes e excelentes novidades, quase que simultaneamente:&lt;/p&gt;
&lt;p&gt;Estávamos começando a fazer nossos planos pra ter um bebê quando veio a surpresa, mais do que bem vinda: a Viviane estava grávida. Estamos super empolgados e felizes. Em 2012 (abril/maio) deve chegar a Sofia, nossa primeira filha. Foi uma correria pela coincidência com as férias e aproveitamos pra visitar nossos pais (RS e PR). Também fizemos uma viagem rápida aos EUA pra aproveitar nossas últimas férias sozinhos e fazer o enxoval do bebê. Fomos pra Miami e Orlando, aliando compras com alguns passeios.&lt;/p&gt;
&lt;div id=&quot;attachment_1223&quot; class=&quot;wp-caption aligncenter&quot;&gt;&lt;a href=&quot;http://blog.ademar.org/wp-content/uploads/2011/12/miami-2011.jpg&quot;&gt;&lt;img src=&quot;http://blog.ademar.org/wp-content/uploads/2011/12/miami-2011-420x280.jpg&quot; alt=&quot;Mosaico de fotos da viagem à Miami e Orlando em 2011&quot; title=&quot;Viagem à Miami e Orlando (clique para ampliar)&quot; width=&quot;420&quot; height=&quot;280&quot; class=&quot;size-medium wp-image-1223&quot; /&gt;&lt;/a&gt;&lt;p class=&quot;wp-caption-text&quot;&gt;Mosaico de fotos da viagem à Miami e Orlando&lt;/p&gt;&lt;/div&gt;
&lt;p&gt;A segunda grande novidade foi a mudança no trabalho: após um longo e criterioso processo de entrevistas (~3 meses), consegui uma vaga na empresa que mais admiro, pra trabalhar numa área na qual eu sempre tive muito entusiasmo mas pouca oportunidade: entrei pra &lt;a href=&quot;http://www.redhat.com&quot;&gt;Red Hat&lt;/a&gt; como gerente técnico no time de virtualização (&lt;a href=&quot;http://www.linux-kvm.org/&quot;&gt;kvm&lt;/a&gt; e &lt;a href=&quot;http://qemu.org&quot;&gt;qemu&lt;/a&gt; &amp;#8211; kernel e afins), um time cheio de grandes talentos com foco nos projetos &lt;em&gt;upstream&lt;/em&gt;, um grande desafio. Na Red Hat me senti em casa, como se eu tivesse voltado aos tempos de Conectiva: revi bons e velhos amigos e me identifiquei de imediato com os novos colegas. E no último mês do ano ainda veio mais uma novidade: consegui ser aprovado no processo de seleção do &lt;a href=&quot;http://www.cin.ufpe.br/&quot;&gt;Mestrado em Computação da UFPE/Cin&lt;/a&gt; com uma proposta na área de virtualização.&lt;/p&gt;
&lt;p&gt;A revisão dos objetivos de 2011 ficou assim:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strike&gt;Visitar dois países que eu ainda não conheça;&lt;/strike&gt; &lt;strong&gt;OK&lt;/strong&gt; &amp;#8211; o plano original era ir pra China e Índia, mas os 9 novos países europeus cumprem o objetivo com folga;&lt;/li&gt;
&lt;li&gt;Atualizar a &lt;a href=&quot;http://ademar.org/fotos/&quot;&gt;seção de fotos&lt;/a&gt; do site; &lt;strong&gt;FAIL&lt;/strong&gt; &amp;#8211; sem comentários;&lt;/li&gt;
&lt;li&gt;&lt;strike&gt;Visitar nossos familiares e amigos no sul do Brasil;&lt;/strike&gt; &lt;strong&gt;OK&lt;/strong&gt; &amp;#8211; dava pra fazer melhor, mas Viviane foi pro RS e fomos juntos pra Umuarama &amp;#8211; PR;&lt;/li&gt;
&lt;li&gt;Começar a estudar um novo idioma, junto com a Viviane; &lt;strong&gt;FAIL&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strike&gt;Estudar (formalmente ou não), pois evoluí menos do que esperava em 2010;&lt;/strike&gt; &lt;strong&gt;OK&lt;/strong&gt; &amp;#8211; foquei um pouco nos estudos no final do ano, 2012 com certeza será melhor;&lt;/li&gt;
&lt;li&gt;&lt;strike&gt;Melhorar minha atividade nas &amp;#8220;redes sociais&amp;#8221;, reforçar antigas amizades;&lt;/strike&gt; &lt;strong&gt;OK&lt;/strong&gt; &amp;#8211; acho que posso melhorar, mas estou no caminho certo&amp;#8230;&lt;/li&gt;
&lt;li&gt;Comprar algum tipo de tablet, preferivelmente um que sirva como &lt;em&gt;ebook-reader&lt;/em&gt;; &lt;strong&gt;FAIL&lt;/strong&gt; &amp;#8211; ficou pra 2012, um Kindle está fazendo muita falta.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;2012 será muito intenso e com desafios sem tamanho. Mas já começo realizando o tradicional objetivo de conhecer um novo país todo ano: em janeiro vou pra Israel a trabalho. Dessa vez não farei uma lista de planos específicos. Tenho apenas três grandes objetivos, em ordem de prioridade:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Ser um bom pai pra Sofia e um bom marido pra Viviane nessa nova fase de nossas vidas;&lt;/li&gt;
&lt;li&gt;Ser um bom profissional na Red Hat, cumprindo com as expectativas e superando minhas limitações;&lt;/li&gt;
&lt;li&gt;Conseguir manter um bom ritmo no primeiro ano do mestrado na UFPE/Cin.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;É isso aí, um ótimo 2012 pra todos!&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;&lt;small&gt;&lt;a href=&quot;https://blog.ademar.org/2011/retrospectiva-2011/&quot;&gt;Link Permanente&lt;/a&gt; |
&lt;a href=&quot;https://blog.ademar.org/2011/retrospectiva-2011/#comments&quot;&gt;3 commentários&lt;/a&gt;&lt;br /&gt;
Post tags: &lt;a href=&quot;https://blog.ademar.org/tag/retrospectiva/&quot; rel=&quot;tag&quot;&gt;retrospectiva&lt;/a&gt;&lt;br /&gt;
&lt;/small&gt;&lt;/p&gt;&lt;div class=&quot;yarpp-related-rss&quot;&gt;
&lt;p&gt;Posts possivelmente relacionados:&lt;ol&gt;
&lt;li&gt;&lt;a href=&quot;https://blog.ademar.org/2008/retrospectiva-2007-planos-2008/&quot; rel=&quot;bookmark&quot; title=&quot;Retrospectiva 2007, planos pra 2008&quot;&gt;Retrospectiva 2007, planos pra 2008 &lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://blog.ademar.org/2010/retrospectiva-2010-planos-pra-2011/&quot; rel=&quot;bookmark&quot; title=&quot;Retrospectiva 2010, planos pra 2011&quot;&gt;Retrospectiva 2010, planos pra 2011 &lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://blog.ademar.org/2013/retrospectiva-2012/&quot; rel=&quot;bookmark&quot; title=&quot;Retrospectiva 2012, planos pra 2013&quot;&gt;Retrospectiva 2012, planos pra 2013 &lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;img src=&quot;http://feeds.feedburner.com/~r/blogademar/~4/Z88vLhxlC4M&quot; height=&quot;1&quot; width=&quot;1&quot; alt=&quot;&quot; /&gt;</content:encoded>
	<dc:date>2011-12-31T21:36:29+00:00</dc:date>
</item>
<item rdf:about="http://rsalveti.wordpress.com/?p=317">
	<title>Ricardo Salveti: UDS-P/Linaro Connect Q4.11 and 11.11 cycle</title>
	<link>http://rsalveti.wordpress.com/2011/12/05/uds-plinaro-connect-q4-11-and-11-11-cycle/</link>
	<content:encoded>&lt;p&gt;During the end of October and beginning of November we had the last &lt;a href=&quot;http://connect.linaro.org/events/event/linaro-connect-q411/&quot;&gt;Linaro Connect&lt;/a&gt; for the year. This time we also had it together with the &lt;a href=&quot;http://uds.ubuntu.com/&quot;&gt;Ubuntu Developer Summit&lt;/a&gt;, giving us the opportunity to better discuss the roadmap with both Linaro and the Ubuntu team.&lt;/p&gt;
&lt;p&gt;From the Developer Platform team perspective, we had a quite nice week, with demos happening at Monday and Friday (showing people what we&amp;#8217;ve been working on), and also sharing some great news with the Ubuntu team, now that Mark Shuttleworth &lt;a href=&quot;http://www.markshuttleworth.com/archives/820&quot;&gt;announced&lt;/a&gt; that Ubuntu will go to Tablets, TVs and Phones (and ARM for sure will be a huge part of that).&lt;/p&gt;
&lt;p&gt;Some nice links and videos of what happened during that week (related with our team):&lt;br /&gt;
 * &lt;a href=&quot;http://summit.linaro.org/uds-p/track/linaro-platforms/&quot;&gt;Sessions related with the Developer Platform Team (Ubuntu)&lt;/a&gt;&lt;br /&gt;
 * &lt;a href=&quot;http://www.omgubuntu.co.uk/2011/11/unity-3d-ported-to-arm/&quot;&gt;Linaro Demo: Ubuntu Unity with OpenGL ES on Pandaboard&lt;/a&gt;&lt;br /&gt;
 * &lt;a href=&quot;http://www.youtube.com/watch?v=AD-me0RKsd8&quot;&gt;Linaro Developer Platform Tech Lead Ricardo Salveti Interview at Linaro Connect&lt;/a&gt;&lt;br /&gt;
 * &lt;a href=&quot;http://www.youtube.com/watch?v=829vTyKHrOg&quot;&gt;Linaro Connect Q4.11 &amp;#8211; Ubuntu LEB tutorial&lt;/a&gt;&lt;br /&gt;
 * &lt;a href=&quot;http://www.youtube.com/watch?v=ajNSrQfFcPA&quot;&gt;Linaro Connect Q4.11 &amp;#8211; Interview with Marcin Juszkiewicz&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Linaro 11.11 Release&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Another quite good achievement for us during November was the &lt;a href=&quot;http://www.linaro.org/linaro-blog/2011/11/25/linaro-11-11-released/&quot;&gt;11.11 release&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;During this release we had a quite a few great highlights, including some that we were planning for quite a while already:&lt;br /&gt;
 * &lt;a href=&quot;https://blueprints.launchpad.net/linaro-ubuntu/+spec/cross-build-firefox-chromium-multiarch&quot;&gt;Ability to cross build Firefox using Multiarch&lt;/a&gt;&lt;br /&gt;
 * &lt;a href=&quot;https://blueprints.launchpad.net/u-boot-linaro/+spec/omap4-spl-usb-booting&quot;&gt;OMAP4 SPL USB Booting&lt;/a&gt;, enabling USB boot at Pandaboard&lt;br /&gt;
 * &lt;a href=&quot;https://blueprints.launchpad.net/linaro-ubuntu/+spec/ds5.8-update&quot;&gt;ARM DS-5 support for the 5.8 release&lt;/a&gt;&lt;br /&gt;
 * CI Builds for Linaro GCC both for &lt;a href=&quot;https://blueprints.launchpad.net/linaro-ubuntu/+spec/ci-cross-linaro-gcc&quot;&gt;cross&lt;/a&gt; and &lt;a href=&quot;https://blueprints.launchpad.net/linaro-ubuntu/+spec/ci-native-linaro-gcc&quot;&gt;native&lt;/a&gt;&lt;br /&gt;
 * And a lot of &lt;a href=&quot;https://launchpad.net/linaro-dev-platform/+milestone/11.11&quot;&gt;bug fixes&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Now it&amp;#8217;s time to get ready to develop the blueprints we&amp;#8217;re planning for 11.12, to also make December another great and solid month &lt;span class=&quot;wp-smiley wp-emoji wp-emoji-smile&quot; title=&quot;:-)&quot;&gt;:-)&lt;/span&gt; (will do another post about the 11.12 planning later this one).&lt;/p&gt;&lt;br /&gt;  &lt;a rel=&quot;nofollow&quot; href=&quot;http://feeds.wordpress.com/1.0/gocomments/rsalveti.wordpress.com/317/&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://feeds.wordpress.com/1.0/comments/rsalveti.wordpress.com/317/&quot; /&gt;&lt;/a&gt; &lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://pixel.wp.com/b.gif?host=rsalveti.wordpress.com&amp;blog=905525&amp;post=317&amp;subd=rsalveti&amp;ref=&amp;feed=1&quot; width=&quot;1&quot; height=&quot;1&quot; /&gt;</content:encoded>
	<dc:date>2011-12-05T16:54:33+00:00</dc:date>
	<dc:creator>rsalveti</dc:creator>
</item>
<item rdf:about="http://blog.morpheuz.cc/?p=349">
	<title>Morpheuz: Back to life!</title>
	<link>http://blog.morpheuz.cc/21/11/2011/back-to-life/</link>
	<content:encoded>&lt;p&gt;I am back from my honeymoon and I&amp;#8217;m starting to organize my life again!&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://blog.morpheuz.cc/wp-content/uploads/2011/11/bannersmall.jpg&quot;&gt;&lt;img class=&quot;aligncenter size-medium wp-image-350&quot; title=&quot;Incredible Circus&quot; src=&quot;http://blog.morpheuz.cc/wp-content/uploads/2011/11/bannersmall-300x98.jpg&quot; alt=&quot;Incredible Circus&quot; width=&quot;300&quot; height=&quot;98&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Meanwhile, we finally released a game that I&amp;#8217;m really proud that is called &amp;#8220;Incredible Circus&amp;#8221;. It&amp;#8217;s the kind of game that is really addictive :). In three weeks we achieved 200k downloads on Nokia Store and today is available for the N9. It&amp;#8217;s also a really good showcase for Qt. If you have a Symbian^3 or MeeGo device, just follow &lt;a title=&quot;Incredible Circus&quot; href=&quot;http://store.nokia.com/content/214283&quot;&gt;the link to try the game&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://blog.morpheuz.cc/wp-content/uploads/2011/11/bannerbig.png&quot;&gt;&lt;img class=&quot;aligncenter size-medium wp-image-351&quot; title=&quot;Incredible Circus&quot; src=&quot;http://blog.morpheuz.cc/wp-content/uploads/2011/11/bannerbig-300x85.png&quot; alt=&quot;&quot; width=&quot;300&quot; height=&quot;85&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;You can also check it out on the video below.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Apart from that, I&amp;#8217;m updating my machine and as soon as I have a developer environment again I&amp;#8217;ll start hacking on Plasma again. Probably fixing some bugs, right Aaron? &lt;img src=&quot;http://blog.morpheuz.cc/wp-includes/images/smilies/icon_wink.gif&quot; alt=&quot;;)&quot; class=&quot;wp-smiley&quot; /&gt; &lt;/p&gt;</content:encoded>
	<dc:date>2011-11-21T19:08:59+00:00</dc:date>
</item>
<item rdf:about="http://labs.danilocesar.com/blog/?p=131">
	<title>Danilo Cesar: Prague, Telepathy and HTML5 IM Client</title>
	<link>http://labs.danilocesar.com/blog/2011/11/03/prague-telepathy-and-html-5-im-client/</link>
	<content:encoded>&lt;p&gt;Hey guys!&lt;/p&gt;
&lt;p&gt;Last week I&amp;#8217;ve attended to GStreamerConf and LinuxConf conferences in Prague, and Siraj and I had the honor of having our current project for Collabora exposed on Collabora&amp;#8217;s booth. It shared space with two others amazing &lt;a href=&quot;http://www.collabora.co.uk&quot;&gt;Collabora&lt;/a&gt;&amp;#8216;s demos:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;a href=&quot;http://media-explorer.org/&quot;&gt;Media Explorer&lt;/a&gt; running a Telepathy plug-in, which adds IM and Audio/Video capabilities to the system.&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://mbatle.wordpress.com/2011/11/02/illusions-in-the-web-a-real-time-video-editor-built-in-html5/&quot;&gt;HTML 5 client of a video editor&lt;/a&gt;, using GStreamer Editing Services on top of GtkWebkit.&lt;/li&gt;
&lt;/ol&gt;
&lt;h3&gt;A little bit about Telepathy Webkit Client&lt;/h3&gt;
&lt;p&gt;During the last few weeks I&amp;#8217;ve been working on a Telepathy client, a very special one, written almost only with HTML 5 and Javascript, on top of GTK WebKit and &lt;a href=&quot;http://live.gnome.org/Seed&quot;&gt;Seed&lt;/a&gt;.&lt;br /&gt;
The goal of this project was writing a Telepathy based IM client, to run on top of WebKit, and it should be able do make and receive audio and video calls.&lt;/p&gt;
&lt;h3&gt;GObject introspection magic&lt;/h3&gt;
&lt;p&gt;The first question to be answered was &amp;#8220;How access the Telepathy methods from Javascript?&amp;#8221;&lt;/p&gt;
&lt;p&gt;And the answer was: GIR and &lt;a href=&quot;http://live.gnome.org/Seed&quot;&gt;Seed&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;As all Gnome developers know, GObject introspection (GIR) allows us to access a GObject written in C  from a scriptable language, such as Javascript. So that&amp;#8217;s part of the answer.&lt;/p&gt;
&lt;p&gt;And Seed binds those introspected objects on WebKit JavascriptCore, which is pretty much what we wanted to do.&lt;/p&gt;
&lt;h3&gt;Following a few screen-shots&lt;/h3&gt;
&lt;h4&gt;Contact List&lt;/h4&gt;
&lt;p&gt;Our first goal was to show the Telepathy&amp;#8217;s roaster list on a HTML5 window. For the widgets, we choose to use &lt;a href=&quot;http://joapp.com&quot;&gt;joApp&lt;/a&gt;, which is a quite nice and stable UI library for HTML 5 applications.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://labs.danilocesar.com/blog/wp-content/uploads/2011/11/tp1.png&quot;&gt;&lt;img class=&quot;alignnone size-medium wp-image-139&quot; title=&quot;Telepathy contact list&quot; src=&quot;http://labs.danilocesar.com/blog/wp-content/uploads/2011/11/tp1-208x300.png&quot; alt=&quot;&quot; width=&quot;208&quot; height=&quot;300&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;h4&gt;Chat Window&lt;/h4&gt;
&lt;p&gt;&lt;a href=&quot;http://labs.danilocesar.com/blog/wp-content/uploads/2011/11/tp2.png&quot;&gt;&lt;img class=&quot;alignnone size-medium wp-image-138&quot; title=&quot;Telepathy chat window&quot; src=&quot;http://labs.danilocesar.com/blog/wp-content/uploads/2011/11/tp2-227x300.png&quot; alt=&quot;Telepathy chat window&quot; width=&quot;227&quot; height=&quot;300&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;em&gt;What&amp;#8217;s a IM client without a Chat window, right?!&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;The &amp;#8220;tpwebkit&amp;#8221; application with an opened text channel between two users.&lt;/p&gt;
&lt;h4&gt;Receiving a call&lt;/h4&gt;
&lt;p&gt;&lt;a href=&quot;http://labs.danilocesar.com/blog/wp-content/uploads/2011/11/tp3.png&quot;&gt;&lt;img class=&quot;alignnone size-medium wp-image-137&quot; title=&quot;Receiving a call&quot; src=&quot;http://labs.danilocesar.com/blog/wp-content/uploads/2011/11/tp3-240x300.png&quot; alt=&quot;&quot; width=&quot;240&quot; height=&quot;300&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Telepathy WebKit application acting as a Telepathy approver for audio and video calls&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://labs.danilocesar.com/blog/wp-content/uploads/2011/11/tp4.png&quot;&gt;&lt;img class=&quot;alignnone size-medium wp-image-136&quot; title=&quot;That's me, from the point of view of a camera on another computer&quot; src=&quot;http://labs.danilocesar.com/blog/wp-content/uploads/2011/11/tp4-263x300.png&quot; alt=&quot;&quot; width=&quot;263&quot; height=&quot;300&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;That&amp;#8217;s me, from the point of view of my test machine&amp;#8230;&lt;/p&gt;
&lt;h3&gt;The real thing running&lt;/h3&gt;
&lt;p&gt;If you want to see the real thing running, you can watch this video showing the application during the early development state.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;h3&gt;Conclusions and future work&lt;/h3&gt;
&lt;p&gt;As we can see from now, Telepathy is ready to be use on native and HTML applications.&lt;br /&gt;
I really would like to see the current implementation integrated with the bleeding edge RTC API, which some guys are pushing to WebKit. That would be something really awesome.&lt;/p&gt;
&lt;p&gt;If you want to try it, you can get the &lt;a href=&quot;http://cgit.collabora.com/git/tpwebkit.git/&quot;&gt;code here&lt;/a&gt; and play with it. You&amp;#8217;re also going to need a few special changes on Seed package. Check the linuxconf branch &lt;a href=&quot;https://gitorious.org/~siraj/seed/sirajs-seed/commits/linuxconf&quot;&gt;here&lt;/a&gt;.&lt;br /&gt;
Or, if you use Ubuntu, you can add &lt;a href=&quot;https://launchpad.net/~zdra/+archive/prague-demo&quot;&gt;Xavier&amp;#8217;s PPA&lt;/a&gt; and install the tpwebkit package.&lt;/p&gt;</content:encoded>
	<dc:date>2011-11-03T12:37:40+00:00</dc:date>
</item>
<item rdf:about="http://ianlawrence.info/random-stuff/tangaza-or-announce-in-swahili">
	<title>Ian Lawrence: Tangaza or 'announce' in Swahili</title>
	<link>http://ianlawrence.info/random-stuff/tangaza-or-announce-in-swahili</link>
	<content:encoded>&lt;p&gt;Despite the rapid growth of mobile data and mobile internet, many (most) people in developing countries do not have access to mobile data. For example in Africa, there are around 45 basic mobile subscriptions but only 2 data subscriptions per 100 inhabitants. Peer to peer communication, voice calls, SMS and 'beeping' are the standard communication tools and techniques currently in use.&lt;/p&gt;
&lt;p&gt;The success of Twitter and other group communication tools has been undeniable and the development and introduction of &lt;a href=&quot;http://groupme.com/&quot;&gt;mobile app&lt;/a&gt; based messaging systems remains active. But would it be possible to design a group messaging system for people who only have access to a basic feature phone with standard GSM features available on every mobile phone?&lt;/p&gt;
&lt;p&gt;Tangaza is a mobile phone based group messaging system targeted at moderately low income users. Through the use of missed calls, a basic SMS command set and concise touch tone menu, Tangaza is designed to enable affordable spoken communication among flexible groups of users. Developed in collaboration between Nokia US and African research units, Nokia Tangaza was piloted in Kenya in 2009 and a research paper (.pdf) on this pilot and on Tangaza's design decisions was presented at the &lt;a href=&quot;http://people.csail.mit.edu/ledlie/papers/dev10-billyodero.pdf&quot;&gt;1st Annual Symposium on Computing for Development&lt;/a&gt; in 2010. The software has now been open sourced under the AGPL and I have just submitted an &lt;a href=&quot;http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=645236&quot;&gt;ITP&lt;/a&gt; to the Debian Bug Tracker. We aim to have Tangaza in the next Debian release and the &lt;a href=&quot;http://pkg-voip.alioth.debian.org/&quot;&gt;Debian VOIP team&lt;/a&gt; are helping with this effort.&lt;/p&gt;
&lt;p&gt;Tangaza runs on Linux and you will need to have&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Perl 5&lt;/li&gt;
&lt;li&gt;Python 2.6&lt;/li&gt;
&lt;li&gt;MySQL 5.0&lt;/li&gt;
&lt;li&gt;Django 1.2&lt;/li&gt;
&lt;li&gt;Kannel 1.4.3&lt;/li&gt;
&lt;li&gt;Asterisk 1.6.2&lt;/li&gt;&lt;/ul&gt;
installed on your Debian based system if you want to build Tangaza before it reaches the main repositories . You need to
&lt;pre&gt;git clone https://github.com/tangaza/Tangaza

git checkout -b upstream --track origin/master

(The '--track' option alters your .git/config file and adds a [branch &quot;upstream&quot;] section telling Git where you fetched it from. That means you can later just say &quot;git pull&quot; and you will get both the 'master' and the 'upstream' repository merged into your repository automatically.)

git checkout master

git-buildpackage --git-ignore-new --git-builder=debuild -i.git -I.git -us -uc&lt;/pre&gt;
and install the resulting .deb package
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;During the last development cycle we built Tangaza a web enabled administrative interface in Django where the groups, members and organization information can be modified
&lt;img src=&quot;http://ianlawrence.info/random-stuff/images/groups&quot; /&gt; and the messages (called Tangazo's) can be listened to &lt;img src=&quot;http://ianlawrence.info/random-stuff/images/messages&quot; /&gt; We also wrote some &lt;a href=&quot;http://nora04.nrcc.noklab.com/docs/&quot;&gt;documentation&lt;/a&gt; about the API calls we make available through RPC for developers who want to build applications on top of Tangaza.&lt;/p&gt;
&lt;p&gt;There is some interest in using Tangaza as an agricultural early warning system in East Africa. A  &lt;a href=&quot;http://www.humanitarianinnovation.org/&quot;&gt;Humanitarian Innovation Fund&lt;/a&gt; expression of interest passed through to a call for a full proposal which is pretty exciting both in terms of potential impact and also for the new features which can be developed with increased funding &lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;</content:encoded>
	<dc:date>2011-10-14T13:54:30+00:00</dc:date>
</item>
<item rdf:about="http://blog.morpheuz.cc/?p=336">
	<title>Morpheuz: It has been a while</title>
	<link>http://blog.morpheuz.cc/14/09/2011/it-has-been-a-while/</link>
	<content:encoded>&lt;p&gt;It has been a while since my &lt;a title=&quot;kdeplasma-addons is on git too&quot; href=&quot;http://blog.morpheuz.cc/01/02/2011/kdeplasma-addons-is-on-git-too/&quot;&gt;last post&lt;/a&gt; and a lot happened in the meantime. Just to point a few (in no special order):&lt;/p&gt;
&lt;div&gt;
&lt;ul&gt;
&lt;li&gt;11th February for Nokia;&lt;/li&gt;
&lt;li&gt;Tokamak;&lt;/li&gt;
&lt;li&gt;GSoC;&lt;/li&gt;
&lt;li&gt;Qt Contributor Summit;&lt;/li&gt;
&lt;li&gt;Qt Open Governance announced;&lt;/li&gt;
&lt;li&gt;Desktop Summit;&lt;/li&gt;
&lt;li&gt;Release of N9;&lt;/li&gt;
&lt;li&gt;Google acquired Motorola;&lt;/li&gt;
&lt;li&gt;Plasma Active;&lt;/li&gt;
&lt;li&gt;Netflix in Brazil;&lt;/li&gt;
&lt;li&gt;Use of Tiny Tiny RSS (&lt;a href=&quot;http://rss.morpheuz.cc//backend.php?op=rss&amp;id=-2&amp;view-mode=all_articles&amp;key=a79a73fd84b22edd0dfc33e5c9298276524a39d2&quot;&gt;my share feed&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;&amp;#8230;(many other stuff!)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The sad part though is that I haven&amp;#8217;t been able to contribute much code to KDE lately. Next month I&amp;#8217;m getting married and as you can probably guess, there is a lot of planning going on (and we can&amp;#8217;t forget the famous &amp;#8220;bridezilla&amp;#8221; effect that usually happens with girls before weddings &lt;img src=&quot;http://blog.morpheuz.cc/wp-includes/images/smilies/icon_razz.gif&quot; alt=&quot;:P&quot; class=&quot;wp-smiley&quot; /&gt; &lt;/p&gt;
&lt;p&gt;On the bright side I&amp;#8217;ve been working on awesome projects, trying to eat our own dog food (mainly QML). With these projects we are feeling the pieces of Qt/QML that needs some love and we plan that for the next year we will be able to help the &lt;a title=&quot;Qt Project&quot; href=&quot;http://labs.qt.nokia.com/2011/09/12/qt-project/&quot;&gt;Qt Project&lt;/a&gt; to solve these &lt;del&gt;small&lt;/del&gt; issues that you can only find when you develop real world applications and not developer/designer-wanna-be demos &lt;img src=&quot;http://blog.morpheuz.cc/wp-includes/images/smilies/icon_wink.gif&quot; alt=&quot;;)&quot; class=&quot;wp-smiley&quot; /&gt; &lt;/p&gt;
&lt;p&gt;IMHO that&amp;#8217;s one of the skills that is hard to find today on framework developers: most of them didn&amp;#8217;t contribute much to KDE in the last years nor developed real applications. Because of this sometimes it gets harder for them to understand a use case or a &amp;#8220;complain&amp;#8221; about the technology they develop. I hope that with open governance we can get more help about this (and also use more the rule of the &amp;#8220;3 examples&amp;#8221; before adding new APIs).&lt;/p&gt;
&lt;p&gt;I&amp;#8217;ve been following closely the development of Plasma Active and the rest of KDE. I still have one item on my TODO list (related to one of our scripts that get the content of qml files that need translation) that I promised to tsdgeos that I would fix ASAP but I just didn&amp;#8217;t have the time unfortunately &lt;img src=&quot;http://blog.morpheuz.cc/wp-includes/images/smilies/icon_sad.gif&quot; alt=&quot;:(&quot; class=&quot;wp-smiley&quot; /&gt;  . November seems the month that I will be able to get back to KDE development (after the honeymoon!!).&lt;/p&gt;
&lt;p&gt;Well, I think that&amp;#8217;s it. I just wanted to make a simple blog post and update my KDE friends &lt;img src=&quot;http://blog.morpheuz.cc/wp-includes/images/smilies/icon_smile.gif&quot; alt=&quot;:)&quot; class=&quot;wp-smiley&quot; /&gt; &lt;/p&gt;
&lt;/div&gt;</content:encoded>
	<dc:date>2011-09-14T12:24:44+00:00</dc:date>
</item>
<item rdf:about="http://savago.wordpress.com/?p=444">
	<title>Adenilson Cavalcanti: CellarDoor in German plus Debian package</title>
	<link>http://savago.wordpress.com/2011/08/17/cellardoor-in-german-plus-debian-package/</link>
	<content:encoded>&lt;p&gt;Dear friends&lt;/p&gt;
&lt;p&gt;Some quick updates on CellarDoor are due. Since last week, it has debian packaging support in the buildsystem, contributed by Milton Soares.&lt;/p&gt;
&lt;p&gt;Simply run &amp;#8216;make deb&amp;#8217; and you are set: a nice debian package is generated at end.&lt;/p&gt;
&lt;p&gt;Next, Adriano Cavalcanti contributed another translation to CellarDoor, German:&lt;br /&gt;
&lt;a href=&quot;http://savago.files.wordpress.com/2011/08/cellar_de.png&quot;&gt;&lt;img class=&quot;aligncenter size-medium wp-image-451&quot; title=&quot;cellar_de&quot; src=&quot;http://savago.files.wordpress.com/2011/08/cellar_de.png?w=169&amp;h=300&quot; alt=&quot;&quot; width=&quot;169&quot; height=&quot;300&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Thanks to the fact that German has some bigger than average words, it will require some adjustment in some parts of the UI, but so far so good! As soon I finish some missing features, I&amp;#8217;m planning to make a &amp;#8216;non-hackers&amp;#8217; release.&lt;/p&gt;
&lt;p&gt;Currently CellarDoor is available in:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;English&lt;/li&gt;
&lt;li&gt;Brazilian Portuguese&lt;/li&gt;
&lt;li&gt;Italian&lt;/li&gt;
&lt;li&gt;German&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Do you known French or Spanish?&lt;br /&gt; &lt;span class=&quot;wp-smiley wp-emoji wp-emoji-smile&quot; title=&quot;:-)&quot;&gt;:-)&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;  &lt;a rel=&quot;nofollow&quot; href=&quot;http://feeds.wordpress.com/1.0/gocomments/savago.wordpress.com/444/&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://feeds.wordpress.com/1.0/comments/savago.wordpress.com/444/&quot; /&gt;&lt;/a&gt; &lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://pixel.wp.com/b.gif?host=savago.wordpress.com&amp;blog=8919535&amp;post=444&amp;subd=savago&amp;ref=&amp;feed=1&quot; width=&quot;1&quot; height=&quot;1&quot; /&gt;</content:encoded>
	<dc:date>2011-08-17T01:23:10+00:00</dc:date>
	<dc:creator>savago</dc:creator>
</item>
<item rdf:about="http://savago.wordpress.com/?p=414">
	<title>Adenilson Cavalcanti: CellarDoor got its second translation: Italian!</title>
	<link>http://savago.wordpress.com/2011/08/08/cellardoor-got-its-second-translation-italian/</link>
	<content:encoded>&lt;p&gt;Friends&lt;/p&gt;
&lt;p&gt;Just 1 day after blogging about my pet project CellarDoor, I was contacted by Francesco Frassinelli asking about how to make translations.&lt;/p&gt;
&lt;p&gt;The result in the next day can be checked below:&lt;br /&gt;
&lt;a href=&quot;http://savago.files.wordpress.com/2011/08/cellar_italian2.png&quot;&gt;&lt;img src=&quot;http://savago.files.wordpress.com/2011/08/cellar_italian2.png?w=169&amp;h=300&quot; alt=&quot;&quot; title=&quot;cellar_italian2&quot; width=&quot;169&quot; height=&quot;300&quot; class=&quot;aligncenter size-medium wp-image-442&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Of course there are some places in the UI that we will need to make minor adjustments, but it certainly is progressing really fast (except for minor UI code glitches, the Italian translation is done).&lt;/p&gt;
&lt;p&gt;Do you speak German or French? Want to contribute to OSS/Freesoftware? Let me known.&lt;br /&gt; &lt;span class=&quot;wp-smiley wp-emoji wp-emoji-smile&quot; title=&quot;:-)&quot;&gt;:-)&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;  &lt;a rel=&quot;nofollow&quot; href=&quot;http://feeds.wordpress.com/1.0/gocomments/savago.wordpress.com/414/&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://feeds.wordpress.com/1.0/comments/savago.wordpress.com/414/&quot; /&gt;&lt;/a&gt; &lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://pixel.wp.com/b.gif?host=savago.wordpress.com&amp;blog=8919535&amp;post=414&amp;subd=savago&amp;ref=&amp;feed=1&quot; width=&quot;1&quot; height=&quot;1&quot; /&gt;</content:encoded>
	<dc:date>2011-08-08T14:16:35+00:00</dc:date>
	<dc:creator>savago</dc:creator>
</item>
<item rdf:about="http://savago.wordpress.com/?p=415">
	<title>Adenilson Cavalcanti: Presenting CellarDoor</title>
	<link>http://savago.wordpress.com/2011/08/06/presenting-cellardoor/</link>
	<content:encoded>&lt;p&gt;Last January I was talking with my friend Wilson Prata about applications. We have partnered a couple of years ago when creating &lt;a href=&quot;http://amora.googlecode.com&quot;&gt;amora&lt;/a&gt; (which by the way needs some care urgently, but this is another matter) and he presented to me a concept for a nice and cool new app: CellarDoor.&lt;/p&gt;
&lt;p&gt;What is CellaDoor? Well, it is a wine app. Have you ever started a conversation with someone that also appreciate wines and then failed when trying to remember the name of a good wine you tasted a couple of months ago?&lt;/p&gt;
&lt;p&gt;Or what about easily exchanging a wine recommendation? Trying to keep notes in a restaurant napkin is not really much effective.&lt;/p&gt;
&lt;p&gt;Trying to address this and other user cases, I started to work in the mockups that he had at time. A great UX designer once taught me the value of close cooperation between programmers X designers to create something that looks good and performs well (and I honestly believe that the best way to create an app is to have at least one designer aboard since the very beginning). This is a different approach than the traditional hack-hack-hack then later ask a designer for some cute icons which is, with some exceptions, the rule in OSS/Freesoftware world.&lt;/p&gt;
&lt;p&gt;Unfortunately, I lacked enough free time to progress quickly, but I believe that the app has progressed well enough for a public release. You can checkout the &lt;a title=&quot;CellaDoor's project page&quot; href=&quot;http://cellardoor.googlecode.com&quot; target=&quot;_blank&quot;&gt;project&amp;#8217;s webpage&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;So, what are the current features? Here they are:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;good looking UI with nice usability&lt;/li&gt;
&lt;li&gt;create a wine card with basic information (year, name, vineyard, etc)&lt;/li&gt;
&lt;li&gt;filter by wine type (e.g. red, white, other)&lt;/li&gt;
&lt;li&gt;persistence of data in a sqlite database (which by the way you can edit in the desktop)&lt;/li&gt;
&lt;li&gt;Supported platforms: Linux, OSX, Windows 7, Symbian 5th and 3 (e.g N8, N5800, etc)&lt;/li&gt;
&lt;li&gt;snap a photo of the bottle/cork in supported platforms (Linux, Symbian). Persistence of this photo is my todo list (hey, I didn&amp;#8217;t say that the app is completely done!).&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;How it looks like? Check it (running in OSX 10.6):&lt;/div&gt;
&lt;div&gt;&lt;a href=&quot;http://savago.files.wordpress.com/2011/08/osx.png&quot;&gt;&lt;img class=&quot;aligncenter size-full wp-image-421&quot; title=&quot;osx&quot; src=&quot;http://savago.files.wordpress.com/2011/08/osx.png?w=455&quot; alt=&quot;&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;p&gt;&lt;/p&gt;
&lt;div&gt;== What about the technology? ==&lt;/div&gt;
&lt;p&gt;The magic to support such varying OSes (Linux, Window, OSX, Symbian), form factors (Mobile, Netbook, Desktop) and resolutions (from 360&amp;#215;640, ranging in 1024&amp;#215;800 and up) is that I used Qt/QML for the UI. At time that I started, Qt Components were not ready yet, so I got to implement my own (probably buggy) widgets like a combobox (based in joint work with my other friend Ricardo Sato) and a calendar widget (coded together with my friend Igor Trindade), this last widget deserves to be pictured bellow:&lt;/p&gt;
&lt;div&gt;&lt;a href=&quot;http://savago.files.wordpress.com/2011/08/calendar_win7.png&quot;&gt;&lt;img class=&quot;aligncenter size-full wp-image-423&quot; title=&quot;calendar_win7&quot; src=&quot;http://savago.files.wordpress.com/2011/08/calendar_win7.png?w=455&quot; alt=&quot;&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;p&gt;&lt;/p&gt;
&lt;div&gt;== What is next? ==&lt;/div&gt;
&lt;p&gt;A long backlog indeed waits in the issue tracker of the project. Between those, I believe that next steps should be:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Packaging: for symbian I have it done (self signed), Window7 I played with WiX to create an installer but I need help for testing. OSX packaging (.dmg) and rpm/deb help would be greatly appreciated;&lt;/li&gt;
&lt;li&gt;Translation: it currently supports English and Brazilian Portuguese. I believe it would be cool to support other languages (French, Italian, German);&lt;/li&gt;
&lt;li&gt;Coding: there are several features that would be awesome to have, if you are interested, let me known.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;So, since ATM there aren&amp;#8217;t public packages yet, I guess this is a &amp;#8216;hacker&amp;#8217;s only release&amp;#8217;. What you need to compile it is Qt 4.7.x and if in Linux, Qt Mobility 1.1.&lt;/p&gt;
&lt;p&gt;Concerning the license, it is good and old GPL v2 code with CC non-commercial for the artwork.&lt;/p&gt;&lt;br /&gt;  &lt;a rel=&quot;nofollow&quot; href=&quot;http://feeds.wordpress.com/1.0/gocomments/savago.wordpress.com/415/&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://feeds.wordpress.com/1.0/comments/savago.wordpress.com/415/&quot; /&gt;&lt;/a&gt; &lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://pixel.wp.com/b.gif?host=savago.wordpress.com&amp;blog=8919535&amp;post=415&amp;subd=savago&amp;ref=&amp;feed=1&quot; width=&quot;1&quot; height=&quot;1&quot; /&gt;</content:encoded>
	<dc:date>2011-08-06T14:01:43+00:00</dc:date>
	<dc:creator>savago</dc:creator>
</item>
<item rdf:about="http://savago.wordpress.com/?p=372">
	<title>Adenilson Cavalcanti: Long time no see you</title>
	<link>http://savago.wordpress.com/2011/08/05/long-time-no-see-you/</link>
	<content:encoded>&lt;p&gt;It is being almost one year without posting in my blog&amp;#8230; What else to say, besides I have being busy? Since my last post, I have:&lt;/p&gt;
&lt;p&gt;a) Trying to be a not so &lt;a href=&quot;http://savago.files.wordpress.com/2011/08/father1.jpg&quot;&gt;lousy&lt;/a&gt; father;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://savago.files.wordpress.com/2011/08/father2.jpg&quot;&gt;&lt;img class=&quot;aligncenter size-full wp-image-376&quot; title=&quot;father2&quot; src=&quot;http://savago.files.wordpress.com/2011/08/father2.jpg?w=455&amp;h=341&quot; alt=&quot;&quot; width=&quot;455&quot; height=&quot;341&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;b) Led 2 teams in 2 different projects at same time at OpenBossa (both non-oss, targeting Symbian and Maemo respectively);&lt;/p&gt;
&lt;p&gt;c) Visited Boston, Brussels, &lt;a href=&quot;http://savago.files.wordpress.com/2011/08/miami.jpg&quot;&gt;Miami&lt;/a&gt;, &lt;a href=&quot;http://savago.files.wordpress.com/2011/08/london.jpg&quot;&gt;London&lt;/a&gt;,  Bristol, Jericoacoara;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://savago.files.wordpress.com/2011/08/jeri1.jpg&quot;&gt;&lt;img class=&quot;aligncenter size-full wp-image-382&quot; title=&quot;jeri1&quot; src=&quot;http://savago.files.wordpress.com/2011/08/jeri1.jpg?w=455&amp;h=341&quot; alt=&quot;&quot; width=&quot;455&quot; height=&quot;341&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;d) Improving my old motorcycle with new accessories;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://savago.files.wordpress.com/2011/08/motorcycle.jpg&quot;&gt;&lt;img class=&quot;aligncenter size-full wp-image-386&quot; title=&quot;motorcycle&quot; src=&quot;http://savago.files.wordpress.com/2011/08/motorcycle.jpg?w=455&amp;h=341&quot; alt=&quot;&quot; width=&quot;455&quot; height=&quot;341&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;e) Bought a Brazilian off road &amp;#8220;car&amp;#8221; and travelled through the &lt;a href=&quot;http://savago.files.wordpress.com/2011/08/travel_big.png&quot;&gt;country side&lt;/a&gt;;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://savago.files.wordpress.com/2011/08/troller.jpg&quot;&gt;&lt;img class=&quot;aligncenter size-full wp-image-389&quot; title=&quot;troller&quot; src=&quot;http://savago.files.wordpress.com/2011/08/troller.jpg?w=455&amp;h=341&quot; alt=&quot;&quot; width=&quot;455&quot; height=&quot;341&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;f) Moved to a new apartment, with space for a &lt;a href=&quot;http://savago.files.wordpress.com/2011/08/office.jpg&quot;&gt;small office&lt;/a&gt;;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://savago.files.wordpress.com/2011/08/office_new.jpg&quot;&gt;&lt;img class=&quot;aligncenter size-full wp-image-395&quot; title=&quot;office_new&quot; src=&quot;http://savago.files.wordpress.com/2011/08/office_new.jpg?w=455&amp;h=606&quot; alt=&quot;&quot; width=&quot;455&quot; height=&quot;606&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;g) Since just motorcycling is not enough, tried some &lt;a href=&quot;http://savago.files.wordpress.com/2011/08/hanglider.jpg&quot;&gt;new things&lt;/a&gt;:&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://savago.files.wordpress.com/2011/08/hafting.jpg&quot;&gt;&lt;img class=&quot;aligncenter size-full wp-image-401&quot; title=&quot;hafting&quot; src=&quot;http://savago.files.wordpress.com/2011/08/hafting.jpg?w=455&amp;h=303&quot; alt=&quot;&quot; width=&quot;455&quot; height=&quot;303&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;h) After learning QML, decided to write a new pet project (details in the next post!)&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://savago.files.wordpress.com/2011/08/splash.png&quot;&gt;&lt;img class=&quot;aligncenter size-full wp-image-407&quot; title=&quot;splash&quot; src=&quot;http://savago.files.wordpress.com/2011/08/splash.png?w=455&quot; alt=&quot;&quot; /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;i) Reviewing and merging several patches in libgcal (news soon!)&lt;/p&gt;
&lt;p&gt;And probably some other stuff that I plainly forgot. Now, I&amp;#8217;m planning to post once in a while to not let my blog to collect dust&amp;#8230; after all, like I said way back in September 2009: &amp;#8220;&amp;#8230; having a half-alive, half-dead, zoombie-like blog is worst than having no blog at all.&amp;#8221;.&lt;/p&gt;&lt;br /&gt;  &lt;a rel=&quot;nofollow&quot; href=&quot;http://feeds.wordpress.com/1.0/gocomments/savago.wordpress.com/372/&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://feeds.wordpress.com/1.0/comments/savago.wordpress.com/372/&quot; /&gt;&lt;/a&gt; &lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://pixel.wp.com/b.gif?host=savago.wordpress.com&amp;blog=8919535&amp;post=372&amp;subd=savago&amp;ref=&amp;feed=1&quot; width=&quot;1&quot; height=&quot;1&quot; /&gt;</content:encoded>
	<dc:date>2011-08-05T22:44:29+00:00</dc:date>
	<dc:creator>savago</dc:creator>
</item>
<item rdf:about="http://rsalveti.wordpress.com/?p=300">
	<title>Ricardo Salveti: launchpadlib: creating a changelog for a PPA</title>
	<link>http://rsalveti.wordpress.com/2011/07/19/launchpadlib-creating-a-changelog-for-a-ppa/</link>
	<content:encoded>&lt;p&gt;As at Linaro we usually work with many PPAs over the releases, there was a need to generate a proper changelog for a PPA, in a way we could know what packages got changed before doing the release.&lt;/p&gt;
&lt;p&gt;At first I thought I could just parse the repository metadata (as a PPA is nothing more than a debian repository), but then I realized I could just use the awesome (yes, &lt;strong&gt;*awesome*&lt;/strong&gt;) launchpadlib, if it had a way to get the data I needed.&lt;/p&gt;
&lt;p&gt;So I called the launchpadlib master I know (&lt;a href=&quot;http://ursinha.net/&quot; title=&quot;Ursinha&quot;&gt;Ursinha&lt;/a&gt;), and in 15 minutes we saw that we could use it to parse the &amp;#8220;.changes&amp;#8221; file, and from there get the data I needed. As Launchpad stores the PPA packages publishing history, it&amp;#8217;s quite easy to get all the changes over period of time.&lt;/p&gt;
&lt;p&gt;A few minutes later (after also noticing that there&amp;#8217;s a python-debian module to parse the changes file), I created the first version of the &lt;strong&gt;generate-ppa-changelog.py&lt;/strong&gt; script, that does exactly what I needed, and with just a few python lines &lt;span class=&quot;wp-smiley wp-emoji wp-emoji-smile&quot; title=&quot;:-)&quot;&gt;:-)&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Here&amp;#8217;s the link: &lt;a href=&quot;http://bazaar.launchpad.net/~rsalveti/+junk/launchpad/view/head:/generate-ppa-changelog.py&quot; title=&quot;http://bazaar.launchpad.net/~rsalveti/+junk/launchpad/view/head:/generate-ppa-changelog.py&quot;&gt;http://bazaar.launchpad.net/~rsalveti/+junk/launchpad/view/head:/generate-ppa-changelog.py&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Usage:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;
rsalveti@evatp:~/projects/launchpad/scripts$ python generate-ppa-changelog.py -h&lt;br /&gt;
usage: generate-ppa-changelog.py [-h] [-d YYYYMMDD] [-s SERIES] -t TEAM&lt;br /&gt;
                                 [-p PPA] [&amp;#8211;version]&lt;/p&gt;
&lt;p&gt;Print Changelog for a PPA&lt;/p&gt;
&lt;p&gt;optional arguments:&lt;br /&gt;
  -h, &amp;#8211;help            show this help message and exit&lt;br /&gt;
  -d YYYYMMDD, &amp;#8211;date YYYYMMDD&lt;br /&gt;
                        start date to probe for changes&lt;br /&gt;
  -s SERIES, &amp;#8211;series SERIES&lt;br /&gt;
                        ubuntu series to look for changes (default: natty)&lt;br /&gt;
  -t TEAM, &amp;#8211;team TEAM  launchpad team that owns the PPA&lt;br /&gt;
  -p PPA, &amp;#8211;ppa PPA     ppa name to probe the changelog (default: first PPA)&lt;br /&gt;
  &amp;#8211;version             show program&amp;#8217;s version number and exit&lt;/p&gt;
&lt;p&gt;If no argument is given, it will probe all the changes for the default series.
&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;Output Example:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;
rsalveti@evatp:~/projects/launchpad/scripts$ python generate-ppa-changelog.py -t linaro-maintainers -p overlay -s natty -d 20110701&lt;br /&gt;
Changelog for linaro-maintainers&amp;#8217;s overlay PPA (series natty) since 2011-07-01 00:00:00&lt;/p&gt;
&lt;p&gt; base-files (5.0.0ubuntu28linaro3) natty; urgency=low&lt;/p&gt;
&lt;p&gt;   * Updating Linaro LEB version to 11.07 (development branch)&lt;/p&gt;
&lt;p&gt;  &amp;#8212; Ricardo Salveti de Araujo   Fri, 15 Jul 2011 04:19:40 -0300&lt;/p&gt;
&lt;p&gt; libjpeg-turbo (1.1.1-1inaro2) natty; urgency=low&lt;/p&gt;
&lt;p&gt;   * release&lt;br /&gt;
   * add timestamp code to cjpeg.c&lt;br /&gt;
   * default cjpeg.c and djpeg.c timestamp code to off&lt;/p&gt;
&lt;p&gt;  &amp;#8212; Tom Gall   Mon, 11 Jul 2011 20:32:23 +0000&lt;/p&gt;
&lt;p&gt; linaro-meta (017) natty; urgency=low&lt;/p&gt;
&lt;p&gt;   * Refreshed dependencies&lt;br /&gt;
   * Added libjpeg-turbo62 to linaro-alip, linaro-graphical-engineering,&lt;br /&gt;
     linaro-multimedia-engineering, linaro-ubuntu-desktop&lt;/p&gt;
&lt;p&gt;  &amp;#8212; Tom Gall   Wed, 13 Jul 2011 15:41:29 +0000&lt;/p&gt;
&lt;p&gt; u-boot-linaro (2011.07.1-0ubuntu1~natty1) natty; urgency=low&lt;/p&gt;
&lt;p&gt;   * New upstream 2011.07.1 which includes&lt;br /&gt;
      &amp;#8211; PXE FDT fix from previous ubuntu release so patch has been removed&lt;br /&gt;
      &amp;#8211; Added missing PXE env vars (LP: #808815)&lt;br /&gt;
      &amp;#8211; Generated unique usbethaddr (LP: #809015)&lt;br /&gt;
      &amp;#8211; Modify pxe command to look for usbethaddr if ethaddr is NULL&lt;/p&gt;
&lt;p&gt;  &amp;#8212; John Rigby   Wed, 13 Jul 2011 23:31:39 -0600&lt;/p&gt;
&lt;p&gt; x-loader (1.5.1+git20110715+fca7cd2-1ubuntu1~natty1) natty; urgency=low&lt;/p&gt;
&lt;p&gt;   * New upstream release&lt;br /&gt;
     &amp;#8211; several fixes for panda and igep&lt;br /&gt;
     &amp;#8211; OMAP3 code cleanup&lt;br /&gt;
     &amp;#8211; Beagle Rev C5 support&lt;br /&gt;
     &amp;#8211; Support for IGEPv3 board&lt;/p&gt;
&lt;p&gt;  &amp;#8212; Ricardo Salveti de Araujo   Fri, 15 Jul 2011 05:55:09 -0300&lt;/p&gt;
&lt;p&gt; x-loader (1.5.0+git20110714+cdc887b-1ubuntu1~natty1) natty; urgency=low&lt;/p&gt;
&lt;p&gt;   * New upstream release&lt;br /&gt;
     &amp;#8211; Adding support for IGEPv3 board&lt;br /&gt;
   * debian/patches/01-Beagle-Rev-C5-support.patch:&lt;br /&gt;
     &amp;#8211; Adding support for the new Beagle C5&lt;/p&gt;
&lt;p&gt;  &amp;#8212; Ricardo Salveti de Araujo   Fri, 15 Jul 2011 02:36:58 -0300
&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;And now we can just generate the proper changelog anytime we want to do a call for testing or a Linaro Ubuntu release &lt;span class=&quot;wp-smiley wp-emoji wp-emoji-smile&quot; title=&quot;:-)&quot;&gt;:-)&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;  &lt;a rel=&quot;nofollow&quot; href=&quot;http://feeds.wordpress.com/1.0/gocomments/rsalveti.wordpress.com/300/&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://feeds.wordpress.com/1.0/comments/rsalveti.wordpress.com/300/&quot; /&gt;&lt;/a&gt; &lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://pixel.wp.com/b.gif?host=rsalveti.wordpress.com&amp;blog=905525&amp;post=300&amp;subd=rsalveti&amp;ref=&amp;feed=1&quot; width=&quot;1&quot; height=&quot;1&quot; /&gt;</content:encoded>
	<dc:date>2011-07-19T03:34:58+00:00</dc:date>
	<dc:creator>rsalveti</dc:creator>
</item>
<item rdf:about="http://rsalveti.wordpress.com/?p=266">
	<title>Ricardo Salveti: Net booting with TFTP and PXE with Pandaboard</title>
	<link>http://rsalveti.wordpress.com/2011/07/11/net-booting-with-tftp-and-pxe-with-pandaboard/</link>
	<content:encoded>&lt;p&gt;Over the past month I&amp;#8217;ve being working with John Rigby to integrate the SMSC95XX and OMAP4 EHCI patches into Linaro U-Boot, so we could deliver the network booting feature for people using Pandaboards.&lt;/p&gt;
&lt;p&gt;Those patches are published at the U-Boot mailing list, but still as a working in progress. While we work helping the original developers to get the patches accepted upstream, we also want to deliver the functionality for our users, so all those patches are now integrated at the Linaro U-Boot tree.&lt;/p&gt;
&lt;p&gt;You can check the patches by going at &lt;a href=&quot;http://git.linaro.org/gitweb?p=boot/u-boot-linaro-stable.git;a=shortlog&quot;&gt;http://git.linaro.org/gitweb?p=boot/u-boot-linaro-stable.git;a=shortlog&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Testing with Pandaboard&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;To make it work properly, besides using Linaro U-Boot you&amp;#8217;ll also need to use the upstream X-Loader tree, with one additional patch that&amp;#8217;s not yet merged. You can clone the upstream tree from &lt;a href=&quot;http://gitorious.org/x-loader/x-loader&quot;&gt;http://gitorious.org/x-loader/x-loader&lt;/a&gt;, then just apply the patch &lt;a href=&quot;http://people.canonical.com/~rsalveti/pxe/0001-omap4-pandaboard-ehci-fref_clkout-per-board-revision.patch&quot;&gt;http://people.canonical.com/~rsalveti/pxe/0001-omap4-pandaboard-ehci-fref_clkout-per-board-revision.patch&lt;/a&gt; and build for the Pandaboard target.&lt;/p&gt;
&lt;p&gt;If you just want to test without building your own X-Loader and U-Boot, you can just grab both files from  http://people.canonical.com/~rsalveti:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;X-Loader: &lt;a href=&quot;http://people.canonical.com/~rsalveti/pxe/MLO&quot;&gt;http://people.canonical.com/~rsalveti/pxe/MLO&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;U-Boot: &lt;a href=&quot;http://people.canonical.com/~rsalveti/pxe/3/u-boot.bin&quot;&gt;http://people.canonical.com/~rsalveti/pxe/3/u-boot.bin&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Building your TFTP + DHCP server for PXE&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;To build your TFTP + DCHP server just follow the instructions described at &lt;a href=&quot;https://help.ubuntu.com/community/Desktop/PXE&quot;&gt;https://help.ubuntu.com/community/Desktop/PXE&lt;/a&gt;. Don&amp;#8217;t worry about the &amp;#8216;filename &amp;#8220;pxelinux.0&amp;#8243;;&amp;#8217; line at the dhcpd.conf file, you can remove it.&lt;/p&gt;
&lt;p&gt;Then just create your PXE config file at the right place:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;
$ cat /tftpboot/pxelinux.cfg/0A2A2B0A&lt;br /&gt;
default panda-natty&lt;br /&gt;
prompt 0&lt;br /&gt;
timeout 3&lt;/p&gt;
&lt;p&gt;label panda-natty&lt;br /&gt;
kernel panda/uImage&lt;br /&gt;
append console=ttyO2,115200n8 root=/dev/mmcblk0p2 ro fixrtc vram=48M omapfb.vram=0:24M mem=1G@0x80000000 text earlyprintk=ttyO2&lt;br /&gt;
initrd panda/uInitrd
&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;PXE Booting&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;With the proper X-Loader and U-Boot files in place (at your first SD card partition), and with the TFTP + DHCP server also properly installed, you can just jump and try TFTP/PXE boot.&lt;/p&gt;
&lt;p&gt;Stop the U-Boot autoload and call the following commands:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;setenv pxecfg_ram 0x88000000: location in RAM to load the pxecfg file&lt;/li&gt;
&lt;li&gt;setenv kernel_ram 0x80000000: location in RAM to load the kernel&lt;/li&gt;
&lt;li&gt;setenv initrd_ram 0x81600000: location in RAM to load the initrd&lt;/li&gt;
&lt;li&gt;setenv autoload no: disable autoload while calling bootp (so you can just set up your network without autoboot)&lt;/li&gt;
&lt;li&gt;usb start: start USB and enables the SMSC95xx ethernet interface&lt;/li&gt;
&lt;li&gt;bootp: initialize the network, probing the ip address settings from your DHCP server&lt;/li&gt;
&lt;li&gt;pxecfg get: probe the pxecfg config file&lt;/li&gt;
&lt;li&gt;pxecfg boot: boot &lt;span class=&quot;wp-smiley wp-emoji wp-emoji-smile&quot; title=&quot;:-)&quot;&gt;:-)&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;You should get a similar output as:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;
Texas Instruments X-Loader 1.5.0 (Jul 11 2011 &amp;#8211; 07:52:49)&lt;br /&gt;
Reading boot sector&lt;br /&gt;
Loading u-boot.bin from mmc&lt;/p&gt;
&lt;p&gt;U-Boot 2011.06 (Jul 11 2011 &amp;#8211; 02:49:51)&lt;/p&gt;
&lt;p&gt;CPU  : OMAP4430&lt;br /&gt;
Board: OMAP4 Panda&lt;br /&gt;
I2C:   ready&lt;br /&gt;
DRAM:  1 GiB&lt;br /&gt;
MMC:   OMAP SD/MMC: 0&lt;br /&gt;
Using default environment&lt;/p&gt;
&lt;p&gt;In:    serial&lt;br /&gt;
Out:   serial&lt;br /&gt;
Err:   serial&lt;br /&gt;
Net:   No ethernet found.&lt;br /&gt;
Hit any key to stop autoboot:  0&lt;br /&gt;
Panda # setenv pxecfg_ram 0x88000000&lt;br /&gt;
Panda # setenv kernel_ram 0x80000000&lt;br /&gt;
Panda # setenv initrd_ram 0x81600000&lt;br /&gt;
Panda # setenv autoload no&lt;br /&gt;
Panda # usb start&lt;br /&gt;
(Re)start USB&amp;#8230;&lt;br /&gt;
USB:   Register 1313 NbrPorts 3&lt;br /&gt;
USB EHCI 1.00&lt;br /&gt;
scanning bus for devices&amp;#8230; The request port(2) is not configured&lt;br /&gt;
EHCI timed out on TD &amp;#8211; token=0x80008c80&lt;br /&gt;
The request port(2) is not configured&lt;br /&gt;
4 USB Device(s) found&lt;br /&gt;
       scanning bus for storage devices&amp;#8230; 0 Storage Device(s) found&lt;br /&gt;
       scanning bus for ethernet devices&amp;#8230; 1 Ethernet Device(s) found&lt;br /&gt;
Panda # bootp&lt;br /&gt;
Waiting for Ethernet connection&amp;#8230; done.&lt;br /&gt;
BOOTP broadcast 1&lt;br /&gt;
DHCP client bound to address 10.42.43.10&lt;br /&gt;
Panda # pxecfg get&lt;br /&gt;
missing environment variable: pxeuuid&lt;br /&gt;
missing environment variable: ethaddr&lt;br /&gt;
Retreiving file: pxelinux.cfg/0A2A2B0A&lt;br /&gt;
Waiting for Ethernet connection&amp;#8230; done.&lt;br /&gt;
Using sms0 device&lt;br /&gt;
TFTP from server 10.42.43.1; our IP address is 10.42.43.10&lt;br /&gt;
Filename &amp;#8216;pxelinux.cfg/0A2A2B0A&amp;#8217;.&lt;br /&gt;
Load address: 0x88000000&lt;br /&gt;
Loading: #&lt;br /&gt;
done&lt;br /&gt;
Bytes transferred = 239 (ef hex)&lt;br /&gt;
Config file found&lt;br /&gt;
Panda # pxecfg boot&lt;br /&gt;
Hit any key to stop autoboot:  0&lt;br /&gt;
Label: panda-natty&lt;br /&gt;
        kernel: panda/uImage&lt;br /&gt;
        append: console=ttyO2,115200n8 root=/dev/mmcblk0p2 ro fixrtc vram=48M omapfb.vram=0:24M mem=1G@0x80000000 text earlyprintk=ttyO2&lt;br /&gt;
        initrd: panda/uInitrd&lt;br /&gt;
Retreiving file: panda/uInitrd&lt;br /&gt;
Waiting for Ethernet connection&amp;#8230; done.&lt;br /&gt;
Using sms0 device&lt;br /&gt;
TFTP from server 10.42.43.1; our IP address is 10.42.43.10&lt;br /&gt;
Filename &amp;#8216;panda/uInitrd&amp;#8217;.&lt;br /&gt;
Load address: 0x81600000&lt;br /&gt;
Loading: #################################################################&lt;br /&gt;
         #################################################################&lt;br /&gt;
         #################################################################&lt;br /&gt;
         #################################################################&lt;br /&gt;
         ############&lt;br /&gt;
done&lt;br /&gt;
Bytes transferred = 3982715 (3cc57b hex)&lt;br /&gt;
Retreiving file: panda/uImage&lt;br /&gt;
Waiting for Ethernet connection&amp;#8230; done.&lt;br /&gt;
Using sms0 device&lt;br /&gt;
TFTP from server 10.42.43.1; our IP address is 10.42.43.10&lt;br /&gt;
Filename &amp;#8216;panda/uImage&amp;#8217;.&lt;br /&gt;
Load address: 0x80000000&lt;br /&gt;
Loading: #################################################################&lt;br /&gt;
         #################################################################&lt;br /&gt;
         #################################################################&lt;br /&gt;
         #################################################################&lt;br /&gt;
         #########################&lt;br /&gt;
done&lt;br /&gt;
Bytes transferred = 4174480 (3fb290 hex)&lt;br /&gt;
## Booting kernel from Legacy Image at 80000000 &amp;#8230;&lt;br /&gt;
   Image Name:   Ubuntu Kernel&lt;br /&gt;
   Image Type:   ARM Linux Kernel Image (uncompressed)&lt;br /&gt;
   Data Size:    4174416 Bytes = 4 MiB&lt;br /&gt;
   Load Address: 80008000&lt;br /&gt;
   Entry Point:  80008000&lt;br /&gt;
   Verifying Checksum &amp;#8230; OK&lt;br /&gt;
## Loading init Ramdisk from Legacy Image at 81600000 &amp;#8230;&lt;br /&gt;
   Image Name:   Ubuntu Initrd&lt;br /&gt;
   Image Type:   ARM Linux RAMDisk Image (uncompressed)&lt;br /&gt;
   Data Size:    3982651 Bytes = 3.8 MiB&lt;br /&gt;
   Load Address: 00000000&lt;br /&gt;
   Entry Point:  00000000&lt;br /&gt;
   Verifying Checksum &amp;#8230; OK&lt;br /&gt;
   Loading Kernel Image &amp;#8230; OK&lt;br /&gt;
OK&lt;/p&gt;
&lt;p&gt;Starting kernel &amp;#8230;&lt;/p&gt;
&lt;p&gt;Uncompressing Linux&amp;#8230; done, booting the kernel.&lt;br /&gt;
[    0.000000] Initializing cgroup subsys cpuset&lt;br /&gt;
[    0.000000] Initializing cgroup subsys cpu&lt;br /&gt;
&amp;#8230;
&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;This should be enough for you to get your Pandaboard booting with PXE. You can also script these commands at your boot.scr file that U-Boot loads automatically from your SD card, so you don&amp;#8217;t have to call them by hand every time you reboot your board.&lt;/p&gt;
&lt;p&gt;In case it doesn&amp;#8217;t work for you, just ping me (rsalveti) at #linaro on freenode &lt;span class=&quot;wp-smiley wp-emoji wp-emoji-smile&quot; title=&quot;:-)&quot;&gt;:-)&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;  &lt;a rel=&quot;nofollow&quot; href=&quot;http://feeds.wordpress.com/1.0/gocomments/rsalveti.wordpress.com/266/&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://feeds.wordpress.com/1.0/comments/rsalveti.wordpress.com/266/&quot; /&gt;&lt;/a&gt; &lt;img alt=&quot;&quot; border=&quot;0&quot; src=&quot;http://pixel.wp.com/b.gif?host=rsalveti.wordpress.com&amp;blog=905525&amp;post=266&amp;subd=rsalveti&amp;ref=&amp;feed=1&quot; width=&quot;1&quot; height=&quot;1&quot; /&gt;</content:encoded>
	<dc:date>2011-07-11T09:38:44+00:00</dc:date>
	<dc:creator>rsalveti</dc:creator>
</item>
<item rdf:about="http://www.anselmolsm.org/blog/?p=1346">
	<title>Anselmo Lacerda S. de Melo: Qt Contributors’ Summit</title>
	<link>http://anselmolsm.org/blog/qt-contributors-summit/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=qt-contributors-summit</link>
	<content:encoded>&lt;div class=&quot;wp-caption aligncenter&quot;&gt;&lt;a href=&quot;http://developer.qt.nokia.com/groups/qt_contributors_summit/wiki&quot;&gt;&lt;img title=&quot;Qt Contributors' Summit&quot; src=&quot;http://get.qt.nokia.com/marketing/summit_01.png&quot; alt=&quot;I'm going to the Qt Contributors' Summit&quot; width=&quot;196&quot; height=&quot;121&quot; /&gt;&lt;/a&gt;&lt;/div&gt;


&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;We are in Berlin, attending the Qt Contributor&amp;#8217;s Summit. 265 people are discussing very important (and interesting) topics for Qt 5 and the open governance. You can follow what&amp;#8217;s happening here using the hash code #qtcs on several social networks. And of course, you can check the &lt;a href=&quot;http://developer.qt.nokia.com/groups/qt_contributors_summit/wiki&quot; target=&quot;_blank&quot;&gt;wiki page of the event&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Personally, I am attending sessions related with QML, Qt-Components, &lt;a href=&quot;http://developer.qt.nokia.com&quot;&gt;DevNet&lt;/a&gt; and open governance.&lt;/p&gt;
&lt;p&gt;And yesterday was Thursday, also known as the &amp;#8220;Yellow Day&amp;#8221;:&lt;/p&gt;
&lt;div class=&quot;mceTemp mceIEcenter&quot;&gt;
&lt;dl id=&quot;attachment_1358&quot; class=&quot;wp-caption aligncenter&quot;&gt;
&lt;dt class=&quot;wp-caption-dt&quot;&gt;&lt;a href=&quot;http://anselmolsm.org/wp-content/uploads/2011/06/diaamarelo.jpg&quot;&gt;&lt;img class=&quot;size-full wp-image-1358&quot; title=&quot;Dia do amarelo&quot; src=&quot;http://anselmolsm.org/wp-content/uploads/2011/06/diaamarelo.jpg&quot; alt=&quot;&quot; width=&quot;640&quot; height=&quot;480&quot; /&gt;&lt;/a&gt;&lt;p class=&quot;wp-caption-text&quot;&gt;Ok, Ademar was not wearing yellow t-shirt. Well, imagine him as the goalkeeper of the team ;)&lt;/p&gt;&lt;/dt&gt;&lt;/dl&gt;&lt;/div&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</content:encoded>
	<dc:date>2011-06-17T12:22:07+00:00</dc:date>
</item>
<item rdf:about="http://blog.aloisiojr.com/?p=33">
	<title>Aloisio Almeida: Managing multiple network profiles using upstart</title>
	<link>http://blog.aloisiojr.com/?p=33</link>
	<content:encoded>&lt;p&gt;One of the purposes of buying the Jetway mini-top HBJC600C99-352-BW was using it as wireless router. I installed Ubuntu 11.04 on it. As NetworkManager does not handle wireless interfaces in access point (AP) mode, I decided to design my own network management. The idea is simple: use the required daemons/application and create upstart jobs to handle the activation logic.  These are the network profiles I want to support:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;WIFI&lt;/strong&gt;: The htpc will connect to any known AP available.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;ADSL&lt;/strong&gt;: The htpc will connect to Internet via ADSL and act as a &lt;strong&gt;wireless router&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;3G&lt;/strong&gt;: The htpc will connect to the Internet via 3G and act as a &lt;strong&gt;wireless router&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;List of applications I need to use:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;upstart;&lt;/li&gt;
&lt;li&gt;wpa_supplicant;&lt;/li&gt;
&lt;li&gt;dhclient;&lt;/li&gt;
&lt;li&gt;brctl;&lt;/li&gt;
&lt;li&gt;ifconfig;&lt;/li&gt;
&lt;li&gt;hostapd;&lt;/li&gt;
&lt;li&gt;dhcpd;&lt;/li&gt;
&lt;li&gt;pppd;&lt;/li&gt;
&lt;li&gt;iptables;&lt;/li&gt;
&lt;li&gt;dnsmasq.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;To install the needed packages, type the application name in the terminal. Ubuntu will help you with package&amp;#8217;s name.&lt;/p&gt;
&lt;p&gt;There are thousand ways to do that using upstart, so let me list some constraints I kept in mind when designing the system:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Customized solution.&lt;/strong&gt; I believe that generic solutions must be used only when you really need them. Every time you make something more generic you end up adding more logic, creating more corner cases and spending more time with use cases that you will NEVER face. Example of assumptions: my built-in ethernet port is eth0, my wireless interface wlan0 is NOT hotplug.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Always have a maintenance channel available.&lt;/strong&gt; Shit happens, all the time. So independent of the network profile I choose I want some way to get a secure shell connection without connect a keyboard (that I don&amp;#8217;t have) to the htpc.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;One upstart job per long lived process.&lt;/strong&gt; Among the applications listed above, some have short lifetime, i.e. they set some configuration and/or perform some action and finish. Others keep running until some orderly finish action. I decided that the formers don&amp;#8217;t need to be a job, they can be run as pre or post scripts of other jobs.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;1st step: Get rid of Ubuntu networking jobs.&lt;/h3&gt;
&lt;p&gt;I will manage my network stuff using only upstart jobs, so I don&amp;#8217;t need network-manager and ifupdown utilities. So lets disable them:&lt;/p&gt;
&lt;pre&gt;root$ echo manual &amp;gt;&amp;gt; /etc/init/networking.conf
root$ echo manual &amp;gt;&amp;gt; /etc/init/network-interfaces.conf
root$ echo manual &amp;gt;&amp;gt; /etc/init/network-manager.conf
root$ echo manual &amp;gt;&amp;gt; /etc/init/networking.conf
root$ echo manual &amp;gt;&amp;gt; /etc/init/bridge-network-interface.conf&lt;/pre&gt;
&lt;p&gt;Now, we need a job to raise the loopback interface. The following job is completely based on the Ubuntu&amp;#8217;s network-interface job:&lt;/p&gt;
&lt;p&gt;&lt;em&gt;/etc/init/loopback.conf&lt;/em&gt;&lt;/p&gt;
&lt;pre&gt;start on net-device-added INTERFACE=lo
stop on net-device-removed INTERFACE=lo

pre-start script
    mkdir -p /var/run/network
    ifconfig lo 127.0.0.1 up
    initctl emit -n net-device-up IFACE=lo LOGICAL=lo
                                  ADDRFAM=inet METHOD=loopback
end script

post-stop exec initctl emit -n net-device-down IFACE=lo LOGICAL=lo
                                               ADDRFAM=inet METHOD=loopback&lt;/pre&gt;
&lt;p&gt;As upstart will run and take care of all daemons listed above, we must disable the sysinit scripts that start/stop them (that ones in /etc/init.d).&lt;/p&gt;
&lt;pre&gt;root$ update-rc.d -f hostapd remove
root$ update-rc.d -f isc-dhcp-server remove
root$ update-rc.d -f dnsmasq remove&lt;/pre&gt;
&lt;h3&gt;2nd step: create mutually exclusive jobs to set the network profile.&lt;/h3&gt;
&lt;p&gt;&lt;em&gt;/etc/init/net-profile-adsl.conf&lt;/em&gt;&lt;/p&gt;
&lt;pre&gt;stop on (starting net-profile-adsl
         or starting net-profile-wifi)
# the 'start on' below means &quot;i'm the default profile&quot;
start on (local-filesystems
          and net-device-added INTERFACE=wlan0
	  and net-device-added INTERFACE=eth0)&lt;/pre&gt;
&lt;p&gt;&lt;em&gt;etc/init/net-profile-3g.conf&lt;/em&gt;&lt;/p&gt;
&lt;pre&gt;stop on (starting net-profile-3g
         or starting net-profile-wifi)&lt;/pre&gt;
&lt;p&gt;&lt;em&gt;/etc/init/net-profile-wifi.conf&lt;/em&gt;&lt;/p&gt;
&lt;pre&gt;stop on (starting net-profile-3g
         or starting net-profile-adsl)&lt;/pre&gt;
&lt;p&gt;The main ideia of this arrangement is to change the profile using a single command. For instance, if somehow my adsl connection become unavailable I just need to connect my cell phone to the htpc and run the following command:&lt;/p&gt;
&lt;pre&gt;root$ start net-profile-3g&lt;/pre&gt;
&lt;p&gt;To reach this goal, all the following jobs will depend on this set of &amp;#8220;fake&amp;#8221; jobs as you can see in the next steps.&lt;/p&gt;
&lt;h3&gt;3rd step: set-up the bridge&lt;/h3&gt;
&lt;p&gt;First, the question. Why do I need a bridge? It&amp;#8217;s because I have a printer connected to the htpc via ethernet. As I only have one built-in ethernet port I bought a usb-ethernet adapter (eth1). So, every time the htpc is running the 3g or adsl profile, I want wlan0 and eth1 in a bridge to route the connection to them. I can even say that everytime I plug-in the usb-ethernet adapter, I want dhcpd sending valid IP addresses to it (do you remember that I want a ssh access anytime?). The solution that I chose:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;The bridge (br0) will be set up at startup time and dhcpd will be configured to manage this interface&lt;/li&gt;
&lt;li&gt;Whenever the usb-ethernet is plugged in, its interface will be added to the bridge&lt;/li&gt;
&lt;li&gt;Every time ADSL or 3G profiles are chosen, wlan0 will also be added to the bridge&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;em&gt;/etc/init/bridge.conf&lt;/em&gt;&lt;/p&gt;
&lt;pre&gt;start on started loopback
stop on stopping loopback

pre-start script
    brctl addbr br0
    ifconfig br0 10.0.1.1 netmask 255.255.255.0 broadcast 10.0.1.255
end script

post-stop script
    ifconfig br0 down
    brctl delbr br0
end script&lt;/pre&gt;
&lt;p&gt;&lt;em&gt;/etc/init/usb-ethernet.conf&lt;/em&gt;&lt;/p&gt;
&lt;pre&gt;start on net-device-added INTERFACE=eth1
stop on net-device-removed INTERFACE=eth1

pre-start script
    ifconfig eth1 up
    brctl addif br0 eth1
end script
post-stop exec brctl delif br0 eth1&lt;/pre&gt;
&lt;p&gt;&lt;em&gt;/etc/init/dhcpd.conf&lt;/em&gt;&lt;/p&gt;
&lt;pre&gt;start on started bridge
stop on stopping bridge

exec dhcpd -f&lt;/pre&gt;
&lt;p&gt;Note that the configurations above do not show when the wlan0 interface is added to the bridge. It will be covered in the next steps.  Do not forget to change /etc/default/isc-dhcp-server in order to make dhcpd manage the br0 interface. Also, you need a valid configuration in the /etc/dhcp/dhcpd.conf. I will show my config below:&lt;/p&gt;
&lt;pre&gt;ddns-update-style none;

option domain-name-servers 10.0.1.1;

default-lease-time 600;
max-lease-time 7200;

authoritative;

log-facility local7;

subnet 10.0.1.0 netmask 255.255.255.0 {
  range 10.0.1.10 10.0.1.254;
  option routers 10.0.1.1;
}&lt;/pre&gt;
&lt;h3&gt;4th step: managing wlan0 when the WIFI profile is chosen&lt;/h3&gt;
&lt;p&gt;Basically I need wpa_supplicant and dhclient running on wlan0 interface. Also, I need to keep wlan0 out of the bridge. Dumping the config:&lt;/p&gt;
&lt;p&gt;&lt;em&gt;/etc/init/wpa_supplicant.conf&lt;/em&gt;&lt;/p&gt;
&lt;pre&gt;start on started net-profile-wifi
stop on stopping net-profile-wifi

exec wpa_supplicant -iwlan0 -Dnl80211 -c/etc/wpa_supplicant.conf&lt;/pre&gt;
&lt;p&gt;&lt;em&gt;/etc/init/dhclient.conf&lt;/em&gt;&lt;/p&gt;
&lt;pre&gt;start on started wpa_supplicant
stop on stopping wpa_supplicant

exec dhclient -d wlan0

emits net-device-up
emits net-device-down

post-start exec initctl emit -n net-device-up IFACE=wlan0 LOGICAL=wlan0
                                              ADDRFAM=inet METHOD=dhcp
pre-stop script
    ifconfig wlan0 0.0.0.0
    initctl emit -n net-device-down IFACE=wlan0 LOGICAL=wlan0
                                    ADDRFAM=inet METHOD=dhcp
end script&lt;/pre&gt;
&lt;p&gt;Note that you need a valid /etc/wpa_supplicant.conf file in order to be able to connect to a known AP. I don&amp;#8217;t think I need to paste my config here. If you have any doubts run &amp;#8216;man wpa_supplicant.conf&amp;#8217;.&lt;/p&gt;
&lt;h3&gt;5th step: managing wlan0 when either 3G or ADSL profiles are chosen&lt;/h3&gt;
&lt;p&gt;I only need to launch hostpad and to add wlan0 to the bridge (br0). The job configuration:&lt;/p&gt;
&lt;p&gt;&lt;em&gt;/etc/init/hostapd.conf&lt;/em&gt;&lt;/p&gt;
&lt;pre&gt;start on (started net-profile-3g
          or started net-profile-adsl)
stop on (stopping net-profile-3g
         or stopping net-profile-adsl)

exec hostapd /etc/hostapd.conf

post-start script
    while [ &quot;`iw wlan0 info | grep type | cut -d ' ' -f 2`&quot; != &quot;AP&quot; ]; do
        sleep 0.5
    done
    brctl addif br0 wlan0
end script
pre-stop exec brctl delif br0 wlan0&lt;/pre&gt;
&lt;p&gt;Note how wlan0 is added to the bridge. The current solution is a ugly hack that I&amp;#8217;m planning to improve further&amp;#8230; The problem is that a wireless interface in &amp;#8216;managed mode&amp;#8217; cannot be added to a bridge. So when I move from WIFI profile (the wlan0 is in managed mode) to 3G or ADSL profile (wlan0 is in master mode), the brctl addif command fails. The reason is that hostapd daemon does not have enough time to set the master mode before its own post-start script runs.&lt;/p&gt;
&lt;p&gt;Lets remind you again about valid configuration files&amp;#8230; My wireless device uses ath9k kernel driver and below I&amp;#8217;m pasting my hostapd.conf&lt;/p&gt;
&lt;p&gt;&lt;em&gt;/etc/hostapd.conf&lt;/em&gt;&lt;/p&gt;
&lt;pre&gt;interface=wlan0
bridge=br0
driver=nl80211

ssid=myssid
hw_mode=g
channel=1

wme_enabled=1
ieee80211n=1
ht_capab=[HT40+][SHORT-GI-40][TX-STBC][RX-STBC1][DSSS_CCK-40]

macaddr_acl=0
auth_algs=1
ignore_broadcast_ssid=0
wpa=2
wpa_passphrase=come_on
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP
rsn_pairwise=CCMP&lt;/pre&gt;
&lt;h3&gt;6th step: managing ppp0 interface when either ADSL or 3G profiles are chosen&lt;/h3&gt;
&lt;p&gt;I only need to call pppd with the desired profile and create a NAT using iptables. There are bare differences between 3g and adsl pppd jobs as you can notice below:&lt;/p&gt;
&lt;p&gt;&lt;em&gt;/etc/init/pppd-gvt.conf&lt;/em&gt;&lt;/p&gt;
&lt;pre&gt;start on started net-profile-adsl
stop on stopping net-profile-adsl

emits net-device-up
emits net-device-down

pre-start exec ifconfig eth0 0.0.0.0 up

exec pppd call gvt

post-start script
    iptables -t nat -A POSTROUTING -s 10.0.1.0/24 -o ppp0 -j MASQUERADE
    iptables -A FORWARD -s 10.0.1.0/24 -o ppp0 -j ACCEPT
    iptables -A FORWARD -d 10.0.1.0/24 -m conntrack
                --cstate ESTABLISHED,RELATED -i ppp0 -j ACCEPT
    initctl emit -n net-device-up IFACE=ppp0 LOGICAL=ppp0
                                  ADDRFAM=inet METHOD=ppp
end script

pre-stop script
    iptables -F
    initctl emit -n net-device-down IFACE=ppp0 LOGICAL=ppp0
                                    ADDRFAM=inet METHOD=ppp
end script

pre-start exec ifconfig eth0 down&lt;/pre&gt;
&lt;p&gt;&lt;em&gt;/etc/init/pppd-vivo3g.conf&lt;/em&gt;&lt;/p&gt;
&lt;pre&gt;start on started net-profile-3g
stop on stopping net-profile-3g

emits net-device-up
emits net-device-down

exec pppd call vivo3g

post-start script
    iptables -t nat -A POSTROUTING -s 10.0.1.0/24 -o ppp0 -j MASQUERADE
    iptables -A FORWARD -s 10.0.1.0/24 -o ppp0 -j ACCEPT
    iptables -A FORWARD -d 10.0.1.0/24 -m conntrack
                --cstate ESTABLISHED,RELATED -i ppp0 -j ACCEPT
    initctl emit -n net-device-up IFACE=ppp0 LOGICAL=ppp0
                                  ADDRFAM=inet METHOD=ppp
end script

pre-stop script
    iptables -F
    initctl emit -n net-device-down IFACE=ppp0 LOGICAL=ppp0
                                    ADDRFAM=inet METHOD=ppp
end script&lt;/pre&gt;
&lt;p&gt;Important notes:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;My adsl modem is in bridge mode and connected to eth0 port.&lt;/li&gt;
&lt;li&gt;GVT is my adsl provider name and Vivo3G is my 3G operator name &lt;img src=&quot;http://blog.aloisiojr.com/wp-includes/images/smilies/icon_smile.gif&quot; alt=&quot;:)&quot; class=&quot;wp-smiley&quot; /&gt; &lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Configs to adsl connection:&lt;/p&gt;
&lt;p&gt;&lt;em&gt;/etc/ppp/peers/gvt&lt;/em&gt;&lt;/p&gt;
&lt;pre&gt;noipdefault
defaultroute
hide-password
noauth
usepeerdns
user &quot;turbonet@turbonet&quot;
plugin rp-pppoe.so eth0
remotename gvt
ipparam gvt&lt;/pre&gt;
&lt;p&gt;Add the following line to /etc/ppp/pap-secrets&lt;/p&gt;
&lt;pre&gt;&quot;turbonet@turbonet&quot; gvt &quot;gvt25&quot;&lt;/pre&gt;
&lt;p&gt;Configs to 3G connection:&lt;/p&gt;
&lt;p&gt;&lt;em&gt;/etc/ppp/peers/vivo3g&lt;/em&gt;&lt;/p&gt;
&lt;pre&gt;hide-password
noauth
connect &quot;/usr/sbin/chat -v -f /etc/chatscripts/vivo3g&quot;
/dev/ttyACM0
115200
defaultroute
noipdefault
user &quot;vivo&quot;
remotename vivo3g
ipparam vivo3g
usepeerdns&lt;/pre&gt;
&lt;p&gt;&lt;em&gt;/etc/chatscripts/vivo3g&lt;/em&gt;&lt;/p&gt;
&lt;pre&gt;ABORT BUSY ABORT 'NO CARRIER' ABORT VOICE ABORT 'NO DIALTONE' ABORT 'NO DIAL TONE' ABORT 'NO ANSWER' ABORT DELAYED
'' ATZ
OK AT+CGDCONT=1,&quot;IP&quot;,&quot;zap.vivo.com.br&quot;
OK &quot;ATDT*99#&quot;
CONNECT ''&lt;/pre&gt;
&lt;p&gt;Add the following line to /etc/ppp/pap-secrets&lt;/p&gt;
&lt;pre&gt;&quot;vivo&quot; vivo3g &quot;vivo&quot;&lt;/pre&gt;
&lt;h3&gt;7th (and last) step: Setup local dns server&lt;/h3&gt;
&lt;p&gt;To configure the htpc to run as a name server, I&amp;#8217;m using dnsmasq:&lt;/p&gt;
&lt;p&gt;&lt;em&gt;/etc/init/dnsmasq.conf&lt;/em&gt;&lt;/p&gt;
&lt;pre&gt;start on started loopback
stop on stopping loopback

exec dnsmasq -k -u dnsmasq -7 /etc/dnsmasq.d,.dpkg-dist,.dpkg-old,.dpkg-new&lt;/pre&gt;
&lt;p&gt;&lt;em&gt;/etc/dnsmasq.conf&lt;/em&gt;&lt;/p&gt;
&lt;pre&gt;interface=br0
no-dhcp-interface=br0&lt;/pre&gt;
&lt;p&gt;If you want to use dnsmasq locally, add this line to your /etc/dhcp/dhclient.conf&lt;/p&gt;
&lt;pre&gt;prepend domain-name-servers 127.0.0.1;&lt;/pre&gt;
&lt;p&gt;&lt;em&gt;&lt;strong&gt;That&amp;#8217;s all. This setup is not fully tested (stressed). If you read/applied this and have some suggestions, please reply here &lt;img src=&quot;http://blog.aloisiojr.com/wp-includes/images/smilies/icon_smile.gif&quot; alt=&quot;:)&quot; class=&quot;wp-smiley&quot; /&gt; &lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;</content:encoded>
	<dc:date>2011-06-07T03:26:16+00:00</dc:date>
	<dc:creator>Aloisio</dc:creator>
</item>
<item rdf:about="http://blog.aloisiojr.com/?p=32">
	<title>Aloisio Almeida: New gadget!</title>
	<link>http://blog.aloisiojr.com/?p=32</link>
	<content:encoded>&lt;p&gt;I was looking for a computer with following features:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Act as a wireless router&lt;/li&gt;
&lt;li&gt;Act as a multimedia center (1080p)&lt;/li&gt;
&lt;li&gt;Quiet&lt;/li&gt;
&lt;li&gt;Low power consumption&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;After some research, I chose the Jetway Mini-Top &lt;a href=&quot;http://www.jetwaycomputer.com/ITX-JBC600C99352W.html&quot;&gt;HBJC600C99-352W-BW&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Software solution: Ubuntu 11.04 + XBMC. The installation has worked out of the box, no main issues. XBMC standalone is launched by default. Nice job xmbc team!!! The software is awesome.&lt;/p&gt;
&lt;p&gt;In the following posts I will show how I customized Ubuntu to make it fit my requirements &lt;img src=&quot;http://blog.aloisiojr.com/wp-includes/images/smilies/icon_smile.gif&quot; alt=&quot;:)&quot; class=&quot;wp-smiley&quot; /&gt; &lt;/p&gt;</content:encoded>
	<dc:date>2011-05-31T01:44:19+00:00</dc:date>
	<dc:creator>Aloisio</dc:creator>
</item>
<item rdf:about="http://www.anselmolsm.org/blog/?p=1338">
	<title>Anselmo Lacerda S. de Melo: Meego Conf 2011 – San Francisco</title>
	<link>http://anselmolsm.org/blog/meego-conf-2011-san-francisco/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=meego-conf-2011-san-francisco</link>
	<content:encoded>&lt;p&gt;I am in San Francisco (&lt;a href=&quot;http://www.anselmolsm.org/blog/if-youre-going-to-san-francisco/&quot; target=&quot;_blank&quot;&gt;again&lt;/a&gt;! =), now for the MeeGo Conference 2011.&lt;/p&gt;
&lt;p&gt;The event is about to begin with the keynote &amp;#8220;The Future of MeeGo Starts Now&amp;#8221; presented by the president of Linux Foundation, Jim Zemlin.&lt;/p&gt;
&lt;p&gt;This time, I&amp;#8217;m going to present a talk in the event too! The talk is today and the topic is &amp;#8220;Writing applications for multiple MeeGo devices&amp;#8221;.&lt;/p&gt;
&lt;p&gt;There are other talks by openBossa/INdT guys, &lt;a href=&quot;http://sf2011.meego.com/program/session-schedule&quot;&gt;check the schedule&lt;/a&gt;!&lt;/p&gt;</content:encoded>
	<dc:date>2011-05-23T13:00:25+00:00</dc:date>
</item>
<item rdf:about="http://ianlawrence.info/random-stuff/evaluating-projects-for-their-return-on-social-investment">
	<title>Ian Lawrence: Evaluating projects for their return on social investment</title>
	<link>http://ianlawrence.info/random-stuff/evaluating-projects-for-their-return-on-social-investment</link>
	<content:encoded>&lt;p&gt;I have just &lt;a href=&quot;https://github.com/IanLawrence/InnovationManagement&quot;&gt;published the software&lt;/a&gt; I wrote for my &lt;a href=&quot;http://www.extecamp.unicamp.br/gestaodainovacao/index.asp&quot;&gt;MBA in Strategic Management of Technology Innovation&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;A slightly customized version of the software is currently in use as a innovation funnel at &lt;a href=&quot;http://www.indt.org/&quot;&gt;INdT&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;It is a commonly accepted fact in business that social projects bring some 
tangible beneﬁts to an organization. Unfortunately, even if the project is 
very successful this often does not impact directly on the ﬁnancial bottom line. And, in a world of razor-thin margins, a set of activities that drive up corporate cost without any directly identiﬁable return is a tough sell, no matter how worthwhile and noble the project might be. The business case for social projects is therefore contingent on ﬁnding a suitable method for 
valuation — one that allows managers to understand the implications of an 
indirect beneﬁt and then make ’intelligent’ decisions about which projects to 
choose and the most feasible level of resources to commit.&lt;p&gt;
&lt;p&gt;I approached the problem using techniques from agile development. &lt;a href=&quot;http://en.wikipedia.org/wiki/Scrum_(development)&quot;&gt;Scrum sizings&lt;/a&gt; were run with stakeholders experienced in the type of project under evaluation which estimated the intangible values present in the social project.The values were then
passed into an algorithm which ran an economic analysis of the project with its associated series of estimates as projected 'cash-flows'. The economic indicators calculated are net present value, internal rate of return and eﬃciency of investment&lt;/p&gt;
&lt;p&gt;Projects are then ranked on their &lt;b&gt;efficiency of social investment&lt;/b&gt; score.&lt;/p&gt;
&lt;p&gt;The customization used at INdT is that instead of using scrum estimates the software has values assigned by answering questions. This makes the software then useful for all kinds of projects.The following questions were used
&lt;ul&gt;
&lt;li&gt;What is the quality of information presented.?&lt;/li&gt;
&lt;li&gt;How much does this project align with  strategy?&lt;/li&gt;
&lt;li&gt;What is the probability that the project will build competencies?&lt;/li&gt;
&lt;li&gt;The project opens new, significant markets for  customers (What is the potential for market and revenue creation?)&lt;/li&gt;
&lt;li&gt;What is the project's capacity to leverage  competitive position (Impact on competition)&lt;/li&gt;
&lt;li&gt;If the project is approved what is the span of possible applications that the resulting product might be applied to?&lt;/li&gt;
&lt;li&gt;Are there any IPR implications?&lt;/li&gt;
&lt;li&gt;What is the technological feasibility of the project?&lt;/li&gt;
&lt;li&gt;Assuming the project is implemented the set up costs of it are likely to be?&lt;/li&gt;
&lt;li&gt;What are the technological risks?&lt;/li&gt;
&lt;/ul&gt;
 and the software also has a 'stage-gate' built in now so that projects can be eliminated early on if some basic requirements are not met. Things like the project conflicting with the current portfolio or not adding value fit this description.&lt;/p&gt;
&lt;p&gt;The software is published under the &lt;a href=&quot;http://ianlawrence.info/random-stuff/www.gnu.org/licenses/agpl.html&quot;&gt;AGPL&lt;/a&gt; and it uses a standard Django set up. It should be relatively bug free but YMMV depending on what you want to do with it. The full thesis - 
&lt;b&gt;How to choose social investment projects by calculating their eﬃciency of investment using agile software development techniques&lt;/b&gt; - is available to download &lt;a href=&quot;http://ianlawrence.info/downloads/MBA/monografia.pdf&quot;&gt;here&lt;/a&gt;. Enjoy!&lt;/p&gt;&lt;/p&gt;&lt;/p&gt;</content:encoded>
	<dc:date>2011-04-25T12:23:01+00:00</dc:date>
</item>
<item rdf:about="tag:blogger.com,1999:blog-13725649.post-892456867409260350">
	<title>Renato Oliveira: Google Summer of Code: PySide under PSF umbrella</title>
	<link>http://tuxrecife.blogspot.com/2011/03/google-summer-of-code-pyside-under-psf.html</link>
	<content:encoded>PySide was accepted as a project under PSF umbrella. Any student who want to submit ideas related with PySide can contact us, or any PySide mentor, to discuss the ideas and prepare some proposals. Feel free to propose new ideas, do not get stuck only in the current ones be creative and good luck.  You can get more information on &lt;a href=&quot;http://wiki.python.org/moin/SummerOfCode/2011&quot;&gt;Python GSoC wiki&lt;/a&gt;, &lt;a href=&quot;http://developer.qt.nokia.com/wiki/PySide_GSoc_Ideas&quot;&gt;PySide GSoC wiki&lt;/a&gt;, and #pyside on freenode.</content:encoded>
	<dc:date>2011-03-29T16:49:04+00:00</dc:date>
	<dc:creator>Renato Araujo</dc:creator>
</item>
<item rdf:about="http://ianlawrence.info/random-stuff/software-shortlisted-for-sustainability-award">
	<title>Ian Lawrence: Software shortlisted for sustainability award</title>
	<link>http://ianlawrence.info/random-stuff/software-shortlisted-for-sustainability-award</link>
	<content:encoded>&lt;p&gt;NDG has been shortlisted for the Just Means 2011 – Social Innovation Awards, an important program which recognizes  innovative software in the social and environmental areas. The result will be published during the event “2011 Redefining Value”, which will occur on the 25th of March, in London.&lt;/p&gt;
&lt;p&gt;The software is competing in the category ‘Most Strategic Use of Philanthropic Funds’, disputing the prize with other three companies – Nature’s Path Foods, Oracle Corporation and Barclays PLC.&lt;/p&gt;
&lt;p&gt;“The initiative to submit NDG to the prize came from Nokia's Corporate Social Investment team. Those involved believe that the work done recently with the software has brought many positive effects to communities in need worldwide and for this reason we have the potential to compete,” explains Ian Lawrence, a software developer at INdT, whom along with Rodrigo Ramos – also an INdT developer – works on the NDG project in Manaus, developing new features and offering support to NGOs and companies which wish to use the tool.&lt;/p&gt;
&lt;p&gt;NDG was launched in 2008, and it is used for the collection of field data, substituting the use of paper survey forms and allowing the secure transfer of this information to a server, in real time. In 2009, the State of Amazonas’ Secretary of Health (SUSAM) adopted the software to conduct a campaign to fight Dengue Fever in Amazonas.&lt;/p&gt;
&lt;img src=&quot;http://ianlawrence.info/random-stuff/images/just-means&quot; /&gt;
&lt;p&gt;The results were so significant that NDG was adopted worldwide by many different organizations. Examples are the Philippines’ Government who along with the WWF use the tool to map the agricultural sector in the country and the Kenyan Government who run child birth registration programs in rural areas.&lt;/p&gt;</content:encoded>
	<dc:date>2011-03-11T09:32:11+00:00</dc:date>
</item>
<item rdf:about="http://www.setantas.net/blog/?p=517">
	<title>Marcelo Lira: Python bindings para libepub usando Shiboken</title>
	<link>http://www.setantas.net/blog/2011/03/09/python-bindings-para-libepub-usando-shiboken/</link>
	<content:encoded>&lt;p&gt;Tenho um &lt;a href=&quot;http://twitpic.com/3ucxtj&quot;&gt;Kindle&lt;/a&gt;, gosto muito dele, mas infelizmente não posso dizer o mesmo sobre o formato usado para os livros. Não que eu tenha feito um estudo detalhado do formato mobi e chegado a conclusão que ele é tecnicamente inferior. Não. O problema é que &lt;a title=&quot;Wikipedia: ePub&quot; href=&quot;http://en.wikipedia.org/wiki/EPUB&quot;&gt;ePub&lt;/a&gt; é tão mais popular, o que significa mais livros, e mais ferramentas com as quais brincar. &lt;a href=&quot;http://calibre-ebook.com/&quot;&gt;Calibre&lt;/a&gt; é ótimo para converter formatos de eBooks, mas eu prefiro a simplicidade de baixar um livro, copiar pro dispositivo e já sair lendo.&lt;/p&gt;
&lt;p&gt;Quando meu Kindle não está à mão, meu leitor substituto é um N900 com &lt;a title=&quot;eBook reader for Maemo 5&quot; href=&quot;http://juhanagsoc.wordpress.com/&quot;&gt;MeBook&lt;/a&gt;, um dos meus aplicativos preferidos &amp;#8211; ele procura por livros (no formato ePub) no &lt;a title=&quot;Feedbooks&quot; href=&quot;http://www.feedbooks.com/&quot;&gt;Feedbooks&lt;/a&gt;, baixa pro dispositivo e os mostra numa lista bem bacana, com capas e tudo. Examinando o código fonte do MeBook aprendi que ele usa a &lt;a title=&quot;eBook tools&quot; href=&quot;http://sourceforge.net/projects/ebook-tools/&quot;&gt;libepub&lt;/a&gt; para ler eBooks ePub, então pensei que seria interessante fazer bindings Python para &lt;strong&gt;libepub&lt;/strong&gt;. E aqui estamos.&lt;/p&gt;
&lt;p&gt;Ah, e mais uma coisa antes de começarmos, encontrei um projeto Python no github chamado &lt;a href=&quot;https://github.com/jharjono/libepub&quot;&gt;libepub&lt;/a&gt;. Não verifiquei ainda, mas o menciono aqui pelo bem da informação.&lt;/p&gt;
&lt;h2&gt;Shiboken&lt;/h2&gt;
&lt;p&gt;&lt;a title=&quot;Shiboken&quot; href=&quot;http://www.setantas.net/blog/2009/08/31/shiboken/&quot; target=&quot;_self&quot;&gt;Shiboken&lt;/a&gt; é a ferramenta de renome mundial usada para gerar o mundialmente famoso &lt;a title=&quot;PySide&quot; href=&quot;http://pyside.org&quot;&gt;PySide&lt;/a&gt; (que ocore ter alcançado a versão &lt;a title=&quot;PySide: Python for Qt 1.0 released!&quot; href=&quot;http://www.pyside.org/2011/03/pyside-python-for-qt-1-0-released/&quot;&gt;1.0&lt;/a&gt; semana passada &amp;#8211; viva!) Ela é uma das melhores ferramentas disponíveis para gerar bindings Python para bibliotecas C++. Mas isso sou eu falando &amp;#8211; eu nela. Contudo, &lt;strong&gt;libepub&lt;/strong&gt; é escrita em C, e mesmo que Shiboken possa gerar bindings para um punhado de funções globais e juntá-las num módulo Python, fica uma porcaria. De forma que terei de fazer algumas preparações para que a &lt;strong&gt;libepub&lt;/strong&gt; apareça bela em Python.&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;&lt;strong&gt;Pré-requisitos:&lt;/strong&gt; arquivos de desenvolvimento (i.e. os cabeçalhos) para &lt;a title=&quot;API Extractor&quot; href=&quot;http://www.pyside.org/home-binding/api-extractor/&quot;&gt;ApiExtractor&lt;/a&gt;, &lt;a title=&quot;GeneratorRunner 0.6&quot; href=&quot;http://pyside.org/docs/generatorrunner/&quot;&gt;GeneratorRunner&lt;/a&gt;, &lt;a title=&quot;Shiboken&quot; href=&quot;http://pyside.org/docs/shiboken/&quot;&gt;Shiboken&lt;/a&gt;, e &lt;strong&gt;libepub&lt;/strong&gt;. (Para usuários de Debian/Ubuntu isto significa: &lt;strong&gt;libapiextractor-dev&lt;/strong&gt;, &lt;strong&gt;libgenrunner-dev&lt;/strong&gt;, &lt;strong&gt;libshiboken-dev&lt;/strong&gt;, and &lt;strong&gt;libepub-dev&lt;/strong&gt;.) E o compilador C++ mais o CMake, é claro.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Lembrete:&lt;/strong&gt; ApiExtractor, GeneratorRunner e Shiboken são feitos com Qt (somente módulos principais, nenhuma delas tem ui), mas os bindings gerados não dependem da Qt de forma alguma. Exceto, obviamente, se a biblioteca para qual os bindings serão gerados já a use.&lt;/p&gt;
&lt;h3&gt;libepub&lt;/h3&gt;
&lt;p&gt;Primeiro, vamos dar uma olhada na &lt;strong&gt;libepub&lt;/strong&gt;. Ela tem três estruturas usadas como ponteiros opacos:&lt;/p&gt;
&lt;div class=&quot;codecolorer-container cpp geshi&quot;&gt;&lt;div class=&quot;cpp codecolorer&quot;&gt;&lt;span&gt;// Contem informacao sobre o arquivo ePub.&lt;/span&gt;&lt;br /&gt;
&lt;span&gt;struct&lt;/span&gt; epub&lt;span&gt;;&lt;/span&gt;&lt;br /&gt;
&lt;span&gt;// Objeto iterador para o indice.&lt;/span&gt;&lt;br /&gt;
&lt;span&gt;struct&lt;/span&gt; titerator&lt;span&gt;;&lt;/span&gt;&lt;br /&gt;
&lt;span&gt;// Objeto iterador para o conteudo do livro.&lt;/span&gt;&lt;br /&gt;
&lt;span&gt;struct&lt;/span&gt; eiterator&lt;span&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Se você quiser ler o conteúdo de um arquivo ePub, chame a função que irá criar uma estrutura epub, itere por seu índice com um titerator, e depois pelos conteúdos mesmos usando um eiterator.&lt;/p&gt;
&lt;p&gt;A maioria das funções seguem aquele formato &amp;#8220;C orientado a objetos&amp;#8221; visto em outras bibliotecas, com o primeiro argumento sendo um ponteiro para a estrutura que representa o &lt;em&gt;&amp;#8220;this&amp;#8221;&lt;/em&gt; ou &lt;em&gt;&amp;#8220;self&amp;#8221;&lt;/em&gt; em linguagens OO. Exemplos:&lt;/p&gt;
&lt;div class=&quot;codecolorer-container cpp geshi&quot;&gt;&lt;div class=&quot;cpp codecolorer&quot;&gt;&lt;span&gt;void&lt;/span&gt;&lt;br /&gt;
epub_dump&lt;span&gt;&amp;#40;&lt;/span&gt;&lt;span&gt;struct&lt;/span&gt; epub&lt;span&gt;*&lt;/span&gt; epub&lt;span&gt;&amp;#41;&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span&gt;unsigned&lt;/span&gt; &lt;span&gt;char&lt;/span&gt;&lt;span&gt;**&lt;/span&gt;&lt;br /&gt;
epub_get_metadata&lt;span&gt;&amp;#40;&lt;/span&gt;&lt;span&gt;struct&lt;/span&gt; epub&lt;span&gt;*&lt;/span&gt; epub,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span&gt;enum&lt;/span&gt; epub_metadata type,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span&gt;int&lt;/span&gt;&lt;span&gt;*&lt;/span&gt; size&lt;span&gt;&amp;#41;&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span&gt;int&lt;/span&gt;&lt;br /&gt;
epub_get_data&lt;span&gt;&amp;#40;&lt;/span&gt;&lt;span&gt;struct&lt;/span&gt; epub&lt;span&gt;*&lt;/span&gt; epub,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span&gt;const&lt;/span&gt; &lt;span&gt;char&lt;/span&gt;&lt;span&gt;*&lt;/span&gt; name,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span&gt;char&lt;/span&gt;&lt;span&gt;**&lt;/span&gt; data&lt;span&gt;&amp;#41;&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;
&lt;h3&gt;CMake&lt;/h3&gt;
&lt;p&gt;Usarei CMake como o sistema de compilação dos bindings pois me sinto confortável com ele &amp;#8211; é o mesmo usado no PySide e no conjunto de ferramentas de geração do Shiboken. Não darei muita atenção à esta parte do processo, apenas veja os arquivos &lt;strong&gt;CMakeLists.txt&lt;/strong&gt;; explicação mais detalhada sobre o processo de compilar um binding pode ser encontrada em &lt;a title=&quot;PySide Binding Generation Tutorial&quot; href=&quot;http://developer.qt.nokia.com/wiki/Category:LanguageBindings::PySide::Shiboken::PySide_Binding_Generation_Tutorial&quot;&gt;PySide Binding Generation Tutorial&lt;/a&gt;. Para informação realmente básica, veja &lt;a title=&quot;PySide CMake Primer&quot; href=&quot;http://developer.qt.nokia.com/wiki/PySide_CMake_Primer&quot;&gt;PySide CMake Primer&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt;C++ Wrapper feito à mão para uma biblioteca em C&lt;/h2&gt;
&lt;p&gt;Para gerar bindings Python para uma biblioteca C++, o sujeito precisa escrever uma descrição XML chamada type system, que declarará o quê precisa ser exposto para Python, e o quê sofrerá modificação: funções globais, classes, namespaces, enums. Por exemplo, se em C++ temos a classe &lt;code class=&quot;codecolorer cpp default&quot;&gt;&lt;span class=&quot;cpp&quot;&gt;Rectangle&lt;/span&gt;&lt;/code&gt;, eu a declararia no type system dessa forma:&lt;/p&gt;
&lt;div class=&quot;codecolorer-container xml geshi&quot;&gt;&lt;div class=&quot;xml codecolorer&quot;&gt;&lt;span&gt;&lt;span&gt;&amp;lt;value-type&lt;/span&gt; &lt;span&gt;name&lt;/span&gt;=&lt;span&gt;'Rectangle'&lt;/span&gt; &lt;span&gt;/&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Todos os métodos pertencentes à &lt;code class=&quot;codecolorer cpp default&quot;&gt;&lt;span class=&quot;cpp&quot;&gt;Rectangle&lt;/span&gt;&lt;/code&gt; serão expostos em Python automaticamente. O mesmo não vale para as funções em C que representam os métodos para a estrutura epub. Infelizmente não há modo de dizer para o gerador Shiboken que quero a estrutura epub e suas funções representadas como uma classe com métodos, sendo assim precisamos escrever um fino envoltório C++ ao redor das estruturas C. Isto seria um bocado de trabalho para uma grande biblioteca C, mas mesmo com uma minúscula sinto o desconforto de precisar recorrer a este tipo de gambiarra. O type system deveria ser expressivo o bastante para gerar bindings para estruturas e funções em C como se elas fossem objetos e métodos apropriados. Vou marcar isto para futuras melhorias comunitárias/fora-do-trabalho no Shiboken.&lt;/p&gt;
&lt;p&gt;Vejamos um pedaço de código do arquivo&lt;a title=&quot;epub_cpp_wrappers.h @ 757d8dc&quot; href=&quot;https://github.com/setanta/python-epub/blob/757d8dcd34943dd71495959a81fb15ce07896898/epub_cpp_wrappers.h&quot;&gt;epub_cpp_wrapper.h&lt;/a&gt;:&lt;/p&gt;
&lt;div class=&quot;codecolorer-container cpp geshi&quot;&gt;&lt;div class=&quot;cpp codecolorer&quot;&gt;&lt;span&gt;class&lt;/span&gt; EPub &lt;span&gt;&amp;#123;&lt;/span&gt;&lt;br /&gt;
&lt;span&gt;public&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; ...&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; ~EPub&lt;span&gt;&amp;#40;&lt;/span&gt;&lt;span&gt;&amp;#41;&lt;/span&gt; &lt;span&gt;&amp;#123;&lt;/span&gt; epub_close&lt;span&gt;&amp;#40;&lt;/span&gt;m_epub&lt;span&gt;&amp;#41;&lt;/span&gt;&lt;span&gt;;&lt;/span&gt; &lt;span&gt;&amp;#125;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span&gt;static&lt;/span&gt; &lt;span&gt;inline&lt;/span&gt; EPub&lt;span&gt;*&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; open&lt;span&gt;&amp;#40;&lt;/span&gt;&lt;span&gt;const&lt;/span&gt; &lt;span&gt;char&lt;/span&gt;&lt;span&gt;*&lt;/span&gt; filename, &lt;span&gt;int&lt;/span&gt; debug &lt;span&gt;=&lt;/span&gt; &lt;span&gt;0&lt;/span&gt;&lt;span&gt;&amp;#41;&lt;/span&gt; &lt;span&gt;&amp;#123;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span&gt;struct&lt;/span&gt; epub&lt;span&gt;*&lt;/span&gt; book &lt;span&gt;=&lt;/span&gt; epub_open&lt;span&gt;&amp;#40;&lt;/span&gt;filename, debug&lt;span&gt;&amp;#41;&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span&gt;if&lt;/span&gt; &lt;span&gt;&amp;#40;&lt;/span&gt;book&lt;span&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span&gt;return&lt;/span&gt; &lt;span&gt;new&lt;/span&gt; EPub&lt;span&gt;&amp;#40;&lt;/span&gt;book&lt;span&gt;&amp;#41;&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span&gt;return&lt;/span&gt; &lt;span&gt;0&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span&gt;&amp;#125;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; ...&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span&gt;inline&lt;/span&gt; &lt;span&gt;void&lt;/span&gt; dump&lt;span&gt;&amp;#40;&lt;/span&gt;&lt;span&gt;&amp;#41;&lt;/span&gt; &lt;span&gt;&amp;#123;&lt;/span&gt; epub_dump&lt;span&gt;&amp;#40;&lt;/span&gt;m_epub&lt;span&gt;&amp;#41;&lt;/span&gt;&lt;span&gt;;&lt;/span&gt; &lt;span&gt;&amp;#125;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span&gt;inline&lt;/span&gt; &lt;span&gt;int&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; get_data&lt;span&gt;&amp;#40;&lt;/span&gt;&lt;span&gt;const&lt;/span&gt; &lt;span&gt;char&lt;/span&gt;&lt;span&gt;*&lt;/span&gt; name, &lt;span&gt;char&lt;/span&gt;&lt;span&gt;**&lt;/span&gt; data&lt;span&gt;&amp;#41;&lt;/span&gt; &lt;span&gt;&amp;#123;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span&gt;return&lt;/span&gt; epub_get_data&lt;span&gt;&amp;#40;&lt;/span&gt;m_epub, name, data&lt;span&gt;&amp;#41;&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span&gt;&amp;#125;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; ...&lt;br /&gt;
&lt;br /&gt;
&lt;span&gt;private&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span&gt;explicit&lt;/span&gt; EPub&lt;span&gt;&amp;#40;&lt;/span&gt;&lt;span&gt;struct&lt;/span&gt; epub&lt;span&gt;*&lt;/span&gt; ptr&lt;span&gt;&amp;#41;&lt;/span&gt; &lt;span&gt;:&lt;/span&gt; m_epub&lt;span&gt;&amp;#40;&lt;/span&gt;ptr&lt;span&gt;&amp;#41;&lt;/span&gt; &lt;span&gt;&amp;#123;&lt;/span&gt;&lt;span&gt;&amp;#125;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; EPub&lt;span&gt;&amp;#40;&lt;/span&gt;&lt;span&gt;const&lt;/span&gt; EPub&lt;span&gt;&amp;amp;&lt;/span&gt;amp&lt;span&gt;;&lt;/span&gt; other&lt;span&gt;&amp;#41;&lt;/span&gt; &lt;span&gt;&amp;#123;&lt;/span&gt;&lt;span&gt;&amp;#125;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; EPub&lt;span&gt;&amp;amp;&lt;/span&gt;amp&lt;span&gt;;&lt;/span&gt; operator&lt;span&gt;=&lt;/span&gt;&lt;span&gt;&amp;#40;&lt;/span&gt;&lt;span&gt;const&lt;/span&gt; EPub&lt;span&gt;&amp;amp;&lt;/span&gt;amp&lt;span&gt;;&lt;/span&gt; other&lt;span&gt;&amp;#41;&lt;/span&gt; &lt;span&gt;&amp;#123;&lt;/span&gt;&lt;span&gt;&amp;#125;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span&gt;struct&lt;/span&gt; epub&lt;span&gt;*&lt;/span&gt; m_epub&lt;span&gt;;&lt;/span&gt;&lt;br /&gt;
&lt;span&gt;&amp;#125;&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Note que todos os métodos são marcados como &lt;code class=&quot;codecolorer cpp default&quot;&gt;&lt;span class=&quot;cpp&quot;&gt;&lt;span&gt;inline&lt;/span&gt;&lt;/span&gt;&lt;/code&gt; para fazer este envoltório o mais fino possível. (GCC, estou olhando pra você!)&lt;/p&gt;
&lt;h3&gt;Epub::open&lt;/h3&gt;
&lt;p&gt;A função &lt;code class=&quot;codecolorer cpp default&quot;&gt;&lt;span class=&quot;cpp&quot;&gt;epub_open&lt;/span&gt;&lt;/code&gt; se torna o método estático &lt;code class=&quot;codecolorer cpp default&quot;&gt;&lt;span class=&quot;cpp&quot;&gt;EPub&lt;span&gt;::&lt;/span&gt;&lt;span&gt;open&lt;/span&gt;&lt;/span&gt;&lt;/code&gt; que retornará um novo objeto &lt;code class=&quot;codecolorer cpp default&quot;&gt;&lt;span class=&quot;cpp&quot;&gt;EPub&lt;/span&gt;&lt;/code&gt; para o arquivo ePub dado pelo parâmetro &lt;code class=&quot;codecolorer cpp default&quot;&gt;&lt;span class=&quot;cpp&quot;&gt;filename&lt;/span&gt;&lt;/code&gt;, ou um null pointer se o arquivo for inválido ou não existir.&lt;br /&gt;
O construtor para esta classe foi feito privado de forma que o único modo de criar objetos EPub é via &lt;code class=&quot;codecolorer cpp default&quot;&gt;&lt;span class=&quot;cpp&quot;&gt;EPub&lt;span&gt;::&lt;/span&gt;&lt;span&gt;open&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;, que nunca criará um objeto &lt;code class=&quot;codecolorer cpp default&quot;&gt;&lt;span class=&quot;cpp&quot;&gt;EPub&lt;/span&gt;&lt;/code&gt; inválido.&lt;/p&gt;
&lt;h3&gt;~Epub&lt;/h3&gt;
&lt;p&gt;Em C o responsável por liberar a estrutura epub é &lt;code class=&quot;codecolorer cpp default&quot;&gt;&lt;span class=&quot;cpp&quot;&gt;epub_close&lt;/span&gt;&lt;/code&gt;, mas não criarei um método &lt;code class=&quot;codecolorer cpp default&quot;&gt;&lt;span class=&quot;cpp&quot;&gt;EPub&lt;span&gt;::&lt;/span&gt;&lt;span&gt;close&lt;/span&gt;&lt;span&gt;&amp;#40;&lt;/span&gt;&lt;span&gt;&amp;#41;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;, pois o equivalente C++ para ele é o destrutor da classe.&lt;/p&gt;
&lt;p&gt;Um binding Python gerado para o que temos até agora seria mais ou menos assim:&lt;/p&gt;
&lt;div class=&quot;codecolorer-container python geshi&quot;&gt;&lt;div class=&quot;python codecolorer&quot;&gt;&lt;span&gt;import&lt;/span&gt; epub&lt;br /&gt;
book = epub.&lt;span&gt;EPub&lt;/span&gt;.&lt;span&gt;open&lt;/span&gt;&lt;span&gt;&amp;#40;&lt;/span&gt;&lt;span&gt;'sample.epub'&lt;/span&gt;&lt;span&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;
title = book.&lt;span&gt;get_metadata&lt;/span&gt;&lt;span&gt;&amp;#40;&lt;/span&gt;epub.&lt;span&gt;EPUB_TITLE&lt;/span&gt;&lt;span&gt;&amp;#41;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Claro que não expliquei como isto seria gerado, que o módulo se chamaria &lt;code class=&quot;codecolorer python default&quot;&gt;&lt;span class=&quot;python&quot;&gt;epub&lt;/span&gt;&lt;/code&gt;, o que é &lt;code class=&quot;codecolorer python default&quot;&gt;&lt;span class=&quot;python&quot;&gt;epub.&lt;span&gt;EPUB_TITLE&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;, e como Python saberia o que fazer com &lt;code class=&quot;codecolorer cpp default&quot;&gt;&lt;span class=&quot;cpp&quot;&gt;&lt;span&gt;unsigned&lt;/span&gt; &lt;span&gt;char&lt;/span&gt;&lt;span&gt;**&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;, mas tenhamos paciência.&lt;/p&gt;
&lt;h3&gt;Movendo enums por aí&lt;/h3&gt;
&lt;p&gt;&lt;code class=&quot;codecolorer cpp default&quot;&gt;&lt;span class=&quot;cpp&quot;&gt;EPUB_TITLE&lt;/span&gt;&lt;/code&gt; é um valor vindo do enum &lt;code class=&quot;codecolorer cpp default&quot;&gt;&lt;span class=&quot;cpp&quot;&gt;epub_metadata&lt;/span&gt;&lt;/code&gt;, se ambos forem exportados para Python conforme estão, eles terão esta aparência:&lt;/p&gt;
&lt;div class=&quot;codecolorer-container python geshi&quot;&gt;&lt;div class=&quot;python codecolorer&quot;&gt;&lt;span&gt;import&lt;/span&gt; epub&lt;br /&gt;
epub.&lt;span&gt;epub_metadata&lt;/span&gt;&lt;br /&gt;
epub.&lt;span&gt;EPUB_TITLE&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Assim fica bem feio e fuleiro. Já que &lt;code class=&quot;codecolorer cpp default&quot;&gt;&lt;span class=&quot;cpp&quot;&gt;epub_metadata&lt;/span&gt;&lt;/code&gt; é um enum relacionado ao objeto epub (como nos informa o prefixo &lt;strong&gt;epub_&lt;/strong&gt;), será natural que ele seja movido para dentro da class EPub. No meu mundo de fantasia, a tag do type system que descreve um enum C++ para Python teria a opção de movê-lo para dentro de outro objeto, e também de ser renomeado. Algo desse tipo:&lt;/p&gt;
&lt;div class=&quot;codecolorer-container xml geshi&quot;&gt;&lt;div class=&quot;xml codecolorer&quot;&gt;&lt;span&gt;&lt;span&gt;&amp;lt;enum-type&lt;/span&gt; &lt;span&gt;name&lt;/span&gt;=&lt;span&gt;'epub_metadata'&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span&gt;rename&lt;/span&gt;=&lt;span&gt;'metatada'&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span&gt;move-into&lt;/span&gt;=&lt;span&gt;'EPub'&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span&gt;remove-enum-value-prefix&lt;/span&gt;=&lt;span&gt;'EPUB_'&lt;/span&gt; &lt;span&gt;/&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;E aqui temos outro item para a lista de &amp;#8220;por fazer&amp;#8221; do Shiboken. Enquanto esta funcionalidade não é implementada, terei de fazê-lo manualmente.&lt;/p&gt;
&lt;div class=&quot;codecolorer-container cpp geshi&quot;&gt;&lt;div class=&quot;cpp codecolorer&quot;&gt;&lt;span&gt;class&lt;/span&gt; EPub &lt;span&gt;&amp;#123;&lt;/span&gt;&lt;br /&gt;
&lt;span&gt;public&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span&gt;enum&lt;/span&gt; metadata &lt;span&gt;&amp;#123;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ID &lt;span&gt;=&lt;/span&gt; &lt;span&gt;int&lt;/span&gt;&lt;span&gt;&amp;#40;&lt;/span&gt;EPUB_ID&lt;span&gt;&amp;#41;&lt;/span&gt;,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TITLE &lt;span&gt;=&lt;/span&gt; &lt;span&gt;int&lt;/span&gt;&lt;span&gt;&amp;#40;&lt;/span&gt;EPUB_TITLE&lt;span&gt;&amp;#41;&lt;/span&gt;,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; CREATOR &lt;span&gt;=&lt;/span&gt; &lt;span&gt;int&lt;/span&gt;&lt;span&gt;&amp;#40;&lt;/span&gt;EPUB_CREATOR&lt;span&gt;&amp;#41;&lt;/span&gt;,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; CONTRIB &lt;span&gt;=&lt;/span&gt; &lt;span&gt;int&lt;/span&gt;&lt;span&gt;&amp;#40;&lt;/span&gt;EPUB_CONTRIB&lt;span&gt;&amp;#41;&lt;/span&gt;,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; SUBJECT &lt;span&gt;=&lt;/span&gt; &lt;span&gt;int&lt;/span&gt;&lt;span&gt;&amp;#40;&lt;/span&gt;EPUB_SUBJECT&lt;span&gt;&amp;#41;&lt;/span&gt;,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; PUBLISHER &lt;span&gt;=&lt;/span&gt; &lt;span&gt;int&lt;/span&gt;&lt;span&gt;&amp;#40;&lt;/span&gt;EPUB_PUBLISHER&lt;span&gt;&amp;#41;&lt;/span&gt;,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; DESCRIPTION &lt;span&gt;=&lt;/span&gt; &lt;span&gt;int&lt;/span&gt;&lt;span&gt;&amp;#40;&lt;/span&gt;EPUB_DESCRIPTION&lt;span&gt;&amp;#41;&lt;/span&gt;,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; DATE &lt;span&gt;=&lt;/span&gt; &lt;span&gt;int&lt;/span&gt;&lt;span&gt;&amp;#40;&lt;/span&gt;EPUB_DATE&lt;span&gt;&amp;#41;&lt;/span&gt;,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TYPE &lt;span&gt;=&lt;/span&gt; &lt;span&gt;int&lt;/span&gt;&lt;span&gt;&amp;#40;&lt;/span&gt;EPUB_TYPE&lt;span&gt;&amp;#41;&lt;/span&gt;,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; FORMAT &lt;span&gt;=&lt;/span&gt; &lt;span&gt;int&lt;/span&gt;&lt;span&gt;&amp;#40;&lt;/span&gt;EPUB_FORMAT&lt;span&gt;&amp;#41;&lt;/span&gt;,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; SOURCE &lt;span&gt;=&lt;/span&gt; &lt;span&gt;int&lt;/span&gt;&lt;span&gt;&amp;#40;&lt;/span&gt;EPUB_SOURCE&lt;span&gt;&amp;#41;&lt;/span&gt;,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; LANG &lt;span&gt;=&lt;/span&gt; &lt;span&gt;int&lt;/span&gt;&lt;span&gt;&amp;#40;&lt;/span&gt;EPUB_LANG&lt;span&gt;&amp;#41;&lt;/span&gt;,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; RELATION &lt;span&gt;=&lt;/span&gt; &lt;span&gt;int&lt;/span&gt;&lt;span&gt;&amp;#40;&lt;/span&gt;EPUB_RELATION&lt;span&gt;&amp;#41;&lt;/span&gt;,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; COVERAGE &lt;span&gt;=&lt;/span&gt; &lt;span&gt;int&lt;/span&gt;&lt;span&gt;&amp;#40;&lt;/span&gt;EPUB_COVERAGE&lt;span&gt;&amp;#41;&lt;/span&gt;,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; RIGHTS &lt;span&gt;=&lt;/span&gt; &lt;span&gt;int&lt;/span&gt;&lt;span&gt;&amp;#40;&lt;/span&gt;EPUB_RIGHTS&lt;span&gt;&amp;#41;&lt;/span&gt;,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; META &lt;span&gt;=&lt;/span&gt; &lt;span&gt;int&lt;/span&gt;&lt;span&gt;&amp;#40;&lt;/span&gt;EPUB_META&lt;span&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span&gt;&amp;#125;&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; ...&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span&gt;inline&lt;/span&gt; &lt;span&gt;unsigned&lt;/span&gt; &lt;span&gt;char&lt;/span&gt;&lt;span&gt;**&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; get_metadata&lt;span&gt;&amp;#40;&lt;/span&gt;metadata type, &lt;span&gt;int&lt;/span&gt;&lt;span&gt;*&lt;/span&gt; size&lt;span&gt;&amp;#41;&lt;/span&gt; &lt;span&gt;&amp;#123;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span&gt;return&lt;/span&gt; epub_get_metadata&lt;span&gt;&amp;#40;&lt;/span&gt;m_epub,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;epub_metadata&lt;span&gt;&amp;#40;&lt;/span&gt;type&lt;span&gt;&amp;#41;&lt;/span&gt;,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;size&lt;span&gt;&amp;#41;&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span&gt;&amp;#125;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; ...&lt;br /&gt;
&lt;span&gt;&amp;#125;&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Os valores do enum &lt;code class=&quot;codecolorer cpp default&quot;&gt;&lt;span class=&quot;cpp&quot;&gt;epub_metadata&lt;/span&gt;&lt;/code&gt; foram convertidos para &lt;code class=&quot;codecolorer cpp default&quot;&gt;&lt;span class=&quot;cpp&quot;&gt;&lt;span&gt;int&lt;/span&gt;&lt;/span&gt;&lt;/code&gt; para impedir o &lt;strong&gt;ApiExtractor&lt;/strong&gt; de emitir toda sorte de warnings dizendo que ele não sabe quem são esses caras.&lt;/p&gt;
&lt;p&gt;De qualquer modo, é terrível&amp;#8230; ter esse gerador incrementado, e ter de escrever tudo isso&amp;#8230; nãããão!&lt;/p&gt;
&lt;h3&gt;TIterator e EIterator&lt;/h3&gt;
&lt;p&gt;As estruturas C &lt;code class=&quot;codecolorer cpp default&quot;&gt;&lt;span class=&quot;cpp&quot;&gt;titerator&lt;/span&gt;&lt;/code&gt; e &lt;code class=&quot;codecolorer cpp default&quot;&gt;&lt;span class=&quot;cpp&quot;&gt;eiterator&lt;/span&gt;&lt;/code&gt; serão envolvidas pelas class C++ &lt;code class=&quot;codecolorer cpp default&quot;&gt;&lt;span class=&quot;cpp&quot;&gt;TIterator&lt;/span&gt;&lt;/code&gt; e &lt;code class=&quot;codecolorer cpp default&quot;&gt;&lt;span class=&quot;cpp&quot;&gt;EIterator&lt;/span&gt;&lt;/code&gt;, respectivamente, e como a classe &lt;code class=&quot;codecolorer cpp default&quot;&gt;&lt;span class=&quot;cpp&quot;&gt;EPub&lt;/span&gt;&lt;/code&gt; seus construtores serão privados.&lt;/p&gt;
&lt;div class=&quot;codecolorer-container cpp geshi&quot;&gt;&lt;div class=&quot;cpp codecolorer&quot;&gt;&lt;span&gt;class&lt;/span&gt; TIterator &lt;span&gt;&amp;#123;&lt;/span&gt;&lt;br /&gt;
&lt;span&gt;public&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span&gt;enum&lt;/span&gt; type &lt;span&gt;&amp;#123;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; NAVMAP &lt;span&gt;=&lt;/span&gt; &lt;span&gt;int&lt;/span&gt;&lt;span&gt;&amp;#40;&lt;/span&gt;TITERATOR_NAVMAP&lt;span&gt;&amp;#41;&lt;/span&gt;,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; GUIDE &lt;span&gt;=&lt;/span&gt; &lt;span&gt;int&lt;/span&gt;&lt;span&gt;&amp;#40;&lt;/span&gt;TITERATOR_GUIDE&lt;span&gt;&amp;#41;&lt;/span&gt;,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; PAGES &lt;span&gt;=&lt;/span&gt; &lt;span&gt;int&lt;/span&gt;&lt;span&gt;&amp;#40;&lt;/span&gt;TITERATOR_PAGES&lt;span&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span&gt;&amp;#125;&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; ~TIterator&lt;span&gt;&amp;#40;&lt;/span&gt;&lt;span&gt;&amp;#41;&lt;/span&gt; &lt;span&gt;&amp;#123;&lt;/span&gt; epub_free_titerator&lt;span&gt;&amp;#40;&lt;/span&gt;m_iter&lt;span&gt;&amp;#41;&lt;/span&gt;&lt;span&gt;;&lt;/span&gt; &lt;span&gt;&amp;#125;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span&gt;inline&lt;/span&gt; &lt;span&gt;bool&lt;/span&gt; isValid&lt;span&gt;&amp;#40;&lt;/span&gt;&lt;span&gt;&amp;#41;&lt;/span&gt; &lt;span&gt;&amp;#123;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span&gt;return&lt;/span&gt; epub_tit_curr_valid&lt;span&gt;&amp;#40;&lt;/span&gt;m_iter&lt;span&gt;&amp;#41;&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span&gt;&amp;#125;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; ...&lt;br /&gt;
&lt;span&gt;private&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span&gt;friend&lt;/span&gt; &lt;span&gt;class&lt;/span&gt; EPub&lt;span&gt;;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span&gt;explicit&lt;/span&gt; TIterator&lt;span&gt;&amp;#40;&lt;/span&gt;&lt;span&gt;struct&lt;/span&gt; titerator&lt;span&gt;*&lt;/span&gt; iter&lt;span&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span&gt;:&lt;/span&gt; m_iter&lt;span&gt;&amp;#40;&lt;/span&gt;iter&lt;span&gt;&amp;#41;&lt;/span&gt; &lt;span&gt;&amp;#123;&lt;/span&gt;&lt;span&gt;&amp;#125;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span&gt;struct&lt;/span&gt; titerator&lt;span&gt;*&lt;/span&gt; m_iter&lt;span&gt;;&lt;/span&gt;&lt;br /&gt;
&lt;span&gt;&amp;#125;&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Novas instâncias de &lt;code class=&quot;codecolorer cpp default&quot;&gt;&lt;span class=&quot;cpp&quot;&gt;TIterator&lt;/span&gt;&lt;/code&gt; e &lt;code class=&quot;codecolorer cpp default&quot;&gt;&lt;span class=&quot;cpp&quot;&gt;EIterator&lt;/span&gt;&lt;/code&gt; são criadas por métodos de &lt;code class=&quot;codecolorer cpp default&quot;&gt;&lt;span class=&quot;cpp&quot;&gt;EPub&lt;/span&gt;&lt;/code&gt;, por isso ela deve ser feita amiga (&lt;code class=&quot;codecolorer cpp default&quot;&gt;&lt;span class=&quot;cpp&quot;&gt;&lt;span&gt;friend&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;) das classes iteradoras.&lt;/p&gt;
&lt;div class=&quot;codecolorer-container cpp geshi&quot;&gt;&lt;div class=&quot;cpp codecolorer&quot;&gt;&lt;span&gt;class&lt;/span&gt; EPub &lt;span&gt;&amp;#123;&lt;/span&gt;&lt;br /&gt;
&lt;span&gt;public&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; ...&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span&gt;inline&lt;/span&gt; EIterator&lt;span&gt;*&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; get_iterator&lt;span&gt;&amp;#40;&lt;/span&gt;EIterator&lt;span&gt;::&lt;/span&gt;&lt;span&gt;type&lt;/span&gt; type, &lt;span&gt;int&lt;/span&gt; opt &lt;span&gt;=&lt;/span&gt; &lt;span&gt;0&lt;/span&gt;&lt;span&gt;&amp;#41;&lt;/span&gt; &lt;span&gt;&amp;#123;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span&gt;struct&lt;/span&gt; eiterator&lt;span&gt;*&lt;/span&gt; it &lt;span&gt;=&lt;/span&gt; epub_get_iterator&lt;span&gt;&amp;#40;&lt;/span&gt;m_epub, eiterator_type&lt;span&gt;&amp;#40;&lt;/span&gt;type&lt;span&gt;&amp;#41;&lt;/span&gt;, opt&lt;span&gt;&amp;#41;&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span&gt;if&lt;/span&gt; &lt;span&gt;&amp;#40;&lt;/span&gt;it&lt;span&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span&gt;return&lt;/span&gt; &lt;span&gt;new&lt;/span&gt; EIterator&lt;span&gt;&amp;#40;&lt;/span&gt;it&lt;span&gt;&amp;#41;&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span&gt;return&lt;/span&gt; &lt;span&gt;0&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span&gt;&amp;#125;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span&gt;inline&lt;/span&gt; TIterator&lt;span&gt;*&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; get_titerator&lt;span&gt;&amp;#40;&lt;/span&gt;TIterator&lt;span&gt;::&lt;/span&gt;&lt;span&gt;type&lt;/span&gt; type, &lt;span&gt;int&lt;/span&gt; opt &lt;span&gt;=&lt;/span&gt; &lt;span&gt;0&lt;/span&gt;&lt;span&gt;&amp;#41;&lt;/span&gt; &lt;span&gt;&amp;#123;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span&gt;struct&lt;/span&gt; titerator&lt;span&gt;*&lt;/span&gt; it &lt;span&gt;=&lt;/span&gt; epub_get_titerator&lt;span&gt;&amp;#40;&lt;/span&gt;m_epub, titerator_type&lt;span&gt;&amp;#40;&lt;/span&gt;type&lt;span&gt;&amp;#41;&lt;/span&gt;, opt&lt;span&gt;&amp;#41;&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span&gt;if&lt;/span&gt; &lt;span&gt;&amp;#40;&lt;/span&gt;it&lt;span&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span&gt;return&lt;/span&gt; &lt;span&gt;new&lt;/span&gt; TIterator&lt;span&gt;&amp;#40;&lt;/span&gt;it&lt;span&gt;&amp;#41;&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span&gt;return&lt;/span&gt; &lt;span&gt;0&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span&gt;&amp;#125;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; ...&lt;br /&gt;
&lt;span&gt;&amp;#125;&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;
&lt;h2&gt;python-epub&lt;/h2&gt;
&lt;p&gt;Agora é hora de dizer ao gerador o quê entra e o quê será modificado nos bindings.&lt;/p&gt;
&lt;h3&gt;O cabeçalho global&lt;/h3&gt;
&lt;p&gt;O cabeçalho global é um arquivo que inclui todos os outros cabeçalhos da biblioteca que será analizada. No cabeçalho global o desenvolvedor de bindings pode também adicionar algumas cláusulas, como um &lt;code class=&quot;codecolorer cpp default&quot;&gt;&lt;span class=&quot;cpp&quot;&gt;&lt;span&gt;#define&lt;/span&gt;&lt;/span&gt;&lt;/code&gt; que irá causar alguma condição de mudança nos cabeçalhos da biblioteca alvo, que irá afetar o binding gerado.&lt;/p&gt;
&lt;p&gt;O arquivo &lt;a href=&quot;https://github.com/setanta/python-epub/blob/master/epub_global.h&quot;&gt;epub_global.h&lt;/a&gt; que uso aqui é muito simples:&lt;/p&gt;
&lt;div class=&quot;codecolorer-container cpp geshi&quot;&gt;&lt;div class=&quot;cpp codecolorer&quot;&gt;&lt;span&gt;#ifndef EPUB_GLOBAL_H&lt;/span&gt;&lt;br /&gt;
&lt;span&gt;#define EPUB_GLOBAL_H&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span&gt;#include &amp;amp;lt;epub.h&amp;amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span&gt;#include &amp;amp;lt;epub_shared.h&amp;amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span&gt;#include &amp;amp;lt;epub_version.h&amp;amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span&gt;#include &amp;quot;epub_cpp_wrappers.h&amp;quot;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span&gt;// ApiExtractor reclamara' se&lt;/span&gt;&lt;br /&gt;
&lt;span&gt;// encontrar apenas pre-definicoes.&lt;/span&gt;&lt;br /&gt;
&lt;span&gt;struct&lt;/span&gt; titerator &lt;span&gt;&amp;#123;&lt;/span&gt;&lt;span&gt;&amp;#125;&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;br /&gt;
&lt;span&gt;struct&lt;/span&gt; eiterator &lt;span&gt;&amp;#123;&lt;/span&gt;&lt;span&gt;&amp;#125;&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span&gt;#endif&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Como o comentário nos diz, ApiExtractor não gosta quando encontra pré-declarações sem definições. Escolhi adicionar estas definições falsas para &lt;code class=&quot;codecolorer cpp default&quot;&gt;&lt;span class=&quot;cpp&quot;&gt;&lt;span&gt;struct&lt;/span&gt; titerator&lt;/span&gt;&lt;/code&gt; e &lt;code class=&quot;codecolorer cpp default&quot;&gt;&lt;span class=&quot;cpp&quot;&gt;&lt;span&gt;struct&lt;/span&gt; eiterator&lt;/span&gt;&lt;/code&gt;. (Por alguma razão o gerador nada diz sobre &lt;code class=&quot;codecolorer cpp default&quot;&gt;&lt;span class=&quot;cpp&quot;&gt;&lt;span&gt;struct&lt;/span&gt; epub&lt;/span&gt;&lt;/code&gt;.) Outra opção seria não usar estas definições falsas, mas adicionar uma linha ao arquivo type system dizendo ao gerador para ignorar avisos relativos à estas estruturas.&lt;/p&gt;
&lt;h3&gt;A descrição do Type System&lt;/h3&gt;
&lt;p&gt;Aqui segue um pedaço de código do arquivo &lt;a title=&quot;typesystem_epub.xml @ 78de928&quot; href=&quot;https://github.com/setanta/python-epub/blob/78de92867f668d92a7610515eaeebe34487ebf03/typesystem_epub.xml&quot;&gt;typesystem_epub.xml&lt;/a&gt;.&lt;/p&gt;
&lt;div class=&quot;codecolorer-container xml geshi&quot;&gt;&lt;div class=&quot;xml codecolorer&quot;&gt;&lt;span&gt;&lt;span&gt;&amp;lt;?xml&lt;/span&gt; &lt;span&gt;version&lt;/span&gt;=&lt;span&gt;'1.0'&lt;/span&gt;&lt;span&gt;?&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span&gt;&lt;span&gt;&amp;lt;typesystem&lt;/span&gt; &lt;span&gt;package&lt;/span&gt;=&lt;span&gt;'epub'&lt;/span&gt;&lt;span&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; ...&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span&gt;&lt;span&gt;&amp;lt;rejection&lt;/span&gt; &lt;span&gt;enum-name&lt;/span&gt;=&lt;span&gt;'epub_metadata'&lt;/span&gt; &lt;span&gt;/&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; ...&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span&gt;&lt;span&gt;&amp;lt;object-type&lt;/span&gt; &lt;span&gt;name&lt;/span&gt;=&lt;span&gt;'EPub'&lt;/span&gt;&lt;span&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span&gt;&lt;span&gt;&amp;lt;enum-type&lt;/span&gt; &lt;span&gt;name&lt;/span&gt;=&lt;span&gt;'metadata'&lt;/span&gt; &lt;span&gt;/&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ...&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span&gt;&lt;span&gt;&amp;lt;/object-type&lt;span&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span&gt;&lt;span&gt;&amp;lt;/typesystem&lt;span&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;O enum &lt;code class=&quot;codecolorer cpp default&quot;&gt;&lt;span class=&quot;cpp&quot;&gt;epub_metadata&lt;/span&gt;&lt;/code&gt; não é exportado para Python (ao menos não diretamente) e para evitar que o gerador emita seus alertas, ele precisa ser explicitamente rejeitado; seu substituto C++ é adicionado depois dentro do object-type EPub. O mesmo acontece com os outros enums.&lt;/p&gt;
&lt;p&gt;Na notação do type system &lt;code class=&quot;codecolorer xml default&quot;&gt;&lt;span class=&quot;xml&quot;&gt;object-type&lt;/span&gt;&lt;/code&gt; se refere aos objetos que são passados somente como ponteiros (como &lt;code class=&quot;codecolorer cpp default&quot;&gt;&lt;span class=&quot;cpp&quot;&gt;EPub&lt;/span&gt;&lt;/code&gt;, cujos construtor e operador de cópia são privados). Se, de outro modo, o objeto pode ser passado como valor, ele deve ser declarado como &lt;code class=&quot;codecolorer xml default&quot;&gt;&lt;span class=&quot;xml&quot;&gt;value-type&lt;/span&gt;&lt;/code&gt;, conforme nosso exemplo de &lt;code class=&quot;codecolorer cpp default&quot;&gt;&lt;span class=&quot;cpp&quot;&gt;Rectangle&lt;/span&gt;&lt;/code&gt; mencionado anteriormente.&lt;/p&gt;
&lt;h3&gt;O Protocolo de Iterador de Python&lt;/h3&gt;
&lt;p&gt;Em Python, se um objeto suporta o &lt;a href=&quot;http://docs.python.org/library/stdtypes.html#iterator-types&quot;&gt;Protocolo de Iterador&lt;/a&gt;, poderei usar em comandos &lt;code class=&quot;codecolorer python default&quot;&gt;&lt;span class=&quot;python&quot;&gt;&lt;span&gt;for&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;, desta forma:&lt;/p&gt;
&lt;div class=&quot;codecolorer-container python geshi&quot;&gt;&lt;div class=&quot;python codecolorer&quot;&gt;&lt;span&gt;from&lt;/span&gt; epub &lt;span&gt;import&lt;/span&gt; EPub, TIterator&lt;br /&gt;
book = EPub.&lt;span&gt;open&lt;/span&gt;&lt;span&gt;&amp;#40;&lt;/span&gt;&lt;span&gt;self&lt;/span&gt;.&lt;span&gt;epub_file&lt;/span&gt;&lt;span&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;
&lt;span&gt;for&lt;/span&gt; toc_it &lt;span&gt;in&lt;/span&gt; book.&lt;span&gt;get_titerator&lt;/span&gt;&lt;span&gt;&amp;#40;&lt;/span&gt;TIterator.&lt;span&gt;NAVMAP&lt;/span&gt;&lt;span&gt;&amp;#41;&lt;/span&gt;:&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span&gt;if&lt;/span&gt; &lt;span&gt;not&lt;/span&gt; toc_it.&lt;span&gt;isValid&lt;/span&gt;&lt;span&gt;&amp;#40;&lt;/span&gt;&lt;span&gt;&amp;#41;&lt;/span&gt;:&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span&gt;continue&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span&gt;print&lt;/span&gt; &lt;span&gt;'link : '&lt;/span&gt; + toc_it.&lt;span&gt;link&lt;/span&gt;&lt;span&gt;&amp;#40;&lt;/span&gt;&lt;span&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span&gt;print&lt;/span&gt; &lt;span&gt;'label: '&lt;/span&gt; + toc_it.&lt;span&gt;label&lt;/span&gt;&lt;span&gt;&amp;#40;&lt;/span&gt;&lt;span&gt;&amp;#41;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Seguir o Protocolo de Iterador de Python consiste tão somente de um objeto implementar os métodos &lt;code class=&quot;codecolorer python default&quot;&gt;&lt;span class=&quot;python&quot;&gt;&lt;span&gt;__iter__&lt;/span&gt;&lt;span&gt;&amp;#40;&lt;/span&gt;&lt;span&gt;&amp;#41;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt; e &lt;code class=&quot;codecolorer python default&quot;&gt;&lt;span class=&quot;python&quot;&gt;__next__&lt;span&gt;&amp;#40;&lt;/span&gt;&lt;span&gt;&amp;#41;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;.&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;&lt;strong&gt;Nota:&lt;/strong&gt; o nome correto para o método é &lt;code class=&quot;codecolorer python default&quot;&gt;&lt;span class=&quot;python&quot;&gt;next&lt;span&gt;&amp;#40;&lt;/span&gt;&lt;span&gt;&amp;#41;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt; e não &lt;code class=&quot;codecolorer python default&quot;&gt;&lt;span class=&quot;python&quot;&gt;__next__&lt;span&gt;&amp;#40;&lt;/span&gt;&lt;span&gt;&amp;#41;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;. Este é apenas um bug menor no gerador, que acabei de encontrar.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;O XML para adicionar as funcionalidades do protocolo de iterador à classe &lt;code class=&quot;codecolorer python default&quot;&gt;&lt;span class=&quot;python&quot;&gt;TIterator&lt;/span&gt;&lt;/code&gt; será extenso, de forma que o partirei em duas partes, a primeira lidando com &lt;a href=&quot;http://www.pyside.org/docs/apiextractor/typesystem_templates.html&quot;&gt;templates de código do type system&lt;/a&gt;.&lt;/p&gt;
&lt;h4&gt;Os templates do Type System&lt;/h4&gt;
&lt;div class=&quot;codecolorer-container xml geshi&quot;&gt;&lt;div class=&quot;xml codecolorer&quot;&gt;&lt;span&gt;&lt;span&gt;&amp;lt;?xml&lt;/span&gt; &lt;span&gt;version&lt;/span&gt;=&lt;span&gt;'1.0'&lt;/span&gt;&lt;span&gt;?&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span&gt;&lt;span&gt;&amp;lt;typesystem&lt;/span&gt; &lt;span&gt;package&lt;/span&gt;=&lt;span&gt;'epub'&lt;/span&gt;&lt;span&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; ...&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span&gt;&lt;span&gt;&amp;lt;template&lt;/span&gt; &lt;span&gt;name&lt;/span&gt;=&lt;span&gt;'iterator.__iter__'&lt;/span&gt;&lt;span&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Py_INCREF(%PYSELF);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; %PYARG_0 = %PYSELF;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span&gt;&lt;span&gt;&amp;lt;/template&lt;span&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span&gt;&lt;span&gt;&amp;lt;template&lt;/span&gt; &lt;span&gt;name&lt;/span&gt;=&lt;span&gt;'iterator.__next__'&lt;/span&gt;&lt;span&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (%CPPSELF.next()) {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span&gt;&lt;span&gt;&amp;lt;insert-template&lt;/span&gt; &lt;span&gt;name&lt;/span&gt;=&lt;span&gt;'iterator.__iter__'&lt;/span&gt; &lt;span&gt;/&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; } else {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; PyErr_SetNone(PyExc_StopIteration);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span&gt;&lt;span&gt;&amp;lt;/template&lt;span&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; ...&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Os métodos de iterador para &lt;code class=&quot;codecolorer python default&quot;&gt;&lt;span class=&quot;python&quot;&gt;TIterator&lt;/span&gt;&lt;/code&gt; e &lt;code class=&quot;codecolorer python default&quot;&gt;&lt;span class=&quot;python&quot;&gt;EIterator&lt;/span&gt;&lt;/code&gt; terão exatamente a mesma implementação, então é esperto usar os &lt;a href=&quot;http://www.pyside.org/docs/apiextractor/typesystem_templates.html&quot;&gt;templates&lt;/a&gt; do type system, e ter o código, e seus eventuais bugs, num único lugar.&lt;/p&gt;
&lt;p&gt;O &lt;code class=&quot;codecolorer python default&quot;&gt;&lt;span class=&quot;python&quot;&gt;iterator.&lt;span&gt;__iter__&lt;/span&gt;&lt;/span&gt;&lt;/code&gt; método precisa apenas returnar o próprio objeto com seu contador de referências incrementado em um. &lt;code class=&quot;codecolorer python default&quot;&gt;&lt;span class=&quot;python&quot;&gt;iterator.__next__&lt;/span&gt;&lt;/code&gt; chama o &lt;code class=&quot;codecolorer cpp default&quot;&gt;&lt;span class=&quot;cpp&quot;&gt;next&lt;span&gt;&amp;#40;&lt;/span&gt;&lt;span&gt;&amp;#41;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt; do objeto C++ subjacente (e também retorna a si próprio, e incrementa o refcounter), e sobe uma exceção Python &lt;code class=&quot;codecolorer python default&quot;&gt;&lt;span class=&quot;python&quot;&gt;&lt;span&gt;StopIteration&lt;/span&gt;&lt;/span&gt;&lt;/code&gt; quando chega ao fim.&lt;/p&gt;
&lt;p&gt;As &lt;a href=&quot;http://www.pyside.org/docs/shiboken/typesystemvariables.html&quot;&gt;variáveis do type system&lt;/a&gt; &lt;code class=&quot;codecolorer xml default&quot;&gt;&lt;span class=&quot;xml&quot;&gt;%PYSELF&lt;/span&gt;&lt;/code&gt;, &lt;code class=&quot;codecolorer xml default&quot;&gt;&lt;span class=&quot;xml&quot;&gt;%PYARG_0&lt;/span&gt;&lt;/code&gt; e &lt;code class=&quot;codecolorer xml default&quot;&gt;&lt;span class=&quot;xml&quot;&gt;%CPPSELF&lt;/span&gt;&lt;/code&gt; são substituídas por valores dependentes do contexto onde são usados (e.g. as classes &lt;code class=&quot;codecolorer python default&quot;&gt;&lt;span class=&quot;python&quot;&gt;TIterator&lt;/span&gt;&lt;/code&gt; ou &lt;code class=&quot;codecolorer python default&quot;&gt;&lt;span class=&quot;python&quot;&gt;EIteration&lt;/span&gt;&lt;/code&gt;). Verifique a &lt;a href=&quot;http://www.pyside.org/docs/shiboken/typesystemvariables.html&quot;&gt;documentation&lt;/a&gt; para saber seus significados.&lt;/p&gt;
&lt;h4&gt;Adicionando os métodos de iteração&lt;/h4&gt;
&lt;div class=&quot;codecolorer-container xml geshi&quot;&gt;&lt;div class=&quot;xml codecolorer&quot;&gt;&amp;nbsp; &amp;nbsp; ...&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span&gt;&lt;span&gt;&amp;lt;object-type&lt;/span&gt; &lt;span&gt;name&lt;/span&gt;=&lt;span&gt;'TIterator'&lt;/span&gt;&lt;span&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ...&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span&gt;&lt;span&gt;&amp;lt;modify-function&lt;/span&gt; &lt;span&gt;signature&lt;/span&gt;=&lt;span&gt;'next()'&lt;/span&gt; &lt;span&gt;remove&lt;/span&gt;=&lt;span&gt;'all'&lt;/span&gt; &lt;span&gt;/&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span&gt;&lt;span&gt;&amp;lt;add-function&lt;/span&gt; &lt;span&gt;signature&lt;/span&gt;=&lt;span&gt;'__iter__'&lt;/span&gt; &lt;span&gt;return-type&lt;/span&gt;=&lt;span&gt;'PyObject*'&lt;/span&gt;&lt;span&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span&gt;&lt;span&gt;&amp;lt;inject-code&lt;/span&gt; &lt;span&gt;class&lt;/span&gt;=&lt;span&gt;'target'&lt;/span&gt; &lt;span&gt;position&lt;/span&gt;=&lt;span&gt;'beginning'&lt;/span&gt;&lt;span&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span&gt;&lt;span&gt;&amp;lt;insert-template&lt;/span&gt; &lt;span&gt;name&lt;/span&gt;=&lt;span&gt;'iterator.__iter__'&lt;/span&gt; &lt;span&gt;/&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span&gt;&lt;span&gt;&amp;lt;/inject-code&lt;span&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span&gt;&lt;span&gt;&amp;lt;/add-function&lt;span&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span&gt;&lt;span&gt;&amp;lt;add-function&lt;/span&gt; &lt;span&gt;signature&lt;/span&gt;=&lt;span&gt;'__next__'&lt;/span&gt; &lt;span&gt;return-type&lt;/span&gt;=&lt;span&gt;'PyObject*'&lt;/span&gt;&lt;span&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span&gt;&lt;span&gt;&amp;lt;inject-code&lt;/span&gt; &lt;span&gt;class&lt;/span&gt;=&lt;span&gt;'target'&lt;/span&gt; &lt;span&gt;position&lt;/span&gt;=&lt;span&gt;'beginning'&lt;/span&gt;&lt;span&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span&gt;&lt;span&gt;&amp;lt;insert-template&lt;/span&gt; &lt;span&gt;name&lt;/span&gt;=&lt;span&gt;'iterator.__next__'&lt;/span&gt; &lt;span&gt;/&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span&gt;&lt;span&gt;&amp;lt;/inject-code&lt;span&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span&gt;&lt;span&gt;&amp;lt;/add-function&lt;span&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span&gt;&lt;span&gt;&amp;lt;/object-type&lt;span&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;...&lt;br /&gt;
&lt;span&gt;&lt;span&gt;&amp;lt;/typesystem&lt;span&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Primeiro o &lt;code class=&quot;codecolorer cpp default&quot;&gt;&lt;span class=&quot;cpp&quot;&gt;next&lt;span&gt;&amp;#40;&lt;/span&gt;&lt;span&gt;&amp;#41;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt; original do C++ é removido, então aqueles para o protocolo de iterador do Python são adicionados, usando a tag &lt;code class=&quot;codecolorer xml default&quot;&gt;&lt;span class=&quot;xml&quot;&gt;&lt;span&gt;&lt;span&gt;&amp;lt;insert-template&lt;/span&gt;&lt;span&gt;/&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt; para inserir o código personalizado definido anteriormente. A exatas mesmas linhas serão adicionadas à classe &lt;code class=&quot;codecolorer python default&quot;&gt;&lt;span class=&quot;python&quot;&gt;EIterator&lt;/span&gt;&lt;/code&gt;.&lt;/p&gt;
&lt;h4&gt;Só mais um pouco de gambiarras&lt;/h4&gt;
&lt;p&gt;Apenas um obstáculo permanece no caminho de ter iteradores Python apropriados. Quando o comando &lt;code class=&quot;codecolorer python default&quot;&gt;&lt;span class=&quot;python&quot;&gt;&lt;span&gt;for&lt;/span&gt;&lt;/span&gt;&lt;/code&gt; de Python for usado para iterar sobre um objeto iterável, na primeira rodada ele chama o método &lt;code class=&quot;codecolorer python default&quot;&gt;&lt;span class=&quot;python&quot;&gt;&lt;span&gt;__iter__&lt;/span&gt;&lt;/span&gt;&lt;/code&gt; do objeto, e imediatamente após ele chama &lt;code class=&quot;codecolorer python default&quot;&gt;&lt;span class=&quot;python&quot;&gt;next&lt;/span&gt;&lt;/code&gt;, e continua chamando &lt;code class=&quot;codecolorer python default&quot;&gt;&lt;span class=&quot;python&quot;&gt;next&lt;/span&gt;&lt;/code&gt; para cada nova iteração.&lt;/p&gt;
&lt;p&gt;O problema aqui é que o iterador C subjacente retorna um objeto levando conteúdo apropriado quando &lt;code class=&quot;codecolorer python default&quot;&gt;&lt;span class=&quot;python&quot;&gt;&lt;span&gt;__iter__&lt;/span&gt;&lt;/span&gt;&lt;/code&gt; é chamado, então a forma como a iteração do &lt;code class=&quot;codecolorer python default&quot;&gt;&lt;span class=&quot;python&quot;&gt;&lt;span&gt;for&lt;/span&gt;&lt;/span&gt;&lt;/code&gt; Python funciona fará o primeiro item válido ser pulado. Uma gambiarra para este caso é usar uma flag no wrapper C++ que verificará se o iterador acabou de ser criado, de forma que ele não pulará para o iterador seguinte quando &lt;code class=&quot;codecolorer python default&quot;&gt;&lt;span class=&quot;python&quot;&gt;next&lt;/span&gt;&lt;/code&gt; for chamada pela primeira vez.&lt;/p&gt;
&lt;div class=&quot;codecolorer-container cpp geshi&quot;&gt;&lt;div class=&quot;cpp codecolorer&quot;&gt;&lt;span&gt;class&lt;/span&gt; TIterator &lt;span&gt;&amp;#123;&lt;/span&gt;&lt;br /&gt;
&lt;span&gt;public&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; ...&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span&gt;inline&lt;/span&gt; &lt;span&gt;bool&lt;/span&gt; next&lt;span&gt;&amp;#40;&lt;/span&gt;&lt;span&gt;&amp;#41;&lt;/span&gt; &lt;span&gt;&amp;#123;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span&gt;if&lt;/span&gt; &lt;span&gt;&amp;#40;&lt;/span&gt;m_isFirst&lt;span&gt;&amp;#41;&lt;/span&gt; &lt;span&gt;&amp;#123;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; m_isFirst &lt;span&gt;=&lt;/span&gt; &lt;span&gt;false&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span&gt;return&lt;/span&gt; &lt;span&gt;true&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span&gt;&amp;#125;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span&gt;return&lt;/span&gt; epub_tit_next&lt;span&gt;&amp;#40;&lt;/span&gt;m_iter&lt;span&gt;&amp;#41;&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span&gt;&amp;#125;&lt;/span&gt;&lt;br /&gt;
&lt;span&gt;private&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span&gt;friend&lt;/span&gt; &lt;span&gt;class&lt;/span&gt; EPub&lt;span&gt;;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span&gt;explicit&lt;/span&gt; TIterator&lt;span&gt;&amp;#40;&lt;/span&gt;&lt;span&gt;struct&lt;/span&gt; titerator&lt;span&gt;*&lt;/span&gt; iter&lt;span&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span&gt;:&lt;/span&gt; m_iter&lt;span&gt;&amp;#40;&lt;/span&gt;iter&lt;span&gt;&amp;#41;&lt;/span&gt;, m_isFirst&lt;span&gt;&amp;#40;&lt;/span&gt;&lt;span&gt;true&lt;/span&gt;&lt;span&gt;&amp;#41;&lt;/span&gt; &lt;span&gt;&amp;#123;&lt;/span&gt;&lt;span&gt;&amp;#125;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span&gt;struct&lt;/span&gt; titerator&lt;span&gt;*&lt;/span&gt; m_iter&lt;span&gt;;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span&gt;bool&lt;/span&gt; m_isFirst&lt;span&gt;;&lt;/span&gt;&lt;br /&gt;
&lt;span&gt;&amp;#125;&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Pude ter esta liberdade porque &lt;code class=&quot;codecolorer cpp default&quot;&gt;&lt;span class=&quot;cpp&quot;&gt;TIterator&lt;/span&gt;&lt;/code&gt; é uma classe completamente sob meu (eu, o desenvolvedor do binding) controle. Se &lt;code class=&quot;codecolorer cpp default&quot;&gt;&lt;span class=&quot;cpp&quot;&gt;&lt;span&gt;struct&lt;/span&gt; titerator&lt;/span&gt;&lt;/code&gt; fosse uma classe C++ desde o começo, esta solução não seria a melhor. Talvez se a &lt;strong&gt;libshiboken&lt;/strong&gt; (a biblioteca de apoio usada por todos os bindings gerados pelo Shiboken) fornecesse uma classe iteradora base para lidar com essa diferença particular entre iteradores Python e C++. Ou talvez as classes geradas, quando identificadas como iteráveis pela presença dos métodos do protocolo de iteração adicionados pelo desenvolvedor do binding, poderiam ter tal funcionalidade. A última opção me parece a melhor, e esse é mais um item pra minha lista de melhorias futuras.&lt;/p&gt;
&lt;h3&gt;Conversões Personalizadas&lt;/h3&gt;
&lt;h4&gt;Retornando valores unicode&lt;/h4&gt;
&lt;p&gt;Os métodos &lt;code class=&quot;codecolorer cpp default&quot;&gt;&lt;span class=&quot;cpp&quot;&gt;EIterator&lt;span&gt;::&lt;/span&gt;&lt;span&gt;curr&lt;/span&gt;&lt;span&gt;&amp;#40;&lt;/span&gt;&lt;span&gt;&amp;#41;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt; e &lt;code class=&quot;codecolorer cpp default&quot;&gt;&lt;span class=&quot;cpp&quot;&gt;EIterator&lt;span&gt;::&lt;/span&gt;&lt;span&gt;curr_url&lt;/span&gt;&lt;span&gt;&amp;#40;&lt;/span&gt;&lt;span&gt;&amp;#41;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt; returnam valores do tipo &lt;code class=&quot;codecolorer cpp default&quot;&gt;&lt;span class=&quot;cpp&quot;&gt;&lt;span&gt;char&lt;/span&gt;&lt;span&gt;*&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;, que não tem um conversor (&lt;code class=&quot;codecolorer cpp default&quot;&gt;&lt;span class=&quot;cpp&quot;&gt;&lt;span&gt;const&lt;/span&gt; &lt;span&gt;char&lt;/span&gt;&lt;span&gt;*&lt;/span&gt;&lt;/span&gt;&lt;/code&gt; é que tem), por isso escrevi um código específico para converter isto para unicode do Python.&lt;/p&gt;
&lt;div class=&quot;codecolorer-container xml geshi&quot;&gt;&lt;div class=&quot;xml codecolorer&quot;&gt;&lt;span&gt;&lt;span&gt;&amp;lt;?xml&lt;/span&gt; &lt;span&gt;version&lt;/span&gt;=&lt;span&gt;'1.0'&lt;/span&gt;&lt;span&gt;?&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span&gt;&lt;span&gt;&amp;lt;typesystem&lt;/span&gt; &lt;span&gt;package&lt;/span&gt;=&lt;span&gt;'epub'&lt;/span&gt;&lt;span&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; ...&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span&gt;&lt;span&gt;&amp;lt;template&lt;/span&gt; &lt;span&gt;name&lt;/span&gt;=&lt;span&gt;'return_char_pointer'&lt;/span&gt;&lt;span&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; char* %0 = %CPPSELF.%FUNCTION_NAME();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (%0) {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; %PYARG_0 = PyUnicode_DecodeUTF8(%0, strlen(%0), &amp;quot;strict&amp;quot;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; } else {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Py_INCREF(Py_None);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; %PYARG_0 = Py_None;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span&gt;&lt;span&gt;&amp;lt;/template&lt;span&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; ...&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span&gt;&lt;span&gt;&amp;lt;object-type&lt;/span&gt; &lt;span&gt;name&lt;/span&gt;=&lt;span&gt;'EIterator'&lt;/span&gt;&lt;span&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ...&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span&gt;&lt;span&gt;&amp;lt;modify-function&lt;/span&gt; &lt;span&gt;signature&lt;/span&gt;=&lt;span&gt;'curr()'&lt;/span&gt;&lt;span&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span&gt;&lt;span&gt;&amp;lt;inject-code&lt;/span&gt; &lt;span&gt;class&lt;/span&gt;=&lt;span&gt;'target'&lt;/span&gt; &lt;span&gt;position&lt;/span&gt;=&lt;span&gt;'beginning'&lt;/span&gt;&lt;span&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span&gt;&lt;span&gt;&amp;lt;insert-template&lt;/span&gt; &lt;span&gt;name&lt;/span&gt;=&lt;span&gt;'return_char_pointer'&lt;/span&gt; &lt;span&gt;/&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span&gt;&lt;span&gt;&amp;lt;/inject-code&lt;span&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span&gt;&lt;span&gt;&amp;lt;/modify-function&lt;span&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span&gt;&lt;span&gt;&amp;lt;modify-function&lt;/span&gt; &lt;span&gt;signature&lt;/span&gt;=&lt;span&gt;'curr_url()'&lt;/span&gt;&lt;span&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span&gt;&lt;span&gt;&amp;lt;inject-code&lt;/span&gt; &lt;span&gt;class&lt;/span&gt;=&lt;span&gt;'target'&lt;/span&gt; &lt;span&gt;position&lt;/span&gt;=&lt;span&gt;'beginning'&lt;/span&gt;&lt;span&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span&gt;&lt;span&gt;&amp;lt;insert-template&lt;/span&gt; &lt;span&gt;name&lt;/span&gt;=&lt;span&gt;'return_char_pointer'&lt;/span&gt; &lt;span&gt;/&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span&gt;&lt;span&gt;&amp;lt;/inject-code&lt;span&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span&gt;&lt;span&gt;&amp;lt;/modify-function&lt;span&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ...&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span&gt;&lt;span&gt;&amp;lt;/object-type&lt;span&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; ...&lt;br /&gt;
&lt;span&gt;&lt;span&gt;&amp;lt;/typesystem&lt;span&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;
&lt;h4&gt;Modificando a assinatura de um método&lt;/h4&gt;
&lt;p&gt;As assinaturas de alguns métodos C++ não podem ser automaticamente convertidas para código Python que faça sentido, então adicionei mais um pouco de código feito sob medida para tratar das situações caso a caso. Por exemplo, o método&lt;/p&gt;
&lt;div class=&quot;codecolorer-container cpp geshi&quot;&gt;&lt;div class=&quot;cpp codecolorer&quot;&gt;&lt;span&gt;unsigned&lt;/span&gt; &lt;span&gt;char&lt;/span&gt;&lt;span&gt;**&lt;/span&gt;&lt;br /&gt;
EPub&lt;span&gt;::&lt;/span&gt;&lt;span&gt;get_metadata&lt;/span&gt;&lt;span&gt;&amp;#40;&lt;/span&gt;metadata type, &lt;span&gt;int&lt;/span&gt;&lt;span&gt;*&lt;/span&gt; size&lt;span&gt;&amp;#41;&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;O argumento &lt;code class=&quot;codecolorer cpp default&quot;&gt;&lt;span class=&quot;cpp&quot;&gt;&lt;span&gt;int&lt;/span&gt;&lt;span&gt;*&lt;/span&gt; size&lt;/span&gt;&lt;/code&gt; recebe um ponteiro para um int, que conterá o tamanho da lista de strings unicode retornada como &lt;code class=&quot;codecolorer cpp default&quot;&gt;&lt;span class=&quot;cpp&quot;&gt;&lt;span&gt;unsigned&lt;/span&gt; &lt;span&gt;char&lt;/span&gt;&lt;span&gt;**&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;. Em Python ele meramente retornará uma lista de objetos unicode, e a chamada à &lt;code class=&quot;codecolorer cpp default&quot;&gt;&lt;span class=&quot;cpp&quot;&gt;get_metadata&lt;/span&gt;&lt;/code&gt; não precisa do argumento &lt;code class=&quot;codecolorer cpp default&quot;&gt;&lt;span class=&quot;cpp&quot;&gt;size&lt;/span&gt;&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Creio que a descrição do type system será o bastante para ver como o sistema de modificação funciona.&lt;/p&gt;
&lt;div class=&quot;codecolorer-container xml geshi&quot;&gt;&lt;div class=&quot;xml codecolorer&quot;&gt;&lt;span&gt;&lt;span&gt;&amp;lt;object-type&lt;/span&gt; &lt;span&gt;name&lt;/span&gt;=&lt;span&gt;'EPub'&lt;/span&gt;&lt;span&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &lt;span&gt;&lt;span&gt;&amp;lt;enum-type&lt;/span&gt; &lt;span&gt;name&lt;/span&gt;=&lt;span&gt;'metadata'&lt;/span&gt; &lt;span&gt;/&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &lt;span&gt;&lt;span&gt;&amp;lt;modify-function&lt;/span&gt; &lt;span&gt;signature&lt;/span&gt;=&lt;span&gt;'get_metadata(EPub::metadata,int*)'&lt;/span&gt;&lt;span&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span&gt;&lt;span&gt;&amp;lt;modify-argument&lt;/span&gt; &lt;span&gt;index&lt;/span&gt;=&lt;span&gt;'2'&lt;/span&gt;&lt;span&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span&gt;&lt;span&gt;&amp;lt;remove-argument&lt;/span&gt; &lt;span&gt;/&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span&gt;&lt;span&gt;&amp;lt;/modify-argument&lt;span&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span&gt;&lt;span&gt;&amp;lt;modify-argument&lt;/span&gt; &lt;span&gt;index&lt;/span&gt;=&lt;span&gt;'return'&lt;/span&gt;&lt;span&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span&gt;&lt;span&gt;&amp;lt;replace-type&lt;/span&gt; &lt;span&gt;modified-type&lt;/span&gt;=&lt;span&gt;'PyTuple'&lt;/span&gt; &lt;span&gt;/&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span&gt;&lt;span&gt;&amp;lt;/modify-argument&lt;span&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span&gt;&lt;span&gt;&amp;lt;inject-code&lt;/span&gt; &lt;span&gt;class&lt;/span&gt;=&lt;span&gt;'target'&lt;/span&gt;&lt;span&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; unsigned char** data = 0;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; int size;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; data = %CPPSELF.%FUNCTION_NAME(%1, &lt;span&gt;&amp;amp;size);&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; if (data) {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; %PYARG_0 = PyTuple_New(size);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; PyObject* uni = 0;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; for (int i = 0; i &lt;span&gt;&amp;lt; size; ++i&lt;span&gt;&amp;#41;&lt;/span&gt; &lt;span&gt;&amp;#123;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;uni = PyUnicode_DecodeUTF8&lt;span&gt;&amp;#40;&lt;/span&gt;&lt;span&gt;&amp;#40;&lt;/span&gt;const char*&lt;span&gt;&amp;#41;&lt;/span&gt;data&lt;span&gt;&amp;#91;&lt;/span&gt;i&lt;span&gt;&amp;#93;&lt;/span&gt;,&lt;/span&gt;&lt;br /&gt;
&lt;span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; strlen&lt;span&gt;&amp;#40;&lt;/span&gt;&lt;span&gt;&amp;#40;&lt;/span&gt;const char*&lt;span&gt;&amp;#41;&lt;/span&gt;data&lt;span&gt;&amp;#91;&lt;/span&gt;i&lt;span&gt;&amp;#93;&lt;/span&gt;&lt;span&gt;&amp;#41;&lt;/span&gt;,&lt;/span&gt;&lt;br /&gt;
&lt;span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span&gt;&amp;quot;strict&amp;quot;&lt;/span&gt;&lt;span&gt;&amp;#41;&lt;/span&gt;;&lt;/span&gt;&lt;br /&gt;
&lt;span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;PyTuple_SetItem&lt;span&gt;&amp;#40;&lt;/span&gt;%PYARG_0, i, uni&lt;span&gt;&amp;#41;&lt;/span&gt;;&lt;/span&gt;&lt;br /&gt;
&lt;span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span&gt;&amp;#125;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;for &lt;span&gt;&amp;#40;&lt;/span&gt;int i = 0; i &amp;lt; size; ++i&lt;span&gt;&amp;#41;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;free&lt;span&gt;&amp;#40;&lt;/span&gt;data&lt;span&gt;&amp;#91;&lt;/span&gt;i&lt;span&gt;&amp;#93;&lt;/span&gt;&lt;span&gt;&amp;#41;&lt;/span&gt;;&lt;/span&gt;&lt;br /&gt;
&lt;span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;free&lt;span&gt;&amp;#40;&lt;/span&gt;data&lt;span&gt;&amp;#41;&lt;/span&gt;;&lt;/span&gt;&lt;br /&gt;
&lt;span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span&gt;&amp;#125;&lt;/span&gt; else &lt;span&gt;&amp;#123;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Py_INCREF&lt;span&gt;&amp;#40;&lt;/span&gt;Py_None&lt;span&gt;&amp;#41;&lt;/span&gt;;&lt;/span&gt;&lt;br /&gt;
&lt;span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;%PYARG_0 = Py_None;&lt;/span&gt;&lt;br /&gt;
&lt;span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span&gt;&amp;#125;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span&gt; &amp;nbsp; &amp;nbsp;&lt;span&gt;&amp;lt;/inject-code&lt;span&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &lt;span&gt;&lt;span&gt;&amp;lt;/modify-function&lt;span&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; ...&lt;br /&gt;
&lt;span&gt;&lt;span&gt;&amp;lt;/object-type&lt;span&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;
&lt;h2&gt;Baixando, compilando, etc.&lt;/h2&gt;
&lt;p&gt;Chega de explicações, agora vamos experimentar o código. Lembre-se que precisará também dos arquivos de desenvolvimento que mencionei muito tempo atrás&lt;/p&gt;
&lt;p&gt;Clone a versão mais recente do repositório git:&lt;/p&gt;
&lt;div class=&quot;codecolorer-container bash geshi&quot;&gt;&lt;div class=&quot;bash codecolorer&quot;&gt;&lt;span&gt;git&lt;/span&gt; clone &lt;span&gt;git&lt;/span&gt;:&lt;span&gt;//&lt;/span&gt;github.com&lt;span&gt;/&lt;/span&gt;setanta&lt;span&gt;/&lt;/span&gt;python-epub.git&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;ou baixe o tarball: &lt;a href=&quot;http://setantas.net/files/python-epub.tar.bz2&quot;&gt;python-epub.tar.bz2&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;No diretório do código fonte crie um diretório &lt;code class=&quot;codecolorer bash default&quot;&gt;&lt;span class=&quot;bash&quot;&gt;build&lt;/span&gt;&lt;/code&gt; e&amp;#8230;&lt;/p&gt;
&lt;div class=&quot;codecolorer-container bash geshi&quot;&gt;&lt;div class=&quot;bash codecolorer&quot;&gt;&lt;span&gt;cd&lt;/span&gt; python-epub&lt;br /&gt;
&lt;span&gt;mkdir&lt;/span&gt; build&lt;br /&gt;
&lt;span&gt;cd&lt;/span&gt; build&lt;br /&gt;
cmake ..&lt;br /&gt;
&lt;span&gt;make&lt;/span&gt;&lt;br /&gt;
ctest&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;O último comando merece uma conversa à respeito.&lt;/p&gt;
&lt;h3&gt;Testar, Testar, Testar&lt;/h3&gt;
&lt;p&gt;Quando trabalhando com desenvolvimento de bindings há uma miríade de coisas que podem dar errado, e muitas delas dão errado em completo silêncio. Tendo isto em mente, eu digo-lhe que ter testes de unidade torna a vida do desenvolvedor de bindings suportável.&lt;/p&gt;
&lt;p&gt;Veja o &lt;a href=&quot;https://github.com/setanta/python-epub/tree/master/tests&quot;&gt;diretório de testes&lt;/a&gt; para exemplos de como usar o bingind python-epub.&lt;/p&gt;
&lt;p&gt;Para resultados detalhados dos testes, rode ctest com a opção &lt;code class=&quot;codecolorer bash default&quot;&gt;&lt;span class=&quot;bash&quot;&gt;&lt;span&gt;-V&lt;/span&gt;&lt;/span&gt;&lt;/code&gt; (verboso).&lt;/p&gt;
&lt;h2&gt;Exemplo de UI (senão seria tedioso)&lt;/h2&gt;
&lt;p&gt;Mas a própria UI é bem tediosa, embora feita com o espetacular &lt;a href=&quot;http://www.pyside.org&quot;&gt;PySide&lt;/a&gt;, ela nem sequer mostra imagens. Por outro lado, com um pouco de código agora posso ver o conteúdo de um ebook ePub.&lt;/p&gt;
&lt;p&gt;De dentro do diretório &lt;code class=&quot;codecolorer bash default&quot;&gt;&lt;span class=&quot;bash&quot;&gt;python-epub&lt;span&gt;/&lt;/span&gt;build&lt;/span&gt;&lt;/code&gt; chame o visualizador de ePub dessa forma:&lt;/p&gt;
&lt;div class=&quot;codecolorer-container bash geshi&quot;&gt;&lt;div class=&quot;bash codecolorer&quot;&gt;python ..&lt;span&gt;/&lt;/span&gt;simple-ui&lt;span&gt;/&lt;/span&gt;bookviewer.py ..&lt;span&gt;/&lt;/span&gt;tests&lt;span&gt;/&lt;/span&gt;beyond-the-wall-of-sleep.epub&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Ele sempre espera um parâmetro com o caminho para um arquivo ePub, neste caso &lt;a href=&quot;http://www.feedbooks.com/book/237/beyond-the-wall-of-sleep&quot;&gt;&amp;#8220;Beyond the Wall of Sleep&amp;#8221;&lt;/a&gt; de &lt;a href=&quot;http://www.feedbooks.com/author/12&quot;&gt;Lovecraft&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Screenshots:&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;http://www.setantas.net/blog/wp-content/uploads/2011/03/epubviewer_screenshots.png&quot; alt=&quot;Simplest ePub viewer (made with PySide)&quot; width=&quot;580&quot; height=&quot;480&quot; class=&quot;size-full wp-image-516&quot; /&gt;&lt;/p&gt;
&lt;p&gt;&lt;map name=&quot;google_ad_map_517_74ab9b1e764918ae&quot;&gt;
&lt;area shape=&quot;rect&quot; href=&quot;http://imageads.googleadservices.com/pagead/imgclick/517?pos=0&quot; coords=&quot;1,2,367,28&quot; /&gt;
&lt;area shape=&quot;rect&quot; href=&quot;http://services.google.com/feedback/abg&quot; coords=&quot;384,10,453,23&quot; /&gt;&lt;/map&gt;
&lt;img usemap=&quot;http://www.setantas.net/blog/feed/#google_ad_map_517_74ab9b1e764918ae&quot; border=&quot;0&quot; src=&quot;http://imageads.googleadservices.com/pagead/ads?format=468x30_aff_img&amp;client=&amp;channel=&amp;output=png&amp;cuid=517&amp;url= http%3A%2F%2Fwww.setantas.net%2Fblog%2F2011%2F03%2F09%2Fpython-bindings-para-libepub-usando-shiboken%2F&quot; /&gt;&lt;/p&gt;&lt;div&gt;&lt;a href=&quot;http://twitter.com/share?url=http://www.setantas.net/blog/2011/03/09/python-bindings-para-libepub-usando-shiboken/&amp;via=&amp;text=Python bindings para libepub usando Shiboken&amp;related=:&amp;lang=en&amp;count=horizontal&quot; class=&quot;twitter-share-button&quot;&gt;Tweet&lt;/a&gt;&lt;/div&gt;</content:encoded>
	<dc:date>2011-03-09T03:10:12+00:00</dc:date>
</item>
<item rdf:about="http://www.setantas.net/blog/?p=512">
	<title>Marcelo Lira: Python bindings for libepub using Shiboken</title>
	<link>http://www.setantas.net/blog/2011/03/08/python-bindings-for-libepub-using-shiboken/</link>
	<content:encoded>&lt;p&gt;I have a &lt;a href=&quot;http://twitpic.com/3ucxtj&quot;&gt;Kindle&lt;/a&gt;, I like it very much, but unfortunately I can&amp;#8217;t say the same about the format it used for books. Not that I have made a detailed study of the mobi format and came to the conclusion that it is technically inferior. No. The problem is that &lt;a title=&quot;Wikipedia: ePub&quot; href=&quot;http://en.wikipedia.org/wiki/EPUB&quot;&gt;ePub&lt;/a&gt; is so much more popular, which mean more books, and more tools to play with. &lt;a href=&quot;http://calibre-ebook.com/&quot;&gt;Calibre&lt;/a&gt; is awesome to convert between eBook formats, but I prefer the simplicity of downloading a book, copying it to the device and reading right away.&lt;/p&gt;
&lt;p&gt;When my Kindle is not at hand, my replacement reader is a N900 with &lt;a title=&quot;eBook reader for Maemo 5&quot; href=&quot;http://juhanagsoc.wordpress.com/&quot;&gt;MeBook&lt;/a&gt;, one of my favorite apps &amp;#8211; it looks for books (in ePub format) on &lt;a title=&quot;Feedbooks&quot; href=&quot;http://www.feedbooks.com/&quot;&gt;Feedbooks&lt;/a&gt;, downloads to device and show them in a nice list with covers and all. Looking at MeBook source code I learned that it uses &lt;a title=&quot;eBook tools&quot; href=&quot;http://sourceforge.net/projects/ebook-tools/&quot;&gt;libepub&lt;/a&gt; to read the ePub eBooks, so I thought it would be interesting to make a Python binding to &lt;strong&gt;libepub&lt;/strong&gt;. And here we are.&lt;/p&gt;
&lt;p&gt;Ah, and one more thing before we start, I found a related Python project on github called &lt;a href=&quot;https://github.com/jharjono/libepub&quot;&gt;libepub&lt;/a&gt;. Hadn&amp;#8217;t checked it yet, but I mention it here for information&amp;#8217;s sake.&lt;/p&gt;
&lt;h2&gt;Shiboken&lt;/h2&gt;
&lt;p&gt;&lt;a title=&quot;Shiboken&quot; href=&quot;http://www.setantas.net/blog/2009/08/31/shiboken/&quot; target=&quot;_self&quot;&gt;Shiboken&lt;/a&gt; is the world famous tool used to generate the world famous &lt;a title=&quot;PySide&quot; href=&quot;http://pyside.org&quot;&gt;PySide&lt;/a&gt; bindings (that happen to have reached &lt;a title=&quot;PySide: Python for Qt 1.0 released!&quot; href=&quot;http://www.pyside.org/2011/03/pyside-python-for-qt-1-0-released/&quot;&gt;1.0&lt;/a&gt; last week &amp;#8211; yay!) It is one of the best tools around to generate Python bindings for C++ libraries. But that&amp;#8217;s me talking &amp;#8211; I work on it. But &lt;strong&gt;libepub&lt;/strong&gt; is written in C, and even though Shiboken can generate bindings for a bunch of global functions and put them together in a Python module, that&amp;#8217;s crappy. So I&amp;#8217;ll have to make some preparations to make &lt;strong&gt;libepub&lt;/strong&gt; appear beautiful in Python.&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;&lt;strong&gt;Pre-requisites:&lt;/strong&gt; development files (i.e. the headers) for &lt;a title=&quot;API Extractor&quot; href=&quot;http://www.pyside.org/home-binding/api-extractor/&quot;&gt;ApiExtractor&lt;/a&gt;, &lt;a title=&quot;GeneratorRunner 0.6&quot; href=&quot;http://pyside.org/docs/generatorrunner/&quot;&gt;GeneratorRunner&lt;/a&gt;, &lt;a title=&quot;Shiboken&quot; href=&quot;http://pyside.org/docs/shiboken/&quot;&gt;Shiboken&lt;/a&gt;, and &lt;strong&gt;libepub&lt;/strong&gt;. (For Debian/Ubuntu users this means: &lt;strong&gt;libapiextractor-dev&lt;/strong&gt;, &lt;strong&gt;libgenrunner-dev&lt;/strong&gt;, &lt;strong&gt;libshiboken-dev&lt;/strong&gt;, and &lt;strong&gt;libepub-dev&lt;/strong&gt;.) And the C++ compiler plus CMake, of course.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Remainder:&lt;/strong&gt; ApiExtractor, GeneratorRunner and Shiboken are made with Qt (only the core libs, no ui for them), but the bindings generated do not depend on Qt at all. Except, obviously, if the library being wrapped already does.&lt;/p&gt;
&lt;h3&gt;libepub&lt;/h3&gt;
&lt;p&gt;First let&amp;#8217;s have an overview of &lt;strong&gt;libepub&lt;/strong&gt;. It has three structures used as opaque pointers:&lt;/p&gt;
&lt;div class=&quot;codecolorer-container cpp geshi&quot;&gt;&lt;div class=&quot;cpp codecolorer&quot;&gt;&lt;span&gt;// Contains information about the ePub file.&lt;/span&gt;&lt;br /&gt;
&lt;span&gt;struct&lt;/span&gt; epub&lt;span&gt;;&lt;/span&gt;&lt;br /&gt;
&lt;span&gt;// Iterator object for the Table of Contents.&lt;/span&gt;&lt;br /&gt;
&lt;span&gt;struct&lt;/span&gt; titerator&lt;span&gt;;&lt;/span&gt;&lt;br /&gt;
&lt;span&gt;// Iterator object for the book contents.&lt;/span&gt;&lt;br /&gt;
&lt;span&gt;struct&lt;/span&gt; eiterator&lt;span&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;If you want to read the contents of an ePub file, call the function that will create an epub structure, iterate through its table of contents with a titerator, and then the contents themselves with an eiterator.&lt;/p&gt;
&lt;p&gt;Most functions follow that &amp;#8220;object oriented C&amp;#8221; format seen in other libraries, with the first argument being a pointer to the structure that represents the &lt;em&gt;&amp;#8220;this&amp;#8221;&lt;/em&gt; or &lt;em&gt;&amp;#8220;self&amp;#8221;&lt;/em&gt; in OO languages. Examples:&lt;/p&gt;
&lt;div class=&quot;codecolorer-container cpp geshi&quot;&gt;&lt;div class=&quot;cpp codecolorer&quot;&gt;&lt;span&gt;void&lt;/span&gt;&lt;br /&gt;
epub_dump&lt;span&gt;&amp;#40;&lt;/span&gt;&lt;span&gt;struct&lt;/span&gt; epub&lt;span&gt;*&lt;/span&gt; epub&lt;span&gt;&amp;#41;&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span&gt;unsigned&lt;/span&gt; &lt;span&gt;char&lt;/span&gt;&lt;span&gt;**&lt;/span&gt;&lt;br /&gt;
epub_get_metadata&lt;span&gt;&amp;#40;&lt;/span&gt;&lt;span&gt;struct&lt;/span&gt; epub&lt;span&gt;*&lt;/span&gt; epub,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span&gt;enum&lt;/span&gt; epub_metadata type,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span&gt;int&lt;/span&gt;&lt;span&gt;*&lt;/span&gt; size&lt;span&gt;&amp;#41;&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span&gt;int&lt;/span&gt;&lt;br /&gt;
epub_get_data&lt;span&gt;&amp;#40;&lt;/span&gt;&lt;span&gt;struct&lt;/span&gt; epub&lt;span&gt;*&lt;/span&gt; epub,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span&gt;const&lt;/span&gt; &lt;span&gt;char&lt;/span&gt;&lt;span&gt;*&lt;/span&gt; name,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span&gt;char&lt;/span&gt;&lt;span&gt;**&lt;/span&gt; data&lt;span&gt;&amp;#41;&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;
&lt;h3&gt;CMake&lt;/h3&gt;
&lt;p&gt;I&amp;#8217;ll use CMake as the build system for the bindings because I feel comfortable with it &amp;#8211; it is the same used in PySide and all the Shiboken generator tool chain. I&amp;#8217;ll not give too much attention to this part of the process, just check the &lt;strong&gt;CMakeLists.txt&lt;/strong&gt; files; more detailed explanation on the process of building a binding can be found in the &lt;a title=&quot;PySide Binding Generation Tutorial&quot; href=&quot;http://developer.qt.nokia.com/wiki/Category:LanguageBindings::PySide::Shiboken::PySide_Binding_Generation_Tutorial&quot;&gt;PySide Binding Generation Tutorial&lt;/a&gt;. For really really basic information check &lt;a title=&quot;PySide CMake Primer&quot; href=&quot;http://developer.qt.nokia.com/wiki/PySide_CMake_Primer&quot;&gt;PySide CMake Primer&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt;Handmade C++ Wrapper for a C library&lt;/h2&gt;
&lt;p&gt;To generate Python bindings for a C++ library one must write a XML description called type system, which will declare what must be exposed on Python land, and if any of this needs modification: global functions, classes, namespaces, enums. For example, if in C++ I have the class &lt;code class=&quot;codecolorer cpp default&quot;&gt;&lt;span class=&quot;cpp&quot;&gt;Rectangle&lt;/span&gt;&lt;/code&gt;, I would declare it in the type system this way:&lt;/p&gt;
&lt;div class=&quot;codecolorer-container xml geshi&quot;&gt;&lt;div class=&quot;xml codecolorer&quot;&gt;&lt;span&gt;&lt;span&gt;&amp;lt;value-type&lt;/span&gt; &lt;span&gt;name&lt;/span&gt;=&lt;span&gt;'Rectangle'&lt;/span&gt; &lt;span&gt;/&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;All the methods belonging to &lt;code class=&quot;codecolorer cpp default&quot;&gt;&lt;span class=&quot;cpp&quot;&gt;Rectangle&lt;/span&gt;&lt;/code&gt; would be exposed to Python automatically. The same is not true for the C functions that representing the methods for the epub struct. Unfortunately there&amp;#8217;s no way to tell the Shiboken generator that I want to have the epub structure and functions represented as a class with methods, so we have to make a thin C++ wrapper around the C structures. That would be a lot of work for a huge C library, but even with a tiny one I feel uncomfortable having to resort for this kind of hackery. The type system should be expressive enough to bind C structs and functions as if they were proper objects with methods. I&amp;#8217;ll mark this for future community/out-of-work improvements on Shiboken.&lt;/p&gt;
&lt;p&gt;Let&amp;#8217;s see a snippet from &lt;a title=&quot;epub_cpp_wrappers.h @ 757d8dc&quot; href=&quot;https://github.com/setanta/python-epub/blob/757d8dcd34943dd71495959a81fb15ce07896898/epub_cpp_wrappers.h&quot;&gt;epub_cpp_wrapper.h&lt;/a&gt;:&lt;/p&gt;
&lt;div class=&quot;codecolorer-container cpp geshi&quot;&gt;&lt;div class=&quot;cpp codecolorer&quot;&gt;&lt;span&gt;class&lt;/span&gt; EPub &lt;span&gt;&amp;#123;&lt;/span&gt;&lt;br /&gt;
&lt;span&gt;public&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; ...&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; ~EPub&lt;span&gt;&amp;#40;&lt;/span&gt;&lt;span&gt;&amp;#41;&lt;/span&gt; &lt;span&gt;&amp;#123;&lt;/span&gt; epub_close&lt;span&gt;&amp;#40;&lt;/span&gt;m_epub&lt;span&gt;&amp;#41;&lt;/span&gt;&lt;span&gt;;&lt;/span&gt; &lt;span&gt;&amp;#125;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span&gt;static&lt;/span&gt; &lt;span&gt;inline&lt;/span&gt; EPub&lt;span&gt;*&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; open&lt;span&gt;&amp;#40;&lt;/span&gt;&lt;span&gt;const&lt;/span&gt; &lt;span&gt;char&lt;/span&gt;&lt;span&gt;*&lt;/span&gt; filename, &lt;span&gt;int&lt;/span&gt; debug &lt;span&gt;=&lt;/span&gt; &lt;span&gt;0&lt;/span&gt;&lt;span&gt;&amp;#41;&lt;/span&gt; &lt;span&gt;&amp;#123;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span&gt;struct&lt;/span&gt; epub&lt;span&gt;*&lt;/span&gt; book &lt;span&gt;=&lt;/span&gt; epub_open&lt;span&gt;&amp;#40;&lt;/span&gt;filename, debug&lt;span&gt;&amp;#41;&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span&gt;if&lt;/span&gt; &lt;span&gt;&amp;#40;&lt;/span&gt;book&lt;span&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span&gt;return&lt;/span&gt; &lt;span&gt;new&lt;/span&gt; EPub&lt;span&gt;&amp;#40;&lt;/span&gt;book&lt;span&gt;&amp;#41;&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span&gt;return&lt;/span&gt; &lt;span&gt;0&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span&gt;&amp;#125;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; ...&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span&gt;inline&lt;/span&gt; &lt;span&gt;void&lt;/span&gt; dump&lt;span&gt;&amp;#40;&lt;/span&gt;&lt;span&gt;&amp;#41;&lt;/span&gt; &lt;span&gt;&amp;#123;&lt;/span&gt; epub_dump&lt;span&gt;&amp;#40;&lt;/span&gt;m_epub&lt;span&gt;&amp;#41;&lt;/span&gt;&lt;span&gt;;&lt;/span&gt; &lt;span&gt;&amp;#125;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span&gt;inline&lt;/span&gt; &lt;span&gt;int&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; get_data&lt;span&gt;&amp;#40;&lt;/span&gt;&lt;span&gt;const&lt;/span&gt; &lt;span&gt;char&lt;/span&gt;&lt;span&gt;*&lt;/span&gt; name, &lt;span&gt;char&lt;/span&gt;&lt;span&gt;**&lt;/span&gt; data&lt;span&gt;&amp;#41;&lt;/span&gt; &lt;span&gt;&amp;#123;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span&gt;return&lt;/span&gt; epub_get_data&lt;span&gt;&amp;#40;&lt;/span&gt;m_epub, name, data&lt;span&gt;&amp;#41;&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span&gt;&amp;#125;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; ...&lt;br /&gt;
&lt;br /&gt;
&lt;span&gt;private&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span&gt;explicit&lt;/span&gt; EPub&lt;span&gt;&amp;#40;&lt;/span&gt;&lt;span&gt;struct&lt;/span&gt; epub&lt;span&gt;*&lt;/span&gt; ptr&lt;span&gt;&amp;#41;&lt;/span&gt; &lt;span&gt;:&lt;/span&gt; m_epub&lt;span&gt;&amp;#40;&lt;/span&gt;ptr&lt;span&gt;&amp;#41;&lt;/span&gt; &lt;span&gt;&amp;#123;&lt;/span&gt;&lt;span&gt;&amp;#125;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; EPub&lt;span&gt;&amp;#40;&lt;/span&gt;&lt;span&gt;const&lt;/span&gt; EPub&lt;span&gt;&amp;amp;&lt;/span&gt;amp&lt;span&gt;;&lt;/span&gt; other&lt;span&gt;&amp;#41;&lt;/span&gt; &lt;span&gt;&amp;#123;&lt;/span&gt;&lt;span&gt;&amp;#125;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; EPub&lt;span&gt;&amp;amp;&lt;/span&gt;amp&lt;span&gt;;&lt;/span&gt; operator&lt;span&gt;=&lt;/span&gt;&lt;span&gt;&amp;#40;&lt;/span&gt;&lt;span&gt;const&lt;/span&gt; EPub&lt;span&gt;&amp;amp;&lt;/span&gt;amp&lt;span&gt;;&lt;/span&gt; other&lt;span&gt;&amp;#41;&lt;/span&gt; &lt;span&gt;&amp;#123;&lt;/span&gt;&lt;span&gt;&amp;#125;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span&gt;struct&lt;/span&gt; epub&lt;span&gt;*&lt;/span&gt; m_epub&lt;span&gt;;&lt;/span&gt;&lt;br /&gt;
&lt;span&gt;&amp;#125;&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Notice that all methods were marked as &lt;code class=&quot;codecolorer cpp default&quot;&gt;&lt;span class=&quot;cpp&quot;&gt;&lt;span&gt;inline&lt;/span&gt;&lt;/span&gt;&lt;/code&gt; to make this wrapper as thinner as possible. (GCC, I&amp;#8217;m looking at you!)&lt;/p&gt;
&lt;h3&gt;Epub::open&lt;/h3&gt;
&lt;p&gt;The &lt;code class=&quot;codecolorer cpp default&quot;&gt;&lt;span class=&quot;cpp&quot;&gt;epub_open&lt;/span&gt;&lt;/code&gt; function becomes the static method &lt;code class=&quot;codecolorer cpp default&quot;&gt;&lt;span class=&quot;cpp&quot;&gt;EPub&lt;span&gt;::&lt;/span&gt;&lt;span&gt;open&lt;/span&gt;&lt;/span&gt;&lt;/code&gt; that will return a new &lt;code class=&quot;codecolorer cpp default&quot;&gt;&lt;span class=&quot;cpp&quot;&gt;EPub&lt;/span&gt;&lt;/code&gt; object for the ePub file given by &lt;code class=&quot;codecolorer cpp default&quot;&gt;&lt;span class=&quot;cpp&quot;&gt;filename&lt;/span&gt;&lt;/code&gt; parameter, or a null pointer if the file is invalid or doesn&amp;#8217;t exist.&lt;br /&gt;
The constructor for this class was made private so the only way to create EPub objects is via &lt;code class=&quot;codecolorer cpp default&quot;&gt;&lt;span class=&quot;cpp&quot;&gt;EPub&lt;span&gt;::&lt;/span&gt;&lt;span&gt;open&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;, that&amp;#8217;ll never create an invalid &lt;code class=&quot;codecolorer cpp default&quot;&gt;&lt;span class=&quot;cpp&quot;&gt;EPub&lt;/span&gt;&lt;/code&gt;.&lt;/p&gt;
&lt;h3&gt;~Epub&lt;/h3&gt;
&lt;p&gt;In C the responsible for freeing the epub structure is &lt;strong&gt;epub_close&lt;/strong&gt;, but I&amp;#8217;ll not make it &lt;code class=&quot;codecolorer cpp default&quot;&gt;&lt;span class=&quot;cpp&quot;&gt;EPub&lt;span&gt;::&lt;/span&gt;&lt;span&gt;close&lt;/span&gt;&lt;span&gt;&amp;#40;&lt;/span&gt;&lt;span&gt;&amp;#41;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt; because the C++ equivalent for it is the class&amp;#8217; destructor.&lt;/p&gt;
&lt;p&gt;A generated Python binding for what we have until now would look roughly like this:&lt;/p&gt;
&lt;div class=&quot;codecolorer-container python geshi&quot;&gt;&lt;div class=&quot;python codecolorer&quot;&gt;&lt;span&gt;import&lt;/span&gt; epub&lt;br /&gt;
book = epub.&lt;span&gt;EPub&lt;/span&gt;.&lt;span&gt;open&lt;/span&gt;&lt;span&gt;&amp;#40;&lt;/span&gt;&lt;span&gt;'sample.epub'&lt;/span&gt;&lt;span&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;
title = book.&lt;span&gt;get_metadata&lt;/span&gt;&lt;span&gt;&amp;#40;&lt;/span&gt;epub.&lt;span&gt;EPUB_TITLE&lt;/span&gt;&lt;span&gt;&amp;#41;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Of course I didn&amp;#8217;t explained how this would be generated, that the module would be called &lt;code class=&quot;codecolorer python default&quot;&gt;&lt;span class=&quot;python&quot;&gt;epub&lt;/span&gt;&lt;/code&gt;, what is &lt;code class=&quot;codecolorer python default&quot;&gt;&lt;span class=&quot;python&quot;&gt;epub.&lt;span&gt;EPUB_TITLE&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;, and how Python would know what to do with &lt;code class=&quot;codecolorer cpp default&quot;&gt;&lt;span class=&quot;cpp&quot;&gt;&lt;span&gt;unsigned&lt;/span&gt; &lt;span&gt;char&lt;/span&gt;&lt;span&gt;**&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;, but bear with me.&lt;/p&gt;
&lt;h3&gt;Moving enums around&lt;/h3&gt;
&lt;p&gt;&lt;code class=&quot;codecolorer cpp default&quot;&gt;&lt;span class=&quot;cpp&quot;&gt;EPUB_TITLE&lt;/span&gt;&lt;/code&gt; is a value from the &lt;code class=&quot;codecolorer cpp default&quot;&gt;&lt;span class=&quot;cpp&quot;&gt;epub_metadata&lt;/span&gt;&lt;/code&gt; enum, if exposed to Python as they are, they&amp;#8217;ll look like this:&lt;/p&gt;
&lt;div class=&quot;codecolorer-container python geshi&quot;&gt;&lt;div class=&quot;python codecolorer&quot;&gt;&lt;span&gt;import&lt;/span&gt; epub&lt;br /&gt;
epub.&lt;span&gt;epub_metadata&lt;/span&gt;&lt;br /&gt;
epub.&lt;span&gt;EPUB_TITLE&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Which is pretty ugly and lame. Since &lt;strong&gt;epub_metadata&lt;/strong&gt; is an enum related to the epub object (as the &lt;strong&gt;epub_&lt;/strong&gt; prefix tells us), it would be natural that it was moved inside the EPub class. In my fantasy world, the type system tag that describes a C++ enum to Python would have the option to move it inside another object, and also to be renamed. Something along these lines:&lt;/p&gt;
&lt;div class=&quot;codecolorer-container xml geshi&quot;&gt;&lt;div class=&quot;xml codecolorer&quot;&gt;&lt;span&gt;&lt;span&gt;&amp;lt;enum-type&lt;/span&gt; &lt;span&gt;name&lt;/span&gt;=&lt;span&gt;'epub_metadata'&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span&gt;rename&lt;/span&gt;=&lt;span&gt;'metatada'&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span&gt;move-into&lt;/span&gt;=&lt;span&gt;'EPub'&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span&gt;remove-enum-value-prefix&lt;/span&gt;=&lt;span&gt;'EPUB_'&lt;/span&gt; &lt;span&gt;/&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;And here I have another thing for a Shiboken TODO list. While this feature is not implemented, I&amp;#8217;ll have to do it manually.&lt;/p&gt;
&lt;div class=&quot;codecolorer-container cpp geshi&quot;&gt;&lt;div class=&quot;cpp codecolorer&quot;&gt;&lt;span&gt;class&lt;/span&gt; EPub &lt;span&gt;&amp;#123;&lt;/span&gt;&lt;br /&gt;
&lt;span&gt;public&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span&gt;enum&lt;/span&gt; metadata &lt;span&gt;&amp;#123;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ID &lt;span&gt;=&lt;/span&gt; &lt;span&gt;int&lt;/span&gt;&lt;span&gt;&amp;#40;&lt;/span&gt;EPUB_ID&lt;span&gt;&amp;#41;&lt;/span&gt;,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TITLE &lt;span&gt;=&lt;/span&gt; &lt;span&gt;int&lt;/span&gt;&lt;span&gt;&amp;#40;&lt;/span&gt;EPUB_TITLE&lt;span&gt;&amp;#41;&lt;/span&gt;,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; CREATOR &lt;span&gt;=&lt;/span&gt; &lt;span&gt;int&lt;/span&gt;&lt;span&gt;&amp;#40;&lt;/span&gt;EPUB_CREATOR&lt;span&gt;&amp;#41;&lt;/span&gt;,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; CONTRIB &lt;span&gt;=&lt;/span&gt; &lt;span&gt;int&lt;/span&gt;&lt;span&gt;&amp;#40;&lt;/span&gt;EPUB_CONTRIB&lt;span&gt;&amp;#41;&lt;/span&gt;,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; SUBJECT &lt;span&gt;=&lt;/span&gt; &lt;span&gt;int&lt;/span&gt;&lt;span&gt;&amp;#40;&lt;/span&gt;EPUB_SUBJECT&lt;span&gt;&amp;#41;&lt;/span&gt;,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; PUBLISHER &lt;span&gt;=&lt;/span&gt; &lt;span&gt;int&lt;/span&gt;&lt;span&gt;&amp;#40;&lt;/span&gt;EPUB_PUBLISHER&lt;span&gt;&amp;#41;&lt;/span&gt;,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; DESCRIPTION &lt;span&gt;=&lt;/span&gt; &lt;span&gt;int&lt;/span&gt;&lt;span&gt;&amp;#40;&lt;/span&gt;EPUB_DESCRIPTION&lt;span&gt;&amp;#41;&lt;/span&gt;,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; DATE &lt;span&gt;=&lt;/span&gt; &lt;span&gt;int&lt;/span&gt;&lt;span&gt;&amp;#40;&lt;/span&gt;EPUB_DATE&lt;span&gt;&amp;#41;&lt;/span&gt;,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TYPE &lt;span&gt;=&lt;/span&gt; &lt;span&gt;int&lt;/span&gt;&lt;span&gt;&amp;#40;&lt;/span&gt;EPUB_TYPE&lt;span&gt;&amp;#41;&lt;/span&gt;,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; FORMAT &lt;span&gt;=&lt;/span&gt; &lt;span&gt;int&lt;/span&gt;&lt;span&gt;&amp;#40;&lt;/span&gt;EPUB_FORMAT&lt;span&gt;&amp;#41;&lt;/span&gt;,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; SOURCE &lt;span&gt;=&lt;/span&gt; &lt;span&gt;int&lt;/span&gt;&lt;span&gt;&amp;#40;&lt;/span&gt;EPUB_SOURCE&lt;span&gt;&amp;#41;&lt;/span&gt;,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; LANG &lt;span&gt;=&lt;/span&gt; &lt;span&gt;int&lt;/span&gt;&lt;span&gt;&amp;#40;&lt;/span&gt;EPUB_LANG&lt;span&gt;&amp;#41;&lt;/span&gt;,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; RELATION &lt;span&gt;=&lt;/span&gt; &lt;span&gt;int&lt;/span&gt;&lt;span&gt;&amp;#40;&lt;/span&gt;EPUB_RELATION&lt;span&gt;&amp;#41;&lt;/span&gt;,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; COVERAGE &lt;span&gt;=&lt;/span&gt; &lt;span&gt;int&lt;/span&gt;&lt;span&gt;&amp;#40;&lt;/span&gt;EPUB_COVERAGE&lt;span&gt;&amp;#41;&lt;/span&gt;,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; RIGHTS &lt;span&gt;=&lt;/span&gt; &lt;span&gt;int&lt;/span&gt;&lt;span&gt;&amp;#40;&lt;/span&gt;EPUB_RIGHTS&lt;span&gt;&amp;#41;&lt;/span&gt;,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; META &lt;span&gt;=&lt;/span&gt; &lt;span&gt;int&lt;/span&gt;&lt;span&gt;&amp;#40;&lt;/span&gt;EPUB_META&lt;span&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span&gt;&amp;#125;&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; ...&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span&gt;inline&lt;/span&gt; &lt;span&gt;unsigned&lt;/span&gt; &lt;span&gt;char&lt;/span&gt;&lt;span&gt;**&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; get_metadata&lt;span&gt;&amp;#40;&lt;/span&gt;metadata type, &lt;span&gt;int&lt;/span&gt;&lt;span&gt;*&lt;/span&gt; size&lt;span&gt;&amp;#41;&lt;/span&gt; &lt;span&gt;&amp;#123;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span&gt;return&lt;/span&gt; epub_get_metadata&lt;span&gt;&amp;#40;&lt;/span&gt;m_epub,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;epub_metadata&lt;span&gt;&amp;#40;&lt;/span&gt;type&lt;span&gt;&amp;#41;&lt;/span&gt;,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;size&lt;span&gt;&amp;#41;&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span&gt;&amp;#125;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; ...&lt;br /&gt;
&lt;span&gt;&amp;#125;&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;The &lt;code class=&quot;codecolorer cpp default&quot;&gt;&lt;span class=&quot;cpp&quot;&gt;epub_metadata&lt;/span&gt;&lt;/code&gt; enum values were cast to &lt;code class=&quot;codecolorer cpp default&quot;&gt;&lt;span class=&quot;cpp&quot;&gt;&lt;span&gt;int&lt;/span&gt;&lt;/span&gt;&lt;/code&gt; to prevent the &lt;strong&gt;ApiExtractor&lt;/strong&gt; to emitting a bunch of warnings saying that it cannot tell who these guys are.&lt;/p&gt;
&lt;p&gt;Anyways, it&amp;#8217;s so awful&amp;#8230; to have a fancy generator, and having to write all this&amp;#8230; noooo!&lt;/p&gt;
&lt;h3&gt;TIterator and EIterator&lt;/h3&gt;
&lt;p&gt;The C structures &lt;code class=&quot;codecolorer cpp default&quot;&gt;&lt;span class=&quot;cpp&quot;&gt;titerator&lt;/span&gt;&lt;/code&gt; and &lt;code class=&quot;codecolorer cpp default&quot;&gt;&lt;span class=&quot;cpp&quot;&gt;eiterator&lt;/span&gt;&lt;/code&gt; will be wrapped by the C++ classes &lt;code class=&quot;codecolorer cpp default&quot;&gt;&lt;span class=&quot;cpp&quot;&gt;TIterator&lt;/span&gt;&lt;/code&gt; and &lt;code class=&quot;codecolorer cpp default&quot;&gt;&lt;span class=&quot;cpp&quot;&gt;EIterator&lt;/span&gt;&lt;/code&gt;, respectively, and like the &lt;code class=&quot;codecolorer cpp default&quot;&gt;&lt;span class=&quot;cpp&quot;&gt;EPub&lt;/span&gt;&lt;/code&gt; class their constructors are private.&lt;/p&gt;
&lt;div class=&quot;codecolorer-container cpp geshi&quot;&gt;&lt;div class=&quot;cpp codecolorer&quot;&gt;&lt;span&gt;class&lt;/span&gt; TIterator &lt;span&gt;&amp;#123;&lt;/span&gt;&lt;br /&gt;
&lt;span&gt;public&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span&gt;enum&lt;/span&gt; type &lt;span&gt;&amp;#123;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; NAVMAP &lt;span&gt;=&lt;/span&gt; &lt;span&gt;int&lt;/span&gt;&lt;span&gt;&amp;#40;&lt;/span&gt;TITERATOR_NAVMAP&lt;span&gt;&amp;#41;&lt;/span&gt;,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; GUIDE &lt;span&gt;=&lt;/span&gt; &lt;span&gt;int&lt;/span&gt;&lt;span&gt;&amp;#40;&lt;/span&gt;TITERATOR_GUIDE&lt;span&gt;&amp;#41;&lt;/span&gt;,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; PAGES &lt;span&gt;=&lt;/span&gt; &lt;span&gt;int&lt;/span&gt;&lt;span&gt;&amp;#40;&lt;/span&gt;TITERATOR_PAGES&lt;span&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span&gt;&amp;#125;&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; ~TIterator&lt;span&gt;&amp;#40;&lt;/span&gt;&lt;span&gt;&amp;#41;&lt;/span&gt; &lt;span&gt;&amp;#123;&lt;/span&gt; epub_free_titerator&lt;span&gt;&amp;#40;&lt;/span&gt;m_iter&lt;span&gt;&amp;#41;&lt;/span&gt;&lt;span&gt;;&lt;/span&gt; &lt;span&gt;&amp;#125;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span&gt;inline&lt;/span&gt; &lt;span&gt;bool&lt;/span&gt; isValid&lt;span&gt;&amp;#40;&lt;/span&gt;&lt;span&gt;&amp;#41;&lt;/span&gt; &lt;span&gt;&amp;#123;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span&gt;return&lt;/span&gt; epub_tit_curr_valid&lt;span&gt;&amp;#40;&lt;/span&gt;m_iter&lt;span&gt;&amp;#41;&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span&gt;&amp;#125;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; ...&lt;br /&gt;
&lt;span&gt;private&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span&gt;friend&lt;/span&gt; &lt;span&gt;class&lt;/span&gt; EPub&lt;span&gt;;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span&gt;explicit&lt;/span&gt; TIterator&lt;span&gt;&amp;#40;&lt;/span&gt;&lt;span&gt;struct&lt;/span&gt; titerator&lt;span&gt;*&lt;/span&gt; iter&lt;span&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span&gt;:&lt;/span&gt; m_iter&lt;span&gt;&amp;#40;&lt;/span&gt;iter&lt;span&gt;&amp;#41;&lt;/span&gt; &lt;span&gt;&amp;#123;&lt;/span&gt;&lt;span&gt;&amp;#125;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span&gt;struct&lt;/span&gt; titerator&lt;span&gt;*&lt;/span&gt; m_iter&lt;span&gt;;&lt;/span&gt;&lt;br /&gt;
&lt;span&gt;&amp;#125;&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;New instances of &lt;code class=&quot;codecolorer cpp default&quot;&gt;&lt;span class=&quot;cpp&quot;&gt;TIterator&lt;/span&gt;&lt;/code&gt; and &lt;code class=&quot;codecolorer cpp default&quot;&gt;&lt;span class=&quot;cpp&quot;&gt;EIterator&lt;/span&gt;&lt;/code&gt; are created by &lt;code class=&quot;codecolorer cpp default&quot;&gt;&lt;span class=&quot;cpp&quot;&gt;EPub&lt;/span&gt;&lt;/code&gt; methods, because of that it must be a &lt;code class=&quot;codecolorer cpp default&quot;&gt;&lt;span class=&quot;cpp&quot;&gt;&lt;span&gt;friend&lt;/span&gt;&lt;/span&gt;&lt;/code&gt; of the iterator classes.&lt;/p&gt;
&lt;div class=&quot;codecolorer-container cpp geshi&quot;&gt;&lt;div class=&quot;cpp codecolorer&quot;&gt;&lt;span&gt;class&lt;/span&gt; EPub &lt;span&gt;&amp;#123;&lt;/span&gt;&lt;br /&gt;
&lt;span&gt;public&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; ...&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span&gt;inline&lt;/span&gt; EIterator&lt;span&gt;*&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; get_iterator&lt;span&gt;&amp;#40;&lt;/span&gt;EIterator&lt;span&gt;::&lt;/span&gt;&lt;span&gt;type&lt;/span&gt; type, &lt;span&gt;int&lt;/span&gt; opt &lt;span&gt;=&lt;/span&gt; &lt;span&gt;0&lt;/span&gt;&lt;span&gt;&amp;#41;&lt;/span&gt; &lt;span&gt;&amp;#123;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span&gt;struct&lt;/span&gt; eiterator&lt;span&gt;*&lt;/span&gt; it &lt;span&gt;=&lt;/span&gt; epub_get_iterator&lt;span&gt;&amp;#40;&lt;/span&gt;m_epub, eiterator_type&lt;span&gt;&amp;#40;&lt;/span&gt;type&lt;span&gt;&amp;#41;&lt;/span&gt;, opt&lt;span&gt;&amp;#41;&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span&gt;if&lt;/span&gt; &lt;span&gt;&amp;#40;&lt;/span&gt;it&lt;span&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span&gt;return&lt;/span&gt; &lt;span&gt;new&lt;/span&gt; EIterator&lt;span&gt;&amp;#40;&lt;/span&gt;it&lt;span&gt;&amp;#41;&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span&gt;return&lt;/span&gt; &lt;span&gt;0&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span&gt;&amp;#125;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span&gt;inline&lt;/span&gt; TIterator&lt;span&gt;*&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; get_titerator&lt;span&gt;&amp;#40;&lt;/span&gt;TIterator&lt;span&gt;::&lt;/span&gt;&lt;span&gt;type&lt;/span&gt; type, &lt;span&gt;int&lt;/span&gt; opt &lt;span&gt;=&lt;/span&gt; &lt;span&gt;0&lt;/span&gt;&lt;span&gt;&amp;#41;&lt;/span&gt; &lt;span&gt;&amp;#123;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span&gt;struct&lt;/span&gt; titerator&lt;span&gt;*&lt;/span&gt; it &lt;span&gt;=&lt;/span&gt; epub_get_titerator&lt;span&gt;&amp;#40;&lt;/span&gt;m_epub, titerator_type&lt;span&gt;&amp;#40;&lt;/span&gt;type&lt;span&gt;&amp;#41;&lt;/span&gt;, opt&lt;span&gt;&amp;#41;&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span&gt;if&lt;/span&gt; &lt;span&gt;&amp;#40;&lt;/span&gt;it&lt;span&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span&gt;return&lt;/span&gt; &lt;span&gt;new&lt;/span&gt; TIterator&lt;span&gt;&amp;#40;&lt;/span&gt;it&lt;span&gt;&amp;#41;&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span&gt;return&lt;/span&gt; &lt;span&gt;0&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span&gt;&amp;#125;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; ...&lt;br /&gt;
&lt;span&gt;&amp;#125;&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;
&lt;h2&gt;python-epub&lt;/h2&gt;
&lt;p&gt;Now it&amp;#8217;s time to say to the generator which goes in and which must change in the bindings.&lt;/p&gt;
&lt;h3&gt;The global header&lt;/h3&gt;
&lt;p&gt;The global header is a file that includes all other headers of the library that will be analyzed. In the global header the binding developer may also add some tweaks, like a &lt;code class=&quot;codecolorer cpp default&quot;&gt;&lt;span class=&quot;cpp&quot;&gt;&lt;span&gt;#define&lt;/span&gt;&lt;/span&gt;&lt;/code&gt; that will trigger some condition in the target library headers, that will affect the generated binding.&lt;/p&gt;
&lt;p&gt;The &lt;a href=&quot;https://github.com/setanta/python-epub/blob/master/epub_global.h&quot;&gt;epub_global.h&lt;/a&gt; that I use here is very simple:&lt;/p&gt;
&lt;div class=&quot;codecolorer-container cpp geshi&quot;&gt;&lt;div class=&quot;cpp codecolorer&quot;&gt;&lt;span&gt;#ifndef EPUB_GLOBAL_H&lt;/span&gt;&lt;br /&gt;
&lt;span&gt;#define EPUB_GLOBAL_H&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span&gt;#include &amp;amp;lt;epub.h&amp;amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span&gt;#include &amp;amp;lt;epub_shared.h&amp;amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span&gt;#include &amp;amp;lt;epub_version.h&amp;amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span&gt;#include &amp;quot;epub_cpp_wrappers.h&amp;quot;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span&gt;// ApiExtractor complains if it finds only pre-definitions.&lt;/span&gt;&lt;br /&gt;
&lt;span&gt;struct&lt;/span&gt; titerator &lt;span&gt;&amp;#123;&lt;/span&gt;&lt;span&gt;&amp;#125;&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;br /&gt;
&lt;span&gt;struct&lt;/span&gt; eiterator &lt;span&gt;&amp;#123;&lt;/span&gt;&lt;span&gt;&amp;#125;&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span&gt;#endif&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;As the commentary tells us, ApiExtractor doesn&amp;#8217;t like when it finds forward declarations without definitions. I choose to add these two bogus definitions for &lt;code class=&quot;codecolorer cpp default&quot;&gt;&lt;span class=&quot;cpp&quot;&gt;&lt;span&gt;struct&lt;/span&gt; titerator&lt;/span&gt;&lt;/code&gt; and &lt;code class=&quot;codecolorer cpp default&quot;&gt;&lt;span class=&quot;cpp&quot;&gt;&lt;span&gt;struct&lt;/span&gt; eiterator&lt;/span&gt;&lt;/code&gt;. (For some reason the generator said nothing about &lt;code class=&quot;codecolorer cpp default&quot;&gt;&lt;span class=&quot;cpp&quot;&gt;&lt;span&gt;struct&lt;/span&gt; epub&lt;/span&gt;&lt;/code&gt;.) Other option would be not to add those bogus definitions, but add a line to the type system file telling the generator to ignore warnings relative to those structures.&lt;/p&gt;
&lt;h3&gt;The Type System description&lt;/h3&gt;
&lt;p&gt;Here follows a snippet from &lt;a title=&quot;typesystem_epub.xml @ 78de928&quot; href=&quot;https://github.com/setanta/python-epub/blob/78de92867f668d92a7610515eaeebe34487ebf03/typesystem_epub.xml&quot;&gt;typesystem_epub.xml&lt;/a&gt;.&lt;/p&gt;
&lt;div class=&quot;codecolorer-container xml geshi&quot;&gt;&lt;div class=&quot;xml codecolorer&quot;&gt;&lt;span&gt;&lt;span&gt;&amp;lt;?xml&lt;/span&gt; &lt;span&gt;version&lt;/span&gt;=&lt;span&gt;'1.0'&lt;/span&gt;&lt;span&gt;?&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span&gt;&lt;span&gt;&amp;lt;typesystem&lt;/span&gt; &lt;span&gt;package&lt;/span&gt;=&lt;span&gt;'epub'&lt;/span&gt;&lt;span&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; ...&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span&gt;&lt;span&gt;&amp;lt;rejection&lt;/span&gt; &lt;span&gt;enum-name&lt;/span&gt;=&lt;span&gt;'epub_metadata'&lt;/span&gt; &lt;span&gt;/&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; ...&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span&gt;&lt;span&gt;&amp;lt;object-type&lt;/span&gt; &lt;span&gt;name&lt;/span&gt;=&lt;span&gt;'EPub'&lt;/span&gt;&lt;span&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span&gt;&lt;span&gt;&amp;lt;enum-type&lt;/span&gt; &lt;span&gt;name&lt;/span&gt;=&lt;span&gt;'metadata'&lt;/span&gt; &lt;span&gt;/&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ...&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span&gt;&lt;span&gt;&amp;lt;/object-type&lt;span&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span&gt;&lt;span&gt;&amp;lt;/typesystem&lt;span&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;The &lt;code class=&quot;codecolorer cpp default&quot;&gt;&lt;span class=&quot;cpp&quot;&gt;epub_metadata&lt;/span&gt;&lt;/code&gt; enum is not exported to Python (at least not as it is) and to avoid the generator emitting his warnings, it must be explicitly rejected; its C++ substitute is added afterwards inside the EPub object type. The same happens to the other enums.&lt;/p&gt;
&lt;p&gt;In the type system notation &lt;code class=&quot;codecolorer xml default&quot;&gt;&lt;span class=&quot;xml&quot;&gt;object-type&lt;/span&gt;&lt;/code&gt; refers to objects that are passed around solely as pointers (like &lt;code class=&quot;codecolorer cpp default&quot;&gt;&lt;span class=&quot;cpp&quot;&gt;EPub&lt;/span&gt;&lt;/code&gt;, whose copy constructor and operator are private). If, otherwise, the object can be passed as value, it should be declared as an &lt;code class=&quot;codecolorer xml default&quot;&gt;&lt;span class=&quot;xml&quot;&gt;value-type&lt;/span&gt;&lt;/code&gt;, as our &lt;code class=&quot;codecolorer cpp default&quot;&gt;&lt;span class=&quot;cpp&quot;&gt;Rectangle&lt;/span&gt;&lt;/code&gt; example mentioned before.&lt;/p&gt;
&lt;h3&gt;Python&amp;#8217;s Iterator Protocol&lt;/h3&gt;
&lt;p&gt;In Python, if an object supports the &lt;a href=&quot;http://docs.python.org/library/stdtypes.html#iterator-types&quot;&gt;Iterator Protocol&lt;/a&gt; I can use it on &lt;code class=&quot;codecolorer python default&quot;&gt;&lt;span class=&quot;python&quot;&gt;&lt;span&gt;for&lt;/span&gt;&lt;/span&gt;&lt;/code&gt; statements, like this:&lt;/p&gt;
&lt;div class=&quot;codecolorer-container python geshi&quot;&gt;&lt;div class=&quot;python codecolorer&quot;&gt;&lt;span&gt;from&lt;/span&gt; epub &lt;span&gt;import&lt;/span&gt; EPub, TIterator&lt;br /&gt;
book = EPub.&lt;span&gt;open&lt;/span&gt;&lt;span&gt;&amp;#40;&lt;/span&gt;&lt;span&gt;self&lt;/span&gt;.&lt;span&gt;epub_file&lt;/span&gt;&lt;span&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;
&lt;span&gt;for&lt;/span&gt; toc_it &lt;span&gt;in&lt;/span&gt; book.&lt;span&gt;get_titerator&lt;/span&gt;&lt;span&gt;&amp;#40;&lt;/span&gt;TIterator.&lt;span&gt;NAVMAP&lt;/span&gt;&lt;span&gt;&amp;#41;&lt;/span&gt;:&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span&gt;if&lt;/span&gt; &lt;span&gt;not&lt;/span&gt; toc_it.&lt;span&gt;isValid&lt;/span&gt;&lt;span&gt;&amp;#40;&lt;/span&gt;&lt;span&gt;&amp;#41;&lt;/span&gt;:&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span&gt;continue&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span&gt;print&lt;/span&gt; &lt;span&gt;'link : '&lt;/span&gt; + toc_it.&lt;span&gt;link&lt;/span&gt;&lt;span&gt;&amp;#40;&lt;/span&gt;&lt;span&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span&gt;print&lt;/span&gt; &lt;span&gt;'label: '&lt;/span&gt; + toc_it.&lt;span&gt;label&lt;/span&gt;&lt;span&gt;&amp;#40;&lt;/span&gt;&lt;span&gt;&amp;#41;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Following the Python Iterator Protocol consists solely of an object implementing the methods &lt;code class=&quot;codecolorer python default&quot;&gt;&lt;span class=&quot;python&quot;&gt;&lt;span&gt;__iter__&lt;/span&gt;&lt;span&gt;&amp;#40;&lt;/span&gt;&lt;span&gt;&amp;#41;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt; and &lt;code class=&quot;codecolorer python default&quot;&gt;&lt;span class=&quot;python&quot;&gt;__next__&lt;span&gt;&amp;#40;&lt;/span&gt;&lt;span&gt;&amp;#41;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;.&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; the correct name for the method is &lt;code class=&quot;codecolorer python default&quot;&gt;&lt;span class=&quot;python&quot;&gt;next&lt;span&gt;&amp;#40;&lt;/span&gt;&lt;span&gt;&amp;#41;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt; and not &lt;code class=&quot;codecolorer python default&quot;&gt;&lt;span class=&quot;python&quot;&gt;__next__&lt;span&gt;&amp;#40;&lt;/span&gt;&lt;span&gt;&amp;#41;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;. That's a minor bug in the generator that I just found.
&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;The XML to add iterator protocol features into &lt;code class=&quot;codecolorer text default&quot;&gt;&lt;span class=&quot;text&quot;&gt;TIterator&lt;/span&gt;&lt;/code&gt; class will be lengthy, so I'll split it into two parts, the first dealing with &lt;a href=&quot;http://www.pyside.org/docs/apiextractor/typesystem_templates.html&quot;&gt;type system code templates&lt;/a&gt;.&lt;/p&gt;
&lt;h4&gt;Type System templates&lt;/h4&gt;
&lt;div class=&quot;codecolorer-container xml geshi&quot;&gt;&lt;div class=&quot;xml codecolorer&quot;&gt;&lt;span&gt;&lt;span&gt;&amp;lt;?xml&lt;/span&gt; &lt;span&gt;version&lt;/span&gt;=&lt;span&gt;'1.0'&lt;/span&gt;&lt;span&gt;?&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span&gt;&lt;span&gt;&amp;lt;typesystem&lt;/span&gt; &lt;span&gt;package&lt;/span&gt;=&lt;span&gt;'epub'&lt;/span&gt;&lt;span&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; ...&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span&gt;&lt;span&gt;&amp;lt;template&lt;/span&gt; &lt;span&gt;name&lt;/span&gt;=&lt;span&gt;'iterator.__iter__'&lt;/span&gt;&lt;span&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Py_INCREF(%PYSELF);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; %PYARG_0 = %PYSELF;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span&gt;&lt;span&gt;&amp;lt;/template&lt;span&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span&gt;&lt;span&gt;&amp;lt;template&lt;/span&gt; &lt;span&gt;name&lt;/span&gt;=&lt;span&gt;'iterator.__next__'&lt;/span&gt;&lt;span&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (%CPPSELF.next()) {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span&gt;&lt;span&gt;&amp;lt;insert-template&lt;/span&gt; &lt;span&gt;name&lt;/span&gt;=&lt;span&gt;'iterator.__iter__'&lt;/span&gt; &lt;span&gt;/&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; } else {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; PyErr_SetNone(PyExc_StopIteration);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span&gt;&lt;span&gt;&amp;lt;/template&lt;span&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; ...&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;The iterator methods for &lt;code class=&quot;codecolorer python default&quot;&gt;&lt;span class=&quot;python&quot;&gt;TIterator&lt;/span&gt;&lt;/code&gt; and &lt;code class=&quot;codecolorer python default&quot;&gt;&lt;span class=&quot;python&quot;&gt;EIterator&lt;/span&gt;&lt;/code&gt; have exactly the same implementation, so it&amp;#8217;ll be smart to use type system &lt;a href=&quot;http://www.pyside.org/docs/apiextractor/typesystem_templates.html&quot;&gt;templates&lt;/a&gt; and have the code, and its eventual bugs, in a single place.&lt;/p&gt;
&lt;p&gt;&lt;code class=&quot;codecolorer python default&quot;&gt;&lt;span class=&quot;python&quot;&gt;iterator.&lt;span&gt;__iter__&lt;/span&gt;&lt;/span&gt;&lt;/code&gt; method just need to return the object itself with its reference counter incremented by one. &lt;code class=&quot;codecolorer python default&quot;&gt;&lt;span class=&quot;python&quot;&gt;iterator.__next__&lt;/span&gt;&lt;/code&gt; calls the underlying C++ object&amp;#8217;s &lt;code class=&quot;codecolorer cpp default&quot;&gt;&lt;span class=&quot;cpp&quot;&gt;next&lt;span&gt;&amp;#40;&lt;/span&gt;&lt;span&gt;&amp;#41;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt; (it also returns itself, and increments the refcounter), and raises a Python &lt;code class=&quot;codecolorer python default&quot;&gt;&lt;span class=&quot;python&quot;&gt;&lt;span&gt;StopIteration&lt;/span&gt;&lt;/span&gt;&lt;/code&gt; exception when it reaches the end.&lt;/p&gt;
&lt;p&gt;The &lt;a href=&quot;http://www.pyside.org/docs/shiboken/typesystemvariables.html&quot;&gt;type system variables&lt;/a&gt; &lt;code class=&quot;codecolorer xml default&quot;&gt;&lt;span class=&quot;xml&quot;&gt;%PYSELF&lt;/span&gt;&lt;/code&gt;, &lt;code class=&quot;codecolorer xml default&quot;&gt;&lt;span class=&quot;xml&quot;&gt;%PYARG_0&lt;/span&gt;&lt;/code&gt; and &lt;code class=&quot;codecolorer xml default&quot;&gt;&lt;span class=&quot;xml&quot;&gt;%CPPSELF&lt;/span&gt;&lt;/code&gt; are replaced by values dependent on the context where they are used (e.g. &lt;code class=&quot;codecolorer python default&quot;&gt;&lt;span class=&quot;python&quot;&gt;TIterator&lt;/span&gt;&lt;/code&gt; or &lt;code class=&quot;codecolorer python default&quot;&gt;&lt;span class=&quot;python&quot;&gt;EIteration&lt;/span&gt;&lt;/code&gt; classes). Check the &lt;a href=&quot;http://www.pyside.org/docs/shiboken/typesystemvariables.html&quot;&gt;documentation&lt;/a&gt; for their meaning·&lt;/p&gt;
&lt;h4&gt;Adding the iterator methods&lt;/h4&gt;
&lt;div class=&quot;codecolorer-container xml geshi&quot;&gt;&lt;div class=&quot;xml codecolorer&quot;&gt;&amp;nbsp; &amp;nbsp; ...&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span&gt;&lt;span&gt;&amp;lt;object-type&lt;/span&gt; &lt;span&gt;name&lt;/span&gt;=&lt;span&gt;'TIterator'&lt;/span&gt;&lt;span&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ...&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span&gt;&lt;span&gt;&amp;lt;modify-function&lt;/span&gt; &lt;span&gt;signature&lt;/span&gt;=&lt;span&gt;'next()'&lt;/span&gt; &lt;span&gt;remove&lt;/span&gt;=&lt;span&gt;'all'&lt;/span&gt; &lt;span&gt;/&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span&gt;&lt;span&gt;&amp;lt;add-function&lt;/span&gt; &lt;span&gt;signature&lt;/span&gt;=&lt;span&gt;'__iter__'&lt;/span&gt; &lt;span&gt;return-type&lt;/span&gt;=&lt;span&gt;'PyObject*'&lt;/span&gt;&lt;span&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span&gt;&lt;span&gt;&amp;lt;inject-code&lt;/span&gt; &lt;span&gt;class&lt;/span&gt;=&lt;span&gt;'target'&lt;/span&gt; &lt;span&gt;position&lt;/span&gt;=&lt;span&gt;'beginning'&lt;/span&gt;&lt;span&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span&gt;&lt;span&gt;&amp;lt;insert-template&lt;/span&gt; &lt;span&gt;name&lt;/span&gt;=&lt;span&gt;'iterator.__iter__'&lt;/span&gt; &lt;span&gt;/&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span&gt;&lt;span&gt;&amp;lt;/inject-code&lt;span&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span&gt;&lt;span&gt;&amp;lt;/add-function&lt;span&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span&gt;&lt;span&gt;&amp;lt;add-function&lt;/span&gt; &lt;span&gt;signature&lt;/span&gt;=&lt;span&gt;'__next__'&lt;/span&gt; &lt;span&gt;return-type&lt;/span&gt;=&lt;span&gt;'PyObject*'&lt;/span&gt;&lt;span&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span&gt;&lt;span&gt;&amp;lt;inject-code&lt;/span&gt; &lt;span&gt;class&lt;/span&gt;=&lt;span&gt;'target'&lt;/span&gt; &lt;span&gt;position&lt;/span&gt;=&lt;span&gt;'beginning'&lt;/span&gt;&lt;span&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span&gt;&lt;span&gt;&amp;lt;insert-template&lt;/span&gt; &lt;span&gt;name&lt;/span&gt;=&lt;span&gt;'iterator.__next__'&lt;/span&gt; &lt;span&gt;/&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span&gt;&lt;span&gt;&amp;lt;/inject-code&lt;span&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span&gt;&lt;span&gt;&amp;lt;/add-function&lt;span&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span&gt;&lt;span&gt;&amp;lt;/object-type&lt;span&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;...&lt;br /&gt;
&lt;span&gt;&lt;span&gt;&amp;lt;/typesystem&lt;span&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;First the original C++ &lt;code class=&quot;codecolorer cpp default&quot;&gt;&lt;span class=&quot;cpp&quot;&gt;next&lt;span&gt;&amp;#40;&lt;/span&gt;&lt;span&gt;&amp;#41;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt; is removed, then the ones for the Python iterator protocol are added, using &lt;code class=&quot;codecolorer xml default&quot;&gt;&lt;span class=&quot;xml&quot;&gt;&lt;span&gt;&lt;span&gt;&amp;lt;insert-template&lt;/span&gt;&lt;span&gt;/&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt; tag to insert the previously defined custom code. Exactly the same lines will be added to &lt;code class=&quot;codecolorer python default&quot;&gt;&lt;span class=&quot;python&quot;&gt;EIterator&lt;/span&gt;&lt;/code&gt; class.&lt;/p&gt;
&lt;h4&gt;Just one more bit of hackery&lt;/h4&gt;
&lt;p&gt;Only one obstacle remains on the way of having proper Python iterators. When Python&amp;#8217;s &lt;code class=&quot;codecolorer python default&quot;&gt;&lt;span class=&quot;python&quot;&gt;&lt;span&gt;for&lt;/span&gt;&lt;/span&gt;&lt;/code&gt; statement is used to iterate through an iterable object, in the first round it calls the object&amp;#8217;s &lt;code class=&quot;codecolorer python default&quot;&gt;&lt;span class=&quot;python&quot;&gt;&lt;span&gt;__iter__&lt;/span&gt;&lt;/span&gt;&lt;/code&gt; method, and immediately after it calls &lt;code class=&quot;codecolorer python default&quot;&gt;&lt;span class=&quot;python&quot;&gt;next&lt;/span&gt;&lt;/code&gt;, and keeps calling &lt;code class=&quot;codecolorer python default&quot;&gt;&lt;span class=&quot;python&quot;&gt;next&lt;/span&gt;&lt;/code&gt; for each new iteration.&lt;/p&gt;
&lt;p&gt;The problem here is that our underlying C iterator returns an object loaded with proper content when &lt;code class=&quot;codecolorer python default&quot;&gt;&lt;span class=&quot;python&quot;&gt;&lt;span&gt;__iter__&lt;/span&gt;&lt;/span&gt;&lt;/code&gt; is called, then the way that Python&amp;#8217;s &lt;code class=&quot;codecolorer python default&quot;&gt;&lt;span class=&quot;python&quot;&gt;&lt;span&gt;for&lt;/span&gt;&lt;/span&gt;&lt;/code&gt; iteration works will cause the first item to be bypassed. A workaround for this case is to use a flag on the C++ wrapper that checks if the iterator has just been created, so that it will not move forward when &lt;code class=&quot;codecolorer python default&quot;&gt;&lt;span class=&quot;python&quot;&gt;next&lt;/span&gt;&lt;/code&gt; is called on it for the first time.&lt;/p&gt;
&lt;div class=&quot;codecolorer-container cpp geshi&quot;&gt;&lt;div class=&quot;cpp codecolorer&quot;&gt;&lt;span&gt;class&lt;/span&gt; TIterator &lt;span&gt;&amp;#123;&lt;/span&gt;&lt;br /&gt;
&lt;span&gt;public&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; ...&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span&gt;inline&lt;/span&gt; &lt;span&gt;bool&lt;/span&gt; next&lt;span&gt;&amp;#40;&lt;/span&gt;&lt;span&gt;&amp;#41;&lt;/span&gt; &lt;span&gt;&amp;#123;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span&gt;if&lt;/span&gt; &lt;span&gt;&amp;#40;&lt;/span&gt;m_isFirst&lt;span&gt;&amp;#41;&lt;/span&gt; &lt;span&gt;&amp;#123;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; m_isFirst &lt;span&gt;=&lt;/span&gt; &lt;span&gt;false&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span&gt;return&lt;/span&gt; &lt;span&gt;true&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span&gt;&amp;#125;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span&gt;return&lt;/span&gt; epub_tit_next&lt;span&gt;&amp;#40;&lt;/span&gt;m_iter&lt;span&gt;&amp;#41;&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span&gt;&amp;#125;&lt;/span&gt;&lt;br /&gt;
&lt;span&gt;private&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span&gt;friend&lt;/span&gt; &lt;span&gt;class&lt;/span&gt; EPub&lt;span&gt;;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span&gt;explicit&lt;/span&gt; TIterator&lt;span&gt;&amp;#40;&lt;/span&gt;&lt;span&gt;struct&lt;/span&gt; titerator&lt;span&gt;*&lt;/span&gt; iter&lt;span&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span&gt;:&lt;/span&gt; m_iter&lt;span&gt;&amp;#40;&lt;/span&gt;iter&lt;span&gt;&amp;#41;&lt;/span&gt;, m_isFirst&lt;span&gt;&amp;#40;&lt;/span&gt;&lt;span&gt;true&lt;/span&gt;&lt;span&gt;&amp;#41;&lt;/span&gt; &lt;span&gt;&amp;#123;&lt;/span&gt;&lt;span&gt;&amp;#125;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span&gt;struct&lt;/span&gt; titerator&lt;span&gt;*&lt;/span&gt; m_iter&lt;span&gt;;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span&gt;bool&lt;/span&gt; m_isFirst&lt;span&gt;;&lt;/span&gt;&lt;br /&gt;
&lt;span&gt;&amp;#125;&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;I had this freedom because &lt;code class=&quot;codecolorer cpp default&quot;&gt;&lt;span class=&quot;cpp&quot;&gt;TIterator&lt;/span&gt;&lt;/code&gt; is a class completely under my (me, the binding developer) control. If &lt;code class=&quot;codecolorer cpp default&quot;&gt;&lt;span class=&quot;cpp&quot;&gt;&lt;span&gt;struct&lt;/span&gt; titerator&lt;/span&gt;&lt;/code&gt; were a C++ class from the beginning that approach would not be the best. Perhaps &lt;strong&gt;libshiboken&lt;/strong&gt; (the supporting library used by all Shiboken generated bindings) should provide a base iterator class to handle this particular difference between Python and C++ iterators. Or perhaps the generated class, when identified as an iterable by the presence of iterator protocol methods added by the binding developer, should have such provisions. The latter options seems best, and that&amp;#8217;s one more item for my list of future improvements.&lt;/p&gt;
&lt;h3&gt;Custom Conversions&lt;/h3&gt;
&lt;h4&gt;Returning unicode values&lt;/h4&gt;
&lt;p&gt;The &lt;code class=&quot;codecolorer cpp default&quot;&gt;&lt;span class=&quot;cpp&quot;&gt;EIterator&lt;span&gt;::&lt;/span&gt;&lt;span&gt;curr&lt;/span&gt;&lt;span&gt;&amp;#40;&lt;/span&gt;&lt;span&gt;&amp;#41;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt; methods &lt;code class=&quot;codecolorer cpp default&quot;&gt;&lt;span class=&quot;cpp&quot;&gt;EIterator&lt;span&gt;::&lt;/span&gt;&lt;span&gt;curr_url&lt;/span&gt;&lt;span&gt;&amp;#40;&lt;/span&gt;&lt;span&gt;&amp;#41;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt; returns values of &lt;code class=&quot;codecolorer cpp default&quot;&gt;&lt;span class=&quot;cpp&quot;&gt;&lt;span&gt;char&lt;/span&gt;&lt;span&gt;*&lt;/span&gt;&lt;/span&gt;&lt;/code&gt; type, which doesn&amp;#8217;t have a converter (&lt;code class=&quot;codecolorer cpp default&quot;&gt;&lt;span class=&quot;cpp&quot;&gt;&lt;span&gt;const&lt;/span&gt; &lt;span&gt;char&lt;/span&gt;&lt;span&gt;*&lt;/span&gt;&lt;/span&gt;&lt;/code&gt; does have), so I&amp;#8217;ve written a custom piece of code to convert it to Python&amp;#8217;s unicode.&lt;/p&gt;
&lt;div class=&quot;codecolorer-container xml geshi&quot;&gt;&lt;div class=&quot;xml codecolorer&quot;&gt;&lt;span&gt;&lt;span&gt;&amp;lt;?xml&lt;/span&gt; &lt;span&gt;version&lt;/span&gt;=&lt;span&gt;'1.0'&lt;/span&gt;&lt;span&gt;?&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span&gt;&lt;span&gt;&amp;lt;typesystem&lt;/span&gt; &lt;span&gt;package&lt;/span&gt;=&lt;span&gt;'epub'&lt;/span&gt;&lt;span&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; ...&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span&gt;&lt;span&gt;&amp;lt;template&lt;/span&gt; &lt;span&gt;name&lt;/span&gt;=&lt;span&gt;'return_char_pointer'&lt;/span&gt;&lt;span&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; char* %0 = %CPPSELF.%FUNCTION_NAME();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (%0) {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; %PYARG_0 = PyUnicode_DecodeUTF8(%0, strlen(%0), &amp;quot;strict&amp;quot;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; } else {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Py_INCREF(Py_None);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; %PYARG_0 = Py_None;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span&gt;&lt;span&gt;&amp;lt;/template&lt;span&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; ...&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span&gt;&lt;span&gt;&amp;lt;object-type&lt;/span&gt; &lt;span&gt;name&lt;/span&gt;=&lt;span&gt;'EIterator'&lt;/span&gt;&lt;span&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ...&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span&gt;&lt;span&gt;&amp;lt;modify-function&lt;/span&gt; &lt;span&gt;signature&lt;/span&gt;=&lt;span&gt;'curr()'&lt;/span&gt;&lt;span&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span&gt;&lt;span&gt;&amp;lt;inject-code&lt;/span&gt; &lt;span&gt;class&lt;/span&gt;=&lt;span&gt;'target'&lt;/span&gt; &lt;span&gt;position&lt;/span&gt;=&lt;span&gt;'beginning'&lt;/span&gt;&lt;span&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span&gt;&lt;span&gt;&amp;lt;insert-template&lt;/span&gt; &lt;span&gt;name&lt;/span&gt;=&lt;span&gt;'return_char_pointer'&lt;/span&gt; &lt;span&gt;/&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span&gt;&lt;span&gt;&amp;lt;/inject-code&lt;span&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span&gt;&lt;span&gt;&amp;lt;/modify-function&lt;span&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span&gt;&lt;span&gt;&amp;lt;modify-function&lt;/span&gt; &lt;span&gt;signature&lt;/span&gt;=&lt;span&gt;'curr_url()'&lt;/span&gt;&lt;span&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span&gt;&lt;span&gt;&amp;lt;inject-code&lt;/span&gt; &lt;span&gt;class&lt;/span&gt;=&lt;span&gt;'target'&lt;/span&gt; &lt;span&gt;position&lt;/span&gt;=&lt;span&gt;'beginning'&lt;/span&gt;&lt;span&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span&gt;&lt;span&gt;&amp;lt;insert-template&lt;/span&gt; &lt;span&gt;name&lt;/span&gt;=&lt;span&gt;'return_char_pointer'&lt;/span&gt; &lt;span&gt;/&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span&gt;&lt;span&gt;&amp;lt;/inject-code&lt;span&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span&gt;&lt;span&gt;&amp;lt;/modify-function&lt;span&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ...&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span&gt;&lt;span&gt;&amp;lt;/object-type&lt;span&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; ...&lt;br /&gt;
&lt;span&gt;&lt;span&gt;&amp;lt;/typesystem&lt;span&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;
&lt;h4&gt;Modifying a method&amp;#8217;s signature&lt;/h4&gt;
&lt;p&gt;Some C++ method signatures couldn&amp;#8217;t automatically be converted to meaningful Python code, so I added more custom code to handle the situation on a case by case basis. For example, the method&lt;/p&gt;
&lt;div class=&quot;codecolorer-container cpp geshi&quot;&gt;&lt;div class=&quot;cpp codecolorer&quot;&gt;&lt;span&gt;unsigned&lt;/span&gt; &lt;span&gt;char&lt;/span&gt;&lt;span&gt;**&lt;/span&gt;&lt;br /&gt;
EPub&lt;span&gt;::&lt;/span&gt;&lt;span&gt;get_metadata&lt;/span&gt;&lt;span&gt;&amp;#40;&lt;/span&gt;metadata type, &lt;span&gt;int&lt;/span&gt;&lt;span&gt;*&lt;/span&gt; size&lt;span&gt;&amp;#41;&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;The &lt;code class=&quot;codecolorer cpp default&quot;&gt;&lt;span class=&quot;cpp&quot;&gt;&lt;span&gt;int&lt;/span&gt;&lt;span&gt;*&lt;/span&gt; size&lt;/span&gt;&lt;/code&gt; argument receives a pointer to an int, which will contain the size of the list of unicode strings returned as &lt;code class=&quot;codecolorer cpp default&quot;&gt;&lt;span class=&quot;cpp&quot;&gt;&lt;span&gt;unsigned&lt;/span&gt; &lt;span&gt;char&lt;/span&gt;&lt;span&gt;**&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;. In Python it would merely return a list of unicode objects, and the call to &lt;code class=&quot;codecolorer cpp default&quot;&gt;&lt;span class=&quot;cpp&quot;&gt;get_metadata&lt;/span&gt;&lt;/code&gt; doesn&amp;#8217;t need the &lt;code class=&quot;codecolorer cpp default&quot;&gt;&lt;span class=&quot;cpp&quot;&gt;size&lt;/span&gt;&lt;/code&gt; argument.&lt;/p&gt;
&lt;p&gt;I believe the type system description is enough to see how the modification system works.&lt;/p&gt;
&lt;div class=&quot;codecolorer-container xml geshi&quot;&gt;&lt;div class=&quot;xml codecolorer&quot;&gt;&lt;span&gt;&lt;span&gt;&amp;lt;object-type&lt;/span&gt; &lt;span&gt;name&lt;/span&gt;=&lt;span&gt;'EPub'&lt;/span&gt;&lt;span&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &lt;span&gt;&lt;span&gt;&amp;lt;enum-type&lt;/span&gt; &lt;span&gt;name&lt;/span&gt;=&lt;span&gt;'metadata'&lt;/span&gt; &lt;span&gt;/&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &lt;span&gt;&lt;span&gt;&amp;lt;modify-function&lt;/span&gt; &lt;span&gt;signature&lt;/span&gt;=&lt;span&gt;'get_metadata(EPub::metadata,int*)'&lt;/span&gt;&lt;span&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span&gt;&lt;span&gt;&amp;lt;modify-argument&lt;/span&gt; &lt;span&gt;index&lt;/span&gt;=&lt;span&gt;'2'&lt;/span&gt;&lt;span&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span&gt;&lt;span&gt;&amp;lt;remove-argument&lt;/span&gt; &lt;span&gt;/&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span&gt;&lt;span&gt;&amp;lt;/modify-argument&lt;span&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span&gt;&lt;span&gt;&amp;lt;modify-argument&lt;/span&gt; &lt;span&gt;index&lt;/span&gt;=&lt;span&gt;'return'&lt;/span&gt;&lt;span&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span&gt;&lt;span&gt;&amp;lt;replace-type&lt;/span&gt; &lt;span&gt;modified-type&lt;/span&gt;=&lt;span&gt;'PyTuple'&lt;/span&gt; &lt;span&gt;/&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span&gt;&lt;span&gt;&amp;lt;/modify-argument&lt;span&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span&gt;&lt;span&gt;&amp;lt;inject-code&lt;/span&gt; &lt;span&gt;class&lt;/span&gt;=&lt;span&gt;'target'&lt;/span&gt;&lt;span&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; unsigned char** data = 0;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; int size;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; data = %CPPSELF.%FUNCTION_NAME(%1, &lt;span&gt;&amp;amp;size);&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; if (data) {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; %PYARG_0 = PyTuple_New(size);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; PyObject* uni = 0;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; for (int i = 0; i &lt;span&gt;&amp;lt; size; ++i&lt;span&gt;&amp;#41;&lt;/span&gt; &lt;span&gt;&amp;#123;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;uni = PyUnicode_DecodeUTF8&lt;span&gt;&amp;#40;&lt;/span&gt;&lt;span&gt;&amp;#40;&lt;/span&gt;const char*&lt;span&gt;&amp;#41;&lt;/span&gt;data&lt;span&gt;&amp;#91;&lt;/span&gt;i&lt;span&gt;&amp;#93;&lt;/span&gt;,&lt;/span&gt;&lt;br /&gt;
&lt;span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; strlen&lt;span&gt;&amp;#40;&lt;/span&gt;&lt;span&gt;&amp;#40;&lt;/span&gt;const char*&lt;span&gt;&amp;#41;&lt;/span&gt;data&lt;span&gt;&amp;#91;&lt;/span&gt;i&lt;span&gt;&amp;#93;&lt;/span&gt;&lt;span&gt;&amp;#41;&lt;/span&gt;,&lt;/span&gt;&lt;br /&gt;
&lt;span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span&gt;&amp;quot;strict&amp;quot;&lt;/span&gt;&lt;span&gt;&amp;#41;&lt;/span&gt;;&lt;/span&gt;&lt;br /&gt;
&lt;span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;PyTuple_SetItem&lt;span&gt;&amp;#40;&lt;/span&gt;%PYARG_0, i, uni&lt;span&gt;&amp;#41;&lt;/span&gt;;&lt;/span&gt;&lt;br /&gt;
&lt;span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span&gt;&amp;#125;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;for &lt;span&gt;&amp;#40;&lt;/span&gt;int i = 0; i &amp;lt; size; ++i&lt;span&gt;&amp;#41;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;free&lt;span&gt;&amp;#40;&lt;/span&gt;data&lt;span&gt;&amp;#91;&lt;/span&gt;i&lt;span&gt;&amp;#93;&lt;/span&gt;&lt;span&gt;&amp;#41;&lt;/span&gt;;&lt;/span&gt;&lt;br /&gt;
&lt;span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;free&lt;span&gt;&amp;#40;&lt;/span&gt;data&lt;span&gt;&amp;#41;&lt;/span&gt;;&lt;/span&gt;&lt;br /&gt;
&lt;span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span&gt;&amp;#125;&lt;/span&gt; else &lt;span&gt;&amp;#123;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Py_INCREF&lt;span&gt;&amp;#40;&lt;/span&gt;Py_None&lt;span&gt;&amp;#41;&lt;/span&gt;;&lt;/span&gt;&lt;br /&gt;
&lt;span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;%PYARG_0 = Py_None;&lt;/span&gt;&lt;br /&gt;
&lt;span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span&gt;&amp;#125;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span&gt; &amp;nbsp; &amp;nbsp;&lt;span&gt;&amp;lt;/inject-code&lt;span&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &lt;span&gt;&lt;span&gt;&amp;lt;/modify-function&lt;span&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; ...&lt;br /&gt;
&lt;span&gt;&lt;span&gt;&amp;lt;/object-type&lt;span&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;
&lt;h2&gt;Downloading, building, etc.&lt;/h2&gt;
&lt;p&gt;Enough with the explanations, now let&amp;#8217;s try the code. Remember that you&amp;#8217;ll need also development files that I mentioned long time ago.&lt;/p&gt;
&lt;p&gt;Clone the latest version from the git repository:&lt;/p&gt;
&lt;div class=&quot;codecolorer-container bash geshi&quot;&gt;&lt;div class=&quot;bash codecolorer&quot;&gt;&lt;span&gt;git&lt;/span&gt; clone &lt;span&gt;git&lt;/span&gt;:&lt;span&gt;//&lt;/span&gt;github.com&lt;span&gt;/&lt;/span&gt;setanta&lt;span&gt;/&lt;/span&gt;python-epub.git&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;or download the tarball: &lt;a href=&quot;http://setantas.net/files/python-epub.tar.bz2&quot;&gt;python-epub.tar.bz2&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Inside the source code directory create a &lt;code class=&quot;codecolorer bash default&quot;&gt;&lt;span class=&quot;bash&quot;&gt;build&lt;/span&gt;&lt;/code&gt; directory and &amp;#8230;&lt;/p&gt;
&lt;div class=&quot;codecolorer-container bash geshi&quot;&gt;&lt;div class=&quot;bash codecolorer&quot;&gt;&lt;span&gt;cd&lt;/span&gt; python-epub&lt;br /&gt;
&lt;span&gt;mkdir&lt;/span&gt; build&lt;br /&gt;
&lt;span&gt;cd&lt;/span&gt; build&lt;br /&gt;
cmake ..&lt;br /&gt;
&lt;span&gt;make&lt;/span&gt;&lt;br /&gt;
ctest&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;The last command deserves some talking about.&lt;/p&gt;
&lt;h3&gt;Testing, Testing, Testing&lt;/h3&gt;
&lt;p&gt;When working with binding development there&amp;#8217;s a myriad of things that can go wrong, and a number of them go wrong in complete silence. With this in mind, I tell you that having unit tests makes the binding developer life bearable.&lt;/p&gt;
&lt;p&gt;To see detailed results from the tests, run ctest with &lt;code class=&quot;codecolorer bash default&quot;&gt;&lt;span class=&quot;bash&quot;&gt;&lt;span&gt;-V&lt;/span&gt;&lt;/span&gt;&lt;/code&gt; (verbose) option.&lt;/p&gt;
&lt;p&gt;Check the &lt;a href=&quot;https://github.com/setanta/python-epub/tree/master/tests&quot;&gt;tests directory&lt;/a&gt; for examples on how to use the python-epub bindings.&lt;/p&gt;
&lt;h2&gt;UI Example (or else it would be boring)&lt;/h2&gt;
&lt;p&gt;But the UI itself is very boring, although it was made with the amazing &lt;a href=&quot;http://www.pyside.org&quot;&gt;PySide&lt;/a&gt; I did it as simple as possible, it doesn&amp;#8217;t even show images. On the other hand, with very little code I can now see what&amp;#8217;s inside an ePub ebook.&lt;/p&gt;
&lt;p&gt;From &lt;code class=&quot;codecolorer bash default&quot;&gt;&lt;span class=&quot;bash&quot;&gt;python-epub&lt;span&gt;/&lt;/span&gt;build&lt;/span&gt;&lt;/code&gt; directory call the ePub viewer like this:&lt;/p&gt;
&lt;div class=&quot;codecolorer-container bash geshi&quot;&gt;&lt;div class=&quot;bash codecolorer&quot;&gt;python ..&lt;span&gt;/&lt;/span&gt;simple-ui&lt;span&gt;/&lt;/span&gt;bookviewer.py ..&lt;span&gt;/&lt;/span&gt;tests&lt;span&gt;/&lt;/span&gt;beyond-the-wall-of-sleep.epub&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;It always expects a parameter with the path to an ePub file, in this case &lt;a href=&quot;http://www.feedbooks.com/book/237/beyond-the-wall-of-sleep&quot;&gt;&amp;#8220;Beyond the Wall of Sleep&amp;#8221;&lt;/a&gt; by &lt;a href=&quot;http://www.feedbooks.com/author/12&quot;&gt;Lovecraft&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Screenshots:&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;http://www.setantas.net/blog/wp-content/uploads/2011/03/epubviewer_screenshots.png&quot; alt=&quot;Simplest ePub viewer (made with PySide)&quot; width=&quot;580&quot; height=&quot;480&quot; class=&quot;size-full wp-image-516&quot; /&gt;&lt;/p&gt;
&lt;p&gt;&lt;map name=&quot;google_ad_map_512_74ab9b1e764918ae&quot;&gt;
&lt;area shape=&quot;rect&quot; href=&quot;http://imageads.googleadservices.com/pagead/imgclick/512?pos=0&quot; coords=&quot;1,2,367,28&quot; /&gt;
&lt;area shape=&quot;rect&quot; href=&quot;http://services.google.com/feedback/abg&quot; coords=&quot;384,10,453,23&quot; /&gt;&lt;/map&gt;
&lt;img usemap=&quot;http://www.setantas.net/blog/feed/#google_ad_map_512_74ab9b1e764918ae&quot; border=&quot;0&quot; src=&quot;http://imageads.googleadservices.com/pagead/ads?format=468x30_aff_img&amp;client=&amp;channel=&amp;output=png&amp;cuid=512&amp;url= http%3A%2F%2Fwww.setantas.net%2Fblog%2F2011%2F03%2F08%2Fpython-bindings-for-libepub-using-shiboken%2F&quot; /&gt;&lt;/p&gt;&lt;div&gt;&lt;a href=&quot;http://twitter.com/share?url=http://www.setantas.net/blog/2011/03/08/python-bindings-for-libepub-using-shiboken/&amp;via=&amp;text=Python bindings for libepub using Shiboken&amp;related=:&amp;lang=en&amp;count=horizontal&quot; class=&quot;twitter-share-button&quot;&gt;Tweet&lt;/a&gt;&lt;/div&gt;</content:encoded>
	<dc:date>2011-03-09T00:31:54+00:00</dc:date>
</item>
<item rdf:about="http://blog.ademar.org/?p=1187">
	<title>Ademar de Souza Reis Jr.: Férias 2011! Destino: Europa</title>
	<link>https://blog.ademar.org/2011/ferias-2011-destino-europa/</link>
	<content:encoded>&lt;p&gt;Depois de quase 2 anos sem férias e sem nenhuma viagem de &amp;#8220;grande porte&amp;#8221;, finalmente é chegada a hora de um merecido descanso do trabalho e de ir pra algum lugar ainda desconhecido, desbravar novas fronteiras.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Atualização: &lt;/strong&gt; &lt;a href=&quot;http://www.ademar.org/fotos/europa/&quot; title=&quot;Viagem Europa 2011&quot;&gt;Álbum de fotos: Viagem à Europa 2011&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;O destino original que haviamos planejado ainda no ano passado era a Ásia, mais precisamente Índia e China com potencial de chegar até o Japão. Ir pra esses destinos por conta própria e com pouco tempo exige um consideravel esforço de planejamento e logística (vistos, idioma, grandes distâncias e altos custos em alguns lugares), então após alguns estudos, decidimos optar por um destino mais tranquilo e com melhor relação custo-benefício nesses aspectos: Europa.&lt;/p&gt;
&lt;p&gt;Serão 35 dias no total (valeu Carnaval!), chegando por Paris e voltando por Milão. Com excessão das passagens de ida e volta, o roteiro está quase todo em aberto, pois como estamos em baixa temporada (final do inverno por lá), os riscos de problemas com hospedagem e transporte são mínimos.&lt;/p&gt;
&lt;p&gt;O roteiro planejado, por enquanto, é esse:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Paris;&lt;/li&gt;
&lt;li&gt;Londres;&lt;/li&gt;
&lt;li&gt;Amsterdam e Rotterdam;&lt;/li&gt;
&lt;li&gt;Berlin;&lt;/li&gt;
&lt;li&gt;Moscow (ida e volta à Berlin);&lt;/li&gt;
&lt;li&gt;Cidades diversas nos países do Leste Europeu (Polônia, República Checa, Eslovênia, Hungria?);&lt;/li&gt;
&lt;li&gt;Viena;&lt;/li&gt;
&lt;li&gt;Munique;&lt;/li&gt;
&lt;li&gt;Zurique e região dos Alpes;&lt;/li&gt;
&lt;li&gt;De Veneza até Roma;&lt;/li&gt;
&lt;li&gt;Milão.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;No mapa:&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;small&gt;Visualizar &lt;a href=&quot;http://maps.google.com.br/maps/ms?ie=UTF8&amp;hq=&amp;hnear=Krak%C3%B3w,+Poland&amp;gl=br&amp;hl=pt-BR&amp;msa=0&amp;msid=214397880831996858742.00049db6037d32d1e54b5&amp;ll=50.680797,19.335938&amp;spn=17.854688,42.099609&amp;z=4&amp;source=embed&quot;&gt;Viagem Europa 2011&lt;/a&gt; em um mapa maior&lt;/small&gt;&lt;/p&gt;
&lt;p&gt;&lt;small&gt;(suficiente pra cumprir o &lt;a href=&quot;http://blog.ademar.org/2010/retrospectiva-2010-planos-pra-2011/&quot;&gt;objetivo de 2 novos países em 2011&lt;/a&gt;) ;-)&lt;/small&gt;&lt;/p&gt;
&lt;p&gt;Provavelmente não haverá tempo pra todos os destinos e o plano é alugar um carro em alguns desses trajetos, o que nos dará a oportunidade de conhecer cidades e vilas menores. Também existe a possibilidade de embarcarmos em voos baratos como os de EUR 7 da &lt;a href=&quot;http://www.ryanair.com/&quot;&gt;Ryan Air&lt;/a&gt; pra chegar em cidades mais remotas, ou mesmo mudar completamente a parte final da viagem.&lt;/p&gt;
&lt;p&gt;Como sempre, será uma viagem sem exageros nos custos, com apoio de &lt;a href=&quot;http://blog.ademar.org/tag/couchsurfing/&quot;&gt;couchsurfers&lt;/a&gt; ao longo do caminho e muitas fotos. Pequenos relatos e fotos mais descompromissadas devem aparecer nos perfis do twitter &lt;a href=&quot;http://twitter.com/adebr&quot;&gt;@adebr&lt;/a&gt; e &lt;a href=&quot;http://twitter.com/tudocasa&quot;&gt;@tudocasa&lt;/a&gt; (Viviane) e em meu facebook. &lt;/p&gt;
&lt;p&gt;Espero dessa vez pré-selecionar as fotos no caminho pra evitar o problema que tive com a viagem de 2009 à Patagônia, que não teve suas fotos publicadas até hoje (&lt;em&gt;shame on me!&lt;/em&gt;). :-P&lt;/p&gt;
&lt;p&gt;Em tempo, muito obrigado a todos os que nos ajudaram com dicas de roteiro e aos couchsurfers que nos ajudarão ainda mais durante o trajeto. :-)&lt;/p&gt;
&lt;p&gt;
&lt;!-- auto-responsive --&gt;
&lt;ins class=&quot;adsbygoogle&quot;&gt;&lt;/ins&gt;
&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;&lt;small&gt;&lt;a href=&quot;https://blog.ademar.org/2011/ferias-2011-destino-europa/&quot;&gt;Link Permanente&lt;/a&gt; |
&lt;a href=&quot;https://blog.ademar.org/2011/ferias-2011-destino-europa/#comments&quot;&gt;2 commentários&lt;/a&gt;&lt;br /&gt;
Post tags: &lt;a href=&quot;https://blog.ademar.org/tag/europa/&quot; rel=&quot;tag&quot;&gt;europa&lt;/a&gt;, &lt;a href=&quot;https://blog.ademar.org/tag/viagem/&quot; rel=&quot;tag&quot;&gt;viagem&lt;/a&gt;&lt;br /&gt;
&lt;/small&gt;&lt;/p&gt;&lt;div class=&quot;yarpp-related-rss&quot;&gt;
&lt;p&gt;Posts possivelmente relacionados:&lt;ol&gt;
&lt;li&gt;&lt;a href=&quot;https://blog.ademar.org/2009/viagem-africa-do-sul-skydive-plettenberg-bay/&quot; rel=&quot;bookmark&quot; title=&quot;Viagem à África do Sul: Skydive em Plettenberg Bay&quot;&gt;Viagem à África do Sul: Skydive em Plettenberg Bay &lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://blog.ademar.org/2008/viagem-a-africa-do-sul-dirigindo-tudo-ao-contrario/&quot; rel=&quot;bookmark&quot; title=&quot;Viagem à Africa do Sul: Dirigindo, tudo ao contrário&quot;&gt;Viagem à Africa do Sul: Dirigindo, tudo ao contrário &lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://blog.ademar.org/2007/viagem-margarita-compras/&quot; rel=&quot;bookmark&quot; title=&quot;Viagem à Ilha de Margarita :: Compras&quot;&gt;Viagem à Ilha de Margarita :: Compras &lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;img src=&quot;http://feeds.feedburner.com/~r/blogademar/~4/Vxp6ZKNq_zQ&quot; height=&quot;1&quot; width=&quot;1&quot; alt=&quot;&quot; /&gt;</content:encoded>
	<dc:date>2011-03-05T13:25:14+00:00</dc:date>
</item>
<item rdf:about="tag:blogger.com,1999:blog-36235783.post-368400671338074215">
	<title>Kenneth Christiansen: FOSDEM talk</title>
	<link>http://codeposts.blogspot.com/2011/02/fosdem-talk.html</link>
	<content:encoded>&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I will upload the slides soon.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;[Update] &lt;/b&gt;Slides are up &lt;a href=&quot;http://www.slideshare.net/kchristi/qt-webkit-going-mobile-7016102&quot;&gt;here at slideshare.net&lt;/a&gt;&lt;/div&gt;</content:encoded>
	<dc:date>2011-02-22T11:23:12+00:00</dc:date>
	<dc:creator>Kenneth Rohde Christiansen</dc:creator>
</item>
<item rdf:about="http://franciscoalecrim.com/blog/?p=329">
	<title>Francisco Alecrim: Mandriva 2010 : rodando sua aplicação como administrador(root)</title>
	<link>http://franciscoalecrim.com/blog/2011/02/21/mandriva-2010-rodando-sua-aplicacao-como-administradorroot/</link>
	<content:encoded>&lt;p&gt;Imagine que você desenvolveu uma aplicação que precisa de permissão de root. Agora você quer que o Mandriva chame sua aplicação como usuário administrador(root).&lt;/p&gt;
&lt;p&gt;0 &amp;#8211; Minha aplicação simples é um Hello world&lt;/p&gt;
&lt;pre&gt;echo -e '#include \nint main(){printf(&quot;hello mandriva world\\n&quot;);}' &amp;gt; hello.c
gcc hello.c -o hello&lt;/pre&gt;
&lt;p&gt;1 &amp;#8211; Chamar o console-helper ao invés de chamar sua aplicação:&lt;/p&gt;
&lt;pre&gt;su - root
cd /usr/bin
ln -s /usb/bin/console-helper hello&lt;/pre&gt;
&lt;p&gt;2 &amp;#8211; Criar arquivo PAM /etc/pam.d/hello&lt;/p&gt;
&lt;pre&gt;
#%PAM-1.0
auth            include         config-util
account         include         config-util
session         include         config-util&lt;/pre&gt;
&lt;p&gt;3 &amp;#8211; Criar arquivo com PATH em /etc/security/console.apps/hello&lt;/p&gt;
&lt;pre&gt;USER=root
PROGRAM=/home/alecrim/hello
SESSION=true
FALLBACK=true&lt;/pre&gt;</content:encoded>
	<dc:date>2011-02-21T18:16:37+00:00</dc:date>
	<dc:creator>Francisco Keppler Silva Alecrim</dc:creator>
</item>

</rdf:RDF>
