<?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>therning.org/ magnus</title>
	<atom:link href="http://therning.org/magnus/feed" rel="self" type="application/rss+xml" />
	<link>http://therning.org/magnus</link>
	<description>Incoherent mumblings</description>
	<lastBuildDate>Thu, 09 Aug 2012 09:30:36 +0000</lastBuildDate>
	<language>en-GB</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>Eclipse and greyed out #ifdef sections</title>
		<link>http://therning.org/magnus/archives/1099</link>
		<comments>http://therning.org/magnus/archives/1099#comments</comments>
		<pubDate>Thu, 09 Aug 2012 09:30:36 +0000</pubDate>
		<dc:creator>Magnus</dc:creator>
				<category><![CDATA[Posts]]></category>
		<category><![CDATA[eclipse]]></category>
		<category><![CDATA[grey]]></category>
		<category><![CDATA[ifdef]]></category>

		<guid isPermaLink="false">http://therning.org/magnus/?p=1099</guid>
		<description><![CDATA[A note to the future me: Are your #ifdef sections greyed out despite switching to a profile where the macro is set? Read this bug comment!]]></description>
				<content:encoded><![CDATA[<p>A note to the future me:</p>

<p>Are your <code>#ifdef</code> sections greyed out despite switching to a profile where the macro is set?</p>

<p>Read <a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=313933#c1">this bug comment</a>!</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Ftherning.org%2Fmagnus%2Farchives%2F1099&amp;title=Eclipse%20and%20greyed%20out%20%23ifdef%20sections" id="wpa2a_2">Share/Bookmark</a></p>]]></content:encoded>
			<wfw:commentRss>http://therning.org/magnus/archives/1099/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Strachey, referential transparency, Haskell</title>
		<link>http://therning.org/magnus/archives/1093</link>
		<comments>http://therning.org/magnus/archives/1093#comments</comments>
		<pubDate>Sun, 05 Aug 2012 04:22:37 +0000</pubDate>
		<dc:creator>Magnus</dc:creator>
				<category><![CDATA[Posts]]></category>
		<category><![CDATA[haskell]]></category>
		<category><![CDATA[referential transparency]]></category>
		<category><![CDATA[strachey]]></category>

		<guid isPermaLink="false">http://therning.org/magnus/?p=1093</guid>
		<description><![CDATA[This is my input into the recent discussion on referential transparency (RT). I&#8217;m nowhere near as well versed in the subject as others, but how am I ever to learn anything unless I put my thoughts out there for them to be laughed at and ridiculed? It all started with a post on stackoverflow.com, which [...]]]></description>
				<content:encoded><![CDATA[<p>This is my input into the recent discussion on referential transparency (RT). I&#8217;m nowhere near as well versed in the subject as others, but how am I ever to learn anything unless I put my thoughts out there for them to be laughed at and ridiculed? <img src='http://therning.org/magnus/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>

<p>It all started with a <a href="http://stackoverflow.com/questions/210835/what-is-referential-transparency">post on stackoverflow.com</a>, which received several very long and detailed responses, in particular from Uday Reddy (<a href="http://stackoverflow.com/a/9859966">here</a> and <a href="http://stackoverflow.com/a/11740176">here</a>). His answers were also linked to from <a href="http://www.reddit.com/r/haskell/comments/xgq27/uday_reddy_sharpens_up_referential_transparency/">Reddit</a>. His second response contains a link to an excellent paper by Strachey, <a href="http://www.itu.dk/courses/BPRD/E2009/fundamental-1967.pdf">Fundamental concepts in programming languages</a>. I&#8217;d go as far as saying that, despite it being lecture notes rather than a fully worked paper, it ought to be required reading for all software developers.</p>

<p>The rest of what I write here hinges on me actually understanding what Strachey writes in his paper. Of course I&#8217;m looking forward to comments/corrections/etc that help me correct my understanding.</p>

<h3 id="what-strachey-says-about-rt">What Strachey says about RT</h3>

<p>In section 3.2.1 he introduces RT like this:</p>

<blockquote>
<p>One of the most useful properties of expressions is that called by Quine <em>referential transparency</em>. In essence this means that if we wish to find the value of an expression which contains a sub-expression, the only thing we need to know about the sub-expression is its value. Any other features of the sub-expression, such as its internal structure, the number and nature of its components, the order in which they are evaluated or the colour of the ink in which they are written, are irrelevant to the value of the main expression.</p>
</blockquote>

<p>There is however a crucial bit just before that:</p>

<blockquote>
<p>Like the rest of mathematics, we shall be concerned only with <em>R-values</em>.</p>
</blockquote>

<p>That is, he starts out with a very limited subset of what most people would consider a usable imperative programming language.</p>

<p>He then dives into some more details in section 3.2.2 by adding the concept of environment, which is handled through the use of a <em>where-clause</em>, or alternatively using <em>let-statements</em> (this ought to be making any Haskell developer feel right at home). After a few interesting sections on stuff like applicative structure, evaluation, and conditional expressions he finally tackles the issue of variables in section 3.3.1. There are two pieces to the trick, the first is to take advantage of his earlier insight that lead to a split of <em>values</em> into <em>L-values</em> and <em>R-values</em>:</p>

<blockquote>
<p>If we consider <em>L-values</em> as well as <em>R-values</em>, however, we can preserve referential transparency as far as <em>L-values</em> are concerned. This is because <em>L-values</em>, being generalised addresses, are not altered by assignment commands. Thus the command <code>x := x+1</code> leaves the address of the cell representing <code>x</code> (<em>L-value</em> of <code>x</code>) unchanged although it does alter the contents of this cell (<em>R-value</em> of <code>x</code>). So if we agree that the values concerned are all <em>L-values</em>, we can continue to use <em>where-clauses</em> and lambda-expressions for describing parts of a program which include assignments.</p>
</blockquote>

<p>The cost of this is that the entire theory constructed earlier for operations taking <em>R-values</em> now has to be revised to incorporate <em>L-values</em>. The outline for this is in the rest of section 3.3 and it basically comes down to <em>include an abstract store in the environment</em>. However, before doing that he mentions that:</p>

<blockquote>
<p>I think these problems are inevitable and although much of the work remains to be done, I feel hopeful that when completed it will not seem so formidable as it does at present, and that it will bring clarification to many areas of programming language study which are very obscure today. In particular the problems of side effects will, I hope, become more amenable.</p>
</blockquote>

<p>He does reach his goal, but it&#8217;s a bit unfortunate that he stops short of considering the wider of problem of side effects. My assumption is that this would have to be dealt with in a similar way to assignment, but that would mean that rather than just adding an store to the environment the world, or a subset of it, would need to be added.</p>

<p>An open question (to me) is if anyone has built on Strachey&#8217;s work in this area and thought of the details of RT and general side effects?</p>

<h3 id="rt-in-haskell">RT in Haskell</h3>

<p>The <a href="http://stackoverflow.com/questions/210835/what-is-referential-transparency">original question</a> described RT as</p>

<blockquote>
<p>it means you can replace equals with equals</p>
</blockquote>

<p>which I actually think is a rather good, and very short, description of it. It&#8217;s not the full story, there are further important details, but it&#8217;s a good first intuition. Also, it&#8217;s a description usable in Haskell. Well, to be slightly more nuanced, it good for <em>Haskell without IO</em> (Haskell-IO). However, this is where the strict type system of Haskell really starts to shine because (here I&#8217;m probably a bit imprecise) we only have <em>R-values</em> in Haskell-IO. If we want to use assignment we add the use of a state monad, and <em>we do that explicitly</em>.</p>

<p>A former colleague of mine said that in Haskell we need to build up our own computational models ourselves. For instance, if we need assigment we use <em>State</em>, if we need to record progress we use <em>Writer</em>, etc. In other languages the language designer has already made all those choices for us, we don&#8217;t get to make them ourselves. For RT it means that Haskell is <em>more explicit</em> in what the environment of a function is.</p>

<p>Moving on to general side effects those are also more explicit in Haskell since they have to happen inside the <em>IO</em> monad. That alone is a great boon for RT in Haskell since it becomes explicit where RT as worked out by Strachey applies directly, and where there are (hopefully amenable) problems of side effects left. Even further, in Haskell it&#8217;s possible to make <em>subsets of IO</em> (by wrapping IO, see e.g. my own posts on <a href="http://therning.org/magnus/archives/738">wrapping IO, part 1</a> and <a href="http://therning.org/magnus/archives/742">wrapping IO, part 2</a>). I&#8217;m sure that <em>if</em> including the world in the environment is the way to achieve RT with general side effects, then it&#8217;s highly beneficial to be able to create subsets of the world.</p>

<h3 id="rt-in-haskell-vs.-rt-in-common-imperative-languages">RT in Haskell vs. RT in (common) imperative languages</h3>

<p>Uday writes in <a href="http://stackoverflow.com/a/9859966">his first answer</a> that:</p>

<blockquote>
<p>But, today, functional programmers claim that imperative programming languages are not referentially transparent. Strachey would be turning in his grave.</p>
</blockquote>

<p>This may well be true, but I think that when a Haskell programmer says it, he&#8217;s only twitching slightly. The reason? Strachey writes:</p>

<blockquote>
<p>Any departure of <em>R-value</em> referential transparency in a <em>R-value</em> context should either be eliminated by decomposing the expression into several commands and simpler expressions, or, if this turns out to be difficult, the subject of a comment.</p>
</blockquote>

<p>Which is something that Haskell programmers do naturally by use of <em>IO</em>. That is, in Haskell you either have an <em>R-value</em>, and you clearly see that you do, or you put in a comment, which is encoded in the type of the function.</p>

<p>This rather lengthy post basically arrives at the following, which is what I suspect the user [<em>pacala</em> is saying about RT on Reddit][reddit-pacala]:</p>

<blockquote>
<p>Imperative languages my well be RT, but when trying to understand a code base the environment of each function is so large that understanding is an intractable problem. I don&#8217;t have this problem in Haskell.</p>
</blockquote>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Ftherning.org%2Fmagnus%2Farchives%2F1093&amp;title=Strachey%2C%20referential%20transparency%2C%20Haskell" id="wpa2a_4">Share/Bookmark</a></p>]]></content:encoded>
			<wfw:commentRss>http://therning.org/magnus/archives/1093/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Compiling boost for Windows, with MinGW on Linux</title>
		<link>http://therning.org/magnus/archives/1078</link>
		<comments>http://therning.org/magnus/archives/1078#comments</comments>
		<pubDate>Wed, 25 Jul 2012 19:37:34 +0000</pubDate>
		<dc:creator>Magnus</dc:creator>
				<category><![CDATA[Posts]]></category>
		<category><![CDATA[boost]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[mingw]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://therning.org/magnus/?p=1078</guid>
		<description><![CDATA[Just in case you see the utter logic in developing for Windows on Linux In the root of the unpacked Boost: Run ./bootstrap.sh --with-python=$(which python2) --prefix=${HOME}/opt/boost-win --without-icu Modify project-config.jam like this: # file. if ! gcc in [ feature.values ] { - using gcc ; + using gcc : : i486-mingw32-g++ ; } project : [...]]]></description>
				<content:encoded><![CDATA[<p>Just in case you see the utter logic in developing for Windows on Linux <img src='http://therning.org/magnus/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>

<p>In the root of the unpacked Boost:</p>

<ol>
<li>Run <code>./bootstrap.sh --with-python=$(which python2) --prefix=${HOME}/opt/boost-win --without-icu</code></li>
<li>Modify <code>project-config.jam</code> like this:<pre>
     # file.
     if ! gcc in [ feature.values <toolset> ]
     {
    -    using gcc ;
    +    using gcc : : i486-mingw32-g++ ;
     }
    
     project : default-build </toolset><toolset>gcc ;</toolset></pre></li>
<li>Compile and install by running <code>./bjam --layout=system variant=release threading=multi link=shared runtime-link=shared toolset=gcc target-os=windows threadapi=win32 install</code></li>
</ol>

<p>Limit what is built by adding e.g. <code>--with-program_options</code> to that last command.</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Ftherning.org%2Fmagnus%2Farchives%2F1078&amp;title=Compiling%20boost%20for%20Windows%2C%20with%20MinGW%20on%20Linux" id="wpa2a_6">Share/Bookmark</a></p>]]></content:encoded>
			<wfw:commentRss>http://therning.org/magnus/archives/1078/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Qt state machines and automatic timed transitions</title>
		<link>http://therning.org/magnus/archives/1051</link>
		<comments>http://therning.org/magnus/archives/1051#comments</comments>
		<pubDate>Wed, 27 Jun 2012 21:49:14 +0000</pubDate>
		<dc:creator>Magnus</dc:creator>
				<category><![CDATA[Posts]]></category>
		<category><![CDATA[cpp]]></category>
		<category><![CDATA[embedded]]></category>
		<category><![CDATA[qt]]></category>

		<guid isPermaLink="false">http://therning.org/magnus/?p=1051</guid>
		<description><![CDATA[In the interest of full disclosure: this post is related to what I do for a living, development of and for embedded systems. I work for Semcon, but they don&#8217;t make me wear a suit and tie so these are my words, and mine alone. A bit of background info In a recent project we [...]]]></description>
				<content:encoded><![CDATA[<p>In the interest of full disclosure: this post is related to what I do for a living, development of and for embedded systems. I work for <a href="http://www.semcon.com/">Semcon</a>, but they don&#8217;t make me wear a suit and tie so these are my words, and mine alone.</p>

<h3>A bit of background info</h3>

<p>In a recent project we had a system where the turning of the wheels were controlled by a simple dial.  It emitted pulses as it was turned and the pulse train was shifted slightly depending on the direction of the turn.  In software this was mapped onto two signals, one for each direction, with one signal emitted for each pulse in the train.  All very straight forward so far.</p>

<p>To avoid accidental change of direction we decided that</p>

<ol>
<li>only start turning the wheels after having received four initial signals, and</li>
<li>if a full second without receiving any signal meant that the turning had stopped.</li>
</ol>

<h3>The solution</h3>

<p>The application was to be implemented using Qt, so using the Qt state machine framework was an obvious choice.  The full state machine wouldn&#8217;t have to be large, only 8 states.  The initial state (<code>sResting</code>) would indicate that the system was in a steady state (no turning), from there any received signal would advance into a successive state (<code>sOne</code>, <code>sTwo</code>, <code>sThree</code>, <code>sFour</code>) to indicate the number of received signals.  From the fourth state the machine would advance directly to a state (<code>sTurning</code>) where a received signal would initiate an actual turn of the wheels.  The turning would happen upon the entry into two separate states (<code>sTurnRight</code> and <code>sTurnLeft</code>), each of these states would instantly return to <code>sTurning</code>.  All of this is simple and straight forward, what wasn&#8217;t so clear was to implement the automatic return to the initial state after 1s of inactivity.</p>

<h3>The implementation</h3>

<p>As I like to do, I first experimented a little to find a suitable solution to the problem.  What follows is the resulting code of that experiment.  The final code used in the project ended up being very similar.  It&#8217;s all based around the method <code>postDelayedEvent()</code> found in <code>QStateMachine</code>.</p>

<p>First off a new type of event is nedded, a <code>ReturnEvent</code>:</p>


<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
</pre></td><td class="code"><pre class="cpp-qt" style="font-family:monospace;"><span style="color: #0057AE;">class</span> ReturnEvent <span style="color: #006E28;">:</span> <span style="color: #0057AE;">public</span> <span style="color: #22aadd;">QEvent</span>
<span style="color: #006E28;">&#123;</span>
<span style="color: #0057AE;">public</span><span style="color: #006E28;">:</span>
    ReturnEvent<span style="color: #006E28;">&#40;</span><span style="color: #006E28;">&#41;</span> <span style="color: #006E28;">:</span> <span style="color: #22aadd;">QEvent</span><span style="color: #006E28;">&#40;</span><span style="color: #22aadd;">QEvent</span><span style="color: #006E28;">::</span><span style="color: #2B74C7;">Type</span><span style="color: #006E28;">&#40;</span><span style="color: #22aadd;">QEvent</span><span style="color: #006E28;">::</span><span style="color: #2B74C7;">User</span> <span style="color: #006E28;">+</span> <span style="color: #B08000;">1</span><span style="color: #006E28;">&#41;</span><span style="color: #006E28;">&#41;</span> <span style="color: #006E28;">&#123;</span><span style="color: #006E28;">&#125;</span>
<span style="color: #006E28;">&#125;</span><span style="color: #006E28;">;</span></pre></td></tr></table></div>


<p>There is also a need for a new type of transition, <code>ReturnTransition</code>:</p>


<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
</pre></td><td class="code"><pre class="cpp-qt" style="font-family:monospace;"><span style="color: #0057AE;">class</span> ReturnTransition <span style="color: #006E28;">:</span> <span style="color: #0057AE;">public</span> QAbstractTransition
<span style="color: #006E28;">&#123;</span>
<span style="color: #0057AE;">public</span><span style="color: #006E28;">:</span>
    ReturnTransition<span style="color: #006E28;">&#40;</span>QState <span style="color: #006E28;">*</span>target<span style="color: #006E28;">=</span><span style="color: #B08000;">0</span><span style="color: #006E28;">&#41;</span> <span style="color: #006E28;">&#123;</span> <span style="color: #000000; font-weight:bold;">if</span><span style="color: #006E28;">&#40;</span>target<span style="color: #006E28;">&#41;</span> setTargetState<span style="color: #006E28;">&#40;</span>target<span style="color: #006E28;">&#41;</span><span style="color: #006E28;">;</span> <span style="color: #006E28;">&#125;</span>
&nbsp;
<span style="color: #0057AE;">protected</span><span style="color: #006E28;">:</span>
    <span style="color: #0057AE;">virtual</span> <span style="color: #0057AE;">bool</span> eventTest<span style="color: #006E28;">&#40;</span><span style="color: #22aadd;">QEvent</span> <span style="color: #006E28;">*</span>e<span style="color: #006E28;">&#41;</span> <span style="color: #006E28;">&#123;</span>
        <span style="color: #000000; font-weight:bold;">return</span><span style="color: #006E28;">&#40;</span>e<span style="color: #006E28;">-&gt;</span><span style="color: #2B74C7;">type</span><span style="color: #006E28;">&#40;</span><span style="color: #006E28;">&#41;</span> <span style="color: #006E28;">==</span> <span style="color: #22aadd;">QEvent</span><span style="color: #006E28;">::</span><span style="color: #2B74C7;">Type</span><span style="color: #006E28;">&#40;</span><span style="color: #22aadd;">QEvent</span><span style="color: #006E28;">::</span><span style="color: #2B74C7;">User</span> <span style="color: #006E28;">+</span> <span style="color: #B08000;">1</span><span style="color: #006E28;">&#41;</span><span style="color: #006E28;">&#41;</span><span style="color: #006E28;">;</span>
    <span style="color: #006E28;">&#125;</span>
&nbsp;
    <span style="color: #0057AE;">virtual</span> <span style="color: #0057AE;">void</span> onTransition<span style="color: #006E28;">&#40;</span><span style="color: #22aadd;">QEvent</span> <span style="color: #006E28;">*</span><span style="color: #006E28;">&#41;</span> <span style="color: #006E28;">&#123;</span><span style="color: #006E28;">&#125;</span>
<span style="color: #006E28;">&#125;</span><span style="color: #006E28;">;</span></pre></td></tr></table></div>


<p>For the experiment I decided to use a simple widget containing two buttons, it would also hold the state machine:</p>


<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
</pre></td><td class="code"><pre class="cpp-qt" style="font-family:monospace;"><span style="color: #0057AE;">class</span> MButtons <span style="color: #006E28;">:</span> <span style="color: #0057AE;">public</span> <span style="color: #22aadd;">QWidget</span>
<span style="color: #006E28;">&#123;</span>
    Q_OBJECT<span style="color: #006E28;">;</span>
&nbsp;
<span style="color: #0057AE;">public</span><span style="color: #006E28;">:</span>
    MButtons<span style="color: #006E28;">&#40;</span>QStateMachine <span style="color: #006E28;">&amp;</span>m<span style="color: #006E28;">&#41;</span>
        <span style="color: #006E28;">:</span> _right<span style="color: #006E28;">&#40;</span><span style="color: #BF0303;">&quot;Right&quot;</span><span style="color: #006E28;">&#41;</span><span style="color: #006E28;">,</span> _left<span style="color: #006E28;">&#40;</span><span style="color: #BF0303;">&quot;Left&quot;</span><span style="color: #006E28;">&#41;</span><span style="color: #006E28;">,</span>
        _m<span style="color: #006E28;">&#40;</span>m<span style="color: #006E28;">&#41;</span><span style="color: #006E28;">,</span> _delayed<span style="color: #006E28;">&#40;</span><span style="color: #B08000;">0</span><span style="color: #006E28;">&#41;</span> <span style="color: #006E28;">&#123;</span>
        <span style="color: #22aadd;">QBoxLayout</span> <span style="color: #006E28;">*</span>lo <span style="color: #006E28;">=</span> <span style="color: #000000; font-weight:bold;">new</span> <span style="color: #22aadd;">QBoxLayout</span><span style="color: #006E28;">&#40;</span><span style="color: #22aadd;">QBoxLayout</span><span style="color: #006E28;">::</span><span style="color: #2B74C7;">TopToBottom</span><span style="color: #006E28;">&#41;</span><span style="color: #006E28;">;</span>
        lo<span style="color: #006E28;">-&gt;</span><span style="color: #2B74C7;">addWidget</span><span style="color: #006E28;">&#40;</span><span style="color: #006E28;">&amp;</span>_right<span style="color: #006E28;">&#41;</span><span style="color: #006E28;">;</span>
        lo<span style="color: #006E28;">-&gt;</span><span style="color: #2B74C7;">addWidget</span><span style="color: #006E28;">&#40;</span><span style="color: #006E28;">&amp;</span>_left<span style="color: #006E28;">&#41;</span><span style="color: #006E28;">;</span>
&nbsp;
        setLayout<span style="color: #006E28;">&#40;</span>lo<span style="color: #006E28;">&#41;</span><span style="color: #006E28;">;</span>
    <span style="color: #006E28;">&#125;</span>
    <span style="color: #0057AE;">virtual</span> ~MButtons<span style="color: #006E28;">&#40;</span><span style="color: #006E28;">&#41;</span> <span style="color: #006E28;">&#123;</span><span style="color: #006E28;">&#125;</span>
&nbsp;
    <span style="color: #22aadd;">QPushButton</span> _right<span style="color: #006E28;">,</span>
                _left<span style="color: #006E28;">;</span>
    QStateMachine <span style="color: #006E28;">&amp;</span>_m<span style="color: #006E28;">;</span></pre></td></tr></table></div>


<p>The widget also holds the slots for all the state entry functions:</p>


<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
</pre></td><td class="code"><pre class="cpp-qt" style="font-family:monospace;"><span style="color: #0057AE;">public</span> <span style="color: #0057AE;">slots</span><span style="color: #006E28;">:</span>
    <span style="color: #0057AE;">void</span> sRestingEntered<span style="color: #006E28;">&#40;</span><span style="color: #006E28;">&#41;</span> <span style="color: #006E28;">&#123;</span>
        <span style="color: #0057AE;">qDebug</span><span style="color: #006E28;">&#40;</span><span style="color: #006E28;">&#41;</span> <span style="color: #006E28;">&lt;&lt;</span> __PRETTY_FUNCTION__<span style="color: #006E28;">;</span>
        <span style="color: #000000; font-weight:bold;">if</span><span style="color: #006E28;">&#40;</span>_delayed<span style="color: #006E28;">&#41;</span> <span style="color: #006E28;">&#123;</span> _m.<span style="color: #2B74C7;">cancelDelayedEvent</span><span style="color: #006E28;">&#40;</span>_delayed<span style="color: #006E28;">&#41;</span><span style="color: #006E28;">;</span> _delayed <span style="color: #006E28;">=</span> <span style="color: #B08000;">0</span><span style="color: #006E28;">;</span> <span style="color: #006E28;">&#125;</span>
    <span style="color: #006E28;">&#125;</span>
&nbsp;
    <span style="color: #0057AE;">void</span> sOneEntered<span style="color: #006E28;">&#40;</span><span style="color: #006E28;">&#41;</span> <span style="color: #006E28;">&#123;</span>
        <span style="color: #0057AE;">qDebug</span><span style="color: #006E28;">&#40;</span><span style="color: #006E28;">&#41;</span> <span style="color: #006E28;">&lt;&lt;</span> __PRETTY_FUNCTION__<span style="color: #006E28;">;</span>
        <span style="color: #000000; font-weight:bold;">if</span><span style="color: #006E28;">&#40;</span>_delayed<span style="color: #006E28;">&#41;</span> <span style="color: #006E28;">&#123;</span> _m.<span style="color: #2B74C7;">cancelDelayedEvent</span><span style="color: #006E28;">&#40;</span>_delayed<span style="color: #006E28;">&#41;</span><span style="color: #006E28;">;</span> _delayed <span style="color: #006E28;">=</span> <span style="color: #B08000;">0</span><span style="color: #006E28;">;</span> <span style="color: #006E28;">&#125;</span>
        _delayed <span style="color: #006E28;">=</span> _m.<span style="color: #2B74C7;">postDelayedEvent</span><span style="color: #006E28;">&#40;</span><span style="color: #000000; font-weight:bold;">new</span> ReturnEvent<span style="color: #006E28;">,</span> <span style="color: #B08000;">1000</span><span style="color: #006E28;">&#41;</span><span style="color: #006E28;">;</span>
    <span style="color: #006E28;">&#125;</span>
&nbsp;
    <span style="color: #0057AE;">void</span> sTwoEntered<span style="color: #006E28;">&#40;</span><span style="color: #006E28;">&#41;</span> <span style="color: #006E28;">&#123;</span>
        <span style="color: #0057AE;">qDebug</span><span style="color: #006E28;">&#40;</span><span style="color: #006E28;">&#41;</span> <span style="color: #006E28;">&lt;&lt;</span> __PRETTY_FUNCTION__<span style="color: #006E28;">;</span>
        <span style="color: #000000; font-weight:bold;">if</span><span style="color: #006E28;">&#40;</span>_delayed<span style="color: #006E28;">&#41;</span> <span style="color: #006E28;">&#123;</span> _m.<span style="color: #2B74C7;">cancelDelayedEvent</span><span style="color: #006E28;">&#40;</span>_delayed<span style="color: #006E28;">&#41;</span><span style="color: #006E28;">;</span> _delayed <span style="color: #006E28;">=</span> <span style="color: #B08000;">0</span><span style="color: #006E28;">;</span> <span style="color: #006E28;">&#125;</span>
        _delayed <span style="color: #006E28;">=</span> _m.<span style="color: #2B74C7;">postDelayedEvent</span><span style="color: #006E28;">&#40;</span><span style="color: #000000; font-weight:bold;">new</span> ReturnEvent<span style="color: #006E28;">,</span> <span style="color: #B08000;">1000</span><span style="color: #006E28;">&#41;</span><span style="color: #006E28;">;</span>
    <span style="color: #006E28;">&#125;</span>
    <span style="color: #0057AE;">void</span> sThreeEntered<span style="color: #006E28;">&#40;</span><span style="color: #006E28;">&#41;</span> <span style="color: #006E28;">&#123;</span>
        <span style="color: #0057AE;">qDebug</span><span style="color: #006E28;">&#40;</span><span style="color: #006E28;">&#41;</span> <span style="color: #006E28;">&lt;&lt;</span> __PRETTY_FUNCTION__<span style="color: #006E28;">;</span>
        <span style="color: #000000; font-weight:bold;">if</span><span style="color: #006E28;">&#40;</span>_delayed<span style="color: #006E28;">&#41;</span> <span style="color: #006E28;">&#123;</span> _m.<span style="color: #2B74C7;">cancelDelayedEvent</span><span style="color: #006E28;">&#40;</span>_delayed<span style="color: #006E28;">&#41;</span><span style="color: #006E28;">;</span> _delayed <span style="color: #006E28;">=</span> <span style="color: #B08000;">0</span><span style="color: #006E28;">;</span> <span style="color: #006E28;">&#125;</span>
        _delayed <span style="color: #006E28;">=</span> _m.<span style="color: #2B74C7;">postDelayedEvent</span><span style="color: #006E28;">&#40;</span><span style="color: #000000; font-weight:bold;">new</span> ReturnEvent<span style="color: #006E28;">,</span> <span style="color: #B08000;">1000</span><span style="color: #006E28;">&#41;</span><span style="color: #006E28;">;</span>
    <span style="color: #006E28;">&#125;</span>
    <span style="color: #0057AE;">void</span> sFourEntered<span style="color: #006E28;">&#40;</span><span style="color: #006E28;">&#41;</span> <span style="color: #006E28;">&#123;</span>
        <span style="color: #0057AE;">qDebug</span><span style="color: #006E28;">&#40;</span><span style="color: #006E28;">&#41;</span> <span style="color: #006E28;">&lt;&lt;</span> __PRETTY_FUNCTION__<span style="color: #006E28;">;</span>
        <span style="color: #000000; font-weight:bold;">if</span><span style="color: #006E28;">&#40;</span>_delayed<span style="color: #006E28;">&#41;</span> <span style="color: #006E28;">&#123;</span> _m.<span style="color: #2B74C7;">cancelDelayedEvent</span><span style="color: #006E28;">&#40;</span>_delayed<span style="color: #006E28;">&#41;</span><span style="color: #006E28;">;</span> _delayed <span style="color: #006E28;">=</span> <span style="color: #B08000;">0</span><span style="color: #006E28;">;</span> <span style="color: #006E28;">&#125;</span>
        _delayed <span style="color: #006E28;">=</span> _m.<span style="color: #2B74C7;">postDelayedEvent</span><span style="color: #006E28;">&#40;</span><span style="color: #000000; font-weight:bold;">new</span> ReturnEvent<span style="color: #006E28;">,</span> <span style="color: #B08000;">1000</span><span style="color: #006E28;">&#41;</span><span style="color: #006E28;">;</span>
    <span style="color: #006E28;">&#125;</span>
    <span style="color: #0057AE;">void</span> sTurningEntered<span style="color: #006E28;">&#40;</span><span style="color: #006E28;">&#41;</span> <span style="color: #006E28;">&#123;</span>
        <span style="color: #0057AE;">qDebug</span><span style="color: #006E28;">&#40;</span><span style="color: #006E28;">&#41;</span> <span style="color: #006E28;">&lt;&lt;</span> __PRETTY_FUNCTION__<span style="color: #006E28;">;</span>
        <span style="color: #000000; font-weight:bold;">if</span><span style="color: #006E28;">&#40;</span>_delayed<span style="color: #006E28;">&#41;</span> <span style="color: #006E28;">&#123;</span> _m.<span style="color: #2B74C7;">cancelDelayedEvent</span><span style="color: #006E28;">&#40;</span>_delayed<span style="color: #006E28;">&#41;</span><span style="color: #006E28;">;</span> _delayed <span style="color: #006E28;">=</span> <span style="color: #B08000;">0</span><span style="color: #006E28;">;</span> <span style="color: #006E28;">&#125;</span>
        _delayed <span style="color: #006E28;">=</span> _m.<span style="color: #2B74C7;">postDelayedEvent</span><span style="color: #006E28;">&#40;</span><span style="color: #000000; font-weight:bold;">new</span> ReturnEvent<span style="color: #006E28;">,</span> <span style="color: #B08000;">1000</span><span style="color: #006E28;">&#41;</span><span style="color: #006E28;">;</span>
    <span style="color: #006E28;">&#125;</span>
    <span style="color: #0057AE;">void</span> sTurnRightEntered<span style="color: #006E28;">&#40;</span><span style="color: #006E28;">&#41;</span> <span style="color: #006E28;">&#123;</span>
        <span style="color: #0057AE;">qDebug</span><span style="color: #006E28;">&#40;</span><span style="color: #006E28;">&#41;</span> <span style="color: #006E28;">&lt;&lt;</span> __PRETTY_FUNCTION__<span style="color: #006E28;">;</span>
    <span style="color: #006E28;">&#125;</span>
    <span style="color: #0057AE;">void</span> sTurnLeftEntered<span style="color: #006E28;">&#40;</span><span style="color: #006E28;">&#41;</span> <span style="color: #006E28;">&#123;</span>
        <span style="color: #0057AE;">qDebug</span><span style="color: #006E28;">&#40;</span><span style="color: #006E28;">&#41;</span> <span style="color: #006E28;">&lt;&lt;</span> __PRETTY_FUNCTION__<span style="color: #006E28;">;</span>
    <span style="color: #006E28;">&#125;</span></pre></td></tr></table></div>


<p>Sure, several of the entry functions could be folded into one, but in order to validate the idea it&#8217;s easier to make separate ones for each state.  The pattern is easy to spot, on entry a delayed return event is registered (if there&#8217;s a previous one its replaced with a new), except for the steady state (<code>sResting</code>) where any delayed event is removed, and the turning states (<code>sTurnRight</code> and <code>sTurnLeft</code>) since those states immediately return to <code>sTurning</code> anyway.</p>

<p>Finally it also holds the handle for the delayed event:</p>


<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>58
59
60
</pre></td><td class="code"><pre class="cpp-qt" style="font-family:monospace;"><span style="color: #0057AE;">private</span><span style="color: #006E28;">:</span>
    <span style="color: #0057AE;">int</span> _delayed<span style="color: #006E28;">;</span>
<span style="color: #006E28;">&#125;</span><span style="color: #006E28;">;</span></pre></td></tr></table></div>


<p>Now the main function for setting it all up is simple:</p>


<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
</pre></td><td class="code"><pre class="cpp-qt" style="font-family:monospace;"><span style="color: #0057AE;">int</span> main<span style="color: #006E28;">&#40;</span><span style="color: #0057AE;">int</span> argc<span style="color: #006E28;">,</span> <span style="color: #0057AE;">char</span> <span style="color: #006E28;">**</span>argv<span style="color: #006E28;">&#41;</span>
<span style="color: #006E28;">&#123;</span>
    <span style="color: #22aadd;">QApplication</span> app<span style="color: #006E28;">&#40;</span>argc<span style="color: #006E28;">,</span> argv<span style="color: #006E28;">&#41;</span><span style="color: #006E28;">;</span>
    QStateMachine m<span style="color: #006E28;">;</span>
    MButtons b<span style="color: #006E28;">&#40;</span>m<span style="color: #006E28;">&#41;</span><span style="color: #006E28;">;</span>
    b.<span style="color: #2B74C7;">show</span><span style="color: #006E28;">&#40;</span><span style="color: #006E28;">&#41;</span><span style="color: #006E28;">;</span>
&nbsp;
    QState <span style="color: #006E28;">*</span>sResting <span style="color: #006E28;">=</span> <span style="color: #000000; font-weight:bold;">new</span> QState<span style="color: #006E28;">&#40;</span><span style="color: #006E28;">&#41;</span><span style="color: #006E28;">,</span>
           <span style="color: #006E28;">*</span>sOne <span style="color: #006E28;">=</span> <span style="color: #000000; font-weight:bold;">new</span> QState<span style="color: #006E28;">&#40;</span><span style="color: #006E28;">&#41;</span><span style="color: #006E28;">,</span>
           <span style="color: #006E28;">*</span>sTwo <span style="color: #006E28;">=</span> <span style="color: #000000; font-weight:bold;">new</span> QState<span style="color: #006E28;">&#40;</span><span style="color: #006E28;">&#41;</span><span style="color: #006E28;">,</span>
           <span style="color: #006E28;">*</span>sThree <span style="color: #006E28;">=</span> <span style="color: #000000; font-weight:bold;">new</span> QState<span style="color: #006E28;">&#40;</span><span style="color: #006E28;">&#41;</span><span style="color: #006E28;">,</span>
           <span style="color: #006E28;">*</span>sFour <span style="color: #006E28;">=</span> <span style="color: #000000; font-weight:bold;">new</span> QState<span style="color: #006E28;">&#40;</span><span style="color: #006E28;">&#41;</span><span style="color: #006E28;">,</span>
           <span style="color: #006E28;">*</span>sTurning <span style="color: #006E28;">=</span> <span style="color: #000000; font-weight:bold;">new</span> QState<span style="color: #006E28;">&#40;</span><span style="color: #006E28;">&#41;</span><span style="color: #006E28;">,</span>
           <span style="color: #006E28;">*</span>sTurnRight <span style="color: #006E28;">=</span> <span style="color: #000000; font-weight:bold;">new</span> QState<span style="color: #006E28;">&#40;</span><span style="color: #006E28;">&#41;</span><span style="color: #006E28;">,</span>
           <span style="color: #006E28;">*</span>sTurnLeft <span style="color: #006E28;">=</span> <span style="color: #000000; font-weight:bold;">new</span> QState<span style="color: #006E28;">&#40;</span><span style="color: #006E28;">&#41;</span><span style="color: #006E28;">;</span>
&nbsp;
    m.<span style="color: #2B74C7;">addState</span><span style="color: #006E28;">&#40;</span>sResting<span style="color: #006E28;">&#41;</span><span style="color: #006E28;">;</span>
    m.<span style="color: #2B74C7;">addState</span><span style="color: #006E28;">&#40;</span>sOne<span style="color: #006E28;">&#41;</span><span style="color: #006E28;">;</span>
    m.<span style="color: #2B74C7;">addState</span><span style="color: #006E28;">&#40;</span>sTwo<span style="color: #006E28;">&#41;</span><span style="color: #006E28;">;</span>
    m.<span style="color: #2B74C7;">addState</span><span style="color: #006E28;">&#40;</span>sThree<span style="color: #006E28;">&#41;</span><span style="color: #006E28;">;</span>
    m.<span style="color: #2B74C7;">addState</span><span style="color: #006E28;">&#40;</span>sFour<span style="color: #006E28;">&#41;</span><span style="color: #006E28;">;</span>
    m.<span style="color: #2B74C7;">addState</span><span style="color: #006E28;">&#40;</span>sTurning<span style="color: #006E28;">&#41;</span><span style="color: #006E28;">;</span>
    m.<span style="color: #2B74C7;">addState</span><span style="color: #006E28;">&#40;</span>sTurnRight<span style="color: #006E28;">&#41;</span><span style="color: #006E28;">;</span>
    m.<span style="color: #2B74C7;">addState</span><span style="color: #006E28;">&#40;</span>sTurnLeft<span style="color: #006E28;">&#41;</span><span style="color: #006E28;">;</span>
    m.<span style="color: #2B74C7;">setInitialState</span><span style="color: #006E28;">&#40;</span>sResting<span style="color: #006E28;">&#41;</span><span style="color: #006E28;">;</span>
&nbsp;
    sResting<span style="color: #006E28;">-&gt;</span><span style="color: #2B74C7;">addTransition</span><span style="color: #006E28;">&#40;</span><span style="color: #006E28;">&amp;</span>b._right<span style="color: #006E28;">,</span> SIGNAL<span style="color: #006E28;">&#40;</span>clicked<span style="color: #006E28;">&#40;</span><span style="color: #006E28;">&#41;</span><span style="color: #006E28;">&#41;</span><span style="color: #006E28;">,</span> sOne<span style="color: #006E28;">&#41;</span><span style="color: #006E28;">;</span>
    sResting<span style="color: #006E28;">-&gt;</span><span style="color: #2B74C7;">addTransition</span><span style="color: #006E28;">&#40;</span><span style="color: #006E28;">&amp;</span>b._left<span style="color: #006E28;">,</span> SIGNAL<span style="color: #006E28;">&#40;</span>clicked<span style="color: #006E28;">&#40;</span><span style="color: #006E28;">&#41;</span><span style="color: #006E28;">&#41;</span><span style="color: #006E28;">,</span> sOne<span style="color: #006E28;">&#41;</span><span style="color: #006E28;">;</span>
    sOne<span style="color: #006E28;">-&gt;</span><span style="color: #2B74C7;">addTransition</span><span style="color: #006E28;">&#40;</span><span style="color: #006E28;">&amp;</span>b._right<span style="color: #006E28;">,</span> SIGNAL<span style="color: #006E28;">&#40;</span>clicked<span style="color: #006E28;">&#40;</span><span style="color: #006E28;">&#41;</span><span style="color: #006E28;">&#41;</span><span style="color: #006E28;">,</span> sTwo<span style="color: #006E28;">&#41;</span><span style="color: #006E28;">;</span>
    sOne<span style="color: #006E28;">-&gt;</span><span style="color: #2B74C7;">addTransition</span><span style="color: #006E28;">&#40;</span><span style="color: #006E28;">&amp;</span>b._left<span style="color: #006E28;">,</span> SIGNAL<span style="color: #006E28;">&#40;</span>clicked<span style="color: #006E28;">&#40;</span><span style="color: #006E28;">&#41;</span><span style="color: #006E28;">&#41;</span><span style="color: #006E28;">,</span> sTwo<span style="color: #006E28;">&#41;</span><span style="color: #006E28;">;</span>
    sOne<span style="color: #006E28;">-&gt;</span><span style="color: #2B74C7;">addTransition</span><span style="color: #006E28;">&#40;</span><span style="color: #000000; font-weight:bold;">new</span> ReturnTransition<span style="color: #006E28;">&#40;</span>sResting<span style="color: #006E28;">&#41;</span><span style="color: #006E28;">&#41;</span><span style="color: #006E28;">;</span>
    sTwo<span style="color: #006E28;">-&gt;</span><span style="color: #2B74C7;">addTransition</span><span style="color: #006E28;">&#40;</span><span style="color: #006E28;">&amp;</span>b._right<span style="color: #006E28;">,</span> SIGNAL<span style="color: #006E28;">&#40;</span>clicked<span style="color: #006E28;">&#40;</span><span style="color: #006E28;">&#41;</span><span style="color: #006E28;">&#41;</span><span style="color: #006E28;">,</span> sThree<span style="color: #006E28;">&#41;</span><span style="color: #006E28;">;</span>
    sTwo<span style="color: #006E28;">-&gt;</span><span style="color: #2B74C7;">addTransition</span><span style="color: #006E28;">&#40;</span><span style="color: #006E28;">&amp;</span>b._left<span style="color: #006E28;">,</span> SIGNAL<span style="color: #006E28;">&#40;</span>clicked<span style="color: #006E28;">&#40;</span><span style="color: #006E28;">&#41;</span><span style="color: #006E28;">&#41;</span><span style="color: #006E28;">,</span> sThree<span style="color: #006E28;">&#41;</span><span style="color: #006E28;">;</span>
    sTwo<span style="color: #006E28;">-&gt;</span><span style="color: #2B74C7;">addTransition</span><span style="color: #006E28;">&#40;</span><span style="color: #000000; font-weight:bold;">new</span> ReturnTransition<span style="color: #006E28;">&#40;</span>sResting<span style="color: #006E28;">&#41;</span><span style="color: #006E28;">&#41;</span><span style="color: #006E28;">;</span>
    sThree<span style="color: #006E28;">-&gt;</span><span style="color: #2B74C7;">addTransition</span><span style="color: #006E28;">&#40;</span><span style="color: #006E28;">&amp;</span>b._right<span style="color: #006E28;">,</span> SIGNAL<span style="color: #006E28;">&#40;</span>clicked<span style="color: #006E28;">&#40;</span><span style="color: #006E28;">&#41;</span><span style="color: #006E28;">&#41;</span><span style="color: #006E28;">,</span> sFour<span style="color: #006E28;">&#41;</span><span style="color: #006E28;">;</span>
    sThree<span style="color: #006E28;">-&gt;</span><span style="color: #2B74C7;">addTransition</span><span style="color: #006E28;">&#40;</span><span style="color: #006E28;">&amp;</span>b._left<span style="color: #006E28;">,</span> SIGNAL<span style="color: #006E28;">&#40;</span>clicked<span style="color: #006E28;">&#40;</span><span style="color: #006E28;">&#41;</span><span style="color: #006E28;">&#41;</span><span style="color: #006E28;">,</span> sFour<span style="color: #006E28;">&#41;</span><span style="color: #006E28;">;</span>
    sThree<span style="color: #006E28;">-&gt;</span><span style="color: #2B74C7;">addTransition</span><span style="color: #006E28;">&#40;</span><span style="color: #000000; font-weight:bold;">new</span> ReturnTransition<span style="color: #006E28;">&#40;</span>sResting<span style="color: #006E28;">&#41;</span><span style="color: #006E28;">&#41;</span><span style="color: #006E28;">;</span>
    sFour<span style="color: #006E28;">-&gt;</span><span style="color: #2B74C7;">addTransition</span><span style="color: #006E28;">&#40;</span>sTurning<span style="color: #006E28;">&#41;</span><span style="color: #006E28;">;</span>
    sTurning<span style="color: #006E28;">-&gt;</span><span style="color: #2B74C7;">addTransition</span><span style="color: #006E28;">&#40;</span><span style="color: #006E28;">&amp;</span>b._right<span style="color: #006E28;">,</span> SIGNAL<span style="color: #006E28;">&#40;</span>clicked<span style="color: #006E28;">&#40;</span><span style="color: #006E28;">&#41;</span><span style="color: #006E28;">&#41;</span><span style="color: #006E28;">,</span> sTurnRight<span style="color: #006E28;">&#41;</span><span style="color: #006E28;">;</span>
    sTurning<span style="color: #006E28;">-&gt;</span><span style="color: #2B74C7;">addTransition</span><span style="color: #006E28;">&#40;</span><span style="color: #006E28;">&amp;</span>b._left<span style="color: #006E28;">,</span> SIGNAL<span style="color: #006E28;">&#40;</span>clicked<span style="color: #006E28;">&#40;</span><span style="color: #006E28;">&#41;</span><span style="color: #006E28;">&#41;</span><span style="color: #006E28;">,</span> sTurnLeft<span style="color: #006E28;">&#41;</span><span style="color: #006E28;">;</span>
    sTurning<span style="color: #006E28;">-&gt;</span><span style="color: #2B74C7;">addTransition</span><span style="color: #006E28;">&#40;</span><span style="color: #000000; font-weight:bold;">new</span> ReturnTransition<span style="color: #006E28;">&#40;</span>sResting<span style="color: #006E28;">&#41;</span><span style="color: #006E28;">&#41;</span><span style="color: #006E28;">;</span>
    sTurnRight<span style="color: #006E28;">-&gt;</span><span style="color: #2B74C7;">addTransition</span><span style="color: #006E28;">&#40;</span>sTurning<span style="color: #006E28;">&#41;</span><span style="color: #006E28;">;</span>
    sTurnLeft<span style="color: #006E28;">-&gt;</span><span style="color: #2B74C7;">addTransition</span><span style="color: #006E28;">&#40;</span>sTurning<span style="color: #006E28;">&#41;</span><span style="color: #006E28;">;</span>
&nbsp;
    <span style="color: #22aadd;">QObject</span><span style="color: #006E28;">::</span><span style="color: #0057AE;">connect</span><span style="color: #006E28;">&#40;</span>sResting<span style="color: #006E28;">,</span> SIGNAL<span style="color: #006E28;">&#40;</span>entered<span style="color: #006E28;">&#40;</span><span style="color: #006E28;">&#41;</span><span style="color: #006E28;">&#41;</span><span style="color: #006E28;">,</span> <span style="color: #006E28;">&amp;</span>b<span style="color: #006E28;">,</span> SLOT<span style="color: #006E28;">&#40;</span>sRestingEntered<span style="color: #006E28;">&#40;</span><span style="color: #006E28;">&#41;</span><span style="color: #006E28;">&#41;</span><span style="color: #006E28;">&#41;</span><span style="color: #006E28;">;</span>
    <span style="color: #22aadd;">QObject</span><span style="color: #006E28;">::</span><span style="color: #0057AE;">connect</span><span style="color: #006E28;">&#40;</span>sOne<span style="color: #006E28;">,</span> SIGNAL<span style="color: #006E28;">&#40;</span>entered<span style="color: #006E28;">&#40;</span><span style="color: #006E28;">&#41;</span><span style="color: #006E28;">&#41;</span><span style="color: #006E28;">,</span> <span style="color: #006E28;">&amp;</span>b<span style="color: #006E28;">,</span> SLOT<span style="color: #006E28;">&#40;</span>sOneEntered<span style="color: #006E28;">&#40;</span><span style="color: #006E28;">&#41;</span><span style="color: #006E28;">&#41;</span><span style="color: #006E28;">&#41;</span><span style="color: #006E28;">;</span>
    <span style="color: #22aadd;">QObject</span><span style="color: #006E28;">::</span><span style="color: #0057AE;">connect</span><span style="color: #006E28;">&#40;</span>sTwo<span style="color: #006E28;">,</span> SIGNAL<span style="color: #006E28;">&#40;</span>entered<span style="color: #006E28;">&#40;</span><span style="color: #006E28;">&#41;</span><span style="color: #006E28;">&#41;</span><span style="color: #006E28;">,</span> <span style="color: #006E28;">&amp;</span>b<span style="color: #006E28;">,</span> SLOT<span style="color: #006E28;">&#40;</span>sTwoEntered<span style="color: #006E28;">&#40;</span><span style="color: #006E28;">&#41;</span><span style="color: #006E28;">&#41;</span><span style="color: #006E28;">&#41;</span><span style="color: #006E28;">;</span>
    <span style="color: #22aadd;">QObject</span><span style="color: #006E28;">::</span><span style="color: #0057AE;">connect</span><span style="color: #006E28;">&#40;</span>sThree<span style="color: #006E28;">,</span> SIGNAL<span style="color: #006E28;">&#40;</span>entered<span style="color: #006E28;">&#40;</span><span style="color: #006E28;">&#41;</span><span style="color: #006E28;">&#41;</span><span style="color: #006E28;">,</span> <span style="color: #006E28;">&amp;</span>b<span style="color: #006E28;">,</span> SLOT<span style="color: #006E28;">&#40;</span>sThreeEntered<span style="color: #006E28;">&#40;</span><span style="color: #006E28;">&#41;</span><span style="color: #006E28;">&#41;</span><span style="color: #006E28;">&#41;</span><span style="color: #006E28;">;</span>
    <span style="color: #22aadd;">QObject</span><span style="color: #006E28;">::</span><span style="color: #0057AE;">connect</span><span style="color: #006E28;">&#40;</span>sFour<span style="color: #006E28;">,</span> SIGNAL<span style="color: #006E28;">&#40;</span>entered<span style="color: #006E28;">&#40;</span><span style="color: #006E28;">&#41;</span><span style="color: #006E28;">&#41;</span><span style="color: #006E28;">,</span> <span style="color: #006E28;">&amp;</span>b<span style="color: #006E28;">,</span> SLOT<span style="color: #006E28;">&#40;</span>sFourEntered<span style="color: #006E28;">&#40;</span><span style="color: #006E28;">&#41;</span><span style="color: #006E28;">&#41;</span><span style="color: #006E28;">&#41;</span><span style="color: #006E28;">;</span>
    <span style="color: #22aadd;">QObject</span><span style="color: #006E28;">::</span><span style="color: #0057AE;">connect</span><span style="color: #006E28;">&#40;</span>sTurning<span style="color: #006E28;">,</span> SIGNAL<span style="color: #006E28;">&#40;</span>entered<span style="color: #006E28;">&#40;</span><span style="color: #006E28;">&#41;</span><span style="color: #006E28;">&#41;</span><span style="color: #006E28;">,</span> <span style="color: #006E28;">&amp;</span>b<span style="color: #006E28;">,</span> SLOT<span style="color: #006E28;">&#40;</span>sTurningEntered<span style="color: #006E28;">&#40;</span><span style="color: #006E28;">&#41;</span><span style="color: #006E28;">&#41;</span><span style="color: #006E28;">&#41;</span><span style="color: #006E28;">;</span>
    <span style="color: #22aadd;">QObject</span><span style="color: #006E28;">::</span><span style="color: #0057AE;">connect</span><span style="color: #006E28;">&#40;</span>sTurnRight<span style="color: #006E28;">,</span> SIGNAL<span style="color: #006E28;">&#40;</span>entered<span style="color: #006E28;">&#40;</span><span style="color: #006E28;">&#41;</span><span style="color: #006E28;">&#41;</span><span style="color: #006E28;">,</span> <span style="color: #006E28;">&amp;</span>b<span style="color: #006E28;">,</span> SLOT<span style="color: #006E28;">&#40;</span>sTurnRightEntered<span style="color: #006E28;">&#40;</span><span style="color: #006E28;">&#41;</span><span style="color: #006E28;">&#41;</span><span style="color: #006E28;">&#41;</span><span style="color: #006E28;">;</span>
    <span style="color: #22aadd;">QObject</span><span style="color: #006E28;">::</span><span style="color: #0057AE;">connect</span><span style="color: #006E28;">&#40;</span>sTurnLeft<span style="color: #006E28;">,</span> SIGNAL<span style="color: #006E28;">&#40;</span>entered<span style="color: #006E28;">&#40;</span><span style="color: #006E28;">&#41;</span><span style="color: #006E28;">&#41;</span><span style="color: #006E28;">,</span> <span style="color: #006E28;">&amp;</span>b<span style="color: #006E28;">,</span> SLOT<span style="color: #006E28;">&#40;</span>sTurnLeftEntered<span style="color: #006E28;">&#40;</span><span style="color: #006E28;">&#41;</span><span style="color: #006E28;">&#41;</span><span style="color: #006E28;">&#41;</span><span style="color: #006E28;">;</span>
&nbsp;
    m.<span style="color: #2B74C7;">start</span><span style="color: #006E28;">&#40;</span><span style="color: #006E28;">&#41;</span><span style="color: #006E28;">;</span>
&nbsp;
    <span style="color: #000000; font-weight:bold;">return</span><span style="color: #006E28;">&#40;</span>app.<span style="color: #2B74C7;">exec</span><span style="color: #006E28;">&#40;</span><span style="color: #006E28;">&#41;</span><span style="color: #006E28;">&#41;</span><span style="color: #006E28;">;</span>
<span style="color: #006E28;">&#125;</span></pre></td></tr></table></div>


<h3>Conclusion and open questions</h3>

<p>I&#8217;m fairly happy with the solution, but I&#8217;d be curious how other people, people more skilled in using Qt, would have solved the problem.</p>

<p>For a while I considered solving the skipping of four initial signals using a single state and counter, but I saw no obvious easy way to implement that, so I instead opted to use separate states.  Slightly wasteful of resources, but not too bad, and simplicity <em>is</em> important.  I&#8217;m very curious to find out if there&#8217;s a simply way to implement it using a single state.</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Ftherning.org%2Fmagnus%2Farchives%2F1051&amp;title=Qt%20state%20machines%20and%20automatic%20timed%20transitions" id="wpa2a_8">Share/Bookmark</a></p>]]></content:encoded>
			<wfw:commentRss>http://therning.org/magnus/archives/1051/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Manual setup of Qt+Eclipse on Windows</title>
		<link>http://therning.org/magnus/archives/1023</link>
		<comments>http://therning.org/magnus/archives/1023#comments</comments>
		<pubDate>Mon, 09 Apr 2012 20:24:09 +0000</pubDate>
		<dc:creator>Magnus</dc:creator>
				<category><![CDATA[Posts]]></category>
		<category><![CDATA[eclipse]]></category>
		<category><![CDATA[qt]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://therning.org/magnus/?p=1023</guid>
		<description><![CDATA[Before the weekend I started looking at using Qt on Windows. More specifically I wanted to know whether this combination could be an option for a sub-project at work. We need to develop a program for the Windows desktop, and due to the overall context it would make sense to write it in C++ (that&#8217;s [...]]]></description>
				<content:encoded><![CDATA[<p>Before the weekend I started looking at using <a href="http://qt-project.org/">Qt</a> on Windows.  More specifically I wanted to know whether this combination could be an option for a sub-project at work.  We need to develop a program for the Windows desktop, and due to the overall context it would make sense to write it in C++ (that&#8217;s what we use for another part of the project).  We already use both Eclipse and Visual Studio in the project, but I strongly prefer Eclipse, so I was hoping to be able to use it.  However, it seems that the Qt developers strongly favour their own tool <a href="http://qt-project.org/wiki/Category:Tools::QtCreator">Qt Creator</a>, though there are (outdated?) integrators for both Eclipse and Visual Studio.  I&#8217;d rather avoid introducing a third IDE into a project&#8212;two is already one too many in my opinion.  Anyway, I think I managed to find an acceptable configuration of Eclipse <em>without</em> using that old <a href="http://qt.nokia.com/products/eclipse-integration/">Qt integration plugin</a> together with the MSVC (I was using the gratis version of MSVC for this).</p>

<h3>Qt setup</h3>

<p>I decided to install Qt into <code>C:\QtSDK</code>, and then I made the following permanent changes to the environment:</p>


<div class="wp_syntax"><table><tr><td class="code"><pre class="dos" style="font-family:monospace;"><span style="color: #33cc33;">&gt;</span> <span style="color: #b1b100; font-weight: bold;">set</span> QTDIR=C:\QtSDK\Desktop\Qt\4.8.0\msvc2010
<span style="color: #33cc33;">&gt;</span> <span style="color: #b1b100; font-weight: bold;">set</span> QMAKESPEC=<span style="color: #33cc33;">%</span><span style="color: #448888;">QTDIR</span><span style="color: #33cc33;">%</span>\mkspecs\win32-msvc2010
<span style="color: #33cc33;">&gt;</span> <span style="color: #b1b100; font-weight: bold;">set</span> PATH=<span style="color: #33cc33;">%</span><span style="color: #448888;">PATH</span><span style="color: #33cc33;">%</span>;<span style="color: #33cc33;">%</span><span style="color: #448888;">QTDIR</span><span style="color: #33cc33;">%</span>\bin;C:\QtSDK\QtCreator\bin</pre></td></tr></table></div>


<h3>Starting Eclipse so that it finds the compiler</h3>

<p>It&#8217;s slightly disappointing that Eclipse happily lets one create MSVC project that isn&#8217;t buildable because it doesn&#8217;t know where the compiler is located.  One easy way to remedy that seems to create a BAT file to create the proper environment for Eclipse:</p>


<div class="wp_syntax"><table><tr><td class="code"><pre class="winbatch" style="font-family:monospace;"><span style="color: #66cc66;">@</span>echo <span style="color: #0080FF; font-weight: bold;">off</span>
setlocal
<span style="color: #800080;">call</span> <span style="color: #ff0000;">&quot;C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\vcvarsall.bat&quot;</span>
start C<span style="color: #FF1010; font-weight: bold;">:\Eclipse\Indigo\eclipse.exe</span>
endlocal</pre></td></tr></table></div>


<h3>Creating the project</h3>

<p>Creating a &#8220;makefile&#8221; project in Eclipse is fairly straight forward; one needs a <em>C/C++ project</em>, of the <em>makefile</em> type, and make it empty too so that there isn&#8217;t any cruft in the way.  Then add a single source file, e.g. <code>main.cxx</code>:</p>


<div class="wp_syntax"><table><tr><td class="code"><pre class="cpp" style="font-family:monospace;"><span style="color: #339900;">#include &lt;iostream&gt;</span>
<span style="color: #339900;">#include &lt;Qt/QtGui&gt;</span>
&nbsp;
<span style="color: #0000ff;">int</span> main<span style="color: #008000;">&#40;</span><span style="color: #0000ff;">int</span> argc, <span style="color: #0000ff;">char</span> <span style="color: #000040;">**</span>argv<span style="color: #008000;">&#41;</span>
<span style="color: #008000;">&#123;</span>
    std<span style="color: #008080;">::</span><span style="color: #0000dd;">cout</span> <span style="color: #000080;">&lt;&lt;</span> __FUNCTION__ <span style="color: #000080;">&lt;&lt;</span> std<span style="color: #008080;">::</span><span style="color: #007788;">endl</span><span style="color: #008080;">;</span>
    QApplication app<span style="color: #008000;">&#40;</span>argc, argv<span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
    <span style="color: #0000ff;">return</span><span style="color: #008000;">&#40;</span>app.<span style="color: #007788;">exec</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
<span style="color: #008000;">&#125;</span></pre></td></tr></table></div>


<p>And then a project file, e.g. <code>Test.pro</code>:</p>


<div class="wp_syntax"><table><tr><td class="code"><pre class="make" style="font-family:monospace;">TEMPLATE <span style="color: #004400;">=</span> app
TARGET <span style="color: #004400;">=</span> 
DEPENDPATH <span style="color: #004400;">+=</span> <span style="color: #004400;">.</span>
INCLUDEPATH <span style="color: #004400;">+=</span> <span style="color: #004400;">.</span>
&nbsp;
CONFIG <span style="color: #004400;">+=</span> qt
&nbsp;
HEADERS <span style="color: #004400;">+=</span>
SOURCES <span style="color: #004400;">+=</span> main<span style="color: #004400;">.</span>cxx</pre></td></tr></table></div>


<p>After this use <code>qmake</code> to create the required makefile.  I decided to use a subdirectory (<code>_build</code>) in the project, which <code>qmake</code> seems to have full support for:</p>


<div class="wp_syntax"><table><tr><td class="code"><pre class="dos" style="font-family:monospace;"><span style="color: #33cc33;">&gt;</span> qmake ..\Test.pro</pre></td></tr></table></div>


<h3>Setting up building from Eclipse</h3>

<p>In the project properties modify the <em>C/C++ Build</em> settings for the <em>Debug</em> target.  Instead of the default build command (which is <code>make</code>) one can use <code>nmake</code>, or even better <code>jom</code>:</p>

<ul>
<li>Build command: <code>C:/QtSDK/QTCreator/bin/jom -f Makefile.Debug</code></li>
<li>Build directory: <code>${workspace_loc:/Test}/_build</code></li>
</ul>

<p>Then one can create a <em>Release</em> target, which differs only in that it builds using <code>Makefile.Release</code>.</p>

<h3>Running <code>qmake</code> from inside Eclipse</h3>

<p>It&#8217;s very convenient to be able to run <code>qmake</code> and re-generate the makefiles from inside Eclipse.  One can set that up by adding an external tool:</p>

<ul>
<li>Location: <code>C:\QtSDK\Desktop\Qt\4.8.0\msvc2010\bin\qmake.exe</code></li>
<li>Working directory: <code>${workspace_loc:/Test}/_build</code></li>
<li>Arguments: <code>../Test.pro</code></li>
</ul>

<h3>In closing</h3>

<p>I plan to also have a look at the <a href="http://qt.nokia.com/products/developer-tools">Qt Visual Studio Add-in</a>, though I suspect we might be using the latest version of VS, which might cause trouble.</p>

<p>Suggestions for further integration with Eclipse would be most welcome, e.g. for forms and translations.</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Ftherning.org%2Fmagnus%2Farchives%2F1023&amp;title=Manual%20setup%20of%20Qt%2BEclipse%20on%20Windows" id="wpa2a_10">Share/Bookmark</a></p>]]></content:encoded>
			<wfw:commentRss>http://therning.org/magnus/archives/1023/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>LXDE and multiple screens: replacing lxrandr with a script</title>
		<link>http://therning.org/magnus/archives/1019</link>
		<comments>http://therning.org/magnus/archives/1019#comments</comments>
		<pubDate>Sun, 11 Mar 2012 09:01:00 +0000</pubDate>
		<dc:creator>Magnus</dc:creator>
				<category><![CDATA[Posts]]></category>
		<category><![CDATA[lxde]]></category>
		<category><![CDATA[randr]]></category>

		<guid isPermaLink="false">http://therning.org/magnus/?p=1019</guid>
		<description><![CDATA[When using Gnome3 I was really impressed with the support for multiple screens. Then I switched to LXDE and was very disappointed in that desktop&#8217;s support for multiple screens. In fact so disappointed that I sat down and read the man-page for &#8216;randr&#8217; and hacked up the following script: #! /bin/bash &#160; cmd=$1; shift &#160; [...]]]></description>
				<content:encoded><![CDATA[<p>When using Gnome3 I was really impressed with the support for multiple screens.  Then I switched to LXDE and was <em>very</em> disappointed in that desktop&#8217;s support for multiple screens.  In fact so disappointed that I sat down and read the man-page for &#8216;randr&#8217; and hacked up the following script:</p>


<div class="wp_syntax"><table><tr><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#! /bin/bash</span>
&nbsp;
<span style="color: #007800;">cmd</span>=<span style="color: #007800;">$1</span>; <span style="color: #7a0874; font-weight: bold;">shift</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">case</span> <span style="color: #007800;">$cmd</span> <span style="color: #000000; font-weight: bold;">in</span>
    on<span style="color: #7a0874; font-weight: bold;">&#41;</span>
        <span style="color: #666666; font-style: italic;"># turn on VGA1, auto-select size, right of laptop screen</span>
        xrandr <span style="color: #660033;">--output</span> VGA1 <span style="color: #660033;">--auto</span> <span style="color: #660033;">--right-of</span> LVDS1
        <span style="color: #000000; font-weight: bold;">;;</span>
    off<span style="color: #7a0874; font-weight: bold;">&#41;</span>
        xrandr <span style="color: #660033;">--output</span> VGA1 <span style="color: #660033;">--off</span>
        <span style="color: #000000; font-weight: bold;">;;</span>
    list<span style="color: #7a0874; font-weight: bold;">&#41;</span>
        xrandr
        <span style="color: #000000; font-weight: bold;">;;</span>
    <span style="color: #000000; font-weight: bold;">*</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
        <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Commands: on, off, list&quot;</span>
<span style="color: #000000; font-weight: bold;">esac</span></pre></td></tr></table></div>


<p>In my mind it&#8217;s vastly more usable than &#8216;lxrandr&#8217; <img src='http://therning.org/magnus/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Ftherning.org%2Fmagnus%2Farchives%2F1019&amp;title=LXDE%20and%20multiple%20screens%3A%20replacing%20lxrandr%20with%20a%20script" id="wpa2a_12">Share/Bookmark</a></p>]]></content:encoded>
			<wfw:commentRss>http://therning.org/magnus/archives/1019/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>0MQ and Haskell</title>
		<link>http://therning.org/magnus/archives/1009</link>
		<comments>http://therning.org/magnus/archives/1009#comments</comments>
		<pubDate>Tue, 06 Mar 2012 15:26:47 +0000</pubDate>
		<dc:creator>Magnus</dc:creator>
				<category><![CDATA[Posts]]></category>
		<category><![CDATA[0mq]]></category>
		<category><![CDATA[haskell]]></category>
		<category><![CDATA[zeromq]]></category>

		<guid isPermaLink="false">http://therning.org/magnus/?p=1009</guid>
		<description><![CDATA[Ever since I heard the FLOSS weekly episode on 0MQ I&#8217;ve been looking for a reason to take a look at it. Well, to hell with reason, I&#8217;ll have a first look without any specific goal in mind. I found a simple introduction to it in Nicholas Piël&#8217;s post ZeroMQ an introduction. The only issue [...]]]></description>
				<content:encoded><![CDATA[<p>Ever since I heard the <a href="http://twit.tv/show/floss-weekly/195">FLOSS weekly episode on 0MQ</a> I&#8217;ve been looking for a reason to take a look at it. Well, to hell with reason, I&#8217;ll have a first look without any specific goal in mind.</p>

<p>I found a simple introduction to it in Nicholas Piël&#8217;s post <a href="http://nichol.as/zeromq-an-introduction">ZeroMQ an introduction</a>.  The only issue was that it was based on Python, and Python2 at that.  So here are my attempts at translating two of the clients to Haskell (using <a href="http://hackage.haskell.org/package/zeromq-haskell">zeromq-haskell</a>).</p>

<h2>req-rep</h2>

<p>Here&#8217;s the client in Python3 first:</p>


<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
</pre></td><td class="code"><pre class="python" style="font-family:monospace;"><span style="color: #ff7700;font-weight:bold;">import</span> zmq
&nbsp;
ctx <span style="color: #66cc66;">=</span> zmq.<span style="color: black;">Context</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
<span style="color: #dc143c;">socket</span> <span style="color: #66cc66;">=</span> ctx.<span style="color: #dc143c;">socket</span><span style="color: black;">&#40;</span>zmq.<span style="color: black;">REQ</span><span style="color: black;">&#41;</span>
<span style="color: #dc143c;">socket</span>.<span style="color: black;">connect</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">'tcp://127.0.0.1:5000'</span><span style="color: black;">&#41;</span>
&nbsp;
<span style="color: #ff7700;font-weight:bold;">for</span> i <span style="color: #ff7700;font-weight:bold;">in</span> <span style="color: #008000;">range</span><span style="color: black;">&#40;</span><span style="color: #ff4500;">10</span><span style="color: black;">&#41;</span>:
    msg <span style="color: #66cc66;">=</span> <span style="color: #483d8b;">&quot;msg %s&quot;</span> % i
    <span style="color: #dc143c;">socket</span>.<span style="color: black;">send_unicode</span><span style="color: black;">&#40;</span>msg<span style="color: black;">&#41;</span>
    <span style="color: #ff7700;font-weight:bold;">print</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">'Sending'</span><span style="color: #66cc66;">,</span> msg<span style="color: black;">&#41;</span>
    msg_in <span style="color: #66cc66;">=</span> <span style="color: #dc143c;">socket</span>.<span style="color: black;">recv</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span></pre></td></tr></table></div>


<p>And here in Haskell:</p>


<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
</pre></td><td class="code"><pre class="haskell" style="font-family:monospace;"><span style="color: #06c; font-weight: bold;">import</span> System<span style="color: #339933; font-weight: bold;">.</span>ZMQ
<span style="color: #06c; font-weight: bold;">import</span> Data<span style="color: #339933; font-weight: bold;">.</span>ByteString<span style="color: #339933; font-weight: bold;">.</span>Char8 <span style="color: #06c; font-weight: bold;">as</span> CBS
&nbsp;
main <span style="color: #339933; font-weight: bold;">=</span> withContext <span style="color: red;">1</span> <span style="color: #339933; font-weight: bold;">$</span> \ ctx <span style="color: #339933; font-weight: bold;">-&gt;</span> withSocket ctx Req <span style="color: #339933; font-weight: bold;">$</span> \ soc <span style="color: #339933; font-weight: bold;">-&gt;</span> <span style="color: #06c; font-weight: bold;">do</span>
    connect soc <span style="background-color: #3cb371;">&quot;tcp://127.0.0.1:5000&quot;</span>
    <span style="color: #06c; font-weight: bold;">let</span> msgs <span style="color: #339933; font-weight: bold;">=</span> <span style="color: green;">&#91;</span>pack <span style="color: green;">&#40;</span><span style="background-color: #3cb371;">&quot;msg &quot;</span> <span style="color: #339933; font-weight: bold;">++</span> <span style="font-weight: bold;">show</span> i<span style="color: green;">&#41;</span> <span style="color: #339933; font-weight: bold;">|</span> i <span style="color: #339933; font-weight: bold;">&lt;-</span> <span style="color: green;">&#91;</span><span style="color: red;">0</span><span style="color: #339933; font-weight: bold;">..</span><span style="color: red;">9</span><span style="color: green;">&#93;</span><span style="color: green;">&#93;</span>
    <span style="font-weight: bold;">flip</span> <span style="font-weight: bold;">mapM_</span> msgs <span style="color: #339933; font-weight: bold;">$</span> \ msg <span style="color: #339933; font-weight: bold;">-&gt;</span> <span style="color: #06c; font-weight: bold;">do</span>
        send soc msg <span style="color: green;">&#91;</span><span style="color: green;">&#93;</span>
        CBS<span style="color: #339933; font-weight: bold;">.</span><span style="font-weight: bold;">putStrLn</span> msg
        receive soc <span style="color: green;">&#91;</span><span style="color: green;">&#93;</span></pre></td></tr></table></div>


<h2>pub-sub</h2>

<p>In Python3:</p>


<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
</pre></td><td class="code"><pre class="python" style="font-family:monospace;"><span style="color: #ff7700;font-weight:bold;">import</span> zmq
&nbsp;
ctx <span style="color: #66cc66;">=</span> zmq.<span style="color: black;">Context</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
<span style="color: #dc143c;">socket</span> <span style="color: #66cc66;">=</span> ctx.<span style="color: #dc143c;">socket</span><span style="color: black;">&#40;</span>zmq.<span style="color: black;">SUB</span><span style="color: black;">&#41;</span>
<span style="color: #dc143c;">socket</span>.<span style="color: black;">connect</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">'tcp://127.0.0.1:5000'</span><span style="color: black;">&#41;</span>
<span style="color: #dc143c;">socket</span>.<span style="color: black;">setsockopt</span><span style="color: black;">&#40;</span>zmq.<span style="color: black;">SUBSCRIBE</span><span style="color: #66cc66;">,</span> b<span style="color: #483d8b;">'sweden'</span><span style="color: black;">&#41;</span>
<span style="color: #dc143c;">socket</span>.<span style="color: black;">setsockopt</span><span style="color: black;">&#40;</span>zmq.<span style="color: black;">SUBSCRIBE</span><span style="color: #66cc66;">,</span> b<span style="color: #483d8b;">'denmark'</span><span style="color: black;">&#41;</span>
&nbsp;
<span style="color: #ff7700;font-weight:bold;">while</span> <span style="color: #008000;">True</span>:
    <span style="color: #ff7700;font-weight:bold;">print</span><span style="color: black;">&#40;</span><span style="color: #dc143c;">socket</span>.<span style="color: black;">recv</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span><span style="color: black;">&#41;</span></pre></td></tr></table></div>


<p>Haskell:</p>


<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
</pre></td><td class="code"><pre class="haskell" style="font-family:monospace;"><span style="color: #06c; font-weight: bold;">import</span> System<span style="color: #339933; font-weight: bold;">.</span>ZMQ
<span style="color: #06c; font-weight: bold;">import</span> Control<span style="color: #339933; font-weight: bold;">.</span><span style="color: #cccc00; font-weight: bold;">Monad</span>
<span style="color: #06c; font-weight: bold;">import</span> Data<span style="color: #339933; font-weight: bold;">.</span>ByteString<span style="color: #339933; font-weight: bold;">.</span>Char8 <span style="color: #06c; font-weight: bold;">as</span> CBS
&nbsp;
main <span style="color: #339933; font-weight: bold;">=</span> withContext <span style="color: red;">1</span> <span style="color: #339933; font-weight: bold;">$</span> \ ctx <span style="color: #339933; font-weight: bold;">-&gt;</span> withSocket ctx Sub <span style="color: #339933; font-weight: bold;">$</span> \ soc <span style="color: #339933; font-weight: bold;">-&gt;</span> <span style="color: #06c; font-weight: bold;">do</span>
    connect soc <span style="background-color: #3cb371;">&quot;tcp://127.0.0.1:5000&quot;</span>
    subscribe soc <span style="background-color: #3cb371;">&quot;sweden&quot;</span>
    subscribe soc <span style="background-color: #3cb371;">&quot;denmark&quot;</span>
    forever <span style="color: #339933; font-weight: bold;">$</span> receive soc <span style="color: green;">&#91;</span><span style="color: green;">&#93;</span> <span style="color: #339933; font-weight: bold;">&gt;&gt;=</span> CBS<span style="color: #339933; font-weight: bold;">.</span><span style="font-weight: bold;">putStrLn</span></pre></td></tr></table></div>


<p>Two comments on the Haskell code here:</p>

<ul>
<li>I&#8217;m not sure why, but the Haskell client dies after receiving just a few messages (they are properly filtered though).</li>
<li>The API for <code>subscribe</code> is a bit strange, it would make more sense if it took a <code>ByteString</code> rather than a <code>String</code>.</li>
</ul>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Ftherning.org%2Fmagnus%2Farchives%2F1009&amp;title=0MQ%20and%20Haskell" id="wpa2a_14">Share/Bookmark</a></p>]]></content:encoded>
			<wfw:commentRss>http://therning.org/magnus/archives/1009/feed</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Shelltestrunner to the rescue</title>
		<link>http://therning.org/magnus/archives/1003</link>
		<comments>http://therning.org/magnus/archives/1003#comments</comments>
		<pubDate>Tue, 28 Feb 2012 15:03:16 +0000</pubDate>
		<dc:creator>Magnus</dc:creator>
				<category><![CDATA[Posts]]></category>
		<category><![CDATA[haskell]]></category>
		<category><![CDATA[shelltestrunner]]></category>

		<guid isPermaLink="false">http://therning.org/magnus/?p=1003</guid>
		<description><![CDATA[A little while ago shelltestrunner was announced on haskell-cafe. At the time I was slowly losing hope on ever getting decent test coverage in cblrepo using HUnit. Using something like shelltestrunner could be an easier and more workable solution, especially since what cblrepo needed most in the short term is a bit of integration testing. [...]]]></description>
				<content:encoded><![CDATA[<p>A little while ago <a href="http://hackage.haskell.org/package/shelltestrunner">shelltestrunner</a> was <a href="http://www.haskell.org/pipermail/haskell-cafe/2011-August/094894.html">announced</a> on <code>haskell-cafe</code>.  At the time I was slowly losing hope on ever getting decent test coverage in <a href="http://hackage.haskell.org/package/cblrepo">cblrepo</a> using <code>HUnit</code>.  Using something like <code>shelltestrunner</code> could be an easier and more workable solution, especially since what <code>cblrepo</code> needed most in the short term is a bit of integration testing.</p>

<p><code>shelltestrunner</code> is basically just a tool that runs shell commands and compares output (both <code>stdout</code> and <code>stderr</code>) and the exit code.  It&#8217;s also possible to provide data to be passed to the command on <code>stdin</code>.  The documentation on the <a href="http://joyful.com/shelltestrunner/"><code>shelltestrunner</code> home page</a> is very good and accessible.  There are only a few things that I&#8217;d like to add to it:</p>

<ul>
<li>Use the <code>--with</code> (`-w´) flag, it&#8217;s very handy to avoid littering the tests with long paths to the output of your build environment.</li>
<li>There is no support for set-up and tear-down steps in the tests (in my opinion this would be a very nice addition to the tool) so anything needed to be set up for the actual tests, will itself have to be tests.</li>
<li>There is no way to name tests (would be another good addition) so I found it crucial to organise tests into several files.</li>
</ul>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Ftherning.org%2Fmagnus%2Farchives%2F1003&amp;title=Shelltestrunner%20to%20the%20rescue" id="wpa2a_16">Share/Bookmark</a></p>]]></content:encoded>
			<wfw:commentRss>http://therning.org/magnus/archives/1003/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Compiling U-Boot for use in QEMU (VersatilePB)</title>
		<link>http://therning.org/magnus/archives/999</link>
		<comments>http://therning.org/magnus/archives/999#comments</comments>
		<pubDate>Thu, 12 Jan 2012 13:40:30 +0000</pubDate>
		<dc:creator>Magnus</dc:creator>
				<category><![CDATA[Posts]]></category>
		<category><![CDATA[qemu]]></category>
		<category><![CDATA[u-boot]]></category>

		<guid isPermaLink="false">http://therning.org/magnus/?p=999</guid>
		<description><![CDATA[Since I&#8217;m now working a bit with embedded systems I thought I&#8217;d take a look at compiling for one of the ARM-based machines that QEMU supports. I settled for VersatilePB after finding this old-ish article. Rather optimistically I thought that maybe, just maybe things had change in a year and that the limitation of flash [...]]]></description>
				<content:encoded><![CDATA[<p>Since I&#8217;m now working a bit with embedded systems I thought I&#8217;d take a look at compiling for one of the ARM-based machines that <a href="http://wiki.qemu.org/Main_Page">QEMU</a> supports.  I settled for VersatilePB after finding <a href="http://balau82.wordpress.com/2010/04/12/booting-linux-with-u-boot-on-qemu-arm/">this old-ish article</a>.  Rather optimistically I thought that maybe, just maybe things had change in a year and that the limitation of flash was removed. How wrong I was.</p>

<p>I did find an easier way to get it working, though with the limitation that Linux has to be started via <code>tftpboot</code> or some other network-based fashion.  The patch looks like this:</p>

<pre><code>--- u-boot.orig/src/u-boot-2011.12/include/configs/versatile.h
+++ u-boot/src/u-boot-2011.12/include/configs/versatile.h
@@ -31,6 +31,8 @@
 #ifndef __CONFIG_H
 #define __CONFIG_H

+#define CONFIG_ARCH_VERSATILE_QEMU
+
 /*
  * High Level Configuration Options
  * (easy to change)
</code></pre>

<p>Then just go ahead and modify the default boot argument (<code>CONFIG_BOOTARGS</code> in the same file) to your hearts content to minimise the amount of manual work for booting.</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Ftherning.org%2Fmagnus%2Farchives%2F999&amp;title=Compiling%20U-Boot%20for%20use%20in%20QEMU%20%28VersatilePB%29" id="wpa2a_18">Share/Bookmark</a></p>]]></content:encoded>
			<wfw:commentRss>http://therning.org/magnus/archives/999/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Adjusting to Sweden with XKB</title>
		<link>http://therning.org/magnus/archives/982</link>
		<comments>http://therning.org/magnus/archives/982#comments</comments>
		<pubDate>Mon, 26 Dec 2011 08:12:15 +0000</pubDate>
		<dc:creator>Magnus</dc:creator>
				<category><![CDATA[Posts]]></category>
		<category><![CDATA[xkb]]></category>

		<guid isPermaLink="false">http://therning.org/magnus/?p=982</guid>
		<description><![CDATA[Having lived outside of Sweden for about a decade I&#8217;ve grown accustomed to non-Swedish keyboard layouts, first the US (as it&#8217;s widely used in The Netherlands) and later on the UK layout. Moving back to Sweden had me swearing over the layout used here within only a few days. The placement of &#8220;{[]}&#8221; is especially [...]]]></description>
				<content:encoded><![CDATA[<p>Having lived outside of Sweden for about a decade I&#8217;ve grown accustomed to non-Swedish keyboard layouts, first the US (as it&#8217;s widely used in The Netherlands) and later on the UK layout.  Moving back to Sweden had me swearing over the layout used here within only a few days.  The placement of &#8220;{[]}&#8221; is especially painful.  Clearly the Swedish layout wasn&#8217;t designed for developers!  Rather than go on muscle memory I decided to first attempt a small change to the X key mappings.</p>

<p>I found a <a href="http://madduck.net/docs/extending-xkb/">good description of per-user XKB configuration</a> after a bit of searching.  Then I modified it slightly to fit better in my Arch-based LXDE system.</p>

<h3>The XKB config</h3>

<p>I started with removing all the configuration I&#8217;d previously put into <code>/etc/X11/xorg.conf.d</code> &#8212; if I&#8217;m to use per-user configuration then there should be <em>no</em> system-wide settings at all.  Then I put the output of <code>setxkbmap -print</code> into <code>~/.xkb/maps/$(hostname)</code> as a starting point.  The main goal is to move the characters that requires awkward single-hand combinations with <em>AltGr</em> to slightly more comfortable mappings.  After a bit of experimentation I settled on the following (which I put in <code>~/.xkb/symbols/sedev</code>)</p>


<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
</pre></td><td class="code"><pre class="c" style="font-family:monospace;">partial alphanumeric_keys
xkb_symbols <span style="color: #ff0000;">&quot;devkeys&quot;</span> <span style="color: #009900;">&#123;</span>
    key <span style="color: #339933;">&lt;</span>AD01<span style="color: #339933;">&gt;</span> <span style="color: #009900;">&#123;</span> <span style="color: #009900;">&#91;</span> q<span style="color: #339933;">,</span> Q<span style="color: #339933;">,</span> backslash <span style="color: #009900;">&#93;</span> <span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
    key <span style="color: #339933;">&lt;</span>AD02<span style="color: #339933;">&gt;</span> <span style="color: #009900;">&#123;</span> <span style="color: #009900;">&#91;</span> w<span style="color: #339933;">,</span> W<span style="color: #339933;">,</span> asciitilde <span style="color: #009900;">&#93;</span> <span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
&nbsp;
    key <span style="color: #339933;">&lt;</span>AC01<span style="color: #339933;">&gt;</span> <span style="color: #009900;">&#123;</span> <span style="color: #009900;">&#91;</span> a<span style="color: #339933;">,</span> A<span style="color: #339933;">,</span> braceleft <span style="color: #009900;">&#93;</span> <span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
    key <span style="color: #339933;">&lt;</span>AC02<span style="color: #339933;">&gt;</span> <span style="color: #009900;">&#123;</span> <span style="color: #009900;">&#91;</span> s<span style="color: #339933;">,</span> S<span style="color: #339933;">,</span> bracketleft <span style="color: #009900;">&#93;</span> <span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
    key <span style="color: #339933;">&lt;</span>AC03<span style="color: #339933;">&gt;</span> <span style="color: #009900;">&#123;</span> <span style="color: #009900;">&#91;</span> d<span style="color: #339933;">,</span> D<span style="color: #339933;">,</span> bracketright <span style="color: #009900;">&#93;</span> <span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
    key <span style="color: #339933;">&lt;</span>AC04<span style="color: #339933;">&gt;</span> <span style="color: #009900;">&#123;</span> <span style="color: #009900;">&#91;</span> f<span style="color: #339933;">,</span> F<span style="color: #339933;">,</span> braceright <span style="color: #009900;">&#93;</span> <span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>


<p>After setting it manually and verifying that the new mappings work I added it to my keymap, which ended up looking like this</p>


<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
</pre></td><td class="code"><pre class="c" style="font-family:monospace;">xkb_keymap <span style="color: #009900;">&#123;</span>
    xkb_keycodes  <span style="color: #009900;">&#123;</span> include <span style="color: #ff0000;">&quot;evdev+aliases(qwerty)&quot;</span> <span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
    xkb_types     <span style="color: #009900;">&#123;</span> include <span style="color: #ff0000;">&quot;complete&quot;</span> <span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
    xkb_compat    <span style="color: #009900;">&#123;</span> include <span style="color: #ff0000;">&quot;complete&quot;</span> <span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
    xkb_symbols   <span style="color: #009900;">&#123;</span> include <span style="color: #ff0000;">&quot;pc+se(nodeadkeys)+inet(evdev)+capslock(swapescape)+compose(paus)+sedev(devkeys)&quot;</span> <span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
    xkb_geometry  <span style="color: #009900;">&#123;</span> include <span style="color: #ff0000;">&quot;pc(pc104)&quot;</span> <span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>


<h3>Tying it together</h3>

<p>Now all the remains is to load the new configuration on login.  Based on madduck&#8217;s example I put the following into <code>~/.xprofile</code></p>


<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># load XKB, if there is one</span>
<span style="color: #007800;">XKBDIR</span>=<span style="color: #800000;">${HOME}</span><span style="color: #000000; font-weight: bold;">/</span>.xkb
<span style="color: #007800;">XKBMAPFILE</span>=<span style="color: #800000;">${XKBDIR}</span><span style="color: #000000; font-weight: bold;">/</span>keymap<span style="color: #000000; font-weight: bold;">/</span>$<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #c20cb9; font-weight: bold;">hostname</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #660033;">-f</span> <span style="color: #800000;">${XKBMAPFILE}</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">then</span>
    xkbcomp <span style="color: #660033;">-I</span><span style="color: #800000;">${XKBDIR}</span> <span style="color: #800000;">${XKBMAPFILE}</span> <span style="color: #800000;">${DISPLAY}</span>
<span style="color: #000000; font-weight: bold;">fi</span></pre></td></tr></table></div>


<p>Now I just have to get used to using the new mappings.</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Ftherning.org%2Fmagnus%2Farchives%2F982&amp;title=Adjusting%20to%20Sweden%20with%20XKB" id="wpa2a_20">Share/Bookmark</a></p>]]></content:encoded>
			<wfw:commentRss>http://therning.org/magnus/archives/982/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>LXDE and xmonad</title>
		<link>http://therning.org/magnus/archives/974</link>
		<comments>http://therning.org/magnus/archives/974#comments</comments>
		<pubDate>Thu, 08 Dec 2011 09:48:59 +0000</pubDate>
		<dc:creator>Magnus</dc:creator>
				<category><![CDATA[Posts]]></category>
		<category><![CDATA[lxde]]></category>
		<category><![CDATA[xmonad]]></category>

		<guid isPermaLink="false">http://therning.org/magnus/?p=974</guid>
		<description><![CDATA[A few days ago I create the page on LXDE and Xmonad on the Xmonad area of the Haskell Wiki. It&#8217;s very short, mainly due to it being very simple to set it up. My config is a bit bare-bones at the moment though and I&#8217;m sure others have more to contribute. And yes! This [...]]]></description>
				<content:encoded><![CDATA[<p>A few days ago I create the page on <a href="http://www.haskell.org/haskellwiki/Xmonad/Using_xmonad_in_LXDE">LXDE and Xmonad</a> on the <a href="http://www.haskell.org/haskellwiki/Xmonad">Xmonad area</a> of the Haskell Wiki. It&#8217;s very short, mainly due to it being <em>very</em> simple to set it up.  My config is a bit bare-bones at the moment though and I&#8217;m sure others have more to contribute.</p>

<p>And yes!  This means I&#8217;ve left the Gnome camp.  Quite possibly for good.</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Ftherning.org%2Fmagnus%2Farchives%2F974&amp;title=LXDE%20and%20xmonad" id="wpa2a_22">Share/Bookmark</a></p>]]></content:encoded>
			<wfw:commentRss>http://therning.org/magnus/archives/974/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Twitter Weekly Updates for 2011-07-17</title>
		<link>http://therning.org/magnus/archives/962</link>
		<comments>http://therning.org/magnus/archives/962#comments</comments>
		<pubDate>Sun, 17 Jul 2011 22:59:00 +0000</pubDate>
		<dc:creator>Magnus</dc:creator>
				<category><![CDATA[Posts]]></category>
		<category><![CDATA[Tweets]]></category>

		<guid isPermaLink="false">http://therning.org/magnus/archives/962</guid>
		<description><![CDATA[Has just been calmed down by OnOff&#039;s support. #onoff #bankruptcy #]]></description>
				<content:encoded><![CDATA[<ul class="aktt_tweet_digest">
    <li>Has just been calmed down by OnOff&#039;s support. #<a href="http://search.twitter.com/search?q=%23onoff" class="aktt_hashtag">onoff</a> #bankruptcy <a href="http://twitter.com/magthe/statuses/90694938127368193" class="aktt_tweet_time">#</a></li>
</ul>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Ftherning.org%2Fmagnus%2Farchives%2F962&amp;title=Twitter%20Weekly%20Updates%20for%202011-07-17" id="wpa2a_24">Share/Bookmark</a></p>]]></content:encoded>
			<wfw:commentRss>http://therning.org/magnus/archives/962/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Twitter Weekly Updates for 2011-07-11</title>
		<link>http://therning.org/magnus/archives/957</link>
		<comments>http://therning.org/magnus/archives/957#comments</comments>
		<pubDate>Sun, 10 Jul 2011 22:59:00 +0000</pubDate>
		<dc:creator>Magnus</dc:creator>
				<category><![CDATA[Posts]]></category>
		<category><![CDATA[Tweets]]></category>

		<guid isPermaLink="false">http://therning.org/magnus/archives/957</guid>
		<description><![CDATA[Underbart i #gp idag: Filmer och böcker skall ha ordentliga slut. Annars har någon inte gjort sitt jobb. # När &#34;alternativ medicin&#34; har bevisats fungera, så kan vi helt enkelt kallat den &#34;medicin&#34;. #svtdebatt # När en typ av &#34;alternativ medicin&#34; har bevisats fungera, så kan vi helt enkelt kalla den &#34;medicin&#34;. #debatt # Google+ [...]]]></description>
				<content:encoded><![CDATA[<ul class="aktt_tweet_digest">
    <li>Underbart i #<a href="http://search.twitter.com/search?q=%23gp" class="aktt_hashtag">gp</a> idag: Filmer och böcker skall ha ordentliga slut. Annars har någon inte gjort sitt jobb. <a href="http://twitter.com/magthe/statuses/88509397050982400" class="aktt_tweet_time">#</a></li>
    <li>När &quot;alternativ medicin&quot; har bevisats fungera, så kan vi helt enkelt kallat den &quot;medicin&quot;. #<a href="http://search.twitter.com/search?q=%23svtdebatt" class="aktt_hashtag">svtdebatt</a> <a href="http://twitter.com/magthe/statuses/89036602386554880" class="aktt_tweet_time">#</a></li>
    <li>När en typ av &quot;alternativ medicin&quot; har bevisats fungera, så kan vi helt enkelt kalla den &quot;medicin&quot;. #<a href="http://search.twitter.com/search?q=%23debatt" class="aktt_hashtag">debatt</a> <a href="http://twitter.com/magthe/statuses/89039477888122880" class="aktt_tweet_time">#</a></li>
    <li>Google+ still won&#039;t let me sign up <img src='http://therning.org/magnus/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' />  <a href="http://twitter.com/magthe/statuses/90171144849727489" class="aktt_tweet_time">#</a></li>
</ul>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Ftherning.org%2Fmagnus%2Farchives%2F957&amp;title=Twitter%20Weekly%20Updates%20for%202011-07-11" id="wpa2a_26">Share/Bookmark</a></p>]]></content:encoded>
			<wfw:commentRss>http://therning.org/magnus/archives/957/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Twitter Weekly Updates for 2011-07-04</title>
		<link>http://therning.org/magnus/archives/949</link>
		<comments>http://therning.org/magnus/archives/949#comments</comments>
		<pubDate>Sun, 03 Jul 2011 22:59:00 +0000</pubDate>
		<dc:creator>Magnus</dc:creator>
				<category><![CDATA[Posts]]></category>
		<category><![CDATA[Tweets]]></category>

		<guid isPermaLink="false">http://therning.org/magnus/archives/949</guid>
		<description><![CDATA[#h4a has been updated to deal with the recent push of ghc 7.0.3 to #archlinux #haskell #]]></description>
				<content:encoded><![CDATA[<ul class="aktt_tweet_digest">
    <li>#<a href="http://search.twitter.com/search?q=%23h4a" class="aktt_hashtag">h4a</a> has been updated to deal with the recent push of ghc 7.0.3 to #<a href="http://search.twitter.com/search?q=%23archlinux" class="aktt_hashtag">archlinux</a>  #<a href="http://search.twitter.com/search?q=%23haskell" class="aktt_hashtag">haskell</a> <a href="http://twitter.com/magthe/statuses/85454349207216128" class="aktt_tweet_time">#</a></li>
</ul>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Ftherning.org%2Fmagnus%2Farchives%2F949&amp;title=Twitter%20Weekly%20Updates%20for%202011-07-04" id="wpa2a_28">Share/Bookmark</a></p>]]></content:encoded>
			<wfw:commentRss>http://therning.org/magnus/archives/949/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Twitter Weekly Updates for 2011-06-26</title>
		<link>http://therning.org/magnus/archives/948</link>
		<comments>http://therning.org/magnus/archives/948#comments</comments>
		<pubDate>Sun, 26 Jun 2011 22:59:00 +0000</pubDate>
		<dc:creator>Magnus</dc:creator>
				<category><![CDATA[Posts]]></category>
		<category><![CDATA[Tweets]]></category>

		<guid isPermaLink="false">http://therning.org/magnus/archives/948</guid>
		<description><![CDATA[Another update to [h4a], tagsoup and vector. #haskell #archlinux #]]></description>
				<content:encoded><![CDATA[<ul class="aktt_tweet_digest">
    <li>Another update to [h4a], tagsoup and vector. #<a href="http://search.twitter.com/search?q=%23haskell" class="aktt_hashtag">haskell</a> #archlinux <a href="http://twitter.com/magthe/statuses/84545276752302080" class="aktt_tweet_time">#</a></li>
</ul>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Ftherning.org%2Fmagnus%2Farchives%2F948&amp;title=Twitter%20Weekly%20Updates%20for%202011-06-26" id="wpa2a_30">Share/Bookmark</a></p>]]></content:encoded>
			<wfw:commentRss>http://therning.org/magnus/archives/948/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Twitter Weekly Updates for 2011-06-19</title>
		<link>http://therning.org/magnus/archives/947</link>
		<comments>http://therning.org/magnus/archives/947#comments</comments>
		<pubDate>Sun, 19 Jun 2011 22:59:00 +0000</pubDate>
		<dc:creator>Magnus</dc:creator>
				<category><![CDATA[Posts]]></category>
		<category><![CDATA[Tweets]]></category>

		<guid isPermaLink="false">http://therning.org/magnus/archives/947</guid>
		<description><![CDATA[Dear #virginmedia you were supposed to come by to pick up your equipment today. I waited and waited, but you never came. What do I do now? #]]></description>
				<content:encoded><![CDATA[<ul class="aktt_tweet_digest">
    <li>Dear #<a href="http://search.twitter.com/search?q=%23virginmedia" class="aktt_hashtag">virginmedia</a>  you were supposed to come by to pick up your equipment today. I waited and waited, but you never came. What do I do now? <a href="http://twitter.com/magthe/statuses/81844398446485504" class="aktt_tweet_time">#</a></li>
</ul>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Ftherning.org%2Fmagnus%2Farchives%2F947&amp;title=Twitter%20Weekly%20Updates%20for%202011-06-19" id="wpa2a_32">Share/Bookmark</a></p>]]></content:encoded>
			<wfw:commentRss>http://therning.org/magnus/archives/947/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Twitter Weekly Updates for 2011-06-13</title>
		<link>http://therning.org/magnus/archives/946</link>
		<comments>http://therning.org/magnus/archives/946#comments</comments>
		<pubDate>Sun, 12 Jun 2011 22:59:00 +0000</pubDate>
		<dc:creator>Magnus</dc:creator>
				<category><![CDATA[Posts]]></category>
		<category><![CDATA[Tweets]]></category>

		<guid isPermaLink="false">http://therning.org/magnus/archives/946</guid>
		<description><![CDATA[Hmm, I don&#039;t really like that #archlinux replaced a working &#039;hostname&#039; command with a non-working one # I do hope that the move will come together this weekend. #fingerscrossed #movetosweden #]]></description>
				<content:encoded><![CDATA[<ul class="aktt_tweet_digest">
    <li>Hmm, I don&#039;t really like that #<a href="http://search.twitter.com/search?q=%23archlinux" class="aktt_hashtag">archlinux</a> replaced a working &#039;hostname&#039; command with a non-working one <img src='http://therning.org/magnus/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' />  <a href="http://twitter.com/magthe/statuses/79345314078785536" class="aktt_tweet_time">#</a></li>
    <li>I do hope that the move will come together this weekend. #<a href="http://search.twitter.com/search?q=%23fingerscrossed" class="aktt_hashtag">fingerscrossed</a> #movetosweden <a href="http://twitter.com/magthe/statuses/79346015441920000" class="aktt_tweet_time">#</a></li>
</ul>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Ftherning.org%2Fmagnus%2Farchives%2F946&amp;title=Twitter%20Weekly%20Updates%20for%202011-06-13" id="wpa2a_34">Share/Bookmark</a></p>]]></content:encoded>
			<wfw:commentRss>http://therning.org/magnus/archives/946/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Twitter Weekly Updates for 2011-06-05</title>
		<link>http://therning.org/magnus/archives/945</link>
		<comments>http://therning.org/magnus/archives/945#comments</comments>
		<pubDate>Sun, 05 Jun 2011 22:59:00 +0000</pubDate>
		<dc:creator>Magnus</dc:creator>
				<category><![CDATA[Posts]]></category>
		<category><![CDATA[Tweets]]></category>

		<guid isPermaLink="false">https://therning.org/magnus/archives/945</guid>
		<description><![CDATA[World is upside-down today, 75% men on #yoga this morning. #ashtanga # Kära Familjebostäder, hur kan *inte* ha planlösningar till alla era lägenheter? #]]></description>
				<content:encoded><![CDATA[<ul class="aktt_tweet_digest">
    <li>World is upside-down today, 75% men on #<a href="http://search.twitter.com/search?q=%23yoga" class="aktt_hashtag">yoga</a> this morning. #<a href="http://search.twitter.com/search?q=%23ashtanga" class="aktt_hashtag">ashtanga</a> <a href="http://twitter.com/magthe/statuses/75174140281225216" class="aktt_tweet_time">#</a></li>
    <li>Kära Familjebostäder, hur kan *inte* ha planlösningar till alla era lägenheter? <a href="http://twitter.com/magthe/statuses/75533136909443072" class="aktt_tweet_time">#</a></li>
</ul>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Ftherning.org%2Fmagnus%2Farchives%2F945&amp;title=Twitter%20Weekly%20Updates%20for%202011-06-05" id="wpa2a_36">Share/Bookmark</a></p>]]></content:encoded>
			<wfw:commentRss>http://therning.org/magnus/archives/945/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Twitter Weekly Updates for 2011-05-29</title>
		<link>http://therning.org/magnus/archives/944</link>
		<comments>http://therning.org/magnus/archives/944#comments</comments>
		<pubDate>Sun, 29 May 2011 22:59:00 +0000</pubDate>
		<dc:creator>Magnus</dc:creator>
				<category><![CDATA[Posts]]></category>
		<category><![CDATA[Tweets]]></category>

		<guid isPermaLink="false">http://therning.org/magnus/archives/944</guid>
		<description><![CDATA[Experiment still ongoing, 5 days. #mylitteexperiment # Excellent workshop with Vanessa Menendez-Covelo this Saturday. She got me into positions I thought were beyond me. #ashtanga #yoga # http://www.bbc.co.uk/programmes/b011lvb9 : All Watched Over by Machines of Loving Grace # Building more stuff for [h4a], updating and adding cblrepo itself, as well as criterion. #h4a #haskell #archlinux [...]]]></description>
				<content:encoded><![CDATA[<ul class="aktt_tweet_digest">
    <li>Experiment still ongoing, 5 days. #<a href="http://search.twitter.com/search?q=%23mylitteexperiment" class="aktt_hashtag">mylitteexperiment</a> <a href="http://twitter.com/magthe/statuses/72652287146856448" class="aktt_tweet_time">#</a></li>
    <li>Excellent workshop with Vanessa Menendez-Covelo this Saturday. She got me into positions I thought were beyond me. #<a href="http://search.twitter.com/search?q=%23ashtanga" class="aktt_hashtag">ashtanga</a> #yoga <a href="http://twitter.com/magthe/statuses/72653042012524544" class="aktt_tweet_time">#</a></li>
    <li><a href="http://www.bbc.co.uk/programmes/b011lvb9" rel="nofollow">http://www.bbc.co.uk/programmes/b011lvb9</a> : All Watched Over by Machines of Loving Grace <a href="http://twitter.com/magthe/statuses/73062631203807232" class="aktt_tweet_time">#</a></li>
    <li>Building more stuff for [h4a], updating and adding cblrepo itself, as well as criterion. #<a href="http://search.twitter.com/search?q=%23h4a" class="aktt_hashtag">h4a</a> #haskell #<a href="http://search.twitter.com/search?q=%23archlinux" class="aktt_hashtag">archlinux</a> <a href="http://twitter.com/magthe/statuses/73093598039646209" class="aktt_tweet_time">#</a></li>
    <li>Oh how I wish authors of #<a href="http://search.twitter.com/search?q=%23haskell" class="aktt_hashtag">haskell</a> libs would put examples in their Haddock docs. Right now it&#039;s criterion that&#039;s confusing me. <img src='http://therning.org/magnus/wp-includes/images/smilies/icon_sad.gif' alt=':-(' class='wp-smiley' />  <a href="http://twitter.com/magthe/statuses/73107708798173185" class="aktt_tweet_time">#</a></li>
    <li>Seeing some strange stuff when using criterion. #<a href="http://search.twitter.com/search?q=%23haskell" class="aktt_hashtag">haskell</a> #performance <a href="http://twitter.com/magthe/statuses/73154185348120576" class="aktt_tweet_time">#</a></li>
    <li>Experiment over! It took my former employer a week to turn off my access to the SSH gateway into the internal network. #<a href="http://search.twitter.com/search?q=%23mylittleexperiment" class="aktt_hashtag">mylittleexperiment</a> <a href="http://twitter.com/magthe/statuses/73456501867556864" class="aktt_tweet_time">#</a></li>
    <li>This is only the beginning of being a responsible parent who only has FLOSS systems in the house. #<a href="http://search.twitter.com/search?q=%23floss" class="aktt_hashtag">floss</a> #parenting <a href="http://twitter.com/magthe/statuses/73832010073911297" class="aktt_tweet_time">#</a></li>
    <li>Sent a letter to the manager of the nursery urging them to use an open format for their weekly newsletter. <img src='http://therning.org/magnus/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  #<a href="http://search.twitter.com/search?q=%23openformat" class="aktt_hashtag">openformat</a> <a href="http://twitter.com/magthe/statuses/74018340745658368" class="aktt_tweet_time">#</a></li>
</ul>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Ftherning.org%2Fmagnus%2Farchives%2F944&amp;title=Twitter%20Weekly%20Updates%20for%202011-05-29" id="wpa2a_38">Share/Bookmark</a></p>]]></content:encoded>
			<wfw:commentRss>http://therning.org/magnus/archives/944/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Twitter Weekly Updates for 2011-05-23</title>
		<link>http://therning.org/magnus/archives/943</link>
		<comments>http://therning.org/magnus/archives/943#comments</comments>
		<pubDate>Sun, 22 May 2011 22:59:00 +0000</pubDate>
		<dc:creator>Magnus</dc:creator>
				<category><![CDATA[Posts]]></category>
		<category><![CDATA[Tweets]]></category>

		<guid isPermaLink="false">http://therning.org/magnus/archives/943</guid>
		<description><![CDATA[2 days to go # I just got a lesson in nice Text.JSON usage. I guess I should stop looking to @donsbot for idiomatic #haskell # Good morning! # Cleaning out desk and computer at work. The scrubbing of one of the systems will run over night. #movetosweden #leavingjob # One more day in this [...]]]></description>
				<content:encoded><![CDATA[<ul class="aktt_tweet_digest">
    <li>2 days to go <img src='http://therning.org/magnus/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  <a href="http://twitter.com/magthe/statuses/70248950262800384" class="aktt_tweet_time">#</a></li>
    <li>I just got a lesson in nice Text.JSON usage. I guess I should stop looking to @<a href="http://twitter.com/donsbot" class="aktt_username">donsbot</a> for idiomatic #<a href="http://search.twitter.com/search?q=%23haskell" class="aktt_hashtag">haskell</a> <img src='http://therning.org/magnus/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' />  <a href="http://twitter.com/magthe/statuses/70249240026288128" class="aktt_tweet_time">#</a></li>
    <li>Good morning! <a href="http://twitter.com/magthe/statuses/70387412597092352" class="aktt_tweet_time">#</a></li>
    <li>Cleaning out desk and computer at work. The scrubbing of one of the systems will run over night. #<a href="http://search.twitter.com/search?q=%23movetosweden" class="aktt_hashtag">movetosweden</a> #leavingjob <a href="http://twitter.com/magthe/statuses/70511664474243072" class="aktt_tweet_time">#</a></li>
    <li>One more day in this job <img src='http://therning.org/magnus/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  #<a href="http://search.twitter.com/search?q=%23movetosweden" class="aktt_hashtag">movetosweden</a> #leavingjob <a href="http://twitter.com/magthe/statuses/70535469020094464" class="aktt_tweet_time">#</a></li>
    <li>Off to my last day at work in the UK. First some #<a href="http://search.twitter.com/search?q=%23yoga" class="aktt_hashtag">yoga</a> though. #<a href="http://search.twitter.com/search?q=%23leavingjob" class="aktt_hashtag">leavingjob</a> #movingtosweden <a href="http://twitter.com/magthe/statuses/70715605812125696" class="aktt_tweet_time">#</a></li>
    <li>I&#039;m just about to leave the office for the last time <img src='http://therning.org/magnus/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  <a href="http://twitter.com/magthe/statuses/70867245353533441" class="aktt_tweet_time">#</a></li>
    <li>I am now officially in between jobs. For about 2 months <img src='http://therning.org/magnus/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  #<a href="http://search.twitter.com/search?q=%23movingtosweden" class="aktt_hashtag">movingtosweden</a> <a href="http://twitter.com/magthe/statuses/70910268884000768" class="aktt_tweet_time">#</a></li>
    <li>First day as funemployed (thanks @<a href="http://twitter.com/mcclurmc" class="aktt_username">mcclurmc</a> for the word) &amp; I&#039;ve accomplished all I wanted &amp; a little bit more. Great start. #<a href="http://search.twitter.com/search?q=%23movingtosweden" class="aktt_hashtag">movingtosweden</a> <a href="http://twitter.com/magthe/statuses/71253559013941249" class="aktt_tweet_time">#</a></li>
    <li>I&#039;m running an experiment: 2 days. <a href="http://twitter.com/magthe/statuses/71590642173739008" class="aktt_tweet_time">#</a></li>
    <li>Lots of un/re-learning to do here: <a href="http://www.fieggen.com/shoelace/index.htm" rel="nofollow">http://www.fieggen.com/shoelace/index.htm</a> <img src='http://therning.org/magnus/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  #<a href="http://search.twitter.com/search?q=%23shoes" class="aktt_hashtag">shoes</a> <a href="http://twitter.com/magthe/statuses/71605609732124672" class="aktt_tweet_time">#</a></li>
    <li>Done for the day <img src='http://therning.org/magnus/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  #<a href="http://search.twitter.com/search?q=%23movingtosweden" class="aktt_hashtag">movingtosweden</a> <a href="http://twitter.com/magthe/statuses/71605932802580480" class="aktt_tweet_time">#</a></li>
</ul>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Ftherning.org%2Fmagnus%2Farchives%2F943&amp;title=Twitter%20Weekly%20Updates%20for%202011-05-23" id="wpa2a_40">Share/Bookmark</a></p>]]></content:encoded>
			<wfw:commentRss>http://therning.org/magnus/archives/943/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Twitter Weekly Updates for 2011-05-15</title>
		<link>http://therning.org/magnus/archives/942</link>
		<comments>http://therning.org/magnus/archives/942#comments</comments>
		<pubDate>Sun, 15 May 2011 22:59:00 +0000</pubDate>
		<dc:creator>Magnus</dc:creator>
				<category><![CDATA[Posts]]></category>
		<category><![CDATA[Tweets]]></category>

		<guid isPermaLink="false">http://therning.org/magnus/archives/942</guid>
		<description><![CDATA[Just released, cblrepo: http://hackage.haskell.org/package/cblrepo # No matter the nature of bug in a pkg on #aur the pkg is only outdated when a new version is available! Difficult to understand? #archlinux # I do like #unicode It&#039;s liberating writing ? instead of &#039;beta&#039;. # I want! http://depthjs.media.mit.edu/ # Playing a bit with #webpy rather nice, [...]]]></description>
				<content:encoded><![CDATA[<ul class="aktt_tweet_digest">
    <li>Just released, cblrepo: <a href="http://hackage.haskell.org/package/cblrepo" rel="nofollow">http://hackage.haskell.org/package/cblrepo</a> <a href="http://twitter.com/magthe/statuses/67690426689265664" class="aktt_tweet_time">#</a></li>
    <li>No matter the nature of bug in a pkg on #<a href="http://search.twitter.com/search?q=%23aur" class="aktt_hashtag">aur</a>  the pkg is only outdated when a new version is available! Difficult to understand? #<a href="http://search.twitter.com/search?q=%23archlinux" class="aktt_hashtag">archlinux</a> <a href="http://twitter.com/magthe/statuses/67916058778013696" class="aktt_tweet_time">#</a></li>
    <li>I do like #<a href="http://search.twitter.com/search?q=%23unicode" class="aktt_hashtag">unicode</a>  It&#039;s liberating writing ? instead of &#039;beta&#039;. <a href="http://twitter.com/magthe/statuses/67947688708145152" class="aktt_tweet_time">#</a></li>
    <li>I want! <a href="http://depthjs.media.mit.edu/" rel="nofollow">http://depthjs.media.mit.edu/</a> <a href="http://twitter.com/magthe/statuses/67950475391139840" class="aktt_tweet_time">#</a></li>
    <li>Playing a bit with #<a href="http://search.twitter.com/search?q=%23webpy" class="aktt_hashtag">webpy</a>  rather nice, despite being #<a href="http://search.twitter.com/search?q=%23python" class="aktt_hashtag">python</a> <img src='http://therning.org/magnus/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  <a href="http://twitter.com/magthe/statuses/68996071371706368" class="aktt_tweet_time">#</a></li>
    <li>How do I get the &lt;?xml heading when using elementtree to create #<a href="http://search.twitter.com/search?q=%23xml" class="aktt_hashtag">xml</a>  #<a href="http://search.twitter.com/search?q=%23python" class="aktt_hashtag">python</a> <a href="http://twitter.com/magthe/statuses/69024260252893184" class="aktt_tweet_time">#</a></li>
    <li>Good thing I used #<a href="http://search.twitter.com/search?q=%23encfs" class="aktt_hashtag">encfs</a> on my #<a href="http://search.twitter.com/search?q=%23dropbox" class="aktt_hashtag">dropbox</a> files then: <a href="http://is.gd/JaCSCk" rel="nofollow">http://is.gd/JaCSCk</a> <a href="http://twitter.com/magthe/statuses/69161430452146177" class="aktt_tweet_time">#</a></li>
    <li>Just put my Arch Haskell repo (source) in git, now pondering whether it&#039;s worth sharing it. <a href="http://twitter.com/magthe/statuses/69881478993018881" class="aktt_tweet_time">#</a></li>
</ul>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Ftherning.org%2Fmagnus%2Farchives%2F942&amp;title=Twitter%20Weekly%20Updates%20for%202011-05-15" id="wpa2a_42">Share/Bookmark</a></p>]]></content:encoded>
			<wfw:commentRss>http://therning.org/magnus/archives/942/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Twitter Weekly Updates for 2011-05-09</title>
		<link>http://therning.org/magnus/archives/941</link>
		<comments>http://therning.org/magnus/archives/941#comments</comments>
		<pubDate>Sun, 08 May 2011 22:59:00 +0000</pubDate>
		<dc:creator>Magnus</dc:creator>
				<category><![CDATA[Posts]]></category>
		<category><![CDATA[Tweets]]></category>

		<guid isPermaLink="false">http://therning.org/magnus/archives/941</guid>
		<description><![CDATA[Is there such a thing for Linux? http://is.gd/uxVJQj # I&#039;m not surprised: http://is.gd/sHaMd1 IMNSHO introducing fees was a very stupid mistake. # Job offer accepted, so now I can concentrate completely on the move. # My Arch repo for Haskell packages, all maintained using cblrepo. Feedback welcome. [h4a] Server = http://www.kiwilight.com/~magnus/$repo # Did archlinux.org fall [...]]]></description>
				<content:encoded><![CDATA[<ul class="aktt_tweet_digest">
    <li>Is there such a thing for Linux? <a href="http://is.gd/uxVJQj" rel="nofollow">http://is.gd/uxVJQj</a> <a href="http://twitter.com/magthe/statuses/66162255812763649" class="aktt_tweet_time">#</a></li>
    <li>I&#039;m not surprised: <a href="http://is.gd/sHaMd1" rel="nofollow">http://is.gd/sHaMd1</a>
IMNSHO introducing fees was a very stupid mistake. <a href="http://twitter.com/magthe/statuses/66170181994557440" class="aktt_tweet_time">#</a></li>
    <li>Job offer accepted, so now I can concentrate completely on the move. <a href="http://twitter.com/magthe/statuses/66501700923559937" class="aktt_tweet_time">#</a></li>
    <li>My Arch repo for Haskell packages, all maintained using cblrepo. Feedback welcome.
[h4a]
Server = <a href="http://www.kiwilight.com/~magnus/$repo" rel="nofollow">http://www.kiwilight.com/~magnus/$repo</a> <a href="http://twitter.com/magthe/statuses/66965397873762304" class="aktt_tweet_time">#</a></li>
    <li>Did archlinux.org fall off the internet? #<a href="http://search.twitter.com/search?q=%23archlinux" class="aktt_hashtag">archlinux</a> <a href="http://twitter.com/magthe/statuses/67151081049829376" class="aktt_tweet_time">#</a></li>
    <li>[h4a]: cmdargs updated, and photoname added. #<a href="http://search.twitter.com/search?q=%23haskell" class="aktt_hashtag">haskell</a> #archlinux <a href="http://twitter.com/magthe/statuses/67262231582216194" class="aktt_tweet_time">#</a></li>
</ul>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Ftherning.org%2Fmagnus%2Farchives%2F941&amp;title=Twitter%20Weekly%20Updates%20for%202011-05-09" id="wpa2a_44">Share/Bookmark</a></p>]]></content:encoded>
			<wfw:commentRss>http://therning.org/magnus/archives/941/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Xmonad and Gnome 3</title>
		<link>http://therning.org/magnus/archives/938</link>
		<comments>http://therning.org/magnus/archives/938#comments</comments>
		<pubDate>Sun, 08 May 2011 07:39:51 +0000</pubDate>
		<dc:creator>Magnus</dc:creator>
				<category><![CDATA[Posts]]></category>
		<category><![CDATA[arch]]></category>
		<category><![CDATA[gnome]]></category>
		<category><![CDATA[gnome3]]></category>
		<category><![CDATA[xmonad]]></category>

		<guid isPermaLink="false">http://therning.org/magnus/?p=938</guid>
		<description><![CDATA[The upgrade to Gnome3 in ArchLinux a few days ago broke my previous setup that combined xmonad with Gnome. Gnome 3 has a fallback mode, but I found that the instructions for replacing metacity under Gnome 2 no longer worked. With some help from the xmonad mailing list (in particular Jens Petersen and his efforts [...]]]></description>
				<content:encoded><![CDATA[<p>The upgrade to Gnome3 in <a href="http://www.archlinux.org/">ArchLinux</a> a few days ago broke my previous setup that combined <a href="http://www.xmonad.org">xmonad</a> with Gnome.  Gnome 3 has a fallback mode, but I found that the instructions for replacing metacity under Gnome 2 no longer worked.  With some help from the xmonad mailing list (in particular Jens Petersen and his efforts of providing a working setup on Fedora) I now finally have a working setup again.  Here&#8217;s how I did it.</p>

<p>Add a session file for use by Gnome Session (<code>/usr/share/gnome-session/sessions/xmonad.session</code>):</p>

<pre><code>[GNOME Session]
Name=Xmonad session
RequiredComponents=gnome-panel;gnome-settings-daemon;
RequiredProviders=windowmanager;notifications;
DefaultProvider-windowmanager=xmonad
DefaultProvider-notifications=notification-daemon
</code></pre>

<p>And a desktop file for GDM (<code>/usr/share/xsessions/xmonad-gnome-session.desktop</code>):</p>

<pre><code>[Desktop Entry]
Name=Xmonad GNOME
Comment=Tiling window manager
TryExec=/usr/bin/gnome-session
Exec=gnome-session --session=xmonad
Type=XSession
</code></pre>

<p>That&#8217;s all it takes.  Of course I&#8217;ve raised a <a href="https://bugs.archlinux.org/task/24165">ticket against the Arch package</a>.</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Ftherning.org%2Fmagnus%2Farchives%2F938&amp;title=Xmonad%20and%20Gnome%203" id="wpa2a_46">Share/Bookmark</a></p>]]></content:encoded>
			<wfw:commentRss>http://therning.org/magnus/archives/938/feed</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>Per-user Gnome 3 configuration</title>
		<link>http://therning.org/magnus/archives/933</link>
		<comments>http://therning.org/magnus/archives/933#comments</comments>
		<pubDate>Fri, 06 May 2011 06:04:32 +0000</pubDate>
		<dc:creator>Magnus</dc:creator>
				<category><![CDATA[Posts]]></category>
		<category><![CDATA[arch]]></category>
		<category><![CDATA[configuration]]></category>
		<category><![CDATA[gnome3]]></category>

		<guid isPermaLink="false">http://therning.org/magnus/?p=933</guid>
		<description><![CDATA[Gnome 3 just hit the official ArchLinux repos a few days ago. It&#8217;s new, it&#8217;s slick, it&#8217;s shiny&#8230; but I don&#8217;t think it&#8217;s ready for general use just yet. It seems stable enough, but there&#8217;s just a few too many things missing to make it feel like it&#8217;s complete. Anyway, running Arch means that at [...]]]></description>
				<content:encoded><![CDATA[<p>Gnome 3 just hit the official <a href="http://www.archlinux.org/">ArchLinux</a> repos a few days ago.  It&#8217;s new,
it&#8217;s slick, it&#8217;s shiny&#8230; but I don&#8217;t think it&#8217;s ready for general use just
yet. It seems stable enough, but there&#8217;s just a few too many things missing to
make it feel like it&#8217;s complete.  Anyway, running Arch means that at times
one has to live with not-quite-release-ready software anyway <img src='http://therning.org/magnus/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>

<p>The biggest issue I&#8217;ve come across with Gnome 3, and especially Gnome Shell
and the window manager, is configuring the themes.  I was pointed to a fairly
<a href="http://blog.fpmurphy.com/2011/03/customizing-the-gnome-3-shell.html">good article on customising the Gnome Shell</a>, but it suggests modifying
system files which is a bad thing to do even on single-user systems.  So this
post should be read as an addendum to that one.</p>

<p>First of all install the User Theme <a href="http://live.gnome.org/GnomeShell/Extensions">Gnome Shell Extension</a>.  The <a href="http://aur.archlinux.org/packages.php?ID=48614">AUR</a>
<a href="http://aur.archlinux.org/packages.php?ID=47501">packages</a> available pull the source from its <a href="http://git.gnome.org/browse/gnome-shell-extensions/">git repo</a> because there
doesn&#8217;t seem to be any releases of the extensions just yet.  When using the
bleeding edge source I ran into problems with Gnome Shell crashing so I advise
against using it.  I&#8217;ve had success with the source tagged at 3.0.1, you can
find an <a href="http://www.kiwilight.com/~magnus/gnome-shell-extension-user-theme-3.0.1-1.src.tar.gz">Arch source package for Gnome Shell User Theme</a> that I put
together based on one of the AUR packages.  Build and install that, then
restart Gnome Shell (Alt-F2, r, return).  Then verify that the extension has
been loaded by using <a href="http://live.gnome.org/GnomeShell/LookingGlass">Looking Glass</a>.</p>

<p>Then create copies of the default themes using <code>rsync</code>:</p>

<pre><code>% rsync -a /usr/share/themes/Adwaita ~/.themes
% mv ~/.themes/Adwaita ~/.themes/Adwaita2
% mkdir -p ~/.themes/Default/gnome-shell
% rsync -a /usr/share/gnome-shell/theme ~/.themes/Default/gnome-shell
</code></pre>

<p>Then modify the file <code>~/.themes/Adwaita2/index.theme</code> so that each mention of
<code>Adwaita</code> says <code>Adwaita2</code> instead, except for the cursor theme.</p>

<p>Make sure <code>gnome-tweak-tool</code> is installed (it&#8217;s in a package with the same
name).  Run it and change the shell theme to <code>Default</code>,the windows theme
to <code>Adwaita2</code>, and the interface gtk+ theme to <code>Adwaita2</code> as well.</p>

<p>Now you return to <a href="http://blog.fpmurphy.com/2011/03/customizing-the-gnome-3-shell.html">the article on configuring Gnome Shell</a>, but instead of
modifying the system files modify the ones in your <code>~/.themes</code>.</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Ftherning.org%2Fmagnus%2Farchives%2F933&amp;title=Per-user%20Gnome%203%20configuration" id="wpa2a_48">Share/Bookmark</a></p>]]></content:encoded>
			<wfw:commentRss>http://therning.org/magnus/archives/933/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>ArchHaskell HABS with cblrepo</title>
		<link>http://therning.org/magnus/archives/928</link>
		<comments>http://therning.org/magnus/archives/928#comments</comments>
		<pubDate>Wed, 04 May 2011 21:26:17 +0000</pubDate>
		<dc:creator>Magnus</dc:creator>
				<category><![CDATA[Posts]]></category>
		<category><![CDATA[arch]]></category>
		<category><![CDATA[haskell]]></category>

		<guid isPermaLink="false">http://therning.org/magnus/?p=928</guid>
		<description><![CDATA[As a follow-up to my earlier post on cblrepo I thought I&#8217;d convert a snapshot of ArchHaskell HABS to cblrepo. It&#8217;s mostly done as an exercise and to serve as an example. You can find it at http://www.kiwilight.com/~magnus/habs/. Of course I have used it to build all the packages, and I still have the result [...]]]></description>
				<content:encoded><![CDATA[<p>As a follow-up to my earlier post on <a href="http://therning.org/magnus/archives/914"><code>cblrepo</code></a> I thought I&#8217;d convert a snapshot of ArchHaskell <a href="https://github.com/archhaskell/habs">HABS</a> to <code>cblrepo</code>.  It&#8217;s mostly done as an exercise and to serve as an example.  You can find it at <a href="http://www.kiwilight.com/~magnus/habs/">http://www.kiwilight.com/~magnus/habs/</a>.</p>

<p>Of course I have used it to build all the packages, and I still have the result of that around, so if anyone asks I just might upload that as well.</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Ftherning.org%2Fmagnus%2Farchives%2F928&amp;title=ArchHaskell%20HABS%20with%20cblrepo" id="wpa2a_50">Share/Bookmark</a></p>]]></content:encoded>
			<wfw:commentRss>http://therning.org/magnus/archives/928/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Twitter Weekly Updates for 2011-05-01</title>
		<link>http://therning.org/magnus/archives/927</link>
		<comments>http://therning.org/magnus/archives/927#comments</comments>
		<pubDate>Sun, 01 May 2011 22:59:00 +0000</pubDate>
		<dc:creator>Magnus</dc:creator>
				<category><![CDATA[Posts]]></category>
		<category><![CDATA[Tweets]]></category>

		<guid isPermaLink="false">http://therning.org/magnus/archives/927</guid>
		<description><![CDATA[My Cabal-2-Arch conversion tool is just about ready to be unveiled. #haskell #archlinux # Gnome3 is here.. it&#039;s new&#8230; it&#039;s shiny&#8230; it&#039;s cool&#8230; just to bad mutter isn&#039;t a good window manager #]]></description>
				<content:encoded><![CDATA[<ul class="aktt_tweet_digest">
    <li>My Cabal-2-Arch conversion tool is just about ready to be unveiled. #<a href="http://search.twitter.com/search?q=%23haskell" class="aktt_hashtag">haskell</a> #archlinux <a href="http://twitter.com/magthe/statuses/63240562173677568" class="aktt_tweet_time">#</a></li>
    <li>Gnome3 is here.. it&#039;s new&#8230; it&#039;s shiny&#8230; it&#039;s cool&#8230; just to bad mutter isn&#039;t a good window manager <img src='http://therning.org/magnus/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' />  <a href="http://twitter.com/magthe/statuses/64782449451872256" class="aktt_tweet_time">#</a></li>
</ul>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Ftherning.org%2Fmagnus%2Farchives%2F927&amp;title=Twitter%20Weekly%20Updates%20for%202011-05-01" id="wpa2a_52">Share/Bookmark</a></p>]]></content:encoded>
			<wfw:commentRss>http://therning.org/magnus/archives/927/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Revisiting JSON in Haskell</title>
		<link>http://therning.org/magnus/archives/919</link>
		<comments>http://therning.org/magnus/archives/919#comments</comments>
		<pubDate>Sun, 01 May 2011 19:43:29 +0000</pubDate>
		<dc:creator>Magnus</dc:creator>
				<category><![CDATA[Posts]]></category>

		<guid isPermaLink="false">http://therning.org/magnus/?p=919</guid>
		<description><![CDATA[I just received an email with some praise for my earlier post on JSON in Haskell&#8211;it&#8217;s always nice to receive some praise However, the sender also mentioned that the mLookup function as coded there would blow up on incomplete JSON objects. That was by design, as a simplification, but the sender needed to deal with [...]]]></description>
				<content:encoded><![CDATA[<p>I just received an email with some praise for <a href="http://therning.org/magnus/archives/719">my earlier post on JSON in Haskell</a>&#8211;it&#8217;s always nice to receive some praise <img src='http://therning.org/magnus/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' />   However, the sender also mentioned that the <code>mLookup</code> function as coded there would blow up on incomplete JSON objects.  That was by design, as a simplification, but the sender needed to deal with just that and asked if I had some more elegant solution than making every field in the data type a <code>Maybe</code>.</p>

<p>As I said, it&#8217;s always nice to receive praise, so here&#8217;s one solution that came to mind as I was reading the email.</p>

<p>I should mention that it relies on there being a reasonable default value for each type of the fields, and that the default is the same for all fields sharing a type.</p>

<p>First off, define a type class for types with default values:</p>


<div class="wp_syntax"><table><tr><td class="code"><pre class="haskell" style="font-family:monospace;"><span style="color: #06c; font-weight: bold;">class</span> Defaultable d <span style="color: #06c; font-weight: bold;">where</span>
    def <span style="color: #339933; font-weight: bold;">::</span> d</pre></td></tr></table></div>


<p>Then modify <code>mLookup</code> so that it uses <code>Defaultable</code>.  I renamed it to <code>mLookupAndReadJSON</code>:</p>


<div class="wp_syntax"><table><tr><td class="code"><pre class="haskell" style="font-family:monospace;">mLookupAndReadJSON a <span style="color: #06c; font-weight: bold;">as</span> <span style="color: #339933; font-weight: bold;">=</span> <span style="font-weight: bold;">maybe</span> def readJSON <span style="color: green;">&#40;</span><span style="font-weight: bold;">lookup</span> a <span style="color: #06c; font-weight: bold;">as</span><span style="color: green;">&#41;</span></pre></td></tr></table></div>


<p>Now we need to provide some instances of <code>Defaultable</code> too.  I limit this example to cover only <code>GlossDef</code>, so only the following instances are required:</p>


<div class="wp_syntax"><table><tr><td class="code"><pre class="haskell" style="font-family:monospace;"><span style="color: #06c; font-weight: bold;">instance</span> Defaultable <span style="color: green;">&#91;</span>a<span style="color: green;">&#93;</span> <span style="color: #06c; font-weight: bold;">where</span>
    def <span style="color: #339933; font-weight: bold;">=</span> <span style="color: green;">&#91;</span><span style="color: green;">&#93;</span>
&nbsp;
<span style="color: #06c; font-weight: bold;">instance</span> Defaultable a <span style="color: #339933; font-weight: bold;">=&gt;</span> Defaultable <span style="color: green;">&#40;</span>Result a<span style="color: green;">&#41;</span> <span style="color: #06c; font-weight: bold;">where</span>
    def <span style="color: #339933; font-weight: bold;">=</span> Ok def</pre></td></tr></table></div>


<p>Now it&#8217;s possible to decode incomplete JSON objects:</p>


<div class="wp_syntax"><table><tr><td class="code"><pre class="haskell" style="font-family:monospace;">ghci<span style="color: #339933; font-weight: bold;">&gt;</span> decode <span style="background-color: #3cb371;">&quot;{ <span style="background-color: #3cb371; font-weight: bold;">\&quot;</span>GlossSeeAlso<span style="background-color: #3cb371; font-weight: bold;">\&quot;</span>: [<span style="background-color: #3cb371; font-weight: bold;">\&quot;</span>GML<span style="background-color: #3cb371; font-weight: bold;">\&quot;</span>, <span style="background-color: #3cb371; font-weight: bold;">\&quot;</span>XML<span style="background-color: #3cb371; font-weight: bold;">\&quot;</span>] }&quot;</span> <span style="color: #339933; font-weight: bold;">::</span> Result GlossDef
Ok <span style="color: green;">&#40;</span>GlossDef <span style="color: green;">&#123;</span>glossDefPara <span style="color: #339933; font-weight: bold;">=</span> <span style="background-color: #3cb371;">&quot;&quot;</span><span style="color: #339933; font-weight: bold;">,</span> glossDefSeeAlso <span style="color: #339933; font-weight: bold;">=</span> <span style="color: green;">&#91;</span><span style="background-color: #3cb371;">&quot;GML&quot;</span><span style="color: #339933; font-weight: bold;">,</span><span style="background-color: #3cb371;">&quot;XML&quot;</span><span style="color: green;">&#93;</span><span style="color: green;">&#125;</span><span style="color: green;">&#41;</span></pre></td></tr></table></div>


<p>I&#8217;m sure there are other ways of achieving what the author of the email asked for.  Please let me know of them in comments.</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Ftherning.org%2Fmagnus%2Farchives%2F919&amp;title=Revisiting%20JSON%20in%20Haskell" id="wpa2a_54">Share/Bookmark</a></p>]]></content:encoded>
			<wfw:commentRss>http://therning.org/magnus/archives/919/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Maintaining Haskell packages for a Linux distribution&#8212;cblrepo</title>
		<link>http://therning.org/magnus/archives/914</link>
		<comments>http://therning.org/magnus/archives/914#comments</comments>
		<pubDate>Wed, 27 Apr 2011 22:51:01 +0000</pubDate>
		<dc:creator>Magnus</dc:creator>
				<category><![CDATA[Posts]]></category>
		<category><![CDATA[arch]]></category>
		<category><![CDATA[cabal]]></category>
		<category><![CDATA[hackage]]></category>
		<category><![CDATA[haskell]]></category>

		<guid isPermaLink="false">http://therning.org/magnus/?p=914</guid>
		<description><![CDATA[Maintaining a large set of Haskell packages for a Linux distribution is quite a chore. Especially if one wants to track Hackage as far as possible. Several distributions have tools to automatically convert Cabal-based packages into distribution packages, e.g. cabal2arch for ArchLinux and cabal-rpm. They are just conversion tools though, and the most time-consuming activity [...]]]></description>
				<content:encoded><![CDATA[<p>Maintaining a large set of Haskell packages for a Linux distribution is quite
a chore.  Especially if one wants to track <a href="http://hackage.haskell.org/">Hackage</a> as far as possible.
Several distributions have tools to automatically convert Cabal-based packages
into distribution packages, e.g. <a href="http://hackage.haskell.org/package/cabal2arch">cabal2arch</a> for <a href="http://www.archlinux.org/">ArchLinux</a> and
<a href="http://hackage.haskell.org/package/cabal-rpm">cabal-rpm</a>.  They are just conversion tools though, and the most
time-consuming activity in maintaining Haskell packages is resolving
and verifying dependencies.</p>

<p>At least that was my experience when I was actively involved in
<a href="http://archhaskell.wordpress.com/">ArchHaskell</a>.  I only saw two options when adding or upgrading a package,
either I worked out dependencies manually, or I simply tried it out.  Neither
of them was very appealing, and both were very time-consuming.  It seemed
obvious that I needed some tool to help out.</p>

<p>Enter <code>cblrepo</code>!</p>

<p>It allows me to maintain a database of specific versions of packages, and when
I want to upgrade a package, or add a new one, it&#8217;ll verify that all
dependencies can be satisfied.  In other words, it helps me maintain a
buildable set of packages at all times.</p>

<p>The tool also has some functionality that helps in tracking Hackage as
packages are updated there.</p>

<h3>Something about how it works</h3>

<p>At the moment I maintain a small repository of Arch packages, mostly just to
try out <code>cblrepo</code> and convince myself that it works.  The work environment
contains a database and a directory of patches:</p>

<pre><code>% ls
cblrepo.db  patches/
%
</code></pre>

<p>The database is a cleartext file containing the information on the packages.
It&#8217;s basically just a dump of the related Haskell datatype, encoded in JSON.
The <code>patches</code> directory holds patches for Cabal files and PKGBUILD files.
They must be named <code>patch.cabal.&lt;hackage name&gt;</code> or <code>patch.pkgbuild.&lt;hackage
name&gt;</code> in order to be picked up by <code>cblrepo</code>.</p>

<p>There&#8217;s also an application directory (<code>~/.cblrepo</code>) for caching info about
the packages available on Hackage:</p>

<pre><code>% ls ~/.cblrepo
00-index.tar.gz
%
</code></pre>

<h3>How to use it</h3>

<p>A session with <code>cblrepo</code> looks something like this.  First we update the
information about what packages are available on Hackage:</p>

<pre><code>% cblrepo idxsync
%
</code></pre>

<p>After that it&#8217;s possible to see what packages are out-of-date:</p>

<pre><code>% cblrepo updates
cmdargs: 0.6.8 (0.6.9)
test-framework-th: 0.1.3 (0.2.0)
xml: 1.3.7 (1.3.8)
language-haskell-extract: 0.1.2 (0.2.0)
blaze-builder: 0.2.1.4 (0.3.0.0)
%
</code></pre>

<p>Let&#8217;s check whether <code>cmdargs</code> can be updated:</p>

<p>% cblrepo add -n cmdargs,0.6.9
   %</p>

<p>It generates no output, so that means it&#8217;s possible to update.  When
attempting to add all the packages we run into a problem:</p>

<pre><code>% cblrepo add -n cmdargs,0.6.9 \
&gt; test-framework-th,0.2.0 \
&gt; xml,1.3.7 \
&gt; language-haskell-extract,0.2.0 \
&gt; blaze-builder,0.3.0.0
Adding blaze-builder 0.3.0.0 would break:
  haxr : blaze-builder ==0.2.*
</code></pre>

<p>We&#8217;ll leave <code>blaze-builder</code> at the current version for now:</p>

<pre><code>% cblrepo add cmdargs,0.6.9 \
&gt; test-framework-th,0.2.0 \
&gt; xml,1.3.7 \
&gt; language-haskell-extract,0.2.0
%
</code></pre>

<p>After these updates we also need to make sure that all packages that depend on
these ones are re-built, that is we need to bump their release version:</p>

<pre><code>% cblrepo bump -n cmdargs \
&gt; test-framework-th \
&gt; xml \
&gt; language-haskell-extract
Would bump:
test-framework
test-framework-hunit
test-framework-quickcheck2
%
</code></pre>

<p>Just re-run that without the <code>-n</code> to actually perform the bump.  Now that all
this is done we need to generate the files necessary to build the Arch
packages.  We can easily check what packages need re-building, and get a good
order for building them:</p>

<pre><code>% cblrepo build cmdargs \
&gt; test-framework-th \
&gt; xml \
&gt; language-haskell-extract
cmdargs
xml
test-framework
test-framework-quickcheck2
test-framework-hunit
language-haskell-extract
test-framework-th
%
</code></pre>

<p>And generating the required files is also easy:</p>

<pre><code>% cblrepo pkgbuild $(!!)
% tree
.
|-- cblrepo.db
|-- haskell-cmdargs
|   |-- haskell-cmdargs.install
|   `-- PKGBUILD
|-- haskell-language-haskell-extract
|   |-- haskell-language-haskell-extract.install
|   `-- PKGBUILD
|-- haskell-test-framework
|   |-- haskell-test-framework.install
|   `-- PKGBUILD
|-- haskell-test-framework-hunit
|   |-- haskell-test-framework-hunit.install
|   `-- PKGBUILD
|-- haskell-test-framework-quickcheck2
|   |-- haskell-test-framework-quickcheck2.install
|   `-- PKGBUILD
|-- haskell-test-framework-th
|   |-- haskell-test-framework-th.install
|   `-- PKGBUILD
|-- haskell-xml
|   |-- haskell-xml.install
|   `-- PKGBUILD
`-- patches

8 directories, 15 files
%
</code></pre>

<p>Now all that&#8217;s left is running <code>makepkg</code> in each of the directories, in the
order indicated by <code>cblrepo build</code> above.</p>

<p>Unfortunately they won&#8217;t all build&#8212;generating the Haddock docs for
<code>test-framework-th</code> fails.  That&#8217;s however fairly easy to remedy by patching
the <code>PKGBUILD</code> to disable the generation of docs.</p>

<p>I&#8217;ll get back to that in a later post though.</p>

<h3>Your comments, please</h3>

<p>Please leave comments and suggestions.  I&#8217;m planning on uploading the source
to <a href="http://github.com">github</a> shortly.</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Ftherning.org%2Fmagnus%2Farchives%2F914&amp;title=Maintaining%20Haskell%20packages%20for%20a%20Linux%20distribution%E2%80%94cblrepo" id="wpa2a_56">Share/Bookmark</a></p>]]></content:encoded>
			<wfw:commentRss>http://therning.org/magnus/archives/914/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Twitter Weekly Updates for 2011-04-04</title>
		<link>http://therning.org/magnus/archives/913</link>
		<comments>http://therning.org/magnus/archives/913#comments</comments>
		<pubDate>Sun, 03 Apr 2011 22:59:00 +0000</pubDate>
		<dc:creator>Magnus</dc:creator>
				<category><![CDATA[Posts]]></category>
		<category><![CDATA[Tweets]]></category>

		<guid isPermaLink="false">http://therning.org/magnus/archives/913</guid>
		<description><![CDATA[So, that&#039;s that sent off. Fingers crossed now! # Careers on stackoverflow seems rather broken. I can&#039;t log in, I can&#039;t create a usable account. Not impressive. #stackoverflow #]]></description>
				<content:encoded><![CDATA[<ul class="aktt_tweet_digest">
    <li>So, that&#039;s that sent off. Fingers crossed now! <a href="http://twitter.com/magthe/statuses/54443423901552640" class="aktt_tweet_time">#</a></li>
    <li>Careers on stackoverflow seems rather broken. I can&#039;t log in, I can&#039;t create a usable account. Not impressive. #<a href="http://search.twitter.com/search?q=%23stackoverflow" class="aktt_hashtag">stackoverflow</a> <a href="http://twitter.com/magthe/statuses/54448492785049601" class="aktt_tweet_time">#</a></li>
</ul>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Ftherning.org%2Fmagnus%2Farchives%2F913&amp;title=Twitter%20Weekly%20Updates%20for%202011-04-04" id="wpa2a_58">Share/Bookmark</a></p>]]></content:encoded>
			<wfw:commentRss>http://therning.org/magnus/archives/913/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Twitter Weekly Updates for 2011-03-27</title>
		<link>http://therning.org/magnus/archives/912</link>
		<comments>http://therning.org/magnus/archives/912#comments</comments>
		<pubDate>Sun, 27 Mar 2011 22:59:00 +0000</pubDate>
		<dc:creator>Magnus</dc:creator>
				<category><![CDATA[Posts]]></category>
		<category><![CDATA[Tweets]]></category>

		<guid isPermaLink="false">http://therning.org/magnus/archives/912</guid>
		<description><![CDATA[RT @merlyn: For me, it&#039;s hard not to read &#34;non-functional requirements&#34; as &#34;dysfunctional requirements&#34;, as in a requirement to fail. # RT @voidspace: Put &#34;True, False = False, True&#34; into your python libraries. People will soon learn to not &#34;import *&#34; from them&#8230; &#8212; the &#8230; # Aaahhh! #gwibber is completely unusable! Seriously, is there [...]]]></description>
				<content:encoded><![CDATA[<ul class="aktt_tweet_digest">
    <li>RT @<a href="http://twitter.com/merlyn" class="aktt_username">merlyn</a>: For me, it&#039;s hard not to read &quot;non-functional requirements&quot; as &quot;dysfunctional requirements&quot;, as in a requirement to fail. <img src='http://therning.org/magnus/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  <a href="http://twitter.com/magthe/statuses/50108196567777280" class="aktt_tweet_time">#</a></li>
    <li>RT @<a href="http://twitter.com/voidspace" class="aktt_username">voidspace</a>: Put &quot;True, False = False, True&quot; into your python libraries. People will soon learn to not &quot;import *&quot; from them&#8230; &#8212; the &#8230; <a href="http://twitter.com/magthe/statuses/50109722422022144" class="aktt_tweet_time">#</a></li>
    <li>Aaahhh! #<a href="http://search.twitter.com/search?q=%23gwibber" class="aktt_hashtag">gwibber</a> is completely unusable! Seriously, is there no way to get unread tweets to be marked somehow? <a href="http://twitter.com/magthe/statuses/50574078247043073" class="aktt_tweet_time">#</a></li>
    <li>Win: <a href="http://is.gd/jccYIT" rel="nofollow">http://is.gd/jccYIT</a> <a href="http://twitter.com/magthe/statuses/50953139448328192" class="aktt_tweet_time">#</a></li>
    <li>Funny: <a href="http://is.gd/14Bqkv" rel="nofollow">http://is.gd/14Bqkv</a> <a href="http://twitter.com/magthe/statuses/51217737497853952" class="aktt_tweet_time">#</a></li>
</ul>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Ftherning.org%2Fmagnus%2Farchives%2F912&amp;title=Twitter%20Weekly%20Updates%20for%202011-03-27" id="wpa2a_60">Share/Bookmark</a></p>]]></content:encoded>
			<wfw:commentRss>http://therning.org/magnus/archives/912/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Twitter Weekly Updates for 2011-03-21</title>
		<link>http://therning.org/magnus/archives/911</link>
		<comments>http://therning.org/magnus/archives/911#comments</comments>
		<pubDate>Sun, 20 Mar 2011 22:59:00 +0000</pubDate>
		<dc:creator>Magnus</dc:creator>
				<category><![CDATA[Posts]]></category>
		<category><![CDATA[Tweets]]></category>

		<guid isPermaLink="false">http://therning.org/magnus/archives/911</guid>
		<description><![CDATA[RT @mrtonylee: This is possibly my new favourite thing ever. Doctor Who mashed with the Buffy credits. http://is.gd/sg5M1W # Wow!!!! http://arngren.net/ # RT @vincenthz: #xen store #haskell module uploaded to hackage. http://hackage.haskell.org/package/xenstore # Papers should stop using the term &#34;PS3 owner&#34; so freely, clearly there is only ONE &#34;PS3 owner&#34;, #Sony At least Sony thinks [...]]]></description>
				<content:encoded><![CDATA[<ul class="aktt_tweet_digest">
    <li>RT @<a href="http://twitter.com/mrtonylee" class="aktt_username">mrtonylee</a>: This is possibly my new favourite thing ever. Doctor Who mashed with the Buffy credits. <a href="http://is.gd/sg5M1W" rel="nofollow">http://is.gd/sg5M1W</a> <a href="http://twitter.com/magthe/statuses/47245378101329921" class="aktt_tweet_time">#</a></li>
    <li>Wow!!!! <a href="http://arngren.net/" rel="nofollow">http://arngren.net/</a> <a href="http://twitter.com/magthe/statuses/47606885041438720" class="aktt_tweet_time">#</a></li>
    <li>RT @<a href="http://twitter.com/vincenthz" class="aktt_username">vincenthz</a>: #<a href="http://search.twitter.com/search?q=%23xen" class="aktt_hashtag">xen</a> store #<a href="http://search.twitter.com/search?q=%23haskell" class="aktt_hashtag">haskell</a> module uploaded to hackage. <a href="http://hackage.haskell.org/package/xenstore" rel="nofollow">http://hackage.haskell.org/package/xenstore</a> <a href="http://twitter.com/magthe/statuses/48707594759585792" class="aktt_tweet_time">#</a></li>
    <li>Papers should stop using the term &quot;PS3 owner&quot; so freely, clearly there is only ONE &quot;PS3 owner&quot;, #<a href="http://search.twitter.com/search?q=%23Sony" class="aktt_hashtag">Sony</a>  At least Sony thinks so. #<a href="http://search.twitter.com/search?q=%23ps3" class="aktt_hashtag">ps3</a> <a href="http://twitter.com/magthe/statuses/48767583268257794" class="aktt_tweet_time">#</a></li>
    <li>Cabal&#039;s new test interface is confusing, how do I get test sources included in tar-ball? #<a href="http://search.twitter.com/search?q=%23haskell" class="aktt_hashtag">haskell</a> #cabal <a href="http://twitter.com/magthe/statuses/48854582884962304" class="aktt_tweet_time">#</a></li>
    <li>My simple INI config parser uploaded to github: <a href="https://github.com/magthe/hsini" rel="nofollow">https://github.com/magthe/hsini</a> #<a href="http://search.twitter.com/search?q=%23haskell" class="aktt_hashtag">haskell</a> <a href="http://twitter.com/magthe/statuses/48856738434260992" class="aktt_tweet_time">#</a></li>
    <li>Something to try: <a href="http://five.sentenc.es/" rel="nofollow">http://five.sentenc.es/</a> <a href="http://twitter.com/magthe/statuses/49119453874626560" class="aktt_tweet_time">#</a></li>
    <li>#<a href="http://search.twitter.com/search?q=%23git" class="aktt_hashtag">git</a> is lovely at times, even though re-writing history on the master branch should be frowned upon it&#039;s a very handy thing to do sometimes <a href="http://twitter.com/magthe/statuses/49180978702327808" class="aktt_tweet_time">#</a></li>
    <li>How not to Get Things Done: <a href="http://is.gd/6N2NYc" rel="nofollow">http://is.gd/6N2NYc</a> #<a href="http://search.twitter.com/search?q=%23gtd" class="aktt_hashtag">gtd</a> <a href="http://twitter.com/magthe/statuses/49485634917765120" class="aktt_tweet_time">#</a></li>
    <li>#<a href="http://search.twitter.com/search?q=%23pino" class="aktt_hashtag">pino</a> 2 is currently broken on #<a href="http://search.twitter.com/search?q=%23arch" class="aktt_hashtag">arch</a>  and #<a href="http://search.twitter.com/search?q=%23pino3" class="aktt_hashtag">pino3</a> isn&#039;t ready yet. Any recommendations for #<a href="http://search.twitter.com/search?q=%23twitter" class="aktt_hashtag">twitter</a> clients on #<a href="http://search.twitter.com/search?q=%23linux" class="aktt_hashtag">linux</a> <a href="http://twitter.com/magthe/statuses/49501326350094336" class="aktt_tweet_time">#</a></li>
    <li>Hmm, #<a href="http://search.twitter.com/search?q=%23mitter" class="aktt_hashtag">mitter</a> won&#039;t connect to #<a href="http://search.twitter.com/search?q=%23twitter" class="aktt_hashtag">twitter</a>  using old auth maybe? #<a href="http://search.twitter.com/search?q=%23buzzbird" class="aktt_hashtag">buzzbird</a> is stuck in the past, with 32-bit only prebuilds. <a href="http://twitter.com/magthe/statuses/49506646703087616" class="aktt_tweet_time">#</a></li>
    <li>I guess #<a href="http://search.twitter.com/search?q=%23gwibber" class="aktt_hashtag">gwibber</a> will have to do. <a href="http://twitter.com/magthe/statuses/49509338875830272" class="aktt_tweet_time">#</a></li>
    <li>Dear #<a href="http://search.twitter.com/search?q=%23skype" class="aktt_hashtag">skype</a>  why not provide 64-bit prebuilds for non-Ubuntu as well? <a href="http://twitter.com/magthe/statuses/49519517256257536" class="aktt_tweet_time">#</a></li>
</ul>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Ftherning.org%2Fmagnus%2Farchives%2F911&amp;title=Twitter%20Weekly%20Updates%20for%202011-03-21" id="wpa2a_62">Share/Bookmark</a></p>]]></content:encoded>
			<wfw:commentRss>http://therning.org/magnus/archives/911/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Twitter Weekly Updates for 2011-03-14</title>
		<link>http://therning.org/magnus/archives/910</link>
		<comments>http://therning.org/magnus/archives/910#comments</comments>
		<pubDate>Sun, 13 Mar 2011 22:59:00 +0000</pubDate>
		<dc:creator>Magnus</dc:creator>
				<category><![CDATA[Posts]]></category>
		<category><![CDATA[Tweets]]></category>

		<guid isPermaLink="false">http://therning.org/magnus/archives/910</guid>
		<description><![CDATA[To all companies that demand I enter CV into a crappy web UI: I&#039;ve already entered by CV into a PDF, why isn&#039;t it good enough? # http://stopabusingsiprefixes.org/ # Maybe, just maybe the Swedes are about to start realising what it is Reinfeldt has been busy with: http://is.gd/0Nr4fq # The hotel network allows me to [...]]]></description>
				<content:encoded><![CDATA[<ul class="aktt_tweet_digest">
    <li>To all companies that demand I enter CV into a crappy web UI: I&#039;ve already entered by CV into a PDF, why isn&#039;t it good enough? <a href="http://twitter.com/magthe/statuses/44815979359911936" class="aktt_tweet_time">#</a></li>
    <li><a href="http://stopabusingsiprefixes.org/" rel="nofollow">http://stopabusingsiprefixes.org/</a> <a href="http://twitter.com/magthe/statuses/44858531186352128" class="aktt_tweet_time">#</a></li>
    <li>Maybe, just maybe the Swedes are about to start realising what it is Reinfeldt has been busy with: <a href="http://is.gd/0Nr4fq" rel="nofollow">http://is.gd/0Nr4fq</a> <a href="http://twitter.com/magthe/statuses/44862827244171264" class="aktt_tweet_time">#</a></li>
    <li>The hotel network allows me to catch up on work emails tonight&#8230; not sure what was up yesterday. <a href="http://twitter.com/magthe/statuses/45546512092106752" class="aktt_tweet_time">#</a></li>
    <li>I&#039;m really enjoying the course I&#039;m on <img src='http://therning.org/magnus/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  <a href="http://twitter.com/magthe/statuses/45890712620896256" class="aktt_tweet_time">#</a></li>
    <li>The hotel wifi is very unreliable, and whenever it goes down it takes about an hour to come back up properly. <a href="http://twitter.com/magthe/statuses/45898970551169024" class="aktt_tweet_time">#</a></li>
    <li>Hmm, this was unexpected, after upgrade to #<a href="http://search.twitter.com/search?q=%23ghc" class="aktt_hashtag">ghc</a> 7  all my UIs based on #<a href="http://search.twitter.com/search?q=%23cmdargs" class="aktt_hashtag">cmdargs</a> are broken. <a href="http://twitter.com/magthe/statuses/46470916124835840" class="aktt_tweet_time">#</a></li>
    <li>Just fixed the UI by switching to the pure API of #<a href="http://search.twitter.com/search?q=%23cmdargs" class="aktt_hashtag">cmdargs</a>   working nicely with only minor changes. #<a href="http://search.twitter.com/search?q=%23haskell" class="aktt_hashtag">haskell</a> <a href="http://twitter.com/magthe/statuses/46497954651062272" class="aktt_tweet_time">#</a></li>
    <li>Finally I have added the first step towards autogeneration of #<a href="http://search.twitter.com/search?q=%23archlinux" class="aktt_hashtag">archlinux</a> source packages.  It&#039;s looking good so far. <a href="http://twitter.com/magthe/statuses/46667358080745473" class="aktt_tweet_time">#</a></li>
    <li>MS vs. Java: <a href="http://www.220.ro/funny/Microsoft-Vs-Java/Iw8nmDHL7Y/" rel="nofollow">http://www.220.ro/funny/Microsoft-Vs-Java/Iw8nmDHL7Y/</a> <a href="http://twitter.com/magthe/statuses/46990260953038848" class="aktt_tweet_time">#</a></li>
</ul>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Ftherning.org%2Fmagnus%2Farchives%2F910&amp;title=Twitter%20Weekly%20Updates%20for%202011-03-14" id="wpa2a_64">Share/Bookmark</a></p>]]></content:encoded>
			<wfw:commentRss>http://therning.org/magnus/archives/910/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Twitter Weekly Updates for 2011-03-06</title>
		<link>http://therning.org/magnus/archives/909</link>
		<comments>http://therning.org/magnus/archives/909#comments</comments>
		<pubDate>Sun, 06 Mar 2011 22:59:00 +0000</pubDate>
		<dc:creator>Magnus</dc:creator>
				<category><![CDATA[Posts]]></category>
		<category><![CDATA[Tweets]]></category>

		<guid isPermaLink="false">http://therning.org/magnus/archives/909</guid>
		<description><![CDATA[#vim &#039;list&#039; and &#039;listchars&#039; to highlight tabs in make files is brilliant! # Yay, first implementation of an enumeratee for my private iteratee implementation #haskell # I don&#039;t quite like the name &#039;enumeratee&#039;, but then &#039;iteratee&#039; isn&#039;t that much better #haskell # Now wearing jacket, scarf and hat in the office, I swear it&#039;s colder [...]]]></description>
				<content:encoded><![CDATA[<ul class="aktt_tweet_digest">
    <li>#<a href="http://search.twitter.com/search?q=%23vim" class="aktt_hashtag">vim</a>   &#039;list&#039; and &#039;listchars&#039; to highlight tabs in make files is brilliant! <a href="http://twitter.com/magthe/statuses/42176048410001408" class="aktt_tweet_time">#</a></li>
    <li>Yay, first implementation of an enumeratee for my private iteratee implementation #<a href="http://search.twitter.com/search?q=%23haskell" class="aktt_hashtag">haskell</a> <a href="http://twitter.com/magthe/statuses/42521584065445888" class="aktt_tweet_time">#</a></li>
    <li>I don&#039;t quite like the name &#039;enumeratee&#039;, but then &#039;iteratee&#039; isn&#039;t that much better #<a href="http://search.twitter.com/search?q=%23haskell" class="aktt_hashtag">haskell</a> <a href="http://twitter.com/magthe/statuses/42522012484239360" class="aktt_tweet_time">#</a></li>
    <li>Now wearing jacket, scarf and hat in the office, I swear it&#039;s colder in here than outside at the moment! <a href="http://twitter.com/magthe/statuses/42557080133042176" class="aktt_tweet_time">#</a></li>
    <li>&#8230; and I wish I&#039;d brought some thick socks #<a href="http://search.twitter.com/search?q=%23officefreeze" class="aktt_hashtag">officefreeze</a> <a href="http://twitter.com/magthe/statuses/42557250916728832" class="aktt_tweet_time">#</a></li>
    <li>It&#039;s somewhat difficult to do a web conference on a system where the client doesn&#039;t run on my system. <a href="http://twitter.com/magthe/statuses/42641313132318720" class="aktt_tweet_time">#</a></li>
    <li>RT @<a href="http://twitter.com/vincenthz" class="aktt_username">vincenthz</a>: tls 0.4.0 just released with better API and more documentation. <a href="http://hackage.haskell.org/package/tls" rel="nofollow">http://hackage.haskell.org/package/tls</a> #<a href="http://search.twitter.com/search?q=%23haskell" class="aktt_hashtag">haskell</a> <a href="http://twitter.com/magthe/statuses/42920466670825472" class="aktt_tweet_time">#</a></li>
    <li>Release of dataenc with new API is drawing nearer, I now have a modified version of omnicodec that uses it, via enumeratees <img src='http://therning.org/magnus/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  #<a href="http://search.twitter.com/search?q=%23haskell" class="aktt_hashtag">haskell</a> <a href="http://twitter.com/magthe/statuses/43283645821222912" class="aktt_tweet_time">#</a></li>
    <li>Trying out #<a href="http://search.twitter.com/search?q=%23vimium" class="aktt_hashtag">vimium</a>  <a href="http://is.gd/BaIVB4" rel="nofollow">http://is.gd/BaIVB4</a> Like it so far. #<a href="http://search.twitter.com/search?q=%23chromium" class="aktt_hashtag">chromium</a> <a href="http://twitter.com/magthe/statuses/43307109210787840" class="aktt_tweet_time">#</a></li>
    <li>So, there we go, another release of dataenc, now with a new shiny API. #<a href="http://search.twitter.com/search?q=%23haskell" class="aktt_hashtag">haskell</a> <a href="http://twitter.com/magthe/statuses/43410797128450048" class="aktt_tweet_time">#</a></li>
    <li>Har nu snackat med #<a href="http://search.twitter.com/search?q=%23eis" class="aktt_hashtag">eis</a> låter inte dumt alls! <a href="http://twitter.com/magthe/statuses/43672706968854528" class="aktt_tweet_time">#</a></li>
    <li>Began working on my own take on #<a href="http://search.twitter.com/search?q=%23cabal" class="aktt_hashtag">cabal</a> to #<a href="http://search.twitter.com/search?q=%23archlinux" class="aktt_hashtag">archlinux</a> package translation. #<a href="http://search.twitter.com/search?q=%23haskell" class="aktt_hashtag">haskell</a> <a href="http://twitter.com/magthe/statuses/44163507956101120" class="aktt_tweet_time">#</a></li>
    <li>Oroväckande: <a href="http://is.gd/iYJ8FP" rel="nofollow">http://is.gd/iYJ8FP</a> <a href="http://twitter.com/magthe/statuses/44495746367619073" class="aktt_tweet_time">#</a></li>
</ul>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Ftherning.org%2Fmagnus%2Farchives%2F909&amp;title=Twitter%20Weekly%20Updates%20for%202011-03-06" id="wpa2a_66">Share/Bookmark</a></p>]]></content:encoded>
			<wfw:commentRss>http://therning.org/magnus/archives/909/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Twitter Weekly Updates for 2011-02-28</title>
		<link>http://therning.org/magnus/archives/908</link>
		<comments>http://therning.org/magnus/archives/908#comments</comments>
		<pubDate>Sun, 27 Feb 2011 22:59:00 +0000</pubDate>
		<dc:creator>Magnus</dc:creator>
				<category><![CDATA[Posts]]></category>
		<category><![CDATA[Tweets]]></category>

		<guid isPermaLink="false">http://therning.org/magnus/archives/908</guid>
		<description><![CDATA[Starting up SAP&#8230; losing will to live. # I bet SAP gets better with some music&#8230; # Excellent explanation: http://is.gd/Qwd7wy # RT @avsm: RT @guppiefish: It&#039;s the Inequality, Stupid http://bit.ly/h7I6IG # Heard in the office: MS Windows is such a blue-collar operating system. #]]></description>
				<content:encoded><![CDATA[<ul class="aktt_tweet_digest">
    <li>Starting up SAP&#8230; losing will to live. <a href="http://twitter.com/magthe/statuses/40452096595734528" class="aktt_tweet_time">#</a></li>
    <li>I bet SAP gets better with some music&#8230; <a href="http://twitter.com/magthe/statuses/40452654815514624" class="aktt_tweet_time">#</a></li>
    <li>Excellent explanation: <a href="http://is.gd/Qwd7wy" rel="nofollow">http://is.gd/Qwd7wy</a> <a href="http://twitter.com/magthe/statuses/40798530951970816" class="aktt_tweet_time">#</a></li>
    <li>RT @<a href="http://twitter.com/avsm" class="aktt_username">avsm</a>: RT @<a href="http://twitter.com/guppiefish" class="aktt_username">guppiefish</a>: It&#039;s the Inequality, Stupid <a href="http://bit.ly/h7I6IG" rel="nofollow">http://bit.ly/h7I6IG</a> <a href="http://twitter.com/magthe/statuses/40805683339202560" class="aktt_tweet_time">#</a></li>
    <li>Heard in the office: MS Windows is such a blue-collar operating system. <a href="http://twitter.com/magthe/statuses/41054607132065792" class="aktt_tweet_time">#</a></li>
</ul>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Ftherning.org%2Fmagnus%2Farchives%2F908&amp;title=Twitter%20Weekly%20Updates%20for%202011-02-28" id="wpa2a_68">Share/Bookmark</a></p>]]></content:encoded>
			<wfw:commentRss>http://therning.org/magnus/archives/908/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Twitter Weekly Updates for 2011-02-21</title>
		<link>http://therning.org/magnus/archives/907</link>
		<comments>http://therning.org/magnus/archives/907#comments</comments>
		<pubDate>Sun, 20 Feb 2011 22:59:00 +0000</pubDate>
		<dc:creator>Magnus</dc:creator>
				<category><![CDATA[Posts]]></category>
		<category><![CDATA[Tweets]]></category>

		<guid isPermaLink="false">http://therning.org/magnus/archives/907</guid>
		<description><![CDATA[RT @pauldotcom: Funny take on Interview questions: http://bit.ly/eD7VYH Where do you see yourself in 5 years? # Hilarious! What would Feynman do? http://is.gd/FQmLw7 # Is there really no just-go-away-and-die command for when (pdf)latex presents a &#34;command prompt&#34;? # Oh, how C-A in vim fools me at times&#8230; increasing the 3 is done by decreasing in [...]]]></description>
				<content:encoded><![CDATA[<ul class="aktt_tweet_digest">
    <li>RT @<a href="http://twitter.com/pauldotcom" class="aktt_username">pauldotcom</a>: Funny take on Interview questions: <a href="http://bit.ly/eD7VYH" rel="nofollow">http://bit.ly/eD7VYH</a> Where do you see yourself in 5 years? <a href="http://twitter.com/magthe/statuses/37452361500721153" class="aktt_tweet_time">#</a></li>
    <li>Hilarious! What would Feynman do? <a href="http://is.gd/FQmLw7" rel="nofollow">http://is.gd/FQmLw7</a> <a href="http://twitter.com/magthe/statuses/37455181507604480" class="aktt_tweet_time">#</a></li>
    <li>Is there really no just-go-away-and-die command for when (pdf)latex presents a &quot;command prompt&quot;? <a href="http://twitter.com/magthe/statuses/37493706370064384" class="aktt_tweet_time">#</a></li>
    <li>Oh, how C-A in vim fools me at times&#8230; increasing the 3 is done by decreasing in &quot;foo-3&quot;! <a href="http://twitter.com/magthe/statuses/37844192290025472" class="aktt_tweet_time">#</a></li>
    <li>Brilliant: <a href="http://failblog.org/2011/02/15/epic-fail-photos-psychic-fail/" rel="nofollow">http://failblog.org/2011/02/15/epic-fail-photos-psychic-fail/</a> <a href="http://twitter.com/magthe/statuses/38600563356606464" class="aktt_tweet_time">#</a></li>
</ul>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Ftherning.org%2Fmagnus%2Farchives%2F907&amp;title=Twitter%20Weekly%20Updates%20for%202011-02-21" id="wpa2a_70">Share/Bookmark</a></p>]]></content:encoded>
			<wfw:commentRss>http://therning.org/magnus/archives/907/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Twitter Weekly Updates for 2011-02-13</title>
		<link>http://therning.org/magnus/archives/906</link>
		<comments>http://therning.org/magnus/archives/906#comments</comments>
		<pubDate>Sun, 13 Feb 2011 22:59:00 +0000</pubDate>
		<dc:creator>Magnus</dc:creator>
				<category><![CDATA[Posts]]></category>
		<category><![CDATA[Tweets]]></category>

		<guid isPermaLink="false">http://therning.org/magnus/archives/906</guid>
		<description><![CDATA[RT @stevedesigner: Do not use Twitter for business http://bit.ly/hs9kVo from @grahamjones &#62; too right! # Ah, only three packages to go then I&#039;ve built the latest version of #yesod for #arch #haskell # Done building yesod and its dependencies, well, I&#039;m done with x86_64, now onto i686 #archlinux #haskell # A useful blog post on [...]]]></description>
				<content:encoded><![CDATA[<ul class="aktt_tweet_digest">
    <li>RT @<a href="http://twitter.com/stevedesigner" class="aktt_username">stevedesigner</a>: Do not use Twitter for business <a href="http://bit.ly/hs9kVo" rel="nofollow">http://bit.ly/hs9kVo</a> from @<a href="http://twitter.com/grahamjones" class="aktt_username">grahamjones</a>  &gt; too right! <a href="http://twitter.com/magthe/statuses/34630940600832000" class="aktt_tweet_time">#</a></li>
    <li>Ah, only three packages to go then I&#039;ve built the latest version of #<a href="http://search.twitter.com/search?q=%23yesod" class="aktt_hashtag">yesod</a> for #<a href="http://search.twitter.com/search?q=%23arch" class="aktt_hashtag">arch</a>  #<a href="http://search.twitter.com/search?q=%23haskell" class="aktt_hashtag">haskell</a> <a href="http://twitter.com/magthe/statuses/34742635382054912" class="aktt_tweet_time">#</a></li>
    <li>Done building yesod and its dependencies, well, I&#039;m done with x86_64, now onto i686 #<a href="http://search.twitter.com/search?q=%23archlinux" class="aktt_hashtag">archlinux</a> #haskell <a href="http://twitter.com/magthe/statuses/34759635160268800" class="aktt_tweet_time">#</a></li>
    <li>A useful blog post on #<a href="http://search.twitter.com/search?q=%23git" class="aktt_hashtag">git</a>  <a href="http://is.gd/tbIUqH" rel="nofollow">http://is.gd/tbIUqH</a> <a href="http://twitter.com/magthe/statuses/34935947925651457" class="aktt_tweet_time">#</a></li>
    <li>Damn you XKCD: <a href="http://xkcd.com/859/" rel="nofollow">http://xkcd.com/859/</a> :- <a href="http://twitter.com/magthe/statuses/35999891142615040" class="aktt_tweet_time">#</a></li>
    <li>UK vs GB vs&#8230; <a href="http://blog.cgpgrey.com/the-united-kingdom-great-britain-england-venn-diagram/" rel="nofollow">http://blog.cgpgrey.com/the-united-kingdom-great-britain-england-venn-diagram/</a> <a href="http://twitter.com/magthe/statuses/36103910682923008" class="aktt_tweet_time">#</a></li>
    <li>So, added command line args for #<a href="http://search.twitter.com/search?q=%23cabal2arch" class="aktt_hashtag">cabal2arch</a> to pass configure flags into the PKGBUILD #<a href="http://search.twitter.com/search?q=%23arch" class="aktt_hashtag">arch</a> #haskell <a href="http://twitter.com/magthe/statuses/36850363554336768" class="aktt_tweet_time">#</a></li>
</ul>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Ftherning.org%2Fmagnus%2Farchives%2F906&amp;title=Twitter%20Weekly%20Updates%20for%202011-02-13" id="wpa2a_72">Share/Bookmark</a></p>]]></content:encoded>
			<wfw:commentRss>http://therning.org/magnus/archives/906/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Twitter Weekly Updates for 2011-02-07</title>
		<link>http://therning.org/magnus/archives/905</link>
		<comments>http://therning.org/magnus/archives/905#comments</comments>
		<pubDate>Sun, 06 Feb 2011 22:59:00 +0000</pubDate>
		<dc:creator>Magnus</dc:creator>
				<category><![CDATA[Posts]]></category>
		<category><![CDATA[Tweets]]></category>

		<guid isPermaLink="false">http://therning.org/magnus/archives/905</guid>
		<description><![CDATA[Mandatory listening before listening to #newspeak episode on #flossweekly http://is.gd/T4LOfm- # RT @gildor478: just uploaded my first test package to oasis-db through command line &#8212; OASIS-DB has a new feature #ocaml #oasis # Dear #outlook developers, please make invitations contain the time in UTC, just using the sender&#039;s TZ just caused me to miss a [...]]]></description>
				<content:encoded><![CDATA[<ul class="aktt_tweet_digest">
    <li>Mandatory listening before listening to #<a href="http://search.twitter.com/search?q=%23newspeak" class="aktt_hashtag">newspeak</a> episode on #<a href="http://search.twitter.com/search?q=%23flossweekly" class="aktt_hashtag">flossweekly</a>  <a href="http://is.gd/T4LOfm-" rel="nofollow">http://is.gd/T4LOfm-</a> <a href="http://twitter.com/magthe/statuses/31993378648358912" class="aktt_tweet_time">#</a></li>
    <li>RT @<a href="http://twitter.com/gildor478" class="aktt_username">gildor478</a>: just uploaded my first test package to oasis-db through command line &#8212; OASIS-DB has a new feature #<a href="http://search.twitter.com/search?q=%23ocaml" class="aktt_hashtag">ocaml</a> #oasis <a href="http://twitter.com/magthe/statuses/32359607250722816" class="aktt_tweet_time">#</a></li>
    <li>Dear #<a href="http://search.twitter.com/search?q=%23outlook" class="aktt_hashtag">outlook</a> developers, please make invitations contain the time in UTC, just using the sender&#039;s TZ just caused me to miss a meeting! <a href="http://twitter.com/magthe/statuses/32758688682872832" class="aktt_tweet_time">#</a></li>
    <li>I wish there was a single #<a href="http://search.twitter.com/search?q=%23wiki" class="aktt_hashtag">wiki</a> #markup to rule them all! <a href="http://twitter.com/magthe/statuses/33124741455810560" class="aktt_tweet_time">#</a></li>
    <li>How irritating, it&#039;s not possible to satisfy all dependencies for #<a href="http://search.twitter.com/search?q=%23yi" class="aktt_hashtag">yi</a> in #<a href="http://search.twitter.com/search?q=%23arch" class="aktt_hashtag">arch</a> at the moment <img src='http://therning.org/magnus/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' />  <a href="http://twitter.com/magthe/statuses/33315713359814656" class="aktt_tweet_time">#</a></li>
    <li>Time to move desks&#8230; again! #<a href="http://search.twitter.com/search?q=%23work" class="aktt_hashtag">work</a> <a href="http://twitter.com/magthe/statuses/33482480501653504" class="aktt_tweet_time">#</a></li>
    <li>Done with the part of the move I&#039;ll do myself&#8230; the drawers will have been transported on Monday I&#039;m told. #<a href="http://search.twitter.com/search?q=%23work" class="aktt_hashtag">work</a> <a href="http://twitter.com/magthe/statuses/33503907573407744" class="aktt_tweet_time">#</a></li>
    <li>So, have moved all the baseX encodings in #<a href="http://search.twitter.com/search?q=%23dataenc" class="aktt_hashtag">dataenc</a> to the new API for decoding, only 6 more encodings to go. #<a href="http://search.twitter.com/search?q=%23haskell" class="aktt_hashtag">haskell</a> <a href="http://twitter.com/magthe/statuses/33653262225772544" class="aktt_tweet_time">#</a></li>
    <li>So, done re-writing the decoding using the new API, now for a bit of clean-up. #<a href="http://search.twitter.com/search?q=%23haskell" class="aktt_hashtag">haskell</a> #dataenc <a href="http://twitter.com/magthe/statuses/33984470289747968" class="aktt_tweet_time">#</a></li>
    <li>So, the changed encoding API is taking form as well. #<a href="http://search.twitter.com/search?q=%23dataenc" class="aktt_hashtag">dataenc</a> #haskell <a href="http://twitter.com/magthe/statuses/34012053387608065" class="aktt_tweet_time">#</a></li>
</ul>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Ftherning.org%2Fmagnus%2Farchives%2F905&amp;title=Twitter%20Weekly%20Updates%20for%202011-02-07" id="wpa2a_74">Share/Bookmark</a></p>]]></content:encoded>
			<wfw:commentRss>http://therning.org/magnus/archives/905/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Twitter Weekly Updates for 2011-01-30</title>
		<link>http://therning.org/magnus/archives/904</link>
		<comments>http://therning.org/magnus/archives/904#comments</comments>
		<pubDate>Sun, 30 Jan 2011 22:59:00 +0000</pubDate>
		<dc:creator>Magnus</dc:creator>
				<category><![CDATA[Posts]]></category>
		<category><![CDATA[Tweets]]></category>

		<guid isPermaLink="false">http://therning.org/magnus/archives/904</guid>
		<description><![CDATA[? @conal, @angelaharms: Why do ppl say change is painful? Isn&#039;t change just *life*? Isn&#039;t it the *resisting* of change that creates pain? # I&#039;m deflecting all dependency problem on #aur to upstream. #haskell # Just like out of One Among The Sleepless: http://www.thelocal.se/31574/20110121/ # Working with #git is actually quite fun at times; when [...]]]></description>
				<content:encoded><![CDATA[<ul class="aktt_tweet_digest">
    <li>? @<a href="http://twitter.com/conal" class="aktt_username">conal</a>, @<a href="http://twitter.com/angelaharms" class="aktt_username">angelaharms</a>: Why do ppl say change is painful? Isn&#039;t change just *life*? Isn&#039;t it the *resisting* of change  that creates pain? <a href="http://twitter.com/magthe/statuses/29464898387841024" class="aktt_tweet_time">#</a></li>
    <li>I&#039;m deflecting all dependency problem on #<a href="http://search.twitter.com/search?q=%23aur" class="aktt_hashtag">aur</a> to upstream. #<a href="http://search.twitter.com/search?q=%23haskell" class="aktt_hashtag">haskell</a> <a href="http://twitter.com/magthe/statuses/29465729166213121" class="aktt_tweet_time">#</a></li>
    <li>Just like out of One Among The Sleepless: <a href="http://www.thelocal.se/31574/20110121/" rel="nofollow">http://www.thelocal.se/31574/20110121/</a> <a href="http://twitter.com/magthe/statuses/29547741180858368" class="aktt_tweet_time">#</a></li>
    <li>Working with #<a href="http://search.twitter.com/search?q=%23git" class="aktt_hashtag">git</a> is actually quite fun at times; when it behaves. <a href="http://twitter.com/magthe/statuses/29878341787979776" class="aktt_tweet_time">#</a></li>
    <li>I&#039;m not the least bit surprised: <a href="http://www.thelocal.se/31612/20110124/" rel="nofollow">http://www.thelocal.se/31612/20110124/</a> <a href="http://twitter.com/magthe/statuses/29879682736328704" class="aktt_tweet_time">#</a></li>
    <li>Free book on parallel programming: <a href="http://kernel.org/pub/linux/kernel/people/paulmck/perfbook/perfbook.html" rel="nofollow">http://kernel.org/pub/linux/kernel/people/paulmck/perfbook/perfbook.html</a> <a href="http://twitter.com/magthe/statuses/29901780666032128" class="aktt_tweet_time">#</a></li>
    <li>? @<a href="http://twitter.com/mykebartlett" class="aktt_username">mykebartlett</a>: Excellent piece on the BBC by @<a href="http://twitter.com/pollytoynbee" class="aktt_username">pollytoynbee</a> in today&#039;s Guardian <a href="http://bit.ly/hfwKms" rel="nofollow">http://bit.ly/hfwKms</a> <a href="http://twitter.com/magthe/statuses/29901996169367554" class="aktt_tweet_time">#</a></li>
    <li>New version of download uploaded to #<a href="http://search.twitter.com/search?q=%23hackage" class="aktt_hashtag">hackage</a> #haskell <a href="http://twitter.com/magthe/statuses/30017953801969665" class="aktt_tweet_time">#</a></li>
    <li>Dear #<a href="http://search.twitter.com/search?q=%23google" class="aktt_hashtag">google</a>  why doesn&#039;t #<a href="http://search.twitter.com/search?q=%23gmail" class="aktt_hashtag">gmail</a> handle emails as attachments properly? <a href="http://twitter.com/magthe/statuses/30022646242476032" class="aktt_tweet_time">#</a></li>
    <li>So, now I&#039;ve finished reading The Mythical Man-Month <img src='http://therning.org/magnus/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  <a href="http://twitter.com/magthe/statuses/30297628889587712" class="aktt_tweet_time">#</a></li>
    <li>GHCi won&#039;t load download, complains over missing symbol &#039;stat64&#039;, and google isn&#039;t helping <img src='http://therning.org/magnus/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' />  #<a href="http://search.twitter.com/search?q=%23haskell" class="aktt_hashtag">haskell</a> #ghc <a href="http://twitter.com/magthe/statuses/30388776236752896" class="aktt_tweet_time">#</a></li>
    <li>I should add that my executable, which uses download, compiles, links and runs just fine, strange #<a href="http://search.twitter.com/search?q=%23haskell" class="aktt_hashtag">haskell</a> #ghc <a href="http://twitter.com/magthe/statuses/30388977584312321" class="aktt_tweet_time">#</a></li>
    <li>Also should add that my test executable doesn&#039;t link, same complaint as GHCi <img src='http://therning.org/magnus/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' />  #<a href="http://search.twitter.com/search?q=%23haskell" class="aktt_hashtag">haskell</a> #ghc <a href="http://twitter.com/magthe/statuses/30389113244884992" class="aktt_tweet_time">#</a></li>
    <li>Now that was at most a #<a href="http://search.twitter.com/search?q=%23yoga" class="aktt_hashtag">yoga</a> inspired workout, nothing wrong with that though, but I&#039;ll stick to #<a href="http://search.twitter.com/search?q=%23ashtanga" class="aktt_hashtag">ashtanga</a> <a href="http://twitter.com/magthe/statuses/30992727017521152" class="aktt_tweet_time">#</a></li>
    <li>Hacking away on another little #<a href="http://search.twitter.com/search?q=%23haskell" class="aktt_hashtag">haskell</a> tool, finding it somewhat difficult to motivate myself to sleep <img src='http://therning.org/magnus/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' />  <a href="http://twitter.com/magthe/statuses/31142051940663296" class="aktt_tweet_time">#</a></li>
    <li>Have decided to move #<a href="http://search.twitter.com/search?q=%23dataenc" class="aktt_hashtag">dataenc</a> development off patch-tag and onto #<a href="http://search.twitter.com/search?q=%23github" class="aktt_hashtag">github</a>  #<a href="http://search.twitter.com/search?q=%23haskell" class="aktt_hashtag">haskell</a> <a href="http://twitter.com/magthe/statuses/31142325518336001" class="aktt_tweet_time">#</a></li>
    <li>Trying a complete rewrite of the dataenc API #<a href="http://search.twitter.com/search?q=%23haskell" class="aktt_hashtag">haskell</a> <a href="http://twitter.com/magthe/statuses/31770974613409792" class="aktt_tweet_time">#</a></li>
    <li>Attempting to update the #<a href="http://search.twitter.com/search?q=%23haskell" class="aktt_hashtag">haskell</a> pages for #<a href="http://search.twitter.com/search?q=%23archlinux" class="aktt_hashtag">archlinux</a> <a href="http://twitter.com/magthe/statuses/31840215530213376" class="aktt_tweet_time">#</a></li>
</ul>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Ftherning.org%2Fmagnus%2Farchives%2F904&amp;title=Twitter%20Weekly%20Updates%20for%202011-01-30" id="wpa2a_76">Share/Bookmark</a></p>]]></content:encoded>
			<wfw:commentRss>http://therning.org/magnus/archives/904/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>On maintaining Haskell packages for a Linux distro</title>
		<link>http://therning.org/magnus/archives/897</link>
		<comments>http://therning.org/magnus/archives/897#comments</comments>
		<pubDate>Mon, 24 Jan 2011 22:30:37 +0000</pubDate>
		<dc:creator>Magnus</dc:creator>
				<category><![CDATA[Posts]]></category>
		<category><![CDATA[arch]]></category>
		<category><![CDATA[cabal]]></category>
		<category><![CDATA[haskell]]></category>

		<guid isPermaLink="false">http://therning.org/magnus/?p=897</guid>
		<description><![CDATA[When trying to maintain set of binary packages of Haskell libraries for a Linux distribution there are a few issues that come up: The set of packages must be compilable at all times, and Updating one package requires all packages that depend on it, in one or more steps, to be re-compiled. The first requires [...]]]></description>
				<content:encoded><![CDATA[<p>When trying to maintain set of binary packages of Haskell libraries for a
Linux distribution there are a few issues that come up:</p>

<ol>
<li>The set of packages must be compilable at all times, and</li>
<li>Updating one package requires all packages that depend on it, in one or
more steps, to be re-compiled.</li>
</ol>

<p>The first requires keeping track of all dependencies of the packages in the
set and making sure that they are satisfiable at all times.  For a while I was
doing this by simple attempting to compile all updated packages and check for
breakages.  Which was both time-consuming and a painful when build-failures
had to be resolved.</p>

<p>The second requires bumping the package release number for all packages that
are reachable when following the dependencies in the reverse direction.  Doing
this manually is tedious and very error prone in my experience.</p>

<p>Of course it ought to be possible to make this a lot easier with the help of a
tool.  The last few days I&#8217;ve been writing such a tool.  This is how I&#8217;ve been
using it so far.</p>

<h3>Building the initial database</h3>

<p>GHC in ArchLinux ships with a few Haskell libraries and ArchLinux also has a
few Haskell packages in its base repositories.  Since I don&#8217;t need to maintain
any of those packages I decided to treat these as a sort of base.  Adding
those is as simple as this:</p>


<div class="wp_syntax"><table><tr><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">%</span> <span style="color: #c20cb9; font-weight: bold;">head</span> base-pkgs
base,4.2.0.2
array,0.3.0.1
bytestring,0.9.1.7
Cabal,1.8.0.6
containers,0.3.0.0
directory,1.0.1.1
extensible-exceptions,0.1.1.1
filepath,1.1.0.4
haskell98,1.0.1.1
hpc,0.5.0.5
<span style="color: #000000; font-weight: bold;">%</span> cblrepo addbasepkg $<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #c20cb9; font-weight: bold;">cat</span> base-pkgs<span style="color: #7a0874; font-weight: bold;">&#41;</span>
Success</pre></td></tr></table></div>


<p>Then I need to add the packages of the binary repo provided by ArchHaskell.  I
wrote a little script that extracts the package name and version from the
ArchHaskell HABS tree (<code>get-ah-cabals</code>):</p>


<div class="wp_syntax"><table><tr><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#! /bin/bash</span>
&nbsp;
<span style="color: #007800;">habsdir</span>=<span style="color: #007800;">$1</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">for</span> d <span style="color: #000000; font-weight: bold;">in</span> <span style="color: #800000;">${habsdir}</span><span style="color: #000000; font-weight: bold;">/</span>habs<span style="color: #000000; font-weight: bold;">/*</span>; <span style="color: #000000; font-weight: bold;">do</span>
    . <span style="color: #800000;">${d}</span><span style="color: #000000; font-weight: bold;">/</span>PKGBUILD
    <span style="color: #000000; font-weight: bold;">case</span> <span style="color: #007800;">$_hkgname</span> <span style="color: #000000; font-weight: bold;">in</span>
        <span style="color: #7a0874; font-weight: bold;">&#40;</span>datetime<span style="color: #000000; font-weight: bold;">|</span>haskell-platform<span style="color: #7a0874; font-weight: bold;">&#41;</span>
            <span style="color: #000000; font-weight: bold;">;;</span>
        <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000; font-weight: bold;">*</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
            <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #800000;">${_hkgname}</span>,<span style="color: #800000;">${pkgver}</span>
            <span style="color: #000000; font-weight: bold;">;;</span>
    <span style="color: #000000; font-weight: bold;">esac</span>
<span style="color: #000000; font-weight: bold;">done</span>
&nbsp;
<span style="color: #7a0874; font-weight: bold;">echo</span> http:<span style="color: #000000; font-weight: bold;">//</span>hackage.haskell.org<span style="color: #000000; font-weight: bold;">/</span>platform<span style="color: #000000; font-weight: bold;">/</span>2010.2.0.0<span style="color: #000000; font-weight: bold;">/</span>haskell-platform.cabal</pre></td></tr></table></div>


<p>Since <code>haskell-platform</code> isn&#8217;t on Hackage it requires special handling.  The
reason why <code>datetime</code> is excluded is slightly different.  It&#8217;s the only package
that requires old <code>base</code> (version <code>&lt;4</code>).  <code>GHC</code> in Arch does whip with both
old and new <code>base</code> so <code>datetime</code> can be built, but <code>cblrepo</code> can&#8217;t deal with
two versions of the same package.  This is a limitation, but I&#8217;m not sure it&#8217;s
worth fixing it since <code>base</code> is the only library that comes in two versions,
and <code>datetime</code> is the only package that hasn&#8217;t been updated to use new <code>base</code>.</p>

<p>Knowing this it&#8217;s easy to add all the ArchHaskell packages to the database:</p>


<div class="wp_syntax"><table><tr><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">%</span> cblrepo idxupdate
<span style="color: #000000; font-weight: bold;">%</span> cblrepo add $<span style="color: #7a0874; font-weight: bold;">&#40;</span>get-ah-cabals path<span style="color: #000000; font-weight: bold;">/</span>to<span style="color: #000000; font-weight: bold;">/</span>habs<span style="color: #7a0874; font-weight: bold;">&#41;</span>
Success</pre></td></tr></table></div>


<h3>Attempting an update</h3>

<p>Now it&#8217;s possible to attempt to attempt an update:</p>


<div class="wp_syntax"><table><tr><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">%</span> cblrepo add neither,0.2.0
Failed to satisfy the following dependencies <span style="color: #000000; font-weight: bold;">for</span> neither:
  monad-peel <span style="color: #000000; font-weight: bold;">&gt;</span>=<span style="color: #000000;">0.1</span> <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> <span style="color: #000000; font-weight: bold;">&lt;</span><span style="color: #000000;">0.2</span>
Adding neither 0.2.0 would break:
  yesod : neither <span style="color: #000000; font-weight: bold;">&gt;</span>=0.1.0 <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> <span style="color: #000000; font-weight: bold;">&lt;</span><span style="color: #000000;">0.2</span>
  persistent : neither <span style="color: #000000; font-weight: bold;">&gt;</span>=<span style="color: #000000;">0.1</span> <span style="color: #000000; font-weight: bold;">&amp;&amp;</span> <span style="color: #000000; font-weight: bold;">&lt;</span><span style="color: #000000;">0.2</span></pre></td></tr></table></div>


<p>The way to read this is that there first of all is a missing dependency to
satisfy for <code>neither</code> itself, and second there are two packages, <code>yesod</code> and
<code>persistent</code>, that wouldn&#8217;t be buildable if <code>neither</code> were updated.</p>

<p>Now if it were possible to update <code>neither</code>, what packages would require a
bump?</p>


<div class="wp_syntax"><table><tr><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">%</span> cblrepo bump neither     
persistent
yesod</pre></td></tr></table></div>

<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Ftherning.org%2Fmagnus%2Farchives%2F897&amp;title=On%20maintaining%20Haskell%20packages%20for%20a%20Linux%20distro" id="wpa2a_78">Share/Bookmark</a></p>]]></content:encoded>
			<wfw:commentRss>http://therning.org/magnus/archives/897/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Twitter Weekly Updates for 2011-01-24</title>
		<link>http://therning.org/magnus/archives/896</link>
		<comments>http://therning.org/magnus/archives/896#comments</comments>
		<pubDate>Sun, 23 Jan 2011 22:59:00 +0000</pubDate>
		<dc:creator>Magnus</dc:creator>
				<category><![CDATA[Posts]]></category>
		<category><![CDATA[Tweets]]></category>

		<guid isPermaLink="false">http://therning.org/magnus/archives/896</guid>
		<description><![CDATA[Compiling #haskell packages like crazy for #archlinux again # Just happy that the code I worked on last week saved me from attempting the update of a few packages with unsatisfiable dependencies. # %s/begs the question/raises the question/g # My implementation of #yEnc in #haskell may come in handy for someone; http://bit.ly/gkpdXy # At work: [...]]]></description>
				<content:encoded><![CDATA[<ul class="aktt_tweet_digest">
    <li>Compiling #<a href="http://search.twitter.com/search?q=%23haskell" class="aktt_hashtag">haskell</a> packages like crazy for #<a href="http://search.twitter.com/search?q=%23archlinux" class="aktt_hashtag">archlinux</a>  again <img src='http://therning.org/magnus/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' />  <a href="http://twitter.com/magthe/statuses/27107296198795265" class="aktt_tweet_time">#</a></li>
    <li>Just happy that the code I worked on last week saved me from attempting the update of a few packages with unsatisfiable dependencies. <a href="http://twitter.com/magthe/statuses/27107489971437568" class="aktt_tweet_time">#</a></li>
    <li>%s/begs the question/raises the question/g <a href="http://twitter.com/magthe/statuses/27323679075471360" class="aktt_tweet_time">#</a></li>
    <li>My implementation of #<a href="http://search.twitter.com/search?q=%23yEnc" class="aktt_hashtag">yEnc</a> in #<a href="http://search.twitter.com/search?q=%23haskell" class="aktt_hashtag">haskell</a> may come in handy for someone; <a href="http://bit.ly/gkpdXy" rel="nofollow">http://bit.ly/gkpdXy</a> <a href="http://twitter.com/magthe/statuses/27383363006365697" class="aktt_tweet_time">#</a></li>
    <li>At work: why is this purchase order valid without a signature? because it has been created electronically by an authorised representative! <a href="http://twitter.com/magthe/statuses/27712175971770368" class="aktt_tweet_time">#</a></li>
    <li>Hmm, I wanted to have a look at #<a href="http://search.twitter.com/search?q=%23cmdlib" class="aktt_hashtag">cmdlib</a> for #<a href="http://search.twitter.com/search?q=%23haskell" class="aktt_hashtag">haskell</a>  but can&#039;t find more than one (trivial) example so I&#039;ll go back to #<a href="http://search.twitter.com/search?q=%23cmdargs" class="aktt_hashtag">cmdargs</a> <a href="http://twitter.com/magthe/statuses/27742779455045632" class="aktt_tweet_time">#</a></li>
    <li>Yay, returning to living after a half-day meeting <a href="http://twitter.com/magthe/statuses/28124563812388864" class="aktt_tweet_time">#</a></li>
    <li>#<a href="http://search.twitter.com/search?q=%23trac" class="aktt_hashtag">trac</a> on haskell.org is painfully slow, I wonder why. #<a href="http://search.twitter.com/search?q=%23haskell" class="aktt_hashtag">haskell</a> <a href="http://twitter.com/magthe/statuses/28409897578143744" class="aktt_tweet_time">#</a></li>
    <li>Download on #<a href="http://search.twitter.com/search?q=%23hackage" class="aktt_hashtag">hackage</a> doesn&#039;t have proper dependencies, but it&#039;s fixed upstream&#8230; not having it on hackage is a pain though. #<a href="http://search.twitter.com/search?q=%23haskell" class="aktt_hashtag">haskell</a> <a href="http://twitter.com/magthe/statuses/28557268601544704" class="aktt_tweet_time">#</a></li>
    <li>? @<a href="http://twitter.com/abuiles" class="aktt_username">abuiles</a>: RT @<a href="http://twitter.com/pendrift" class="aktt_username">pendrift</a>: Do not piss off your web developer. <a href="http://utilitybidder.co.uk/" rel="nofollow">http://utilitybidder.co.uk/</a> <a href="http://twitter.com/magthe/statuses/29096444552019968" class="aktt_tweet_time">#</a></li>
</ul>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Ftherning.org%2Fmagnus%2Farchives%2F896&amp;title=Twitter%20Weekly%20Updates%20for%202011-01-24" id="wpa2a_80">Share/Bookmark</a></p>]]></content:encoded>
			<wfw:commentRss>http://therning.org/magnus/archives/896/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Twitter Weekly Updates for 2011-01-16</title>
		<link>http://therning.org/magnus/archives/895</link>
		<comments>http://therning.org/magnus/archives/895#comments</comments>
		<pubDate>Sun, 16 Jan 2011 22:59:00 +0000</pubDate>
		<dc:creator>Magnus</dc:creator>
				<category><![CDATA[Posts]]></category>
		<category><![CDATA[Tweets]]></category>

		<guid isPermaLink="false">http://therning.org/magnus/archives/895</guid>
		<description><![CDATA[I agree fully: http://feeds.wired.com/~r/wired27b/~3/uaU0f6f1BtQ/ # Yay! Down to only 9 threads in my box for important mail. # Uploading a bunch of packages to #aur since Peter re-generated every single #haskell package for #archlinux # A day in the life of a programmer: http://i.imgur.com/pdpIk.png # So, the archhaskell binary repo for 64-bit is updated with [...]]]></description>
				<content:encoded><![CDATA[<ul class="aktt_tweet_digest">
    <li>I agree fully: <a href="http://feeds.wired.com/~r/wired27b/~3/uaU0f6f1BtQ/" rel="nofollow">http://feeds.wired.com/~r/wired27b/~3/uaU0f6f1BtQ/</a> <a href="http://twitter.com/magthe/statuses/24766861841276929" class="aktt_tweet_time">#</a></li>
    <li>Yay! Down to only 9 threads in my box for important mail. <a href="http://twitter.com/magthe/statuses/25160136284708864" class="aktt_tweet_time">#</a></li>
    <li>Uploading a bunch of packages to #<a href="http://search.twitter.com/search?q=%23aur" class="aktt_hashtag">aur</a>  since Peter re-generated every single #<a href="http://search.twitter.com/search?q=%23haskell" class="aktt_hashtag">haskell</a> package for #<a href="http://search.twitter.com/search?q=%23archlinux" class="aktt_hashtag">archlinux</a> <a href="http://twitter.com/magthe/statuses/25309655106322433" class="aktt_tweet_time">#</a></li>
    <li>A day in the life of a programmer: <a href="http://i.imgur.com/pdpIk.png" rel="nofollow">http://i.imgur.com/pdpIk.png</a> <a href="http://twitter.com/magthe/statuses/25495972066893825" class="aktt_tweet_time">#</a></li>
    <li>So, the archhaskell binary repo for 64-bit is updated with the latest changes. #<a href="http://search.twitter.com/search?q=%23haskell" class="aktt_hashtag">haskell</a> #archlinux <a href="http://twitter.com/magthe/statuses/25530669295734784" class="aktt_tweet_time">#</a></li>
    <li>? @<a href="http://twitter.com/jonke" class="aktt_username">jonke</a>: RT @<a href="http://twitter.com/copumpkin" class="aktt_username">copumpkin</a>: Life in Denmark: <a href="http://t.co/MNqW3Xt" rel="nofollow">http://t.co/MNqW3Xt</a> <a href="http://twitter.com/magthe/statuses/25850116720033792" class="aktt_tweet_time">#</a></li>
    <li>? @<a href="http://twitter.com/conal" class="aktt_username">conal</a>: Why Sarah Palin says all those stupid and ridiculous things. &#8211; Jacob Weisberg &#8211; <a href="http://www.slate.com/id/2262822?wpisrc=obinsite" rel="nofollow">http://www.slate.com/id/2262822?wpisrc=obinsite</a> <a href="http://twitter.com/magthe/statuses/26236988038316032" class="aktt_tweet_time">#</a></li>
    <li>Upgrading ocaml-ocamlgraph on #<a href="http://search.twitter.com/search?q=%23aur" class="aktt_hashtag">aur</a> despite being set on orphaning it as soon as the #<a href="http://search.twitter.com/search?q=%23ocaml" class="aktt_hashtag">ocaml</a> initiative in #<a href="http://search.twitter.com/search?q=%23arch" class="aktt_hashtag">arch</a> takes off. <a href="http://twitter.com/magthe/statuses/26238701575086080" class="aktt_tweet_time">#</a></li>
    <li>A friend-of-a-friend on FB has the surname &#039;Fant&#039;, I hope she doesn&#039;t name her kid Elle. <a href="http://twitter.com/magthe/statuses/26243561297022976" class="aktt_tweet_time">#</a></li>
    <li>Is there some way of getting #<a href="http://search.twitter.com/search?q=%23github" class="aktt_hashtag">github</a> to send an email when a new issue is created? <a href="http://twitter.com/magthe/statuses/26773005518512128" class="aktt_tweet_time">#</a></li>
</ul>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Ftherning.org%2Fmagnus%2Farchives%2F895&amp;title=Twitter%20Weekly%20Updates%20for%202011-01-16" id="wpa2a_82">Share/Bookmark</a></p>]]></content:encoded>
			<wfw:commentRss>http://therning.org/magnus/archives/895/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Twitter Weekly Updates for 2011-01-10</title>
		<link>http://therning.org/magnus/archives/894</link>
		<comments>http://therning.org/magnus/archives/894#comments</comments>
		<pubDate>Sun, 09 Jan 2011 22:59:00 +0000</pubDate>
		<dc:creator>Magnus</dc:creator>
				<category><![CDATA[Posts]]></category>
		<category><![CDATA[Tweets]]></category>

		<guid isPermaLink="false">http://therning.org/magnus/archives/894</guid>
		<description><![CDATA[6370 emails received over the holidays, oh joy! # First interaction with SAP for the year, it resulted in a call to helpdesk. # Time to try Jivamukti for the first time. #yoga # Good #jivamukti session this morning. My first. #yoga # Re-building about 87 haskell packages for archlinux, unfortunately not in a very [...]]]></description>
				<content:encoded><![CDATA[<ul class="aktt_tweet_digest">
    <li>6370 emails received over the holidays, oh joy! <a href="http://twitter.com/magthe/statuses/22936442678284288" class="aktt_tweet_time">#</a></li>
    <li>First interaction with SAP for the year, it resulted in a call to helpdesk. <a href="http://twitter.com/magthe/statuses/22948675906965504" class="aktt_tweet_time">#</a></li>
    <li>Time to try Jivamukti for the first time. #<a href="http://search.twitter.com/search?q=%23yoga" class="aktt_hashtag">yoga</a> <a href="http://twitter.com/magthe/statuses/23658705694228481" class="aktt_tweet_time">#</a></li>
    <li>Good #<a href="http://search.twitter.com/search?q=%23jivamukti" class="aktt_hashtag">jivamukti</a> session this morning. My first. #<a href="http://search.twitter.com/search?q=%23yoga" class="aktt_hashtag">yoga</a> <a href="http://twitter.com/magthe/statuses/23774946266185728" class="aktt_tweet_time">#</a></li>
    <li>Re-building about 87 haskell packages for archlinux, unfortunately not in a very efficient way <img src='http://therning.org/magnus/wp-includes/images/smilies/icon_sad.gif' alt=':-(' class='wp-smiley' />  <a href="http://twitter.com/magthe/statuses/23775176491540481" class="aktt_tweet_time">#</a></li>
    <li>? @<a href="http://twitter.com/abratland" class="aktt_username">abratland</a>: Sick of wasting time in meetings? Then boycott one on January 19th: <a href="http://boycottameetingday.com" rel="nofollow">http://boycottameetingday.com</a> <a href="http://twitter.com/magthe/statuses/23832583003443200" class="aktt_tweet_time">#</a></li>
    <li>Been compiling #<a href="http://search.twitter.com/search?q=%23haskell" class="aktt_hashtag">haskell</a> packages like crazy today, just to update a few packages for #<a href="http://search.twitter.com/search?q=%23archlinux" class="aktt_hashtag">archlinux</a> #aur. <a href="http://twitter.com/magthe/statuses/24212011348926464" class="aktt_tweet_time">#</a></li>
</ul>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Ftherning.org%2Fmagnus%2Farchives%2F894&amp;title=Twitter%20Weekly%20Updates%20for%202011-01-10" id="wpa2a_84">Share/Bookmark</a></p>]]></content:encoded>
			<wfw:commentRss>http://therning.org/magnus/archives/894/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Twitter Weekly Updates for 2010-12-12</title>
		<link>http://therning.org/magnus/archives/893</link>
		<comments>http://therning.org/magnus/archives/893#comments</comments>
		<pubDate>Sun, 12 Dec 2010 22:59:00 +0000</pubDate>
		<dc:creator>Magnus</dc:creator>
				<category><![CDATA[Posts]]></category>
		<category><![CDATA[Tweets]]></category>

		<guid isPermaLink="false">http://therning.org/magnus/archives/893</guid>
		<description><![CDATA[#vim is such a strange beast at times. # ? @merlyn: Simon Phipps on &#34;The Risks of Cloud: Lessons from Wikileaks&#34; (via CW UK) http://post.ly/1Isn3 # I&#039;m glad to see that #libreoffice has a much improved printer dialogue. # Brilliant: http://is.gd/ipo2b #]]></description>
				<content:encoded><![CDATA[<ul class="aktt_tweet_digest">
    <li>#<a href="http://search.twitter.com/search?q=%23vim" class="aktt_hashtag">vim</a> is such a strange beast at times. <a href="http://twitter.com/magthe/statuses/12136836931526656" class="aktt_tweet_time">#</a></li>
    <li>? @<a href="http://twitter.com/merlyn" class="aktt_username">merlyn</a>: Simon Phipps on &quot;The Risks of Cloud: Lessons from Wikileaks&quot; (via CW UK) <a href="http://post.ly/1Isn3" rel="nofollow">http://post.ly/1Isn3</a> <a href="http://twitter.com/magthe/statuses/12452889603612673" class="aktt_tweet_time">#</a></li>
    <li>I&#039;m glad to see that #<a href="http://search.twitter.com/search?q=%23libreoffice" class="aktt_hashtag">libreoffice</a> has a much improved printer dialogue. <a href="http://twitter.com/magthe/statuses/12470262641463297" class="aktt_tweet_time">#</a></li>
    <li>Brilliant: <a href="http://is.gd/ipo2b" rel="nofollow">http://is.gd/ipo2b</a> <a href="http://twitter.com/magthe/statuses/12622913073057792" class="aktt_tweet_time">#</a></li>
</ul>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Ftherning.org%2Fmagnus%2Farchives%2F893&amp;title=Twitter%20Weekly%20Updates%20for%202010-12-12" id="wpa2a_86">Share/Bookmark</a></p>]]></content:encoded>
			<wfw:commentRss>http://therning.org/magnus/archives/893/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Twitter Weekly Updates for 2010-12-05</title>
		<link>http://therning.org/magnus/archives/892</link>
		<comments>http://therning.org/magnus/archives/892#comments</comments>
		<pubDate>Sun, 05 Dec 2010 22:59:00 +0000</pubDate>
		<dc:creator>Magnus</dc:creator>
				<category><![CDATA[Posts]]></category>
		<category><![CDATA[Tweets]]></category>

		<guid isPermaLink="false">http://therning.org/magnus/archives/892</guid>
		<description><![CDATA[Excellent piece on airport security from Mr Schneier, as expected: http://is.gd/hWDVY # Now my desk has deskalators # Loving the #uksnow this morning, nice ride to work too. # Colleague just walked in with an excellent laptop bag: a Tesco bag-for-life. # This&#039;ll make it easier to move to Sweden once we decide to do [...]]]></description>
				<content:encoded><![CDATA[<ul class="aktt_tweet_digest">
    <li>Excellent piece on airport security from Mr Schneier, as expected: <a href="http://is.gd/hWDVY" rel="nofollow">http://is.gd/hWDVY</a> <a href="http://twitter.com/magthe/statuses/9182903816683520" class="aktt_tweet_time">#</a></li>
    <li>Now my desk has deskalators <img src='http://therning.org/magnus/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  <a href="http://twitter.com/magthe/statuses/9191460687577088" class="aktt_tweet_time">#</a></li>
    <li>Loving the #<a href="http://search.twitter.com/search?q=%23uksnow" class="aktt_hashtag">uksnow</a> this morning, nice ride to work too. <a href="http://twitter.com/magthe/statuses/9526167270854656" class="aktt_tweet_time">#</a></li>
    <li>Colleague just walked in with an excellent laptop bag: a Tesco bag-for-life. <a href="http://twitter.com/magthe/statuses/9526267112062977" class="aktt_tweet_time">#</a></li>
    <li>This&#039;ll make it easier to move to Sweden once we decide to do that: <a href="http://www.thelocal.se/30508/20101130/" rel="nofollow">http://www.thelocal.se/30508/20101130/</a> #<a href="http://search.twitter.com/search?q=%23curry" class="aktt_hashtag">curry</a> #sweden <a href="http://twitter.com/magthe/statuses/9547497173164032" class="aktt_tweet_time">#</a></li>
    <li>Oh so true: <a href="http://is.gd/hZ8yy" rel="nofollow">http://is.gd/hZ8yy</a> #<a href="http://search.twitter.com/search?q=%23sap" class="aktt_hashtag">sap</a> #enterprise <a href="http://twitter.com/magthe/statuses/9552285134749696" class="aktt_tweet_time">#</a></li>
    <li>? @<a href="http://twitter.com/galoisinc" class="aktt_username">galoisinc</a>: Galois releases the Haskell Lightweight Virtual Machine (HaLVM)! Haskell without an OS! <a href="http://is.gd/i0M7g" rel="nofollow">http://is.gd/i0M7g</a> #<a href="http://search.twitter.com/search?q=%23halvm" class="aktt_hashtag">halvm</a> <a href="http://twitter.com/magthe/statuses/9970097267408896" class="aktt_tweet_time">#</a></li>
    <li>Does this government really expect us to believe this BS? &quot;cut the supply line to poverty&quot; #<a href="http://search.twitter.com/search?q=%23uk" class="aktt_hashtag">uk</a> #coalition <a href="http://twitter.com/magthe/statuses/10606446953631744" class="aktt_tweet_time">#</a></li>
    <li>#<a href="http://search.twitter.com/search?q=%23wikileaks" class="aktt_hashtag">wikileaks</a> IP: 213.251.145.96 or 88.80.13.160 in case you need to do some reading this morning <a href="http://twitter.com/magthe/statuses/10617781829509120" class="aktt_tweet_time">#</a></li>
    <li>? @<a href="http://twitter.com/vincenthz" class="aktt_username">vincenthz</a>: using quickcheck v2.4 small tutorial. <a href="http://tab.snarc.org/blog/post/2010/12/2/using_quickcheck/" rel="nofollow">http://tab.snarc.org/blog/post/2010/12/2/using_quickcheck/</a> <a href="http://twitter.com/magthe/statuses/10989537614364673" class="aktt_tweet_time">#</a></li>
    <li>More problems for #<a href="http://search.twitter.com/search?q=%23wikileaks" class="aktt_hashtag">wikileaks</a>  now it&#039;s attacked through PayPal: <a href="http://is.gd/id9YH" rel="nofollow">http://is.gd/id9YH</a> <a href="http://twitter.com/magthe/statuses/11182828498722816" class="aktt_tweet_time">#</a></li>
</ul>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Ftherning.org%2Fmagnus%2Farchives%2F892&amp;title=Twitter%20Weekly%20Updates%20for%202010-12-05" id="wpa2a_88">Share/Bookmark</a></p>]]></content:encoded>
			<wfw:commentRss>http://therning.org/magnus/archives/892/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Dent Weekly Updates for 2010-11-28</title>
		<link>http://therning.org/magnus/archives/891</link>
		<comments>http://therning.org/magnus/archives/891#comments</comments>
		<pubDate>Sun, 28 Nov 2010 21:59:00 +0000</pubDate>
		<dc:creator>Magnus</dc:creator>
				<category><![CDATA[Posts]]></category>
		<category><![CDATA[dents]]></category>

		<guid isPermaLink="false">http://therning.org/magnus/archives/891</guid>
		<description><![CDATA[Yay, SVTPlay funkar igen #svt #tv # Powered by Twitter Tools]]></description>
				<content:encoded><![CDATA[<ul class="aktt_tweet_digest">
    <li>Yay, SVTPlay funkar igen <img src='http://therning.org/magnus/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  #<a href="http://search.identi.ca/api/search?q=%23svt" class="aktt_hashtag">svt</a> #tv <a href="http://identi.ca/api/magthe/statuses/59088270" class="aktt_tweet_time">#</a></li>
</ul>

<p class="aktt_credit">Powered by <a href="http://alexking.org/projects/wordpress">Twitter Tools</a></p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Ftherning.org%2Fmagnus%2Farchives%2F891&amp;title=Dent%20Weekly%20Updates%20for%202010-11-28" id="wpa2a_90">Share/Bookmark</a></p>]]></content:encoded>
			<wfw:commentRss>http://therning.org/magnus/archives/891/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Dent Weekly Updates for 2010-11-21</title>
		<link>http://therning.org/magnus/archives/890</link>
		<comments>http://therning.org/magnus/archives/890#comments</comments>
		<pubDate>Sun, 21 Nov 2010 21:59:00 +0000</pubDate>
		<dc:creator>Magnus</dc:creator>
				<category><![CDATA[Posts]]></category>
		<category><![CDATA[dents]]></category>

		<guid isPermaLink="false">http://therning.org/magnus/archives/890</guid>
		<description><![CDATA[My first gist: https://gist.github.com/700166 #archlinux # Oh yes!!! http://www.youtube.com/watch?v=RCEcYg3lNR4 # I&#039;m sure god kills a kitten everytime an &#34;enterprise application&#34; is launched! # So, SAP closed down, I&#039;ve slowly getting back my will to live. # Vilken är den bästa karriärsajten om man vill söka jobb i Sverige? #sverige #karriär #jobb # Finally I&#039;ve found [...]]]></description>
				<content:encoded><![CDATA[<ul class="aktt_tweet_digest">
    <li>My first gist: <a href="https://gist.github.com/700166" rel="nofollow">https://gist.github.com/700166</a> #<a href="http://search.identi.ca/api/search?q=%23archlinux" class="aktt_hashtag">archlinux</a> <a href="http://identi.ca/api/magthe/statuses/58636612" class="aktt_tweet_time">#</a></li>
    <li>Oh yes!!! <a href="http://www.youtube.com/watch?v=RCEcYg3lNR4" rel="nofollow">http://www.youtube.com/watch?v=RCEcYg3lNR4</a> <a href="http://identi.ca/api/magthe/statuses/58772381" class="aktt_tweet_time">#</a></li>
    <li>I&#039;m sure god kills a kitten everytime an &quot;enterprise application&quot; is launched! <a href="http://identi.ca/api/magthe/statuses/58785545" class="aktt_tweet_time">#</a></li>
    <li>So, SAP closed down, I&#039;ve slowly getting back my will to live. <a href="http://identi.ca/api/magthe/statuses/58786252" class="aktt_tweet_time">#</a></li>
    <li>Vilken är den bästa karriärsajten om man vill söka jobb i Sverige? #<a href="http://search.identi.ca/api/search?q=%23sverige" class="aktt_hashtag">sverige</a> #karriär #<a href="http://search.identi.ca/api/search?q=%23jobb" class="aktt_hashtag">jobb</a> <a href="http://identi.ca/api/magthe/statuses/58844817" class="aktt_tweet_time">#</a></li>
    <li>Finally I&#039;ve found this written down properly: <a href="http://jblevins.org/computing/linux/hostname" rel="nofollow">http://jblevins.org/computing/linux/hostname</a> #<a href="http://search.identi.ca/api/search?q=%23linux" class="aktt_hashtag">linux</a> #hostname <a href="http://identi.ca/api/magthe/statuses/58846696" class="aktt_tweet_time">#</a></li>
    <li>No SVT Play at the moment? <img src='http://therning.org/magnus/wp-includes/images/smilies/icon_sad.gif' alt=':-(' class='wp-smiley' />  #<a href="http://search.identi.ca/api/search?q=%23tv" class="aktt_hashtag">tv</a> <a href="http://identi.ca/api/magthe/statuses/58878415" class="aktt_tweet_time">#</a></li>
</ul>

<p class="aktt_credit">Powered by <a href="http://alexking.org/projects/wordpress">Twitter Tools</a></p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Ftherning.org%2Fmagnus%2Farchives%2F890&amp;title=Dent%20Weekly%20Updates%20for%202010-11-21" id="wpa2a_92">Share/Bookmark</a></p>]]></content:encoded>
			<wfw:commentRss>http://therning.org/magnus/archives/890/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Dent Weekly Updates for 2010-11-14</title>
		<link>http://therning.org/magnus/archives/889</link>
		<comments>http://therning.org/magnus/archives/889#comments</comments>
		<pubDate>Sun, 14 Nov 2010 21:59:00 +0000</pubDate>
		<dc:creator>Magnus</dc:creator>
				<category><![CDATA[Posts]]></category>
		<category><![CDATA[dents]]></category>

		<guid isPermaLink="false">http://therning.org/magnus/archives/889</guid>
		<description><![CDATA[Cool. I just signed up for a workshop with David Swenson here in Cambridge #ashtanga #yo # Argh! Don&#039;t Vim plugin hackers know that Vim has its own format for plugins, VBA? # Scary: http://is.gd/gVR7t # Wonderful, I found two new #unix commands &#039;sg&#039; and &#039;newgrp&#039;, useful stuff. # Busy rebuilding haskell-platform for #arch again. [...]]]></description>
				<content:encoded><![CDATA[<ul class="aktt_tweet_digest">
    <li>Cool. I just signed up for a workshop with David Swenson here in Cambridge <img src='http://therning.org/magnus/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  #<a href="http://search.identi.ca/api/search?q=%23ashtanga" class="aktt_hashtag">ashtanga</a> #yo <a href="http://identi.ca/api/magthe/statuses/58218083" class="aktt_tweet_time">#</a></li>
    <li>Argh! Don&#039;t Vim plugin hackers know that Vim has its own format for plugins, VBA? <a href="http://identi.ca/api/magthe/statuses/58394833" class="aktt_tweet_time">#</a></li>
    <li>Scary: <a href="http://is.gd/gVR7t" rel="nofollow">http://is.gd/gVR7t</a> <a href="http://identi.ca/api/magthe/statuses/58401837" class="aktt_tweet_time">#</a></li>
    <li>Wonderful, I found two new #<a href="http://search.identi.ca/api/search?q=%23unix" class="aktt_hashtag">unix</a> commands &#039;sg&#039; and &#039;newgrp&#039;, useful stuff. <a href="http://identi.ca/api/magthe/statuses/58455251" class="aktt_tweet_time">#</a></li>
    <li>Busy rebuilding haskell-platform for #<a href="http://search.identi.ca/api/search?q=%23arch" class="aktt_hashtag">arch</a>  again. <a href="http://identi.ca/api/magthe/statuses/58555197" class="aktt_tweet_time">#</a></li>
</ul>

<p class="aktt_credit">Powered by <a href="http://alexking.org/projects/wordpress">Twitter Tools</a></p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Ftherning.org%2Fmagnus%2Farchives%2F889&amp;title=Dent%20Weekly%20Updates%20for%202010-11-14" id="wpa2a_94">Share/Bookmark</a></p>]]></content:encoded>
			<wfw:commentRss>http://therning.org/magnus/archives/889/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Dent Weekly Updates for 2010-11-07</title>
		<link>http://therning.org/magnus/archives/888</link>
		<comments>http://therning.org/magnus/archives/888#comments</comments>
		<pubDate>Sun, 07 Nov 2010 21:59:00 +0000</pubDate>
		<dc:creator>Magnus</dc:creator>
				<category><![CDATA[Posts]]></category>
		<category><![CDATA[dents]]></category>

		<guid isPermaLink="false">http://therning.org/magnus/archives/888</guid>
		<description><![CDATA[Viv&#039;s feeling sick this morning, so doing a bit of work on my laptop # Cool, I wonder if my email to #stepstone prompted them to send out a scam warning. # Ouch, #arch has just moved a few packages past what #HP requires. Need to come up with some way of dealing with this. [...]]]></description>
				<content:encoded><![CDATA[<ul class="aktt_tweet_digest">
    <li>Viv&#039;s feeling sick this morning, so doing a bit of work on my laptop <img src='http://therning.org/magnus/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  <a href="http://identi.ca/api/magthe/statuses/57793783" class="aktt_tweet_time">#</a></li>
    <li>Cool, I wonder if my email to #<a href="http://search.identi.ca/api/search?q=%23stepstone" class="aktt_hashtag">stepstone</a> prompted them to send out a scam warning. <a href="http://identi.ca/api/magthe/statuses/57793901" class="aktt_tweet_time">#</a></li>
    <li>Ouch, #<a href="http://search.identi.ca/api/search?q=%23arch" class="aktt_hashtag">arch</a> has just moved a few packages past what #<a href="http://search.identi.ca/api/search?q=%23HP" class="aktt_hashtag">HP</a> requires. Need to come up with some way of dealing with this. <a href="http://identi.ca/api/magthe/statuses/57810347" class="aktt_tweet_time">#</a></li>
    <li>Yay, first ride on electric bike went well, and it was FUN! <a href="http://identi.ca/api/magthe/statuses/57922702" class="aktt_tweet_time">#</a></li>
    <li>Mmm, Wallander and Swedish Fish! <a href="http://identi.ca/api/magthe/statuses/58044940" class="aktt_tweet_time">#</a></li>
    <li>I just hooked up the archhaskell development to its twitter account. #<a href="http://search.identi.ca/api/search?q=%23arch" class="aktt_hashtag">arch</a> #haskell <a href="http://identi.ca/api/magthe/statuses/58072866" class="aktt_tweet_time">#</a></li>
</ul>

<p class="aktt_credit">Powered by <a href="http://alexking.org/projects/wordpress">Twitter Tools</a></p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Ftherning.org%2Fmagnus%2Farchives%2F888&amp;title=Dent%20Weekly%20Updates%20for%202010-11-07" id="wpa2a_96">Share/Bookmark</a></p>]]></content:encoded>
			<wfw:commentRss>http://therning.org/magnus/archives/888/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Dent Weekly Updates for 2010-10-31</title>
		<link>http://therning.org/magnus/archives/887</link>
		<comments>http://therning.org/magnus/archives/887#comments</comments>
		<pubDate>Sun, 31 Oct 2010 21:59:00 +0000</pubDate>
		<dc:creator>Magnus</dc:creator>
				<category><![CDATA[Posts]]></category>
		<category><![CDATA[dents]]></category>

		<guid isPermaLink="false">http://therning.org/magnus/archives/887</guid>
		<description><![CDATA[Possibly the only strategy for ordering breakfast from McDonalds after 10:30: http://is.gd/ghnhT # A useful page for HP: http://people.debian.org/~nomeata/platform.html #haskell # Problemet är väl att sajter hoppar från HTTP till HTTPS, så detta hjälper inte så mycket: http://is.gd/gkse8 #fb #firesheep # UK nurseries are simply robbing people! # Wow, still no pygtk for use with [...]]]></description>
				<content:encoded><![CDATA[<ul class="aktt_tweet_digest">
    <li>Possibly the only strategy for ordering breakfast from McDonalds after 10:30: <a href="http://is.gd/ghnhT" rel="nofollow">http://is.gd/ghnhT</a> <a href="http://identi.ca/api/magthe/statuses/57366563" class="aktt_tweet_time">#</a></li>
    <li>A useful page for HP: <a href="http://people.debian.org/~nomeata/platform.html" rel="nofollow">http://people.debian.org/~nomeata/platform.html</a> #<a href="http://search.identi.ca/api/search?q=%23haskell" class="aktt_hashtag">haskell</a> <a href="http://identi.ca/api/magthe/statuses/57449556" class="aktt_tweet_time">#</a></li>
    <li>Problemet är väl att sajter hoppar från HTTP till HTTPS, så detta hjälper inte så mycket: <a href="http://is.gd/gkse8" rel="nofollow">http://is.gd/gkse8</a> #<a href="http://search.identi.ca/api/search?q=%23fb" class="aktt_hashtag">fb</a> #firesheep <a href="http://identi.ca/api/magthe/statuses/57456825" class="aktt_tweet_time">#</a></li>
    <li>UK nurseries are simply robbing people! <a href="http://identi.ca/api/magthe/statuses/57580967" class="aktt_tweet_time">#</a></li>
    <li>Wow, still no pygtk for use with python3, huh? #<a href="http://search.identi.ca/api/search?q=%23python" class="aktt_hashtag">python</a> #gtk <a href="http://identi.ca/api/magthe/statuses/57582854" class="aktt_tweet_time">#</a></li>
    <li>A good trend I&#039;d say: <a href="http://www.thelocal.se/29892/20101029/" rel="nofollow">http://www.thelocal.se/29892/20101029/</a> <a href="http://identi.ca/api/magthe/statuses/57648232" class="aktt_tweet_time">#</a></li>
</ul>

<p class="aktt_credit">Powered by <a href="http://alexking.org/projects/wordpress">Twitter Tools</a></p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Ftherning.org%2Fmagnus%2Farchives%2F887&amp;title=Dent%20Weekly%20Updates%20for%202010-10-31" id="wpa2a_98">Share/Bookmark</a></p>]]></content:encoded>
			<wfw:commentRss>http://therning.org/magnus/archives/887/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Dent Weekly Updates for 2010-10-24</title>
		<link>http://therning.org/magnus/archives/886</link>
		<comments>http://therning.org/magnus/archives/886#comments</comments>
		<pubDate>Sun, 24 Oct 2010 21:59:00 +0000</pubDate>
		<dc:creator>Magnus</dc:creator>
				<category><![CDATA[Posts]]></category>
		<category><![CDATA[dents]]></category>

		<guid isPermaLink="false">http://therning.org/magnus/archives/886</guid>
		<description><![CDATA[Brilliant XKCD: http://xkcd.com/806/ # Ah damn you #git You&#039;re actually not too bad to work with! # Comedy on youtube, tag: http://is.gd/g7Wp0 # Proper English lunch today: sandwhich and some crisp # Oh my, just what we need, another ill conceived plan for a large database: http://is.gd/g9Mge # New release of keysafe It now lives [...]]]></description>
				<content:encoded><![CDATA[<ul class="aktt_tweet_digest">
    <li>Brilliant XKCD: <a href="http://xkcd.com/806/" rel="nofollow">http://xkcd.com/806/</a> <a href="http://identi.ca/api/magthe/statuses/56613667" class="aktt_tweet_time">#</a></li>
    <li>Ah damn you #<a href="http://search.identi.ca/api/search?q=%23git" class="aktt_hashtag">git</a>  You&#039;re actually not too bad to work with! <a href="http://identi.ca/api/magthe/statuses/56647801" class="aktt_tweet_time">#</a></li>
    <li>Comedy on youtube, tag: <a href="http://is.gd/g7Wp0" rel="nofollow">http://is.gd/g7Wp0</a> <a href="http://identi.ca/api/magthe/statuses/56689793" class="aktt_tweet_time">#</a></li>
    <li>Proper English lunch today: sandwhich and some crisp <a href="http://identi.ca/api/magthe/statuses/56982398" class="aktt_tweet_time">#</a></li>
    <li>Oh my, just what we need, another ill conceived plan for a large database: <a href="http://is.gd/g9Mge" rel="nofollow">http://is.gd/g9Mge</a> <a href="http://identi.ca/api/magthe/statuses/56991529" class="aktt_tweet_time">#</a></li>
    <li>New release of keysafe <img src='http://therning.org/magnus/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  It now lives on github, and doesn&#039;t use boost anymore, yippie! <a href="http://github.com/magthe/keysafe" rel="nofollow">http://github.com/magthe/keysafe</a> <a href="http://identi.ca/api/magthe/statuses/57018314" class="aktt_tweet_time">#</a></li>
    <li>? @<a href="http://identi.ca/api/jgoerzen" class="aktt_username">jgoerzen</a>: An awesome bit of (true) programming folklore: <a href="http://dvlabs.tippingpoint.com/blog/2008/03/18/a-bit-of-history" rel="nofollow">http://dvlabs.tippingpoint.com/blog/2008/03/18/a-bit-of-history</a> <a href="http://identi.ca/api/magthe/statuses/57083208" class="aktt_tweet_time">#</a></li>
    <li>Yah, I now have haskell-platform compiled for #<a href="http://search.identi.ca/api/search?q=%23archlinux" class="aktt_hashtag">archlinux</a>  will announce the repo as soon as the bug against cgi is fixed. #<a href="http://search.identi.ca/api/search?q=%23haskell" class="aktt_hashtag">haskell</a> <a href="http://identi.ca/api/magthe/statuses/57167395" class="aktt_tweet_time">#</a></li>
</ul>

<p class="aktt_credit">Powered by <a href="http://alexking.org/projects/wordpress">Twitter Tools</a></p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Ftherning.org%2Fmagnus%2Farchives%2F886&amp;title=Dent%20Weekly%20Updates%20for%202010-10-24" id="wpa2a_100">Share/Bookmark</a></p>]]></content:encoded>
			<wfw:commentRss>http://therning.org/magnus/archives/886/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
