<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">
<channel>
	<title>Comments for Conal Elliott</title>
	
	<link>http://conal.net/blog</link>
	<description>Inspirations &amp; experiments, mainly about denotative/functional programming in Haskell</description>
	<lastBuildDate>Sat, 18 May 2013 00:33:37 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1</generator>
	<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/conal-comments" /><feedburner:info uri="conal-comments" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>Comment on “Everything is a function” in Haskell? by Peter LeFanu Lumsdaine</title>
		<link>http://feedproxy.google.com/~r/conal-comments/~3/XSFmar-3zdg/comment-page-1</link>
		<dc:creator>Peter LeFanu Lumsdaine</dc:creator>
		<pubDate>Sat, 18 May 2013 00:33:37 +0000</pubDate>
		<guid isPermaLink="false">http://conal.net/blog/?p=175#comment-268775</guid>
		<description>&lt;p&gt;As you say, the position that “everything is a function (to the exclusion of being anything else)”, or more specifically “everything is of some function type A -&gt; B”, is clearly wrong.&lt;/p&gt;

&lt;p&gt;However, the viewpoint “everything can be seen a function (in addition to whatever else it is)” seems quite reasonable.  As others have pointed out, n-ary (curried) functions are a very helpful concept, where formally an n-ary function can be defined as a term of type “A_1 -&gt; ... -&gt; A_n -&gt; B”, for some types A_1 … A…n.  So “map” can be seen both as a unary function from “A -&gt; B” to “[A] -&gt; [B]”, and also as a binary function from “A -&gt; B” and “[A]” to “[B]”.&lt;/p&gt;

&lt;p&gt;But then by the same token, the integer 5 is a nullary function to “Int”; it’s also still an “Int”, but that doesn’t stop it being a nullary function as well.&lt;/p&gt;

&lt;p&gt;So “everything is an n-ary function, for some n” is surely acceptable?  In the context of Haskell, I don’t know how useful it is; but in some mathematical contexts, it’s very fruitful indeed (e.g. the insight that constants could be seen as 0-ary functions was essential for universal algebra, and its cousin the theory of operads).&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>As you say, the position that “everything is a function (to the exclusion of being anything else)”, or more specifically “everything is of some function type A -&gt; B”, is clearly wrong.</p>

<p>However, the viewpoint “everything can be seen a function (in addition to whatever else it is)” seems quite reasonable.  As others have pointed out, n-ary (curried) functions are a very helpful concept, where formally an n-ary function can be defined as a term of type “A_1 -&gt; &#8230; -&gt; A_n -&gt; B”, for some types A_1 … A…n.  So “map” can be seen both as a unary function from “A -&gt; B” to “[A] -&gt; [B]”, and also as a binary function from “A -&gt; B” and “[A]” to “[B]”.</p>

<p>But then by the same token, the integer 5 is a nullary function to “Int”; it’s also still an “Int”, but that doesn’t stop it being a nullary function as well.</p>

<p>So “everything is an n-ary function, for some n” is surely acceptable?  In the context of Haskell, I don’t know how useful it is; but in some mathematical contexts, it’s very fruitful indeed (e.g. the insight that constants could be seen as 0-ary functions was essential for universal algebra, and its cousin the theory of operads).</p>]]></content:encoded>
	<feedburner:origLink>http://conal.net/blog/posts/everything-is-a-function-in-haskell/comment-page-1#comment-268775</feedburner:origLink></item>
	<item>
		<title>Comment on Memoizing polymorphic functions via unmemoization by The Comonad.Reader » Representing Applicatives</title>
		<link>http://feedproxy.google.com/~r/conal-comments/~3/8ce_HrgNyu8/comment-page-1</link>
		<dc:creator>The Comonad.Reader » Representing Applicatives</dc:creator>
		<pubDate>Thu, 02 May 2013 14:19:32 +0000</pubDate>
		<guid isPermaLink="false">http://conal.net/blog/?p=203#comment-265802</guid>
		<description>&lt;p&gt;[...] working with representable functors tractable. A further tiny taste of Yoneda comes from a nice blog post by Conal Elliott on [...]&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>[...] working with representable functors tractable. A further tiny taste of Yoneda comes from a nice blog post by Conal Elliott on [...]</p>]]></content:encoded>
	<feedburner:origLink>http://conal.net/blog/posts/memoizing-polymorphic-functions-via-unmemoization/comment-page-1#comment-265802</feedburner:origLink></item>
	<item>
		<title>Comment on “Everything is a function” in Haskell? by Paul Higham</title>
		<link>http://feedproxy.google.com/~r/conal-comments/~3/4MeFo4bl8nI/comment-page-1</link>
		<dc:creator>Paul Higham</dc:creator>
		<pubDate>Mon, 04 Mar 2013 18:22:47 +0000</pubDate>
		<guid isPermaLink="false">http://conal.net/blog/?p=175#comment-249643</guid>
		<description>&lt;p&gt;What I learned in high school can be succinctly stated, somewhat precisely as follows:&lt;/p&gt;

