From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=AWL autolearn=disabled version=3.1.3 Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by yquem.inria.fr (Postfix) with ESMTP id AE464BBCA for ; Fri, 9 May 2008 11:31:04 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AsQBAHa2I0jAXQIniGdsb2JhbACSBwEBAQ8gmQI X-IronPort-AV: E=Sophos;i="4.27,460,1204498800"; d="scan'208";a="10542268" Received: from concorde.inria.fr ([192.93.2.39]) by mail2-smtp-roc.national.inria.fr with ESMTP; 09 May 2008 11:31:04 +0200 Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by concorde.inria.fr (8.13.6/8.13.6) with ESMTP id m499V46B024306 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=OK) for ; Fri, 9 May 2008 11:31:04 +0200 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AsQBAHa2I0hQRFuwiGdsb2JhbACSBwEBAQ8gmQI X-IronPort-AV: E=Sophos;i="4.27,460,1204498800"; d="scan'208";a="12028171" Received: from furbychan.cocan.org ([80.68.91.176]) by mail1-smtp-roc.national.inria.fr with ESMTP; 09 May 2008 11:31:03 +0200 Received: from rich by furbychan.cocan.org with local (Exim 4.63) (envelope-from ) id 1JuOwR-0007jx-EH for caml-list@inria.fr; Fri, 09 May 2008 10:31:03 +0100 Date: Fri, 9 May 2008 10:31:03 +0100 To: caml-list@inria.fr Subject: Re: [Caml-list] Re: Why OCaml sucks Message-ID: <20080509093103.GA29391@annexia.org> References: <200805090139.54870.jon@ffconsultancy.com> <20080509074509.GA25640@annexia.org> <200805090910.12347.jon@ffconsultancy.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200805090910.12347.jon@ffconsultancy.com> User-Agent: Mutt/1.5.13 (2006-08-11) From: Richard Jones X-Miltered: at concorde with ID 482419D8.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; ocaml:01 0100,:01 parallelism:01 unboxed:01 parallelism:01 threads:01 wrote:01 wrote:01 ints:01 caml-list:01 exceptions:01 immutable:01 data:02 data:02 structures:02 On Fri, May 09, 2008 at 09:10:12AM +0100, Jon Harrop wrote: > On Friday 09 May 2008 08:45:09 Richard Jones wrote: > > > 1. Lack of Parallelism: Yes, this is already a complete show stopper. > > > > Why can't you just fork off enough processes to cover each core? > > They need to share data, e.g. write results into the same matrix or > mutate the same array. You might want to look at the 'ancient' module. While the common understanding is that the shared data should be immutable, in fact you'd be OK if all you want to do is mutate a simple array of unboxed ints or floats[1]. Of course to an extent you're back to using manual memory management, but if it's only a few structures that may be acceptable. Getting parallelism right is hard enough that programmers should be forced to think about exactly which structures need to be shared, rather than threads where the default is to share everything and make the naive assumption that the programmer knows what they're doing. Rich. [1] The real basis for the 'immutable restriction' is explained in the documentation, along with exceptions, but it's complicated so I won't go into it here. -- Richard Jones Red Hat