From leslie.polzer at gmx.net Thu Jan 3 12:46:40 2008 From: leslie.polzer at gmx.net (Leslie P. Polzer) Date: Thu, 3 Jan 2008 13:46:40 +0100 (CET) Subject: [Cl-perec-devel] Problem compiling Message-ID: <64130.88.73.198.61.1199364400.squirrel@mail.stardawn.org> I got this while asdf-loading cl-perec: ; file: ./cl-perec/util/duplicates.lisp ; in: DEFMACRO BIND-CARTESIAN-PRODUCT* ; (METABANG.BIND:BIND ; ((CL-PEREC::NAMES-AND-VALUES (FIRST CL-PEREC::NAMES-VALUES-PAIRS)) ; (CL-PEREC::NAMES (FIRST CL-PEREC::NAMES-AND-VALUES)) ; (VALUES (REST CL-PEREC::NAMES-AND-VALUES))) ; (CONS 'PROGN ; (ITERATE:ITER (ITERATE:FOR IT.BESE.ARNESI:VALUE :IN VALUES) ; (ITERATE:COLLECT `(METABANG.BIND:BIND # #))))) ; ; caught ERROR: ; (in macroexpansion of (BIND # #)) ; (hint: For more precise location, try *BREAK-ON-SIGNALS*.) ; The value VALUES is not of type LIST. Any clues? Leslie -- My personal blog: http://blog.viridian-project.de/ From attila.lendvai at gmail.com Thu Jan 3 13:09:48 2008 From: attila.lendvai at gmail.com (Attila Lendvai) Date: Thu, 3 Jan 2008 22:09:48 +0900 Subject: [Cl-perec-devel] Problem compiling In-Reply-To: <64130.88.73.198.61.1199364400.squirrel@mail.stardawn.org> References: <64130.88.73.198.61.1199364400.squirrel@mail.stardawn.org> Message-ID: > ; file: ./cl-perec/util/duplicates.lisp > ; in: DEFMACRO BIND-CARTESIAN-PRODUCT* > ; (METABANG.BIND:BIND > ; ((CL-PEREC::NAMES-AND-VALUES (FIRST CL-PEREC::NAMES-VALUES-PAIRS)) > ; (CL-PEREC::NAMES (FIRST CL-PEREC::NAMES-AND-VALUES)) > ; (VALUES (REST CL-PEREC::NAMES-AND-VALUES))) > ; (CONS 'PROGN > ; (ITERATE:ITER (ITERATE:FOR IT.BESE.ARNESI:VALUE :IN VALUES) > ; (ITERATE:COLLECT `(METABANG.BIND:BIND # #))))) > ; > ; caught ERROR: > ; (in macroexpansion of (BIND # #)) > ; (hint: For more precise location, try *BREAK-ON-SIGNALS*.) > ; The value VALUES is not of type LIST. > > > Any clues? you're missing a fix. darcs pull your bind repo or pull from here: darcs pull http://common-lisp.net/project/cl-dwim/darcs/metabang-bind/ hth, -- attila From luismbo at gmail.com Mon Jan 7 15:28:33 2008 From: luismbo at gmail.com (=?ISO-8859-1?Q?Lu=EDs_Oliveira?=) Date: Mon, 7 Jan 2008 15:28:33 +0000 Subject: [Cl-perec-devel] Troubles with cl-perec Message-ID: <391f79580801070728k37258e9dp35607e2fe7939a40@mail.gmail.com> Hello, I'm playing with cl-perec and cl-rdbms whose feature sets are impressive, but that unfortunately aren't working for me. I'm using PostgreSQL 8.2.5 from Darwin Ports and SBCL 1.0.12.15 (ppc). I'm pretty sure I have the latest stuff of everything (including the branches from cl-dwim) and I have wiped out all my fasls and started anew. So here's a small test case, taken from cl-perec website: CL-USER> (asdf:oos 'asdf:load-op :cl-perec) [...] NIL CL-USER> (asdf:oos 'asdf:load-op :cl-rdbms.postmodern) [...] NIL CL-USER> (asdf:oos 'asdf:load-op :cl-perec-test) [...] NIL PRCT> (setq *database* (make-instance 'rdbms:postgresql-postmodern :connection-specification '(:database "rs" :user-name "rs" :password "rs"))) # PRCT> (start-sql-recording) ; No value PRCT> (defpclass c1 () ((s1 :type string :initform "no" :initarg :s1 :accessor s1-of))) # PRCT> (with-transaction (make-instance 'c1 :s1 "hello")) ; BEGIN ; SELECT relname FROM pg_class WHERE relkind = 'r' ; CREATE TABLE _c1 (_id BIGINT NOT NULL PRIMARY KEY, _s1 TEXT) WARNING: Postgres warning: CREATE TABLE / PRIMARY KEY will create implicit index "_c1_pkey" for table "_c1" ; COMMIT ; BEGIN ; SELECT relname FROM pg_class WHERE relkind = 'S' ; CREATE SEQUENCE _instance_id ; SELECT NEXTVAL('_instance_id') Somewhere around here, I get this error: There is no applicable method for the generic function # when called with arguments (#<# :begin-executed-p #t {14663BF9}>). [Condition of type SIMPLE-ERROR] ; COMMIT NIL T PRCT> Also, in this case I commited the transaction, had I not the _instance_id sequence wouldn't have been created but prc::*oid-instance-id-sequence-exists* would get set to T anyway and then I would get errors about _instance_id not existing. Any ideas? -- Lu?s Oliveira http://student.dei.uc.pt/~lmoliv/ From attila.lendvai at gmail.com Mon Jan 7 15:48:37 2008 From: attila.lendvai at gmail.com (Attila Lendvai) Date: Tue, 8 Jan 2008 00:48:37 +0900 Subject: [Cl-perec-devel] Troubles with cl-perec In-Reply-To: <391f79580801070728k37258e9dp35607e2fe7939a40@mail.gmail.com> References: <391f79580801070728k37258e9dp35607e2fe7939a40@mail.gmail.com> Message-ID: > There is no applicable method for the generic function > # > when called with arguments > (#<# :begin-executed-p #t {14663BF9}>). > [Condition of type SIMPLE-ERROR] az some background information: the actual transaction class is calculated using the database object (which is stored in *database*) by CL-RDBMS:MAKE-TRANSACTION and the shared-initialize of database. this missing method should be added by perec's transaction mixin. you can find an example of this in the file cl-perec-test.postgresql.asd (defmethod perform ((o load-op) (c (eql (find-system :cl-perec-test.postgresql)))) (eval (read-from-string "(progn (setf *database* (make-instance 'postgresql-postmodern :generated-transaction-class-name 'transaction :default-result-type 'vector :muffle-warnings t :transaction-mixin 'transaction-mixin :connection-specification cl-perec-system::*test-database-connection-specification*)))"))) :generated-transaction-class-name is the name of the generated transaction class :transaction-mixin is the missing mixin that adds some perec specific features :default-result-type tells what should cl-rdbms return in transactions created in connections to this database ... hth, -- attila From levente.meszaros at gmail.com Mon Jan 7 15:48:46 2008 From: levente.meszaros at gmail.com (=?ISO-8859-1?Q?Levente_M=E9sz=E1ros?=) Date: Mon, 7 Jan 2008 16:48:46 +0100 Subject: [Cl-perec-devel] Troubles with cl-perec In-Reply-To: <391f79580801070728k37258e9dp35607e2fe7939a40@mail.gmail.com> References: <391f79580801070728k37258e9dp35607e2fe7939a40@mail.gmail.com> Message-ID: On Jan 7, 2008 4:28 PM, Lu?s Oliveira wrote: > Hello, > > I'm playing with cl-perec and cl-rdbms whose feature sets are > impressive, but that unfortunately aren't working for me. I'm using > PostgreSQL 8.2.5 from Darwin Ports and SBCL 1.0.12.15 (ppc). I'm > pretty sure I have the latest stuff of everything (including the > branches from cl-dwim) and I have wiped out all my fasls and started > anew. So here's a small test case, taken from cl-perec website: > > CL-USER> (asdf:oos 'asdf:load-op :cl-perec) > [...] > NIL > CL-USER> (asdf:oos 'asdf:load-op :cl-rdbms.postmodern) > [...] > NIL > CL-USER> (asdf:oos 'asdf:load-op :cl-perec-test) > [...] > NIL > PRCT> (setq *database* > (make-instance 'rdbms:postgresql-postmodern > :connection-specification > '(:database "rs" :user-name "rs" :password "rs"))) > # > PRCT> (start-sql-recording) > ; No value > PRCT> (defpclass c1 () > ((s1 :type string :initform "no" :initarg :s1 :accessor s1-of))) > # > PRCT> (with-transaction > (make-instance 'c1 :s1 "hello")) > ; BEGIN > ; SELECT relname FROM pg_class WHERE relkind = 'r' > ; CREATE TABLE _c1 (_id BIGINT NOT NULL PRIMARY KEY, _s1 TEXT) > WARNING: > Postgres warning: CREATE TABLE / PRIMARY KEY will create implicit > index "_c1_pkey" for table "_c1" > ; COMMIT > ; BEGIN > ; SELECT relname FROM pg_class WHERE relkind = 'S' > ; CREATE SEQUENCE _instance_id > ; SELECT NEXTVAL('_instance_id') > > Somewhere around here, I get this error: > > There is no applicable method for the generic function > # > when called with arguments > (#<# :begin-executed-p #t {14663BF9}>). > [Condition of type SIMPLE-ERROR] > > ; COMMIT > NIL > T > PRCT> > > Also, in this case I commited the transaction, had I not the > _instance_id sequence wouldn't have been created but > prc::*oid-instance-id-sequence-exists* would get set to T anyway and > then I would get errors about _instance_id not existing. > > Any ideas? Hi, If you take a look at cl-perec-test.postgresql.asd: (make-instance 'postgresql-postmodern :generated-transaction-class-name 'transaction :default-result-type 'vector :muffle-warnings t :transaction-mixin 'transaction-mixin :connection-specification cl-perec-system::*test-database-connection-specification*) where transaction-mixin is a class which contains the per transaction instance cache. This class must be mixed into the RDBMS backend specific transaction class. This is done by cl-rdbms when the transaction is instantiated. If you include the transaction-mixin class and the default-result-type arguments then this problem should be solved. Let me know if there are still issues. levy ps: for a simple playground you may use (asdf:oos 'asdf:load-op :cl-perec-test.postgresql) and have a database created at '(:host "localhost" :database "perec-test" :user-name "perec-test" :password "test123") -- There's no perfectoin From luismbo at gmail.com Tue Jan 8 14:25:07 2008 From: luismbo at gmail.com (=?ISO-8859-1?Q?Lu=EDs_Oliveira?=) Date: Tue, 8 Jan 2008 14:25:07 +0000 Subject: [Cl-perec-devel] Troubles with cl-perec In-Reply-To: References: <391f79580801070728k37258e9dp35607e2fe7939a40@mail.gmail.com> Message-ID: <391f79580801080625v3c04a267v1f96117400cb3e7a@mail.gmail.com> On 07/01/2008, Levente M?sz?ros wrote: > (make-instance 'postgresql-postmodern > :generated-transaction-class-name 'transaction > :default-result-type 'vector > :muffle-warnings t > :transaction-mixin 'transaction-mixin > :connection-specification > cl-perec-system::*test-database-connection-specification*) Thanks for the very quick reply. (In duplicate too!) That indeed did the trick and I've been having with cl-perec and its general awesomeness without trouble. -- Lu?s Oliveira http://student.dei.uc.pt/~lmoliv/