caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Fwd: Re: [Caml-list] Re: announce: callbacks-0.1]
@ 2005-09-09 10:11 Christophe Raffalli
  0 siblings, 0 replies; only message in thread
From: Christophe Raffalli @ 2005-09-09 10:11 UTC (permalink / raw)
  To: caml-list


[-- Attachment #1.1: Type: text/plain, Size: 3208 bytes --]



-------- Original Message --------
Subject: Re: [Caml-list] Re: announce: callbacks-0.1
Date: Fri, 09 Sep 2005 11:41:38 +0200
From: Christophe Raffalli <Christophe.Raffalli@univ-savoie.fr>
To: Bardur Arantsson <spam@scientician.net>
References: <43206744.5090907@univ-savoie.fr>
<4320A68E.1060608@xs4all.nl> <4320ABF7.7020009@univ-savoie.fr>
<dfqhl4$tk6$1@sea.gmane.org> <dfra5e$nlc$1@sea.gmane.org>
<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
---------------------------------------------

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 253 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 252 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-09-09 10:11 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-09-09 10:11 [Fwd: Re: [Caml-list] Re: announce: callbacks-0.1] Christophe Raffalli

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).