<?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: Why isn&#039;t Haskell popular in Industry?</title>
	<atom:link href="http://www.palgorithm.co.uk/2010/05/why-isnt-haskell-popular-in-industry/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.palgorithm.co.uk/2010/05/why-isnt-haskell-popular-in-industry/</link>
	<description>Discussion of algorithms for games, graphics and general engineering</description>
	<lastBuildDate>Fri, 16 Dec 2011 09:40:36 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: Alexander Solla</title>
		<link>http://www.palgorithm.co.uk/2010/05/why-isnt-haskell-popular-in-industry/comment-page-1/#comment-7573</link>
		<dc:creator>Alexander Solla</dc:creator>
		<pubDate>Fri, 11 Feb 2011 23:09:25 +0000</pubDate>
		<guid isPermaLink="false">http://www.palgorithm.co.uk/?p=240#comment-7573</guid>
		<description>I just ignore the &quot;line noise&quot;.  Line noise is &lt;i&gt;nearly always&lt;/i&gt; glue code.  I don&#039;t want that named.  I just want it done.  Yes, it can be hard to write from scratch.  But any sane Haskell development environment uses an interactive environment like GHCi.  If you use the type checker to guide you, writing the glue becomes trivial.  Encode logic in data types, and let the glue write itself.  If glue code type checks, it &lt;i&gt;works&lt;/i&gt;, guaranteed.  These are free theorems.  Focus on the important things:  the stuff you&#039;re gluing together.

And often, there is no natural name for a function that traverses multiple control structures.  The denotation is the most informative name.  What would you name a function that lifts a function into two nested functors, is partially applied, and is then lifted up into another functor?  This kind of stuff happens quite a bit.  And my code is easy to read, because nearly invisible glue code connects two concepts in a relationship that makes sense (typically in terms of products or direct sums implemented via functors).

Consider the expression: (num_shirts_in_factory_a + num_shirts_in_factory_b).  Which parts of that expression are the informative ones?  Obviously, it is the &quot;num_shirts&quot; variables.  And there is only one &quot;sensible&quot; way to put those quantities together.  Now push this idea to its limit.  It is more than there just being one sensible way to write glue.  There is exactly one glue function between glue-able types.

On the other hand, I have used some type classes to move some of the more repetitive glue away.  I have classes like:

class Monic a b where inject :: a -&gt; b -- to represent monic morphisms
class Epic a b   where surject :: a -&gt; b -- to represent epic morphisms

You can easily have a class like

class Glue a b where
        glue :: a -&gt; b

and hide all the line noise in there.  And then your client code will look like

blah :: StateT (MaybeT IO) (Integer) (Maybe Integer)
blah = glue . parseInt . glue . getLine
-- or
blah = glue $ parseInt $ glue $ getLine

This is how &quot;line noise&quot; glue code looks to me.  Except line noise is more maintainable. *fnord*  Note that these glue functions would each require their own distinct type class instance.  

The nicer the client code looks, the more complexity you have to shovel into the Glue instances.  But you are merely transferring complexity -- not creating or destroying it.  Complexity is created by data type definitions being glued.  There is the potential for a combinatorial explosion, since you can have unused Glue instances, whereas you cannot have unused &quot;line noise&quot; glue code.

