<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:gml="http://www.opengis.net/gml"
>

<channel>
	<title>xyzzy xyzzy... &#187; research</title>
	<atom:link href="http://xyzzyxyzzy.net/topics/research/feed/" rel="self" type="application/rss+xml" />
	<link>http://xyzzyxyzzy.net</link>
	<description>...you are in a grid of twisty, little links, all alike. there's a teleport gate here.</description>
	<lastBuildDate>Thu, 19 Jan 2012 10:09:08 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>21</title>
		<link>http://xyzzyxyzzy.net/2009/06/19/21/</link>
		<comments>http://xyzzyxyzzy.net/2009/06/19/21/#comments</comments>
		<pubDate>Fri, 19 Jun 2009 18:33:18 +0000</pubDate>
		<dc:creator>dirk husemann</dc:creator>
				<category><![CDATA[from the grid]]></category>
		<category><![CDATA[research]]></category>
		<category><![CDATA[opensim]]></category>
		<category><![CDATA[stress test]]></category>

		<guid isPermaLink="false">http://xyzzyxyzzy.net/?p=334</guid>
		<description><![CDATA[after our intoxicating stress test ten days ago we repeated the stress test today with a group of volunteers &#8212; thus, real SL clients instead of bots. the result: 21. somewhere around the 21 avatar mark we are got stuck and the (single) region standalone system started becoming very laggy: avatars could not move anymore [...]]]></description>
			<content:encoded><![CDATA[<p>after our <a href="/2009/06/09/81/">intoxicating stress test ten days ago</a> we repeated the stress test today with a group of volunteers &#8212; thus, real SL clients instead of bots.</p>

<p>the result: <strong>21</strong>. <img src='http://xyzzyxyzzy.net/wp-includes/images/smilies/icon_sad.gif' alt=':-(' class='wp-smiley' /> </p>

<p>somewhere around the 21 avatar mark we are got stuck and the (single) region standalone system started becoming <em>very</em> laggy: avatars could not move anymore (or erratically at best), chat got relayed occasionally. interestingly enough we still saw new users logging in. looking at OpenSim&#8217;s log we saw that OpenSim was busy processing new user requests &#8212; a lot of new user requests.</p>

<p>so, the current hypothesis is that new users clog the out-pipe with large amount of texture requests, causing the existing users to starve and the system becoming unresponsive.</p>
]]></content:encoded>
			<wfw:commentRss>http://xyzzyxyzzy.net/2009/06/19/21/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		<georss:point featurename="[47.131074826701266, 8.747992515563965]">47.131074826701266 8.747992515563965</georss:point>
	</item>
		<item>
		<title>the mystery of the blank opengl window on screen 2</title>
		<link>http://xyzzyxyzzy.net/2009/01/08/the-mystery-of-the-blank-opengl-window-on-screen-2/</link>
		<comments>http://xyzzyxyzzy.net/2009/01/08/the-mystery-of-the-blank-opengl-window-on-screen-2/#comments</comments>
		<pubDate>Thu, 08 Jan 2009 18:01:15 +0000</pubDate>
		<dc:creator>dirk husemann</dc:creator>
				<category><![CDATA[hacking]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[research]]></category>
		<category><![CDATA[glxgears]]></category>
		<category><![CDATA[hardy]]></category>
		<category><![CDATA[kubuntu]]></category>
		<category><![CDATA[opengl]]></category>
		<category><![CDATA[second display]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://xyzzyxyzzy.net/?p=240</guid>
		<description><![CDATA[the x200 i&#8217;m using has enough omph to power OpenGL on both the builtin display and the 1600&#215;1200 external display. unfortunately whenever i moved that glxgears window on to the second screen it would just show&#8230;nothing. googling around for that showed that a number of people had the same problem but nobody had found a [...]]]></description>
			<content:encoded><![CDATA[<p>the <a href="http://www.thinkwiki.org/wiki/Category:X200">x200</a> i&#8217;m using has enough omph to power OpenGL on both the builtin display <strong>and</strong> the 1600&#215;1200 external display. unfortunately whenever i moved that <code>glxgears</code> window on to the second screen it would just show&#8230;nothing. googling around for that showed that a number of people had the same problem but nobody had found a solution.</p>

<p>repeated staring at the <code>intel(4)</code> man pages resulted in the hunch to try and switch from EXA acceleration to XAA acceleration</p>

<pre><code>Section "Device"
Identifier      "intel"
Driver          "intel"

Option          "monitor-VGA" "VGA"
Option          "monitor-LVDS" "LVDS"

Option          "AccelMethod" "XAA"
EndSection
</code></pre>

<p>an X server restart later, and, voilá!, <code>glxgears</code> shows its gears on
screen 2. problem solved.</p>
]]></content:encoded>
			<wfw:commentRss>http://xyzzyxyzzy.net/2009/01/08/the-mystery-of-the-blank-opengl-window-on-screen-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<georss:point featurename="[47.308883299155255, 8.544209003448486]">47.308883299155255 8.544209003448486</georss:point>
	</item>
		<item>
		<title>installing OpenSim on PowerPC&#8230;or: of eggs and virtual worlds</title>
		<link>http://xyzzyxyzzy.net/2008/02/12/installing-opensim-on-powerpcor-of-eggs-and-virtual-worlds/</link>
		<comments>http://xyzzyxyzzy.net/2008/02/12/installing-opensim-on-powerpcor-of-eggs-and-virtual-worlds/#comments</comments>
		<pubDate>Tue, 12 Feb 2008 19:36:53 +0000</pubDate>
		<dc:creator>dirk husemann</dc:creator>
				<category><![CDATA[from the grid]]></category>
		<category><![CDATA[hacking]]></category>
		<category><![CDATA[research]]></category>
		<category><![CDATA[big endian]]></category>
		<category><![CDATA[eggs]]></category>
		<category><![CDATA[intel x86]]></category>
		<category><![CDATA[jonathan swift]]></category>
		<category><![CDATA[libsecondlife]]></category>
		<category><![CDATA[lilliput]]></category>
		<category><![CDATA[opensim]]></category>
		<category><![CDATA[powerpc]]></category>
		<category><![CDATA[ppc]]></category>
		<category><![CDATA[virtual worlds]]></category>

		<guid isPermaLink="false">http://xyzzyxyzzy.net/2008/02/12/installing-opensim-on-powerpcor-of-eggs-and-virtual-worlds/</guid>
		<description><![CDATA[we noticed last week (well, actually a bit longer than that) that OpenSim would not really care to run on PowerPC platforms. the symptoms were that (a) it would die with an array index exception on restart, and (b) the SL client would crash horribly when connecting to the region before the restart with most [...]]]></description>
			<content:encoded><![CDATA[<p>we noticed last week (well, actually a bit longer than that) that OpenSim would not really care to run on PowerPC platforms. the symptoms were that (a) it would die with an array index exception on restart, and (b) the SL client would crash horribly when connecting to the region before the restart <img src='http://xyzzyxyzzy.net/wp-includes/images/smilies/icon_sad.gif' alt=':-(' class='wp-smiley' />  with most of the development going on on intel boxes, suspecting endian issues was not really rocket-science.</p>

<p><strong>short detour:</strong> when we talk of &#8220;endian issues&#8221; we refer to the way a CPU organizes data internally. to quote <a href="http://en.wikipedia.org/wiki/Endianness">wikipedia:</a></p>

<blockquote>
  <p><em>endianness is the byte (and sometimes bit) ordering used to represent some kind of data. Typical cases are the order in which integer values are stored as bytes in computer memory (relative to a given memory addressing scheme) and the transmission order over a network or other medium. When specifically talking about bytes, endianness is also referred to simply as byte order.</em></p>
</blockquote>

<p>the terms <em>big endian</em> and <em>little endian</em> are much older than computers, much older. they <a href="http://en.wikipedia.org/wiki/Endianness#Discussion.2C_background.2C_etymology">originate with the inhabitants of jonathan swift&#8217;s Lilliput and Blefuscu</a> and refer to the way they would crack an egg open: big endians started at the big end.</p>

<p>for reasons shrouded in the fogs of history, intel x86 CPUs are little endian, motorola CPU generally are big endian as are PowerPC CPUs.<sup id="fnref:1"><a href="#fn:1" rel="footnote">1</a></sup></p>

<p>anyhow, <strong>to return to our story</strong>, we were suspecting endianess issues with OpenSim &#8212; and the underlying libsecondlife. following up on clues provided by <a href="https://wiki.secondlife.com/wiki/User:Neas_Bade">Neas Bade</a> i started looking at openjpeg-libsl (the native code library responsible for doing most of the JPEG2000 coding). that turned out to be a dead end more or less.</p>

<p>turning my attention to the terrain handling, it transpired that the terrain when generated was looking fine (you can save a generated terrain via OpenSim&#8217;s region console &#8212; which i did and then examined it using [the gimp][]). loading it back in from the data stores (OpenSim supports a number of data storage adapters) however, returned a corrupted terrain image. that lead to fix #1: serialization of the terrain in the SQLite and MySQL data storage adapters was fine, but reification was borked.<sup id="fnref:2"><a href="#fn:2" rel="footnote">2</a></sup></p>

<p>unfortunately, while OpenSim would now restart fine, we still could not connect as the client would barf violently on the terrain data OpenSim was handing out <img src='http://xyzzyxyzzy.net/wp-includes/images/smilies/icon_sad.gif' alt=':-(' class='wp-smiley' />  looking at the code in OpenSim that supplied the client with the ill-digested terrain dope it transpired that this time it was libsecondlife that was cracking the eggs open from the little end only. actually, it was doing so in two places: LLUUIDs were not properly serialized and packed bits were completely oblivious of the fact that one could start cracking the eggs open at the big end. bug fixes #2 and #3 (this time to libsecondlife).<sup id="fnref:3"><a href="#fn:3" rel="footnote">3</a></sup><sup id="fnref:4"><a href="#fn:4" rel="footnote">4</a></sup></p>

<p>so, what steps do you need to take to get OpenSim running on PPC? here are the instructions:</p>

<ol>
<li>check out opensim itself: 

<ul>
<li><code>svn co http://opensimulator.org/svn/opensim/trunk opensim</code></li>
<li>build according to instructions

<ul>
<li><code>./runprebuild.sh; nant</code></li>
</ul></li>
</ul></li>
<li>check out opensim-libs: 

<ul>
<li><code>svn co http://opensimulator.org/svn/opensim-libs/libsl1550 opensim-libs</code></li>
<li>build: <code>cd opensim-libs; nant</code></li>
<li>you should end up with a sparkling new libsecondlife.dll in <code>bin</code></li>
<li>copy that one over into the <code>opensim/bin</code> directory.</li>
</ul></li>
<li>enter <code>opensim-libs/openjpeg-libsl</code> and do

<ul>
<li>a <code>make</code>, and then</li>
<li>copy the newly built <code>libopenjpeg-libsl-2.1.2.0.so</code> into <code>opensim/bin</code> as well</li>
</ul></li>
<li>almost there! enter <code>opensim/bin</code> and edit libsecondlife.dll.config and remove the <code>cpu="x86"</code> tag in the last dllmap line, so that it looks like this:</li>
</ol>

<p><source lang=xml>
<configuration>
    <dllmap os="osx" dll="openjpeg-libsl.dll" target="libopenjpeg-libsl-2.1.2.0.dylib" />
    <dllmap os="!windows,osx" cpu="x86-64,ia64" dll="openjpeg-libsl.dll"  
               target="libopenjpeg-libsl-2.1.2.0-x86_64" />
    <dllmap os="!windows,osx" dll="openjpeg-libsl.dll" target="libopenjpeg-libsl-2.1.2.0" />
</configuration>
</source></p>

<p>start OpenSim.exe and enjoy.</p>

<div class="footnotes">
<hr />
<ol>

<li id="fn:1">
<p>&#8230;waiting for the explanations to appear in the comments <img src='http://xyzzyxyzzy.net/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> &#160;<a href="#fnref:1" rev="footnote">&#8617;</a></p>
</li>

<li id="fn:2">
<p>submitted via Neas Bade to OpenSim and in the code base starting with subversion release 3397.&#160;<a href="#fnref:2" rev="footnote">&#8617;</a></p>
</li>

<li id="fn:3">
<p>submitted to libsecondlife by yours truly, still waiting for check-in to libsl&#8217;s subversion repository. also, submitted by Neas Bade into the opensim-libs code base.&#160;<a href="#fnref:3" rev="footnote">&#8617;</a></p>
</li>

<li id="fn:4">
<p>now also in libsl code base (subversion release 1638 for release branch, release 1640 for trunk branch) <img src='http://xyzzyxyzzy.net/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> &#160;<a href="#fnref:4" rev="footnote">&#8617;</a></p>
</li>

</ol>
</div>
]]></content:encoded>
			<wfw:commentRss>http://xyzzyxyzzy.net/2008/02/12/installing-opensim-on-powerpcor-of-eggs-and-virtual-worlds/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
		<item>
		<title>getting php markdown &amp; SyntaxHighlighter to coexist&#8230;</title>
		<link>http://xyzzyxyzzy.net/2008/01/03/getting-php-markdown-syntaxhighlighter-to-coexist/</link>
		<comments>http://xyzzyxyzzy.net/2008/01/03/getting-php-markdown-syntaxhighlighter-to-coexist/#comments</comments>
		<pubDate>Thu, 03 Jan 2008 15:20:46 +0000</pubDate>
		<dc:creator>dirk husemann</dc:creator>
				<category><![CDATA[hacking]]></category>
		<category><![CDATA[research]]></category>
		<category><![CDATA[markdown extra]]></category>
		<category><![CDATA[SyntaxHighlighter]]></category>
		<category><![CDATA[wordpress plugin]]></category>

		<guid isPermaLink="false">http://xyzzyxyzzy.net/2008/01/03/getting-php-markdown-syntaxhighlighter-to-coexist/</guid>
		<description><![CDATA[SyntaxHighlighter is quite a nice wordpress plugin that provides syntax highlighting for a range of programming languages (among them my favorites python &#38; C#). the problem is, in its original unadulterated form it doesn&#8217;t play with my favorite markup plugin [] at all http://michelf.com/projects/php-markdown/ after quite a bit of hacking, it transpires that one can [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://erik.range-it.de/wordpress/plugins/syntaxhighlighter/">SyntaxHighlighter</a> is quite a nice <a href="http://wordpress.org/">wordpress</a> plugin that provides syntax highlighting for a range of programming languages (among them my favorites python &amp; C#). the problem is, in its original unadulterated  form <a href="http://bjhess.com/bjhessblog/2007/08/15/syntax-highlighting-with-wordpress-and-markdown/">it doesn&#8217;t play</a> with my favorite markup plugin <a href="http://michelf.com/projects/php-markdown/">php markdown extra</a> at all <img src='http://xyzzyxyzzy.net/wp-includes/images/smilies/icon_sad.gif' alt=':-(' class='wp-smiley' /> </p>

<p>after quite a bit of hacking, it transpires that one <em>can</em> make them play nicely with one another. the idea that i pursued was to change the  tag to &lt; source lang=XXX> and have php markdown treat it the same as the &lt; pre> tag.<sup id="fnref:1"><a href="#fn:1" rel="footnote">1</a></sup></p>

<p>getting markdown extra to recognize the &lt; source> tag is fairly easy<sup id="fnref:2"><a href="#fn:2" rel="footnote">2</a></sup>, i needed to change
<source lang=php>
    # Tags treated as block tags only if the opening tag is alone on it&#8217;s line:
    var $context_block_tags = &#8216;script|noscript|math|ins|del&#8217;;
</source>
to read
<source lang=php>
    # Tags treated as block tags only if the opening tag is alone on it&#8217;s line:
    var $context_block_tags = &#8216;script|noscript|math|ins|del|source&#8217;;
</source></p>

<p>next, in the syntax plugin, all occurrences of <code>[source:</code> are replaced by <code>&lt; source lang=</code>.</p>

<p>i&#8217;ve created ZIP files of the modified <a href="/wp-content/syntax.zip">SyntaxHighlighter</a> and <a href="/wp-content/markdown-extra.zip">Markdown Extra</a> plugins, share and enjoy.</p>

<div class="footnotes">
<hr />
<ol>

<li id="fn:1">
<p>to prevent any of the parsers from jumping on the tags, i&#8217;ve inserted a space between &#8216;&lt;&#8217; and the tag name.&#160;<a href="#fnref:1" rev="footnote">&#8617;</a></p>
</li>

<li id="fn:2">
<p>&#8230;once you figure it out, that is.&#160;<a href="#fnref:2" rev="footnote">&#8617;</a></p>
</li>

</ol>
</div>
]]></content:encoded>
			<wfw:commentRss>http://xyzzyxyzzy.net/2008/01/03/getting-php-markdown-syntaxhighlighter-to-coexist/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<georss:point featurename="[47.131074826701266, 8.747992515563965]">47.131074826701266 8.747992515563965</georss:point>
	</item>
		<item>
		<title>24C3 howto: fake fingerprints&#8230;</title>
		<link>http://xyzzyxyzzy.net/2007/12/31/24c3-howto-fake-fingerprints/</link>
		<comments>http://xyzzyxyzzy.net/2007/12/31/24c3-howto-fake-fingerprints/#comments</comments>
		<pubDate>Mon, 31 Dec 2007 14:13:51 +0000</pubDate>
		<dc:creator>dirk husemann</dc:creator>
				<category><![CDATA[research]]></category>
		<category><![CDATA[thinking...]]></category>
		<category><![CDATA[void]]></category>
		<category><![CDATA[biometrics]]></category>
		<category><![CDATA[ccc]]></category>
		<category><![CDATA[coke bottle]]></category>
		<category><![CDATA[fingerprint recognition system]]></category>
		<category><![CDATA[fingerprints]]></category>
		<category><![CDATA[hacks]]></category>
		<category><![CDATA[passports]]></category>
		<category><![CDATA[screw top]]></category>
		<category><![CDATA[wood glue]]></category>

		<guid isPermaLink="false">http://xyzzyxyzzy.net/2007/12/31/24c3-howto-fake-fingerprints/</guid>
		<description><![CDATA[while looking at the 24C3 hack list of the currently ongoing 24C3 hack conf, i found this howto detailing the procedure to create fake fingerprints &#8212; all you need are: glass with fingerprint of the person you want to impersonate screw-top of a bottle (like the one from a coke bottle) super-glue wood glue (PVA) [...]]]></description>
			<content:encoded><![CDATA[<p>while looking at the <a href="http://events.ccc.de/congress/2007/Hacks">24C3 hack list</a> of the currently ongoing 24C3 hack conf, i found <a href="http://www.ccc.de/biometrie/fingerabdruck_kopieren">this howto detailing the procedure to create fake fingerprints</a> &#8212; all you need are:</p>

<ul>
<li>glass with fingerprint of the person you want to impersonate</li>
<li>screw-top of a bottle (like the one from a coke bottle)</li>
<li>super-glue</li>
<li>wood glue (PVA)</li>
<li>skin friendly glue (theatrical glue)</li>
<li>digital camera</li>
<li>PC</li>
<li>laser printer</li>
<li>foil</li>
</ul>

<p>the process itself is rather easy &#8212; and, together with german TV station WDR, they demonstrated that you can use that method <a href="http://www.daserste.de/plusminus/beitrag_dyn~uid,y2i9gnyp0ejp1iqp~cm.asp">to fool the fingerprint recognition system used by the European super-market chain EDEKA&#8230;</a></p>

<p>EDEKA seemed non-fazed:</p>

<blockquote>
  <p>Edeka Südwest teilt uns auf Anfrage schriftlich mit, man sehe „keinen Handlungsbedarf“. Die bestehenden Sicherheitsvorkehrungen seien, „wie unsere Erfahrungen gezeigt haben, vollkommen ausreichend“.<sup id="fnref:1"><a href="#fn:1" rel="footnote">1</a></sup></p>
</blockquote>

<p>&#8230;and they went on to state that the system they used was being used by the US government and other governments worldwide.</p>

<p>wow. good security relies either on something <em>only</em> i know, or something <em>only</em> i have, or something <em>only</em> i am. the emphasis is on <em>only</em>, your fingerprints? they are all over the place&#8230;and that place&#8230;and that place over there as well, yep.</p>

<p>the scary thing is, <a href="http://www.statewatch.org/news/2006/jul/eu-bio-passport-specs.pdf">fingerprints are being used (as secondary biometrics) for the new biometric EU passports!</a></p>

<div class="footnotes">
<hr />
<ol>

<li id="fn:1">
<p>roughly translated: &#8220;Edeka southwest replied to our request in writing, stating that they &#8216;saw no need to act&#8217;. The existing security procedures were, &#8216;as their experience had demonstrated&#8217;, completely sufficient&#8221;&#160;<a href="#fnref:1" rev="footnote">&#8617;</a></p>
</li>

</ol>
</div>
]]></content:encoded>
			<wfw:commentRss>http://xyzzyxyzzy.net/2007/12/31/24c3-howto-fake-fingerprints/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<georss:point featurename="[47.131074826701266, 8.747992515563965]">47.131074826701266 8.747992515563965</georss:point>
	</item>
		<item>
		<title>retiring perl after almost 20 years&#8230;</title>
		<link>http://xyzzyxyzzy.net/2007/11/23/retiring-perl-after-almost-20-years/</link>
		<comments>http://xyzzyxyzzy.net/2007/11/23/retiring-perl-after-almost-20-years/#comments</comments>
		<pubDate>Fri, 23 Nov 2007 13:53:36 +0000</pubDate>
		<dc:creator>dirk husemann</dc:creator>
				<category><![CDATA[from the grid]]></category>
		<category><![CDATA[research]]></category>
		<category><![CDATA[perl]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[threading]]></category>
		<category><![CDATA[vu*gate]]></category>
		<category><![CDATA[XMPP]]></category>

		<guid isPermaLink="false">http://xyzzyxyzzy.net/2007/11/23/retiring-perl-after-almost-20-years/</guid>
		<description><![CDATA[one of the projects i&#8217;m currently working on is the VU&#42;gate system that allows us to write scripts or applications to control an avatar in virtual worlds. VU&#42;gate consists of a gateway daemon &#8220;talking&#8221; on one side the virtual world network protocol towards the virtual world grid (e.g., for linden lab&#8217;s secondlife grid we are [...]]]></description>
			<content:encoded><![CDATA[<p>one of the projects i&#8217;m currently working on is the VU&#42;gate system that allows us to write scripts or applications to control an avatar in virtual worlds. <em>VU&#42;gate</em> consists of a gateway daemon &#8220;talking&#8221; on one side the virtual world network protocol towards the virtual world grid (e.g., for <a href="http://secondlife.com/">linden lab&#8217;s secondlife grid</a> we are using the excellent <a href="http://www.libsecondlife.org/">libsecondlife</a> code) and on the other side a network protocol for which we can easily provide specific language bindings &#8212; thus, we can use Java to program virtual world applications (or python or JavaScript or Perl or &#8230;).</p>

<p><center>
<img src='http://xyzzyxyzzy.net/wp-content/uploads/2007/11/vugate.png' alt='VU*gate architecture' style='float:right;'/>
</center></p>

<p>for the first version of <em>VU*gate</em> (which we then called <em>SLPuppeteer,</em> but that name is already used it transpired) we used a line based protocol modeled on <a href="http://en.wikipedia.org/wiki/Smtp">SMTP</a>, enhanced with asynchronous extension (virtual worlds, just like real worlds, are inherent asynchronous). that worked (and still does work) quite well for a lot of things: chatting, instant-messaging, moving about are all easily done with a one line command &#8212; and also easily parsed. where this starts to become painful is when you have to deal with more complex data (avatar login including not just fullname and password but also grid URI and location, for example, or group membership data). mind you, VU<em>gate mark 1 is currently in full production use and a perl script is updating the Eightbar SL group<sup id="fnref:2"><a href="#fn:2" rel="footnote">1</a></sup> via VU</em>gate, using data supplied by our corporate directory <em>Fringe</em>.</p>

<p>clearly, something more structured was what i wanted. preferably with some easy to use libraries taking care of the nitty-gritty details of data serialization and reification. colleagues had suggested switching to REST, but that doesn&#8217;t really support asynchronous event reporting (unless you revert to polling, yuck).</p>

<p>the solution i came up with was <a href="http://en.wikipedia.org/wiki/XMPP">XMPP</a>, which is the underlying transport protocol for all Jabber based instant messaging services (e.g., <a href="http://www.google.com/talk/">googletalk</a>, which is probably the best known of these). after trying the <a href="http://en.wikipedia.org/wiki/Erlang_%28programming_language%29">erlang</a> based <a href="http://www.ejabberd.im/">ejabberd</a> (if you don&#8217;t like perl because it looks like an army of flies had reverse bowel movements, you certainly are going to like erlang, yikes) i eventually settled on <a href="http://www.igniterealtime.org/projects/openfire/index.jsp">openfire</a> which&#8217;s main merit is that it&#8217;s got a rather nice admin web interface <strong>and</strong> can route messages with custom XML namespaces!</p>

<p>so far, so good &#8212; what has all this got to do with perl? well, the current language binding of choice for VU<em>gate is perl (object oriented perl, even), so i wanted to keep the existing perl-based VU</em>gate applications, which meant i needed a perl XMPP stack. turns out there are a couple, the most promising was <a href="http://search.cpan.org/dist/Net-XMPP/">Net::XMPP</a>. while Net::XMPP played nicely with ejabberd, it definitely did not like Openfire and never managed to even login <img src='http://xyzzyxyzzy.net/wp-includes/images/smilies/icon_sad.gif' alt=':-(' class='wp-smiley' />  and, worse,  that error (SAX parser flying out of the curve) had been reported and the &#8220;fixes&#8221; suggested earlier didn&#8217;t work anymore. so, chalk one up against good old perl.</p>

<p>next: for asynchronous stuff like VU*gate it would be really nice to use threading in the applications (along with stuff like mutexes, locks, signalling, and so forth). recent perl version claim to support threading&#8230;well,</p>

<blockquote>
  <p>It&#8217;s very important to remember when dealing with Perl threads that Perl Threads Are Not X Threads, for all values of X. <em><a href="http://perldoc.perl.org/perlthrtut.html">[perlthrtut]</a></em></p>
</blockquote>

<p>which is then revealed in the &#8220;shared and unshared data&#8221; section:</p>

<blockquote>
  <p>The biggest difference between Perl ithreads and the old 5.005 style threading, or for that matter, to most other threading systems out there, is that by default, no data is shared. <em><a href="http://perldoc.perl.org/perlthrtut.html">[ibid]</a></em></p>
</blockquote>

<p>hmmmmmm&#8230;turns out that you <strong>can</strong> share some data between threads, but there are some severe restrictions: only simple variables or references to those. no sharing of file descriptors it seems (so, no reader&#8211;writer thread separation <img src='http://xyzzyxyzzy.net/wp-includes/images/smilies/icon_sad.gif' alt=':-(' class='wp-smiley' /> .</p>

<p>indeed, not what you&#8217;d expect.</p>

<p>time to start looking for new stuff&#8230;</p>

<p>&#8230;time to introduce ourselves to <a href="http://en.wikipedia.org/wiki/Python_%28programming_language%29">python</a>. it&#8217;s has proper threading, and &#8212; ta da! &#8212; has a proper and non-barfing <a href="http://xmpppy.sourceforge.net/">XMPP stack</a>!</p>

<div class="footnotes">
<hr />
<ol>

<li id="fn:2">
<p>Eightbar as in the eight bars of the IBM logo; you have to be a member in the Eightbar group to gain access to the private IBM islands.&#160;<a href="#fnref:2" rev="footnote">&#8617;</a></p>
</li>

</ol>
</div>
]]></content:encoded>
			<wfw:commentRss>http://xyzzyxyzzy.net/2007/11/23/retiring-perl-after-almost-20-years/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

