<?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: tinypy: did i mention metaprogramming?</title>
	<atom:link href="http://www.philhassey.com/blog/2008/04/21/tinypy-did-i-mention-metaprogramming/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.philhassey.com/blog/2008/04/21/tinypy-did-i-mention-metaprogramming/</link>
	<description>game dev blog</description>
	<lastBuildDate>Sun, 29 Aug 2010 18:58:00 -0600</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Lennart Regebro</title>
		<link>http://www.philhassey.com/blog/2008/04/21/tinypy-did-i-mention-metaprogramming/comment-page-1/#comment-2803</link>
		<dc:creator>Lennart Regebro</dc:creator>
		<pubDate>Wed, 30 Apr 2008 21:39:10 +0000</pubDate>
		<guid isPermaLink="false">http://www.philhassey.com/blog/2008/04/21/tinypy-did-i-mention-metaprogramming/#comment-2803</guid>
		<description>I have to admit that I didn&#039;t understand any of the answers. :)

I don&#039;t want a do until btw. Because that doesn&#039;t work with the indentation in a reasonable way. I just want an until.

until x:
  do something

Would work like &quot;while x&quot; except that it would always loop once.</description>
		<content:encoded><![CDATA[<p>I have to admit that I didn&#8217;t understand any of the answers. <img src='http://www.philhassey.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>I don&#8217;t want a do until btw. Because that doesn&#8217;t work with the indentation in a reasonable way. I just want an until.</p>
<p>until x:<br />
  do something</p>
<p>Would work like &#8220;while x&#8221; except that it would always loop once.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: a random John</title>
		<link>http://www.philhassey.com/blog/2008/04/21/tinypy-did-i-mention-metaprogramming/comment-page-1/#comment-2531</link>
		<dc:creator>a random John</dc:creator>
		<pubDate>Wed, 23 Apr 2008 15:47:35 +0000</pubDate>
		<guid isPermaLink="false">http://www.philhassey.com/blog/2008/04/21/tinypy-did-i-mention-metaprogramming/#comment-2531</guid>
		<description>Awesome.  &#039;$&#039; should be short for &#039;self.&#039; similar to how &#039;?&#039; was short for &#039;print&#039; in basic.</description>
		<content:encoded><![CDATA[<p>Awesome.  &#8216;$&#8217; should be short for &#8217;self.&#8217; similar to how &#8216;?&#8217; was short for &#8216;print&#8217; in basic.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: philhassey</title>
		<link>http://www.philhassey.com/blog/2008/04/21/tinypy-did-i-mention-metaprogramming/comment-page-1/#comment-2506</link>
		<dc:creator>philhassey</dc:creator>
		<pubDate>Tue, 22 Apr 2008 17:08:15 +0000</pubDate>
		<guid isPermaLink="false">http://www.philhassey.com/blog/2008/04/21/tinypy-did-i-mention-metaprogramming/#comment-2506</guid>
		<description>@Doug

I feel enlightened.  Sort of.</description>
		<content:encoded><![CDATA[<p>@Doug</p>
<p>I feel enlightened.  Sort of.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: philhassey</title>
		<link>http://www.philhassey.com/blog/2008/04/21/tinypy-did-i-mention-metaprogramming/comment-page-1/#comment-2505</link>
		<dc:creator>philhassey</dc:creator>
		<pubDate>Tue, 22 Apr 2008 15:57:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.philhassey.com/blog/2008/04/21/tinypy-did-i-mention-metaprogramming/#comment-2505</guid>
		<description>@nevinera replying to she: &quot;you clearly only know languages in which it is difficult then.&quot;

I think in the case of tinypy, I&#039;d categorize my &quot;adding decorators by an import&quot; as &quot;hard enough that I had to think&quot; but not so hard that it took me more than half an hour.</description>
		<content:encoded><![CDATA[<p>@nevinera replying to she: &#8220;you clearly only know languages in which it is difficult then.&#8221;</p>
<p>I think in the case of tinypy, I&#8217;d categorize my &#8220;adding decorators by an import&#8221; as &#8220;hard enough that I had to think&#8221; but not so hard that it took me more than half an hour.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: damien</title>
		<link>http://www.philhassey.com/blog/2008/04/21/tinypy-did-i-mention-metaprogramming/comment-page-1/#comment-2504</link>
		<dc:creator>damien</dc:creator>
		<pubDate>Tue, 22 Apr 2008 15:46:20 +0000</pubDate>
		<guid isPermaLink="false">http://www.philhassey.com/blog/2008/04/21/tinypy-did-i-mention-metaprogramming/#comment-2504</guid>
		<description>actually a do.. until can be done relatively easily, if you allow a &quot;until cond&quot; statements anywhere in the block and treat them as &quot;if cond: break&quot;

better yet, just have a &quot;do:&quot; statement which is an infinite loop and break out of it with &quot;if cond: break&quot;

do:
   stmt
   stmt
   until x &gt; 1
   stmt
   until othercond</description>
		<content:encoded><![CDATA[<p>actually a do.. until can be done relatively easily, if you allow a &#8220;until cond&#8221; statements anywhere in the block and treat them as &#8220;if cond: break&#8221;</p>
<p>better yet, just have a &#8220;do:&#8221; statement which is an infinite loop and break out of it with &#8220;if cond: break&#8221;</p>
<p>do:<br />
   stmt<br />
   stmt<br />
   until x &gt; 1<br />
   stmt<br />
   until othercond</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Doug Napoleone</title>
		<link>http://www.philhassey.com/blog/2008/04/21/tinypy-did-i-mention-metaprogramming/comment-page-1/#comment-2503</link>
		<dc:creator>Doug Napoleone</dc:creator>
		<pubDate>Tue, 22 Apr 2008 15:32:32 +0000</pubDate>
		<guid isPermaLink="false">http://www.philhassey.com/blog/2008/04/21/tinypy-did-i-mention-metaprogramming/#comment-2503</guid>
		<description>&quot;Until you read &#039;the art of the meta object protocol&#039;, implemented the actuator, and have taught it to someone else, you do not know what meta-programming is. That said, once you do that, please explain it to me.&quot; -Quote from prolog users mailing list.

That is from my quotes.txt file that I have been building for the past 15 years. ;-)

@Lennart:

As for the until statement, you can create that extension quite easily in python, it just looks weird:

@until(lambda x: x==4)
def loop():
    do some work
    return vars_to_be_tested

Also there are better logic constructs that you can do with the &#039;with&#039; statement as well. I feel that is a better meme than the until statement as it supports error handling and cleanup in a much more sane manner. @contextmanager rocks!

To quote Tim Peters from 2000:

To summarize 10 years of fruitless discussion on this issue:  yes,

    while 1:
        ...
        if finished:
            break

is the intended way to spell &quot;do ... until&quot; in Python.

&quot;do ... until F&quot; is better than &quot;do ... while F&quot; because the truth of F
conjoined with the loop invariant and loop precondition should imply the
loop postcondition, and the &quot;while&quot; form artificially negates the F of
interest, thus making reasoning harder.

&quot;do ... while F&quot; is better than &quot;do ... until F&quot; because the truth of F
conjoined with the loop invariant and loop precondition should imply that
the loop invariant still holds, and the &quot;until&quot; form artificially negates
the F of interest, thus making reasoning harder.

Python&#039;s indentation rules do indeed not fit well with either form.  If
there were an obvious way to make them fit well, Guido would have done so a long time ago.  In the meantime, if you think you see one, write a PEP!

and-no-of-course-uninitialized-vrbls-exist-in-python-ly y&#039;rs  - tim</description>
		<content:encoded><![CDATA[<p>&#8220;Until you read &#8216;the art of the meta object protocol&#8217;, implemented the actuator, and have taught it to someone else, you do not know what meta-programming is. That said, once you do that, please explain it to me.&#8221; -Quote from prolog users mailing list.</p>
<p>That is from my quotes.txt file that I have been building for the past 15 years. <img src='http://www.philhassey.com/blog/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p>@Lennart:</p>
<p>As for the until statement, you can create that extension quite easily in python, it just looks weird:</p>
<p>@until(lambda x: x==4)<br />
def loop():<br />
    do some work<br />
    return vars_to_be_tested</p>
<p>Also there are better logic constructs that you can do with the &#8216;with&#8217; statement as well. I feel that is a better meme than the until statement as it supports error handling and cleanup in a much more sane manner. @contextmanager rocks!</p>
<p>To quote Tim Peters from 2000:</p>
<p>To summarize 10 years of fruitless discussion on this issue:  yes,</p>
<p>    while 1:<br />
        &#8230;<br />
        if finished:<br />
            break</p>
<p>is the intended way to spell &#8220;do &#8230; until&#8221; in Python.</p>
<p>&#8220;do &#8230; until F&#8221; is better than &#8220;do &#8230; while F&#8221; because the truth of F<br />
conjoined with the loop invariant and loop precondition should imply the<br />
loop postcondition, and the &#8220;while&#8221; form artificially negates the F of<br />
interest, thus making reasoning harder.</p>
<p>&#8220;do &#8230; while F&#8221; is better than &#8220;do &#8230; until F&#8221; because the truth of F<br />
conjoined with the loop invariant and loop precondition should imply that<br />
the loop invariant still holds, and the &#8220;until&#8221; form artificially negates<br />
the F of interest, thus making reasoning harder.</p>
<p>Python&#8217;s indentation rules do indeed not fit well with either form.  If<br />
there were an obvious way to make them fit well, Guido would have done so a long time ago.  In the meantime, if you think you see one, write a PEP!</p>
<p>and-no-of-course-uninitialized-vrbls-exist-in-python-ly y&#8217;rs  &#8211; tim</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: tonetheman</title>
		<link>http://www.philhassey.com/blog/2008/04/21/tinypy-did-i-mention-metaprogramming/comment-page-1/#comment-2497</link>
		<dc:creator>tonetheman</dc:creator>
		<pubDate>Tue, 22 Apr 2008 12:33:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.philhassey.com/blog/2008/04/21/tinypy-did-i-mention-metaprogramming/#comment-2497</guid>
		<description>Man that is cool</description>
		<content:encoded><![CDATA[<p>Man that is cool</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: she</title>
		<link>http://www.philhassey.com/blog/2008/04/21/tinypy-did-i-mention-metaprogramming/comment-page-1/#comment-2495</link>
		<dc:creator>she</dc:creator>
		<pubDate>Tue, 22 Apr 2008 10:23:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.philhassey.com/blog/2008/04/21/tinypy-did-i-mention-metaprogramming/#comment-2495</guid>
		<description>One problem is, IMO the word &quot;meta&quot; programming. To me it implies that there is so much magic involved that not even the programmer knows whats going on anymore</description>
		<content:encoded><![CDATA[<p>One problem is, IMO the word &#8220;meta&#8221; programming. To me it implies that there is so much magic involved that not even the programmer knows whats going on anymore</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Lennart Regebro</title>
		<link>http://www.philhassey.com/blog/2008/04/21/tinypy-did-i-mention-metaprogramming/comment-page-1/#comment-2493</link>
		<dc:creator>Lennart Regebro</dc:creator>
		<pubDate>Tue, 22 Apr 2008 10:00:11 +0000</pubDate>
		<guid isPermaLink="false">http://www.philhassey.com/blog/2008/04/21/tinypy-did-i-mention-metaprogramming/#comment-2493</guid>
		<description>Ooh, nice. It&#039;s always annoyed me that Python doesn&#039;t have an until-statement, and that I can&#039;t add one without changing the c-code. Not that I&#039;m actually going to start using TinyPy just because of this, but it&#039;s still nice. :)</description>
		<content:encoded><![CDATA[<p>Ooh, nice. It&#8217;s always annoyed me that Python doesn&#8217;t have an until-statement, and that I can&#8217;t add one without changing the c-code. Not that I&#8217;m actually going to start using TinyPy just because of this, but it&#8217;s still nice. <img src='http://www.philhassey.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
</channel>
</rss>
