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

<channel>
	<title>Blog of Anders Rune Jensen &#187; iola</title>
	<atom:link href="http://people.iola.dk/arj/category/iola/feed/" rel="self" type="application/rss+xml" />
	<link>http://people.iola.dk/arj</link>
	<description>metalinguistic musings and other related ramblings</description>
	<lastBuildDate>Fri, 18 Nov 2011 19:13:49 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2</generator>
		<item>
		<title>Django Alliance</title>
		<link>http://people.iola.dk/arj/2009/12/01/django-alliance/</link>
		<comments>http://people.iola.dk/arj/2009/12/01/django-alliance/#comments</comments>
		<pubDate>Tue, 01 Dec 2009 13:03:51 +0000</pubDate>
		<dc:creator>Anders Rune Jensen</dc:creator>
				<category><![CDATA[iola]]></category>
		<category><![CDATA[alliance]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[django]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://people.iola.dk/arj/?p=406</guid>
		<description><![CDATA[<p>Being small and agile has many advances, but sometimes people confuse it with being fragile. Although one could argue that betting on a single-vendors proprietary solution would be a more fragile business proposition. Anyway, to make people feel safer buying web systems developed in Django and Python based on Open Source, we have had a finger in the creation of the <a href="http://www.djangoalliance.org/en/">Django Alliance</a>. The web site complements <a href="http://djangopeople.net/">Django People</a> with a focus on companies rather than on single individuals.</p>
]]></description>
		<wfw:commentRss>http://people.iola.dk/arj/2009/12/01/django-alliance/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>2 great links</title>
		<link>http://people.iola.dk/arj/2008/05/26/2-great-links/</link>
		<comments>http://people.iola.dk/arj/2008/05/26/2-great-links/#comments</comments>
		<pubDate>Mon, 26 May 2008 14:38:42 +0000</pubDate>
		<dc:creator>Anders Rune Jensen</dc:creator>
				<category><![CDATA[iola]]></category>
		<category><![CDATA[On the web]]></category>

		<guid isPermaLink="false">http://people.iola.dk/arj/2008/05/26/2-great-links/</guid>
		<description><![CDATA[<p>I&#8217;ve been very happy enjoying these two pieces of distractions the last week. So happy I&#8217;ll write a small blog entry about it instead of just saving it to delicious <img src='http://people.iola.dk/arj/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>- Paul Graham on <a href="http://www.paulgraham.com/distraction.html">Disconnected Distraction</a></p>
<p>- <a href="http://www.justin.tv/hackertv/97862/DHH_Talk__Startup_School_2008">David Heinemeier Hansson on starting small</a></p>
]]></description>
		<wfw:commentRss>http://people.iola.dk/arj/2008/05/26/2-great-links/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Yayart.net launched</title>
		<link>http://people.iola.dk/arj/2008/04/17/yayartnet-launched/</link>
		<comments>http://people.iola.dk/arj/2008/04/17/yayartnet-launched/#comments</comments>
		<pubDate>Thu, 17 Apr 2008 15:19:02 +0000</pubDate>
		<dc:creator>Anders Rune Jensen</dc:creator>
				<category><![CDATA[iola]]></category>
		<category><![CDATA[On the web]]></category>
		<category><![CDATA[competition]]></category>
		<category><![CDATA[django]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[yayart]]></category>

		<guid isPermaLink="false">http://people.iola.dk/arj/2008/04/17/yayartnet-launched/</guid>
		<description><![CDATA[<p>I&#8217;m very please to announce that we, at <a href="http://www.iola.dk">iola</a>, have launched a new site for <a href="http://www.yayart.net">digital artists</a> today. For the 31 days there&#8217;s a competition where you can <a href="http://www.yayart.net/info/faq/#qaboutyayartist08">win lots of nice stuff</a> including an exhibition at the center of Copenhagen. The site is coded in <a href="http://www.python.org">Python</a> (<a href="http://www.djangoproject.com/">Django</a>) and uses <a href="http://varnish.projects.linpro.no/">varnish</a> for caching.</p>
]]></description>
		<wfw:commentRss>http://people.iola.dk/arj/2008/04/17/yayartnet-launched/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Nemo 0.2.2 released</title>
		<link>http://people.iola.dk/arj/2008/03/25/nemo-022-released/</link>
		<comments>http://people.iola.dk/arj/2008/03/25/nemo-022-released/#comments</comments>
		<pubDate>Mon, 24 Mar 2008 23:00:44 +0000</pubDate>
		<dc:creator>Anders Rune Jensen</dc:creator>
				<category><![CDATA[iola]]></category>
		<category><![CDATA[nemo]]></category>

		<guid isPermaLink="false">http://people.iola.dk/arj/2008/03/25/nemo-022-released/</guid>
		<description><![CDATA[<p>I made a new release of <a href="http://www.iola.dk/nemo/">Nemo</a> 0.2.2 today. It has some nice memory usage improvements and indexing fixes. Plus day view got pagination so that it can handle large number of files on a single day (like an svn update) gracefully. Upgrading is highly recommended.</p>
]]></description>
		<wfw:commentRss>http://people.iola.dk/arj/2008/03/25/nemo-022-released/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Nemo 0.2.1 released</title>
		<link>http://people.iola.dk/arj/2008/02/15/nemo-021-released/</link>
		<comments>http://people.iola.dk/arj/2008/02/15/nemo-021-released/#comments</comments>
		<pubDate>Thu, 14 Feb 2008 23:13:52 +0000</pubDate>
		<dc:creator>Anders Rune Jensen</dc:creator>
				<category><![CDATA[iola]]></category>
		<category><![CDATA[nemo]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://people.iola.dk/arj/2008/02/15/nemo-021-released/</guid>
		<description><![CDATA[<p>Did the release of <a href="http://www.iola.dk/nemo/">nemo</a> 0.2.1 today. The release is the result of a large amount of massaging of the nemo code to use less cpu and memory (a garbage collector suddently makes these interlinked in a new one is not usually familiar with when coming from a language like C++). Then some profiling and massaging of GTK# which is sadly still not 100% ready for prime time. And finally some poking at mono code <strike>for which I&#8217;m not ready with a patch yet (tomorrow it will be)</strike>, but I&#8217;ve <a href="https://bugzilla.novell.com/show_bug.cgi?id=362147">improved the performance</a> of the inotify backend of the filesystemwatcher by quite a bit especially when watching a large number of directories.</p>
]]></description>
		<wfw:commentRss>http://people.iola.dk/arj/2008/02/15/nemo-021-released/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Iimplement brain damage</title>
		<link>http://people.iola.dk/arj/2008/02/05/i-implement-brain-damage/</link>
		<comments>http://people.iola.dk/arj/2008/02/05/i-implement-brain-damage/#comments</comments>
		<pubDate>Tue, 05 Feb 2008 00:17:22 +0000</pubDate>
		<dc:creator>Anders Rune Jensen</dc:creator>
				<category><![CDATA[.net]]></category>
		<category><![CDATA[c#]]></category>
		<category><![CDATA[iola]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://people.iola.dk/arj/2008/02/05/i-implement-brain-damage/</guid>
		<description><![CDATA[<p>Had this annoying bug today where something that seemed perfectly resonable just didn&#8217;t work. After much investigation it appears that once again brain damage from Java has managed to over into C#. The problem is illustrated with the following code (You can ignore the Tuple for now):</p>
<pre class="prettyprint">
public struct Tuple &lt; TFirst,TSecond &gt;
{
    public TFirst first;
    public TSecond second;

    public Tuple(TFirst first, TSecond second)
   {
	this.first = first;
	this.second = second;
   }
}

[...]

Tuple &lt; int,string &gt; t = new Tuple &lt; int,string &gt;(1, "1");
Tuple &lt; int,string &gt; t2 = new Tuple &lt; int,string &gt;(2, "2");

List &lt; tuple &lt; int,string &gt; &gt; lt = new List &lt; tuple &lt; int,string &gt; &gt;();
lt.Add(t);
lt.Add(t2);

List &lt; tuple &lt; int,string &gt; &gt; lt2 = new List &lt; tuple &lt; int,string &gt; &gt;();
lt2.Add(t);
lt2.Add(t2);

System.Console.WriteLine("eq {0}, == {1}", lt.Equals(lt2), lt == lt2);</pre>
<p>Which gives the following result:</p>
<pre class="prettyprint">
eq False, == False</pre>
<p>Ok that was strange, in Python and C++ one doesn&#8217;t have to use Equal or anything similar and furthermore == gives the correct result since it compares elements memberwise instead of just checking the reference. I recalled that in Java one has to use Equal on strings, since == just compares references. So I googled around and found an explaination in point in the following link at <a href="http://http://www.andymcm.com/csharpfaq.htm">6.7</a>. Note all the special cases. The best part is the following paragraph: &#8220;The implementation of Equals() in System.Object (the one you&#8217;ll inherit by default if you write a class) compares identity, i.e. it&#8217;s the same as operator==&#8221;. Apparently List<t> doesn&#8217;t to that, <a href="http://technet.microsoft.com/en-us/library/ms173147(VS.80).aspx">despite their efforts to help</a>, great&#8230; So we&#8217;ll have to do that ourselves:</t></p>
<pre class="prettyprint">
public static IEnumerable &lt; tuple &lt; T1,T2 &gt; &gt; zip &lt; T1,T2 &gt;
(IEnumerable &lt; T1 &gt; l1, IEnumerable &lt; T2 &gt; l2)
{
   IEnumerator &lt; T1 &gt; i1 = l1.GetEnumerator();
   IEnumerator &lt; T2 &gt; i2 = l2.GetEnumerator();

   while (i1.MoveNext() &amp;&amp; i2.MoveNext())
       yield return new Tuple &lt; T1,T2 &gt; (i1.Current, i2.Current);
}

public static bool sorted_lists_equal &lt; T &gt; (List &lt; T &gt; l1, List &lt; T &gt; l2)
where T:IEquatable &lt; T &gt;
{
   if (l1.Count != l2.Count)
       return false;
   foreach (Tuple &lt; T, T &gt; t in zip &lt; T,T &gt;(l1, l2)) {
        if (!t.first.Equals(t.second))
              return false;
         }
   return true;
}</pre>
<p><a href="http://technet.microsoft.com/en-us/library/ms131187.aspx">IEquatable<t></t></a> is an interface what basically says that it will compare by value. But even though our Tuple implementation is a struct and thus is a ValueType it doesn&#8217;t implement this interface (the Equals method). It instead automatically defines the == operator to work as one expects since it&#8217;s a ValueType. So we have to change Tuple:</p>
<pre class="prettyprint">
public struct Tuple &lt; TFirst,TSecond &gt;
: IEquatable &lt; Tuple &lt; TFirst,TSecond &gt; &gt;
{
   public TFirst first;
   public TSecond second;

   public Tuple(TFirst first, TSecond second)
   {
	this.first = first;
	this.second = second;
   }

   public bool Equals(Tuple &lt; TFirst,TSecond &gt; other)
   {
      return first.Equals(other.first) &amp;&amp; second.Equals(other.second);
   }

    public static bool operator==(Tuple &lt; TFirst,TSecond &gt; lhs,
    Tuple &lt; TFirst,TSecond &gt; rhs)
    {
	return lhs.Equals(rhs);
    }

    public static bool operator!=(Tuple &lt; TFirst,TSecond &gt; lhs,
    Tuple &lt; TFirst,TSecond &gt; rhs)
    {
	return !(lhs == rhs);
    }
}</pre>
<p>The last two functions was added because now that we&#8217;re implementing the IEquatable interface the compiler doesn&#8217;t seem to want to implement == and !=.</p>
<p>So instead of the following Python code:</p>
<pre class="prettyprint">
a = [(1,"1"), (2,"2")]
b = [(1,"1"), (2,"2")]
a == b</pre>
<p>We have to do the big mess above :-/</p>
]]></description>
		<wfw:commentRss>http://people.iola.dk/arj/2008/02/05/i-implement-brain-damage/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Nemo 0.2.0 released</title>
		<link>http://people.iola.dk/arj/2008/01/10/nemo-020-released/</link>
		<comments>http://people.iola.dk/arj/2008/01/10/nemo-020-released/#comments</comments>
		<pubDate>Thu, 10 Jan 2008 16:53:09 +0000</pubDate>
		<dc:creator>Anders Rune Jensen</dc:creator>
				<category><![CDATA[iola]]></category>
		<category><![CDATA[nemo]]></category>

		<guid isPermaLink="false">http://people.iola.dk/arj/2008/01/10/nemo-020-released/</guid>
		<description><![CDATA[<p>Long time since I&#8217;ve blogged about <a href="http://www.iola.dk/nemo">Nemo</a>. Since the initial release a little over a month ago we have had two major releases, the <a href="http://www.iola.dk/nemo/blog/?p=22">first one</a> a bugfix release to fix some of the defects reported and the <a href="http://www.iola.dk/nemo/blog/?p=25">0.2 release</a> which adds support for beagle through Xesam and lots of other nice enhancements like pagination on the search results popup and better indexing performance. The software is still fresh but I consider this to be the first release that I would feel comfortable recommending to a stranger <img src='http://people.iola.dk/arj/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></description>
		<wfw:commentRss>http://people.iola.dk/arj/2008/01/10/nemo-020-released/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Server almost Ajaxianized</title>
		<link>http://people.iola.dk/arj/2007/12/05/server-almost-ajaxianized/</link>
		<comments>http://people.iola.dk/arj/2007/12/05/server-almost-ajaxianized/#comments</comments>
		<pubDate>Wed, 05 Dec 2007 17:36:55 +0000</pubDate>
		<dc:creator>Anders Rune Jensen</dc:creator>
				<category><![CDATA[Free Software]]></category>
		<category><![CDATA[iola]]></category>

		<guid isPermaLink="false">http://people.iola.dk/arj/2007/12/05/server-almost-ajaxianized/</guid>
		<description><![CDATA[<p><a href="http://people.iola.dk/olau/">Ole</a>, friend and collegue from <a href="http://www.iola.dk">iola</a>, released <a href="http://code.google.com/p/flot/">flot</a> today. Flot is a Javascript plot library for <a href="http://jquery.com/">jQuery</a> released under the MIT license. The release got mentioned on <a href="http://ajaxian.com/archives/plotting-in-jquery">Ajaxian</a> and brought the server this blog is also hosted on to its knees. Several hours later, out server is now up and running again with lighthttp as a proxy shield in front of the dear apache server that could handle the load <img src='http://people.iola.dk/arj/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>Check <a href="http://people.iola.dk/olau/flot/examples/">it out</a> if you need some client side web plotting. The graphs are quite nice since they are antialised and with shadows <img src='http://people.iola.dk/arj/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></description>
		<wfw:commentRss>http://people.iola.dk/arj/2007/12/05/server-almost-ajaxianized/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Announce Nemo 0.1</title>
		<link>http://people.iola.dk/arj/2007/11/28/announce-nemo-01/</link>
		<comments>http://people.iola.dk/arj/2007/11/28/announce-nemo-01/#comments</comments>
		<pubDate>Wed, 28 Nov 2007 20:16:57 +0000</pubDate>
		<dc:creator>Anders Rune Jensen</dc:creator>
				<category><![CDATA[iola]]></category>
		<category><![CDATA[nemo]]></category>

		<guid isPermaLink="false">http://people.iola.dk/arj/2007/11/28/announce-nemo-01/</guid>
		<description><![CDATA[<p>I&#8217;m very pleased that I can now finally <a href="http://www.iola.dk/nemo/">lift the curtain</a> and show what I&#8217;ve been spending most of my time working at <a href="http://www.iola.dk">iola</a> on.</p>
<p><a href="http://www.iola.dk/nemo/"><img src="http://www.iola.dk/nemo/screenshot1.png" height="254" width="400" /></a></p>
<p>It&#8217;s been a long ride, but now the alpha release is finally ready for public consumption <img src='http://people.iola.dk/arj/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></description>
		<wfw:commentRss>http://people.iola.dk/arj/2007/11/28/announce-nemo-01/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The problem with depending on a server</title>
		<link>http://people.iola.dk/arj/2007/11/26/the-problem-with-depending-on-a-server/</link>
		<comments>http://people.iola.dk/arj/2007/11/26/the-problem-with-depending-on-a-server/#comments</comments>
		<pubDate>Mon, 26 Nov 2007 08:07:53 +0000</pubDate>
		<dc:creator>Anders Rune Jensen</dc:creator>
				<category><![CDATA[distributed]]></category>
		<category><![CDATA[iola]]></category>
		<category><![CDATA[VCS]]></category>

		<guid isPermaLink="false">http://people.iola.dk/arj/2007/11/26/the-problem-with-depending-on-a-server/</guid>
		<description><![CDATA[<p>So here at <a href="http://www.iola.dk">iola</a> we use subversion internally. It&#8217;s ridiculus that the following use case doesn&#8217;t work:</p>
<p>&lt;do stuff&gt;</p>
<p>svn commit</p>
<p>&lt;do stuff&gt;</p>
<p>svn commit</p>
<p>&lt;I forgot what I had written in last commit log&gt;</p>
<p>svn log (local copy out of date, only shows revision before the first commit)</p>
<p>svn update</p>
<p>svn: Working copy &#8216;.&#8217; locked<br />
svn: run &#8216;svn cleanup&#8217; to remove locks (type &#8216;svn help cleanup&#8217; for details)</p>
<p>Owned <img src='http://people.iola.dk/arj/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> </p>
]]></description>
		<wfw:commentRss>http://people.iola.dk/arj/2007/11/26/the-problem-with-depending-on-a-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

