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 TAA30411; Thu, 8 Apr 2004 19:55:23 +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 TAA30734 for ; Thu, 8 Apr 2004 19:55:22 +0200 (MET DST) Received: from gatekeeper.elmer.external.excelhustler.com (gatekeeper.excelhustler.com [68.99.114.105]) by nez-perce.inria.fr (8.12.10/8.12.10) with ESMTP id i38HuEjq030418; Thu, 8 Apr 2004 19:56:15 +0200 Received: from chatterbox.elmer.internal.excelhustler.com (unknown [192.168.0.12]) (using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits)) (Client CN "chatterbox.elmer.internal.excelhustler.com", Issuer "excelhustler.com" (not verified)) by gatekeeper.elmer.external.excelhustler.com (Postfix) with ESMTP id C1739E01A1; Thu, 8 Apr 2004 12:55:19 -0500 (CDT) Received: from localhost (localhost [127.0.0.1]) by chatterbox.elmer.internal.excelhustler.com (Postfix) with ESMTP id 835975C009; Thu, 8 Apr 2004 12:55:19 -0500 (CDT) Received: from wile.internal.excelhustler.com (wile.internal.excelhustler.com [192.168.1.34]) by chatterbox.elmer.internal.excelhustler.com (Postfix) with ESMTP id 57A0E5C006; Thu, 8 Apr 2004 12:55:19 -0500 (CDT) Received: by wile.internal.excelhustler.com (Postfix, from userid 1000) id F22991C03C; Thu, 8 Apr 2004 12:55:19 -0500 (CDT) Date: Thu, 8 Apr 2004 12:55:19 -0500 From: John Goerzen To: Bruno.Verlyck@inria.fr Cc: caml-list@inria.fr Subject: Re: [Caml-list] Dynamically evaluating OCaml code Message-ID: <20040408175519.GB1291@excelhustler.com> References: <20020104004356.GA1672@mev> <20040408133727.GC29195@excelhustler.com> <20040408145606.GA18473@fichte.ai.univie.ac.at> <20040408153056.GB30763@excelhustler.com> <200404081644.i38GiFlK012282@waco.inria.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200404081644.i38GiFlK012282@waco.inria.fr> User-Agent: Mutt/1.5.5.1+cvs20040105i X-Scanned-By: clamscan at chatterbox.elmer.internal.excelhustler.com 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; caml-list:01 dynamically:01 2004:99 openfile:01 pervasives:01 buffering:01 pervasives:01 flags:01 ulimit:01 autoconf:01 camlp:01 bread:99 camlp:01 semantics:01 implementors:01 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk X-Status: X-Keywords: X-UID: 169 On Thu, Apr 08, 2004 at 06:44:15PM +0200, Bruno.Verlyck@inria.fr wrote: > - read-write file handles: You can get them wit Unix.openfile and > Unix.dup. Then with Unix.{in,out}_channel_of_descr, you can use > the Pervasives I/O functions. I have discovered that, but it seems that I don't fully understand the buffering semantics over on the Pervasives side. For instance, it's not entirely clear what happens if I write something to an out channel, then seek somewhere via that channel, then read via the other channel. The results have not always been what I expected. I've also tried to use that trick to work with sockets, and the results there are *definately* not what I expected. But I didn't look into it in any great detail, so I may have been missing something obvious. (Pervasives appears to sometimes make an underlying call to read or write a different number of bytes than I requested -- which can be a problem for network protocols where this can cause deadlock) > - string handling: look at my (rather full-featured) Cstr library > (http://pauillac.inria.fr/cash/cstr/); it doesn't answer syntax > questions, but those are a different matter. It doesn't implement > negative indices, but if you dare looking at the sources, *maybe* > only the check- macros have to be modified. That looks great. Has a lot of stuff I'd use. It looks like it's separate from cash; is that correct? (If so, I'll package it up for Debian right away ) > As for flags that aren't in Unix (or ulimit), you touch a strong > problem for library implementors: they are defined only for some OSes, > and are a pain to implement and test when you have no personal use for > them. Yes, laziness. On the other hand, you ask for free lunch. I know what you mean. It's going to mean a lot of autoconf tests :-) And yeah, I know about volunteer time... I try to do what I can to help out (such as packaging things for Debian). I don't have the requisite experience yet to touch anything that deals with C or camlp4. In time, perhaps. :-) I am, however, working on an IMAP library, time permitting. I have everything necessary to make that go and the basic parser is complete already (I've gotta say -- OCaml streams are the nicest thing since sliced bread for parsing complex grammars ) > (Another pain is making any general library, moreover part-time; even > Cstr, which is not big, nor very complicated, that I didn't design, > took me five times what I thought; OK, I played some games with > camlp4, but documenting and testing it is a lot of boring work). That's true. I have found OUnit to be very nice for testing, BTW. -- John ------------------- 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