<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>codelake</title>
	<atom:link href="http://codelake.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://codelake.wordpress.com</link>
	<description>The Language Blog</description>
	<lastBuildDate>Wed, 29 Jun 2011 14:15:58 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='codelake.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>codelake</title>
		<link>http://codelake.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://codelake.wordpress.com/osd.xml" title="codelake" />
	<atom:link rel='hub' href='http://codelake.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Anagrams, pt. 2</title>
		<link>http://codelake.wordpress.com/2008/08/24/anagrams-pt-2/</link>
		<comments>http://codelake.wordpress.com/2008/08/24/anagrams-pt-2/#comments</comments>
		<pubDate>Sun, 24 Aug 2008 12:39:23 +0000</pubDate>
		<dc:creator>Laurentiu Nicola</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Code snippet of the day]]></category>
		<category><![CDATA[Haskell]]></category>

		<guid isPermaLink="false">http://codelake.wordpress.com/?p=15</guid>
		<description><![CDATA[This was my submission for http://selfexplanatorycode.blogspot.com/. It would be faster if I used a Set (supporting fast look-up) for the second word, but that would have made the code even uglier. import Control.Monad import Data.Char import Data.List makeGroup xs = (head xs, length xs) histogram word = map makeGroup $ group (sort word) diffHistograms ((lx, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=codelake.wordpress.com&amp;blog=3402600&amp;post=15&amp;subd=codelake&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>This was my submission for <a href="http://selfexplanatorycode.blogspot.com/">http://selfexplanatorycode.blogspot.com/</a>. It would be faster if I used a Set (supporting fast look-up) for the second word, but that would have made the code even uglier.</p>
<p><code><br />
import Control.Monad<br />
import Data.Char<br />
import Data.List</p>
<p>makeGroup xs = (head xs, length xs)</p>
<p>histogram word = map makeGroup $ group (sort word)</p>
<p>diffHistograms ((lx, cx) : xs) ((ly, cy) : ys)<br />
| lx == ly &amp;&amp; cx == cy = diffHistograms xs ys<br />
| lx == ly &amp;&amp; cx &gt; cy = map ((lx, cx - cy) :) $ diffHistograms xs ys<br />
| otherwise = map ((lx, cx) :) $ diffHistograms xs ((ly, cy) : ys)<br />
diffHistograms xs [] = [xs]<br />
diffHistograms [] ys = []</p>
<p>anagrams word dict = [(fst first, fst second) |<br />
first &lt;- dict,<br />
rest &lt;- diffHistograms word (snd first),<br />
second &lt;- dict,<br />
rest == snd second]</p>
<p>printSolution (first, second) = putStrLn $ first ++ " " ++ second</p>
<p>buildDictionary = do<br />
contents &lt;- readFile "wordlist.txt"<br />
let wordList = lines $ map toLower contents<br />
return $ zip wordList (map histogram wordList)</p>
<p>findAnagrams word = anagrams (histogram word)</p>
<p>main = do<br />
dict &lt;- buildDictionary<br />
mapM_ printSolution $ findAnagrams "documenting" dict<br />
</code></p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/codelake.wordpress.com/15/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/codelake.wordpress.com/15/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/codelake.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/codelake.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/codelake.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/codelake.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/codelake.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/codelake.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/codelake.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/codelake.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/codelake.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/codelake.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/codelake.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/codelake.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/codelake.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/codelake.wordpress.com/15/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=codelake.wordpress.com&amp;blog=3402600&amp;post=15&amp;subd=codelake&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://codelake.wordpress.com/2008/08/24/anagrams-pt-2/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/5ae110821dfdad504b71012d641e3f47?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">grayshadesofme</media:title>
		</media:content>
	</item>
		<item>
		<title>Almost-anagrams in Haskell</title>
		<link>http://codelake.wordpress.com/2008/08/06/almost-anagrams-in-haskell/</link>
		<comments>http://codelake.wordpress.com/2008/08/06/almost-anagrams-in-haskell/#comments</comments>
		<pubDate>Wed, 06 Aug 2008 12:24:03 +0000</pubDate>
		<dc:creator>Laurentiu Nicola</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Code snippet of the day]]></category>
		<category><![CDATA[Haskell]]></category>

		<guid isPermaLink="false">http://codelake.wordpress.com/?p=11</guid>
		<description><![CDATA[A nice but horribly inefficient code snippet for generating all the words that can be written with a words&#8217; letters: addOne c xs = xs : zipWith insert (inits xs) (tails xs) where insert left right = left ++ [c] ++ right anagrams = foldl (\r x -&#62; concatMap (addOne x) r) [""]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=codelake.wordpress.com&amp;blog=3402600&amp;post=11&amp;subd=codelake&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>A nice but horribly inefficient code snippet for generating all the words that can be written with a words&#8217; letters:</p>
<p><code>addOne c xs = xs : zipWith insert (inits xs) (tails xs) where<br />
insert left right = left ++ [c] ++ right</code></p>
<p><code>anagrams = foldl (\r x -&gt; concatMap (addOne x) r) [""]</code></p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/codelake.wordpress.com/11/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/codelake.wordpress.com/11/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/codelake.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/codelake.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/codelake.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/codelake.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/codelake.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/codelake.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/codelake.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/codelake.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/codelake.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/codelake.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/codelake.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/codelake.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/codelake.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/codelake.wordpress.com/11/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=codelake.wordpress.com&amp;blog=3402600&amp;post=11&amp;subd=codelake&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://codelake.wordpress.com/2008/08/06/almost-anagrams-in-haskell/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/5ae110821dfdad504b71012d641e3f47?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">grayshadesofme</media:title>
		</media:content>
	</item>
		<item>
		<title>A little bit of Haskell in Prolog</title>
		<link>http://codelake.wordpress.com/2008/04/13/a-little-bit-of-haskell-in-prolog/</link>
		<comments>http://codelake.wordpress.com/2008/04/13/a-little-bit-of-haskell-in-prolog/#comments</comments>
		<pubDate>Sun, 13 Apr 2008 07:44:17 +0000</pubDate>
		<dc:creator>Alex Muscar</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Prolog]]></category>

		<guid isPermaLink="false">http://codelake.wordpress.com/?p=10</guid>
		<description><![CDATA[A couple of weeks ago I decided to write a text adventure game in Prolog (this might end up as another challenge, this time a logic &#8211; functional one since I started writing the game in Prolog while Laur&#8217;s choice was Haskell, but for the moment time&#8217;s not on our side). The game is pretty [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=codelake.wordpress.com&amp;blog=3402600&amp;post=10&amp;subd=codelake&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>A couple of weeks ago I decided to write a text adventure game in Prolog (this might end up as another challenge, this time a logic &#8211; functional one since I started writing the game in Prolog while Laur&#8217;s choice was Haskell, but for the moment time&#8217;s not on our side). The game is pretty much useless right now, but in the process of writing it a couple of nice tricks were spawned.<br />
First, I&#8217;m a slacker, so I don&#8217;t like writing a lot of code. Second I find Prolog&#8217;s use of out parameters kind of cumbersome at times. For those of you who aren&#8217;t familiar to Prolog (and for which, again, this post will probably be useless) here&#8217;s a snippet to show just how that works:</p>
<pre>quux(A, B, R) :- R is A + B.</pre>
<p>and its use:</p>
<pre>40 ?- quux(1, 2, R).
R = 3.</pre>
<p>Note: &#8216;is&#8217; is Prolog&#8217;s way of doing math. It&#8217;s like = in C.<br />
In C# it might look like:</p>
<pre>void quux(int a, int b, out r)
{
r = a + b;
}</pre>
<p>For short programs it&#8217;s okay, but for larger, more complex ones it can be pretty hard to see what goes where (at least I find it hard since I&#8217;m not that experienced with Prolog). Enter Haskell&#8217;s do notation. Using do notation the previous example might look like:</p>
<pre>R &lt;- quux(1, 2)</pre>
<p>What have we done here? We have extracted the out parameter of the quux predicate and put it in front of the call. But how can that be? Won&#8217;t quux complain that it&#8217;s missing an argument? Here comes the nice part: Prolog, like Lisp, is <a href="http://en.wikipedia.org/wiki/Homoiconic">homoiconic</a>. Also Prolog, like Lisp, has as its main data structure <em>the list</em>. If you squint a little</p>
<pre>quux(1, 2, R)</pre>
<p>becomes:</p>
<pre>(quux, 1, 2, R)</pre>
<p>Use space as a separator instead of commas and you have Lisp. So Prolog is homoiconic, whoopy, but what&#8217;s that have to do with anything? Well it does, and quite a lot. It means that the language can look at code as data (if you have the time <a href="http://www.defmacro.org/ramblings/lisp.html">this</a> is a must). Our point of view now changes: quux(1, 2) is not a predicate call anymore, but a list: (quux 1 2). If we add it another element and try to call it Prolog will recognize it as a valid predicate call. But how can we do that? Prolog has a nice set of predefined predicates to support <a href="http://en.wikipedia.org/wiki/Metaprogramming">metaprogramming</a>. <em>call</em> is one of them. It is a variadic (it can receive a variable number of arguments) predicate that expects a predicate to call (our (quux 1 2) list in this case) and extra parameters. So</p>
<pre>44 ?- call(quux(1, 2), R).
R = 3.</pre>
<p>behaves exactly as expected.<br />
Prolog also lets us define new operators, so we can define &lt;- as an operator so we won&#8217;t be forced to use call all the time:</p>
<pre>:- op(710, xfx, '&lt;-').
'&lt;-'(X, Y) :- call(Y, X).</pre>
<p>The snipet above defines &lt;- as an infix operator with a 710 precedence level.<br />
Looking in the neighbour&#8217;s back yard I also picked the bind operator (for details on monads read <a href="http://en.wikibooks.org/wiki/Haskell/Understanding_monads">this</a>). Essentially what bind does is thread state. To illustrate it let&#8217;s define a new predicate baz that simply writes its parameter:</p>
<pre>baz(A) :- write(A).</pre>
<p>Using bind (denoted by &gt;&gt;=) we can write:</p>
<pre>53 ?- quux(1, 2) &gt;&gt;= baz.
3
true.</pre>
<p>and see that it acts as expected. &gt;&gt;= uses a temporary variable to hold the result of quux and passes it to baz. That&#8217;s it. Here&#8217;s the code:</p>
<pre>:- op(705, xfx, '&gt;&gt;=').
'&gt;&gt;='(X, Y) :- call(X, Z), call(Y, Z).
'&gt;&gt;='(X, Y, R) :- call(X, Z), call(Y, Z, R).</pre>
<p>As you can see we treat the case where the lastt predicate can have an out parameter separately.<br />
Using &gt;= we can write thing like:</p>
<pre>50 ?- R &lt;- quux(1, 2) &gt;&gt;= qux.
R = 4.</pre>
<p>assuming that qux looks like:</p>
<pre>qux(A, R) :- R is A + 1.</pre>
<p>Now, that was useless, but fun :^).</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/codelake.wordpress.com/10/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/codelake.wordpress.com/10/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/codelake.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/codelake.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/codelake.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/codelake.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/codelake.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/codelake.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/codelake.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/codelake.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/codelake.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/codelake.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/codelake.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/codelake.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/codelake.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/codelake.wordpress.com/10/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=codelake.wordpress.com&amp;blog=3402600&amp;post=10&amp;subd=codelake&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://codelake.wordpress.com/2008/04/13/a-little-bit-of-haskell-in-prolog/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/89dea263c93172a1255bbcfa57291b26?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Alex</media:title>
		</media:content>
	</item>
		<item>
		<title>Functional challenge III</title>
		<link>http://codelake.wordpress.com/2008/04/11/functional-challenge-iii/</link>
		<comments>http://codelake.wordpress.com/2008/04/11/functional-challenge-iii/#comments</comments>
		<pubDate>Fri, 11 Apr 2008 22:26:03 +0000</pubDate>
		<dc:creator>Alex Muscar</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Functional Programming]]></category>
		<category><![CDATA[Lisp]]></category>

		<guid isPermaLink="false">http://codelake.wordpress.com/?p=7</guid>
		<description><![CDATA[As I said, in this post I will cover a simple Haskell-like generator implementation in Common Lisp. The cases I will cover are: [x..] ; gives [x, x + 1, x + 2 ...] [x1,x2..] ; gives [x, x + d, x + (2 * d)...], where d = x2 - x1 [x1..xn] ; gives [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=codelake.wordpress.com&amp;blog=3402600&amp;post=7&amp;subd=codelake&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>As I said, in this post I will cover a simple Haskell-like generator implementation in Common Lisp. The cases I will cover are:</p>
<pre>
[x..] ; gives [x, x + 1, x + 2 ...]
[x1,x2..] ; gives [x, x + d, x + (2 * d)...], where d = x2 - x1
[x1..xn] ; gives [x, x + 1 ... xn]
[x1,x2..xn] ; gives t[x, x + d, x + (2 * d) ... xn], where d = x2 - x1
</pre>
<p>Now that we have lazy lists (from the last post) cases like the first and the third are no longer a problem. What about the Haskell-ish syntax I promised? Reader macros to the rescue. Reader macros are Lisp&#8217;s way to let the programmer mess with the reader (the reader is a Lisp&#8217;s system component that transforms textual representations of objects to actual objects; more on reader macros <a href="http://psg.com/~dlamkins/sl/chapter03-12.html">here</a>). It&#8217;s not as hard as it sounds:</p>
<pre>(set-macro-character #\[ #'(lambda (s c) (generator s c)))</pre>
<p>This tells the Lisp reader to do something whenever it sees the '[' character (in Lisp characters are prefixed with #\ -- that's actually a reader macro, too :) ). In this case it calls (well, the anonymous function denoted by the lambda calls our function, but I won't get into details here) the generator function passing it two parameters: a stream and the matched character (here '['). The function can parse the stream in any way it likes, thus being able to define a completely new syntax.</p>
<p>First of all we need some utility functions:</p>
<pre>
(defun read-while (stream condition string-builder)
  "Reads characters from a stream pushing them into the string-builder while the condition evaluates to true."
  (setf (fill-pointer string-builder) 0)
  (loop (if (funcall condition (peek-char nil stream))
	    (vector-push-extend (read-char stream) string-builder)
	    (return (&gt; (fill-pointer string-builder) 0)))))

(defun parse-int (stream string-builder)
  "Parses an integer from the stream."
  (peek-char t stream)
  (when (read-while stream #'(lambda (x) (or (digit-char-p x) (eq x #\-))) string-builder)
    (parse-integer string-builder)))

(defmacro when-char (stream char &amp;rest body)
  "Evaluates the body when the next char in the stream is char and consumes it."
  `(when (eq (peek-char t ,stream) ,char)
     (read-char ,stream)
     ,@body))

(defmacro expect (stream char &amp;optional (non-strict nil))
  "If the next char in the stream is char it is consumed, otherwise an error is raised."
  `(if (eq (peek-char ,non-strict ,stream) ,char)
       (read-char ,stream)
       (error "Expecting ~S~%" ,char)))
</pre>
<p>read-while takes a stream, a predicate and a buffer. It reads characters from the stream while the predicate is fulfilled. It returns true if it has read anything, false otherwise. After a call to read-while the matched string will be stored in the buffer passed (<b>note</b>: this is not necessarily good practice since passing the buffer around is clumsy; the alternative would have been to let read-while allocate the buffer).<br />
parse-int parses an int from the stream. The function uses the built-in parse-integer to do the "heavy lifting". All it does is build a string and pass it to parse-integer.<br />
the when-char macro executes the specified piece of code when the next char in the stream is the specified char.<br />
expect raises an error if the next character in the stream is not the one specified.</p>
<p>It's time for the actual implementation of the generator. </p>
<pre>
(defun make-stream (start end &amp;optional (step 1))
  "Constructs a stream of numbers within the given range."
  (if (and (not (null end)) (funcall (if (&lt; step 0) #'&lt; #'&gt;) start end))
      '()
      (cons-stream start (make-stream (+ start step) end step))))

(defun generator (stream char)
  (declare (ignore char))
  (let* ((sb (make-array 0 :element-type 'character :fill-pointer 0 :adjustable t))
	 (start (parse-int stream sb)) (end) (step 1))
    (when-char stream #\, (setf step (- (parse-int stream sb) start)))
    (when-char stream #\. (expect stream #\.))

    (setf end (parse-int stream sb))
    (expect stream #\] t)
    `(make-stream ,start ,end ,step)))
</pre>
<p>First we need a function that constructs an integer stream. make-stream does exactly that. Next we define generator, the function that the reader-macro uses. It parses a generator obeying the syntax described in the beginning of the post and returns a stream of integers.<br />
Finally, to test the generators, we define the well known take function from Haskell:</p>
<pre>
(defun take (n stream)
  (cond ((endp stream) nil)
	((= n 0) nil)
	(t (cons (car-stream stream) (take (- n 1) (cdr-stream stream))))))
</pre>
<p>take returns a list made out of the first n elements of the stream.<br />
Some usage examples:</p>
<pre>
CL-USER&gt; (take 10 [1..])
(1 2 3 4 5 6 7 8 9 10)
CL-USER&gt; (take 10 [1, 3 ..])
(1 3 5 7 9 11 13 15 17 19)
CL-USER&gt; (take 10 [1 .. 5])
(1 2 3 4 5)
CL-USER&gt; (take 10 [1, -1 .. 5])
NIL
CL-USER&gt; (take 10 [1, -1 .. -10])
(1 -1 -3 -5 -7 -9)
CL-USER&gt;
</pre>
<p>Hope this was not so painful. Btw, can your language do this?</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/codelake.wordpress.com/7/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/codelake.wordpress.com/7/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/codelake.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/codelake.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/codelake.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/codelake.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/codelake.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/codelake.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/codelake.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/codelake.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/codelake.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/codelake.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/codelake.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/codelake.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/codelake.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/codelake.wordpress.com/7/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=codelake.wordpress.com&amp;blog=3402600&amp;post=7&amp;subd=codelake&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://codelake.wordpress.com/2008/04/11/functional-challenge-iii/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/89dea263c93172a1255bbcfa57291b26?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Alex</media:title>
		</media:content>
	</item>
		<item>
		<title>Haskell ramblings and an answer to the challenge</title>
		<link>http://codelake.wordpress.com/2008/04/07/haskell-ramblings-and-an-answer-to-the-challenge/</link>
		<comments>http://codelake.wordpress.com/2008/04/07/haskell-ramblings-and-an-answer-to-the-challenge/#comments</comments>
		<pubDate>Mon, 07 Apr 2008 22:50:04 +0000</pubDate>
		<dc:creator>Laurentiu Nicola</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Functional Programming]]></category>
		<category><![CDATA[Haskell]]></category>

		<guid isPermaLink="false">http://codelake.wordpress.com/?p=6</guid>
		<description><![CDATA[First post, so hello everyone. You might have read about Alex&#8217;s challenge, but if you didn&#8217;t, it was about implementing a counter (a function that returns consecutive values on each call). I&#8217;ll show a small implementation in Haskell. (Note: I don&#8217;t know Haskell, so beware of poor style, bad explanations and choices or even dragons.) [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=codelake.wordpress.com&amp;blog=3402600&amp;post=6&amp;subd=codelake&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>First post, so hello everyone.</p>
<p>You might have read about Alex&#8217;s <a href="http://codelake.wordpress.com/2008/04/07/functional-challenge-i/" target="_blank">challenge</a>, but if you didn&#8217;t, it was about implementing a counter (a function that returns consecutive values on each call). I&#8217;ll show a small implementation in <a href="http://en.wikipedia.org/wiki/Haskell_(programming_language)">Haskell</a>. (Note: I don&#8217;t know Haskell, so beware of poor style, bad explanations and choices or even dragons.)</p>
<p>First, what is Haskell? It&#8217;s a pure functional programming language with lazy evaluation, which means that each function always returns the same result when called with the same arguments (i.e. there are no side effects). This could appear shocking (both because of possible prior experience with imperative languages and because of the problems that appear when dealing with IO operations), but Haskell does have a way to solve these issues.</p>
<p>A nice thing about it is it&#8217;s type system which provides automatic type inference (when it&#8217;s possible), polymorphic types, abstract data types and some other interesting stuff.</p>
<p>A simple program in Haskell is:</p>
<blockquote><p>module Main where</p>
<p>fact 0 = 1<br />
fact n = n * fact (n &#8211; 1)</p>
<p>main = do</p>
<p style="padding-left:30px;">putStr &#8220;Choose a number: &#8220;<br />
line &lt;- getLine<br />
let n = read line<br />
putStrLn $ line ++ &#8220;! = &#8221; ++ (show $ fact n)</p>
</blockquote>
<p>So.. what&#8217;s happening here? We can see a few things:</p>
<ul>
<li>the program consists of a module with a few function definitions</li>
<li>we can use pattern matching for the factorial function (&#8220;fact&#8221;). The function is written similarly to the mathematical notation and works pretty much the same: the first definition that matches with the argument is chosen. Note that the order of the definitions matters: if you swap the respective lines, the program will keep applying the general rule and never finish.</li>
<li>the &#8220;main&#8221; function has some weird syntax: the &#8220;do&#8221; keyword and the &#8220;&lt;-&#8221; stuff. For now let&#8217;s say only that they are used to simulate imperative programming. Just keep in mind that let is used for giving a name to an expression and the arrow is used when doing things like keyboard input.</li>
<li>&#8220;read line&#8221; will parse a string and read an integer value from it (&#8220;read&#8221; can read many things, but the compiler &#8220;sees&#8221; that n is used as an integer so it must be an integer value).</li>
<li>&#8220;show&#8221; does the opposite: it will convert a value to a string.</li>
<li>the strange dollar symbol ($) is used; because in Haskell function application has a high priority, &#8220;show fact n&#8221; would be interpreted as &#8220;(show fact) n&#8221;, which would be wrong. The dollar operator has a low priority and gives it&#8217;s second argument (the one to it&#8217;s right) to it&#8217;s first one: &#8220;show $ fact n&#8221; can be written instead of &#8220;show (fact n)&#8221;.</li>
<li>the whitespace is important and can replace &#8220;;&#8221;-like separators (there&#8217;s also a mode which uses curly braces and semicolons instead of whitespace).</li>
</ul>
<p>What about the challenge? When I said that the counter could be written as &#8220;[1..]&#8221; I skipped a few corners. This beast is, actually, an infinite list of integers starting from one. Because Haskell is a lazy language, it won&#8217;t evaluate the entire expression (or list), but only the needed elements. An effect similar to Alex&#8217;s counter can be obtained using the following code:</p>
<blockquote><p>module Main where</p>
<p>import Control.Monad.State</p>
<p>update f = do</p>
<p style="padding-left:30px;">x &lt;- get<br />
put (f x)<br />
return x</p>
<p>inc = update (+ 1)</p>
<p>test = evalState $ do</p>
<p style="padding-left:30px;">x &lt;- inc<br />
y &lt;- inc<br />
z &lt;- inc<br />
return (x, y, z)</p>
<p>main = print $ test 42</p></blockquote>
<p>The code uses the State monad (two words that I didn&#8217;t say anything about). Since Haskell is pure, it cannot directly represent state, so a solution would be to pass it as an argument to the function, but that&#8217;s usually unnerving. In this case, the do notation hides this threaded argument, just like it did IO before. The get and put helpers are used to access the state and my update function replaces the state with the result of a function applied to it and returns the old value. In this case, this function adds one to its argument. Arrows &#8220;extract&#8221; these values from the function call and use them to build a tuple of three consecutive numbers. Since any function needs an initial state, I use the evalState function to evaluate &#8220;test&#8221; and return it&#8217;s value (I&#8217;m not interested in the new counter value at the end of the function). The initial seed it&#8217;s 42 and one can see here partial function application (or currying). The evalState function has two arguments, yet &#8220;test&#8221; only supplies one of them. The result is a function that takes only one arguments and calls evalState with the two gathered values.</p>
<p>Let&#8217;s try running it (if you&#8217;re really interested, you can use GHC or Hugs to play with this language):</p>
<blockquote><p>Prelude Main&gt; main<br />
(42,43,44)<br />
Prelude Main&gt; test 7<br />
(7,8,9)<br />
Prelude Main&gt; test 0<br />
(0,1,2)</p></blockquote>
<p>It seems to be working, so I think one can consider the challenge answered :).</p>
<p>Yet, I&#8217;ll give another definition of &#8220;update&#8221;, as a small teaser:</p>
<blockquote><p>update = State . ap (,)</p></blockquote>
<p>Until next time, enjoy :).</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/codelake.wordpress.com/6/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/codelake.wordpress.com/6/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/codelake.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/codelake.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/codelake.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/codelake.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/codelake.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/codelake.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/codelake.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/codelake.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/codelake.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/codelake.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/codelake.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/codelake.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/codelake.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/codelake.wordpress.com/6/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=codelake.wordpress.com&amp;blog=3402600&amp;post=6&amp;subd=codelake&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://codelake.wordpress.com/2008/04/07/haskell-ramblings-and-an-answer-to-the-challenge/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/5ae110821dfdad504b71012d641e3f47?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">grayshadesofme</media:title>
		</media:content>
	</item>
		<item>
		<title>Functional challenge II</title>
		<link>http://codelake.wordpress.com/2008/04/07/functional-challenge-ii/</link>
		<comments>http://codelake.wordpress.com/2008/04/07/functional-challenge-ii/#comments</comments>
		<pubDate>Mon, 07 Apr 2008 09:01:32 +0000</pubDate>
		<dc:creator>Alex Muscar</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Functional Programming]]></category>
		<category><![CDATA[Lisp]]></category>

		<guid isPermaLink="false">http://codelake.wordpress.com/?p=5</guid>
		<description><![CDATA[The first note I have to make about the sugary [1..] it that it returns a lazy list. So we find ourselves with a first problem: Haskell is lazy, so it can easily handle infinite data structures such as infinite sequences. Well, that&#8217;s not actually Haskell&#8217;s problem, it&#8217;s Lisp&#8217;s since it&#8217;s eager. That means that [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=codelake.wordpress.com&amp;blog=3402600&amp;post=5&amp;subd=codelake&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>The first note I have to make about the sugary [1..] it that it returns a <i>lazy</i> list. So we find ourselves with a first problem: Haskell is lazy, so it can easily handle infinite data structures such as infinite sequences. Well, that&#8217;s not actually Haskell&#8217;s problem, it&#8217;s Lisp&#8217;s since it&#8217;s eager. That means that it can&#8217;t handle infinite sequences. The solution is surprisingly simple. To be able to explain it I must first say a few words about Lisp&#8217;s lists.<br />
Lisp is all about lists (lispers call them S-expressions). In Lisp this list:</p>
<pre>(1 2 3)</pre>
<p>is internally represented as:</p>
<pre>(cons 1 (cons 2 (cons 3 nil)))</pre>
<p>Yes, it&#8217;s a simply linked list. The value (1, 2, 3, etc) is called car and the next pointer is called cdr. The solution to our problem is, as I already said, simple: to make the list infinite while building it we won&#8217;t evaluate cdr, we&#8217;ll just promise to do so when it&#8217;s really needed. We can do this by using two primitives: delay and force. In Common Lisp they could be implemented like:</p>
<pre>
(defmacro delay (&amp;rest what)
  `(lambda () ,@what))

(defmacro force (what)
  `(apply ,what ()))</pre>
<p>So, using the &#8220;lazy&#8221; primitives delay to delay evaluation and force to force it we can define the next infinite sequence primitives:</p>
<pre>
(defmacro cons-stream (x y)
  `(cons ,x (delay ,y)))

(defmacro car-stream (x)
  `(car ,x))

(defmacro cdr-stream (x)
  `(force (cdr ,x)))
</pre>
<p>More details on lazy lists can be found in the <a href="http://mitpress.mit.edu/sicp/">SICP</a>, a great book by the way (section 3.5, they are called streams).</p>
<p>Next time: the actual generator code (finally :) ).</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/codelake.wordpress.com/5/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/codelake.wordpress.com/5/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/codelake.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/codelake.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/codelake.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/codelake.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/codelake.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/codelake.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/codelake.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/codelake.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/codelake.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/codelake.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/codelake.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/codelake.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/codelake.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/codelake.wordpress.com/5/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=codelake.wordpress.com&amp;blog=3402600&amp;post=5&amp;subd=codelake&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://codelake.wordpress.com/2008/04/07/functional-challenge-ii/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/89dea263c93172a1255bbcfa57291b26?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Alex</media:title>
		</media:content>
	</item>
		<item>
		<title>Functional challenge I</title>
		<link>http://codelake.wordpress.com/2008/04/07/functional-challenge-i/</link>
		<comments>http://codelake.wordpress.com/2008/04/07/functional-challenge-i/#comments</comments>
		<pubDate>Mon, 07 Apr 2008 08:30:31 +0000</pubDate>
		<dc:creator>Alex Muscar</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Functional Programming]]></category>
		<category><![CDATA[Lisp]]></category>

		<guid isPermaLink="false">http://codelake.wordpress.com/?p=4</guid>
		<description><![CDATA[I like functional programming, I consider it to be extremely elegant. I like Lisp, though I&#8217;m not a lisper. A few days ago I was talking to a friend of mine about Lisp and Haskell (I think the whole discussion started from this). He likes Haskell more than he likes Lisp (actually he finds Lisp [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=codelake.wordpress.com&amp;blog=3402600&amp;post=4&amp;subd=codelake&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I like functional programming, I consider it to be extremely elegant. I like Lisp, though I&#8217;m not a lisper.</p>
<p>A few days ago I was talking to a friend of mine about Lisp and Haskell (I think the whole discussion started from <a href="http://www.lisperati.com/landoflisp/">this</a>). He likes Haskell more than he likes Lisp (actually he finds Lisp unreadable). I like Haskell for being so concise and elegant, but I wouldn&#8217;t program in it (actually, to quote myself: &#8220;I sometimes find Haskell to be too concise for me&#8221;). To get back to the story, I was taunting him with something like:</p>
<pre>CL-USER&gt; (defun make-counter (seed) #'(lambda () (setf seed (1+ seed))))
MAKE-COUNTER</pre>
<p>For people that don&#8217;t know Lisp this code defines a function returning a lambda that closes over it&#8217;s only parameter (the initial value of the counter) and returns it&#8217;s successor when called. That was clear, right? No? Maybe an example will make things clear:</p>
<pre>CL-USER&gt; (setf (symbol-function 'counter) (make-counter 0))
#&lt;CLOSURE (LAMBDA ()) {1003714249}&gt;
CL-USER&gt; (counter)
1
CL-USER&gt; (counter)
2
CL-USER&gt; (counter)
3</pre>
<p>For those who don&#8217;t know Haskell either (and for whom, I think, this post won&#8217;t make much sense) it doesn&#8217;t allow side-effects. What does that mean? Well, amongst other things, you can&#8217;t modify variables once they are initialised. So you wouldn&#8217;t be able to increment seed in a Haskell program (well, actually you can with monads, but that&#8217;s another story). His reply was short but eloquent:</p>
<pre>[1..]</pre>
<p>Yeah, sure, Haskell generators, so elegant and concise. I must admit I was kind of pissed so I foolishly threw the glove: &#8220;Lisp can do this too, with reader macros. I will implement Haskell-like generators in Lisp if you implement my example in Haskell&#8221;.</p>
<p>Next time: lazy lists in Lisp a.k.a. streams.</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/codelake.wordpress.com/4/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/codelake.wordpress.com/4/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/codelake.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/codelake.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/codelake.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/codelake.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/codelake.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/codelake.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/codelake.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/codelake.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/codelake.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/codelake.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/codelake.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/codelake.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/codelake.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/codelake.wordpress.com/4/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=codelake.wordpress.com&amp;blog=3402600&amp;post=4&amp;subd=codelake&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://codelake.wordpress.com/2008/04/07/functional-challenge-i/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/89dea263c93172a1255bbcfa57291b26?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Alex</media:title>
		</media:content>
	</item>
		<item>
		<title>The mandatory &#8220;what&#8217;s all this about&#8221; post</title>
		<link>http://codelake.wordpress.com/2008/04/07/the-mandatory-whats-all-this-about-post/</link>
		<comments>http://codelake.wordpress.com/2008/04/07/the-mandatory-whats-all-this-about-post/#comments</comments>
		<pubDate>Mon, 07 Apr 2008 07:41:11 +0000</pubDate>
		<dc:creator>Alex Muscar</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Misc]]></category>

		<guid isPermaLink="false">http://codelake.wordpress.com/?p=3</guid>
		<description><![CDATA[What&#8217;s this blog all about? Programming. But there are lots and lots of programming blogs out there. Why another one? Because there&#8217;s always something new an exciting to be discovered in programming. That&#8217;s it. Let&#8217;s get to the first post.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=codelake.wordpress.com&amp;blog=3402600&amp;post=3&amp;subd=codelake&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<ul>
<li>What&#8217;s this blog all about?<br />
Programming.</li>
<li>But there are lots and lots of programming blogs out there. Why another one?<br />
Because there&#8217;s always something new an exciting to be discovered in programming.</li>
</ul>
<p>That&#8217;s it. Let&#8217;s get to the first post.</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/codelake.wordpress.com/3/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/codelake.wordpress.com/3/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/codelake.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/codelake.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/codelake.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/codelake.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/codelake.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/codelake.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/codelake.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/codelake.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/codelake.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/codelake.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/codelake.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/codelake.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/codelake.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/codelake.wordpress.com/3/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=codelake.wordpress.com&amp;blog=3402600&amp;post=3&amp;subd=codelake&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://codelake.wordpress.com/2008/04/07/the-mandatory-whats-all-this-about-post/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/89dea263c93172a1255bbcfa57291b26?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Alex</media:title>
		</media:content>
	</item>
	</channel>
</rss>
