From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id UAA07913; Thu, 26 Dec 2002 20:20:54 +0100 (MET) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f 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 UAA06544 for ; Thu, 26 Dec 2002 20:20:53 +0100 (MET) Received: from relay.rinet.ru (relay.rinet.ru [195.54.192.35]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id gBQJKqn01350 for ; Thu, 26 Dec 2002 20:20:52 +0100 (MET) Received: from relay.rinet.ru (localhost [127.0.0.1]) by relay.rinet.ru (8.12.6/8.12.6) with ESMTP id gBQJKpWU060976 for ; Thu, 26 Dec 2002 22:20:51 +0300 (MSK) (envelope-from dbely@mail.ru) Received: (from uucp@localhost) by relay.rinet.ru (8.12.6/8.12.6/Submit) with UUCP id gBQJKoQ1060975 for caml-list@inria.fr; Thu, 26 Dec 2002 22:20:50 +0300 (MSK) Received: from dialin3.stormoff (ROVER1) [192.168.0.131] by stormoff with esmtp (Exim 3.12 #1 (Debian)) id 18RdYa-0000Fv-00; Thu, 26 Dec 2002 22:20:37 +0300 X-Comment-To: Pierre Weis To: caml-list@inria.fr Subject: Re: [Caml-list] Cross-platform DBM equivalent? References: <200212261650.RAA04279@pauillac.inria.fr> From: Dmitry Bely Date: Thu, 26 Dec 2002 22:20:22 +0300 In-Reply-To: <200212261650.RAA04279@pauillac.inria.fr> (Pierre Weis's message of "Thu, 26 Dec 2002 17:50:26 +0100 (MET)") Message-ID: User-Agent: Gnus/5.090008 (Oort Gnus v0.08) XEmacs/21.4 (Military Intelligence (RC5 Windows), i586-pc-win32) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Pierre Weis writes: >> > >I am developing an application that needs fast access to persistent >> > >configuration data, and I thought that DBM might be a good way to >> > >provide that functionality ... > > As far as I know the best (and simpler) way to do this for reasonable > number of URLs bindings (say thousands but not millions) is to create > a Hashtlbl.t or Map.t and dump it to file using output_value (then > read it back with input_value). In any case, I would start with this > solution, since it provides cross-platform persistency with 4 lines of > Caml code. A fast and easy way to obtain fast and good results! Can marshalling functions output be different for different versions of Ocaml? If I try to feed incompatible data (e.g. form the previous version) to input_value, what I will have then - segfault? If so, they can hardly be used for saving configuration data. - Dmitry Bely ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners