Yoel Jacobsen wrote: > My question is, what should be done to make it work for large files (say, > 1GB or more)? I guess it involves memory mapped files but I have no clue > where to continue from here. > > Further, is there any notion of 'laziness' (evaluate only when the data is > really needed) in J? can a verb be decalred as a lazy verb?
Semantics equivalent to laziness are accomplished by not using the verb when you don't need it. As for very large files: I would loop over the file using comfortably large blocks. You would have to deal with line fragments which span blocks (because you won't know what's in a block till after you read it, so in the general case you can't arrange for cut boundaries to align with block boundaries the first time you see the file). -- Raul ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
