<?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 Conal Elliott</title>
	<atom:link href="http://conal.net/blog/comments/feed" rel="self" type="application/rss+xml" />
	<link>http://conal.net/blog</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>Comment on Functional reactive chatter-bots by Conal</title>
		<link>http://conal.net/blog/posts/functional-reactive-chatter-bots#comment-167359</link>
		<dc:creator><![CDATA[Conal]]></dc:creator>
		<pubDate>Sat, 26 Sep 2020 21:06:12 +0000</pubDate>
		<guid isPermaLink="false">http://conal.net/blog/posts/invasion-of-the-composable-mutant-bots/#comment-167359</guid>
		<description><![CDATA[&lt;blockquote&gt;
  &lt;p&gt;It doesn’t compile for me — did it compile in 2008?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Yes. We had this general, useful, consistent notation and lost it for the convenience of using &quot;+&quot; and &quot;*&quot; for type-level natural numbers.&lt;/p&gt;
]]></description>
		<content:encoded><![CDATA[<blockquote>
  <p>It doesn’t compile for me — did it compile in 2008?</p>
</blockquote>

<p>Yes. We had this general, useful, consistent notation and lost it for the convenience of using &#8220;+&#8221; and &#8220;*&#8221; for type-level natural numbers.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Functional reactive chatter-bots by Gregory Travis</title>
		<link>http://conal.net/blog/posts/functional-reactive-chatter-bots#comment-167351</link>
		<dc:creator><![CDATA[Gregory Travis]]></dc:creator>
		<pubDate>Sat, 26 Sep 2020 20:36:12 +0000</pubDate>
		<guid isPermaLink="false">http://conal.net/blog/posts/invasion-of-the-composable-mutant-bots/#comment-167351</guid>
		<description><![CDATA[&lt;p&gt;I&#039;m curious about the first (~&gt;) in this syntax:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;    newtype StreamArrow (~&gt;) b c = Str (Stream b ~&gt; Stream c)
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;It doesn&#039;t compile for me -- did it compile in 2008?&lt;/p&gt;
]]></description>
		<content:encoded><![CDATA[<p>I&#8217;m curious about the first (~&gt;) in this syntax:</p>

<pre><code>    newtype StreamArrow (~&gt;) b c = Str (Stream b ~&gt; Stream c)
</code></pre>

<p>It doesn&#8217;t compile for me &#8212; did it compile in 2008?</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Thoughts on semantics for 3D graphics by Conal</title>
		<link>http://conal.net/blog/posts/thoughts-on-semantics-for-3d-graphics#comment-128816</link>
		<dc:creator><![CDATA[Conal]]></dc:creator>
		<pubDate>Fri, 01 May 2020 02:19:56 +0000</pubDate>
		<guid isPermaLink="false">http://conal.net/blog/?p=90#comment-128816</guid>
		<description><![CDATA[&lt;p&gt;Terrific. Thanks again, Doug! I&#039;ve missed working in graphics, and I can use some inspiration right now.&lt;/p&gt;

&lt;p&gt;I bet a lovely repackaging of your work would be as a reinterpretation of Haskell programs via &lt;a href=&quot;http://conal.net/papers/compiling-to-categories&quot; rel=&quot;nofollow&quot;&gt;&lt;em&gt;Compiling to categories&lt;/em&gt;&lt;/a&gt;.&lt;/p&gt;
]]></description>
		<content:encoded><![CDATA[<p>Terrific. Thanks again, Doug! I&#8217;ve missed working in graphics, and I can use some inspiration right now.</p>

<p>I bet a lovely repackaging of your work would be as a reinterpretation of Haskell programs via <a href="http://conal.net/papers/compiling-to-categories" rel="nofollow"><em>Compiling to categories</em></a>.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Thoughts on semantics for 3D graphics by Doug Moen</title>
		<link>http://conal.net/blog/posts/thoughts-on-semantics-for-3d-graphics#comment-128815</link>
		<dc:creator><![CDATA[Doug Moen]]></dc:creator>
		<pubDate>Fri, 01 May 2020 02:06:17 +0000</pubDate>
		<guid isPermaLink="false">http://conal.net/blog/?p=90#comment-128815</guid>
		<description><![CDATA[&lt;p&gt;Hi Conal. My project is https://github.com/curv3d/curv. Curv is a curried, pure functional language that I created as a DSL for making 2D and 3D shapes. You&#039;ve done a lot of research that matches up with what I&#039;m trying to do, so I&#039;m reading your papers now: FRP, Tangible Values, etc. (My shapes are already continuous functions of time; next step is to make them more generally interactive, beyond what I currently do using sliders to change parameters.)&lt;/p&gt;

&lt;p&gt;An excellent reference is Sphere Tracing by John C. Hart: https://github.com/curv3d/curv/blob/master/docs/papers/sphere_tracing.pdf&lt;/p&gt;

&lt;p&gt;Here&#039;s a paper I wrote on the math behind Curv&#039;s shape representation. It says some things that Hart does not, which are relevant to Curv: https://github.com/curv3d/curv/blob/master/docs/Theory.rst&lt;/p&gt;

&lt;p&gt;My library of shape combinators is documented here: https://github.com/curv3d/curv/tree/master/docs/shapes&lt;/p&gt;

&lt;p&gt;This doc explains that a shape has a distance field, and it classifies distance fields as exact, mitred, approximate, bad and discontinuous. You need to know this because shape combinators are sensitive to the class of distance field they receive as input, and they may return a worse class of distance than what they received as input.
https://github.com/curv3d/curv/blob/master/docs/shapes/Shapes.rst&lt;/p&gt;

&lt;p&gt;The documentation for each shape combinator describes its limitations with respect to the classes of distance field that it accepts as input and produces as output.&lt;/p&gt;

&lt;p&gt;Other people have addressed this problem (of users needing to worry about distance field properties) by restricting expressiveness, limiting the set of shapes and shape combinators you can define or use. All of the related projects listed below restrict expressiveness and thereby make the abstraction less leaky.&lt;/p&gt;

&lt;p&gt;Related projects:&lt;/p&gt;

&lt;p&gt;ImplicitCAD is written in Haskell, and uses the same signed distance representation. No GPU compilation, and there is a fixed set of distance field operations hard coded into the library, which you have to hack to define new primitives. It&#039;s not extensible like Curv is. No colour or animation. https://github.com/colah/ImplicitCAD&lt;/p&gt;

&lt;p&gt;libfive uses Scheme as its extension language. It has some restrictions relative to Curv: distance functions must be closed form expressions (no conditionals, no recursion), so many Curv primitives cannot be ported. But, there is no Lipshitz continuity restriction on distance functions, so this restriction removes a burden from users. Shapes are converted to a triangle mesh before being displayed, so no fine detail, no infinite shapes. Also no colour or animation. The author, Matt Keeter, has a paper in this year&#039;s SigGraph on compiling his closed-form distance functions to GPU shader code without using sphere tracing. This is a new algorithm: the paper and the source code are not yet available at time of writing.&lt;/p&gt;

&lt;p&gt;The video game &quot;Dreams&quot; on Playstation by Media Molecule uses signed distance fields to represent all geometric shapes in the game. You can create your own content using an editor, by unioning, differencing and blending a small fixed set of geometric primitives. The set of geometric primitives and shape operators is sharply limited to make everything well behaved. The GPU implementation is quite interesting and impressive; I&#039;m studying it with an eye to duplicating their best tricks in Curv some day. https://www.mediamolecule.com/blog/article/siggraph_2015&lt;/p&gt;
]]></description>
		<content:encoded><![CDATA[<p>Hi Conal. My project is <a href="https://github.com/curv3d/curv" rel="nofollow">https://github.com/curv3d/curv</a>. Curv is a curried, pure functional language that I created as a DSL for making 2D and 3D shapes. You&#8217;ve done a lot of research that matches up with what I&#8217;m trying to do, so I&#8217;m reading your papers now: FRP, Tangible Values, etc. (My shapes are already continuous functions of time; next step is to make them more generally interactive, beyond what I currently do using sliders to change parameters.)</p>

<p>An excellent reference is Sphere Tracing by John C. Hart: <a href="https://github.com/curv3d/curv/blob/master/docs/papers/sphere_tracing.pdf" rel="nofollow">https://github.com/curv3d/curv/blob/master/docs/papers/sphere_tracing.pdf</a></p>

<p>Here&#8217;s a paper I wrote on the math behind Curv&#8217;s shape representation. It says some things that Hart does not, which are relevant to Curv: <a href="https://github.com/curv3d/curv/blob/master/docs/Theory.rst" rel="nofollow">https://github.com/curv3d/curv/blob/master/docs/Theory.rst</a></p>

<p>My library of shape combinators is documented here: <a href="https://github.com/curv3d/curv/tree/master/docs/shapes" rel="nofollow">https://github.com/curv3d/curv/tree/master/docs/shapes</a></p>

<p>This doc explains that a shape has a distance field, and it classifies distance fields as exact, mitred, approximate, bad and discontinuous. You need to know this because shape combinators are sensitive to the class of distance field they receive as input, and they may return a worse class of distance than what they received as input.
<a href="https://github.com/curv3d/curv/blob/master/docs/shapes/Shapes.rst" rel="nofollow">https://github.com/curv3d/curv/blob/master/docs/shapes/Shapes.rst</a></p>

<p>The documentation for each shape combinator describes its limitations with respect to the classes of distance field that it accepts as input and produces as output.</p>

<p>Other people have addressed this problem (of users needing to worry about distance field properties) by restricting expressiveness, limiting the set of shapes and shape combinators you can define or use. All of the related projects listed below restrict expressiveness and thereby make the abstraction less leaky.</p>

<p>Related projects:</p>

<p>ImplicitCAD is written in Haskell, and uses the same signed distance representation. No GPU compilation, and there is a fixed set of distance field operations hard coded into the library, which you have to hack to define new primitives. It&#8217;s not extensible like Curv is. No colour or animation. <a href="https://github.com/colah/ImplicitCAD" rel="nofollow">https://github.com/colah/ImplicitCAD</a></p>

<p>libfive uses Scheme as its extension language. It has some restrictions relative to Curv: distance functions must be closed form expressions (no conditionals, no recursion), so many Curv primitives cannot be ported. But, there is no Lipshitz continuity restriction on distance functions, so this restriction removes a burden from users. Shapes are converted to a triangle mesh before being displayed, so no fine detail, no infinite shapes. Also no colour or animation. The author, Matt Keeter, has a paper in this year&#8217;s SigGraph on compiling his closed-form distance functions to GPU shader code without using sphere tracing. This is a new algorithm: the paper and the source code are not yet available at time of writing.</p>

<p>The video game &#8220;Dreams&#8221; on Playstation by Media Molecule uses signed distance fields to represent all geometric shapes in the game. You can create your own content using an editor, by unioning, differencing and blending a small fixed set of geometric primitives. The set of geometric primitives and shape operators is sharply limited to make everything well behaved. The GPU implementation is quite interesting and impressive; I&#8217;m studying it with an eye to duplicating their best tricks in Curv some day. <a href="https://www.mediamolecule.com/blog/article/siggraph_2015" rel="nofollow">https://www.mediamolecule.com/blog/article/siggraph_2015</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Thoughts on semantics for 3D graphics by Conal</title>
		<link>http://conal.net/blog/posts/thoughts-on-semantics-for-3d-graphics#comment-128806</link>
		<dc:creator><![CDATA[Conal]]></dc:creator>
		<pubDate>Fri, 01 May 2020 00:42:19 +0000</pubDate>
		<guid isPermaLink="false">http://conal.net/blog/?p=90#comment-128806</guid>
		<description><![CDATA[&lt;p&gt;Thanks for the comment, Doug! I&#039;d be grateful for more references, including how the Lipschitz condition relates to sphere tracing and how that requirement gets violated. Also the project you&#039;re working on (if public) and/or related projects. Also the project you&#039;re working on (if public) and/or related projects, as well as the work you mentioned by Vladimir Slepnev and by Inigo Quilez.&lt;/p&gt;
]]></description>
		<content:encoded><![CDATA[<p>Thanks for the comment, Doug! I&#8217;d be grateful for more references, including how the Lipschitz condition relates to sphere tracing and how that requirement gets violated. Also the project you&#8217;re working on (if public) and/or related projects. Also the project you&#8217;re working on (if public) and/or related projects, as well as the work you mentioned by Vladimir Slepnev and by Inigo Quilez.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Thoughts on semantics for 3D graphics by Doug Moen</title>
		<link>http://conal.net/blog/posts/thoughts-on-semantics-for-3d-graphics#comment-128777</link>
		<dc:creator><![CDATA[Doug Moen]]></dc:creator>
		<pubDate>Thu, 30 Apr 2020 22:35:50 +0000</pubDate>
		<guid isPermaLink="false">http://conal.net/blog/?p=90#comment-128777</guid>
		<description><![CDATA[&lt;p&gt;I implemented Vladimir Slepnev&#039;s idea (not in Haskell, but another pure functional language). Using signed distance fields as the shape representation gives a continuous functional representation for 3D solids, with union, morph, blending, etc. You can represent a lot of shapes that aren&#039;t representable using traditional methods like vector graphics, or using discrete representations or like voxels or triangle meshes. For example, you can model fractals, which have theoretically infinite detail, which you can zoom into. I compile my functional code into a single GPU shader program, as per Inigo Quilez. I&#039;m pretty excited by the results. But like all representations for 3D solids, it&#039;s a leaky abstraction. You ultimately have to be aware of performance issues, and some shapes can&#039;t be represented because their distance functions would be too expensive to evaluate. Sphere tracing requires the distance function to be Lipschitz(1). If you have a rich set of shape operators, like twist and bend and morph, then the output can violate the Lipschitz(1) requirement in certain cases, and ultimately the user has to be aware of this (leaky abstraction) and work around the problem. I&#039;m extending my program to overcome these problems, so that I can represent a larger set of shapes, by giving the user more control over the internal shape representation, and providing multiple representations and rendering methods, but by making the program more powerful in this way, the leaky abstraction problem gets worse. There is no non-leaky abstraction for real numbers, so it&#039;s not surprising that the same problems reoccur for geometric shapes.&lt;/p&gt;
]]></description>
		<content:encoded><![CDATA[<p>I implemented Vladimir Slepnev&#8217;s idea (not in Haskell, but another pure functional language). Using signed distance fields as the shape representation gives a continuous functional representation for 3D solids, with union, morph, blending, etc. You can represent a lot of shapes that aren&#8217;t representable using traditional methods like vector graphics, or using discrete representations or like voxels or triangle meshes. For example, you can model fractals, which have theoretically infinite detail, which you can zoom into. I compile my functional code into a single GPU shader program, as per Inigo Quilez. I&#8217;m pretty excited by the results. But like all representations for 3D solids, it&#8217;s a leaky abstraction. You ultimately have to be aware of performance issues, and some shapes can&#8217;t be represented because their distance functions would be too expensive to evaluate. Sphere tracing requires the distance function to be Lipschitz(1). If you have a rich set of shape operators, like twist and bend and morph, then the output can violate the Lipschitz(1) requirement in certain cases, and ultimately the user has to be aware of this (leaky abstraction) and work around the problem. I&#8217;m extending my program to overcome these problems, so that I can represent a larger set of shapes, by giving the user more control over the internal shape representation, and providing multiple representations and rendering methods, but by making the program more powerful in this way, the leaky abstraction problem gets worse. There is no non-leaky abstraction for real numbers, so it&#8217;s not surprising that the same problems reoccur for geometric shapes.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Denotational design with type class morphisms by Conal</title>
		<link>http://conal.net/blog/posts/denotational-design-with-type-class-morphisms#comment-73644</link>
		<dc:creator><![CDATA[Conal]]></dc:creator>
		<pubDate>Wed, 02 Jan 2019 19:12:02 +0000</pubDate>
		<guid isPermaLink="false">http://conal.net/blog/?p=84#comment-73644</guid>
		<description><![CDATA[&lt;p&gt;Hi Michal. Thanks for the comment. I think that equation is as I intended. Writing “&lt;code class=&quot;sourceCode haskell&quot;&gt;⟦m⟧&lt;/code&gt;” instead as “&lt;code class=&quot;sourceCode haskell&quot;&gt;μ m&lt;/code&gt;” may help clarify. Then&lt;/p&gt;

&lt;div class=&quot;sourceCode&quot; id=&quot;cb4&quot;&gt;&lt;pre class=&quot;sourceCode haskell&quot;&gt;&lt;code class=&quot;sourceCode haskell&quot;&gt;&lt;a class=&quot;sourceLine&quot; id=&quot;cb4-1&quot; title=&quot;1&quot; rel=&quot;nofollow&quot;&gt;    &lt;span class=&quot;ot&quot;&gt;∀&lt;/span&gt; m&lt;span class=&quot;fu&quot;&gt;.&lt;/span&gt; μ (&lt;span class=&quot;fu&quot;&gt;fmap&lt;/span&gt; f m) ≡ &lt;span class=&quot;fu&quot;&gt;fmap&lt;/span&gt; f (μ m)&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb4-2&quot; title=&quot;2&quot; rel=&quot;nofollow&quot;&gt; ⟺ &lt;span class=&quot;ot&quot;&gt;∀&lt;/span&gt; m&lt;span class=&quot;fu&quot;&gt;.&lt;/span&gt; (μ ∘ &lt;span class=&quot;fu&quot;&gt;fmap&lt;/span&gt; f) m ≡ (&lt;span class=&quot;fu&quot;&gt;fmap&lt;/span&gt; f ∘ μ) m&lt;/a&gt;
&lt;a class=&quot;sourceLine&quot; id=&quot;cb4-3&quot; title=&quot;3&quot; rel=&quot;nofollow&quot;&gt; ⟺ μ ∘ &lt;span class=&quot;fu&quot;&gt;fmap&lt;/span&gt; f ≡ &lt;span class=&quot;fu&quot;&gt;fmap&lt;/span&gt; f ∘ μ&lt;/a&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;&lt;/body&gt;&lt;/p&gt;
]]></description>
		<content:encoded><![CDATA[<p>Hi Michal. Thanks for the comment. I think that equation is as I intended. Writing “<code class="sourceCode haskell">⟦m⟧</code>” instead as “<code class="sourceCode haskell">μ m</code>” may help clarify. Then</p>

<div class="sourceCode" id="cb4"><pre class="sourceCode haskell"><code class="sourceCode haskell"><a class="sourceLine" id="cb4-1" title="1" rel="nofollow">    <span class="ot">∀</span> m<span class="fu">.</span> μ (<span class="fu">fmap</span> f m) ≡ <span class="fu">fmap</span> f (μ m)</a>
<a class="sourceLine" id="cb4-2" title="2" rel="nofollow"> ⟺ <span class="ot">∀</span> m<span class="fu">.</span> (μ ∘ <span class="fu">fmap</span> f) m ≡ (<span class="fu">fmap</span> f ∘ μ) m</a>
<a class="sourceLine" id="cb4-3" title="3" rel="nofollow"> ⟺ μ ∘ <span class="fu">fmap</span> f ≡ <span class="fu">fmap</span> f ∘ μ</a></code></pre></div>

<p></p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Denotational design with type class morphisms by Michał Ciaszczyk</title>
		<link>http://conal.net/blog/posts/denotational-design-with-type-class-morphisms#comment-73432</link>
		<dc:creator><![CDATA[Michał Ciaszczyk]]></dc:creator>
		<pubDate>Mon, 31 Dec 2018 04:24:10 +0000</pubDate>
		<guid isPermaLink="false">http://conal.net/blog/?p=84#comment-73432</guid>
		<description><![CDATA[&lt;p&gt;Hello!
I have been thoroughly enjoying watching your talks on FRP and denotational design. This is fantastic work.&lt;/p&gt;

&lt;p&gt;Since you seem to still update this paper occasionally, here&#039;s a typo I noticed:
In the end of section 5.2 on page 5, in the equation [[fmap f m]] = fmap f [[m]], I&#039;m pretty sure fmap f [[m]] should be the composition fmap f ◦ [[m]] - so the expression can type check and be consistent with the following line.&lt;/p&gt;
]]></description>
		<content:encoded><![CDATA[<p>Hello!
I have been thoroughly enjoying watching your talks on FRP and denotational design. This is fantastic work.</p>

<p>Since you seem to still update this paper occasionally, here&#8217;s a typo I noticed:
In the end of section 5.2 on page 5, in the equation [[fmap f m]] = fmap f [[m]], I&#8217;m pretty sure fmap f [[m]] should be the composition fmap f ◦ [[m]] &#8211; so the expression can type check and be consistent with the following line.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Why program with continuous time? by Conal</title>
		<link>http://conal.net/blog/posts/why-program-with-continuous-time#comment-72614</link>
		<dc:creator><![CDATA[Conal]]></dc:creator>
		<pubDate>Mon, 17 Dec 2018 03:07:50 +0000</pubDate>
		<guid isPermaLink="false">http://conal.net/blog/?p=93#comment-72614</guid>
		<description><![CDATA[&lt;p&gt;Peter T.: Yes. Why &quot;But&quot;?&lt;/p&gt;
]]></description>
		<content:encoded><![CDATA[<p>Peter T.: Yes. Why &#8220;But&#8221;?</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Why program with continuous time? by Peter T.</title>
		<link>http://conal.net/blog/posts/why-program-with-continuous-time#comment-72605</link>
		<dc:creator><![CDATA[Peter T.]]></dc:creator>
		<pubDate>Sun, 16 Dec 2018 23:55:04 +0000</pubDate>
		<guid isPermaLink="false">http://conal.net/blog/?p=93#comment-72605</guid>
		<description><![CDATA[&lt;p&gt;&quot;For that reason, we don’t generally use strings in place of numbers. If we did, composition operations (arithmetic) would be very awkward.&quot;&lt;/p&gt;

&lt;p&gt;As someone who has plumbed the depths of bigint optimization across multiple ISAs for elliptic curve cryptography, yes, it is indeed very awkward. :)&lt;/p&gt;

&lt;p&gt;But in the context of your analysis, wouldn&#039;t decoupling arithmetic from machine word size--entirely--be the purest ADT?&lt;/p&gt;
]]></description>
		<content:encoded><![CDATA[<p>&#8220;For that reason, we don’t generally use strings in place of numbers. If we did, composition operations (arithmetic) would be very awkward.&#8221;</p>

<p>As someone who has plumbed the depths of bigint optimization across multiple ISAs for elliptic curve cryptography, yes, it is indeed very awkward. <img src="http://conal.net/blog/wp-includes/images/smilies/icon_smile.gif" alt=":)" class="wp-smiley" /></p>

<p>But in the context of your analysis, wouldn&#8217;t decoupling arithmetic from machine word size&#8211;entirely&#8211;be the purest ADT?</p>
]]></content:encoded>
	</item>
</channel>
</rss>
