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 mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by yquem.inria.fr (Postfix) with ESMTP id 249ECBC69 for ; Tue, 18 Dec 2007 18:13:48 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Aq4HAP2OZ0fUnw7XeGdsb2JhbACCNY0/DQEKBAYIBxqZaQ X-IronPort-AV: E=Sophos;i="4.24,180,1196636400"; d="scan'208";a="5790931" Received: from fhw-relay07.plus.net ([212.159.14.215]) by mail1-smtp-roc.national.inria.fr with ESMTP; 18 Dec 2007 18:13:47 +0100 Received: from [80.229.56.224] (helo=beast.local) by fhw-relay07.plus.net with esmtp (Exim) id 1J4g0p-00013s-0p for caml-list@yquem.inria.fr; Tue, 18 Dec 2007 17:13:47 +0000 From: Jon Harrop Organization: Flying Frog Consultancy Ltd. To: caml-list@yquem.inria.fr Subject: Re: [Caml-list] Problems spawning threads Date: Tue, 18 Dec 2007 17:04:52 +0000 User-Agent: KMail/1.9.5 References: <4767582A.6020202@gmail.com> In-Reply-To: <4767582A.6020202@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200712181704.52619.jon@ffconsultancy.com> X-Spam: no; 0.00; ocaml:01 subjective:01 recursive:01 threading:01 parallelism:01 ocaml:01 edgar:98 frog:98 threads:01 threads:01 wrote:01 maintainers:01 maintainers:01 caml-list:01 contributed:02 On Tuesday 18 December 2007 05:18, Edgar Friendly wrote: > I've gone over the Computer Language Benchmarks Game[1] problems, and I > can't figure out how help the administrators of this problem to get the > OCaml code for the thread-ring benchmark (contributed by Charles Martin) > to work on their computer. This benchmark is subjective, ill-defined and trivially reducible. Consequently, your competitors aren't using real system threads but the shootout maintainers will probably reject your submission if you don't. You could pull in a more suitable "thread" library like LWT: http://www.ocsigen.org/lwt However, once you pull in that code and write the benchmark you'll be able to trivially reduce it until it is just a "print" statement. At some point the shootout maintainers will choose to start rejecting your submissions and call you a "cheat" for writing better code. The same is also true of binary-trees, chameneos-redux, mandelbrot, nsieve, nsieve-bits, partial-sums, pidigits and recursive. In summary, this is a complete waste of time and effort. I would love to see simple tutorial examples of threading, concurrency and parallelism in OCaml. If you decide to embark on such a project, please choose examples that are objective, relevant and not trivially reducible. I would be very interested to see parallel implementations of the "n"th-nearest neighbour example from my book, for example. I have been trying and failing to write an elegant functional implementation of that myself for some time now... :-) -- Dr Jon D Harrop, Flying Frog Consultancy Ltd. http://www.ffconsultancy.com/products/?e