&lt;p&gt;Let X and Y be sets and let the cartesian product of X and Y, denoted X x Y be the set {(x,y) | x belongs to X, y belongs to Y}.  A function from X to Y, written as f : X -&gt; Y, is a subset of X x Y with the property that for all (x1,y1), (x2,y2) in f, x1 = x2 implies that y1 = y2.&lt;/p&gt;

&lt;p&gt;This is the mathematical definition of of a function and is the one used by Haskell and probably the other functional programming languages as well.  The defining property of the function as stated above is usually referred to as 'referential transparency'.  The C programming language started the confusion, and other such languages have perpetuated it, by using the term function to mean something quite different.  In C a function is not necessarily an association at all - it may not take an input and it may not produce an output - it may be pure side effect and even if it does define an association there is no guarantee of referential transparency.&lt;/p&gt;

&lt;p&gt;Adopting this definition, how do you make sense of the phrase 'a function with 0 arguments'?&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>What I learned in high school can be succinctly stated, somewhat precisely as follows:</p>

<p>Let X and Y be sets and let the cartesian product of X and Y, denoted X x Y be the set {(x,y) | x belongs to X, y belongs to Y}.  A function from X to Y, written as f : X -&gt; Y, is a subset of X x Y with the property that for all (x1,y1), (x2,y2) in f, x1 = x2 implies that y1 = y2.</p>

<p>This is the mathematical definition of of a function and is the one used by Haskell and probably the other functional programming languages as well.  The defining property of the function as stated above is usually referred to as &#8216;referential transparency&#8217;.  The C programming language started the confusion, and other such languages have perpetuated it, by using the term function to mean something quite different.  In C a function is not necessarily an association at all &#8211; it may not take an input and it may not produce an output &#8211; it may be pure side effect and even if it does define an association there is no guarantee of referential transparency.</p>

<p>Adopting this definition, how do you make sense of the phrase &#8216;a function with 0 arguments&#8217;?</p>]]></content:encoded>
	<feedburner:origLink>http://conal.net/blog/posts/everything-is-a-function-in-haskell/comment-page-1#comment-249643</feedburner:origLink></item>
	<item>
		<title>Comment on Reimagining matrices by Peteris Erins</title>
		<link>http://feedproxy.google.com/~r/conal-comments/~3/kxlhzmPs75Q/comment-page-1</link>
		<dc:creator>Peteris Erins</dc:creator>
		<pubDate>Tue, 25 Dec 2012 10:14:44 +0000</pubDate>
		<guid isPermaLink="false">http://conal.net/blog/?p=503#comment-190837</guid>
		<description>&lt;p&gt;Hi Conal, great post, inspired me to "reimagine" tensors: http://peteriserins.tumblr.com/post/38783455201/typed-type-tensors-in-scala.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Hi Conal, great post, inspired me to &#8220;reimagine&#8221; tensors: <a href="http://peteriserins.tumblr.com/post/38783455201/typed-type-tensors-in-scala." rel="nofollow">http://peteriserins.tumblr.com/post/38783455201/typed-type-tensors-in-scala.</a></p>]]></content:encoded>
	<feedburner:origLink>http://conal.net/blog/posts/reimagining-matrices/comment-page-1#comment-190837</feedburner:origLink></item>
	<item>
		<title>Comment on Reimagining matrices by Dave Abrahams</title>
		<link>http://feedproxy.google.com/~r/conal-comments/~3/PfhAsPJLMpU/comment-page-1</link>
		<dc:creator>Dave Abrahams</dc:creator>
		<pubDate>Thu, 20 Dec 2012 19:51:53 +0000</pubDate>
		<guid isPermaLink="false">http://conal.net/blog/?p=503#comment-184740</guid>
		<description>&lt;p&gt;I'm probably revealing a weakness in my jargon knowledge, but what do you mean when you use the word "preserves," here?  You've used that one word to describe multiple things that look like mathematical laws (e.g. distributivity) each of which has its own name.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>I&#8217;m probably revealing a weakness in my jargon knowledge, but what do you mean when you use the word &#8220;preserves,&#8221; here?  You&#8217;ve used that one word to describe multiple things that look like mathematical laws (e.g. distributivity) each of which has its own name.</p>]]></content:encoded>
	<feedburner:origLink>http://conal.net/blog/posts/reimagining-matrices/comment-page-1#comment-184740</feedburner:origLink></item>
	<item>
		<title>Comment on Reimagining matrices by Jonathan Fischoff</title>
		<link>http://feedproxy.google.com/~r/conal-comments/~3/w4hnMwFNsTI/comment-page-1</link>
		<dc:creator>Jonathan Fischoff</dc:creator>
		<pubDate>Thu, 20 Dec 2012 03:37:52 +0000</pubDate>
		<guid isPermaLink="false">http://conal.net/blog/?p=503#comment-183728</guid>
		<description>&lt;p&gt;I can't shake this feeling that Arrow erupted from the bowels of Base and tried to take possession of Vect.&lt;/p&gt;

