Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
[Caml-list] [ANN] The Missing Library
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Richard Jones <rich@a...>
Subject: Re: [Caml-list] Re: Common IO structure
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

let content = slurp_filename filename in ...


Richard Jones.
Merjis Ltd. - improving website return on investment
Perl4Caml lets you use any Perl library in your type-safe Objective
CAML programs.

To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: