<?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>Intrepid Blog &#187; Code Golf</title>
	<atom:link href="http://blog.affien.com/archives/tag/code-golf/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.affien.com</link>
	<description>A few thoughts</description>
	<lastBuildDate>Mon, 01 Mar 2010 00:58:01 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Code Golf 3: Googler</title>
		<link>http://blog.affien.com/archives/2005/11/02/code-golf-3-googler/</link>
		<comments>http://blog.affien.com/archives/2005/11/02/code-golf-3-googler/#comments</comments>
		<pubDate>Wed, 02 Nov 2005 17:43:58 +0000</pubDate>
		<dc:creator>Bas Westerbaan</dc:creator>
				<category><![CDATA[Code Golf]]></category>
		<category><![CDATA[google]]></category>

		<guid isPermaLink="false">http://blog.w-nz.com/archives/2005/11/02/code-golf-3-googler/</guid>
		<description><![CDATA[Code Golf. As with the real sport the goal is to reduce the number of strokes that it takes to complete a particular objective, although with Code Golf â€œstrokesâ€ refers to keystrokes rather than swings of a golf club.
Write code to return the url&#8217;s of the first page of search results for the query &#8216;perl&#8217; [...]]]></description>
			<content:encoded><![CDATA[<p>Code Golf. As with the real sport the goal is to reduce the number of strokes that it takes to complete a particular objective, although with Code Golf â€œstrokesâ€ refers to keystrokes rather than swings of a golf club.</p>
<p><strong>Write code to return the url&#8217;s of the first page of search results for the query &#8216;perl&#8217; on google.com</strong></p>
<p>There&#8217;ll be two categories, one for using perl&#8217;s <code>Socket</code> module only, and for those using external libraries.</p>
<p>Good luck!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.affien.com/archives/2005/11/02/code-golf-3-googler/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Code Golf 2: Line Sort</title>
		<link>http://blog.affien.com/archives/2005/11/01/code-golf-2-line-sort/</link>
		<comments>http://blog.affien.com/archives/2005/11/01/code-golf-2-line-sort/#comments</comments>
		<pubDate>Tue, 01 Nov 2005 20:44:04 +0000</pubDate>
		<dc:creator>Bas Westerbaan</dc:creator>
				<category><![CDATA[Code Golf]]></category>
		<category><![CDATA[line sort]]></category>

		<guid isPermaLink="false">http://blog.w-nz.com/archives/2005/11/01/code-golf-2-line-sort/</guid>
		<description><![CDATA[Code Golf. As with the real sport the goal is to reduce the number of strokes that it takes to complete a particular objective, although with Code Golf â€œstrokesâ€ refers to keystrokes rather than swings of a golf club.
Create an algorithm that reads lines from the stdin until it hits an EOF and prints those [...]]]></description>
			<content:encoded><![CDATA[<p>Code Golf. As with the real sport the goal is to reduce the number of strokes that it takes to complete a particular objective, although with Code Golf â€œstrokesâ€ refers to keystrokes rather than swings of a golf club.</p>
<p><strong>Create an algorithm that reads lines from the <em>stdin</em> until it hits an <em>EOF</em> and prints those lines sorted to the <em>stdout</em></strong></p>
<ul>
<li>Don&#8217;t use the language&#8217;s native sorting capabilities, write your own sorting algorithm. (<code>print for sort<></code> would be too easy.)</li>
<li>Any language is allowed, except for those that myseriously implement a 1 byte command that does exactly this.</li>
</ul>
<p>Example implementation using inverted bubble sort:</p>
<pre>@a = &lt;&gt;;
for ($i = 0; $i &lt;= $#a; $i++) {
 for ($j = $i; $j &lt;= $#a; $j++) {
  if (@a[$i] ge @a[$j]) {
   $t = @a[$j];
   @a[$j] = @a[$i];
   @a[$i] = $t;
  }
 }
}
foreach(@a) {
 print;
}</pre>
<p>This implementation is very large and inefficient, and just an example.</p>
<p>Good luck!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.affien.com/archives/2005/11/01/code-golf-2-line-sort/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Code Golf 1: Fibonacci</title>
		<link>http://blog.affien.com/archives/2005/11/01/code-golf-1-fibonacci/</link>
		<comments>http://blog.affien.com/archives/2005/11/01/code-golf-1-fibonacci/#comments</comments>
		<pubDate>Tue, 01 Nov 2005 18:23:55 +0000</pubDate>
		<dc:creator>Bas Westerbaan</dc:creator>
				<category><![CDATA[Code Golf]]></category>
		<category><![CDATA[fibonacci]]></category>

		<guid isPermaLink="false">http://blog.w-nz.com/archives/2005/11/01/code-golf-1-fibonacci/</guid>
		<description><![CDATA[Code Golf.  As with the real sport the goal is to reduce the number of strokes that it takes to complete a particular objective, although with Code Golf &#8220;strokes&#8221; refers to keystrokes rather than swings of a golf club.
You may compete using any language.1
Create an algorithm that prints the 30 first fibonacci number to [...]]]></description>
			<content:encoded><![CDATA[<p>Code Golf.  As with the real sport the goal is to reduce the number of strokes that it takes to complete a particular objective, although with Code Golf &#8220;strokes&#8221; refers to keystrokes rather than swings of a golf club.</p>
<p>You may compete using any language.<sup>1</sup></p>
<p><strong>Create an algorithm that prints the 30 first fibonacci number to the screen, each followed by a newline.</strong></p>
<p>An algorithm which could do this would be (148 bytes):</p>
<pre>my $a = 1;
my $b = 0;
my $c;

my $limit = 30;
my $i = 0;

while ($i &lt; $limit) {
        $i += 1;
        $c = $a + $b;
        $a = $b;
        $b = $c;
        print $c . "\n";
}</pre>
<p>But that can be written way shorter.</p>
<p><strong>My first</strong>: <br /> <br />
<code>$a=1;for((0..29)){$c=$a+$b;$a=$b;$b=$c;print"$c\n"}</code></p>
<p><strong>My second</strong>:<br />
<code>$a=1;$c=$a+$b,$a=$b,$b=$c,print"$c\n"for 0..29</code></p>
<p><strong>Noud&#8217;s reponse</strong>:<br />
<code>$i=1;print$i+=$a,"\n",$a+=$i,"\n"while$i&lt;317811</code></p>
<p><strong>My revenge</strong>:<br />
<code>$a=1;$c=$a+$b,$a=$b,$b=$c,print"$c\n"for 0..29</code></p>
<p><strong>Noud was 30 seconds later with</strong>:<br />
<code>$a=1;print$a+=$b,"\n",$b+=$a,"\n"for 1..15</code></p>
<p><strong>My latest one</strong>: <ins>partially by Bram too</ins><br />
<code>print$a+=$b,"\n",$b+=$a,"\n"for$a++..14</code></p>
<p><ins>Update:</ins><strong>Twan</strong>:<br />
<code>print$a+=$b,$/,$b+=$a,$/for$a++..14</code></p>
<p><small>1. a language that implements <code>fib</code> returning mysteriously the first 30 fibonacci numbers isn&#8217;t allowed.</small></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.affien.com/archives/2005/11/01/code-golf-1-fibonacci/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
