From ajuckel at gmail.com Sat Oct 2 01:49:13 2004 From: ajuckel at gmail.com (Anthony Juckel) Date: Fri, 1 Oct 2004 20:49:13 -0500 Subject: [cl-prevalence-devel] Patch to serialization.lisp for sbcl Message-ID: I was having some problems getting objects to properly serialize when using cl-prevalence, until I found that there was no implementation of serializable-slots for sbcl. This patch contains such an implementation. Also, I've modified it somewhat from the formula followed by the other lisps. Rather than simply returning all slots for the object, I only return those slots which are currently bound for the object. I leave it up to you to decide whether this is a useful addition or not. Anthony W. Juckel -------------- next part -------------- A non-text attachment was scrubbed... Name: cl-prevalence.patch Type: application/octet-stream Size: 1064 bytes Desc: not available URL: From randall at randallsquared.com Sat Oct 2 08:14:19 2004 From: randall at randallsquared.com (Randall Randall) Date: Sat, 2 Oct 2004 04:14:19 -0400 Subject: [cl-prevalence-devel] Patch to serialization.lisp for sbcl In-Reply-To: References: Message-ID: <0F08E248-144B-11D9-A072-000A95A0F1E8@randallsquared.com> On Oct 1, 2004, at 9:49 PM, Anthony Juckel wrote: > implementation. Also, I've modified it somewhat from the formula > followed by the other lisps. Rather than simply returning all slots > for the object, I only return those slots which are currently bound > for the object. I leave it up to you to decide whether this is a > useful addition or not. I was planning to add (if Sven doesn't object) some sort of unbound slot handling (since I would expect unbound slots to remain unbound after unserialization, and currently the serialization code just dies if a slot is unbound. So I agree that something needs to be done about unbound slots, but I don't agree that ignoring them is the best solution. -- Randall Randall "And no practical definition of freedom would be complete without the freedom to take the consequences. Indeed, it is the freedom upon which all the others are based." - Terry Pratchett, _Going Postal_ From scaekenberghe at common-lisp.net Mon Oct 4 15:16:27 2004 From: scaekenberghe at common-lisp.net (Sven Van Caekenberghe) Date: Mon, 4 Oct 2004 17:16:27 +0200 Subject: [cl-prevalence-devel] Patches to serialization Message-ID: <5CE204E2-1618-11D9-8598-000A95B3E0D2@common-lisp.net> Hi all, The following patches were applied to serialization in CVS (not yet the release): 1 bugfix: serialization of an empty string is but deserialization of that XML construct was NIL which is not a string we now return an empty string in that case thanks to randall randall 2 added serializable-slots implementation for sbcl thanks to Anthony W. Juckel 3 added code to deal with unbound slots when serializing (noted by anthony juckel) and code to deal with missing slots when deserializing 4 added reset-class-slots 5 now testing xml and sexp serialization seperately, added empty string test thanks to randall randall Sven From scaekenberghe at common-lisp.net Tue Oct 5 11:54:34 2004 From: scaekenberghe at common-lisp.net (Sven Van Caekenberghe) Date: Tue, 5 Oct 2004 13:54:34 +0200 Subject: [cl-prevalence-devel] Indexes Message-ID: <5313453A-16C5-11D9-8598-000A95B3E0D2@common-lisp.net> Hi All, Randall Randall contributed some code to add indexes to managed-prevalence, today I merge his code in CVS head (not yet in the release tarball) Exported functions: index-on drop-index-on find-object-with-slot Comments: The ideas and most code comes from Randall, I added code to drop indexes, added code to add existing objects to newly created indexes, added a fallback for find-object-with-slot in case there is no index, changed the code that checked for unchanged slots so that it conses less. Todo: Since indexing was added to improve performance, I think current the generation of root and index names done each time we access a root or index is too slow (especially conses too much). I have a new scheme of root naming that I am thinking about that might solve this problem. It might also allow for iteration over all current indexes of a class which could be usefull when deleting objects, and might bring back the index->object association instead of the current index->id association which is currently adding another indirection. Sven