<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="wordpress/2.3.3" -->
<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/"
	>

<channel>
	<title>Alban's blog</title>
	<link>http://alban.apinc.org/blog</link>
	<description></description>
	<pubDate>Sun, 23 Nov 2008 21:15:45 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.3.3</generator>
	<language>en</language>
			<item>
		<title>Promote free software with April</title>
		<link>http://alban.apinc.org/blog/2008/11/23/promote-free-software-with-april/</link>
		<comments>http://alban.apinc.org/blog/2008/11/23/promote-free-software-with-april/#comments</comments>
		<pubDate>Sun, 23 Nov 2008 21:15:45 +0000</pubDate>
		<dc:creator>alban</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://alban.apinc.org/blog/2008/11/23/promote-free-software-with-april/</guid>
		<description><![CDATA[This is a post in French about why you should become a member of April, the French association for promotion and defense of Free Software.
Si vous vous intéressez au mouvement du Logiciel Libre et que vous souhaitez qu&#8217;il soit défendu contre les MTP/DRM, les brevets logiciels, la vente liée et l&#8217;informatique déloyale, je vous encourage [...]]]></description>
			<content:encoded><![CDATA[<p>This is a post in French about why you should become a member of <a href="http://www.april.org/">April</a>, the French association for promotion and defense of Free Software.</p>
<p>Si vous vous intéressez au mouvement du Logiciel Libre et que vous souhaitez qu&#8217;il soit défendu contre les MTP/DRM, les brevets logiciels, la vente liée et l&#8217;informatique déloyale, je vous encourage à <a href="http://www.april.org/adherer?referent=Alban+CREQUY+%28acrequy%29" title="Adhérer à l'April">adhérer dès maintenant</a>! Les positions de l&#8217;April sur ces sujets sont <a href="http://www.april.org/fr/nospositions" title="Positions de l'April">affichées sur son site</a> et des <a href="http://www.candidats.fr/index.php/2007/02/05/39-telechargez-les-cahiers-candidatsfr" title="Cahiers de candidats.fr">cahiers explicatifs</a> ont été réalisés lors des dernières élections présidentielles et législatives.</p>
<p>Je suis membre depuis début 2006 et je peux témoigner, tout comme le fait <a href="http://thomas.enix.org/Blog-20081114092925-Libre" title="Blog de Thomas: Soutenez le Logiciel Libre : adhérez à l'April">Thomas sur son blog</a>, du travail de promotion du Logiciel Libre auprès des élus et des cabinets ministériels. Depuis 2007, l&#8217;April a trois permanents financés par les cotisations des membres. Toutes les actions de l&#8217;association listées au <a href="http://www.april.org/articles/divers/rapport-moral-2007.html" title="Rapport moral 2007 de l'April">rapport moral de 2007</a> n&#8217;auraient pas été possibles sans embaucher des personnes à plein temps.</p>
<p align="center"><img src="http://www.april.org/files/images/banniere_campagne-adhesion-objectif-5000-adherents.png" alt="April compaign" height="60" width="468" /></p>
<p>Pour renforcer son action, l&#8217;April lance une campagne d&#8217;adhésion et se donne pour objectifs 5000 membres. Aujourd&#8217;hui, le compteur affiche 3068 adhérents dont:</p>
<ul>
<li>2853 particuliers</li>
<li>121 entreprises ou réseaux d&#8217;entreprises</li>
<li>91 associations</li>
<li>2 collectivités locales</li>
</ul>
<p align="center"> <img src="http://www.april.org/barre-progression/progbar.php" alt="April members counter" height="32" width="416" /></p>
<p>Que vous soyez un militant actif ou que vous vouliez seulement soutenir l&#8217;association, vous pouvez adhérer à l&#8217;April aujourd&#8217;hui:</p>
<p align="center"><a href="http://www.april.org/adherer?referent=Alban+CREQUY+%28acrequy%29"><img src="http://www.april.org/files/association/documents/bannieres/adherer_april.png" alt="Promouvoir et soutenir le logiciel libre" /></a></p>
<p align="center">&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://alban.apinc.org/blog/2008/11/23/promote-free-software-with-april/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Collaborative editing in Emacs</title>
		<link>http://alban.apinc.org/blog/2008/10/29/collaborative-editing-in-emacs/</link>
		<comments>http://alban.apinc.org/blog/2008/10/29/collaborative-editing-in-emacs/#comments</comments>
		<pubDate>Tue, 28 Oct 2008 23:11:54 +0000</pubDate>
		<dc:creator>alban</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://alban.apinc.org/blog/2008/10/29/collaborative-editing-in-emacs/</guid>
		<description><![CDATA[Two weeks ago, Michael Albinus sent me a collaborative plugin for Emacs. It can work with the gedit and gvim plugins I hosted on my collaborative editing page. It needs D-Bus support in Emacs, so the version 23.0.60 at least is required.
I tried it and recorded a screencast with Emacs, gedit and gvim together:

]]></description>
			<content:encoded><![CDATA[<p>Two weeks ago, Michael Albinus sent me a <a href="http://alban.apinc.org/files/collaborative-editing/collabora.el">collaborative plugin for Emacs</a>. It can work with the gedit and gvim plugins I hosted on <a href="http://alban.apinc.org/blog/collaborative-editing/">my collaborative editing page</a>. It needs D-Bus support in Emacs, so the version 23.0.60 at least is required.</p>
<p>I tried it and recorded a screencast with Emacs, gedit and gvim together:</p>
<p><a href="http://alban.apinc.org/files/collaborative-editing/emacs-gedit-gvim.ogg"><img src="http://alban.apinc.org/files/collaborative-editing/emacs-gedit-gvim.png" alt="Collaborative editing, screencast with Emcas" height="253" width="408" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://alban.apinc.org/blog/2008/10/29/collaborative-editing-in-emacs/feed/</wfw:commentRss>
		</item>
		<item>
		<title>gvim and gedit together</title>
		<link>http://alban.apinc.org/blog/2008/09/21/gvim-and-gedit-together/</link>
		<comments>http://alban.apinc.org/blog/2008/09/21/gvim-and-gedit-together/#comments</comments>
		<pubDate>Sun, 21 Sep 2008 21:02:03 +0000</pubDate>
		<dc:creator>alban</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://alban.apinc.org/blog/2008/09/21/gvim-and-gedit-together/</guid>
		<description><![CDATA[Just a quick screencast with gedit and gvim sharing a buffer:

It is not really useful because the text editors are running on the same computer, and they communicate via D-Bus. It would be better on Internet with the Obby protocol and with Telepathy tubes!
The code used to make the screencast is on my collaborative editing [...]]]></description>
			<content:encoded><![CDATA[<p>Just a quick <a href="http://people.collabora.co.uk/~alban/d/2008/09/text-remote-control.ogg" title="gedit and gvim screencast">screencast</a> with gedit and gvim sharing a buffer:</p>
<p><a href="http://people.collabora.co.uk/~alban/d/2008/09/text-remote-control.ogg" title="gedit and gvim screencast"><img src="http://people.collabora.co.uk/~alban/d/2008/09/gedit_gvim.png" alt="gedit and gvim" height="203" width="328" /></a></p>
<p>It is not really useful because the text editors are running on the same computer, and they communicate via D-Bus. It would be better on Internet with the <a href="http://gobby.0x539.de/trac/" title="Gobby's homepage">Obby protocol</a> and with <a href="http://telepathy.freedesktop.org/wiki/Tubes" title="Telepathy tubes">Telepathy tubes</a>!</p>
<p>The code used to make the screencast is on <a href="http://alban.apinc.org/blog/collaborative-editing/">my collaborative editing page</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://alban.apinc.org/blog/2008/09/21/gvim-and-gedit-together/feed/</wfw:commentRss>
<enclosure url="http://people.collabora.co.uk/~alban/d/2008/09/text-remote-control.ogg" length="769251" type="audio/ogg" />
		</item>
		<item>
		<title>Collaborative editing of source code</title>
		<link>http://alban.apinc.org/blog/2008/05/11/collaborative-edition-of-source-code/</link>
		<comments>http://alban.apinc.org/blog/2008/05/11/collaborative-edition-of-source-code/#comments</comments>
		<pubDate>Sun, 11 May 2008 14:02:35 +0000</pubDate>
		<dc:creator>alban</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://alban.apinc.org/blog/2008/05/11/collaborative-edition-of-source-code/</guid>
		<description><![CDATA[I would like to have a real-time collaborative editor for code source. The real-time collaborative edition feature already exists in Gobby or AbiWord. But I still want to use vim for source code, and some colleague will not accept to leave its alternative editor.
It would be better to have a common protocol in order to [...]]]></description>
			<content:encoded><![CDATA[<p>I would like to have a real-time collaborative editor for code source. The real-time collaborative edition feature already exists in <a href="http://gobby.0x539.de/trac/" title="Gobby, a collaborative text editor">Gobby</a> or <a href="http://abisource.com/" title="AbiWord homepage">AbiWord</a>. But I still want to use <a href="http://www.vim.org/" title="vim homepage">vim</a> for source code, and some <a href="http://www.tester.ca/" title="Tester's blog">colleague</a> will not accept to leave <a href="http://www.gnu.org/software/emacs/" title="GNU Emacs homepage">its alternative editor</a>.</p>
<p>It would be better to have a common protocol in order to have collaboration features between <a href="http://www.vim.org/" title="vim homepage">vim</a>, <a href="http://www.gnu.org/software/emacs/" title="GNU Emacs homepage">emacs</a>, <a href="http://www.gnome.org/projects/gedit/" title="gedit homepage">gedit</a> and <a href="http://kate-editor.org/" title="Kate homepage">more</a>. The <a href="http://vimdoc.sourceforge.net/htmldoc/remote.html" title="vim client-server feature">existing collaboration features in vim</a> cannot interoperate with GNU Emacs, and the <a href="http://www.gnu.org/software/emacs/manual/html_node/emacs/Multiple-Displays.html#Multiple-Displays" title="Multiple Displays in GNU Emacs">existing collaboration features in GNU Emacs</a> cannot interoperate with vim. The <a href="http://www.abisource.com/wiki/AbiCollab" title="AbiWord's plugin Collab">AbiWord&#8217;s plugin Collab</a> protocol has good ideas to avoid and resolve conflicts as explained in <a href="http://gnomejournal.org/article/31/gocollab----peer-to-peer-document-collaboration" title="GOCollab -- Peer to Peer Document Collaboration">a GNOME Journal article</a> (and more good ideas will come with the <a href="http://abicollab.net/" title="abicollab.net service">abicollab.net service</a>). But the Collab&#8217;s protocol is tied to Abiword internal structures. <a href="http://aseigo.blogspot.com/" title="Aseigo's blog">Aseigo</a> discussed the issue and want <a href="http://aseigo.blogspot.com/2008/01/lca.html" title="Aseigo's post about AbiWord's Collab plugin">a generic library for collaborative features</a>.</p>
<p>A common protocol would be useful for editing source code with my contacts (I want to use <a href="http://telepathy.freedesktop.org/wiki/Tubes" title="Telepathy tubes">Telepathy tubes</a>!) but also when one user want to use both vim and emacs on the same buffer. <a href="http://www.freedesktop.org/wiki/Software/dbus" title="D-Bus homepage">D-Bus</a> is now the way to go for applications to communicate with one another, and D-Bus tubes are available in Telepathy.</p>
<p>The editors landscape use very different languages: Emacs Lisp for GNU Emacs, the Vim script language for vim (although Python can be used, see <a href="http://www.tummy.com/Community/Presentations/vimpython-20070225/vim.html" title="Python and vim: Two great tastes that go great together">this presentation from PyCon</a>), C and Python for gedit. Whatever the way we choose to resolve conflicts that happens in real-time editing, it seems complex: it took <a href="http://www.redhatmagazine.com/2008/05/08/abiword-team-interview/" title="AbiWord team interview in Red Hat Magazine">some years</a> to the Abiword team to build the Collab plugin. I would prefer to avoid writing complex things in all theses differents editors and languages.</p>
<p>So I am thinking of an architecture with an intermediary component that make the difficult job of handling conflicts. Let&#8217;s call it text-remote-control now but I am looking for a better name.</p>
<p align="center"><img src="http://people.collabora.co.uk/~alban/d/2008/05/collaborative-text-small.png" alt="Collaborative edition of source code, architecture schema" height="338" width="451" /></p>
<p>Then, editors would have to implement a basic D-Bus specification. I don&#8217;t know yet if it is possible to isolate the complexity from the editor, but I would like to explore this possibility.</p>
<p>So I started to hack on gedit:</p>
<ul>
<li>gedit&#8217;s remote control plugin: <a href="http://people.collabora.co.uk/~alban/d/2008/05/remotecontrol.py" title="gedit's remote control plugin source">file</a> (on <a href="http://people.collabora.co.uk/~alban/git/gedit-remotecontrol/" title="Git repository of gedit's remotecontrol plugin">git</a>)</li>
<li>text-remote-control: <a href="http://people.collabora.co.uk/~alban/d/2008/05/text-remote-control.py" title="text-remote-control source">script</a> (on <a href="http://people.collabora.co.uk/~alban/git/text-remote-control/" title="text-remote-control on git">git</a>)</li>
</ul>
<p>And I have built this <a href="http://people.collabora.co.uk/~alban/d/2008/05/gedit-plugin.ogg" title="gedit's remote control plugin screencast">screencast</a><a href="http://people.collabora.co.uk/~alban/d/2008/05/gedit-plugin.ogg">: </a></p>
<p><a href="http://people.collabora.co.uk/~alban/d/2008/05/gedit-plugin.ogg" title="gedit's remote control plugin screencast"><img src="http://people.collabora.co.uk/~alban/d/2008/05/gedit-screencast-small.png" alt="Gedit's plugin screencast" height="264" width="422" /></a></p>
<p>I have also a <a href="http://people.collabora.co.uk/~alban/d/2008/05/remotecontrol.vim" title="vim's remote control plugin source">plugin for vim</a> (on <a href="http://people.collabora.co.uk/~alban/git/vim-remotecontrol/" title="vim's remote control plugin on git">git</a>) that fires a D-Bus signal each time the buffer is changed. The problem here is that vim use its own mainloop and I don&#8217;t know how to integrate the GLib mainloop used by the python-dbus. So my vim plugin cannot receives method calls yet.</p>
<p>I don&#8217;t know how to use GNU Emacs but I hope someone will take the opportunity to show that writing plugins in emacs is easier!</p>
]]></content:encoded>
			<wfw:commentRss>http://alban.apinc.org/blog/2008/05/11/collaborative-edition-of-source-code/feed/</wfw:commentRss>
<enclosure url="http://people.collabora.co.uk/~alban/d/2008/05/gedit-plugin.ogg" length="1173643" type="audio/ogg" />
		</item>
		<item>
		<title>Rhythmbox and Telepathy</title>
		<link>http://alban.apinc.org/blog/2008/04/08/rhythmbox-and-telepathy/</link>
		<comments>http://alban.apinc.org/blog/2008/04/08/rhythmbox-and-telepathy/#comments</comments>
		<pubDate>Tue, 08 Apr 2008 00:00:28 +0000</pubDate>
		<dc:creator>alban</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://alban.apinc.org/blog/2008/04/08/rhythmbox-and-telepathy/</guid>
		<description><![CDATA[There was two Google Summer of Code about music integration in GNOME in 2005:

Gshrooms : Music rooms in Gaim (now Pidgin) with Rhythmbox,
Playlists sharing with DAAP in Rhythmbox.

Vincent has also written a Rhythmbox plugin (proposed for inclusion) to update the status in IM clients (Empathy or Gossip).
What can Telepathy do for music sharing? There is [...]]]></description>
			<content:encoded><![CDATA[<p>There was two Google Summer of Code about <a href="http://www.gnomejournal.org/article/32/gnomes-summer-of-code-participation" title="GNOME Journal: music integration">music integration in GNOME</a> in 2005:</p>
<ul>
<li><a href="http://raphael.slinckx.net/blog/projects/gshrooms" title="Gshrooms: music rooms in Gaim">Gshrooms</a> : Music rooms in <a href="http://www.pidgin.im/" title="Pidgin home page">Gaim (now Pidgin)</a> with <a href="http://www.gnome.org/projects/rhythmbox/" title="Rhythmbox home page">Rhythmbox</a>,</li>
<li>Playlists sharing with <a href="http://daap.sourceforge.net/" title="Digital Audio Access Protocol">DAAP</a> in <a href="http://www.gnome.org/projects/rhythmbox/" title="Rhythmbox home page">Rhythmbox</a>.</li>
</ul>
<p><a href="http://www.vuntz.net/journal/" title="Journal zen, par Vincent">Vincent</a> has also written a <a href="http://www.vuntz.net/projets/rhythmbox/" title="IM status (Rhythmbox plugin)">Rhythmbox plugin</a> (<a href="http://bugzilla.gnome.org/show_bug.cgi?id=526493" title="Bugzilla entry for the IM status plugin">proposed for inclusion</a>) to update the status in IM clients (<a href="http://live.gnome.org/Empathy" title="Empathy home page">Empathy</a> or <a href="http://developer.imendio.com/wiki/Gossip" title="Gossip home page">Gossip</a>).</p>
<p>What can <a href="http://telepathy.freedesktop.org/" title="Telepathy home page">Telepathy</a> do for music sharing? There is a limitation in the DAAP Rhythmbox&#8217; plugin: you can share your music with people on your local network or if you know the IP address of your contact. However, users don&#8217;t know what is an IP address and it may not be reacheable if the contact is behind a NAT.</p>
<p>A better interface should just be to select the contact in the contact list and the DAAP protocol is routed to the remote contact through a <a href="http://cass.no-ip.com/~cassidy/blog/index.php/post/2007/06/05/Stream-tubes-a-new-generation-of-tubes" title="Stream tubes on cassidy's blog">Telepathy stream tube</a>. This <a href="http://bugzilla.gnome.org/show_bug.cgi?id=526499" title="Telepathy Rhythmbox plugin in bugzilla">feature request</a> has now a proof-of-concept implementation and you can enjoy the screencasts:</p>
<ul>
<li><a href="http://people.collabora.co.uk/~alban/d/2008/04/rhythmbox-telepathy-export.ogg" title="Screencast: exporting the music">Export the music to your contact</a></li>
<li><a href="http://people.collabora.co.uk/%7Ealban/d/2008/04/rhythmbox-telepathy-import.ogg" title="Screencast: importing the music">The music got imported</a></li>
</ul>
<p>However, the current implementation is not usable: it uses <a href="http://www.xmpp.org/extensions/xep-0047.html" title="In-Band Bytestreams XEP">In-Band Bytestreams (IBB, XEP-0047)</a>. This means that all your Ogg Vorbis files go through the Jabber server in XML, encoded in base64. Even if it was not too slow, it would abuse the public Jabber servers.</p>
<p>Let&#8217;s hope Telepathy will support real P2P stream tubes soon!</p>
]]></content:encoded>
			<wfw:commentRss>http://alban.apinc.org/blog/2008/04/08/rhythmbox-and-telepathy/feed/</wfw:commentRss>
<enclosure url="http://people.collabora.co.uk/~alban/d/2008/04/rhythmbox-telepathy-export.ogg" length="354685" type="audio/ogg" />
<enclosure url="http://people.collabora.co.uk/%7Ealban/d/2008/04/rhythmbox-telepathy-import.ogg" length="397862" type="audio/ogg" />
		</item>
		<item>
		<title>How to make a D-Bus diagram with DBusMessagesBox.py</title>
		<link>http://alban.apinc.org/blog/2008/03/29/how-to-make-a-d-bus-diagram-with-dbusmessagesboxpy/</link>
		<comments>http://alban.apinc.org/blog/2008/03/29/how-to-make-a-d-bus-diagram-with-dbusmessagesboxpy/#comments</comments>
		<pubDate>Sat, 29 Mar 2008 19:02:21 +0000</pubDate>
		<dc:creator>alban</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://alban.apinc.org/blog/2008/03/29/how-to-make-a-d-bus-diagram-with-dbusmessagesboxpy/</guid>
		<description><![CDATA[I started a page for my DBusMessagesBox.py tool. So now you can generate beautiful D-Bus diagrams like this one:

]]></description>
			<content:encoded><![CDATA[<p>I started a page for my <a href="http://alban.apinc.org/blog/dbusmessagesboxpy/" title="DBusMessagesBox.py home page">DBusMessagesBox.py</a> tool. So now you can generate beautiful D-Bus diagrams like this one:</p>
<p><img src="http://people.collabora.co.uk/~alban/d/2008/03/dbus_rhythmbox.png" alt="D-Bus messages for Rhythmbox" height="270" width="420" /></p>
]]></content:encoded>
			<wfw:commentRss>http://alban.apinc.org/blog/2008/03/29/how-to-make-a-d-bus-diagram-with-dbusmessagesboxpy/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Dependencies in Telepathy</title>
		<link>http://alban.apinc.org/blog/2008/03/22/dependencies-in-telepathy/</link>
		<comments>http://alban.apinc.org/blog/2008/03/22/dependencies-in-telepathy/#comments</comments>
		<pubDate>Sat, 22 Mar 2008 19:49:08 +0000</pubDate>
		<dc:creator>alban</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://alban.apinc.org/blog/2008/03/22/dependencies-in-telepathy/</guid>
		<description><![CDATA[The Telepathy framework has a lot of components. It may be hard to understand the dependencies. I discovered Debtree and used it to generate dependency graphs:

More graphs
The command line was:
debtree -r --condense --no-conflicts --no-recommends --no-alternatives --no-provides empathy &#62; empathy.dot
dot -Tpng -o empathy.png empathy.dot
With this configuration: ~/.debtree/skiplist ~/.debtree/endlist
]]></description>
			<content:encoded><![CDATA[<p>The <a href="http://telepathy.freedesktop.org">Telepathy</a> framework has a lot of <a href="http://telepathy.freedesktop.org/wiki/Components">components</a>. It may be hard to understand the dependencies. I discovered <a href="http://alioth.debian.org/~fjp/debtree/">Debtree</a> and used it to generate dependency graphs:</p>
<p><img src="http://people.collabora.co.uk/~alban/docs/debtree/empathy-run.png" alt="Telepathy dependencies " height="459" width="604" /></p>
<p><a href="http://people.collabora.co.uk/~alban/docs/debtree/">More graphs</a></p>
<p>The command line was:</p>
<p><code>debtree -r --condense --no-conflicts --no-recommends --no-alternatives --no-provides empathy &gt; empathy.dot<br />
dot -Tpng -o empathy.png empathy.dot</code></p>
<p>With this configuration: <a href="http://people.collabora.co.uk/~alban/docs/debtree/skiplist">~/.debtree/skiplist</a> <a href="http://people.collabora.co.uk/~alban/docs/debtree/endlist">~/.debtree/endlist</a></p>
]]></content:encoded>
			<wfw:commentRss>http://alban.apinc.org/blog/2008/03/22/dependencies-in-telepathy/feed/</wfw:commentRss>
		</item>
		<item>
		<title>How to make a diagram from dbus-monitor logs</title>
		<link>http://alban.apinc.org/blog/2008/03/08/99-how-to-make-a-diagram-from-dbus-monitor-logs/</link>
		<comments>http://alban.apinc.org/blog/2008/03/08/99-how-to-make-a-diagram-from-dbus-monitor-logs/#comments</comments>
		<pubDate>Sat, 08 Mar 2008 18:24:06 +0000</pubDate>
		<dc:creator>alban</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://alban.apinc.org/wp/?p=92</guid>
		<description><![CDATA[&#8220;The dbus-monitor command is used to monitor messages going through a D-Bus message bus&#8221; (manpage). But when there is several connections on the bus and lots of method calls and signals, the output is not easily readable. Sometimes I draw a diagram on a piece of paper: it helps me to understand what happens. But [...]]]></description>
			<content:encoded><![CDATA[<p>&#8220;The dbus-monitor command is used to monitor messages going through a <a href="http://dbus.freedesktop.org/" hreflang="en">D-Bus</a> message bus&#8221; (manpage). But when there is several connections on the bus and lots of method calls and signals, the output is not easily readable. Sometimes I draw a diagram on a piece of paper: it helps me to understand what happens. But it would be better to have diagrams drawn automatically.</p>
<p>This can be achieved with <a href="http://www.mcternan.me.uk/mscgen/" hreflang="en">Mscgen</a> (<a href="http://people.collabora.co.uk/~alban/d/2008/03/mscgen-signal.patch" hreflang="en">patched</a> to draw D-Bus signals) and some scripts. Mscgen is a simple tool to generate diagrams from a simple text file with a simple syntax. Text files can be put in a <a href="http://en.wikipedia.org/wiki/Revision_control" hreflang="en">SCM</a>.</p>
<p>I wrote a python script that listens on the bus and writes the .msc file.</p>
<p>Example with <a href="http://www.sacredchao.net/quodlibet/" hreflang="en">Quod Libet</a>:</p>
<p><img src="http://people.collabora.co.uk/~alban/d/2008/03/quodlibet.png" alt="" /></p>
<p>Example with <a href="http://telepathy.freedesktop.org/" hreflang="en">Telepathy</a>:</p>
<p><img src="http://people.collabora.co.uk/~alban/d/2008/03/RequestTextChannel.png" alt="" /></p>
<p>The <a href="http://people.collabora.co.uk/~alban/d/2008/03/DBusMessagesBox.py" hreflang="en">python script</a> has a DBusMessagesBox object. I can filter D-Bus connection I don&#8217;t want to draw. In this example, I don&#8217;t print messages from or to the script itself. I can filter message from or to the dbus-daemon.</p>
<p>The script choose the right name (&#8221;salut&#8221; instead of &#8220;:1.15&#8243;). Some programs requests several connection names on the session bus. In this case, you can choose the prefered name with the &#8216;prefered_names&#8217; option.</p>
<pre>   #skip_entities = set(<a href="&quot;DBusMessagesBox&quot;, &quot;DBus&quot;">&#8220;DBusMessagesBox&#8221;, &#8220;DBus&#8221;</a>)    skip_entities = set(<a href="&quot;DBusMessagesBox&quot;">&#8220;DBusMessagesBox&#8221;</a>)    options = { &#8217;skip_entities&#8217; : skip_entities, \                &#8216;prefered_names&#8217; : <a href="&#039;gabble&#039;, &#039;salut&#039;, &#039;ChatFilter&#039;">&#8216;gabble&#8217;, &#8217;salut&#8217;, &#8216;ChatFilter&#8217;</a> }</pre>
<pre>   box = DBusMessagesBox(options)    box.start_recording()    try:        gtk.main()    except:        print</pre>
<pre>   box.stop_recording()</pre>
<pre>   box.parse("/tmp/file.msc")    os.system("mscgen -T png -i /tmp/file.msc -o /tmp/file.png")</pre>
]]></content:encoded>
			<wfw:commentRss>http://alban.apinc.org/blog/2008/03/08/99-how-to-make-a-diagram-from-dbus-monitor-logs/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Comment tricher sur Gtetrinet, et comment empêcher l&#8217;adversaire de tricher</title>
		<link>http://alban.apinc.org/blog/2008/01/13/98-comment-tricher-sur-gtetrinet-et-comment-empecher-l-adversaire-de-tricher/</link>
		<comments>http://alban.apinc.org/blog/2008/01/13/98-comment-tricher-sur-gtetrinet-et-comment-empecher-l-adversaire-de-tricher/#comments</comments>
		<pubDate>Sun, 13 Jan 2008 02:17:44 +0000</pubDate>
		<dc:creator>alban</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://alban.apinc.org/wp/?p=91</guid>
		<description><![CDATA[Tetris est un «jeu vidéo de puzzle alliant simplicité, intelligence et adresse» d&#8217;après Wikipédia. GTetrinet permet d&#8217;y jouer à plusieurs. On peut gagner des bonus et des malus en faisant des lignes, puis envoyer les malus aux adversaires.
Mais GTetrinet est aussi un jeu de hasard. Le jeu choisit aléatoirement les pièces et les bonus-malus. Et [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://fr.wikipedia.org/wiki/Tetris" hreflang="fr">Tetris</a> est un «jeu vidéo de puzzle alliant simplicité, intelligence et adresse» d&#8217;après Wikipédia. GTetrinet permet d&#8217;y jouer à plusieurs. On peut gagner des bonus et des malus en faisant des lignes, puis envoyer les malus aux adversaires.</p>
<p>Mais GTetrinet est aussi un jeu de hasard. Le jeu choisit aléatoirement les pièces et les bonus-malus. Et le hasard se manipule, surtout sur un jeu avec une <a href="http://fr.wikipedia.org/wiki/Client-serveur" hreflang="fr">architecture client-serveur</a> où les lancés de dés se font sur le client. Certains n&#8217;hésitent pas à écrire un patch pour pouvoir choisir eux-mêmes leurs bonus-malus au lieu de faire confiance au destin (j&#8217;ai hésité à mettre le lien vers le patch en question, mais finalement je ne le mets pas!).</p>
<p>Pour se protéger contre cela, on pourrait choisir aléatoirement les pièces et les bonus-malus sur le serveur. Car à priori, on fait plus confiance au serveur qu&#8217;aux clients, non? Dans le cas de Gtetrinet, cela impose de changer le protocole client-serveur, et donc de briser la compatibilité avec les autres clients existants sous Windows.</p>
<p>Et si on n&#8217;a pas confiance au serveur non plus, on fait quoi? Y a-t-il une solution si les deux clients communiquent directement entre eux sans passer par un tiers de confiance? C&#8217;est le même problème que jouer à pile ou face par téléphone. Il existe des solutions en utilisant un peu de cryptographie. Bruce Schneier reprend dans <em>Cryptographie Appliquée</em> (ISBN-10: 2841800369) une petite histoire de <em>Uses of Randomness in Algorithms and Protocols</em> de Joe Killian (ISBN-10: 0262111535):</p>
<blockquote><p>Alice: Premièrement, tu penses à un bit aléatoire, ensuite je pense à un bit aléatoire. Ensuite, on prend le ou exclusif des deux bits.</p>
</blockquote>
<blockquote><p>Bernard: Mais que se passe-t-il si l&#8217;un de nous ne choisit pas aléatoirement?</p>
</blockquote>
<blockquote><p>Alice: Peu importe. Aussi longtemps que l&#8217;un des deux bits est vraiment aléatoire, le ou exclusif des deux bits doit être aléatoire.</p>
</blockquote>
<blockquote><p>Bernard: Ok, je parie sur 1. Mon bit aléatoire est 1. Et le tien?</p>
</blockquote>
<blockquote><p>Alice: Mon bit aléatoire est aussi 1. Le ou exclusif fait donc 0. Tu as perdu.</p>
</blockquote>
<p>Ce protocole ne marche pas car Alice peut changer son bit si le choix de Bernard ne lui convient pas. Il faut modifier légèrement ce protocole pour mettre en gage un bit aléatoire en utilisant une fonction de hachage.</p>
<p>Il y a 9 bonus-malus différents dans GTetrinet. Pour choisir son prochain bonus-malus, Alice va effectuer les opérations suivantes:</p>
<ol>
<li>Alice choisit deux nombres aléatoires quelconques R1 et R2.</li>
<li>Alice choisit son bloc B1 entre 0 et 8 aléatoirement.</li>
<li>Alice envoie HASH(R1, R2, B1) et R1 à Bernard</li>
<li>Bernard envoie un numéro de bloc B2 entre 0 et 8 aléatoirement.</li>
<li>Alice envoie en clair R1, R2, B1 à Bernard</li>
<li>Les deux joueurs calculent le bloc B obtenu par Alice: B = B1 + B2 modulo 9.</li>
</ol>
<p>J&#8217;ai implémenté ce protocole <a href="https://trac.luon.net/ruby-dbus/" hreflang="en">en Ruby avec D-Bus</a>: <a href="http://dede.muadda.org/~alban/d/2008/01/random_client.rb">random_client.rb</a> (pour Alice) et <a href="http://dede.muadda.org/~alban/d/2008/01/random_server.rb">random_server.rb</a> (pour Bernard). Les deux programmes doivent s&#8217;exécuter sur le même ordinateur sur la même session D-Bus pour communiquer, mais avec les <a href="http://telepathy.freedesktop.org/spec.html#org.freedesktop.Telepathy.Channel.Type.Tubes" hreflang="en">tubes D-Bus</a> de <a href="http://telepathy.freedesktop.org/" hreflang="en">Telepathy</a>, ça devrait pouvoir s&#8217;arranger.</p>
]]></content:encoded>
			<wfw:commentRss>http://alban.apinc.org/blog/2008/01/13/98-comment-tricher-sur-gtetrinet-et-comment-empecher-l-adversaire-de-tricher/feed/</wfw:commentRss>
		</item>
		<item>
		<title>GTetrinet video with Telepathy and tubes</title>
		<link>http://alban.apinc.org/blog/2007/10/24/97-gtetrinet-video-with-telepathy-and-tubes/</link>
		<comments>http://alban.apinc.org/blog/2007/10/24/97-gtetrinet-video-with-telepathy-and-tubes/#comments</comments>
		<pubDate>Wed, 24 Oct 2007 22:22:24 +0000</pubDate>
		<dc:creator>alban</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://alban.apinc.org/wp/?p=90</guid>
		<description><![CDATA[Last week, Guillaume and I played for the first time GTetrinet with Telepathy&#8217;s stream tube support. You can see the two screencasts on Guillaume&#8217;s post &#8221;GTetrinet through tubes&#8221;.

This user interface lets you choose the contact to play with and the game settings in the same window. Once chosen, you cannot add additional players. I propose [...]]]></description>
			<content:encoded><![CDATA[<p>Last week, <a href="http://cass.no-ip.com/~cassidy/blog/index.php/">Guillaume</a> and I played for the first time <a href="http://gtetrinet.sourceforge.net/">GTetrinet</a> with <a href="http://telepathy.freedesktop.org/wiki/">Telepathy</a>&#8217;s stream tube support. You can see the two screencasts on <a href="http://cass.no-ip.com/~cassidy/blog/index.php/post/2007/10/21/GTetrinet-through-tubes" hreflang="en">Guillaume&#8217;s post &#8221;GTetrinet through tubes&#8221;</a>.</p>
<p><a href="http://cass.no-ip.com/~cassidy/blog/index.php/post/2007/10/21/GTetrinet-through-tubes"><img src="http://projects.collabora.co.uk/~cassidy/gtetrinet-tubes-initiate.jpg" alt="" /></a></p>
<p>This user interface lets you choose the contact to play with and the game settings in the same window. Once chosen, you cannot add additional players. I propose an alternative user interface: you first choose the game settings in the connection window, and then you add your contacts in the party from the main window. You can see the <a href="http://dede.muadda.org/~alban/d/2007/10/gtetrinet_telepathy_multiplayer.ogm">screencast</a>!</p>
<p><a href="http://dede.muadda.org/~alban/d/2007/10/gtetrinet_telepathy_multiplayer.ogm"><img src="http://dede.muadda.org/~alban/d/2007/10/gtetrinet_multiplayer.png" alt="" /></a></p>
<p>And maybe I will have some time to clean up the <a href="http://dede.muadda.org/~alban/d/2007/10/gtetrinet_telepathy-v15.patch">GTetrinet patch</a> I used to create the screencast.</p>
]]></content:encoded>
			<wfw:commentRss>http://alban.apinc.org/blog/2007/10/24/97-gtetrinet-video-with-telepathy-and-tubes/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