Mathematicians don&#039;t care about mathematical symbols.  They care about the things the symbols &lt;i&gt;join&lt;/i&gt;, because the semantics of joining &quot;things&quot; is &lt;i&gt;dependent on -- and usually determined by -- the things being joined&lt;/i&gt;.</description>
		<content:encoded><![CDATA[<p>I just ignore the "line noise".  Line noise is <i>nearly always</i> glue code.  I don't want that named.  I just want it done.  Yes, it can be hard to write from scratch.  But any sane Haskell development environment uses an interactive environment like GHCi.  If you use the type checker to guide you, writing the glue becomes trivial.  Encode logic in data types, and let the glue write itself.  If glue code type checks, it <i>works</i>, guaranteed.  These are free theorems.  Focus on the important things:  the stuff you're gluing together.</p>
<p>And often, there is no natural name for a function that traverses multiple control structures.  The denotation is the most informative name.  What would you name a function that lifts a function into two nested functors, is partially applied, and is then lifted up into another functor?  This kind of stuff happens quite a bit.  And my code is easy to read, because nearly invisible glue code connects two concepts in a relationship that makes sense (typically in terms of products or direct sums implemented via functors).</p>
<p>Consider the expression: (num_shirts_in_factory_a + num_shirts_in_factory_b).  Which parts of that expression are the informative ones?  Obviously, it is the "num_shirts" variables.  And there is only one "sensible" way to put those quantities together.  Now push this idea to its limit.  It is more than there just being one sensible way to write glue.  There is exactly one glue function between glue-able types.</p>
<p>On the other hand, I have used some type classes to move some of the more repetitive glue away.  I have classes like:</p>
<p>class Monic a b where inject :: a -&gt; b -- to represent monic morphisms<br />
class Epic a b   where surject :: a -&gt; b -- to represent epic morphisms</p>
<p>You can easily have a class like</p>
<p>class Glue a b where<br />
        glue :: a -&gt; b</p>
<p>and hide all the line noise in there.  And then your client code will look like</p>
<p>blah :: StateT (MaybeT IO) (Integer) (Maybe Integer)<br />
blah = glue . parseInt . glue . getLine<br />
-- or<br />
blah = glue $ parseInt $ glue $ getLine</p>
<p>This is how "line noise" glue code looks to me.  Except line noise is more maintainable. *fnord*  Note that these glue functions would each require their own distinct type class instance.  </p>
<p>The nicer the client code looks, the more complexity you have to shovel into the Glue instances.  But you are merely transferring complexity -- not creating or destroying it.  Complexity is created by data type definitions being glued.  There is the potential for a combinatorial explosion, since you can have unused Glue instances, whereas you cannot have unused "line noise" glue code.</p>
<p>Mathematicians don't care about mathematical symbols.  They care about the things the symbols <i>join</i>, because the semantics of joining "things" is <i>dependent on -- and usually determined by -- the things being joined</i>.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Blaisorblade</title>
		<link>http://www.palgorithm.co.uk/2010/05/why-isnt-haskell-popular-in-industry/comment-page-1/#comment-5714</link>
		<dc:creator>Blaisorblade</dc:creator>
		<pubDate>Fri, 06 Aug 2010 13:33:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.palgorithm.co.uk/?p=240#comment-5714</guid>
		<description>About syntax: operator overloading is always controversial, but Guy Steele clearly stated he wanted it for Java, in his talk &quot;Growing a Language&quot;.
But yes, there are cases where overloads are not so natural, and a name should be provided (to be used as an operator possibly). But that is mostly about the second issue - completeness of existing libraries.
I&#039;m still a learner of Haskell, but I happened to find many half-finished projects for Haskell, or having only partial documentation.</description>
		<content:encoded><![CDATA[<p>About syntax: operator overloading is always controversial, but Guy Steele clearly stated he wanted it for Java, in his talk "Growing a Language".<br />
But yes, there are cases where overloads are not so natural, and a name should be provided (to be used as an operator possibly). But that is mostly about the second issue - completeness of existing libraries.<br />
I'm still a learner of Haskell, but I happened to find many half-finished projects for Haskell, or having only partial documentation.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Karsten Wagner</title>
		<link>http://www.palgorithm.co.uk/2010/05/why-isnt-haskell-popular-in-industry/comment-page-1/#comment-5702</link>
		<dc:creator>Karsten Wagner</dc:creator>
		<pubDate>Tue, 03 Aug 2010 13:06:34 +0000</pubDate>
		<guid isPermaLink="false">http://www.palgorithm.co.uk/?p=240#comment-5702</guid>
		<description>An important point missing: Syntax. Ideomatic Hakell-Code often looks like line-noise. In other words: Haskell has the worst looking code since Perl.

While this seems superficial, it´s quite important in the industry. Guess why Cobol had the syntax it has and why Javas &quot;elaborate&quot; syntax is considered a feature. Naming stuff is better than using strange symbols if big teams work on big code-bases - thats the main reason Java still hasn´t operator overloading. 

Haskell has been designed as a language for programming-language-reseach. In this area free definable operators are a good thing because it allows to try out interesting things without having to change the parser of the compiler. But for industrial use, it´s a very dangerous feature.</description>
		<content:encoded><![CDATA[<p>An important point missing: Syntax. Ideomatic Hakell-Code often looks like line-noise. In other words: Haskell has the worst looking code since Perl.</p>
<p>While this seems superficial, it´s quite important in the industry. Guess why Cobol had the syntax it has and why Javas "elaborate" syntax is considered a feature. Naming stuff is better than using strange symbols if big teams work on big code-bases - thats the main reason Java still hasn´t operator overloading. </p>
<p>Haskell has been designed as a language for programming-language-reseach. In this area free definable operators are a good thing because it allows to try out interesting things without having to change the parser of the compiler. But for industrial use, it´s a very dangerous feature.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: rak</title>
		<link>http://www.palgorithm.co.uk/2010/05/why-isnt-haskell-popular-in-industry/comment-page-1/#comment-5698</link>
		<dc:creator>rak</dc:creator>
		<pubDate>Mon, 02 Aug 2010 20:15:01 +0000</pubDate>
		<guid isPermaLink="false">http://www.palgorithm.co.uk/?p=240#comment-5698</guid>
		<description>Maybe this is obvious, but it&#039;s worth noting: 

If it&#039;s merely just as productive as what people are already familiar with, or pretty close to it, there&#039;s no reason to switch.</description>
		<content:encoded><![CDATA[<p>Maybe this is obvious, but it's worth noting: </p>
<p>If it's merely just as productive as what people are already familiar with, or pretty close to it, there's no reason to switch.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Edward Kmett</title>
		<link>http://www.palgorithm.co.uk/2010/05/why-isnt-haskell-popular-in-industry/comment-page-1/#comment-5697</link>
		<dc:creator>Edward Kmett</dc:creator>
		<pubDate>Mon, 02 Aug 2010 19:05:48 +0000</pubDate>
		<guid isPermaLink="false">http://www.palgorithm.co.uk/?p=240#comment-5697</guid>
		<description>3,4. Yes, Haskell is different.

4. When I for one whip out the &quot;monad is a monoid in the category of endofunctors&quot; comment, it is mostly with my tongue firmly in my cheek, unless I&#039;m talking to someone else who has spent a lot of time fiddling with category theory. My blog is filled with particularly egregious examples of this sort, but I make no claims that it is a gentle introduction, merely a smattering of things I want to talk about.

6. I have never had difficulty meeting my demand for Haskell programmers and the ones I have hired have been among my best employees.

7. Talking to an (XML-) RPC server: http://www.haskell.org/haxr/ There are also several others.

7. Lack of windows support: yes this is definitely a big deal. In the Haskell community&#039;s case, there just isn&#039;t much of a user base there building things. Yes, this goes back to your previously mentioned recursion principle, but sadly, it is an artifact of the current user base. The Platform, however, builds on Windows and is growing to encompass more and more of the core functionality you would expect out of a language with &#039;batteries included&#039;.

8. Isn&#039;t a problem if you take the time to grok strictness annotations and explicitly unpack structures that will obviously be used with high frequency. These will help address space leaks, which cover the worst performance issues. 

w.r.t. Embedding: The old [Request] -&gt; [Response] driver was an &#039;initial algebraic encoding&#039; of the problem. On the other hand, IO is &#039;final&#039;. They are equivalent systems. You&#039;re mistaking arguable issues with there being too many assumed trappings in the existing platform for embedded systems work for the mechanism used to implement those trappings. If you&#039;re turning to an ADT to express a language you&#039;re probably using the wrong tool (See &quot;Finally Tagless, Partially Evaluated&quot;).

As to your overall conclusion? I happen to disagree, but wanted to stick to quantifiable issues.</description>
		<content:encoded><![CDATA[<p>3,4. Yes, Haskell is different.</p>
<p>4. When I for one whip out the "monad is a monoid in the category of endofunctors" comment, it is mostly with my tongue firmly in my cheek, unless I'm talking to someone else who has spent a lot of time fiddling with category theory. My blog is filled with particularly egregious examples of this sort, but I make no claims that it is a gentle introduction, merely a smattering of things I want to talk about.</p>
<p>6. I have never had difficulty meeting my demand for Haskell programmers and the ones I have hired have been among my best employees.</p>
<p>7. Talking to an (XML-) RPC server: <a href="http://www.haskell.org/haxr/" rel="nofollow">http://www.haskell.org/haxr/</a> There are also several others.</p>
<p>7. Lack of windows support: yes this is definitely a big deal. In the Haskell community's case, there just isn't much of a user base there building things. Yes, this goes back to your previously mentioned recursion principle, but sadly, it is an artifact of the current user base. The Platform, however, builds on Windows and is growing to encompass more and more of the core functionality you would expect out of a language with 'batteries included'.</p>
<p>8. Isn't a problem if you take the time to grok strictness annotations and explicitly unpack structures that will obviously be used with high frequency. These will help address space leaks, which cover the worst performance issues. </p>
<p>w.r.t. Embedding: The old [Request] -&gt; [Response] driver was an 'initial algebraic encoding' of the problem. On the other hand, IO is 'final'. They are equivalent systems. You're mistaking arguable issues with there being too many assumed trappings in the existing platform for embedded systems work for the mechanism used to implement those trappings. If you're turning to an ADT to express a language you're probably using the wrong tool (See "Finally Tagless, Partially Evaluated").</p>
<p>As to your overall conclusion? I happen to disagree, but wanted to stick to quantifiable issues.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mark Wotton</title>
		<link>http://www.palgorithm.co.uk/2010/05/why-isnt-haskell-popular-in-industry/comment-page-1/#comment-5692</link>
		<dc:creator>Mark Wotton</dc:creator>
		<pubDate>Mon, 02 Aug 2010 04:41:45 +0000</pubDate>
		<guid isPermaLink="false">http://www.palgorithm.co.uk/?p=240#comment-5692</guid>
		<description>Embedding is certainly possible. I&#039;m doing it with Hubris, and the Haskell FFI is a joy to work with in that direction too. It&#039;s not emphasised, for some reason - I think most Haskellers expect Haskell to be on top of the stack, but using Haskell with a loose binding language like Ruby seems eminently sensible to me.</description>
		<content:encoded><![CDATA[<p>Embedding is certainly possible. I'm doing it with Hubris, and the Haskell FFI is a joy to work with in that direction too. It's not emphasised, for some reason - I think most Haskellers expect Haskell to be on top of the stack, but using Haskell with a loose binding language like Ruby seems eminently sensible to me.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: casey</title>
		<link>http://www.palgorithm.co.uk/2010/05/why-isnt-haskell-popular-in-industry/comment-page-1/#comment-5690</link>
		<dc:creator>casey</dc:creator>
		<pubDate>Mon, 02 Aug 2010 03:19:56 +0000</pubDate>
		<guid isPermaLink="false">http://www.palgorithm.co.uk/?p=240#comment-5690</guid>
		<description>OO is popular for modeling domains, and for better or worse, OO design is entrenched in industry, and isn&#039;t going away.

Are FP and OO fundamentally incompatible? If Haskell&#039;s type system is so superior, how does one actually make the transition from an OO mindset, and how does one approach complex domain modeling problems in Haskell? Where are the case studies in how this benefits industry? I still haven&#039;t seen this addressed from the Haskell community... though I have seen lots of academically interesting concepts come out of it.</description>
		<content:encoded><![CDATA[<p>OO is popular for modeling domains, and for better or worse, OO design is entrenched in industry, and isn't going away.</p>
<p>Are FP and OO fundamentally incompatible? If Haskell's type system is so superior, how does one actually make the transition from an OO mindset, and how does one approach complex domain modeling problems in Haskell? Where are the case studies in how this benefits industry? I still haven't seen this addressed from the Haskell community... though I have seen lots of academically interesting concepts come out of it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Greg Graham</title>
		<link>http://www.palgorithm.co.uk/2010/05/why-isnt-haskell-popular-in-industry/comment-page-1/#comment-5689</link>
		<dc:creator>Greg Graham</dc:creator>
		<pubDate>Mon, 02 Aug 2010 02:20:14 +0000</pubDate>
		<guid isPermaLink="false">http://www.palgorithm.co.uk/?p=240#comment-5689</guid>
		<description>Did people say &quot;n00b&quot; back when C++ came out? I don&#039;t remember hearing it then, or at least seeing it spelled with zeros. ;)</description>
		<content:encoded><![CDATA[<p>Did people say "n00b" back when C++ came out? I don't remember hearing it then, or at least seeing it spelled with zeros. <img src='http://www.palgorithm.co.uk/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Greg</title>
		<link>http://www.palgorithm.co.uk/2010/05/why-isnt-haskell-popular-in-industry/comment-page-1/#comment-5688</link>
		<dc:creator>Greg</dc:creator>
		<pubDate>Sun, 01 Aug 2010 22:39:58 +0000</pubDate>
		<guid isPermaLink="false">http://www.palgorithm.co.uk/?p=240#comment-5688</guid>
		<description>http://www.reddit.com/r/haskell/comments/cs54i/how_would_you_write_du_in_haskell/</description>
		<content:encoded><![CDATA[<p><a href="http://www.reddit.com/r/haskell/comments/cs54i/how_would_you_write_du_in_haskell/" rel="nofollow">http://www.reddit.com/r/haskell/comments/cs54i/how_would_you_write_du_in_haskell/</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Eric Kow</title>
		<link>http://www.palgorithm.co.uk/2010/05/why-isnt-haskell-popular-in-industry/comment-page-1/#comment-5516</link>
		<dc:creator>Eric Kow</dc:creator>
		<pubDate>Fri, 11 Jun 2010 11:57:19 +0000</pubDate>
		<guid isPermaLink="false">http://www.palgorithm.co.uk/?p=240#comment-5516</guid>
		<description>The truth about Darcs performance is hard for me to convey in a snark-proof soundbite of less than 140 characters.

My latest attempt at boiling it down is to say that Darcs performance is about three things: (i) theory, (ii) engineering and (iii) implementation.

Theory means the core theory of patches which makes Darcs powerful and easy to use... until you hit a conflict.  Simple conflicts are fine.  When conflicts nest, however, you do get a combinatorial explosion of nested &quot;merger&quot; or &quot;conflictor&quot; patches.  The darcs-2 version of patch theory obviates a lot of this nesting, but we still have a lot of work to do on the theory end.  Haskell is irrelevant here.

Engineering refers to high-level choices about how we store information and ship it around.  Darcs performance has been improving a lot in the last two years because we have been emphasising the engineering aspect of things.  For example, we use timestamps to determine if we need to check the committed and working copy of a file for differences; however, because we also use hard-links to save time/space, the timestamps from the filesystem can mislead Darcs into checking for way more differences than it needs to.  Recent versions of Darcs use an index file to store our own timestamps.  Another example of work we are doing in this line is to &quot;pack&quot; our many small files into fewer larger files that we can transfer over HTTP a lot more quickly.  

Implementation can include choices like Haskell as a programming language.  The last time I tried to clarify this, I said that Haskell doesn&#039;t make a difference here.  Thinking more about it, I realise I was likely wrong.  Sorry!  One place where Haskell *could* make a difference is that we have a number of &lt;a href=&quot;http://bugs.darcs.net/issue?@columns=title,id,activity,status,assignedto&amp;@sort=activity&amp;@group=priority&amp;@filter=topic,status&amp;@pagesize=50&amp;@startwith=0&amp;topic=11&amp;status=-1,1,2,3,4,5,6,16,17&amp;@dispname=Performance&quot; rel=&quot;nofollow&quot;&gt;performance bugs&lt;/a&gt; we have open where Darcs seems to be using an unreasonable amount of memory for the task at hand.  It&#039;s not yet clear to me if these are actually engineering bugs in disguise, or if some of them are not merely implementation details.  The Darcs team is quite small; we need all the help we can get.  Once we&#039;ve reached a couple of engineering milestones we have in mind, it&#039;d be really great if the wider Haskell community could give us a hand on understanding these bugs.

Meanwhile, I still have the conviction that solving a lot of the engineering issues (Darcs 2.5 and 2.6 look very promising) will make Darcs a lot faster for most people, most of the time.  We still need to work on theory and implementation over time, but I hope you&#039;ll like what we&#039;ve accomplished for the short term.</description>
		<content:encoded><![CDATA[<p>The truth about Darcs performance is hard for me to convey in a snark-proof soundbite of less than 140 characters.</p>
<p>My latest attempt at boiling it down is to say that Darcs performance is about three things: (i) theory, (ii) engineering and (iii) implementation.</p>
<p>Theory means the core theory of patches which makes Darcs powerful and easy to use... until you hit a conflict.  Simple conflicts are fine.  When conflicts nest, however, you do get a combinatorial explosion of nested "merger" or "conflictor" patches.  The darcs-2 version of patch theory obviates a lot of this nesting, but we still have a lot of work to do on the theory end.  Haskell is irrelevant here.</p>
<p>Engineering refers to high-level choices about how we store information and ship it around.  Darcs performance has been improving a lot in the last two years because we have been emphasising the engineering aspect of things.  For example, we use timestamps to determine if we need to check the committed and working copy of a file for differences; however, because we also use hard-links to save time/space, the timestamps from the filesystem can mislead Darcs into checking for way more differences than it needs to.  Recent versions of Darcs use an index file to store our own timestamps.  Another example of work we are doing in this line is to "pack" our many small files into fewer larger files that we can transfer over HTTP a lot more quickly.  </p>
<p>Implementation can include choices like Haskell as a programming language.  The last time I tried to clarify this, I said that Haskell doesn't make a difference here.  Thinking more about it, I realise I was likely wrong.  Sorry!  One place where Haskell *could* make a difference is that we have a number of <a href="http://bugs.darcs.net/issue?@columns=title,id,activity,status,assignedto&amp;@sort=activity&amp;@group=priority&amp;@filter=topic,status&amp;@pagesize=50&amp;@startwith=0&amp;topic=11&amp;status=-1,1,2,3,4,5,6,16,17&amp;@dispname=Performance" rel="nofollow">performance bugs</a> we have open where Darcs seems to be using an unreasonable amount of memory for the task at hand.  It's not yet clear to me if these are actually engineering bugs in disguise, or if some of them are not merely implementation details.  The Darcs team is quite small; we need all the help we can get.  Once we've reached a couple of engineering milestones we have in mind, it'd be really great if the wider Haskell community could give us a hand on understanding these bugs.</p>
<p>Meanwhile, I still have the conviction that solving a lot of the engineering issues (Darcs 2.5 and 2.6 look very promising) will make Darcs a lot faster for most people, most of the time.  We still need to work on theory and implementation over time, but I hope you'll like what we've accomplished for the short term.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

