[gambit-list] write and GUI

Adrien Piérard pierarda at iro.umontreal.ca
Sat May 9 08:49:09 EDT 2009


2009/5/9 Claude Marinier <claude-m17 at hotmail.com>:
> Greetings,

> I have been building a library catalogue application in Gambit-C. It can
> import CSV, build indexes, and perform searches. It is now time to think
> about storing this in a file. Does the write function produce output which
> can be used to recreate the data structures I saved? If yes, how is this
> done?

You can dump (serialize) hashtables into a file and read them later.
A quick glance at the logs of this ML exhibits what you want:

> On 18-May-06, at 10:52 AM, Pouex Machinax wrote:
> (define table-1 (make-table))
> (table-set! table-1 'foo (list 1 2 3 4 5))
> (define table-1-ser (object->u8vector table-1))
> (define table-2 (u8vector->object table-1-ser))

Just write your serialized object to a file, that should do it.

Or you can (manually) export your data as S-exps and then READ them later.

P!

-- 
Français, English, 日本語, 한국어



More information about the Gambit-list mailing list