I'm trying to do something but I'm sorta stuck because I'm not sure
where to go.
I'm writing something where I have a document which is an instance of
a class. The class has a number of superclasses. Alright, suppose I
want to save the document as an object, so that I can load it later.
I don't want to translate it into another data format and save it,
rather I just want to save it the way it is and load it again later
on.
Is there a way I can do this with Lispworks? I have quite a few books
on Lisp (but I've read most of them half-way or so - if you know any
example in a lisp book or in the acm library, would you please refer
the link as well).
Thanks. CLOS is pretty cool, maybe if I play this right, I can get
enough time to finish my reading.
g
··············@yahoo.com (gary) writes:
> I'm trying to do something but I'm sorta stuck because I'm not sure
> where to go.
>
> I'm writing something where I have a document which is an instance of
> a class. The class has a number of superclasses. Alright, suppose I
> want to save the document as an object, so that I can load it later.
> I don't want to translate it into another data format and save it,
> rather I just want to save it the way it is and load it again later
> on.
>
> Is there a way I can do this with Lispworks? I have quite a few books
> on Lisp (but I've read most of them half-way or so - if you know any
> example in a lisp book or in the acm library, would you please refer
> the link as well).
>
> Thanks. CLOS is pretty cool, maybe if I play this right, I can get
> enough time to finish my reading.
>
If I remember correctly, in the CMU AI.Repository there is a library
called SAVE-OBJECT that essentially gives you what Java Serialization
does (and, just to be precise, it gave it to you a few years earlier).
Cheers
--
Marco Antoniotti ========================================================
NYU Courant Bioinformatics Group tel. +1 - 212 - 998 3488
719 Broadway 12th Floor fax +1 - 212 - 995 4122
New York, NY 10003, USA http://bioinformatics.cat.nyu.edu
"Hello New York! We'll do what we can!"
Bill Murray in `Ghostbusters'.
··············@yahoo.com (gary) writes:
> I'm trying to do something but I'm sorta stuck because I'm not sure
> where to go.
>
> I'm writing something where I have a document which is an instance of
> a class. The class has a number of superclasses. Alright, suppose I
> want to save the document as an object, so that I can load it later.
> I don't want to translate it into another data format and save it,
> rather I just want to save it the way it is and load it again later
> on.
I doubt that you'll really get around translating it somehow.
> Is there a way I can do this with Lispworks? I have quite a few books
> on Lisp (but I've read most of them half-way or so - if you know any
> example in a lisp book or in the acm library, would you please refer
> the link as well).
>
> Thanks. CLOS is pretty cool, maybe if I play this right, I can get
> enough time to finish my reading.
Have at least a look at PRINT-OBJECT and readtables. You might
be able to hack something up that does what you want with them.
Regards,
--
Nils Goesche
Ask not for whom the <CONTROL-G> tolls.
PGP key ID #xC66D6E6F
gary wrote:
> I'm trying to do something but I'm sorta stuck because I'm not sure
> where to go.
>
> I'm writing something where I have a document which is an instance of
> a class. The class has a number of superclasses. Alright, suppose I
> want to save the document as an object, so that I can load it later.
> I don't want to translate it into another data format and save it,
> rather I just want to save it the way it is and load it again later
> on.
>
> Is there a way I can do this with Lispworks? I have quite a few books
> on Lisp (but I've read most of them half-way or so - if you know any
> example in a lisp book or in the acm library, would you please refer
> the link as well).
>
> Thanks. CLOS is pretty cool, maybe if I play this right, I can get
> enough time to finish my reading.
>
> g
>
You could try Plob! An OO database.
(http://lki-www.informatik.uni-hamburg.de/~kirschke/diplom/arbeit-eng.html)
Leon.