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 AB87ABDCB for ; Fri, 9 Sep 2005 12:11:12 +0200 (CEST) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id j89ABCln006163 for ; Fri, 9 Sep 2005 12:11:12 +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 MAA20425 for ; Fri, 9 Sep 2005 12:11:11 +0200 (MET DST) Received: from net.univ-savoie.fr (net.univ-savoie.fr [193.48.120.75]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id j89ABBIs008717 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO) for ; Fri, 9 Sep 2005 12:11:11 +0200 Received: from post.bourget.univ-savoie.fr (post.bourget.univ-savoie.fr [193.48.120.73]) by net.univ-savoie.fr (8.12.3/jtpda-5.4) with ESMTP id j89ABAWV023712 for ; Fri, 9 Sep 2005 12:11:10 +0200 Received: from [193.48.123.45] (d45.lama.univ-savoie.fr [193.48.123.45]) by post.bourget.univ-savoie.fr (8.12.3/jtpda-5.4) with ESMTP id j89AB40v017150 ; Fri, 9 Sep 2005 12:11:04 +0200 Message-ID: <43215FBC.1020904@univ-savoie.fr> Date: Fri, 09 Sep 2005 12:11:08 +0200 From: Christophe Raffalli User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.6) Gecko/20050322 X-Accept-Language: en-us, en MIME-Version: 1.0 To: caml-list@inria.fr Subject: [Fwd: Re: [Caml-list] Re: announce: callbacks-0.1] X-Enigmail-Version: 0.89.6.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig2A7F22C9F51669E06294CB7D" X-Scanned-By: MIMEDefang 2.33 (www . roaringpenguin . com / mimedefang) X-Miltered: at concorde with ID 43215FC0.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at nez-perce with ID 43215FBF.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; christophe:01 raffalli:01 christophe:01 raffalli:01 univ-savoie:01 caml-list:01 caml-list:01 univ-savoie:01 gmane:01 gmane:01 descriptors:01 callbacks:01 callbacks:01 hashtable:01 ocaml:01 X-Attachments: type="application/pgp-signature" name="signature.asc" name="signature.asc" type="application/pgp-signature" name="signature.asc" name="signature.asc" 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 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig2A7F22C9F51669E06294CB7D Content-Type: multipart/mixed; boundary="------------070601020109050206050002" This is a multi-part message in MIME format. --------------070601020109050206050002 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit -------- Original Message -------- Subject: Re: [Caml-list] Re: announce: callbacks-0.1 Date: Fri, 09 Sep 2005 11:41:38 +0200 From: Christophe Raffalli To: Bardur Arantsson References: <43206744.5090907@univ-savoie.fr> <4320A68E.1060608@xs4all.nl> <4320ABF7.7020009@univ-savoie.fr> <43214CC8.8070506@univ-savoie.fr> <20050909091644.GC2895@scientician.net> Bardur Arantsson wrote: > On Fri, Sep 09, 2005 at 10:50:16AM +0200, Christophe Raffalli wrote: > > >>Bardur Arantsson wrote: >> >>>On Fri, Sep 09, 2005 at 07:53:17AM +0200, Christophe Raffalli wrote: > > >>>That depends hugely on what kind of library you're wrapping. I did a >>>wrapper for libevent (events on file descriptors and other similar stuff >>>like alarms, etc.) and what ended up happening was that a 1) lot of the >>>time a relatively large amount of callbacks were registered, orm 2) >>>callbacks would be registered/unregistered a lot. I did try using >>>*_global_roots in my libevent wrapper, but the performance was awful >>>until I changed it to use an (fd->callback) hashtable on the OCaml side. > > >>>(In the case of file descriptors or similar objects you can try to be >>>more clever and just use an array of callbacks and use the file >>>descriptor as the index; I didn't bother with this in my wrapper library >>>since the performance was OK as it was). > > >>agree with all that ... I might even provide some camlp4 extension to >>handle the mechanism with hashtbl and callbacks (still in the spirit of >>simplifying the life of people writing bindings) > > > Cool. It's not that I don't appreciate what you're trying > to do, it's just that I think it's harder to do this is > general than it's worth wrt. avoiding some of the more > annoying aspects of creating bindings. > For Glut (where the current implementation (inside lablGL-1.0) is quite wrong as soon as you have two windows), I think I will not loose that many hours writing my tools and using it rather than doing everything at the end. Moreover, I had some fun and some pb to solve instead of doing a boring job !!! > Good luck anyway :) > > -- Christophe Raffalli Université de Savoie Batiment Le Chablais, bureau 21 73376 Le Bourget-du-Lac Cedex tél: (33) 4 79 75 81 03 fax: (33) 4 79 75 87 42 mail: Christophe.Raffalli@univ-savoie.fr www: http://www.lama.univ-savoie.fr/~RAFFALLI --------------------------------------------- IMPORTANT: this mail is signed using PGP/MIME At least Enigmail/Mozilla, mutt or evolution can check this signature. The public key is stored on www.keyserver.net --------------------------------------------- -- Christophe Raffalli Université de Savoie Batiment Le Chablais, bureau 21 73376 Le Bourget-du-Lac Cedex tél: (33) 4 79 75 81 03 fax: (33) 4 79 75 87 42 mail: Christophe.Raffalli@univ-savoie.fr www: http://www.lama.univ-savoie.fr/~RAFFALLI --------------------------------------------- IMPORTANT: this mail is signed using PGP/MIME At least Enigmail/Mozilla, mutt or evolution can check this signature. The public key is stored on www.keyserver.net --------------------------------------------- --------------070601020109050206050002 Content-Type: application/pgp-signature; name="signature.asc" Content-Transfer-Encoding: base64 Content-Disposition: inline; filename="signature.asc" LS0tLS1CRUdJTiBQR1AgU0lHTkFUVVJFLS0tLS0KVmVyc2lvbjogR251UEcgdjEuNC4wIChH TlUvTGludXgpCkNvbW1lbnQ6IFVzaW5nIEdudVBHIHdpdGggTW96aWxsYSAtIGh0dHA6Ly9l bmlnbWFpbC5tb3pkZXYub3JnCgppRDhEQlFGRElWalNTUUR5V0IvK3hCd1JBa2Y5QUo0Z2lt ZG5Kd09YeFZVRWU0eTVrbjU1empyZmJ3Q2ZaZnYyCjJ1RWdCZDZ4ODZGUjJ6VmVOS3BYbnRR PQo9N2NtbAotLS0tLUVORCBQR1AgU0lHTkFUVVJFLS0tLS0KCg== --------------070601020109050206050002-- --------------enig2A7F22C9F51669E06294CB7D Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFDIV+8SQDyWB/+xBwRAkqSAJ91vlf3iqkoJHf6bVIy0/KcXR/F8gCdE6DA F6IQNKesE2LZBEKlkL7Qhwc= =2a1P -----END PGP SIGNATURE----- --------------enig2A7F22C9F51669E06294CB7D--