<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" media="screen" href="/styles/xslt/rss.xslt"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:media="http://search.yahoo.com/mrss/" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:c9="http://channel9.msdn.com">
<channel>
	<title>Comment Feed for Channel 9 - Expert to Expert: Inside Concurrent Basic (CB)</title>
	<atom:link rel="self" type="application/rss+xml" href="http://channel9.msdn.com/Shows/Going+Deep/Claudio-Russo-and-Lucian-Wischik-Inside-Concurrent-Basic/RSS"></atom:link>
	<image>
		<url>http://ecn.channel9.msdn.com/o9/previewImages/100/458553_100x75.jpg</url>
		<title>Channel 9 - Expert to Expert: Inside Concurrent Basic (CB)</title>
		<link></link>
	</image>
	<description>


&amp;quot;Concurrent Basic&amp;nbsp;extends Visual Basic with stylish asynchronous concurrency constructs derived from the join calculus. Our design advances earlier MSRC
 work on Polyphonic C#, Comega and the Joins Library. Unlike its C# based predecessors, CB adopts a simple event-like syntax familiar to VB programmers, allows one to declare generic concurrency abstractions and provides more natural support for inheritance.
 CB also offers open extensibility based on custom attributes.&amp;quot;Code Sample: 
Module Buffer
&amp;nbsp; Public Asynchronous Put(ByVal s As String)
&amp;nbsp; Public Synchronous Take() As String
&amp;nbsp; Private Function CaseTakeAndPut(ByVal s As String) As String&amp;nbsp; When Take, Put
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Return s
&amp;nbsp; End Function 
End Module
&amp;nbsp; 
OK. Sounds great. There are new keywords, Asynchronous and Synchronous. Conceptually, these&amp;nbsp;are easy enough to understand. How do&amp;nbsp;they work, exactly? What&#39;s the thinking behind the current design? Why was VB.NET chosen as the language to extend? Wouldn&#39;t
 any CLI language suffice? Who thought this up, anyway? What&#39;s the thinking behind the thinking?
Enter C9 celebrity host 
Erik Meijer, who&amp;nbsp;leads yet another great conversation with fellow software experts&amp;nbsp;Claudio Russo (MSR Researcher and co-creator of Concurrent Basic) and&amp;nbsp;Lucian Wischik (software developer
 and current VB.NET Czar). Obviously, we&#39;ve been focusing a lot of attention of Concurrency and Parallelism over the past few years. We talk about the library versus language approach quite a bit. In this case, concurrency constructs have been baked into the language to form a different
 variant of VB, CB (Concurrent Basic). CB is a research project and therefore a research language. It has no ship vehicle and is not available for trial at this point. Microsoft makes no committment to shipping VB with these concurrency constructs built in.
CB is a research language.&amp;nbsp; CB is being shown in action at this year&#39;s MSR TechFest. Be sure to
check out Laura&#39;s coverage of TechFest
2009. 

