<?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/"
	xmlns:creativeCommons="http://backend.userland.com/creativeCommonsRssModule"	>
<channel>
	<title>Comments on: Lazy Fibonacci</title>
	<atom:link href="http://www.kuliniewicz.org/blog/archives/2008/05/05/lazy-fibonacci/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.kuliniewicz.org/blog/archives/2008/05/05/lazy-fibonacci/</link>
	<description>After all, it could only cost you your life, and you got that for free.</description>
	<lastBuildDate>Sat, 28 Aug 2010 11:58:50 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Paul Kuliniewicz</title>
		<link>http://www.kuliniewicz.org/blog/archives/2008/05/05/lazy-fibonacci/comment-page-1/#comment-1917</link>
		<dc:creator>Paul Kuliniewicz</dc:creator>
		<pubDate>Sun, 11 May 2008 02:33:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.kuliniewicz.org/blog/?p=777#comment-1917</guid>
		<description>Is there something in that code that&#039;s getting garbled by WordPress?</description>
		<content:encoded><![CDATA[<p>Is there something in that code that&#8217;s getting garbled by WordPress?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Eric Leons</title>
		<link>http://www.kuliniewicz.org/blog/archives/2008/05/05/lazy-fibonacci/comment-page-1/#comment-1916</link>
		<dc:creator>Eric Leons</dc:creator>
		<pubDate>Sat, 10 May 2008 10:07:58 +0000</pubDate>
		<guid isPermaLink="false">http://www.kuliniewicz.org/blog/?p=777#comment-1916</guid>
		<description>Welcome to the functional party,

You are probably not writing in a Haskell-y enough syntax

This feels better syntax to me:
&lt;code&gt;
main = do argv &lt;- getArgs
          name  hPutStr stderr $ &quot;usage: &quot; ++ name ++ &quot; number\n&quot;
            x:xs -&gt; C.catch (putStr $ &quot;Fibonacci number #&quot; ++ x ++ &quot; is &quot; ++ (show result) ++ &quot;\n&quot;)               
                            (\_ -&gt; hPutStr stderr &quot;Must give a nonnegative integer\n&quot;)
                     where result = fibonacci !! read x
&lt;/code&gt;
Ideally I would also remove the catch clause and make better use of the Either datatype</description>
		<content:encoded><![CDATA[<p>Welcome to the functional party,</p>
<p>You are probably not writing in a Haskell-y enough syntax</p>
<p>This feels better syntax to me:<br />
<code><br />
main = do argv &lt;- getArgs<br />
          name  hPutStr stderr $ "usage: " ++ name ++ " number\n"<br />
            x:xs -&gt; C.catch (putStr $ "Fibonacci number #" ++ x ++ " is " ++ (show result) ++ "\n")<br />
                            (\_ -&gt; hPutStr stderr "Must give a nonnegative integer\n")<br />
                     where result = fibonacci !! read x<br />
</code><br />
Ideally I would also remove the catch clause and make better use of the Either datatype</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Eric Leons</title>
		<link>http://www.kuliniewicz.org/blog/archives/2008/05/05/lazy-fibonacci/comment-page-1/#comment-1915</link>
		<dc:creator>Eric Leons</dc:creator>
		<pubDate>Sat, 10 May 2008 10:07:18 +0000</pubDate>
		<guid isPermaLink="false">http://www.kuliniewicz.org/blog/?p=777#comment-1915</guid>
		<description>Welcome to the functional party,

You are probably not writing in a Haskell-y enough syntax

This feels better syntax to me:

main = do argv &lt;- getArgs
          name  hPutStr stderr $ &quot;usage: &quot; ++ name ++ &quot; number\n&quot;
            x:xs -&gt; C.catch (putStr $ &quot;Fibonacci number #&quot; ++ x ++ &quot; is &quot; ++ (show result) ++ &quot;\n&quot;)               
                            (\_ -&gt; hPutStr stderr &quot;Must give a nonnegative integer\n&quot;)
                     where result = fibonacci !! read x

Ideally I would also remove the catch clause and make better use of the Either datatype</description>
		<content:encoded><![CDATA[<p>Welcome to the functional party,</p>
<p>You are probably not writing in a Haskell-y enough syntax</p>
<p>This feels better syntax to me:</p>
<p>main = do argv &lt;- getArgs<br />
          name  hPutStr stderr $ &#8220;usage: &#8221; ++ name ++ &#8221; number\n&#8221;<br />
            x:xs -&gt; C.catch (putStr $ &#8220;Fibonacci number #&#8221; ++ x ++ &#8221; is &#8221; ++ (show result) ++ &#8220;\n&#8221;)<br />
                            (\_ -&gt; hPutStr stderr &#8220;Must give a nonnegative integer\n&#8221;)<br />
                     where result = fibonacci !! read x</p>
<p>Ideally I would also remove the catch clause and make better use of the Either datatype</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Paul Kuliniewicz</title>
		<link>http://www.kuliniewicz.org/blog/archives/2008/05/05/lazy-fibonacci/comment-page-1/#comment-1914</link>
		<dc:creator>Paul Kuliniewicz</dc:creator>
		<pubDate>Sat, 10 May 2008 03:53:38 +0000</pubDate>
		<guid isPermaLink="false">http://www.kuliniewicz.org/blog/?p=777#comment-1914</guid>
		<description>Frickin&#039; monads.</description>
		<content:encoded><![CDATA[<p>Frickin&#8217; monads.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ryan</title>
		<link>http://www.kuliniewicz.org/blog/archives/2008/05/05/lazy-fibonacci/comment-page-1/#comment-1912</link>
		<dc:creator>Ryan</dc:creator>
		<pubDate>Sat, 10 May 2008 03:32:26 +0000</pubDate>
		<guid isPermaLink="false">http://www.kuliniewicz.org/blog/?p=777#comment-1912</guid>
		<description>This is cool!  (monads?)</description>
		<content:encoded><![CDATA[<p>This is cool!  (monads?)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Paul Kuliniewicz</title>
		<link>http://www.kuliniewicz.org/blog/archives/2008/05/05/lazy-fibonacci/comment-page-1/#comment-1900</link>
		<dc:creator>Paul Kuliniewicz</dc:creator>
		<pubDate>Tue, 06 May 2008 23:32:17 +0000</pubDate>
		<guid isPermaLink="false">http://www.kuliniewicz.org/blog/?p=777#comment-1900</guid>
		<description>The Haskell code is just using the standard definition of Fibonacci numbers; it&#039;s just written in a way that&#039;s not immediately obvious.

Fun math fact about Haskell: its input/output mechanism is based around monads, which are adapted from category theory.  Once I wrap my head a little better around monads in Haskell I&#039;ll probably do a post or two on them, since it is kind of neat once it all clicks together.</description>
		<content:encoded><![CDATA[<p>The Haskell code is just using the standard definition of Fibonacci numbers; it&#8217;s just written in a way that&#8217;s not immediately obvious.</p>
<p>Fun math fact about Haskell: its input/output mechanism is based around monads, which are adapted from category theory.  Once I wrap my head a little better around monads in Haskell I&#8217;ll probably do a post or two on them, since it is kind of neat once it all clicks together.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jamie Weigandt</title>
		<link>http://www.kuliniewicz.org/blog/archives/2008/05/05/lazy-fibonacci/comment-page-1/#comment-1899</link>
		<dc:creator>Jamie Weigandt</dc:creator>
		<pubDate>Tue, 06 May 2008 23:01:14 +0000</pubDate>
		<guid isPermaLink="false">http://www.kuliniewicz.org/blog/?p=777#comment-1899</guid>
		<description>So I kinda wondered about using CRT and found this little undergrad project:

http://www.math.oregonstate.edu/~math_reu/Proceedings/2003/AM_Final.pdf

Looks like the computations are significantly faster, though I guess they don&#039;t precisely use CRT in the end. I didn&#039;t really read a lot of it, and you could be using that method. I just like that my intuition to use CRT kind of worked out.</description>
		<content:encoded><![CDATA[<p>So I kinda wondered about using CRT and found this little undergrad project:</p>
<p><a href="http://www.math.oregonstate.edu/~math_reu/Proceedings/2003/AM_Final.pdf" rel="nofollow"></a><a href='http://www.math.oregonstate.edu/~math_reu/Proceedings/2003/AM_Final.pdf'>http://www.math.oregonstate.edu/~math_reu/Proceedings/2003/AM_Final.pdf</a></p>
<p>Looks like the computations are significantly faster, though I guess they don&#8217;t precisely use CRT in the end. I didn&#8217;t really read a lot of it, and you could be using that method. I just like that my intuition to use CRT kind of worked out.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Paul Kuliniewicz</title>
		<link>http://www.kuliniewicz.org/blog/archives/2008/05/05/lazy-fibonacci/comment-page-1/#comment-1898</link>
		<dc:creator>Paul Kuliniewicz</dc:creator>
		<pubDate>Tue, 06 May 2008 22:17:56 +0000</pubDate>
		<guid isPermaLink="false">http://www.kuliniewicz.org/blog/?p=777#comment-1898</guid>
		<description>Depending on the application, the closed form equation may not be more efficient, especially if (like the Haskell solution) you&#039;re saving a copy of your results for later use.  If your list of Fibonacci numbers is in the processor&#039;s cache, it&#039;s possibly faster to look something up in the list than it is to do some floating point operations.  Of course, you&#039;d need to actually profile the code to see if that&#039;s truly the case on your target system.

Having said that, I can&#039;t recall ever running into a program that needed to compute Fibonacci numbers where the problem to be solved wasn&#039;t explicitly &quot;compute Fibonacci numbers.&quot;</description>
		<content:encoded><![CDATA[<p>Depending on the application, the closed form equation may not be more efficient, especially if (like the Haskell solution) you&#8217;re saving a copy of your results for later use.  If your list of Fibonacci numbers is in the processor&#8217;s cache, it&#8217;s possibly faster to look something up in the list than it is to do some floating point operations.  Of course, you&#8217;d need to actually profile the code to see if that&#8217;s truly the case on your target system.</p>
<p>Having said that, I can&#8217;t recall ever running into a program that needed to compute Fibonacci numbers where the problem to be solved wasn&#8217;t explicitly &#8220;compute Fibonacci numbers.&#8221;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jamie Weigandt</title>
		<link>http://www.kuliniewicz.org/blog/archives/2008/05/05/lazy-fibonacci/comment-page-1/#comment-1897</link>
		<dc:creator>Jamie Weigandt</dc:creator>
		<pubDate>Tue, 06 May 2008 05:54:36 +0000</pubDate>
		<guid isPermaLink="false">http://www.kuliniewicz.org/blog/?p=777#comment-1897</guid>
		<description>If there&#039;s anything I learned last summer, its that computers and infinity don&#039;t mix, but apparently they can hang out.
This little though experiment may be useful when working with elliptic curves, but its 2am....

Though if you&#039;re computing Fibonacci numbers wouldn&#039;t it be a lot more efficient use the formula involving the golden ratio?

Now I want to try something with chinese remainder and fibonacci numbers, but its still 2am...</description>
		<content:encoded><![CDATA[<p>If there&#8217;s anything I learned last summer, its that computers and infinity don&#8217;t mix, but apparently they can hang out.<br />
This little though experiment may be useful when working with elliptic curves, but its 2am&#8230;.</p>
<p>Though if you&#8217;re computing Fibonacci numbers wouldn&#8217;t it be a lot more efficient use the formula involving the golden ratio?</p>
<p>Now I want to try something with chinese remainder and fibonacci numbers, but its still 2am&#8230;</p>
]]></content:encoded>
	</item>
</channel>
</rss>
