From sky at viridian-project.de Sun May 3 15:02:25 2009 From: sky at viridian-project.de (Leslie P. Polzer) Date: Sun, 3 May 2009 17:02:25 +0200 (CEST) Subject: [elephant-devel] CCL omittance in new schema code? Message-ID: Just got this on CCL: If the schemas mismatch, a derived controller schema should have been computed Dataset and code work fine with SBCL, though. Maybe there's a missing implementation bit for CCL? Leslie -- http://www.linkedin.com/in/polzer From sky at viridian-project.de Sun May 3 16:13:04 2009 From: sky at viridian-project.de (Leslie P. Polzer) Date: Sun, 3 May 2009 18:13:04 +0200 (CEST) Subject: [elephant-devel] CCL omittance in new schema code? In-Reply-To: References: Message-ID: <0ec52909fa2f3f43f8f5736e64406a9c.squirrel@mail.stardawn.org> FWIW here's the backtrace: (B7AA67FC) : 0 (FUNCALL #'#<#> # NIL NIL NIL) 271 (B7AA682C) : 1 (%%STANDARD-COMBINED-METHOD-DCODE (# #) -303392234) 679 (B7AA686C) : 3 (UPDATE-OBSOLETE-INSTANCE #) 1919 (B7AA6884) : 4 (%%ONE-ARG-DCODE #((#<#> #<#>) NIL NIL 0 # ...) #) 95 (B7AA6898) : 5 (FUNCALL #'#<#> #) 399 (B7AA68C4) : 6 (FUNCALL #'#<#> #) 455 (B7AA68E4) : 7 (%%BEFORE-AND-AFTER-COMBINED-METHOD-DCODE (NIL # . -303392174)) 1175 (B7AA691C) : 8 (%%STANDARD-COMBINED-METHOD-DCODE (NIL (#<#>) #) -303392174) 223 (B7AA6950) : 10 (FUNCALL #'#<#> # :DIRECT-SUPERCLASSES (#) :DIRECT-SLOTS NIL) 103 (B7AA6964) : 11 (%%BEFORE-AND-AFTER-COMBINED-METHOD-DCODE (NIL # . -303392143)) 1175 (B7AA699C) : 12 (%%STANDARD-COMBINED-METHOD-DCODE ((#<#>) (#<#> #<#>) #) -303392143) 223 (B7AA69DC) : 14 (FUNCALL #'#<#> # SCROLL :DIRECT-SUPERCLASSES (MAGIC-ITEM) :DIRECT-SLOTS NIL :METACLASS PERSISTENT-METACLASS) 311 (B7AA69F8) : 15 (ENSURE-CLASS-FOR-DEFCLASS SCROLL :DIRECT-SUPERCLASSES (MAGIC-ITEM) :DIRECT-SLOTS NIL :METACLASS PERSISTENT-METACLASS) 335 (B7AA6A10) : 16 (FUNCALL #'# #) 55 (B7AA6A20) : 17 (%FASLOAD "/home/sky/projects/hg.beta1/common/item.lx32fsl" #(# # CCL::%BAD-FASL # # ...)) 1119 (B7AA6A6C) : 18 (%LOAD #P"/home/sky/projects/hg.beta1/common/item.lx32fsl" NIL NIL :ERROR :DEFAULT) 2159 (B7AA6B24) : 19 (%LOAD #P"/home/sky/projects/hg.beta1/common/item.lx32fsl" NIL NIL :ERROR :DEFAULT) 2887 (B7AA6BD0) : 20 (LOAD #P"/home/sky/projects/hg.beta1/common/item.lx32fsl" :VERBOSE NIL :PRINT NIL :IF-DOES-NOT-EXIST :ERROR :EXTERNAL-FORMAT :DEFAULT) 911 (B7AA6C1C) : 21 (FUNCALL #'#<#> # #) 191 (B7AA6C40) : 22 (FUNCALL #'#<#> # #) 111 (B7AA6C50) : 23 (%CALL-NEXT-METHOD (NIL # # #)) 903 (B7AA6C8C) : 24 (FUNCALL #'#<#> # #) 631 (B7AA6CBC) : 25 (%%CALL-METHOD* # (#) (# #)) 575 (B7AA6CE4) : 26 (FUNCALL #'# # #) 111 (B7AA6CF4) : 27 (FUNCALL #'#<(:INTERNAL CCL::WITH-COMPILATION-UNIT-BODY ASDF:OPERATE)>) 839 (B7AA6D24) : 28 (CALL-WITH-COMPILATION-UNIT # :OVERRIDE NIL) 183 (B7AA6D48) : 29 (OPERATE ASDF:LOAD-OP MYSTIC-ENGINE) 639 (B7AA6D8C) : 30 (CALL-CHECK-REGS ASDF:OOS ASDF:LOAD-OP MYSTIC-ENGINE) 247 (B7AA6DA8) : 31 (TOPLEVEL-EVAL (COMMON-LISP-USER::LOADSYS MYSTIC-ENGINE) NIL) 751 (B7AA6DE8) : 32 (READ-LOOP :INPUT-STREAM # :OUTPUT-STREAM # :BREAK-LEVEL 0 :PROMPT-FUNCTION #) 1815 (B7AA6EFC) : 33 (TOPLEVEL-LOOP) 71 (B7AA6F04) : 34 (FUNCALL #'#<(:INTERNAL (CCL:TOPLEVEL-FUNCTION (CCL::LISP-DEVELOPMENT-SYSTEM T)))>) 95 (B7AA6F14) : 35 (FUNCALL #'#<(:INTERNAL CCL::MAKE-MCL-LISTENER-PROCESS)>) 583 (B7AA6F60) : 36 (RUN-PROCESS-INITIAL-FORM # (#)) 671 (B7AA6FA4) : 37 (FUNCALL #'#<(:INTERNAL CCL::%PROCESS-PRESET-INTERNAL)> # (#)) 335 (B7AA6FCC) : 38 (FUNCALL #'#<(:INTERNAL CCL::THREAD-MAKE-STARTUP-FUNCTION)>) 279 Apparently this problem occurs when trying to sync instances against a redefined class schema. -- http://www.linkedin.com/in/polzer From sky at viridian-project.de Sun May 3 17:23:01 2009 From: sky at viridian-project.de (Leslie P. Polzer) Date: Sun, 3 May 2009 19:23:01 +0200 (CEST) Subject: [elephant-devel] Bogus function call `VALUE' on CCL Message-ID: Fix proposed: --- old-elephant-1.0/src/elephant/schema-evolution.lisp 2009-05-03 19:18:29.277598554 +0200 +++ new-elephant-1.0/src/elephant/schema-evolution.lisp 2009-05-03 19:18:29.284267720 +0200 @@ -120,8 +120,7 @@ upgrade-instance. This should be called after a redefinition." (loop for inst being the hash-value of (controller-instance-cache sc) do #+(or cmu sbcl)(oid (weak-pointer-value inst)) - #+openmcl (oid (value inst)) - #-(or cmu sbcl openmcl) (oid inst))) + #-(or cmu sbcl) (oid inst))) (defmethod upgrade-all-db-instances ((sc store-controller) class-schema) "This does a scan and upgrades each instance of the class referred to I'm not sure where VALUE would be defined. CCL 1.3 apparently doesn't know it; TRIVIAL-GARBAGE claims that CCL doesn't support weak data structures at all (it simulates weak pointers with a hash table). Leslie -- http://www.linkedin.com/in/polzer From sky at viridian-project.de Mon May 4 06:26:40 2009 From: sky at viridian-project.de (Leslie P. Polzer) Date: Mon, 4 May 2009 08:26:40 +0200 (CEST) Subject: [elephant-devel] Bogus function call `VALUE' on CCL In-Reply-To: References: Message-ID: <262a9b4dc1dc018ee63634efaa0dc250.squirrel@mail.stardawn.org> > I'm not sure where VALUE would be defined. CCL 1.3 apparently doesn't > know it; TRIVIAL-GARBAGE claims that CCL doesn't support weak data > structures at all (it simulates weak pointers with a hash table). Ah, I see this has been fixed in latest 1.0; apparently this is present in OpenMCL but has been removed in CCL. Leslie -- http://www.linkedin.com/in/polzer From sky at viridian-project.de Mon May 4 06:53:58 2009 From: sky at viridian-project.de (Leslie P. Polzer) Date: Mon, 4 May 2009 08:53:58 +0200 (CEST) Subject: [elephant-devel] CCL omittance in new schema code? In-Reply-To: References: Message-ID: It seems that CCL is more liberal/comprehensive than other Lisps in its usage of MAKE-INSTANCES-OBSOLETE. I haven't dived further into this but the following patch fixes the issue specifically for OpenMCL: diff -rN -u old-elephant-1.0/src/elephant/classes.lisp new-elephant-1.0/src/elephant/classes.lisp --- old-elephant-1.0/src/elephant/classes.lisp 2009-05-04 08:47:38.533508088 +0200 +++ new-elephant-1.0/src/elephant/classes.lisp 2009-05-04 08:47:39.830174415 +0200 @@ -364,6 +364,20 @@ ;; (unless (match-schemas (%class-schema class) current-schema)) (prog1 (call-next-method) + ;; OpenMCL seems to make additional instances of differing types obsolete. + ;; Let's use a high-level approach until we have figured out how to handle this + ;; properly. + #+openmcl + (progn + (unless (schema-predecessor current-schema) + ;; make sure the class schema is up to date + (synchronize-stores-for-class (class-of instance))) + (let ((schema-predecessor (schema-predecessor current-schema))) + (when schema-predecessor + (let ((prior-schema (get-controller-schema sc schema-predecessor))) + (assert (and current-schema prior-schema)) + (upgrade-db-instance instance current-schema prior-schema property-list))))) + #-openmcl (let ((prior-schema (aif (schema-predecessor current-schema) (get-controller-schema sc it) (error "If the schemas mismatch, a derived controller schema should have been computed")))) If no one objects within the next few days I will push it. Leslie -- http://www.linkedin.com/in/polzer From sky at viridian-project.de Mon May 4 07:40:43 2009 From: sky at viridian-project.de (Leslie P. Polzer) Date: Mon, 4 May 2009 09:40:43 +0200 (CEST) Subject: [elephant-devel] CCL omittance in new schema code? In-Reply-To: References: Message-ID: <0ed78bb0138c01363f0f8236f1fed4f3.squirrel@mail.stardawn.org> Leslie P. Polzer wrote: > > It seems that CCL is more liberal/comprehensive than other Lisps in > its usage of MAKE-INSTANCES-OBSOLETE. I haven't dived further into > this but the following patch fixes the issue specifically for OpenMCL: *sigh* Turns out I wasn't fully up to date... again. Who could have guessed that Ian committed a bag of CCL fixes in the last couple of weeks? Everything seems to work fine now on CCL. Leslie -- http://www.linkedin.com/in/polzer From sky at viridian-project.de Tue May 5 11:46:46 2009 From: sky at viridian-project.de (Leslie P. Polzer) Date: Tue, 5 May 2009 13:46:46 +0200 (CEST) Subject: [elephant-devel] CCL omittance in new schema code? In-Reply-To: <0ed78bb0138c01363f0f8236f1fed4f3.squirrel@mail.stardawn.org> References: <0ed78bb0138c01363f0f8236f1fed4f3.squirrel@mail.stardawn.org> Message-ID: > *sigh* Turns out I wasn't fully up to date... again. Who could have > guessed that Ian committed a bag of CCL fixes in the last couple of > weeks? > > Everything seems to work fine now on CCL. Or not. I've encountered the problem again, so I'm also resuming my original plan to commit the fix. It's too bad I haven't managed to produce a self-contained test case for this... Leslie -- http://www.linkedin.com/in/polzer From tomoyuki28jp at gmail.com Tue May 5 16:46:56 2009 From: tomoyuki28jp at gmail.com (Tomo Matsumoto) Date: Wed, 6 May 2009 01:46:56 +0900 Subject: [elephant-devel] unique object IDs and OIDs In-Reply-To: <72F846B029D949B59A3A8E36CB6C947E@killer> References: <780e7d140904231359m3ee9f949xb5e011707ef26fb7@mail.gmail.com> <72F846B029D949B59A3A8E36CB6C947E@killer> Message-ID: <780e7d140905050946h17fd7e60p80ee00cedb6ad5b5@mail.gmail.com> Thanks for your response, Alex. When we pass a nonexistent oid to controller-recreate-instance, it recreates an instance, but I am looking for a function which returns nil. Is there such a function? (Or a way to implement such.) Thanks in advance. Tomo On Sat, Apr 25, 2009 at 1:36 AM, Alex Mizrahi wrote: > > ? ? PE>>> ?If using OID values makes sense for this purpose, is there a > user-API > ? ? way to get an object by its OID? > ? ? ??>> ?yep, via class index: > ? ? (get-value oid (find-class-index 'classname)) > ? ? TM> ?It seems like the function named find-class-index disappeared in > ? ? Elephant 1.0? How can I do the same thing with version 1.0? > ? ? What I want to do is getting a instance by a class name and an oid. > > > there is now a function controller-recreate-instance: > > (ele::controller-recreate-instance store-controller oid classname) > > classname is optional, it can figure it out automatically from oid. > From sky at viridian-project.de Tue May 5 17:48:18 2009 From: sky at viridian-project.de (Leslie P. Polzer) Date: Tue, 5 May 2009 19:48:18 +0200 (CEST) Subject: [elephant-devel] unique object IDs and OIDs In-Reply-To: <780e7d140905050946h17fd7e60p80ee00cedb6ad5b5@mail.gmail.com> References: <780e7d140904231359m3ee9f949xb5e011707ef26fb7@mail.gmail.com> <72F846B029D949B59A3A8E36CB6C947E@killer> <780e7d140905050946h17fd7e60p80ee00cedb6ad5b5@mail.gmail.com> Message-ID: <7edb1dceed0fc48a386927de6c472889.squirrel@mail.stardawn.org> Tomo Matsumoto wrote: > Thanks for your response, Alex. > > When we pass a nonexistent oid to controller-recreate-instance, it > recreates an instance, but I am looking for a function which returns > nil. It does return NIL for me, at least with BDB on 1.0-latest: ? (ele::controller-recreate-instance *store-controller* 555555) NIL -- http://www.linkedin.com/in/polzer From sky at viridian-project.de Tue May 5 19:01:19 2009 From: sky at viridian-project.de (Leslie P. Polzer) Date: Tue, 5 May 2009 21:01:19 +0200 (CEST) Subject: [elephant-devel] unique object IDs and OIDs In-Reply-To: <780e7d140905051145m1d8b6c72w5227ca376640442d@mail.gmail.com> References: <780e7d140904231359m3ee9f949xb5e011707ef26fb7@mail.gmail.com> <72F846B029D949B59A3A8E36CB6C947E@killer> <780e7d140905050946h17fd7e60p80ee00cedb6ad5b5@mail.gmail.com> <7edb1dceed0fc48a386927de6c472889.squirrel@mail.stardawn.org> <780e7d140905051145m1d8b6c72w5227ca376640442d@mail.gmail.com> Message-ID: <76353b78b8e0f4fbcb090714a9e1e13e.squirrel@mail.stardawn.org> > What I have been looking for is tihs: > (defun get-instance-by-oid (class oid) > (awhen (ele::controller-recreate-instance *store-controller* oid) > (when (typep it class) > it))) > > Thanks for your help, Leslie! You're welcome. :) What are you building with Elephant? Leslie -- http://www.linkedin.com/in/polzer From tomoyuki28jp at gmail.com Tue May 5 18:45:15 2009 From: tomoyuki28jp at gmail.com (Tomo Matsumoto) Date: Wed, 6 May 2009 03:45:15 +0900 Subject: [elephant-devel] unique object IDs and OIDs In-Reply-To: <7edb1dceed0fc48a386927de6c472889.squirrel@mail.stardawn.org> References: <780e7d140904231359m3ee9f949xb5e011707ef26fb7@mail.gmail.com> <72F846B029D949B59A3A8E36CB6C947E@killer> <780e7d140905050946h17fd7e60p80ee00cedb6ad5b5@mail.gmail.com> <7edb1dceed0fc48a386927de6c472889.squirrel@mail.stardawn.org> Message-ID: <780e7d140905051145m1d8b6c72w5227ca376640442d@mail.gmail.com> > It does return NIL for me, at least with BDB on 1.0-latest: > > ? (ele::controller-recreate-instance *store-controller* 555555) > NIL Oh, I was trying with the classname optional parameter, and it recreates an instance when there is no instance associated with the oid. ex: (ele::controller-recreate-instance *store-controller* 555555 'classname) What I have been looking for is tihs: (defun get-instance-by-oid (class oid) (awhen (ele::controller-recreate-instance *store-controller* oid) (when (typep it class) it))) Thanks for your help, Leslie! Tomo On Wed, May 6, 2009 at 2:48 AM, Leslie P. Polzer wrote: > > Tomo Matsumoto wrote: >> Thanks for your response, Alex. >> >> When we pass a nonexistent oid to controller-recreate-instance, it >> recreates an instance, but I am looking for a function which returns >> nil. > > It does return NIL for me, at least with BDB on 1.0-latest: > > ? (ele::controller-recreate-instance *store-controller* 555555) > NIL > > > -- > http://www.linkedin.com/in/polzer > > > _______________________________________________ > elephant-devel site list > elephant-devel at common-lisp.net > http://common-lisp.net/mailman/listinfo/elephant-devel > From tomoyuki28jp at gmail.com Tue May 5 20:18:45 2009 From: tomoyuki28jp at gmail.com (Tomo Matsumoto) Date: Wed, 6 May 2009 05:18:45 +0900 Subject: [elephant-devel] unique object IDs and OIDs In-Reply-To: <76353b78b8e0f4fbcb090714a9e1e13e.squirrel@mail.stardawn.org> References: <780e7d140904231359m3ee9f949xb5e011707ef26fb7@mail.gmail.com> <72F846B029D949B59A3A8E36CB6C947E@killer> <780e7d140905050946h17fd7e60p80ee00cedb6ad5b5@mail.gmail.com> <7edb1dceed0fc48a386927de6c472889.squirrel@mail.stardawn.org> <780e7d140905051145m1d8b6c72w5227ca376640442d@mail.gmail.com> <76353b78b8e0f4fbcb090714a9e1e13e.squirrel@mail.stardawn.org> Message-ID: <780e7d140905051318l30c83802hed8cdc454a3591be@mail.gmail.com> > What are you building with Elephant? A web application framework named web4r. (http://github.com/tomoyuki28jp/web4r/tree/master) - The goal is "Enables users to develop web applications with the shortest codes". - It currently only works with the elephant v0.9, but I am working on it to support the v1.0 I haven't written any document, but you can try some demos here: (Firefox3 with enabling javascript is recommended.) * customer demo: http://demo.web4r.org/customer code: http://github.com/tomoyuki28jp/web4r/blob/3903ab64fa2b69f2571295c7d154e82bdbc8a201/examples/customer.lisp * wiki demo: http://demo.web4r.org/wiki code: http://github.com/tomoyuki28jp/web4r/blob/3903ab64fa2b69f2571295c7d154e82bdbc8a201/examples/wiki/wiki.lisp * blog demo: http://demo.web4r.org/blog code: http://github.com/tomoyuki28jp/web4r/blob/3903ab64fa2b69f2571295c7d154e82bdbc8a201/examples/blog/blog.lisp * Arc Challenge demo: http://demo.web4r.org/said code: http://github.com/tomoyuki28jp/web4r/blob/3903ab64fa2b69f2571295c7d154e82bdbc8a201/examples/arc-challenge.lisp Any comment, advice or suggestion will be appreciated. Special thanks to all the contributers of elephant! Tomo On Wed, May 6, 2009 at 4:01 AM, Leslie P. Polzer wrote: > >> What I have been looking for is tihs: >> (defun get-instance-by-oid (class oid) >> ? (awhen (ele::controller-recreate-instance *store-controller* oid) >> ? ? (when (typep it class) >> ? ? ? it))) >> >> Thanks for your help, Leslie! > > You're welcome. :) > > What are you building with Elephant? > > ?Leslie > > -- > http://www.linkedin.com/in/polzer > > > _______________________________________________ > elephant-devel site list > elephant-devel at common-lisp.net > http://common-lisp.net/mailman/listinfo/elephant-devel > From sky at viridian-project.de Wed May 6 07:44:18 2009 From: sky at viridian-project.de (Leslie P. Polzer) Date: Wed, 6 May 2009 09:44:18 +0200 (CEST) Subject: [elephant-devel] [OT] web frameworks (was: Re: unique object IDs and OIDs) In-Reply-To: <780e7d140905051318l30c83802hed8cdc454a3591be@mail.gmail.com> References: <780e7d140904231359m3ee9f949xb5e011707ef26fb7@mail.gmail.com> <72F846B029D949B59A3A8E36CB6C947E@killer> <780e7d140905050946h17fd7e60p80ee00cedb6ad5b5@mail.gmail.com> <7edb1dceed0fc48a386927de6c472889.squirrel@mail.stardawn.org> <780e7d140905051145m1d8b6c72w5227ca376640442d@mail.gmail.com> <76353b78b8e0f4fbcb090714a9e1e13e.squirrel@mail.stardawn.org> <780e7d140905051318l30c83802hed8cdc454a3591be@mail.gmail.com> Message-ID: <5837d1389b678fab9057d408d6a403b6.squirrel@mail.stardawn.org> > A web application framework named web4r. > (http://github.com/tomoyuki28jp/web4r/tree/master) > - The goal is "Enables users to develop web applications with the > shortest codes". That's nice! I took a look at the customer.lisp source. We at Weblocks have similar goals (bring down LOC and effort for web applications) but have a dedicated compiler for different "views" of objects. This means we can have objects look different in different places. For example one user might be able to specify a 10 character nickname, but another (with a different paid plan, for example) may be able to have one that is 20 characters. We also discern table, form and data views. If you're interested in this kind of thing I suggest looking at the Weblocks demo source code views for an employee model: http://bitbucket.org/S11001001/weblocks-dev/src/tip/examples/weblocks-demo/src/model/employee.lisp We figure out basic stuff from the class itself but are able to enhance this information with views. Cheers, Leslie -- http://www.linkedin.com/in/polzer From tomoyuki28jp at gmail.com Thu May 7 12:36:28 2009 From: tomoyuki28jp at gmail.com (Tomo Matsumoto) Date: Thu, 7 May 2009 21:36:28 +0900 Subject: [elephant-devel] [OT] web frameworks (was: Re: unique object IDs and OIDs) In-Reply-To: <5837d1389b678fab9057d408d6a403b6.squirrel@mail.stardawn.org> References: <780e7d140904231359m3ee9f949xb5e011707ef26fb7@mail.gmail.com> <72F846B029D949B59A3A8E36CB6C947E@killer> <780e7d140905050946h17fd7e60p80ee00cedb6ad5b5@mail.gmail.com> <7edb1dceed0fc48a386927de6c472889.squirrel@mail.stardawn.org> <780e7d140905051145m1d8b6c72w5227ca376640442d@mail.gmail.com> <76353b78b8e0f4fbcb090714a9e1e13e.squirrel@mail.stardawn.org> <780e7d140905051318l30c83802hed8cdc454a3591be@mail.gmail.com> <5837d1389b678fab9057d408d6a403b6.squirrel@mail.stardawn.org> Message-ID: <780e7d140905070536w56a423e8x885f5e12e53593d4@mail.gmail.com> > We at Weblocks have similar goals (bring down LOC and effort > for web applications) but have a dedicated compiler for different > "views" of objects. > This means we can have objects look different in different places. > > We also discern table, form and data views. They are interesting ideas/approaches. > If you're interested in this kind of thing I suggest looking > at the Weblocks demo source code views for an employee model: I will take a look at the source codes. Thanks for the info, Leslie. Tomo On Wed, May 6, 2009 at 4:44 PM, Leslie P. Polzer wrote: > >> A web application framework named web4r. >> (http://github.com/tomoyuki28jp/web4r/tree/master) >> - The goal is "Enables users to develop web applications with the >> shortest codes". > > That's nice! > > I took a look at the customer.lisp source. > > We at Weblocks have similar goals (bring down LOC and effort > for web applications) but have a dedicated compiler for different > "views" of objects. > > This means we can have objects look different in different places. > > For example one user might be able to specify a 10 character > nickname, but another (with a different paid plan, for example) > may be able to have one that is 20 characters. > > We also discern table, form and data views. > > If you're interested in this kind of thing I suggest looking > at the Weblocks demo source code views for an employee model: > > http://bitbucket.org/S11001001/weblocks-dev/src/tip/examples/weblocks-demo/src/model/employee.lisp > > We figure out basic stuff from the class itself but are able > to enhance this information with views. > > ?Cheers, > > ? ?Leslie > > -- > http://www.linkedin.com/in/polzer > > > _______________________________________________ > elephant-devel site list > elephant-devel at common-lisp.net > http://common-lisp.net/mailman/listinfo/elephant-devel > From tomoyuki28jp at gmail.com Thu May 7 12:51:27 2009 From: tomoyuki28jp at gmail.com (Tomo Matsumoto) Date: Thu, 7 May 2009 21:51:27 +0900 Subject: [elephant-devel] Defining a persistent class with a slot with an accessor invokes an error like "There is no class named CLASS-NAME." Message-ID: <780e7d140905070551u27e7b7adxe5657db66b0a6527@mail.gmail.com> With the latest codes from darcs, defining a persistent class with a slot with an accessor invokes an error like "There is no class named CLASS-NAME.". Here is an example. (open-store '(:BDB "/path/to/db")) (defpclass new-class () ((slot1 :accessor slot1))) ; There is no class named NEW-CLASS. ; [Condition of type SIMPLE-ERROR] ; ; Restarts: ; 0: [ABORT] Return to SLIME's top level. ; 1: [TERMINATE-THREAD] Terminate this thread (#) ; ; Backtrace: ; 0: (SB-PCL::REAL-ADD-METHOD # #)) {A9A2B31}> NIL) ; 1: (SB-PCL::FIX-SLOT-ACCESSORS # (#) SB-PCL::ADD NIL) ; 2: ((SB-PCL::FAST-METHOD SHARED-INITIALIZE :AFTER (SB-PCL::STD-CLASS T)) #(17 NIL 5 NIL) # # T)[:EXTERNAL] ; 3: ((LAMBDA (SB-PCL::.PV. SB-PCL::.NEXT-METHOD-CALL. SB-PCL::.ARG0. SB-PCL::.ARG1. SB-INT:&MORE SB-PCL::.DFUN-MORE-CONTEXT. SB-PCL::.DFUN-MORE-COUNT.)) # # # T -304735685 10) ; 4: ((SB-PCL::FAST-METHOD SHARED-INITIALIZE :AROUND (PERSISTENT-METACLASS T)) # # # #)[:EXTERNAL] ; 5: ((SB-PCL::FAST-METHOD MAKE-INSTANCE (CLASS)) # # #)[:EXTERNAL] ; 6: ((SB-PCL::FAST-METHOD SB-MOP:ENSURE-CLASS-USING-CLASS (NULL T)) # # NIL NEW-CLASS)[:EXTERNAL] ; 7: (SB-PCL::REAL-LOAD-DEFCLASS NEW-CLASS PERSISTENT-METACLASS NIL ((:NAME SLOT1 :READERS (SLOT1) :WRITERS (#) ...)) NIL (SLOT1) ((SETF SLOT1)) (SLOT1) NIL NIL) ; 8: (SB-INT:SIMPLE-EVAL-IN-LEXENV (SB-PCL::LOAD-DEFCLASS (QUOTE NEW-CLASS) (QUOTE PERSISTENT-METACLASS) (QUOTE NIL) (LIST (LIST* :NAME # :READERS # :WRITERS ...)) (LIST) ...) #) ; 9: (SB-INT:SIMPLE-EVAL-IN-LEXENV (LET NIL (SB-PCL::LOAD-DEFCLASS (QUOTE NEW-CLASS) (QUOTE PERSISTENT-METACLASS) (QUOTE NIL) (LIST #) (LIST) ...)) #) ; 10: (SB-INT:SIMPLE-EVAL-IN-LEXENV (EVAL-WHEN (:LOAD-TOPLEVEL :EXECUTE) (LET NIL (SB-PCL::LOAD-DEFCLASS # # # # # ...))) #) ; 11: (SB-INT:SIMPLE-EVAL-IN-LEXENV (DEFPCLASS NEW-CLASS NIL ((SLOT1 :ACCESSOR SLOT1))) #) Is that a bug in elephant? I use SBCL 1.0.18 on Ubuntu Linux 9.04 32bit. Tomo From sky at viridian-project.de Thu May 7 13:52:12 2009 From: sky at viridian-project.de (Leslie P. Polzer) Date: Thu, 7 May 2009 15:52:12 +0200 Subject: [elephant-devel] Defining a persistent class with a slot with an accessor invokes an error like "There is no class named CLASS-NAME." In-Reply-To: <780e7d140905070551u27e7b7adxe5657db66b0a6527@mail.gmail.com> References: <780e7d140905070551u27e7b7adxe5657db66b0a6527@mail.gmail.com> Message-ID: <20090507135212.GA3069@viridian-project.de> On Thu, May 07, 2009 at 09:51:27PM +0900, Tomo Matsumoto wrote: > With the latest codes from darcs, defining a persistent class with a > slot with an accessor invokes an error like "There is no class named > CLASS-NAME.". > > Here is an example. > > (open-store '(:BDB "/path/to/db")) > (defpclass new-class () ((slot1 :accessor slot1))) > > ; There is no class named NEW-CLASS. > ; [Condition of type SIMPLE-ERROR] > ; > ; Restarts: > ; 0: [ABORT] Return to SLIME's top level. > ; 1: [TERMINATE-THREAD] Terminate this thread (# RUNNING {A99C9E9}>) This works for me, but I recognize this error. Did you do this with a clean (i.e. empty) db? Leslie From tomoyuki28jp at gmail.com Thu May 7 14:33:47 2009 From: tomoyuki28jp at gmail.com (Tomo Matsumoto) Date: Thu, 7 May 2009 23:33:47 +0900 Subject: [elephant-devel] Defining a persistent class with a slot with an accessor invokes an error like "There is no class named CLASS-NAME." In-Reply-To: <20090507135212.GA3069@viridian-project.de> References: <780e7d140905070551u27e7b7adxe5657db66b0a6527@mail.gmail.com> <20090507135212.GA3069@viridian-project.de> Message-ID: <780e7d140905070733p912b0d2s99bec15b6ee836ec@mail.gmail.com> > Did you do this with a clean (i.e. empty) db? Yes. It seems like the error raises only when I pass a undefined class name for the defpclass macro. ex: 1. Compile and load this file. (eval-when (:compile-toplevel :load-toplevel :execute) (asdf:oos 'asdf:load-op :elephant)) (in-package :cl-user) (defpackage :test (:use :cl :elephant)) (in-package :test) (open-store '(:BDB "/home/tomo/src/lisp/test/db/")) (defpclass qhfbljq () ((slot1 :accessor slot1))) ; => Raises this error ; There is no class named TEST::QHFBLJQ. ; [Condition of type SIMPLE-ERROR] 2. Manually evaluate this sexp. (defpclass qhfbljq () ((slot1 :accessor slot1))) ; => works 3. After that, compiling and loading the same file works fine. (But if I change the class name to undefined one, it raises the same error.) Tomo On Thu, May 7, 2009 at 10:52 PM, Leslie P. Polzer wrote: > On Thu, May 07, 2009 at 09:51:27PM +0900, Tomo Matsumoto wrote: > >> With the latest codes from darcs, defining a persistent class with a >> slot with an accessor invokes an error like "There is no class named >> CLASS-NAME.". >> >> Here is an example. >> >> (open-store '(:BDB "/path/to/db")) >> (defpclass new-class () ((slot1 :accessor slot1))) >> >> ; There is no class named NEW-CLASS. >> ; ? ?[Condition of type SIMPLE-ERROR] >> ; >> ; Restarts: >> ; ?0: [ABORT] Return to SLIME's top level. >> ; ?1: [TERMINATE-THREAD] Terminate this thread (#> RUNNING {A99C9E9}>) > > This works for me, but I recognize this error. > > Did you do this with a clean (i.e. empty) db? > > ?Leslie > > _______________________________________________ > elephant-devel site list > elephant-devel at common-lisp.net > http://common-lisp.net/mailman/listinfo/elephant-devel > From eslick at media.mit.edu Fri May 8 14:31:04 2009 From: eslick at media.mit.edu (Ian Eslick) Date: Fri, 8 May 2009 10:31:04 -0400 Subject: [elephant-devel] Defining a persistent class with a slot with an accessor invokes an error like "There is no class named CLASS-NAME." In-Reply-To: <780e7d140905070551u27e7b7adxe5657db66b0a6527@mail.gmail.com> References: <780e7d140905070551u27e7b7adxe5657db66b0a6527@mail.gmail.com> Message-ID: We have been running into these problems off and on. It must be related to code for the new schema evolution mechanism introduced in the 1.0 candidate branch. I thought we had fixed these pathways, but I will endeavor to reproduce this problem. Thanks, Ian On May 7, 2009, at 8:51 AM, Tomo Matsumoto wrote: > With the latest codes from darcs, defining a persistent class with a > slot with an accessor invokes an error like "There is no class named > CLASS-NAME.". > > Here is an example. > > (open-store '(:BDB "/path/to/db")) > (defpclass new-class () ((slot1 :accessor slot1))) > > ; There is no class named NEW-CLASS. > ; [Condition of type SIMPLE-ERROR] > ; > ; Restarts: > ; 0: [ABORT] Return to SLIME's top level. > ; 1: [TERMINATE-THREAD] Terminate this thread (# RUNNING {A99C9E9}>) > ; > ; Backtrace: > ; 0: (SB-PCL::REAL-ADD-METHOD # > # #)) {A9A2B31}> NIL) > ; 1: (SB-PCL::FIX-SLOT-ACCESSORS # > (#) SB-PCL::ADD > NIL) > ; 2: ((SB-PCL::FAST-METHOD SHARED-INITIALIZE :AFTER > (SB-PCL::STD-CLASS T)) #(17 NIL 5 NIL) # > # T)[:EXTERNAL] > ; 3: ((LAMBDA (SB-PCL::.PV. SB-PCL::.NEXT-METHOD-CALL. > SB-PCL::.ARG0. SB-PCL::.ARG1. SB-INT:&MORE SB-PCL::.DFUN-MORE-CONTEXT. > SB-PCL::.DFUN-MORE-COUNT.)) # # > # T -304735685 10) > ; 4: ((SB-PCL::FAST-METHOD SHARED-INITIALIZE :AROUND > (PERSISTENT-METACLASS T)) # # argument> # #)[:EXTERNAL] > ; 5: ((SB-PCL::FAST-METHOD MAKE-INSTANCE (CLASS)) # argument> # # PERSISTENT-METACLASS>)[:EXTERNAL] > ; 6: ((SB-PCL::FAST-METHOD SB-MOP:ENSURE-CLASS-USING-CLASS (NULL T)) > # # NIL > NEW-CLASS)[:EXTERNAL] > ; 7: (SB-PCL::REAL-LOAD-DEFCLASS NEW-CLASS PERSISTENT-METACLASS NIL > ((:NAME SLOT1 :READERS (SLOT1) :WRITERS (#) ...)) NIL (SLOT1) ((SETF > SLOT1)) (SLOT1) NIL NIL) > ; 8: (SB-INT:SIMPLE-EVAL-IN-LEXENV (SB-PCL::LOAD-DEFCLASS (QUOTE > NEW-CLASS) (QUOTE PERSISTENT-METACLASS) (QUOTE NIL) (LIST (LIST* :NAME > # :READERS # :WRITERS ...)) (LIST) ...) #) > ; 9: (SB-INT:SIMPLE-EVAL-IN-LEXENV (LET NIL (SB-PCL::LOAD-DEFCLASS > (QUOTE NEW-CLASS) (QUOTE PERSISTENT-METACLASS) (QUOTE NIL) (LIST #) > (LIST) ...)) #) > ; 10: (SB-INT:SIMPLE-EVAL-IN-LEXENV (EVAL-WHEN (:LOAD-TOPLEVEL > :EXECUTE) (LET NIL (SB-PCL::LOAD-DEFCLASS # # # # # ...))) > #) > ; 11: (SB-INT:SIMPLE-EVAL-IN-LEXENV (DEFPCLASS NEW-CLASS NIL ((SLOT1 > :ACCESSOR SLOT1))) #) > > Is that a bug in elephant? > I use SBCL 1.0.18 on Ubuntu Linux 9.04 32bit. > > Tomo > > _______________________________________________ > elephant-devel site list > elephant-devel at common-lisp.net > http://common-lisp.net/mailman/listinfo/elephant-devel From tomoyuki28jp at gmail.com Fri May 8 17:24:43 2009 From: tomoyuki28jp at gmail.com (Tomo Matsumoto) Date: Sat, 9 May 2009 02:24:43 +0900 Subject: [elephant-devel] Defining a persistent class with a slot with an accessor invokes an error like "There is no class named CLASS-NAME." In-Reply-To: References: <780e7d140905070551u27e7b7adxe5657db66b0a6527@mail.gmail.com> Message-ID: <780e7d140905081024o45de9515w5084344c0717f84b@mail.gmail.com> Thanks for your time and effort. Please let me know if you need further info or I can help you anything. Tomo On Fri, May 8, 2009 at 11:31 PM, Ian Eslick wrote: > We have been running into these problems off and on. ?It must be > related to code for the new schema evolution mechanism introduced in > the 1.0 candidate branch. ?I thought we had fixed these pathways, but > I will endeavor to reproduce this problem. > > Thanks, > Ian > > On May 7, 2009, at 8:51 AM, Tomo Matsumoto wrote: > >> With the latest codes from darcs, defining a persistent class with a >> slot with an accessor invokes an error like "There is no class named >> CLASS-NAME.". >> >> Here is an example. >> >> (open-store '(:BDB "/path/to/db")) >> (defpclass new-class () ((slot1 :accessor slot1))) >> >> ; There is no class named NEW-CLASS. >> ; ? ?[Condition of type SIMPLE-ERROR] >> ; >> ; Restarts: >> ; ?0: [ABORT] Return to SLIME's top level. >> ; ?1: [TERMINATE-THREAD] Terminate this thread (#> RUNNING {A99C9E9}>) >> ; >> ; Backtrace: >> ; ? 0: (SB-PCL::REAL-ADD-METHOD # >> #> #)) {A9A2B31}> NIL) >> ; ? 1: (SB-PCL::FIX-SLOT-ACCESSORS # >> (#) SB-PCL::ADD >> NIL) >> ; ? 2: ((SB-PCL::FAST-METHOD SHARED-INITIALIZE :AFTER >> (SB-PCL::STD-CLASS T)) #(17 NIL 5 NIL) # >> # T)[:EXTERNAL] >> ; ? 3: ((LAMBDA (SB-PCL::.PV. SB-PCL::.NEXT-METHOD-CALL. >> SB-PCL::.ARG0. SB-PCL::.ARG1. SB-INT:&MORE SB-PCL::.DFUN-MORE-CONTEXT. >> SB-PCL::.DFUN-MORE-COUNT.)) # # >> # T -304735685 10) >> ; ? 4: ((SB-PCL::FAST-METHOD SHARED-INITIALIZE :AROUND >> (PERSISTENT-METACLASS T)) # #> argument> # #)[:EXTERNAL] >> ; ? 5: ((SB-PCL::FAST-METHOD MAKE-INSTANCE (CLASS)) #> argument> # #> PERSISTENT-METACLASS>)[:EXTERNAL] >> ; ? 6: ((SB-PCL::FAST-METHOD SB-MOP:ENSURE-CLASS-USING-CLASS (NULL T)) >> # # NIL >> NEW-CLASS)[:EXTERNAL] >> ; ? 7: (SB-PCL::REAL-LOAD-DEFCLASS NEW-CLASS PERSISTENT-METACLASS NIL >> ((:NAME SLOT1 :READERS (SLOT1) :WRITERS (#) ...)) NIL (SLOT1) ((SETF >> SLOT1)) (SLOT1) NIL NIL) >> ; ? 8: (SB-INT:SIMPLE-EVAL-IN-LEXENV (SB-PCL::LOAD-DEFCLASS (QUOTE >> NEW-CLASS) (QUOTE PERSISTENT-METACLASS) (QUOTE NIL) (LIST (LIST* :NAME >> # :READERS # :WRITERS ...)) (LIST) ...) #) >> ; ? 9: (SB-INT:SIMPLE-EVAL-IN-LEXENV (LET NIL (SB-PCL::LOAD-DEFCLASS >> (QUOTE NEW-CLASS) (QUOTE PERSISTENT-METACLASS) (QUOTE NIL) (LIST #) >> (LIST) ...)) #) >> ; ?10: (SB-INT:SIMPLE-EVAL-IN-LEXENV (EVAL-WHEN (:LOAD-TOPLEVEL >> :EXECUTE) (LET NIL (SB-PCL::LOAD-DEFCLASS # # # # # ...))) >> #) >> ; ?11: (SB-INT:SIMPLE-EVAL-IN-LEXENV (DEFPCLASS NEW-CLASS NIL ((SLOT1 >> :ACCESSOR SLOT1))) #) >> >> Is that a bug in elephant? >> I use SBCL 1.0.18 on Ubuntu Linux 9.04 32bit. >> >> Tomo >> >> _______________________________________________ >> elephant-devel site list >> elephant-devel at common-lisp.net >> http://common-lisp.net/mailman/listinfo/elephant-devel > > > _______________________________________________ > elephant-devel site list > elephant-devel at common-lisp.net > http://common-lisp.net/mailman/listinfo/elephant-devel > From sky at viridian-project.de Tue May 19 08:58:14 2009 From: sky at viridian-project.de (Leslie P. Polzer) Date: Tue, 19 May 2009 10:58:14 +0200 (CEST) Subject: [elephant-devel] CCL omittance in new schema code? In-Reply-To: References: <0ed78bb0138c01363f0f8236f1fed4f3.squirrel@mail.stardawn.org> Message-ID: <49179a7171cbf12ed94657c91c3f4a93.squirrel@mail.stardawn.org> Leslie P. Polzer wrote: >> Everything seems to work fine now on CCL. > > Or not. I've encountered the problem again, so I'm also > resuming my original plan to commit the fix. Committed. -- http://www.linkedin.com/in/polzer