gnu-arch-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gnu-arch-users] Re: darcs vs tla


From: Andrew Suffield
Subject: Re: [Gnu-arch-users] Re: darcs vs tla
Date: Mon, 8 Nov 2004 15:08:48 +0000
User-agent: Mutt/1.5.6+20040907i

On Mon, Nov 08, 2004 at 01:26:37PM +0000, Catalin Marinas wrote:
> On Mon, 2004-11-08 at 12:03, Stephen J. Turnbull wrote:
> > Haskell is no harder than Lisp in principle, and if you'll go back in
> > this list a bit you'll find a thread on Lisp and parentheses where
> > asuffield makes a really convincing case (to me, anyway) that
> > Haskell's presentation with minimal parentheses plus the "offsides
> > rule" is far more readable than Lisp.  I think it's reasonable to
> > suppose that people who want to help with darcs can learn enough
> > Haskell to do so.
> 
> Maybe Haskell is no harder than LISP but if you only have an imperative
> programming background, it is harder to switch to Haskell. At least LISP
> allows imperative programming. What's even harder, it is a pure
> functional language.

If anything, pure functional languages are easier than impure
ones. And you actually can do imperative programming in Haskell
(that's a good non-technical definition of what a monad is), but you
have to understand functional programming first.

Empirical observation: it takes approximately two weeks of lectures to
kick an imperative programmer into thinking in the correct terms for
Haskell (it was the first language taught in my freshman class at
university; you could almost measure it by timing the groans).

> > Please confirm it's possible to compile darcs, and which compiler you
> > used.  I heard recently that darcs is strongly dependent on Hugs98,
> > which is an interpreter.  Seemed a little odd (Haskell98 is a
> > well-defined language, and Hugs doesn't have all that much in the way
> > of extensions), but that's what I heard.
> 
> Darcs is compiled with ghc (Glasgow Haskell compiler). There is an
> ongoing thread on the darcs-user list about using darcs with the Linux
> kernel -
> http://www.abridgegame.org/pipermail/darcs-users/2004-November/thread.html#4021

A little extract from this thread:

  "The initial record is the command which most stresses darcs' memory,
   as it requires holding the entire tree in parsed and in memory."

That sort of thing is why darcs is slow. Optimising Haskell programs
is more or less equally difficult as optimising C programs (functional
languages are not inherently any easier or harder to optimise), and
the problems are pretty much the same. tla even has analogous issues
(it tackles this problem differently, and I think does a little
better in the amortised case, but it's far from optimal).

-- 
  .''`.  ** Debian GNU/Linux ** | Andrew Suffield
 : :' :  http://www.debian.org/ |
 `. `'                          |
   `-             -><-          |

Attachment: signature.asc
Description: Digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]