<?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; hacking</title>
	<atom:link href="http://xyzzyxyzzy.net/topics/hacking/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>Fri, 15 Jan 2010 15:49:20 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>using maven to generate your project&#8217;s scala classpath</title>
		<link>http://xyzzyxyzzy.net/2010/01/15/using-maven-to-generate-your-projects-scala-classpath/</link>
		<comments>http://xyzzyxyzzy.net/2010/01/15/using-maven-to-generate-your-projects-scala-classpath/#comments</comments>
		<pubDate>Fri, 15 Jan 2010 15:49:20 +0000</pubDate>
		<dc:creator>DrScofield</dc:creator>
				<category><![CDATA[hacking]]></category>
		<category><![CDATA[classpath]]></category>
		<category><![CDATA[debugging]]></category>
		<category><![CDATA[interpreter]]></category>
		<category><![CDATA[maven]]></category>
		<category><![CDATA[scala]]></category>
		<category><![CDATA[testing]]></category>

		<guid isPermaLink="false">http://xyzzyxyzzy.net/?p=398</guid>
		<description><![CDATA[one thing i quite like about scala is that ability to run it in &#8220;interpreted&#8221; mode via the scala command. that allows me &#8212; similiar to python or ipython &#8212; to experiment and quickly try things out or even test my classes and objects. what was a bit of a pain was getting the proper [...]]]></description>
			<content:encoded><![CDATA[<p>one thing i quite like about scala is that ability to run it in
&#8220;interpreted&#8221; mode via the <code>scala</code> command. that allows me &#8212;
similiar to python or ipython &#8212; to experiment and quickly try things
out or even test my classes and objects.</p>

<p>what was a bit of a pain was getting the proper classpath constructed
so that not only <code>target/classes</code> was picked up but also all the
required dependencies. poking a bit around in <a href="http://maven.apache.org/plugins/index.html">maven&#8217;s plugin
documentation</a> i came across the <a href="http://maven.apache.org/plugins/maven-dependency-plugin/usage.html">dependency plugin</a> and in particular
the <a href="http://maven.apache.org/plugins/maven-dependency-plugin/build-classpath-mojo.html">dependency:build-classpath mojo</a>, armed with that information i
came up with the following rather useful shell script:</p>

<div>
<pre class="brush: bash;">
#!/bin/bash
top=$(pwd)
cwd=$(pwd)
while  [ &quot;$top&quot; != &quot;/&quot; -a ! -e &quot;$top/pom.xml&quot; ] ; do
    cd ..
    top=$(pwd)
done
cd $cwd

if [ -e &quot;$top/pom.xml&quot; ] ; then
    cd $top

    echo &quot;generating scala classpath based on maven pom.xml&quot;
    mvn dependency:build-classpath -Dmdep.outputFile=.classpath-scala

    echo &quot;starting scala&quot;
    scala -cp target/classes:$(cat .classpath-scala)

else

    echo &quot;cannot find top level pom.xml! must have taken a wrong turn somewhere. sorry.&quot;
    exit 1

fi
</pre>
</div>

<p>save under a convenient name, stir, and enjoy: call this script
instead of calling scala directly.</p>
]]></content:encoded>
			<wfw:commentRss>http://xyzzyxyzzy.net/2010/01/15/using-maven-to-generate-your-projects-scala-classpath/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<georss:point featurename="goldach">47.473497 9.466443</georss:point>
	</item>
		<item>
		<title>deploy a maven package locally</title>
		<link>http://xyzzyxyzzy.net/2010/01/13/deploy-a-maven-package-locally/</link>
		<comments>http://xyzzyxyzzy.net/2010/01/13/deploy-a-maven-package-locally/#comments</comments>
		<pubDate>Wed, 13 Jan 2010 15:55:01 +0000</pubDate>
		<dc:creator>DrScofield</dc:creator>
				<category><![CDATA[hacking]]></category>
		<category><![CDATA[brain extension]]></category>
		<category><![CDATA[deploy]]></category>
		<category><![CDATA[install]]></category>
		<category><![CDATA[maven]]></category>
		<category><![CDATA[package]]></category>

		<guid isPermaLink="false">http://xyzzyxyzzy.net/?p=394</guid>
		<description><![CDATA[note to self: maven differentiates between installing and deploying a package (which might have been built via a mvn package): install &#8212; just installs the JAR file and the POM file, if the -DcreateChecksum=true flag is provided it will create the SHA1 for the JAR only deploy &#8212; install JAR and POM and all necessary [...]]]></description>
			<content:encoded><![CDATA[<p>note to self: maven differentiates between <em>installing</em> and
<em>deploying</em> a package (which might have been built via a <code>mvn
package</code>):</p>

<ul>
<li>install &#8212; just installs the JAR file and the POM file, if the
<code>-DcreateChecksum=true</code> flag is provided it will create the SHA1 for
the JAR <em>only</em></li>
<li>deploy &#8212; install JAR and POM and all necessary meta data along
with SHA1s</li>
</ul>

<p>to install a package to a shared repository a <em>deploy</em> is to be
preferred over an <em>install</em> as with an <em>install</em> we&#8217;ll get <code>missing
checksum</code> errors later in life.</p>

<p>so, this works like this (using the <code>lift-ldap</code> package as an example):</p>

<p><pre class="brush: bash;">
$ mvn deploy:deploy-file -DgroupId=net.liftweb -DartifactId=lift-ldap -Dversion=1.0.0 -Dpackaging=jar -Dfile=target/lift-ldap-1.0.0.jar -DcreateChecksum=true  -Durl=scp://eyeteadee.zurich.ibm.com/var/www/eyeteadee.zurich.ibm.com/maven
</pre></p>
]]></content:encoded>
			<wfw:commentRss>http://xyzzyxyzzy.net/2010/01/13/deploy-a-maven-package-locally/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<georss:point featurename="[47.308883299155255, 8.544209003448486]">47.308883299155255 8.544209003448486</georss:point>
	</item>
		<item>
		<title>maven resource filtering: dealing with path names on linux &amp; windows</title>
		<link>http://xyzzyxyzzy.net/2010/01/12/maven-resource-filtering-dealing-with-path-names-on-linux-windows/</link>
		<comments>http://xyzzyxyzzy.net/2010/01/12/maven-resource-filtering-dealing-with-path-names-on-linux-windows/#comments</comments>
		<pubDate>Tue, 12 Jan 2010 12:48:11 +0000</pubDate>
		<dc:creator>DrScofield</dc:creator>
				<category><![CDATA[hacking]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[maven]]></category>
		<category><![CDATA[path name]]></category>
		<category><![CDATA[resource filtering]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://xyzzyxyzzy.net/?p=384</guid>
		<description><![CDATA[in one of our projects we are using maven to build our web application. part of our build process involves maven resource filtering, in particular, we need to insert path names into resources controlling the build process. since our team uses both linux and windows, we need to be able to generate file: URLs that [...]]]></description>
			<content:encoded><![CDATA[<p>in one of our projects we are using <a href="http://maven.apache.org/index.html">maven</a> to build our web
application. part of our build process involves <a href="http://maven.apache.org/plugins/maven-resources-plugin/examples/filter.html">maven resource
filtering</a>, in particular, we need to insert
path names into resources controlling the build process. since our
team uses both linux and windows, we need to be able to generate <code>file:</code>
URLs that work irrespective of the underlying platform.</p>

<p>using a construct like</p>

<pre><code>file://${project.build.directory}/path/to/stuff
</code></pre>

<p>didn&#8217;t really work: on linux the resulting <code>file:</code> URL was usable, on
windows it was not: there was a <code>/</code> missing plus all <code>\</code> occurences
had been escaped.</p>

<p>after trying a couple of variations, i came across the <a href="http://maven.apache.org/guides/introduction/introduction-to-the-pom.html#Available_Variables"><em>available
variables</em> section</a> of the maven documentation which
listed <code>project.baseUri</code> &#8212; which seemed just the ticket!</p>

<p>alas, it turns out that maven&#8217;s <a href="http://jira.codehaus.org/browse/MRESOURCES-99">resource plugin currently does not
know about <code>${project.baseUri}</code></a> &#8212; doh. yet, not
all hope is lost: by adding the following property definition to the
project&#8217;s <code>pom.xml</code> file did the trick:</p>

<p><pre class="brush: xml;">
    &lt;properties&gt;
      ...
      &lt;projectBaseUri&gt;${project.baseUri}&lt;/projectBaseUri&gt;
      ...
    &lt;/properties&gt;
</pre></p>

<p>instead of <code>${project.baseUri}</code> we use <code>${projectBaseUri}</code> in the
resource file, which gets translated to the desired <code>file:</code>
URL. bingo.</p>
]]></content:encoded>
			<wfw:commentRss>http://xyzzyxyzzy.net/2010/01/12/maven-resource-filtering-dealing-with-path-names-on-linux-windows/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<georss:point featurename="[47.308883299155255, 8.544209003448486]">47.308883299155255 8.544209003448486</georss:point>
	</item>
		<item>
		<title>using F19/F20 to switch tabs in thunderbird 3</title>
		<link>http://xyzzyxyzzy.net/2009/12/09/using-f19f20-to-switch-tabs-in-thunderbird-3/</link>
		<comments>http://xyzzyxyzzy.net/2009/12/09/using-f19f20-to-switch-tabs-in-thunderbird-3/#comments</comments>
		<pubDate>Wed, 09 Dec 2009 17:14:18 +0000</pubDate>
		<dc:creator>DrScofield</dc:creator>
				<category><![CDATA[hacking]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[keyconfig]]></category>
		<category><![CDATA[mozilla]]></category>
		<category><![CDATA[tabbed UI]]></category>
		<category><![CDATA[tabmail]]></category>
		<category><![CDATA[TB3]]></category>
		<category><![CDATA[thunderbird 3]]></category>

		<guid isPermaLink="false">http://xyzzyxyzzy.net/?p=375</guid>
		<description><![CDATA[i just switched over from thunderbird 2 to the new sparkly thunderbird 3 &#8212; and i like it very much. particularly the tabbed user interface is quite nice but also lightning 1.0 seems to cope much better with those lotus notes generated calender invites what did bother me was that i couldn&#8217;t find an easy [...]]]></description>
			<content:encoded><![CDATA[<p>i just switched over from thunderbird 2 to the new sparkly thunderbird 3 &#8212; and i like it very much. particularly the tabbed user interface is quite nice but also lightning 1.0 seems to cope much better with those lotus notes generated calender invites <img src='http://xyzzyxyzzy.net/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>

<p>what did bother me was that i couldn&#8217;t find an easy to use function for <a href="http://forums.mozillazine.org/viewtopic.php?f=48&amp;t=72994">keyconfig</a> to bind the <em>page left</em> and <em>page right</em> keys (aka F19 and F20) of my X200 keyboard to &#8220;previous tab&#8221; and &#8220;next tab&#8221;. after some digging i stumbled across the mozilla thunderbird 3 <a href="http://mxr.mozilla.org/comm-central/source/mail/base/content/tabmail.xml">tabmail</a> page which then allowed me to figure out how to create the code for keyconfig:</p>

<p><pre class="brush: jscript;">
// next tab
var windowManager = Components.classes['@mozilla.org/appshell/window-mediator;1'].
    getService(Components.interfaces.nsIWindowMediator);
var winId = windowManager.getMostRecentWindow(&quot;mail:3pane&quot;);
var tabmail = winId.document.getElementById('tabmail')
tabmail.switchToTab((tabmail.tabContainer.selectedIndex + 1) % tabmail.tabInfo.length)
</pre>
and
<pre class="brush: jscript;">
// previous tab
var windowManager = Components.classes['@mozilla.org/appshell/window-mediator;1'].
    getService(Components.interfaces.nsIWindowMediator);
var winId = windowManager.getMostRecentWindow(&quot;mail:3pane&quot;);
var tabmail = winId.document.getElementById('tabmail')
tabmail.switchToTab((tabmail.tabContainer.selectedIndex + tabmail.tabInfo.length - 1) % tabmail.tabInfo.length)
</pre></p>

<p>copy &amp; paste the code snippets and use <a href="http://forums.mozillazine.org/viewtopic.php?f=48&amp;t=72994">keyconfig&#8217;s</a> &#8220;add key&#8221; feature to bind the code to whatever key you&#8217;d like to use.</p>
]]></content:encoded>
			<wfw:commentRss>http://xyzzyxyzzy.net/2009/12/09/using-f19f20-to-switch-tabs-in-thunderbird-3/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<georss:point featurename="[47.131074826701266, 8.747992515563965]">47.131074826701266 8.747992515563965</georss:point>
	</item>
		<item>
		<title>fixing ugly {emacs, firefox} fonts on (x)ubuntu karmic</title>
		<link>http://xyzzyxyzzy.net/2009/11/23/fixing-ugly-emacs-firefox-fonts-on-xubuntu-karmic/</link>
		<comments>http://xyzzyxyzzy.net/2009/11/23/fixing-ugly-emacs-firefox-fonts-on-xubuntu-karmic/#comments</comments>
		<pubDate>Mon, 23 Nov 2009 15:52:50 +0000</pubDate>
		<dc:creator>DrScofield</dc:creator>
				<category><![CDATA[hacking]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[emacs]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[fontconfig]]></category>
		<category><![CDATA[karmic]]></category>
		<category><![CDATA[KDE 4]]></category>
		<category><![CDATA[kubuntu]]></category>
		<category><![CDATA[ugly fonts]]></category>
		<category><![CDATA[XFCE]]></category>
		<category><![CDATA[xubuntu]]></category>

		<guid isPermaLink="false">http://xyzzyxyzzy.net/?p=371</guid>
		<description><![CDATA[i recently switched all my systems from running kubuntu hardy heron 08.04.02 to xubuntu karmic koala 09.101 &#8212; a rather pleasant switch over. the only thing that was bothering me was the really crappy fonts in firefox and emacs. in firefox, no matter what i configured in firefox itself or in the appearance settings dialog [...]]]></description>
			<content:encoded><![CDATA[<p>i recently switched all my systems from running kubuntu hardy heron
08.04.02 to <em>xubuntu karmic koala 09.10</em><sup id="fnref:1"><a href="#fn:1" rel="footnote">1</a></sup> &#8212; a rather pleasant
switch over. the only thing that was bothering me was the really
crappy fonts in firefox and emacs. in firefox, no matter what i
configured in firefox itself or in the appearance settings dialog of
xubuntu (tried both gnome-control-center and XFCE&#8217;s appearance dialog)
the fonts would still be blurry and below a certain size unreadable
almost. in emacs i was suffering from the blurriness plus humongous
menu fonts (i am getting older, i know, but so far i don&#8217;t need that
large a print, really).</p>

<p>after a lot of research i finally managed to track it down to the following:</p>

<ol>
<li>firefox doesn&#8217;t seem to be really interested in what the user&#8217;s
desktop settings say, the only guy it will listen to is fontconfig
configured via <code>/etc/fonts/conf.d</code>! </li>
<li>to get rid of the blurry fonts i needed to drop the
<code>10-hinting-{full,medium,slight}.conf</code> from fontconfig&#8217;s
<code>/etc/fonts.conf.d</code> directory</li>
</ol>

<p>that fixed the blurry fonts in firefox and emacs.</p>

<p>to get emacs menu&#8217;s back to a more sensible size i had to edit
<code>$HOME/.emacs.d/gtkrc</code> &#8212; changing the default face via <code>M-x
customize-face</code> only affected the buffer and modeline fonts but not
the menu itself. i&#8217;m using the DejaVu Sans fonts, so my <code>gktrc</code> file
looks like this:</p>

<pre><code>style "user-font"
{
    font_name="DejaVu Sans 8"
}
widget_class "*" style "user-font"
gtk-font-name="DejaVu Sans 8"

style "default"
{
    font_name="DejaVu Sans 8"
    bg[NORMAL] = { 1.0, 1.0, 1.0 }
}
</code></pre>

<p>that one fixed emacs.</p>

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

<li id="fn:1">
<p>yes, i did try kubuntu 09.10 in the hopes that the KDE 4 gang
  had gotten their act together and had produced by now something
  as usuable (as opposed to blinky, flashy, sparkly) as KDE 3.5
  &#8212; alas, that hope was in vain: a lot of the features that i&#8217;d
  valued in KDE 3.5 were still missing, usability was still not on
  par with KDE 3.5&#8242;s usability &#8212; but, hey, it&#8217;s blinky, flashy,
  sparkly, surely that counts for something? no, not really. i&#8217;m
  less interested in being an onlooker in the continuing
  GUI-blinky, flashy, sparkly pissing contest with windows/mac
  osx, and rather interested in a desktop that i can adapt to my
  needs <strong>without</strong> having to go on an archaeological expedition
  into the innards of KDE 4. sorry about that.</p>

<p>and, also, yes, i know about the KDE 3.5 repo for karmic &#8212;
  tried that, in fact, it mostly works, but with <CTRL-ALT-DEL>
  producing &#8220;cannot contact session manager&#8221; (no matter which
  session manager i tried) that was no longer usable
  either. really sorry.&#160;<a href="#fnref:1" rev="footnote">&#8617;</a></p>
</li>

</ol>
</div>
]]></content:encoded>
			<wfw:commentRss>http://xyzzyxyzzy.net/2009/11/23/fixing-ugly-emacs-firefox-fonts-on-xubuntu-karmic/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<georss:point featurename="[48.04114700748514, 10.723342895507812]">48.04114700748514 10.723342895507812</georss:point>
	</item>
		<item>
		<title>japanese language support for OpenSim</title>
		<link>http://xyzzyxyzzy.net/2009/09/01/japanese-language-support-for-opensim/</link>
		<comments>http://xyzzyxyzzy.net/2009/09/01/japanese-language-support-for-opensim/#comments</comments>
		<pubDate>Tue, 01 Sep 2009 14:07:57 +0000</pubDate>
		<dc:creator>DrScofield</dc:creator>
				<category><![CDATA[from the grid]]></category>
		<category><![CDATA[hacking]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[fonts]]></category>
		<category><![CDATA[japanese]]></category>
		<category><![CDATA[kochi mincho]]></category>
		<category><![CDATA[opensim]]></category>
		<category><![CDATA[unicode]]></category>

		<guid isPermaLink="false">http://xyzzyxyzzy.net/?p=353</guid>
		<description><![CDATA[a colleague of mine in japan contacted us asking whether our in-world collaboration tools could be extended to support japanese characters &#8212; he had tried our internal, public sametime 3d servers and had noticed that while in-world chat and instant messaging worked just fine, our flipcharts, brain storming boards, calendar, and voting tools did just [...]]]></description>
			<content:encoded><![CDATA[<p>a colleague of mine in japan contacted us asking whether our in-world
collaboration tools could be extended to support japanese characters
&#8212; he had tried our internal, public <em>sametime 3d</em> servers and had
noticed that while in-world chat and instant messaging worked just
fine, our flipcharts, brain storming boards, calendar, and voting
tools did just display rather boring little rectangles <img src='http://xyzzyxyzzy.net/wp-includes/images/smilies/icon_sad.gif' alt=':-(' class='wp-smiley' /> </p>

<p>not good. even worse when it means lost leads. so i set out to
investigate. since OpenSim <strong>is</strong> being used in japan, it was a fair
assumption that we might have a font problem here. this was confirmed
by <a href="http://twitter.com/AdamFrisby/status/3555720286">a twitter from
adamfrisby</a>:</p>

<blockquote>
  <p>@DrScofield so it should load fine.Only issue you need to be aware
  of is fonts &#8211; you need to use a font with the correct charset
  availible.</p>
</blockquote>

<p>so, first port of call: how are we specifying the font to use for text
rendering? digging through the OpenSim source i ended up in the
<code>VectorRenderModule</code>:</p>

<p><pre class="brush: csharp;">
    private void GDIDraw(string data, Graphics graph, char dataDelim)
    {
        Point startPoint = new Point(0, 0);
        Point endPoint = new Point(0, 0);
        Pen drawPen = new Pen(Color.Black, 7);
        string fontName = &quot;Arial&quot;;
        float fontSize = 14;
        Font myFont = new Font(fontName, fontSize);
        SolidBrush myBrush = new SolidBrush(Color.Black);
        ...
</pre></p>

<p>gulp: we&#8217;ve got it <em>hard coded</em> <img src='http://xyzzyxyzzy.net/wp-includes/images/smilies/icon_sad.gif' alt=':-(' class='wp-smiley' /> </p>

<p>so, next question: can we change it dynamically? looking through the
code, it seems like we might:</p>

<p><pre class="brush: csharp;">
    ...
    else if (nextLine.StartsWith(&quot;FontName&quot;))
    {
        nextLine = nextLine.Remove(0, 8);
        fontName = nextLine.Trim();
        myFont = new Font(fontName, fontSize);
    }
    ...
</pre></p>

<p>except, hmph, there is no <code>osSetFontName()</code> OSSL function <img src='http://xyzzyxyzzy.net/wp-includes/images/smilies/icon_sad.gif' alt=':-(' class='wp-smiley' /> </p>

<p>a couple of <a href="http://en.wikipedia.org/wiki/SMOP">SMOP</a>s later, we had <code>osSetFontName()</code> and could also
configure the default font name in <code>OpenSim.ini</code>, good. now to figure
out which linux font would do the trick.</p>

<p>i tried:<sup id="fnref:1"><a href="#fn:1" rel="footnote">1</a></sup></p>

<ul>
<li><em>Arial</em> &#8212; no good: doesn&#8217;t have japanese script support</li>
<li><em>DejaVu Sans/Serif</em> &#8212; again, no good, no japanese script support</li>
<li><em>Kochi Mincho</em> &#8212; works!</li>
</ul>

<p>&#8212; the configuration for that one is:</p>

<p><pre class="brush: plain;">
[VectorRender]
    font_name = &quot;Kochi Mincho&quot;
</pre></p>

<p>my next quest was to see whether i could find a font that would
support the whole range: european scripts as well as japanese and also
chinese.</p>

<p>&#8230;unfortunately, while windows users have <em>Arial Unicode MS</em> there is
no such complete beast available to linux users &#8212; yes, there are
fonts such as <em>bitstream cybit</em>, but their license conditions either
don&#8217;t allow commercial use or only for a single user. so, if you are
running under linux you need to localize your OpenSim installation via
<code>OpenSim.ini</code>.</p>

<p>but! at least we figured out how to get japanese character sets
supported in OpenSim on linux and can now configure one of our
<em>sametime 3d</em> servers to support japanese OpenSim users properly! <img src='http://xyzzyxyzzy.net/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>

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

<li id="fn:1">
<p>lest you get the wrong impression: i know <strong>no</strong> japanese,
  instead i&#8217;m using <a href="http://translate.google.com/translate_t#en|ja|OpenSim%20rocks!">google translate</a> to produce suchs gems as
  &#8220;OpenSimは岩！&#8221;<sup id="fnref:2"><a href="#fn:2" rel="footnote">2</a></sup>&#160;<a href="#fnref:1" rev="footnote">&#8617;</a></p>
</li>

<li id="fn:2">
<p>and hoping that the good folks at google don&#8217;t do a &#8220;<a href="http://www.imdb.com/title/tt0259446/quotes">Έχω τρεις
  όρχεις</a>&#8221; on me&#8230;&#160;<a href="#fnref:2" rev="footnote">&#8617;</a></p>
</li>

</ol>
</div>
]]></content:encoded>
			<wfw:commentRss>http://xyzzyxyzzy.net/2009/09/01/japanese-language-support-for-opensim/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<georss:point featurename="[47.308883299155255, 8.544209003448486]">47.308883299155255 8.544209003448486</georss:point>
	</item>
		<item>
		<title>vidcasts on htc hero</title>
		<link>http://xyzzyxyzzy.net/2009/08/25/vidcasts-on-htc-hero/</link>
		<comments>http://xyzzyxyzzy.net/2009/08/25/vidcasts-on-htc-hero/#comments</comments>
		<pubDate>Tue, 25 Aug 2009 20:42:03 +0000</pubDate>
		<dc:creator>DrScofield</dc:creator>
				<category><![CDATA[hacking]]></category>
		<category><![CDATA[android]]></category>
		<category><![CDATA[apple]]></category>
		<category><![CDATA[htc hero]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[itouch]]></category>
		<category><![CDATA[m4v]]></category>

		<guid isPermaLink="false">http://xyzzyxyzzy.net/?p=349</guid>
		<description><![CDATA[for almost 10 days i&#8217;ve been the proud owner of a new mobile phone, the htc hero, an android and, thus, linux based mobile phone! over the past year or so i had become increasingly fed up with my apple ipod touch &#8212; yes, i had jail-broken it, yes, i had amarok synchronizing via ssh [...]]]></description>
			<content:encoded><![CDATA[<p>for almost 10 days i&#8217;ve been the proud owner of a new mobile phone, the <a href="http://en.wikipedia.org/wiki/Htc_hero">htc hero</a>, an <a href="http://en.wikipedia.org/wiki/Android_%28mobile_device_platform%29">android</a> and, thus, linux based mobile phone! over the past year or so i had become increasingly fed up with my <a href="http://en.wikipedia.org/wiki/Itouch">apple ipod touch</a> &#8212; yes, i had jail-broken it, yes, i had <a href="http://en.wikipedia.org/wiki/Amarok_%28software%29">amarok</a> synchronizing via <a href="http://en.wikipedia.org/wiki/Ssh">ssh</a> with it, but at what &#8220;speed!&#8221; ridiculous!<sup id="fnref:1"><a href="#fn:1" rel="footnote">1</a></sup></p>

<p>when my trusted nokia n95 started acting up and started crying for power more and more often the writing on the wall was quite legible: &#8220;get a new phone&#8221; &#8212; so i did <img src='http://xyzzyxyzzy.net/wp-includes/images/smilies/icon_biggrin.gif' alt=':-D' class='wp-smiley' /> </p>

<p>after a bit of research &#8212; the palm pre looked sexy but is not
available on the continent for some time to come and also lacks the
standard API set of the android platform &#8212; i settled on the android
based <a href="http://en.wikipedia.org/wiki/Htc_hero">htc hero</a>.</p>

<p>copying music over, sync-ing those podcasts i love to listen to &#8212;
it&#8217;s all just a matter of plugging in the USB data cable to the htc
hero and my thinkpad, telling the hero to offer the SD card as a USB
drive to linux and we are in business: gone are the hour long transfer
times for those <a href="http://radiotatort.ard.de/">ARD radio tatort radioplays</a> or the swiss <a href="http://www.sf.tv/podcasts/feed.php?docid=dok">SF TV
dok vidcasts</a> &#8212; it all happens in a flash now, sweet <img src='http://xyzzyxyzzy.net/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>

<p>the only thing i was missing: vidcasts <img src='http://xyzzyxyzzy.net/wp-includes/images/smilies/icon_sad.gif' alt=':-(' class='wp-smiley' />  turns out the hero can play
those, but you need to
 &#8211; install the <em>video player</em> application via the <em>android market</em>,
   and
 &#8211; &#8220;hack&#8221; amarok&#8217;s config file so that amarok would be cool with
   sending <code>.m4v</code> vidcasts to the hero</p>

<p>for the latter you need to locate the line that reads</p>

<pre><code>supportedFiletypes=mp3
</code></pre>

<p>in your <code>.kde/share/config/amarokrc</code> file and change it to read:</p>

<pre><code>supportedFiletypes=mp3, m4v
</code></pre>

<p>voila! amarok will now transfer those vidcasts to the hero and the
<em>video player</em> application will play them <img src='http://xyzzyxyzzy.net/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>

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

<li id="fn:1">
<p>don&#8217;t get me wrong: i like the user interface of the ipods and iphones. what i don&#8217;t get, though, is the early-1990s mindset of apple: a locked platform??? why on earth would you try to exclude customers from your platform? oh, never mind&#8230;&#160;<a href="#fnref:1" rev="footnote">&#8617;</a></p>
</li>

</ol>
</div>
]]></content:encoded>
			<wfw:commentRss>http://xyzzyxyzzy.net/2009/08/25/vidcasts-on-htc-hero/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<georss:point featurename="[47.131074826701266, 8.747992515563965]">47.131074826701266 8.747992515563965</georss:point>
	</item>
		<item>
		<title>avatar machine</title>
		<link>http://xyzzyxyzzy.net/2009/06/18/avatar-machine/</link>
		<comments>http://xyzzyxyzzy.net/2009/06/18/avatar-machine/#comments</comments>
		<pubDate>Thu, 18 Jun 2009 16:31:11 +0000</pubDate>
		<dc:creator>DrScofield</dc:creator>
				<category><![CDATA[from the grid]]></category>
		<category><![CDATA[hacking]]></category>
		<category><![CDATA[appearance]]></category>
		<category><![CDATA[avatar]]></category>
		<category><![CDATA[opensim]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[quick-hack]]></category>

		<guid isPermaLink="false">http://xyzzyxyzzy.net/?p=326</guid>
		<description><![CDATA[for stress testing i needed to create 100 avatar accounts quickly. instead of going via opensim&#8217;s console i started ipython and entered the following python script: import xmlrpclib os = xmlrpclib.Server('http://127.0.0.1:9000/') for i in range(100): os.admin_create_user(dict(password = 'SECRET', user_firstname = 'Bot%d' % i, user_lastname = 'Dude', user_password = 'b0tb0tb0t', start_region_x = 1000, start_region_y = 1000, [...]]]></description>
			<content:encoded><![CDATA[<p>for stress testing i needed to create 100 avatar accounts quickly. instead of going via opensim&#8217;s console i started <a href="http://ipython.scipy.org/moin/">ipython</a> and entered the following python script:</p>

<pre><code><pre class="brush: python;">
import xmlrpclib
os = xmlrpclib.Server('http://127.0.0.1:9000/')
for i in range(100):
    os.admin_create_user(dict(password = 'SECRET', 
                              user_firstname = 'Bot%d' % i,
                              user_lastname = 'Dude', 
                              user_password = 'b0tb0tb0t', 
                              start_region_x = 1000, 
                              start_region_y = 1000, 
                              model = 'Bot Dude')) 
</pre>
</code></pre>

<p>a couple of minutes later i had successfully created 100 avatar
accounts, &#8221;Bot0 Dude&#8221; to &#8221;Bot99&#8242;, all wearing the same outfit as
&#8221;Bot Dude&#8221;, an avatar i had prepared earlier.</p>

<p>voila! avatar machine <img src='http://xyzzyxyzzy.net/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://xyzzyxyzzy.net/2009/06/18/avatar-machine/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<georss:point featurename="[47.308883299155255, 8.544209003448486]">47.308883299155255 8.544209003448486</georss:point>
	</item>
		<item>
		<title>integrating syntaxhighligher with markdown for wordpress&#8230;</title>
		<link>http://xyzzyxyzzy.net/2009/06/04/integrating-syntaxhighligher-with-markdown-for-wordpress/</link>
		<comments>http://xyzzyxyzzy.net/2009/06/04/integrating-syntaxhighligher-with-markdown-for-wordpress/#comments</comments>
		<pubDate>Thu, 04 Jun 2009 08:08:19 +0000</pubDate>
		<dc:creator>DrScofield</dc:creator>
				<category><![CDATA[hacking]]></category>
		<category><![CDATA[markdown]]></category>
		<category><![CDATA[SyntaxHighlighter]]></category>
		<category><![CDATA[syntaxhighlighter evolved]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://xyzzyxyzzy.net/?p=305</guid>
		<description><![CDATA[i&#8217;ve been a big fan of the syntax highlighter aka syntaxhighligher evolved wordpress plugin for quite a while now. after updating to the syntaxhighlighter evolved version, my code sections started looking funny, like this: a = None b = 1&#60;/p&#62; &#60;p&#62;if all((a, b)): print 'yes!' instead of like this: a = None b = 1 [...]]]></description>
			<content:encoded><![CDATA[<p>i&#8217;ve been a big fan of the <a href="http://www.viper007bond.com/wordpress-plugins/syntaxhighlighter/">syntax highlighter aka syntaxhighligher evolved</a> wordpress plugin for quite a while now. after updating to the <em>syntaxhighlighter evolved</em> version, my code sections started looking funny, like this:</p>

<p><pre class="brush: python;">
a = None
b = 1&lt;/p&gt;

&lt;p&gt;if all((a, b)):
    print 'yes!'
</pre></p>

<p>instead of like this:</p>

<pre><code><pre class="brush: python;">
a = None
b = 1

if all((a, b)):
    print 'yes!'
</pre>
</code></pre>

<p>the problem seemed to be that syntaxhighlighter&#8217;s shortcodes
confuddled markdown (or markdown confuddled syntaxhighlighter?). this
morning i realized that the solution might be actually quite simple:
instead of <em>not</em> indenting, indent the code by 4 space (as you usually
do with markdown to tag code sections, sigh) and all might be well&#8230;</p>

<p>&#8230;and it was. sigh. quite easy.</p>
]]></content:encoded>
			<wfw:commentRss>http://xyzzyxyzzy.net/2009/06/04/integrating-syntaxhighligher-with-markdown-for-wordpress/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<georss:point featurename="[47.131074826701266, 8.747992515563965]">47.131074826701266 8.747992515563965</georss:point>
	</item>
		<item>
		<title>OpenSim: sending inventory client side&#8230;and have the avatar take notice!</title>
		<link>http://xyzzyxyzzy.net/2009/06/04/opensim-sending-inventory-client-side/</link>
		<comments>http://xyzzyxyzzy.net/2009/06/04/opensim-sending-inventory-client-side/#comments</comments>
		<pubDate>Thu, 04 Jun 2009 07:54:19 +0000</pubDate>
		<dc:creator>DrScofield</dc:creator>
				<category><![CDATA[from the grid]]></category>
		<category><![CDATA[hacking]]></category>
		<category><![CDATA[inventory]]></category>
		<category><![CDATA[opensim]]></category>
		<category><![CDATA[SL client]]></category>

		<guid isPermaLink="false">http://xyzzyxyzzy.net/?p=295</guid>
		<description><![CDATA[recently i was in need of being able to send inventory items (well, a whole folder full of stuff) to the inventory of a logged-in avatar. just copying the the inventory items to the avatar inventory (for example, using Scene.GiveInventoryItem() or Scene.GiveInventoryFolder()) will not cause your avatar to notice that there is additional junk in [...]]]></description>
			<content:encoded><![CDATA[<p>recently i was in need of being able to send inventory items (well, a whole folder full of stuff) to the inventory of a logged-in avatar.</p>

<p>just copying the the inventory items to the avatar inventory (for example, using <code>Scene.GiveInventoryItem()</code> or <code>Scene.GiveInventoryFolder()</code>) will not cause your avatar to notice that there is additional junk in her inventory all of a sudden &#8212; once the avatar is logged out and logs in again, she will find the stuff in her inventory. kicking the avatar out every time you want to send some inventory her way is a tad bad on the user experience side<sup id="fnref:1"><a href="#fn:1" rel="footnote">1</a></sup>. clearly not something we want to do.</p>

<p>after trying a 101 ways of sending inventory to the avatar and none of them catching, i finally remembered that avatars can give inventory to one another, even whole folders!<sup id="fnref:3"><a href="#fn:3" rel="footnote">2</a></sup> taking my favorite tool to the OpenSim source tree<sup id="fnref:4"><a href="#fn:4" rel="footnote">3</a></sup> i found code in the <code>InventoryTransferModule</code> that seemed to take care of this process. the first attempt of just sending a <code>GridInstantMessage</code> via the usual means was not producing the right result: the avatar would get the pop-up that a folder was being given to her and would she like to keep it? looked good but checking the inventory revealed it to be a big blue lie.</p>

<p>here&#8217;s what i finally figured out. you need:</p>

<ul>
<li>a <code>ScenePresence</code> object representing the avatar</li>
<li>the <code>UUID</code> of the sending &#8220;avatar&#8221;</li>
<li>the name of the sending &#8220;avatar&#8221;</li>
<li>the <code>InventoryNodeBase</code> object (actually you would pass in a subclass such as <code>InventoryItemBase</code> or <code>InventoryFolderBase</code> or similar)</li>
</ul>

<p>here&#8217;s the &#8220;pseudo-code&#8221;:</p>

<pre><code>
// pseudo code: send inventory content to a logged in avatar's
// inventory 
//
// avatar: ScenePresence object
// src: struct containing &amp;quot;UUID&amp;quot; and &amp;quot;Name&amp;quot; of the source &amp;quot;avatar&amp;quot;

// get the CachedUserInfo object for the target avatar
CachedUserInfo cuiAvatar = 
    m_commsManager.UserProfileCacheService.GetUserDetails(avatar,UUID);
if (!cuiAvatar.HasReceivedInventory) cuiAvatar.FetchInventory();

// target folder is the Clothing folder (type 5)
InventoryFolderImpl dstFolder = cuiAvatar.FindFolderForType(5);

// copy source folder from src avatar to dstFolder
copyFolder = scene.GiveInventoryFolder(avatar.UUID, src.UUID, 
                                       dstFolder.ID);

// content is in the target folder, ping target avatar and let her
// know about it: we do this through a GridInstantMessage

// GridInstantMessage: prepare bucket byte array first byte is asset
// type, remaining bytes are the UUID of the InventoryItem
byte[] idBytes = item.ID.GetBytes();
byte[] bucket = new byte[1 + idBytes.Length];

if (item is InventoryFolderBase)
    bucket[0] = (byte)AssetType.Folder;
else if (item is InventoryItemBase)
    bucket[0] = (byte)(item as e).AssetType;

Array.Copy(idBytes, 0, bucket, 1, idBytes.Length);

GridInstantMessage im = 
    new GridInstantMessage(scene, src.UUID, src.Name, avatar.UUID,  
                           (byte)InstantMessageDialog.InventoryOffered,
                           false, item.Name, item.ID,
                           Vector3.Zero, bucket);

// send bulk update inventory message and GridInstantMessage
avatar.ControllingClient.SendBulkUpdateInventory(item);
avatar.ControllingClient.SendInstantMessage(im);
[/c-sharp]
</code></pre>

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

<li id="fn:1">
<p>though, i was reminded of windows&#8217;s tendency of asking you to reboot ever time you installed some piece of software&#8230;<sup id="fnref:2"><a href="#fn:2" rel="footnote">4</a></sup>&#160;<a href="#fnref:1" rev="footnote">&#8617;</a></p>
</li>

<li id="fn:3">
<p>yes, i&#8217;m a bit dense sometimes&#8230;or&#8230;too focused! <img src='http://xyzzyxyzzy.net/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> &#160;<a href="#fnref:3" rev="footnote">&#8617;</a></p>
</li>

<li id="fn:4">
<p>no, not <em>that</em> one. <em>emacs&#8217;s</em> <code>M-x grep-find</code>!&#160;<a href="#fnref:4" rev="footnote">&#8617;</a></p>
</li>

<li id="fn:2">
<p>on second thoughts, that just proves the earlier point about this not being very user friendly&#8230;&#160;<a href="#fnref:2" rev="footnote">&#8617;</a></p>
</li>

</ol>
</div>
]]></content:encoded>
			<wfw:commentRss>http://xyzzyxyzzy.net/2009/06/04/opensim-sending-inventory-client-side/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<georss:point featurename="[47.131074826701266, 8.747992515563965]">47.131074826701266 8.747992515563965</georss:point>
	</item>
	</channel>
</rss>
