[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: how to store and load mzscheme objects ?



On Mar 20, Philippe GIACINTI wrote:
> I was wondering if there is a common way to save mzscheme objects
> (i.e.: from class.ss) to file (or whatever) and then to restore them
> keeping the eq?-ability.

I don't know if this is what you're looking for, but I have some piece
of code I wrote once, where you `register' some values and then you
can save them (recursively, including everything they point to) to a
file so when you load it from there it preserves pointer equality of
the loaded objects (it does require having code that will tell it how
to `serialize' objects, to use the MSVC jargon I faintly remember...).
It is done using my Swindle thing but I don't think it would be hard
to make it work for standard MzScheme.
-- 
          ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:
                  http://www.barzilay.org/                 Maze is Life!