<?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: Closures and asynchronous methods in Vala</title>
	<atom:link href="http://blogs.gnome.org/juergbi/2009/09/18/closures-and-asynchronous-methods-in-vala/feed/" rel="self" type="application/rss+xml" />
	<link>http://blogs.gnome.org/juergbi/2009/09/18/closures-and-asynchronous-methods-in-vala/</link>
	<description>Just another GNOME Blogs weblog</description>
	<lastBuildDate>Mon, 21 Jun 2010 20:33:59 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Norman</title>
		<link>http://blogs.gnome.org/juergbi/2009/09/18/closures-and-asynchronous-methods-in-vala/comment-page-1/#comment-87</link>
		<dc:creator>Norman</dc:creator>
		<pubDate>Sat, 19 Sep 2009 13:52:47 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.gnome.org/juergbi/?p=28#comment-87</guid>
		<description>I install monodevelop with vala plugin.

I create a new vala project and i can&#039;t run a basic example of Gtk Window :
http://live.gnome.org/Vala/GTKSample</description>
		<content:encoded><![CDATA[<p>I install monodevelop with vala plugin.</p>
<p>I create a new vala project and i can&#8217;t run a basic example of Gtk Window :<br />
<a href="http://live.gnome.org/Vala/GTKSample" rel="nofollow">http://live.gnome.org/Vala/GTKSample</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Amos Wenger</title>
		<link>http://blogs.gnome.org/juergbi/2009/09/18/closures-and-asynchronous-methods-in-vala/comment-page-1/#comment-86</link>
		<dc:creator>Amos Wenger</dc:creator>
		<pubDate>Fri, 18 Sep 2009 13:55:55 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.gnome.org/juergbi/?p=28#comment-86</guid>
		<description>Hey Vala team, congrats here from the ooc team =)

What you implemented looks very much like what I had in mind for ooc closures. Mind to share some code/structs? (Or maybe you&#039;re not comfortable with getting intimate that fast ^^) Interoperability might be nice, since we&#039;re both C-generating languages.

Anyway, kudos, and keep up the great work =)</description>
		<content:encoded><![CDATA[<p>Hey Vala team, congrats here from the ooc team =)</p>
<p>What you implemented looks very much like what I had in mind for ooc closures. Mind to share some code/structs? (Or maybe you&#8217;re not comfortable with getting intimate that fast ^^) Interoperability might be nice, since we&#8217;re both C-generating languages.</p>
<p>Anyway, kudos, and keep up the great work =)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jeff Waugh</title>
		<link>http://blogs.gnome.org/juergbi/2009/09/18/closures-and-asynchronous-methods-in-vala/comment-page-1/#comment-85</link>
		<dc:creator>Jeff Waugh</dc:creator>
		<pubDate>Fri, 18 Sep 2009 12:51:36 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.gnome.org/juergbi/?p=28#comment-85</guid>
		<description>Yay, glad to see someone making excellent use of the syntax highlighting plugin on GNOME Blogs. :-)</description>
		<content:encoded><![CDATA[<p>Yay, glad to see someone making excellent use of the syntax highlighting plugin on GNOME Blogs. <img src='http://blogs.gnome.org/juergbi/wp-content/mu-plugins/tango-smilies/tango/face-smile.png' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tweets that mention Closures and asynchronous methods in Vala « Jürg Billeter’s blog -- Topsy.com</title>
		<link>http://blogs.gnome.org/juergbi/2009/09/18/closures-and-asynchronous-methods-in-vala/comment-page-1/#comment-84</link>
		<dc:creator>Tweets that mention Closures and asynchronous methods in Vala « Jürg Billeter’s blog -- Topsy.com</dc:creator>
		<pubDate>Fri, 18 Sep 2009 11:35:04 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.gnome.org/juergbi/?p=28#comment-84</guid>
		<description>[...] This post was mentioned on Twitter by Programming Joy and Tech news. Tech news said: Reddit/p: Closures and asynchronous methods in Vala http://bit.ly/153FLR [...]</description>
		<content:encoded><![CDATA[<p>[...] This post was mentioned on Twitter by Programming Joy and Tech news. Tech news said: Reddit/p: Closures and asynchronous methods in Vala <a href="http://bit.ly/153FLR" rel="nofollow">http://bit.ly/153FLR</a> [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: juergbi</title>
		<link>http://blogs.gnome.org/juergbi/2009/09/18/closures-and-asynchronous-methods-in-vala/comment-page-1/#comment-83</link>
		<dc:creator>juergbi</dc:creator>
		<pubDate>Fri, 18 Sep 2009 11:00:38 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.gnome.org/juergbi/?p=28#comment-83</guid>
		<description>@Matt: As Neil correctly explains, the variable is kept alive as long as it&#039;s referenced in a closure. The mentioned bug has been fixed now and your example will print 10 as expected.

@James: It is not based on generators as this would not allow the same level of integration with languages that are not as dynamic as, e.g., Python or JavaScript. However, support for generators is planned as well, and a large part of the implementation will be shared.</description>
		<content:encoded><![CDATA[<p>@<a href="http://blogs.gnome.org/juergbi/2009/09/18/closures-and-asynchronous-methods-in-vala/#comment-76">Matt</a>: As Neil correctly explains, the variable is kept alive as long as it&#8217;s referenced in a closure. The mentioned bug has been fixed now and your example will print 10 as expected.</p>
<p>@James: It is not based on generators as this would not allow the same level of integration with languages that are not as dynamic as, e.g., Python or JavaScript. However, support for generators is planned as well, and a large part of the implementation will be shared.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Cliff Brake</title>
		<link>http://blogs.gnome.org/juergbi/2009/09/18/closures-and-asynchronous-methods-in-vala/comment-page-1/#comment-82</link>
		<dc:creator>Cliff Brake</dc:creator>
		<pubDate>Fri, 18 Sep 2009 10:12:18 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.gnome.org/juergbi/?p=28#comment-82</guid>
		<description>thanks for the examples</description>
		<content:encoded><![CDATA[<p>thanks for the examples</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nicolas Trangez</title>
		<link>http://blogs.gnome.org/juergbi/2009/09/18/closures-and-asynchronous-methods-in-vala/comment-page-1/#comment-81</link>
		<dc:creator>Nicolas Trangez</dc:creator>
		<pubDate>Fri, 18 Sep 2009 09:23:02 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.gnome.org/juergbi/?p=28#comment-81</guid>
		<description>This is some insanely cool and impressive stuff. Well done Vala team!

@Yann: AFAIK it will not spin, the generated code is all async callback based, so no CPU is being used as long as no new data is available, and no threads involved (next to the main thread, obviously) either.</description>
		<content:encoded><![CDATA[<p>This is some insanely cool and impressive stuff. Well done Vala team!</p>
<p>@Yann: AFAIK it will not spin, the generated code is all async callback based, so no CPU is being used as long as no new data is available, and no threads involved (next to the main thread, obviously) either.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Neil Roberts</title>
		<link>http://blogs.gnome.org/juergbi/2009/09/18/closures-and-asynchronous-methods-in-vala/comment-page-1/#comment-80</link>
		<dc:creator>Neil Roberts</dc:creator>
		<pubDate>Fri, 18 Sep 2009 09:22:49 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.gnome.org/juergbi/?p=28#comment-80</guid>
		<description>@Matt: I was going to post a similar comment. It looks like it stores the variables referenced in the closure to a ref-counted struct and each delegate variable now makes two C variables - one for the function pointer and one for the data pointer. So the local &#039;i&#039; variable referenced in your closure should outlive the scope of &#039;make_func&#039;. However it looks like there&#039;s some bugs there because the generated code does not take a reference to the struct when make_func returns so the data gets destroyed prematurely and your programs outputs &quot;i is 0&quot;!</description>
		<content:encoded><![CDATA[<p>@<a href="http://blogs.gnome.org/juergbi/2009/09/18/closures-and-asynchronous-methods-in-vala/#comment-76">Matt</a>: I was going to post a similar comment. It looks like it stores the variables referenced in the closure to a ref-counted struct and each delegate variable now makes two C variables &#8211; one for the function pointer and one for the data pointer. So the local &#8216;i&#8217; variable referenced in your closure should outlive the scope of &#8216;make_func&#8217;. However it looks like there&#8217;s some bugs there because the generated code does not take a reference to the struct when make_func returns so the data gets destroyed prematurely and your programs outputs &#8220;i is 0&#8243;!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: James Henstridge</title>
		<link>http://blogs.gnome.org/juergbi/2009/09/18/closures-and-asynchronous-methods-in-vala/comment-page-1/#comment-79</link>
		<dc:creator>James Henstridge</dc:creator>
		<pubDate>Fri, 18 Sep 2009 09:16:35 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.gnome.org/juergbi/?p=28#comment-79</guid>
		<description>@Yann: no.  The idea of this kind of syntax is to let you write functions that look synchronous but run asynchronously.  Each of the yield calls indicates a point where the function will pause, waiting for completion of that operation.

Internally, this would probably be implemented by storing the locals for the function inside a structure so that they can be maintained over multiple invocations, some glue to wait on the GAsyncResults and code to handle reentering the code path (possibly using Simon Tatham&#039;s switch statement method).</description>
		<content:encoded><![CDATA[<p>@<a href="http://blogs.gnome.org/juergbi/2009/09/18/closures-and-asynchronous-methods-in-vala/#comment-78">Yann</a>: no.  The idea of this kind of syntax is to let you write functions that look synchronous but run asynchronously.  Each of the yield calls indicates a point where the function will pause, waiting for completion of that operation.</p>
<p>Internally, this would probably be implemented by storing the locals for the function inside a structure so that they can be maintained over multiple invocations, some glue to wait on the GAsyncResults and code to handle reentering the code path (possibly using Simon Tatham&#8217;s switch statement method).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Yann</title>
		<link>http://blogs.gnome.org/juergbi/2009/09/18/closures-and-asynchronous-methods-in-vala/comment-page-1/#comment-78</link>
		<dc:creator>Yann</dc:creator>
		<pubDate>Fri, 18 Sep 2009 06:43:21 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.gnome.org/juergbi/?p=28#comment-78</guid>
		<description>I am just wondering:
does &quot;while (true)&quot; really iterates until we get a callback?
(and takes 100% of CPU)

or is it waiting for the callback? (and the thread is sleeping)</description>
		<content:encoded><![CDATA[<p>I am just wondering:<br />
does &#8220;while (true)&#8221; really iterates until we get a callback?<br />
(and takes 100% of CPU)</p>
<p>or is it waiting for the callback? (and the thread is sleeping)</p>
]]></content:encoded>
	</item>
</channel>
</rss>
<!-- This Quick Cache file was built for (  blogs.gnome.org/juergbi/2009/09/18/closures-and-asynchronous-methods-in-vala/feed/ ) in 1.20817 seconds, on Feb 11th, 2012 at 4:57 am UTC. -->
<!-- This Quick Cache file will automatically expire ( and be re-built automatically ) on Feb 11th, 2012 at 5:57 am UTC -->
