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=2.0 required=5.0 tests=AWL,DNS_FROM_RFC_ABUSE, DNS_FROM_RFC_POST,DNS_FROM_RFC_WHOIS autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by yquem.inria.fr (Postfix) with ESMTP id 4327BBBAF for ; Fri, 19 Dec 2008 15:04:25 +0100 (CET) X-IronPort-AV: E=Sophos;i="4.36,249,1228086000"; d="scan'208";a="32886675" Received: from concorde.inria.fr ([192.93.2.39]) by mail4-smtp-sop.national.inria.fr with ESMTP; 19 Dec 2008 15:04:25 +0100 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 mBJE4Oko001222 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=OK) for ; Fri, 19 Dec 2008 15:04:24 +0100 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AigDADA5S0lDww+vkWdsb2JhbACOQ4UgAQEBAQkLCgcRA6sEWINUjRoFAgGDAA X-IronPort-AV: E=Sophos;i="4.36,249,1228086000"; d="scan'208";a="21522427" Received: from web111508.mail.gq1.yahoo.com ([67.195.15.175]) by mail1-smtp-roc.national.inria.fr with SMTP; 19 Dec 2008 15:04:23 +0100 Received: (qmail 93468 invoked by uid 60001); 19 Dec 2008 14:04:22 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-ID; b=v65xloBVSimBCFOvmeZrXFeqiBi/xEkTF43eUGnSY5RoR5/TGYzwE3kSeEwoVlb0Wf5Nq1exrKi3kcATZ6onDkklONFq6vh+YqEexUzoLquPpfLhdRwaOHPyQliVOvVjwz7U+BScbZ3TcSlhWtFthq5zURJVRiWdEGeTaSXYBEM=; X-YMail-OSG: jJ5K.OIVM1kEiTV1lIIjewk5Uz42z6YAFry_HQGMa17xXCGCJxRfQxhLRIBiswgXm4N5yFHZXMn4y9tOee9yU5yKdWHWZAzICCmul8tnKxnJf.02m5OnVbnkds4nanxCBRWD.O4itDcjwHwBRhCStSI8JrUE4IvWqhCtolCMhfP7jY1nykbU1ISGSMnjnQ-- Received: from [213.205.71.56] by web111508.mail.gq1.yahoo.com via HTTP; Fri, 19 Dec 2008 06:04:22 PST X-Mailer: YahooMailWebService/0.7.260.1 Date: Fri, 19 Dec 2008 06:04:22 -0800 (PST) From: Dario Teixeira Subject: Re: [Caml-list] More cores To: OCaml , =?iso-8859-1?Q?Mikkel_Fahn=F8e_J=F8rgensen?= In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Message-ID: <157727.93194.qm@web111508.mail.gq1.yahoo.com> X-Miltered: at concorde with ID 494BA9E8.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; ocaml:01 ocaml:01 mutexes:01 xavier's:01 scalable:01 mutexes:01 jocaml:01 devil:98 threads:01 threads:01 caml-list:01 argument:02 tend:03 programming:03 concurrency:04 Hi, > Is it time to start rethinking concurrency in OCaml? > (...) That's a recurrent topic in this list. I'll summarise the arguments and save us all some time: i) Someone raises the issue that it's time for Ocaml to go multicore. ii) A few voices go "yeah!" and state that with a concurrent GC, Ocaml can take over the world. Their argument is as follows: 1) Ocaml gets a concurrent GC; 2) ... 3) Profit! iii) A voice of reason notes that the devil is in step 2) above. If your programming paradigm for concurrency is Threads+Mutexes, then you are exposing yourself to a world of pain in race conditions. At this point someone usually links to Xavier's standard speech on concurrency (which is a few years old, but as poignant now as it was then). iv) The voices from step ii) retort that they're =FCber-programmers and that they can make perfectly scalable and race condition-free programmes with Threads+Mutexes if only they had a concurrent GC. v) The voice of reason remarks that one of the main reasons we all chose Ocaml is because the language ensures safe, resilient programmes. In a way it's the humble recognition that we are human, and that we make mistakes. Choosing the Threads+Mutexes path would be hubris and an abandonment of fundamental reasons why we chose Ocaml in the first place. While I tend to agree with viewpoints iii) and v), I do think a healthy discussion on the subject of multicore is in order. Though I suggest we focus the discussion on concurrency models that will allow us to take advantage of those multicores in a safe, sane manner: a) Could Jocaml be the future of Ocaml? b) How do we handle the global mutability issue? Best regards, Dario Teixeira =0A=0A=0A