<?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: Another angle on zippers</title>
	<atom:link href="http://conal.net/blog/posts/another-angle-on-zippers/feed" rel="self" type="application/rss+xml" />
	<link>http://conal.net/blog/posts/another-angle-on-zippers</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: David Feuer</title>
		<link>http://conal.net/blog/posts/another-angle-on-zippers#comment-68989</link>
		<dc:creator><![CDATA[David Feuer]]></dc:creator>
		<pubDate>Mon, 03 Sep 2018 20:55:42 +0000</pubDate>
		<guid isPermaLink="false">http://conal.net/blog/?p=154#comment-68989</guid>
		<description><![CDATA[&lt;p&gt;Sorry, I should have said weaker than &lt;code&gt;Traversable&lt;/code&gt;, not the same.&lt;/p&gt;
]]></description>
		<content:encoded><![CDATA[<p>Sorry, I should have said weaker than <code>Traversable</code>, not the same.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: David Feuer</title>
		<link>http://conal.net/blog/posts/another-angle-on-zippers#comment-68988</link>
		<dc:creator><![CDATA[David Feuer]]></dc:creator>
		<pubDate>Mon, 03 Sep 2018 20:53:48 +0000</pubDate>
		<guid isPermaLink="false">http://conal.net/blog/?p=154#comment-68988</guid>
		<description><![CDATA[&lt;p&gt;It turns out that &lt;code&gt;Holey&lt;/code&gt; is essentially the same as &lt;code&gt;Traversable&lt;/code&gt;. Using a bleeding-edge &lt;code&gt;bifunctors&lt;/code&gt;, you get &lt;code&gt;traverseBia :: (Traversable t, Biapplicative p) =&gt; (a -&gt; p b c) -&gt; t a -&gt; p (t b) (t c)&lt;/code&gt;. The implementation of that function is itself very shady: it takes advantage of structure implied by &lt;code&gt;Traversable&lt;/code&gt; that can&#039;t be obtained &lt;em&gt;directly&lt;/em&gt; from its methods. You can then apply a funny continuation-passing biapplicative Roman Cheplyaka came up with to get a function &lt;code&gt;holesIn :: Traversable t =&gt; t a -&gt; t (a, a -&gt; t a)&lt;/code&gt;. See https://stackoverflow.com/a/49044894/1477667 for the full details. What this all means is that while it&#039;s certainly much easier, and likely more efficient, to get holes from generics, it&#039;s possible to get away with something weaker.&lt;/p&gt;
]]></description>
		<content:encoded><![CDATA[<p>It turns out that <code>Holey</code> is essentially the same as <code>Traversable</code>. Using a bleeding-edge <code>bifunctors</code>, you get <code>traverseBia :: (Traversable t, Biapplicative p) =&gt; (a -&gt; p b c) -&gt; t a -&gt; p (t b) (t c)</code>. The implementation of that function is itself very shady: it takes advantage of structure implied by <code>Traversable</code> that can&#8217;t be obtained <em>directly</em> from its methods. You can then apply a funny continuation-passing biapplicative Roman Cheplyaka came up with to get a function <code>holesIn :: Traversable t =&gt; t a -&gt; t (a, a -&gt; t a)</code>. See <a href="https://stackoverflow.com/a/49044894/1477667" rel="nofollow">https://stackoverflow.com/a/49044894/1477667</a> for the full details. What this all means is that while it&#8217;s certainly much easier, and likely more efficient, to get holes from generics, it&#8217;s possible to get away with something weaker.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: conal</title>
		<link>http://conal.net/blog/posts/another-angle-on-zippers#comment-668</link>
		<dc:creator><![CDATA[conal]]></dc:creator>
		<pubDate>Tue, 06 Sep 2011 04:24:41 +0000</pubDate>
		<guid isPermaLink="false">http://conal.net/blog/?p=154#comment-668</guid>
		<description><![CDATA[&lt;p&gt;Robin: I wasn&#039;t suggesting that &lt;code&gt;left&lt;/code&gt; &amp; &lt;code&gt;right&lt;/code&gt; are easy to implement. Rather that they might be unnecessary (pure speculation). Do you &lt;em&gt;really&lt;/em&gt; want &lt;code&gt;left&lt;/code&gt; &amp; &lt;code&gt;right&lt;/code&gt; instead of the list (or whatever functor element) of children?&lt;/p&gt;
]]></description>
		<content:encoded><![CDATA[<p>Robin: I wasn&#8217;t suggesting that <code>left</code> &amp; <code>right</code> are easy to implement. Rather that they might be unnecessary (pure speculation). Do you <em>really</em> want <code>left</code> &amp; <code>right</code> instead of the list (or whatever functor element) of children?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Robin Green</title>
		<link>http://conal.net/blog/posts/another-angle-on-zippers#comment-667</link>
		<dc:creator><![CDATA[Robin Green]]></dc:creator>
		<pubDate>Mon, 05 Sep 2011 00:15:21 +0000</pubDate>
		<guid isPermaLink="false">http://conal.net/blog/?p=154#comment-667</guid>
		<description><![CDATA[&lt;p&gt;I figured it out. It&#039;s necessary to go up, then down, then do a case split on all the possibilities (looking at both the derivative &lt;em&gt;and&lt;/em&gt; the reconstructed upper level). It&#039;s not very simple at all!&lt;/p&gt;
]]></description>
		<content:encoded><![CDATA[<p>I figured it out. It&#8217;s necessary to go up, then down, then do a case split on all the possibilities (looking at both the derivative <em>and</em> the reconstructed upper level). It&#8217;s not very simple at all!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: conal</title>
		<link>http://conal.net/blog/posts/another-angle-on-zippers#comment-666</link>
		<dc:creator><![CDATA[conal]]></dc:creator>
		<pubDate>Sun, 04 Sep 2011 19:42:13 +0000</pubDate>
		<guid isPermaLink="false">http://conal.net/blog/?p=154#comment-666</guid>
		<description><![CDATA[&lt;p&gt;Robin: does the remark following the type of &lt;code&gt;down&lt;/code&gt; answer your question?&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Since &lt;code&gt;down&lt;/code&gt; yields an &lt;code&gt;f&lt;/code&gt;-collection of locations, we do not need sibling navigation functions (&lt;code&gt;left&lt;/code&gt; &amp; &lt;code&gt;right&lt;/code&gt;).&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;For instance, if &lt;code&gt;f = []&lt;/code&gt;, then &lt;code&gt;down&lt;/code&gt; yields a &lt;em&gt;list&lt;/em&gt; of child zippers, which you can traverse as you like.&lt;/p&gt;
]]></description>
		<content:encoded><![CDATA[<p>Robin: does the remark following the type of <code>down</code> answer your question?</p>

<blockquote>
<p>Since <code>down</code> yields an <code>f</code>-collection of locations, we do not need sibling navigation functions (<code>left</code> &amp; <code>right</code>).</p>
</blockquote>

<p>For instance, if <code>f = []</code>, then <code>down</code> yields a <em>list</em> of child zippers, which you can traverse as you like.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Robin Green</title>
		<link>http://conal.net/blog/posts/another-angle-on-zippers#comment-665</link>
		<dc:creator><![CDATA[Robin Green]]></dc:creator>
		<pubDate>Sun, 04 Sep 2011 12:30:09 +0000</pubDate>
		<guid isPermaLink="false">http://conal.net/blog/?p=154#comment-665</guid>
		<description><![CDATA[&lt;p&gt;I&#039;ve been trying to implement this in OCaml, and I kept thinking &quot;How are left and right going to be implemented?&quot; Now that I&#039;ve come to implement them, I still don&#039;t get it. You say that the interface is simpler because it doesn&#039;t have left and right - but in order for that argument to hold, it must be simple to move left and right. How do you do it?&lt;/p&gt;
]]></description>
		<content:encoded><![CDATA[<p>I&#8217;ve been trying to implement this in OCaml, and I kept thinking &#8220;How are left and right going to be implemented?&#8221; Now that I&#8217;ve come to implement them, I still don&#8217;t get it. You say that the interface is simpler because it doesn&#8217;t have left and right &#8211; but in order for that argument to hold, it must be simple to move left and right. How do you do it?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Conal Elliott &#187; Blog Archive &#187; Topless data</title>
		<link>http://conal.net/blog/posts/another-angle-on-zippers#comment-664</link>
		<dc:creator><![CDATA[Conal Elliott &#187; Blog Archive &#187; Topless data]]></dc:creator>
		<pubDate>Mon, 20 Dec 2010 20:56:36 +0000</pubDate>
		<guid isPermaLink="false">http://conal.net/blog/?p=154#comment-664</guid>
		<description><![CDATA[&lt;p&gt;[...]      &#171; Another angle on zippers &#8220;Everything is a function&#8221; in Haskell? [...]&lt;/p&gt;
]]></description>
		<content:encoded><![CDATA[<p>[&#8230;]      &laquo; Another angle on zippers &#8220;Everything is a function&#8221; in Haskell? [&#8230;]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: conal</title>
		<link>http://conal.net/blog/posts/another-angle-on-zippers#comment-663</link>
		<dc:creator><![CDATA[conal]]></dc:creator>
		<pubDate>Mon, 09 Aug 2010 15:37:09 +0000</pubDate>
		<guid isPermaLink="false">http://conal.net/blog/?p=154#comment-663</guid>
		<description><![CDATA[&lt;p&gt;Brent: Thanks for the pointer to Conor&#039;s message.  I guess I&#039;d better follow the Haskell lists more closely.  I like the Comonad connection!&lt;/p&gt;
]]></description>
		<content:encoded><![CDATA[<p>Brent: Thanks for the pointer to Conor&#8217;s message.  I guess I&#8217;d better follow the Haskell lists more closely.  I like the Comonad connection!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Brent Yorgey</title>
		<link>http://conal.net/blog/posts/another-angle-on-zippers#comment-662</link>
		<dc:creator><![CDATA[Brent Yorgey]]></dc:creator>
		<pubDate>Mon, 09 Aug 2010 14:45:33 +0000</pubDate>
		<guid isPermaLink="false">http://conal.net/blog/?p=154#comment-662</guid>
		<description><![CDATA[&lt;p&gt;Very nice.  I like how this formulation removes the leftward bias inherent in the original version of &quot;down&quot;.  It also works for functors where there is no inherent ordering that can be placed on the children (I&#039;m thinking here of things like general combinatorial species/quotient containers).&lt;/p&gt;

&lt;p&gt;Also, a little while ago Conor McBride wrote &lt;a href=&quot;http://www.haskell.org//pipermail/libraries/2010-July/013843.html&quot; rel=&quot;nofollow&quot;&gt;a nice message to the libraries mailing list&lt;/a&gt; with the same version of down, as well as discard :: Loc f a -&gt; a and decorate :: Loc f a -&gt; Loc f (Loc f a) which make Loc f a comonad.  decorate in particular gives a notion of &quot;moving sideways&quot; without having to go up and then back down.&lt;/p&gt;
]]></description>
		<content:encoded><![CDATA[<p>Very nice.  I like how this formulation removes the leftward bias inherent in the original version of &#8220;down&#8221;.  It also works for functors where there is no inherent ordering that can be placed on the children (I&#8217;m thinking here of things like general combinatorial species/quotient containers).</p>

<p>Also, a little while ago Conor McBride wrote <a href="http://www.haskell.org//pipermail/libraries/2010-July/013843.html" rel="nofollow">a nice message to the libraries mailing list</a> with the same version of down, as well as discard :: Loc f a -&gt; a and decorate :: Loc f a -&gt; Loc f (Loc f a) which make Loc f a comonad.  decorate in particular gives a notion of &#8220;moving sideways&#8221; without having to go up and then back down.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Lucius Meredith</title>
		<link>http://conal.net/blog/posts/another-angle-on-zippers#comment-661</link>
		<dc:creator><![CDATA[Lucius Meredith]]></dc:creator>
		<pubDate>Fri, 30 Jul 2010 17:54:17 +0000</pubDate>
		<guid isPermaLink="false">http://conal.net/blog/?p=154#comment-661</guid>
		<description><![CDATA[&lt;p&gt;Hey Conal,&lt;/p&gt;

&lt;p&gt;Interesting. i don&#039;t know if you&#039;ve seen my postings about using the notion of location as the notion of name. i gave a couple of write ups on my blog. If we use ∂µMxµM as the notion of location for a datatype given by functor M, then when M is secretly a bi-functor in which the other parameter is supplied by nominal structure, then we get solvable domain equations by setting the nominal parameter to be the derived notion of location. For example, the (syntax of the) λ-calculus (with an explicit term for divergence) is given by the bi-functor&lt;/p&gt;

&lt;p&gt;M[V,A] = 1 + V + VxA + AxA&lt;/p&gt;

&lt;p&gt;If we hold V fixed and calculate ∂µMxµM with respect to A, then we can set V = ∂µMxµM and get a solvable domain equation. The Haskell code for this structure is on my blog post. Now, what i haven&#039;t talked about, yet, is that we get a notion of inner product coming from these equations. Roughly, if names are &quot;scalars&quot;, then intuition suggests terms ought to be vectors. So, then what should be dual to a vector? It needs to be a structure, say, k, such that when &quot;dotted&quot; with a term yields a scalar. Well, since we have set names to be pairs, (k,t), of contexts and terms, then we have the obvious operations k.t := (k,t). At this juncture there are several design choices. You can generalize the notion of inner product space by replacing the role of field with the algebra names inherit from the term algebra, and then show that you can recover a real inner product with encodings of arithmetic in terms of the term algebra, or you can begin with the encodings of the field operations in terms of the term algebra and pepper these through your definitions.&lt;/p&gt;

&lt;p&gt;Best wishes,&lt;/p&gt;

&lt;p&gt;--greg&lt;/p&gt;
]]></description>
		<content:encoded><![CDATA[<p>Hey Conal,</p>

<p>Interesting. i don&#8217;t know if you&#8217;ve seen my postings about using the notion of location as the notion of name. i gave a couple of write ups on my blog. If we use ∂µMxµM as the notion of location for a datatype given by functor M, then when M is secretly a bi-functor in which the other parameter is supplied by nominal structure, then we get solvable domain equations by setting the nominal parameter to be the derived notion of location. For example, the (syntax of the) λ-calculus (with an explicit term for divergence) is given by the bi-functor</p>

<p>M[V,A] = 1 + V + VxA + AxA</p>

<p>If we hold V fixed and calculate ∂µMxµM with respect to A, then we can set V = ∂µMxµM and get a solvable domain equation. The Haskell code for this structure is on my blog post. Now, what i haven&#8217;t talked about, yet, is that we get a notion of inner product coming from these equations. Roughly, if names are &#8220;scalars&#8221;, then intuition suggests terms ought to be vectors. So, then what should be dual to a vector? It needs to be a structure, say, k, such that when &#8220;dotted&#8221; with a term yields a scalar. Well, since we have set names to be pairs, (k,t), of contexts and terms, then we have the obvious operations k.t := (k,t). At this juncture there are several design choices. You can generalize the notion of inner product space by replacing the role of field with the algebra names inherit from the term algebra, and then show that you can recover a real inner product with encodings of arithmetic in terms of the term algebra, or you can begin with the encodings of the field operations in terms of the term algebra and pepper these through your definitions.</p>

<p>Best wishes,</p>

<p>&#8211;greg</p>
]]></content:encoded>
	</item>
</channel>
</rss>
