From wgl at ciexinc.com Wed Dec 2 21:29:48 2009 From: wgl at ciexinc.com (wgl) Date: Wed, 02 Dec 2009 15:29:48 -0600 Subject: [elephant-devel] Question about psets and examples shown in tutorial Message-ID: <1259789388.32689.60.camel@park> I am using sbcl 1.0.30, and latest elephant (the alpha 1.0) bdb 4.7 and am trying to do the examples shown in http://common-lisp.net/project/elephant/doc/Persistent-collections.html#Persistent-collections to work, and it seems that the double parens around the friends slot def might be a typo. In any case, with my example using a very similar definition using the pset approach, the make instance of the persistent class gets "Elephant deserialization error deserialize fubar!". Any recommendations would be appreciated. --wgl-- From smanek at gmail.com Thu Dec 3 13:09:20 2009 From: smanek at gmail.com (Shaneal Manek) Date: Thu, 3 Dec 2009 08:09:20 -0500 Subject: [elephant-devel] Using Elephant in Production Message-ID: Hi, I just wanted to quickly let everyone know that I'm using elephant in production on my start up (http://postabon.com). Thanks to everyone here for creating such a great piece of open source software. In particular, Ian Eslick and Leslie Polzer were very helpful answering my newbie questions and helping me get off the ground. But the whole elephant team has my eternal gratitude ;-) (If we ever get funding/revenue/coders I plan to start contributing back to Elephant. For now, I'm the only programmer (and a student to boot) so I must apologize that I don't have the time/resources to do so properly). Thanks -Shaneal From wgl at ciexinc.com Thu Dec 3 14:09:48 2009 From: wgl at ciexinc.com (wgl) Date: Thu, 03 Dec 2009 08:09:48 -0600 Subject: [elephant-devel] Question about psets and examples shown in tutorial In-Reply-To: <1259789388.32689.60.camel@park> References: <1259789388.32689.60.camel@park> Message-ID: <1259849388.32689.62.camel@park> All: I resolved my problem, and now things are working quite well. I do thing the mentioned example does have a typo. Thanks for all the effort you put into this. Glad to see that Elephant is getting some good press on HN and reddit with the new startup. --wgl-- On Wed, 2009-12-02 at 15:29 -0600, wgl wrote: > I am using sbcl 1.0.30, and latest elephant (the alpha 1.0) bdb 4.7 and > am trying to do the examples shown in > http://common-lisp.net/project/elephant/doc/Persistent-collections.html#Persistent-collections to work, and it seems that the double parens around the friends slot def might be a typo. > > In any case, with my example using a very similar definition using the > pset approach, the make instance of the persistent class gets "Elephant > deserialization error deserialize fubar!". > > Any recommendations would be appreciated. > > --wgl-- > > > _______________________________________________ > elephant-devel site list > elephant-devel at common-lisp.net > http://common-lisp.net/mailman/listinfo/elephant-devel From eslick at media.mit.edu Thu Dec 3 19:41:53 2009 From: eslick at media.mit.edu (Ian Eslick) Date: Thu, 3 Dec 2009 11:41:53 -0800 Subject: [elephant-devel] Elephant in Production and the Elephant 1.0 Release In-Reply-To: References: Message-ID: Shaneal, It's great to hear Elephant is working well for people doing new projects. My own project, www.lamsight.org, has been live for about a year with no Elephant related problems that I can recall. There are corner cases that you may hit during development where the code isn't yet rock solid, but the main use cases have been stable for quite a few of us for the last year and a half or so. :: Appeal below for help on 1.0 :: Leslie and I are both very motivated to get a proper 1.0 release out the door. The 1.0 requires tightening up the corner cases people have reported recently. A proper release is a significant effort. I think we can handle the few remaining bugs and feature cleanup, but a release will not happen anytime soon without help from the community to augment the test suite and update the manual. In fact it's better that people less familiar with the code base do both as we don't always catch confusing issues that are not intuitive for us. There is plenty of opportunity for small efforts from volunteers (1-3 hour chunks) that would greatly accelerate the release cycle. If you write to me directly, I'd be willing to put together a 'punchlist' of small projects along these lines that would help. If we get 5 or more people to volunteer to do a few of these, I'll commit to the core work necessary to wrap up the release (and hopefully Leslie will help too!) Regards, Ian On Dec 3, 2009, at 5:09 AM, Shaneal Manek wrote: > Hi, > > I just wanted to quickly let everyone know that I'm using elephant in > production on my start up (http://postabon.com). > > Thanks to everyone here for creating such a great piece of open source > software. In particular, Ian Eslick and Leslie Polzer were very > helpful answering my newbie questions and helping me get off the > ground. But the whole elephant team has my eternal gratitude ;-) > > (If we ever get funding/revenue/coders I plan to start contributing > back to Elephant. For now, I'm the only programmer (and a student to > boot) so I must apologize that I don't have the time/resources to do > so properly). > > Thanks > -Shaneal > > _______________________________________________ > elephant-devel site list > elephant-devel at common-lisp.net > http://common-lisp.net/mailman/listinfo/elephant-devel From plamen.usenet at gmail.com Sat Dec 5 13:31:50 2009 From: plamen.usenet at gmail.com (Plamen .) Date: Sat, 5 Dec 2009 14:31:50 +0100 Subject: [elephant-devel] Problem with LWW 5.1.2, BDB-backend In-Reply-To: References: Message-ID: Sorry if posted twice... Hello, I need to use BDB for my current application and from what I see on the net, elephant seems to be the most mature and functional solution. After following the installation instructions (I use LispWorks 5.1.2 for Windows - yes - I need that configuration at the moment, with Berkeley DB 4.5.20, with prebuild DLLs (libberkeley-db.dll and libmemutil.dll) in the elephant-root and from what I see a correct my-config.sexp also in the elephant-root directory), after loading Elephant I get the following error : ELE-USER 13 > (open-store '(:bdb "/temp/db2/")) Error: The call (# 0) does not match definition (# DB-BDB::FLAGS DB-BDB::ERRNO). >From what I see in the sources - there are 3 relevant definitions : 1. the BDB one : db_env_create ________________________________ #include int db_env_create(DB_ENV **dbenvp, u_int32_t flags); 2. then the libberkeley-db one : DB_ENV *db_env_cr(u_int32_t flags, int *errno) { ?DB_ENV *envp; ?*errno = db_env_create(&envp, flags); ?return envp; } 3. and finally the Lisp definitions : (def-function ("db_env_cr" %db-env-create) ? ?((flags :unsigned-int) ? ? (errno :int :out)) ?:returning :pointer-void) (defun db-env-create () ?"Create an environment handle." ?(multiple-value-bind (env errno) ? ? ?(%db-env-create 0) ? ?(declare (type fixnum errno)) ? ?(if (= errno 0) ? ? ? ?env ? ? ? ?(error 'db-error :errno errno)))) I have cffi_0.10.5 and uffi-1.6.2 (which are currently the newest versions of that libraries). The call (%db-env-create 0) in the db-env-create function looks of course weird for me, but if people use these lines of source on all other Lisp-implementations, obviously I miss something. I know the LW FFI, but I'm not really proficient in the CFFI/UFFI-conversion to see the missing parts, but if there is someone outside in the WWW who runs LWW & BDB and/or knows how to help, I would be very gratefull. Regards Plamen From plamen.usenet at gmail.com Sat Dec 5 13:28:25 2009 From: plamen.usenet at gmail.com (Plamen .) Date: Sat, 5 Dec 2009 14:28:25 +0100 Subject: [elephant-devel] Problem with LWW 5.1.2, BDB-backend Message-ID: Hello, I need to use BDB for my current application and from what I see on the net, elephant seems to be the most mature and functional solution. After following the installation instructions (I use LispWorks 5.1.2 for Windows - yes - I need that configuration at the moment, with Berkeley DB 4.5.20, with prebuild DLLs (libberkeley-db.dll and libmemutil.dll) in the elephant-root and from what I see a correct my-config.sexp also in the elephant-root directory), after loading Elephant I get the following error : ELE-USER 13 > (open-store '(:bdb "/temp/db2/")) Error: The call (# 0) does not match definition (# DB-BDB::FLAGS DB-BDB::ERRNO). >From what I see in the sources - there are 3 relevant definitions : 1. the BDB one : db_env_create ________________________________ #include int db_env_create(DB_ENV **dbenvp, u_int32_t flags); 2. then the libberkeley-db one : DB_ENV *db_env_cr(u_int32_t flags, int *errno) { DB_ENV *envp; *errno = db_env_create(&envp, flags); return envp; } 3. and finally the Lisp definitions : (def-function ("db_env_cr" %db-env-create) ((flags :unsigned-int) (errno :int :out)) :returning :pointer-void) (defun db-env-create () "Create an environment handle." (multiple-value-bind (env errno) (%db-env-create 0) (declare (type fixnum errno)) (if (= errno 0) env (error 'db-error :errno errno)))) I have cffi_0.10.5 and uffi-1.6.2 (which are currently the newest versions of that libraries). The call (%db-env-create 0) in the db-env-create function looks of course weird for me, but if people use these lines of source on all other Lisp-implementations, obviously I miss something. I know the LW FFI, but I'm not really proficient in the CFFI/UFFI-conversion to see the missing parts, but if there is someone outside in the WWW who runs LWW & BDB and/or knows how to help, I would be very gratefull. Regards Plamen From eslick at media.mit.edu Sun Dec 6 16:44:15 2009 From: eslick at media.mit.edu (Ian Eslick) Date: Sun, 6 Dec 2009 08:44:15 -0800 Subject: [elephant-devel] Problem with LWW 5.1.2, BDB-backend In-Reply-To: References: Message-ID: <21F2E2EF-A82E-400F-81AB-79CAAE8C6D25@media.mit.edu> Hey, quick answers: 1) In the online FAQ you'll notice that you have to ensure that you are using uffi and not the uffi compatibility package from cffi. 2) The prebuilt DLLs are not up to date (sorry!), they need to be made current against BDB 4.7 which Elephant 1.0 depends on. 3) We have one or two lispworks users that I'm aware of, so it should work, but I can't rule out a lispworks specific problem, although I think #1 and #2 above explain what you're seeing. Are you a position to build the DLLs yourself? Ian On Dec 5, 2009, at 5:28 AM, Plamen . wrote: > Hello, > I need to use BDB for my current application and from what I see on > the net, elephant seems to be the most mature and functional solution. > After following the installation instructions (I use LispWorks 5.1.2 > for Windows - yes - I need that configuration at the moment, with > Berkeley DB 4.5.20, with prebuild DLLs (libberkeley-db.dll and > libmemutil.dll) in the elephant-root and from what I see a correct > my-config.sexp also in the elephant-root directory), after loading > Elephant I get the following error : > ELE-USER 13 > (open-store '(:bdb "/temp/db2/")) > Error: The call (# 0) does > not match definition (# > DB-BDB::FLAGS DB-BDB::ERRNO). > From what I see in the sources - there are 3 relevant definitions : > 1. the BDB one : > > db_env_create > > ________________________________ > > #include > > int > db_env_create(DB_ENV **dbenvp, u_int32_t flags); > > 2. then the libberkeley-db one : > > DB_ENV *db_env_cr(u_int32_t flags, int *errno) { > DB_ENV *envp; > *errno = db_env_create(&envp, flags); > return envp; > } > > 3. and finally the Lisp definitions : > > (def-function ("db_env_cr" %db-env-create) > ((flags :unsigned-int) > (errno :int :out)) > :returning :pointer-void) > > (defun db-env-create () > "Create an environment handle." > (multiple-value-bind (env errno) > (%db-env-create 0) > (declare (type fixnum errno)) > (if (= errno 0) > env > (error 'db-error :errno errno)))) > > I have cffi_0.10.5 and uffi-1.6.2 (which are currently the newest > versions of that libraries). > > The call (%db-env-create 0) in the db-env-create function looks of > course weird for me, but if people use these lines of source on all > other Lisp-implementations, obviously I miss something. I know the LW > FFI, but I'm not really proficient in the CFFI/UFFI-conversion to see > the missing parts, but if there is someone outside in the WWW who runs > LWW & BDB and/or knows how to help, I would be very gratefull. > > Regards > Plamen > > _______________________________________________ > elephant-devel site list > elephant-devel at common-lisp.net > http://common-lisp.net/mailman/listinfo/elephant-devel From elliottslaughter at gmail.com Sun Dec 6 21:12:57 2009 From: elliottslaughter at gmail.com (Elliott Slaughter) Date: Sun, 6 Dec 2009 13:12:57 -0800 Subject: [elephant-devel] Failure of Allegro on Windows with BDB 4.7 Message-ID: <42c0ab790912061312k6dcf4f45r9bf9ff0e9733e4de@mail.gmail.com> Hi, I get the following compile error with the newest Elephant 1.0 in Allegro on Windows 7 with BDB 4.7. Let me know if there is anything else I can do to help debug this. ;;; Compiling file ;;; C:\Bin\asdf-allegro\elephant-1.0\src\db-bdb\berkeley-db.lisp ; While compiling DB-CURSOR: Error: This declare form is not in a place declares are allowed: (DECLARE (TYPE POINTER-INT ERRNO-BUFFER)) Problem detected when processing (DECLARE (TYPE POINTER-INT ERRNO-BUFFER)) inside (PROGN (DECLARE (TYPE POINTER-INT ERRNO-BUFFER)) (LET* (# #) (DECLARE # #) ...)) .. inside (UNWIND-PROTECT ..) inside (WITH-FOREIGN-OBJECT (ERRNO-BUFFER :INT) ..) inside (BLOCK DB-CURSOR ..) inside (PROGN (BLOCK DB-CURSOR (WITH-FOREIGN-OBJECT # # ...))) .. [condition type: PARSE-ERROR] -- Elliott Slaughter "Don't worry about what anybody else is going to do. The best way to predict the future is to invent it." - Alan Kay -------------- next part -------------- An HTML attachment was scrubbed... URL: From elliottslaughter at gmail.com Sun Dec 6 21:12:27 2009 From: elliottslaughter at gmail.com (Elliott Slaughter) Date: Sun, 6 Dec 2009 13:12:27 -0800 Subject: [elephant-devel] Failure of SBCL on Windows with BDB 4.7 Message-ID: <42c0ab790912061312o7111c5a5xbead166a816512d1@mail.gmail.com> Hi, I'm testing the newest Elephant 1.0 SBCL 1.0.29 on Windows 7 with BDB 4.7. I get the following error when attempting to open a controller. (I've used SBCL with Elephant 1.0 and BDB 4.5 in the past, so either this is an upgrade issue from 4.5 to 4.7 or a regression.) Let me know if there is anything else I can do to help debug this. DB_ENV->set_lk_detect: unknown deadlock detection mode specified debugger invoked on a BDB-DB-ERROR: Berkeley DB error #22: Invalid argument Type HELP for debugger help, or (SB-EXT:QUIT) to exit from SBCL. restarts (invokable by number or by possibly-abbreviated name): 0: [CONTINUE] Ignore runtime option --load "test.lisp". 1: [ABORT ] Skip rest of --eval and --load options. 2: Skip to toplevel READ/EVAL/PRINT loop. 3: [QUIT ] Quit SBCL (calling #'QUIT, killing the process). (DB-BDB::DB-ENV-SET-MAX-LOCKS # #) 0] ba 0: (DB-BDB::DB-ENV-SET-MAX-LOCKS # #) 1: ((SB-PCL::FAST-METHOD ELEPHANT::OPEN-CONTROLLER (DB-BDB::BDB-STORE-CONTROLLER)) #)[:EXTERNAL] 2: ((LAMBDA (SB-PCL::.PV. SB-PCL::.NEXT-METHOD-CALL. SB-PCL::.ARG0. SB-INT:&MORE SB-PCL::.DFUN-MORE-CONTEXT. SB-PCL::.DFUN-MORE-COUNT.)) # # # 671267 0) 3: (OPEN-STORE #)[:EXTERNAL] 4: (SB-INT:SIMPLE-EVAL-IN-LEXENV (OPEN-STORE '(:BDB "test.db/")) #) 5: (SB-FASL::LOAD-AS-SOURCE # NIL NIL) 6: ((FLET SB-FASL::LOAD-STREAM) #) 7: (LOAD #P"test.lisp")[:EXTERNAL] 8: (SB-IMPL::PROCESS-EVAL/LOAD-OPTIONS ((:LOAD . "test.lisp"))) 9: (SB-IMPL::TOPLEVEL-INIT) 10: ((LABELS SB-IMPL::RESTART-LISP)) 11: ("foreign function: #x4120C4") 12: ("foreign function: #x40AF88") -- Elliott Slaughter "Don't worry about what anybody else is going to do. The best way to predict the future is to invent it." - Alan Kay -------------- next part -------------- An HTML attachment was scrubbed... URL: From elliottslaughter at gmail.com Sun Dec 6 20:55:09 2009 From: elliottslaughter at gmail.com (Elliott Slaughter) Date: Sun, 6 Dec 2009 12:55:09 -0800 Subject: [elephant-devel] Problem with LWW 5.1.2, BDB-backend In-Reply-To: <21F2E2EF-A82E-400F-81AB-79CAAE8C6D25@media.mit.edu> References: <21F2E2EF-A82E-400F-81AB-79CAAE8C6D25@media.mit.edu> Message-ID: <42c0ab790912061255y2567dde3p3acd0d6db8d4f953@mail.gmail.com> On Sun, Dec 6, 2009 at 8:44 AM, Ian Eslick wrote: > 2) The prebuilt DLLs are not up to date (sorry!), they need to be made > current against BDB 4.7 which Elephant 1.0 depends on. > Is Elephant incompatible with BDB 4.5? That could be part of the problem, since it sounds like Plamen is trying to use 4.5. Are you a position to build the DLLs yourself? > I can provide up-to-date binaries for BDB 4.7, although I seem to be getting errors compiling Elephant with SBCL. (More on that in a separate thread.) -- Elliott Slaughter "Don't worry about what anybody else is going to do. The best way to predict the future is to invent it." - Alan Kay -------------- next part -------------- An HTML attachment was scrubbed... URL: From eslick at media.mit.edu Sun Dec 6 21:53:53 2009 From: eslick at media.mit.edu (Ian Eslick) Date: Sun, 6 Dec 2009 13:53:53 -0800 Subject: [elephant-devel] Failure of SBCL on Windows with BDB 4.7 In-Reply-To: <42c0ab790912061312o7111c5a5xbead166a816512d1@mail.gmail.com> References: <42c0ab790912061312o7111c5a5xbead166a816512d1@mail.gmail.com> Message-ID: <1DC6C09B-1428-490B-AF52-6BC3211E15AE@media.mit.edu> What's your my-config.sexp? On Dec 6, 2009, at 1:12 PM, Elliott Slaughter wrote: > Hi, > > I'm testing the newest Elephant 1.0 SBCL 1.0.29 on Windows 7 with BDB 4.7. I get the following error when attempting to open a controller. (I've used SBCL with Elephant 1.0 and BDB 4.5 in the past, so either this is an upgrade issue from 4.5 to 4.7 or a regression.) > > Let me know if there is anything else I can do to help debug this. > > DB_ENV->set_lk_detect: unknown deadlock detection mode specified > > debugger invoked on a BDB-DB-ERROR: Berkeley DB error #22: Invalid argument > > Type HELP for debugger help, or (SB-EXT:QUIT) to exit from SBCL. > > restarts (invokable by number or by possibly-abbreviated name): > 0: [CONTINUE] Ignore runtime option --load "test.lisp". > 1: [ABORT ] Skip rest of --eval and --load options. > 2: Skip to toplevel READ/EVAL/PRINT loop. > 3: [QUIT ] Quit SBCL (calling #'QUIT, killing the process). > > (DB-BDB::DB-ENV-SET-MAX-LOCKS # #) > 0] ba > > 0: (DB-BDB::DB-ENV-SET-MAX-LOCKS > # > #) > 1: ((SB-PCL::FAST-METHOD ELEPHANT::OPEN-CONTROLLER > (DB-BDB::BDB-STORE-CONTROLLER)) #)[:EXTERNAL] > 2: ((LAMBDA > (SB-PCL::.PV. SB-PCL::.NEXT-METHOD-CALL. SB-PCL::.ARG0. SB-INT:&MORE > SB-PCL::.DFUN-MORE-CONTEXT. SB-PCL::.DFUN-MORE-COUNT.)) > # > # > # > 671267 > 0) > 3: (OPEN-STORE #)[:EXTERNAL] > 4: (SB-INT:SIMPLE-EVAL-IN-LEXENV (OPEN-STORE '(:BDB "test.db/")) #) > > 5: (SB-FASL::LOAD-AS-SOURCE > # B9}> > NIL > NIL) > 6: ((FLET SB-FASL::LOAD-STREAM) > # B9}>) > 7: (LOAD #P"test.lisp")[:EXTERNAL] > 8: (SB-IMPL::PROCESS-EVAL/LOAD-OPTIONS ((:LOAD . "test.lisp"))) > 9: (SB-IMPL::TOPLEVEL-INIT) > 10: ((LABELS SB-IMPL::RESTART-LISP)) > 11: ("foreign function: #x4120C4") > 12: ("foreign function: #x40AF88") > > -- > Elliott Slaughter > > "Don't worry about what anybody else is going to do. The best way to predict the future is to invent it." - Alan Kay > _______________________________________________ > elephant-devel site list > elephant-devel at common-lisp.net > http://common-lisp.net/mailman/listinfo/elephant-devel From elliottslaughter at gmail.com Sun Dec 6 23:13:00 2009 From: elliottslaughter at gmail.com (Elliott Slaughter) Date: Sun, 6 Dec 2009 15:13:00 -0800 Subject: [elephant-devel] Failure of SBCL on Windows with BDB 4.7 In-Reply-To: <1DC6C09B-1428-490B-AF52-6BC3211E15AE@media.mit.edu> References: <42c0ab790912061312o7111c5a5xbead166a816512d1@mail.gmail.com> <1DC6C09B-1428-490B-AF52-6BC3211E15AE@media.mit.edu> Message-ID: <42c0ab790912061513j5d2e62b9w6898bc7cbb6d8eaa@mail.gmail.com> Here's the relevant portion: #+(or mswindows windows win32) ((:compiler . :cygwin) (:berkeley-db-version . "4.7") (:berkeley-db-include-dir . "C:/Program Files (x86)/Oracle/Berkeley DB 4.7.25/include/") (:berkeley-db-lib-dir . "C:/Program Files (x86)/Oracle/Berkeley DB 4.7.25/bin/") (:berkeley-db-lib . "C:/Program Files (x86)/Oracle/Berkeley DB 4.7.25/bin/libdb47.dll") (:berkeley-db-deadlock . "C:/Program Files (x86)/Oracle/Berkeley DB 4.7.25/bin/db_deadlock.exe") (:berkeley-db-cachesize . 20971520) (:berkeley-db-max-locks . 2000) (:berkeley-db-max-objects . 2000) (:berkeley-db-map-degree2 . t) (:berkeley-db-mvcc . nil) (:clsql-lib-paths . nil) (:prebuilt-libraries . nil)) On Sun, Dec 6, 2009 at 1:53 PM, Ian Eslick wrote: > What's your my-config.sexp? > > On Dec 6, 2009, at 1:12 PM, Elliott Slaughter wrote: > > > Hi, > > > > I'm testing the newest Elephant 1.0 SBCL 1.0.29 on Windows 7 with BDB > 4.7. I get the following error when attempting to open a controller. (I've > used SBCL with Elephant 1.0 and BDB 4.5 in the past, so either this is an > upgrade issue from 4.5 to 4.7 or a regression.) > > > > Let me know if there is anything else I can do to help debug this. > > > > DB_ENV->set_lk_detect: unknown deadlock detection mode specified > > > > debugger invoked on a BDB-DB-ERROR: Berkeley DB error #22: Invalid > argument > > > > Type HELP for debugger help, or (SB-EXT:QUIT) to exit from SBCL. > > > > restarts (invokable by number or by possibly-abbreviated name): > > 0: [CONTINUE] Ignore runtime option --load "test.lisp". > > 1: [ABORT ] Skip rest of --eval and --load options. > > 2: Skip to toplevel READ/EVAL/PRINT loop. > > 3: [QUIT ] Quit SBCL (calling #'QUIT, killing the process). > > > > (DB-BDB::DB-ENV-SET-MAX-LOCKS # # argument>) > > 0] ba > > > > 0: (DB-BDB::DB-ENV-SET-MAX-LOCKS > > # > > #) > > 1: ((SB-PCL::FAST-METHOD ELEPHANT::OPEN-CONTROLLER > > (DB-BDB::BDB-STORE-CONTROLLER)) # list>)[:EXTERNAL] > > 2: ((LAMBDA > > (SB-PCL::.PV. SB-PCL::.NEXT-METHOD-CALL. SB-PCL::.ARG0. > SB-INT:&MORE > > SB-PCL::.DFUN-MORE-CONTEXT. SB-PCL::.DFUN-MORE-COUNT.)) > > # > > # > > # > > 671267 > > 0) > > 3: (OPEN-STORE #)[:EXTERNAL] > > 4: (SB-INT:SIMPLE-EVAL-IN-LEXENV (OPEN-STORE '(:BDB "test.db/")) > #) > > > > 5: (SB-FASL::LOAD-AS-SOURCE > > # {23EEEE > > B9}> > > NIL > > NIL) > > 6: ((FLET SB-FASL::LOAD-STREAM) > > # {23EEEE > > B9}>) > > 7: (LOAD #P"test.lisp")[:EXTERNAL] > > 8: (SB-IMPL::PROCESS-EVAL/LOAD-OPTIONS ((:LOAD . "test.lisp"))) > > 9: (SB-IMPL::TOPLEVEL-INIT) > > 10: ((LABELS SB-IMPL::RESTART-LISP)) > > 11: ("foreign function: #x4120C4") > > 12: ("foreign function: #x40AF88") > > > > -- > > Elliott Slaughter > > > > "Don't worry about what anybody else is going to do. The best way to > predict the future is to invent it." - Alan Kay > > _______________________________________________ > > 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 > -- Elliott Slaughter "Don't worry about what anybody else is going to do. The best way to predict the future is to invent it." - Alan Kay -------------- next part -------------- An HTML attachment was scrubbed... URL: From plamen.usenet at gmail.com Mon Dec 7 08:09:39 2009 From: plamen.usenet at gmail.com (Plamen .) Date: Mon, 7 Dec 2009 09:09:39 +0100 Subject: [elephant-devel] Problem with LWW 5.1.2, BDB-backend In-Reply-To: <21F2E2EF-A82E-400F-81AB-79CAAE8C6D25@media.mit.edu> References: <21F2E2EF-A82E-400F-81AB-79CAAE8C6D25@media.mit.edu> Message-ID: Hello Ian, thank you for the quick response! On Sun, Dec 6, 2009 at 5:44 PM, Ian Eslick wrote: > Hey, quick answers: > > 1) In the online FAQ you'll notice that you have to ensure that you are using uffi and not the uffi compatibility package from cffi. Ok, had missed that... > 2) The prebuilt DLLs are not up to date (sorry!), they need to be made current against BDB 4.7 which Elephant 1.0 depends on. Ok, had no idea from the doc or source that 4.7 is the current target, but that's even better. > 3) We have one or two lispworks users that I'm aware of, so it should work, but I can't rule out a lispworks specific problem, although I think #1 and #2 above explain what you're seeing. > > Are you a position to build the DLLs yourself? Haven't touched C for years now and never had the pleasure with cygwin but now I'll try it :) > > Ian > > On Dec 5, 2009, at 5:28 AM, Plamen . wrote: > >> Hello, >> I need to use BDB for my current application and from what I see on >> the net, elephant seems to be the most mature and functional solution. >> After following the installation instructions (I use LispWorks 5.1.2 >> for Windows - yes - I need that configuration at the moment, with >> Berkeley DB 4.5.20, with prebuild DLLs (libberkeley-db.dll and >> libmemutil.dll) in the elephant-root and from what I see a correct >> my-config.sexp also in the elephant-root directory), after loading >> Elephant I get the following error : >> ELE-USER 13 > (open-store '(:bdb "/temp/db2/")) >> Error: The call (# 0) does >> not match definition (# >> DB-BDB::FLAGS DB-BDB::ERRNO). >> From what I see in the sources - there are 3 relevant definitions : >> 1. the BDB one : >> >> db_env_create >> >> ________________________________ >> >> #include >> >> int >> db_env_create(DB_ENV **dbenvp, u_int32_t flags); >> >> 2. then the libberkeley-db one : >> >> DB_ENV *db_env_cr(u_int32_t flags, int *errno) { >> ?DB_ENV *envp; >> ?*errno = db_env_create(&envp, flags); >> ?return envp; >> } >> >> 3. and finally the Lisp definitions : >> >> (def-function ("db_env_cr" %db-env-create) >> ? ?((flags :unsigned-int) >> ? ? (errno :int :out)) >> ?:returning :pointer-void) >> >> (defun db-env-create () >> ?"Create an environment handle." >> ?(multiple-value-bind (env errno) >> ? ? ?(%db-env-create 0) >> ? ?(declare (type fixnum errno)) >> ? ?(if (= errno 0) >> ? ? ? env >> ? ? ? (error 'db-error :errno errno)))) >> >> I have cffi_0.10.5 and uffi-1.6.2 (which are currently the newest >> versions of that libraries). >> >> The call (%db-env-create 0) in the db-env-create function looks of >> course weird for me, but if people use these lines of source on all >> other Lisp-implementations, obviously I miss something. I know the LW >> FFI, but I'm not really proficient in the CFFI/UFFI-conversion to see >> the missing parts, but if there is someone outside in the WWW who runs >> LWW & BDB and/or knows how to help, I would be very gratefull. >> >> Regards >> Plamen >> >> _______________________________________________ >> 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 sebyte at smolny.plus.com Mon Dec 7 13:36:51 2009 From: sebyte at smolny.plus.com (Sebastian Tennant) Date: Mon, 07 Dec 2009 13:36:51 +0000 Subject: [elephant-devel] Elephant in Production and the Elephant 1.0 Release References: Message-ID: <4oo2c3d8.fsf@vps203.linuxvps.org> Quoth Ian Eslick : > :: Appeal below for help on 1.0 :: > > There is plenty of opportunity for small efforts from volunteers (1-3 hour > chunks) that would greatly accelerate the release cycle. If you write to me > directly, I'd be willing to put together a 'punchlist' of small projects > along these lines that would help. If we get 5 or more people to volunteer > to do a few of these, I'll commit to the core work necessary to wrap up the > release (and hopefully Leslie will help too!) I'll help when I can but I'm afraid my contributions will be sporadic, and not exactly constructive. The best I can really do is to identify bugs in the manual. Here are a few such bugs I've identified already: (info "(elephant) Berkeley DB") "Elephant only works with version 4.5 of Berkeley DB." (info "(elephant) The Store Root") "...'class root' will be discussed later..." - the two-word phrase 'class root' never occurs again. (info "(elephant) Class Indices") "See src/elephant/classindex-utils.lisp" - doesn't exist "Variable *default-indexed-class-synch-policy*" - doesn't exist Hope this helps (a little). > On Dec 3, 2009, at 5:09 AM, Shaneal Manek wrote: >> >> I just wanted to quickly let everyone know that I'm using elephant in >> production on my start up (http://postabon.com). I'm a little confused as to how to post a Bon. I want to pinpoint a restaurant in Istanbul, called Lades but there's no 'Place Pin' tool and what's the point of providing the resaurant name and saying it's near 'Me' when all the info you have on my location is the latitude and longditude of my ISP's servers? In fact, I can't post my Bon it just says "you must select a location" but with the map hovering over the location of the restaurant there's no easy way of doing that. >> Thanks to everyone here for creating such a great piece of open source >> software. In particular, Ian Eslick and Leslie Polzer were very >> helpful answering my newbie questions and helping me get off the >> ground. But the whole elephant team has my eternal gratitude ;-) Seconded. Seb -- Emacs' AlsaPlayer - Music Without Jolts Lightweight, full-featured and mindful of your idyllic happiness. http://home.gna.org/eap From eslick at media.mit.edu Mon Dec 7 18:20:19 2009 From: eslick at media.mit.edu (Ian Eslick) Date: Mon, 7 Dec 2009 10:20:19 -0800 Subject: [elephant-devel] More work on BDB interrupt-proofing In-Reply-To: <01cb49adf67477b012f0450df8bff181.squirrel@mail.stardawn.org> References: <01cb49adf67477b012f0450df8bff181.squirrel@mail.stardawn.org> Message-ID: <58A92281-98DC-423D-AF03-3816FC236B75@media.mit.edu> When without-interrupts was put in Allegro (7.x) didn't have SMP support and it was a fast way of handling locking for high frequency synchronization (primarily the serializer). I haven't used Allegro in awhile so didn't revisit this. I guess that 9.0 is finally going to support SMP! Feel free to drop a patch for this! Ian On Nov 22, 2009, at 10:28 AM, Leslie P. Polzer wrote: > > Red Daly wrote: > >> Why do these sections require WITHOUT-INTERRUPTS instead of locking? >> WITHOUT-INTERRUPTS is deprecated in Allegro, and in lisps running on >> multiple cores, it seems to have no atomicity guarantees that are >> immediately relevant to me. >> >> Quoted below is the Allegro documentation. I'm not sure if >> WITHOUT-INTERRUPTS has the same semantics in other lisps: > > I don't know about Allegro but on SBCL for example locks and > without-interrupts are orthogonal. The latter is all about > asynchronous POSIX signals. > > 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 eslick at media.mit.edu Mon Dec 7 18:21:10 2009 From: eslick at media.mit.edu (Ian Eslick) Date: Mon, 7 Dec 2009 10:21:10 -0800 Subject: [elephant-devel] Problem with LWW 5.1.2, BDB-backend In-Reply-To: References: <21F2E2EF-A82E-400F-81AB-79CAAE8C6D25@media.mit.edu> Message-ID: Elliott said he was going to give this a shot. You might correspond with him directly. -Ian On Dec 7, 2009, at 12:09 AM, Plamen . wrote: > Hello Ian, > > thank you for the quick response! > > On Sun, Dec 6, 2009 at 5:44 PM, Ian Eslick wrote: >> Hey, quick answers: >> >> 1) In the online FAQ you'll notice that you have to ensure that you are using uffi and not the uffi compatibility package from cffi. > > Ok, had missed that... > >> 2) The prebuilt DLLs are not up to date (sorry!), they need to be made current against BDB 4.7 which Elephant 1.0 depends on. > > Ok, had no idea from the doc or source that 4.7 is the current target, > but that's even better. > >> 3) We have one or two lispworks users that I'm aware of, so it should work, but I can't rule out a lispworks specific problem, although I think #1 and #2 above explain what you're seeing. >> >> Are you a position to build the DLLs yourself? > > Haven't touched C for years now and never had the pleasure with cygwin > but now I'll try it :) > >> >> Ian >> >> On Dec 5, 2009, at 5:28 AM, Plamen . wrote: >> >>> Hello, >>> I need to use BDB for my current application and from what I see on >>> the net, elephant seems to be the most mature and functional solution. >>> After following the installation instructions (I use LispWorks 5.1.2 >>> for Windows - yes - I need that configuration at the moment, with >>> Berkeley DB 4.5.20, with prebuild DLLs (libberkeley-db.dll and >>> libmemutil.dll) in the elephant-root and from what I see a correct >>> my-config.sexp also in the elephant-root directory), after loading >>> Elephant I get the following error : >>> ELE-USER 13 > (open-store '(:bdb "/temp/db2/")) >>> Error: The call (# 0) does >>> not match definition (# >>> DB-BDB::FLAGS DB-BDB::ERRNO). >>> From what I see in the sources - there are 3 relevant definitions : >>> 1. the BDB one : >>> >>> db_env_create >>> >>> ________________________________ >>> >>> #include >>> >>> int >>> db_env_create(DB_ENV **dbenvp, u_int32_t flags); >>> >>> 2. then the libberkeley-db one : >>> >>> DB_ENV *db_env_cr(u_int32_t flags, int *errno) { >>> DB_ENV *envp; >>> *errno = db_env_create(&envp, flags); >>> return envp; >>> } >>> >>> 3. and finally the Lisp definitions : >>> >>> (def-function ("db_env_cr" %db-env-create) >>> ((flags :unsigned-int) >>> (errno :int :out)) >>> :returning :pointer-void) >>> >>> (defun db-env-create () >>> "Create an environment handle." >>> (multiple-value-bind (env errno) >>> (%db-env-create 0) >>> (declare (type fixnum errno)) >>> (if (= errno 0) >>> env >>> (error 'db-error :errno errno)))) >>> >>> I have cffi_0.10.5 and uffi-1.6.2 (which are currently the newest >>> versions of that libraries). >>> >>> The call (%db-env-create 0) in the db-env-create function looks of >>> course weird for me, but if people use these lines of source on all >>> other Lisp-implementations, obviously I miss something. I know the LW >>> FFI, but I'm not really proficient in the CFFI/UFFI-conversion to see >>> the missing parts, but if there is someone outside in the WWW who runs >>> LWW & BDB and/or knows how to help, I would be very gratefull. >>> >>> Regards >>> Plamen >>> >>> _______________________________________________ >>> 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 >> > > _______________________________________________ > elephant-devel site list > elephant-devel at common-lisp.net > http://common-lisp.net/mailman/listinfo/elephant-devel From elliottslaughter at gmail.com Mon Dec 7 18:34:52 2009 From: elliottslaughter at gmail.com (Elliott Slaughter) Date: Mon, 7 Dec 2009 10:34:52 -0800 Subject: [elephant-devel] Problem with LWW 5.1.2, BDB-backend In-Reply-To: References: <21F2E2EF-A82E-400F-81AB-79CAAE8C6D25@media.mit.edu> Message-ID: <42c0ab790912071034r29b0ad99i47d904bf07142ffe@mail.gmail.com> Here are the dlls I built for the newest version of Elephant with BDB 4.7.25. If they work for you, then Ian can put them on the project page. Hope this helps. On Mon, Dec 7, 2009 at 10:21 AM, Ian Eslick wrote: > Elliott said he was going to give this a shot. You might correspond with > him directly. -Ian > On Dec 7, 2009, at 12:09 AM, Plamen . wrote: > > > Hello Ian, > > > > thank you for the quick response! > > > > On Sun, Dec 6, 2009 at 5:44 PM, Ian Eslick wrote: > >> Hey, quick answers: > >> > >> 1) In the online FAQ you'll notice that you have to ensure that you are > using uffi and not the uffi compatibility package from cffi. > > > > Ok, had missed that... > > > >> 2) The prebuilt DLLs are not up to date (sorry!), they need to be made > current against BDB 4.7 which Elephant 1.0 depends on. > > > > Ok, had no idea from the doc or source that 4.7 is the current target, > > but that's even better. > > > >> 3) We have one or two lispworks users that I'm aware of, so it should > work, but I can't rule out a lispworks specific problem, although I think #1 > and #2 above explain what you're seeing. > >> > >> Are you a position to build the DLLs yourself? > > > > Haven't touched C for years now and never had the pleasure with cygwin > > but now I'll try it :) > > > >> > >> Ian > >> > >> On Dec 5, 2009, at 5:28 AM, Plamen . wrote: > >> > >>> Hello, > >>> I need to use BDB for my current application and from what I see on > >>> the net, elephant seems to be the most mature and functional solution. > >>> After following the installation instructions (I use LispWorks 5.1.2 > >>> for Windows - yes - I need that configuration at the moment, with > >>> Berkeley DB 4.5.20, with prebuild DLLs (libberkeley-db.dll and > >>> libmemutil.dll) in the elephant-root and from what I see a correct > >>> my-config.sexp also in the elephant-root directory), after loading > >>> Elephant I get the following error : > >>> ELE-USER 13 > (open-store '(:bdb "/temp/db2/")) > >>> Error: The call (# 0) does > >>> not match definition (# > >>> DB-BDB::FLAGS DB-BDB::ERRNO). > >>> From what I see in the sources - there are 3 relevant definitions : > >>> 1. the BDB one : > >>> > >>> db_env_create > >>> > >>> ________________________________ > >>> > >>> #include > >>> > >>> int > >>> db_env_create(DB_ENV **dbenvp, u_int32_t flags); > >>> > >>> 2. then the libberkeley-db one : > >>> > >>> DB_ENV *db_env_cr(u_int32_t flags, int *errno) { > >>> DB_ENV *envp; > >>> *errno = db_env_create(&envp, flags); > >>> return envp; > >>> } > >>> > >>> 3. and finally the Lisp definitions : > >>> > >>> (def-function ("db_env_cr" %db-env-create) > >>> ((flags :unsigned-int) > >>> (errno :int :out)) > >>> :returning :pointer-void) > >>> > >>> (defun db-env-create () > >>> "Create an environment handle." > >>> (multiple-value-bind (env errno) > >>> (%db-env-create 0) > >>> (declare (type fixnum errno)) > >>> (if (= errno 0) > >>> env > >>> (error 'db-error :errno errno)))) > >>> > >>> I have cffi_0.10.5 and uffi-1.6.2 (which are currently the newest > >>> versions of that libraries). > >>> > >>> The call (%db-env-create 0) in the db-env-create function looks of > >>> course weird for me, but if people use these lines of source on all > >>> other Lisp-implementations, obviously I miss something. I know the LW > >>> FFI, but I'm not really proficient in the CFFI/UFFI-conversion to see > >>> the missing parts, but if there is someone outside in the WWW who runs > >>> LWW & BDB and/or knows how to help, I would be very gratefull. > >>> > >>> Regards > >>> Plamen > >>> > >>> _______________________________________________ > >>> 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 > >> > > > > _______________________________________________ > > 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 > -- Elliott Slaughter "Don't worry about what anybody else is going to do. The best way to predict the future is to invent it." - Alan Kay -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: elephant-1.0-windows.7z Type: application/octet-stream Size: 9844 bytes Desc: not available URL: From plamen.usenet at gmail.com Mon Dec 7 21:46:25 2009 From: plamen.usenet at gmail.com (Plamen .) Date: Mon, 7 Dec 2009 22:46:25 +0100 Subject: [elephant-devel] Problem with LWW 5.1.2, BDB-backend In-Reply-To: <42c0ab790912071034r29b0ad99i47d904bf07142ffe@mail.gmail.com> References: <21F2E2EF-A82E-400F-81AB-79CAAE8C6D25@media.mit.edu> <42c0ab790912071034r29b0ad99i47d904bf07142ffe@mail.gmail.com> Message-ID: Hello Elliott & Jan, ty a lot for the DLLs - especially the libberkeley-db.dll saved me may be hours today looking in the gcc & dlltool docs... But - now it seems LWW can talk to the DLLs & DB, but: 1. in the OPEN-CONTROLLER (in the bdb-controller.lisp) I get some new errors now : - (db-env-set-max-locks env max-locks) gives error 22 - invalid argument.. - (db-env-set-max-transactions env max-transactions) - the same I didn't found them in the "Environment Configuration" of the "Environments" section of the 4.7.25 docs, so I tought may be they stayed in the Lisp code from previous BDB versions and commented them out. (Even if I oversee something I suppose BDB has it's defaults for that at least) 2. but when in the same method DB-ENV-OPEN gets called - I again get the error 22 : Invalid argument. >From what I see in the code - the invocation uses meaningfull arguments, putting some debug statements tells that at least on the Lisp side we have the right constant-values which correspond with the "db.h"-declarations. So - I'm a step further with your help, but still can't even open a database. I hope - there is a solution. Of course, I could try to make the binding using directly the LW FFI, but that would be sad private solution or unnesessery source fragmentation when there is UFFI/CFFI as a base. (Now I use BDB 4.7.25, the newest UFFI in front of CFFI and the DLLs I receved today) If there is a chance for help - I would be very happy. On Mon, Dec 7, 2009 at 7:34 PM, Elliott Slaughter wrote: > Here are the dlls I built for the newest version of Elephant with BDB > 4.7.25. If they work for you, then Ian can put them on the project page. > Hope this helps. > > On Mon, Dec 7, 2009 at 10:21 AM, Ian Eslick wrote: >> >> Elliott said he was going to give this a shot. You might correspond with >> him directly. ?-Ian >> On Dec 7, 2009, at 12:09 AM, Plamen . wrote: >> >> > Hello Ian, >> > >> > thank you for the quick response! >> > >> > On Sun, Dec 6, 2009 at 5:44 PM, Ian Eslick wrote: >> >> Hey, quick answers: >> >> >> >> 1) In the online FAQ you'll notice that you have to ensure that you are >> >> using uffi and not the uffi compatibility package from cffi. >> > >> > Ok, had missed that... >> > >> >> 2) The prebuilt DLLs are not up to date (sorry!), they need to be made >> >> current against BDB 4.7 which Elephant 1.0 depends on. >> > >> > Ok, had no idea from the doc or source that 4.7 is the current target, >> > but that's even better. >> > >> >> 3) We have one or two lispworks users that I'm aware of, so it should >> >> work, but I can't rule out a lispworks specific problem, although I think #1 >> >> and #2 above explain what you're seeing. >> >> >> >> Are you a position to build the DLLs yourself? >> > >> > Haven't touched C for years now and never had the pleasure with cygwin >> > but now I'll try it :) >> > >> >> >> >> Ian >> >> >> >> On Dec 5, 2009, at 5:28 AM, Plamen . wrote: >> >> >> >>> Hello, >> >>> I need to use BDB for my current application and from what I see on >> >>> the net, elephant seems to be the most mature and functional solution. >> >>> After following the installation instructions (I use LispWorks 5.1.2 >> >>> for Windows - yes - I need that configuration at the moment, with >> >>> Berkeley DB 4.5.20, with prebuild DLLs (libberkeley-db.dll and >> >>> libmemutil.dll) in the elephant-root and from what I see a correct >> >>> my-config.sexp also in the elephant-root directory), after loading >> >>> Elephant I get the following error : >> >>> ELE-USER 13 > (open-store '(:bdb "/temp/db2/")) >> >>> Error: The call (# 0) does >> >>> not match definition (# >> >>> DB-BDB::FLAGS DB-BDB::ERRNO). >> >>> From what I see in the sources - there are 3 relevant definitions : >> >>> 1. the BDB one : >> >>> >> >>> db_env_create >> >>> >> >>> ________________________________ >> >>> >> >>> #include >> >>> >> >>> int >> >>> db_env_create(DB_ENV **dbenvp, u_int32_t flags); >> >>> >> >>> 2. then the libberkeley-db one : >> >>> >> >>> DB_ENV *db_env_cr(u_int32_t flags, int *errno) { >> >>> ?DB_ENV *envp; >> >>> ?*errno = db_env_create(&envp, flags); >> >>> ?return envp; >> >>> } >> >>> >> >>> 3. and finally the Lisp definitions : >> >>> >> >>> (def-function ("db_env_cr" %db-env-create) >> >>> ? ?((flags :unsigned-int) >> >>> ? ? (errno :int :out)) >> >>> ?:returning :pointer-void) >> >>> >> >>> (defun db-env-create () >> >>> ?"Create an environment handle." >> >>> ?(multiple-value-bind (env errno) >> >>> ? ? ?(%db-env-create 0) >> >>> ? ?(declare (type fixnum errno)) >> >>> ? ?(if (= errno 0) >> >>> ? ? ? env >> >>> ? ? ? (error 'db-error :errno errno)))) >> >>> >> >>> I have cffi_0.10.5 and uffi-1.6.2 (which are currently the newest >> >>> versions of that libraries). >> >>> >> >>> The call (%db-env-create 0) in the db-env-create function looks of >> >>> course weird for me, but if people use these lines of source on all >> >>> other Lisp-implementations, obviously I miss something. I know the LW >> >>> FFI, but I'm not really proficient in the CFFI/UFFI-conversion to see >> >>> the missing parts, but if there is someone outside in the WWW who runs >> >>> LWW & BDB and/or knows how to help, I would be very gratefull. >> >>> >> >>> Regards >> >>> Plamen >> >>> >> >>> _______________________________________________ >> >>> 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 >> >> >> > >> > _______________________________________________ >> > 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 > > > > -- > Elliott Slaughter > > "Don't worry about what anybody else is going to do. The best way to predict > the future is to invent it." - Alan Kay > > _______________________________________________ > elephant-devel site list > elephant-devel at common-lisp.net > http://common-lisp.net/mailman/listinfo/elephant-devel > From elliottslaughter at gmail.com Mon Dec 7 22:05:11 2009 From: elliottslaughter at gmail.com (Elliott Slaughter) Date: Mon, 7 Dec 2009 14:05:11 -0800 Subject: [elephant-devel] Problem with LWW 5.1.2, BDB-backend In-Reply-To: References: <21F2E2EF-A82E-400F-81AB-79CAAE8C6D25@media.mit.edu> <42c0ab790912071034r29b0ad99i47d904bf07142ffe@mail.gmail.com> Message-ID: <42c0ab790912071405h1c216bfdn50f15c6b9ebdadab@mail.gmail.com> On Mon, Dec 7, 2009 at 1:46 PM, Plamen . wrote: > Hello Elliott & Jan, > > ty a lot for the DLLs - especially the libberkeley-db.dll saved me may > be hours today looking in the gcc & dlltool docs... > No problem :-) But - now it seems LWW can talk to the DLLs & DB, but: > > 1. in the OPEN-CONTROLLER (in the bdb-controller.lisp) I get some new > errors now : > - (db-env-set-max-locks env max-locks) gives error 22 - invalid > argument.. > - (db-env-set-max-transactions env max-transactions) - the same > Aha! This is the same error I'm getting in SBCL. I'll try debugging further tonight. >From what I see in the code - the invocation uses meaningfull > arguments, putting some debug statements tells that at least on the > Lisp side we have the right constant-values which correspond with the > "db.h"-declarations. > > So - I'm a step further with your help, but still can't even open a > database. I hope - there is a solution. Of course, I could try to make > the binding using directly the LW FFI, but that would be sad private > solution or unnesessery source fragmentation when there is UFFI/CFFI > as a base. > > (Now I use BDB 4.7.25, the newest UFFI in front of CFFI and the DLLs I > receved today) > > If there is a chance for help - I would be very happy. > > On Mon, Dec 7, 2009 at 7:34 PM, Elliott Slaughter > wrote: > > Here are the dlls I built for the newest version of Elephant with BDB > > 4.7.25. If they work for you, then Ian can put them on the project page. > > Hope this helps. > > > > On Mon, Dec 7, 2009 at 10:21 AM, Ian Eslick > wrote: > >> > >> Elliott said he was going to give this a shot. You might correspond with > >> him directly. -Ian > >> On Dec 7, 2009, at 12:09 AM, Plamen . wrote: > >> > >> > Hello Ian, > >> > > >> > thank you for the quick response! > >> > > >> > On Sun, Dec 6, 2009 at 5:44 PM, Ian Eslick > wrote: > >> >> Hey, quick answers: > >> >> > >> >> 1) In the online FAQ you'll notice that you have to ensure that you > are > >> >> using uffi and not the uffi compatibility package from cffi. > >> > > >> > Ok, had missed that... > >> > > >> >> 2) The prebuilt DLLs are not up to date (sorry!), they need to be > made > >> >> current against BDB 4.7 which Elephant 1.0 depends on. > >> > > >> > Ok, had no idea from the doc or source that 4.7 is the current target, > >> > but that's even better. > >> > > >> >> 3) We have one or two lispworks users that I'm aware of, so it should > >> >> work, but I can't rule out a lispworks specific problem, although I > think #1 > >> >> and #2 above explain what you're seeing. > >> >> > >> >> Are you a position to build the DLLs yourself? > >> > > >> > Haven't touched C for years now and never had the pleasure with cygwin > >> > but now I'll try it :) > >> > > >> >> > >> >> Ian > >> >> > >> >> On Dec 5, 2009, at 5:28 AM, Plamen . wrote: > >> >> > >> >>> Hello, > >> >>> I need to use BDB for my current application and from what I see on > >> >>> the net, elephant seems to be the most mature and functional > solution. > >> >>> After following the installation instructions (I use LispWorks 5.1.2 > >> >>> for Windows - yes - I need that configuration at the moment, with > >> >>> Berkeley DB 4.5.20, with prebuild DLLs (libberkeley-db.dll and > >> >>> libmemutil.dll) in the elephant-root and from what I see a correct > >> >>> my-config.sexp also in the elephant-root directory), after loading > >> >>> Elephant I get the following error : > >> >>> ELE-USER 13 > (open-store '(:bdb "/temp/db2/")) > >> >>> Error: The call (# 0) does > >> >>> not match definition (# > >> >>> DB-BDB::FLAGS DB-BDB::ERRNO). > >> >>> From what I see in the sources - there are 3 relevant definitions : > >> >>> 1. the BDB one : > >> >>> > >> >>> db_env_create > >> >>> > >> >>> ________________________________ > >> >>> > >> >>> #include > >> >>> > >> >>> int > >> >>> db_env_create(DB_ENV **dbenvp, u_int32_t flags); > >> >>> > >> >>> 2. then the libberkeley-db one : > >> >>> > >> >>> DB_ENV *db_env_cr(u_int32_t flags, int *errno) { > >> >>> DB_ENV *envp; > >> >>> *errno = db_env_create(&envp, flags); > >> >>> return envp; > >> >>> } > >> >>> > >> >>> 3. and finally the Lisp definitions : > >> >>> > >> >>> (def-function ("db_env_cr" %db-env-create) > >> >>> ((flags :unsigned-int) > >> >>> (errno :int :out)) > >> >>> :returning :pointer-void) > >> >>> > >> >>> (defun db-env-create () > >> >>> "Create an environment handle." > >> >>> (multiple-value-bind (env errno) > >> >>> (%db-env-create 0) > >> >>> (declare (type fixnum errno)) > >> >>> (if (= errno 0) > >> >>> env > >> >>> (error 'db-error :errno errno)))) > >> >>> > >> >>> I have cffi_0.10.5 and uffi-1.6.2 (which are currently the newest > >> >>> versions of that libraries). > >> >>> > >> >>> The call (%db-env-create 0) in the db-env-create function looks of > >> >>> course weird for me, but if people use these lines of source on all > >> >>> other Lisp-implementations, obviously I miss something. I know the > LW > >> >>> FFI, but I'm not really proficient in the CFFI/UFFI-conversion to > see > >> >>> the missing parts, but if there is someone outside in the WWW who > runs > >> >>> LWW & BDB and/or knows how to help, I would be very gratefull. > >> >>> > >> >>> Regards > >> >>> Plamen > >> >>> > >> >>> _______________________________________________ > >> >>> 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 > >> >> > >> > > >> > _______________________________________________ > >> > 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 > > > > > > > > -- > > Elliott Slaughter > > > > "Don't worry about what anybody else is going to do. The best way to > predict > > the future is to invent it." - Alan Kay > > > > _______________________________________________ > > 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 > -- Elliott Slaughter "Don't worry about what anybody else is going to do. The best way to predict the future is to invent it." - Alan Kay -------------- next part -------------- An HTML attachment was scrubbed... URL: From eslick at media.mit.edu Tue Dec 8 00:14:59 2009 From: eslick at media.mit.edu (Ian Eslick) Date: Mon, 7 Dec 2009 16:14:59 -0800 Subject: [elephant-devel] Problem with LWW 5.1.2, BDB-backend In-Reply-To: References: <21F2E2EF-A82E-400F-81AB-79CAAE8C6D25@media.mit.edu> <42c0ab790912071034r29b0ad99i47d904bf07142ffe@mail.gmail.com> Message-ID: <558B1CF0-765E-4A9E-919B-B1E14DB51082@media.mit.edu> The error 22 is almost always an issue with: 1) Mismatch between code, libberkeley-db, BDB DLL assumptions about BDB version Are you sure your code is using constants for BDB-4.7 (set in my-config.sexp) 2) CFFI/UFFI 3) Sometimes I've seen this be a 64-bit vs. 32-bit issue Your db-env-set-max-locks error seem to indicate an error in category #1. Are you certain that the code knows you're using BDB-4.7? Ian On Dec 7, 2009, at 1:46 PM, Plamen . wrote: > Hello Elliott & Jan, > > ty a lot for the DLLs - especially the libberkeley-db.dll saved me may > be hours today looking in the gcc & dlltool docs... > > But - now it seems LWW can talk to the DLLs & DB, but: > > 1. in the OPEN-CONTROLLER (in the bdb-controller.lisp) I get some new > errors now : > - (db-env-set-max-locks env max-locks) gives error 22 - invalid argument.. > - (db-env-set-max-transactions env max-transactions) - the same > I didn't found them in the "Environment Configuration" of the > "Environments" section of the 4.7.25 docs, so I tought may be they > stayed in the Lisp code from previous BDB versions and commented them > out. (Even if I oversee something I suppose BDB has it's defaults for > that at least) > 2. but when in the same method DB-ENV-OPEN gets called - I again get > the error 22 : Invalid argument. > > From what I see in the code - the invocation uses meaningfull > arguments, putting some debug statements tells that at least on the > Lisp side we have the right constant-values which correspond with the > "db.h"-declarations. > > So - I'm a step further with your help, but still can't even open a > database. I hope - there is a solution. Of course, I could try to make > the binding using directly the LW FFI, but that would be sad private > solution or unnesessery source fragmentation when there is UFFI/CFFI > as a base. > > (Now I use BDB 4.7.25, the newest UFFI in front of CFFI and the DLLs I > receved today) > > If there is a chance for help - I would be very happy. > > On Mon, Dec 7, 2009 at 7:34 PM, Elliott Slaughter > wrote: >> Here are the dlls I built for the newest version of Elephant with BDB >> 4.7.25. If they work for you, then Ian can put them on the project page. >> Hope this helps. >> >> On Mon, Dec 7, 2009 at 10:21 AM, Ian Eslick wrote: >>> >>> Elliott said he was going to give this a shot. You might correspond with >>> him directly. -Ian >>> On Dec 7, 2009, at 12:09 AM, Plamen . wrote: >>> >>>> Hello Ian, >>>> >>>> thank you for the quick response! >>>> >>>> On Sun, Dec 6, 2009 at 5:44 PM, Ian Eslick wrote: >>>>> Hey, quick answers: >>>>> >>>>> 1) In the online FAQ you'll notice that you have to ensure that you are >>>>> using uffi and not the uffi compatibility package from cffi. >>>> >>>> Ok, had missed that... >>>> >>>>> 2) The prebuilt DLLs are not up to date (sorry!), they need to be made >>>>> current against BDB 4.7 which Elephant 1.0 depends on. >>>> >>>> Ok, had no idea from the doc or source that 4.7 is the current target, >>>> but that's even better. >>>> >>>>> 3) We have one or two lispworks users that I'm aware of, so it should >>>>> work, but I can't rule out a lispworks specific problem, although I think #1 >>>>> and #2 above explain what you're seeing. >>>>> >>>>> Are you a position to build the DLLs yourself? >>>> >>>> Haven't touched C for years now and never had the pleasure with cygwin >>>> but now I'll try it :) >>>> >>>>> >>>>> Ian >>>>> >>>>> On Dec 5, 2009, at 5:28 AM, Plamen . wrote: >>>>> >>>>>> Hello, >>>>>> I need to use BDB for my current application and from what I see on >>>>>> the net, elephant seems to be the most mature and functional solution. >>>>>> After following the installation instructions (I use LispWorks 5.1.2 >>>>>> for Windows - yes - I need that configuration at the moment, with >>>>>> Berkeley DB 4.5.20, with prebuild DLLs (libberkeley-db.dll and >>>>>> libmemutil.dll) in the elephant-root and from what I see a correct >>>>>> my-config.sexp also in the elephant-root directory), after loading >>>>>> Elephant I get the following error : >>>>>> ELE-USER 13 > (open-store '(:bdb "/temp/db2/")) >>>>>> Error: The call (# 0) does >>>>>> not match definition (# >>>>>> DB-BDB::FLAGS DB-BDB::ERRNO). >>>>>> From what I see in the sources - there are 3 relevant definitions : >>>>>> 1. the BDB one : >>>>>> >>>>>> db_env_create >>>>>> >>>>>> ________________________________ >>>>>> >>>>>> #include >>>>>> >>>>>> int >>>>>> db_env_create(DB_ENV **dbenvp, u_int32_t flags); >>>>>> >>>>>> 2. then the libberkeley-db one : >>>>>> >>>>>> DB_ENV *db_env_cr(u_int32_t flags, int *errno) { >>>>>> DB_ENV *envp; >>>>>> *errno = db_env_create(&envp, flags); >>>>>> return envp; >>>>>> } >>>>>> >>>>>> 3. and finally the Lisp definitions : >>>>>> >>>>>> (def-function ("db_env_cr" %db-env-create) >>>>>> ((flags :unsigned-int) >>>>>> (errno :int :out)) >>>>>> :returning :pointer-void) >>>>>> >>>>>> (defun db-env-create () >>>>>> "Create an environment handle." >>>>>> (multiple-value-bind (env errno) >>>>>> (%db-env-create 0) >>>>>> (declare (type fixnum errno)) >>>>>> (if (= errno 0) >>>>>> env >>>>>> (error 'db-error :errno errno)))) >>>>>> >>>>>> I have cffi_0.10.5 and uffi-1.6.2 (which are currently the newest >>>>>> versions of that libraries). >>>>>> >>>>>> The call (%db-env-create 0) in the db-env-create function looks of >>>>>> course weird for me, but if people use these lines of source on all >>>>>> other Lisp-implementations, obviously I miss something. I know the LW >>>>>> FFI, but I'm not really proficient in the CFFI/UFFI-conversion to see >>>>>> the missing parts, but if there is someone outside in the WWW who runs >>>>>> LWW & BDB and/or knows how to help, I would be very gratefull. >>>>>> >>>>>> Regards >>>>>> Plamen >>>>>> >>>>>> _______________________________________________ >>>>>> 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 >>>>> >>>> >>>> _______________________________________________ >>>> 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 >> >> >> >> -- >> Elliott Slaughter >> >> "Don't worry about what anybody else is going to do. The best way to predict >> the future is to invent it." - Alan Kay >> >> _______________________________________________ >> 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 plamen.usenet at gmail.com Tue Dec 8 08:16:43 2009 From: plamen.usenet at gmail.com (Plamen .) Date: Tue, 8 Dec 2009 09:16:43 +0100 Subject: [elephant-devel] Problem with LWW 5.1.2, BDB-backend In-Reply-To: <558B1CF0-765E-4A9E-919B-B1E14DB51082@media.mit.edu> References: <21F2E2EF-A82E-400F-81AB-79CAAE8C6D25@media.mit.edu> <42c0ab790912071034r29b0ad99i47d904bf07142ffe@mail.gmail.com> <558B1CF0-765E-4A9E-919B-B1E14DB51082@media.mit.edu> Message-ID: Hi Elliott, Jan ok, I had a setup in which I have only BDB 4.7.25 on the laptop, no more CFFI and only the newest UFFI. The my-config.sexp states "4.7" as a version and I removed all the constants from previous BDB versions in the bberkeley-constants.lisp as well as all existing FASLs.I use Elliott's DLLs. Same effect - "Invalid argument" in all places described earlier. What I checked until now are the FLAGS-encodings - they are correct, the constants also for the 4.7 version. Which means that the problem is not a version or a 32/64-bit issue but something on the UFFI/DLL/BDB-chain.... Elliot, if you give me a script to compile the DLLs with GCC (I have the memutil one, but not the libberkeley-db.dll and following what is wirttten in the .ASD file doesn't produce for me the DLLs), I could start learning the GDB to try to see what happens on the C-side in the spare free time. Or I could try to compile the whole thing using VS, there at least I have some memories about the toolchain, but hope of course that you will be faster than me with the debugging :) Plamen On Tue, Dec 8, 2009 at 1:14 AM, Ian Eslick wrote: > The error 22 is almost always an issue with: > > 1) Mismatch between code, libberkeley-db, BDB DLL assumptions about BDB version > ? ? ? ?Are you sure your code is using constants for BDB-4.7 (set in my-config.sexp) > 2) CFFI/UFFI > 3) Sometimes I've seen this be a 64-bit vs. 32-bit issue > > Your db-env-set-max-locks error seem to indicate an error in category #1. ?Are you certain that the code knows you're using BDB-4.7? > > Ian > > > On Dec 7, 2009, at 1:46 PM, Plamen . wrote: > >> Hello Elliott & Jan, >> >> ty a lot for the DLLs - especially the libberkeley-db.dll saved me may >> be hours today looking in the gcc & dlltool docs... >> >> But - now it seems LWW can talk to the DLLs & DB, but: >> >> 1. in the OPEN-CONTROLLER (in the bdb-controller.lisp) I get some new >> errors now : >> ? ?- (db-env-set-max-locks env max-locks) gives error 22 - invalid argument.. >> ? ?- (db-env-set-max-transactions env max-transactions) - the same >> I didn't found them in the "Environment Configuration" of the >> "Environments" section of the 4.7.25 docs, so I tought may be they >> stayed in the Lisp code from previous BDB versions and commented them >> out. (Even if I oversee something I suppose BDB has it's defaults for >> that at least) >> 2. but when in the same method DB-ENV-OPEN gets called - I again get >> the error 22 : Invalid argument. >> >> From what I see in the code - the invocation uses meaningfull >> arguments, putting some debug statements tells that at least on the >> Lisp side we have the right constant-values which correspond with the >> "db.h"-declarations. >> >> So - I'm a step further with your help, but still can't even open a >> database. I hope - there is a solution. Of course, I could try to make >> the binding using directly the LW FFI, but that would be sad private >> solution or unnesessery source fragmentation when there is UFFI/CFFI >> as a base. >> >> (Now I use BDB 4.7.25, the newest UFFI in front of CFFI and the DLLs I >> receved today) >> >> If there is a chance for help - I would be very happy. >> >> On Mon, Dec 7, 2009 at 7:34 PM, Elliott Slaughter >> wrote: >>> Here are the dlls I built for the newest version of Elephant with BDB >>> 4.7.25. If they work for you, then Ian can put them on the project page. >>> Hope this helps. >>> >>> On Mon, Dec 7, 2009 at 10:21 AM, Ian Eslick wrote: >>>> >>>> Elliott said he was going to give this a shot. You might correspond with >>>> him directly. ?-Ian >>>> On Dec 7, 2009, at 12:09 AM, Plamen . wrote: >>>> >>>>> Hello Ian, >>>>> >>>>> thank you for the quick response! >>>>> >>>>> On Sun, Dec 6, 2009 at 5:44 PM, Ian Eslick wrote: >>>>>> Hey, quick answers: >>>>>> >>>>>> 1) In the online FAQ you'll notice that you have to ensure that you are >>>>>> using uffi and not the uffi compatibility package from cffi. >>>>> >>>>> Ok, had missed that... >>>>> >>>>>> 2) The prebuilt DLLs are not up to date (sorry!), they need to be made >>>>>> current against BDB 4.7 which Elephant 1.0 depends on. >>>>> >>>>> Ok, had no idea from the doc or source that 4.7 is the current target, >>>>> but that's even better. >>>>> >>>>>> 3) We have one or two lispworks users that I'm aware of, so it should >>>>>> work, but I can't rule out a lispworks specific problem, although I think #1 >>>>>> and #2 above explain what you're seeing. >>>>>> >>>>>> Are you a position to build the DLLs yourself? >>>>> >>>>> Haven't touched C for years now and never had the pleasure with cygwin >>>>> but now I'll try it :) >>>>> >>>>>> >>>>>> Ian >>>>>> >>>>>> On Dec 5, 2009, at 5:28 AM, Plamen . wrote: >>>>>> >>>>>>> Hello, >>>>>>> I need to use BDB for my current application and from what I see on >>>>>>> the net, elephant seems to be the most mature and functional solution. >>>>>>> After following the installation instructions (I use LispWorks 5.1.2 >>>>>>> for Windows - yes - I need that configuration at the moment, with >>>>>>> Berkeley DB 4.5.20, with prebuild DLLs (libberkeley-db.dll and >>>>>>> libmemutil.dll) in the elephant-root and from what I see a correct >>>>>>> my-config.sexp also in the elephant-root directory), after loading >>>>>>> Elephant I get the following error : >>>>>>> ELE-USER 13 > (open-store '(:bdb "/temp/db2/")) >>>>>>> Error: The call (# 0) does >>>>>>> not match definition (# >>>>>>> DB-BDB::FLAGS DB-BDB::ERRNO). >>>>>>> From what I see in the sources - there are 3 relevant definitions : >>>>>>> 1. the BDB one : >>>>>>> >>>>>>> db_env_create >>>>>>> >>>>>>> ________________________________ >>>>>>> >>>>>>> #include >>>>>>> >>>>>>> int >>>>>>> db_env_create(DB_ENV **dbenvp, u_int32_t flags); >>>>>>> >>>>>>> 2. then the libberkeley-db one : >>>>>>> >>>>>>> DB_ENV *db_env_cr(u_int32_t flags, int *errno) { >>>>>>> ?DB_ENV *envp; >>>>>>> ?*errno = db_env_create(&envp, flags); >>>>>>> ?return envp; >>>>>>> } >>>>>>> >>>>>>> 3. and finally the Lisp definitions : >>>>>>> >>>>>>> (def-function ("db_env_cr" %db-env-create) >>>>>>> ? ?((flags :unsigned-int) >>>>>>> ? ? (errno :int :out)) >>>>>>> ?:returning :pointer-void) >>>>>>> >>>>>>> (defun db-env-create () >>>>>>> ?"Create an environment handle." >>>>>>> ?(multiple-value-bind (env errno) >>>>>>> ? ? ?(%db-env-create 0) >>>>>>> ? ?(declare (type fixnum errno)) >>>>>>> ? ?(if (= errno 0) >>>>>>> ? ? ? env >>>>>>> ? ? ? (error 'db-error :errno errno)))) >>>>>>> >>>>>>> I have cffi_0.10.5 and uffi-1.6.2 (which are currently the newest >>>>>>> versions of that libraries). >>>>>>> >>>>>>> The call (%db-env-create 0) in the db-env-create function looks of >>>>>>> course weird for me, but if people use these lines of source on all >>>>>>> other Lisp-implementations, obviously I miss something. I know the LW >>>>>>> FFI, but I'm not really proficient in the CFFI/UFFI-conversion to see >>>>>>> the missing parts, but if there is someone outside in the WWW who runs >>>>>>> LWW & BDB and/or knows how to help, I would be very gratefull. >>>>>>> >>>>>>> Regards >>>>>>> Plamen >>>>>>> >>>>>>> _______________________________________________ >>>>>>> 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 >>>>>> >>>>> >>>>> _______________________________________________ >>>>> 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 >>> >>> >>> >>> -- >>> Elliott Slaughter >>> >>> "Don't worry about what anybody else is going to do. The best way to predict >>> the future is to invent it." - Alan Kay >>> >>> _______________________________________________ >>> 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 > > > _______________________________________________ > elephant-devel site list > elephant-devel at common-lisp.net > http://common-lisp.net/mailman/listinfo/elephant-devel > From elliottslaughter at gmail.com Tue Dec 8 20:17:16 2009 From: elliottslaughter at gmail.com (Elliott Slaughter) Date: Tue, 8 Dec 2009 12:17:16 -0800 Subject: [elephant-devel] Problem with LWW 5.1.2, BDB-backend In-Reply-To: References: <21F2E2EF-A82E-400F-81AB-79CAAE8C6D25@media.mit.edu> <42c0ab790912071034r29b0ad99i47d904bf07142ffe@mail.gmail.com> <558B1CF0-765E-4A9E-919B-B1E14DB51082@media.mit.edu> Message-ID: <42c0ab790912081217l3e1564e7j46a23de8606e8348@mail.gmail.com> On Tue, Dec 8, 2009 at 12:16 AM, Plamen . wrote: > Elliot, if you give me a script to compile the DLLs with GCC (I have > the memutil one, but not the libberkeley-db.dll and following what is > wirttten in the .ASD file doesn't produce for me the DLLs), I could > start learning the GDB to try to see what happens on the C-side in the > spare free time. Or I could try to compile the whole thing using VS, > there at least I have some memories about the toolchain, but hope of > course that you will be faster than me with the debugging :) > If you set prebuilt-libraries to nil in my-config.sexp, then Lisp should theoretically build the dlls for you. In case that doesn't work for you, here are the commands I used. (I've got elephant in C:\Bin\asdf\elephant-1.0 and BDB in C:\Program Files (x86)\Oracle\Berkeley DB 4.7.25 ) $ cd "c:\\Bin\\asdf\\elephant-1.0\\src\\db-bdb\\" $ gcc -L'/cygdrive/C/Program Files (x86)/Oracle/Berkeley DB 4.7.25/bin/' -I'/cygdrive/C/Program Files (x86)/Oracle/Berkeley DB 4.7.25/include/' -mno-cygwin -mwindows -Wall -c -std=c99 "c:\Bin\asdf\elephant-1.0\src\db-bdb\libberkeley-db.c" $ dlltool -z "c:\Bin\asdf\elephant-1.0\src\db-bdb\libberkeley-db.def" --export-all-symbols -e exports.o -l "c:\Bin\asdf\elephant-1.0\src\db-bdb\libberkeley-db.lib" "c:\Bin\asdf\elephant-1.0\src\db-bdb\libberkeley-db.o" $ gcc -L'/cygdrive/C/Program Files (x86)/Oracle/Berkeley DB 4.7.25/bin/' -I'/cygdrive/C/Program Files (x86)/Oracle/Berkeley DB 4.7.25/include/' -ldb47 -shared -mno-cygwin -mwindows -Wall "c:\Bin\asdf\elephant-1.0\src\db-bdb\libberkeley-db.o" exports.o -o "c:\Bin\asdf\elephant-1.0\src\db-bdb\libberkeley-db.dll" There is one strange thing I had to do to get this to compile: I had to comment out the typedef for ssize_t in db.h. (This is something I remember having to do previously, when elephant was working for me.) With that commented out, I got the following warnings: c:\Bin\asdf\elephant-1.0\src\db-bdb\libberkeley-db.c: In function `lisp_compare2': c:\Bin\asdf\elephant-1.0\src\db-bdb\libberkeley-db.c:1061: warning: unused variable `i' c:\Bin\asdf\elephant-1.0\src\db-bdb\libberkeley-db.c: In function `lisp_compare_key2': c:\Bin\asdf\elephant-1.0\src\db-bdb\libberkeley-db.c:1155: warning: unused variable `i' c:\Bin\asdf\elephant-1.0\src\db-bdb\libberkeley-db.c: In function `case_cmp': c:\Bin\asdf\elephant-1.0\src\db-bdb\libberkeley-db.c:1314: warning: implicit declaration of function `_strnicmp' Don't know if either of those are significant or not, but I thought I'd mention them. Plamen > > On Tue, Dec 8, 2009 at 1:14 AM, Ian Eslick wrote: > > The error 22 is almost always an issue with: > > > > 1) Mismatch between code, libberkeley-db, BDB DLL assumptions about BDB > version > > Are you sure your code is using constants for BDB-4.7 (set in > my-config.sexp) > > 2) CFFI/UFFI > > 3) Sometimes I've seen this be a 64-bit vs. 32-bit issue > > > > Your db-env-set-max-locks error seem to indicate an error in category #1. > Are you certain that the code knows you're using BDB-4.7? > > > > Ian > > > > > > On Dec 7, 2009, at 1:46 PM, Plamen . wrote: > > > >> Hello Elliott & Jan, > >> > >> ty a lot for the DLLs - especially the libberkeley-db.dll saved me may > >> be hours today looking in the gcc & dlltool docs... > >> > >> But - now it seems LWW can talk to the DLLs & DB, but: > >> > >> 1. in the OPEN-CONTROLLER (in the bdb-controller.lisp) I get some new > >> errors now : > >> - (db-env-set-max-locks env max-locks) gives error 22 - invalid > argument.. > >> - (db-env-set-max-transactions env max-transactions) - the same > >> I didn't found them in the "Environment Configuration" of the > >> "Environments" section of the 4.7.25 docs, so I tought may be they > >> stayed in the Lisp code from previous BDB versions and commented them > >> out. (Even if I oversee something I suppose BDB has it's defaults for > >> that at least) > >> 2. but when in the same method DB-ENV-OPEN gets called - I again get > >> the error 22 : Invalid argument. > >> > >> From what I see in the code - the invocation uses meaningfull > >> arguments, putting some debug statements tells that at least on the > >> Lisp side we have the right constant-values which correspond with the > >> "db.h"-declarations. > >> > >> So - I'm a step further with your help, but still can't even open a > >> database. I hope - there is a solution. Of course, I could try to make > >> the binding using directly the LW FFI, but that would be sad private > >> solution or unnesessery source fragmentation when there is UFFI/CFFI > >> as a base. > >> > >> (Now I use BDB 4.7.25, the newest UFFI in front of CFFI and the DLLs I > >> receved today) > >> > >> If there is a chance for help - I would be very happy. > >> > >> On Mon, Dec 7, 2009 at 7:34 PM, Elliott Slaughter > >> wrote: > >>> Here are the dlls I built for the newest version of Elephant with BDB > >>> 4.7.25. If they work for you, then Ian can put them on the project > page. > >>> Hope this helps. > >>> > >>> On Mon, Dec 7, 2009 at 10:21 AM, Ian Eslick > wrote: > >>>> > >>>> Elliott said he was going to give this a shot. You might correspond > with > >>>> him directly. -Ian > >>>> On Dec 7, 2009, at 12:09 AM, Plamen . wrote: > >>>> > >>>>> Hello Ian, > >>>>> > >>>>> thank you for the quick response! > >>>>> > >>>>> On Sun, Dec 6, 2009 at 5:44 PM, Ian Eslick > wrote: > >>>>>> Hey, quick answers: > >>>>>> > >>>>>> 1) In the online FAQ you'll notice that you have to ensure that you > are > >>>>>> using uffi and not the uffi compatibility package from cffi. > >>>>> > >>>>> Ok, had missed that... > >>>>> > >>>>>> 2) The prebuilt DLLs are not up to date (sorry!), they need to be > made > >>>>>> current against BDB 4.7 which Elephant 1.0 depends on. > >>>>> > >>>>> Ok, had no idea from the doc or source that 4.7 is the current > target, > >>>>> but that's even better. > >>>>> > >>>>>> 3) We have one or two lispworks users that I'm aware of, so it > should > >>>>>> work, but I can't rule out a lispworks specific problem, although I > think #1 > >>>>>> and #2 above explain what you're seeing. > >>>>>> > >>>>>> Are you a position to build the DLLs yourself? > >>>>> > >>>>> Haven't touched C for years now and never had the pleasure with > cygwin > >>>>> but now I'll try it :) > >>>>> > >>>>>> > >>>>>> Ian > >>>>>> > >>>>>> On Dec 5, 2009, at 5:28 AM, Plamen . wrote: > >>>>>> > >>>>>>> Hello, > >>>>>>> I need to use BDB for my current application and from what I see on > >>>>>>> the net, elephant seems to be the most mature and functional > solution. > >>>>>>> After following the installation instructions (I use LispWorks > 5.1.2 > >>>>>>> for Windows - yes - I need that configuration at the moment, with > >>>>>>> Berkeley DB 4.5.20, with prebuild DLLs (libberkeley-db.dll and > >>>>>>> libmemutil.dll) in the elephant-root and from what I see a correct > >>>>>>> my-config.sexp also in the elephant-root directory), after loading > >>>>>>> Elephant I get the following error : > >>>>>>> ELE-USER 13 > (open-store '(:bdb "/temp/db2/")) > >>>>>>> Error: The call (# 0) > does > >>>>>>> not match definition (# > >>>>>>> DB-BDB::FLAGS DB-BDB::ERRNO). > >>>>>>> From what I see in the sources - there are 3 relevant definitions : > >>>>>>> 1. the BDB one : > >>>>>>> > >>>>>>> db_env_create > >>>>>>> > >>>>>>> ________________________________ > >>>>>>> > >>>>>>> #include > >>>>>>> > >>>>>>> int > >>>>>>> db_env_create(DB_ENV **dbenvp, u_int32_t flags); > >>>>>>> > >>>>>>> 2. then the libberkeley-db one : > >>>>>>> > >>>>>>> DB_ENV *db_env_cr(u_int32_t flags, int *errno) { > >>>>>>> DB_ENV *envp; > >>>>>>> *errno = db_env_create(&envp, flags); > >>>>>>> return envp; > >>>>>>> } > >>>>>>> > >>>>>>> 3. and finally the Lisp definitions : > >>>>>>> > >>>>>>> (def-function ("db_env_cr" %db-env-create) > >>>>>>> ((flags :unsigned-int) > >>>>>>> (errno :int :out)) > >>>>>>> :returning :pointer-void) > >>>>>>> > >>>>>>> (defun db-env-create () > >>>>>>> "Create an environment handle." > >>>>>>> (multiple-value-bind (env errno) > >>>>>>> (%db-env-create 0) > >>>>>>> (declare (type fixnum errno)) > >>>>>>> (if (= errno 0) > >>>>>>> env > >>>>>>> (error 'db-error :errno errno)))) > >>>>>>> > >>>>>>> I have cffi_0.10.5 and uffi-1.6.2 (which are currently the newest > >>>>>>> versions of that libraries). > >>>>>>> > >>>>>>> The call (%db-env-create 0) in the db-env-create function looks of > >>>>>>> course weird for me, but if people use these lines of source on all > >>>>>>> other Lisp-implementations, obviously I miss something. I know the > LW > >>>>>>> FFI, but I'm not really proficient in the CFFI/UFFI-conversion to > see > >>>>>>> the missing parts, but if there is someone outside in the WWW who > runs > >>>>>>> LWW & BDB and/or knows how to help, I would be very gratefull. > >>>>>>> > >>>>>>> Regards > >>>>>>> Plamen > >>>>>>> > >>>>>>> _______________________________________________ > >>>>>>> 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 > >>>>>> > >>>>> > >>>>> _______________________________________________ > >>>>> 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 > >>> > >>> > >>> > >>> -- > >>> Elliott Slaughter > >>> > >>> "Don't worry about what anybody else is going to do. The best way to > predict > >>> the future is to invent it." - Alan Kay > >>> > >>> _______________________________________________ > >>> 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 > > > > > > _______________________________________________ > > 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 > -- Elliott Slaughter "Don't worry about what anybody else is going to do. The best way to predict the future is to invent it." - Alan Kay -------------- next part -------------- An HTML attachment was scrubbed... URL: From eslick at media.mit.edu Tue Dec 8 20:19:54 2009 From: eslick at media.mit.edu (Ian Eslick) Date: Tue, 8 Dec 2009 12:19:54 -0800 Subject: [elephant-devel] Problem with LWW 5.1.2, BDB-backend In-Reply-To: <42c0ab790912081217l3e1564e7j46a23de8606e8348@mail.gmail.com> References: <21F2E2EF-A82E-400F-81AB-79CAAE8C6D25@media.mit.edu> <42c0ab790912071034r29b0ad99i47d904bf07142ffe@mail.gmail.com> <558B1CF0-765E-4A9E-919B-B1E14DB51082@media.mit.edu> <42c0ab790912081217l3e1564e7j46a23de8606e8348@mail.gmail.com> Message-ID: <732DB9FF-D58B-49EF-8A49-5D54D6CBCD17@media.mit.edu> FYI - those warnings are not significant. Elliott - these DLLs work on your system w/ Lispworks? Is everything working for you? I just want to make sure we have a baseline. Thanks, Ian On Dec 8, 2009, at 12:17 PM, Elliott Slaughter wrote: > On Tue, Dec 8, 2009 at 12:16 AM, Plamen . wrote: > Elliot, if you give me a script to compile the DLLs with GCC (I have > the memutil one, but not the libberkeley-db.dll and following what is > wirttten in the .ASD file doesn't produce for me the DLLs), I could > start learning the GDB to try to see what happens on the C-side in the > spare free time. Or I could try to compile the whole thing using VS, > there at least I have some memories about the toolchain, but hope of > course that you will be faster than me with the debugging :) > > If you set prebuilt-libraries to nil in my-config.sexp, then Lisp should theoretically build the dlls for you. In case that doesn't work for you, here are the commands I used. (I've got elephant in C:\Bin\asdf\elephant-1.0 and BDB in C:\Program Files (x86)\Oracle\Berkeley DB 4.7.25 ) > > $ cd "c:\\Bin\\asdf\\elephant-1.0\\src\\db-bdb\\" > $ gcc -L'/cygdrive/C/Program Files (x86)/Oracle/Berkeley DB 4.7.25/bin/' -I'/cygdrive/C/Program Files (x86)/Oracle/Berkeley DB 4.7.25/include/' -mno-cygwin -mwindows -Wall -c -std=c99 "c:\Bin\asdf\elephant-1.0\src\db-bdb\libberkeley-db.c" > $ dlltool -z "c:\Bin\asdf\elephant-1.0\src\db-bdb\libberkeley-db.def" --export-all-symbols -e exports.o -l "c:\Bin\asdf\elephant-1.0\src\db-bdb\libberkeley-db.lib" "c:\Bin\asdf\elephant-1.0\src\db-bdb\libberkeley-db.o" > $ gcc -L'/cygdrive/C/Program Files (x86)/Oracle/Berkeley DB 4.7.25/bin/' -I'/cygdrive/C/Program Files (x86)/Oracle/Berkeley DB 4.7.25/include/' -ldb47 -shared -mno-cygwin -mwindows -Wall "c:\Bin\asdf\elephant-1.0\src\db-bdb\libberkeley-db.o" exports.o -o "c:\Bin\asdf\elephant-1.0\src\db-bdb\libberkeley-db.dll" > > There is one strange thing I had to do to get this to compile: I had to comment out the typedef for ssize_t in db.h. (This is something I remember having to do previously, when elephant was working for me.) > > With that commented out, I got the following warnings: > > c:\Bin\asdf\elephant-1.0\src\db-bdb\libberkeley-db.c: In function `lisp_compare2': > c:\Bin\asdf\elephant-1.0\src\db-bdb\libberkeley-db.c:1061: warning: unused variable `i' > c:\Bin\asdf\elephant-1.0\src\db-bdb\libberkeley-db.c: In function `lisp_compare_key2': > c:\Bin\asdf\elephant-1.0\src\db-bdb\libberkeley-db.c:1155: warning: unused variable `i' > c:\Bin\asdf\elephant-1.0\src\db-bdb\libberkeley-db.c: In function `case_cmp': > c:\Bin\asdf\elephant-1.0\src\db-bdb\libberkeley-db.c:1314: warning: implicit declaration of function `_strnicmp' > > Don't know if either of those are significant or not, but I thought I'd mention them. > > Plamen > > On Tue, Dec 8, 2009 at 1:14 AM, Ian Eslick wrote: > > The error 22 is almost always an issue with: > > > > 1) Mismatch between code, libberkeley-db, BDB DLL assumptions about BDB version > > Are you sure your code is using constants for BDB-4.7 (set in my-config.sexp) > > 2) CFFI/UFFI > > 3) Sometimes I've seen this be a 64-bit vs. 32-bit issue > > > > Your db-env-set-max-locks error seem to indicate an error in category #1. Are you certain that the code knows you're using BDB-4.7? > > > > Ian > > > > > > On Dec 7, 2009, at 1:46 PM, Plamen . wrote: > > > >> Hello Elliott & Jan, > >> > >> ty a lot for the DLLs - especially the libberkeley-db.dll saved me may > >> be hours today looking in the gcc & dlltool docs... > >> > >> But - now it seems LWW can talk to the DLLs & DB, but: > >> > >> 1. in the OPEN-CONTROLLER (in the bdb-controller.lisp) I get some new > >> errors now : > >> - (db-env-set-max-locks env max-locks) gives error 22 - invalid argument.. > >> - (db-env-set-max-transactions env max-transactions) - the same > >> I didn't found them in the "Environment Configuration" of the > >> "Environments" section of the 4.7.25 docs, so I tought may be they > >> stayed in the Lisp code from previous BDB versions and commented them > >> out. (Even if I oversee something I suppose BDB has it's defaults for > >> that at least) > >> 2. but when in the same method DB-ENV-OPEN gets called - I again get > >> the error 22 : Invalid argument. > >> > >> From what I see in the code - the invocation uses meaningfull > >> arguments, putting some debug statements tells that at least on the > >> Lisp side we have the right constant-values which correspond with the > >> "db.h"-declarations. > >> > >> So - I'm a step further with your help, but still can't even open a > >> database. I hope - there is a solution. Of course, I could try to make > >> the binding using directly the LW FFI, but that would be sad private > >> solution or unnesessery source fragmentation when there is UFFI/CFFI > >> as a base. > >> > >> (Now I use BDB 4.7.25, the newest UFFI in front of CFFI and the DLLs I > >> receved today) > >> > >> If there is a chance for help - I would be very happy. > >> > >> On Mon, Dec 7, 2009 at 7:34 PM, Elliott Slaughter > >> wrote: > >>> Here are the dlls I built for the newest version of Elephant with BDB > >>> 4.7.25. If they work for you, then Ian can put them on the project page. > >>> Hope this helps. > >>> > >>> On Mon, Dec 7, 2009 at 10:21 AM, Ian Eslick wrote: > >>>> > >>>> Elliott said he was going to give this a shot. You might correspond with > >>>> him directly. -Ian > >>>> On Dec 7, 2009, at 12:09 AM, Plamen . wrote: > >>>> > >>>>> Hello Ian, > >>>>> > >>>>> thank you for the quick response! > >>>>> > >>>>> On Sun, Dec 6, 2009 at 5:44 PM, Ian Eslick wrote: > >>>>>> Hey, quick answers: > >>>>>> > >>>>>> 1) In the online FAQ you'll notice that you have to ensure that you are > >>>>>> using uffi and not the uffi compatibility package from cffi. > >>>>> > >>>>> Ok, had missed that... > >>>>> > >>>>>> 2) The prebuilt DLLs are not up to date (sorry!), they need to be made > >>>>>> current against BDB 4.7 which Elephant 1.0 depends on. > >>>>> > >>>>> Ok, had no idea from the doc or source that 4.7 is the current target, > >>>>> but that's even better. > >>>>> > >>>>>> 3) We have one or two lispworks users that I'm aware of, so it should > >>>>>> work, but I can't rule out a lispworks specific problem, although I think #1 > >>>>>> and #2 above explain what you're seeing. > >>>>>> > >>>>>> Are you a position to build the DLLs yourself? > >>>>> > >>>>> Haven't touched C for years now and never had the pleasure with cygwin > >>>>> but now I'll try it :) > >>>>> > >>>>>> > >>>>>> Ian > >>>>>> > >>>>>> On Dec 5, 2009, at 5:28 AM, Plamen . wrote: > >>>>>> > >>>>>>> Hello, > >>>>>>> I need to use BDB for my current application and from what I see on > >>>>>>> the net, elephant seems to be the most mature and functional solution. > >>>>>>> After following the installation instructions (I use LispWorks 5.1.2 > >>>>>>> for Windows - yes - I need that configuration at the moment, with > >>>>>>> Berkeley DB 4.5.20, with prebuild DLLs (libberkeley-db.dll and > >>>>>>> libmemutil.dll) in the elephant-root and from what I see a correct > >>>>>>> my-config.sexp also in the elephant-root directory), after loading > >>>>>>> Elephant I get the following error : > >>>>>>> ELE-USER 13 > (open-store '(:bdb "/temp/db2/")) > >>>>>>> Error: The call (# 0) does > >>>>>>> not match definition (# > >>>>>>> DB-BDB::FLAGS DB-BDB::ERRNO). > >>>>>>> From what I see in the sources - there are 3 relevant definitions : > >>>>>>> 1. the BDB one : > >>>>>>> > >>>>>>> db_env_create > >>>>>>> > >>>>>>> ________________________________ > >>>>>>> > >>>>>>> #include > >>>>>>> > >>>>>>> int > >>>>>>> db_env_create(DB_ENV **dbenvp, u_int32_t flags); > >>>>>>> > >>>>>>> 2. then the libberkeley-db one : > >>>>>>> > >>>>>>> DB_ENV *db_env_cr(u_int32_t flags, int *errno) { > >>>>>>> DB_ENV *envp; > >>>>>>> *errno = db_env_create(&envp, flags); > >>>>>>> return envp; > >>>>>>> } > >>>>>>> > >>>>>>> 3. and finally the Lisp definitions : > >>>>>>> > >>>>>>> (def-function ("db_env_cr" %db-env-create) > >>>>>>> ((flags :unsigned-int) > >>>>>>> (errno :int :out)) > >>>>>>> :returning :pointer-void) > >>>>>>> > >>>>>>> (defun db-env-create () > >>>>>>> "Create an environment handle." > >>>>>>> (multiple-value-bind (env errno) > >>>>>>> (%db-env-create 0) > >>>>>>> (declare (type fixnum errno)) > >>>>>>> (if (= errno 0) > >>>>>>> env > >>>>>>> (error 'db-error :errno errno)))) > >>>>>>> > >>>>>>> I have cffi_0.10.5 and uffi-1.6.2 (which are currently the newest > >>>>>>> versions of that libraries). > >>>>>>> > >>>>>>> The call (%db-env-create 0) in the db-env-create function looks of > >>>>>>> course weird for me, but if people use these lines of source on all > >>>>>>> other Lisp-implementations, obviously I miss something. I know the LW > >>>>>>> FFI, but I'm not really proficient in the CFFI/UFFI-conversion to see > >>>>>>> the missing parts, but if there is someone outside in the WWW who runs > >>>>>>> LWW & BDB and/or knows how to help, I would be very gratefull. > >>>>>>> > >>>>>>> Regards > >>>>>>> Plamen > >>>>>>> > >>>>>>> _______________________________________________ > >>>>>>> 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 > >>>>>> > >>>>> > >>>>> _______________________________________________ > >>>>> 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 > >>> > >>> > >>> > >>> -- > >>> Elliott Slaughter > >>> > >>> "Don't worry about what anybody else is going to do. The best way to predict > >>> the future is to invent it." - Alan Kay > >>> > >>> _______________________________________________ > >>> 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 > > > > > > _______________________________________________ > > 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 > > > > -- > Elliott Slaughter > > "Don't worry about what anybody else is going to do. The best way to predict the future is to invent it." - Alan Kay > _______________________________________________ > elephant-devel site list > elephant-devel at common-lisp.net > http://common-lisp.net/mailman/listinfo/elephant-devel -------------- next part -------------- An HTML attachment was scrubbed... URL: From elliottslaughter at gmail.com Tue Dec 8 21:14:18 2009 From: elliottslaughter at gmail.com (Elliott Slaughter) Date: Tue, 8 Dec 2009 13:14:18 -0800 Subject: [elephant-devel] Problem with LWW 5.1.2, BDB-backend In-Reply-To: <732DB9FF-D58B-49EF-8A49-5D54D6CBCD17@media.mit.edu> References: <21F2E2EF-A82E-400F-81AB-79CAAE8C6D25@media.mit.edu> <42c0ab790912071034r29b0ad99i47d904bf07142ffe@mail.gmail.com> <558B1CF0-765E-4A9E-919B-B1E14DB51082@media.mit.edu> <42c0ab790912081217l3e1564e7j46a23de8606e8348@mail.gmail.com> <732DB9FF-D58B-49EF-8A49-5D54D6CBCD17@media.mit.edu> Message-ID: <42c0ab790912081314x65cd38a9nbce2d11d472ab1ae@mail.gmail.com> On Tue, Dec 8, 2009 at 12:19 PM, Ian Eslick wrote: > Elliott - these DLLs work on your system w/ Lispworks? Is everything > working for you? I just want to make sure we have a baseline. > I went back to my Windows XP build, which I know worked once upon a time, and updated to the newest Elephant. With BDB 4.5 and 4.7 installed side-by-side, I configured Elephant to use 4.5: the build worked fine. I reconfigured for 4.7, and the build broke with error 22. Back to 4.5: build works fine. Back again to 4.7: still broken. Has Elephant ever been tested against BDB 4.7 on Windows? At any rate, I can supply dlls which I know work for BDB 4.5 (attached). They work with the newest version of Elephant. By the way, line 65 of ele-bdb.asd is hard coded to "-ldb45". That probably needs to change. (But it doesn't solve our bug; I already fixed it local and it didn't help.) Hope that helps? -- Elliott Slaughter "Don't worry about what anybody else is going to do. The best way to predict the future is to invent it." - Alan Kay -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: elephant-1.0-windows-bdb45.7z Type: application/octet-stream Size: 8637 bytes Desc: not available URL: From eslick at media.mit.edu Tue Dec 8 21:35:39 2009 From: eslick at media.mit.edu (Ian Eslick) Date: Tue, 8 Dec 2009 13:35:39 -0800 Subject: [elephant-devel] Problem with LWW 5.1.2, BDB-backend In-Reply-To: <42c0ab790912081314x65cd38a9nbce2d11d472ab1ae@mail.gmail.com> References: <21F2E2EF-A82E-400F-81AB-79CAAE8C6D25@media.mit.edu> <42c0ab790912071034r29b0ad99i47d904bf07142ffe@mail.gmail.com> <558B1CF0-765E-4A9E-919B-B1E14DB51082@media.mit.edu> <42c0ab790912081217l3e1564e7j46a23de8606e8348@mail.gmail.com> <732DB9FF-D58B-49EF-8A49-5D54D6CBCD17@media.mit.edu> <42c0ab790912081314x65cd38a9nbce2d11d472ab1ae@mail.gmail.com> Message-ID: I don't think BDB 4.7 has been tested on windows until now. I'm surprised 4.5 works with the latest head - but it's probably because you aren't exercising some of the 4.7 features Leslie added. On Dec 8, 2009, at 1:14 PM, Elliott Slaughter wrote: > On Tue, Dec 8, 2009 at 12:19 PM, Ian Eslick wrote: > Elliott - these DLLs work on your system w/ Lispworks? Is everything working for you? I just want to make sure we have a baseline. > > I went back to my Windows XP build, which I know worked once upon a time, and updated to the newest Elephant. With BDB 4.5 and 4.7 installed side-by-side, I configured Elephant to use 4.5: the build worked fine. I reconfigured for 4.7, and the build broke with error 22. Back to 4.5: build works fine. Back again to 4.7: still broken. > > Has Elephant ever been tested against BDB 4.7 on Windows? > > At any rate, I can supply dlls which I know work for BDB 4.5 (attached). They work with the newest version of Elephant. > > By the way, line 65 of ele-bdb.asd is hard coded to "-ldb45". That probably needs to change. (But it doesn't solve our bug; I already fixed it local and it didn't help.) > > Hope that helps? > > -- > Elliott Slaughter > > "Don't worry about what anybody else is going to do. The best way to predict the future is to invent it." - Alan Kay > _______________________________________________ > elephant-devel site list > elephant-devel at common-lisp.net > http://common-lisp.net/mailman/listinfo/elephant-devel -------------- next part -------------- An HTML attachment was scrubbed... URL: From plamen.usenet at gmail.com Wed Dec 9 15:09:38 2009 From: plamen.usenet at gmail.com (Plamen .) Date: Wed, 9 Dec 2009 16:09:38 +0100 Subject: [elephant-devel] Problem with LWW 5.1.2, BDB-backend In-Reply-To: References: <42c0ab790912071034r29b0ad99i47d904bf07142ffe@mail.gmail.com> <558B1CF0-765E-4A9E-919B-B1E14DB51082@media.mit.edu> <42c0ab790912081217l3e1564e7j46a23de8606e8348@mail.gmail.com> <732DB9FF-D58B-49EF-8A49-5D54D6CBCD17@media.mit.edu> <42c0ab790912081314x65cd38a9nbce2d11d472ab1ae@mail.gmail.com> Message-ID: Hello Ian, Elliott, now I (learned some GDB, btw, Elliott - ty a lot for the compiler options for GCC) debugged also the C side of the Elephant under LWW-32bit/BDB 4.7.25 and... everything looks ok as ordered by the Lisp-side of the inteface - all parameters to the db_env_open are passed as expected (the pathname of the home dir, the flags (1493 = create t & init-mpool t & thread t & init-lock t & init-log t & init-txn t & recover t) as well the ENV object... So - it seems - it's not an even an UFFI problem - either BDB on Windows expects some additional setup in the ENV which is not yet in the Lisp code (except the max-transactions and max-locks which I don't know why also give the error 22 : Invalid argument) or if not in the ENV struct - using may be some additional API call.... So - I'm going now to delve in the BDB doc. Hopefully I see something which we miss. Greets On Tue, Dec 8, 2009 at 10:35 PM, Ian Eslick wrote: > I don't think BDB 4.7 has been tested on windows until now. ?I'm surprised > 4.5 works with the latest head - but it's probably because you aren't > exercising some of the 4.7 features Leslie added. > On Dec 8, 2009, at 1:14 PM, Elliott Slaughter wrote: > > On Tue, Dec 8, 2009 at 12:19 PM, Ian Eslick wrote: >> >> Elliott - these DLLs work on your system w/ Lispworks? ?Is everything >> working for you? ?I just want to make sure we have a baseline. > > I went back to my Windows XP build, which I know worked once upon a time, > and updated to the newest Elephant. With BDB 4.5 and 4.7 installed > side-by-side, I configured Elephant to use 4.5: the build worked fine. I > reconfigured for 4.7, and the build broke with error 22. Back to 4.5: build > works fine. Back again to 4.7: still broken. > Has Elephant ever been tested against BDB 4.7 on Windows? > At any rate, I can supply dlls which I know work for BDB 4.5 (attached). > They work with the newest version of Elephant. > By the way, line 65 of ele-bdb.asd is hard coded to "-ldb45". That probably > needs to change. (But it doesn't solve our bug; I already fixed it local and > it didn't help.) > Hope that helps? > -- > Elliott Slaughter > > "Don't worry about what anybody else is going to do. The best way to predict > the future is to invent it." - Alan Kay > _______________________________________________ > 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 plamen.usenet at gmail.com Wed Dec 9 16:16:45 2009 From: plamen.usenet at gmail.com (Plamen .) Date: Wed, 9 Dec 2009 17:16:45 +0100 Subject: [elephant-devel] Problem with LWW 5.1.2, BDB-backend In-Reply-To: References: <42c0ab790912071034r29b0ad99i47d904bf07142ffe@mail.gmail.com> <558B1CF0-765E-4A9E-919B-B1E14DB51082@media.mit.edu> <42c0ab790912081217l3e1564e7j46a23de8606e8348@mail.gmail.com> <732DB9FF-D58B-49EF-8A49-5D54D6CBCD17@media.mit.edu> <42c0ab790912081314x65cd38a9nbce2d11d472ab1ae@mail.gmail.com> Message-ID: And this are the contents of the ENV struct passed from Lisp to db_env_open (function pointers and the max-transactions and max-locks omitted because of the invalid argument error...) - may be someone would spot something... Regards $14 = { env = 0x1829500, mtx_db_env = 0, db_errcall = 0, db_errfile = 0x0, db_errpfx = 0x0, db_msgcall = 0, db_msgfile = 0x0, app_dispatch = 0, db_event_func = 0x100, db_feedback = 0, db_free = 0, db_paniccall = 0, db_malloc = 0, db_realloc = 0, is_alive = 0, thread_id = 0x186a0, db_log_dir = 0x0, db_tmp_dir = 0x0, db_data_dir = 0x0, data_cnt = 0, data_next = 0, intermediate_dir_mode = 0x0, shm_key = -1, passwd = 0x0, passwd_len = 0, cl_handle = 0x0, cl_id = 0, app_private = 0x0, api1_internal = 0x0, api2_internal = 0x0, verbose = 0, mutex_align = 0, mutex_cnt = 0, mutex_inc = 0, mutex_tas_spins = 0, lk_conflicts = 0x0, lk_modes = 0, lk_detect = 0, lk_max = 1000, lk_max_lockers = 2000, lk_max_objects = 1000, lk_partitions = 20, lk_timeout = 0, lg_bsize = 0, lg_filemode = 0, lg_regionmax = 65000, lg_size = 0, lg_flags = 0, mp_gbytes = 0, mp_bytes = 265328, mp_max_gbytes = 0, mp_max_bytes = 265328, mp_mmapsize = 0, mp_maxopenfd = 0, mp_maxwrite = 0, mp_ncache = 1, mp_maxwrite_sleep = 0, tx_max = 100, tx_timestamp = 0, tx_timeout = 0, thr_max = 0, registry = 0x0, registry_off = 0, flags = 0, cdsgroup_begin = 0, close = 0, } On Wed, Dec 9, 2009 at 4:09 PM, Plamen . wrote: > Hello Ian, Elliott, > > now I (learned some GDB, btw, Elliott - ty a lot for the compiler > options for GCC) debugged also the C side of the Elephant under > LWW-32bit/BDB 4.7.25 and... everything looks ok as ordered by the > Lisp-side of the inteface - all parameters to the db_env_open are > passed as expected (the pathname of the home dir, the flags (1493 = > create t & init-mpool t & thread t & init-lock t & init-log t & > init-txn t & recover t) as well the ENV object... > > So - it seems - it's not an even an UFFI problem - either BDB on > Windows expects some additional setup in the ENV which is not yet in > the Lisp code (except the max-transactions and max-locks which I don't > know why also give the error 22 : Invalid argument) or if not in the > ENV struct - using may be some additional API call.... > > So - I'm going now ?to delve in the BDB doc. Hopefully I see something > which we miss. > > Greets > > > On Tue, Dec 8, 2009 at 10:35 PM, Ian Eslick wrote: >> I don't think BDB 4.7 has been tested on windows until now. ?I'm surprised >> 4.5 works with the latest head - but it's probably because you aren't >> exercising some of the 4.7 features Leslie added. >> On Dec 8, 2009, at 1:14 PM, Elliott Slaughter wrote: >> >> On Tue, Dec 8, 2009 at 12:19 PM, Ian Eslick wrote: >>> >>> Elliott - these DLLs work on your system w/ Lispworks? ?Is everything >>> working for you? ?I just want to make sure we have a baseline. >> >> I went back to my Windows XP build, which I know worked once upon a time, >> and updated to the newest Elephant. With BDB 4.5 and 4.7 installed >> side-by-side, I configured Elephant to use 4.5: the build worked fine. I >> reconfigured for 4.7, and the build broke with error 22. Back to 4.5: build >> works fine. Back again to 4.7: still broken. >> Has Elephant ever been tested against BDB 4.7 on Windows? >> At any rate, I can supply dlls which I know work for BDB 4.5 (attached). >> They work with the newest version of Elephant. >> By the way, line 65 of ele-bdb.asd is hard coded to "-ldb45". That probably >> needs to change. (But it doesn't solve our bug; I already fixed it local and >> it didn't help.) >> Hope that helps? >> -- >> Elliott Slaughter >> >> "Don't worry about what anybody else is going to do. The best way to predict >> the future is to invent it." - Alan Kay >> _______________________________________________ >> 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 lukas.giessmann at hotmail.de Mon Dec 14 14:49:08 2009 From: lukas.giessmann at hotmail.de (=?iso-8859-1?B?THVrYXMgR2ll321hbm4=?=) Date: Mon, 14 Dec 2009 15:49:08 +0100 Subject: [elephant-devel] installing elephant 1.0 from repository Message-ID: Hi, I am wondering about my installation of elephant 1.0. I just tried to install elephant 1.0 directly from the darcs repository by the command "darcs get http://www.common-lisp.net/project/elephant/darcs/elephant-1.0" and/or "darcs get --tag=ELEPHANT-1-0-A2 http://www.common-lisp.net/project/elephant/darcs/elephant-1.0". When the repository was downloaded on the system, darcs displayed the message "Warning: CRC errors found. These are probably harmless but should be repaired. See 'darcs gzcrcs --help' for more information." The commands "darcs gzcrcs --check" and "darcs gzcrcs --repair" had no effects. When I was loading elephant on sbcl with slime, it stopped to work at the command "gcc -L/usr/local/BerkeleyDB.4.5/lib/ -I/usr/local/BerkeleyDB.4.5/include/ -shared -march=x86-64 -fPIC -Wall -g -O2 -g /home/lukas/.sbcl/site/elephant-1.0/src/db-bdb/libberkeley-db.c -o /var/cache/common-lisp-controller/1000/sbcl/local/home/lukas/.sbcl/site/elephant-1.0/src/db-bdb/libberkeley-db.so -lm". My work-around was to execute the last command in the shell and to recompile elephant in slime/sbcl. I am not sure if this is a bug or if I did something wrong? Maybe there is someone with the same problem? Best regards Lukas _________________________________________________________________ http://redirect.gimas.net/?n=M0912xIWHM2 Hotmail - Mein E-Mail Anbieter ohne Kosten -------------- next part -------------- An HTML attachment was scrubbed... URL: From eslick at media.mit.edu Mon Dec 14 15:53:23 2009 From: eslick at media.mit.edu (Ian Eslick) Date: Mon, 14 Dec 2009 07:53:23 -0800 Subject: [elephant-devel] installing elephant 1.0 from repository In-Reply-To: References: Message-ID: Hi Lukas, I haven't seen that particular darcs problem before, although I have seen the gcc build via asdf fail but work when done manually. This may be fixed in the latest head, actually. You might try pulling elephant-1.0 without the --tag option and see if that fixes it. Best, Ian On Dec 14, 2009, at 6:49 AM, Lukas Gie?mann wrote: > Hi, > > I am wondering about my installation of elephant 1.0. > > I just tried to install elephant 1.0 directly from the darcs repository by the command "darcs gethttp://www.common-lisp.net/project/elephant/darcs/elephant-1.0" and/or "darcs get --tag=ELEPHANT-1-0-A2http://www.common-lisp.net/project/elephant/darcs/elephant-1.0". When the repository was downloaded on the system, darcs displayed the message "Warning: CRC errors found. These are probably harmless but should be repaired. > See 'darcs gzcrcs --help' for more information." > The commands "darcs gzcrcs --check" and "darcs gzcrcs --repair" had no effects. > > When I was loading elephant on sbcl with slime, it stopped to work at the command "gcc -L/usr/local/BerkeleyDB.4.5/lib/ -I/usr/local/BerkeleyDB.4.5/include/ -shared -march=x86-64 -fPIC -Wall -g -O2 -g /home/lukas/.sbcl/site/elephant-1.0/src/db-bdb/libberkeley-db.c -o /var/cache/common-lisp-controller/1000/sbcl/local/home/lukas/.sbcl/site/elephant-1.0/src/db-bdb/libberkeley-db.so -lm". > > My work-around was to execute the last command in the shell and to recompile elephant in slime/sbcl. > I am not sure if this is a bug or if I did something wrong? > Maybe there is someone with the same problem? > > > Best regards > > Lukas > > Alle E-Mail-Adressen online auf einen Blick Ich will Hotmail!_______________________________________________ > elephant-devel site list > elephant-devel at common-lisp.net > http://common-lisp.net/mailman/listinfo/elephant-devel -------------- next part -------------- An HTML attachment was scrubbed... URL: From arjunmullick at gmail.com Tue Dec 15 10:40:26 2009 From: arjunmullick at gmail.com (Arjun Mullick) Date: Tue, 15 Dec 2009 16:10:26 +0530 Subject: [elephant-devel] About Project on elephant Message-ID: <57b776a80912150240v50bfade1k8e2ec84429857cf9@mail.gmail.com> I am a new user to elephant , and it has been very hard to learn the language just by the documentation on your site , can u please provide me with some source code of previously built project on elephant . A simple relational database with even one relation will be of great help. Thank you Arjun Mullick gnowlwdge lab. H.B.C.S.E, T.I.F.R Mumbai,India -------------- next part -------------- An HTML attachment was scrubbed... URL: From eslick at media.mit.edu Tue Dec 15 13:27:39 2009 From: eslick at media.mit.edu (Ian Eslick) Date: Tue, 15 Dec 2009 08:27:39 -0500 Subject: [elephant-devel] About Project on elephant In-Reply-To: <57b776a80912150240v50bfade1k8e2ec84429857cf9@mail.gmail.com> References: <57b776a80912150240v50bfade1k8e2ec84429857cf9@mail.gmail.com> Message-ID: <81BA66FF-1B9C-441B-B2BC-FDC09A10E569@media.mit.edu> Is this what you are looking for? http://roeim.net/vetle/docs/cl-webapp-intro/part-2/ Sent from my iPhone On Dec 15, 2009, at 5:40 AM, Arjun Mullick wrote: > I am a new user to elephant , and it has been very hard to learn the > language just by the documentation on your site , can u please > provide me with some source code of previously built project on > elephant . A simple relational database with even one relation will > be of great help. > Thank you > > Arjun Mullick > gnowlwdge lab. > H.B.C.S.E, T.I.F.R > Mumbai,India > _______________________________________________ > elephant-devel site list > elephant-devel at common-lisp.net > http://common-lisp.net/mailman/listinfo/elephant-devel From lukas.giessmann at hotmail.de Tue Dec 15 14:08:26 2009 From: lukas.giessmann at hotmail.de (=?iso-8859-1?B?THVrYXMgR2ll321hbm4=?=) Date: Tue, 15 Dec 2009 15:08:26 +0100 Subject: [elephant-devel] installing elephant 1.0 from repository In-Reply-To: References: , Message-ID: Hi Ian, thanks for you answer. The gcc build via asdf works fine in the latest revision - but the darcs warning is still there. At the moment it looks like it causes no problems. Best regards Lukas From: eslick at media.mit.edu Date: Mon, 14 Dec 2009 07:53:23 -0800 To: elephant-devel at common-lisp.net Subject: Re: [elephant-devel] installing elephant 1.0 from repository Hi Lukas, I haven't seen that particular darcs problem before, although I have seen the gcc build via asdf fail but work when done manually. This may be fixed in the latest head, actually. You might try pulling elephant-1.0 without the --tag option and see if that fixes it. Best,Ian On Dec 14, 2009, at 6:49 AM, Lukas Gie?mann wrote:Hi, I am wondering about my installation of elephant 1.0. I just tried to install elephant 1.0 directly from the darcs repository by the command "darcs gethttp://www.common-lisp.net/project/elephant/darcs/elephant-1.0" and/or "darcs get --tag=ELEPHANT-1-0-A2http://www.common-lisp.net/project/elephant/darcs/elephant-1.0". When the repository was downloaded on the system, darcs displayed the message "Warning: CRC errors found. These are probably harmless but should be repaired. See 'darcs gzcrcs --help' for more information." The commands "darcs gzcrcs --check" and "darcs gzcrcs --repair" had no effects. When I was loading elephant on sbcl with slime, it stopped to work at the command "gcc -L/usr/local/BerkeleyDB.4.5/lib/ -I/usr/local/BerkeleyDB.4.5/include/ -shared -march=x86-64 -fPIC -Wall -g -O2 -g /home/lukas/.sbcl/site/elephant-1.0/src/db-bdb/libberkeley-db.c -o /var/cache/common-lisp-controller/1000/sbcl/local/home/lukas/.sbcl/site/elephant-1.0/src/db-bdb/libberkeley-db.so -lm". My work-around was to execute the last command in the shell and to recompile elephant in slime/sbcl. I am not sure if this is a bug or if I did something wrong? Maybe there is someone with the same problem? Best regards Lukas Alle E-Mail-Adressen online auf einen Blick Ich will Hotmail!_______________________________________________ elephant-devel site list elephant-devel at common-lisp.net http://common-lisp.net/mailman/listinfo/elephant-devel _________________________________________________________________ http://redirect.gimas.net/?n=M0912xIWHM2 Hotmail - Mein E-Mail Anbieter ohne Kosten -------------- next part -------------- An HTML attachment was scrubbed... URL: From lukas.giessmann at hotmail.de Wed Dec 16 10:33:00 2009 From: lukas.giessmann at hotmail.de (=?iso-8859-1?B?THVrYXMgR2ll321hbm4=?=) Date: Wed, 16 Dec 2009 11:33:00 +0100 Subject: [elephant-devel] remove-association patch on elephant 1.0.a2 Message-ID: Hello, since I made an update in our project that uses elephant (from version 0.3 to 1.0.a2) I noticed that the remove-association-patch that was created and sent to you by Marc some time ago was not applied yet. It fixes some problems with removing elephant-associations. I created the same patch on the new version, maybe you could apply it to the elephant-repository? Best regards Lukas _________________________________________________________________ http://redirect.gimas.net/?n=M0912xMobileIM Neu, kostenlos & von unterwegs: Der Messenger f?rs Handy! -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: remove-association.patch Type: text/x-patch Size: 3996 bytes Desc: not available URL: From eslick at media.mit.edu Wed Dec 16 11:23:26 2009 From: eslick at media.mit.edu (Ian Eslick) Date: Wed, 16 Dec 2009 06:23:26 -0500 Subject: [elephant-devel] remove-association patch on elephant 1.0.a2 In-Reply-To: References: Message-ID: <7B7CF99F-B489-416F-8E86-0E1D3944FDF6@media.mit.edu> Done. On Dec 16, 2009, at 5:33 AM, Lukas Gie?mann wrote: > -------------- next part -------------- An HTML attachment was scrubbed... URL: From cmalune at gmail.com Thu Dec 17 09:30:18 2009 From: cmalune at gmail.com (Edward Tate) Date: Thu, 17 Dec 2009 10:30:18 +0100 Subject: [elephant-devel] Dropping values Message-ID: <5a28dfe80912170130x6ab3ecb5t9ac74f41f80579a3@mail.gmail.com> Hey, I'm using the latest elephant on SBCL 1.0.29 with BDB 4.7, and I'm getting strange behaviour. * Using remove-kv doesn't actually delete keys from a btree. * Using drop-btree doesn't actually drop the btree. * Using flush-instance-cache doesn't seem to help. * Doing a full GC doesn't seem to help. Is there a way of removing data permanently? Cheers, Edward Tate -------------- next part -------------- An HTML attachment was scrubbed... URL: From eslick at media.mit.edu Thu Dec 17 13:08:33 2009 From: eslick at media.mit.edu (Ian Eslick) Date: Thu, 17 Dec 2009 08:08:33 -0500 Subject: [elephant-devel] Dropping values In-Reply-To: <5a28dfe80912170130x6ab3ecb5t9ac74f41f80579a3@mail.gmail.com> References: <5a28dfe80912170130x6ab3ecb5t9ac74f41f80579a3@mail.gmail.com> Message-ID: <60D9D953-E533-435F-818B-34B426C7107A@media.mit.edu> Hi Edward, I'm unable to reproduce with my local version of the latest Elephant (latest, ccl64, DB 4.7, Mac). Can you give me a transcript like: (setf btree (make-btree)) (setf (get-value 'foo btree) 10) (setf (get-value 'bar btree) 20) (dump-btree btree) (remove-kv 'foo btree) (dump-btree btree) It's possible that there is some low-level issue talking to the DB API in the FFI between Elephant and BDB. I don't have time to test on SBCL today, but perhaps someone else does. I might be able to get to it this weekend. Thanks, Ian On Dec 17, 2009, at 4:30 AM, Edward Tate wrote: > Hey, > > I'm using the latest elephant on SBCL 1.0.29 with BDB 4.7, and I'm getting strange behaviour. > > * Using remove-kv doesn't actually delete keys from a btree. > * Using drop-btree doesn't actually drop the btree. > * Using flush-instance-cache doesn't seem to help. > * Doing a full GC doesn't seem to help. > > Is there a way of removing data permanently? > > Cheers, > Edward Tate > _______________________________________________ > elephant-devel site list > elephant-devel at common-lisp.net > http://common-lisp.net/mailman/listinfo/elephant-devel From cmalune at gmail.com Thu Dec 17 14:21:39 2009 From: cmalune at gmail.com (Edward Tate) Date: Thu, 17 Dec 2009 15:21:39 +0100 Subject: [elephant-devel] Dropping values In-Reply-To: <60D9D953-E533-435F-818B-34B426C7107A@media.mit.edu> References: <5a28dfe80912170130x6ab3ecb5t9ac74f41f80579a3@mail.gmail.com> <60D9D953-E533-435F-818B-34B426C7107A@media.mit.edu> Message-ID: <5a28dfe80912170621t48a33ed2of2db53601ebaf1bb@mail.gmail.com> Hey Ian, I found the problem, I was indexing objects by their ele::oid which is a number. When I index by string it works. Cheers, Edward Tate On Thu, Dec 17, 2009 at 2:08 PM, Ian Eslick wrote: > Hi Edward, > > I'm unable to reproduce with my local version of the latest Elephant > (latest, ccl64, DB 4.7, Mac). Can you give me a transcript like: > > (setf btree (make-btree)) > (setf (get-value 'foo btree) 10) > (setf (get-value 'bar btree) 20) > (dump-btree btree) > (remove-kv 'foo btree) > (dump-btree btree) > > It's possible that there is some low-level issue talking to the DB API in > the FFI between Elephant and BDB. I don't have time to test on SBCL today, > but perhaps someone else does. I might be able to get to it this weekend. > > Thanks, > Ian > > On Dec 17, 2009, at 4:30 AM, Edward Tate wrote: > > > Hey, > > > > I'm using the latest elephant on SBCL 1.0.29 with BDB 4.7, and I'm > getting strange behaviour. > > > > * Using remove-kv doesn't actually delete keys from a btree. > > * Using drop-btree doesn't actually drop the btree. > > * Using flush-instance-cache doesn't seem to help. > > * Doing a full GC doesn't seem to help. > > > > Is there a way of removing data permanently? > > > > Cheers, > > Edward Tate > > _______________________________________________ > > 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 > -------------- next part -------------- An HTML attachment was scrubbed... URL: From arjunmullick at gmail.com Tue Dec 22 09:07:28 2009 From: arjunmullick at gmail.com (Arjun Mullick) Date: Tue, 22 Dec 2009 14:37:28 +0530 Subject: [elephant-devel] indexing in elephant Message-ID: <57b776a80912220107g13e534c0ja105d5b6516cdcbd@mail.gmail.com> Hello, 1. we wish to make an application that stores relations basically subject-predicate-object For example : Force-dependson-mass, Force-dependson-acceleration, whale-isa-mammal. 2. What we have decided is to make separate persistent class for each predicate. For example in the examples given above we have two predicates "dependson" and "isa". 3. (defpclass dependson () ((subject :accessor subject) (predicate :accessor predicate) (object :accessor object))) 4. How do I index a slot so that later if I have a query where I have been provided with two slot values I should be able to get the third slot value. For example: Force-dependson-? should return "mass" and "acceleration". We are refering to the elephant.pdf downloaded from the documentation section of the elephant website Thank you Arjun Mullick -------------- next part -------------- An HTML attachment was scrubbed... URL: From arjunmullick at gmail.com Tue Dec 22 09:56:43 2009 From: arjunmullick at gmail.com (Arjun Mullick) Date: Tue, 22 Dec 2009 01:56:43 -0800 (PST) Subject: [elephant-devel] Let's connect on LinkedIn Message-ID: <985769486.560065.1261475803582.JavaMail.app@ech3-cdn08.prod> LinkedIn ------------ I'd like to add you to my professional network on LinkedIn. - Arjun Mullick Confirm that you know Arjun Mullick https://www.linkedin.com/e/isd/945225686/erxUqv9Y/ Every day, millions of professionals like Arjun Mullick use LinkedIn to connect with colleagues, find experts, and explore opportunities. ------ (c) 2009, LinkedIn Corporation -------------- next part -------------- An HTML attachment was scrubbed... URL: From killerstorm at newmail.ru Tue Dec 22 23:23:52 2009 From: killerstorm at newmail.ru (Alex Mizrahi) Date: Wed, 23 Dec 2009 01:23:52 +0200 Subject: [elephant-devel] indexing in elephant References: <57b776a80912220107g13e534c0ja105d5b6516cdcbd@mail.gmail.com> Message-ID: > 2. What we have decided is to make separate persistent class for each > predicate. So, class is a predicate, right? >3. (defpclass dependson () > ((subject :accessor subject) > (predicate :accessor predicate) > (object :accessor object))) Why do you need a predicate slot then? Predicate for dependson class is dependson. > 4. How do I index a slot so that later if I have a query where I have been provided with two slot values I should be able to get the third slot value. For example: Force-dependson-? should return "mass" and "acceleration". Elephant implements (on a low level) key-value pair store rather than a triple store. If you want a triple store, there are basically two way to do it -- either use compound keys, e.g. (subject, predicate)->object. Or use nested key-value stores, something like subject->(predicate->object). Class-per-predicate essentially implements later approach with nested key-value stores -- because each class in Elephant has its own btrees for indices. So, just use get-instances-by-value. Like (ele:get-instances-by-value 'dependson 'object value) or (ele:get-instances-by-value 'dependson 'subject value) Pretty obvious, no? Either you've got confused by your own constructs, or I've misunderstood something. From eslick at media.mit.edu Tue Dec 22 23:27:53 2009 From: eslick at media.mit.edu (Ian Eslick) Date: Tue, 22 Dec 2009 15:27:53 -0800 Subject: [elephant-devel] Checkins Message-ID: <64ACF3E4-A910-4EF3-B720-D5B34BD89FDB@media.mit.edu> I checked in some patches I missed from the list earlier as well as some changes to cached slot / instance behavior. Ian From arjunmullick at gmail.com Wed Dec 23 08:13:11 2009 From: arjunmullick at gmail.com (Arjun Mullick) Date: Wed, 23 Dec 2009 13:43:11 +0530 Subject: [elephant-devel] indexing in elephant In-Reply-To: References: <57b776a80912220107g13e534c0ja105d5b6516cdcbd@mail.gmail.com> Message-ID: <57b776a80912230013y1c6a0d8x86e5f26c83abca94@mail.gmail.com> Thanks a lot , we really got what we want. On Wed, Dec 23, 2009 at 4:53 AM, Alex Mizrahi wrote: > > 2. What we have decided is to make separate persistent class for each > > predicate. > > So, class is a predicate, right? > > >3. (defpclass dependson () > > ((subject :accessor subject) > > (predicate :accessor predicate) > > (object :accessor object))) > > Why do you need a predicate slot then? Predicate for dependson class is > dependson. > > > 4. How do I index a slot so that later if I have a query where I have > been > provided with two slot values I should be able to get the third slot value. > For example: Force-dependson-? should return "mass" and "acceleration". > > Elephant implements (on a low level) key-value pair store rather than a > triple store. > If you want a triple store, there are basically two way to do it -- either > use > compound keys, e.g. (subject, predicate)->object. > Or use nested key-value stores, something like > subject->(predicate->object). > > Class-per-predicate essentially implements later approach with nested > key-value stores -- because each class in Elephant has its own btrees > for indices. > > So, just use get-instances-by-value. Like > > (ele:get-instances-by-value 'dependson 'object value) > > or > > (ele:get-instances-by-value 'dependson 'subject value) > > Pretty obvious, no? > Either you've got confused by your own constructs, or I've misunderstood > something. > > > > > > _______________________________________________ > elephant-devel site list > elephant-devel at common-lisp.net > http://common-lisp.net/mailman/listinfo/elephant-devel > -------------- next part -------------- An HTML attachment was scrubbed... URL: From arjunmullick at gmail.com Fri Dec 25 13:21:12 2009 From: arjunmullick at gmail.com (Arjun Mullick) Date: Fri, 25 Dec 2009 18:51:12 +0530 Subject: [elephant-devel] including multiple slot-names and their values in the API get-instances-by-value Message-ID: <57b776a80912250521u17f81c4bt1bed1c8c4003d9d@mail.gmail.com> Hello, this is the definition of my class (defpclass classname () ((slot1 :accessor slot1 :initarg :slot1 :index t) (slot2 :accessor slot2 :initarg :slot2 :index t) (slot3 :accessor slot3 :initarg :slot3 :index t))) If I make three instances of this class with following slot values: INSTANCE1 slot1:"a" slot2:"b" slot3:"c" INSTANCE2 slot1:"a" slot2:"n" slot3:"d" INSTANCE3 slot1:"a" slot2:"b" slot3:"m" Now if the user gives the values for slot1 and slot2 I should be able to get slot3 For example: If the user gives slot1 as "a" and slot2 as "b" then two vaues "c" and "m" should be returned We tried the API get-instances-by-value Is there a way I can include multiple slot-names and their values in get-instances-by-value Arjun Mullick -------------- next part -------------- An HTML attachment was scrubbed... URL: From eslick at media.mit.edu Sat Dec 26 07:15:02 2009 From: eslick at media.mit.edu (Ian Eslick) Date: Fri, 25 Dec 2009 23:15:02 -0800 Subject: [elephant-devel] including multiple slot-names and their values in the API get-instances-by-value In-Reply-To: <57b776a80912250521u17f81c4bt1bed1c8c4003d9d@mail.gmail.com> References: <57b776a80912250521u17f81c4bt1bed1c8c4003d9d@mail.gmail.com> Message-ID: <38934A18-AC00-4881-896E-7FB9ACDA1F4D@media.mit.edu> get-instances-by-value is a low level primitive, so it operates only on a single index. I have a triple-store / ontology hack in my contrib directory. I haven't looked at it in a couple of years but you may find it useful. elephant-1.0/src/contrib/eslick/triples.lisp There is also a query system in the works which would do the two index scans and merge for you, but I wouldn't hold out for it; it's low on my priority list these days. Regards, Ian On Dec 25, 2009, at 5:21 AM, Arjun Mullick wrote: > Hello, > > this is the definition of my class > (defpclass classname () > ((slot1 :accessor slot1 :initarg :slot1 :index t) > (slot2 :accessor slot2 :initarg :slot2 :index t) > (slot3 :accessor slot3 :initarg :slot3 :index t))) > > If I make three instances of this class with following slot values: > > INSTANCE1 slot1:"a" slot2:"b" slot3:"c" > INSTANCE2 slot1:"a" slot2:"n" slot3:"d" > INSTANCE3 slot1:"a" slot2:"b" slot3:"m" > > Now if the user gives the values for slot1 and slot2 I should be able to get slot3 > For example: If the user gives slot1 as "a" and slot2 as "b" then two vaues > "c" and "m" should be returned > > > We tried the API get-instances-by-value > Is there a way I can include multiple slot-names and their values in > get-instances-by-value > > > Arjun Mullick > _______________________________________________ > elephant-devel site list > elephant-devel at common-lisp.net > http://common-lisp.net/mailman/listinfo/elephant-devel From arjunmullick at gmail.com Tue Dec 29 06:38:28 2009 From: arjunmullick at gmail.com (Arjun Mullick) Date: Tue, 29 Dec 2009 01:38:28 -0500 Subject: [elephant-devel] including multiple slot-names and their values in the API get-instances-by-value In-Reply-To: <38934A18-AC00-4881-896E-7FB9ACDA1F4D@media.mit.edu> References: <57b776a80912250521u17f81c4bt1bed1c8c4003d9d@mail.gmail.com> <38934A18-AC00-4881-896E-7FB9ACDA1F4D@media.mit.edu> Message-ID: <57b776a80912282238h21c8cd51jbf0a339363c87362@mail.gmail.com> Hi, Thanks a lot ,your example helped us and made things much clear . we changed some of your example function and got what we want. Our understanding in elephant has improved . Thanks Arjun -------------- next part -------------- An HTML attachment was scrubbed... URL: From reddaly at gmail.com Tue Dec 29 20:44:35 2009 From: reddaly at gmail.com (Red Daly) Date: Tue, 29 Dec 2009 12:44:35 -0800 Subject: [elephant-devel] 3 test failures with the latest version. Expected? Message-ID: Here is a test report on the latest version of elephant from darcs. Are these failures expected? I have not bisected the commit history or anything to tell when these failures began. I ran the BDB test by loading the BerkeleyDB test file in tests/. uname -a: Linux condi 2.6.31-16-generic #53-Ubuntu SMP Tue Dec 8 04:02:15 UTC 2009 x86_64 GNU/Linux SBCL "1.0.32.37" Did 501 checks. Pass: 496 (99%) Skip: 2 ( 0%) Fail: 3 ( 0%) Failure Details: -------------------------------- CHANGE-CLASS []: Unexpected Error: # There is no applicable method for the generic function # when called with arguments (NIL)... -------------------------------- -------------------------------- UPDATE-CLASS []: Unexpected Error: # There is no applicable method for the generic function # when called with arguments (NIL)... -------------------------------- -------------------------------- CACHING-BASIC []: Unexpected Error: # The slot ELEPHANT::CHECKED-OUT is unbound in the object #... -------------------------------- Skip Details: CACHING-WITH-CHECKOUTS []: Dependencies not satisfied. CACHING-CANCEL-CHECKOUT []: Dependencies not satisfied. -Red From reddaly at gmail.com Tue Dec 29 20:52:10 2009 From: reddaly at gmail.com (Red Daly) Date: Tue, 29 Dec 2009 12:52:10 -0800 Subject: [elephant-devel] Class indexes dropped after database restart? In-Reply-To: <4566E50F-AEC0-4930-B5C9-E75A4FB2967D@gmail.com> References: <4566E50F-AEC0-4930-B5C9-E75A4FB2967D@gmail.com> Message-ID: This bug is easy to reproduce with the latest version of elephant. Here is some code I used to reproduce the bug: (require :elephant) (defpackage :ele-bug (:use :ele :cl)) (in-package :ele-bug) (defclass a () ((x :initarg :x :index t :initform 0 :accessor x)) (:metaclass ele:persistent-metaclass)) (defun create-instances (n &optional (class 'a)) (dotimes (i n) (make-instance class :x i))) (defun stats () (dolist (class-sym '(a b)) (format t "~A: ~A instances; ~A with value 10~%" class-sym (length (get-instances-by-class class-sym)) (length (get-instances-by-value class-sym 'x 10))))) (defun open-close-test () (declare (optimize (debug 3))) (macrolet ((is (form) `(assert ,form))) (flet ((open-it () (ele:open-store '(:bdb "db2/"))) (test-class-indexes (n-class n-10) (is (= n-class (length (get-instances-by-class 'a)))) (is (= n-10 (length (get-instances-by-value 'a 'x 10)))))) (with-open-store ('(:bdb "db2/")) (create-instances 100 'a) (test-class-indexes 100 1)) (with-open-store ('(:bdb "db2/")) (test-class-indexes 100 1))))) (open-close-test) I was able to fix the problem with a minor patch, but I doubt the correctness of my solution. Here is the diff: diff -rN old-elephant-1.0/src/elephant/controller.lisp new-elephant-1.0/src/elephant/controller.lisp 711c711,712 < :key-form 'schema-classname-keyform)) --- > :key-form 'schema-classname-keyform > :populate t)) 716c717,718 < :key-form 'instance-cidx-keyform)))) --- > :key-form 'instance-cidx-keyform > :populate t)))) I essentially just added a :populate t argument to the open-controller method. This seems to indicate that the 'BY-NAME secondary indices that map a class indices to OIDs, and class names to class indices, do not persist. Is this expected behavior? I'm not familiar enough with the internals to tell. Thanks, Red On Wed, Sep 23, 2009 at 3:27 PM, Red Daly wrote: > This is the 1.0 repository. ?I will see if I can reproduce the problem in a > test case. > Red > > > > > On Sep 23, 2009, at 9:50 AM, Ian Eslick wrote: > > Which darcs repository? ?There is the old 0.91 release and the new > elephant-1.0 branch... > Ian > On Sep 22, 2009, at 8:41 PM, Red Daly wrote: > > I should also note that I am using the version of elephant from darcs.? And > I discovered that when the program went down it was due to a segfault (I > believe in emacs).? However, all instances had been created under many > different transactions that did not abort. > > Here is some more fiddling around: > > CL-USER> (lisp-implementation-version) > "1.0.29.54.rc1" > BOOKS> (ele::get-db-schemas *ele-db* 'material) > NIL > BOOKS> (ele::controller-instance-class-index *ele-db*) > # oid:13701> > BOOKS> (ele:map-btree #'(lambda (key > val) > ????????????????????????? (format t "~S => ~S~%" key > val)) > ????????????????????? (ele::controller-instance-class-index *ele-db*)) > 307 => > 307 > NIL > > > Red > > On Tue, Sep 22, 2009 at 8:08 PM, Red Daly wrote: >> >> I noticed there was a disparity between get-instances-by-class and >> map-inverted-index.? I will let the code speak for itself: >> >> BOOKS> (length (ele:map-inverted-index #'(lambda (isbn obj) obj) 'material >> 'isbn :collect >> t)) >> >> 1945 >> BOOKS> (length (ele:get-instances-by-class 'material)) >> 0 >> BOOKS> (defparameter f (make-instance 'material :title "Fake Book")) >> >> F >> BOOKS> (length (ele:get-instances-by-class 'material)) >> >> 1 >> BOOKS> (length (ele:map-inverted-index #'(lambda (isbn obj) obj) 'material >> 'isbn :collect >> t)) >> 1946 >> >> There is a similar problem with the university class. >> >> BOOKS> (length (ele:get-instances-by-class 'university)) >> 0 >> BOOKS> *stanford-university* >> #> oid:204> >> BOOKS> (official-name *stanford-university*) >> "Stanford University" >> >> All of the instances in the database were created in a prior session. >> Then I shut down the DB and restarted Lisp.? Now MAP-CLASS and >> GET-INSTANCES-BY-CLASS return nil for all classes.? It seems like new >> instances get added to the "class index," but older instances are not >> found.? However, these classes persist in the inverted slot indexes.? Can >> anybody diagnose what's going on? >> >> here are the definitions of the classes: >> >> (defclass department () >> ? ((university :initarg :university :initform nil :accessor >> department-university >> ?????????????? :index t) >> ?? (official-name :initarg :official-name :initform nil :accessor >> official-name) >> ?? (common-name :initarg :common-name :initform nil :accessor common-name) >> ?? (abbreviation :initarg :abbreviation :initform nil :accessor >> abbreviation >> ???????????????? :index t)) >> ? (:metaclass ele:persistent-metaclass) >> ? (:documentation "A department has a bunch of course listings.")) >> >> (defclass material () >> ? ((title :initarg :title :initform nil :accessor material-title >> ????????? :index t) >> ?? (authors :initarg :authors :initform nil :accessor material-authors) ;; >> a list of >> authors >> ?? (edition :initarg :edition :initform nil :accessor material-edition) >> ?? (isbn :initarg :isbn :initform nil :accessor material-isbn >> ???????? :index t) >> ?? (asin :initarg :asin :initform nil :accessor material-asin >> ???????? :index t >> ???????? :documentation "An Amazon.com identifier that uniquely identifies >> the material") >> ?? (image-uri :initarg :image-uri :initform nil :accessor >> material-image-uri)) >> ? (:metaclass ele:persistent-metaclass)) >> >> Thanks, >> Red >> > > _______________________________________________ > 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 eslick at media.mit.edu Wed Dec 30 01:53:55 2009 From: eslick at media.mit.edu (Ian Eslick) Date: Tue, 29 Dec 2009 17:53:55 -0800 Subject: [elephant-devel] Class indexes dropped after database restart? In-Reply-To: References: <4566E50F-AEC0-4930-B5C9-E75A4FB2967D@gmail.com> Message-ID: <96000188-95CB-4AF5-9E5F-32CCA018B855@media.mit.edu> Hmmm....I can't reproduce this locally with my copy of latest. Your test code passes on a fresh DB as well. It's possible you're catching an error having to do with opening non 1.0 databases. A few quick sanity checks: 1) Did you clean out the test repository before running? (tests/delscript.sh) 2) Also, are you using elephant-1.0 or the defunct elephant-dev darcs repository? Thank you, Ian On Dec 29, 2009, at 12:52 PM, Red Daly wrote: > This bug is easy to reproduce with the latest version of elephant. > Here is some code I used to reproduce the bug: > > (require :elephant) > > (defpackage :ele-bug > (:use :ele :cl)) > > (in-package :ele-bug) > > (defclass a () > ((x :initarg :x :index t :initform 0 :accessor x)) > (:metaclass ele:persistent-metaclass)) > > (defun create-instances (n &optional (class 'a)) > (dotimes (i n) > (make-instance class :x i))) > > (defun stats () > (dolist (class-sym '(a b)) > (format t "~A: ~A instances; ~A with value 10~%" > class-sym > (length (get-instances-by-class class-sym)) > (length (get-instances-by-value class-sym 'x 10))))) > > (defun open-close-test () > (declare (optimize (debug 3))) > (macrolet ((is (form) > `(assert ,form))) > (flet ((open-it () > (ele:open-store '(:bdb "db2/"))) > (test-class-indexes (n-class n-10) > (is (= n-class (length (get-instances-by-class 'a)))) > (is (= n-10 (length (get-instances-by-value 'a 'x 10)))))) > (with-open-store ('(:bdb "db2/")) > (create-instances 100 'a) > (test-class-indexes 100 1)) > (with-open-store ('(:bdb "db2/")) > (test-class-indexes 100 1))))) > > (open-close-test) > > I was able to fix the problem with a minor patch, but I doubt the > correctness of my solution. Here is the diff: > > diff -rN old-elephant-1.0/src/elephant/controller.lisp > new-elephant-1.0/src/elephant/controller.lisp > 711c711,712 > < :key-form 'schema-classname-keyform)) > --- >> :key-form 'schema-classname-keyform >> :populate t)) > 716c717,718 > < :key-form 'instance-cidx-keyform)))) > --- >> :key-form 'instance-cidx-keyform >> :populate t)))) > > > I essentially just added a :populate t argument to the open-controller > method. This seems to indicate that the 'BY-NAME secondary indices > that map a class indices to OIDs, and class names to class indices, do > not persist. Is this expected behavior? I'm not familiar enough with > the internals to tell. > > Thanks, > Red > > > > > > On Wed, Sep 23, 2009 at 3:27 PM, Red Daly wrote: >> This is the 1.0 repository. I will see if I can reproduce the problem in a >> test case. >> Red >> >> >> >> >> On Sep 23, 2009, at 9:50 AM, Ian Eslick wrote: >> >> Which darcs repository? There is the old 0.91 release and the new >> elephant-1.0 branch... >> Ian >> On Sep 22, 2009, at 8:41 PM, Red Daly wrote: >> >> I should also note that I am using the version of elephant from darcs. And >> I discovered that when the program went down it was due to a segfault (I >> believe in emacs). However, all instances had been created under many >> different transactions that did not abort. >> >> Here is some more fiddling around: >> >> CL-USER> (lisp-implementation-version) >> "1.0.29.54.rc1" >> BOOKS> (ele::get-db-schemas *ele-db* 'material) >> NIL >> BOOKS> (ele::controller-instance-class-index *ele-db*) >> #> oid:13701> >> BOOKS> (ele:map-btree #'(lambda (key >> val) >> (format t "~S => ~S~%" key >> val)) >> (ele::controller-instance-class-index *ele-db*)) >> 307 => >> 307 >> NIL >> >> >> Red >> >> On Tue, Sep 22, 2009 at 8:08 PM, Red Daly wrote: >>> >>> I noticed there was a disparity between get-instances-by-class and >>> map-inverted-index. I will let the code speak for itself: >>> >>> BOOKS> (length (ele:map-inverted-index #'(lambda (isbn obj) obj) 'material >>> 'isbn :collect >>> t)) >>> >>> 1945 >>> BOOKS> (length (ele:get-instances-by-class 'material)) >>> 0 >>> BOOKS> (defparameter f (make-instance 'material :title "Fake Book")) >>> >>> F >>> BOOKS> (length (ele:get-instances-by-class 'material)) >>> >>> 1 >>> BOOKS> (length (ele:map-inverted-index #'(lambda (isbn obj) obj) 'material >>> 'isbn :collect >>> t)) >>> 1946 >>> >>> There is a similar problem with the university class. >>> >>> BOOKS> (length (ele:get-instances-by-class 'university)) >>> 0 >>> BOOKS> *stanford-university* >>> #>> oid:204> >>> BOOKS> (official-name *stanford-university*) >>> "Stanford University" >>> >>> All of the instances in the database were created in a prior session. >>> Then I shut down the DB and restarted Lisp. Now MAP-CLASS and >>> GET-INSTANCES-BY-CLASS return nil for all classes. It seems like new >>> instances get added to the "class index," but older instances are not >>> found. However, these classes persist in the inverted slot indexes. Can >>> anybody diagnose what's going on? >>> >>> here are the definitions of the classes: >>> >>> (defclass department () >>> ((university :initarg :university :initform nil :accessor >>> department-university >>> :index t) >>> (official-name :initarg :official-name :initform nil :accessor >>> official-name) >>> (common-name :initarg :common-name :initform nil :accessor common-name) >>> (abbreviation :initarg :abbreviation :initform nil :accessor >>> abbreviation >>> :index t)) >>> (:metaclass ele:persistent-metaclass) >>> (:documentation "A department has a bunch of course listings.")) >>> >>> (defclass material () >>> ((title :initarg :title :initform nil :accessor material-title >>> :index t) >>> (authors :initarg :authors :initform nil :accessor material-authors) ;; >>> a list of >>> authors >>> (edition :initarg :edition :initform nil :accessor material-edition) >>> (isbn :initarg :isbn :initform nil :accessor material-isbn >>> :index t) >>> (asin :initarg :asin :initform nil :accessor material-asin >>> :index t >>> :documentation "An Amazon.com identifier that uniquely identifies >>> the material") >>> (image-uri :initarg :image-uri :initform nil :accessor >>> material-image-uri)) >>> (:metaclass ele:persistent-metaclass)) >>> >>> Thanks, >>> Red >>> >> >> _______________________________________________ >> 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 > > _______________________________________________ > elephant-devel site list > elephant-devel at common-lisp.net > http://common-lisp.net/mailman/listinfo/elephant-devel From reddaly at gmail.com Wed Dec 30 05:42:34 2009 From: reddaly at gmail.com (Red Daly) Date: Tue, 29 Dec 2009 21:42:34 -0800 Subject: [elephant-devel] Class indexes dropped after database restart? In-Reply-To: <96000188-95CB-4AF5-9E5F-32CCA018B855@media.mit.edu> References: <4566E50F-AEC0-4930-B5C9-E75A4FB2967D@gmail.com> <96000188-95CB-4AF5-9E5F-32CCA018B855@media.mit.edu> Message-ID: On Tue, Dec 29, 2009 at 5:53 PM, Ian Eslick wrote: > Hmmm....I can't reproduce this locally with my copy of latest. > > Your test code passes on a fresh DB as well. ?It's possible you're catching an error having to do with opening non 1.0 databases. > > A few quick sanity checks: > 1) Did you clean out the test repository before running? ? (tests/delscript.sh) > 2) Also, are you using elephant-1.0 or the defunct elephant-dev darcs repository? I ran the test in a different, non-elephant directory with a fresh darcs repository pulled from the elephant-1.0 tree. Here's a copy of the my-config.sexp: ((:compiler . :gcc) (:berkeley-db-version . "4.7") (:berkeley-db-include-dir . "/usr/local/BerkeleyDB.4.7/include/") (:berkeley-db-lib-dir . "/usr/local/BerkeleyDB.4.7/lib/") (:berkeley-db-lib . "/usr/local/BerkeleyDB.4.7/lib/libdb-4.7.so") (:berkeley-db-deadlock . "/usr/local/BerkeleyDB.4.7/bin/db_deadlock") (:berkeley-db-cachesize . 20971520) (:berkeley-db-max-locks . 2000) (:berkeley-db-max-objects . 2000) (:berkeley-db-max-transactions . 1000) (:berkeley-db-map-degree2 . t) (:berkeley-db-mvcc . nil) (:clsql-lib-paths . nil) (:prebuilt-libraries . nil)) Did you try to reproduce this using Linux/SBCL? I don't know why it would make a difference. > > Thank you, > Ian Best, Red > > On Dec 29, 2009, at 12:52 PM, Red Daly wrote: > >> This bug is easy to reproduce with the latest version of elephant. >> Here is some code I used to reproduce the bug: >> >> (require :elephant) >> >> (defpackage :ele-bug >> ? ?(:use :ele :cl)) >> >> (in-package :ele-bug) >> >> (defclass a () >> ?((x :initarg :x :index t :initform 0 :accessor x)) >> ?(:metaclass ele:persistent-metaclass)) >> >> (defun create-instances (n &optional (class 'a)) >> ?(dotimes (i n) >> ? ?(make-instance class :x i))) >> >> (defun stats () >> ?(dolist (class-sym '(a b)) >> ? ?(format t "~A: ~A instances; ~A with value 10~%" >> ? ? ? ? ? class-sym >> ? ? ? ? ? (length (get-instances-by-class class-sym)) >> ? ? ? ? ? (length (get-instances-by-value class-sym 'x 10))))) >> >> (defun open-close-test () >> ?(declare (optimize (debug 3))) >> ?(macrolet ((is (form) >> ? ? ? ? ? ? ?`(assert ,form))) >> ? ?(flet ((open-it () >> ? ? ? ? ? ?(ele:open-store '(:bdb "db2/"))) >> ? ? ? ? ?(test-class-indexes (n-class n-10) >> ? ? ? ? ? ?(is (= n-class (length (get-instances-by-class 'a)))) >> ? ? ? ? ? ?(is (= n-10 ? ?(length (get-instances-by-value 'a 'x 10)))))) >> ? ? ?(with-open-store ('(:bdb "db2/")) >> ? ? ? (create-instances 100 'a) >> ? ? ? (test-class-indexes 100 1)) >> ? ? ?(with-open-store ('(:bdb "db2/")) >> ? ? ? (test-class-indexes 100 1))))) >> >> (open-close-test) >> >> I was able to fix the problem with a minor patch, but I doubt the >> correctness of my solution. ?Here is the diff: >> >> diff -rN old-elephant-1.0/src/elephant/controller.lisp >> new-elephant-1.0/src/elephant/controller.lisp >> 711c711,712 >> < ? ? ? ? ? ? ? ? ? ? ? :key-form 'schema-classname-keyform)) >> --- >>> ? ? ? ? ? ? ? ? ? ? ?:key-form 'schema-classname-keyform >>> ? ? ? ? ? ? ? ? ? ? ?:populate t)) >> 716c717,718 >> < ? ? ? ? ? ? ? ? ? ? ? :key-form 'instance-cidx-keyform)))) >> --- >>> ? ? ? ? ? ? ? ? ? ? ?:key-form 'instance-cidx-keyform >>> ? ? ? ? ? ? ? ? ? ? ?:populate t)))) >> >> >> I essentially just added a :populate t argument to the open-controller >> method. ?This seems to indicate that the 'BY-NAME secondary indices >> that map a class indices to OIDs, and class names to class indices, do >> not persist. ?Is this expected behavior? ?I'm not familiar enough with >> the internals to tell. >> >> Thanks, >> Red >> >> >> >> >> >> On Wed, Sep 23, 2009 at 3:27 PM, Red Daly wrote: >>> This is the 1.0 repository. ?I will see if I can reproduce the problem in a >>> test case. >>> Red >>> >>> >>> >>> >>> On Sep 23, 2009, at 9:50 AM, Ian Eslick wrote: >>> >>> Which darcs repository? ?There is the old 0.91 release and the new >>> elephant-1.0 branch... >>> Ian >>> On Sep 22, 2009, at 8:41 PM, Red Daly wrote: >>> >>> I should also note that I am using the version of elephant from darcs. ?And >>> I discovered that when the program went down it was due to a segfault (I >>> believe in emacs). ?However, all instances had been created under many >>> different transactions that did not abort. >>> >>> Here is some more fiddling around: >>> >>> CL-USER> (lisp-implementation-version) >>> "1.0.29.54.rc1" >>> BOOKS> (ele::get-db-schemas *ele-db* 'material) >>> NIL >>> BOOKS> (ele::controller-instance-class-index *ele-db*) >>> #>> oid:13701> >>> BOOKS> (ele:map-btree #'(lambda (key >>> val) >>> ? ? ? ? ? ? ? ? ? ? ? ? ? (format t "~S => ~S~%" key >>> val)) >>> ? ? ? ? ? ? ? ? ? ? ? (ele::controller-instance-class-index *ele-db*)) >>> 307 => >>> 307 >>> NIL >>> >>> >>> Red >>> >>> On Tue, Sep 22, 2009 at 8:08 PM, Red Daly wrote: >>>> >>>> I noticed there was a disparity between get-instances-by-class and >>>> map-inverted-index. ?I will let the code speak for itself: >>>> >>>> BOOKS> (length (ele:map-inverted-index #'(lambda (isbn obj) obj) 'material >>>> 'isbn :collect >>>> t)) >>>> >>>> 1945 >>>> BOOKS> (length (ele:get-instances-by-class 'material)) >>>> 0 >>>> BOOKS> (defparameter f (make-instance 'material :title "Fake Book")) >>>> >>>> F >>>> BOOKS> (length (ele:get-instances-by-class 'material)) >>>> >>>> 1 >>>> BOOKS> (length (ele:map-inverted-index #'(lambda (isbn obj) obj) 'material >>>> 'isbn :collect >>>> t)) >>>> 1946 >>>> >>>> There is a similar problem with the university class. >>>> >>>> BOOKS> (length (ele:get-instances-by-class 'university)) >>>> 0 >>>> BOOKS> *stanford-university* >>>> #>>> oid:204> >>>> BOOKS> (official-name *stanford-university*) >>>> "Stanford University" >>>> >>>> All of the instances in the database were created in a prior session. >>>> Then I shut down the DB and restarted Lisp. ?Now MAP-CLASS and >>>> GET-INSTANCES-BY-CLASS return nil for all classes. ?It seems like new >>>> instances get added to the "class index," but older instances are not >>>> found. ?However, these classes persist in the inverted slot indexes. ?Can >>>> anybody diagnose what's going on? >>>> >>>> here are the definitions of the classes: >>>> >>>> (defclass department () >>>> ? ((university :initarg :university :initform nil :accessor >>>> department-university >>>> ? ? ? ? ? ? ? ?:index t) >>>> ? ?(official-name :initarg :official-name :initform nil :accessor >>>> official-name) >>>> ? ?(common-name :initarg :common-name :initform nil :accessor common-name) >>>> ? ?(abbreviation :initarg :abbreviation :initform nil :accessor >>>> abbreviation >>>> ? ? ? ? ? ? ? ? ?:index t)) >>>> ? (:metaclass ele:persistent-metaclass) >>>> ? (:documentation "A department has a bunch of course listings.")) >>>> >>>> (defclass material () >>>> ? ((title :initarg :title :initform nil :accessor material-title >>>> ? ? ? ? ? :index t) >>>> ? ?(authors :initarg :authors :initform nil :accessor material-authors) ;; >>>> a list of >>>> authors >>>> ? ?(edition :initarg :edition :initform nil :accessor material-edition) >>>> ? ?(isbn :initarg :isbn :initform nil :accessor material-isbn >>>> ? ? ? ? ?:index t) >>>> ? ?(asin :initarg :asin :initform nil :accessor material-asin >>>> ? ? ? ? ?:index t >>>> ? ? ? ? ?:documentation "An Amazon.com identifier that uniquely identifies >>>> the material") >>>> ? ?(image-uri :initarg :image-uri :initform nil :accessor >>>> material-image-uri)) >>>> ? (:metaclass ele:persistent-metaclass)) >>>> >>>> Thanks, >>>> Red >>>> >>> >>> _______________________________________________ >>> 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 >> >> _______________________________________________ >> 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 >