<?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: Pickle: An interesting stack language</title>
	<atom:link href="http://peadrop.com/blog/2007/06/18/pickle-an-interesting-stack-language/feed/" rel="self" type="application/rss+xml" />
	<link>http://peadrop.com/blog/2007/06/18/pickle-an-interesting-stack-language/</link>
	<description>Random Computer Musings</description>
	<pubDate>Mon, 06 Oct 2008 19:56:21 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
		<item>
		<title>By: Georg</title>
		<link>http://peadrop.com/blog/2007/06/18/pickle-an-interesting-stack-language/#comment-146</link>
		<dc:creator>Georg</dc:creator>
		<pubDate>Fri, 20 Jul 2007 13:52:27 +0000</pubDate>
		<guid isPermaLink="false">http://peadrop.com/blog/2007/06/18/pickle-an-interesting-stack-language/#comment-146</guid>
		<description>&lt;p&gt;Nice post! I do hope you add builtin support for sets (and frozensets) to the unified pickle for Py3k, while you're at it :)&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Nice post! I do hope you add builtin support for sets (and frozensets) to the unified pickle for Py3k, while you&#8217;re at it <img src='http://peadrop.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>]]></content:encoded>
	</item>
	<item>
		<title>By: Alexandre</title>
		<link>http://peadrop.com/blog/2007/06/18/pickle-an-interesting-stack-language/#comment-148</link>
		<dc:creator>Alexandre</dc:creator>
		<pubDate>Wed, 20 Jun 2007 14:46:30 +0000</pubDate>
		<guid isPermaLink="false">http://peadrop.com/blog/2007/06/18/pickle-an-interesting-stack-language/#comment-148</guid>
		<description>&lt;p&gt;Eduardo, it is because I haven't asked yet, since I don't know whom to ask. I am already on &lt;a href="http://soc.python.org/" rel="nofollow"&gt;Planet Python/SoC&lt;/a&gt;, though.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Eduardo, it is because I haven&#8217;t asked yet, since I don&#8217;t know whom to ask. I am already on <a href="http://soc.python.org/" rel="nofollow">Planet Python/SoC</a>, though.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Eduardo Padoan</title>
		<link>http://peadrop.com/blog/2007/06/18/pickle-an-interesting-stack-language/#comment-147</link>
		<dc:creator>Eduardo Padoan</dc:creator>
		<pubDate>Wed, 20 Jun 2007 03:41:01 +0000</pubDate>
		<guid isPermaLink="false">http://peadrop.com/blog/2007/06/18/pickle-an-interesting-stack-language/#comment-147</guid>
		<description>&lt;p&gt;Why isn't your blog aggregated at Planet Python yet? :)
It seems that you are learning some cool things with GSoC!
Bad suggestion: you could receive 2 strings in my_if and eval then, to make it lazy and usable in a pickle stream.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Why isn&#8217;t your blog aggregated at Planet Python yet? <img src='http://peadrop.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> It seems that you are learning some cool things with GSoC!
Bad suggestion: you could receive 2 strings in my_if and eval then, to make it lazy and usable in a pickle stream.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Alexandre</title>
		<link>http://peadrop.com/blog/2007/06/18/pickle-an-interesting-stack-language/#comment-155</link>
		<dc:creator>Alexandre</dc:creator>
		<pubDate>Tue, 19 Jun 2007 15:47:52 +0000</pubDate>
		<guid isPermaLink="false">http://peadrop.com/blog/2007/06/18/pickle-an-interesting-stack-language/#comment-155</guid>
		<description>&lt;p&gt;Thanks everyone for your cheerful comments. I am surprised by how this post caught up. I guess I share my knowledge more often, then.&lt;/p&gt;

&lt;p&gt;Arnar, yes indeed, that is a solution.  That wouldn't be usable in a pickle stream, however, since you cannot create functions in them.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Thanks everyone for your cheerful comments. I am surprised by how this post caught up. I guess I share my knowledge more often, then.</p>

<p>Arnar, yes indeed, that is a solution.  That wouldn&#8217;t be usable in a pickle stream, however, since you cannot create functions in them.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Arnar</title>
		<link>http://peadrop.com/blog/2007/06/18/pickle-an-interesting-stack-language/#comment-154</link>
		<dc:creator>Arnar</dc:creator>
		<pubDate>Tue, 19 Jun 2007 09:27:35 +0000</pubDate>
		<guid isPermaLink="false">http://peadrop.com/blog/2007/06/18/pickle-an-interesting-stack-language/#comment-154</guid>
		<description>&lt;p&gt;Cool article.&lt;/p&gt;

&lt;p&gt;The problem with my_if is that it's not lazy. You can use lambda to make it lazy:&lt;/p&gt;

&lt;pre&gt;&lt;code class="prettyprint"&gt;def my_if(cond, then_val, else_val):
    if cond:
        return then_val()
    else:
        return else_val()

