<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: First Stab at Learning Clojure</title>
	<atom:link href="http://justin.harmonize.fm/index.php/2009/03/first-stab-at-learning-clojure/feed/" rel="self" type="application/rss+xml" />
	<link>http://justin.harmonize.fm/index.php/2009/03/first-stab-at-learning-clojure/</link>
	<description>A cup of coffee and a soapbox is like a bottle of Jack and a gun.</description>
	<lastBuildDate>Fri, 03 Feb 2012 21:19:23 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
	<item>
		<title>By: justin</title>
		<link>http://justin.harmonize.fm/index.php/2009/03/first-stab-at-learning-clojure/comment-page-1/#comment-134</link>
		<dc:creator>justin</dc:creator>
		<pubDate>Tue, 17 Mar 2009 06:47:08 +0000</pubDate>
		<guid isPermaLink="false">http://justin.harmonize.fm/?p=161#comment-134</guid>
		<description>It&#039;s a bit better now, but I think I need to redo the site and make the fonts bigger.</description>
		<content:encoded><![CDATA[<p>It&#39;s a bit better now, but I think I need to redo the site and make the fonts bigger.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: weavejester</title>
		<link>http://justin.harmonize.fm/index.php/2009/03/first-stab-at-learning-clojure/comment-page-1/#comment-130</link>
		<dc:creator>weavejester</dc:creator>
		<pubDate>Tue, 10 Mar 2009 04:19:54 +0000</pubDate>
		<guid isPermaLink="false">http://justin.harmonize.fm/?p=161#comment-130</guid>
		<description>Clojure, like all lisps, treats the first item in a list as the thing to call, and the rest of the items in the list as its arguments. So (f x y) is equivalent to f(x, y) in Python. If you want to create a list, you have to write (list f x y), which is equivalent to list(f, x, y) in Python.&lt;br&gt;&lt;br&gt;Vectors, on the other hand, don&#039;t treat the first item any differently. So [f x y] in Clojure is the same as [f, x, y] in Python.&lt;br&gt;&lt;br&gt;Lisps like Clojure also have the notion of quoting, which languages like Python have no direct analogy to. By quoting an expression Clojure, we tell the compiler not to evaluate its contents. So (quote f x y) or &#039;(f x y) will return a list of unevaluated symbols. We can evaluate them later on with eval, if we so desire, so (eval (quote f x y)) is equivalent to (f x y).&lt;br&gt;&lt;br&gt;Oh, and you&#039;re right about conj - though in vectors conj appends to the end, whilst in lists it appends to the beginning.</description>
		<content:encoded><![CDATA[<p>Clojure, like all lisps, treats the first item in a list as the thing to call, and the rest of the items in the list as its arguments. So (f x y) is equivalent to f(x, y) in Python. If you want to create a list, you have to write (list f x y), which is equivalent to list(f, x, y) in Python.</p>
<p>Vectors, on the other hand, don&#39;t treat the first item any differently. So [f x y] in Clojure is the same as [f, x, y] in Python.</p>
<p>Lisps like Clojure also have the notion of quoting, which languages like Python have no direct analogy to. By quoting an expression Clojure, we tell the compiler not to evaluate its contents. So (quote f x y) or &#39;(f x y) will return a list of unevaluated symbols. We can evaluate them later on with eval, if we so desire, so (eval (quote f x y)) is equivalent to (f x y).</p>
<p>Oh, and you&#39;re right about conj &#8211; though in vectors conj appends to the end, whilst in lists it appends to the beginning.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: justin</title>
		<link>http://justin.harmonize.fm/index.php/2009/03/first-stab-at-learning-clojure/comment-page-1/#comment-129</link>
		<dc:creator>justin</dc:creator>
		<pubDate>Tue, 10 Mar 2009 03:32:07 +0000</pubDate>
		<guid isPermaLink="false">http://justin.harmonize.fm/?p=161#comment-129</guid>
		<description>Awesome, thanks! I wonder if there&#039;s a way for me to pull your changes...&lt;br&gt;&lt;br&gt;I totally agree with the bit about abstracting out html. I&#039;m planning on re-factoring frequently as I go along, to kind of show an evolution from the simplest case to a well designed piece of software.&lt;br&gt;&lt;br&gt;It&#039;s a bit easier to enforce this in other web frameworks that include the plumbing for these kind of abstractions in the first place, but I think I prefer this for learning the language. It abstracts away the details of dealing with HTTP requests and routing without getting in the way of the fun pieces. We&#039;ll see what comes out down the line as a result.</description>
		<content:encoded><![CDATA[<p>Awesome, thanks! I wonder if there&#39;s a way for me to pull your changes&#8230;</p>
<p>I totally agree with the bit about abstracting out html. I&#39;m planning on re-factoring frequently as I go along, to kind of show an evolution from the simplest case to a well designed piece of software.</p>
<p>It&#39;s a bit easier to enforce this in other web frameworks that include the plumbing for these kind of abstractions in the first place, but I think I prefer this for learning the language. It abstracts away the details of dealing with HTTP requests and routing without getting in the way of the fun pieces. We&#39;ll see what comes out down the line as a result.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: weavejester</title>
		<link>http://justin.harmonize.fm/index.php/2009/03/first-stab-at-learning-clojure/comment-page-1/#comment-128</link>
		<dc:creator>weavejester</dc:creator>
		<pubDate>Tue, 10 Mar 2009 03:22:32 +0000</pubDate>
		<guid isPermaLink="false">http://justin.harmonize.fm/?p=161#comment-128</guid>
		<description>You don&#039;t need to write html twice: the html function handles nested vectors easily enough. I&#039;d also tend to separate out the html generation into its own function and keep the servlet definition lightweight. It doesn&#039;t matter so much when you only have two lines of HTML, but keeping your views separate from what is essentially your routing table makes a lot of sense when things start to get more complex.&lt;br&gt;&lt;br&gt;Here&#039;s my fork of your gist: &lt;a href=&quot;http://gist.github.com/76507&quot; rel=&quot;nofollow&quot;&gt;http://gist.github.com/76507&lt;/a&gt;</description>
		<content:encoded><![CDATA[<p>You don&#39;t need to write html twice: the html function handles nested vectors easily enough. I&#39;d also tend to separate out the html generation into its own function and keep the servlet definition lightweight. It doesn&#39;t matter so much when you only have two lines of HTML, but keeping your views separate from what is essentially your routing table makes a lot of sense when things start to get more complex.</p>
<p>Here&#39;s my fork of your gist: <a href="http://gist.github.com/76507" rel="nofollow">http://gist.github.com/76507</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: justin</title>
		<link>http://justin.harmonize.fm/index.php/2009/03/first-stab-at-learning-clojure/comment-page-1/#comment-127</link>
		<dc:creator>justin</dc:creator>
		<pubDate>Tue, 10 Mar 2009 03:15:39 +0000</pubDate>
		<guid isPermaLink="false">http://justin.harmonize.fm/?p=161#comment-127</guid>
		<description>Ah, thanks.&lt;br&gt;&lt;br&gt;I was under the impression that () was also a list. So you could do (1 ((2) 3)). &lt;br&gt;&lt;br&gt;Also, it looks like &quot;conj&quot; can be applied to any sequence, but you&#039;re right about &quot;assoc&quot;. There are others too that only work with vectors according to &lt;a href=&quot;http://clojure.org/data_structures&quot; rel=&quot;nofollow&quot;&gt;http://clojure.org/data_structures&lt;/a&gt;.</description>
		<content:encoded><![CDATA[<p>Ah, thanks.</p>
<p>I was under the impression that () was also a list. So you could do (1 ((2) 3)). </p>
<p>Also, it looks like &#8220;conj&#8221; can be applied to any sequence, but you&#39;re right about &#8220;assoc&#8221;. There are others too that only work with vectors according to <a href="http://clojure.org/data_structures" rel="nofollow">http://clojure.org/data_structures</a>.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

