From william.bruschi at gmail.com Sat Jul 3 13:16:52 2010 From: william.bruschi at gmail.com (William Bruschi) Date: Sat, 3 Jul 2010 09:16:52 -0400 Subject: [cl-prevalence-devel] Opening the transaction log - Clozure CL Message-ID: The Clozure CL implementation has added additional keywords to OPEN, including the :SHARING keyword which controls the access to the stream by multiple threads. The default value is :PRIVATE, which allows access to only the thread that created the stream. More info here: http://openmcl.clozure.com/manual/chapter9.1.html#CCL-Stream-Extensions I was using cl-prevalence as a backend for a Weblocks application when I stumbled upon thread locking errors while accessing the site with multiple browsers. Setting :SHARING to nil fixed my problem. Should this be the default behavior for cl-prevalence? After skimming the code, it appears cl-prevalence has it's own locking mechanisms, making Clozure's extra keyword arguments unnecessary. I also noticed in the TODO file that porting to ccl is on the list. In case anyone is curious, here's how to reproduce the error in Weblocks: 1. Create a new project as outlined in the bottom of http://trac.common-lisp.net/cl-weblocks/wiki/UserManual 2. Edit you init-session.lisp file to this: (defun init-user-session (root) (setf (widget-children root) (list (make-grid-edit)))) (defclass thing () ((id :initform nil :initarg :id :accessor thing-id :type (or null integer)) (name :initform nil :initarg :name :accessor thing-name))) (defun make-grid-edit () (make-instance 'gridedit :data-class 'thing)) 3. Open the site using two different browsers. Add a record using each browser. The second time you add a record, you receive this error: SIMPLE-ERROR: Stream #/transaction-log.xml"/15 ISO-8859-1) #x1987FB3E> is private to # From sky at viridian-project.de Sun Jul 4 12:27:16 2010 From: sky at viridian-project.de (Leslie P. Polzer) Date: Sun, 4 Jul 2010 14:27:16 +0200 (CEST) Subject: [cl-prevalence-devel] Opening the transaction log - Clozure CL In-Reply-To: References: Message-ID: <5b27391d5b7186dc573846128122ff3c.squirrel@mail.stardawn.org> William Bruschi wrote: > I was using cl-prevalence as a backend for a Weblocks application when > I stumbled upon thread locking errors while accessing the site with > multiple browsers. Setting :SHARING to nil fixed my problem. > > Should this be the default behavior for cl-prevalence? After skimming > the code, it appears cl-prevalence has it's own locking mechanisms, > making Clozure's extra keyword arguments unnecessary. I also noticed > in the TODO file that porting to ccl is on the list. Yes, please submit a patch to cl-prevalence and I shall apply it immediately. Leslie From sky at viridian-project.de Mon Jul 5 15:59:09 2010 From: sky at viridian-project.de (Leslie P. Polzer) Date: Mon, 5 Jul 2010 17:59:09 +0200 (CEST) Subject: [cl-prevalence-devel] Patch for serialization of arbitrary data In-Reply-To: <1276256099.2978.8.camel@krzys-desktop.home> References: <1276223419.9933.1.camel@krzys-desktop.home> <1276256099.2978.8.camel@krzys-desktop.home> Message-ID: <22533a84722f4ba8c41331ce540660fe.squirrel@mail.stardawn.org> Krzysztof Drewniak wrote: > --- src/serialization/xml.lisp.old 2010-06-10 20:50:24.000000000 -0500 > +++ src/serialization/xml.lisp 2010-06-10 21:24:34.000000000 -0500 > @@ -196,6 +196,12 @@ > (write-string "" stream))) > (write-string "" stream))))) > > +;;anything we don't know about > +(defmethod serialize-xml-internal (object stream serialization-state) > + (declare (ignore serialization-state)) > + (write-string "" stream) > + (print object stream) > + (write-string "" stream)) > > ;;;; DESERIALIZATION > > @@ -283,6 +289,11 @@ > (declare (ignore name attributes parent-seed seed)) > nil)) > > +(defmethod deserialize-xml-finish-element-aux ((name (eql :arbitrary)) > + attributes parent-seed seed) > + (declare (ignore name attributes parent-seed)) > + (read (make-string-input-stream seed))) > + I'm not sure whether this one is good. We're mixing XML and SEXP serialization. Do you have a specific use case? Leslie From sky at viridian-project.de Mon Jul 5 15:59:48 2010 From: sky at viridian-project.de (Leslie P. Polzer) Date: Mon, 5 Jul 2010 17:59:48 +0200 (CEST) Subject: [cl-prevalence-devel] 2D arrays In-Reply-To: <1276255377.2978.6.camel@krzys-desktop.home> References: <1276255377.2978.6.camel@krzys-desktop.home> Message-ID: <10026ac7ffc6b0c7b0fba5f90338f211.squirrel@mail.stardawn.org> Krzysztof Drewniak wrote: > Is there any major problems with getting 2D arrays (sequences of > sequences) serialized? (I'm working on a game and trying to find a > serialization libraryt that does what I need) cl-store doesn't support this by any chance? Leslie