<?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 for Entrepreneurship: Life Long Learning</title>
	<atom:link href="http://blog.tewk.com/?feed=comments-rss2" rel="self" type="application/rss+xml" />
	<link>http://blog.tewk.com</link>
	<description>Learn by doing.  Share the knowledge.</description>
	<lastBuildDate>Fri, 27 Oct 2006 04:26:43 -0600</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9-rare</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>Comment on RubyConf: RejectConf Summary by znmeb</title>
		<link>http://blog.tewk.com/?p=88&#038;cpage=1#comment-1049</link>
		<dc:creator>znmeb</dc:creator>
		<pubDate>Fri, 27 Oct 2006 04:26:43 +0000</pubDate>
		<guid isPermaLink="false">http://blog.tewk.com/?p=88#comment-1049</guid>
		<description>Actually, it&#039;s spelled Rameau :)

I&#039;ve got some more of the specs up at

http://rubyforge.org/cgi-bin/viewvc.cgi/Rameau/Rameau.pdf?root=cougar&amp;view=co</description>
		<content:encoded><![CDATA[<p>Actually, it&#8217;s spelled Rameau :)</p>
<p>I&#8217;ve got some more of the specs up at</p>
<p><a href="http://rubyforge.org/cgi-bin/viewvc.cgi/Rameau/Rameau.pdf?root=cougar&amp;view=co" rel="nofollow">http://rubyforge.org/cgi-bin/viewvc.cgi/Rameau/Rameau.pdf?root=cougar&amp;view=co</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Ruby Conf Day -1 by pate</title>
		<link>http://blog.tewk.com/?p=77&#038;cpage=1#comment-1030</link>
		<dc:creator>pate</dc:creator>
		<pubDate>Wed, 25 Oct 2006 15:04:15 +0000</pubDate>
		<guid isPermaLink="false">http://blog.tewk.com/?p=77#comment-1030</guid>
		<description>so, what&#039;s the word on Cardinal progress ... are Objects there yet?  Close to running BFTS?  Enquiring minds and all that.</description>
		<content:encoded><![CDATA[<p>so, what&#8217;s the word on Cardinal progress &#8230; are Objects there yet?  Close to running BFTS?  Enquiring minds and all that.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Lang.Net Symposium by levi</title>
		<link>http://blog.tewk.com/?p=76&#038;cpage=1#comment-858</link>
		<dc:creator>levi</dc:creator>
		<pubDate>Thu, 28 Sep 2006 21:26:01 +0000</pubDate>
		<guid isPermaLink="false">http://blog.tewk.com/?p=76#comment-858</guid>
		<description>This is really cool.  I&#039;m going to have to check out some of those videos.  This is truly what the internet is for.

It&#039;s interesting to see the justaposition of all the people putting highly dynamic languages into the CLR and JVM with the Spec# static analysis stuff.</description>
		<content:encoded><![CDATA[<p>This is really cool.  I&#8217;m going to have to check out some of those videos.  This is truly what the internet is for.</p>
<p>It&#8217;s interesting to see the justaposition of all the people putting highly dynamic languages into the CLR and JVM with the Spec# static analysis stuff.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Ruby Performace by levi</title>
		<link>http://blog.tewk.com/?p=71&#038;cpage=1#comment-807</link>
		<dc:creator>levi</dc:creator>
		<pubDate>Thu, 14 Sep 2006 03:59:51 +0000</pubDate>
		<guid isPermaLink="false">http://blog.tewk.com/?p=71#comment-807</guid>
		<description>Sorry, here&#039;s a URL: http://www.strongtalk.org/</description>
		<content:encoded><![CDATA[<p>Sorry, here&#8217;s a URL: <a href="http://www.strongtalk.org/" rel="nofollow">http://www.strongtalk.org/</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Ruby Performace by levi</title>
		<link>http://blog.tewk.com/?p=71&#038;cpage=1#comment-806</link>
		<dc:creator>levi</dc:creator>
		<pubDate>Thu, 14 Sep 2006 03:59:29 +0000</pubDate>
		<guid isPermaLink="false">http://blog.tewk.com/?p=71#comment-806</guid>
		<description>Given Ruby&#039;s familial relationship with Smalltalk, it might be worth looking at the newly open-sourced VM for Strongtalk, the fastest Smalltalk VM that ever was.  Using the techniques found in the Strongtalk VM would be excellent for any highly dynamic object oriented language, but it would be an especially good fit for Ruby.</description>
		<content:encoded><![CDATA[<p>Given Ruby&#8217;s familial relationship with Smalltalk, it might be worth looking at the newly open-sourced VM for Strongtalk, the fastest Smalltalk VM that ever was.  Using the techniques found in the Strongtalk VM would be excellent for any highly dynamic object oriented language, but it would be an especially good fit for Ruby.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Ruby and Closures by Sean Carley</title>
		<link>http://blog.tewk.com/?p=62&#038;cpage=1#comment-22</link>
		<dc:creator>Sean Carley</dc:creator>
		<pubDate>Mon, 24 Apr 2006 15:24:48 +0000</pubDate>
		<guid isPermaLink="false">http://blog.tewk.com/?p=62#comment-22</guid>
		<description>You might want to check out Artima&#039;s interview with Matz about this subject.  (http://www.artima.com/intv/closures.html)</description>
		<content:encoded><![CDATA[<p>You might want to check out Artima&#8217;s interview with Matz about this subject.  (<a href="http://www.artima.com/intv/closures.html" rel="nofollow">http://www.artima.com/intv/closures.html</a>)</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Ruby and Closures by levi</title>
		<link>http://blog.tewk.com/?p=62&#038;cpage=1#comment-21</link>
		<dc:creator>levi</dc:creator>
		<pubDate>Mon, 24 Apr 2006 03:00:15 +0000</pubDate>
		<guid isPermaLink="false">http://blog.tewk.com/?p=62#comment-21</guid>
		<description>I&#039;m not sure which implementation detail of continuations would suggest behavior that you were expecting.  Continuations are sometimes implemented by storing a copy of the call stack (which makes sense, considering that the call stack contains references to the computation left to be completed) but no copy of the data store (the heap) is made.  Since environments are sets of bindings of variables to locations in the data store, copying the environment doesn&#039;t keep the data store itself from changing.

I am a little fuzzier on the details of continuations than closures, though, so perhaps I&#039;m missing something.</description>
		<content:encoded><![CDATA[<p>I&#8217;m not sure which implementation detail of continuations would suggest behavior that you were expecting.  Continuations are sometimes implemented by storing a copy of the call stack (which makes sense, considering that the call stack contains references to the computation left to be completed) but no copy of the data store (the heap) is made.  Since environments are sets of bindings of variables to locations in the data store, copying the environment doesn&#8217;t keep the data store itself from changing.</p>
<p>I am a little fuzzier on the details of continuations than closures, though, so perhaps I&#8217;m missing something.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Ruby and Closures by Kevin Tew</title>
		<link>http://blog.tewk.com/?p=62&#038;cpage=1#comment-15</link>
		<dc:creator>Kevin Tew</dc:creator>
		<pubDate>Sun, 23 Apr 2006 21:59:34 +0000</pubDate>
		<guid isPermaLink="false">http://blog.tewk.com/?p=62#comment-15</guid>
		<description>Levi is definitely correct here.

I thought, incorrectly mind you, that closures copied the environments that they reference variables from.
This is not true.
Closures maintain pointers to the scopes they reference variables from, thereby keeping outer scopes alive and free from garbage collection.

Copy behavior, or at least copy on write indicative of continuations not closures, which are a whole other ballgame.

Here are some examples of closures that show that the environment is not copied only linked to.

Ruby:
class A
  def add_method(name)
    method_name = &quot;method&quot; + name.to_s
    self.class.send(:define_method, method_name , Proc.new { puts method_name; method_name = &quot;George&quot; + name.to_s } )
    method_name = &quot;method&quot; + name.to_s + &quot;2&quot;
    self.class.send(:define_method, method_name , Proc.new { puts method_name } )
  end
end

a = A.new
a.add_method(:a)
a.add_method(:b)
a.methoda
a.methodb
a.methoda2
a.methodb2

Perl:
#!/usr/bin/perl

sub a
{
  $m = 10;
  sub b
  {
    print $m . &quot;\n&quot;;
  }

  $m = 20;

  sub c
  {
    print $m . &quot;\n&quot;;
  }
}
a();
b();
c();

Scheme:
(define (a)
  (define b 10)
  (define (c) (printf &quot;~a~n&quot; b) (set! b 20))
  (set! b 15)
  (let ((d (lambda () (printf &quot;~a~n&quot; b))))
    (c)
    (d)
    ))

(a)</description>
		<content:encoded><![CDATA[<p>Levi is definitely correct here.</p>
<p>I thought, incorrectly mind you, that closures copied the environments that they reference variables from.<br />
This is not true.<br />
Closures maintain pointers to the scopes they reference variables from, thereby keeping outer scopes alive and free from garbage collection.</p>
<p>Copy behavior, or at least copy on write indicative of continuations not closures, which are a whole other ballgame.</p>
<p>Here are some examples of closures that show that the environment is not copied only linked to.</p>
<p>Ruby:<br />
class A<br />
  def add_method(name)<br />
    method_name = &#8220;method&#8221; + name.to_s<br />
    self.class.send(:define_method, method_name , Proc.new { puts method_name; method_name = &#8220;George&#8221; + name.to_s } )<br />
    method_name = &#8220;method&#8221; + name.to_s + &#8220;2&#8243;<br />
    self.class.send(:define_method, method_name , Proc.new { puts method_name } )<br />
  end<br />
end</p>
<p>a = A.new<br />
a.add_method(:a)<br />
a.add_method(:b)<br />
a.methoda<br />
a.methodb<br />
a.methoda2<br />
a.methodb2</p>
<p>Perl:<br />
#!/usr/bin/perl</p>
<p>sub a<br />
{<br />
  $m = 10;<br />
  sub b<br />
  {<br />
    print $m . &#8220;\n&#8221;;<br />
  }</p>
<p>  $m = 20;</p>
<p>  sub c<br />
  {<br />
    print $m . &#8220;\n&#8221;;<br />
  }<br />
}<br />
a();<br />
b();<br />
c();</p>
<p>Scheme:<br />
(define (a)<br />
  (define b 10)<br />
  (define (c) (printf &#8220;~a~n&#8221; b) (set! b 20))<br />
  (set! b 15)<br />
  (let ((d (lambda () (printf &#8220;~a~n&#8221; b))))<br />
    (c)<br />
    (d)<br />
    ))</p>
<p>(a)</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Ruby and Closures by levi</title>
		<link>http://blog.tewk.com/?p=62&#038;cpage=1#comment-14</link>
		<dc:creator>levi</dc:creator>
		<pubDate>Sat, 22 Apr 2006 23:59:36 +0000</pubDate>
		<guid isPermaLink="false">http://blog.tewk.com/?p=62#comment-14</guid>
		<description>I think you&#039;re getting a little confused over the concept of closures here.  In your initial example, you create a variable foo in the top-level scope.  In the proc, or block, or whatever Ruby calls them, you refer to a variable named foo.

Since no variable foo is defined within the block, the reference is lexically bound to the foo in the enclosing scope.  Note that foo inside the block now refers to the variable, or storage location, of the outer scope&#039;s foo.  Thus it is perfectly consistent with the idea of closure for a subsequent change to the value stored in the outer scope&#039;s variable foo to be visible within the block.

Closures mostly come into play when you create a variable at run-time, close over it with a lambda, block, or whatever, and return the resulting closure.  You haven&#039;t done this in your examples, so you&#039;re not really testing for closures.  Try making a function that returns an incrementor by closing over a counter variable that is created afresh upon function invocation and closing over it with a block that returns 1 plus the variable.  Then create a couple of incrementors with your function, store them in variables, and ensure they increment independantly of one another.</description>
		<content:encoded><![CDATA[<p>I think you&#8217;re getting a little confused over the concept of closures here.  In your initial example, you create a variable foo in the top-level scope.  In the proc, or block, or whatever Ruby calls them, you refer to a variable named foo.</p>
<p>Since no variable foo is defined within the block, the reference is lexically bound to the foo in the enclosing scope.  Note that foo inside the block now refers to the variable, or storage location, of the outer scope&#8217;s foo.  Thus it is perfectly consistent with the idea of closure for a subsequent change to the value stored in the outer scope&#8217;s variable foo to be visible within the block.</p>
<p>Closures mostly come into play when you create a variable at run-time, close over it with a lambda, block, or whatever, and return the resulting closure.  You haven&#8217;t done this in your examples, so you&#8217;re not really testing for closures.  Try making a function that returns an incrementor by closing over a counter variable that is created afresh upon function invocation and closing over it with a block that returns 1 plus the variable.  Then create a couple of incrementors with your function, store them in variables, and ensure they increment independantly of one another.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on C# 3.0 and XQuery by M.Rys</title>
		<link>http://blog.tewk.com/?p=29&#038;cpage=1#comment-2</link>
		<dc:creator>M.Rys</dc:creator>
		<pubDate>Wed, 14 Sep 2005 20:12:04 +0000</pubDate>
		<guid isPermaLink="false">http://blog.tewk.com/?p=29#comment-2</guid>
		<description>Hi. Thanks for pointing to my weblog. I just want to clarify that the posting titled &quot;Next version of SQL Server will start deprecating SQL in favor of XQuery&quot; was an April&#039;s Fool joke. :-)</description>
		<content:encoded><![CDATA[<p>Hi. Thanks for pointing to my weblog. I just want to clarify that the posting titled &#8220;Next version of SQL Server will start deprecating SQL in favor of XQuery&#8221; was an April&#8217;s Fool joke. :-)</p>
]]></content:encoded>
	</item>
</channel>
</rss>