&lt;p&gt;It seems more natural to express Vect as a symmetric bimonoidal category (http://ncatlab.org/nlab/show/bimonoidal+category) using the tensor product and direct sum. (***) is basically the tensor product, but I think the direct sum of transformations would be more like (+++).&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>I can&#8217;t shake this feeling that Arrow erupted from the bowels of Base and tried to take possession of Vect.</p>

<p>It seems more natural to express Vect as a symmetric bimonoidal category (<a href="http://ncatlab.org/nlab/show/bimonoidal+category" rel="nofollow">http://ncatlab.org/nlab/show/bimonoidal+category</a>) using the tensor product and direct sum. (***) is basically the tensor product, but I think the direct sum of transformations would be more like (+++).</p>]]></content:encoded>
	<feedburner:origLink>http://conal.net/blog/posts/reimagining-matrices/comment-page-1#comment-183728</feedburner:origLink></item>
	<item>
		<title>Comment on Reimagining matrices by rebcabin</title>
		<link>http://feedproxy.google.com/~r/conal-comments/~3/HzxL2gqWOb8/comment-page-1</link>
		<dc:creator>rebcabin</dc:creator>
		<pubDate>Tue, 18 Dec 2012 06:32:05 +0000</pubDate>
		<guid isPermaLink="false">http://conal.net/blog/?p=503#comment-181158</guid>
		<description>&lt;p&gt;There is a lovely demonstration somewhere vaguely remembered in one of my favorite books http://matrixeditions.com/UnifiedApproach4th.html that Determinant is the UNIQUE multilinear, antisymmetric function of matrices.  In other words, it ought to be derivable from those properties, just in the way you derived mat mul from linearity and composition.  dreaming&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>There is a lovely demonstration somewhere vaguely remembered in one of my favorite books <a href="http://matrixeditions.com/UnifiedApproach4th.html" rel="nofollow">http://matrixeditions.com/UnifiedApproach4th.html</a> that Determinant is the UNIQUE multilinear, antisymmetric function of matrices.  In other words, it ought to be derivable from those properties, just in the way you derived mat mul from linearity and composition.  dreaming</p>]]></content:encoded>
	<feedburner:origLink>http://conal.net/blog/posts/reimagining-matrices/comment-page-1#comment-181158</feedburner:origLink></item>
	<item>
		<title>Comment on Reimagining matrices by Franklin Chen</title>
		<link>http://feedproxy.google.com/~r/conal-comments/~3/ZQtuTNpJkXM/comment-page-1</link>
		<dc:creator>Franklin Chen</dc:creator>
		<pubDate>Tue, 18 Dec 2012 06:26:38 +0000</pubDate>
		<guid isPermaLink="false">http://conal.net/blog/?p=503#comment-181154</guid>
		<description>&lt;p&gt;Before I got to the comment section, I had almost exactly the same thought as @DrMathochist in my head, so I was glad I kept that on hold and continued on, and your response clarified what exactly you meant by "reimagining". (In college, for my first introduction to linear algebra, we went quite far without ever seeing or using a matrix, finally getting there, and deriving the matrix operations, only when it became necessary as a concrete representation of a linear transformation.) I suspect that people seeing only the title and first paragraphs of this post might be confused, however.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Before I got to the comment section, I had almost exactly the same thought as @DrMathochist in my head, so I was glad I kept that on hold and continued on, and your response clarified what exactly you meant by &#8220;reimagining&#8221;. (In college, for my first introduction to linear algebra, we went quite far without ever seeing or using a matrix, finally getting there, and deriving the matrix operations, only when it became necessary as a concrete representation of a linear transformation.) I suspect that people seeing only the title and first paragraphs of this post might be confused, however.</p>]]></content:encoded>
	<feedburner:origLink>http://conal.net/blog/posts/reimagining-matrices/comment-page-1#comment-181154</feedburner:origLink></item>
	<item>
		<title>Comment on Reimagining matrices by rebcabin</title>
		<link>http://feedproxy.google.com/~r/conal-comments/~3/nVLxIRneArI/comment-page-1</link>
		<dc:creator>rebcabin</dc:creator>
		<pubDate>Tue, 18 Dec 2012 06:05:49 +0000</pubDate>
		<guid isPermaLink="false">http://conal.net/blog/?p=503#comment-181134</guid>
		<description>&lt;p&gt;my big big big question is : can we do arbitrary computation using just matrix addition and multiplication (and maybe transpose)... i.e., can we capture the lambda calculus or the universal turing machine in a little bit of linear algebra?  I have managed to find McCarthy COND using only primitive matrix ops.  Is this enough, or do I need NAND?&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>my big big big question is : can we do arbitrary computation using just matrix addition and multiplication (and maybe transpose)&#8230; i.e., can we capture the lambda calculus or the universal turing machine in a little bit of linear algebra?  I have managed to find McCarthy COND using only primitive matrix ops.  Is this enough, or do I need NAND?</p>]]></content:encoded>
	<feedburner:origLink>http://conal.net/blog/posts/reimagining-matrices/comment-page-1#comment-181134</feedburner:origLink></item>
	<item>
		<title>Comment on Reimagining matrices by Matthew Brunelle</title>
		<link>http://feedproxy.google.com/~r/conal-comments/~3/fmy5hrTeLgs/comment-page-1</link>
		<dc:creator>Matthew Brunelle</dc:creator>
		<pubDate>Mon, 17 Dec 2012 19:31:53 +0000</pubDate>
		<guid isPermaLink="false">http://conal.net/blog/?p=503#comment-180557</guid>
		<description>&lt;p&gt;I just finished up linear algebra class so this article was a very stimulating way to apply that information.  Thanks for the post!&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>I just finished up linear algebra class so this article was a very stimulating way to apply that information.  Thanks for the post!</p>]]></content:encoded>
	<feedburner:origLink>http://conal.net/blog/posts/reimagining-matrices/comment-page-1#comment-180557</feedburner:origLink></item>
	<item>
		<title>Comment on Reimagining matrices by conal</title>
		<link>http://feedproxy.google.com/~r/conal-comments/~3/4euiXSbduD4/comment-page-1</link>
		<dc:creator>conal</dc:creator>
		<pubDate>Mon, 17 Dec 2012 17:57:58 +0000</pubDate>
		<guid isPermaLink="false">http://conal.net/blog/?p=503#comment-180473</guid>
		<description>&lt;p&gt;@DrMathochist asked on Twitter:&lt;/p&gt;

