<?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>Thu, 15 May 2008 15:48:33 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.3.3</generator>
	<language>en</language>
			<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>admin</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>
		<item>
		<title>Communiqué de presse du ministère de la culture du vendredi 12 octobre 2007</title>
		<link>http://alban.apinc.org/blog/2007/10/13/96-communique-de-presse-du-ministere-de-la-culture-du-vendredi-12-octobre-2007/</link>
		<comments>http://alban.apinc.org/blog/2007/10/13/96-communique-de-presse-du-ministere-de-la-culture-du-vendredi-12-octobre-2007/#comments</comments>
		<pubDate>Sat, 13 Oct 2007 17:46:07 +0000</pubDate>
		<dc:creator>alban</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://alban.apinc.org/wp/?p=89</guid>
		<description><![CDATA[Ce billet est une parodie du communiqué de presse du ministère de la culture du vendredi 12 octobre 2007. J&#8217;ai trouvé l&#8217;information via l&#8217;article de Ratiatum.
Christine Albanel demande à Chronopost International de lutter plus activement contre le piratage
 vendredi 12 octobre 2007
 Christine Albanel, ministre de la Culture et de la Communication, s&#8217;est entretenue jeudi [...]]]></description>
			<content:encoded><![CDATA[<p>Ce billet est une parodie du <a href="http://www.culture.gouv.fr/culture/actualites/communiq/albanel/free07.html" hreflang="fr">communiqué de presse du ministère de la culture du vendredi 12 octobre 2007</a>. J&#8217;ai trouvé l&#8217;information via <a href="http://www.ratiatum.com/news5827_Albanel_fait_du_chantage_a_Free_les_lobbys_approuvent.html" hreflang="fr">l&#8217;article de Ratiatum</a>.</p>
<blockquote><p>Christine Albanel demande à Chronopost International de lutter plus activement contre le piratage</p>
<p> vendredi 12 octobre 2007</p>
<p> Christine Albanel, ministre de la Culture et de la Communication, s&#8217;est entretenue jeudi 11 octobre 2007 avec le directeur général du leader français de courrier express Chronopost International, filiale de GeoPost (groupe La Poste). La Ministre a rappelé son attachement inconditionnel au respect des droits d&#8217;auteurs et de l&#8217;intégrité des oeuvres, et son engagement dans la lutte contre le piratage. A ce titre, elle a manifesté sa réticence face aux nouvelles caractéristiques du service d&#8217;envoi de colis de Chronopost International, Chrono 8.</p>
<p> Depuis quelques jours, une évolution du service d&#8217;envoi de courriers Chrono 10 permet de transporter des colis beaucoup plus volumineux (pouvant contenir jusqu&#8217;à 50 DVD), tout en réduisant la durée du transport d&#8217;un colis pour être livré le matin à huit heure (Chrono <img src='http://alban.apinc.org/blog/wp-includes/images/smilies/icon_cool.gif' alt='8)' class='wp-smiley' /> au lieu de dix heure. La Ministre a fait remarquer que, même si tel n&#8217;est pas l&#8217;objet du service conçu par Chronopost International, il permet aux clients du groupe d&#8217;envoyer anonymement et massivement des contenus pirates sur Chrono 8.</p>
<p> Christine Albanel a demandé au directeur du groupe que la maîtrise technique incontestée de Chronopost International <strong>soit mise à profit pour faire respecter la loi, et a demandé la restriction effective de l&#8217;accès à ce service à des communautés fermées, voire sa suppression pure et simple.</strong></p>
<p> La Ministre a rappelé la décision de justice qui a contraint Chronopost International à supprimer le transport de courriers contenant manifestement des contenus douteux, vecteurs de piratage massif, et a exprimé son soutien aux associations de défense des droits d&#8217;auteurs qui ont manifesté leur désapprobation.</p>
<p> Si les mesures élémentaires de protection ne sont pas prises alors ces services sont des instruments mis gracieusement à la disposition des pirates payant un abonnement Chrono 8. La Ministre considère que l&#8217;engagement tangible de Chronopost International dans la lutte contre le piratage est <strong>un prérequis essentiel à l&#8217;examen de leur dossier d&#8217;attribution</strong> du marché public d&#8217;échange de courriers rapides entre les ministères.</p>
</p>
</blockquote>
<p>J&#8217;ai fait quelques modifications au communiqué d&#8217;origine, dont:</p>
<ul>
<li>Free -&gt; Chronopost International</li>
<li>dl.free.fr -&gt; Chrono 8</li>
<li>licence de téléphonie 3G -&gt; marché public d&#8217;échange de courriers rapides entre les ministères</li>
</ul>
<p>J&#8217;ai ajouté du gras sur deux parties importantes, mais le texte en gras n&#8217;a pas été modifié. Ainsi, la ministre demande à Free la restriction de ce service à des <em>communautés fermées, voire sa suppression pure et simple</em>. Pour faire passer sa demande, une petite phrase qui ressemble fort à du chantage sur <a href="http://fr.wikipedia.org/wiki/3G">l&#8217;attribution de la licence de téléphonie 3G</a>.</p>
<p>Sur le fond, j&#8217;ai déjà utilisé il y a quelques mois le service dl.free.fr pour envoyer des données privées (photos de vacances et autres documents). Ca évite de trop charger les boites à lettres électroniques. Il est possible de protéger les données par un mot de passe. Et c&#8217;est vrai que c&#8217;était lent. Si c&#8217;est plus rapide, tant mieux!</p>
]]></content:encoded>
			<wfw:commentRss>http://alban.apinc.org/blog/2007/10/13/96-communique-de-presse-du-ministere-de-la-culture-du-vendredi-12-octobre-2007/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Gtetrinet sur Telepathy</title>
		<link>http://alban.apinc.org/blog/2007/10/07/95-gtetrinet-sur-telepathy/</link>
		<comments>http://alban.apinc.org/blog/2007/10/07/95-gtetrinet-sur-telepathy/#comments</comments>
		<pubDate>Sun, 07 Oct 2007 21:00:56 +0000</pubDate>
		<dc:creator>alban</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://alban.apinc.org/wp/?p=88</guid>
		<description><![CDATA[Gtetrinet devrait bientôt pouvoir utiliser Telepathy! Mais de quoi s&#8217;agit-il?
Actuellement, chaque joueur voulant jouer ensemble doit se connecter à un même serveur de jeu. Les connexions se font selon le modèle client-serveur:

Si les joueurs discutent déjà entre eux en utilisant la messagerie instantanée, il serait plus simple de lancer la partie en sélectionnant ses adversaires [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://gtetrinet.sourceforge.net/">Gtetrinet</a> devrait bientôt pouvoir utiliser <a href="http://telepathy.freedesktop.org/">Telepathy</a>! Mais de quoi s&#8217;agit-il?</p>
<p>Actuellement, chaque joueur voulant jouer ensemble doit se connecter à un même serveur de jeu. Les connexions se font selon le <a href="http://fr.wikipedia.org/wiki/Client-serveur">modèle client-serveur</a>:</p>
<p><img src="http://alban.apinc.org/files/gtetrinet/gtetrinet1_small.png" alt="" /></p>
<p>Si les joueurs discutent déjà entre eux en utilisant la messagerie instantanée, il serait plus simple de lancer la partie en sélectionnant ses adversaires directement depuis le logiciel de messagerie instantanée. Ou alors de voir la liste de ses contacts dans Gtetrinet et les sélectionner directement sans passer par l&#8217;étape du choix du serveur.</p>
<p><img src="http://alban.apinc.org/files/gtetrinet/gtetrinet_with_telepathy.png" alt="" /></p>
<p>Les tubes de Telepathy permettent de faire communiquer arbitrairement n&#8217;importe quelle application (Gtetrinet, par exemple) par la messagerie instantanée. Le schéma suivant montre les connexions après que le joueur 1 ait proposé au joueur 2 une partie. Le joueur 1 a sélectionné directement depuis Gtetrinet le joueur 2. Gtetrinet 1 propose alors un tube au joueur 2. Gtetrinet 2 l&#8217;accepte et se connecte à Gtetrinet 1.</p>
<p><img src="http://alban.apinc.org/files/gtetrinet/gtetrinet2_small.png" alt="" /></p>
<p>Il est possible d&#8217;implémenter les tubes sur différents protocoles de messagerie instantanée. Avec Jabber, le message envoyé par le joueur 1 au joueur 2 ressemble à celui-là:</p>
<pre>&lt;message from="player1@localhost/Telepathy" id="540813737502" to="player2@localhost" &gt;   &lt;tube xmlns="http://telepathy.freedesktop.org/xmpp/tubes"         service="tetrinet-x"         type="stream"         id="1506758346" &gt;     &lt;parameters&gt;       &lt;parameter type="str" name="login" &gt;foobar&lt;/parameter&gt;     &lt;/parameters&gt;   &lt;/tube&gt;   &lt;amp xmlns="http://jabber.org/protocol/amp"&gt;     &lt;rule action="error" value="stored" condition="deliver-at" /&gt;     &lt;rule action="error" value="exact" condition="match-resource" /&gt;   &lt;/amp&gt; &lt;/message&gt;</pre>
<p><a href="http://projects.collabora.co.uk/~smcv/tubes.html">Tubes over XMPP</a></p>
<p>Le nom du service (&#8221;tetrinet-x&#8221;) permet de connaître l&#8217;application qui va gérer ce message lorsqu&#8217;il arrivera sur l&#8217;ordinateur du joueur 2. La bonne application pourrait être lancé automatiquement (après acceptation de l&#8217;utilisateur).</p>
<p>Pour éviter de faire trop de modifications dans Gtetrinet, le plus simple est d&#8217;utiliser les stream tubes  au lieu des D-Bus tubes: cela évite de refaire le protocole de communication de Gtetrinet en D-Bus. Les stream tubes permettent d&#8217;encapsuler une socket dans un tube. Cela est rendu possible récemment par le <a href="http://cass.no-ip.com/~cassidy/blog/index.php/post/2007/10/06/Inet-socket-support-in-stream-tubes">travail de Cassidy</a>.</p>
<p>Pour faire un prototype rapide, Cassidy a écrit un patch qui évite de changer de protocole: on conserve le serveur qui tourne sur l&#8217;ordinateur du joueur qui initie la connexion. Lorsque le joueur 1 sélectionne le joueur avec qui il veut jouer dans sa liste des contacts, Gtetrinet lance le serveur et configure le tube pour rediriger la connexion du joueur 2 sur le serveur. Ainsi, aucune modification du serveur n&#8217;est nécessaire.</p>
<p><img src="http://alban.apinc.org/files/gtetrinet/gtetrinet3_small.png" alt="" /></p>
<p>Actuellement, la configuration du tube marche, mais le Gtetrinet du joueur 2 n&#8217;est pas encore capable de l&#8217;accepter. Ca devrait bientôt arriver!</p>
]]></content:encoded>
			<wfw:commentRss>http://alban.apinc.org/blog/2007/10/07/95-gtetrinet-sur-telepathy/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Wiki, Google Docs et Abiword</title>
		<link>http://alban.apinc.org/blog/2007/09/25/93-wiki-google-docs-et-abiword/</link>
		<comments>http://alban.apinc.org/blog/2007/09/25/93-wiki-google-docs-et-abiword/#comments</comments>
		<pubDate>Tue, 25 Sep 2007 21:50:13 +0000</pubDate>
		<dc:creator>alban</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://alban.apinc.org/wp/?p=86</guid>
		<description><![CDATA[Je viens de voir une publicité vidéo pour Google Docs vraiment bien faite depuis le blog d&#8217;Olivier. Google Docs répond à un vrai besoin: écrire un document à plusieurs. Voici comment je résume la situation:

Les logiciels de bureautique lourds comme OpenOffice.org, KOffice ou GNOME-Office. Beaucoup de fonctionnalités mais très difficile de synchroniser les documents par [...]]]></description>
			<content:encoded><![CDATA[<p>Je viens de voir une <a href="http://www.youtube.com/watch?v=eRqUE6IHTEA">publicité vidéo pour Google Docs</a> vraiment bien faite depuis le <a href="http://www.lespacedunmatin.info/blog/index.php?2007/09/25/833-partager-un-document-avec-internet" hreflang="fr">blog d&#8217;Olivier</a>. Google Docs répond à un vrai besoin: écrire un document à plusieurs. Voici comment je résume la situation:</p>
<ol>
<li>Les logiciels de bureautique lourds comme <a href="http://fr.openoffice.org/" hreflang="fr">OpenOffice.org</a>, <a href="http://www.koffice.org/">KOffice</a> ou <a href="http://www.gnome.org/gnome-office/">GNOME-Office</a>. Beaucoup de fonctionnalités mais très difficile de synchroniser les documents par email.</li>
<li>Les <a href="http://fr.wikipedia.org/wiki/Wiki" hreflang="fr">wikis</a>. Plus facile à synchroniser puisqu&#8217;il n&#8217;y a qu&#8217;une seule version: celle du serveur. Mais on perd beaucoup en fonctionnalités.</li>
<li><a href="http://docs.google.com/">Google Docs</a>. Il tente d&#8217;assembler les avantages des logiciels de bureautique lourds et des wiki. La <a href="http://www.youtube.com/watch?v=eRqUE6IHTEA">vidéo</a> montre très bien les avantages. Ca supporte le <a href="http://fr.wikipedia.org/wiki/OpenDocument" hreflang="fr">OpenDocument</a>, et il y a pas mal de fonctionnalités, même si ça reste du web. Mais c&#8217;est centralisé chez Google et ce n&#8217;est pas du Logiciel Libre.</li>
<li>Imaginons une autre solution avec seulement les avantages!</li>
</ol>
<p>Regardez du côté d&#8217;<a href="http://www.abisource.com/twiki/bin/view/Abiword/AbiCollab">AbiCollab</a>. C&#8217;est un plugin pour Abiword permettant d&#8217;éditer à plusieurs un document en temps réel, à l&#8217;aide de Jabber. J&#8217;ai fait une <a href="http://alban.apinc.org/blog/index.php/2007/09/21/91-presentation-de-jabber-et-telepathy-avec-toulibre-2" hreflang="fr">démo d&#8217;AbiCollab pour Toulibre</a>:</p>
<p><img src="http://alban.apinc.org/files/toulibre/20070917-Jabber/html/img21.png" alt="" /></p>
<p>Pour résumer, il faut configurer son compte Jabber dans Abiword (plus tard, Abiword devrait pouvoir utiliser Telepathy pour réutiliser la connexion Jabber du bureau et ne plus demander à l&#8217;utilisateur les détails inintéressants comme le login et mot de passe). Puis cliquer sur &#8220;Partager le document&#8221; dans le menu &#8220;Collaborer&#8221;. Ensuite, vos contacts peuvent voir votre document en cliquant sur &#8220;Documents disponibles&#8221;, toujours dans le menu &#8220;Collaborer&#8221;. C&#8217;est tout! Vous voyez votre curseur mais aussi celui de vos contacts, et vous voyez leurs modifications aussi rapidement que le permet votre réseau.</p>
<p>Cela pose bien quelques problèmes techniques mais <a href="http://www.abisource.com/twiki/bin/view/Abiword/AbiCollab">AbiCollab</a> explique comment ils sont résolus (enfin, c&#8217;est encore très instable).</p>
<p>Ce que je voudrais pour la suite, c&#8217;est que d&#8217;autres logiciels de bureautique utilisent la messagerie instantanée pour permettre l&#8217;édition collaborative. Il faut aussi qu&#8217;ils utilisent Telepathy et les tubes pour éviter à l&#8217;utilisateur de configurer sa messagerie instantanée dans chaque logiciel, pour partager la connexion au serveur de messagerie instantanée, et pour pouvoir utiliser plusieurs messageries instantanées différentes (Jabber pour Internet, Bonjour pour le réseau local). Il faudrait aussi standardiser le protocole de synchronisation pour que plusieurs logiciels utilisant OpenDocument puissent collaborer ensemble. Enfin, il faudrait que cela marche même quand l&#8217;initiateur du document coupe sa connexion Internet en utilisant la <del><a href="http://www.xmpp.org/extensions/xep-0049.html">XEP-0049</a></del> <a href="http://www.xmpp.org/extensions/xep-0223.html">XEP-0223</a> par exemple.</p>
<p>Oui, ça fait beaucoup de travail. Mais on a le droit de rêver, non?</p>
]]></content:encoded>
			<wfw:commentRss>http://alban.apinc.org/blog/2007/09/25/93-wiki-google-docs-et-abiword/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
