<?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 Data.Random</title>
	<atom:link href="http://random.axman6.com/blog/?feed=comments-rss2" rel="self" type="application/rss+xml" />
	<link>http://random.axman6.com/blog</link>
	<description>Random mutterings about life and Haskell.</description>
	<lastBuildDate>Thu, 22 Jul 2010 14:37:07 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>Comment on Co-routines in Haskell by Bonus</title>
		<link>http://random.axman6.com/blog/?p=231&#038;cpage=1#comment-1259</link>
		<dc:creator>Bonus</dc:creator>
		<pubDate>Thu, 22 Jul 2010 14:37:07 +0000</pubDate>
		<guid isPermaLink="false">http://random.axman6.com/blog/?p=231#comment-1259</guid>
		<description>&lt;p&gt;This is awesome. I love these articles that make you go &quot;Aghh, this makes so much sense, why didn&#039;t I think of that?&quot;. Got links to any papers about this?&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>This is awesome. I love these articles that make you go &#8220;Aghh, this makes so much sense, why didn&#8217;t I think of that?&#8221;. Got links to any papers about this?</p>]]></content:encoded>
	</item>
	<item>
		<title>Comment on Co-routines in Haskell by Heinrich Apfelmus</title>
		<link>http://random.axman6.com/blog/?p=231&#038;cpage=1#comment-1258</link>
		<dc:creator>Heinrich Apfelmus</dc:creator>
		<pubDate>Thu, 22 Jul 2010 12:46:55 +0000</pubDate>
		<guid isPermaLink="false">http://random.axman6.com/blog/?p=231#comment-1258</guid>
		<description>&lt;p&gt;Great post, simple and to the point.&lt;/p&gt;

&lt;p&gt;However, I think the viewpoint of operational semantics gives a more flexible and general implementation of coroutines, or in fact any monad, while being just as simple. I have written a few examples that complement my &quot;Operational Monad Tutorial&quot; which explains this approach in detail:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;A demonstration of a &lt;a href=&quot;http://projects.haskell.org/operational/examples/WebSessionState.lhs.html&quot; rel=&quot;nofollow&quot;&gt;web session&lt;/a&gt;, very much like Jean-Philippe Gariépy suggests.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;A &lt;a href=&quot;http://projects.haskell.org/operational/examples/TicTacToe.hs.html&quot; rel=&quot;nofollow&quot;&gt;TicTacToe&lt;/a&gt; implementation that interleaves different players, very much like coroutines would allow us to do.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
</description>
		<content:encoded><![CDATA[<p>Great post, simple and to the point.</p>

<p>However, I think the viewpoint of operational semantics gives a more flexible and general implementation of coroutines, or in fact any monad, while being just as simple. I have written a few examples that complement my &#8220;Operational Monad Tutorial&#8221; which explains this approach in detail:</p>

<ul>
<li><p>A demonstration of a <a href="http://projects.haskell.org/operational/examples/WebSessionState.lhs.html" rel="nofollow">web session</a>, very much like Jean-Philippe Gariépy suggests.</p></li>
<li><p>A <a href="http://projects.haskell.org/operational/examples/TicTacToe.hs.html" rel="nofollow">TicTacToe</a> implementation that interleaves different players, very much like coroutines would allow us to do.</p></li>
</ul>]]></content:encoded>
	</item>
	<item>
		<title>Comment on Co-routines in Haskell by Jean-Philippe Gariépy</title>
		<link>http://random.axman6.com/blog/?p=231&#038;cpage=1#comment-1248</link>
		<dc:creator>Jean-Philippe Gariépy</dc:creator>
		<pubDate>Thu, 22 Jul 2010 02:55:46 +0000</pubDate>
		<guid isPermaLink="false">http://random.axman6.com/blog/?p=231#comment-1248</guid>
		<description>&lt;p&gt;Co-routines can be interesting in any kind of GUI but they are particularly interesting for Web GUI. HTTP is stateless but the co-routine can preserve the state of execution.  This can be handful for complex control flows.  For VoiceXML where the application flow is linear (no back button, no refresh, no frames) this is ideal!&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Co-routines can be interesting in any kind of GUI but they are particularly interesting for Web GUI. HTTP is stateless but the co-routine can preserve the state of execution.  This can be handful for complex control flows.  For VoiceXML where the application flow is linear (no back button, no refresh, no frames) this is ideal!</p>]]></content:encoded>
	</item>
	<item>
		<title>Comment on Co-routines in Haskell by Iteratees and a (very) Minimal Model of Shared-State Concurrency &#171; Melding Monads</title>
		<link>http://random.axman6.com/blog/?p=231&#038;cpage=1#comment-1244</link>
		<dc:creator>Iteratees and a (very) Minimal Model of Shared-State Concurrency &#171; Melding Monads</dc:creator>
		<pubDate>Wed, 21 Jul 2010 23:27:41 +0000</pubDate>
		<guid isPermaLink="false">http://random.axman6.com/blog/?p=231#comment-1244</guid>
		<description>&lt;p&gt;[...] The idea here is that an iterator is either done, and returns a final result (of type r), or it might want to produce more, so it returns an intermediate result (of type o) along with a continuation to be called if and when further computation is required. Interestingly, Stephen Blackheath also used an equivalent structure in today&#8217;s post, Co-routines in Haskell. [...]&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>[...] The idea here is that an iterator is either done, and returns a final result (of type r), or it might want to produce more, so it returns an intermediate result (of type o) along with a continuation to be called if and when further computation is required. Interestingly, Stephen Blackheath also used an equivalent structure in today&#8217;s post, Co-routines in Haskell. [...]</p>]]></content:encoded>
	</item>
	<item>
		<title>Comment on Chunked XML parsing is the latest thing, you know by Iteratees and a (very) Minimal Model of Shared-State Concurrency &#171; Melding Monads</title>
		<link>http://random.axman6.com/blog/?p=157&#038;cpage=1#comment-1243</link>
		<dc:creator>Iteratees and a (very) Minimal Model of Shared-State Concurrency &#171; Melding Monads</dc:creator>
		<pubDate>Wed, 21 Jul 2010 23:26:24 +0000</pubDate>
		<guid isPermaLink="false">http://random.axman6.com/blog/?p=157#comment-1243</guid>
		<description>&lt;p&gt;[...] of a hot topic these days, being a core feature of the Snap Framework and the subject of assorted blog [...]&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>[...] of a hot topic these days, being a core feature of the Snap Framework and the subject of assorted blog [...]</p>]]></content:encoded>
	</item>
	<item>
		<title>Comment on Co-routines in Haskell by Bas van Dijk</title>
		<link>http://random.axman6.com/blog/?p=231&#038;cpage=1#comment-1241</link>
		<dc:creator>Bas van Dijk</dc:creator>
		<pubDate>Wed, 21 Jul 2010 21:52:11 +0000</pubDate>
		<guid isPermaLink="false">http://random.axman6.com/blog/?p=231#comment-1241</guid>
		<description>&lt;p&gt;Note the similarity between your co-routines and iteratees:&lt;/p&gt;

