[plt-scheme] reading a whole file

From: Stephen De Gabrielle (s.degabrielle at cs.ucl.ac.uk)
Date: Tue Nov 4 10:21:09 EST 2008

Thanks

On Tue, Nov 4, 2008 at 3:06 PM, Robby Findler <robby at cs.uchicago.edu> wrote:
> As long as you don't give the program out to others, you're probably fine.
>
> But the ports library in plt scheme is powerful and many things that
> seem easier on strings just aren't.

I'm assuming disk reads are an order of magnitude slower than
operations in memory? but that is assuming I am keeping things to a
reasonable size, and the OS in question isn't using virtual
memory/swap. I'm working with the Enron email collection, uncompressed
it is 2.54 Gb(across 500k files)
, so it should be possible to play with the whole thing in RAM.

Thanks again, I never thought my dumb question could evoke such a debate.

PS http://schemecookbook.org/Cookbook/FileRead  has been updated, but
only the 'copy-port' technique, not the associated discussion on the
merits on working directly on a port as compared to strings.


Posted on the users mailing list.