</description>
	<link></link>
	<language>en</language>
	<pubDate>Sun, 26 May 2013 06:23:11 GMT</pubDate>
	<lastBuildDate>Sun, 26 May 2013 06:23:11 GMT</lastBuildDate>
	<generator>Rev9</generator>
	<item>
		<title>Re: Expert to Expert: Inside Concurrent Basic (CB)</title>
		<description>
			<![CDATA[Interesting stuff.&nbsp; I personally just switched languages from VB to C# in order to take advantage of the CCR and Yield.<br /><br />How different is this concept from the CCR with it's ports and yield statements? (beyond obvious syntax differences)<p>posted by mavstar001</p>]]>
		</description>
		<link>http://channel9.msdn.com/Shows/Going+Deep/Claudio-Russo-and-Lucian-Wischik-Inside-Concurrent-Basic#c633712127860000000</link>
		<pubDate>Thu, 26 Feb 2009 02:39:46 GMT</pubDate>
		<guid isPermaLink="true">http://channel9.msdn.com/Shows/Going+Deep/Claudio-Russo-and-Lucian-Wischik-Inside-Concurrent-Basic#c633712127860000000</guid>
		<dc:creator>mavstar001</dc:creator>
	</item>
	<item>
		<title>Re: Expert to Expert: Inside Concurrent Basic (CB)</title>
		<description>
			<![CDATA[Why use Function semantics to hook A and B to Wait..... Seems like a waste of code.... What else might we put in the function?<br /><br /><br /><p>posted by RoryBecker2</p>]]>
		</description>
		<link>http://channel9.msdn.com/Shows/Going+Deep/Claudio-Russo-and-Lucian-Wischik-Inside-Concurrent-Basic#c633712409660000000</link>
		<pubDate>Thu, 26 Feb 2009 10:29:26 GMT</pubDate>
		<guid isPermaLink="true">http://channel9.msdn.com/Shows/Going+Deep/Claudio-Russo-and-Lucian-Wischik-Inside-Concurrent-Basic#c633712409660000000</guid>
		<dc:creator>RoryBecker2</dc:creator>
	</item>
	<item>
		<title>Re: Expert to Expert: Inside Concurrent Basic (CB)</title>
		<description>
			<![CDATA[I don't understand why the &quot;handler&quot; has to be a separate function. Seems highly redundant. I mean look at the example, &quot;CasTakeAndPut ... Take, Put&quot;. Why do we need a named function here? WHen else would it be called? Why not just do what Polyphonic C#
 did?
<div><br /></div>
<div>Actually I don't mind separating the&nbsp;handler (Polyphonic C# did get pretty long function headers because you specified them all &quot;in line&quot; with the handler statement), actually, but I don't see why it needs to be named. Also, seems a bit weird how the inputs
 for the various channels gets mapped to the parameter list of the handler - if you have ten of them taking different numbers of argument (including zero) of different types, then what does the parameter list for your handler look like and how long does it
 take you to get that right on average? Why not something like:<br /></div>
<div><br /></div>
<div>Asynchronous Put( ByVal s As String)</div>
<div>Synchronous Take() As String</div>
<div><br /></div>
<div>When Put( ByVal s As String ), Take() As String</div>
<div>&nbsp;&nbsp; return s</div>
<div>End When</div>
<div><br /></div>
<div>This removes the rendundant function name (and Function keyword), as well as making it obvious where each parameter comes from. In fact, we may possibly omit the type in the &quot;When&quot; clause since it's already declared and just say &quot;Put(s)&quot;? So you'd basically
 specify all your channels up front first, giving the types and any other modifiers (like access), and then just a short and sweet &quot;when&quot; clause at the end. Seems pretty clean to me:</div>
<div><br /></div>
<div>
<div>Asynchronous Put( ByVal s As String)</div>
<div>Synchronous Take() As String</div>
<div><br /></div>
<div>When Take, Put(s)</div>
<div>&nbsp;&nbsp; return s</div>
<div>End When</div>
</div>
<div><br /></div>
<div>I think this idea is very promising, but I do think the syntax here is unecessarily clumsy... Unless someone can explain why we need all that extra stuff? Caveat: The video broke about half way through for me so maybe there's a really good motivation for
 this later on?</div>
<p>posted by sylvan</p>]]>
		</description>
		<link>http://channel9.msdn.com/Shows/Going+Deep/Claudio-Russo-and-Lucian-Wischik-Inside-Concurrent-Basic#c633713751770000000</link>
		<pubDate>Fri, 27 Feb 2009 23:46:17 GMT</pubDate>
		<guid isPermaLink="true">http://channel9.msdn.com/Shows/Going+Deep/Claudio-Russo-and-Lucian-Wischik-Inside-Concurrent-Basic#c633713751770000000</guid>
		<dc:creator>sylvan</dc:creator>
	</item>
	<item>
		<title>Re: Expert to Expert: Inside Concurrent Basic (CB)</title>
		<description>
			<![CDATA[At what point did the video break for you?<br />C<p>posted by Charles</p>]]>
		</description>
		<link>http://channel9.msdn.com/Shows/Going+Deep/Claudio-Russo-and-Lucian-Wischik-Inside-Concurrent-Basic#c633713760110000000</link>
		<pubDate>Sat, 28 Feb 2009 00:00:11 GMT</pubDate>
		<guid isPermaLink="true">http://channel9.msdn.com/Shows/Going+Deep/Claudio-Russo-and-Lucian-Wischik-Inside-Concurrent-Basic#c633713760110000000</guid>
		<dc:creator>Charles</dc:creator>
	</item>
	<item>
		<title>Re: Expert to Expert: Inside Concurrent Basic (CB)</title>
		<description>
			<![CDATA[Don't worry, it's not a problem on your end. I've had some codec issues here lately affecting all sorts of videos.<p>posted by sylvan</p>]]>
		</description>
		<link>http://channel9.msdn.com/Shows/Going+Deep/Claudio-Russo-and-Lucian-Wischik-Inside-Concurrent-Basic#c633714207290000000</link>
		<pubDate>Sat, 28 Feb 2009 12:25:29 GMT</pubDate>
		<guid isPermaLink="true">http://channel9.msdn.com/Shows/Going+Deep/Claudio-Russo-and-Lucian-Wischik-Inside-Concurrent-Basic#c633714207290000000</guid>
		<dc:creator>sylvan</dc:creator>
	</item>
	<item>
		<title>Re: Expert to Expert: Inside Concurrent Basic (CB)</title>
		<description>
			<![CDATA[
<p>&nbsp;</p>
<p>I’m no expert on the CCR , but I believe a CCR port is equivalent to a CB asynchronous channels. As far as I know, the CCR&nbsp; has no direct equivalent of synchronous channels. However, you can code up a synchronous channel&nbsp; using a port that takes an additional
 response port on which to reply to a “synchronous” sender. The sender would pass a fresh port along with the original payload then wait (block) to receive a response. Indeed, in the original join calculus that underpins CB, all channels were asynchronous and
 a similar encoding was used to emulate synchronous sends. The advantage of directly supporting synchronous channels is that it avoids the additional protocol used by the encoding (which a user could get wrong, for instance,&nbsp; by incorrectly sharing a reply
 port across two calls). The disadvantage is that it encourages the user to write blocking code with the potential for deadlock.</p>
<p>&nbsp;</p>
<p>Unlike CB,&nbsp;&nbsp;the CCR encourages a completely asynchronous programming style but makes clever use of C#’s yield statements to let the user write asynchronous blocks of code in a sequential style, without having to explicitly CPS convert the sequential code.
 I think it’s a shame VB doesn’t have iterators&nbsp; and hope iterators or more general coroutines are supported in future.</p>
<p>&nbsp;</p>
<p>F#’s asynchronous workflows are similar in this regard, but use a continuation monad instead of C#’s iterators to achieve fully composable asynchronous computations. &nbsp;</p>
<p>&nbsp;</p>
<p>posted by crusso</p>]]>
		</description>
		<link>http://channel9.msdn.com/Shows/Going+Deep/Claudio-Russo-and-Lucian-Wischik-Inside-Concurrent-Basic#c633714569010000000</link>
		<pubDate>Sat, 28 Feb 2009 22:28:21 GMT</pubDate>
		<guid isPermaLink="true">http://channel9.msdn.com/Shows/Going+Deep/Claudio-Russo-and-Lucian-Wischik-Inside-Concurrent-Basic#c633714569010000000</guid>
		<dc:creator>crusso</dc:creator>
	</item>
	<item>
		<title>Re: Expert to Expert: Inside Concurrent Basic (CB)</title>
		<description>
			<![CDATA[
<p>You can and typically do put non-trivial code in the body of a pattern.&nbsp;&nbsp;The simple examples in the video were meant to illustrate the basic expressive power of CB patterns to express choice, join and forking operations.
<br /><br />For example, the more&nbsp;realistic one-place-buffer has non-trivial function bodies:<br /><br />Public Class OnePlaceBuffer(Of T)<br />&nbsp; Private Asynchronous Empty()<br />&nbsp; Private Asynchronous Contains(ByVal t As T)<br />&nbsp; Public Synchronous Put(ByVal t As T)<br />&nbsp; Public Synchronous Take() As T<br />&nbsp; Private Sub CasePutAndEmpty(ByVal t As T) When Put, Empty<br />&nbsp;&nbsp;&nbsp; Contains(t)<br />&nbsp; End Sub<br />&nbsp; Private Function CaseTakeAndContains(ByVal t As T) As T When Take, Contains<br />&nbsp;&nbsp;&nbsp; Empty()<br />&nbsp;&nbsp;&nbsp; Return t<br />&nbsp; End Function<br />&nbsp; Public Sub New()<br />&nbsp;&nbsp;&nbsp; Empty()<br />&nbsp; End Sub<br />End Class<br /><br />Have a look at the paper or slides on the <a href="http://research.microsoft.com/en-us/projects/concurrentbasic/default.aspx">
concurrent basic</a>&nbsp;site for more examples.</p>
<p>posted by crusso</p>]]>
		</description>
		<link>http://channel9.msdn.com/Shows/Going+Deep/Claudio-Russo-and-Lucian-Wischik-Inside-Concurrent-Basic#c633714574230000000</link>
		<pubDate>Sat, 28 Feb 2009 22:37:03 GMT</pubDate>
		<guid isPermaLink="true">http://channel9.msdn.com/Shows/Going+Deep/Claudio-Russo-and-Lucian-Wischik-Inside-Concurrent-Basic#c633714574230000000</guid>
		<dc:creator>crusso</dc:creator>
	</item>
	<item>
		<title>Re: Expert to Expert: Inside Concurrent Basic (CB)</title>
		<description>
			<![CDATA[
<p>In general,&nbsp; the parameters to the pattern are the (ordered) concatenation of the parameters of the channels following [When] which is simple to specify but, as you rightly observed, easy to get wrong. So I agree with you that the syntax is a little clumsy
 and could be sugared to or even replaced by something more concise and less error prone. I had actually considered precisely the explicitly typed syntax you suggest - in fact, we already had this in Comega for purely asynchronous patterns. The even better
 implicitly typed variant make perfect sense, and is close to my ML heart, but is less in keeping with VB.</p>
<p>&nbsp;</p>
<p>Apart from implementation expediency, the main reason I opted for the explicit variant is that it is similar to the [Handles] syntax, makes it easy to override patterns in subclasses and to support recursion in the body of the handler as well as debugging
 and testing of patterns. Perhaps we should support the fully explicit syntax as well as sugar for the more concise, even implicitly-typed form that generates a private, non-recursive method. Heck, we could also just jettison the [Handles] analogy completely...</p>
<p>&nbsp;</p>
<p>&nbsp;Another thing one might consider adding is the ability to declare that a channel handles some events and (for symmetry) that an event is raised by some pattern.
</p>
<p>&nbsp;</p>
<p>The main motivation for departing from the Polyphonic C# syntax was that decoupling channel and pattern declarations makes it easier to support inheritance and the addition of new patterns in subclasses.
</p>
<p>&nbsp;</p>
<p>We’re definitely open to suggestions and very grateful for your feedback.</p>
<p>posted by crusso</p>]]>
		</description>
		<link>http://channel9.msdn.com/Shows/Going+Deep/Claudio-Russo-and-Lucian-Wischik-Inside-Concurrent-Basic#c633714575990000000</link>
		<pubDate>Sat, 28 Feb 2009 22:39:59 GMT</pubDate>
		<guid isPermaLink="true">http://channel9.msdn.com/Shows/Going+Deep/Claudio-Russo-and-Lucian-Wischik-Inside-Concurrent-Basic#c633714575990000000</guid>
		<dc:creator>crusso</dc:creator>
	</item>
	<item>
		<title>Re: Expert to Expert: Inside Concurrent Basic (CB)</title>
		<description>
			<![CDATA[I'm working on a similar solution and have published a proposal<br />see &lt;<a href="http://threadsafeprogramming.blogspot.com">http://threadsafeprogramming.blogspot.com</a>&gt;<br /><br />what do you think about it ?<br /><br />/ Stefan<br /><p>posted by Stefan F.dot</p>]]>
		</description>
		<link>http://channel9.msdn.com/Shows/Going+Deep/Claudio-Russo-and-Lucian-Wischik-Inside-Concurrent-Basic#c633715350050000000</link>
		<pubDate>Sun, 01 Mar 2009 20:10:05 GMT</pubDate>
		<guid isPermaLink="true">http://channel9.msdn.com/Shows/Going+Deep/Claudio-Russo-and-Lucian-Wischik-Inside-Concurrent-Basic#c633715350050000000</guid>
		<dc:creator>Stefan F.dot</dc:creator>
	</item>
	<item>
		<title>Re: Expert to Expert: Inside Concurrent Basic (CB)</title>
		<description>
			<![CDATA[You may be interested also in MC# language (www.mcsharp.net),<br />which has channels (and handlers) as first class tools.<br /><p>posted by YuryS</p>]]>
		</description>
		<link>http://channel9.msdn.com/Shows/Going+Deep/Claudio-Russo-and-Lucian-Wischik-Inside-Concurrent-Basic#c633746845340000000</link>
		<pubDate>Tue, 07 Apr 2009 07:02:14 GMT</pubDate>
		<guid isPermaLink="true">http://channel9.msdn.com/Shows/Going+Deep/Claudio-Russo-and-Lucian-Wischik-Inside-Concurrent-Basic#c633746845340000000</guid>
		<dc:creator>YuryS</dc:creator>
	</item>
	<item>
		<title>Re: Expert to Expert: Inside Concurrent Basic (CB)</title>
		<description>
			<![CDATA[
<p>Vedio dosent play</p>
<p>posted by ReCkeSs ROHIT</p>]]>
		</description>
		<link>http://channel9.msdn.com/Shows/Going+Deep/Claudio-Russo-and-Lucian-Wischik-Inside-Concurrent-Basic#c633817710260000000</link>
		<pubDate>Sun, 28 Jun 2009 07:30:26 GMT</pubDate>
		<guid isPermaLink="true">http://channel9.msdn.com/Shows/Going+Deep/Claudio-Russo-and-Lucian-Wischik-Inside-Concurrent-Basic#c633817710260000000</guid>
		<dc:creator>ReCkeSs ROHIT</dc:creator>
	</item>
</channel>
</rss>