<?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>porges &#187; Links</title>
	<atom:link href="http://porg.es/blog/tag/links/feed" rel="self" type="application/rss+xml" />
	<link>http://porg.es/blog</link>
	<description></description>
	<lastBuildDate>Thu, 12 Jan 2012 23:45:56 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Matching checklists using Haskell</title>
		<link>http://porg.es/blog/matching-checklists-using-haskell</link>
		<comments>http://porg.es/blog/matching-checklists-using-haskell#comments</comments>
		<pubDate>Wed, 23 Jan 2008 08:52:55 +0000</pubDate>
		<dc:creator>Porges</dc:creator>
				<category><![CDATA[replies]]></category>
		<category><![CDATA[comparison]]></category>
		<category><![CDATA[Haskell]]></category>
		<category><![CDATA[Links]]></category>
		<category><![CDATA[lisp]]></category>

		<guid isPermaLink="false">http://porg.es/blog/matching-checklists-using-haskell</guid>
		<description><![CDATA[Our target for this exercise is “Things that other languages should take from Lisp”. Bignum support In Scheme and Common Lisp, by default you can&#8217;t overflow an integer&#8230; Prelude&#62; fac n = product &#91;2..n&#93; Prelude&#62; fac 100 933262154439441526816992388562667004907159682643816214685929638952175999932299156089414639761565182862536979208272237582 51185210916864000000000000000000000000 In Common Lisp, you can force your code to use fixed-size numbers (fixnums) for efficiency&#8230; Prelude&#62; [...]]]></description>
			<content:encoded><![CDATA[<p>Our target for this exercise is “<a href="http://repinvariant.blogspot.com/2008/01/thoughts-on-lisp-things-that-other.html">Things that other languages should take from Lisp</a>”.</p>
<h3>Bignum support</h3>
<blockquote><p>In Scheme and Common Lisp, by default you can&#8217;t overflow an integer&#8230;</p>
</blockquote>

<div class="wp_syntax"><div class="code"><pre class="haskell" style="font-family:monospace;">Prelude<span style="color: #339933; font-weight: bold;">&gt;</span> fac n <span style="color: #339933; font-weight: bold;">=</span> <span style="font-weight: bold;">product</span> <span style="color: green;">&#91;</span><span style="color: red;">2</span><span style="color: #339933; font-weight: bold;">..</span>n<span style="color: green;">&#93;</span>
Prelude<span style="color: #339933; font-weight: bold;">&gt;</span> fac <span style="color: red;">100</span>
<span style="color: red;">933262154439441526816992388562667004907159682643816214685929638952175999932299156089414639761565182862536979208272237582</span>
<span style="color: red;">51185210916864000000000000000000000000</span></pre></div></div>

<blockquote><p>In Common Lisp, you can force your code to use fixed-size numbers (fixnums) for efficiency&#8230;</p>
</blockquote>

<div class="wp_syntax"><div class="code"><pre class="haskell" style="font-family:monospace;">Prelude<span style="color: #339933; font-weight: bold;">&gt;</span> <span style="color: #06c; font-weight: bold;">let</span> fac n <span style="color: #339933; font-weight: bold;">=</span> <span style="font-weight: bold;">product</span> <span style="color: green;">&#91;</span><span style="color: red;">2</span><span style="color: #339933; font-weight: bold;">..</span>n<span style="color: green;">&#93;</span> <span style="color: #339933; font-weight: bold;">::</span> <span style="color: #cccc00; font-weight: bold;">Int</span>
Prelude<span style="color: #339933; font-weight: bold;">&gt;</span> fac <span style="color: red;">17</span>
<span style="color: #339933; font-weight: bold;">-</span><span style="color: red;">288522240</span></pre></div></div>

<blockquote><p>Ruby and Python, by default, treat language-integers as logical-integers. Java, C, C++, and Perl don&#8217;t.</p>
</blockquote>

<div class="wp_syntax"><div class="code"><pre class="haskell" style="font-family:monospace;">Prelude<span style="color: #339933; font-weight: bold;">&gt;</span> :t <span style="color: red;">15</span>
<span style="color: red;">15</span> <span style="color: #339933; font-weight: bold;">::</span> <span style="color: green;">&#40;</span><span style="color: #cccc00; font-weight: bold;">Num</span> t<span style="color: green;">&#41;</span> <span style="color: #339933; font-weight: bold;">=&gt;</span> t</pre></div></div>

<h3>Optional type declarations</h3>
<blockquote><p>[Common Lisp] allows, but does not require, type declarations.</p>
</blockquote>

<div class="wp_syntax"><div class="code"><pre class="haskell" style="font-family:monospace;">Prelude<span style="color: #339933; font-weight: bold;">&gt;</span> <span style="color: #06c; font-weight: bold;">let</span> doubleApply f x <span style="color: #339933; font-weight: bold;">=</span> f <span style="color: green;">&#40;</span>f x<span style="color: green;">&#41;</span>
Prelude<span style="color: #339933; font-weight: bold;">&gt;</span> :t doubleApply
doubleApply <span style="color: #339933; font-weight: bold;">::</span> <span style="color: green;">&#40;</span>t <span style="color: #339933; font-weight: bold;">-&gt;</span> t<span style="color: green;">&#41;</span> <span style="color: #339933; font-weight: bold;">-&gt;</span> t <span style="color: #339933; font-weight: bold;">-&gt;</span> t</pre></div></div>

<blockquote><p>The compiler can also use type declarations to perform compile-time typechecking. (Sadly, it isn&#8217;t <em>required</em> to do this.)</p>
</blockquote>

<div class="wp_syntax"><div class="code"><pre class="haskell" style="font-family:monospace;">Prelude<span style="color: #339933; font-weight: bold;">&gt;</span> doubleApply <span style="color: red;">3</span> doubleApply
&nbsp;
<span style="color: #339933; font-weight: bold;">&lt;</span>interactive<span style="color: #339933; font-weight: bold;">&gt;</span>:<span style="color: red;">1</span>:<span style="color: red;">12</span>:
    No <span style="color: #06c; font-weight: bold;">instance</span> for <span style="color: green;">&#40;</span><span style="color: #cccc00; font-weight: bold;">Num</span> <span style="color: green;">&#40;</span><span style="color: green;">&#40;</span><span style="color: green;">&#40;</span>t <span style="color: #339933; font-weight: bold;">-&gt;</span> t<span style="color: green;">&#41;</span> <span style="color: #339933; font-weight: bold;">-&gt;</span> t <span style="color: #339933; font-weight: bold;">-&gt;</span> t<span style="color: green;">&#41;</span> <span style="color: #339933; font-weight: bold;">-&gt;</span> <span style="color: green;">&#40;</span>t <span style="color: #339933; font-weight: bold;">-&gt;</span> t<span style="color: green;">&#41;</span> <span style="color: #339933; font-weight: bold;">-&gt;</span> t <span style="color: #339933; font-weight: bold;">-&gt;</span> t<span style="color: green;">&#41;</span><span style="color: green;">&#41;</span>
      arising from the literal `<span style="color: red;">3</span>' at <span style="color: #339933; font-weight: bold;">&lt;</span>interactive<span style="color: #339933; font-weight: bold;">&gt;</span>:<span style="color: red;">1</span>:<span style="color: red;">12</span></pre></div></div>

<h3>Tail recursion</h3>
<blockquote><p>Proper (unbounded) tail-recursion (Scheme.)</p>
</blockquote>

<div class="wp_syntax"><div class="code"><pre class="haskell" style="font-family:monospace;">Prelude<span style="color: #339933; font-weight: bold;">&gt;</span> <span style="color: #06c; font-weight: bold;">let</span> loop <span style="color: #339933; font-weight: bold;">=</span> <span style="color: #06c; font-weight: bold;">do</span> <span style="color: green;">&#123;</span> <span style="font-weight: bold;">putStr</span> <span style="background-color: #3cb371;">&quot;.&quot;</span>; loop <span style="color: green;">&#125;</span>
Prelude<span style="color: #339933; font-weight: bold;">&gt;</span> loop
<span style="color: #339933; font-weight: bold;">......................................</span>
<span style="color: #339933; font-weight: bold;">......................................</span>
<span style="color: green;">&#91;</span>etc<span style="color: green;">&#93;</span>
<span style="color: #339933; font-weight: bold;">......................................</span>
<span style="color: #339933; font-weight: bold;">..........................</span>Interrupted<span style="color: #339933; font-weight: bold;">.</span></pre></div></div>

<p>(But see <a href="http://www.haskell.org/haskellwiki/Stack_overflow">the Haskell wiki</a>. Laziness introduces a small trick here.)</p>
<h3>Functions which depend upon the type of multiple arguments</h3>
<blockquote><p>Methods with multiple-dispatch (Common Lisp.)</p>
</blockquote>
<p>(This doesn’t <em>exactly</em> match conceptually because Haskell doesn’t have nominal overloading.)</p>

<div class="wp_syntax"><div class="code"><pre class="haskell" style="font-family:monospace;">multi Nothing Nothing <span style="color: #339933; font-weight: bold;">=</span> <span style="color: red;">0</span>
multi <span style="color: green;">&#40;</span>Just x<span style="color: green;">&#41;</span> <span style="color: green;">&#40;</span>Just y<span style="color: green;">&#41;</span> <span style="color: #339933; font-weight: bold;">=</span> x <span style="color: #339933; font-weight: bold;">+</span> y
multi Nothing <span style="color: green;">&#40;</span>Just y<span style="color: green;">&#41;</span> <span style="color: #339933; font-weight: bold;">=</span> y
multi <span style="color: green;">&#40;</span>Just x<span style="color: green;">&#41;</span> Nothing <span style="color: #339933; font-weight: bold;">=</span> x</pre></div></div>

<h3>Fast implementations</h3>
<blockquote><p>Some Lisp implementations are fast.</p>
</blockquote>
<p><a href="http://shootout.alioth.debian.org/gp4/benchmark.php?test=all&amp;lang=all&amp;xfullcpu=1&amp;xmem=0&amp;xloc=0&amp;binarytrees=1&amp;chameneosredux=1&amp;fannkuch=1&amp;fasta=1&amp;knucleotide=1&amp;mandelbrot=1&amp;meteor=1&amp;nbody=1&amp;nsieve=1&amp;nsievebits=1&amp;partialsums=1&amp;pidigits=1&amp;recursive=1&amp;regexdna=1&amp;revcomp=1&amp;spectralnorm=1&amp;hello=1&amp;sumcol=1&amp;threadring=1&amp;calc=Calculate">Haskell  #7 on the Great Language Shootout</a> (in terms of speed), and getting faster by the day as the backend of GHC is rewritten.</p>
<h3>Syntactic Simplicity</h3>
<blockquote><p>Syntactic simplicity (Scheme.)</p>
</blockquote>
<p><a href="http://haskell.org/onlinereport/syntax-iso.html#sect9.5">The Haskell <abbr title="Context-Free Grammar">CFG</abbr>.</a></p>
<blockquote><p>Or perhaps Python is another incarnation of syntactic simplicity.</p>
</blockquote>
<p><a href="http://haskell.org/onlinereport/lexemes.html#lexemes-layout">The Layout Rule</a></p>
]]></content:encoded>
			<wfw:commentRss>http://porg.es/blog/matching-checklists-using-haskell/feed</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Coprophagic genius?</title>
		<link>http://porg.es/blog/coprophagic-genius</link>
		<comments>http://porg.es/blog/coprophagic-genius#comments</comments>
		<pubDate>Thu, 07 Apr 2005 04:45:54 +0000</pubDate>
		<dc:creator>Porges</dc:creator>
				<category><![CDATA[Links]]></category>

		<guid isPermaLink="false">http://porges.name/blog/coprophagic-genius</guid>
		<description><![CDATA[Spartacus Jellybean: Diarrhoea for your dining pleasure.]]></description>
			<content:encoded><![CDATA[<p>Spartacus Jellybean: <a href="http://brainstab.blogspot.com/2005/04/diarrhoea-for-your-dining-pleasure.html">Diarrhoea for your dining pleasure</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://porg.es/blog/coprophagic-genius/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Just how safe is your credit card?</title>
		<link>http://porg.es/blog/just-how-safe-is-your-credit-card</link>
		<comments>http://porg.es/blog/just-how-safe-is-your-credit-card#comments</comments>
		<pubDate>Wed, 02 Mar 2005 03:13:40 +0000</pubDate>
		<dc:creator>Porges</dc:creator>
				<category><![CDATA[Links]]></category>

		<guid isPermaLink="false">http://porges.name/blog/just-how-safe-is-your-credit-card</guid>
		<description><![CDATA[The Credit Card Prank: This is a work of genius.]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.zug.com/pranks/credit/index.html">The Credit Card Prank</a>: This is a work of genius.</p>
]]></content:encoded>
			<wfw:commentRss>http://porg.es/blog/just-how-safe-is-your-credit-card/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Unhappy Birthday</title>
		<link>http://porg.es/blog/unhappy-birthday</link>
		<comments>http://porg.es/blog/unhappy-birthday#comments</comments>
		<pubDate>Tue, 01 Mar 2005 22:22:01 +0000</pubDate>
		<dc:creator>Porges</dc:creator>
				<category><![CDATA[Links]]></category>

		<guid isPermaLink="false">http://porges.name/blog/unhappy-birthday</guid>
		<description><![CDATA[Unhappy Birthday: Let ASCAP know about copyright-infringing performances of &#8220;Happy Birthday&#8221;.]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.unhappybirthday.com/">Unhappy Birthday</a>: Let ASCAP know about copyright-infringing performances of &#8220;Happy Birthday&#8221;.</p>
]]></content:encoded>
			<wfw:commentRss>http://porg.es/blog/unhappy-birthday/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>IRARK SPECIAL REPORT!</title>
		<link>http://porg.es/blog/irark-special-report</link>
		<comments>http://porg.es/blog/irark-special-report#comments</comments>
		<pubDate>Tue, 01 Mar 2005 22:18:33 +0000</pubDate>
		<dc:creator>Porges</dc:creator>
				<category><![CDATA[Links]]></category>

		<guid isPermaLink="false">http://porges.name/blog/irark-special-report</guid>
		<description><![CDATA[IRARK SPECIAL REPORT!: 1988 Retired US-Soldier John R. fights along with his former superior and side by side with islamic jihadis against a foreign occupying power in the central-asian desert. 2003 An Anglo-American coalition begins its military action in the gulf.]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.monochrom.at/irark/index-eng.htm">IRARK SPECIAL REPORT!</a>:</p>
<dl>
<dt>1988</dt>
<dd>Retired US-Soldier John R. fights along with his former superior<br />
and side by side with islamic jihadis against a foreign occupying power in<br />
the central-asian desert.</dd>
<dt>2003</dt>
<dd>An Anglo-American coalition begins its military action in the gulf.</dd>
</dl>
]]></content:encoded>
			<wfw:commentRss>http://porg.es/blog/irark-special-report/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Yahoo search needs improvement</title>
		<link>http://porg.es/blog/yahoo-search-needs-improvement</link>
		<comments>http://porg.es/blog/yahoo-search-needs-improvement#comments</comments>
		<pubDate>Tue, 01 Mar 2005 22:15:06 +0000</pubDate>
		<dc:creator>Porges</dc:creator>
				<category><![CDATA[Links]]></category>

		<guid isPermaLink="false">http://porges.name/blog/yahoo-search-needs-improvement</guid>
		<description><![CDATA[Yahoo Search and Iñtërnâtiônàlizætiøn: Encoding problems with Yahoo&#8217;s new search API.]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.intertwingly.net/blog/2005/03/01/Yahoo-Search-and-I18n">Yahoo Search and Iñtërnâtiônàlizætiøn</a>: Encoding problems with Yahoo&#8217;s new search API.</p>
]]></content:encoded>
			<wfw:commentRss>http://porg.es/blog/yahoo-search-needs-improvement/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Street-legal MP3s</title>
		<link>http://porg.es/blog/street-legal-mp3s</link>
		<comments>http://porg.es/blog/street-legal-mp3s#comments</comments>
		<pubDate>Tue, 01 Mar 2005 22:13:51 +0000</pubDate>
		<dc:creator>Porges</dc:creator>
				<category><![CDATA[Links]]></category>

		<guid isPermaLink="false">http://porges.name/blog/street-legal-mp3s</guid>
		<description><![CDATA[Street-legal MP3s: A link list to MP3 sites (both commerical and free) which have tracks for download, &#8220;unencumbered&#8221; with DRM technology.]]></description>
			<content:encoded><![CDATA[<p><a href="http://folk.uio.no/gisle/fun/mp3.html">Street-legal MP3s</a>: A link list to MP3 sites (both commerical and free) which have tracks for download, &#8220;unencumbered&#8221; with DRM technology.</p>
]]></content:encoded>
			<wfw:commentRss>http://porg.es/blog/street-legal-mp3s/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>What do you really mean?</title>
		<link>http://porg.es/blog/what-do-you-really-mean</link>
		<comments>http://porg.es/blog/what-do-you-really-mean#comments</comments>
		<pubDate>Tue, 01 Mar 2005 22:10:41 +0000</pubDate>
		<dc:creator>Porges</dc:creator>
				<category><![CDATA[Links]]></category>

		<guid isPermaLink="false">http://porges.name/blog/what-do-you-really-mean</guid>
		<description><![CDATA[What do you really mean?: A take on Muriel Newman&#8217;s latest straw-grabbing attempt.]]></description>
			<content:encoded><![CDATA[<p><a href="http://dogbitingmen.blogspot.com/2005/02/what-do-you-really-mean.html">What do you really mean?</a>: A take on Muriel Newman&#8217;s latest straw-grabbing attempt.</p>
]]></content:encoded>
			<wfw:commentRss>http://porg.es/blog/what-do-you-really-mean/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PBF</title>
		<link>http://porg.es/blog/perry-bible-fellowship</link>
		<comments>http://porg.es/blog/perry-bible-fellowship#comments</comments>
		<pubDate>Mon, 28 Feb 2005 07:07:44 +0000</pubDate>
		<dc:creator>Porges</dc:creator>
				<category><![CDATA[Links]]></category>

		<guid isPermaLink="false">http://porges.name/blog/perry-bible-fellowship</guid>
		<description><![CDATA[Perry Bible Fellowship: A great series of cartoons.]]></description>
			<content:encoded><![CDATA[<p><a href="http://cheston.com/pbf/archive.html">Perry Bible Fellowship</a>: A great series of cartoons.</p>
]]></content:encoded>
			<wfw:commentRss>http://porg.es/blog/perry-bible-fellowship/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