&lt;p&gt;&lt;pre&gt;newtype Iteratee el m a = Iteratee{runIter:: m (IterV el m a)}
data IterV el m a = IE_done a (Stream el)
          &#124; IE_cont (Stream el -&gt; Iteratee el m a) (Maybe ErrMsg)&lt;/pre&gt;&lt;/p&gt;

&lt;p&gt;from: http://okmij.org/ftp/Haskell/Iteratee/IterateeM.hs&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Note the similarity between your co-routines and iteratees:</p>

<p><pre>newtype Iteratee el m a = Iteratee{runIter:: m (IterV el m a)}
data IterV el m a = IE_done a (Stream el)
          | IE_cont (Stream el -&gt; Iteratee el m a) (Maybe ErrMsg)</pre></p>

<p>from: <a href="http://okmij.org/ftp/Haskell/Iteratee/IterateeM.hs" rel="nofollow">http://okmij.org/ftp/Haskell/Iteratee/IterateeM.hs</a></p>]]></content:encoded>
	</item>
	<item>
		<title>Comment on Co-routines in Haskell by Peter Hancock</title>
		<link>http://random.axman6.com/blog/?p=231&#038;cpage=1#comment-1239</link>
		<dc:creator>Peter Hancock</dc:creator>
		<pubDate>Wed, 21 Jul 2010 19:10:05 +0000</pubDate>
		<guid isPermaLink="false">http://random.axman6.com/blog/?p=231#comment-1239</guid>
		<description>&lt;p&gt;Thanks - a very interesting post, &#039;cos
(1) I&#039;m a &lt;em&gt;long&lt;/em&gt;-time fan and putter-to-use of coroutines.
(2) I&#039;m now interested more in mathematical structures than code, and I&#039;m (still) trying to see what your construction boils down to. (When the necessary but noisy Haskell hoo-hah is boiled away.)&lt;/p&gt;

