<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Eurion · RainCT&#039;s Blog</title>
	<atom:link href="http://bloc.eurion.net/feed/" rel="self" type="application/rss+xml" />
	<link>http://bloc.eurion.net</link>
	<description>I would love to change the world, but they won&#039;t give me the source code...</description>
	<lastBuildDate>Sun, 22 Aug 2010 22:14:57 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Book Review: The Heart Mender</title>
		<link>http://bloc.eurion.net/archives/2010/book-review-the-heart-mender/</link>
		<comments>http://bloc.eurion.net/archives/2010/book-review-the-heart-mender/#comments</comments>
		<pubDate>Sun, 22 Aug 2010 19:16:00 +0000</pubDate>
		<dc:creator>RainCT</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[book review]]></category>

		<guid isPermaLink="false">http://bloc.eurion.net/?p=621</guid>
		<description><![CDATA[Some time ago I found out about Book Sneeze, a service by Thomas Nelson offering free books in exchange for reviewing them on your blog (the reviews aren&#8217;t required to be positive). I decided to give it a try, and a couple days after signing up my account got approved. The website shows a changing selection of [...]]]></description>
			<content:encoded><![CDATA[<div class="mceTemp">
<dl id="attachment_623" class="wp-caption alignright" style="width: 202px;">
<dt class="wp-caption-dt"><a href="http://bloc.eurion.net/wp-content/uploads/2010/08/andy-andrews-the-heart-mender.jpg"><img class="size-medium wp-image-623" title="The Heart Mender by Andy Andrews" src="http://bloc.eurion.net/wp-content/uploads/2010/08/andy-andrews-the-heart-mender-192x300.jpg" alt="" width="192" height="300" /></a></dt>
</dl>
</div>
<p>Some time ago I found out about <a href="http://booksneeze.com/">Book Sneeze</a>, a service by <a href="http://www.thomasnelson.com">Thomas Nelson</a> offering free books in exchange for reviewing them on your blog (the reviews aren&#8217;t required to be positive).</p>
<p>I decided to give it a try, and a couple days after signing up my account got approved. The website shows a changing selection of a bit more than a handful books available at any time. When I visited the page, most stuff available seemed to be about religion or self-help, which I&#8217;m not really interested in, and I decided for the book which looked the most like a novel. It happened to be Andy Andrews&#8217; «<em>The Heart Mender</em>» (formerly published as <em>Island of Saints</em>).</p>
<p>After the usual delay (snail post is painfully slow here) I received the expected package, and they were even so nice as to include a second copy to give away. I&#8217;ll see what I do with it :). Anyway, here goes the review!</p>
<blockquote><p>
When I started reading the book, it surprised me twofold: first of all, it didn&#8217;t begin with the actual story I had expected, but with a narration of how the author got to write the book, after finding a box containing WWII artefacts and a photo buried in his backyard. Even more surprising, though, I got captivated by it after reading just the first few pages, something many few books achieve so fast.</p>
<p>After a few chapters exploring the origin of the artefacts, the author begins with the actual story of how Josef Landerman, Lieutenant of a German U-Boat sent to the Gulf of Mexico, ends up at the mercy of Helen Mason. Helen, a widow who hasn&#8217;t been able to overcome her ill fortune, is thus confronted with the choice of saving the life of someone wearing the same uniform that killed her husband years ago. Even if Helen decides to help him, what will await him so far from home?</p>
<p>While it&#8217;s sold as a romance focusing on the topic of forgiveness, the book doesn&#8217;t miss its fair share of adventure and it is a pleasurable read. I can only recommend it.</p></blockquote>
<hr />
<p><small>
<a href="http://bloc.eurion.net/archives/2010/book-review-the-heart-mender/#comments">No comments</a><br />
© Siegfried-Angel Gevatter Pujals, 2010. |
<a href="http://bloc.eurion.net/archives/2010/book-review-the-heart-mender/">Permalink</a> |
<a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/3.0/">License</a> |
Post tags: <a href="http://bloc.eurion.net/archives/tag/book-review/" rel="tag">book review</a><br/>
</small></p>]]></content:encoded>
			<wfw:commentRss>http://bloc.eurion.net/archives/2010/book-review-the-heart-mender/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Experiments with image recognition</title>
		<link>http://bloc.eurion.net/archives/2010/experiments-with-image-recognition/</link>
		<comments>http://bloc.eurion.net/archives/2010/experiments-with-image-recognition/#comments</comments>
		<pubDate>Fri, 20 Aug 2010 15:47:19 +0000</pubDate>
		<dc:creator>RainCT</dc:creator>
				<category><![CDATA[Planet GNOME]]></category>
		<category><![CDATA[Planet Ubuntu]]></category>
		<category><![CDATA[Planet Ubuntu.cat]]></category>
		<category><![CDATA[color recognition]]></category>
		<category><![CDATA[computer vision]]></category>
		<category><![CDATA[image recognition]]></category>
		<category><![CDATA[opencv]]></category>

		<guid isPermaLink="false">http://bloc.eurion.net/?p=636</guid>
		<description><![CDATA[It&#8217;s summer, which means: I&#8217;ve got time for some crazy experiments! As you may know, two years ago I played around with voice recognition. My original idea for this summer was to do some robotics stuff, but unfortunately I&#8217;ve had problems getting the serial connection to work. But don&#8217;t worry, because I&#8217;ve found something else to do. [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s summer, which means: I&#8217;ve got time for some crazy experiments! As you may know, two years ago I played around with <a href="http://bloc.eurion.net/archives/2008/writing-a-command-and-control-application-with-voice-recognition/">voice recognition</a>. My original idea for this summer was to do some <a href="http://picasaweb.google.com/siggi.gevatter/RoboticsCourse">robotics</a> stuff, but unfortunately I&#8217;ve had problems getting the serial connection to work. But don&#8217;t worry, because I&#8217;ve found something else to do. I noticed a nice red box lying around in my room, so I thought: «let&#8217;s see how difficult it is to get my computer to <em>see</em> it».</p>
<p>For extra fun, I also decided to impose two rules: no reading up on existing algorithms or «weird maths» (I&#8217;ll have enough time for this when I study Computer Vision at <a href="http://www.fib.upc.edu/en.html">university</a>), and no «magic» (ie., implementing everything myself and not using existing functions for edge detection or whatever).</p>
<p><a href="http://www.youtube.com/watch?v=5q1gkTo84LY"><img class="size-full wp-image-639 alignright" title="Screenshot of the first video" src="http://bloc.eurion.net/wp-content/uploads/2010/08/first-video.png" alt="" width="200" height="140" /></a></p>
<p><strong>First steps</strong></p>
<p>Of course, my first choice for trying this was Python, so I installed <a href="http://www.pythonware.com/products/pil/">PIL</a> and <a href="http://www.scipy.org/">SciPy</a>, and took a photo of the box. With just a function call, they give me access to each pixel&#8217;s <a href="http://en.wikipedia.org/wiki/RGB_color_model">RGB</a> value, so it&#8217;s really easy to have it change all points that aren&#8217;t red into black and other funny stuff.</p>
<p>However, iterating through all the pixels in the image was quite slow (in the order of several seconds) so I decided to switch to C and <a href="http://opencv.willowgarage.com/wiki/">OpenCV</a>, which turned out to be really nice to work with. After a while I had <a href="http://bazaar.launchpad.net/~rainct/%2Bjunk/color-recognition/annotate/6/recognition.c">written down</a> the first algorithm I could think of, and it kinda worked (see video at right). I want to thank <a href="http://mhr3.blogspot.com">Michal</a> for the idea of converting the image to the <a href="http://en.wikipedia.org/wiki/HSL_and_HSV">HSV colour space</a> for colour checking.</p>
<p><strong>Noise reduction</strong></p>
<div class="mceTemp">
<dl id="attachment_649" class="wp-caption alignleft" style="width: 160px;">
<dt class="wp-caption-dt"><a href="http://bloc.eurion.net/wp-content/uploads/2010/08/isolated-pixel-correction.png"><img class="size-thumbnail wp-image-649" title="Pixel Correction" src="http://bloc.eurion.net/wp-content/uploads/2010/08/isolated-pixel-correction-150x150.png" alt="" width="150" height="150" /></a></dt>
</dl>
</div>
<p>After I had a first success, I worked on some new multi-pass code with lots of loops to see if I can get some noise reduction. I started by turning everything which isn&#8217;t detected as red into black so that I get a better overview of what&#8217;s going on. Then I improved this to let it find non-matching pixels surrounded by red ones (on the top and the left they must be adjacent, but on the right and bottom the nearest red may be some distance away; this works even for groups of pixels since the image is processed from left to right and from top to bottom). Finally, I added some more code to remove any little group of red pixels surrounded by non-matching ones. The effect of this will be seen later.</p>
<div class="mceTemp">
<dl id="attachment_642" class="wp-caption alignright" style="width: 160px;">
<dt class="wp-caption-dt"><a href="http://bloc.eurion.net/wp-content/uploads/2010/08/evening.png"><img class="size-thumbnail wp-image-642 " title="Noise reduction at night" src="http://bloc.eurion.net/wp-content/uploads/2010/08/evening-150x150.png" alt="" width="150" height="150" /></a></dt>
</dl>
</div>
<p><strong>Illumination</strong></p>
<p>For some reason the detection gets mad if there is artificial light (or maybe it&#8217;s just that I haven&#8217;t found the right colour values to check for). No light at all (except for that of the computer screens) works better -after reducing the minimum levels of saturation and brightness I was checking for-, but it gives a lot of noise. My first program therefore fails miserably under such conditions.</p>
<p>However, now that I have the noise reduction this is no longer a problem. See by yourself: <em>image at right</em>. (The really bright points are those which didn&#8217;t match but have been converted to red since they are surrounded).</p>
<p><strong>Second try at box detection</strong></p>
<p>I could just have put my previous box detection algorithm on top of it, but I decided to make use of the fact that the noise reduction is successfully removing everything except for the box. Thus, instead of searching for red lines likes before I just localize the left-most, right-most, highest and lowest red points.</p>
<p>Using those four points, I calculate the centre of the box (and I could also reliably determine the position of the four corners, if I added some more code to find whether the box is horizontally aligned or not).</p>
<p>Finally I calculate the relative movement of the centre point and this way I can control a pointer (bottom right of the video). Here we go:</p>
<p style="text-align: center;"><span class="youtube">
<object width="425" height="344">
<param name="movie" value="http://www.youtube-nocookie.com/v/y8qgiTQfuJE&amp;color1=d6d6d6&amp;color2=f0f0f0&amp;border=0&amp;fs=1&amp;hl=en&amp;autoplay=0&amp;showinfo=0&amp;iv_load_policy=3&amp;showsearch=0?rel=1" />
<param name="allowFullScreen" value="true" />
<embed wmode="transparent" src="http://www.youtube-nocookie.com/v/y8qgiTQfuJE&amp;color1=d6d6d6&amp;color2=f0f0f0&amp;border=0&amp;fs=1&amp;hl=en&amp;autoplay=0&amp;showinfo=0&amp;iv_load_policy=3&amp;showsearch=0?rel=1" type="application/x-shockwave-flash" allowfullscreen="true" width="425" height="344"></embed>
<param name="wmode" value="transparent" />
</object>
</span><p><a href="http://www.youtube.com/watch?v=y8qgiTQfuJE">www.youtube.com/watch?v=y8qgiTQfuJE</a></p></p>
<p style="text-align: center;">(And it works as well <a href="http://bloc.eurion.net/wp-content/uploads/2010/08/3views-night.png">at night</a>! -<a href="http://bazaar.launchpad.net/~rainct/%2Bjunk/color-recognition/annotate/22/isolate.c"> Code is here</a>)</p>
<hr />
<p><small>
<a href="http://bloc.eurion.net/archives/2010/experiments-with-image-recognition/#comments">6 comments</a><br />
© Siegfried-Angel Gevatter Pujals, 2010. |
<a href="http://bloc.eurion.net/archives/2010/experiments-with-image-recognition/">Permalink</a> |
<a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/3.0/">License</a> |
Post tags: <a href="http://bloc.eurion.net/archives/tag/color-recognition/" rel="tag">color recognition</a>, <a href="http://bloc.eurion.net/archives/tag/computer-vision/" rel="tag">computer vision</a>, <a href="http://bloc.eurion.net/archives/tag/image-recognition/" rel="tag">image recognition</a>, <a href="http://bloc.eurion.net/archives/tag/opencv/" rel="tag">opencv</a><br/>
</small></p>]]></content:encoded>
			<wfw:commentRss>http://bloc.eurion.net/archives/2010/experiments-with-image-recognition/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Yet another GUADEC post</title>
		<link>http://bloc.eurion.net/archives/2010/yet-another-guadec-post/</link>
		<comments>http://bloc.eurion.net/archives/2010/yet-another-guadec-post/#comments</comments>
		<pubDate>Tue, 03 Aug 2010 13:14:38 +0000</pubDate>
		<dc:creator>RainCT</dc:creator>
				<category><![CDATA[Planet GNOME]]></category>
		<category><![CDATA[Planet Ubuntu]]></category>
		<category><![CDATA[gnome]]></category>
		<category><![CDATA[guadec]]></category>
		<category><![CDATA[zeitgeist]]></category>

		<guid isPermaLink="false">http://bloc.eurion.net/?p=599</guid>
		<description><![CDATA[I haven&#8217;t blogged for quite a few weeks, so I guess it&#8217;s time I revive my blog, and what better way to do this than writing about how awesome GUADEC was? :) Saturday 25 I went to the Barcelona airport to take a plane at twelve. The plane started almost two hours later because part [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignright size-thumbnail wp-image-432" title="gnome-sponsored-badge" src="http://bloc.eurion.net/wp-content/uploads/2009/11/gnome-sponsored-badge-150x150.png" alt="gnome-sponsored-badge" width="150" height="150" /></p>
<p>I haven&#8217;t blogged for quite a few weeks, so I guess it&#8217;s time I revive my blog, and what better way to do this than writing about how awesome <a href="http://2010.guadec.org/">GUADEC</a> was? :)</p>
<p><strong>Saturday 25</strong></p>
<p>I went to the Barcelona airport to take a plane at twelve. The plane started almost two hours later because part of the airport was closed for inspection or something, but I finally arrived at Amsterdam. There I took a train to Den Haag and after half an hour of enjoying the green view through the window I arrived at Central Station.</p>
<p>Ten minutes later I entered <a href="http://www.accorhotels.com/gb/hotel-1317-mercure-den-haag-central/index.shtml">the hotel</a> and found Clemens and the others from <a href="http://inventedhere.de/">invented here</a>. We went to <a href="http://revspace.nl/">RevSpace</a> for a while. There wasn&#8217;t much going on (the <a href="http://www.gnu.org/ghm/2010/denhaag/">GNU Hackers meeting</a> was already over), but I think the place is pretty cool. Too bad there seems to be no<a href="http://hackerspaces.org/"> hackerspace</a> in Barcelona&#8230;</p>
<p>After a while we went out for dinner, and sitting at the restaurant we found <a href="http://www.vuntz.net/">Vincent</a>. Back at the hotel I had a drink with some Canonical folks, and finally I went to sleep and discovered who my room mate would be: <a href="http://identi.ca/jjmarin">Juanjo</a>.</p>
<p><strong>Monday 26 &amp; Tuesday 27<br />
</strong></p>
<p>On Monday I went to the <a href="http://inventedhere.de/the-first-two-guadec-open-design-thinking-workshops">design thinking workshop</a> out of curiosity for what that&#8217;d be, and it turned out to be an interesting experience. I&#8217;d have preferred if they had chosen another topic, though, since &#8220;<em>How might we simplify the handling of digital information?</em>&#8221; is something I&#8217;ve been <a href="http://zeitgeist-project.com">working on</a> and thinking about for the past year so I have my mind pretty much made up on this topic.</p>
<p>I met several Google <a href="http://perditusinventusque.blogspot.com/2010/05/gnome-shell-message-tray.html">Summer</a> <a href="https://launchpad.net/~hmpoumpouka">of</a> <a href="http://freesteph.info/">Code</a> <a href="http://attente.ca/">students</a> and the GNOME Shell team, I infiltrated myself into the GSoC dinner and participated in the soccer match Tuesday evening.</p>
<p><strong>Wednesday 28</strong></p>
<p><a href="http://guadec.org/index.php/guadec/2010/schedConf/program">Wednesday</a>, my first GUADEC starts! Opening talk, Web, Who makes GNOME, State of GNOME Shell, Shell Yes!, GNOME: <a href="http://guadec.org/index.php/guadec/2010/paper/view/12">State of the Union</a> (most funny talk ever), Crypto, Clutter, Clutter.</p>
<p>See <a href="http://guadec.org/index.php/guadec/index/announcement/view/23">the GUADEC blog</a> and Steph&#8217;s <a href="http://freesteph.info/post2010/07/27/First-day-at-GUADEC">blog</a> <a href="http://freesteph.info/post/2010/07/28/The-coolest-roadmap-I-ve-seen">posts</a> for more details.</p>
<p>Once the venue closed I went with Will and Steph to the Canonical party and <a title="don't ask :P"><em>eventually</em></a> we arrived there.</p>
<p><strong>Thursday 29</strong></p>
<p>After just five hours of needed sleep I had <a href="http://seilo.geekyogre.com/">Seif</a> on the phone waking me up. He and <a href="http://reflaction.info/">Thorsten</a> had just arrived, and we started working on the slides for our talk. I went to the Haagse Hogeschool and assisted to part of Emmanuele&#8217;s &#8220;So you think you can release?&#8221; talk. Then, after <a href="http://kakaroto.homelinux.net/">Youness</a> joined us, we finished this: <a href="http://bloc.eurion.net/wp-content/uploads/2010/07/Zeitgeist-Slides-GUADEC-2010.pdf">Zeitgeist Slides &#8211; GUADEC 2010</a>, and finally it was time for our presentation where we talked about the state of <a href="http://zeitgeist-project.com">Zeitgeist</a> and introduced <a href="http://gitorious.org/teamgeist">Teamgeist</a>.</p>
<p>I attended several other talks (JavaScript, How a Free Desktop can help -and hinder- Free Speech, GNOME 3 and Your Application and Malware threats to a Linux Desktop by Thorsten Sick), and finally there was a GNOME Shell dinner at an Indian place. After that we all went to the Collabora Beach Party until they started closing up.</p>
<p>See also: <a href="http://guadec.org/index.php/guadec/index/announcement/view/24">GUADEC blog</a>, <a href="http://freesteph.info/post/2010/07/29/Second-day-at-GUADEC">Steph&#8217;s blog</a>.</p>
<p><strong>Friday 30</strong></p>
<p><a href="http://blogs.gnome.org/abustany/">Adrien</a> familiarized us with his work making it easy to <a href="http://guadec.org/index.php/guadec/2010/paper/view/83">making GNOME more connected</a> by accessing online information through Tracker, there was more talk about how we need to embrace the web (using web technologies for easier development and also integrating online data into our applications was a very recurring topic all along GUADEC), Fabrice Mous keynote gave me another example of how governments suck at throwing money around, there was a talk on the future of Cairo and finally Danilo talked about Launchpad.</p>
<p>GUADEC closed with the announcement that the next Desktop Summit will be in Berlin (cool, maybe I&#8217;ll get to see the <a href="http://www.c-base.org/">c-base</a> then?) and after helping clean up the kilometric mess of network cables (btw, kudos to everyone who helped organizing GUADEC &#8211; you guys rock!) I headed to the RevSpace again for the afterparty for ice cream and many games of pinball! On the way back to the hotel <a href="http://blogs.gnome.org/otte/2010/07/30/highlights-of-guadec-2010/">Benjamin</a> explained me his secret plans for breaking GNOME.</p>
<p>Again, more <a href="http://guadec.org/index.php/guadec/index/announcement/view/26">here</a> and <a href="http://freesteph.info/post/2010/07/30/Final-day-at-GUADEC">here</a>.</p>
<p><strong>Satuday 31<br />
</strong></p>
<p>Slept until late, hanged around in the hotel lobby for some hours with some other guys (I also passed by RevSpace to see if I could find anyone there, no luck) and finally I took the train back to Amsterdam, ate something there, and for a change I had to wait one hour for the plane to arrive. I&#8217;m back in normal life now, but the next GUADEC is only one year away :).</p>


<p>Related posts:<ol><li><a href='http://bloc.eurion.net/archives/2009/zeitgeist-hackfest-2009/' rel='bookmark' title='Permanent Link: Zeitgeist Hackfest'>Zeitgeist Hackfest</a></li>
</ol></p><hr />
<p><small>
<a href="http://bloc.eurion.net/archives/2010/yet-another-guadec-post/#comments">3 comments</a><br />
© Siegfried-Angel Gevatter Pujals, 2010. |
<a href="http://bloc.eurion.net/archives/2010/yet-another-guadec-post/">Permalink</a> |
<a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/3.0/">License</a> |
Post tags: <a href="http://bloc.eurion.net/archives/tag/gnome/" rel="tag">gnome</a>, <a href="http://bloc.eurion.net/archives/tag/guadec/" rel="tag">guadec</a>, <a href="http://bloc.eurion.net/archives/tag/zeitgeist/" rel="tag">zeitgeist</a><br/>
</small></p>]]></content:encoded>
			<wfw:commentRss>http://bloc.eurion.net/archives/2010/yet-another-guadec-post/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>GPG key signing with CAFF</title>
		<link>http://bloc.eurion.net/archives/2010/gpg-key-signing-with-caff/</link>
		<comments>http://bloc.eurion.net/archives/2010/gpg-key-signing-with-caff/#comments</comments>
		<pubDate>Sat, 01 May 2010 22:10:18 +0000</pubDate>
		<dc:creator>RainCT</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[events]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://bloc.eurion.net/?p=584</guid>
		<description><![CDATA[I&#8217;ve finally got around to doing my homework from FOSDEM and since I&#8217;m sure before long I&#8217;ll have forgotten again how all this works, let me write it down here. 1. Installing CAFF (CA &#8211; Fire and Forget) Easy. sudo aptitude install signing-party 2. Configuring CAFF For this we open up ~/.caffrc and write in [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve finally got around to doing my homework from <a href="http://fosdem.org/2010/">FOSDEM</a> and since I&#8217;m sure before long I&#8217;ll have forgotten again how all this works, let me write it down here.</p>
<p><strong>1. Installing CAFF</strong> (CA &#8211; Fire and Forget)</p>
<p>Easy.</p>
<pre>sudo aptitude install signing-party</pre>
<p><strong>2. Configuring CAFF</strong></p>
<p>For this we open up ~/.caffrc and write in something like this:</p>
<pre>$CONFIG{'owner'} = 'Siegfried Gevatter';
$CONFIG{'email'} = 'name@example.com';
$CONFIG{'keyid'} = [ qw{1CFC22F3363DEAE3} ];
$CONFIG{'gpg-sign-args'} = 'save';
</pre>
<p>The last line avoids the default behavior of dropping you into an interactive <strong>gpg</strong> session for each key, and just signs all IDs automatically after asked for confirmation. I&#8217;ve also set the trust level to 2 (&#8220;<em>I have checked this key casually.</em>&#8220;) by creating a <em>~/.caff/gnupghome/gpg.conf</em> file with:</p>
<pre>personal-digest-preferences SHA256
cert-digest-algo SHA256
default-cert-level 2</pre>
<p>To further streamline the process, I&#8217;ve defined an alias in my <em>~./.bashrc</em> so that CAFF won&#8217;t ask for confirmation for every single e-mail it sends:</p>
<pre>alias caff="caff -m yes"</pre>
<p><strong>3. Installing and configuring sSMTP</strong></p>
<p>Now so that CAFF can send out the mails, we need a mail agent. If you don&#8217;t have one already, you&#8217;ll need to install one and configure it to work with your e-mail setup (in my case, Gmail). I decided to go with sSMTP, but you can use any other MTA of your choice.</p>
<p>I followed those instructions to configure it:  <a href="http://www.nixtutor.com/linux/send-mail-with-gmail-and-ssmtp/">Send Mail with Gmail and sSMTP</a>. Additionally, I changed the permissions of the <em>/etc/ssmtp/ssmtp.conf</em> file to 640 (<em>-rw-r&#8212;&#8211;</em>) and the owner to <em>root.rainct</em> (where <em>rainct</em> is my username) so that the plain-text password in it is protected.</p>
<p><strong>4. Using CAFF</strong></p>
<p>That&#8217;s it. Well, at least for the setup part, now the real work begins, verifying and signing all the keys. In my case I had them printed out on paper and just typed &#8220;<em>caff &lt;id1&gt; &lt;id2&gt; &lt;&#8230;&gt;&#8221; </em> (eg. &#8220;<em>caff 363DEAE3</em>&#8220;). CAFF then downloads the keys, asks for confirmation for each of them so you can double-check, and finally e-mails the signatures to everyone.</p>
<p>By the way, in case you accidentally sign the wrong key (eg. one you had on your list but whose owner you didn&#8217;t met), you can still revoke your signature (see this &#8220;<a href="http://http://lists.gnupg.org/pipermail/gnupg-users/2005-August/026543.html">Help revoking a signature</a>&#8221; mailing list post).</p>


<p>Related posts:<ol><li><a href='http://bloc.eurion.net/archives/2009/no-sound-on-hp-pavilion-dv6-1110ss/' rel='bookmark' title='Permanent Link: No sound on HP Pavilion dv6-1110ss'>No sound on HP Pavilion dv6-1110ss</a></li>
</ol></p><hr />
<p><small>
<a href="http://bloc.eurion.net/archives/2010/gpg-key-signing-with-caff/#comments">No comments</a><br />
© Siegfried-Angel Gevatter Pujals, 2010. |
<a href="http://bloc.eurion.net/archives/2010/gpg-key-signing-with-caff/">Permalink</a> |
<a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/3.0/">License</a> |
Post tags: <a href="http://bloc.eurion.net/archives/tag/debian/" rel="tag">Debian</a>, <a href="http://bloc.eurion.net/archives/tag/events/" rel="tag">events</a>, <a href="http://bloc.eurion.net/archives/tag/ubuntu/" rel="tag">Ubuntu</a><br/>
</small></p>]]></content:encoded>
			<wfw:commentRss>http://bloc.eurion.net/archives/2010/gpg-key-signing-with-caff/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Zeitgeist 0.3.3 is out!</title>
		<link>http://bloc.eurion.net/archives/2010/zeitgeist-0-3-3-is-out/</link>
		<comments>http://bloc.eurion.net/archives/2010/zeitgeist-0-3-3-is-out/#comments</comments>
		<pubDate>Tue, 20 Apr 2010 14:28:46 +0000</pubDate>
		<dc:creator>RainCT</dc:creator>
				<category><![CDATA[Planet GNOME]]></category>
		<category><![CDATA[Planet Ubuntu]]></category>
		<category><![CDATA[Planet Ubuntu.cat]]></category>
		<category><![CDATA[gnome]]></category>
		<category><![CDATA[Programari lliure]]></category>
		<category><![CDATA[zeitgeist]]></category>

		<guid isPermaLink="false">http://bloc.eurion.net/?p=560</guid>
		<description><![CDATA[From the release announcement: On behalf of the Zeitgeist Project team, I am pleased to announce the immediate availability of Zeitgeist 0.3.3. It introduces an improved relationship algorithm, new sorting types for queries, a data-source registry (providing the possibility of easily disabling individual loggers) and several bug fixes and other enhancements. What is Zeitgeist? Zeitgeist [...]]]></description>
			<content:encoded><![CDATA[<p>From the <a href="https://edge.launchpad.net/zeitgeist/+announcement/5642">release announcement</a>:</p>
<p>On behalf of the Zeitgeist Project team, I am pleased to announce the immediate availability of Zeitgeist 0.3.3. It introduces an improved relationship algorithm, new sorting types for queries, a <a href="http://bloc.eurion.net/archives/2010/zeitgeist-data-source-registry/">data-source registry</a> (providing the possibility of easily disabling individual loggers) and several bug fixes and other enhancements.</p>
<p><strong>What is Zeitgeist?</strong></p>
<p>Zeitgeist is an event-logging framework for desktop and mobile devices. Applications can push events into the log, and anyone can query the log via the rich query API. The logged events are semantically categorized and can come from any sort of activity, such as file usage, communications, browsing history, etc. The Zeitgeist engine is a user-level service and does not provide a GUI. It is intended to support dedicated journalling applications and deep integration with other desktop components.</p>
<p><strong>Where?</strong></p>
<p>Downloads: <a href="https://launchpad.net/zeitgeist/+download">https://launchpad.net/zeitgeist/+download</a> (<a href="http://edge.launchpad.net/zeitgeist/0.3/0.3.3/+download/zeitgeist-0.3.3.tar.gz">zeitgeist-0.3.3.tar.gz</a>)</p>
<p>About Zeitgeist: <a href="http://zeitgeist-project.com">http://zeitgeist-project.com</a></p>
<p>Wiki: <a href="http://live.gnome.org/Zeitgeist">http://live.gnome.org/Zeitgeist</a></p>
<p><strong>News since 0.3.2</strong></p>
<pre>Engine:

- Added MostPopularActor, LeastPopularActor, MostRecentActor and
LeastRecentActor as possible ReturnTypes for FindEvents and
FindEventsId (LP: #493903).
- Let {Find,Get,Insert}* hooks know the bus name of the caller, when
executed over D-Bus.
- Add an extension implementing a data-source registry (allowing to disable
data-sources from a centralized place and see their description).
- Overhauled FindRelatedUris for better results and improved performance.
- Changed FindEvents, FindEventIds and FindRelatedUris to not treat zeros in
the given TimeRange specially; "(0, 0)" can no longer be used (LP: #490242).
- Fixed a crash in the GtkRecentlyUsed data-source parsing malfored .desktop
files (LP: #526357), and added support for more file mimetypes (LP: #510761).
- Fixed a crash in the GtkRecentlyUsed data-source trying to read broken
symlinks disguised as .desktop files (LP: #523761).
- Fixed a crash in the GtkRecentlyUsed data-source which happened when there
was no display friendly version of a URI (LP: #531793).
- Renamed --no-passive-loggers option to --no-datahub. Output printed by
zeitgeist-datahub is no longer visible in zeitgeist-daemon's output.
- Added --log-level option to change the output verbosity.
- DeleteEvents now correctly removes any unreferenced values (URIs, actors,
etc.) and not only the events themselves (LP: #491646).
- Fixed insertion of events with a payload (LP: #557708).
- Fixed an exception in DeleteEvents.
- Fixed event deletions not always getting committed (LP: #566184).
- Ignore deletion requests for non-existant events.

Python API:
- Made the Interpretation and Manifestation classes iterable.
- Added symbol lookup by URI, in the form of dictionary access.
- Fixed the display name for Interpretation.SOURCECODE.
- Fixed find_events_for_values and find_event_ids_for_values (LP: #510804).
- Added a get_extension() method to ZeitgeistDBusInterface, to get convenient
access to D-Bus interfaces provided by engine extensions.

Overall:
- More fixes and code enhancements.
- Manpage updates.
- Translation updates.
</pre>


<p>Related posts:<ol><li><a href='http://bloc.eurion.net/archives/2010/zeitgeist-data-source-registry/' rel='bookmark' title='Permanent Link: Zeitgeist Data-Source Registry'>Zeitgeist Data-Source Registry</a></li>
<li><a href='http://bloc.eurion.net/archives/2009/zeitgeist-api-02/' rel='bookmark' title='Permanent Link: Introduction to Zeitgeist 0.2&#8242;s API'>Introduction to Zeitgeist 0.2&#8242;s API</a></li>
<li><a href='http://bloc.eurion.net/archives/2009/here-is-zeitgeist-0-2-1/' rel='bookmark' title='Permanent Link: Here is Zeitgeist 0.2.1!'>Here is Zeitgeist 0.2.1!</a></li>
</ol></p><hr />
<p><small>
<a href="http://bloc.eurion.net/archives/2010/zeitgeist-0-3-3-is-out/#comments">One comment</a><br />
© Siegfried-Angel Gevatter Pujals, 2010. |
<a href="http://bloc.eurion.net/archives/2010/zeitgeist-0-3-3-is-out/">Permalink</a> |
<a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/3.0/">License</a> |
Post tags: <a href="http://bloc.eurion.net/archives/tag/gnome/" rel="tag">gnome</a>, <a href="http://bloc.eurion.net/archives/tag/programari-lliure/" rel="tag">Programari lliure</a>, <a href="http://bloc.eurion.net/archives/tag/zeitgeist/" rel="tag">zeitgeist</a><br/>
</small></p>]]></content:encoded>
			<wfw:commentRss>http://bloc.eurion.net/archives/2010/zeitgeist-0-3-3-is-out/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Automatic music rating</title>
		<link>http://bloc.eurion.net/archives/2010/automatic-music-rating/</link>
		<comments>http://bloc.eurion.net/archives/2010/automatic-music-rating/#comments</comments>
		<pubDate>Sun, 11 Apr 2010 19:59:20 +0000</pubDate>
		<dc:creator>RainCT</dc:creator>
				<category><![CDATA[Planet GNOME]]></category>
		<category><![CDATA[Planet Ubuntu]]></category>
		<category><![CDATA[Planet Ubuntu.cat]]></category>
		<category><![CDATA[music]]></category>
		<category><![CDATA[zeitgeist]]></category>

		<guid isPermaLink="false">http://bloc.eurion.net/?p=553</guid>
		<description><![CDATA[The problem I like listening to music while I&#8217;m programming. However, I have lots of music on my computer and I don&#8217;t really like all of it (or find it appropriate as background music for when I&#8217;m programming). I guess I could spend a few evenings going through my music collection, deleting anything I don&#8217;t [...]]]></description>
			<content:encoded><![CDATA[<p><strong>The problem</strong></p>
<p>I like listening to music while I&#8217;m programming. However, I have lots of music on my computer and I don&#8217;t really like all of it (or find it appropriate as background music for when I&#8217;m programming).</p>
<p>I guess I could spend a few evenings going through my music collection, deleting anything I don&#8217;t like (which isn&#8217;t always such an easy decision), creating a playlist or whatever. This isn&#8217;t a permanent solution, though, since with the time my collection will continue growing, I may get sick of hearing some songs, my taste may change, etc. Also, I prefer spending my time programming, reading or doing anything else more interesting than sorting my music collection.</p>
<p>Unrelated to the problem itself, let me also mention that I use different media players. Currently I&#8217;m mostly using Banshee, but I&#8217;ve been intermittently toggling between it and Rhythmbox those last months, and also used a command-line player for some time. I&#8217;m saying this because I expect a optimal solution to be media player-independent. <em>The bigger problem of each media player having its own database is also something I&#8217;d like to see addressed, maybe with some technology like Tracker, but that is another topic.</em></p>
<p><strong>The status quo</strong></p>
<p>My current way to approach this problem is basically setting my media player to choose songs randomly, and using the big &#8220;Next &gt;&gt;|&#8221; button on my keyboard whenever it chooses some song which annoys me.</p>
<p>(Banshee&#8217;s playback list interface has an option to automatically fill itself sorting songs by popularity, but it doesn&#8217;t seem to work good at all here; I also recall Amarok having some automatic playlist generation options, but I&#8217;m not using any KDE applications anymore and in any case this is outside the scope of an application-neutral solution).</p>
<p><strong>The solution</strong></p>
<p>It has recently occurred to me that a neat solution for this would be to gather information from a generic event log and to translate that into a numerical punctuation for each song. I think you may already guess where I&#8217;m heading, but if not: <a href="http://zeitgeist-project.com/">Zeitgeist</a>!</p>
<p>With the appropriate data-sources installed, Zeitgeist holds information on which songs started playing automatically (because they are on a playlist or because you have your media player set to random), which were started manually, and in both cases which you listened to completely and which ones you skipped (and how long you resisted listening to them). It shouldn&#8217;t be too difficult to write a script which will periodically request this information from Zeitgeist and give songs positive points for every time you listened to them completely (extra if you chose them yourself manually) and negative points to the ones you skipped (but giving less negative points if you resisted half of the song than if you skipped it right after you recognized it).</p>
<p>With this punctuation information, music players can avoid playing songs you don&#8217;t like and give you only those you like or new ones for which there isn&#8217;t any information yet (if it followed the punctuation strictly this would end with the same songs being played all the time and new songs with punctuation around 0 being ignored). The importance of the play/skip actions would decay over time (it&#8217;s more important to consider whether you listened to the song yesterday than if you did six months ago), etc., etc.</p>
<p>If we wanted to create something really fancy we could even look at generating different ratings for separate circumstances, eg. in case you like listening to a different sort of music during the morning than during the evening, or to differentiate between what you like to hear while you are coding and while the computer is idle (maybe because you are doing paper homework and only using the computer to get some background music). The information for all this is there in Zeitgeist, so it&#8217;s only a matter of writing a good algorithm.</p>
<p><strong>The implementation</strong></p>
<p>I&#8217;ve already explained most of how this should work in the previous section, but here&#8217;s a bit of an overview of what&#8217;s needed for this:</p>
<ul>
<li>Data-sources inserting the music reproduction information. We already have a <a href="https://launchpad.net/zeitgeist-dataproviders">data-source</a> for Rhythmbox implemented as an extension, but Banshee and any other players are missing.</li>
<li>The actual algorithm, probably implemented as a periodically run script leaving the aggregated information at some accessible place, although this may vary depending on the degree of fanciness you choose.</li>
<li>The interface, ie. plugins for Rhythmbox and other media players which take that information and use it to provide an option for semi-randomly choosing music excluding stuff you don&#8217;t like.</li>
</ul>
<p>If I&#8217;ve got you interested on this, I&#8217;m willing to mentor someone on this, so get in touch! Feel free to jump into <strong>#zeitgeist</strong> on <strong>irc.freenode.net</strong> or <a href="mailto:rainct@ubuntu.com">drop me a mail</a>.</p>
<hr />
<p><small>
<a href="http://bloc.eurion.net/archives/2010/automatic-music-rating/#comments">18 comments</a><br />
© Siegfried-Angel Gevatter Pujals, 2010. |
<a href="http://bloc.eurion.net/archives/2010/automatic-music-rating/">Permalink</a> |
<a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/3.0/">License</a> |
Post tags: <a href="http://bloc.eurion.net/archives/tag/music/" rel="tag">music</a>, <a href="http://bloc.eurion.net/archives/tag/zeitgeist/" rel="tag">zeitgeist</a><br/>
</small></p>]]></content:encoded>
			<wfw:commentRss>http://bloc.eurion.net/archives/2010/automatic-music-rating/feed/</wfw:commentRss>
		<slash:comments>18</slash:comments>
		</item>
		<item>
		<title>Sudoku solving with Python and SAT</title>
		<link>http://bloc.eurion.net/archives/2010/sudoku-solving-with-python-and-sat/</link>
		<comments>http://bloc.eurion.net/archives/2010/sudoku-solving-with-python-and-sat/#comments</comments>
		<pubDate>Wed, 17 Mar 2010 21:53:20 +0000</pubDate>
		<dc:creator>RainCT</dc:creator>
				<category><![CDATA[Planet Ubuntu]]></category>
		<category><![CDATA[logics]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://bloc.eurion.net/?p=541</guid>
		<description><![CDATA[At Logic class last week we saw how to solve a Sudoku using SAT and for fun I decided to actually try this out using Python. It turned out to be pretty trivial to implement and I thought I&#8217;d share the experience. First of all let&#8217;s see how the Sudoku problem was described at class: [...]]]></description>
			<content:encoded><![CDATA[<p>At <a href="http://www.fib.upc.edu/en/estudiar-enginyeria-informatica/enginyeries-pla-2003/assignatures/IL.html">Logic</a> class last week we saw how to solve a <a href="http://en.wikipedia.org/wiki/Sudoku">Sudoku</a> using <a href="http://en.wikipedia.org/wiki/Boolean_satisfiability_problem">SAT</a> and for fun I decided to actually try this out using Python. It turned out to be pretty trivial to implement and I thought I&#8217;d share the experience.</p>
<p>First of all let&#8217;s see how the Sudoku problem was described at class: we have a table with 9 rows and 9 columns;</p>
<ul>
<li><strong>1.</strong> Each field [i, j] (where i=1..9 and j=1..9) has at least one value (between 1 and 9).</li>
<li><strong>2.</strong> Each field [i, j] (where i=1..9 and j=1..9) doesn&#8217;t have more than one value.</li>
<li><strong>3.</strong> There isn&#8217;t any repeated value in any row, column or 3&#215;3 group.</li>
<li><strong>4.</strong> Some of the fields have a predefined value.</li>
</ul>
<p>Now to implement this in code, first of all I needed a Python module implementing SAT solving. A quick search in Debian&#8217;s repositories gave me <a href="http://www.logilab.org/card/eid/3441">python-logilab-constraint</a>, which I&#8217;ve found to be quite nice to use, even though it could definitely take some speed improvements.</p>
<p>Conditions <strong>1</strong> and <strong>2</strong> aren&#8217;t a problem at all, as <em>logilab.constraint</em> can be used quite naturally <small>[0]</small>. We just define a variable for each field (eg., x11 to x99, where the first number is the row and the second number is the column) and the domain in which they operate (integer value from 1 to 9):</p>
<pre>values = range(1, 10) # [1..9]
variables = ["x%d%d" % (i, j) for j in values for i in values]
domains = {}

for variable in variables:
	domains[variable] = fd.FiniteDomain(values)
</pre>
<p>The <strong>4</strong>th rule is also straightforward, we just need to hardcode the values. If we have a bidimensional list <em>sudoku</em> containing the initial numbers and <em>None</em> in all empty fields, we add each of them as a constraint:</p>
<pre>constraints = []
for i, row in enumerate(sudoku):
	for j, field in enumerate(row):
		if field is None:
			continue
		variable = "x%d%d" % (i+1, j+1)
		constraints.append(fd.make_expression((variable,),
			"%s == %d" % (variable, field)))
</pre>
<p>Now only rule <strong>3</strong> remains; here we basically have to set up three more groups of constraints: one for rows, one for columns and one for the 3&#215;3 groups. My initial implementation checked each row/column/group at once; for example, for the first row «<em>x11 != x12 != x13 != &#8230; != x19</em>», for the first column «<em>x11 != x21 != &#8230; != x91</em>», etc. However, this proved to be extremely slow, and after checking the «<em>Performance considerations</em>» section of <a href="http://www.logilab.org/card/eid/3441">Logilab Constraint&#8217;s documentation</a> I split up the row and column conditions <small>[1]</small> to lots of smaller conditions, as in: «<em>x11 != x12</em>», «<em>x11 != x13</em>», «x11 != x14», etc. I also moved the constraints for the initial numbers to the top (I had them at the end of the <em>constraints</em> list before), as they are the simplest ones. With those changes resolution time changed from several minutes to some tenths of a second.</p>
<p>And this is it. After all constraints have been added, we just need to run the solver:</p>
<pre>repository = Repository(variables, domains, constraints)
solutions = Solver().solve(repository)
</pre>
<p>The complete code is available via Bazaar at <a href="http://bazaar.launchpad.net/~rainct/%2Bjunk/sudoku-sat/annotate/head%3A/sudoku.py">lp:~rainct/+junk/sudoku-sat</a>. Being completely new to the <em>logilab.constraints</em> module, or implementing any such stuff at all, it took me around half an hour to write this, which shows how SAT makes such sort of problems really straightforward.</p>
<p><small><br />
[0] Using <em>logilab.constraint</em> it&#8217;s possible to assign arbitrary Python data to variables (here we just give each an integer, but variables could also take tuples or whatever else). When this problem was presented at class using pure propositional logic it was a bit more cumbersome, as we couldn&#8217;t just say &#8220;there&#8217;s a variable x11 with domain [1..9]&#8220;. For instance, rule <strong>1</strong> was «<em>(p111 | p112 | p113 | &#8230; | p119) and (p121 | &#8230; | p129) &#8230;</em>», where &#8220;p111&#8243; would be True if field [1,1] is supposed to contain a one, &#8220;p112&#8243; is True if it&#8217;s supposed to contain a two, etc.<br />
[1] I didn&#8217;t bother also splitting up he 3&#215;3 group constraints since the other two changes already gave me enough of a speedup; changing that may squeeze a few msecs more out of it.<br />
P.S.: If you&#8217;d like a more formal explanation of this, a search on Google found this paper: <a href="http://www.cl.cam.ac.uk/~tw333/publications/weber05satbased.pdf">A SAT-based Sudoku Solver</a>.<br />
</small></p>


<p>Related posts:<ol><li><a href='http://bloc.eurion.net/archives/2010/python-snippets-web-directory/' rel='bookmark' title='Permanent Link: You no longer have an excuse not to look at Python Snippets!'>You no longer have an excuse not to look at Python Snippets!</a></li>
</ol></p><hr />
<p><small>
<a href="http://bloc.eurion.net/archives/2010/sudoku-solving-with-python-and-sat/#comments">One comment</a><br />
© Siegfried-Angel Gevatter Pujals, 2010. |
<a href="http://bloc.eurion.net/archives/2010/sudoku-solving-with-python-and-sat/">Permalink</a> |
<a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/3.0/">License</a> |
Post tags: <a href="http://bloc.eurion.net/archives/tag/logics/" rel="tag">logics</a>, <a href="http://bloc.eurion.net/archives/tag/python/" rel="tag">python</a><br/>
</small></p>]]></content:encoded>
			<wfw:commentRss>http://bloc.eurion.net/archives/2010/sudoku-solving-with-python-and-sat/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>You no longer have an excuse not to look at Python Snippets!</title>
		<link>http://bloc.eurion.net/archives/2010/python-snippets-web-directory/</link>
		<comments>http://bloc.eurion.net/archives/2010/python-snippets-web-directory/#comments</comments>
		<pubDate>Fri, 05 Mar 2010 23:12:15 +0000</pubDate>
		<dc:creator>RainCT</dc:creator>
				<category><![CDATA[Planet Ubuntu]]></category>
		<category><![CDATA[Planet Ubuntu.cat]]></category>
		<category><![CDATA[opportunistic development]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[website]]></category>

		<guid isPermaLink="false">http://bloc.eurion.net/?p=525</guid>
		<description><![CDATA[You&#8217;ve probably already heard of Jono Bacon&#8217;s effort to create a collection of Python snippets and of Acire, the application to browse through them. If you&#8217;re interested in developing something with Python you should really take a look at those 115 (and couting!) awesome snippets, ranging from the most basic stuff to more advanced examples [...]]]></description>
			<content:encoded><![CDATA[<p>You&#8217;ve probably already heard of Jono Bacon&#8217;s effort to <a href="https://wiki.ubuntu.com/PythonSnippets">create a collection of Python snippets</a> and of <a href="http://www.jonobacon.org/2010/02/26/acire-0-3-released/">Acire</a>, the application to browse through them. If you&#8217;re interested in developing something with Python you should really take a look at those 115 (and couting!) awesome <a href="https://launchpad.net/python-snippets">snippets</a>, ranging from the most basic stuff to more advanced examples on a wide range of topics.</p>
<p>Last Thursday there was a talk on Acire and a snippet creation party (as part of the <a href="https://wiki.ubuntu.com/UbuntuOpportunisticDeveloperWeek">Ubuntu Opportunistic Developer Week</a>) and someone mentioned it would be nice to have a web interface. So, yesterday I took a couple hours and hacked together a quick script to convert the snippets to HTML, resulting in <a href="http://eurion.net/python-snippets/">this snippets directory</a> which you can use to look up stuff when you haven&#8217;t Acire at hand or to give links to snippets to other people!</p>
<div id="attachment_538" class="wp-caption aligncenter" style="width: 310px"><a href="http://bloc.eurion.net/wp-content/uploads/2010/03/python-snippets-web.png"><img class="size-medium wp-image-538" title="python-snippets-web" src="http://bloc.eurion.net/wp-content/uploads/2010/03/python-snippets-web-300x156.png" alt="" width="300" height="156" /></a><p class="wp-caption-text">The new web interface to python-snippets!</p></div>
<p><a href="&lt;/dd">And now that you&#8217;ve read this post, maybe you would like to </a><a href="http://eurion.net/python-snippets/snippet/Load%20an%20Image%20and%20detect%20click%20events.html">delve into Clutter</a>, <a href="http://eurion.net/python-snippets/snippet/Create%20an%20Application%20Indicator.html">update your application to work with Application Indicator</a>, <a href="http://eurion.net/python-snippets/snippet/Recently%20used%20items%20%28async%29.html">see how easy it is to get data from Zeitgeist</a> or <a href="http://eurion.net/python-snippets/snippet/Lists%20101.html">refresh the knowledge on lists</a> you gained at <a href="https://wiki.ubuntu.com/MeetingLogs/OpWeek1002/Python4Programmers">Rick Spencer&#8217;s Python talk</a>?</p>
<p><em>The code for the snippets generator is available <a href="https://code.launchpad.net/~rainct/+junk/python-snippets-webui">here</a>. Thanks go to <a href="http://www.makotemplates.org/">Mako Templates</a>, <a title="Pygments - Python syntax highlighter" href="http://pygments.org/">Pygments</a> and <a title="Universal Encoding Detector: character encoding auto-detection in Python" href="http://chardet.feedparser.org/">Chardet</a> for having made it dead easy to create this page! And, of course, patches are welcome.<br />
</em></p>


<p>Related posts:<ol><li><a href='http://bloc.eurion.net/archives/2010/sudoku-solving-with-python-and-sat/' rel='bookmark' title='Permanent Link: Sudoku solving with Python and SAT'>Sudoku solving with Python and SAT</a></li>
<li><a href='http://bloc.eurion.net/archives/2010/introducing-espeak-gui/' rel='bookmark' title='Permanent Link: Introducing espeak-gui'>Introducing espeak-gui</a></li>
<li><a href='http://bloc.eurion.net/archives/2009/uds-2009/' rel='bookmark' title='Permanent Link: UDS 2009'>UDS 2009</a></li>
</ol></p><hr />
<p><small>
<a href="http://bloc.eurion.net/archives/2010/python-snippets-web-directory/#comments">One comment</a><br />
© Siegfried-Angel Gevatter Pujals, 2010. |
<a href="http://bloc.eurion.net/archives/2010/python-snippets-web-directory/">Permalink</a> |
<a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/3.0/">License</a> |
Post tags: <a href="http://bloc.eurion.net/archives/tag/opportunistic-development/" rel="tag">opportunistic development</a>, <a href="http://bloc.eurion.net/archives/tag/python/" rel="tag">python</a>, <a href="http://bloc.eurion.net/archives/tag/ubuntu/" rel="tag">Ubuntu</a>, <a href="http://bloc.eurion.net/archives/tag/website/" rel="tag">website</a><br/>
</small></p>]]></content:encoded>
			<wfw:commentRss>http://bloc.eurion.net/archives/2010/python-snippets-web-directory/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Zeitgeist Data-Source Registry</title>
		<link>http://bloc.eurion.net/archives/2010/zeitgeist-data-source-registry/</link>
		<comments>http://bloc.eurion.net/archives/2010/zeitgeist-data-source-registry/#comments</comments>
		<pubDate>Sun, 28 Feb 2010 18:13:33 +0000</pubDate>
		<dc:creator>RainCT</dc:creator>
				<category><![CDATA[Planet Debian]]></category>
		<category><![CDATA[Planet GNOME]]></category>
		<category><![CDATA[Planet Ubuntu]]></category>
		<category><![CDATA[Planet Ubuntu.cat]]></category>
		<category><![CDATA[gnome]]></category>
		<category><![CDATA[Programari lliure]]></category>
		<category><![CDATA[zeitgeist]]></category>

		<guid isPermaLink="false">http://bloc.eurion.net/?p=515</guid>
		<description><![CDATA[This post is about an upcoming feature in Zeitgeist 0.3.3 and is so far only available in checkouts from trunk or our PPA. It is expected to be released within the next weeks. Some weeks ago I implemented a new feature in Zeitgeist and I figured I&#8217;d drop some lines about it. I&#8217;m talking about [...]]]></description>
			<content:encoded><![CDATA[<p><em>This post is about an upcoming feature in <a href="http://zeitgeist-project.com">Zeitgeist</a> 0.3.3 and is so far only available in checkouts from <a href="https://code.launchpad.net/~zeitgeist/zeitgeist/trunk">trunk</a> or our <a href="https://launchpad.net/~zeitgeist/+archive/ppa">PPA</a>. It is expected to be released within the next weeks.</em></p>
<p>Some weeks ago I implemented a new feature in Zeitgeist and I figured I&#8217;d drop some lines about it. I&#8217;m talking about a <strong>data-source registry</strong>.</p>
<p>You may be wondering, «<em>what the hell is that even, a data-source?</em>». So Zeitgeist is a database, a global event log, but it doesn&#8217;t do any magic indexing or monitoring by itself;  the information it logs needs to come from somewhere &#8211; be it applications sending it to Zeitgeist themselves, <a href="http://manpages.ubuntu.com/manpages/lucid/en/man1/zeitgeist-datahub.1.html">daemons</a>, plugins for applications, etc. Any such entity is called a «<em>data-source</em>».</p>
<p>Having a register of all data-sources interacting with Zeitgeist provides some benefits, like for example:</p>
<div id="attachment_516" class="wp-caption alignright" style="width: 310px"><a href="http://bloc.eurion.net/wp-content/uploads/2010/02/zeitgeist-registry.png"><img class="size-medium wp-image-516 " title="Zeitgeist: data-source management UI" src="http://bloc.eurion.net/wp-content/uploads/2010/02/zeitgeist-registry-300x77.png" alt="Screenshot of tools/gtk/zeitgeist-data-sources-gtk.py" width="300" height="77" /></a><p class="wp-caption-text">Prototype of a data-source management user-interface</p></div>
<ul>
<li>Having a list of them. Lists are nice :).</li>
<li>Being able to disable data-sources from a centralized place instead of requiring each to write its own preferences dialogue.</li>
<li>Being able to set up a blacklist rule considering which data-source the information comes from as a condition <em>(not implemented yet)</em>.</li>
</ul>
<p><strong>More details</strong></p>
<p>When they register, data-sources will need to provide the following information: an unique ID, a name (may be localized), a description (may be localized) and optionally a template specifying what sort of events it logs. Additionally, the last timestamp the data-source was seen by Zeitgeist, whether it is running right now and whether it is enabled will also be available.</p>
<p>It is important to note that registration is not compulsory; while it is highly encouraged for data-sources to use it, is it still possible to anonymously insert information into Zeitgeist (for example from a shell script). The event template is also only informational, and will not be enforced by Zeitgeist at this time.</p>
<p><strong>Avoiding duplicates from GTK Recently Used</strong></p>
<p>You may know that <a href="http://manpages.ubuntu.com/manpages/lucid/en/man1/zeitgeist-datahub.1.html">zeitgeist-datahub</a> provides basic support for applications which have no direct Zeitgeist support but do use GTK&#8217;s <a href="http://www.pygtk.org/docs/pygtk/class-gtkrecentmanager.html">RecentManager</a>, which is not as detailed as we would like, but it is better than nothing. However, until now we had a problem: when applications had support for both, GTK&#8217;s Recently Used and Zeitgeist (be it native or as an <a href="https://launchpad.net/zeitgeist-dataproviders">extension</a>), it was possible for duplicate events to be inserted or other sorts of conflicts between both data-sources. Now that we have the information from the registry available, we&#8217;ve been able to solve this modifying our Recently Used data-source to ignore any events concerning applications which already have another data-source logging the same types of events.<br />
&nbsp;</p>
<hr />In case you don&#8217;t care at all about what I&#8217;m talking here and you just want to see fancy interfaces, <a title="GNOME Activity Journal 0.3.3" href="http://seilo.geekyogre.com/2010/02/gnome-activity-journal-0-3-3-is-out/">go check this out</a>.</p>


<p>Related posts:<ol><li><a href='http://bloc.eurion.net/archives/2010/zeitgeist-0-3-3-is-out/' rel='bookmark' title='Permanent Link: Zeitgeist 0.3.3 is out!'>Zeitgeist 0.3.3 is out!</a></li>
<li><a href='http://bloc.eurion.net/archives/2009/zeitgeist-is-out/' rel='bookmark' title='Permanent Link: Zeitgeist is out!'>Zeitgeist is out!</a></li>
<li><a href='http://bloc.eurion.net/archives/2009/zeitgeist-api-02/' rel='bookmark' title='Permanent Link: Introduction to Zeitgeist 0.2&#8242;s API'>Introduction to Zeitgeist 0.2&#8242;s API</a></li>
</ol></p><hr />
<p><small>
<a href="http://bloc.eurion.net/archives/2010/zeitgeist-data-source-registry/#comments">2 comments</a><br />
© Siegfried-Angel Gevatter Pujals, 2010. |
<a href="http://bloc.eurion.net/archives/2010/zeitgeist-data-source-registry/">Permalink</a> |
<a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/3.0/">License</a> |
Post tags: <a href="http://bloc.eurion.net/archives/tag/gnome/" rel="tag">gnome</a>, <a href="http://bloc.eurion.net/archives/tag/programari-lliure/" rel="tag">Programari lliure</a>, <a href="http://bloc.eurion.net/archives/tag/zeitgeist/" rel="tag">zeitgeist</a><br/>
</small></p>]]></content:encoded>
			<wfw:commentRss>http://bloc.eurion.net/archives/2010/zeitgeist-data-source-registry/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Confession</title>
		<link>http://bloc.eurion.net/archives/2010/debian-confession/</link>
		<comments>http://bloc.eurion.net/archives/2010/debian-confession/#comments</comments>
		<pubDate>Fri, 29 Jan 2010 23:49:38 +0000</pubDate>
		<dc:creator>RainCT</dc:creator>
				<category><![CDATA[Planet Debian]]></category>
		<category><![CDATA[Planet Ubuntu]]></category>
		<category><![CDATA[Planet Ubuntu.cat]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[Programari lliure]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://bloc.eurion.net/?p=478</guid>
		<description><![CDATA[My dear Ubuntu, I think the time has come that I make a confession. You may be wondering why I haven&#8217;t spent much time with you those last months, and you have the right to know. The case is, I have another one. She&#8217;s called Debian. No, it&#8217;s not because of you. It&#8217;s also not [...]]]></description>
			<content:encoded><![CDATA[<p>My dear Ubuntu,</p>
<p>I think the time has come that I make a confession. You may be wondering why I haven&#8217;t spent much time with you those last months, and you have the right to know. The case is, I have another one. She&#8217;s called Debian.</p>
<p>No, it&#8217;s not because of you. It&#8217;s also not because of your <a href="http://canonical.com">parents</a>; while they <a href="https://lists.ubuntu.com/archives/ubuntu-devel/2010-January/029976.html">aren&#8217;t perfect</a>, they are great in many ways and I certainly don&#8217;t want to run away from then. Just wait and let me explain this. You surely remember that I spent <a href="../archives/2009/one-week-with-debian/">a week</a> with her some time ago? Well, now that I want to <a href="https://nm.debian.org/nmstatus.php?email=rainct@ubuntu.com">join Debian&#8217;s family</a>, I decided that after all that wasn&#8217;t much time to get to know here, so I gave her another chance, and with this second experience I fell in love with her <a href="http://www.debian.org/releases/unstable/">unstable</a> character. Ubuntu, you are really extraordinary, and I&#8217;m still telling anyone who wants to listen about your wonders, but you just can&#8217;t appease my desire for trying out new things as well as Debian does.</p>
<p>Now, this doesn&#8217;t mean we won&#8217;t see each other anymore. I&#8217;ll still take you with me whenever I <a href="http://commercial.asus.com/images/asusepc1005-front_open1504.jpg">travel</a>, and I&#8217;ll continue helping you with the <a href="https://launchpad.net/ubuntu">household</a>. In fact, all this wouldn&#8217;t signify a big change at all, if it wasn&#8217;t that at the same time I also decided to refocus most of my efforts on <a href="http://zeitgeist-project.com">raising</a> <a href="http://gnome.org">children</a>, which is what really reduced the time I spent helping you.</p>
<p>So, while currently I&#8217;m not seeing you as much as before, I hope you all the best, and I&#8217;ll still try to help you advance, be it indirectly (<a href="http://debian.org">1</a>, <a href="http://gnome.org">2</a>) or, while probably to a lesser degree, continuing with direct contributions.</p>
<p><em>By the way, hello Planet Debian!</em></p>
<hr />
<p><small>
<a href="http://bloc.eurion.net/archives/2010/debian-confession/#comments">8 comments</a><br />
© Siegfried-Angel Gevatter Pujals, 2010. |
<a href="http://bloc.eurion.net/archives/2010/debian-confession/">Permalink</a> |
<a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/3.0/">License</a> |
Post tags: <a href="http://bloc.eurion.net/archives/tag/debian/" rel="tag">Debian</a>, <a href="http://bloc.eurion.net/archives/tag/programari-lliure/" rel="tag">Programari lliure</a>, <a href="http://bloc.eurion.net/archives/tag/ubuntu/" rel="tag">Ubuntu</a><br/>
</small></p>]]></content:encoded>
			<wfw:commentRss>http://bloc.eurion.net/archives/2010/debian-confession/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>FOSDEM 2010</title>
		<link>http://bloc.eurion.net/archives/2010/im-going-to-fosdem/</link>
		<comments>http://bloc.eurion.net/archives/2010/im-going-to-fosdem/#comments</comments>
		<pubDate>Fri, 29 Jan 2010 14:54:32 +0000</pubDate>
		<dc:creator>RainCT</dc:creator>
				<category><![CDATA[Planet GNOME]]></category>
		<category><![CDATA[Planet Ubuntu]]></category>
		<category><![CDATA[Planet Ubuntu.cat]]></category>
		<category><![CDATA[fosdem]]></category>
		<category><![CDATA[gsoc2009]]></category>
		<category><![CDATA[Programari lliure]]></category>
		<category><![CDATA[zeitgeist]]></category>

		<guid isPermaLink="false">http://bloc.eurion.net/?p=496</guid>
		<description><![CDATA[By the way, if you&#8217;re coming too and are interested in Zeitgeist, don&#8217;t forget to poke me (or Seif)! Related posts:Zeitgeist since UDS Zeitgeist is out! Introduction to Zeitgeist 0.2&#8242;s API No comments © Siegfried-Angel Gevatter Pujals, 2010. &#124; Permalink &#124; License &#124; Post tags: fosdem, gsoc2009, Programari lliure, zeitgeist]]></description>
			<content:encoded><![CDATA[<p style="text-align: center;"><a href="http://www.fosdem.org"><img class="aligncenter" src="http://www.fosdem.org/promo/going-to" alt="I'm going to FOSDEM, the Free and Open Source Software Developers' European Meeting" /></a></p>
<p style="text-align: center;"><em>By the way, if you&#8217;re coming too and are interested in <a href="http://zeitgeist-project.com">Zeitgeist</a>, don&#8217;t forget to poke me (or <a href="http://seilo.geekyogre.com/">Seif</a>)!</em></p>


<p>Related posts:<ol><li><a href='http://bloc.eurion.net/archives/2009/zeitgeist-since-uds/' rel='bookmark' title='Permanent Link: Zeitgeist since UDS'>Zeitgeist since UDS</a></li>
<li><a href='http://bloc.eurion.net/archives/2009/zeitgeist-is-out/' rel='bookmark' title='Permanent Link: Zeitgeist is out!'>Zeitgeist is out!</a></li>
<li><a href='http://bloc.eurion.net/archives/2009/zeitgeist-api-02/' rel='bookmark' title='Permanent Link: Introduction to Zeitgeist 0.2&#8242;s API'>Introduction to Zeitgeist 0.2&#8242;s API</a></li>
</ol></p><hr />
<p><small>
<a href="http://bloc.eurion.net/archives/2010/im-going-to-fosdem/#comments">No comments</a><br />
© Siegfried-Angel Gevatter Pujals, 2010. |
<a href="http://bloc.eurion.net/archives/2010/im-going-to-fosdem/">Permalink</a> |
<a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/3.0/">License</a> |
Post tags: <a href="http://bloc.eurion.net/archives/tag/fosdem/" rel="tag">fosdem</a>, <a href="http://bloc.eurion.net/archives/tag/gsoc2009/" rel="tag">gsoc2009</a>, <a href="http://bloc.eurion.net/archives/tag/programari-lliure/" rel="tag">Programari lliure</a>, <a href="http://bloc.eurion.net/archives/tag/zeitgeist/" rel="tag">zeitgeist</a><br/>
</small></p>]]></content:encoded>
			<wfw:commentRss>http://bloc.eurion.net/archives/2010/im-going-to-fosdem/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>GNOME Activity Journal, and installing it on Ubuntu</title>
		<link>http://bloc.eurion.net/archives/2010/gnome-activity-journal-and-installing-it-on-ubuntu/</link>
		<comments>http://bloc.eurion.net/archives/2010/gnome-activity-journal-and-installing-it-on-ubuntu/#comments</comments>
		<pubDate>Wed, 20 Jan 2010 15:00:44 +0000</pubDate>
		<dc:creator>RainCT</dc:creator>
				<category><![CDATA[Planet GNOME]]></category>
		<category><![CDATA[Planet Ubuntu]]></category>
		<category><![CDATA[Planet Ubuntu.cat]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[gnome]]></category>
		<category><![CDATA[Programari lliure]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[zeitgeist]]></category>

		<guid isPermaLink="false">http://bloc.eurion.net/?p=481</guid>
		<description><![CDATA[As already announced by Seif, the first development release of the GNOME Activity Journal (what was formerly known as GNOME Zeitgeist) is finally out! While several sources have already propagated the good news, what doesn&#8217;t seem to be so widely known is how easy it is to get the Activity Journal running on Ubuntu. Because [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://bloc.eurion.net/wp-content/uploads/2010/01/gnome-activity-journal-0.3.2.png"><img class="size-medium wp-image-482 alignright" title="gnome-activity-journal-0.3.2" src="http://bloc.eurion.net/wp-content/uploads/2010/01/gnome-activity-journal-0.3.2-300x143.png" alt="GNOME Activity Journal, 0.3.2" width="300" height="143" /></a>As already announced by <a href="http://seilo.geekyogre.com/">Seif</a>, the first development release of the <a href="https://launchpad.net/gnome-activity-journal">GNOME Activity Journal</a> (what was formerly known as <em>GNOME Zeitgeist</em>) is finally <a href="https://launchpad.net/gnome-activity-journal/+announcement/4900">out</a>!</p>
<p>While several sources have already propagated the good news, what doesn&#8217;t seem to be so widely known is how easy it is to get the Activity Journal running on Ubuntu. Because it is!</p>
<p><strong>Installation on Ubuntu Karmic or Lucid</strong></p>
<pre>sudo add-apt-repository ppa:zeitgeist/ppa
sudo aptitude update
sudo aptitude install gnome-activity-journal</pre>
<p>Now go to <strong>Applications</strong> -&gt; <strong>Utility</strong> -&gt; <strong>Activity Journal</strong> and enjoy the sweetness!</p>
<p><strong>Installation on other systems</strong></p>
<p>Our <a href="https://launchpad.net/~zeitgeist/+archive/ppa">Personal Package Archive</a> also has packages for Ubuntu Jaunty which you can add the usual way (by adding it to <strong>System</strong> -&gt; <strong>Administration</strong> -&gt; <strong>Software Sources</strong> or editing your <em>sources.list</em>), and the same packages as for Ubuntu work for Debian Sid (to which Zeitgeist <a href="https://edge.launchpad.net/zeitgeist/+announcement/4899">0.3.2</a> and the GNOME Activity Journal will be uploaded shortly).</p>
<p>There may be packages for other distributions available; if you can&#8217;t find any for yours, you can do the installation by hand:</p>
<p>[<strong>For Zeitgeist</strong>] &#8211; Build dependencies: <em>intltool</em></p>
<pre>$ wget http://launchpad.net/zeitgeist/0.3/0.3.2/+download/zeitgeist-0.3.2.tar.gz
$ tar -xzvf zeitgeist-0.3.2.tar.gz
$ cd zeitgeist-0.3.2
$ ./configure
$ make
# make install</pre>
<p>[<strong>For the GNOME Activity Journal</strong>] &#8211; Build dependencies: <em>Python (2.5+)</em>, <em>Python-DistUtils-Extra</em>, <em>intltool</em></p>
<pre>$ wget http://launchpad.net/gnome-activity-journal/0.3/0.3.2/+download/gnome-activity-journal-0.3.2.tar.gz
$ tar -xzvf gnome-activity-journal-0.3.2.tar.gz
$ cd gnome-activity-journal-0.3.2
$ python setup.py build
# python setup.py install</pre>
<p><strong>But, what is the GNOME Activity Journal?</strong></p>
<p>The <a href="https://launchpad.net/gnome-activity-journal">GNOME Activity Journal</a> is a tool for easily browsing and finding files, contacts and other resources on your computer. Using <a href="http://zeitgeist-project.com/">Zeitgeist</a>, it keeps a chronological journal of your activity and supports tagging and bookmarking (using the new <a href="http://projects.gnome.org/tracker/">Tracker</a> 0.7) and establishing relationships between resources.</p>
<p>While this first release only supports basic browsing of file activities, the <a href="http://zeitgeist-project.com">underlying infrastructure</a> can do much more and you can expect the missing functionality to become available in future releases.</p>


<p>Related posts:<ol><li><a href='http://bloc.eurion.net/archives/2009/gnome-shell-window-list/' rel='bookmark' title='Permanent Link: Another GNOME Shell post: what do you think about the window list?'>Another GNOME Shell post: what do you think about the window list?</a></li>
<li><a href='http://bloc.eurion.net/archives/2009/gnome-do-08-alpha-and-docky/' rel='bookmark' title='Permanent Link: GNOME Do &#8211; 0.8 Alpha and Docky'>GNOME Do &#8211; 0.8 Alpha and Docky</a></li>
<li><a href='http://bloc.eurion.net/archives/2009/updated-voxforge-packages-in-ubuntu/' rel='bookmark' title='Permanent Link: Updated Voxforge packages in Ubuntu'>Updated Voxforge packages in Ubuntu</a></li>
</ol></p><hr />
<p><small>
<a href="http://bloc.eurion.net/archives/2010/gnome-activity-journal-and-installing-it-on-ubuntu/#comments">8 comments</a><br />
© Siegfried-Angel Gevatter Pujals, 2010. |
<a href="http://bloc.eurion.net/archives/2010/gnome-activity-journal-and-installing-it-on-ubuntu/">Permalink</a> |
<a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/3.0/">License</a> |
Post tags: <a href="http://bloc.eurion.net/archives/tag/debian/" rel="tag">Debian</a>, <a href="http://bloc.eurion.net/archives/tag/gnome/" rel="tag">gnome</a>, <a href="http://bloc.eurion.net/archives/tag/programari-lliure/" rel="tag">Programari lliure</a>, <a href="http://bloc.eurion.net/archives/tag/ubuntu/" rel="tag">Ubuntu</a>, <a href="http://bloc.eurion.net/archives/tag/zeitgeist/" rel="tag">zeitgeist</a><br/>
</small></p>]]></content:encoded>
			<wfw:commentRss>http://bloc.eurion.net/archives/2010/gnome-activity-journal-and-installing-it-on-ubuntu/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>espeak-gui 0.2</title>
		<link>http://bloc.eurion.net/archives/2010/espeak-gui-0-2/</link>
		<comments>http://bloc.eurion.net/archives/2010/espeak-gui-0-2/#comments</comments>
		<pubDate>Sat, 02 Jan 2010 20:10:26 +0000</pubDate>
		<dc:creator>RainCT</dc:creator>
				<category><![CDATA[Planet GNOME]]></category>
		<category><![CDATA[Planet Ubuntu]]></category>
		<category><![CDATA[Planet Ubuntu.cat]]></category>
		<category><![CDATA[gnome]]></category>
		<category><![CDATA[gtk]]></category>
		<category><![CDATA[Programari lliure]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[speech-synthesis]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://bloc.eurion.net/?p=470</guid>
		<description><![CDATA[Yesterday I did a first release of espeak-gui, so while I&#8217;m still in practice I&#8217;ve decided to get out a second one! The main changes are fixing a crash bug and&#8230; internationalization support. So, if you like this project but you&#8217;re not a coder, now you&#8217;ve got a way to contribute: translating it into your [...]]]></description>
			<content:encoded><![CDATA[<p>Yesterday I did a first release of <a href="http://bloc.eurion.net/archives/2010/introducing-espeak-gui/">espeak-gui</a>, so while I&#8217;m still in practice I&#8217;ve decided to get out a second one!</p>
<p>The main changes are fixing a crash bug and&#8230; internationalization support. So, if you like this project but you&#8217;re not a coder, now you&#8217;ve got a way to contribute: <a href="https://translations.launchpad.net/espeak-gui">translating it into your language</a> (come on, it only has a few strings! :)).</p>
<p>The new version is already in <a href="https://launchpad.net/~rainct/+archive/voice/">my PPA</a>: <a href="https://launchpad.net/~rainct/+archive/voice/+files/espeak-gui_0.2-0ubuntu1~ppa1_all.deb">espeak-gui_0.2-0ubuntu1~ppa1_all.deb</a>. A tarball is also available, and the installation instructions are the following:</p>
<pre>$ wget -c <a href="http://launchpad.net/espeak-gui/trunk/0.2/+download/espeak-gui-0.2.tar.gz">http://launchpad.net/espeak-gui/trunk/0.2/+download/espeak-gui-0.2.tar.gz</a>
$ tar -xzvf espeak-gui-0.2.tar.gz; cd espeak-gui-0.2
$ python setup.py build
$ sudo python setup.py install</pre>
<p>In case you didn&#8217;t already have the previous version, you&#8217;ll also need to install the <a href="https://launchpad.net/python-espeak">python-espeak</a> module, for which there are also .deb&#8217;s (<a href="https://launchpad.net/~rainct/+archive/voice/+files/python-espeak_0.0ubuntu1~ppa1_i386.deb">i386</a>, <a href="https://launchpad.net/~rainct/+archive/voice/+files/python-espeak_0.0ubuntu1~ppa1_amd64.deb">amd64</a>) or the manual installation option like explained in my <a href="http://bloc.eurion.net/archives/2010/introducing-espeak-gui/">previous post</a>:</p>
<pre>$ bzr get lp:python-espeak
$ cd python-espeak
$ python setup.py build
$ sudo python setup.py install</pre>
<p>Here are the contents of the NEWS file:</p>
<pre>2010-01-02: Version 0.2
-----------------------

 - Fixed a crash happening when there was no voice language set in
   gconf (LP: 502253). [Reported by Rugby471]
 - Added a "Plain text" filter to the Open/Save dialogues.
 - Added internationalization support.
 - Added a manpage and a gconf schemas file.
 - A couple little user interface improvements.

Translations: Catalan.</pre>


<p>Related posts:<ol><li><a href='http://bloc.eurion.net/archives/2010/introducing-espeak-gui/' rel='bookmark' title='Permanent Link: Introducing espeak-gui'>Introducing espeak-gui</a></li>
<li><a href='http://bloc.eurion.net/archives/2010/gnome-activity-journal-and-installing-it-on-ubuntu/' rel='bookmark' title='Permanent Link: GNOME Activity Journal, and installing it on Ubuntu'>GNOME Activity Journal, and installing it on Ubuntu</a></li>
<li><a href='http://bloc.eurion.net/archives/2009/zeitgeist-api-02/' rel='bookmark' title='Permanent Link: Introduction to Zeitgeist 0.2&#8242;s API'>Introduction to Zeitgeist 0.2&#8242;s API</a></li>
</ol></p><hr />
<p><small>
<a href="http://bloc.eurion.net/archives/2010/espeak-gui-0-2/#comments">30 comments</a><br />
© Siegfried-Angel Gevatter Pujals, 2010. |
<a href="http://bloc.eurion.net/archives/2010/espeak-gui-0-2/">Permalink</a> |
<a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/3.0/">License</a> |
Post tags: <a href="http://bloc.eurion.net/archives/tag/gnome/" rel="tag">gnome</a>, <a href="http://bloc.eurion.net/archives/tag/gtk/" rel="tag">gtk</a>, <a href="http://bloc.eurion.net/archives/tag/programari-lliure/" rel="tag">Programari lliure</a>, <a href="http://bloc.eurion.net/archives/tag/python/" rel="tag">python</a>, <a href="http://bloc.eurion.net/archives/tag/speech-synthesis/" rel="tag">speech-synthesis</a>, <a href="http://bloc.eurion.net/archives/tag/ubuntu/" rel="tag">Ubuntu</a><br/>
</small></p>]]></content:encoded>
			<wfw:commentRss>http://bloc.eurion.net/archives/2010/espeak-gui-0-2/feed/</wfw:commentRss>
		<slash:comments>30</slash:comments>
		</item>
		<item>
		<title>Introducing espeak-gui</title>
		<link>http://bloc.eurion.net/archives/2010/introducing-espeak-gui/</link>
		<comments>http://bloc.eurion.net/archives/2010/introducing-espeak-gui/#comments</comments>
		<pubDate>Fri, 01 Jan 2010 21:33:36 +0000</pubDate>
		<dc:creator>RainCT</dc:creator>
				<category><![CDATA[Planet GNOME]]></category>
		<category><![CDATA[Planet Ubuntu]]></category>
		<category><![CDATA[Planet Ubuntu.cat]]></category>
		<category><![CDATA[gnome]]></category>
		<category><![CDATA[gtk]]></category>
		<category><![CDATA[Programari lliure]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[speech-synthesis]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://bloc.eurion.net/?p=463</guid>
		<description><![CDATA[I&#8217;m joining the hype of presenting little new projects there seems to be those days, unleashing the first version of espeak-gui, a graphical interface to let the computer read out text. Why, when, who? The project started almost a year ago when, out of curiosity on what writing Python bindings for C/C++ libraries is like, [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://bloc.eurion.net/wp-content/uploads/2010/01/espeak-gui-0.1.png"><img class="size-medium wp-image-464 alignright" title="Screenshot of espeak-gui (version 0.1)" src="http://bloc.eurion.net/wp-content/uploads/2010/01/espeak-gui-0.1-300x180.png" alt="" width="300" height="180" /></a>I&#8217;m joining the hype of presenting little new projects there seems to be those days, unleashing the first version of <a href="https://launchpad.net/espeak-gui">espeak-gui</a>, a graphical interface to let the computer read out text.</p>
<p><strong>Why, when, who?</strong></p>
<p>The project started almost a year ago when, out of curiosity on what writing Python bindings for C/C++ libraries is like, I started <a href="https://launchpad.net/python-espeak">python-espeak</a>, bindings for the espeak speech synthesizer (which, by the way, comes installed by default on Ubuntu and many other distributions).</p>
<p>It turned out that writing bindings isn&#8217;t as funny as I thought so they haven&#8217;t advanced much since then, but the basic functionality was there and I felt the need for some application using those bindings, so that&#8217;s how I started <a href="https://launchpad.net/python-espeak">espeak-gui</a>.</p>
<p>Some months later, in true Free Software spirit, someone else -interested in an application like this for personal usage- found my code on Launchpad and got in touch with me, providing me with quite some nice patches. Thank you, <a href="https://launchpad.net/~joe-a-burmeister">Joe Burmeister</a>! However, I didn&#8217;t do any more work on it, as I&#8217;ve been busy with other projects (eg. <a href="http://zeitgeist-project.com/">Zeitgeist</a>), and development stalled there.</p>
<p>Now, another half a year later, I&#8217;ve finally got back to this and decided it&#8217;s time I push it out into the wild. So, after cleaning it up a bit more and implementing some new feature, here you have <a href="https://launchpad.net/espeak-gui">espeak-gui</a>!</p>
<p>(The bindings aren&#8217;t really encouraged for widespread usage at this point and I&#8217;ll probably end up rewriting them using <a href="http://www.swig.org/">SWIG</a> or something else; however, if you&#8217;re interested in using them please get in touch with me).</p>
<p><strong>Where do I get it?</strong></p>
<p>If you&#8217;re using Ubuntu or Debian, you can find a <a href="https://launchpad.net/~rainct/+archive/voice/+packages">packages for python-espeak and espeak-gui</a> in <a href="https://launchpad.net/~rainct/+archive/voice">my PPA</a>.</p>
<p>For users of other distributions, you can install them manually after installing the needed dependencies (most importantly, libespeak-dev).</p>
<p>For the Python bindings for espeak:</p>
<pre>$ bzr get lp:python-espeak
$ cd python-espeak
$ python setup.py build
# python setup.py install
</pre>
<p>And for the GUI:</p>
<pre>$ wget -c <a href="http://launchpad.net/espeak-gui/trunk/0.1/+download/espeak-gui-0.1.tar.gz">http://launchpad.net/espeak-gui/trunk/0.1/+download/espeak-gui-0.1.tar.gz</a>
$ tar -xzvf espeak-gui-0.1.tar.gz
$ cd espeak-gui-0.1
# python setup.py install
</pre>
<p>[<strong>Update:</strong> A new version is out, see <a href="http://bloc.eurion.net/archives/2010/espeak-gui-0-2/">espeak-gui 0.2</a> for details.]</p>
<p>I have several ideas on how to continue improving it and I think I&#8217;ll slowly continue doing so (or maybe not so slowly if I get positive feedback on this :)). Also, patches are always welcome!</p>
<p><strong>Using it</strong></p>
<p>Once installed, you&#8217;ll find <a href="https://launchpad.net/espeak-gui">espeak-gui</a> under <em>Applications</em> -&gt; <em>Sound and Video</em> (maybe Accessibility would be a better place?), or you can run it from the command line like this:</p>
<pre>espeak [ &lt;file 1&gt; &lt;file 2&gt; ... ]</pre>


<p>Related posts:<ol><li><a href='http://bloc.eurion.net/archives/2010/espeak-gui-0-2/' rel='bookmark' title='Permanent Link: espeak-gui 0.2'>espeak-gui 0.2</a></li>
<li><a href='http://bloc.eurion.net/archives/2010/gnome-activity-journal-and-installing-it-on-ubuntu/' rel='bookmark' title='Permanent Link: GNOME Activity Journal, and installing it on Ubuntu'>GNOME Activity Journal, and installing it on Ubuntu</a></li>
<li><a href='http://bloc.eurion.net/archives/2009/zeitgeist-api-02/' rel='bookmark' title='Permanent Link: Introduction to Zeitgeist 0.2&#8242;s API'>Introduction to Zeitgeist 0.2&#8242;s API</a></li>
</ol></p><hr />
<p><small>
<a href="http://bloc.eurion.net/archives/2010/introducing-espeak-gui/#comments">16 comments</a><br />
© Siegfried-Angel Gevatter Pujals, 2010. |
<a href="http://bloc.eurion.net/archives/2010/introducing-espeak-gui/">Permalink</a> |
<a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/3.0/">License</a> |
Post tags: <a href="http://bloc.eurion.net/archives/tag/gnome/" rel="tag">gnome</a>, <a href="http://bloc.eurion.net/archives/tag/gtk/" rel="tag">gtk</a>, <a href="http://bloc.eurion.net/archives/tag/programari-lliure/" rel="tag">Programari lliure</a>, <a href="http://bloc.eurion.net/archives/tag/python/" rel="tag">python</a>, <a href="http://bloc.eurion.net/archives/tag/speech-synthesis/" rel="tag">speech-synthesis</a>, <a href="http://bloc.eurion.net/archives/tag/ubuntu/" rel="tag">Ubuntu</a><br/>
</small></p>]]></content:encoded>
			<wfw:commentRss>http://bloc.eurion.net/archives/2010/introducing-espeak-gui/feed/</wfw:commentRss>
		<slash:comments>16</slash:comments>
		</item>
		<item>
		<title>No sound problem with Wolfenstein: Enemy Territory</title>
		<link>http://bloc.eurion.net/archives/2009/no-sound-problem-with-wolfenstein-enemy-territory/</link>
		<comments>http://bloc.eurion.net/archives/2009/no-sound-problem-with-wolfenstein-enemy-territory/#comments</comments>
		<pubDate>Thu, 10 Dec 2009 16:19:33 +0000</pubDate>
		<dc:creator>RainCT</dc:creator>
				<category><![CDATA[Planet Ubuntu]]></category>
		<category><![CDATA[Planet Ubuntu.cat]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[Jocs]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://bloc.eurion.net/?p=455</guid>
		<description><![CDATA[I don&#8217;t really play much, but of the few games I know Wolfenstein: Enemy Territory is probably the one with which I&#8217;ve spend the most time so far. By featuring multiple player roles (soldier, engineer, medic, etc.) and, even while being multiplayer, nice objective-based scenarios, it provides for much better experience that many other more [...]]]></description>
			<content:encoded><![CDATA[<p>I don&#8217;t really play much, but of the few games I know <a href="http://en.wikipedia.org/wiki/Wolfenstein:_Enemy_Territory">Wolfenstein: Enemy Territory</a> is probably the one with which I&#8217;ve spend the most time so far. By featuring multiple player roles (soldier, engineer, medic, etc.) and, even while being multiplayer, nice objective-based scenarios, it provides for much better experience that many other more popular shooters. And best of all, it&#8217;s completely free of cost, has native support for GNU/Linux and a portion of it&#8217;s source code is open!</p>
<p>But it&#8217;s not to advertise this game that I&#8217;m writing about it, but because I want to write down some solution to the &#8220;no sound problem&#8221; which you&#8217;re likely to find if you try it out, and so that I can remember about the fixes in the future. So, here&#8217;s the different things you can try; if one of them fails just go to the next one, and let&#8217;s hope that at least the last one does the trick!</p>
<p><strong>1. Install the &#8220;oss-compat&#8221; package.</strong><br />
As easy as that! Although this alone has never fixed the problem with me, it often does together with solution 2 (described just below), and maybe in your case it may be all you&#8217;re missing.</p>
<p><strong>2. A bit of command-line magic</strong><br />
The next one, which <a href="http://buck-nasty.blogspot.com/2008/08/wolfenstein-enemy-territory-no-sound.html">seems</a> <a href="http://fedoraforum.org/forum/showthread.php?t=163169">to</a> <a href="https://help.ubuntu.com/community/Games/Native/ReturnToCastleWolfensteinEnemyTerritory">be</a> the most successful option, is trying to execute the following line before running <em>Enemy Territory</em>:</p>
<pre>echo "et.x86 0 0 direct" | sudo tee /proc/asound/card0/pcm0p/oss</pre>
<p>If after doing this the sound works, you can make the change permanent by adding that line to your <em>/etc/rc.local/</em>, for example by running:</p>
<pre>sudo sed -i "s:^exit 0:echo 'et.x86 0 0 direct' &gt; /proc/asound/card0/pcm0p/oss\nexit 0:" /etc/rc.local</pre>
<p><strong>3. Let&#8217;s call the artillery</strong></p>
<p>Hopefully you&#8217;ll be enjoying an <em>Enemy Territory</em> game with the sound of explosions and shots in your ears, but if the previous solutions didn&#8217;t do the trick do not despair, there&#8217;s still hope. I&#8217;ve found a different solution <a href="http://www.tomshardware.com/forum/37440-13-sound-wolfenstein-linux">in this thread</a> and it consists in the following:</p>
<p>a) Download this script: <a href="http://bloc.eurion.net/wp-content/uploads/2009/12/wolfsp-sdl-sound.sh">wolfsp-sdl-sound.sh</a> (<a href="http://nullkey.ath.cx/~stuff/et-sdl-sound/wolfsp-sdl-sound.gz">original download link</a>, <a href="http://members.lycos.co.uk/lordbanter/wolfsp-sdl-sound.gz">alternative download link</a>), created by <a href="http://nullkey.ath.cx/">Pyry Haulos</a>.</p>
<p>b) Open it with a text editor and customize it to match your configuration: change the line «<em>GAME_PATH=&#8221;/home/games/enemy-territory&#8221;</em>» to point to the location of your <em>Enemy Territory</em> installation (most likely «<em>GAME_PATH=&#8221;/usr/local/games/enemy-territor&#8221;</em>»); in case your directory with the game files isn&#8217;t called «<em>enemy-territory</em>» like in the example you&#8217;ll also need to adapt the <em>GAME_DIR</em> variable.</p>
<p>c) Save this file somewhere on your computer, make it executable if needed (you can do this by right clicking on it, selecting &#8220;Properties&#8221; and under the &#8220;Permissions&#8221; tab of the dialogue that will show up checking the box to allow execution of the file). Done, now whenever you want to run the game just start it by running this file.</p>
<p>I hope this is useful for someone out there :).</p>


<p>Related posts:<ol><li><a href='http://bloc.eurion.net/archives/2009/no-sound-on-hp-pavilion-dv6-1110ss/' rel='bookmark' title='Permanent Link: No sound on HP Pavilion dv6-1110ss'>No sound on HP Pavilion dv6-1110ss</a></li>
<li><a href='http://bloc.eurion.net/archives/2009/lock-cd-tray-when-laptop-lid-closed/' rel='bookmark' title='Permanent Link: Lock the CD tray when the laptop&#8217;s lid is closed'>Lock the CD tray when the laptop&#8217;s lid is closed</a></li>
<li><a href='http://bloc.eurion.net/archives/2009/getting-your-scanner-to-work-with-ubuntu-gt68xx/' rel='bookmark' title='Permanent Link: Getting your scanner to work with Ubuntu (gt68xx)'>Getting your scanner to work with Ubuntu (gt68xx)</a></li>
</ol></p><hr />
<p><small>
<a href="http://bloc.eurion.net/archives/2009/no-sound-problem-with-wolfenstein-enemy-territory/#comments">No comments</a><br />
© Siegfried-Angel Gevatter Pujals, 2009. |
<a href="http://bloc.eurion.net/archives/2009/no-sound-problem-with-wolfenstein-enemy-territory/">Permalink</a> |
<a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/3.0/">License</a> |
Post tags: <a href="http://bloc.eurion.net/archives/tag/debian/" rel="tag">Debian</a>, <a href="http://bloc.eurion.net/archives/tag/jocs/" rel="tag">Jocs</a>, <a href="http://bloc.eurion.net/archives/tag/ubuntu/" rel="tag">Ubuntu</a><br/>
</small></p>]]></content:encoded>
			<wfw:commentRss>http://bloc.eurion.net/archives/2009/no-sound-problem-with-wolfenstein-enemy-territory/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>GPL: Not here</title>
		<link>http://bloc.eurion.net/archives/2009/bolzano-gpl/</link>
		<comments>http://bloc.eurion.net/archives/2009/bolzano-gpl/#comments</comments>
		<pubDate>Tue, 17 Nov 2009 19:05:57 +0000</pubDate>
		<dc:creator>RainCT</dc:creator>
				<category><![CDATA[Planet Ubuntu]]></category>
		<category><![CDATA[Planet Ubuntu.cat]]></category>
		<category><![CDATA[Programari lliure]]></category>
		<category><![CDATA[Xorrades]]></category>

		<guid isPermaLink="false">http://bloc.eurion.net/?p=445</guid>
		<description><![CDATA[Related posts:Arreglant paquets que no compilen: necpp No comments © Siegfried-Angel Gevatter Pujals, 2009. &#124; Permalink &#124; License &#124; Post tags: Programari lliure, Xorrades]]></description>
			<content:encoded><![CDATA[<div class="mceTemp mceIEcenter">
<dl id="attachment_446" class="wp-caption aligncenter" style="width: 193px;">
<dt class="wp-caption-dt"><a href="http://eurion.net/zeitgeist/photos/bolzano09/12112009160.jpg"><img class="size-full wp-image-446 " title="- Vehicles driven by GPL'ed AI software aren't allowed here.  - But, but... WHY? It follows the 3 laws of the robotics, I promise!" src="http://bloc.eurion.net/wp-content/uploads/2009/11/bolzano-gpl.png" alt="GPL: Not in this garage" width="183" height="215" /></a></dt>
</dl>
</div>


<p>Related posts:<ol><li><a href='http://bloc.eurion.net/archives/2009/arreglant-paquets-que-no-compilen-necpp/' rel='bookmark' title='Permanent Link: Arreglant paquets que no compilen: necpp'>Arreglant paquets que no compilen: necpp</a></li>
</ol></p><hr />
<p><small>
<a href="http://bloc.eurion.net/archives/2009/bolzano-gpl/#comments">No comments</a><br />
© Siegfried-Angel Gevatter Pujals, 2009. |
<a href="http://bloc.eurion.net/archives/2009/bolzano-gpl/">Permalink</a> |
<a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/3.0/">License</a> |
Post tags: <a href="http://bloc.eurion.net/archives/tag/programari-lliure/" rel="tag">Programari lliure</a>, <a href="http://bloc.eurion.net/archives/tag/xorrades/" rel="tag">Xorrades</a><br/>
</small></p>]]></content:encoded>
			<wfw:commentRss>http://bloc.eurion.net/archives/2009/bolzano-gpl/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Zeitgeist Hackfest (II)</title>
		<link>http://bloc.eurion.net/archives/2009/zeitgeist-hackfest-report/</link>
		<comments>http://bloc.eurion.net/archives/2009/zeitgeist-hackfest-report/#comments</comments>
		<pubDate>Thu, 12 Nov 2009 10:54:15 +0000</pubDate>
		<dc:creator>RainCT</dc:creator>
				<category><![CDATA[Planet Ubuntu]]></category>
		<category><![CDATA[Planet Ubuntu.cat]]></category>
		<category><![CDATA[gnome]]></category>
		<category><![CDATA[Programari lliure]]></category>
		<category><![CDATA[zeitgeist]]></category>

		<guid isPermaLink="false">http://bloc.eurion.net/?p=431</guid>
		<description><![CDATA[So here we are at the Zeitgeist Hackfest and there&#8217;s quite some stuff going on. From the engine side we are implementing a new database and API which does a clean cut between what is event logging and what is repository functionality. What this means for Zeitgeist is that we won&#8217;t do annotations anymore and [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://bloc.eurion.net/wp-content/uploads/2009/11/gnome-sponsored-badge.png"><img class="alignright size-thumbnail wp-image-432" title="gnome-sponsored-badge" src="http://bloc.eurion.net/wp-content/uploads/2009/11/gnome-sponsored-badge-150x150.png" alt="gnome-sponsored-badge" width="150" height="150" /></a>So here we are at the <a href="http://bloc.eurion.net/archives/2009/zeitgeist-hackfest-2009/">Zeitgeist Hackfest </a>and there&#8217;s quite some stuff going on.</p>
<p>From the engine side we are implementing a new database and API which does a clean cut between what is <em>event logging</em> and what is <em>repository</em> functionality. What this means for Zeitgeist is that we won&#8217;t do annotations anymore and that the basic information Zeitgeist has about items will be about those at the time of the event &#8211; for anything else there is Tracker (I tried out the new version from git yesterday and it really rocks, it&#8217;s nothing like 0.6).</p>
<p>We are also implementing focus tracking and the algorithms for the fancy stuff (contextual relevancy over time, focus time of documents/applications, etc).</p>
<div id="attachment_433" class="wp-caption aligncenter" style="width: 310px"><a href="http://bloc.eurion.net/wp-content/uploads/2009/11/09112009131.jpg"><img class="size-medium wp-image-433 " title="Zeitgeist Hackfest - Blackboard" src="http://bloc.eurion.net/wp-content/uploads/2009/11/09112009131-300x225.jpg" alt="Seif, Markus and Ivan at the blackboard" width="300" height="225" /></a><p class="wp-caption-text">Blackboards saved us a lot of time.  In the image: Seif Lotfy, Ivan Frade (Tracker) and Markus Korn.</p></div>
<p>The User Interface team also has some quite nice design ideas. For the non-developers out there, there&#8217;ll be something (alpha-quality!) to try out soon.</p>


<p>Related posts:<ol><li><a href='http://bloc.eurion.net/archives/2009/zeitgeist-hackfest-2009/' rel='bookmark' title='Permanent Link: Zeitgeist Hackfest'>Zeitgeist Hackfest</a></li>
<li><a href='http://bloc.eurion.net/archives/2009/zeitgeist-is-out/' rel='bookmark' title='Permanent Link: Zeitgeist is out!'>Zeitgeist is out!</a></li>
<li><a href='http://bloc.eurion.net/archives/2009/zeitgeist-since-uds/' rel='bookmark' title='Permanent Link: Zeitgeist since UDS'>Zeitgeist since UDS</a></li>
</ol></p><hr />
<p><small>
<a href="http://bloc.eurion.net/archives/2009/zeitgeist-hackfest-report/#comments">2 comments</a><br />
© Siegfried-Angel Gevatter Pujals, 2009. |
<a href="http://bloc.eurion.net/archives/2009/zeitgeist-hackfest-report/">Permalink</a> |
<a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/3.0/">License</a> |
Post tags: <a href="http://bloc.eurion.net/archives/tag/gnome/" rel="tag">gnome</a>, <a href="http://bloc.eurion.net/archives/tag/programari-lliure/" rel="tag">Programari lliure</a>, <a href="http://bloc.eurion.net/archives/tag/zeitgeist/" rel="tag">zeitgeist</a><br/>
</small></p>]]></content:encoded>
			<wfw:commentRss>http://bloc.eurion.net/archives/2009/zeitgeist-hackfest-report/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Zeitgeist Hackfest</title>
		<link>http://bloc.eurion.net/archives/2009/zeitgeist-hackfest-2009/</link>
		<comments>http://bloc.eurion.net/archives/2009/zeitgeist-hackfest-2009/#comments</comments>
		<pubDate>Sat, 07 Nov 2009 14:45:42 +0000</pubDate>
		<dc:creator>RainCT</dc:creator>
				<category><![CDATA[Planet Ubuntu]]></category>
		<category><![CDATA[Planet Ubuntu.cat]]></category>
		<category><![CDATA[gnome]]></category>
		<category><![CDATA[Programari lliure]]></category>
		<category><![CDATA[zeitgeist]]></category>

		<guid isPermaLink="false">http://bloc.eurion.net/?p=418</guid>
		<description><![CDATA[Just a quick note to mention that tomorrow I&#8217;m leaving for Bolzano for a week, for the Zeitgeist Hackfest. I&#8217;m really looking forward to meeting all the team there! My initial idea for this post was to write about some of the upcoming changes in the engine, as we&#8217;ve been discussing quite some improvements lately, [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.freesoftwareweek.org/"><img class="aligncenter size-medium wp-image-417" title="Free Software Week 2009 - Bolzano, South Tyrol" src="http://bloc.eurion.net/wp-content/uploads/2009/11/bolzano2009-300x95.png" alt="Free Software Week 2009 - Bolzano, South Tyrol" width="300" height="95" /></a></p>
<p>Just a quick note to mention that tomorrow I&#8217;m leaving for Bolzano for a week, for the <a href="http://live.gnome.org/ZeitgeistHackFest2009">Zeitgeist Hackfest</a>. I&#8217;m really looking forward to meeting all the team there!</p>
<p>My initial idea for this post was to write about some of the upcoming changes in the engine, as we&#8217;ve been discussing quite some improvements lately, but I&#8217;ll better leave that for after the hackfest as we&#8217;ll have a chance to go over all them again and clarify any missing chunks :). For now I&#8217;ll just say that the API will probably change quite a lot, and while I&#8217;m at it leave you with a link to a recent <a href="http://mail.gnome.org/archives/desktop-devel-list/2009-November/msg00019.html">Status Report</a> sent to GNOME (there&#8217;s also one for <a href="http://mail.gnome.org/archives/desktop-devel-list/2009-November/msg00006.html">GNOME Shell</a>, in case you care).</p>


<p>Related posts:<ol><li><a href='http://bloc.eurion.net/archives/2009/zeitgeist-hackfest-report/' rel='bookmark' title='Permanent Link: Zeitgeist Hackfest (II)'>Zeitgeist Hackfest (II)</a></li>
<li><a href='http://bloc.eurion.net/archives/2009/zeitgeist-api-02/' rel='bookmark' title='Permanent Link: Introduction to Zeitgeist 0.2&#8242;s API'>Introduction to Zeitgeist 0.2&#8242;s API</a></li>
<li><a href='http://bloc.eurion.net/archives/2010/zeitgeist-data-source-registry/' rel='bookmark' title='Permanent Link: Zeitgeist Data-Source Registry'>Zeitgeist Data-Source Registry</a></li>
</ol></p><hr />
<p><small>
<a href="http://bloc.eurion.net/archives/2009/zeitgeist-hackfest-2009/#comments">3 comments</a><br />
© Siegfried-Angel Gevatter Pujals, 2009. |
<a href="http://bloc.eurion.net/archives/2009/zeitgeist-hackfest-2009/">Permalink</a> |
<a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/3.0/">License</a> |
Post tags: <a href="http://bloc.eurion.net/archives/tag/gnome/" rel="tag">gnome</a>, <a href="http://bloc.eurion.net/archives/tag/programari-lliure/" rel="tag">Programari lliure</a>, <a href="http://bloc.eurion.net/archives/tag/zeitgeist/" rel="tag">zeitgeist</a><br/>
</small></p>]]></content:encoded>
			<wfw:commentRss>http://bloc.eurion.net/archives/2009/zeitgeist-hackfest-2009/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Arreglant paquets que no compilen: necpp</title>
		<link>http://bloc.eurion.net/archives/2009/arreglant-paquets-que-no-compilen-necpp/</link>
		<comments>http://bloc.eurion.net/archives/2009/arreglant-paquets-que-no-compilen-necpp/#comments</comments>
		<pubDate>Sat, 24 Oct 2009 22:10:36 +0000</pubDate>
		<dc:creator>RainCT</dc:creator>
				<category><![CDATA[Planet Ubuntu.cat]]></category>
		<category><![CDATA[motu]]></category>
		<category><![CDATA[Programari lliure]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://bloc.eurion.net/?p=409</guid>
		<description><![CDATA[Una mica més tard del que tenia previst, però continuo el meu apunt sobre com arreglar paquets de l&#8217;Ubuntu que no compilen amb un primer exemple pràctic (o més que exemple, amb un cas real). El paquet triat, seleccionat de la llista de paquets que no compilen, s&#8217;anomena necpp. Procedim a seguir amb els passos [...]]]></description>
			<content:encoded><![CDATA[<p>Una mica més tard del que tenia previst, però continuo el meu apunt sobre <a href="http://bloc.eurion.net/archives/2009/contribuir-a-ubuntu-arreglar-paquets-que-no-compilen/">com arreglar paquets de l&#8217;Ubuntu que no compilen</a> amb un primer exemple pràctic (o més que exemple, amb un cas real). El paquet triat, seleccionat de la <a href="http://people.ubuntuwire.org/~wgrant/rebuild-ftbfs-test/test-rebuild-20090909.html">llista de paquets que no compilen</a>, s&#8217;anomena <strong>necpp</strong>. Procedim a seguir amb els passos que vaig descriure.</p>
<p><strong>1. Comprovació de l&#8217;estat</strong></p>
<p>Ara no perquè ja he arreglat el paquet, però si miravem a <a href="https://launchpad.net/ubuntu/+source/necpp">https://launchpad.net/ubuntu/+source/<strong>necpp</strong></a> veiem que la última versió del paquet era l&#8217;afectada, i que no hi havia informes d&#8217;error relacionats amb el problema (recordem que, si n&#8217;hi hagués, podríem trobar-hi pistes o bé veure que algú altre ja està treballant en arreglar aquest paquet). Comprovant els informes d&#8217;error a Debian (<a href="http://bugs.debian.org/necpp">http://bugs.debian.org/<strong>necpp</strong></a>) tampoc trobem res, i a <a href="http://packages.debian.org/necpp">http://packages.debian.org/<strong>necpp</strong></a> comprovem que tampoc hi ha cap versió més nova que la de l&#8217;Ubuntu on ho hagin arreglat. Així doncs, tirem endavant, i obrim un informe d&#8217;error al Launchpad per indicar que hi estem treballant (<a href="https://bugs.launchpad.net/ubuntu/+source/necpp/+bug/447454">exemple</a>).</p>
<p><strong>2. Obtenció del paquet font</strong><br />
Baixem el paquet font:</p>
<pre>apt-get source <strong>necpp</strong></pre>
<p>Si ho proveu ara, obtindreu la nova versió del paquet que ja he arreglat, però podeu baixar-vos l&#8217;anterior a fi de seguir el tutorial fent això en lloc de l&#8217;<em>apt-get source</em>:</p>
<pre>dget https://launchpad.net/ubuntu/+archive/primary/+files/<strong>necpp</strong>_<strong>1.3.0+cvs20090101</strong>-<strong>1ubuntu1</strong>.dsc
dpkg-source -x <strong>necpp</strong>_<strong>1.3.0+cvs20090101</strong>-<strong>1ubuntu1</strong>.dsc</pre>
<p>Ara, comprovem que efectivament podem reproduir el problema, intentant compilar-lo:</p>
<pre>pbuilder-karmic build <strong>necpp</strong>_<strong>1.3.0+cvs20090101</strong>-<strong>1ubuntu1</strong>.dsc</pre>
<p>El <a href="http://launchpadlibrarian.net/31951395/buildlog_ubuntu-karmic-amd64.necpp_1.3.0%2Bcvs20090101-1ubuntu1_FAILEDTOBUILD.txt.gz">missatge d&#8217;error</a> que rebem és el següent:</p>
<pre>[...]
XGetopt.cpp: In function 'int XGetopt(int, char**, const char*)':
XGetopt.cpp:170: error: invalid conversion from 'const char*' to 'char*'
make[3]: *** [XGetopt.o] Error 1
[...]</pre>
<p><strong>3. Solució del problema</strong><br />
Arribem així a la part més difícil, ja que aquesta no és sistemàtica.</p>
<p>El missatge d&#8217;error ens parla d&#8217;un fitxer <em>XGetopt.cpp</em>, el qual podem trobar al directori <em>str/</em>. Si mirem a la línia que menciona, la 170, ens trobem el següent:</p>
<pre>cp = strchr(optstring, c);</pre>
<p>Si cerquem informació sobre la funció <strong>strchr</strong> del C++, <a href="http://www.cplusplus.com/reference/clibrary/cstring/strchr/">trobem</a> que està sobrecarregada i té dues versions:</p>
<pre>const char * strchr (const char * str, int character);
char * strchr (char * str, int character);</pre>
<p>Veiem que si el primer paràmetre de la funció és constant, el resultat de la funció és una constant, i sí el paràmetre no és constant, el resultat tampoc ho és. Si mirem de quin tipus és la variable <em>optstring</em>, a la línia 133 trobem que és constant, de manera que el resultat de la funció també ho és. Si ara mirem com és la variable <em>cp</em>, a la qual s&#8217;està assignant la sortida de la funció, a la línia 136 veiem:</p>
<pre>char *cp;</pre>
<p>És a dir, no és constant, de manera que aquí tenim el problema. Si mirem la resta del codi on existeix aquesta variable, no trobem cap lloc on es modifiqui el valor de la cadena de text a la qual apunta, així que podem convertir la variable en constant sense problema. Per fer-ho, simplement cal canviar la línia afegint-hi «<em>const</em>» al davant, i com que si executem l&#8217;ordre</p>
<pre>what-patch</pre>
<p>ens diu que el paquet no utilitza cap sistema de pegats («<em>patchless?</em>») podem fer el canvi modificant el fitxer directament.</p>
<p>Per acabar, afegim una entrada nova al fitxer <em>debian/changelog</em>, declarant una revisió nova del paquet i explicant els canvis que hem fet. Executem l&#8217;ordre següent:</p>
<pre>dch -i</pre>
<p>I ha de quedar una cosa com ara:</p>
<pre>necpp (1.3.0+cvs20090101-1ubuntu2) karmic; urgency=low

  * src/XGetopt.cpp (LP: #447454)
     - Change the definition of the "cp" variable from type "char*" to
       "const char*", to avoid an "invalid conversion" error when the
       result of "strchr(const char*, ...)" is assigned to it.

 -- Siegfried-Angel Gevatter Pujals   Sat, 24 Oct 2009 19:58:55 +0200</pre>
<p>És important no oblidar-nos de referenciar el número de l&#8217;informe d&#8217;error que hem obert, i explicar clarament el motiu de tots els canvis.</p>
<p><strong>4. Regenerant el paquet font</strong></p>
<pre>debuild -S</pre>
<p>Això ens crearà un paquet font per a la nova revisió, que podem compilar tal com hem fet abans (però utilitzant el fitxer <em>.dsc</em> de la nova revisió, no el d&#8217;abans):</p>
<pre>pbuilder-karmic build <strong>necpp</strong>_<strong>1.3.0+cvs20090101</strong>-<strong>1ubuntu2</strong>.dsc</pre>
<p>Aquest cop funcionarà, així que ara només queda generar un fitxer de diferències i comprovar que només hi ha els canvis que hem fet intencionadament.</p>
<pre>debdiff <strong>necpp</strong>_<strong>1.3.0+cvs20090101</strong>-<strong>1ubuntu1</strong>.dsc <strong>necpp</strong>_<strong>1.3.0+cvs20090101</strong>-<strong>1ubuntu2</strong>.dsc &gt; <strong>necpp</strong>_<strong>1.3.0+cvs20090101</strong>-<strong>1ubuntu2</strong>.debdiff</pre>
<p>En aquest cas, el contingut del fitxer ha de ser el següent:</p>
<pre>diff -u necpp-1.3.0+cvs20090101/debian/changelog necpp-1.3.0+cvs20090101/debian/changelog
--- necpp-1.3.0+cvs20090101/debian/changelog
+++ necpp-1.3.0+cvs20090101/debian/changelog
@@ -1,3 +1,12 @@
+necpp (1.3.0+cvs20090101-1ubuntu2) karmic; urgency=low
+
+  * src/XGetopt.cpp (LP: #447454)
+     - Change the definition of the "cp" variable from type "char*" to
+       "const char*", to avoid an "invalid conversion" error when the
+       result of "strchr(const char*, ...)" is assigned to it.
+
+ -- Siegfried-Angel Gevatter Pujals   Sat, 24 Oct 2009 19:58:55 +0200
+
 necpp (1.3.0+cvs20090101-1ubuntu1) karmic; urgency=low

   * Merge from debian unstable, remaining changes from jaunty:
only in patch2:
unchanged:
--- necpp-1.3.0+cvs20090101.orig/src/XGetopt.cpp
+++ necpp-1.3.0+cvs20090101/src/XGetopt.cpp
@@ -133,7 +133,7 @@
 int XGetopt(int argc, char *argv[], const char *optstring)
 {
 	char c;
-	char *cp;
+	const char *cp;
 	static char *next = NULL;
 	if (optind == 0)
 		next = NULL;</pre>
<p><strong>5. Enviant els canvis a l&#8217;Ubuntu</strong></p>
<p>Ara que tenim el fitxer de diferències, l&#8217;adjuntem a l&#8217;informe d&#8217;error que hem creat al principi, i subscrivim l&#8217;equip de revisors adequat a l&#8217;informe. En aquest cas, el paquet està al dipòsit <em>universe</em>, com podem comprovar:</p>
<pre>$ apt-cache madison <strong>necpp</strong>
     necpp | 1.3.0+cvs20090101-1ubuntu1 | http://mirror.pacific.net.au karmic/<strong>universe</strong> Sources</pre>
<p>Així doncs, l&#8217;equip és l&#8217;<em>ubuntu-universe-sponsors</em>. Ara només queda esperar que algú revisi el paquet i el pugi a l&#8217;Ubuntu, però com que som bons ciutadans també reportarem l&#8217;error a Debian tot donant-los-en la solució.</p>


<p>Related posts:<ol><li><a href='http://bloc.eurion.net/archives/2009/contribuir-a-ubuntu-arreglar-paquets-que-no-compilen/' rel='bookmark' title='Permanent Link: Com contribuir a l&#8217;Ubuntu &#8211; Arreglar paquets que no compilen correctament'>Com contribuir a l&#8217;Ubuntu &#8211; Arreglar paquets que no compilen correctament</a></li>
</ol></p><hr />
<p><small>
<a href="http://bloc.eurion.net/archives/2009/arreglant-paquets-que-no-compilen-necpp/#comments">No comments</a><br />
© Siegfried-Angel Gevatter Pujals, 2009. |
<a href="http://bloc.eurion.net/archives/2009/arreglant-paquets-que-no-compilen-necpp/">Permalink</a> |
<a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/3.0/">License</a> |
Post tags: <a href="http://bloc.eurion.net/archives/tag/motu/" rel="tag">motu</a>, <a href="http://bloc.eurion.net/archives/tag/programari-lliure/" rel="tag">Programari lliure</a>, <a href="http://bloc.eurion.net/archives/tag/ubuntu/" rel="tag">Ubuntu</a><br/>
</small></p>]]></content:encoded>
			<wfw:commentRss>http://bloc.eurion.net/archives/2009/arreglant-paquets-que-no-compilen-necpp/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Com contribuir a l&#8217;Ubuntu &#8211; Arreglar paquets que no compilen correctament</title>
		<link>http://bloc.eurion.net/archives/2009/contribuir-a-ubuntu-arreglar-paquets-que-no-compilen/</link>
		<comments>http://bloc.eurion.net/archives/2009/contribuir-a-ubuntu-arreglar-paquets-que-no-compilen/#comments</comments>
		<pubDate>Tue, 06 Oct 2009 17:49:55 +0000</pubDate>
		<dc:creator>RainCT</dc:creator>
				<category><![CDATA[Planet Ubuntu.cat]]></category>
		<category><![CDATA[motu]]></category>
		<category><![CDATA[Programari lliure]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://bloc.eurion.net/?p=394</guid>
		<description><![CDATA[El passat cap de setmana va tenir lloc l&#8217;Ubuntu Global Jam i l&#8217;equip català d&#8217;Ubuntu va aportar-hi el seu granet de sorra. Així, va tenir lloc una marató de traducció i, per la tarda, també es va fer una mica d&#8217;introducció a l&#8217;empaquetament de programes amb un exemple pràctic: com arreglar un paquet que no [...]]]></description>
			<content:encoded><![CDATA[<p>El passat cap de setmana va tenir lloc l&#8217;<a href="http://davidplanella.wordpress.com/2009/10/04/ubuntu-jamming-catalan-style/">Ubuntu Global Jam</a> i l&#8217;<a href="http://ubuntu.cat">equip català d&#8217;Ubuntu</a> va aportar-hi el seu granet de sorra. Així, va tenir lloc una marató de traducció i, per la tarda, també es va fer una mica d&#8217;introducció a l&#8217;empaquetament de programes amb un exemple pràctic: com arreglar un paquet que no compila. Seguint el suggeriment de l&#8217;<a href="http://log.alexm.org/">Alex Muntada</a> de fer un resum d&#8217;aquesta darrera activitat, m&#8217;he decidit a escriure una sèrie d&#8217;apunts sobre el tema.</p>
<p><strong>Prefaci</strong></p>
<p>Inauguro la sèrie amb aquest  primer apunt, on tot seguit explicaré conceptes generals en quant als &#8220;paquets que no compilen&#8221; i que fer amb ells; en successius apunts, i per tal de deixar-ho tot ben clar, explicaré els passos necessaris per a arreglar diferents paquets concrets. Depenent de la resposta que rebin aquests escrits, pot ser que més endavant enceti una sèrie nova que tracti algun altre tema relacionat amb els paquets, a partir dels coneixements adquirits amb aquesta.</p>
<p><strong>Introducció</strong></p>
<p>Si esteu llegint això ja deveu saber que en l&#8217;Ubuntu els programes venen preparats en forma de paquets; gestors de paquets (com ara l&#8217;Afegeix/Elimina, el Synaptic o l&#8217;Apt) us proporcionen una llista de tots els paquets disponibles i simplement esperen les vostres indicacions per tal de descarregar, insta?lar i mantenir actualitzats els paquets que us interessin. Ara bé, per increïble que pugui semblar, aquests paquets no apareixen del no-res, sinó que hi ha una munió de gent dedicant temps a crear-los i actualitzar-los.</p>
<p>Quan hom crea un paquet el que fa és agafar el codi font del programa (amb petites modificacions, si convé, com ara arreglar-ne algun error) i afegir-hi la informació necessària per a crear un programa. Un cop això està fet, el paquet font (source package) resultant és enviat al Launchpad (servidor d&#8217;Ubuntu), on és compilat per a les diferents arquitectures, tot creant els paquets binaris (.deb) que tots coneixem. Pot ocórrer que un paquet font no compili correctament (i no es creïn els paquets .deb) per a una o més arquitectures; en aquest cas, cal trobar quin és el problema i enviar una nova revisió del paquet al Launchpad. Del fet que un paquet no compili correctament se&#8217;n diu <em>FTBFS</em> («<em>Fails to Build From Source</em>»).</p>
<p>Normalment, poc abans que surti una nova versió de l&#8217;Ubuntu, s&#8217;intenta tornar a compilar tots els paques dels dipòsits oficials per tal de comprovar que encara compilin correctament. Aquesta operació acaba donant un llarg llistat de paquets que fallen i que convé arreglar. Els motius que els paquets no compilin correctament són diversos, i poden ser coses com ara: l&#8217;ús d&#8217;una nova versió més estricta d&#8217;un compilador (com passa sovint amb el gcc), canvis en les dependències de construcció del paquet (és a dir, en els paquets de que cal disposar per crear-lo, <em>«build dependencies</em>»; pot ser un canvi en el contingut d&#8217;algun d&#8217;aquests paquets el que provoqui el problema, que hagi canviat el nom d&#8217;algun d&#8217;ells i ara no el trobi&#8230;), etc.</p>
<p>La llista de paquets que no compilen correctament a la Karmic es troba aquí: <a href="http://people.ubuntuwire.org/~wgrant/rebuild-ftbfs-test/test-rebuild-20090909.html">Build status for Ubuntu Karmic</a>. Passem a veure, en termes generals, que fer amb aquests paquets.</p>
<p><strong>0. Preparació abans de tractar amb paquets </strong>(això només cal fer-ho el primer cop)</p>
<p>Abans de posar-nos mans a la obra ens cal preparar el nostre sistema, instal·lant-hi unes quantes eines.</p>
<pre>sudo aptitude install ubuntu-dev-tools devscripts debhelper cdbs patchutils pbuilder build-essential</pre>
<p>Fem saber el nostre nom a aquestes eines, obrint el fitxer <em>.bashrc</em> i afegint les dues línies següents al final (tot substituint les dades per les nostres pròpies, és clar!):</p>
<pre>export DEBEMAIL=usuari@proveidor.com
export DEBFULLNAME="Nom Cognom"</pre>
<p>[En cas que disposem d'una clau PGP, convé escriure el mateix nom i l'adreça de correu electrònica tal com els tenim a la clau, tot posant el comentari -si n'hi ha- entre parèntesis i a continuació del nom.]<br />
També crearem un entorn Ubuntu mínim on podem provar de compilar els paquets sense que afectin (ni siguin afectats) pel nostre sistema. [Si no estem utilitzant la Karmic, cal insta?lar el paquet <em><a href="http://packages.ubuntu.com/debootstrap">debootstrap</a></em> del dipòsit <em>-backports</em> corresponent a la versió que utilitzem. També és recomanable agafar la última versió de l'<em>ubuntu-dev-tools</em>.]</p>
<pre>sudo ln -s <a href="http://bloc.eurion.net/archives/2009/test-build-debian-packages/">/usr/bin/pbuilder-dist</a> /usr/local/bin/pbuilder-karmic
sudo chmod +x /usr/local/bin/pbuilder-karmic
pbuilder-karmic create</pre>
<p>Haurem d&#8217;esperar una estona fins que tot el sistema base sigui insta?lat i actualitzat. Per acabar, ens hem d&#8217;assegurar que tinguem una línia <em>deb-src</em> per a la Karmic (encara que estiguem utilitzant la Jaunty o l&#8217;Intrepid, al ser de codi font això no té importància) al fitxer <em>/etc/apt/sources.list</em> i la llista de paquets actualitzada (<em>sudo aptitude update</em>).</p>
<p><strong>1. Comprovació de l&#8217;estat de l&#8217;error: ja hi està treballant algú?<br />
</strong></p>
<p>Un cop hem triat quin paquet volem arreglar, anem a <em>https://launchpad.net/ubuntu/+source/<strong>nom_paquet</strong></em>, comprovem que la última versió indicada sigui la mateixa que a la llista de FTBFS, i comprovem els informes d&#8217;error per si ja n&#8217;hi ha algun sobre el problema en qüestió. Si és així, comprovem que no estigui assignat a ningú (si ho està, deixem el paquet per ell i ens en busquem algun altre, per no duplicar la feina), mirem si l&#8217;informe conté alguna informació rellevant, i ens l&#8217;assignem a nosaltres, canviant a  més l&#8217;estat a <em>In Progress</em>. Si no hi ha cap informe d&#8217;error sobre el FTBFS, en creem un i igualment ens l&#8217;assignem a nosaltres i el marquem com a en progrés.</p>
<p>Fet això, comprovem també <em>http://packages.qa.debian.org/<strong>nom_paquet</strong></em>, on ens assegurem que a Debian no hi hagi ja una versió nova del paquet que solucioni l&#8217;error ni un informe d&#8217;error amb informació que ens pugui ser útil. Si fos el cas que a Debian el paquet ja ha estat arreglat, depenent de la situació en tindríem prou amb demanar que sigui sincronitzat a l&#8217;Ubuntu (veure <a href="https://wiki.ubuntu.com/SyncRequestProcess">sync requests</a>) o bé, si el paquet d&#8217;allà té altres canvis que en aquest moment no volem (per exemple una versió amb funcionalitats noves, ja entrada en vigor la <em>Feature Freeze</em>), podem agafar la solució de Debian de forma isolada per aplicar-la al nostre paquet.</p>
<p><strong>2. Obtenció del paquet font</strong></p>
<p>Ara que hem comprovat que el problema encara no ha estat solucionat, potser hem trobat alguna informació útil, i que hem indicat que estem treballant en arreglar-lo, procedim a baixar el paquet font:</p>
<pre>apt-get source <strong>nom_paquet</strong></pre>
<p>Això baixarà tres fitxers al nostre directori actual: <em>nom_paquet_versió.orig.tar.gz</em>, <em>nom_paquet-versió-revisió.diff.gz</em> i <em>nom_paquet-versió-revisió.dsc</em>. El primer és el codi font agafat de l&#8217;autor original (&lt;em&gt;upstream&lt;/em&gt;), sense modificacions; el segon fitxer és un fitxer de diferències que conté la informació necessària per crear al paquet (que serà posada en un directori anomenat «debian» dins del codi font) i en alguns casos també canvis al codi original, i l&#8217;últim fitxer simplement serveix per verificar que els altres dos són correctes (que no ha estat modificats o corromputs pel camí). Automàticament, també descomprimirà el contingut del <em>.tar.gz</em> i li aplicarà els canvis del <em>.diff.gz</em>, de manera que trobarem un directori <em>nom_paquet-versió</em> on treballar.</p>
<p>[En el paràgraf anterior, «<em>nom_paquet</em>» es refereix al nom del paquet font, «<em>versió</em>» al número de versió que li ha posat l'autor original, i «<em>revisió</em>» al número de revisió del paquet, que pren la forma <em>XubuntuY</em>, on <em>X</em> és la revisió de Debian i <em>Y</em> la revisió d'Ubuntu -si el paquet ve directament de Debian, simplement serà <em>X</em>-].</p>
<p>Arribats a aquest punt, podem verificar que realment el paquet no compila correctament, tot intentant-ho amb:</p>
<pre>pbuilder-karmic build <strong>nom_paquet</strong>-<strong>versió</strong>-<strong>revisió</strong>.dsc</pre>
<p>Per a continuar, ens situarem dins del directori descomprimit:</p>
<pre>cd <strong>nom_paquet</strong>-<strong>versió</strong></pre>
<p><strong>3. Solució del problema</strong></p>
<p>Ara que tenim el paquet de codi font, hem de trobar la solució al problema. Per a això ens és útil llegir el registre de l&#8217;intent de creació del paquet fallit, cercar informació als informes d&#8217;error d&#8217;Ubuntu i Debian (com ja s&#8217;ha mencionat abans) i del lloc web de l&#8217;autor original, llegir el registre de canvis del paquet (el fitxer <strong>debian/changelog</strong> dins del directori de codi font) per si hi ha referències útils, etc. Aquest constitueix el pas crític i més important, ja que si no sabem com solucionar l&#8217;error poc podrem fer.</p>
<p>[En cas que trobem un canvi al <em>debian/changelog</em> que sembli rellevant al problema actual, però no l'acabem d'entendre, preguntarem a la persona que l'hagi fet, ja sigui enviant-li un missatge de correu electrònic o cercant-lo a l'IRC (canal <em>#ubuntu-motu</em> o <em>#ubuntu-devel</em> a <em>irc.freenode.org</em>.]</p>
<p>Un cop haguem trobat com solucionar el problema, apliquem els canvis necessaris. Aquests acostumen a consistir en una modificació al fitxer <strong>debian/rules</strong> (per corregir les instruccions de creació del paquet), <strong>debian/control</strong> (per corregir les dependències de construcció) o als fitxers de codi font; les modificacions a aquests darrers cal fer-les utilitzant un sistema de pegats, en cas que el paquet ja disposi d&#8217;un (podem veure-ho amb l&#8217;ordre <strong>what-patch</strong>), o bé modificant els fitxers directament en cas contrari.</p>
<p>Fet això, haurem d&#8217;afegir a la informació del paquet una nova revisió. Per a això executarem «<em>dch -i</em>» i, a l&#8217;espai on descriure els canvis, explicarem detalladament què hem fet i perquè. També hi inclourem una referència a l&#8217;informe d&#8217;error que hem obert (o trobat) anteriorment, de la forma «<em>(LP: #<strong>número</strong>)</em>». Usualment el format utilitzat és d&#8217;aquest tipus:</p>
<pre>  * debian/control: Add foo as a build dependency, because the build system invokes command bar provided by the former; this fixes a FTBFS (LP: #123456).</pre>
<p>Com veieu, es comença posant el nom del fitxer (o els fitxers) modificat, dos punts, i a continuació s&#8217;expliquen detalladament els canvis; cada canvi es posa en una línia separada (començant per «  *»).</p>
<p><strong>4. Regenerant el paquet font</strong></p>
<p>Hem arreglat el problema i hem documentat tot en una entrada nova al fitxer <em>debian/changelog</em>. Ara podem procedir a crear un paquet font per a la nova revisió; això ho farem amb l&#8217;ordre següent</p>
<pre>debuild -S</pre>
<p>[És estrany, però pot ser que algun paquet requereixi la insta?lació de part de les dependències de construcció per tal de crear el paquet font. Quan aquest sigui el cas, n'hi ha prou amb insta?lar les dependències mancants i repetir l'ordre.]</p>
<p>Si tot va bé, ara podem tornar al directori pare del codi font (&lt;em&gt;cd ..&lt;/em&gt;) i ens trobarem amb dos fitxers nous: un &lt;em&gt;.diff.gz&lt;/em&gt; i un &lt;.dsc&gt; per a la nova revisió (l&#8217;&lt;em&gt;.orig.tar.gz&lt;/em&gt; no ens cal, ja que la versió de l&#8217;autor original és la mateixa que abans).</p>
<p>Ara podem tornar a provar de construir el paquet, i si hem fet bé la nostra feina aquest cop funcionarà (i deixarà un o més paquets binaris a <em>~/pbuilder/karmic_result/</em>):</p>
<pre>pbuilder-karmic build <strong>nom_paquet</strong>-<strong>versió</strong>-<strong>revisió_nova</strong>.dsc</pre>
<p>Si ha funcionat, felicitats! Per acabar, crearem un fitxer de diferències amb els canvis entre la revisió actual de l&#8217;Ubuntu i la nova que hem preparat, tot fent:</p>
<pre>debdiff <strong>nom_paquet</strong>-<strong>versió</strong>-<strong>revisió_original</strong>.dsc <strong>nom_paquet</strong>-<strong>versió</strong>-<strong>revisió_nova</strong>.dsc &gt; <strong>nom_paquet</strong>-<strong>versió</strong>-<strong>revisió_nova</strong>.debdiff</pre>
<p>El fitxer <em>.debdiff</em> l&#8217;obrirem amb un editor de text per comprovar que no s&#8217;hi hagi colat cap canvi que no haguem fet. [Si hi ha alguna cosa que no volem, haurem de desfer el canvi al directori del codi font i tornar a regenerar el paquet font, no s'hi val editar el fitxer <em>.debdiff</em> a mà ja que això segurament l'espatllarà.]</p>
<p><strong>Enviant els canvis a l&#8217;Ubuntu</strong></p>
<p>Un cop estiguem satisfets amb la nostra solució i haguem provat que funciona, adjuntarem el fitxer <em>.debdiff</em> a l&#8217;informe d&#8217;error que hem trobat o creat al <a href="https://launchpad.net/ubuntu">Launchpad</a> i només ens faltarà que un desenvolupador d&#8217;Ubuntu el comprovi i el pugi a l&#8217;Ubuntu. Per a això haurem de mirar en quin dipòsit està el paquet, fent:</p>
<pre>apt-cache madison <strong>nom_paquet</strong></pre>
<p>Si la penúltima paraula és «<em>universe</em>» o «<em>multiverse</em>», subscriure&#8217;m l&#8217;equip «<em>ubuntu-universe-sponsors</em>» a l&#8217;informe d&#8217;error utilitzant l&#8217;opció que trobarem al Launchpad a la dreta; si, en cavi, és «<em>main</em>» o «<em>restricted</em>», subscriure&#8217;m l&#8217;equip «<em>ubuntu-main-sponsors</em>». Ara, tot és qüestió d&#8217;esperar que algú revisi els nostres canvis i els apliqui o bé proposi possibles millores.</p>
<p>Quan els nostres canvis hagin estat acceptats, també els enviarem a Debian, en cas que allà també hi siguin rellevants. Per això simplement enviarem un mail a <em><strong>número_de_l&#8217;informe_d&#8217;error</strong>@bugs.debian.org</em> si ja existeix un informe d&#8217;error, o n&#8217;<a href="http://www.debian.org/Bugs/Reporting">obrirem un de nou</a> si no n&#8217;hi ha.</p>
<p><strong>Conclusió</strong></p>
<p>Si heu llegit tot això, us felicito, ja que realment heu mostrar voluntat. Com he promès al prefaci, els propers dies escriure uns quants apunts més explicant (de forma més breu) com arreglar alguns paquets particulars, tot veient solucions a diferents problemes.</p>


<p>Related posts:<ol><li><a href='http://bloc.eurion.net/archives/2009/arreglant-paquets-que-no-compilen-necpp/' rel='bookmark' title='Permanent Link: Arreglant paquets que no compilen: necpp'>Arreglant paquets que no compilen: necpp</a></li>
<li><a href='http://bloc.eurion.net/archives/2010/gnome-activity-journal-and-installing-it-on-ubuntu/' rel='bookmark' title='Permanent Link: GNOME Activity Journal, and installing it on Ubuntu'>GNOME Activity Journal, and installing it on Ubuntu</a></li>
<li><a href='http://bloc.eurion.net/archives/2007/copies-de-seguretat-ubuntu/' rel='bookmark' title='Permanent Link: Més val prevenir&#8230; (Còpies de seguretat a Ubuntu)'>Més val prevenir&#8230; (Còpies de seguretat a Ubuntu)</a></li>
</ol></p><hr />
<p><small>
<a href="http://bloc.eurion.net/archives/2009/contribuir-a-ubuntu-arreglar-paquets-que-no-compilen/#comments">One comment</a><br />
© Siegfried-Angel Gevatter Pujals, 2009. |
<a href="http://bloc.eurion.net/archives/2009/contribuir-a-ubuntu-arreglar-paquets-que-no-compilen/">Permalink</a> |
<a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/3.0/">License</a> |
Post tags: <a href="http://bloc.eurion.net/archives/tag/motu/" rel="tag">motu</a>, <a href="http://bloc.eurion.net/archives/tag/programari-lliure/" rel="tag">Programari lliure</a>, <a href="http://bloc.eurion.net/archives/tag/ubuntu/" rel="tag">Ubuntu</a><br/>
</small></p>]]></content:encoded>
			<wfw:commentRss>http://bloc.eurion.net/archives/2009/contribuir-a-ubuntu-arreglar-paquets-que-no-compilen/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
