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 VAA05312; Thu, 8 Apr 2004 21:21:44 +0200 (MET DST) 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 VAA05285 for ; Thu, 8 Apr 2004 21:21:43 +0200 (MET DST) Received: from calmail-cl.berkeley.edu (mailfarm.Berkeley.EDU [128.32.61.106]) by nez-perce.inria.fr (8.12.10/8.12.10) with ESMTP id i38JMZjq008157 for ; Thu, 8 Apr 2004 21:22:36 +0200 Received: from [64.162.212.212] (HELO tallman.kefka.frap.net) by calmail-cl.berkeley.edu (CommuniGate Pro SMTP 4.1.8) with SMTP id 14644274; Thu, 08 Apr 2004 12:21:40 -0700 Received: by tallman.kefka.frap.net (sSMTP sendmail emulation); Thu, 8 Apr 2004 12:21:03 -0700 Date: Thu, 8 Apr 2004 12:21:03 -0700 From: Kenneth Knowles To: John Goerzen Cc: Jean-Marc EBER , Ocaml Mailing List Subject: Re: [Caml-list] Dynamically evaluating OCaml code Message-ID: <20040408192103.GA18616@tallman.kefka.frap.net> References: <20020104004356.GA1672@mev> <20040408133727.GC29195@excelhustler.com> <20040408145606.GA18473@fichte.ai.univie.ac.at> <20040408151427.GA740@redhat.com> <20040408152654.GB18473@fichte.ai.univie.ac.at> <20040408155833.GG30763@excelhustler.com> <407592E8.6080500@lexifi.com> <20040408182044.GA18551@tallman.kefka.frap.net> <20040408183957.GB2311@excelhustler.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040408183957.GB2311@excelhustler.com> User-Agent: Mutt/1.5.6i X-Miltered: at nez-perce by Joe's j-chkmail ("http://j-chkmail.ensmp.fr")! X-Loop: caml-list@inria.fr X-Spam: no; 0.00; knowles:99 caml-list:01 dynamically:01 2004:99 approval:99 helper:01 libs:01 in-memory:01 arrays:01 linked:01 ocaml:01 ocaml:01 patch:02 silly:02 module:03 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk X-Status: X-Keywords: X-UID: 178 On Thu, Apr 08, 2004 at 01:39:57PM -0500, John Goerzen wrote: > However, while perhaps someone could design a more advanced String.sub > that can count backwards from the end of the string (I posted one such > example) in one line of the code, it may still have merit being in the > library. Otherwise, everyone will probably end up writing a function > anyway (since it's too ugly to use inline with any frequency) and this > reduces the efficiency of programming with OCaml. I agree that String.sub is not the exhaustive solution; a variety of ways to select substrings is nice, and not provided in the standard library. A huge standard String module is still bad, so I wonder if anyone has submitted a coherent patch with 2 or 3 fundamentally different string functions and strong rationale? Probably most people whine about how their 2000 line string library isn't accepted into the standard, when the addition of less than 100 lines is what String might need to be gracefully augmented. Getting deep into the "what should go in the standard library" isn't what I want to do - I just want to express general approval of small standard libraries with functions that combine well. I think a very beautiful solution to complaints would be to have one fully independent library per module in the standard library - one could easily make a complete String, List, Array, or Set library, with useful, but non-orthogonal helper functions. In particular, a comprehensive Date library would be very useful, since it is not in the standard libs at all. I think ocamli18n intended to solve this, but I haven't tracked the project. I haven't checked the Cstr library that was linked, so maybe it has some nice stuff. > My simplified example does not necessary represent all possible ones. > Some people may be dealing with 500MB structures where going back and > forth between lists and arrays is not even an executable option. True, but let's not be silly. A 500 MB structure is probably going to be its own animal, not simply an array or list... and I've seen a lot of talk about Persil on the mailing list for mixing on-disk and in-memory storage, which might be appropriate. Kenn ------------------- 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