From alex.mizrahi at gmail.com Sat Dec 16 14:50:57 2006 From: alex.mizrahi at gmail.com (Alex Mizrahi) Date: Sat, 16 Dec 2006 16:50:57 +0200 Subject: [cl-store-devel] cl-store for ABCL Message-ID: helo thanks for adding support of ABCL to cl-store! it works for simple hash-tables, but, i have a problem with restoring nested hash-tables (hash-table whose values are hash-tables): CL-USER(16): (setq *ht1* (make-hash-table)) # CL-USER(17): (setf (gethash 1 *ht1*) (make-hash-table)) # CL-USER(18): (setf (gethash 2 (gethash 1 *ht1*)) 1) 1 CL-USER(19): (cl-store:store *ht1* "ht1.store") # CL-USER(20): (cl-store:restore "ht1.store") Debugger invoked on condition of type RESTORE-ERROR: The function # is undefined. Restarts: 0: TOP-LEVEL Return to top level. additionally, there were problems restoring store made by CLISP. it have written EXT:FASTHASH-EQUAL as a hash-function in CLISP, which does not exist in ABCL, so i had to map EXT:FASTHASH-EQUAL to CL:EQUAL, and after that hash table loaded successfully. i don't know if cross-implementation restoring is supported, but it's very nice that it's possible to do it :) with best regards, Alex 'killer_storm' Mizrahi. From alex.mizrahi at gmail.com Sat Dec 16 15:52:55 2006 From: alex.mizrahi at gmail.com (Alex Mizrahi) Date: Sat, 16 Dec 2006 17:52:55 +0200 Subject: [cl-store-devel] cl-store for ABCL In-Reply-To: <1166281399.5112.5.camel@deepthought> References: <1166281399.5112.5.camel@deepthought> Message-ID: > I suspect that this is a bug in ABCL with non-compiled cl-store i was able to get more detailed backtrace: (MAKE-HASH-TABLE :TEST # :REHASH-SIZE # :REHASH-THRESHOLD # :SIZE 16) so, problem is that values were not 'dereferenced'. this is because you use eq hash-table *restored-values*. same numbers are not guaranteed to be EQ. (small numbers are EQ in ABCL, but they are not EQ in HT). i've made *restored-values* EQL hash-table, and my small file got loaded, i'm not sure it doesn't violate some semantics though. however, my bigger file has problems, in unicode-base-string. but unicode is not officially supported in ABCL, so it's up to me to make a workaround for this.. From alex.mizrahi at gmail.com Sun Dec 17 09:43:12 2006 From: alex.mizrahi at gmail.com (Alex Mizrahi) Date: Sun, 17 Dec 2006 11:43:12 +0200 Subject: [cl-store-devel] cl-store for ABCL In-Reply-To: <1166314541.9615.11.camel@deepthought> References: <1166281399.5112.5.camel@deepthought> <1166314541.9615.11.camel@deepthought> Message-ID: > > however, my bigger file has problems, in unicode-base-string. but > > unicode is not officially supported in ABCL, so it's up to me to make > > a workaround for this.. > Hmm, i'm not sure I understand what the problem is with the string? > Is the problem with detecting unicode strings or the dumping of wide > characters? char-code and code-char are asymmetric in ABCL -- char code can return ucs-2 codes, but code-char will return NIL for char-codes more than 255. i've patched ABCL's code-char to return valid charaters, and then it loaded my file well (i didn't check correctness though -- i've passed this file through CLISP to convert CL-STORE version, so chars code be corrupted). so, it's ABCL needs to be patched.. From rosssd at gmail.com Sun Dec 17 12:17:44 2006 From: rosssd at gmail.com (rosssd at gmail.com) Date: Sun, 17 Dec 2006 12:17:44 +0000 Subject: [Fwd: Re: [cl-store-devel] cl-store for ABCL] Message-ID: <1166357864.16068.1.camel@deepthought> -------- Forwarded Message -------- From: rosssd at gmail.com Reply-To: rosssd at gmail.com To: Alex Mizrahi Cc: cl-store-devel at common-lisp.net Subject: Re: [cl-store-devel] cl-store for ABCL Date: Sat, 16 Dec 2006 15:03:20 +0000 On Sat, 2006-12-16 at 16:50 +0200, Alex Mizrahi wrote: > helo > > thanks for adding support of ABCL to cl-store! Thanks for the report. I wont be able to get to this problem right now but I'll find some time to investigate this later today. I suspect that this is a bug in ABCL since hash table's seem to serialise fine with other implementations, but I'll double check this. Cheers, Sean. -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part URL: From rosssd at gmail.com Sun Dec 17 12:18:02 2006 From: rosssd at gmail.com (rosssd at gmail.com) Date: Sun, 17 Dec 2006 12:18:02 +0000 Subject: [Fwd: Re: [cl-store-devel] cl-store for ABCL] Message-ID: <1166357882.16068.3.camel@deepthought> -------- Forwarded Message -------- From: rosssd at gmail.com Reply-To: rosssd at gmail.com To: Alex Mizrahi Cc: cl-store-devel at common-lisp.net Subject: Re: [cl-store-devel] cl-store for ABCL Date: Sun, 17 Dec 2006 00:15:42 +0000 On Sat, 2006-12-16 at 17:52 +0200, Alex Mizrahi wrote: > i've made *restored-values* EQL hash-table, and my small file got > loaded, i'm not sure it doesn't violate some semantics though. Thanks, fix applied. > however, my bigger file has problems, in unicode-base-string. but > unicode is not officially supported in ABCL, so it's up to me to make > a workaround for this.. Hmm, i'm not sure I understand what the problem is with the string? Is the problem with detecting unicode strings or the dumping of wide characters? Cheers, Sean. -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part URL: From rosssd at gmail.com Sun Dec 17 12:18:14 2006 From: rosssd at gmail.com (rosssd at gmail.com) Date: Sun, 17 Dec 2006 12:18:14 +0000 Subject: [Fwd: Re: [cl-store-devel] cl-store for ABCL] Message-ID: <1166357894.16068.5.camel@deepthought> -------- Forwarded Message -------- From: rosssd at gmail.com Reply-To: rosssd at gmail.com To: Alex Mizrahi Cc: cl-store-devel at common-lisp.net Subject: Re: [cl-store-devel] cl-store for ABCL Date: Sat, 16 Dec 2006 23:24:23 +0000 On Sat, 2006-12-16 at 17:52 +0200, Alex Mizrahi wrote: > so, problem is that values were not 'dereferenced'. > > this is because you use eq hash-table *restored-values*. same numbers > are not guaranteed to be EQ. (small numbers are EQ in ABCL, but they > are not EQ in HT). cough, cough, remind me not to jump to conclusions.... Thanks for this report and for identifying the problem, I've been naively assuming that fixnums are eq, a problem with relying on implementations and not specifications. I don't think that this has any other effects and barring any problems I'll commit a fix to this effect tomorrow. Thanks again. Sean. -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part URL: