From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id D2005BB81 for ; Fri, 2 Dec 2005 15:58:37 +0100 (CET) Received: from mailx.valdosta.edu (mailx.valdosta.edu [168.18.130.251]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id jB2EwaS3017824 for ; Fri, 2 Dec 2005 15:58:37 +0100 Received: from blazemail.valdosta.edu (blazemail.valdosta.edu [168.18.130.208]) by mailx.valdosta.edu (8.13.4/8.13.4) with ESMTP id jB2EvjR6009091 for ; Fri, 2 Dec 2005 09:58:34 -0500 (EST) (envelope-from jtbryant@valdosta.edu) Received: from luminis (luminis [168.18.130.219]) by blazemail.valdosta.edu (iPlanet Messaging Server 5.2 HotFix 2.04 (built Feb 8 2005)) with SMTP id <0IQU005VWW0A95@blazemail.valdosta.edu> for caml-list@yquem.inria.fr; Fri, 02 Dec 2005 00:45:46 -0500 (EST) Date: Fri, 02 Dec 2005 00:45:46 -0500 (EST) From: Jonathan T Bryant Subject: Oops... To: caml-list@yquem.inria.fr Message-id: <7077838.1133502346469.JavaMail.jtbryant@valdosta.edu> MIME-version: 1.0 Content-type: text/plain; charset=UTF-8 Content-transfer-encoding: 7BIT X-PMX-Version: 5.0.2.153301, Antispam-Engine: 2.0.3.2, Antispam-Data: 2005.12.2.12 X-Miltered: at concorde with ID 4390611C.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; oops:01 overwritten:01 bug:01 bindings:01 dbd:01 hashtable:01 lls:98 dataset:01 dataset:01 recursively:01 functions:01 tree:02 functional:02 black:96 module:03 X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.2 required=5.0 tests=DATE_IN_PAST_06_12 autolearn=disabled version=3.0.3 Forgot to save before sending that. This copy keeps a free list for indicies in the dataset so that values don't accidentally get overwritten. It does still have a bug in the destroy function, though (I forgot you can't compare functional values). Conveniently, this could be fixed by recursively using the Dataset module to store the observer functions and returning a number when one is registered and using a number to unregister them. Also, point of interest, the Dataset module could be functorized so that different implementations could be used (i.e., persistent using hand rolled code or bindings to DBD or a SQL database, or a Red Black Tree/an Array instead of a Hashtable). --Jonathan ----------------------- --Jonathan Bryant jtbryant@valdosta.edu AIM: JonBoy3182 OAS AAS LLS ZG214