From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id 52450BB83 for ; Sat, 19 Aug 2006 10:59:17 +0200 (CEST) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by concorde.inria.fr (8.13.6/8.13.6) with ESMTP id k7J8xGVB027716 for ; Sat, 19 Aug 2006 10:59:16 +0200 Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id KAA05921 for ; Sat, 19 Aug 2006 10:30:23 +0200 (MET DST) Received: from kraid.nerim.net (smtp-106-saturday.nerim.net [62.4.16.106]) by concorde.inria.fr (8.13.6/8.13.6) with ESMTP id k7J8UNnU023658 for ; Sat, 19 Aug 2006 10:30:23 +0200 Received: from karryall.dnsalias.org (karryall.dnsalias.org [213.41.240.180]) by kraid.nerim.net (Postfix) with ESMTP id C38F841099; Sat, 19 Aug 2006 10:30:06 +0200 (CEST) Received: by karryall.dnsalias.org (Postfix, from userid 500) id 2A14C76E327; Sat, 19 Aug 2006 10:30:05 +0200 (CEST) From: Olivier Andrieu MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <17638.52236.924575.106942@karryall.dnsalias.org> Date: Sat, 19 Aug 2006 10:30:04 +0200 To: "Nathaniel Gray" Cc: caml-list@inria.fr Subject: Re: [Caml-list] Re: Help interfacing with C In-Reply-To: References: X-Mailer: VM 7.19 under Emacs 21.4.1 X-Miltered: at concorde with ID 44E6D2E4.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at concorde with ID 44E6CC1F.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; andrieu:01 oandrieu:01 interfacing:01 ocaml:01 error-prone:01 hashtbl:01 2006:98 compile:01 slower:01 caml-list:01 nerim:01 intermediate:03 probably:06 olivier:06 olivier:06 X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.0.3 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). Just write your select2 using an intermediate Hashtbl: it probably won't be much slower (unless you have hundreds of fd maybe). -- Olivier