<?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"
	>
<channel>
	<title>Comments on: Round two of golf</title>
	<atom:link href="http://blag.tsukasa.net.au/2008/08/22/round-two-of-golf/feed/" rel="self" type="application/rss+xml" />
	<link>http://blag.tsukasa.net.au/2008/08/22/round-two-of-golf/</link>
	<description>Tech ramblings of Greg Darke, a University of Sydney student</description>
	<pubDate>Tue, 06 Jan 2009 20:09:40 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.5</generator>
		<item>
		<title>By: Tsukasa</title>
		<link>http://blag.tsukasa.net.au/2008/08/22/round-two-of-golf/#comment-6</link>
		<dc:creator>Tsukasa</dc:creator>
		<pubDate>Sat, 23 Aug 2008 16:45:24 +0000</pubDate>
		<guid isPermaLink="false">http://blag.tsukasa.net.au/2008/08/22/round-two-of-golf/#comment-6</guid>
		<description>James: Although that is a nice solution, it is not exactly a prime sieve... It requires the use of the modulus operator (which the prime sieve alleviates). Though, due to how python is implemented, your method might still be faster (though it does suffer from the recursion problem.</description>
		<content:encoded><![CDATA[<p>James: Although that is a nice solution, it is not exactly a prime sieve&#8230; It requires the use of the modulus operator (which the prime sieve alleviates). Though, due to how python is implemented, your method might still be faster (though it does suffer from the recursion problem.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: James C</title>
		<link>http://blag.tsukasa.net.au/2008/08/22/round-two-of-golf/#comment-5</link>
		<dc:creator>James C</dc:creator>
		<pubDate>Sat, 23 Aug 2008 02:23:33 +0000</pubDate>
		<guid isPermaLink="false">http://blag.tsukasa.net.au/2008/08/22/round-two-of-golf/#comment-5</guid>
		<description>72 characters:

_=lambda x:x and x[:1]+_([i for i in x if i%x[0]]);print _(range(2,1e3))

I should point out though that there is a limit to how high you can go with this one before you hit Python's maximum recursion depth...
It's also not one statement.</description>
		<content:encoded><![CDATA[<p>72 characters:</p>
<p>_=lambda x:x and x[:1]+_([i for i in x if i%x[0]]);print _(range(2,1e3))</p>
<p>I should point out though that there is a limit to how high you can go with this one before you hit Python&#8217;s maximum recursion depth&#8230;<br />
It&#8217;s also not one statement.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tsukasa</title>
		<link>http://blag.tsukasa.net.au/2008/08/22/round-two-of-golf/#comment-4</link>
		<dc:creator>Tsukasa</dc:creator>
		<pubDate>Fri, 22 Aug 2008 11:46:25 +0000</pubDate>
		<guid isPermaLink="false">http://blag.tsukasa.net.au/2008/08/22/round-two-of-golf/#comment-4</guid>
		<description>Don't forget that you are counting the newline character there... So your solution is actually 145 characters long...

I am sorry to say though, I am down to 132 (after a trip on the bus).

I have updated the main article to reflect my new solution.</description>
		<content:encoded><![CDATA[<p>Don&#8217;t forget that you are counting the newline character there&#8230; So your solution is actually 145 characters long&#8230;</p>
<p>I am sorry to say though, I am down to 132 (after a trip on the bus).</p>
<p>I have updated the main article to reflect my new solution.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tim</title>
		<link>http://blag.tsukasa.net.au/2008/08/22/round-two-of-golf/#comment-3</link>
		<dc:creator>Tim</dc:creator>
		<pubDate>Fri, 22 Aug 2008 11:36:10 +0000</pubDate>
		<guid isPermaLink="false">http://blag.tsukasa.net.au/2008/08/22/round-two-of-golf/#comment-3</guid>
		<description>Huzzah,

tim@tim-imac:/tmp/ncss$ wc -c prime_*
     146 prime_mine.py
     153 prime_original.py

tim@tim-imac:/tmp/ncss$ cat prime_mine.py 
print[n for(n,l)in[(((0,[]),(i,vars()['_[2]']))[i&#62;1])for i in range(1e3)]if n and not l.__setitem__(slice(n*2,None,n),[(0,None)]*len(l[n*2::n]))]</description>
		<content:encoded><![CDATA[<p>Huzzah,</p>
<p>tim@tim-imac:/tmp/ncss$ wc -c prime_*<br />
     146 prime_mine.py<br />
     153 prime_original.py</p>
<p>tim@tim-imac:/tmp/ncss$ cat prime_mine.py<br />
print[n for(n,l)in[(((0,[]),(i,vars()['_[2]&#8216;]))[i&gt;1])for i in range(1e3)]if n and not l.__setitem__(slice(n*2,None,n),[(0,None)]*len(l[n*2::n]))]</p>
]]></content:encoded>
	</item>
</channel>
</rss>
