<?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>Ebbe's D-universe</title>
	<atom:link href="http://d.hvemder.dk/feed/" rel="self" type="application/rss+xml" />
	<link>http://d.hvemder.dk</link>
	<description>Looking at the d programming language</description>
	<lastBuildDate>Mon, 15 Aug 2011 07:47:08 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Busy &#8211; not dead</title>
		<link>http://d.hvemder.dk/2007/06/20/busy-not-dead/</link>
		<comments>http://d.hvemder.dk/2007/06/20/busy-not-dead/#comments</comments>
		<pubDate>Wed, 20 Jun 2007 21:31:52 +0000</pubDate>
		<dc:creator>Ebbe</dc:creator>
				<category><![CDATA[Off topic]]></category>

		<guid isPermaLink="false">http://d.hvemder.dk/2007/06/20/busy-not-dead/</guid>
		<description><![CDATA[I&#8217;m very busy at the university and with a few &#8220;non-d&#8221; programming projects, but in a few days I&#8217;ll have summer vacation and things should speed up again. And my oh my.. how much spam can you get?! I&#8217;m getting about 3-4 spam comments on this site every day. Better install a robot preventing plugin [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m very busy at the university and with a few &#8220;non-d&#8221; programming projects, but in a few days I&#8217;ll have summer vacation and things should speed up again.</p>
<p>And my oh my.. how much spam can you get?! I&#8217;m getting about 3-4 spam comments on this site every day. Better install a robot preventing plugin soon :/</p>
<p>The next things for this blog will probably be some data structures, explaining some advanced d-features and Enimal ( Evolution of animals and plants)</p>
<p>See you soon.</p>
]]></content:encoded>
			<wfw:commentRss>http://d.hvemder.dk/2007/06/20/busy-not-dead/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>IDE</title>
		<link>http://d.hvemder.dk/2007/03/07/ide/</link>
		<comments>http://d.hvemder.dk/2007/03/07/ide/#comments</comments>
		<pubDate>Wed, 07 Mar 2007 20:11:37 +0000</pubDate>
		<dc:creator>Ebbe</dc:creator>
				<category><![CDATA[D programming]]></category>
		<category><![CDATA[General blabbering]]></category>

		<guid isPermaLink="false">http://d.hvemder.dk/2007/03/07/ide/</guid>
		<description><![CDATA[Today I got a message on dsource.org about which IDE I&#8217;m using. Thought I should share this with you. Right now I&#8217;m using Code::Blocks. I&#8217;m using the nightly Ubuntu builds, as they work quite well. It&#8217;s also fun to follow the rapid development; One time I reported a small bug, and within a week I [...]]]></description>
			<content:encoded><![CDATA[<p>Today I got a message on <a href="http://dsource.org">dsource.org</a> about which IDE I&#8217;m using. Thought I should share this with you.</p>
<p>Right now I&#8217;m using <a href="http://codeblocks.org/">Code::Blocks</a>. I&#8217;m using the nightly Ubuntu builds, as they work quite well. It&#8217;s also fun to follow the rapid development; One time I reported a small bug, and within a week I could download a nightly without the bug. Nice <img src='http://d.hvemder.dk/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Some of the things I like about Code::Blocks is</p>
<ul>
<li>Auto-completion (can&#8217;t live without this!)</li>
<li>Syntax highlighting (would also die without this)</li>
<li>The ability to build for different targets. E.x. you can have a test environment with different flags for the compiler and program, and then the a &#8220;release&#8221; build with an optimize flag and maybe some different things.</li>
<li>Nice debugging</li>
<li>The ability to set up abbreviations. E.x. you can write &#8220;<code>class</code>&#8220;, press Ctrl-j and it gets replaced with
<ol class="codelist">
<li value="1" class="tab0 odd"><code><span class="keyword">class</span> $<span class="brackets">(</span>Class name<span class="brackets">)</span> <span class="brackets">{</span></code></li>
<li value="2" class="tab1 even"><code><span class="keyword">public</span>:</code></li>
<li value="3" class="tab2 odd"><code><span class="keyword">this</span><span class="brackets">(</span><span class="brackets">)</span> <span class="brackets">{</span></code></li>
<li value="4" class="tab3 even"><code>|</code></li>
<li value="5" class="tab2 odd"><code><span class="brackets">}</span></code></li>
<li value="6" class="tab2 even"><code>~<span class="keyword">this</span><span class="brackets">(</span><span class="brackets">)</span> <span class="brackets">{</span><span class="brackets">}</span></code></li>
<li value="7" class="tab1 odd"><code><span class="keyword">private</span>:</code></li>
<li value="8" class="tab0 even"><code><span class="brackets">}</span>;</code></li>
</ol>
<p>               Here a pop-up box will ask the name for the class.
</li>
</ul>
<p>Can&#8217;t quite remember more, but I&#8217;m sure there are. You are welcome to come with your suggestions.</p>
<p>PS. Always remember vim! It can be tweaked to be really powerful, and can be used through a ssh connection <img src='http://d.hvemder.dk/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  Power to the vi! But.. it can&#8217;t replace a good IDE in my opinion.</p>
]]></content:encoded>
			<wfw:commentRss>http://d.hvemder.dk/2007/03/07/ide/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>A heap&#8217;s world</title>
		<link>http://d.hvemder.dk/2007/03/03/a-heaps-world/</link>
		<comments>http://d.hvemder.dk/2007/03/03/a-heaps-world/#comments</comments>
		<pubDate>Sat, 03 Mar 2007 22:19:31 +0000</pubDate>
		<dc:creator>Ebbe</dc:creator>
				<category><![CDATA[D programming]]></category>
		<category><![CDATA[Various algorithms]]></category>

		<guid isPermaLink="false">http://d.hvemder.dk/2007/03/03/a-heaps-world/</guid>
		<description><![CDATA[This is my first &#8220;code&#8221; post. I&#8217;ve implemented a very basic binary minimum heap in D. A heap is a way to structure your data in a very nice way. It&#8217;s running time is quite acceptable, as any operation runs in O(lg n). A reason to have a min-heap, could be if you wanted to [...]]]></description>
			<content:encoded><![CDATA[<p>This is my first &#8220;code&#8221; post. I&#8217;ve implemented a very basic binary minimum <a href="http://en.wikipedia.org/wiki/Heap_%28data_structure%29">heap</a> in D. A heap is a way to structure your data in a very nice way. It&#8217;s running time is quite acceptable, as any operation runs in O(lg n).</p>
<p>A reason to have a min-heap, could be if you wanted to implement the <a href="http://en.wikipedia.org/wiki/A%2A">A* path-finding-algorithm</a>. There are of course many more reasons <img src='http://d.hvemder.dk/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>What it does, is keeping track of values along with a key. It sorts the different values according to the key. You can then extract the value that currently has the smallest key.</p>
<p>Here&#8217;s the most important lines:</p>
<ol class="codelist">
<li value="3" class="tab0 odd"><code><span class='comment'>/**</span></code></li>
<li value="4" class="tab2 even"><code><span class='comment'>Heap made by Esben Damgaard</span></code></li>
<li value="5" class="tab2 odd"><code><span class='comment'>Posted on the blog d.hvemder.dk</span></code></li>
<li value="6" class="even">&nbsp;</li>
<li value="7" class="tab2 odd"><code><span class='comment'>&quot;THE BEER-WARE LICENSE&quot; (Revision 42):</span></code></li>
<li value="8" class="tab3 even"><code><span class='comment'>&lt;ebbe _at_ skummer.com&gt; wrote this file. As long as you retain this notice you can do whatever you want with this stuff. If we meet some day, and you think this stuff is worth it, you can buy me a beer in return. Esben Damgaard</span></code></li>
<li value="9" class="odd">&nbsp;</li>
<li value="10" class="tab0 even"><code><span class='comment'>**/</span></code></li>
<li value="11" class="odd">&nbsp;</li>
<li value="12" class="tab0 even"><code><span class="keyword">void</span> main<span class="brackets">(</span><span class="brackets">)</span> <span class="brackets">{</span></code></li>
<li value="13" class="tab1 odd"><code>MinHeap!<span class="brackets">(</span><span class="keyword">char</span><span class="brackets">[</span><span class="brackets">]</span><span class="brackets">)</span> heap <span class="brackets">=</span> new MinHeap!<span class="brackets">(</span><span class="keyword">char</span><span class="brackets">[</span><span class="brackets">]</span><span class="brackets">)</span><span class="brackets">(</span><span class="brackets">)</span>;</code></li>
<li value="14" class="tab1 even"><code>heap.insert<span class="brackets">(</span><span class="numbers">4</span>, &quot;I should be first out<span class="brackets">(</span> remember to visit d.hvemder.dk <span class="brackets">)</span>&quot;<span class="brackets">)</span>;</code></li>
<li value="15" class="tab1 odd"><code>writefln<span class="brackets">(</span>heap.extractMin<span class="brackets">(</span><span class="brackets">)</span> <span class="brackets">)</span>;</code></li>
<div class="tab1"><code>...</code></div>
<li value="25" class="tab0 odd"><code><span class="brackets">}</span>;</code></li>
<li value="26" class="even">&nbsp;</li>
<li value="27" class="tab0 odd"><code><span class="keyword">class</span> MinHeap<span class="brackets">(</span>T<span class="brackets">)</span> <span class="brackets">{</span></code></li>
<div class="tab0"><code>...</code></div>
<li value="91" class="tab1 odd"><code><span class="keyword">public</span>:</code></li>
<li value="92" class="tab2 even"><code><span class="keyword">void</span> insert<span class="brackets">(</span><span class="keyword">int</span> argKey, T argValue<span class="brackets">)</span> <span class="brackets">{</span></code></li>
<li value="93" class="tab3 odd"><code>nodes.length <span class="brackets">=</span> nodes.length + <span class="numbers">1</span>;</code></li>
<li value="94" class="tab3 even"><code>nodes<span class="brackets">[</span>length-<span class="numbers">1</span><span class="brackets">]</span> <span class="brackets">=</span> new Node!<span class="brackets">(</span>T<span class="brackets">)</span><span class="brackets">(</span>argKey, argValue<span class="brackets">)</span>;</code></li>
<li value="95" class="tab3 odd"><code>decreaseKey<span class="brackets">(</span>nodes.length-<span class="numbers">1</span>, argKey<span class="brackets">)</span>;</code></li>
<li value="96" class="tab2 even"><code><span class="brackets">}</span></code></li>
<li value="97" class="odd">&nbsp;</li>
<li value="98" class="tab2 even"><code>T showMin<span class="brackets">(</span><span class="brackets">)</span> <span class="brackets">{</span></code></li>
<li value="99" class="tab3 odd"><code><span class="keyword">return</span> nodes<span class="brackets">[</span><span class="numbers">0</span><span class="brackets">]</span>.getValue<span class="brackets">(</span><span class="brackets">)</span>;</code></li>
<li value="100" class="tab2 even"><code><span class="brackets">}</span></code></li>
<li value="101" class="odd">&nbsp;</li>
<li value="102" class="tab2 even"><code>T extractMin<span class="brackets">(</span><span class="brackets">)</span> <span class="brackets">{</span></code></li>
<li value="103" class="tab3 odd"><code><span class="keyword">if</span><span class="brackets">(</span> nodes.length &lt; <span class="numbers">1</span> <span class="brackets">)</span></code></li>
<li value="104" class="tab4 even"><code><span class="keyword">return</span> cast<span class="brackets">(</span>T<span class="brackets">)</span> <span class="keyword">null</span>;</code></li>
<li value="105" class="tab3 odd"><code>T temp <span class="brackets">=</span> nodes<span class="brackets">[</span><span class="numbers">0</span><span class="brackets">]</span>.getValue<span class="brackets">(</span><span class="brackets">)</span>;</code></li>
<li value="106" class="tab3 even"><code>nodes<span class="brackets">[</span><span class="numbers">0</span><span class="brackets">]</span> <span class="brackets">=</span> nodes<span class="brackets">[</span>length-<span class="numbers">1</span><span class="brackets">]</span>;</code></li>
<li value="107" class="tab3 odd"><code>heapify<span class="brackets">(</span><span class="numbers">0</span><span class="brackets">)</span>;</code></li>
<li value="108" class="tab3 even"><code>nodes.length <span class="brackets">=</span> nodes.length - <span class="numbers">1</span>;</code></li>
<li value="109" class="tab3 odd"><code><span class="keyword">return</span> temp;</code></li>
<li value="110" class="tab2 even"><code><span class="brackets">}</span></code></li>
<li value="111" class="tab0 odd"><code><span class="brackets">}</span>;</code></li>
<li class="sourcelink"><strong>Download this code:</strong> <a href="/home/www/d.hvemder.dk/code/2007/03/heap.d">heap.d</a></li>
</ol>
<p>As you can see you are welcome to do whatever you want to do with the file, as long a you keep my beer-ware license in the file.</p>
<p>The implementation is still quite simple, and I intend to extend it to be both a min-heap and a max-heap. It should also be possible to change a values key. <span class="linet">I haven&#8217;t quite figured out how to do that though</span> It could be done by just saving an id along with the insert. You should then be able to search for that id. The running time, though isn&#8217;t that good for searching in heaps like this one. It needs a little more thinking.</p>
<p>A smart thing I learned while implementing this, is in line 27. Here it is up to the user to define what type the values should be. This makes the heap very dynamic in what can be stored. In line 13 there&#8217;s an example where I create a MinHeap which can store char[]. Nice <img src='http://d.hvemder.dk/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://d.hvemder.dk/2007/03/03/a-heaps-world/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Just a little fun with beer</title>
		<link>http://d.hvemder.dk/2007/03/01/just-a-little-fun-with-beer/</link>
		<comments>http://d.hvemder.dk/2007/03/01/just-a-little-fun-with-beer/#comments</comments>
		<pubDate>Wed, 28 Feb 2007 23:00:21 +0000</pubDate>
		<dc:creator>Ebbe</dc:creator>
				<category><![CDATA[Off topic]]></category>

		<guid isPermaLink="false">http://d.hvemder.dk/2007/03/01/just-a-little-fun-with-beer/</guid>
		<description><![CDATA[Here&#8217;s one to get you through the day, waiting for the weekend Robotic Beer Launching Refrigerator And back to D. I&#8217;ve implemented a heap, and will soon post it here.]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s one to get you through the day, waiting for the weekend <img src='http://d.hvemder.dk/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p><embed flashVars="altServerURL=http://www.metacafe.com&#038;playerVars=videoTitle=Robotic Beer Launching Refrigerator|showStats=no|autoPlay=no|blogName=Ebbe's D-universe|blogURL=http://d.hvemder.dk" src="http://www.metacafe.com/fplayer/445498/robotic_beer_launching_refrigerator.swf" width="400" height="345" wmode="transparent" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash"></embed><br /><font size = 1><a href="http://www.metacafe.com/watch/445498/robotic_beer_launching_refrigerator/">Robotic Beer Launching Refrigerator</a></font></p>
<p>And back to D. I&#8217;ve implemented a heap, and will soon post it here.</p>
]]></content:encoded>
			<wfw:commentRss>http://d.hvemder.dk/2007/03/01/just-a-little-fun-with-beer/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Projects</title>
		<link>http://d.hvemder.dk/2007/02/26/projects/</link>
		<comments>http://d.hvemder.dk/2007/02/26/projects/#comments</comments>
		<pubDate>Mon, 26 Feb 2007 17:08:28 +0000</pubDate>
		<dc:creator>Ebbe</dc:creator>
				<category><![CDATA[D programming]]></category>
		<category><![CDATA[Enimal]]></category>
		<category><![CDATA[Open Theme Hospital]]></category>

		<guid isPermaLink="false">http://d.hvemder.dk/2007/02/26/projects/</guid>
		<description><![CDATA[I haven&#8217;t begun coding my many projects yet, but here&#8217;s a temporary list of what might come: Enimal &#8211; My dream of making a program to simulate life and evolution. It should be in a ever changing world. The world should be visible. The first thing to make is the weather, then the plants, and [...]]]></description>
			<content:encoded><![CDATA[<p>I haven&#8217;t begun coding my many projects yet, but here&#8217;s a temporary list of what might come:</p>
<ul>
<li><strong>Enimal</strong> &#8211; My dream of making a program to simulate life and evolution. It should be in a ever changing world. The world should be visible. The first thing to make is the weather, then the plants, and then the animals.</li>
<li><strong>Open Theme Hospital </strong>- This is a project a saw <a href="http://hospitaltycoon.sourceforge.net/" title="Hospital Tycoon">here</a> (although under a different name, but that can&#8217;t be used any more because of a commercial game with that name). The old project has stalled, and was intended to run in python.. I&#8217;m currently in contact with one of the 3D artists, so we can start the project again. This time it shall be in the great language D!</li>
<li><strong>Implementing various algorithms</strong> &#8211; I&#8217;m studying computer science, and here I&#8217;m learning all sorts of different algorithms, and why not make the cool ones in D? So that is what I&#8217;m going to do here.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://d.hvemder.dk/2007/02/26/projects/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Short intro</title>
		<link>http://d.hvemder.dk/2007/02/22/short-intro/</link>
		<comments>http://d.hvemder.dk/2007/02/22/short-intro/#comments</comments>
		<pubDate>Thu, 22 Feb 2007 22:06:43 +0000</pubDate>
		<dc:creator>Ebbe</dc:creator>
				<category><![CDATA[General blabbering]]></category>

		<guid isPermaLink="false">http://d.hvemder.dk/?p=1</guid>
		<description><![CDATA[So, I finally got a blog. I&#8217;ve long thought about writing about my experiences with the programming language D, but couldn&#8217;t quite figure out how it should be. Then I stumbled upon http://odefu.blogspot.com/ . &#8220;Very nice&#8221; I thought, &#8220;this is a good idea&#8221;. This is the result from all that thinking. I don&#8217;t know if [...]]]></description>
			<content:encoded><![CDATA[<p>So, I finally got a blog. I&#8217;ve long thought about writing about my experiences with the programming language D, but couldn&#8217;t quite figure out how it should be. Then I stumbled upon <a href="http://odefu.blogspot.com/" title="Another D blog">http://odefu.blogspot.com/</a> . &#8220;Very nice&#8221; I thought, &#8220;this is a good idea&#8221;.</p>
<p>This is the result from all that thinking. I don&#8217;t know if it&#8217;s ever going to be a good blog, but I&#8217;m sure I&#8217;ll be updating it from time to time.</p>
<p>My blog&#8217;s probably going to concentrate on game programming with D. This is quite big, so that is probably going to be 2d, 3d, openGL, Derelict, Tango, threads ( and concurrency ), networking and certainly more.</p>
<p><strong>Motivation</strong></p>
<p>Right now some of you are probably thinking: &#8220;Why is he going through all this trouble setting up a subdomain and making this blog and writing to it?&#8221;. Oh, my little ignorant friend <img src='http://d.hvemder.dk/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  I&#8217;m doing this so I can give something back to the community. Another good reason for this, is that I use Linux ( it&#8217;s gotten really user-friendly with <a href="http://Ubuntu.com" title="Linux for human beings">Ubuntu</a> ) and many users in the forum uses those awful capitalistic  os&#8217;. The whole D-community seems Window$ified. Now the freedom is here!</p>
]]></content:encoded>
			<wfw:commentRss>http://d.hvemder.dk/2007/02/22/short-intro/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

