From: Joris Bleys
Subject: save object to file
Date: 
Message-ID: <pan.2004.08.10.18.17.03.305956@nomasp.vub.ac.be>
Hello there !!

I'm looking for a way to write an instance of a CLOS-object to a file and
having the possibility of loading  in the object at another time.

For this purpose I've found the Lisp FAQ (question 5-4), but none of them
seem to work for me as I don't have specialized printer and reader
functions for my classes (and which is unlikely to change regarding the
certain time pressure I'm under now). This excludes imho writing and
reading an ASCII representation to a file.

I've tried Kerry Koitzsch's save-object function, but it returned an error
when I tried using it. It also states to support Allegro Common Lisp upto
version 4.2, and I'm using 6.2.

Is there any other way but writing the complete Lisp-image to disk ?

Any help would be greatly appreciated,

Joris Bleys

From: Edi Weitz
Subject: Re: save object to file
Date: 
Message-ID: <878ycmj12c.fsf@bird.agharta.de>
On Tue, 10 Aug 2004 18:17:20 GMT, Joris Bleys <······@nomasp.vub.ac.be> wrote:

> I'm looking for a way to write an instance of a CLOS-object to a
> file and having the possibility of loading in the object at another
> time.
>
> For this purpose I've found the Lisp FAQ (question 5-4), but none of
> them seem to work for me as I don't have specialized printer and
> reader functions for my classes (and which is unlikely to change
> regarding the certain time pressure I'm under now). This excludes
> imho writing and reading an ASCII representation to a file.
>
> I've tried Kerry Koitzsch's save-object function, but it returned an
> error when I tried using it. It also states to support Allegro
> Common Lisp upto version 4.2, and I'm using 6.2.
>
> Is there any other way but writing the complete Lisp-image to disk?

That very much depends upon your objects and your implementation. You
might want to look at things like

  - Plob!
  - AllegroStore
  - the object-to-relational layer of CLSQL and CommonSQL
  - CL-PREVALENCE

Arthur Lemmens presented a very good survey about various persistence
techniques for CL during the last Hamburg Lispers meeting but I think
the talk isn't available online (yet).

Cheers,
Edi.

-- 

"Lisp doesn't look any deader than usual to me."
(David Thornley, reply to a question older than most languages)

Real email: (replace (subseq ·········@agharta.de" 5) "edi")
From: Joris Bleys
Subject: Re: save object to file
Date: 
Message-ID: <pan.2004.08.10.21.12.21.480374@nomasp.vub.ac.be>
Hi Edi,
 
> Arthur Lemmens presented a very good survey about various persistence
> techniques for CL during the last Hamburg Lispers meeting but I think
> the talk isn't available online (yet).

The objects I want to store are agents which have several repertoires for
categorizing colours and communicating about them. My guess is that
doesn't make it any more clearer which solution is best for me :).

I can't seem to find Lemmens' paper, but I will have a look at the
suggestions you've made.

Muchos gracias !

Joris