[plt-scheme] reading a whole file

From: Shriram Krishnamurthi (sk at cs.brown.edu)
Date: Tue Nov 4 09:52:55 EST 2008

Thanks, Robby.

1. It might be nice if someone w/ Cookbook access posted this version
w/ a comment about atomicity.

2. It is often *awfully convenient* to just read the file in as a
string.  This semester I'm co-teaching a mini-course for social
science students, and just about everything we do is content analysis.
 The files tend to be no more than 10-30k long.  With modern computer
memories and processing speeds, it's just not worth the effort to do
anything other than a brute-force "read everything in as one string
and search over it" unless that proves to be insufficient.  (And doing
it that way in Python proves to be dreadfully convenient.)  It feels
to me like a bit like mucking about with fixnums when you could have
bignums instead.

And if you continue to complain, I'll G"odel-encode the file -- since
you only enjoin against strings, not numbers. (-:

Shriram


Posted on the users mailing list.