<?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>Erlends hjem i skyene &#187; english</title>
	<atom:link href="http://hamberg.no/erlend/category/english/feed/" rel="self" type="application/rss+xml" />
	<link>http://hamberg.no/erlend</link>
	<description>p = &#038;p;</description>
	<lastBuildDate>Sun, 05 Sep 2010 15:29:37 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>How Neurons do Differentiation</title>
		<link>http://hamberg.no/erlend/2010/03/22/how-neurons-do-differentiation/</link>
		<comments>http://hamberg.no/erlend/2010/03/22/how-neurons-do-differentiation/#comments</comments>
		<pubDate>Mon, 22 Mar 2010 18:48:08 +0000</pubDate>
		<dc:creator>Erlend</dc:creator>
				<category><![CDATA[ai]]></category>
		<category><![CDATA[english]]></category>

		<guid isPermaLink="false">http://hamberg.no/erlend/?p=1111</guid>
		<description><![CDATA[Nature is simply amazing. Today I learnt… …how neural networks (think brains) can do differentiation by using temporal inhibition – i.e. by using a delayed signal. In the figure below, the node α will send a signal to two nodes. One of them – β – will pass on an inhibitory signal of the same]]></description>
			<content:encoded><![CDATA[<p>Nature is simply amazing.</p>
<p><strong>Today I learnt…</strong></p>
<p>…how neural networks (think brains) can do differentiation by using temporal inhibition – i.e. by using a delayed signal. In the figure below, the node <strong>α</strong> will send a signal to two nodes. One of them – <strong>β</strong> – will pass on an inhibitory signal of the same strength as its input signal, but with a delay. Thus, when <strong>β</strong>&#8216;s signal gets sent to the final node, <strong>α</strong> will at the same time be sending its “next” output signal to the final node.</p>
<div id="attachment_1120" class="wp-caption aligncenter" style="width: 410px"><a href="http://hamberg.no/erlend/wp-content/uploads/2010/03/tdifferentiation.png"><img class="size-medium wp-image-1120" title="tdifferentiation" src="http://hamberg.no/erlend/wp-content/uploads/2010/03/tdifferentiation-400x105.png" alt="" width="400" height="105" /></a><p class="wp-caption-text">“Differentiation” by using delayed inhibition. Solid lines indicate excitatory signals and the dotted line an inhibitory signal.</p></div>
<p>Therefore, the final node will receive two signals: the current output of <strong>α</strong> and the inverted previous output of <strong>α</strong>. If the final node sums these together its output will therefore be <strong>α</strong>&#8216;s current value minus its old value – i.e. positive if <strong>α</strong>&#8216;s output signal is increasing and negative if it is decreasing. Simple and beautiful!</p>
]]></content:encoded>
			<wfw:commentRss>http://hamberg.no/erlend/2010/03/22/how-neurons-do-differentiation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Game of Life</title>
		<link>http://hamberg.no/erlend/2010/03/20/game-of-life/</link>
		<comments>http://hamberg.no/erlend/2010/03/20/game-of-life/#comments</comments>
		<pubDate>Sat, 20 Mar 2010 18:58:32 +0000</pubDate>
		<dc:creator>Erlend</dc:creator>
				<category><![CDATA[coding]]></category>
		<category><![CDATA[english]]></category>
		<category><![CDATA[haskell]]></category>

		<guid isPermaLink="false">http://hamberg.no/erlend/?p=1094</guid>
		<description><![CDATA[While reading about cellular automata in preparation for an essay it struck me that I have never actually written Conway&#8217;s Game of Life. No, really! To correct this embarrassing fact I quickly wrote a version in Haskell using the GLUT bindings. It is very simple, but it works. import Graphics.UI.GLUT hiding &#40;get&#41; import Graphics.Rendering.GLU.Raw &#40;gluOrtho2D&#41;]]></description>
			<content:encoded><![CDATA[<p>While reading about cellular automata in preparation for an essay it struck me that I have never actually written <a href="http://en.wikipedia.org/wiki/Conway's Game of Life">Conway&#8217;s Game of Life</a>. No, really!</p>
<p>To correct this embarrassing fact I quickly wrote a version in Haskell using the <a href="http://hackage.haskell.org/package/GLUT">GLUT bindings</a>.</p>
<div id="attachment_1097" class="wp-caption aligncenter" style="width: 310px"><a href="http://hamberg.no/erlend/wp-content/uploads/2010/03/gol.png"><img class="size-medium wp-image-1097" title="Conway's Game of Life" src="http://hamberg.no/erlend/wp-content/uploads/2010/03/gol-300x232.png" alt="" width="300" height="232" /></a><p class="wp-caption-text">Conway&#39;s Game of Life</p></div>
<p><span id="more-1094"></span></p>
<p>It is very simple, but it works. <img src='http://hamberg.no/erlend/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>

<div class="wp_syntax"><div class="code"><pre class="haskell" style="font-family:monospace;"><span style="color: #06c; font-weight: bold;">import</span> Graphics<span style="color: #339933; font-weight: bold;">.</span>UI<span style="color: #339933; font-weight: bold;">.</span>GLUT <span style="color: #06c; font-weight: bold;">hiding</span> <span style="color: green;">&#40;</span>get<span style="color: green;">&#41;</span>
<span style="color: #06c; font-weight: bold;">import</span> Graphics<span style="color: #339933; font-weight: bold;">.</span>Rendering<span style="color: #339933; font-weight: bold;">.</span>GLU<span style="color: #339933; font-weight: bold;">.</span>Raw <span style="color: green;">&#40;</span>gluOrtho2D<span style="color: green;">&#41;</span>
<span style="color: #06c; font-weight: bold;">import</span> Data<span style="color: #339933; font-weight: bold;">.</span>IORef
<span style="color: #06c; font-weight: bold;">import</span> System<span style="color: #339933; font-weight: bold;">.</span>Random
&nbsp;
<span style="color: #5d478b; font-style: italic;">-- dimensions of our cellular space</span>
width  <span style="color: #339933; font-weight: bold;">=</span> <span style="color: red;">80</span> <span style="color: #339933; font-weight: bold;">::</span> <span style="color: #cccc00; font-weight: bold;">Int</span>
height <span style="color: #339933; font-weight: bold;">=</span> <span style="color: red;">60</span> <span style="color: #339933; font-weight: bold;">::</span> <span style="color: #cccc00; font-weight: bold;">Int</span>
&nbsp;
<span style="color: #5d478b; font-style: italic;">-- takes a two-dimensional list and returns the neighbours of (x,y)</span>
neighbours <span style="color: #339933; font-weight: bold;">::</span> <span style="color: green;">&#91;</span><span style="color: green;">&#91;</span>a<span style="color: green;">&#93;</span><span style="color: green;">&#93;</span> <span style="color: #339933; font-weight: bold;">-</span>&amp;gt; <span style="color: green;">&#40;</span><span style="color: #cccc00; font-weight: bold;">Int</span><span style="color: #339933; font-weight: bold;">,</span><span style="color: #cccc00; font-weight: bold;">Int</span><span style="color: green;">&#41;</span> <span style="color: #339933; font-weight: bold;">-</span>&amp;gt; <span style="color: green;">&#91;</span>a<span style="color: green;">&#93;</span>
neighbours m <span style="color: green;">&#40;</span>x<span style="color: #339933; font-weight: bold;">,</span>y<span style="color: green;">&#41;</span> <span style="color: #339933; font-weight: bold;">=</span> <span style="font-weight: bold;">map</span> <span style="color: green;">&#40;</span>\<span style="color: green;">&#40;</span>x'<span style="color: #339933; font-weight: bold;">,</span>y'<span style="color: green;">&#41;</span> <span style="color: #339933; font-weight: bold;">-</span>&amp;gt; m <span style="color: #339933; font-weight: bold;">!!</span> y' <span style="color: #339933; font-weight: bold;">!!</span> x'<span style="color: green;">&#41;</span> <span style="color: #339933; font-weight: bold;">$</span> <span style="font-weight: bold;">filter</span> valid neighbours'
    <span style="color: #06c; font-weight: bold;">where</span> height'       <span style="color: #339933; font-weight: bold;">=</span> <span style="font-weight: bold;">length</span> m
          width'        <span style="color: #339933; font-weight: bold;">=</span> <span style="font-weight: bold;">length</span> <span style="color: green;">&#40;</span><span style="font-weight: bold;">head</span> m<span style="color: green;">&#41;</span>
          valid <span style="color: green;">&#40;</span>x'<span style="color: #339933; font-weight: bold;">,</span>y'<span style="color: green;">&#41;</span> <span style="color: #339933; font-weight: bold;">=</span> x' &amp;gt;<span style="color: #339933; font-weight: bold;">=</span> <span style="color: red;">0</span> &amp;amp;&amp;amp; x' &amp;lt; width' &amp;amp;&amp;amp; y' &amp;gt;<span style="color: #339933; font-weight: bold;">=</span> <span style="color: red;">0</span> &amp;amp;&amp;amp; y' &amp;lt; height'
          neighbours'   <span style="color: #339933; font-weight: bold;">=</span> <span style="color: green;">&#91;</span><span style="color: green;">&#40;</span>x<span style="color: #339933; font-weight: bold;">-</span><span style="color: red;">1</span><span style="color: #339933; font-weight: bold;">,</span>y<span style="color: #339933; font-weight: bold;">-</span><span style="color: red;">1</span><span style="color: green;">&#41;</span><span style="color: #339933; font-weight: bold;">,</span><span style="color: green;">&#40;</span>x<span style="color: #339933; font-weight: bold;">,</span>y<span style="color: #339933; font-weight: bold;">-</span><span style="color: red;">1</span><span style="color: green;">&#41;</span><span style="color: #339933; font-weight: bold;">,</span><span style="color: green;">&#40;</span>x<span style="color: #339933; font-weight: bold;">+</span><span style="color: red;">1</span><span style="color: #339933; font-weight: bold;">,</span>y<span style="color: #339933; font-weight: bold;">-</span><span style="color: red;">1</span><span style="color: green;">&#41;</span><span style="color: #339933; font-weight: bold;">,</span> <span style="color: #5d478b; font-style: italic;">-- neighbours over</span>
                           <span style="color: green;">&#40;</span>x<span style="color: #339933; font-weight: bold;">-</span><span style="color: red;">1</span><span style="color: #339933; font-weight: bold;">,</span>y<span style="color: green;">&#41;</span><span style="color: #339933; font-weight: bold;">,</span><span style="color: green;">&#40;</span>x<span style="color: #339933; font-weight: bold;">+</span><span style="color: red;">1</span><span style="color: #339933; font-weight: bold;">,</span>y<span style="color: green;">&#41;</span><span style="color: #339933; font-weight: bold;">,</span>             <span style="color: #5d478b; font-style: italic;">-- neighbours left/right</span>
                           <span style="color: green;">&#40;</span>x<span style="color: #339933; font-weight: bold;">-</span><span style="color: red;">1</span><span style="color: #339933; font-weight: bold;">,</span>y<span style="color: #339933; font-weight: bold;">+</span><span style="color: red;">1</span><span style="color: green;">&#41;</span><span style="color: #339933; font-weight: bold;">,</span><span style="color: green;">&#40;</span>x<span style="color: #339933; font-weight: bold;">,</span>y<span style="color: #339933; font-weight: bold;">+</span><span style="color: red;">1</span><span style="color: green;">&#41;</span><span style="color: #339933; font-weight: bold;">,</span><span style="color: green;">&#40;</span>x<span style="color: #339933; font-weight: bold;">+</span><span style="color: red;">1</span><span style="color: #339933; font-weight: bold;">,</span>y<span style="color: #339933; font-weight: bold;">+</span><span style="color: red;">1</span><span style="color: green;">&#41;</span><span style="color: green;">&#93;</span> <span style="color: #5d478b; font-style: italic;">-- neighbours under</span>
&nbsp;
<span style="color: #5d478b; font-style: italic;">-- updates all cells according to the rules in liveOrDead</span>
update <span style="color: #339933; font-weight: bold;">::</span> IORef <span style="color: green;">&#91;</span><span style="color: green;">&#91;</span><span style="color: #cccc00; font-weight: bold;">Bool</span><span style="color: green;">&#93;</span><span style="color: green;">&#93;</span> <span style="color: #339933; font-weight: bold;">-</span>&amp;gt; <span style="color: #cccc00; font-weight: bold;">IO</span> <span style="color: green;">&#40;</span><span style="color: green;">&#41;</span>
update c <span style="color: #339933; font-weight: bold;">=</span> <span style="color: #06c; font-weight: bold;">do</span>
    cells &amp;lt;<span style="color: #339933; font-weight: bold;">-</span> readIORef c
&nbsp;
    <span style="color: #06c; font-weight: bold;">let</span> coords <span style="color: #339933; font-weight: bold;">=</span> <span style="color: green;">&#91;</span><span style="color: green;">&#40;</span>x<span style="color: #339933; font-weight: bold;">,</span>y<span style="color: green;">&#41;</span> <span style="color: #339933; font-weight: bold;">|</span> y &amp;lt;<span style="color: #339933; font-weight: bold;">-</span> <span style="color: green;">&#91;</span>0<span style="color: #339933; font-weight: bold;">..</span><span style="color: green;">&#40;</span>height<span style="color: #339933; font-weight: bold;">-</span><span style="color: red;">1</span><span style="color: green;">&#41;</span><span style="color: green;">&#93;</span><span style="color: #339933; font-weight: bold;">,</span> x &amp;lt;<span style="color: #339933; font-weight: bold;">-</span> <span style="color: green;">&#91;</span>0<span style="color: #339933; font-weight: bold;">..</span><span style="color: green;">&#40;</span>width<span style="color: #339933; font-weight: bold;">-</span><span style="color: red;">1</span><span style="color: green;">&#41;</span><span style="color: green;">&#93;</span><span style="color: green;">&#93;</span>
&nbsp;
    nextGen &amp;lt;<span style="color: #339933; font-weight: bold;">-</span> <span style="font-weight: bold;">mapM</span> <span style="color: green;">&#40;</span>\<span style="color: green;">&#40;</span>x<span style="color: #339933; font-weight: bold;">,</span>y<span style="color: green;">&#41;</span> <span style="color: #339933; font-weight: bold;">-</span>&amp;gt; <span style="color: #06c; font-weight: bold;">do</span>
            <span style="color: #06c; font-weight: bold;">let</span> cell <span style="color: #339933; font-weight: bold;">=</span> cells <span style="color: #339933; font-weight: bold;">!!</span> y <span style="color: #339933; font-weight: bold;">!!</span> x
            <span style="color: #06c; font-weight: bold;">let</span> ns   <span style="color: #339933; font-weight: bold;">=</span> neighbours cells <span style="color: green;">&#40;</span>x<span style="color: #339933; font-weight: bold;">,</span>y<span style="color: green;">&#41;</span>
            <span style="font-weight: bold;">return</span> <span style="color: #339933; font-weight: bold;">$</span> liveOrDead cell <span style="color: green;">&#40;</span><span style="color: green;">&#40;</span><span style="font-weight: bold;">length</span> <span style="color: #339933; font-weight: bold;">.</span> <span style="font-weight: bold;">filter</span> <span style="font-weight: bold;">id</span><span style="color: green;">&#41;</span> ns<span style="color: green;">&#41;</span>
        <span style="color: green;">&#41;</span> coords
&nbsp;
    writeIORef c <span style="color: green;">&#40;</span>nLists width nextGen<span style="color: green;">&#41;</span>
    display c
&nbsp;
<span style="color: #5d478b; font-style: italic;">-- survival rule: a live cell only lives on if it has 2 or 3 live neighbours</span>
<span style="color: #5d478b; font-style: italic;">-- birth rule: a dead cell becomes a live cell if it has 3 live neighbours</span>
liveOrDead <span style="color: #339933; font-weight: bold;">::</span> <span style="color: #cccc00; font-weight: bold;">Bool</span> <span style="color: #339933; font-weight: bold;">-</span>&amp;gt; <span style="color: #cccc00; font-weight: bold;">Int</span> <span style="color: #339933; font-weight: bold;">-</span>&amp;gt; <span style="color: #cccc00; font-weight: bold;">Bool</span>
liveOrDead True nLive <span style="color: #339933; font-weight: bold;">=</span> nLive `<span style="font-weight: bold;">elem</span>` <span style="color: green;">&#91;</span><span style="color: red;">2</span><span style="color: #339933; font-weight: bold;">,</span><span style="color: red;">3</span><span style="color: green;">&#93;</span>
liveOrDead False nLive <span style="color: #339933; font-weight: bold;">=</span> nLive <span style="color: #339933; font-weight: bold;">==</span> <span style="color: red;">3</span>
&nbsp;
<span style="color: #5d478b; font-style: italic;">-- utility function: split a list into sublists of length n</span>
nLists <span style="color: #339933; font-weight: bold;">::</span> <span style="color: #cccc00; font-weight: bold;">Int</span> <span style="color: #339933; font-weight: bold;">-</span>&amp;gt; <span style="color: green;">&#91;</span>a<span style="color: green;">&#93;</span> <span style="color: #339933; font-weight: bold;">-</span>&amp;gt; <span style="color: green;">&#91;</span><span style="color: green;">&#91;</span>a<span style="color: green;">&#93;</span><span style="color: green;">&#93;</span>
nLists <span style="color: #339933; font-weight: bold;">_</span> <span style="color: green;">&#91;</span><span style="color: green;">&#93;</span> <span style="color: #339933; font-weight: bold;">=</span> <span style="color: green;">&#91;</span><span style="color: green;">&#93;</span>
nLists n ls <span style="color: #339933; font-weight: bold;">=</span> <span style="font-weight: bold;">take</span> n ls : nLists n <span style="color: green;">&#40;</span><span style="font-weight: bold;">drop</span> n ls<span style="color: green;">&#41;</span>
&nbsp;
<span style="color: #5d478b; font-style: italic;">-- utility function: draws a square at (x,y) with size w×h</span>
drawQuad <span style="color: #339933; font-weight: bold;">::</span> GLdouble <span style="color: #339933; font-weight: bold;">-</span>&amp;gt; GLdouble <span style="color: #339933; font-weight: bold;">-</span>&amp;gt; GLdouble <span style="color: #339933; font-weight: bold;">-</span>&amp;gt; GLdouble <span style="color: #339933; font-weight: bold;">-</span>&amp;gt; <span style="color: #cccc00; font-weight: bold;">IO</span> <span style="color: green;">&#40;</span><span style="color: green;">&#41;</span>
drawQuad x y w h <span style="color: #339933; font-weight: bold;">=</span>
    renderPrimitive Quads <span style="color: #339933; font-weight: bold;">$</span> <span style="color: #06c; font-weight: bold;">do</span>
        vertex <span style="color: green;">&#40;</span>Vertex3  x     y    <span style="color: red;">0</span><span style="color: green;">&#41;</span>
        vertex <span style="color: green;">&#40;</span>Vertex3 <span style="color: green;">&#40;</span>x<span style="color: #339933; font-weight: bold;">+</span>w<span style="color: green;">&#41;</span>  y    <span style="color: red;">0</span><span style="color: green;">&#41;</span>
        vertex <span style="color: green;">&#40;</span>Vertex3 <span style="color: green;">&#40;</span>x<span style="color: #339933; font-weight: bold;">+</span>w<span style="color: green;">&#41;</span> <span style="color: green;">&#40;</span>y<span style="color: #339933; font-weight: bold;">-</span>h<span style="color: green;">&#41;</span> <span style="color: red;">0</span><span style="color: green;">&#41;</span>
        vertex <span style="color: green;">&#40;</span>Vertex3  x    <span style="color: green;">&#40;</span>y<span style="color: #339933; font-weight: bold;">-</span>h<span style="color: green;">&#41;</span> <span style="color: red;">0</span><span style="color: green;">&#41;</span>
&nbsp;
<span style="color: #5d478b; font-style: italic;">-- draw each cell as a coloured square</span>
display <span style="color: #339933; font-weight: bold;">::</span> IORef <span style="color: green;">&#91;</span><span style="color: green;">&#91;</span><span style="color: #cccc00; font-weight: bold;">Bool</span><span style="color: green;">&#93;</span><span style="color: green;">&#93;</span> <span style="color: #339933; font-weight: bold;">-</span>&amp;gt; <span style="color: #cccc00; font-weight: bold;">IO</span> <span style="color: green;">&#40;</span><span style="color: green;">&#41;</span>
display c <span style="color: #339933; font-weight: bold;">=</span> <span style="color: #06c; font-weight: bold;">do</span>
    cells &amp;lt;<span style="color: #339933; font-weight: bold;">-</span> readIORef c
&nbsp;
    <span style="color: #06c; font-weight: bold;">let</span> h <span style="color: #339933; font-weight: bold;">=</span> <span style="font-weight: bold;">fromIntegral</span> height
    <span style="color: #06c; font-weight: bold;">let</span> w <span style="color: #339933; font-weight: bold;">=</span> <span style="font-weight: bold;">fromIntegral</span> width
&nbsp;
    <span style="font-weight: bold;">mapM_</span> <span style="color: green;">&#40;</span>\<span style="color: green;">&#40;</span>n<span style="color: #339933; font-weight: bold;">,</span>b<span style="color: green;">&#41;</span> <span style="color: #339933; font-weight: bold;">-</span>&amp;gt; <span style="color: #06c; font-weight: bold;">do</span>
        <span style="color: #06c; font-weight: bold;">if</span> b
          <span style="color: #06c; font-weight: bold;">then</span> currentColor <span style="color: #339933; font-weight: bold;">$=</span> Color4 <span style="color: red;">1.0</span> <span style="color: red;">0.8</span> <span style="color: red;">0.6</span> <span style="color: red;">1.0</span>
          <span style="color: #06c; font-weight: bold;">else</span> currentColor <span style="color: #339933; font-weight: bold;">$=</span> Color4 <span style="color: red;">0.4</span> <span style="color: red;">0.5</span> <span style="color: red;">0.4</span> <span style="color: red;">1.0</span>
        <span style="color: #06c; font-weight: bold;">let</span> x <span style="color: #339933; font-weight: bold;">=</span> <span style="color: red;">1</span><span style="color: #339933; font-weight: bold;">/</span>w<span style="color: #339933; font-weight: bold;">*</span><span style="font-weight: bold;">fromIntegral</span> <span style="color: green;">&#40;</span>n `<span style="font-weight: bold;">mod</span>` width<span style="color: green;">&#41;</span>
        <span style="color: #06c; font-weight: bold;">let</span> y <span style="color: #339933; font-weight: bold;">=</span> <span style="color: red;">1</span><span style="color: #339933; font-weight: bold;">-</span><span style="color: green;">&#40;</span><span style="color: red;">1</span><span style="color: #339933; font-weight: bold;">/</span>h<span style="color: #339933; font-weight: bold;">*</span><span style="font-weight: bold;">fromIntegral</span> <span style="color: green;">&#40;</span>n `<span style="font-weight: bold;">div</span>` width<span style="color: green;">&#41;</span><span style="color: green;">&#41;</span>
        drawQuad x y <span style="color: green;">&#40;</span><span style="color: red;">1</span><span style="color: #339933; font-weight: bold;">/</span>w<span style="color: green;">&#41;</span> <span style="color: green;">&#40;</span><span style="color: red;">1</span><span style="color: #339933; font-weight: bold;">/</span>h<span style="color: green;">&#41;</span>
        <span style="color: green;">&#41;</span> <span style="color: green;">&#40;</span><span style="font-weight: bold;">zip</span> <span style="color: green;">&#91;</span>0<span style="color: #339933; font-weight: bold;">..</span><span style="color: green;">&#93;</span> <span style="color: #339933; font-weight: bold;">$</span> <span style="font-weight: bold;">concat</span> cells<span style="color: green;">&#41;</span>
&nbsp;
    swapBuffers
&nbsp;
main <span style="color: #339933; font-weight: bold;">::</span> <span style="color: #cccc00; font-weight: bold;">IO</span> <span style="color: green;">&#40;</span><span style="color: green;">&#41;</span>
main <span style="color: #339933; font-weight: bold;">=</span> <span style="color: #06c; font-weight: bold;">do</span>
    g &amp;lt;<span style="color: #339933; font-weight: bold;">-</span> newStdGen
    <span style="color: #339933; font-weight: bold;">_</span> &amp;lt;<span style="color: #339933; font-weight: bold;">-</span> getArgsAndInitialize
&nbsp;
    <span style="color: #5d478b; font-style: italic;">-- random starting values</span>
    cells &amp;lt;<span style="color: #339933; font-weight: bold;">-</span> newIORef <span style="color: green;">&#40;</span><span style="color: green;">&#40;</span>nLists width <span style="color: #339933; font-weight: bold;">.</span> <span style="font-weight: bold;">take</span> <span style="color: green;">&#40;</span>width<span style="color: #339933; font-weight: bold;">*</span>height<span style="color: green;">&#41;</span> <span style="color: #339933; font-weight: bold;">.</span> randoms<span style="color: green;">&#41;</span> g<span style="color: green;">&#41;</span>
&nbsp;
    <span style="color: #339933; font-weight: bold;">_</span> &amp;lt;<span style="color: #339933; font-weight: bold;">-</span> createWindow <span style="background-color: #3cb371;">&quot;Conway's Game of Life&quot;</span>
    initialDisplayMode    <span style="color: #339933; font-weight: bold;">$=</span> <span style="color: green;">&#91;</span>DoubleBuffered<span style="color: green;">&#93;</span>
    windowSize            <span style="color: #339933; font-weight: bold;">$=</span> Size <span style="color: red;">800</span> <span style="color: red;">600</span>
    displayCallback       <span style="color: #339933; font-weight: bold;">$=</span> display cells
    idleCallback          <span style="color: #339933; font-weight: bold;">$=</span> Just <span style="color: green;">&#40;</span>update cells<span style="color: green;">&#41;</span>
    gluOrtho2D <span style="color: red;">0</span> <span style="color: red;">1</span> <span style="color: red;">0</span> <span style="color: red;">1</span>    <span style="color: #5d478b; font-style: italic;">-- orthogonal projection</span>
    mainLoop              <span style="color: #5d478b; font-style: italic;">-- start main loop</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://hamberg.no/erlend/2010/03/20/game-of-life/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Code Reading as a Team Activity</title>
		<link>http://hamberg.no/erlend/2010/03/20/code-reading-as-a-team-activity/</link>
		<comments>http://hamberg.no/erlend/2010/03/20/code-reading-as-a-team-activity/#comments</comments>
		<pubDate>Sat, 20 Mar 2010 18:55:23 +0000</pubDate>
		<dc:creator>Erlend</dc:creator>
				<category><![CDATA[coding]]></category>
		<category><![CDATA[english]]></category>

		<guid isPermaLink="false">http://hamberg.no/erlend/?p=1015</guid>
		<description><![CDATA[I am currently reading &#8220;Coders at Work&#8221; by Peter Seibel, a really interesting read for a code monkey like me. The book is full of good tips and experiences from actual coders who learnt by doing. Peter Seibel&#8217;s questions are really good – no doubt because he himself is a programmer – and all his]]></description>
			<content:encoded><![CDATA[<p>I am currently reading &#8220;<a title="Coder's at Work Homepage" href="http://www.codersatwork.com/">Coders at Work</a>&#8221; by Peter Seibel, a really interesting read for a code monkey like me. The book is full of good tips and experiences from actual coders who learnt by doing. Peter Seibel&#8217;s questions are really good – no doubt because he himself is a programmer – and all his interview subject have different and interesting stories to tell.</p>
<p><a href="http://hamberg.no/erlend/wp-content/uploads/2009/11/monkey_tutor.png"><img class="aligncenter size-medium wp-image-1045" title="monkey_tutor" src="http://hamberg.no/erlend/wp-content/uploads/2009/11/monkey_tutor-300x197.png" alt="monkey_tutor" width="300" height="197" /></a></p>
<p><span id="more-1015"></span></p>
<p>One of the things I found really interesting was how <a title="Wikipedia: Douglas Crockford" href="http://en.wikipedia.org/wiki/Douglas_Crockford">Douglas Crockford</a> recommended <strong>code reading</strong> as a way to avoid having confused programmers in a project that aren&#8217;t aware of their own situation before it&#8217;s too late. According to Crockford it also helps by making sure that the really good programmers mentor other people on their team. The procedure is very simple:</p>
<blockquote><p><strong>Seibel:</strong> Can you talk a bit about how you conduct a code reading?</p>
<p><strong>Crockford:</strong> At each meeting, someone&#8217;s responsible for reading their code, and they&#8217;ll walk us through everything, and the rest of us will observe. It&#8217;s a really good chance for the rest of the team to understand how their stuff is going to have to fit with that stuff.</p>
<p>We get everybody around the table; everybody gets a stack of paper. We also blow it up on the screen. And we all read through it together. And we&#8217;re all commenting on the code as we go along. People say, &#8220;I don&#8217;t understand this comment&#8221;, or, &#8220;This comment doesn&#8217;t seem to describe the code.&#8221; That kind of stuff can be so valuable because as a programmer you stop reading your own comments and you&#8217;re not aware that you&#8217;re misdirecting the reader. Having the people you work with helping to keep you code clean is a huge service—you find defects that you never would have found on your own.</p>
<p>I think an hour of code reading is worth two weeks of QA. It&#8217;s just a really effective way of removing errors. If you have someone who is strong reading, then the novices around them are going to learn a lot that they wouldn&#8217;t be learning otherwise, and if you have a novice reading, he&#8217;s going to get a lot of really good advice.</p>
<p>[...]</p>
<p>For one thing it makes it easier to track the project, because we can actually see what progress people are making. And we can see much sooner if they&#8217;re going off the rails or not.</p></blockquote>
<p>I simply loved this idea and would love to test it in practice. I know that I personally would find it highly motivating, both with respect to the quality of my own code and for the project as a whole by so explicitly seeing what the others are doing.</p>
<p>This is probably not going to work for all projects and teams, but for a relatively small team (working at the same location) aiming to produce code of a high quality I really believe this approach can work.</p>
<p>If anyone has experience with this, or similar approaches, I would love to hear your thoughts.</p>
]]></content:encoded>
			<wfw:commentRss>http://hamberg.no/erlend/2010/03/20/code-reading-as-a-team-activity/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Wish: Options for Kate&#8217;s Indenting Scripts</title>
		<link>http://hamberg.no/erlend/2009/11/02/wish-options-for-kates-indenting-scripts/</link>
		<comments>http://hamberg.no/erlend/2009/11/02/wish-options-for-kates-indenting-scripts/#comments</comments>
		<pubDate>Mon, 02 Nov 2009 12:31:15 +0000</pubDate>
		<dc:creator>Erlend</dc:creator>
				<category><![CDATA[english]]></category>
		<category><![CDATA[kate]]></category>
		<category><![CDATA[kde]]></category>

		<guid isPermaLink="false">http://hamberg.no/erlend/?p=1005</guid>
		<description><![CDATA[At the start of Kate&#8217;s indenting script for C/C++, the following options are available: // BEGIN USER CONFIGURATION var cfgIndentCase = true; // indent &#8216;case&#8217; and &#8216;default&#8217; in a switch? var cfgIndentNamespace = true; // indent after &#8216;namespace&#8217;? var cfgAutoInsertStar = false; // auto insert &#8216;*&#8217; in C-comments var cfgSnapSlash = false; // snap &#8216;/&#8217;]]></description>
			<content:encoded><![CDATA[<p>At the start of <a href="http://websvn.kde.org/trunk/KDE/kdelibs/kate/script/data/cstyle.js?view=markup">Kate&#8217;s indenting script for C/C++</a>, the following options are available:</p>
<blockquote><p><span style="color: #333399;">// BEGIN USER CONFIGURATION<br />
var cfgIndentCase = true;         // indent &#8216;case&#8217; and &#8216;default&#8217; in a switch?<br />
var cfgIndentNamespace = true;    // indent after &#8216;namespace&#8217;?<br />
var cfgAutoInsertStar = false;    // auto insert &#8216;*&#8217; in C-comments<br />
var cfgSnapSlash = false;         // snap &#8216;/&#8217; to &#8216;*/&#8217; in C-comments<br />
var cfgAutoInsertSlashes = false; // auto insert &#8216;//&#8217; after C++-comments<br />
// END USER CONFIGURATION</span></p></blockquote>
<p>To set these options one would first have to actually find the indenting scripts under /usr/share, then copy it to one&#8217;s home directory to be able to modify it, and then modify the javascript source. This could – of course – be done in a much better way. In an ideal world options like these should be available in Kate&#8217;s settings as check boxes. It should also be possible to have non-boolean options, like choosing a value from a list of possible values for a setting.</p>
<p>I would love to see something like the following:</p>
<blockquote><p><span style="color: #333399;">registerSetting(&#8220;Indent &#8216;case&#8217; and &#8216;default&#8217; in switch statements&#8221;, &#8220;cfgIndentCase&#8221;,  &#8220;boolean&#8221;);</span></p></blockquote>
<p>produce</p>
<blockquote><p><strong>☑ Indent &#8216;case&#8217; and &#8216;default&#8217; in switch statements</strong></p></blockquote>
<p>in Kate&#8217;s settings.</p>
<p>I don&#8217;t have the time myself, but I don&#8217;t think it would be very hard, and I&#8217;m sure that many people would be a bit happier. Me and the other Kate developers would glady be of assistance. ☺</p>
]]></content:encoded>
			<wfw:commentRss>http://hamberg.no/erlend/2009/11/02/wish-options-for-kates-indenting-scripts/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Kate&#8217;s Vi Input Mode — What will KDE 4.4 bring?</title>
		<link>http://hamberg.no/erlend/2009/10/26/kates-vi-input-mode-kde44/</link>
		<comments>http://hamberg.no/erlend/2009/10/26/kates-vi-input-mode-kde44/#comments</comments>
		<pubDate>Mon, 26 Oct 2009 19:12:43 +0000</pubDate>
		<dc:creator>Erlend</dc:creator>
				<category><![CDATA[english]]></category>
		<category><![CDATA[kate]]></category>
		<category><![CDATA[kde]]></category>

		<guid isPermaLink="false">http://hamberg.no/erlend/?p=905</guid>
		<description><![CDATA[Please see http://kate-editor.org/kate-vi-mode/ for an updated overview of the Kate VI mode project. Dear &#8220;Katevim&#8221; users.  Kate&#8217;s Vi Mode is steadily improving and I want to take a moment to tell what&#8217;s on the horizon for KDE 4.4. There has been quite a few bugs fixed since 4.3, but some major new features have also]]></description>
			<content:encoded><![CDATA[<div style="border: 1px solid black; margin: 0pt auto -1px; padding: 1em; background-color: #eeeeee; width: 50%; text-align: center;">Please see <a href="http://kate-editor.org/kate-vi-mode/">http://kate-editor.org/kate-vi-mode/</a> for an updated overview of the Kate VI mode project.</div>
<p>Dear &#8220;Katevim&#8221; users.  Kate&#8217;s Vi Mode is steadily improving and I want to take a moment to tell what&#8217;s on the horizon for KDE 4.4. There has been quite a few bugs fixed since 4.3, but some major new features have also been introduced:</p>
<p><span id="more-905"></span></p>
<h3>The Comma Text Object</h3>
<p>This is something that I have been missing in Vim. The comma text object makes it easy to modify parameter lists in C-like languages and other comma separated lists. It is basically the area between two commas or between a comma and a bracket. In the line below, the three ranges this text object would cover is highlighted in red.</p>
<p style="text-align: center;">
<div id="attachment_992" class="wp-caption aligncenter" style="width: 393px"> <a href="http://hamberg.no/erlend/wp-content/uploads/2009/10/comma_to.png"><img class="size-full wp-image-992" title="comma_to" src="http://hamberg.no/erlend/wp-content/uploads/2009/10/comma_to.png" alt="Comma Text Object" width="383" height="87" /></a><p class="wp-caption-text">Comma text object ranges. If the cursor is over, say, &quot;arg2&quot;, pressing c  i  ,  (&quot;change inner comma&quot;) would delete &quot;double arg2&quot; and place the cursor between the two commas in insert mode. A very convenient way to change a function&#39;s parameter</p></div>
<p>This has actually been in Kate&#8217;s Vi Mode for a while now, but since it has not been announced until now, I guess I am the only one using it. <img src='http://hamberg.no/erlend/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<h3>Limited Normal Mode Mapping Support</h3>
<p>It is now possible to add mappings in normal mode (<strong>:nnoremap</strong> in Vim). There are still some flaws, such as the fact that one cannot map a keypress to &#8220;<strong>:somecommand&lt;enter&gt;</strong>&#8220;, but hopefully people who are using dvorak/colemake can make use of the vi mode now.</p>
<div id="attachment_993" class="wp-caption aligncenter" style="width: 310px"><a href="http://hamberg.no/erlend/wp-content/uploads/2009/10/mapping.png"><img class="size-medium wp-image-993" title="mapping" src="http://hamberg.no/erlend/wp-content/uploads/2009/10/mapping-300x280.png" alt="It is now possible to map keypresses in normal mode" width="300" height="280" /></a><p class="wp-caption-text">It is now possible to map keypresses in normal mode</p></div>
<h3>Command Line Mode Commands</h3>
<p>Yes, really! Kate&#8217;s Vi Mode finally support some of the most command commandline mode commands from Vim. What can be done from the Kate editor part is limited by the fact that it can&#8217;t control its hosting application, but Kate – the application – has now gotten support for the following commands:</p>
<ul>
<li> <strong>q, qa<br />
</strong></li>
<li><strong> w, wq, wa, wqa<br />
</strong></li>
<li><strong>x, xa<br />
</strong></li>
<li><strong>bn, bp<br />
</strong></li>
<li><strong>new, vnew<br />
</strong></li>
<li><strong>edit</strong></li>
</ul>
<div id="attachment_994" class="wp-caption aligncenter" style="width: 310px"> <a href="http://hamberg.no/erlend/wp-content/uploads/2009/10/wqa_help.png"><img class="size-medium wp-image-994" title="wqa_help" src="http://hamberg.no/erlend/wp-content/uploads/2009/10/wqa_help-300x210.png" alt="Kate showing help text for the wq[a] command" width="300" height="210" /></a><p class="wp-caption-text">Kate showing help text for a command line mode command</p></div>
]]></content:encoded>
			<wfw:commentRss>http://hamberg.no/erlend/2009/10/26/kates-vi-input-mode-kde44/feed/</wfw:commentRss>
		<slash:comments>24</slash:comments>
		</item>
		<item>
		<title>How Kate got X-rated</title>
		<link>http://hamberg.no/erlend/2009/07/08/how-kate-got-x-rated/</link>
		<comments>http://hamberg.no/erlend/2009/07/08/how-kate-got-x-rated/#comments</comments>
		<pubDate>Wed, 08 Jul 2009 10:37:12 +0000</pubDate>
		<dc:creator>Erlend</dc:creator>
				<category><![CDATA[english]]></category>
		<category><![CDATA[kate]]></category>
		<category><![CDATA[kde]]></category>

		<guid isPermaLink="false">http://hamberg.no/erlend/?p=983</guid>
		<description><![CDATA[(Ok, not really.) Kate&#8217;s maintainer, Christoph Cullmann, shared a funny story over a beer one of the first days here at GCDS. In ye olden days, what is now Kate and Kwrite was one application called &#8220;KWrite – KDE&#8217;s Advanced Text Editor&#8221;. However, the author of Kwrite mysteriously disappeared. Christoph forked Kwrite and continued working]]></description>
			<content:encoded><![CDATA[<p><img class="aligncenter" title="Explicit content" src="http://upload.wikimedia.org/wikipedia/en/thumb/3/33/Parental_Advisory_label.svg/200px-Parental_Advisory_label.svg.png" alt="" width="200" height="127" /></p>
<p style="text-align: center;">(Ok, not really.)</p>
<p style="text-align: center;">
<p>Kate&#8217;s maintainer, Christoph Cullmann, shared a funny story over a beer one of the first days here at GCDS.</p>
<p>In ye olden days, what is now Kate and Kwrite was one application called &#8220;KWrite – KDE&#8217;s Advanced Text Editor&#8221;. However, the author of Kwrite mysteriously disappeared. Christoph forked Kwrite and continued working on it and after some time it greatly surpassed Kwrite&#8217;s capabilities and was becoming more of a power tool. A name change was long overdue.<br />
Being a good German, Christoph decided to name it after the philosopher Immanuel Kant, so in KDE 2.1 the editor &#8220;Kant&#8221; was born.<br />
For some strange reason, probably easier to understand for native English speakers, it was renamed to &#8220;Kate&#8221; in KDE 2.2. And thus what still is KDE&#8217;s Advanced Text Editor was born.</p>
]]></content:encoded>
			<wfw:commentRss>http://hamberg.no/erlend/2009/07/08/how-kate-got-x-rated/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Google Calendar Plasmoid, Take Two</title>
		<link>http://hamberg.no/erlend/2009/05/07/google-calendar-plasmoid-take-two/</link>
		<comments>http://hamberg.no/erlend/2009/05/07/google-calendar-plasmoid-take-two/#comments</comments>
		<pubDate>Thu, 07 May 2009 18:57:48 +0000</pubDate>
		<dc:creator>Erlend</dc:creator>
				<category><![CDATA[english]]></category>
		<category><![CDATA[kde]]></category>

		<guid isPermaLink="false">http://hamberg.no/erlend/?p=945</guid>
		<description><![CDATA[After the positive feedback on my quick 27 line python hack, I decided to make a slightly improved version. This fixes the two major problems with the old one: you can now use your Google Apps for your Domain email and you can use kwallet to remember your login. It&#8217;s not a simple, 27 line]]></description>
			<content:encoded><![CDATA[<p>After the positive feedback on my <a href="http://hamberg.no/erlend/2009/05/05/google-calendar-plasmoid/">quick 27 line python hack</a>, I decided to make a slightly improved version. This fixes the two major problems with the old one: you can now use your Google Apps for your Domain email and you can use kwallet to remember your login.</p>
<p><a href="http://hamberg.no/erlend/wp-content/uploads/2009/05/gcal2.png"><img class="aligncenter size-full wp-image-946" title="gcal2" src="http://hamberg.no/erlend/wp-content/uploads/2009/05/gcal2.png" alt="gcal2" width="296" height="346" /></a></p>
<p><a href="http://hamberg.no/erlend/wp-content/uploads/2009/05/gcal_settings.png"><img class="aligncenter size-full wp-image-948" title="gcal_settings" src="http://hamberg.no/erlend/wp-content/uploads/2009/05/gcal_settings.png" alt="gcal_settings" width="428" height="369" /></a></p>
<p>It&#8217;s not a simple, 27 line python script any more, but now it&#8217;s much more usable. (unless there are some stupid bugs I have overlooked. <img src='http://hamberg.no/erlend/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> )</p>
<p>As suggested I uploaded it to KDE Look: <a href="http://www.kde-look.org/content/show.php?content=104182">http://www.kde-look.org/content/show.php?content=104182</a>, so you can install it from the &#8220;Add widgets&#8230;&#8221; dialogue or download it and install it with <b>plasmapkg -i gcal-1.1.plasmoid</b>.</p>
<p><span id="more-945"></span></p>
<p>The login is just a quick hack, btw. This pretty much sums it up:</p>

<div class="wp_syntax"><div class="code"><pre class="python" style="font-family:monospace;">src = src.<span style="color: black;">replace</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;id=&quot;</span>Email<span style="color: #483d8b;">&quot;&quot;</span>,
    <span style="color: #483d8b;">&quot;id=&quot;</span>Email<span style="color: #483d8b;">&quot; value=&quot;</span><span style="color: #483d8b;">&quot;+self.settings['username']+&quot;</span><span style="color: #483d8b;">&quot;&quot;</span><span style="color: black;">&#41;</span>
src = src.<span style="color: black;">replace</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;id=&quot;</span>Passwd<span style="color: #483d8b;">&quot;&quot;</span>,
    <span style="color: #483d8b;">&quot;id=&quot;</span>Passwd<span style="color: #483d8b;">&quot; value=&quot;</span><span style="color: #483d8b;">&quot;+self.settings['password']+&quot;</span><span style="color: #483d8b;">&quot;&quot;</span><span style="color: black;">&#41;</span>
src = src.<span style="color: black;">replace</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;id=&quot;</span>gaia_loginform<span style="color: #483d8b;">&quot;&quot;</span>,
    <span style="color: #483d8b;">&quot;id=&quot;</span>gaia_loginform<span style="color: #483d8b;">&quot; name=&quot;</span>gaia_loginform<span style="color: #483d8b;">&quot;&quot;</span><span style="color: black;">&#41;</span>
src = src.<span style="color: black;">replace</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;&quot;</span>,
src = src.<span style="color: black;">replace</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">&quot;&lt;/body&gt;&quot;</span>,
    <span style="color: #483d8b;">&quot;&lt;script&gt;document.gaia_loginform.submit()&lt;/script&gt;&lt;/body&gt;&quot;</span><span style="color: black;">&#41;</span></pre></div></div>

<p>I also tried the ninja trick from <a href="http://ariya.blogspot.com/2009/04/transparent-qwebview-and-qwebpage.html">Ariya&#8217;s blog</a> to get a transparent webview, but Google&#8217;s 1995 gif logo pretty much destroyed the appearance, so I dropped that. <img src='http://hamberg.no/erlend/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><a href="http://hamberg.no/erlend/wp-content/uploads/2009/05/gcal2_transparent.png"><img class="aligncenter size-full wp-image-947" title="gcal2_transparent" src="http://hamberg.no/erlend/wp-content/uploads/2009/05/gcal2_transparent.png" alt="gcal2_transparent" width="290" height="343" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://hamberg.no/erlend/2009/05/07/google-calendar-plasmoid-take-two/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Google Calendar Plasmoid</title>
		<link>http://hamberg.no/erlend/2009/05/05/google-calendar-plasmoid/</link>
		<comments>http://hamberg.no/erlend/2009/05/05/google-calendar-plasmoid/#comments</comments>
		<pubDate>Tue, 05 May 2009 20:24:14 +0000</pubDate>
		<dc:creator>Erlend</dc:creator>
				<category><![CDATA[english]]></category>
		<category><![CDATA[kde]]></category>

		<guid isPermaLink="false">http://hamberg.no/erlend/?p=937</guid>
		<description><![CDATA[Update: A new, better version can be found here: http://hamberg.no/erlend/2009/05/07/google-calendar-plasmoid-take-two/ In case anyone is interested: I made a simple Plasmoid for viewing coming events from Google Calendar. It&#8217;s simply a webview showing the iPhone version of Google Calendar. It&#8217;s written in Python and took 10 minutes to write (27 lines of code) by following the]]></description>
			<content:encoded><![CDATA[<p><strong>Update:</strong> A new, better version can be found here:<a href="http://hamberg.no/erlend/2009/05/07/google-calendar-plasmoid-take-two/"></a></p>
<p><a href="http://hamberg.no/erlend/2009/05/07/google-calendar-plasmoid-take-two/">http://hamberg.no/erlend/2009/05/07/google-calendar-plasmoid-take-two/</a></p>
<p>In case anyone is interested:</p>
<p>I made a simple Plasmoid for viewing coming events from Google Calendar. It&#8217;s simply a webview showing the iPhone version of Google Calendar.  It&#8217;s written in Python and took 10 minutes to write (27 lines of code) by following <a href="http://techbase.kde.org/Development/Tutorials/Plasma/Python/GettingStarted">the excellent tutorial on techbase</a>.</p>
<p><a href="http://hamberg.no/erlend/wp-content/uploads/2009/05/gcal.png"><img class="aligncenter size-full wp-image-938" title="gcal" src="http://hamberg.no/erlend/wp-content/uploads/2009/05/gcal.png" alt="gcal" width="305" height="345" /></a></p>
<p>You can download it here: <a href="http://hamberg.no/erlend/files/gcal.zip">http://hamberg.no/erlend/files/gcal.zip</a>. If you improve it or make another Google Calendar plasmoid: let me know! <img src='http://hamberg.no/erlend/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Oh, btw. To install it run<strong> plasmapkg -i gcal.zip</strong>.</p>
<p>P.S: openSuse users: I had to install <strong>python-dev</strong> to actually run a python plasmoid. Don&#8217;t know why.</p>
]]></content:encoded>
			<wfw:commentRss>http://hamberg.no/erlend/2009/05/05/google-calendar-plasmoid/feed/</wfw:commentRss>
		<slash:comments>17</slash:comments>
		</item>
		<item>
		<title>Lost and found</title>
		<link>http://hamberg.no/erlend/2009/01/25/lost-and-found/</link>
		<comments>http://hamberg.no/erlend/2009/01/25/lost-and-found/#comments</comments>
		<pubDate>Sun, 25 Jan 2009 15:12:56 +0000</pubDate>
		<dc:creator>Erlend</dc:creator>
				<category><![CDATA[english]]></category>
		<category><![CDATA[reise]]></category>

		<guid isPermaLink="false">http://hamberg.no/erlend/?p=875</guid>
		<description><![CDATA[Found in Cambodia in 2007, rediscovered today Tourists in front of Angkor Wat.]]></description>
			<content:encoded><![CDATA[<p>Found in Cambodia in 2007, rediscovered today <img src='http://hamberg.no/erlend/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>Tourists in front of Angkor Wat.</p>
<p><a href="http://hamberg.no/erlend/wp-content/uploads/2009/01/film.png"><img class="aligncenter size-medium wp-image-874" title="film" src="http://hamberg.no/erlend/wp-content/uploads/2009/01/film-300x99.png" alt="film" width="300" height="99" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://hamberg.no/erlend/2009/01/25/lost-and-found/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Wikibooks, now also for us who like physical books</title>
		<link>http://hamberg.no/erlend/2008/12/01/wikibooks-now-also-for-us-who-like-physical-books/</link>
		<comments>http://hamberg.no/erlend/2008/12/01/wikibooks-now-also-for-us-who-like-physical-books/#comments</comments>
		<pubDate>Mon, 01 Dec 2008 19:41:04 +0000</pubDate>
		<dc:creator>Erlend</dc:creator>
				<category><![CDATA[bøker]]></category>
		<category><![CDATA[english]]></category>
		<category><![CDATA[kde]]></category>

		<guid isPermaLink="false">http://hamberg.no/erlend/?p=822</guid>
		<description><![CDATA[In &#8220;just&#8221; 19 days I&#8217;ll have completed my last exam for this semester and I can travel home for a nice, quiet Christmas with my family. As usual, I&#8217;ll travel by train, which takes 16-17 hours each way. Partly because it&#8217;s cheap (25 EUR), but most of all because it&#8217;s very comfortable and is a]]></description>
			<content:encoded><![CDATA[<p>In &#8220;just&#8221; 19 days I&#8217;ll have completed my last exam for this semester and I can travel home for a nice, quiet Christmas with my family. As usual, I&#8217;ll travel by train, which takes 16-17 hours each way. Partly because it&#8217;s cheap (25 EUR), but most of all because it&#8217;s very comfortable and is a nice way to &#8220;stress down&#8221; after an intense exam period. As usual I&#8217;ll pack plenty of books and an iPhone with all the podcast episodes I have postponed listening to.</p>
<p>Among the new books I&#8217;ll bring there will also be at least one wikibook. Yes, a real, physical wikibook. <img src='http://hamberg.no/erlend/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
You see, I have been using the <a href="http://en.wikibooks.org/wiki/X86_Disassembly">x86 disassembly</a> wikibook quite often, and recently I read that there were a &#8220;a collection for print-on-demand publishing from PediaPress&#8221; available for the book. Being curious, I had to click the link to see what that actually meant&#8230;</p>
<p>It turns out that <a href="http://www.pediapress.com/">PediaPress</a> will print a copy of a wikibook for a very fair price. It can even be your own compilation of parts of books (and Wikipedia support is coming, according to their webpage). Printing and shipping of the book (200 pages) to Norway was a little over 10 EUR.</p>
<p>I&#8217;m now sitting with three printed wikibooks in front of me, and the quality of the printed book are very good. Needless to say, I&#8217;m very happy. They even donate a portion of the proceeds to the Wikimedia Foundation (though, they don&#8217;t say how much).</p>
<div id="attachment_824" class="wp-caption aligncenter" style="width: 310px"><a href="http://hamberg.no/erlend/wp-content/uploads/2008/12/dsc_0111.jpg"><img class="size-medium wp-image-824" title="dsc_0111" src="http://hamberg.no/erlend/wp-content/uploads/2008/12/dsc_0111-300x200.jpg" alt="Shiny new books" width="300" height="200" /></a><p class="wp-caption-text">Shiny new books</p></div>
<div id="attachment_821" class="wp-caption aligncenter" style="width: 310px"><a href="http://hamberg.no/erlend/wp-content/uploads/2008/11/dsc_0108.jpg"><img class="size-medium wp-image-821" title="dsc_0108" src="http://hamberg.no/erlend/wp-content/uploads/2008/11/dsc_0108-300x200.jpg" alt="Okteta" width="300" height="200" /></a><p class="wp-caption-text">Okteta is of course mentioned <img src='http://hamberg.no/erlend/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p></div>
]]></content:encoded>
			<wfw:commentRss>http://hamberg.no/erlend/2008/12/01/wikibooks-now-also-for-us-who-like-physical-books/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
