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=none autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by yquem.inria.fr (Postfix) with ESMTP id 95967BC29 for ; Tue, 22 Aug 2006 00:35:08 +0200 (CEST) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by nez-perce.inria.fr (8.13.6/8.13.6) with ESMTP id k7LMZ77i015497 for ; Tue, 22 Aug 2006 00:35:08 +0200 Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id AAA13292 for ; Tue, 22 Aug 2006 00:35:07 +0200 (MET DST) Received: from wr-out-0506.google.com (wr-out-0506.google.com [64.233.184.229]) by nez-perce.inria.fr (8.13.6/8.13.6) with ESMTP id k7LMZ6fO015493 for ; Tue, 22 Aug 2006 00:35:07 +0200 Received: by wr-out-0506.google.com with SMTP id 55so341236wri for ; Mon, 21 Aug 2006 15:35:06 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=b0sujWC3aM8hkHUpogrWDVh+1ycagaC/bFwNNddQPxRjS2P+6EtCrl0qvnr9rsUVQlr52mhJKX1Xv7yvQU25JaFOeadB/QnpuD1/A/3wxb1ZbE1/Z1+w4cSkudTXIdaFzA3VbP6lufzWmHpvjSEwJ3Fg5qiZI2IWUaS9lzZ2j/0= Received: by 10.90.51.17 with SMTP id y17mr364370agy; Mon, 21 Aug 2006 15:35:06 -0700 (PDT) Received: by 10.90.106.19 with HTTP; Mon, 21 Aug 2006 15:35:06 -0700 (PDT) Message-ID: Date: Mon, 21 Aug 2006 15:35:06 -0700 From: "Nathaniel Gray" To: "Olivier Andrieu" Subject: Re: [Caml-list] Re: Help interfacing with C Cc: caml-list@inria.fr In-Reply-To: <17638.52236.924575.106942@karryall.dnsalias.org> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <17638.52236.924575.106942@karryall.dnsalias.org> X-j-chkmail-Score: MSGID : 44EA351A.000 on nez-perce : j-chkmail score : X : 0/20 1 X-Miltered: at nez-perce with ID 44EA351C.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at nez-perce with ID 44EA351A.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; interfacing:01 andrieu:01 oandrieu:01 ocaml:01 error-prone:01 unix:01 error-prone:01 compiler:01 ocaml:01 cheers:01 2006:98 wrote:01 compile:01 caml-list:01 nerim:01 On 8/19/06, Olivier Andrieu wrote: > Nathaniel Gray [Friday 18 August 2006] : > > Now of course this could all be done at the ocaml level, but > > wouldn't it be nicer to do the elegant thing in the first place > > instead of cleaning up the mess afterwards? ;^) > > Erm, doing things on the C side isn't especially "elegant", > sorry. It's way more error-prone, more complicated to compile/link > against, and in your case it's not even portable (your version is > Unix-only). I see. In that case I move we eliminate the whole Unix module. It's all written in error-prone, complicated, non-portable C! The point is that we need *some* interface to the select system call. By it's nature, it must be written in C. We can, with very little work (about 10-20 LOC or less), have a more elegant interface to the select system call that reduces the amount of cruft needed to make a typical select call. I'm doing this work, because it's useful to me. Because I believe it could be useful to others, I'm also trying to create a patch against the compiler for submission to the ocaml team. I'm not claiming it's a revolutionary change or massively faster, just an interface that's more pleasant to program with. Cheers, -n8 -- >>>-- Nathaniel Gray -- Caltech Computer Science ------> >>>-- Mojave Project -- http://mojave.cs.caltech.edu -->