&lt;blockquote&gt;

in what way is this a "reimagining"? That matrices represent linear transformations is absolutely fundamental.

 &lt;/blockquote&gt;

&lt;p&gt;Thanks for asking.
What I mean by "reimagining" is (a) packaging of linear maps via the &lt;code&gt;Category&lt;/code&gt; &amp; &lt;code&gt;Arrow&lt;/code&gt; vocabulary (more explicit in &lt;a href="https://github.com/conal/linear-map-gadt" rel="nofollow"&gt;the library&lt;/a&gt;), (b) structuring the representation and semantics to match the algebraic structure of &lt;code&gt;dot&lt;/code&gt; and &lt;code&gt;(&amp;&amp;&amp;)&lt;/code&gt;, and (c) derivation of operations from semantics.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>@DrMathochist asked on Twitter:</p>

<blockquote>

in what way is this a &#8220;reimagining&#8221;? That matrices represent linear transformations is absolutely fundamental.

 </blockquote>

<p>Thanks for asking.
What I mean by &#8220;reimagining&#8221; is (a) packaging of linear maps via the <code>Category</code> &amp; <code>Arrow</code> vocabulary (more explicit in <a href="https://github.com/conal/linear-map-gadt" rel="nofollow">the library</a>), (b) structuring the representation and semantics to match the algebraic structure of <code>dot</code> and <code>(&amp;&amp;&amp;)</code>, and (c) derivation of operations from semantics.</p>]]></content:encoded>
	<feedburner:origLink>http://conal.net/blog/posts/reimagining-matrices/comment-page-1#comment-180473</feedburner:origLink></item>
	<item>
		<title>Comment on Reimagining matrices by rdm</title>
		<link>http://feedproxy.google.com/~r/conal-comments/~3/veNuEkpwCDM/comment-page-1</link>
		<dc:creator>rdm</dc:creator>
		<pubDate>Mon, 17 Dec 2012 17:00:33 +0000</pubDate>
		<guid isPermaLink="false">http://conal.net/blog/?p=503#comment-180403</guid>
		<description>&lt;p&gt;Note that the derivation is a lot simpler if you start with a form of multiplication which follows the same structural rules as addition and build from that an "inner product" operation which does the multiply-and-sum thing.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Note that the derivation is a lot simpler if you start with a form of multiplication which follows the same structural rules as addition and build from that an &#8220;inner product&#8221; operation which does the multiply-and-sum thing.</p>]]></content:encoded>
	<feedburner:origLink>http://conal.net/blog/posts/reimagining-matrices/comment-page-1#comment-180403</feedburner:origLink></item>
	<item>
		<title>Comment on Parallel speculative addition via memoization by conal</title>
		<link>http://feedproxy.google.com/~r/conal-comments/~3/cqyawR9HAp8/comment-page-1</link>
		<dc:creator>conal</dc:creator>
		<pubDate>Thu, 29 Nov 2012 03:46:32 +0000</pubDate>
		<guid isPermaLink="false">http://conal.net/blog/?p=493#comment-163780</guid>
		<description>&lt;p&gt;Graham: thanks for the pointer to your paper and to carry save addition.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Graham: thanks for the pointer to your paper and to carry save addition.</p>]]></content:encoded>
	<feedburner:origLink>http://conal.net/blog/posts/parallel-speculative-addition-via-memoization/comment-page-1#comment-163780</feedburner:origLink></item>
	<item>
		<title>Comment on Parallel speculative addition via memoization by conal</title>
		<link>http://feedproxy.google.com/~r/conal-comments/~3/kTZjHXGC-Pk/comment-page-1</link>
		<dc:creator>conal</dc:creator>
		<pubDate>Thu, 29 Nov 2012 03:45:26 +0000</pubDate>
		<guid isPermaLink="false">http://conal.net/blog/?p=493#comment-163776</guid>
		<description>&lt;p&gt;Geoffrey &amp; Lennart: Thanks! I'll dig into these parallel prefix approaches.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Geoffrey &amp; Lennart: Thanks! I&#8217;ll dig into these parallel prefix approaches.</p>]]></content:encoded>
	<feedburner:origLink>http://conal.net/blog/posts/parallel-speculative-addition-via-memoization/comment-page-1#comment-163776</feedburner:origLink></item>
	<item>
		<title>Comment on Parallel speculative addition via memoization by augustss</title>
		<link>http://feedproxy.google.com/~r/conal-comments/~3/svufSq68YsM/comment-page-1</link>
		<dc:creator>augustss</dc:creator>
		<pubDate>Wed, 28 Nov 2012 22:25:39 +0000</pubDate>
		<guid isPermaLink="false">http://conal.net/blog/?p=493#comment-163687</guid>
		<description>&lt;p&gt;Conal, I think Geoffrey is referring to one of the standard multibit adders which works by parallel prefix, but replacing the full adder by an associative operator.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Conal, I think Geoffrey is referring to one of the standard multibit adders which works by parallel prefix, but replacing the full adder by an associative operator.</p>]]></content:encoded>
	<feedburner:origLink>http://conal.net/blog/posts/parallel-speculative-addition-via-memoization/comment-page-1#comment-163687</feedburner:origLink></item>
</channel>
</rss>
