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 SAA25157; Thu, 8 Apr 2004 18:44:19 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id SAA25374 for ; Thu, 8 Apr 2004 18:44:18 +0200 (MET DST) Received: from waco.inria.fr (waco.inria.fr [128.93.25.2]) by concorde.inria.fr (8.12.10/8.12.10) with ESMTP id i38GiGYM012380; Thu, 8 Apr 2004 18:44:16 +0200 Received: from waco.inria.fr (localhost [127.0.0.1]) by waco.inria.fr (8.12.10/8.12.10) with ESMTP id i38GiG3Z012283; Thu, 8 Apr 2004 18:44:16 +0200 Received: (from verlyck@localhost) by waco.inria.fr (8.12.10/8.12.10/Submit) id i38GiFlK012282; Thu, 8 Apr 2004 18:44:15 +0200 Date: Thu, 8 Apr 2004 18:44:15 +0200 Message-Id: <200404081644.i38GiFlK012282@waco.inria.fr> To: jgoerzen@complete.org CC: caml-list@inria.fr In-reply-to: <20040408153056.GB30763@excelhustler.com> (jgoerzen@complete.org) Subject: Re: [Caml-list] Dynamically evaluating OCaml code From: Bruno.Verlyck@inria.fr References: <20020104004356.GA1672@mev> <20040408133727.GC29195@excelhustler.com> <20040408145606.GA18473@fichte.ai.univie.ac.at> <20040408153056.GB30763@excelhustler.com> Mime-Version: 1.0 (generated by tm-edit 7.106) Content-Type: text/plain; charset=US-ASCII X-Miltered: at concorde 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 threads:01 openfile:01 pervasives:01 srfi:01 ocaml's:01 python:01 basename:01 localtime:01 ulimit:01 flags:01 recvfrom:01 trunc:01 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk X-Status: X-Keywords: X-UID: 163 Date: Thu, 8 Apr 2004 10:30:56 -0500 From: John Goerzen I hate posting to such long threads, but if you care: glaring socket omissions, read/write files handles, string slicing, - sockets (esp. IPV6): I've no full solution. - 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. - 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. As for lists, I saw a message from someone trying to implement SRFI 1, but no further announce. I feel that it really calls for mutable lists, with are less in OCaml's spirit, and you'll miss syntactic sugar. Here are some other functions that I have in C, Python, Perl that are missing from OCaml: realpath() asctime() strftime() strptime() basename() dirname() localtime() gmtime() ulimit() getaddrinfo() The following flags for recv/recvfrom: MSG_WAITALL MSG_TRUNC MSG_ERRQUEUE The following formats for socket(): PF_INET6, PF_PACKET, PF_APPLETALK recvmsg() mknod() mountpoint() ioctl() Some of them are in Unix, some in Filename, some others (under other names) in Cash (http://pauillac.inria.fr/cash/), with another view to file descriptors / Caml channels. For mknod, as an emergency measure, I'd fork the mknod command. 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. (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). HTH, Bruno. ------------------- 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