<?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: Can functional programming be liberated from the von Neumann paradigm?</title>
	<atom:link href="http://conal.net/blog/posts/can-functional-programming-be-liberated-from-the-von-neumann-paradigm/feed" rel="self" type="application/rss+xml" />
	<link>http://conal.net/blog/posts/can-functional-programming-be-liberated-from-the-von-neumann-paradigm</link>
	<description>Inspirations &#38; experiments, mainly about denotative/functional programming in Haskell</description>
	<lastBuildDate>Sat, 26 Sep 2020 21:06:12 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=4.1.17</generator>
	<item>
		<title>By: Jcandy</title>
		<link>http://conal.net/blog/posts/can-functional-programming-be-liberated-from-the-von-neumann-paradigm#comment-617</link>
		<dc:creator><![CDATA[Jcandy]]></dc:creator>
		<pubDate>Wed, 20 Aug 2014 19:08:29 +0000</pubDate>
		<guid isPermaLink="false">http://conal.net/blog/?p=97#comment-617</guid>
		<description><![CDATA[&lt;p&gt;I was thinking that the problem that necessitates the IO monad is destruction. If you remove destruction, then a lot more models are possible. Here is one. A program is just a monoid of all the output it has issued, parameterized by a dictionary of the records the user has input.&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;main :: MMap k v -&gt; MMap kk vv&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Dictionary lookups on a key block until that key arrives in the dictionary.&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;lookup :: MMap k v -&gt; k -&gt; v&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Sometimes you want to wait on all keys at the same time, and produce a result. This form accomplishes this:&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;mapp :: MMap k v -&gt; (k -&gt; v -&gt; MMap kk vv) -&gt; MMap kk vv&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The only caveat is that if mapp ever detects that the result of the function for two key-value pairs disagree at a key, it must signal an error.&lt;/p&gt;

&lt;p&gt;All destruction actions are pushed to the top level of the model. The option to delete input records can be provided. If a record is deleted, all computations that depended on its existence can be automatically recomputed.&lt;/p&gt;
]]></description>
		<content:encoded><![CDATA[<p>I was thinking that the problem that necessitates the IO monad is destruction. If you remove destruction, then a lot more models are possible. Here is one. A program is just a monoid of all the output it has issued, parameterized by a dictionary of the records the user has input.</p>

<blockquote>
  <p>main :: MMap k v -&gt; MMap kk vv</p>
</blockquote>

<p>Dictionary lookups on a key block until that key arrives in the dictionary.</p>

<blockquote>
  <p>lookup :: MMap k v -&gt; k -&gt; v</p>
</blockquote>

<p>Sometimes you want to wait on all keys at the same time, and produce a result. This form accomplishes this:</p>

<blockquote>
  <p>mapp :: MMap k v -&gt; (k -&gt; v -&gt; MMap kk vv) -&gt; MMap kk vv</p>
</blockquote>

<p>The only caveat is that if mapp ever detects that the result of the function for two key-value pairs disagree at a key, it must signal an error.</p>

<p>All destruction actions are pushed to the top level of the model. The option to delete input records can be provided. If a record is deleted, all computations that depended on its existence can be automatically recomputed.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dobes</title>
		<link>http://conal.net/blog/posts/can-functional-programming-be-liberated-from-the-von-neumann-paradigm#comment-615</link>
		<dc:creator><![CDATA[Dobes]]></dc:creator>
		<pubDate>Wed, 18 Jun 2014 20:54:53 +0000</pubDate>
		<guid isPermaLink="false">http://conal.net/blog/?p=97#comment-615</guid>
		<description><![CDATA[&lt;p&gt;@conal&lt;/p&gt;

&lt;p&gt;I admit I was hoping you&#039;d covered this base already in your work or knew someone who did :-).&lt;/p&gt;

&lt;p&gt;I&#039;m not sure I have a good enough sense of what you mean by a &quot;precise denotation&quot; to come up with one.&lt;/p&gt;

&lt;p&gt;I can think of some of my own approaches to the problem, and I may try some experiments to see what works out in practice, but I&#039;m not sure if they are going to be as &quot;good&quot; as the procedural version.&lt;/p&gt;

&lt;p&gt;For example, if the input is given as a list of lines of text and the output is given as a list of lines, then one could have a function from input lines to output lines.  Like:&lt;/p&gt;

&lt;pre&gt;
    prog [] = [&quot;What is your name?&quot;]
    prog [name] = (prog []) ++ [&quot;Hello, &quot; ++ name ++ &quot;!  How old are you?&quot;]
    prog [name, age] = (prog [name]) ++ [&quot;Well, you look much younger...&quot;]
&lt;/pre&gt;

&lt;p&gt;Presumably I can devise a function from time to a list of input lines, and pass that into this function to get the output lines.&lt;/p&gt;

&lt;p&gt;I know this approach has major flaws, but is this an example of what you mean by casting something in terms of denotation?&lt;/p&gt;
]]></description>
		<content:encoded><![CDATA[<p>@conal</p>

<p>I admit I was hoping you&#8217;d covered this base already in your work or knew someone who did :-).</p>

<p>I&#8217;m not sure I have a good enough sense of what you mean by a &#8220;precise denotation&#8221; to come up with one.</p>

<p>I can think of some of my own approaches to the problem, and I may try some experiments to see what works out in practice, but I&#8217;m not sure if they are going to be as &#8220;good&#8221; as the procedural version.</p>

<p>For example, if the input is given as a list of lines of text and the output is given as a list of lines, then one could have a function from input lines to output lines.  Like:</p>

<pre>
    prog [] = ["What is your name?"]
    prog [name] = (prog []) ++ ["Hello, " ++ name ++ "!  How old are you?"]
    prog [name, age] = (prog [name]) ++ ["Well, you look much younger..."]
</pre>

<p>Presumably I can devise a function from time to a list of input lines, and pass that into this function to get the output lines.</p>

<p>I know this approach has major flaws, but is this an example of what you mean by casting something in terms of denotation?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: conal</title>
		<link>http://conal.net/blog/posts/can-functional-programming-be-liberated-from-the-von-neumann-paradigm#comment-614</link>
		<dc:creator><![CDATA[conal]]></dc:creator>
		<pubDate>Wed, 18 Jun 2014 01:01:52 +0000</pubDate>
		<guid isPermaLink="false">http://conal.net/blog/?p=97#comment-614</guid>
		<description><![CDATA[&lt;p&gt;@Dobes: Interesting question and perhaps worth making more precise. As stated, it’s sort of an apples &amp; oranges comparison, since FRP (as originally formulated) is denotationally based and Haskell’s &lt;code&gt;IO&lt;/code&gt; is not. One way to investigate is to cast something like your &lt;code&gt;IO&lt;/code&gt; example in terms of a (precise) denotation, and then see whether/how to capture that denotation in terms of FRP’s which is functions of (continuous) time. I expect that doing so would flush out some hidden assumptions and reveal some alternatives.&lt;/p&gt;
]]></description>
		<content:encoded><![CDATA[<p>@Dobes: Interesting question and perhaps worth making more precise. As stated, it’s sort of an apples &amp; oranges comparison, since FRP (as originally formulated) is denotationally based and Haskell’s <code>IO</code> is not. One way to investigate is to cast something like your <code>IO</code> example in terms of a (precise) denotation, and then see whether/how to capture that denotation in terms of FRP’s which is functions of (continuous) time. I expect that doing so would flush out some hidden assumptions and reveal some alternatives.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dobes</title>
		<link>http://conal.net/blog/posts/can-functional-programming-be-liberated-from-the-von-neumann-paradigm#comment-613</link>
		<dc:creator><![CDATA[Dobes]]></dc:creator>
		<pubDate>Fri, 13 Jun 2014 05:42:26 +0000</pubDate>
		<guid isPermaLink="false">http://conal.net/blog/?p=97#comment-613</guid>
		<description><![CDATA[&lt;p&gt;FRP seems to struggle for interactive sequential procedures… for example:&lt;/p&gt;

&lt;pre class=&quot;sourceCode literate haskell&quot;&gt;&lt;code class=&quot;sourceCode haskell&quot;&gt;printLine &lt;span class=&quot;st&quot;&gt;&quot;What is your name?&quot;&lt;/span&gt;
name &lt;span class=&quot;ot&quot;&gt;←&lt;/span&gt; readLine
printLine &lt;span class=&quot;st&quot;&gt;&quot;Hello, &quot;&lt;/span&gt; &lt;span class=&quot;fu&quot;&gt;++&lt;/span&gt; name &lt;span class=&quot;fu&quot;&gt;++&lt;/span&gt; &lt;span class=&quot;st&quot;&gt;&quot;! How old are you?&quot;&lt;/span&gt;
age &lt;span class=&quot;ot&quot;&gt;←&lt;/span&gt; readLine
printLine &lt;span class=&quot;st&quot;&gt;&quot;Well, you look much younger...&quot;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Is FRP unsuitable for this kind of application?&lt;/p&gt;
]]></description>
		<content:encoded><![CDATA[<p>FRP seems to struggle for interactive sequential procedures… for example:</p>

<pre class="sourceCode literate haskell"><code class="sourceCode haskell">printLine <span class="st">&quot;What is your name?&quot;</span>
name <span class="ot">←</span> readLine
printLine <span class="st">&quot;Hello, &quot;</span> <span class="fu">++</span> name <span class="fu">++</span> <span class="st">&quot;! How old are you?&quot;</span>
age <span class="ot">←</span> readLine
printLine <span class="st">&quot;Well, you look much younger...&quot;</span></code></pre>

<p>Is FRP unsuitable for this kind of application?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: conal</title>
		<link>http://conal.net/blog/posts/can-functional-programming-be-liberated-from-the-von-neumann-paradigm#comment-611</link>
		<dc:creator><![CDATA[conal]]></dc:creator>
		<pubDate>Fri, 21 May 2010 05:47:10 +0000</pubDate>
		<guid isPermaLink="false">http://conal.net/blog/?p=97#comment-611</guid>
		<description><![CDATA[&lt;p&gt;Kumar:&lt;/p&gt;

&lt;p&gt;Did you somehow get the impression that I have a bias against monads?  If so, how?&lt;/p&gt;

&lt;p&gt;Many of my best friends are monads (e.g. (partially applied) pairings, functions, Maybe, Future, backtracking, ...).  These friends are all denotative.  They have precise &amp; tractable meanings I can work with.  In contrast, there are non-denotative types, like IO. And while IO happens to be a Monad, it&#039;s also a Functor, Applicative, Monoid (when applied to a Monoid), and even a Num (when applied to a Num)! These classes don&#039;t hinder or help denotative-ness.&lt;/p&gt;

&lt;p&gt;My goal here is to remind people of the quest of denotative programming and hopefully inspire some curiosity and creative exploration of new denotative alternatives to Haskell&#039;s IO.&lt;/p&gt;
]]></description>
		<content:encoded><![CDATA[<p>Kumar:</p>

<p>Did you somehow get the impression that I have a bias against monads?  If so, how?</p>

<p>Many of my best friends are monads (e.g. (partially applied) pairings, functions, Maybe, Future, backtracking, &#8230;).  These friends are all denotative.  They have precise &amp; tractable meanings I can work with.  In contrast, there are non-denotative types, like IO. And while IO happens to be a Monad, it&#8217;s also a Functor, Applicative, Monoid (when applied to a Monoid), and even a Num (when applied to a Num)! These classes don&#8217;t hinder or help denotative-ness.</p>

<p>My goal here is to remind people of the quest of denotative programming and hopefully inspire some curiosity and creative exploration of new denotative alternatives to Haskell&#8217;s IO.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kumar</title>
		<link>http://conal.net/blog/posts/can-functional-programming-be-liberated-from-the-von-neumann-paradigm#comment-610</link>
		<dc:creator><![CDATA[Kumar]]></dc:creator>
		<pubDate>Thu, 08 Apr 2010 16:41:14 +0000</pubDate>
		<guid isPermaLink="false">http://conal.net/blog/?p=97#comment-610</guid>
		<description><![CDATA[&lt;p&gt;... and, since I mentioned several monads, I don&#039;t think there is anything fundamentally wrong with them as long as the unsafePerformIO kinds of things are completely ruled out. In fact, it&#039;ll be great if TV encompasses monads.&lt;/p&gt;
]]></description>
		<content:encoded><![CDATA[<p>&#8230; and, since I mentioned several monads, I don&#8217;t think there is anything fundamentally wrong with them as long as the unsafePerformIO kinds of things are completely ruled out. In fact, it&#8217;ll be great if TV encompasses monads.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kumar</title>
		<link>http://conal.net/blog/posts/can-functional-programming-be-liberated-from-the-von-neumann-paradigm#comment-609</link>
		<dc:creator><![CDATA[Kumar]]></dc:creator>
		<pubDate>Thu, 08 Apr 2010 16:22:06 +0000</pubDate>
		<guid isPermaLink="false">http://conal.net/blog/?p=97#comment-609</guid>
		<description><![CDATA[&lt;p&gt;Just watched your talk. TV looks interesting indeed. The need for introspection of fusions (which one of the audience pointed out) struck me too as quite crucial to a tinkering experience. Also, the construction of a widget to visualize a value seemed to be a substantial programming activity in itself - in other words TV seems to lead to a &quot;caste&quot; of developers who focus on building visualizers. For example, building a widget for &quot;list of x&quot; - and the x can be numbers, images, functions of lists of ys, or (to artificially complicate it) &quot;Parser y&quot; monads. It&#039;ll certainly take a brilliant designer to capture that kind of generality that seems so easy with text into a sensory model (visual, audio, whatever), but it sounds like a fun thing to work on :) The operation of fusion that you show in your talk probably also has nicer interface possibilities on touch devices like the you-know-what. They just beg for a powerful way to program them in a visual+tactile way ... which is a big unfulfilled gap.&lt;/p&gt;

&lt;p&gt;Btw, it was mildly ironic that in your talk you had to resort to textual notation to describe the constructs behind Eros :) That is somewhat like asking for the visual equivalent of the understanding that lists, maybe and IO are in some sense &quot;the same&quot;.&lt;/p&gt;

&lt;p&gt;The download link at http://www.haskell.org/haskellwiki/Eros is broken.&lt;/p&gt;
]]></description>
		<content:encoded><![CDATA[<p>Just watched your talk. TV looks interesting indeed. The need for introspection of fusions (which one of the audience pointed out) struck me too as quite crucial to a tinkering experience. Also, the construction of a widget to visualize a value seemed to be a substantial programming activity in itself &#8211; in other words TV seems to lead to a &#8220;caste&#8221; of developers who focus on building visualizers. For example, building a widget for &#8220;list of x&#8221; &#8211; and the x can be numbers, images, functions of lists of ys, or (to artificially complicate it) &#8220;Parser y&#8221; monads. It&#8217;ll certainly take a brilliant designer to capture that kind of generality that seems so easy with text into a sensory model (visual, audio, whatever), but it sounds like a fun thing to work on <img src="http://conal.net/blog/wp-includes/images/smilies/icon_smile.gif" alt=":)" class="wp-smiley" /> The operation of fusion that you show in your talk probably also has nicer interface possibilities on touch devices like the you-know-what. They just beg for a powerful way to program them in a visual+tactile way &#8230; which is a big unfulfilled gap.</p>

<p>Btw, it was mildly ironic that in your talk you had to resort to textual notation to describe the constructs behind Eros <img src="http://conal.net/blog/wp-includes/images/smilies/icon_smile.gif" alt=":)" class="wp-smiley" /> That is somewhat like asking for the visual equivalent of the understanding that lists, maybe and IO are in some sense &#8220;the same&#8221;.</p>

<p>The download link at <a href="http://www.haskell.org/haskellwiki/Eros" rel="nofollow">http://www.haskell.org/haskellwiki/Eros</a> is broken.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: conal</title>
		<link>http://conal.net/blog/posts/can-functional-programming-be-liberated-from-the-von-neumann-paradigm#comment-608</link>
		<dc:creator><![CDATA[conal]]></dc:creator>
		<pubDate>Wed, 07 Apr 2010 15:38:27 +0000</pubDate>
		<guid isPermaLink="false">http://conal.net/blog/?p=97#comment-608</guid>
		<description><![CDATA[&lt;p&gt;@Kumar - I see Unix pipe examples like &lt;code&gt;ls &#124; grep txt&lt;/code&gt; as hinting in the direction I&#039;m talking about but not quite going there.  For instance, while &lt;code&gt;grep&lt;/code&gt; is a pure function, it takes its two inputs in very different ways, one of which is non-compositional (except through inconsistent hacks).  Also, &lt;code&gt;ls&lt;/code&gt; takes its input in a very non-functional way.  It accesses various bits of mutable state (current working directory and current file system contents), as well as having an implicit reference to a particular file system.  And then there&#039;s the lack of static typing in Unix chains.  Please see my &lt;a href=&quot;http://conal.net/blog/posts/tangible-functional-programming-a-modern-marriage-of-usability-and-composability/&quot; rel=&quot;nofollow&quot;&gt;&quot;modern marriage&quot;&lt;/a&gt; talk for discussion of these points. (Near the start in discussing the Unix dream and how its choice of text I/O prevented it from achieving that dream.)&lt;/p&gt;
]]></description>
		<content:encoded><![CDATA[<p>@Kumar &#8211; I see Unix pipe examples like <code>ls | grep txt</code> as hinting in the direction I&#8217;m talking about but not quite going there.  For instance, while <code>grep</code> is a pure function, it takes its two inputs in very different ways, one of which is non-compositional (except through inconsistent hacks).  Also, <code>ls</code> takes its input in a very non-functional way.  It accesses various bits of mutable state (current working directory and current file system contents), as well as having an implicit reference to a particular file system.  And then there&#8217;s the lack of static typing in Unix chains.  Please see my <a href="http://conal.net/blog/posts/tangible-functional-programming-a-modern-marriage-of-usability-and-composability/" rel="nofollow">&#8220;modern marriage&#8221;</a> talk for discussion of these points. (Near the start in discussing the Unix dream and how its choice of text I/O prevented it from achieving that dream.)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kumar</title>
		<link>http://conal.net/blog/posts/can-functional-programming-be-liberated-from-the-von-neumann-paradigm#comment-607</link>
		<dc:creator><![CDATA[Kumar]]></dc:creator>
		<pubDate>Wed, 07 Apr 2010 03:05:12 +0000</pubDate>
		<guid isPermaLink="false">http://conal.net/blog/?p=97#comment-607</guid>
		<description><![CDATA[&lt;p&gt;Would you consider unix pipes as an example of pushing what we treat as &quot;IO&quot; at the program level just as an interoperation mechanism in the implementation of a &quot;shell programming language&quot;? For example, would &quot;ls &#124; grep txt&quot; be an example of non-IO think you want to shoot for?&lt;/p&gt;
]]></description>
		<content:encoded><![CDATA[<p>Would you consider unix pipes as an example of pushing what we treat as &#8220;IO&#8221; at the program level just as an interoperation mechanism in the implementation of a &#8220;shell programming language&#8221;? For example, would &#8220;ls | grep txt&#8221; be an example of non-IO think you want to shoot for?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: A non von Neumann Style of Programming &#171; Code and Bugs</title>
		<link>http://conal.net/blog/posts/can-functional-programming-be-liberated-from-the-von-neumann-paradigm#comment-606</link>
		<dc:creator><![CDATA[A non von Neumann Style of Programming &#171; Code and Bugs]]></dc:creator>
		<pubDate>Wed, 24 Feb 2010 19:10:24 +0000</pubDate>
		<guid isPermaLink="false">http://conal.net/blog/?p=97#comment-606</guid>
		<description><![CDATA[&lt;p&gt;[...] more informations, one can read Conal&#8217;s article here. In fact, it was his blog which directed me to Bakus&#8217; work. A single article upon which I [...]&lt;/p&gt;
]]></description>
		<content:encoded><![CDATA[<p>[&#8230;] more informations, one can read Conal&#8217;s article here. In fact, it was his blog which directed me to Bakus&#8217; work. A single article upon which I [&#8230;]</p>
]]></content:encoded>
	</item>
</channel>
</rss>
