<?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>Drinkable Chicken &#187; haskell</title>
	<atom:link href="http://4.flowsnake.org/archives/tag/haskell/feed" rel="self" type="application/rss+xml" />
	<link>http://4.flowsnake.org</link>
	<description>A Pythoneer&#039;s adventures with Scheme, etc.</description>
	<lastBuildDate>Fri, 15 Jul 2011 08:53:43 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>Fear and prejudice</title>
		<link>http://4.flowsnake.org/archives/1058</link>
		<comments>http://4.flowsnake.org/archives/1058#comments</comments>
		<pubDate>Wed, 27 Apr 2011 04:06:12 +0000</pubDate>
		<dc:creator>Hans Nowak</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[haskell]]></category>

		<guid isPermaLink="false">http://4.flowsnake.org/?p=1058</guid>
		<description><![CDATA[I&#8217;ve taken up the unholy plan to start learning Haskell. I already knew a little bit of it, and of its predecessor, Miranda. But I have only been scratching the surface; I&#8217;m at a loss when looking at non-trivial Haskell code (and possibly even trivial examples). Problem is, when confronted with it, part of my [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve taken up the unholy plan to start learning Haskell. I already knew a little bit of it, and of its predecessor, <a href="http://miranda.org.uk/">Miranda</a>. But I have only been scratching the surface; I&#8217;m at a loss when looking at non-trivial Haskell code (and possibly even trivial examples).</p>
<p>Problem is, when confronted with it, part of my brain kicks into gear, and complains. <em>This looks suspiciously like math! And you suck at math! You don&#8217;t belong here! This language is not for you! You will not be able to understand the more complicated constructions!</em></p>
<p>And that is exactly one of the reasons why I want to learn it&#8230; or at least, more of it. I want to challenge myself. I don&#8217;t know how far I will get. It&#8217;s very alien territory. Along the way, I expect to encounter:</p>
<ul>
<li>a completely different way of building programs, and thinking about them</li>
<li>static typing (naturally), something I dislike greatly because it gets in my way</li>
<li>language zealotry (already saw some of that while casually browsing haskell-cafe; no need for a link though)</li>
<li>intellectual pretentiousness</li>
<li>lots of hairy math (category theory?!)</li>
<li>notions of what is considered &#8220;good programming style and habits&#8221;, that fly in the face of what I am used to</li>
<li>limited practical usefulness at first (until I understand the deeper aspects of the language, and how to use it properly)</li>
</ul>
<p>And I will have to deal with this somehow. How it will work out, I don&#8217;t know. Maybe I&#8217;ll come back screaming after a few days; I might not be ready for it. But we&#8217;ll see.</p>
<p>Another reason for wanting to learn it is this article: <a href="http://www.jerf.org/iri/post/2908">Why I&#8217;m interested in Haskell</a>. One of the points the author makes is that Haskell is one of the few languages where actual <em>new</em> stuff is being invented. Actual new stuff, not rehashed concepts that Lisp or Smalltalk had decades ago.</p>
<p>(I have been looking for such a language for a long time. Python was a &#8220;paradigm shift&#8221; for me when I first learned it started understanding the power of dynamic languages. But for the last few years I have been wondering what there would be &#8220;after&#8221; Python. Is there a language that would give you similar gains over Python, as Python gave over C/C++/Pascal and their ilk? Maybe Lisp, but aside from the syntactic flexibility (by way of macros), it isn&#8217;t <em>that</em> different, as the aforementioned article points out. Haskell on the other hand, is a completely different beast &#8212; hard to understand, but with definite benefits, and possibly worth the effort.)</p>
<p>In any case, for right now this will just be another hobby project of mine&#8230; Interesting developments, if any, will be reported here.</p>
]]></content:encoded>
			<wfw:commentRss>http://4.flowsnake.org/archives/1058/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Haskell search engines</title>
		<link>http://4.flowsnake.org/archives/450</link>
		<comments>http://4.flowsnake.org/archives/450#comments</comments>
		<pubDate>Thu, 15 Jan 2009 15:49:46 +0000</pubDate>
		<dc:creator>Hans Nowak</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[haskell]]></category>

		<guid isPermaLink="false">http://4.flowsnake.org/?p=450</guid>
		<description><![CDATA[I didn&#8217;t know this, but there are two specialized search engines for Haskell: Hoogle and Hayoo!. Both of them allow you to search for Haskell functions by name or type signature. Unlike its general-purpose counterpart, Hayoo seems to return the best results. For example, you can look for all packages that have a function foldl, [...]]]></description>
			<content:encoded><![CDATA[<p>I didn&#8217;t know this, but there are two specialized search engines for Haskell: <a href="http://www.haskell.org/hoogle/">Hoogle</a> and <a href="http://holumbus.fh-wedel.de/hayoo/hayoo.html">Hayoo!</a>. Both of them allow you to search for Haskell functions by name or type signature.</p>
<p>Unlike its general-purpose counterpart, Hayoo seems to return the best results. For example, you can look for all packages that have a function <a href="http://holumbus.fh-wedel.de/hayoo/hayoo.html#0:foldl">foldl</a>, or for the functions in the <a href="http://holumbus.fh-wedel.de/hayoo/hayoo.html#0:AVL">Data.Tree.AVL</a> package.</p>
<p>Now if we only had such a beast for Python&#8230; :-)</p>
]]></content:encoded>
			<wfw:commentRss>http://4.flowsnake.org/archives/450/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Cool listcomp</title>
		<link>http://4.flowsnake.org/archives/6</link>
		<comments>http://4.flowsnake.org/archives/6#comments</comments>
		<pubDate>Sat, 29 Dec 2007 15:09:02 +0000</pubDate>
		<dc:creator>Hans Nowak</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[haskell]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://4.flowsnake.org/archives/6</guid>
		<description><![CDATA[Check this post, which demonstrates the power of Haskell&#8217;s list comprehensions: f :: Int -&#62; [ (Int, Int, Int) ] f n = [ (x, y, z) &#124; x &#60;- [ 1 .. n ], y &#60;- [ x+1 .. n ], z &#60;- [ y+1 .. n ], (x * x) + (y * [...]]]></description>
			<content:encoded><![CDATA[<p>Check <a title="I think my brain just exploded" href="http://enfranchisedmind.com/blog/2007/12/28/i-think-my-brain-just-exploded/">this post</a>, which demonstrates the power of Haskell&#8217;s list comprehensions:</p>
<pre>f :: Int -&gt; [ (Int, Int, Int) ]

f n = [ (x, y, z) |
x &lt;- [ 1 .. n ],
y &lt;- [ x+1 .. n ],
z &lt;- [ y+1 .. n ],
(x * x) + (y * y) == (z * z) ]</pre>
<p>I first thought there was some special magic going on, like maybe some Prolog-like matching, but then I realized that you can do the same in Python:</p>
<pre>def f(n):
    return [(x,y,z)
            for x in range(1, n+1)
            for y in range(x+1, n+1)
            for z in range(y+1, n+1)
            if x*x + y*y == z*z]
print f(20)</pre>
<p>(Which isn&#8217;t so surprising after all, as Python &#8220;borrowed&#8221; list comprehensions from Haskell&#8230; but still.)</p>
]]></content:encoded>
			<wfw:commentRss>http://4.flowsnake.org/archives/6/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

