<?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: Algorithmic puzzle</title>
	<atom:link href="http://existentialtype.net/2008/09/08/algorithmic-puzzle/feed/" rel="self" type="application/rss+xml" />
	<link>http://existentialtype.net/2008/09/08/algorithmic-puzzle/</link>
	<description>For People Who Like Type and Types</description>
	<lastBuildDate>Thu, 10 May 2012 12:36:27 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
	<item>
		<title>By: washburn</title>
		<link>http://existentialtype.net/2008/09/08/algorithmic-puzzle/comment-page-1/#comment-24495</link>
		<dc:creator>washburn</dc:creator>
		<pubDate>Mon, 15 Sep 2008 19:14:45 +0000</pubDate>
		<guid isPermaLink="false">http://existentialtype.net/?p=266#comment-24495</guid>
		<description>@Matthew:  I haven&#039;t had a chance to think through all of the code presented, but it does at least upon a naïve inspection seem to have the correct behavior and running time.  So if nothing else it looks like a good start.  Thanks!</description>
		<content:encoded><![CDATA[<p>@Matthew:  I haven&#8217;t had a chance to think through all of the code presented, but it does at least upon a naïve inspection seem to have the correct behavior and running time.  So if nothing else it looks like a good start.  Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Matthew</title>
		<link>http://existentialtype.net/2008/09/08/algorithmic-puzzle/comment-page-1/#comment-24462</link>
		<dc:creator>Matthew</dc:creator>
		<pubDate>Fri, 12 Sep 2008 22:39:43 +0000</pubDate>
		<guid isPermaLink="false">http://existentialtype.net/?p=266#comment-24462</guid>
		<description>This any use?

http://haskell.org/pipermail/haskell-cafe/2007-August/029816.html

http://twan.home.fmf.nl/blog/haskell/Knuth-Morris-Pratt-in-Haskell.details</description>
		<content:encoded><![CDATA[<p>This any use?</p>
<p><a href="http://haskell.org/pipermail/haskell-cafe/2007-August/029816.html" rel="nofollow">http://haskell.org/pipermail/haskell-cafe/2007-August/029816.html</a></p>
<p><a href="http://twan.home.fmf.nl/blog/haskell/Knuth-Morris-Pratt-in-Haskell.details" rel="nofollow">http://twan.home.fmf.nl/blog/haskell/Knuth-Morris-Pratt-in-Haskell.details</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: washburn</title>
		<link>http://existentialtype.net/2008/09/08/algorithmic-puzzle/comment-page-1/#comment-24419</link>
		<dc:creator>washburn</dc:creator>
		<pubDate>Mon, 08 Sep 2008 18:55:42 +0000</pubDate>
		<guid isPermaLink="false">http://existentialtype.net/?p=266#comment-24419</guid>
		<description>@thom:  No, we can&#039;t.  The &lt;code&gt;Seq&lt;/code&gt; type already has a &lt;code&gt;length&lt;/code&gt; method, it is just not guaranteed to terminate.  Furthermore, we can&#039;t use &lt;code&gt;instanceOf&lt;/code&gt; to decide what to do because we can&#039;t know ahead of time all possible classes that might mix in the &lt;code&gt;Seq&lt;/code&gt; trait.</description>
		<content:encoded><![CDATA[<p>@thom:  No, we can&#8217;t.  The <code>Seq</code> type already has a <code>length</code> method, it is just not guaranteed to terminate.  Furthermore, we can&#8217;t use <code>instanceOf</code> to decide what to do because we can&#8217;t know ahead of time all possible classes that might mix in the <code>Seq</code> trait.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: thom</title>
		<link>http://existentialtype.net/2008/09/08/algorithmic-puzzle/comment-page-1/#comment-24418</link>
		<dc:creator>thom</dc:creator>
		<pubDate>Mon, 08 Sep 2008 18:46:03 +0000</pubDate>
		<guid isPermaLink="false">http://existentialtype.net/?p=266#comment-24418</guid>
		<description>i don&#039;t know enough scala to give a proper answer.  most java code that has to deal with a situation like this however would use instanceOf for example:

int getSize(Iterable iterable) {
  if (iterable instanceof Collection) {
    return ((Collection) iterable).size();
  } else {
    // loop...
  }
}

can you distinguish between definitely finite and potentially infinite sequences in a similar way using instanceof in scala?</description>
		<content:encoded><![CDATA[<p>i don&#8217;t know enough scala to give a proper answer.  most java code that has to deal with a situation like this however would use instanceOf for example:</p>
<p>int getSize(Iterable iterable) {<br />
  if (iterable instanceof Collection) {<br />
    return ((Collection) iterable).size();<br />
  } else {<br />
    // loop&#8230;<br />
  }<br />
}</p>
<p>can you distinguish between definitely finite and potentially infinite sequences in a similar way using instanceof in scala?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: washburn</title>
		<link>http://existentialtype.net/2008/09/08/algorithmic-puzzle/comment-page-1/#comment-24416</link>
		<dc:creator>washburn</dc:creator>
		<pubDate>Mon, 08 Sep 2008 09:26:28 +0000</pubDate>
		<guid isPermaLink="false">http://existentialtype.net/?p=266#comment-24416</guid>
		<description>@Walter:  Sorry, but someone else will have to do that.  Frankly, I shouldn&#039;t even really be working on this bug at all, as I have a lot of work on Scala Classic to do and the deadlines are already too close.</description>
		<content:encoded><![CDATA[<p>@Walter:  Sorry, but someone else will have to do that.  Frankly, I shouldn&#8217;t even really be working on this bug at all, as I have a lot of work on Scala Classic to do and the deadlines are already too close.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Walter Chang</title>
		<link>http://existentialtype.net/2008/09/08/algorithmic-puzzle/comment-page-1/#comment-24415</link>
		<dc:creator>Walter Chang</dc:creator>
		<pubDate>Mon, 08 Sep 2008 09:19:26 +0000</pubDate>
		<guid isPermaLink="false">http://existentialtype.net/?p=266#comment-24415</guid>
		<description>i dont have an answer for you but do have one suggestion, though.  please provide overridden versions so that indexOf on finite seq can be fast and on infinite seq correct.  thanks!</description>
		<content:encoded><![CDATA[<p>i dont have an answer for you but do have one suggestion, though.  please provide overridden versions so that indexOf on finite seq can be fast and on infinite seq correct.  thanks!</p>
]]></content:encoded>
	</item>
</channel>
</rss>

