[plt-scheme] How to handle large data

From: Kenichi Asai (asai at is.ocha.ac.jp)
Date: Thu Dec 18 03:34:12 EST 2008

Hello everyone,

I want to load a large file into DrScheme interactive environment.  To
be more specific, I want to use the following file containing all the
postal data in Japan temporarily available at:

http://pllab.is.ocha.ac.jp/~asai/postal.ss

The file looks like:

(define-struct postal (code address))

(define postal-list (list
(make-postal 1706090 "address in Japanese")
(make-postal 0708071 "address in Japanese")
...
))

but the list is very long, about 120000 lines.

I can open this file, but when I try to execute it, DrScheme says "out
of memory" and when I switch off the memory limit, it runs forever.

Is there any good way to load this file?

I am going to teach the basic concepts in programming to high school
students the day after tomorrow, and want to use PLT Scheme GUI for it.
I plan to apply the linear search to the above postal data.

I tried (load "postal.ss"), but DrScheme says:

  reference to undefined identifier: load

Is this because I am using the language "beginning student"?
(I want to stay at "beginning student" if possible.)

Thank you in advance.

Sincerely,

-- 
Kenichi Asai


Posted on the users mailing list.