On Thu, Apr 29, 2004 at 12:51:19PM +0100, Benjamin Geer wrote:
> Richard Jones wrote:
> >* What programs do people need to write?
>
> Most of what I do involves financial messages, which tend to be small,
> and come in many different encodings and formats. So what I usually
> need to do is read until EOF (from a file, a socket or whatever),
> convert the data to a Unicode string, and run it through some kind of
> parser (e.g. an XML parser). Going the other way, I have a Unicode
> string, and I just want to convert it to bytes and write it to a file or
> socket. That covers 90% of what I do with I/O.
Actually me too. 90% of my file IO requirement is to slurp a whole
file into a string, which suggests that any proposed IO interface
which doesn't allow you to do that in a single line is going to be a
non-starter:
let content = slurp_filename filename in ...
Rich.
--
Richard Jones. http://www.annexia.org/ http://www.j-london.com/
Merjis Ltd. http://www.merjis.com/ - improving website return on investment
Perl4Caml lets you use any Perl library in your type-safe Objective
CAML programs. http://www.merjis.com/developers/perl4caml/
-------------------
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