&lt;p&gt;It looks to me (but I&#039;m not sure yet) that your type Result i o m a is, more or less, the free monad over 
(Moore i o . m), where Moore i o is the functor that at x is (o,i-&gt;x)  (as in Moore automata).&lt;/p&gt;

&lt;p&gt;It surprises me that you&#039;ve a nice simple (though, as you admit, contrived) example, that &lt;em&gt;doesn&#039;t&lt;/em&gt; involve (as I would&#039;ve expected) the dual functor Mealy i o = o-&gt;(i,x).  But then, my expectations were probably wrong; coroutine interactions are much more &quot;between equals&quot;, than actor/reactor, client/server or something asymmetrical like that kind.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Thanks &#8211; a very interesting post, &#8216;cos
(1) I&#8217;m a <em>long</em>-time fan and putter-to-use of coroutines.
(2) I&#8217;m now interested more in mathematical structures than code, and I&#8217;m (still) trying to see what your construction boils down to. (When the necessary but noisy Haskell hoo-hah is boiled away.)</p>

<p>It looks to me (but I&#8217;m not sure yet) that your type Result i o m a is, more or less, the free monad over 
(Moore i o . m), where Moore i o is the functor that at x is (o,i-&gt;x)  (as in Moore automata).</p>

<p>It surprises me that you&#8217;ve a nice simple (though, as you admit, contrived) example, that <em>doesn&#8217;t</em> involve (as I would&#8217;ve expected) the dual functor Mealy i o = o-&gt;(i,x).  But then, my expectations were probably wrong; coroutine interactions are much more &#8220;between equals&#8221;, than actor/reactor, client/server or something asymmetrical like that kind.</p>]]></content:encoded>
	</item>
	<item>
		<title>Comment on Co-routines in Haskell by sclv</title>
		<link>http://random.axman6.com/blog/?p=231&#038;cpage=1#comment-1238</link>
		<dc:creator>sclv</dc:creator>
		<pubDate>Wed, 21 Jul 2010 15:34:21 +0000</pubDate>
		<guid isPermaLink="false">http://random.axman6.com/blog/?p=231#comment-1238</guid>
		<description>&lt;p&gt;Sigpfe&#039;s formulation of coroutines in Haskell is particularly nifty as well (you get session types out of them!):&lt;/p&gt;

&lt;p&gt;http://blog.sigfpe.com/2009/11/programming-with-impossible-functions.html&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Sigpfe&#8217;s formulation of coroutines in Haskell is particularly nifty as well (you get session types out of them!):</p>

<p><a href="http://blog.sigfpe.com/2009/11/programming-with-impossible-functions.html" rel="nofollow">http://blog.sigfpe.com/2009/11/programming-with-impossible-functions.html</a></p>]]></content:encoded>
	</item>
	<item>
		<title>Comment on Phroxy: a proxy server written in haskell. by baltazar</title>
		<link>http://random.axman6.com/blog/?p=75&#038;cpage=1#comment-529</link>
		<dc:creator>baltazar</dc:creator>
		<pubDate>Tue, 01 Jun 2010 10:38:10 +0000</pubDate>
		<guid isPermaLink="false">http://random.axman6.com/blog/?p=75#comment-529</guid>
		<description>&lt;p&gt;Any progress with subject?&lt;/p&gt;

&lt;p&gt;I tried to code a very simple version of http proxy and here is what&#039;ve ended up with: http://haskell.pastebin.com/XfTY6vCE&lt;/p&gt;

&lt;p&gt;Unfortunately my Haskell level is less than beginner. My version does not work correctly and I&#039;d be glad if someone point me what&#039;s wrong with it.&lt;/p&gt;

&lt;p&gt;Thanks.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Any progress with subject?</p>

<p>I tried to code a very simple version of http proxy and here is what&#8217;ve ended up with: <a href="http://haskell.pastebin.com/XfTY6vCE" rel="nofollow">http://haskell.pastebin.com/XfTY6vCE</a></p>

<p>Unfortunately my Haskell level is less than beginner. My version does not work correctly and I&#8217;d be glad if someone point me what&#8217;s wrong with it.</p>

<p>Thanks.</p>]]></content:encoded>
	</item>
	<item>
		<title>Comment on An HTML DSL in Haskell in one day by Fahad Golra</title>
		<link>http://random.axman6.com/blog/?p=104&#038;cpage=1#comment-418</link>
		<dc:creator>Fahad Golra</dc:creator>
		<pubDate>Tue, 04 May 2010 12:45:02 +0000</pubDate>
		<guid isPermaLink="false">http://random.axman6.com/blog/?p=104#comment-418</guid>
		<description>&lt;p&gt;I am new to haskell and want to know more about DSLs too.  Can I get the complete code.  I want to learn it.  Thank you in advance.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>I am new to haskell and want to know more about DSLs too.  Can I get the complete code.  I want to learn it.  Thank you in advance.</p>]]></content:encoded>
	</item>
</channel>
</rss>