def factorial(n):
    return my_if(n==1, lambda: 1, lambda: n * factorial(n-1))&lt;/code&gt;&lt;/pre&gt;

&lt;pre&gt;&lt;code&gt;&#62;&#62;&#62; factorial(2)
2
&#62;&#62;&#62; factorial(15)
1307674368000L&lt;/code&gt;&lt;/pre&gt;
</description>
		<content:encoded><![CDATA[<p>Cool article.</p>

<p>The problem with my_if is that it&#8217;s not lazy. You can use lambda to make it lazy:</p>

<pre><code class="prettyprint">def my_if(cond, then_val, else_val):
    if cond:
        return then_val()
    else:
        return else_val()

def factorial(n):
    return my_if(n==1, lambda: 1, lambda: n * factorial(n-1))</code></pre>

<pre><code>&gt;&gt;&gt; factorial(2)
2
&gt;&gt;&gt; factorial(15)
1307674368000L</code></pre>]]></content:encoded>
	</item>
	<item>
		<title>By: Scott Lamb</title>
		<link>http://peadrop.com/blog/2007/06/18/pickle-an-interesting-stack-language/#comment-149</link>
		<dc:creator>Scott Lamb</dc:creator>
		<pubDate>Tue, 19 Jun 2007 04:40:38 +0000</pubDate>
		<guid isPermaLink="false">http://peadrop.com/blog/2007/06/18/pickle-an-interesting-stack-language/#comment-149</guid>
		<description>&lt;p&gt;Very timely. I was just thinking that a streaming unpickler would be necessary to make &lt;a href="http://repo.or.cz/w/fast-export.git?a=blob;f=git-p4;h=2040591383e93db3544b50a118f8151062591d3d;hb=82f6aacdb7fc1cc4baf9e46bed471f61177066d5" rel="nofollow"&gt;git-p4&lt;/a&gt;'s readP4Files not require crazy amounts of memory, and here you've described the format. Bookmarked.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Very timely. I was just thinking that a streaming unpickler would be necessary to make <a href="http://repo.or.cz/w/fast-export.git?a=blob;f=git-p4;h=2040591383e93db3544b50a118f8151062591d3d;hb=82f6aacdb7fc1cc4baf9e46bed471f61177066d5" rel="nofollow">git-p4</a>&#8217;s readP4Files not require crazy amounts of memory, and here you&#8217;ve described the format. Bookmarked.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: grzywacz</title>
		<link>http://peadrop.com/blog/2007/06/18/pickle-an-interesting-stack-language/#comment-150</link>
		<dc:creator>grzywacz</dc:creator>
		<pubDate>Tue, 19 Jun 2007 00:11:56 +0000</pubDate>
		<guid isPermaLink="false">http://peadrop.com/blog/2007/06/18/pickle-an-interesting-stack-language/#comment-150</guid>
		<description>&lt;p&gt;A very nice post indeed. Thanks for sharing your knowledge. :)&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>A very nice post indeed. Thanks for sharing your knowledge. <img src='http://peadrop.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>]]></content:encoded>
	</item>
	<item>
		<title>By: Jesse</title>
		<link>http://peadrop.com/blog/2007/06/18/pickle-an-interesting-stack-language/#comment-151</link>
		<dc:creator>Jesse</dc:creator>
		<pubDate>Mon, 18 Jun 2007 23:46:32 +0000</pubDate>
		<guid isPermaLink="false">http://peadrop.com/blog/2007/06/18/pickle-an-interesting-stack-language/#comment-151</guid>
		<description>&lt;p&gt;This is really fantastic!&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>This is really fantastic!</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Simon</title>
		<link>http://peadrop.com/blog/2007/06/18/pickle-an-interesting-stack-language/#comment-153</link>
		<dc:creator>Simon</dc:creator>
		<pubDate>Mon, 18 Jun 2007 20:13:29 +0000</pubDate>
		<guid isPermaLink="false">http://peadrop.com/blog/2007/06/18/pickle-an-interesting-stack-language/#comment-153</guid>
		<description>&lt;p&gt;Fun!&lt;/p&gt;

&lt;p&gt;This is exactly the kind of post I like to read.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Fun!</p>

<p>This is exactly the kind of post I like to read.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Brett</title>
		<link>http://peadrop.com/blog/2007/06/18/pickle-an-interesting-stack-language/#comment-152</link>
		<dc:creator>Brett</dc:creator>
		<pubDate>Mon, 18 Jun 2007 19:17:58 +0000</pubDate>
		<guid isPermaLink="false">http://peadrop.com/blog/2007/06/18/pickle-an-interesting-stack-language/#comment-152</guid>
		<description>&lt;p&gt;Nice post!  I had never bothered to look at how pickle worked.  It also now makes more sense why pickle exists on top of there also being marshal.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Nice post!  I had never bothered to look at how pickle worked.  It also now makes more sense why pickle exists on top of there also being marshal.</p>]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.364 seconds -->
