Text I/O library proposal, first draft

Hal Daume t-hald@microsoft.com
Tue, 5 Aug 2003 07:53:16 -0700


this is true; however, it is likely that it would be much faster for me
to read in word8s and parse them to Ints myself than to read in Chars
(using the old libraries) and parse those to ints (I've done some
experiments and the overhead for reading haskell Chars is very
non-negligible).  i'd like to take advantage of this new infrastructure,
if possible...

 --
 Hal Daume III                                   | hdaume@isi.edu
 "Arrest this man, he talks in maths."           | www.isi.edu/~hdaume


> -----Original Message-----
> From: libraries-admin@haskell.org=20
> [mailto:libraries-admin@haskell.org] On Behalf Of John Meacham
> Sent: Thursday, July 31, 2003 4:36 PM
> To: libraries@haskell.org; haskell@haskell.org
> Subject: Re: Text I/O library proposal, first draft
>=20
>=20
> presumably if you are doing random access on the file, it is=20
> in a known
> nonarbitrary text encoding (like utf8). in which case you can
> read/access the file with the binary routines and just use the
> appropriate text conversions to get data out.=20
>         John
>=20
> On Thu, Jul 31, 2003 at 03:55:44PM -0700, Hal Daume wrote:
> > Hi Ben,
> >=20
> > > Bad things:
> > >=20
> > >   * There's no way to implement fgetpos/fsetpos type=20
> functionality,
> > >     because coders don't expose their internal state. (In=20
> fact, there
> > >     would need to be a way to explicitly copy the state,=20
> since it may
> > >     well include IORefs, Ptrs, etc.) Is this a serious problem?
> >=20
> > Yes!  This is an enormously serious problem.  At least for me.
> >=20
> > It's not a problem for writing files, but I really really=20
> really need
> > this functionality when reading files.  Reason: I'm often=20
> tooling around
> > in very large (1gb or greater) files which happen to be=20
> sorted on some
> > sort of index and I need to do binary search in them.  To=20
> load all the
> > file into Haskell or to do linear search is impossible.
> >=20
> > Other than that, I rather like the design.
> >=20
> >  - Hal
> > --=20
> > Haskell mailing list
> > Haskell@haskell.org
> > http://www.haskell.org/mailman/listinfo/haskell
> >=20
>=20
> --=20
> --------------------------------------------------------------
> -------------
> John Meacham - California Institute of Technology, Alum. -=20
> john@foo.net
> --------------------------------------------------------------
> -------------
> _______________________________________________
> Libraries mailing list
> Libraries@haskell.org
> http://www.haskell.org/mailman/listinfo/libraries
>=20