From bobstopper at bobturf.org Mon Aug 1 05:12:29 2005 From: bobstopper at bobturf.org (Robert Marlow) Date: Mon, 1 Aug 2005 13:12:29 +0800 Subject: [Bese-devel] darcs patch: Lisp startable UCW Message-ID: <20050801051134.D342FCB9ED@spengler.bobturf.org> Mon Aug 1 13:07:20 WST 2005 Robert Marlow * Lisp startable UCW This should allow UCW to be easily startable from within lisp rather than from loading lisp start.lisp. The function for doing this is named create-server. ucwctl has been changed to make use of the new functionality but should work as it did before. defentry-point can now be used before its application has been attached to a server - when the application is attached to a server its entry points will then automatically be added. This makes it possible to load up system definitions containing defentry-points without having a running server beforehand. Thus lisp images can then be dumped containing full applications rather than just UCW. A get-backend method has been defined which creates a backend according to its arguments. It is also able to automatically choose a sensible default from currently loaded backends. It can also accept an existing, running server as a backend in which case it simply wraps it with a sensible UCW backend and returns it. This allows UCW applications to be attached to already running HTTP servers rather than requiring fresh servers be started by UCW. So far it's only been implemented for Araneida. I've only really tested the araneida and (briefly) HTTPD backends but the method of starting the backends should be similar to how start.lisp worked so I'm hoping I haven't broken anything. -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/x-darcs-patch Size: 13306 bytes Desc: A darcs patch for your repository! URL: From mb at bese.it Mon Aug 1 10:27:02 2005 From: mb at bese.it (Marco Baringer) Date: Mon, 01 Aug 2005 12:27:02 +0200 Subject: [Bese-devel] darcs patch: Lisp startable UCW In-Reply-To: <20050801051134.D342FCB9ED@spengler.bobturf.org> (Robert Marlow's message of "Mon, 1 Aug 2005 13:12:29 +0800") References: <20050801051134.D342FCB9ED@spengler.bobturf.org> Message-ID: Robert Marlow writes: first off: you rock! now, the comments: 1) is there a particularl reason you moved a bunch of configuration stuff into ucwctl? i have a few apps which don't use ucwctl (but have their own 'start.lisp' scripts) so i'll need to rewrite the code you've added to ucwctl. 2) mind if i rename get-backend to 'make-backend'? i know this may seem trivial but all of our functions which create new stuff are called 'make-XYZ', while the get-XYZ always returns an already existisng object. 3) i'm still looking through it so i may come up with other questions. > ] { > hunk ./bin/ucwctl 12 > -VARROOT=$UCWROOT/var > -LOGROOT=$UCWROOT/logs > +VARROOT="$UCWROOT/var" > +LOGROOT="$UCWROOT/logs" > +LOGLEVEL="INFO" > +HOST="127.0.0.1" > +PORT="8080" > +DEBUGGER="T" > +INSPECTOR="NIL" > +BACKEND="httpd" > +#BACKEND="mod-lisp" > +#BACKEND="aserve" > +#BACKEND="araneida" > +SYSTEMS="(:ucw :ucw.$BACKEND :ucw.admin :ucw.examples)" > +APPLICATIONS="(list it.bese.ucw-user::*example-application* > + ucw::*admin-application*)" > hunk ./bin/ucwctl 40 > - $LISP_LOAD $UCWROOT/bin/start.lisp > + $LISP_LOAD \ > + --eval "(defmethod print-object ((c asdf::missing-component) s) > + (format s \"Unable to find the system for ~S. > +asdf:*central-registry* is ~S. > +Are the symlinks and asdf:*central-registry* properly setup?\" \ > + (asdf::missing-requires c) \ > + asdf:*central-registry*))" \ > + --eval "(mapc (lambda (name) (asdf:oos 'asdf:load-op name)) '$SYSTEMS)" \ > + --eval "(ucw:start-swank)" \ > + --eval "(ucw:create-server :backend :$BACKEND > + :applications $APPLICATIONS > + :debugger $DEBUGGER > + :inspector $INSPECTOR > + :log-root-directory #P\"$LOGROOT/\" > + :log-level it.bese.arnesi:+$LOGLEVEL+ > + :host \"$HOST\" > + :port $PORT)" > hunk ./bin/ucwctl 60 > - --eval "(load \"$UCWROOT/bin/stop.lisp\")" > + --eval "(ucw:shutdown-server ucw:*default-server*)" \ > + --eval "(quit)" > hunk ./src/backend/araneida.lisp 12 > - ((listener :accessor listener :initarg :listener) > + ((listener :accessor listener :initarg :listener :initform nil) > hunk ./src/backend/araneida.lisp 38 > - &key (port 8080) (host "127.0.0.1")) > - (setf (listener backend) (make-instance (listener-class backend) :port port) > - (default-url backend) (araneida:make-url :scheme "http" :host host :port port))) > + &key (port 8080) (host "127.0.0.1")) > + (unless (listener backend) > + (setf (listener backend) (make-instance (listener-class backend) :port port) > + (default-url backend) (araneida:make-url :scheme "http" :host host :port port) > + (araneida::http-listener-default-hostname (listener backend)) host > + araneida::*default-url-defaults* (default-url backend)))) > hunk ./src/backend/araneida.lisp 56 > - #+clisp (araneida:host-serve-events)) > + #+clisp (araneida:host-serve-events)) > hunk ./src/backend/araneida.lisp 195 > + > + > +(defmethod get-backend ((backend araneida:http-listener) &optional host port) > + (declare (ignore host port)) > + (make-instance 'ucw:araneida-backend > + :listener backend > + :default-url (araneida:make-url :scheme "http" :host host :port port))) this is a particularly good idea :) > addfile ./src/control.lisp > hunk ./src/control.lisp 1 > +(in-package :ucw) > + > +(defun threaded-lisp-p () > + #+(and sbcl sb-thread) t > + #+(and cmu mp) t > + #+openmcl t) > + > + > +(defun start-swank () > + (if (threaded-lisp-p) > + (swank:create-server :dont-close t) > + (warn "Can't start slime server due to lack of threads."))) > + > + > +(defun create-server (&key (backend :default) applications debugger > + inspector host port (start-p t) > + (server-class 'standard-server) log-root-directory > + (log-level +info+)) > + "Creates and returns a UCW server according to SERVER-CLASS, HOST and > +PORT. Affects *DEFAULT-SERVER*. > + > +BACKEND may be :HTTPD, :MOD-LISP, :ASERVE, :ARANEIDA, an existing backend, > +an existing UCW server backend or :DEFAULT in which case it attempts to > +return a sane default from the UCW backends loaded and available. > + > +APPLICATIONS is a list of defined applications to be loaded into the > +server. > + > +DEBUGGER and INSPECTOR are booleans which affect *DEBUG-ON-ERROR* and > +*INSPECT-COMPONENTS* respectively. > + > +Logs are generated in verbosity defined by LOG-LEVEL and directed to > +LOG-ROOT-DIRECTORY if defined." > + (setf *debug-on-error* (or *debug-on-error* debugger) > + *inspect-components* (or *inspect-components* inspector)) > + > + (when log-root-directory > + (let ((ucw-logger (get-logger 'ucw::ucw-logger)) > + (ucw.backend (get-logger 'ucw::ucw.backend)) > + (ucw.log (merge-pathnames "ucw.log" log-root-directory)) > + (ucw.backend.log (merge-pathnames "ucw-backend.log" log-root-directory)) > + (console-appender (make-stream-log-appender))) > + > + (setf (appenders ucw-logger) (list console-appender > + (make-file-log-appender ucw.log)) > + (log.level ucw-logger) log-level > + (appenders ucw.backend) (list console-appender > + (make-file-log-appender ucw.backend.log))))) > + > + (let ((server nil)) > + > + (restart-case > + (when *default-server* > + (error "*DEFAULT-SERVER* already defined as ~A. > +Create another server anyway?" *default-server*)) > + (replace () > + :report "Replace *DEFAULT-SERVER* with a new server instance" > + (shutdown-server *default-server*) > + (setf *default-server* nil)) > + (continue () > + :report "Create an additional server")) > + (setf server (make-instance server-class)) > + (unless *default-server* > + (setf *default-server* server)) > + (setf (server.backend server) > + (get-backend backend host port)) > + (mapc (lambda (app) > + (register-application server app)) > + applications) > + (when start-p > + (startup-server server)) > + server)) > + > + > +(defgeneric get-backend (backend &optional host port) > + (:documentation "Returns a UCW server backend as requested by the > +functional arguments. BACKEND may be :HTTPD, :MOD-LISP, :ASERVE, > +:ARANEIDA, an existing backend, an existing UCW server backend or > +:DEFAULT in which case it attempts to return a sane default from > +the UCW backends loaded and available.")) > + > + > +(defmethod get-backend ((backend (eql :httpd)) &optional host port) > + (make-instance (if (threaded-lisp-p) > + 'ucw:multithread-httpd-backend > + 'ucw:httpd-backend) > + :host host > + :port port)) > + > + > +(defmethod get-backend ((backend (eql :mod-lisp)) &optional host port) > + (make-instance (if (threaded-lisp-p) > + 'ucw:multithread-mod-lisp-backend > + 'ucw:mod-lisp-backend) > + :host host > + :port 8080)) > + > + > +(defmethod get-backend ((backend (eql :aserve)) &optional host port) > + (declare (ignore host)) > + (make-instance 'ucw:aserve-backend :port 8080)) > + > + > +(defmethod get-backend ((backend (eql :araneida)) &optional host port) > + (make-instance 'ucw:araneida-backend > + :host host > + :port port)) > + > + > +(defmethod get-backend ((backend (eql :default)) &optional host port) > + (cond > + ((find-class 'mod-lisp-backend nil) > + (get-backend :mod-lisp host port)) > + ((find-class 'httpd-backend nil) > + (get-backend :httpd host port)) > + ((find-class 'aserve-backend nil) > + (get-backend :aserve host port)) > + ((find-class 'araneida-backend nil) > + (get-backend :araneida host port)) > + (t (error "No backends loaded and ready for use")))) > + > + > +(defmethod get-backend ((backend backend) &optional host port) > + (declare (ignore host port)) > + backend) > + > + > +(defmethod get-backend (backend &optional host port) > + (error "Unacceptable UCW backend ~A" backend)) > + > hunk ./src/packages.lisp 231 > - #:time-difference)) > + #:time-difference > + > + ;; Control utilities > + #:start-swank > + #:create-server)) > hunk ./src/rerl/standard-application.lisp 41 > - (register-entry-point (application.server app) > - (strcat (application.url-prefix app) url) > - entry-point)) > + (when (application.server app) > + (register-entry-point (application.server app) > + (strcat (application.url-prefix app) url) > + entry-point))) > hunk ./src/rerl/standard-classes.lisp 37 > + (started :accessor server.started :initform nil :initarg :started) > hunk ./src/rerl/standard-classes.lisp 80 > + > hunk ./src/rerl/standard-server.lisp 16 > + (setf (server.started server) t) > hunk ./src/rerl/standard-server.lisp 40 > - (application.url-prefix app))))) > + (application.url-prefix app))) > + (maphash (lambda (url entry-point) > + (register-entry-point server > + (strcat (application.url-prefix app) url) > + entry-point)) > + (application.entry-points app)))) > hunk ./src/vars.lisp 7 > -(defvar *debug-on-error*) > +(defvar *debug-on-error* nil) > hunk ./src/vars.lisp 9 > -(defvar *ucw-tal-root*) > +(defvar *ucw-tal-root* > + (merge-pathnames (make-pathname :directory '(:relative "wwwroot")) > + (asdf:component-pathname (asdf:find-system :ucw)))) > hunk ./src/vars.lisp 13 > -(defvar *inspect-components*) > +(defvar *inspect-components* nil) > hunk ./ucw.asd 92 > - :depends-on ("packages" :rerl))))) > + :depends-on ("packages" :rerl)) > + (:file "control" > + :depends-on ("packages" :backend :rerl))))) > } > > Context: > > [bash -> sh > Julian Stecklina **20050731145119] > [When creating the string for request paramteers use the same element-type as the raw-uri array > Marco Baringer **20050730114429] > [Use defcomponent instead of defclass for simple-template-component > Marco Baringer **20050726095406] > [Instead of looking for a property named VERSIONS we now call it :FEATURES. Updated the error message accordingly > Marco Baringer **20050729103158] > [Renamed 'version' to 'feature' in asdf property check. added check for cps-interpreter > Marco Baringer **20050728120322] > [Changes to the stylesheet > Marco Baringer **20050728120129] > [template-component-environment methods must always return a fresh list > Marco Baringer **20050725121551] > [Make the wiki example use the show-window macro > Marco Baringer **20050725121447] > [Added SHOW and SHOW-WINDOW macros > Marco Baringer **20050725121421] > [Post method for login component > matley at innerloop.it**20050724142609] > [Added initarg to client-value (form-component) > matley at innerloop.it**20050723142419] > [Little typo bugfix > matley at innerloop.it**20050722200835] > [Only use copy-seq on the request parameters if thay are strings (as opposed to mime-part objects) > Marco Baringer **20050721154259] > [Export the mime-part accessors > Marco Baringer **20050721154124] > [Update component slots and backtrack slots when reinitializing component classes > Marco Baringer **20050718172834] > [Allow defcomponent slot forms to be symbols (some effect as with defclass) > Marco Baringer **20050718171831] > [More accurate information regarding versions and how to get the software. > Jos?? Pablo Ezequiel Fern??ndez **20050718033950] > [More changes regarding dependencies. > Jos?? Pablo Ezequiel Fern??ndez **20050717214720] > [Some clear statements about the dependencies (more is still neede). > Jos?? Pablo Ezequiel Fern??ndez **20050717213407] > [Make ucw's installation directory an explicit configuration variable in make-image.lisp > Marco Baringer **20050717191936] > [Remove useless debugging code from ucw-tags.lisp > Marco Baringer **20050717191301] > [Fix handling of HTTR response status codes in aserve backend (Patch by: Antonio Menezes Leitao ) > Marco Baringer **20050717190254] > [Fix handling of HTTP request/respons headers in aserve backend. (Patch by: Antonio Menezes Leitao ) > Marco Baringer **20050717185826] > [Initial Import from arch > Marco Baringer **20050706133829 > This patch is exactly equal to ucw-2004 at common-lisp.net/ucw--dev--0.3--patch-426 it simply > represents the move over to darcs. > ] > [Added boring file > Marco Baringer **20050706132641] > Patch bundle hash: > 544613ec9e5780e48c348da7472bba4343554ed4 > > _______________________________________________ > bese-devel mailing list > bese-devel at common-lisp.net > http://common-lisp.net/cgi-bin/mailman/listinfo/bese-devel From marco_simon at web.de Mon Aug 1 10:33:17 2005 From: marco_simon at web.de (Marco Simon) Date: Mon, 01 Aug 2005 12:33:17 +0200 Subject: [Bese-devel] how to set ucw-documentroot ? Message-ID: <42EDFA6D.207@web.de> Hi list, I've just set up my ucw as follows: ucw's bin's are in /home/ucw/ucw/bin all libs for ucw are in /home/ucw/* the ucw-package ist in /hme/ucw/ucw/* I've set up apache 1.33 with mod_lisp and the following httpd.conf - modifications: LoadModule lisp_module /usr/lib/apache/1.3/mod_lisp.so AddModule mod_lisp.c LispServer 127.0.0.1 3000 "mylisp" SetHandler lisp-handler Beside that I changed /home/ucw/ucw/bin/utils.lisp to use the port 3000 (instead of 3001) for the mod-lisp-backend and activated the mod-lisp-backend in /home/ucw/ucw/bin/start.lisp by commenting-out the following lines: ;(use-httpd-backend) (use-mod-lisp-backend) ;(use-aserve-backend) ;(use-araneida-backend) After this modifications the ucw seems to run and listen on port 3000. Whatever, if I try to connect to myWebServerHost:80/asp/ I get an normal autoindex returned from my webserver. That's ok so far. But as soon as I try to connect to myWebServerHost:80/asp/* (e.g. /asp/myfile.lips) I always get an ucw-created error retuned: /asp/something_existing.lisp not found. I guess I've got some failure in my configuration settings, but I haven'nt any idea how to fix it. Could please give me some hints how to set the path to my lisp wwwroot correctly ? Thanks a lot in advance, best regards Marco From bobstopper at bobturf.org Mon Aug 1 11:08:23 2005 From: bobstopper at bobturf.org (Robert Marlow) Date: Mon, 01 Aug 2005 19:08:23 +0800 Subject: [Bese-devel] darcs patch: Lisp startable UCW In-Reply-To: References: <20050801051134.D342FCB9ED@spengler.bobturf.org> Message-ID: <87oe8hncd4.wl%bobstopper@bobturf.org> Aw, it was nuthin :) 1. The intention wasn't so much to move configuration to ucwctl... it was more to make use of create-server which accepts the configuration stuff as its arguments. I don't think my changes should break the existing start.lisp... I haven't checked though. If you don't use ucwctl perhaps your start.lisp files will continue to work? Lemme know what it breaks and I'll see if I can fix what I've broken. On a related note, would it be more useful to have the config stuff put into a separate ucw.conf file? I've written config-file asdf loaders before to handle that kinda stuff and it shouldn't be too difficult to do the same for UCW though I'd imagine such things possibly belong in final applications rather than UCW itself. 2. Go right ahead. Someone else has pointed out get-backend was a crap name. I wasn't really thinking too hard about the name when I wrote it. At Mon, 01 Aug 2005 12:27:02 +0200, Marco Baringer wrote: > > Robert Marlow writes: > > first off: you rock! > > now, the comments: > > 1) is there a particularl reason you moved a bunch of configuration > stuff into ucwctl? i have a few apps which don't use ucwctl (but > have their own 'start.lisp' scripts) so i'll need to rewrite the > code you've added to ucwctl. > > 2) mind if i rename get-backend to 'make-backend'? i know this may > seem trivial but all of our functions which create new stuff are > called 'make-XYZ', while the get-XYZ always returns an already > existisng object. > > 3) i'm still looking through it so i may come up with other questions. From mb at bese.it Mon Aug 1 12:45:46 2005 From: mb at bese.it (Marco Baringer) Date: Mon, 01 Aug 2005 14:45:46 +0200 Subject: [Bese-devel] how to set ucw-documentroot ? In-Reply-To: <42EDFA6D.207@web.de> (Marco Simon's message of "Mon, 01 Aug 2005 12:33:17 +0200") References: <42EDFA6D.207@web.de> Message-ID: Marco Simon writes: > After this modifications the ucw seems to run and listen on port 3000. > Whatever, if I try to connect to myWebServerHost:80/asp/ I get an normal > autoindex returned from my webserver. That's ok so far. > But as soon as I try to connect to myWebServerHost:80/asp/* > (e.g. /asp/myfile.lips) > I always get an ucw-created error retuned: > /asp/something_existing.lisp not found. how are you setting up the somethi_existing.lisp entry point? does /asp/ucw/examples/index.ucw work? (NB: for this to work you will have to change tthe url-prefix from "/ucw/examples/" to "/asp/ucw/examples/" (look in ucw/examples/examples.lisp:9)) -- -Marco Ring the bells that still can ring. Forget the perfect offering. There is a crack in everything. That's how the light gets in. -Leonard Cohen From smoof-ra at elder-gods.org Mon Aug 1 18:50:33 2005 From: smoof-ra at elder-gods.org (Larry D'Anna) Date: Mon, 1 Aug 2005 14:50:33 -0400 Subject: [Bese-devel] declarations In-Reply-To: <20050727151240.GA7447@melkor.elder-gods.org> References: <20050726170217.GA17394@melkor.elder-gods.org> <20050727151240.GA7447@melkor.elder-gods.org> Message-ID: <20050801185033.GA26811@melkor.elder-gods.org> * Larry D'Anna (smoof-ra at elder-gods.org) [050727 11:13]: > (sorry for sending this to you twice marco) > > * Marco Baringer (mb at bese.it) [050727 01:26]: > > Larry D'Anna writes: > > > > > Marco: could you have walk-form not throw away declarations? Or would > > > you accept a patch to that effect? > > > > no problem, where do you want me to put them? is a new slot on > > implicit-progn enough or should be go all the way and store them along > > with the variables/functions? > > A new slot on implicit-progn is fine for what I'm doing. Thanks! Here's a patch. --larry -------------- next part -------------- New patches: [initial support for remembering declarations smoof-ra at elder-gods.org**20050801184329 this patch adds a mixin called implicit-progn-with-declare-mixin and uses it instead of implicit-progn-mixin in all the places that allow declares. It has slot which should contain a list of the declares at the top of the implicit-progn. This patch doesn't do anything clever with the declares, it just creates declaration-form objects and points their source slots at the original declares, however it would be easy to modify parse-declaration to generate more usefull declaration objects. ] { hunk ./src/walk.lisp 117 +(defclass implicit-progn-with-declare-mixin (implicit-progn-mixin) + ((declares :accessor declares :initarg :declares))) + hunk ./src/walk.lisp 123 +(defmacro multiple-value-setf (places form) + (let ((names (loop for place in places collect (gensym)))) + `(multiple-value-bind ,names ,form + ,@(loop for name in names for place in places if (null place) collect `(declare (ignore ,name))) + (setf ,@(loop + for name in names + for place in places + if place collect place + if place collect name))))) + hunk ./src/walk.lisp 134 - (let ((documentation nil)) + (let ((documentation nil) + (decl nil) + (decls nil)) hunk ./src/walk.lisp 138 - (return-from split-body (values body env documentation)))) + (return-from split-body (values body env documentation decls)))) hunk ./src/walk.lisp 147 - (setf env (parse-declaration dec env)))) + (multiple-value-setf (env decl) (parse-declaration dec env)) + (when decl + (push decl decls)))) hunk ./src/walk.lisp 170 +(defclass declaration-form (form) + ()) + hunk ./src/walk.lisp 204 - environment) + (values environment declaration)) hunk ./src/walk.lisp 207 - (multiple-value-bind (body env docstring) + (multiple-value-bind (body env docstring declarations) hunk ./src/walk.lisp 212 - docstring))) + docstring + declarations))) hunk ./src/walk.lisp 306 -(defclass lambda-function-form (function-form implicit-progn-mixin) +(defclass lambda-function-form (function-form implicit-progn-with-declare-mixin) hunk ./src/walk.lisp 363 - (setf (body func) (walk-implict-progn func (cddr form) env :declare t)) + (multiple-value-setf ((body func) nil (declares func)) (walk-implict-progn func (cddr form) env :declare t)) hunk ./src/walk.lisp 503 -(defclass function-binding-form (form binding-form-mixin implicit-progn-mixin) +(defclass function-binding-form (form binding-form-mixin implicit-progn-with-declare-mixin) hunk ./src/walk.lisp 522 - (setf (body flet) (walk-implict-progn flet - body - (loop - with env = env - for (name . lambda) in (binds flet) - do (setf env (register env :flet name lambda)) - finally (return env)) - :declare t))))) + (multiple-value-setf ((body flet) nil (declares flet)) + (walk-implict-progn flet + body + (loop + with env = env + for (name . lambda) in (binds flet) + do (setf env (register env :flet name lambda)) + finally (return env)) + :declare t))))) hunk ./src/walk.lisp 562 -(defclass variable-binding-form (form binding-form-mixin implicit-progn-mixin) +(defclass variable-binding-form (form binding-form-mixin implicit-progn-with-declare-mixin) hunk ./src/walk.lisp 578 - (setf (body let) (walk-implict-progn let (cddr form) env :declare t)))) + (multiple-value-setf ((body let) nil (declares let)) (walk-implict-progn let (cddr form) env :declare t)))) hunk ./src/walk.lisp 588 - (setf (binds let*) (nreverse (binds let*)) - (body let*) (walk-implict-progn let* (cddr form) env :declare t)))) + (setf (binds let*) (nreverse (binds let*))) + (multiple-value-setf ((body let*) nil (declares let*)) (walk-implict-progn let* (cddr form) env :declare t)))) hunk ./src/walk.lisp 593 -(defclass locally-form (form implicit-progn-mixin) +(defclass locally-form (form implicit-progn-with-declare-mixin) hunk ./src/walk.lisp 598 - (setf (body locally) (walk-implict-progn locally (cdr form) env :declare t)))) + (multiple-value-setf ((body locally) nil (declares locally)) (walk-implict-progn locally (cdr form) env :declare t)))) hunk ./src/walk.lisp 602 -(defclass macrolet-form (form binding-form-mixin implicit-progn-mixin) +(defclass macrolet-form (form binding-form-mixin implicit-progn-with-declare-mixin) hunk ./src/walk.lisp 612 - (setf (binds macrolet) (nreverse (binds macrolet)) - (body macrolet) (walk-implict-progn macrolet (cddr form) env :declare t)))) + (setf (binds macrolet) (nreverse (binds macrolet))) + (multiple-value-setf ((body macrolet) nil (declares macrolet)) (walk-implict-progn macrolet (cddr form) env :declare t)))) hunk ./src/walk.lisp 685 -(defclass symbol-macrolet-form (form binding-form-mixin implicit-progn-mixin) +(defclass symbol-macrolet-form (form binding-form-mixin implicit-progn-with-declare-mixin) } Context: [Call the property :FEATURES, not FEATURES Marco Baringer **20050729103229] [Rename asdf property version to features, add "cps-interpreter" Marco Baringer **20050728120238] [dont need to register allow-other-keys because its not a binding smoof-ra at elder-gods.org**20050727153603] [fixed type name mismatch for allow-other-keys-function-arguement-form smoof-ra at elder-gods.org**20050727152456] [defmethod arguments should be ignorable, not ignore (openmcl warns whenever you ignore a specialized argument) Marco Baringer **20050726090308] [Typo in extract-argument-names Marco Baringer **20050726090256] [Fix generation of defmethod froms from defmethod/cc; added tests Marco Baringer **20050726085226] [Fix handling of optional arguments in apply-cps-lambda Marco Baringer **20050726085155] [More tests Marco Baringer **20050723133158] [Fix a bug in the handling of the case when LOOKUP finds a value for a name but the value is NIL Marco Baringer **20050723133106] [Export the symbol KALL Marco Baringer **20050723133052] [Change the test for constant-form'ness in walk.lisp Marco Baringer **20050723113019] [Extend the walker to handle #'(setf foo) function names Marco Baringer **20050723104431] [Fix bug in the lambda generated for method forms Marco Baringer **20050720144450] [Added ignore declarations to defun/cc and defmethod/cc to make the compiler happy Marco Baringer **20050720110112] [Temporarily comment out the log tests Marco Baringer **20050720092312] [Rename (optional|keyword|rest)-argument-form classes to include the -form suffix Marco Baringer **20050720092124] [Allow defun/cc defined functions te be called outside of a with-call/cc Marco Baringer **20050720091826] [Added support for &optional arguments in cps closures Marco Baringer **20050720091658] [Added defgeneric/cc Marco Baringer **20050719153441] [Move the error checking code for lambda arguments into apply, not lambda (in cps interpreter) Marco Baringer **20050719153121] [More cps tests Marco Baringer **20050719152327] [Fix openmcl's definition of lexical-variables to deal with ccl::definition-environment Marco Baringer **20050719152230] [Added support to the cps interpreter forl communicating with lexical variables Marco Baringer **20050707094608] [walk.lisp depends on lexenv.lisp Marco Baringer **20050707093140] [added support for walking local varibales in the lexical environment Marco Baringer **20050707093027 this applies to all those variables defined the envorinment object grabbed via an &environment macro argument. ] [mistyped #+openmcl in lexenv.lisp Marco Baringer **20050707092959] [added src/lexenv.lisp to arnesi.asd Marco Baringer **20050707091127] [Rename src/environment.lisp Marco Baringer **20050707091114] [Initial version of environment.lisp Marco Baringer **20050707091019] [Minor docstring fixup for with-call/cc Marco Baringer **20050707090619] [Big patch including all the cps interpreter stuff upto now Marco Baringer **20050707083739] [Fix bug in handling of defclass-struct's :predicate option Marco Baringer **20050706105324] [Initial Import Marco Baringer **20050706101657 This import moves arnesi from arch to darcs. Nothing has actually changed since bese-2004 at common-lisp.net/arnesi--dev--1.4--patch-14 ] [added arch stuff to boring file Marco Baringer **20050706101630] [Setup boring file Marco Baringer **20050706100535] Patch bundle hash: 27538f2839b9eae10fc6c01ed7e15e455a4ffdfe From smoof-ra at elder-gods.org Mon Aug 1 18:58:10 2005 From: smoof-ra at elder-gods.org (Larry D'Anna) Date: Mon, 1 Aug 2005 14:58:10 -0400 Subject: [Bese-devel] declarations In-Reply-To: <20050801185033.GA26811@melkor.elder-gods.org> References: <20050726170217.GA17394@melkor.elder-gods.org> <20050727151240.GA7447@melkor.elder-gods.org> <20050801185033.GA26811@melkor.elder-gods.org> Message-ID: <20050801185810.GA27407@melkor.elder-gods.org> * Larry D'Anna (smoof-ra at elder-gods.org) [050801 14:50]: > * Larry D'Anna (smoof-ra at elder-gods.org) [050727 11:13]: > > (sorry for sending this to you twice marco) > > > > * Marco Baringer (mb at bese.it) [050727 01:26]: > > > Larry D'Anna writes: > > > > > > > Marco: could you have walk-form not throw away declarations? Or would > > > > you accept a patch to that effect? > > > > > > no problem, where do you want me to put them? is a new slot on > > > implicit-progn enough or should be go all the way and store them along > > > with the variables/functions? > > > > A new slot on implicit-progn is fine for what I'm doing. Thanks! > > Here's a patch. I forgot a line on that patch, here's the right one. --larry -------------- next part -------------- New patches: [initial support for remembering declarations smoof-ra at elder-gods.org**20050801184329 this patch adds a mixin called implicit-progn-with-declare-mixin and uses it instead of implicit-progn-mixin in all the places that allow declares. It has slot which should contain a list of the declares at the top of the implicit-progn. This patch doesn't do anything clever with the declares, it just creates declaration-form objects and points their source slots at the original declares, however it would be easy to modify parse-declaration to generate more usefull declaration objects. ] { hunk ./src/walk.lisp 117 +(defclass implicit-progn-with-declare-mixin (implicit-progn-mixin) + ((declares :accessor declares :initarg :declares))) + hunk ./src/walk.lisp 123 +(defmacro multiple-value-setf (places form) + (let ((names (loop for place in places collect (gensym)))) + `(multiple-value-bind ,names ,form + ,@(loop for name in names for place in places if (null place) collect `(declare (ignore ,name))) + (setf ,@(loop + for name in names + for place in places + if place collect place + if place collect name))))) + hunk ./src/walk.lisp 134 - (let ((documentation nil)) + (let ((documentation nil) + (decl nil) + (decls nil)) hunk ./src/walk.lisp 138 - (return-from split-body (values body env documentation)))) + (return-from split-body (values body env documentation decls)))) hunk ./src/walk.lisp 147 - (setf env (parse-declaration dec env)))) + (multiple-value-setf (env decl) (parse-declaration dec env)) + (when decl + (push decl decls)))) hunk ./src/walk.lisp 170 +(defclass declaration-form (form) + ()) + hunk ./src/walk.lisp 204 - environment) + (values environment declaration)) hunk ./src/walk.lisp 207 - (multiple-value-bind (body env docstring) + (multiple-value-bind (body env docstring declarations) hunk ./src/walk.lisp 212 - docstring))) + docstring + declarations))) hunk ./src/walk.lisp 306 -(defclass lambda-function-form (function-form implicit-progn-mixin) +(defclass lambda-function-form (function-form implicit-progn-with-declare-mixin) hunk ./src/walk.lisp 363 - (setf (body func) (walk-implict-progn func (cddr form) env :declare t)) + (multiple-value-setf ((body func) nil (declares func)) (walk-implict-progn func (cddr form) env :declare t)) hunk ./src/walk.lisp 503 -(defclass function-binding-form (form binding-form-mixin implicit-progn-mixin) +(defclass function-binding-form (form binding-form-mixin implicit-progn-with-declare-mixin) hunk ./src/walk.lisp 522 - (setf (body flet) (walk-implict-progn flet - body - (loop - with env = env - for (name . lambda) in (binds flet) - do (setf env (register env :flet name lambda)) - finally (return env)) - :declare t))))) + (multiple-value-setf ((body flet) nil (declares flet)) + (walk-implict-progn flet + body + (loop + with env = env + for (name . lambda) in (binds flet) + do (setf env (register env :flet name lambda)) + finally (return env)) + :declare t))))) hunk ./src/walk.lisp 562 -(defclass variable-binding-form (form binding-form-mixin implicit-progn-mixin) +(defclass variable-binding-form (form binding-form-mixin implicit-progn-with-declare-mixin) hunk ./src/walk.lisp 578 - (setf (body let) (walk-implict-progn let (cddr form) env :declare t)))) + (multiple-value-setf ((body let) nil (declares let)) (walk-implict-progn let (cddr form) env :declare t)))) hunk ./src/walk.lisp 588 - (setf (binds let*) (nreverse (binds let*)) - (body let*) (walk-implict-progn let* (cddr form) env :declare t)))) + (setf (binds let*) (nreverse (binds let*))) + (multiple-value-setf ((body let*) nil (declares let*)) (walk-implict-progn let* (cddr form) env :declare t)))) hunk ./src/walk.lisp 593 -(defclass locally-form (form implicit-progn-mixin) +(defclass locally-form (form implicit-progn-with-declare-mixin) hunk ./src/walk.lisp 598 - (setf (body locally) (walk-implict-progn locally (cdr form) env :declare t)))) + (multiple-value-setf ((body locally) nil (declares locally)) (walk-implict-progn locally (cdr form) env :declare t)))) hunk ./src/walk.lisp 602 -(defclass macrolet-form (form binding-form-mixin implicit-progn-mixin) +(defclass macrolet-form (form binding-form-mixin implicit-progn-with-declare-mixin) hunk ./src/walk.lisp 612 - (setf (binds macrolet) (nreverse (binds macrolet)) - (body macrolet) (walk-implict-progn macrolet (cddr form) env :declare t)))) + (setf (binds macrolet) (nreverse (binds macrolet))) + (multiple-value-setf ((body macrolet) nil (declares macrolet)) (walk-implict-progn macrolet (cddr form) env :declare t)))) hunk ./src/walk.lisp 685 -(defclass symbol-macrolet-form (form binding-form-mixin implicit-progn-mixin) +(defclass symbol-macrolet-form (form binding-form-mixin implicit-progn-with-declare-mixin) } [oops i forgot to actually make the declaration-form instances smoof-ra at elder-gods.org**20050801185641] { hunk ./src/walk.lisp 204 - (values environment declaration)) + (values environment (make-instance 'declaration-form :source declaration))) } Context: [Call the property :FEATURES, not FEATURES Marco Baringer **20050729103229] [Rename asdf property version to features, add "cps-interpreter" Marco Baringer **20050728120238] [dont need to register allow-other-keys because its not a binding smoof-ra at elder-gods.org**20050727153603] [fixed type name mismatch for allow-other-keys-function-arguement-form smoof-ra at elder-gods.org**20050727152456] [defmethod arguments should be ignorable, not ignore (openmcl warns whenever you ignore a specialized argument) Marco Baringer **20050726090308] [Typo in extract-argument-names Marco Baringer **20050726090256] [Fix generation of defmethod froms from defmethod/cc; added tests Marco Baringer **20050726085226] [Fix handling of optional arguments in apply-cps-lambda Marco Baringer **20050726085155] [More tests Marco Baringer **20050723133158] [Fix a bug in the handling of the case when LOOKUP finds a value for a name but the value is NIL Marco Baringer **20050723133106] [Export the symbol KALL Marco Baringer **20050723133052] [Change the test for constant-form'ness in walk.lisp Marco Baringer **20050723113019] [Extend the walker to handle #'(setf foo) function names Marco Baringer **20050723104431] [Fix bug in the lambda generated for method forms Marco Baringer **20050720144450] [Added ignore declarations to defun/cc and defmethod/cc to make the compiler happy Marco Baringer **20050720110112] [Temporarily comment out the log tests Marco Baringer **20050720092312] [Rename (optional|keyword|rest)-argument-form classes to include the -form suffix Marco Baringer **20050720092124] [Allow defun/cc defined functions te be called outside of a with-call/cc Marco Baringer **20050720091826] [Added support for &optional arguments in cps closures Marco Baringer **20050720091658] [Added defgeneric/cc Marco Baringer **20050719153441] [Move the error checking code for lambda arguments into apply, not lambda (in cps interpreter) Marco Baringer **20050719153121] [More cps tests Marco Baringer **20050719152327] [Fix openmcl's definition of lexical-variables to deal with ccl::definition-environment Marco Baringer **20050719152230] [Added support to the cps interpreter forl communicating with lexical variables Marco Baringer **20050707094608] [walk.lisp depends on lexenv.lisp Marco Baringer **20050707093140] [added support for walking local varibales in the lexical environment Marco Baringer **20050707093027 this applies to all those variables defined the envorinment object grabbed via an &environment macro argument. ] [mistyped #+openmcl in lexenv.lisp Marco Baringer **20050707092959] [added src/lexenv.lisp to arnesi.asd Marco Baringer **20050707091127] [Rename src/environment.lisp Marco Baringer **20050707091114] [Initial version of environment.lisp Marco Baringer **20050707091019] [Minor docstring fixup for with-call/cc Marco Baringer **20050707090619] [Big patch including all the cps interpreter stuff upto now Marco Baringer **20050707083739] [Fix bug in handling of defclass-struct's :predicate option Marco Baringer **20050706105324] [Initial Import Marco Baringer **20050706101657 This import moves arnesi from arch to darcs. Nothing has actually changed since bese-2004 at common-lisp.net/arnesi--dev--1.4--patch-14 ] [added arch stuff to boring file Marco Baringer **20050706101630] [Setup boring file Marco Baringer **20050706100535] Patch bundle hash: 79722b16767d5673b199a28db95457ea74d0a7bc From smoof-ra at elder-gods.org Mon Aug 1 19:32:59 2005 From: smoof-ra at elder-gods.org (Larry D'Anna) Date: Mon, 1 Aug 2005 15:32:59 -0400 Subject: [Bese-devel] declarations In-Reply-To: <20050801185810.GA27407@melkor.elder-gods.org> References: <20050726170217.GA17394@melkor.elder-gods.org> <20050727151240.GA7447@melkor.elder-gods.org> <20050801185033.GA26811@melkor.elder-gods.org> <20050801185810.GA27407@melkor.elder-gods.org> Message-ID: <20050801193259.GA29802@melkor.elder-gods.org> * Larry D'Anna (smoof-ra at elder-gods.org) [050801 14:58]: > * Larry D'Anna (smoof-ra at elder-gods.org) [050801 14:50]: > > * Larry D'Anna (smoof-ra at elder-gods.org) [050727 11:13]: > > > (sorry for sending this to you twice marco) > > > > > > * Marco Baringer (mb at bese.it) [050727 01:26]: > > > > Larry D'Anna writes: > > > > > > > > > Marco: could you have walk-form not throw away declarations? Or would > > > > > you accept a patch to that effect? > > > > > > > > no problem, where do you want me to put them? is a new slot on > > > > implicit-progn enough or should be go all the way and store them along > > > > with the variables/functions? > > > > > > A new slot on implicit-progn is fine for what I'm doing. Thanks! > > > > Here's a patch. > > I forgot a line on that patch, here's the right one. Sorry for the three emails. I have one more line for you :-) --larry -------------- next part -------------- New patches: [initial support for remembering declarations smoof-ra at elder-gods.org**20050801184329 this patch adds a mixin called implicit-progn-with-declare-mixin and uses it instead of implicit-progn-mixin in all the places that allow declares. It has slot which should contain a list of the declares at the top of the implicit-progn. This patch doesn't do anything clever with the declares, it just creates declaration-form objects and points their source slots at the original declares, however it would be easy to modify parse-declaration to generate more usefull declaration objects. ] { hunk ./src/walk.lisp 117 +(defclass implicit-progn-with-declare-mixin (implicit-progn-mixin) + ((declares :accessor declares :initarg :declares))) + hunk ./src/walk.lisp 123 +(defmacro multiple-value-setf (places form) + (let ((names (loop for place in places collect (gensym)))) + `(multiple-value-bind ,names ,form + ,@(loop for name in names for place in places if (null place) collect `(declare (ignore ,name))) + (setf ,@(loop + for name in names + for place in places + if place collect place + if place collect name))))) + hunk ./src/walk.lisp 134 - (let ((documentation nil)) + (let ((documentation nil) + (decl nil) + (decls nil)) hunk ./src/walk.lisp 138 - (return-from split-body (values body env documentation)))) + (return-from split-body (values body env documentation decls)))) hunk ./src/walk.lisp 147 - (setf env (parse-declaration dec env)))) + (multiple-value-setf (env decl) (parse-declaration dec env)) + (when decl + (push decl decls)))) hunk ./src/walk.lisp 170 +(defclass declaration-form (form) + ()) + hunk ./src/walk.lisp 204 - environment) + (values environment declaration)) hunk ./src/walk.lisp 207 - (multiple-value-bind (body env docstring) + (multiple-value-bind (body env docstring declarations) hunk ./src/walk.lisp 212 - docstring))) + docstring + declarations))) hunk ./src/walk.lisp 306 -(defclass lambda-function-form (function-form implicit-progn-mixin) +(defclass lambda-function-form (function-form implicit-progn-with-declare-mixin) hunk ./src/walk.lisp 363 - (setf (body func) (walk-implict-progn func (cddr form) env :declare t)) + (multiple-value-setf ((body func) nil (declares func)) (walk-implict-progn func (cddr form) env :declare t)) hunk ./src/walk.lisp 503 -(defclass function-binding-form (form binding-form-mixin implicit-progn-mixin) +(defclass function-binding-form (form binding-form-mixin implicit-progn-with-declare-mixin) hunk ./src/walk.lisp 522 - (setf (body flet) (walk-implict-progn flet - body - (loop - with env = env - for (name . lambda) in (binds flet) - do (setf env (register env :flet name lambda)) - finally (return env)) - :declare t))))) + (multiple-value-setf ((body flet) nil (declares flet)) + (walk-implict-progn flet + body + (loop + with env = env + for (name . lambda) in (binds flet) + do (setf env (register env :flet name lambda)) + finally (return env)) + :declare t))))) hunk ./src/walk.lisp 562 -(defclass variable-binding-form (form binding-form-mixin implicit-progn-mixin) +(defclass variable-binding-form (form binding-form-mixin implicit-progn-with-declare-mixin) hunk ./src/walk.lisp 578 - (setf (body let) (walk-implict-progn let (cddr form) env :declare t)))) + (multiple-value-setf ((body let) nil (declares let)) (walk-implict-progn let (cddr form) env :declare t)))) hunk ./src/walk.lisp 588 - (setf (binds let*) (nreverse (binds let*)) - (body let*) (walk-implict-progn let* (cddr form) env :declare t)))) + (setf (binds let*) (nreverse (binds let*))) + (multiple-value-setf ((body let*) nil (declares let*)) (walk-implict-progn let* (cddr form) env :declare t)))) hunk ./src/walk.lisp 593 -(defclass locally-form (form implicit-progn-mixin) +(defclass locally-form (form implicit-progn-with-declare-mixin) hunk ./src/walk.lisp 598 - (setf (body locally) (walk-implict-progn locally (cdr form) env :declare t)))) + (multiple-value-setf ((body locally) nil (declares locally)) (walk-implict-progn locally (cdr form) env :declare t)))) hunk ./src/walk.lisp 602 -(defclass macrolet-form (form binding-form-mixin implicit-progn-mixin) +(defclass macrolet-form (form binding-form-mixin implicit-progn-with-declare-mixin) hunk ./src/walk.lisp 612 - (setf (binds macrolet) (nreverse (binds macrolet)) - (body macrolet) (walk-implict-progn macrolet (cddr form) env :declare t)))) + (setf (binds macrolet) (nreverse (binds macrolet))) + (multiple-value-setf ((body macrolet) nil (declares macrolet)) (walk-implict-progn macrolet (cddr form) env :declare t)))) hunk ./src/walk.lisp 685 -(defclass symbol-macrolet-form (form binding-form-mixin implicit-progn-mixin) +(defclass symbol-macrolet-form (form binding-form-mixin implicit-progn-with-declare-mixin) } [oops i forgot to actually make the declaration-form instances smoof-ra at elder-gods.org**20050801185641] { hunk ./src/walk.lisp 204 - (values environment declaration)) + (values environment (make-instance 'declaration-form :source declaration))) } [declares needs to be copied in the labels handler just like the other lambda-function-form slots smoof-ra at elder-gods.org**20050801193107] { hunk ./src/walk.lisp 557 - (arguments lambda) (arguments tmp-lambda))) + (arguments lambda) (arguments tmp-lambda) + (declares lambda) (declares tmp-lambda))) } Context: [Call the property :FEATURES, not FEATURES Marco Baringer **20050729103229] [Rename asdf property version to features, add "cps-interpreter" Marco Baringer **20050728120238] [dont need to register allow-other-keys because its not a binding smoof-ra at elder-gods.org**20050727153603] [fixed type name mismatch for allow-other-keys-function-arguement-form smoof-ra at elder-gods.org**20050727152456] [defmethod arguments should be ignorable, not ignore (openmcl warns whenever you ignore a specialized argument) Marco Baringer **20050726090308] [Typo in extract-argument-names Marco Baringer **20050726090256] [Fix generation of defmethod froms from defmethod/cc; added tests Marco Baringer **20050726085226] [Fix handling of optional arguments in apply-cps-lambda Marco Baringer **20050726085155] [More tests Marco Baringer **20050723133158] [Fix a bug in the handling of the case when LOOKUP finds a value for a name but the value is NIL Marco Baringer **20050723133106] [Export the symbol KALL Marco Baringer **20050723133052] [Change the test for constant-form'ness in walk.lisp Marco Baringer **20050723113019] [Extend the walker to handle #'(setf foo) function names Marco Baringer **20050723104431] [Fix bug in the lambda generated for method forms Marco Baringer **20050720144450] [Added ignore declarations to defun/cc and defmethod/cc to make the compiler happy Marco Baringer **20050720110112] [Temporarily comment out the log tests Marco Baringer **20050720092312] [Rename (optional|keyword|rest)-argument-form classes to include the -form suffix Marco Baringer **20050720092124] [Allow defun/cc defined functions te be called outside of a with-call/cc Marco Baringer **20050720091826] [Added support for &optional arguments in cps closures Marco Baringer **20050720091658] [Added defgeneric/cc Marco Baringer **20050719153441] [Move the error checking code for lambda arguments into apply, not lambda (in cps interpreter) Marco Baringer **20050719153121] [More cps tests Marco Baringer **20050719152327] [Fix openmcl's definition of lexical-variables to deal with ccl::definition-environment Marco Baringer **20050719152230] [Added support to the cps interpreter forl communicating with lexical variables Marco Baringer **20050707094608] [walk.lisp depends on lexenv.lisp Marco Baringer **20050707093140] [added support for walking local varibales in the lexical environment Marco Baringer **20050707093027 this applies to all those variables defined the envorinment object grabbed via an &environment macro argument. ] [mistyped #+openmcl in lexenv.lisp Marco Baringer **20050707092959] [added src/lexenv.lisp to arnesi.asd Marco Baringer **20050707091127] [Rename src/environment.lisp Marco Baringer **20050707091114] [Initial version of environment.lisp Marco Baringer **20050707091019] [Minor docstring fixup for with-call/cc Marco Baringer **20050707090619] [Big patch including all the cps interpreter stuff upto now Marco Baringer **20050707083739] [Fix bug in handling of defclass-struct's :predicate option Marco Baringer **20050706105324] [Initial Import Marco Baringer **20050706101657 This import moves arnesi from arch to darcs. Nothing has actually changed since bese-2004 at common-lisp.net/arnesi--dev--1.4--patch-14 ] [added arch stuff to boring file Marco Baringer **20050706101630] [Setup boring file Marco Baringer **20050706100535] Patch bundle hash: ba6c6ab51a00ba2bfaa4e4c352b6a3586596af42 From mb at bese.it Mon Aug 1 21:37:38 2005 From: mb at bese.it (Marco Baringer) Date: Mon, 01 Aug 2005 23:37:38 +0200 Subject: [Bese-devel] declarations In-Reply-To: <20050801193259.GA29802@melkor.elder-gods.org> (Larry D'Anna's message of "Mon, 1 Aug 2005 15:32:59 -0400") References: <20050726170217.GA17394@melkor.elder-gods.org> <20050727151240.GA7447@melkor.elder-gods.org> <20050801185033.GA26811@melkor.elder-gods.org> <20050801185810.GA27407@melkor.elder-gods.org> <20050801193259.GA29802@melkor.elder-gods.org> Message-ID: Larry D'Anna writes: > Sorry for the three emails. I have one more line for you :-) applied. thanks. -- -Marco Ring the bells that still can ring. Forget the perfect offering. There is a crack in everything. That's how the light gets in. -Leonard Cohen From carlos.ungil at bluewin.ch Mon Aug 1 22:48:32 2005 From: carlos.ungil at bluewin.ch (Carlos Ungil) Date: Tue, 2 Aug 2005 00:48:32 +0200 Subject: [Bese-devel] problem with actions Message-ID: Hello, I don't understand why the code below is not working. Well, I bet the code is fine and the problem is only in my expectations. I hope this will be obvious to someone who can give me a hint. The test-list component (/test/index.ucw) shows a list of ten items 0..9, and clicking on one of them won't show that number, as I would like, but all of them display the number 10. I think this is because 10 is the value the of i variable after the loop, and somehow this is the only value used by the system. How can I make the display-number actions see the different values of the variable, and not just the final one? Maybe my approach is completely wrong. In that case, what is the right construct to get something like this? What I really want to do is to show a list of objects, displaying the object when clicking on link. Thanks [for any help on this, and for making the ucw code available in the first place!], Carlos -=-=-=-=-=-=-=-=-=- (in-package :it.bese.ucw-user) (defvar *test-application* (make-instance 'cookie-session-application :url-prefix "/test/")) (register-application *default-server* *test-application*) (defentry-point "index.ucw" (:application *test-application*) () (call 'test-list)) (defcomponent test-list (simple-window-component) ()) (defcomponent test-display (simple-window-component) ((number :accessor number :initarg :number))) (defaction display-number ((c test-list) number) (call 'test-display :number number)) (defmethod render-on ((res response) (app test-list)) (<:ul (loop for i from 0 below 10 do (<:li ( Hello, I don't understand why the code below is not working. Well, I bet the code is fine and the problem is only in my expectations. I hope this will be obvious to someone who can give me a hint. The test-list component (/test/index.ucw) shows a list of ten items 0..9, and clicking on one of them won't show that number, as I would like, but all of them display the number 10. I think this is because 10 is the value the of i variable after the loop, and somehow this is the only value used by the system. How can I make the display-number actions see the different values of the variable, and not just the final one? Maybe my approach is completely wrong. In that case, what is the right construct to get something like this? What I really want to do is to show a list of objects, displaying the object when clicking on link. Thanks [for any help on this, and for making the ucw code available in the first place!], Carlos -=-=-=-=-=-=-=-=-=- (in-package :it.bese.ucw-user) (defvar *test-application* (make-instance 'cookie-session-application :url-prefix "/test/")) (register-application *default-server* *test-application*) (defentry-point "index.ucw" (:application *test-application*) () (call 'test-list)) (defcomponent test-list (simple-window-component) ()) (defcomponent test-display (simple-window-component) ((number :accessor number :initarg :number))) (defaction display-number ((c test-list) number) (call 'test-display :number number)) (defmethod render-on ((res response) (app test-list)) (<:ul (loop for i from 0 below 10 do (<:li ( Carlos Ungil wrote: > Hello, > The test-list component (/test/index.ucw) shows a list of ten items > 0..9, and clicking on one of them won't show that number, as I would > like, but all of them display the number 10. I think this is because 10 > is the value the of i variable after the loop, and somehow this is the > only value used by the system. > (defmethod render-on ((res response) (app test-list)) > (<:ul (loop for i from 0 below 10 > do (<:li ( (<:as-html i)))))) This is because your implementation is free to re-use the binding of i within the loop, and the (defparameter *closures* (loop for i from 0 below 10 collect (lambda () i))) *CLOSURES* CL> (loop for c in *closures* collect (funcall c)) (10 10 10 10 10 10 10 10 10 10) CL> (defparameter *closures* (loop for i from 0 below 10 collect (let ((i i)) (lambda () i)))) *CLOSURES* CL> (loop for c in *closures* collect (funcall c)) (0 1 2 3 4 5 6 7 8 9) This is a common CL gotcha. All you need to do is change your loop to look like this : (loop for i from 0 below 10 do (let ((i i)) (<:li ( References: <42EFF0E0.1050409@tech.coop> Message-ID: <42EF1EE8.4050100@pvv.org> Drew Crampsie wrote: > This is because your implementation is free to re-use the binding of i > within the loop, and the consider the following code : > [...] Shouldn't ideally the macro-expansion of display-number take care of this? Or are there situations where this behaviour is necessary? astor From drewc at tech.coop Tue Aug 2 23:07:06 2005 From: drewc at tech.coop (Drew Crampsie) Date: Tue, 02 Aug 2005 16:07:06 -0700 Subject: [Bese-devel] problem with actions Message-ID: <42EFFC9A.2090503@tech.coop> Alexander Kjeldaas wrote: > Drew Crampsie wrote: > >> This is because your implementation is free to re-use the binding of i >> within the loop, and the > consider the following code : >> > [...] > > Shouldn't ideally the macro-expansion of display-number take care of > this? Or are there situations where this behaviour is necessary? How would the macro-expansion find out which lexicals is has to rebind? This behavior is part of the ANSI specification (not specific to UCW), and while i've never found it useful, it is effecient from an implementation point-of-view. Imagine a loop over a large set. If the implementation kept all those bindings around it would require twice the memory to run the loop, and then a massive amount of garbage to clean up afterwards (in the normal case, where the binding is not closed over). Not an ideal situation. drewc From marco_simon at web.de Tue Aug 2 08:28:07 2005 From: marco_simon at web.de (Marco Simon) Date: Tue, 02 Aug 2005 10:28:07 +0200 Subject: [Bese-devel] Publish-Directory error In-Reply-To: <42EFFC9A.2090503@tech.coop> References: <42EFFC9A.2090503@tech.coop> Message-ID: <42EF2E97.3080104@web.de> Does anybody know what the following error-message means, and what I have to do against it ? (+WARN+ 3331959573 IT.BESE.UCW::UCW.BACKEND "Attempting to publish #p\"/home/ucw/ucw/bin/../wwwroot/./ucw/examples/\" at \"/ucw/admin/\" but mod_lisp backend does not support publish-directory.") Thanks in advance, Marco From mb at bese.it Tue Aug 2 08:47:36 2005 From: mb at bese.it (Marco Baringer) Date: Tue, 02 Aug 2005 10:47:36 +0200 Subject: [Bese-devel] Publish-Directory error In-Reply-To: <42EF2E97.3080104@web.de> (Marco Simon's message of "Tue, 02 Aug 2005 10:28:07 +0200") References: <42EFFC9A.2090503@tech.coop> <42EF2E97.3080104@web.de> Message-ID: Marco Simon writes: > Does anybody know what the following error-message means, and what > I have to do against it ? it's just informing you that ucw can't configure apache by itself but you must manually setup the DocumentReet and/or Location tags in httpd.conf to make sure apache sees the stylesheets and what not. there's nothing you can do about it (you could disable the warning if it worries you). > (+WARN+ 3331959573 IT.BESE.UCW::UCW.BACKEND "Attempting to publish > #p\"/home/ucw/ucw/bin/../wwwroot/./ucw/examples/\" at \"/ucw/admin/\" > but mod_lisp backend does not support publish-directory.") if this is misleading i'd be willing to change it to an +INFO+ message (since there's nothing really wrong with this setup). -- -Marco Ring the bells that still can ring. Forget the perfect offering. There is a crack in everything. That's how the light gets in. -Leonard Cohen From marco_simon at web.de Tue Aug 2 14:26:19 2005 From: marco_simon at web.de (Marco Simon) Date: Tue, 02 Aug 2005 16:26:19 +0200 Subject: [Bese-devel] Several beginner's questions Message-ID: <42EF828B.1040702@web.de> Hi ucw-list, I've been trying to set up and understand the ucw-system for some days now, but I'm still fighting with some beginners problems. First of all, the myhost/ucw/examples/index.ucw works fine. What I don't understand so far: There are several subdirectories within the /ucw - tree, and I'm not sure if I got their function right so far. /ucw/examples/ seems to be the application-directory for the dynamic-part of the demo-application. This is the place where I have to change the code if I want to modify the ucw-servers webpage-output. /ucw/wwwroot seems to hold some static files (like the stylesheet.css) as well as some dynamic parts of the demo application (the counter-demo doesn't work without this directory). Besides that, this directory must be reachable by apache (or even better must be its document-root) for serving static files like images and css-files, right ? /ucw/bin/ holds the start-skript and initialisation-files. /ucw/logs/ is the place for all ucw log files /ucw/var/ holds the socket and pid files /ucw/doc/ is more or less empty. Just keeps some issue and todo-infos. /ucw/src/ mh - I'm not really clear about this directory's content. After I got running the /ucw/examples/index.ucw I tried to follow your great "hello-world" movie. But I'm stuck several times. The very first problem: My emacs/slime/cmucl environment doesn't know the it.bese.ucw-user package. So I tried just to do a (load /home/ucw/src/packages.lisp) After ignoring the following compilation-errors (via "make this package"): Type-error in LISP::PAGAGE-OR-LOSE: "IT.BESE.ARNESI" is not of type PACKAGE Type-error in LISP::PAGAGE-OR-LOSE: "IT.BESE.YYCLML" is not of type PACKAGE Type-error in LISP::PAGAGE-OR-LOSE: "ITERATE" is not of type PACKAGE I was able to change-package to IT.BESE.UCW-USER. Next step was typing the first lines of your hello world demo in the repl (for debugging reasons). What made me write you this mail finally, was the following error: CL-USER> (load "/home/ucw/ucw/src/packages.lisp") ; Loading #p"/home/ucw/ucw/src/packages.lisp". T CL-USER> UCW-USER> (in-package :it.bese.ucw-user) # UCW-USER> (defvar *hello-world* (make-instance 'cookie-session-application :url-prefix "/hello/" )) Error in function PCL::FIND-CLASS-FROM-CELL: No class named COOKIE-SESSION-APPLICATION. [Condition of type SIMPLE-ERROR] Restarts: 0: [ABORT] Abort handling SLIME request. 1: [ABORT] Return to Top-Level. I guess I've made some fundamental mistake at the very beginning and I would be glad if you could give some hints and further explication. Thanks a lot, best regards Marco Simon From der_julian at web.de Tue Aug 2 14:44:06 2005 From: der_julian at web.de (Julian Stecklina) Date: Tue, 2 Aug 2005 16:44:06 +0200 Subject: [Bese-devel] Several beginner's questions In-Reply-To: <42EF828B.1040702@web.de> References: <42EF828B.1040702@web.de> Message-ID: <20050802164406.13315ef1@localhost> On Tue, 02 Aug 2005 16:26:19 +0200 Marco Simon wrote: > The very first problem: My emacs/slime/cmucl environment doesn't know > the it.bese.ucw-user package. So I tried just to do a > (load /home/ucw/src/packages.lisp) (load "/home/ucw/bin/start.lisp") will do the job. Regards, -- Julian Stecklina LISP has survived for 21 years because it is an approximate local optimum in the space of programming languages. - John McCarthy (1980) From smoof-ra at elder-gods.org Tue Aug 2 15:05:28 2005 From: smoof-ra at elder-gods.org (Larry D'Anna) Date: Tue, 2 Aug 2005 11:05:28 -0400 Subject: [Bese-devel] progv Message-ID: <20050802150528.GA7278@melkor.elder-gods.org> here's a patch that adds progv to the code walker --larry -------------- next part -------------- New patches: [labels can have declarations inside the body smoof-ra at elder-gods.org**20050801193433] { hunk ./src/walk.lisp 559 - (setf (body labels) (walk-implict-progn labels body env))))) + (multiple-value-setf ((body labels) nil (declares labels)) (walk-implict-progn labels body env :declare t))))) } [progv smoof-ra at elder-gods.org**20050802150342] { hunk ./src/walk.lisp 744 +;;;; PROGV + +(defclass progv-form (form implicit-progn-mixin) + ((vars-form :accessor vars-form :initarg :vars-form) + (values-form :accessor values-form :initarg :values-form))) + +(defwalker-handler progv (form parent env) + (with-form-object (progv progv-form :parent parent :source form) + (setf (vars-form progv) (walk-form (cadr form) progv env)) + (setf (values-form progv) (walk-form (caddr form) progv env)) + (setf (body progv) (walk-implict-progn progv (cdddr form) env)) + progv)) + + + } Context: [declares needs to be copied in the labels handler just like the other lambda-function-form slots smoof-ra at elder-gods.org**20050801193107] [oops i forgot to actually make the declaration-form instances smoof-ra at elder-gods.org**20050801185641] [initial support for remembering declarations smoof-ra at elder-gods.org**20050801184329 this patch adds a mixin called implicit-progn-with-declare-mixin and uses it instead of implicit-progn-mixin in all the places that allow declares. It has slot which should contain a list of the declares at the top of the implicit-progn. This patch doesn't do anything clever with the declares, it just creates declaration-form objects and points their source slots at the original declares, however it would be easy to modify parse-declaration to generate more usefull declaration objects. ] [Call the property :FEATURES, not FEATURES Marco Baringer **20050729103229] [Rename asdf property version to features, add "cps-interpreter" Marco Baringer **20050728120238] [dont need to register allow-other-keys because its not a binding smoof-ra at elder-gods.org**20050727153603] [fixed type name mismatch for allow-other-keys-function-arguement-form smoof-ra at elder-gods.org**20050727152456] [defmethod arguments should be ignorable, not ignore (openmcl warns whenever you ignore a specialized argument) Marco Baringer **20050726090308] [Typo in extract-argument-names Marco Baringer **20050726090256] [Fix generation of defmethod froms from defmethod/cc; added tests Marco Baringer **20050726085226] [Fix handling of optional arguments in apply-cps-lambda Marco Baringer **20050726085155] [More tests Marco Baringer **20050723133158] [Fix a bug in the handling of the case when LOOKUP finds a value for a name but the value is NIL Marco Baringer **20050723133106] [Export the symbol KALL Marco Baringer **20050723133052] [Change the test for constant-form'ness in walk.lisp Marco Baringer **20050723113019] [Extend the walker to handle #'(setf foo) function names Marco Baringer **20050723104431] [Fix bug in the lambda generated for method forms Marco Baringer **20050720144450] [Added ignore declarations to defun/cc and defmethod/cc to make the compiler happy Marco Baringer **20050720110112] [Temporarily comment out the log tests Marco Baringer **20050720092312] [Rename (optional|keyword|rest)-argument-form classes to include the -form suffix Marco Baringer **20050720092124] [Allow defun/cc defined functions te be called outside of a with-call/cc Marco Baringer **20050720091826] [Added support for &optional arguments in cps closures Marco Baringer **20050720091658] [Added defgeneric/cc Marco Baringer **20050719153441] [Move the error checking code for lambda arguments into apply, not lambda (in cps interpreter) Marco Baringer **20050719153121] [More cps tests Marco Baringer **20050719152327] [Fix openmcl's definition of lexical-variables to deal with ccl::definition-environment Marco Baringer **20050719152230] [Added support to the cps interpreter forl communicating with lexical variables Marco Baringer **20050707094608] [walk.lisp depends on lexenv.lisp Marco Baringer **20050707093140] [added support for walking local varibales in the lexical environment Marco Baringer **20050707093027 this applies to all those variables defined the envorinment object grabbed via an &environment macro argument. ] [mistyped #+openmcl in lexenv.lisp Marco Baringer **20050707092959] [added src/lexenv.lisp to arnesi.asd Marco Baringer **20050707091127] [Rename src/environment.lisp Marco Baringer **20050707091114] [Initial version of environment.lisp Marco Baringer **20050707091019] [Minor docstring fixup for with-call/cc Marco Baringer **20050707090619] [Big patch including all the cps interpreter stuff upto now Marco Baringer **20050707083739] [Fix bug in handling of defclass-struct's :predicate option Marco Baringer **20050706105324] [Initial Import Marco Baringer **20050706101657 This import moves arnesi from arch to darcs. Nothing has actually changed since bese-2004 at common-lisp.net/arnesi--dev--1.4--patch-14 ] [added arch stuff to boring file Marco Baringer **20050706101630] [Setup boring file Marco Baringer **20050706100535] Patch bundle hash: b414dedf82963a6c40be64e8e9a44ab9e2bc88e3 From smoof-ra at elder-gods.org Tue Aug 2 16:56:38 2005 From: smoof-ra at elder-gods.org (Larry D'Anna) Date: Tue, 2 Aug 2005 12:56:38 -0400 Subject: [Bese-devel] a little patch Message-ID: <20050802165638.GA14800@melkor.elder-gods.org> this little patch modifies find-walker-handler so that if there is a handler for a "special form" that isn't really a special form it will use that handler instead of calling it an function call. It shouldn't effect ucw behavior at all because all of the defwalker-handler's are real special forms, but it lets you shadow *walker-handlers* to add your own new special forms. --larry -------------- next part -------------- New patches: [allow new special forms to be added to the walker by shadowing *walker-handlers* smoof-ra at elder-gods.org**20050802165355] { hunk ./src/walk.lisp 31 - (case (car form) - ((block declare flet function go if labels let let* - macrolet progn quote return-from setq symbol-macrolet - tagbody unwind-protect catch multiple-value-call - multiple-value-prog1 throw load-time-value the - eval-when locally progv) - (or - (gethash (car form) *walker-handlers*) - (error "Sorry, No walker for the special operater ~S defined." (car form)))) - (t (gethash 'application *walker-handlers*))))) + (aif (gethash (car form) *walker-handlers*) + it + (case (car form) + ((block declare flet function go if labels let let* + macrolet progn quote return-from setq symbol-macrolet + tagbody unwind-protect catch multiple-value-call + multiple-value-prog1 throw load-time-value the + eval-when locally progv) + (error "Sorry, No walker for the special operater ~S defined." (car form))) + (t (gethash 'application *walker-handlers*)))))) } Context: [progv smoof-ra at elder-gods.org**20050802150342] [labels can have declarations inside the body smoof-ra at elder-gods.org**20050801193433] [declares needs to be copied in the labels handler just like the other lambda-function-form slots smoof-ra at elder-gods.org**20050801193107] [oops i forgot to actually make the declaration-form instances smoof-ra at elder-gods.org**20050801185641] [initial support for remembering declarations smoof-ra at elder-gods.org**20050801184329 this patch adds a mixin called implicit-progn-with-declare-mixin and uses it instead of implicit-progn-mixin in all the places that allow declares. It has slot which should contain a list of the declares at the top of the implicit-progn. This patch doesn't do anything clever with the declares, it just creates declaration-form objects and points their source slots at the original declares, however it would be easy to modify parse-declaration to generate more usefull declaration objects. ] [Call the property :FEATURES, not FEATURES Marco Baringer **20050729103229] [Rename asdf property version to features, add "cps-interpreter" Marco Baringer **20050728120238] [dont need to register allow-other-keys because its not a binding smoof-ra at elder-gods.org**20050727153603] [fixed type name mismatch for allow-other-keys-function-arguement-form smoof-ra at elder-gods.org**20050727152456] [defmethod arguments should be ignorable, not ignore (openmcl warns whenever you ignore a specialized argument) Marco Baringer **20050726090308] [Typo in extract-argument-names Marco Baringer **20050726090256] [Fix generation of defmethod froms from defmethod/cc; added tests Marco Baringer **20050726085226] [Fix handling of optional arguments in apply-cps-lambda Marco Baringer **20050726085155] [More tests Marco Baringer **20050723133158] [Fix a bug in the handling of the case when LOOKUP finds a value for a name but the value is NIL Marco Baringer **20050723133106] [Export the symbol KALL Marco Baringer **20050723133052] [Change the test for constant-form'ness in walk.lisp Marco Baringer **20050723113019] [Extend the walker to handle #'(setf foo) function names Marco Baringer **20050723104431] [Fix bug in the lambda generated for method forms Marco Baringer **20050720144450] [Added ignore declarations to defun/cc and defmethod/cc to make the compiler happy Marco Baringer **20050720110112] [Temporarily comment out the log tests Marco Baringer **20050720092312] [Rename (optional|keyword|rest)-argument-form classes to include the -form suffix Marco Baringer **20050720092124] [Allow defun/cc defined functions te be called outside of a with-call/cc Marco Baringer **20050720091826] [Added support for &optional arguments in cps closures Marco Baringer **20050720091658] [Added defgeneric/cc Marco Baringer **20050719153441] [Move the error checking code for lambda arguments into apply, not lambda (in cps interpreter) Marco Baringer **20050719153121] [More cps tests Marco Baringer **20050719152327] [Fix openmcl's definition of lexical-variables to deal with ccl::definition-environment Marco Baringer **20050719152230] [Added support to the cps interpreter forl communicating with lexical variables Marco Baringer **20050707094608] [walk.lisp depends on lexenv.lisp Marco Baringer **20050707093140] [added support for walking local varibales in the lexical environment Marco Baringer **20050707093027 this applies to all those variables defined the envorinment object grabbed via an &environment macro argument. ] [mistyped #+openmcl in lexenv.lisp Marco Baringer **20050707092959] [added src/lexenv.lisp to arnesi.asd Marco Baringer **20050707091127] [Rename src/environment.lisp Marco Baringer **20050707091114] [Initial version of environment.lisp Marco Baringer **20050707091019] [Minor docstring fixup for with-call/cc Marco Baringer **20050707090619] [Big patch including all the cps interpreter stuff upto now Marco Baringer **20050707083739] [Fix bug in handling of defclass-struct's :predicate option Marco Baringer **20050706105324] [Initial Import Marco Baringer **20050706101657 This import moves arnesi from arch to darcs. Nothing has actually changed since bese-2004 at common-lisp.net/arnesi--dev--1.4--patch-14 ] [added arch stuff to boring file Marco Baringer **20050706101630] [Setup boring file Marco Baringer **20050706100535] Patch bundle hash: b8d27e89545c5f3b9537124e8c8a5f4799f280c4 From marco_simon at web.de Wed Aug 3 11:36:11 2005 From: marco_simon at web.de (Marco Simon) Date: Wed, 03 Aug 2005 13:36:11 +0200 Subject: [Bese-devel] Several beginner's questions In-Reply-To: <20050802164406.13315ef1@localhost> References: <42EF828B.1040702@web.de> <20050802164406.13315ef1@localhost> Message-ID: <42F0AC2B.3000402@web.de> Julian Stecklina schrieb: >On Tue, 02 Aug 2005 16:26:19 +0200 >Marco Simon wrote: > > > >>The very first problem: My emacs/slime/cmucl environment doesn't know >>the it.bese.ucw-user package. So I tried just to do a >>(load /home/ucw/src/packages.lisp) >> >> > >(load "/home/ucw/bin/start.lisp") will do the job. > >Regards, > > Hi Julian, thanks a lot for that hint - after some futher trying it made my ucw-environment working. Now I face a further minor problems with the demo-applications "presentation" : As soon as I click the "edit" button or the "Create" link in the presentation-example, the following error is shown in my browser's window: ERROR Error in KERNEL::UNBOUND-SYMBOL-ERROR-HANDLER: the variable IT.BESE.UCW:INSTANCE is unbound. BACKTRACE [ + ] (ERROR UNBOUND-VARIABLE :FUNCTION-NAME... Description (ERROR UNBOUND-VARIABLE :FUNCTION-NAME (MAKE-INSTANCE IT.BESE.UCW-USER::PERSON-EDITOR IT.BESE.UCW:INSTANCE PCL::|.P0.|) :NAME ...) and so on... The REPL/logs just shows: 2005-08-03T13:24.20 IT.BESE.ARNESI:+ERROR+ IT.BESE.UCW::UCW-LOGGER: Error # while serving action. 2005-08-03T13:24.20 IT.BESE.ARNESI:+ERROR+ IT.BESE.UCW::UCW-LOGGER: Aborting action. The other actions of that example seem to work without any problems. Any ideas what the Problem might be ? -------------- next part -------------- An HTML attachment was scrubbed... URL: From mb at bese.it Wed Aug 3 11:46:09 2005 From: mb at bese.it (Marco Baringer) Date: Wed, 03 Aug 2005 13:46:09 +0200 Subject: [Bese-devel] Several beginner's questions References: <42EF828B.1040702@web.de> Message-ID: Marco Simon writes: > Hi ucw-list, > > I've been trying to set up and understand the ucw-system for > some days now, but I'm still fighting with some beginners problems. > > First of all, the myhost/ucw/examples/index.ucw works fine. > > What I don't understand so far: > There are several subdirectories within the /ucw - tree, and > I'm not sure if I got their function right so far. > > /ucw/examples/ seems to be the application-directory for the > dynamic-part of the demo-application. This is the place where > I have to change the code if I want to modify the ucw-servers > webpage-output. yes, but i think you're missing the point. inside ucw/examples are a bunch of files which, when _loaded_, will create some objects and functions in the lisp image which causes the url '/ucw/examples/index.ucw' to do what it does. changing those files is not enough (and, often, not neccessary), what's important is to change the things those files define. for example: load up ucw (using the start.lisp script or bobstopper's new control.lisp stuff). then connect to the lisp and simply type: (defmethod render-on ((res response) (welcome example-welcome)) (<:as-html "Hello, World!")) that will change the html generated by the home page. you needn't edit or save or even have a copy of the example.lisp file which contains the original definition of render-on. > /ucw/wwwroot seems to hold some static files (like the stylesheet.css) > as well as some dynamic parts of the demo application (the counter-demo > doesn't work without this directory). Besides that, this directory must be > reachable by apache (or even better must be its document-root) for > serving static files like images and css-files, right ? countre-demo doesn't work because i put static and tal files in the same directory (this probably isn't such a great idea). the counter component uses a TAL file (which is one of the many templating tools for lisp) and so won't work without that file. had you defined a render-on method for the counter component you wouldn't need that directory. > /ucw/bin/ holds the start-skript and initialisation-files. yes. > /ucw/logs/ is the place for all ucw log files yes, but only because of this: (setup-loggers (make-pathname :name nil :type nil :directory (append (pathname-directory *load-truename*) (list :up "logs")) :defaults *load-truename*) +info+) which is located in bin/start.lisp. you colud just as well do: (setup-loggers "/var/log/ucw/" +info+) and you'd no longer need ucw/logs/ > /ucw/var/ holds the socket and pid files yes, but only because of what we pass to detachtty in ucwctl. > /ucw/doc/ is more or less empty. Just keeps some issue and todo-infos. correct. > /ucw/src/ mh - I'm not really clear about this directory's content. that directory holds the source code for uncommon web itself. > After I got running the /ucw/examples/index.ucw I tried to follow your > great "hello-world" movie. But I'm stuck several times. > > The very first problem: My emacs/slime/cmucl environment doesn't know > the it.bese.ucw-user package. So I tried just to do a > (load /home/ucw/src/packages.lisp) > After ignoring the following compilation-errors (via "make this package"): > Type-error in LISP::PAGAGE-OR-LOSE: "IT.BESE.ARNESI" is not of type > PACKAGE > Type-error in LISP::PAGAGE-OR-LOSE: "IT.BESE.YYCLML" is not of type > PACKAGE > Type-error in LISP::PAGAGE-OR-LOSE: "ITERATE" is not of type PACKAGE > I was able to change-package to IT.BESE.UCW-USER. > Next step was typing the first lines of your hello world demo in the > repl (for debugging reasons). > What made me write you this mail finally, was the following error: > > CL-USER> (load "/home/ucw/ucw/src/packages.lisp") > ; Loading #p"/home/ucw/ucw/src/packages.lisp". > T > CL-USER> > UCW-USER> (in-package :it.bese.ucw-user) > # > UCW-USER> (defvar *hello-world* (make-instance > 'cookie-session-application :url-prefix "/hello/" )) > > Error in function PCL::FIND-CLASS-FROM-CELL: > No class named COOKIE-SESSION-APPLICATION. > [Condition of type SIMPLE-ERROR] > > Restarts: > 0: [ABORT] Abort handling SLIME request. > 1: [ABORT] Return to Top-Level. loading the packages file defines the packages but does _not_ load up the rest of the code. se while you've told lisp that there's a package named :it.bese.ucw and that that packgae has an external symbol named cookie-session-application, you haven't created the class and much less bound it to the proper name. you'll notice that one of the first things start.lisp does is this: (asdf:oos 'asdf:load-op :ucw) this causes the package file to be loaded up (first) and then it loads up the rest of ucw itself. notice that in ucw.asd we have a list of every file in ucw/src with their dependencies. > I guess I've made some fundamental mistake at the very beginning and > I would be glad if you could give some hints and further explication. i think you're only mistako is not realizing how lisp code is loaded and what the association between file and a running lisp is. hth. -- -Marco Ring the bells that still can ring. Forget the perfect offering. There is a crack in everything. That's how the light gets in. -Leonard Cohen From mb at bese.it Wed Aug 3 12:25:03 2005 From: mb at bese.it (Marco Baringer) Date: Wed, 03 Aug 2005 14:25:03 +0200 Subject: [Bese-devel] Several beginner's questions In-Reply-To: <42F0AC2B.3000402@web.de> (Marco Simon's message of "Wed, 03 Aug 2005 13:36:11 +0200") References: <42EF828B.1040702@web.de> <20050802164406.13315ef1@localhost> <42F0AC2B.3000402@web.de> Message-ID: Marco Simon writes: > Hi Julian, > thanks a lot for that hint - after some futher trying it made my > ucw-environment working. > > Now I face a further minor problems with the demo-applications > "presentation" : > As soon as I click the "edit" button or the "Create" link in the > presentation-example, the following error is shown in my browser's > window: would you mind sending a complete backtrace? (just cut 'n paste the sldb buffer with all the locals displayed) -- -Marco Ring the bells that still can ring. Forget the perfect offering. There is a crack in everything. That's how the light gets in. -Leonard Cohen From smoof-ra at elder-gods.org Wed Aug 3 22:31:18 2005 From: smoof-ra at elder-gods.org (Larry D'Anna) Date: Wed, 3 Aug 2005 18:31:18 -0400 Subject: [Bese-devel] :lexical-flet Message-ID: <20050803223118.GA16461@melkor.elder-gods.org> Here's another walker patch. It adds a :lexical-flet mark similar to the :lexical-let one, so it can recognise flets from the surrounding environment. This patch only adds placeholder functions for cmucl and openmcl, so it should have no effect on those. --larry -------------- next part -------------- New patches: [recognise flets from the lexical environment (on sbcl) smoof-ra at elder-gods.org**20050803222732] { hunk ./src/lexenv.lisp 27 +;fixme +#+openmcl +(defun lexical-functions (environment) + (declare (ignore environment)) + nil) + hunk ./src/lexenv.lisp 43 +#+sbcl +(defun lexical-functions (environment) + (mapcar #'first (sb-c::lexenv-funs environment))) + + hunk ./src/lexenv.lisp 57 + +;fixme +#+cmu +(defun lexical-functions (environment) + (declare (ignore environment)) + nil) + hunk ./src/walk.lisp 17 - (setf walk-env (register walk-env :lexical-let var t)))) + (setf walk-env (register walk-env :lexical-let var t))) + (dolist (fun (lexical-functions lexical-env)) + (setf walk-env (register walk-env :lexical-flet fun t)))) hunk ./src/walk.lisp 267 +(defclass lexical-application-form (application-form) + ()) + hunk ./src/walk.lisp 291 - (multiple-value-bind (expansion expanded) - (macroexpand-1 form nil) - (when expanded - (return (walk-form expansion parent env))))) + (multiple-value-bind (expansion expanded) + (macroexpand-1 form nil) + (when expanded + (return (walk-form expansion parent env))))) hunk ./src/walk.lisp 297 - (make-instance 'free-application-form)))) + (if (lookup env :lexical-flet op) + (make-instance 'lexical-application-form) + (make-instance 'free-application-form))))) hunk ./src/walk.lisp 325 +(defclass lexical-function-object-form (function-object-form) + ()) + hunk ./src/walk.lisp 336 - 'free-function-object-form) + (if (lookup env :lexical-flet (second form)) + 'lexical-function-object-form + 'free-function-object-form)) } Context: [minor comment fixup Marco Baringer **20050803085322] [Moved defclass progv-form to keep the walker classes defined in alphabetical order Marco Baringer **20050803085254] [Added walker class for THE forms Marco Baringer **20050803085210] [Minor spacing fixs to the previous patch Marco Baringer **20050802152421] [allow new special forms to be added to the walker by shadowing *walker-handlers* smoof-ra at elder-gods.org**20050802165355] [progv smoof-ra at elder-gods.org**20050802150342] [labels can have declarations inside the body smoof-ra at elder-gods.org**20050801193433] [declares needs to be copied in the labels handler just like the other lambda-function-form slots smoof-ra at elder-gods.org**20050801193107] [oops i forgot to actually make the declaration-form instances smoof-ra at elder-gods.org**20050801185641] [initial support for remembering declarations smoof-ra at elder-gods.org**20050801184329 this patch adds a mixin called implicit-progn-with-declare-mixin and uses it instead of implicit-progn-mixin in all the places that allow declares. It has slot which should contain a list of the declares at the top of the implicit-progn. This patch doesn't do anything clever with the declares, it just creates declaration-form objects and points their source slots at the original declares, however it would be easy to modify parse-declaration to generate more usefull declaration objects. ] [Call the property :FEATURES, not FEATURES Marco Baringer **20050729103229] [Rename asdf property version to features, add "cps-interpreter" Marco Baringer **20050728120238] [dont need to register allow-other-keys because its not a binding smoof-ra at elder-gods.org**20050727153603] [fixed type name mismatch for allow-other-keys-function-arguement-form smoof-ra at elder-gods.org**20050727152456] [defmethod arguments should be ignorable, not ignore (openmcl warns whenever you ignore a specialized argument) Marco Baringer **20050726090308] [Typo in extract-argument-names Marco Baringer **20050726090256] [Fix generation of defmethod froms from defmethod/cc; added tests Marco Baringer **20050726085226] [Fix handling of optional arguments in apply-cps-lambda Marco Baringer **20050726085155] [More tests Marco Baringer **20050723133158] [Fix a bug in the handling of the case when LOOKUP finds a value for a name but the value is NIL Marco Baringer **20050723133106] [Export the symbol KALL Marco Baringer **20050723133052] [Change the test for constant-form'ness in walk.lisp Marco Baringer **20050723113019] [Extend the walker to handle #'(setf foo) function names Marco Baringer **20050723104431] [Fix bug in the lambda generated for method forms Marco Baringer **20050720144450] [Added ignore declarations to defun/cc and defmethod/cc to make the compiler happy Marco Baringer **20050720110112] [Temporarily comment out the log tests Marco Baringer **20050720092312] [Rename (optional|keyword|rest)-argument-form classes to include the -form suffix Marco Baringer **20050720092124] [Allow defun/cc defined functions te be called outside of a with-call/cc Marco Baringer **20050720091826] [Added support for &optional arguments in cps closures Marco Baringer **20050720091658] [Added defgeneric/cc Marco Baringer **20050719153441] [Move the error checking code for lambda arguments into apply, not lambda (in cps interpreter) Marco Baringer **20050719153121] [More cps tests Marco Baringer **20050719152327] [Fix openmcl's definition of lexical-variables to deal with ccl::definition-environment Marco Baringer **20050719152230] [Added support to the cps interpreter forl communicating with lexical variables Marco Baringer **20050707094608] [walk.lisp depends on lexenv.lisp Marco Baringer **20050707093140] [added support for walking local varibales in the lexical environment Marco Baringer **20050707093027 this applies to all those variables defined the envorinment object grabbed via an &environment macro argument. ] [mistyped #+openmcl in lexenv.lisp Marco Baringer **20050707092959] [added src/lexenv.lisp to arnesi.asd Marco Baringer **20050707091127] [Rename src/environment.lisp Marco Baringer **20050707091114] [Initial version of environment.lisp Marco Baringer **20050707091019] [Minor docstring fixup for with-call/cc Marco Baringer **20050707090619] [Big patch including all the cps interpreter stuff upto now Marco Baringer **20050707083739] [Fix bug in handling of defclass-struct's :predicate option Marco Baringer **20050706105324] [Initial Import Marco Baringer **20050706101657 This import moves arnesi from arch to darcs. Nothing has actually changed since bese-2004 at common-lisp.net/arnesi--dev--1.4--patch-14 ] [added arch stuff to boring file Marco Baringer **20050706101630] [Setup boring file Marco Baringer **20050706100535] Patch bundle hash: 38bda27e2c3b2c53b126f6c592652f05c40c4240 From mb at bese.it Thu Aug 4 07:09:36 2005 From: mb at bese.it (Marco Baringer) Date: Thu, 04 Aug 2005 09:09:36 +0200 Subject: [Bese-devel] :lexical-flet In-Reply-To: <20050803223118.GA16461@melkor.elder-gods.org> (Larry D'Anna's message of "Wed, 3 Aug 2005 18:31:18 -0400") References: <20050803223118.GA16461@melkor.elder-gods.org> Message-ID: Larry D'Anna writes: > Here's another walker patch. It adds a :lexical-flet mark similar to > the :lexical-let one, so it can recognise flets from the surrounding > environment. This patch only adds placeholder functions for cmucl and > openmcl, so it should have no effect on those. applied. thanks. -- -Marco Ring the bells that still can ring. Forget the perfect offering. There is a crack in everything. That's how the light gets in. -Leonard Cohen From mb at bese.it Thu Aug 4 12:07:29 2005 From: mb at bese.it (Marco Baringer) Date: Thu, 04 Aug 2005 14:07:29 +0200 Subject: [Bese-devel] new interpter and iterate Message-ID: the new cps interepreter (which i'll rename soon since it doesn't actually cps transform anything) has one major drawback: it doesn't really work within iterate. the reason for this is simple, let's pretend you have this code (which does in fact appear in ucw's source code): (iterate (for object in some-list) (let ((object object)) ( I have just moved all the patches from ucw_new_cps_integration into ucw_dev and arnesi_cps into arnesi. your code may very well break. i'm sorry, in the end it's worth it. should i delete the ucw_new_cps_integration and arnesi_cps directories so people don't keep puling from them and wonder why no new patches ever come through? -- -Marco Ring the bells that still can ring. Forget the perfect offering. There is a crack in everything. That's how the light gets in. -Leonard Cohen From whalliburton at gmail.com Fri Aug 5 04:11:23 2005 From: whalliburton at gmail.com (William Halliburton) Date: Thu, 4 Aug 2005 23:11:23 -0500 Subject: [Bese-devel] Re: Backtracking help Message-ID: <4e7bd29e050804211172092f42@mail.gmail.com> I have refactored the previoius example to make simpler. Could someone please explain why I need the (let (x x)) in the example and how to make the backtracking work propery. I have version that uses individual slots for each member of the array and it backtracks propery. Thank you, William Halliburton ;;; tictactoe (defcomponent tictactoe (widget-component) ((state :backtrack #'copy-seq :initform (make-array 9 :element-type 'fixnum)))) (defaction tictactoe-select ((tictactoe tictactoe) index) (with-slots (state) tictactoe (setf (aref state index) 1))) (defmethod render-on ((res response) (tictactoe tictactoe)) (with-slots (state) tictactoe (<:pre (dotimes (x 9) (let ((x x)) (case (aref state x) (0 ( Hello. I am just beginning to use UCW. The following example does not backtrack properly. What would be the proper way to write this. Thank you. William Halliburton ;;; tictactoe (defun tictactoe-copy-state (state) (let ((array (make-array 9 :element-type 'fixnum))) (dotimes (x 9) (setf (aref array x) (aref state x))) array)) (defcomponent tictactoe (widget-component) ((state :backtrack #'tictactoe-copy-state :initform (make-array 9 :element-type 'fixnum) :initarg :state))) (defaction tictactoe-select ((tictactoe tictactoe) index) (with-slots (state) tictactoe (setf (aref state index) 1))) (defmethod render-on ((res response) (tictactoe tictactoe)) (with-slots (state) tictactoe (flet ((state-out (index) (let ((val (aref state index))) (case val (0 ( In ucw-0.3.9, presentations.lisp: (defcomponent list-presentation (presentation) ((slots :accessor slots :initarg :slots) (editablep :accessor editablep :initform t :initarg :editablep) (edit-label :accessor edit-label :initform "Edit") (deleteablep :accessor deleteablep :initform :deleteablep) (delete-label :accessor delete-label :initform "Delete") (instances :accessor instances))) I'm wondering if you didn't want to write: (deleteablep :accessor deleteablep :initarg :deleteablep) instead? -- __Pascal Bourguignon__ http://www.informatimago.com/ You're always typing. Well, let's see you ignore my sitting on your hands. From mb at bese.it Fri Aug 5 07:31:30 2005 From: mb at bese.it (Marco Baringer) Date: Fri, 05 Aug 2005 09:31:30 +0200 Subject: [Bese-devel] :initform or :initarg ? In-Reply-To: <20050805021625.E712E10FBF3@thalassa.informatimago.com> (Pascal Bourguignon's message of "Fri, 5 Aug 2005 04:16:25 +0200 (CEST)") References: <20050805021625.E712E10FBF3@thalassa.informatimago.com> Message-ID: Pascal Bourguignon writes: > In ucw-0.3.9, presentations.lisp: > > (defcomponent list-presentation (presentation) > ((slots :accessor slots :initarg :slots) > (editablep :accessor editablep :initform t :initarg :editablep) > (edit-label :accessor edit-label :initform "Edit") > (deleteablep :accessor deleteablep :initform :deleteablep) > (delete-label :accessor delete-label :initform "Delete") > (instances :accessor instances))) > > I'm wondering if you didn't want to write: > > (deleteablep :accessor deleteablep :initarg :deleteablep) > > instead? good catch. fixed. -- -Marco Ring the bells that still can ring. Forget the perfect offering. There is a crack in everything. That's how the light gets in. -Leonard Cohen From whalliburton at gmail.com Fri Aug 5 21:51:09 2005 From: whalliburton at gmail.com (William Halliburton) Date: Fri, 5 Aug 2005 16:51:09 -0500 Subject: [Bese-devel] Backtracking question Message-ID: <4e7bd29e0508051451143b63b8@mail.gmail.com> Hello. I am trying to get the hang of the backtracking. I have a test component: (defcomponent backtest (widget-component) ((val1 :backtrack t :initform nil :initarg :val1 :accessor backtest.val1) (val2 :backtrack #'copy-seq :initform '(nil) :initarg :val2 :accessor backtest.val2))) (defaction backtest-toggle-1 ((backtest backtest)) (setf (backtest.val1 backtest) (not (backtest.val1 backtest)))) (defaction backtest-toggle-2 ((backtest backtest)) (setf (car (backtest.val2 backtest)) (not (car (backtest.val2 backtest))))) (defmethod render-on ((res response) (backtest backtest)) ( The following hack makes the code output more readable. (defmethod render-on ((res response) (insp ucw-inspector)) (multiple-value-bind (title content) (swank::inspect-for-emacs (slot-value insp 'datum) (swank::make-default-inspector)) (<:h2 (<:as-html title)) (dolist (part content) (etypecase part (null nil) (string (if (< (length part) 100) (<:as-html part) (<:pre (<:as-html part)))) (cons (swank::destructure-case part ((:newline) (<:br)) ((:value obj &optional (str (prin1-to-string obj))) ( What provisions exist to manage encodings? I'm observing the following behavior: With Mozilla 1.7, and with Safari, in a text area, I type (copy-paste from emacs HELLO actually) random characters. The text I receive contains these characters encoded as ✏ sequences. Content of attribute as received in clisp: | Japanese (日本語) こんにちは, コンニチハ | Chinese (中文,普通话,汉语) 你好 | Cantonese (粵語,廣東話) 早晨, 你好 | Korean (한글) 안녕하세요, 안녕하십니까 | | Difference among chinese characters in GB, JIS, KSC, BIG5: | GB 元气 开发 | JIS 元気 開発 | KSC 元氣 開發 | BIG5 元氣 開發 But when I send back this text in the same textarea, the ampersands get escaped: Source of HTML received back: So, it looks like either the text is not decoded on the way from the browser to ucw, or is not encoded back from ucw to the browser. Is this a bug or a feature? -- __Pascal Bourguignon__ http://www.informatimago.com/ Grace personified, I leap into the window. I meant to do that. From mb at bese.it Sat Aug 6 06:20:26 2005 From: mb at bese.it (Marco Baringer) Date: Sat, 06 Aug 2005 08:20:26 +0200 Subject: [Bese-devel] code in inspector In-Reply-To: <4e7bd29e050805143130172a84@mail.gmail.com> (William Halliburton's message of "Fri, 5 Aug 2005 16:31:04 -0500") References: <4e7bd29e050805143130172a84@mail.gmail.com> Message-ID: William Halliburton writes: > The following hack makes the code output more readable. applied. thanks. -- -Marco Ring the bells that still can ring. Forget the perfect offering. There is a crack in everything. That's how the light gets in. -Leonard Cohen From mb at bese.it Sat Aug 6 06:20:49 2005 From: mb at bese.it (Marco Baringer) Date: Sat, 06 Aug 2005 08:20:49 +0200 Subject: [Bese-devel] Backtracking question In-Reply-To: <4e7bd29e0508051451143b63b8@mail.gmail.com> (William Halliburton's message of "Fri, 5 Aug 2005 16:51:09 -0500") References: <4e7bd29e0508051451143b63b8@mail.gmail.com> Message-ID: William Halliburton writes: > Does anyone have a good explanation on the backtracking and how to fix > this code. looks like a bug to me. -- -Marco Ring the bells that still can ring. Forget the perfect offering. There is a crack in everything. That's how the light gets in. -Leonard Cohen From mb at bese.it Sat Aug 6 09:10:21 2005 From: mb at bese.it (Marco Baringer) Date: Sat, 06 Aug 2005 11:10:21 +0200 Subject: [Bese-devel] Backtracking question In-Reply-To: <4e7bd29e0508051451143b63b8@mail.gmail.com> (William Halliburton's message of "Fri, 5 Aug 2005 16:51:09 -0500") References: <4e7bd29e0508051451143b63b8@mail.gmail.com> Message-ID: William Halliburton writes: > Val1 works as expected. I can toggle it and it will not affect other > frames that have forked. Val2, on the other hand, does not work as > exprected. Toggling and then reloading the page will toggle again, > also forking the page and toggleing on one page will set the value in > all instances. I replaced copy-seq with my own function for copying > and it looks like it is never called. I am assuming that I have a > misunderstanding about how the backtracking works. ok, this was something of a pain to track down but turned out to be a bug in ucw's backtracking stuff. thanks for the report (and in particular the test case). to make a long story short we were copy'ing values where we didn't need too (when creating the new backtrack list) and not doing it when we should have (when restoring old backtracks after the user had used the back butten). what ended up happening is that we'de save, for example, (NIL) in the backtrack, you'do go forward a bit and then come back. when you came back we used that exact list, instead of a copy, and you'd change it (in the backtest-toggle-2 action). we'd then start saving/copying that list, madness would ensue. do a darcs pull from the ucw_dev repo to get this fix (the patch you're interested in is called "Fix backtracking on non immediate objects"). > Does anyone have a good explanation on the backtracking and how to fix > this code. how to fix it? the same way i fix everything! shoot marco! :) -- -Marco Ring the bells that still can ring. Forget the perfect offering. There is a crack in everything. That's how the light gets in. -Leonard Cohen From whalliburton at gmail.com Sun Aug 7 00:14:30 2005 From: whalliburton at gmail.com (William Halliburton) Date: Sat, 6 Aug 2005 19:14:30 -0500 Subject: [Bese-devel] Another possible backtracking bug. Message-ID: <4e7bd29e05080617146a0767d1@mail.gmail.com> I am now using the latest ucw_dev. Code: (defcomponent calltest (widget-component) ((val :backtrack t :initform 0 :initarg :val :accessor calltest.val))) (defaction calltest-increment ((calltest calltest)) (incf (calltest.val calltest)) (if (= (calltest.val calltest) 3) (call 'info-message :message "At 3" :ok-text nil))) (defmethod render-on ((res response) (calltest calltest)) ( Hello. My last message may not be a problem - it could be caused by using an old arnesi without the new cps. I am unable to get ucw_dev to run. I noticed that after moving to ucw_dev that the examples did not work - KALL not found. I darcs the latest arnesi and it contained KALL. For good mesure I got a new ucw_dev. Reloaded ucw (sbcl + araneida). Now any request causes an error. I am doing a (load "start.lisp") and then attempting to load the examples/index.ucw. Am I using the proper versions? What is the requirements for ucw_dev? Thank you, Will Backtrace: The value (SETF IT.BESE.UCW:COMPONENT.PLACE) is not of type SYMBOL. [Condition of type TYPE-ERROR] Restarts: 0: [SHOW-BACKTRACE] Send the client a backtrace page. 1: [RETRY] Clearout the response and retry calling the action. 2: [SERVER-ERROR] Send the client an internal server error page. 3: [ABORT-RESPONSE] Abort this response and answer another request 4: [ABORT] Exit debugger, returning to top level. Backtrace: 0: ((SB-PCL::FAST-METHOD SWANK-BACKEND:CALL-WITH-DEBUGGING-ENVIRONMENT (T)) # # #) 1: (SWANK::CALL-WITH-BINDINGS ((*PRINT-PRETTY*) (*PRINT-LEVEL* . 4) (*PRINT-LENGTH* . 10) (*PRINT-CIRCLE* . T) (*PRINT-READABLY*) (*PRINT-PPRINT-DISPATCH* . #) (*PRINT-GENSYM* . T) (*PRINT-BASE* . 10) (*PRINT-RADIX*) (*PRINT-ARRAY* . T) ...) #) 2: (SWANK::DEBUG-IN-EMACS #) 3: ((LAMBDA NIL)) 4: (SWANK::CALL-WITH-REDIRECTED-IO # #) 5: (SWANK::CALL-WITH-CONNECTION # #) 6: ((SB-PCL::FAST-METHOD IT.BESE.UCW::HANDLE-ACTION-ERROR (ERROR)) # # #) 7: (SIGNAL #) 8: (ERROR TYPE-ERROR) 9: (SB-KERNEL::OBJECT-NOT-SYMBOL-ERROR-HANDLER # #.(SB-SYS:INT-SAP #XB7BBA4C0) # (398)) 10: (SB-KERNEL:INTERNAL-ERROR #.(SB-SYS:INT-SAP #XB7BBA1B0) #) 11: ("foreign function: call_into_lisp") 12: ("foreign function: funcall2") 13: ("foreign function: interrupt_internal_error") 14: ("foreign function: sigtrap_handler") 15: (SYMBOL-FUNCTION (SETF IT.BESE.UCW:COMPONENT.PLACE)) 16: ((SB-PCL::FAST-METHOD IT.BESE.ARNESI::EVALUATE/CPS (IT.BESE.ARNESI::FREE-FUNCTION-OBJECT-FORM T T)) # # # # (IT.BESE.ARNESI::K-FOR-CPS-APPLY (# # #) NIL ((:LET #1# . #) (:LET #:G6098 . #2=#) . #3=(# # #)) (IT.BESE.ARNESI::K-FOR-EVALUATE/CPS-PROGN (# #) #3# (IT.BESE.ARNESI::K-FOR-EVALUATE/CPS-PROGN # #3# #)))) 17: (IT.BESE.ARNESI::DRIVE-CPS #) 18: ((LABELS IT.BESE.UCW::CALL-ACTION) #) 19: ((SB-PCL::FAST-METHOD IT.BESE.UCW::SERVICE (IT.BESE.UCW::STANDARD-SESSION-FRAME IT.BESE.UCW::REQUEST-CONTEXT)) # # # #) 20: ((LAMBDA (SB-PCL::.PV-CELL. SB-PCL::.NEXT-METHOD-CALL. SB-PCL::.ARG0. SB-PCL::.ARG1.)) # # # #) 21: ((LAMBDA (SB-PCL::.PV-CELL. SB-PCL::.NEXT-METHOD-CALL. SB-PCL::.ARG0. SB-PCL::.ARG1.)) # # # {92AA189}> #) 22: ((LAMBDA (SB-PCL::.PV-CELL. SB-PCL::.NEXT-METHOD-CALL. SB-PCL::.ARG0. SB-PCL::.ARG1.)) # # # #) 23: ((SB-PCL::FAST-METHOD IT.BESE.UCW::HANDLE-REQUEST (IT.BESE.UCW:STANDARD-SERVER IT.BESE.UCW:REQUEST IT.BESE.UCW:RESPONSE)) # # # # #) 24: ((SB-PCL::FAST-METHOD ARANEIDA:HANDLE-REQUEST-RESPONSE (IT.BESE.UCW::UCW-HANDLER T T)) # # # # #) 25: ((SB-PCL::FAST-METHOD ARANEIDA:HANDLE-REQUEST (ARANEIDA:HANDLER T)) # # # #) 26: ((SB-PCL::FAST-METHOD ARANEIDA:HANDLE-REQUEST (ARANEIDA:HANDLER T)) # # # #) 27: ((LABELS ARANEIDA::DO-IT) # #) 28: (ARANEIDA::SERVE-EVENT-HTTP-LISTENER-ACCEPT-ONE-REQUEST #) 29: (SB-IMPL::SUB-SERVE-EVENT NIL 0) 30: (SB-SYS:WAIT-UNTIL-FD-USABLE 0 :INPUT NIL) 31: (SB-IMPL::REFILL-BUFFER/FD #) 32: (SB-IMPL::INPUT-CHAR/ASCII # NIL #:EOF-OBJECT) 33: (READ-CHAR # NIL #:EOF-OBJECT #) 34: (READ-CHAR # NIL #:EOF-OBJECT #) 35: (READ-CHAR # NIL #:EOF-OBJECT #) 36: (READ-PRESERVING-WHITESPACE # NIL (NIL) T) 37: (READ-PRESERVING-WHITESPACE # NIL (NIL) NIL) 38: (READ # NIL (NIL) NIL) 39: (SB-IMPL::REPL-READ-FORM-FUN # #) 40: (SB-IMPL::REPL-FUN NIL) 41: ((LAMBDA NIL)) 42: ((LAMBDA NIL)) 43: (SB-IMPL::%WITH-REBOUND-IO-SYNTAX #) 44: (SB-IMPL::TOPLEVEL-REPL NIL) 45: (SB-IMPL::TOPLEVEL-INIT) 46: ((FLET SB-IMPL::RESTART-LISP)) From whalliburton at gmail.com Sun Aug 7 04:13:46 2005 From: whalliburton at gmail.com (William Halliburton) Date: Sat, 6 Aug 2005 23:13:46 -0500 Subject: [Bese-devel] Now a problem of a different sort - solved Message-ID: <4e7bd29e05080621133e8efe67@mail.gmail.com> Looks like the walker was setting up free-function-object-form name to be (setf foo) and this was dying on the symbol-function. Replacing symbol-function with fdefinition fixes the problem. (defmethod evaluate/cps ((func free-function-object-form) env k) (declare (ignore env)) (if (fboundp (name func)) (kontinue k (fdefinition (name func))) (error "Unbound function ~S." (name func)))) What is the proper way to submit bug fixes? I am new to darcs but have used cvs for a long time. Thanks, Will From mb at bese.it Sun Aug 7 06:06:43 2005 From: mb at bese.it (Marco Baringer) Date: Sun, 07 Aug 2005 08:06:43 +0200 Subject: [Bese-devel] Now a problem of a different sort - solved In-Reply-To: <4e7bd29e05080621133e8efe67@mail.gmail.com> (William Halliburton's message of "Sat, 6 Aug 2005 23:13:46 -0500") References: <4e7bd29e05080621133e8efe67@mail.gmail.com> Message-ID: William Halliburton writes: > Looks like the walker was setting up free-function-object-form name to > be (setf foo) and this was dying on the symbol-function. Replacing > symbol-function with fdefinition fixes the problem. yeah, ran into that myself yesterday :( > What is the proper way to submit bug fixes? I am new to darcs but have > used cvs for a long time. go to the arnesi directory, do a 'darcs record' it will ask you which changes you want to include in the patch, when you're done you give the patch a name. then you need to send off the patch you just created. do a 'darcs send -o patch' and darcs asks you which patches (of those available in the repository) you want to include in the new patch file, in this case you'd just chose the last one. then send an email and attach the file 'patch'. done. do this often enough and you get commit privs :) -- -Marco Ring the bells that still can ring. Forget the perfect offering. There is a crack in everything. That's how the light gets in. -Leonard Cohen From mb at bese.it Sun Aug 7 06:10:08 2005 From: mb at bese.it (Marco Baringer) Date: Sun, 07 Aug 2005 08:10:08 +0200 Subject: [Bese-devel] Now a problem of a different sort. In-Reply-To: <4e7bd29e050806174734256863@mail.gmail.com> (William Halliburton's message of "Sat, 6 Aug 2005 19:47:47 -0500") References: <4e7bd29e050806174734256863@mail.gmail.com> Message-ID: William Halliburton writes: > Hello. > > My last message may not be a problem - it could be caused by using an > old arnesi without the new cps. I am unable to get ucw_dev to run. i ran your sample code and got the expected output (not the broken output you apparently got), so i'm going to ignore the issue unless you continue to experience problems. > I noticed that after moving to ucw_dev that the examples did not work > - KALL not found. there _should_ be a check in ucw.asd which ensures that you aren't running a new ucw with an old arnesi, i don't know why that didn't kick in. > Am I using the proper versions? What is the requirements for ucw_dev? up until a few minutes ago we had the following discrepency: the ucw repo was expecting the 'old' arnesi cps transformer, but that didn't exist anywore since i'd merged the patches into the (only) arnesi repo. so the _only_ way to get things to work was to use the latest stuff in ucw_dev and arnesi. i've just merged the two branches (ucw and ucw_dev) and created an arnesi_dev branch which ucw_dev will follow. -- -Marco Ring the bells that still can ring. Forget the perfect offering. There is a crack in everything. That's how the light gets in. -Leonard Cohen From mb at bese.it Sun Aug 7 14:00:06 2005 From: mb at bese.it (Marco Baringer) Date: Sun, 07 Aug 2005 16:00:06 +0200 Subject: [Bese-devel] ucw bug reporting Message-ID: hi, i just added a new restart to ucw's internal error handling mechanism: generate-backtrace-for-emacs. what this restart should do is open up a new emacs buffer and fill it with lots and lots of details regarding the error. the idea being that you send this to the list and I have enough info to at least understand the problem, without having to first ask you for a backtrace and let a few days go by. it's really flaky (both the emacs and lisp sides) and i'd appreciate it if people could test it out and make sure it works. p.s. - recent ucw breaks on openmcl without the fix provided here: http://article.gmane.org/gmane.lisp.openmcl.devel/883 -- -Marco Ring the bells that still can ring. Forget the perfect offering. There is a crack in everything. That's how the light gets in. -Leonard Cohen From mb at bese.it Sun Aug 7 14:10:50 2005 From: mb at bese.it (Marco Baringer) Date: Sun, 07 Aug 2005 16:10:50 +0200 Subject: [Bese-devel] ucw bug reporting In-Reply-To: (Marco Baringer's message of "Sun, 07 Aug 2005 16:00:06 +0200") References: Message-ID: "Marco Baringer" writes: > i just added a new restart to ucw's internal error handling > mechanism: generate-backtrace-for-emacs. what this restart should do > is open up a new emacs buffer and fill it with lots and lots of > details regarding the error. the idea being that you send this to > the list and I have enough info to at least understand the problem, > without having to first ask you for a backtrace and let a few days > go by. in case anyone actuallly tries to look at the contents of that buffer note that it's intended to be lookeed at after "M-x occur RET ^--- RET" at not directly. -- -Marco Ring the bells that still can ring. Forget the perfect offering. There is a crack in everything. That's how the light gets in. -Leonard Cohen From whalliburton at gmail.com Mon Aug 8 01:32:22 2005 From: whalliburton at gmail.com (William Halliburton) Date: Sun, 7 Aug 2005 20:32:22 -0500 Subject: [Bese-devel] Backtracking bug still present in my runs. Message-ID: <4e7bd29e05080718323c851906@mail.gmail.com> Darcs a fresh arnesi_dev (the website still says that arnesi_cvs is the development branch). Darcs a fresh ucw_dev. Load into sbcl + araneida. The calltest component from the previous email still displays the same behavior. Will attempt to debug now. Will From mb at bese.it Mon Aug 8 07:01:00 2005 From: mb at bese.it (Marco Baringer) Date: Mon, 08 Aug 2005 09:01:00 +0200 Subject: [Bese-devel] Backtracking bug still present in my runs. In-Reply-To: <4e7bd29e05080718323c851906@mail.gmail.com> (William Halliburton's message of "Sun, 7 Aug 2005 20:32:22 -0500") References: <4e7bd29e05080718323c851906@mail.gmail.com> Message-ID: William Halliburton writes: > Darcs a fresh arnesi_dev (the website still says that arnesi_cvs is > the development branch). thanks for pointing that out. > Darcs a fresh ucw_dev. Load into sbcl + > araneida. > > The calltest component from the previous email still displays the > same behavior. i get the correct behaviour (openmcl+mod_lisp and sbcl+mod_lisp on darwin, latest ucw). here's a short description of the machanics of backtracking which i hope will help you in your debugging (you may or may not have already figured this out): every frame has a list representing the stuff it needs to backtrack. for every place (which is usally a slot but can be any setf'able form) have a cons cell composed of value and place, value is some lisp object and place is an instance of the PLACE class with the three closures for getting, setting and copying the value. whenever a reuest comes in we call REINSTATE-BACKTRACK (this, all the following two methods, are defined in ucw/src/backtrack.lisp) which simply calls the setter closure and attempts to create the state of the UI at the time the frame was generated. we now create a new frame (representing this request/respone cycle) and call CLONE-BACKTRACK to create the new frame's backtrack list, atm this is just a call to copy-tree. we then call the action which probably changes the values of the backtrack'd place and maybe adds new place (by calling the BACKTRACK method). When the action is done, just _before_ calling the render-on method, we store the current values of all the places which need backtracking by calling SAVE-BACKTRACKED. By tracing these 4 methods you can get a very good idea of what's getting saved, what's getting reloaded and when. hth. -- -Marco Ring the bells that still can ring. Forget the perfect offering. There is a crack in everything. That's how the light gets in. -Leonard Cohen From mb at bese.it Mon Aug 8 07:23:41 2005 From: mb at bese.it (Marco Baringer) Date: Mon, 08 Aug 2005 09:23:41 +0200 Subject: [Bese-devel] openmcl support Message-ID: UCW's new backtrace stuff triggers a bug in openmcl, you'll need to add put this to your .openmcl-init or whatever file: (let ((ccl::*warn-if-redefine-kernel* nil)) (defun write-a-cons (cons stream level) (declare (type cons cons) (type stream stream) (type fixnum level)) (let ((print-length (get-*print-frob* '*print-length*)) (level-1 (%i- level 1)) (head (%car cons)) (tail (%cdr cons))) (declare (type fixnum print-length) (type fixnum level-1)) (unless (and *print-abbreviate-quote* (write-abbreviate-quote head tail stream level-1)) (progn (pp-start-block stream #\() (if (= print-length 0) (%write-string "..." stream) (progn (write-internal stream head level-1 nil) (write-internal stream tail level-1 (if (atom tail) print-length (%i- print-length 1))))) (pp-end-block stream #\))))))) 0.14.4 sholud fix this. -- -Marco Ring the bells that still can ring. Forget the perfect offering. There is a crack in everything. That's how the light gets in. -Leonard Cohen From whalliburton at gmail.com Mon Aug 8 16:21:14 2005 From: whalliburton at gmail.com (William Halliburton) Date: Mon, 8 Aug 2005 11:21:14 -0500 Subject: [Bese-devel] admin page currently broken Message-ID: <4e7bd29e05080809211e09e4b0@mail.gmail.com> Attempting to long into admin page with admin/admin. I believe the error is in the rendering of the admin page. Tried to trace down the problem, but brain still has not jelled on this code. Look like the problem is in that last case of (defmethod evaluate/cps ((func free-application-form) env k) The free-application-form is a mapcar over a list with the first element a cps-closure. Dying on the mapcar because cps-closure is not a function. Below is backtrace plus new emacs backtrace (do not know if this is working as It did not generate much informaton). Will Backtrace: 0: ((SB-PCL::FAST-METHOD SWANK-BACKEND:CALL-WITH-DEBUGGING-ENVIRONMENT (T)) # # #) 1: (SWANK::CALL-WITH-BINDINGS ((*PRINT-PRETTY*) (*PRINT-LEVEL* . 4) (*PRINT-LENGTH* . 10) (*PRINT-CIRCLE* . T) (*PRINT-READABLY*) (*PRINT-PPRINT-DISPATCH* . #) (*PRINT-GENSYM* . T) (*PRINT-BASE* . 10) (*PRINT-RADIX*) (*PRINT-ARRAY* . T) ...) #) 2: (SWANK::DEBUG-IN-EMACS #) 3: ((LAMBDA NIL)) 4: (SWANK::CALL-WITH-REDIRECTED-IO # #) 5: (SWANK::CALL-WITH-CONNECTION # #) 6: ((SB-PCL::FAST-METHOD IT.BESE.UCW::HANDLE-ACTION-ERROR (ERROR T)) # # # (#S(IT.BESE.UCW::BACKTRACE-FRAME :INDEX 4 :DESCRIPTION "(ERROR TYPE-ERROR)" :LOCALS (# #) :SOURCE-LOCATION (:ERROR "The source-path (NIL) is not valid.")) #S(IT.BESE.UCW::BACKTRACE-FRAME :INDEX 5 :DESCRIPTION "(SB-KERNEL::OBJECT-NOT-TYPE-ERROR-HANDLER # #.(SB-SYS:INT-SAP #XB7C3C31C) # (14 78))" :LOCALS (# # # # #) :SOURCE-LOCATION (:LOCATION # # #)) #S(IT.BESE.UCW::BACKTRACE-FRAME :INDEX 6 :DESCRIPTION "(SB-KERNEL:INTERNAL-ERROR #.(SB-SYS:INT-SAP #XB7C3C010) #)" :LOCALS (# # #) :SOURCE-LOCATION (:LOCATION # # #)) #S(IT.BESE.UCW::BACKTRACE-FRAME :INDEX 7 :DESCRIPTION "(\"foreign function: call_into_lisp\")" :LOCALS NIL :SOURCE-LOCATION (:ERROR "The value # is not of type SB-DI::COMPILED-DEBUG-FUN.")) #S(IT.BESE.UCW::BACKTRACE-FRAME :INDEX 8 :DESCRIPTION "(\"foreign function: funcall2\")" :LOCALS NIL :SOURCE-LOCATION (:ERROR "The value # is not of type SB-DI::COMPILED-DEBUG-FUN.")) #S(IT.BESE.UCW::BACKTRACE-FRAME :INDEX 9 :DESCRIPTION "(\"foreign function: interrupt_internal_error\")" :LOCALS NIL :SOURCE-LOCATION (:ERROR "The value # is not of type SB-DI::COMPILED-DEBUG-FUN.")) #S(IT.BESE.UCW::BACKTRACE-FRAME :INDEX 10 :DESCRIPTION "(\"foreign function: sigtrap_handler\")" :LOCALS NIL :SOURCE-LOCATION (:ERROR "The value # is not of type SB-DI::COMPILED-DEBUG-FUN.")) #S(IT.BESE.UCW::BACKTRACE-FRAME :INDEX 11 :DESCRIPTION "(MAPCAR # (# #))" :LOCALS (# # #) :SOURCE-LOCATION (:LOCATION # # #)) #S(IT.BESE.UCW::BACKTRACE-FRAME :INDEX 12 :DESCRIPTION "((LAMBDA (IT.BESE.ARNESI::ARGUMENTS)) (# (# #)))" :LOCALS (# # # # #) :SOURCE-LOCATION (:LOCATION # # #)) #S(IT.BESE.UCW::BACKTRACE-FRAME :INDEX 13 :DESCRIPTION "(IT.BESE.ARNESI::EVALUATE-ARGUMENTS-THEN-APPLY # NIL ((# #) #) ((:LET IT.BESE.UCW::SERVER-REPL . #) (:LET IT.BESE.UCW::CONTROL-PANEL . #) (:BLOCK IT.BESE.UCW:LOGIN-SUCCESSFUL IT.BESE.ARNESI::TOPLEVEL-K) (:LET IT.BESE.UCW:SELF . #) (:LET IT.BESE.UCW::L . #)))" :LOCALS (# # # # # # # #) :SOURCE-LOCATION (:LOCATION # # #)) ...)) 7: (SIGNAL #) 8: (ERROR TYPE-ERROR) 9: (SB-KERNEL::OBJECT-NOT-TYPE-ERROR-HANDLER # #.(SB-SYS:INT-SAP #XB7C3C31C) # (14 78)) 10: (SB-KERNEL:INTERNAL-ERROR #.(SB-SYS:INT-SAP #XB7C3C010) #) 11: ("foreign function: call_into_lisp") 12: ("foreign function: funcall2") 13: ("foreign function: interrupt_internal_error") 14: ("foreign function: sigtrap_handler") 15: (MAPCAR # (# #)) 16: ((LAMBDA (IT.BESE.ARNESI::ARGUMENTS)) (# (# #))) Locals: IT.BESE.ARNESI::ARGUMENTS = (# (# #)) IT.BESE.ARNESI::FUNC = : #:G763 = : #:G778 = : IT.BESE.ARNESI::K = : Catch-tags: #:SB-DEBUG-CATCH-TAG 17: (IT.BESE.ARNESI::EVALUATE-ARGUMENTS-THEN-APPLY # NIL ((# #) #) ((:LET IT.BESE.UCW::SERVER-REPL . #) (:LET IT.BESE.UCW::CONTROL-PANEL . #) (:BLOCK IT.BESE.UCW:LOGIN-SUCCESSFUL IT.BESE.ARNESI::TOPLEVEL-K) (:LET IT.BESE.UCW:SELF . #1=#) (:LET IT.BESE.UCW::L . #1#))) Locals: IT.BESE.ARNESI::ENV = ((:LET IT.BESE.UCW::SERVER-REPL . #) (:LET IT.BESE.UCW::CONTROL-PANEL . #) (:BLOCK IT.BESE.UCW:LOGIN-SUCCESSFUL IT.BESE.ARNESI::TOPLEVEL-K) (:LET IT.BESE.UCW:SELF . #1=#) (:LET IT.BESE.UCW::L . #1#)) IT.BESE.ARNESI::EVALUATED-ARGUMENTS = ((# #) #) #:G1288 = : #:G1292 = : #:G1296 = : #:G1304 = : IT.BESE.ARNESI::HANDLER = # IT.BESE.ARNESI::REMAINING-ARGUMENTS = NIL Catch-tags: #:SB-DEBUG-CATCH-TAG 18: ((LAMBDA NIL)) 19: (IT.BESE.ARNESI::DRIVE-CPS #) 20: ((LABELS IT.BESE.UCW::CALL-ACTION) #) 21: ((SB-PCL::FAST-METHOD IT.BESE.UCW::SERVICE (IT.BESE.UCW::STANDARD-SESSION-FRAME IT.BESE.UCW::REQUEST-CONTEXT)) # # # #) 22: ((LAMBDA (SB-PCL::.PV-CELL. SB-PCL::.NEXT-METHOD-CALL. SB-PCL::.ARG0. SB-PCL::.ARG1.)) # # # #) 23: ((LAMBDA (SB-PCL::.PV-CELL. SB-PCL::.NEXT-METHOD-CALL. SB-PCL::.ARG0. SB-PCL::.ARG1.)) # # # {A257291}> #) 24: ((LAMBDA (SB-PCL::.PV-CELL. SB-PCL::.NEXT-METHOD-CALL. SB-PCL::.ARG0. SB-PCL::.ARG1.)) # # # #) 25: ((SB-PCL::FAST-METHOD IT.BESE.UCW::HANDLE-REQUEST (IT.BESE.UCW:STANDARD-SERVER IT.BESE.UCW:REQUEST IT.BESE.UCW:RESPONSE)) # # # # #) 26: ((SB-PCL::FAST-METHOD ARANEIDA:HANDLE-REQUEST-RESPONSE (IT.BESE.UCW::UCW-HANDLER T T)) # # # # #) 27: ((SB-PCL::FAST-METHOD ARANEIDA:HANDLE-REQUEST (ARANEIDA:HANDLER T)) # # # #) 28: ((SB-PCL::FAST-METHOD ARANEIDA:HANDLE-REQUEST (ARANEIDA:HANDLER T)) # # # #) 29: ((LABELS ARANEIDA::DO-IT) # #) 30: (ARANEIDA::SERVE-EVENT-HTTP-LISTENER-ACCEPT-ONE-REQUEST #) 31: (SB-IMPL::SUB-SERVE-EVENT NIL 0) 32: (SB-SYS:WAIT-UNTIL-FD-USABLE 0 :INPUT NIL) 33: (SB-IMPL::REFILL-BUFFER/FD #) 34: (SB-IMPL::INPUT-CHAR/ASCII # NIL #:EOF-OBJECT) 35: (READ-CHAR # NIL #:EOF-OBJECT #) 36: (READ-CHAR # NIL #:EOF-OBJECT #) 37: (READ-CHAR # NIL #:EOF-OBJECT #) 38: (READ-PRESERVING-WHITESPACE # NIL (NIL) T) 39: (READ-PRESERVING-WHITESPACE # NIL (NIL) NIL) 40: (READ # NIL (NIL) NIL) 41: (SB-IMPL::REPL-READ-FORM-FUN # #) 42: (SB-IMPL::REPL-FUN NIL) 43: ((LAMBDA NIL)) 44: ((LAMBDA NIL)) 45: (SB-IMPL::%WITH-REBOUND-IO-SYNTAX #) 46: (SB-IMPL::TOPLEVEL-REPL NIL) 47: (SB-IMPL::TOPLEVEL-INIT) 48: ((FLET SB-IMPL::RESTART-LISP)) Emacs backtrace: destructure-case failed: (:EVALUATE-IN-EMACS " (save-excursion (loop with buffer-name = \"*UCW Backtrace <%d>*\" for id upfrom 0 for backtrace-buffer = (get-buffer (format buffer-name id)) while backtrace-buffer finally do (switch-to-buffer-other-window (format buffer-name id))) (insert \"--- UCW Backtrace --- Condition: # # is a TYPE-ERROR. Its slot values are (:DATUM #1=# :EXPECTED-TYPE #2=(OR FUNCTION SYMBOL) SB-KERNEL::EXPECTED-TYPE #2# SB-KERNEL::DATUM #1#). --- Date: 2005-08-08T12:18:29 --- Lisp: \\\"SBCL\\\" \\\"0.9.2\\\" --- Server: # # is an instance of class #. The following slots have :INSTANCE allocation: APPLICATIONS (# #) APPLICATIONS-LOCK :NULL-LOCK STARTED T BACKEND # --- Backend: # # is an instance of class #. The following slots have :INSTANCE allocation: LISTENER # DEFAULT-URL # LISTENER-CLASS ARANEIDA:SERVE-EVENT-HTTP-LISTENER --- Application: # # is an instance of class #. The following slots have :INSTANCE allocation: URL-PREFIX \\\"/ucw/admin/\\\" SESSION-TYPE IT.BESE.UCW::STANDARD-SESSION TAL-GENERATOR # WWW-ROOTS (#P\\\"/home/conrad/website/ucw/ucw_dev/bin/../wwwroot/./ucw/examples/\\\") ENTRY-POINTS # SESSION-TABLE # SERVER # --- Request: # # is an instance of class #. The following slots have :INSTANCE allocation: REQUEST # --- Response: # # is an instance of class #. The following slots have :INSTANCE allocation: REQUEST # HEADERS ((\\\"Content-Type\\\" . \\\"text/html\\\") (\\\"Status\\\" . \\\"200\\\")) CONTENT-STREAM # --- BACKTRACE --- FRAME 4 (ERROR TYPE-ERROR) --- Locals: SB-DEBUG::ARG-0 ==> 5 SB-DEBUG::ARG-1 ==> TYPE-ERROR --- Source: (:ERROR \\\"The source-path (NIL) is not valid.\\\") --- FRAME 5 (SB-KERNEL::OBJECT-NOT-TYPE-ERROR-HANDLER # #.(SB-SYS:INT-SAP #XB7C3C31C) # (14 78)) --- Locals: SB-DEBUG::ARG-0 ==> 4 SB-DEBUG::ARG-1 ==> : SB-DEBUG::ARG-2 ==> #.(SB-SYS:INT-SAP #XB7C3C31C) SB-DEBUG::ARG-3 ==> # SB-DEBUG::ARG-4 ==> (14 78) --- Source: (:LOCATION (:FILE \\\"/usr/lib/sbcl/src/code/interr.lisp\\\") (:POSITION 6404) (:SNIPPET \\\"(deferr object-not-type-error (object type) (error (if (and (typep object 'instance) (layout-invalid (%instance-layout object))) 'layout-invalid 'type-error) :datum object :expected-type type)) (deferr layout-invalid-error (object la\\\")) --- FRAME 6 (SB-KERNEL:INTERNAL-ERROR #.(SB-SYS:INT-SAP #XB7C3C010) #) --- Locals: SB-DEBUG::ARG-0 ==> 2 SB-DEBUG::ARG-1 ==> #.(SB-SYS:INT-SAP #XB7C3C010) SB-DEBUG::ARG-2 ==> : --- Source: (:LOCATION (:FILE \\\"/usr/lib/sbcl/src/code/interr.lisp\\\") (:POSITION 10988) (:SNIPPET \\\"(defun internal-error (context continuable) (declare (type system-area-pointer context)) (declare (ignore continuable)) (/show0 \\\\\\\"entering INTERNAL-ERROR, CONTEXT=..\\\\\\\") (/hexstr context) (infinite-error-protect (/show0 \\\\\\\"about to bind ALIEN-CONTE\\\")) --- FRAME 7 (\\\"foreign function: call_into_lisp\\\") --- Locals: --- Source: (:ERROR \\\"The value # is not of type SB-DI::COMPILED-DEBUG-FUN.\\\") --- FRAME 8 (\\\"foreign function: funcall2\\\") --- Locals: --- Source: (:ERROR \\\"The value # is not of type SB-DI::COMPILED-DEBUG-FUN.\\\") --- FRAME 9 (\\\"foreign function: interrupt_internal_error\\\") --- Locals: --- Source: (:ERROR \\\"The value # is not of type SB-DI::COMPILED-DEBUG-FUN.\\\") --- FRAME 10 (\\\"foreign function: sigtrap_handler\\\") --- Locals: --- Source: (:ERROR \\\"The value # is not of type SB-DI::COMPILED-DEBUG-FUN.\\\") --- FRAME 11 (MAPCAR # (# #)) --- Locals: SB-DEBUG::ARG-0 ==> 2 SB-DEBUG::ARG-1 ==> # SB-DEBUG::ARG-2 ==> (# #) --- Source: (:LOCATION (:FILE \\\"/usr/lib/sbcl/src/code/list.lisp\\\") (:POSITION 41554) (:SNIPPET \\\"(defun mapcar (function list &rest more-lists) #!+sb-doc \\\\\\\"Apply FUNCTION to successive elements of LIST. Return list of FUNCTION return values.\\\\\\\" (map1 function (cons list more-lists) :list t)) (defun mapcan (function list &rest more-lists) #!+s\\\")) --- FRAME 12 ((LAMBDA (IT.BESE.ARNESI::ARGUMENTS)) (# (# #))) --- Locals: IT.BESE.ARNESI::ARGUMENTS ==> (# (# #)) IT.BESE.ARNESI::FUNC ==> : #:G763 ==> : #:G778 ==> : IT.BESE.ARNESI::K ==> : --- Source: (:LOCATION (:FILE \\\"/home/conrad/website/ucw/arnesi_dev/src/cps.lisp\\\") (:POSITION 6830) (:SNIPPET \\\"(apply (fdefinition (operator func)) arguments)))) (arguments func) '() env)))) (defmethod evaluate/cps ((func local-application-form) env k) (evaluate/cps-apply (arguments func) (list (list (lookup env :flet (operator func) :error-p t))) en\\\")) --- FRAME 13 (IT.BESE.ARNESI::EVALUATE-ARGUMENTS-THEN-APPLY # NIL ((# #) #) ((:LET IT.BESE.UCW::SERVER-REPL . #) (:LET IT.BESE.UCW::CONTROL-PANEL . #) (:BLOCK IT.BESE.UCW:LOGIN-SUCCESSFUL IT.BESE.ARNESI::TOPLEVEL-K) (:LET IT.BESE.UCW:SELF . #) (:LET IT.BESE.UCW::L . #))) --- Locals: IT.BESE.ARNESI::ENV ==> ((:LET IT.BESE.UCW::SERVER-REPL . #) (:LET IT.BESE.UCW::CONTROL-PANEL . #) (:BLOCK IT.BESE.UCW:LOGIN-SUCCESSFUL IT.BESE.ARNESI::TOPLEVEL-K) (:LET IT.BESE.UCW:SELF . #1=#) (:LET IT.BESE.UCW::L . #1#)) IT.BESE.ARNESI::EVALUATED-ARGUMENTS ==> ((# #) #) #:G1288 ==> : #:G1292 ==> : #:G1296 ==> : #:G1304 ==> : IT.BESE.ARNESI::HANDLER ==> # IT.BESE.ARNESI::REMAINING-ARGUMENTS ==> NIL --- Source: (:LOCATION (:FILE \\\"/home/conrad/website/ucw/arnesi_dev/src/cps.lisp\\\") (:POSITION 12078) (:SNIPPET \\\"(funcall handler (reverse evaluated-arguments)))) ;;;; FUNCTION and LAMBDA application (defmethod evaluate/cps ((lambda lambda-application-form) env k) (evaluate/cps-funcall (cons (operator lambda) (arguments lambda)) env k)) ;;;; Constants (defmetho\\\")) --- FRAME 14 ((LAMBDA ())) --- Locals: IT.BESE.ARNESI::ENV ==> : IT.BESE.ARNESI::EVALUATED-ARGUMENTS ==> : #:G1277 ==> : IT.BESE.ARNESI::HANDLER ==> : IT.BESE.ARNESI::REMAINING-ARGUMENTS ==> : ..) [Condition of type SIMPLE-ERROR] Restarts: 0: [ABORT-RESPONSE] Abort this response and answer another request 1: [ABORT] Exit debugger, returning to top level. Backtrace: 0: ((SB-PCL::FAST-METHOD SWANK-BACKEND:CALL-WITH-DEBUGGING-ENVIRONMENT (T)) # # #) 1: (SWANK::CALL-WITH-BINDINGS ((*PRINT-PRETTY*) (*PRINT-LEVEL* . 4) (*PRINT-LENGTH* . 10) (*PRINT-CIRCLE* . T) (*PRINT-READABLY*) (*PRINT-PPRINT-DISPATCH* . #) (*PRINT-GENSYM* . T) (*PRINT-BASE* . 10) (*PRINT-RADIX*) (*PRINT-ARRAY* . T) ...) #) 2: (SWANK::DEBUG-IN-EMACS #) 3: ((LAMBDA (CONDITION)) #) 4: ((LAMBDA (CONDITION)) #) 5: (SIGNAL #) 6: (ERROR "destructure-case failed: ~S") 7: (SWANK::SEND-TO-SOCKET-IO (:EVALUATE-IN-EMACS " (save-excursion (loop with buffer-name = \"*UCW Backtrace <%d>*\" for id upfrom 0 for backtrace-buffer = (get-buffer (format buffer-name id)) while backtrace-buffer finally do (switch-to-buffer-other-window (format buffer-name id))) (insert \"--- UCW Backtrace --- Condition: # # is a TYPE-ERROR. Its slot values are (:DATUM #1=# :EXPECTED-TYPE #2=(OR FUNCTION SYMBOL) SB-KERNEL::EXPECTED-TYPE #2# SB-KERNEL::DATUM #1#). --- Date: 2005-08-08T12:18:29 --- Lisp: \\\"SBCL\\\" \\\"0.9.2\\\" --- Server: # # is an instance of class #. The following slots have :INSTANCE allocation: APPLICATIONS (# #) APPLICATIONS-LOCK :NULL-LOCK STARTED T BACKEND # --- Backend: # # is an instance of class #. The following slots have :INSTANCE allocation: LISTENER # DEFAULT-URL # LISTENER-CLASS ARANEIDA:SERVE-EVENT-HTTP-LISTENER --- Application: # # is an instance of class #. The following slots have :INSTANCE allocation: URL-PREFIX \\\"/ucw/admin/\\\" SESSION-TYPE IT.BESE.UCW::STANDARD-SESSION TAL-GENERATOR # WWW-ROOTS (#P\\\"/home/conrad/website/ucw/ucw_dev/bin/../wwwroot/./ucw/examples/\\\") ENTRY-POINTS # SESSION-TABLE # SERVER # --- Request: # # is an instance of class #. The following slots have :INSTANCE allocation: REQUEST # --- Response: # # is an instance of class #. The following slots have :INSTANCE allocation: REQUEST # HEADERS ((\\\"Content-Type\\\" . \\\"text/html\\\") (\\\"Status\\\" . \\\"200\\\")) CONTENT-STREAM # --- BACKTRACE --- FRAME 4 (ERROR TYPE-ERROR) --- Locals: SB-DEBUG::ARG-0 ==> 5 SB-DEBUG::ARG-1 ==> TYPE-ERROR --- Source: (:ERROR \\\"The source-path (NIL) is not valid.\\\") --- FRAME 5 (SB-KERNEL::OBJECT-NOT-TYPE-ERROR-HANDLER # #.(SB-SYS:INT-SAP #XB7C3C31C) # (14 78)) --- Locals: SB-DEBUG::ARG-0 ==> 4 SB-DEBUG::ARG-1 ==> : SB-DEBUG::ARG-2 ==> #.(SB-SYS:INT-SAP #XB7C3C31C) SB-DEBUG::ARG-3 ==> # SB-DEBUG::ARG-4 ==> (14 78) --- Source: (:LOCATION (:FILE \\\"/usr/lib/sbcl/src/code/interr.lisp\\\") (:POSITION 6404) (:SNIPPET \\\"(deferr object-not-type-error (object type) (error (if (and (typep object 'instance) (layout-invalid (%instance-layout object))) 'layout-invalid 'type-error) :datum object :expected-type type)) (deferr layout-invalid-error (object la\\\")) --- FRAME 6 (SB-KERNEL:INTERNAL-ERROR #.(SB-SYS:INT-SAP #XB7C3C010) #) --- Locals: SB-DEBUG::ARG-0 ==> 2 SB-DEBUG::ARG-1 ==> #.(SB-SYS:INT-SAP #XB7C3C010) SB-DEBUG::ARG-2 ==> : --- Source: (:LOCATION (:FILE \\\"/usr/lib/sbcl/src/code/interr.lisp\\\") (:POSITION 10988) (:SNIPPET \\\"(defun internal-error (context continuable) (declare (type system-area-pointer context)) (declare (ignore continuable)) (/show0 \\\\\\\"entering INTERNAL-ERROR, CONTEXT=..\\\\\\\") (/hexstr context) (infinite-error-protect (/show0 \\\\\\\"about to bind ALIEN-CONTE\\\")) --- FRAME 7 (\\\"foreign function: call_into_lisp\\\") --- Locals: --- Source: (:ERROR \\\"The value # is not of type SB-DI::COMPILED-DEBUG-FUN.\\\") --- FRAME 8 (\\\"foreign function: funcall2\\\") --- Locals: --- Source: (:ERROR \\\"The value # is not of type SB-DI::COMPILED-DEBUG-FUN.\\\") --- FRAME 9 (\\\"foreign function: interrupt_internal_error\\\") --- Locals: --- Source: (:ERROR \\\"The value # is not of type SB-DI::COMPILED-DEBUG-FUN.\\\") --- FRAME 10 (\\\"foreign function: sigtrap_handler\\\") --- Locals: --- Source: (:ERROR \\\"The value # is not of type SB-DI::COMPILED-DEBUG-FUN.\\\") --- FRAME 11 (MAPCAR # (# #)) --- Locals: SB-DEBUG::ARG-0 ==> 2 SB-DEBUG::ARG-1 ==> # SB-DEBUG::ARG-2 ==> (# #) --- Source: (:LOCATION (:FILE \\\"/usr/lib/sbcl/src/code/list.lisp\\\") (:POSITION 41554) (:SNIPPET \\\"(defun mapcar (function list &rest more-lists) #!+sb-doc \\\\\\\"Apply FUNCTION to successive elements of LIST. Return list of FUNCTION return values.\\\\\\\" (map1 function (cons list more-lists) :list t)) (defun mapcan (function list &rest more-lists) #!+s\\\")) --- FRAME 12 ((LAMBDA (IT.BESE.ARNESI::ARGUMENTS)) (# (# #))) --- Locals: IT.BESE.ARNESI::ARGUMENTS ==> (# (# #)) IT.BESE.ARNESI::FUNC ==> : #:G763 ==> : #:G778 ==> : IT.BESE.ARNESI::K ==> : --- Source: (:LOCATION (:FILE \\\"/home/conrad/website/ucw/arnesi_dev/src/cps.lisp\\\") (:POSITION 6830) (:SNIPPET \\\"(apply (fdefinition (operator func)) arguments)))) (arguments func) '() env)))) (defmethod evaluate/cps ((func local-application-form) env k) (evaluate/cps-apply (arguments func) (list (list (lookup env :flet (operator func) :error-p t))) en\\\")) --- FRAME 13 (IT.BESE.ARNESI::EVALUATE-ARGUMENTS-THEN-APPLY # NIL ((# #) #) ((:LET IT.BESE.UCW::SERVER-REPL . #) (:LET IT.BESE.UCW::CONTROL-PANEL . #) (:BLOCK IT.BESE.UCW:LOGIN-SUCCESSFUL IT.BESE.ARNESI::TOPLEVEL-K) (:LET IT.BESE.UCW:SELF . #) (:LET IT.BESE.UCW::L . #))) --- Locals: IT.BESE.ARNESI::ENV ==> ((:LET IT.BESE.UCW::SERVER-REPL . #) (:LET IT.BESE.UCW::CONTROL-PANEL . #) (:BLOCK IT.BESE.UCW:LOGIN-SUCCESSFUL IT.BESE.ARNESI::TOPLEVEL-K) (:LET IT.BESE.UCW:SELF . #1=#) (:LET IT.BESE.UCW::L . #1#)) IT.BESE.ARNESI::EVALUATED-ARGUMENTS ==> ((# #) #) #:G1288 ==> : #:G1292 ==> : #:G1296 ==> : #:G1304 ==> : IT.BESE.ARNESI::HANDLER ==> # IT.BESE.ARNESI::REMAINING-ARGUMENTS ==> NIL --- Source: (:LOCATION (:FILE \\\"/home/conrad/website/ucw/arnesi_dev/src/cps.lisp\\\") (:POSITION 12078) (:SNIPPET \\\"(funcall handler (reverse evaluated-arguments)))) ;;;; FUNCTION and LAMBDA application (defmethod evaluate/cps ((lambda lambda-application-form) env k) (evaluate/cps-funcall (cons (operator lambda) (arguments lambda)) env k)) ;;;; Constants (defmetho\\\")) --- FRAME 14 ((LAMBDA ())) --- Locals: IT.BESE.ARNESI::ENV ==> : IT.BESE.ARNESI::EVALUATED-ARGUMENTS ==> : #:G1277 ==> : IT.BESE.ARNESI::HANDLER ==> : IT.BESE.ARNESI::REMAINING-ARGUMENTS ==> : ..) 8: (SWANK::EVALUATE-IN-EMACS " (save-excursion (loop with buffer-name = \"*UCW Backtrace <%d>*\" for id upfrom 0 for backtrace-buffer = (get-buffer (format buffer-name id)) while backtrace-buffer finally do (switch-to-buffer-other-window (format buffer-name id))) (insert \"--- UCW Backtrace --- Condition: # # is a TYPE-ERROR. Its slot values are (:DATUM #1=# :EXPECTED-TYPE #2=(OR FUNCTION SYMBOL) SB-KERNEL::EXPECTED-TYPE #2# SB-KERNEL::DATUM #1#). --- Date: 2005-08-08T12:18:29 --- Lisp: \\\"SBCL\\\" \\\"0.9.2\\\" --- Server: # # is an instance of class #. The following slots have :INSTANCE allocation: APPLICATIONS (# #) APPLICATIONS-LOCK :NULL-LOCK STARTED T BACKEND # --- Backend: # # is an instance of class #. The following slots have :INSTANCE allocation: LISTENER # DEFAULT-URL # LISTENER-CLASS ARANEIDA:SERVE-EVENT-HTTP-LISTENER --- Application: # # is an instance of class #. The following slots have :INSTANCE allocation: URL-PREFIX \\\"/ucw/admin/\\\" SESSION-TYPE IT.BESE.UCW::STANDARD-SESSION TAL-GENERATOR # WWW-ROOTS (#P\\\"/home/conrad/website/ucw/ucw_dev/bin/../wwwroot/./ucw/examples/\\\") ENTRY-POINTS # SESSION-TABLE # SERVER # --- Request: # # is an instance of class #. The following slots have :INSTANCE allocation: REQUEST # --- Response: # # is an instance of class #. The following slots have :INSTANCE allocation: REQUEST # HEADERS ((\\\"Content-Type\\\" . \\\"text/html\\\") (\\\"Status\\\" . \\\"200\\\")) CONTENT-STREAM # --- BACKTRACE --- FRAME 4 (ERROR TYPE-ERROR) --- Locals: SB-DEBUG::ARG-0 ==> 5 SB-DEBUG::ARG-1 ==> TYPE-ERROR --- Source: (:ERROR \\\"The source-path (NIL) is not valid.\\\") --- FRAME 5 (SB-KERNEL::OBJECT-NOT-TYPE-ERROR-HANDLER # #.(SB-SYS:INT-SAP #XB7C3C31C) # (14 78)) --- Locals: SB-DEBUG::ARG-0 ==> 4 SB-DEBUG::ARG-1 ==> : SB-DEBUG::ARG-2 ==> #.(SB-SYS:INT-SAP #XB7C3C31C) SB-DEBUG::ARG-3 ==> # SB-DEBUG::ARG-4 ==> (14 78) --- Source: (:LOCATION (:FILE \\\"/usr/lib/sbcl/src/code/interr.lisp\\\") (:POSITION 6404) (:SNIPPET \\\"(deferr object-not-type-error (object type) (error (if (and (typep object 'instance) (layout-invalid (%instance-layout object))) 'layout-invalid 'type-error) :datum object :expected-type type)) (deferr layout-invalid-error (object la\\\")) --- FRAME 6 (SB-KERNEL:INTERNAL-ERROR #.(SB-SYS:INT-SAP #XB7C3C010) #) --- Locals: SB-DEBUG::ARG-0 ==> 2 SB-DEBUG::ARG-1 ==> #.(SB-SYS:INT-SAP #XB7C3C010) SB-DEBUG::ARG-2 ==> : --- Source: (:LOCATION (:FILE \\\"/usr/lib/sbcl/src/code/interr.lisp\\\") (:POSITION 10988) (:SNIPPET \\\"(defun internal-error (context continuable) (declare (type system-area-pointer context)) (declare (ignore continuable)) (/show0 \\\\\\\"entering INTERNAL-ERROR, CONTEXT=..\\\\\\\") (/hexstr context) (infinite-error-protect (/show0 \\\\\\\"about to bind ALIEN-CONTE\\\")) --- FRAME 7 (\\\"foreign function: call_into_lisp\\\") --- Locals: --- Source: (:ERROR \\\"The value # is not of type SB-DI::COMPILED-DEBUG-FUN.\\\") --- FRAME 8 (\\\"foreign function: funcall2\\\") --- Locals: --- Source: (:ERROR \\\"The value # is not of type SB-DI::COMPILED-DEBUG-FUN.\\\") --- FRAME 9 (\\\"foreign function: interrupt_internal_error\\\") --- Locals: --- Source: (:ERROR \\\"The value # is not of type SB-DI::COMPILED-DEBUG-FUN.\\\") --- FRAME 10 (\\\"foreign function: sigtrap_handler\\\") --- Locals: --- Source: (:ERROR \\\"The value # is not of type SB-DI::COMPILED-DEBUG-FUN.\\\") --- FRAME 11 (MAPCAR # (# #)) --- Locals: SB-DEBUG::ARG-0 ==> 2 SB-DEBUG::ARG-1 ==> # SB-DEBUG::ARG-2 ==> (# #) --- Source: (:LOCATION (:FILE \\\"/usr/lib/sbcl/src/code/list.lisp\\\") (:POSITION 41554) (:SNIPPET \\\"(defun mapcar (function list &rest more-lists) #!+sb-doc \\\\\\\"Apply FUNCTION to successive elements of LIST. Return list of FUNCTION return values.\\\\\\\" (map1 function (cons list more-lists) :list t)) (defun mapcan (function list &rest more-lists) #!+s\\\")) --- FRAME 12 ((LAMBDA (IT.BESE.ARNESI::ARGUMENTS)) (# (# #))) --- Locals: IT.BESE.ARNESI::ARGUMENTS ==> (# (# #)) IT.BESE.ARNESI::FUNC ==> : #:G763 ==> : #:G778 ==> : IT.BESE.ARNESI::K ==> : --- Source: (:LOCATION (:FILE \\\"/home/conrad/website/ucw/arnesi_dev/src/cps.lisp\\\") (:POSITION 6830) (:SNIPPET \\\"(apply (fdefinition (operator func)) arguments)))) (arguments func) '() env)))) (defmethod evaluate/cps ((func local-application-form) env k) (evaluate/cps-apply (arguments func) (list (list (lookup env :flet (operator func) :error-p t))) en\\\")) --- FRAME 13 (IT.BESE.ARNESI::EVALUATE-ARGUMENTS-THEN-APPLY # NIL ((# #) #) ((:LET IT.BESE.UCW::SERVER-REPL . #) (:LET IT.BESE.UCW::CONTROL-PANEL . #) (:BLOCK IT.BESE.UCW:LOGIN-SUCCESSFUL IT.BESE.ARNESI::TOPLEVEL-K) (:LET IT.BESE.UCW:SELF . #) (:LET IT.BESE.UCW::L . #))) --- Locals: IT.BESE.ARNESI::ENV ==> ((:LET IT.BESE.UCW::SERVER-REPL . #) (:LET IT.BESE.UCW::CONTROL-PANEL . #) (:BLOCK IT.BESE.UCW:LOGIN-SUCCESSFUL IT.BESE.ARNESI::TOPLEVEL-K) (:LET IT.BESE.UCW:SELF . #1=#) (:LET IT.BESE.UCW::L . #1#)) IT.BESE.ARNESI::EVALUATED-ARGUMENTS ==> ((# #) #) #:G1288 ==> : #:G1292 ==> : #:G1296 ==> : #:G1304 ==> : IT.BESE.ARNESI::HANDLER ==> # IT.BESE.ARNESI::REMAINING-ARGUMENTS ==> NIL --- Source: (:LOCATION (:FILE \\\"/home/conrad/website/ucw/arnesi_dev/src/cps.lisp\\\") (:POSITION 12078) (:SNIPPET \\\"(funcall handler (reverse evaluated-arguments)))) ;;;; FUNCTION and LAMBDA application (defmethod evaluate/cps ((lambda lambda-application-form) env k) (evaluate/cps-funcall (cons (operator lambda) (arguments lambda)) env k)) ;;;; Constants (defmetho\\\")) --- FRAME 14 ((LAMBDA ())) --- Locals: IT.BESE.ARNESI::ENV ==> : IT.BESE.ARNESI::EVALUATED-ARGUMENTS ==> : #:G1277 ==> : IT.BESE.ARNESI::HANDLER ==> : IT.BESE.ARNESI::REMAINING-ARGUMENTS ==> : ..) 9: (IT.BESE.UCW::SEND-BACKTRACE-TO-EMACS # # (#S(IT.BESE.UCW::BACKTRACE-FRAME :INDEX 4 :DESCRIPTION "(ERROR TYPE-ERROR)" :LOCALS (# #) :SOURCE-LOCATION (:ERROR "The source-path (NIL) is not valid.")) #S(IT.BESE.UCW::BACKTRACE-FRAME :INDEX 5 :DESCRIPTION "(SB-KERNEL::OBJECT-NOT-TYPE-ERROR-HANDLER # #.(SB-SYS:INT-SAP #XB7C3C31C) # (14 78))" :LOCALS (# # # # #) :SOURCE-LOCATION (:LOCATION # # #)) #S(IT.BESE.UCW::BACKTRACE-FRAME :INDEX 6 :DESCRIPTION "(SB-KERNEL:INTERNAL-ERROR #.(SB-SYS:INT-SAP #XB7C3C010) #)" :LOCALS (# # #) :SOURCE-LOCATION (:LOCATION # # #)) #S(IT.BESE.UCW::BACKTRACE-FRAME :INDEX 7 :DESCRIPTION "(\"foreign function: call_into_lisp\")" :LOCALS NIL :SOURCE-LOCATION (:ERROR "The value # is not of type SB-DI::COMPILED-DEBUG-FUN.")) #S(IT.BESE.UCW::BACKTRACE-FRAME :INDEX 8 :DESCRIPTION "(\"foreign function: funcall2\")" :LOCALS NIL :SOURCE-LOCATION (:ERROR "The value # is not of type SB-DI::COMPILED-DEBUG-FUN.")) #S(IT.BESE.UCW::BACKTRACE-FRAME :INDEX 9 :DESCRIPTION "(\"foreign function: interrupt_internal_error\")" :LOCALS NIL :SOURCE-LOCATION (:ERROR "The value # is not of type SB-DI::COMPILED-DEBUG-FUN.")) #S(IT.BESE.UCW::BACKTRACE-FRAME :INDEX 10 :DESCRIPTION "(\"foreign function: sigtrap_handler\")" :LOCALS NIL :SOURCE-LOCATION (:ERROR "The value # is not of type SB-DI::COMPILED-DEBUG-FUN.")) #S(IT.BESE.UCW::BACKTRACE-FRAME :INDEX 11 :DESCRIPTION "(MAPCAR # (# #))" :LOCALS (# # #) :SOURCE-LOCATION (:LOCATION # # #)) #S(IT.BESE.UCW::BACKTRACE-FRAME :INDEX 12 :DESCRIPTION "((LAMBDA (IT.BESE.ARNESI::ARGUMENTS)) (# (# #)))" :LOCALS (# # # # #) :SOURCE-LOCATION (:LOCATION # # #)) #S(IT.BESE.UCW::BACKTRACE-FRAME :INDEX 13 :DESCRIPTION "(IT.BESE.ARNESI::EVALUATE-ARGUMENTS-THEN-APPLY # NIL ((# #) #) ((:LET IT.BESE.UCW::SERVER-REPL . #) (:LET IT.BESE.UCW::CONTROL-PANEL . #) (:BLOCK IT.BESE.UCW:LOGIN-SUCCESSFUL IT.BESE.ARNESI::TOPLEVEL-K) (:LET IT.BESE.UCW:SELF . #) (:LET IT.BESE.UCW::L . #)))" :LOCALS (# # # # # # # #) :SOURCE-LOCATION (:LOCATION # # #)) ...)) 10: ((LAMBDA NIL)) 11: ((LAMBDA NIL)) 12: ((SB-PCL::FAST-METHOD IT.BESE.UCW::HANDLE-REQUEST (IT.BESE.UCW:STANDARD-SERVER IT.BESE.UCW:REQUEST IT.BESE.UCW:RESPONSE)) # # # # #) 13: ((SB-PCL::FAST-METHOD ARANEIDA:HANDLE-REQUEST-RESPONSE (IT.BESE.UCW::UCW-HANDLER T T)) # # # # #) 14: ((SB-PCL::FAST-METHOD ARANEIDA:HANDLE-REQUEST (ARANEIDA:HANDLER T)) # # # #) 15: ((SB-PCL::FAST-METHOD ARANEIDA:HANDLE-REQUEST (ARANEIDA:HANDLER T)) # # # #) 16: ((LABELS ARANEIDA::DO-IT) # #) 17: (ARANEIDA::SERVE-EVENT-HTTP-LISTENER-ACCEPT-ONE-REQUEST #) 18: (SB-IMPL::SUB-SERVE-EVENT NIL 0) 19: (SB-SYS:WAIT-UNTIL-FD-USABLE 0 :INPUT NIL) 20: (SB-IMPL::REFILL-BUFFER/FD #) 21: (SB-IMPL::INPUT-CHAR/ASCII # NIL #:EOF-OBJECT) 22: (READ-CHAR # NIL #:EOF-OBJECT #) 23: (READ-CHAR # NIL #:EOF-OBJECT #) 24: (READ-CHAR # NIL #:EOF-OBJECT #) 25: (READ-PRESERVING-WHITESPACE # NIL (NIL) T) 26: (READ-PRESERVING-WHITESPACE # NIL (NIL) NIL) 27: (READ # NIL (NIL) NIL) 28: (SB-IMPL::REPL-READ-FORM-FUN # #) 29: (SB-IMPL::REPL-FUN NIL) 30: ((LAMBDA NIL)) 31: ((LAMBDA NIL)) 32: (SB-IMPL::%WITH-REBOUND-IO-SYNTAX #) 33: (SB-IMPL::TOPLEVEL-REPL NIL) 34: (SB-IMPL::TOPLEVEL-INIT) 35: ((FLET SB-IMPL::RESTART-LISP)) From whalliburton at gmail.com Tue Aug 9 02:58:06 2005 From: whalliburton at gmail.com (William Halliburton) Date: Mon, 8 Aug 2005 21:58:06 -0500 Subject: [Bese-devel] Re: admin page currently broken In-Reply-To: <4e7bd29e05080809211e09e4b0@mail.gmail.com> References: <4e7bd29e05080809211e09e4b0@mail.gmail.com> Message-ID: <4e7bd29e0508081958496c64ca@mail.gmail.com> This can be replicated with (setf *form* (walk-form '(mapcar (lambda (a) (+ a 1)) '(1 2 3)))) (drive-cps (evaluate/cps *form* nil *toplevel-k*)) Looking at (defmethod evaluate/cps ((func free-application-form) env k) it looks like a special case needs to be added for mapcar? Is there a good way to look at the execution of evalutate/cps without tracing? Will From whalliburton at gmail.com Tue Aug 9 04:43:54 2005 From: whalliburton at gmail.com (William Halliburton) Date: Mon, 8 Aug 2005 23:43:54 -0500 Subject: [Bese-devel] Backtracking bug still present in my runs. In-Reply-To: References: <4e7bd29e05080718323c851906@mail.gmail.com> Message-ID: <4e7bd29e05080821435d6c4f47@mail.gmail.com> The sample code I submitted also works for me, if I place it into a containter. The following code should show the bug. Is this invalid use of render-on? Thanks for the explanation of backtracking. Will (defcomponent calltest-window (simple-window-component) ((calltest :component calltest :accessor calltest-window.calltest)) (:default-initargs :title "calltest") (:documentation "")) (defentry-point "calltest.ucw" (:application *wch-application*) () (call 'calltest-window)) (defmethod render-on ((res response) (app calltest-window)) (render-on res (calltest-window.calltest app))) (defcomponent calltest-2 (widget-component) ()) (defmethod render-on ((res response) (calltest-2 calltest-2)) (<:as-html "At 2")) (defcomponent calltest (widget-component) ((val :backtrack t :initform 0 :initarg :val :accessor calltest.val))) (defaction calltest-increment ((calltest calltest)) (incf (calltest.val calltest)) (if (= (calltest.val calltest) 2) (call 'calltest-2))) (defmethod render-on ((res response) (calltest calltest)) ( Just a few examples: (defmethod register-url-handler ((backend araneida-backend) url handler) (ucw.backend.dribble "Registering handler ~S at url ~S." handler url backend) (araneida:install-handler (araneida:http-listener-handler (listener backend)) (make-instance 'ucw-handler :handler handler) (araneida:urlstring (araneida:merge-url (default-url backend) url)) nil)) (defmethod unregister-url-handler ((backend araneida-backend) url) (ucw.backend.dribble "Unregistreing handler for url ~S." url backend) (araneida:uninstall-handler (listener backend) (araneida:merge-url (default-url backend) url) nil)) Well you see there are too many arguments for the format string. So I'd argue this is wrong. Regards Friedrich From frido at q-software-solutions.de Tue Aug 9 06:40:04 2005 From: frido at q-software-solutions.de (Friedrich Dominicus) Date: Tue, 09 Aug 2005 08:40:04 +0200 Subject: [Bese-devel] Bug? Message-ID: <874q9zipff.fsf@flarge.here> Well while trying the new ucw stuff I got this message: The value (SETF COMPONENT.PLACE) is not of type SYMBOL. [Condition of type TYPE-ERROR] Restarts: 0: [SHOW-BACKTRACE] Send the client a backtrace page. 1: [RETRY] Clearout the response and retry calling the action. 2: [SERVER-ERROR] Send the client an internal server error page. 3: [ABORT-RESPONSE] Abort this response and answer another request 4: [TERMINATE-THREAD] Terminate this thread (#) Backtrace: 0: ((SB-PCL::FAST-METHOD SWANK-BACKEND:CALL-WITH-DEBUGGING-ENVIRONMENT (T)) # # #) 1: (SWANK::CALL-WITH-BINDINGS ((*PRINT-PRETTY*) (*PRINT-LEVEL* . 4) (*PRINT-LENGTH* . 10) (*PRINT-CIRCLE* . T) (*PRINT-READABLY*) (*PRINT-PPRINT-DISPATCH* . #) (*PRINT-GENSYM* . T) (*PRINT-BASE* . 10) (*PRINT-RADIX*) (*PRINT-ARRAY* . T) ...) #) 2: (SWANK::DEBUG-IN-EMACS #) 3: ((SB-PCL::FAST-METHOD IT.BESE.UCW::HANDLE-ACTION-ERROR (ERROR)) # # #) Has anyone used a multithreaded SBCL with UCW? Regards Friedrich From mb at bese.it Tue Aug 9 06:46:40 2005 From: mb at bese.it (Marco Baringer) Date: Tue, 09 Aug 2005 08:46:40 +0200 Subject: [Bese-devel] Backtracking bug still present in my runs. In-Reply-To: <4e7bd29e05080821435d6c4f47@mail.gmail.com> (William Halliburton's message of "Mon, 8 Aug 2005 23:43:54 -0500") References: <4e7bd29e05080718323c851906@mail.gmail.com> <4e7bd29e05080821435d6c4f47@mail.gmail.com> Message-ID: William Halliburton writes: > The sample code I submitted also works for me, if I place it into a > containter. The following code should show the bug. Is this invalid > use of render-on? Thanks for the explanation of backtracking. oddly we weren't setting up component slots for backtracking. i had always thought the default was to backtrack these slots but, looking through some of my code, i do always add the :backtrack t option. that's a pretty stupid default value :( fixed. -- -Marco Ring the bells that still can ring. Forget the perfect offering. There is a crack in everything. That's how the light gets in. -Leonard Cohen From mb at bese.it Tue Aug 9 06:50:52 2005 From: mb at bese.it (Marco Baringer) Date: Tue, 09 Aug 2005 08:50:52 +0200 Subject: [Bese-devel] Bug? In-Reply-To: <874q9zipff.fsf@flarge.here> (Friedrich Dominicus's message of "Tue, 09 Aug 2005 08:40:04 +0200") References: <874q9zipff.fsf@flarge.here> Message-ID: Friedrich Dominicus writes: > Well while trying the new ucw stuff I got this message: try getting the latest patches from arnesi_dev and ucw_dev: $ cd /path/to/ucw/ $ darcs pull http://common-lisp.net/project/ucw/repos/ucw_dev $ cd /path/to/arnesi/ $ darcs pull http://common-lisp.net/project/bese/repos/arnesi_dev (there has been some movement of the repos lately as i get used to darcs. those are the official, as-permament-as-can-be, development repos) > Has anyone used a multithreaded SBCL with UCW? not recently as far as i know. -- -Marco Ring the bells that still can ring. Forget the perfect offering. There is a crack in everything. That's how the light gets in. -Leonard Cohen From mb at bese.it Tue Aug 9 06:51:41 2005 From: mb at bese.it (Marco Baringer) Date: Tue, 09 Aug 2005 08:51:41 +0200 Subject: [Bese-devel] Bug? In-Reply-To: (Marco Baringer's message of "Tue, 09 Aug 2005 08:50:52 +0200") References: <874q9zipff.fsf@flarge.here> Message-ID: "Marco Baringer" writes: > Friedrich Dominicus writes: > >> Well while trying the new ucw stuff I got this message: > > try getting the latest patches from arnesi_dev and ucw_dev: and, since those changes affect a bunch of macros, remeber to recompile all the fasls. -- -Marco Ring the bells that still can ring. Forget the perfect offering. There is a crack in everything. That's how the light gets in. -Leonard Cohen From mb at bese.it Tue Aug 9 07:03:31 2005 From: mb at bese.it (Marco Baringer) Date: Tue, 09 Aug 2005 09:03:31 +0200 Subject: [Bese-devel] Re: admin page currently broken References: <4e7bd29e05080809211e09e4b0@mail.gmail.com> <4e7bd29e0508081958496c64ca@mail.gmail.com> Message-ID: William Halliburton writes: > This can be replicated with > > (setf *form* (walk-form '(mapcar (lambda (a) (+ a 1)) '(1 2 3)))) > (drive-cps (evaluate/cps *form* nil *toplevel-k*)) > > Looking at (defmethod evaluate/cps ((func free-application-form) env > k) it looks like a special case needs to be added for mapcar? we have two options: 1) special case all standard high-order functions 2) use sacla to reimplement them. the plan has always been to use sacla (a well commented, tested, reimplementation of common-lisp in common-lisp) for this. try this: ;; define a /cc version of mapcar (can't use defun/cc directly but that's the basic idea) (setf (get 'mapcar 'defun/cc) (make-instance 'cps-closure :code (walk-form '(lambda (function list) "Apply FUNCTION to successive elements of lists, return list of results." (do* ((lists (cons list nil)) (len (length lists)) (args (make-list len) (make-list len)) (result (list nil)) (splice result)) ((do ((l lists (cdr l)) (a args (cdr a))) ((or (null l) (endp (car l))) l) (rplaca a (caar l)) (rplaca l (cdar l))) (cdr result)) (setq splice (cdr (rplacd splice (list (apply function args))))))) nil nil) :env nil)) (with-call/cc (mapcar (lambda (a) (+ a 1)) (list 1 2 3))) ==> (2 3 4) > Is there a good way to look at the execution of evalutate/cps without tracing? atm no. however i will be needing to add in a wrapper around each step of the evaluation of forms, this will make a great point for exactly that kind of debugging info (and basically step throguh your code for you). -- -Marco Ring the bells that still can ring. Forget the perfect offering. There is a crack in everything. That's how the light gets in. -Leonard Cohen From frido at q-software-solutions.de Tue Aug 9 12:26:28 2005 From: frido at q-software-solutions.de (Friedrich Dominicus) Date: Tue, 09 Aug 2005 14:26:28 +0200 Subject: [Bese-devel] What has changed? Message-ID: <871x53gutn.fsf@flarge.here> Well I checked the sources with darcs changes, but nowhere is a comment telling me what goind on with the metaclass option. This code ;;; Just for testing (defcomponent ir-test (simple-window-component form-component) ((num :accessor num :component (integer-range-field :min-value 0 :max-value 20))) (:metaclass standard-component-class)) Has worked, and now I got this error message: Execution of a form compiled with errors. Form: (DEFCLASS IR-TEST (SIMPLE-WINDOW-COMPONENT FORM-COMPONENT) ((NUM ACCESSOR NUM COMPONENT (INTEGER-RANGE-FIELD MIN-VALUE 0 MAX-VALUE 20))) (METACLASS (METACLASS STANDARD-COMPONENT-CLASS))) Compile-time-error: (in macroexpansion of (DEFCLASS IR-TEST # ...))(hint: For more precise location, try *BREAK-ON-SIGNALS*.)The value of the :metaclass option ((:METACLASS STANDARD-COMPONENT-CLASS)) is not a legal class name. [Condition of type SB-INT:COMPILED-PROGRAM-ERROR] Restarts: 0: [ABORT] Abort SLIME compilation. 1: [ABORT] Return to sldb level 1. 2: [ABORT] Abort SLIME compilation. I recompiled the whole files and switched back to a single threaded SBCL to see whether that has broken something or what else is going on. So what has happened and what am I supposed to do to get that stuff running again? Dropping the metaclass argument maybe, but if I had to why didn't I find that mentioned anywhere. Friedrich From mb at bese.it Tue Aug 9 13:04:39 2005 From: mb at bese.it (Marco Baringer) Date: Tue, 09 Aug 2005 15:04:39 +0200 Subject: [Bese-devel] What has changed? In-Reply-To: <871x53gutn.fsf@flarge.here> (Friedrich Dominicus's message of "Tue, 09 Aug 2005 14:26:28 +0200") References: <871x53gutn.fsf@flarge.here> Message-ID: Friedrich Dominicus writes: > Well I checked the sources with darcs changes, but nowhere is a > comment telling me what goind on with the metaclass option. This code > ;;; Just for testing > (defcomponent ir-test (simple-window-component form-component) > ((num :accessor num > :component (integer-range-field :min-value 0 :max-value 20))) > (:metaclass standard-component-class)) my bad :( i recently 'improved' the defcomponent macro giving a bunch of new options. of course i forgot to actually test the handling of the :metaclass option. grab the latest patch from the ucw_dev repo to fix this. -- -Marco Ring the bells that still can ring. Forget the perfect offering. There is a crack in everything. That's how the light gets in. -Leonard Cohen From frido at q-software-solutions.de Tue Aug 9 13:20:35 2005 From: frido at q-software-solutions.de (Friedrich Dominicus) Date: Tue, 09 Aug 2005 15:20:35 +0200 Subject: [Bese-devel] general question Message-ID: <87oe87fdr0.fsf@flarge.here> is anyone using a recent multithreaded SBCL together with an araneida backend? Does server-event-listener work for you with that SBCL? Are you able to use a threaded-http-listener? I ask because I'm trying to get something like that running for 2 days now, and the only system I can use at the moment is a single threaded SBCL with a server-event-listener. I would be very happy to learn how one can use a multithreaded SBCL with UCW. Regards Friedrich From rm at seid-online.de Tue Aug 9 13:37:18 2005 From: rm at seid-online.de (R. Mattes) Date: Tue, 09 Aug 2005 15:37:18 +0200 Subject: [Bese-devel] general question In-Reply-To: <87oe87fdr0.fsf@flarge.here> References: <87oe87fdr0.fsf@flarge.here> Message-ID: <1123594639.28128.9.camel@hobbes.mh-freiburg.de> On Tue, 2005-08-09 at 15:20 +0200, Friedrich Dominicus wrote: > is anyone using a recent multithreaded SBCL together with an araneida > backend? As a caveat: my latest tests with Araneida/multithreaded SBCL have been performed last year. I tried to use the mt Araneida server model for our application but encounered reproduceable deadlocks/hangs in the application -- there should be some SBCL mailing list entries about these in Google's memory. I got the impression that the mt server wasn't nearly as "maintained" as the serve-event one (and i never had enough time to dive into the mt server code and fix it). > Does server-event-listener work for you with that SBCL? > Are you able to use a threaded-http-listener? We use the serve-event-listener in one of our Applications (even without a proxy in front of it). But that site has only moderate traffic rezensionen.zeit.de). > I ask because I'm trying to get something like that running for 2 days > now, and the only system I can use at the moment is a single threaded > SBCL with a server-event-listener. I would be very happy to learn how > one can use a multithreaded SBCL with UCW. To me it looks like you'd have to fix two places: araneida's mt server code as well as SBCL's socket handling in a multithreaded environment. HTH Ralf Mattes > Regards > Friedrich > _______________________________________________ > bese-devel mailing list > bese-devel at common-lisp.net > http://common-lisp.net/cgi-bin/mailman/listinfo/bese-devel From frido at q-software-solutions.de Tue Aug 9 14:45:37 2005 From: frido at q-software-solutions.de (Friedrich Dominicus) Date: Tue, 09 Aug 2005 16:45:37 +0200 Subject: [Bese-devel] general question In-Reply-To: <1123594639.28128.9.camel@hobbes.mh-freiburg.de> (R. Mattes's message of "Tue, 09 Aug 2005 15:37:18 +0200") References: <87oe87fdr0.fsf@flarge.here> <1123594639.28128.9.camel@hobbes.mh-freiburg.de> Message-ID: <877jevf9ta.fsf@flarge.here> Thanks for taking the time helping me out with that. There are quite few things I do not understand, e.g. why does serve-event-listener work for single-threaded SBCL and why that fails on a multi-threaded SBCL. I checked another backend PortableAserver and it seem that one can run it with a multi-threaded SBCL, so maybe I should give that a try. The point is I want to get my applicaton done and not dive into that stuff yet. I hope this example will be good enough for others to learn UCW-programming. For me a the moment it is trial-error-error-error-error trial--- However could it be that using the thread stuff from acl-compat wouldn't be a "good" idea? Regards Friedrich From frido at q-software-solutions.de Tue Aug 9 15:39:28 2005 From: frido at q-software-solutions.de (Friedrich Dominicus) Date: Tue, 09 Aug 2005 17:39:28 +0200 Subject: [Bese-devel] Changes II Message-ID: <873bpjf7bj.fsf@flarge.here> Well as written before I'm trying to get ucw working for me. I was a bit successfull with that around a week or so ago. But now all the things start tumbling down. So what has changes in the action handling? this code has worked for quite a time but now I got an error message: ( is not of type (OR FUNCTION SYMBOL). [Condition of type TYPE-ERROR] Restarts: 0: [SHOW-BACKTRACE] Send the client a backtrace page. 1: [RETRY] Clearout the response and retry calling the action. 2: [SERVER-ERROR] Send the client an internal server error page. 3: [GENERATE-BACKTRACE-FOR-EMACS] Generate a bug report in Emacs. 4: [ABORT-RESPONSE] Abort this response and answer another request 5: [ABORT] Exit debugger, returning to top level. Backtrace: 0: ((SB-PCL::FAST-METHOD SWANK-BACKEND:CALL-WITH-DEBUGGING-ENVIRONMENT (T)) # # #) 1: (SWANK::CALL-WITH-BINDINGS ((*PRINT-PRETTY*) (*PRINT-LEVEL* . 4) (*PRINT-LENGTH* . 10) (*PRINT-CIRCLE* . T) (*PRINT-READABLY*) (*PRINT-PPRINT-DISPATCH* . #) (*PRINT-GENSYM* . T) (*PRINT-BASE* . 10) (*PRINT-RADIX*) (*PRINT-ARRAY* . T) ...) #) 2: (SWANK::DEBUG-IN-EMACS #) 3: ((LAMBDA NIL)) 4: (SWANK::CALL-WITH-REDIRECTED-IO # #) 5: (SWANK::CALL-WITH-CONNECTION # #) 6: ((SB-PCL::FAST-METHOD IT.BESE.UCW::HANDLE-ACTION-ERROR (ERROR T)) # # # (#S(IT.BESE.UCW::BACKTRACE-FRAME :INDEX 4 :DESCRIPTION "(ERROR TYPE-ERROR)" :LOCALS (# #) :SOURCE-LOCATION (:ERROR "Source filename not recorded for #")) #S(IT.BESE.UCW::BACKTRACE-FRAME :INDEX 5 :DESCRIPTION "(SB-KERNEL::OBJECT-NOT-TYPE-ERROR-HANDLER so what do I have to change to get this action done? Friedrich From mb at bese.it Tue Aug 9 16:00:42 2005 From: mb at bese.it (Marco Baringer) Date: Tue, 09 Aug 2005 18:00:42 +0200 Subject: [Bese-devel] Changes II In-Reply-To: <873bpjf7bj.fsf@flarge.here> (Friedrich Dominicus's message of "Tue, 09 Aug 2005 17:39:28 +0200") References: <873bpjf7bj.fsf@flarge.here> Message-ID: Friedrich Dominicus writes: > Well as written before I'm trying to get ucw working for me. I was a > bit successfull with that around a week or so ago. But now all the > things start tumbling down. So what has changes in the action > handling? pardon me for breaking your app :( what has happened is that we've moved from a macro transformer to an interpreter and the work still isn't quite finished. atm actions have the following, temporary, limitation: you can't pass a function generated in the action (a form like #'(lambda ...)) to a function which wasn't generated by defun/cc. basically this won't work: (mapcar (lambda ...) ...) nor anything similar. the reason is that the interpreter, when it sees a lambda form, doesn't generate a function object but generates a cps-closure object. this cps-closure object can contain call/cc (unlike the old cps-transformer) but you need to have a definition of mapcar (or just map in your case) which knows how to deal with cps-closure objects. i'm currently (as we speak) cut 'n pasting code from sacla to implement most of the common higher order common-lisp function (mapXYZ, removeXYZ, etc.) in order to fix your code you will to refactor the action so that the (lambda ...) form is in a second function defined outside of the action and you only pass non-function objects to that second function. -- -Marco Ring the bells that still can ring. Forget the perfect offering. There is a crack in everything. That's how the light gets in. -Leonard Cohen From frido at q-software-solutions.de Tue Aug 9 16:06:21 2005 From: frido at q-software-solutions.de (Friedrich Dominicus) Date: Tue, 09 Aug 2005 18:06:21 +0200 Subject: [Bese-devel] Changes II In-Reply-To: <873bpjf7bj.fsf@flarge.here> (Friedrich Dominicus's message of "Tue, 09 Aug 2005 17:39:28 +0200") References: <873bpjf7bj.fsf@flarge.here> Message-ID: <87pssndria.fsf@flarge.here> Friedrich Dominicus writes: > Well as written before I'm trying to get ucw working for me. I was a > bit successfull with that around a week or so ago. But now all the > things start tumbling down. So what has changes in the action > handling? > > this code has worked for quite a time but now I got an error message: > ( :action (user-details prods) > (<:p > (<:input :type "submit" :value "Yes" > :name "am-customer") > (<:input :type "submit" :value "No" > :name "")))))))) > > > with this user-details action > (defaction user-details ((transaction trans-info)) > ;; (inspect (ucw::all-params (ucw::context.request *context*))) > (let ((products (products-in-basket transaction)) > (sum (trans-price transaction))) > (let ((trans-data (make-instance 'transaction)) > (p-ids (map 'list #'(lambda (item) > (list (product-id item) > (num-copies item) > (price item))) > products))) Ok I figured out the following the above line can not be used I have to write an own function for that, now maybe someone knows why I have to put it outside this action. So the following rewrite (defun gen-pids (products) (map 'list #'(lambda (item) ;; (inspect item) (list (product-id item) (num-copies item) (price item))) products)) (defaction user-details ((transaction trans-info)) ;; (inspect (ucw::all-params (ucw::context.request *context*))) (let ((products (products-in-basket transaction)) (sum (trans-price transaction))) (let ((trans-data (make-instance 'transaction)) (p-ids (gen-pids products))) ;; (inspect p-ids) (db-update-tid-to-pid-mapping (trans-obj trans-data) p-ids sum) (let ((btn-text (ucw::get-parameter (ucw::context.request *context*) "am-customer"))) ;; (inspect btn-text) (if btn-text (call 'shop-login :message "You customer data please" :transaction trans-data) (call 'info-message :message "Not yet a customer." :transaction trans-data)))))) make the whole stuff work again. If that is on purpose could someone give me an explanation please? Regards Friedrich From smoof-ra at elder-gods.org Tue Aug 9 18:45:25 2005 From: smoof-ra at elder-gods.org (Larry D'Anna) Date: Tue, 9 Aug 2005 14:45:25 -0400 Subject: [Bese-devel] funcallable instances Message-ID: <20050809184525.GA16399@melkor.elder-gods.org> I don't know if this patch is actually a good idea to commit, because it will only work on very recent sbcl, no cmucl or openmcl, but it's kinda cool :-) --larry -------------- next part -------------- New patches: [make closure/cc a funcallable instance (in sbcl) smoof-ra at elder-gods.org**20050809182900 funcalling a closure/cc will just call it with a toplevel continuation that way cc closures can be called totally transparently by non-cc code as long as the cc-closure doesn't call/cc. ] { hunk ./src/cc-interpreter.lisp 144 - (env :accessor env :initarg :env))) + (env :accessor env :initarg :env)) + #+sbcl (:metaclass mopp:funcallable-standard-class)) + +#+sbcl +(defmethod initialize-instance :after ((fun closure/cc) &rest initargs) + (declare (ignore initargs)) + (mopp:set-funcallable-instance-function + fun + #'(lambda (&rest args) + (drive-interpreter/cc + (apply-lambda/cc fun + args + *toplevel-k*))))) + } Context: [Remove occurences of 'cps' in the api. We don't actually cps transforme anymore so this is misleading. Marco Baringer **20050809125933] [Remove 'cps' from test suite, replace it with 'call/cc' Marco Baringer **20050809104818] [Rename cps.lisp to cc-interpreter.lisp Marco Baringer **20050809104737] [Fix typo in fold-strings' docstring Marco Baringer **20050809083006] [Trivial change to the name of the gensym generated by DOLIST* Marco Baringer **20050809061102] [Fix lexical-variables and lexical-functions on clisp Marco Baringer **20050807223244] [Use FDEFINITION instead of SYMBOL-FUNCTION to get a function from a function name. Marco Baringer **20050807222932] [Make sure we only pass symbols to functions like GET and MACRO-FUNCTION Marco Baringer **20050807222905] [Implement lexical-functions for CLISP Marco Baringer **20050807204738] [Implement lexical-variables and lexical-functions for NIL environments Marco Baringer **20050807204711] [Remove arnesi.el from ssytem def Marco Baringer **20050807204654] [Fix evaluation of #'(foo bar) in cps interpreter Marco Baringer **20050806182653] [Delete arnesi.el. SLIME is perfectly able to figure out the indententation by itself. Marco Baringer **20050807075500] [aparently global variables can be found in sbcl lexical environments smoof-ra at elder-gods.org**20050804164859] [Implement environment-p and lexical-variables for CLISP Marco Baringer **20050804165821] [Make the lexenv stuff use generic-functions and methods Marco Baringer **20050804161857] [Fixup lexical-variables and lexical-functions for OpenMCL Marco Baringer **20050804152727 This patch causes lexical-variables to no longer return ignored variables and symbol-macrolets. We've also implemented lexical-functions (though we do some hackery to convert functions names to something "normal" (ie SETF::|FOO::BAR| ==> (SETF FOO::BAR)) ] [Typo in lexical-variables for sbcl (we were accessing lexenv-funs instead of lexenv-vars) Marco Baringer **20050804152051] [Change lexical-variables for sbcl so that it doesn't return ignored variables Marco Baringer **20050804150841] [Fix lexical-variables for cmucl to not return ignored variables Marco Baringer **20050804150256] [Typo in previous patch Marco Baringer **20050804150242] [Implement lexical-functions for cmucl Marco Baringer **20050804143350] [recognise flets from the lexical environment (on sbcl) smoof-ra at elder-gods.org**20050803222732] [Rewrite multiple-value-setf so that my simple mind can understand it. Marco Baringer **20050803104652] [Added cps evaluation of THE forms Marco Baringer **20050803092059] [minor comment fixup Marco Baringer **20050803085322] [Moved defclass progv-form to keep the walker classes defined in alphabetical order Marco Baringer **20050803085254] [Added walker class for THE forms Marco Baringer **20050803085210] [allow new special forms to be added to the walker by shadowing *walker-handlers* smoof-ra at elder-gods.org**20050802165355] [Minor spacing fixs to the previous patch Marco Baringer **20050802152421] [progv smoof-ra at elder-gods.org**20050802150342] [labels can have declarations inside the body smoof-ra at elder-gods.org**20050801193433] [declares needs to be copied in the labels handler just like the other lambda-function-form slots smoof-ra at elder-gods.org**20050801193107] [oops i forgot to actually make the declaration-form instances smoof-ra at elder-gods.org**20050801185641] [initial support for remembering declarations smoof-ra at elder-gods.org**20050801184329 this patch adds a mixin called implicit-progn-with-declare-mixin and uses it instead of implicit-progn-mixin in all the places that allow declares. It has slot which should contain a list of the declares at the top of the implicit-progn. This patch doesn't do anything clever with the declares, it just creates declaration-form objects and points their source slots at the original declares, however it would be easy to modify parse-declaration to generate more usefull declaration objects. ] [Call the property :FEATURES, not FEATURES Marco Baringer **20050729103229] [Rename asdf property version to features, add "cps-interpreter" Marco Baringer **20050728120238] [dont need to register allow-other-keys because its not a binding smoof-ra at elder-gods.org**20050727153603] [fixed type name mismatch for allow-other-keys-function-arguement-form smoof-ra at elder-gods.org**20050727152456] [defmethod arguments should be ignorable, not ignore (openmcl warns whenever you ignore a specialized argument) Marco Baringer **20050726090308] [Typo in extract-argument-names Marco Baringer **20050726090256] [Fix generation of defmethod froms from defmethod/cc; added tests Marco Baringer **20050726085226] [Fix handling of optional arguments in apply-cps-lambda Marco Baringer **20050726085155] [More tests Marco Baringer **20050723133158] [Fix a bug in the handling of the case when LOOKUP finds a value for a name but the value is NIL Marco Baringer **20050723133106] [Export the symbol KALL Marco Baringer **20050723133052] [Change the test for constant-form'ness in walk.lisp Marco Baringer **20050723113019] [Extend the walker to handle #'(setf foo) function names Marco Baringer **20050723104431] [Fix bug in the lambda generated for method forms Marco Baringer **20050720144450] [Added ignore declarations to defun/cc and defmethod/cc to make the compiler happy Marco Baringer **20050720110112] [Temporarily comment out the log tests Marco Baringer **20050720092312] [Rename (optional|keyword|rest)-argument-form classes to include the -form suffix Marco Baringer **20050720092124] [Allow defun/cc defined functions te be called outside of a with-call/cc Marco Baringer **20050720091826] [Added support for &optional arguments in cps closures Marco Baringer **20050720091658] [Added defgeneric/cc Marco Baringer **20050719153441] [Move the error checking code for lambda arguments into apply, not lambda (in cps interpreter) Marco Baringer **20050719153121] [More cps tests Marco Baringer **20050719152327] [Fix openmcl's definition of lexical-variables to deal with ccl::definition-environment Marco Baringer **20050719152230] [Added support to the cps interpreter forl communicating with lexical variables Marco Baringer **20050707094608] [walk.lisp depends on lexenv.lisp Marco Baringer **20050707093140] [added support for walking local varibales in the lexical environment Marco Baringer **20050707093027 this applies to all those variables defined the envorinment object grabbed via an &environment macro argument. ] [mistyped #+openmcl in lexenv.lisp Marco Baringer **20050707092959] [added src/lexenv.lisp to arnesi.asd Marco Baringer **20050707091127] [Rename src/environment.lisp Marco Baringer **20050707091114] [Initial version of environment.lisp Marco Baringer **20050707091019] [Minor docstring fixup for with-call/cc Marco Baringer **20050707090619] [Big patch including all the cps interpreter stuff upto now Marco Baringer **20050707083739] [Fix bug in handling of defclass-struct's :predicate option Marco Baringer **20050706105324] [Initial Import Marco Baringer **20050706101657 This import moves arnesi from arch to darcs. Nothing has actually changed since bese-2004 at common-lisp.net/arnesi--dev--1.4--patch-14 ] [added arch stuff to boring file Marco Baringer **20050706101630] [Setup boring file Marco Baringer **20050706100535] Patch bundle hash: ddb2f89ea7fc94e072aa677fbd9138407abe37c2 From smoof-ra at elder-gods.org Wed Aug 10 04:07:38 2005 From: smoof-ra at elder-gods.org (Larry D'Anna) Date: Wed, 10 Aug 2005 00:07:38 -0400 Subject: [Bese-devel] method combination Message-ID: <20050810040738.GA21777@melkor.elder-gods.org> here's standard method combination for the interpreter. Also adds &rest support. --larry -------------- next part -------------- (in-package :arnesi) (fmakunbound 'supercool) (defgeneric supercool (x) (:method-combination cc-standard)) (defmethod/cc supercool ((x integer)) (if (next-method-p) (call-next-method x)) (print (+ 2000 x))) (defmethod/cc supercool :before (x) (print 'before)) (defmethod/cc supercool :after (x) (print 'after)) (with-call/cc (supercool 7)) ;BEFORE ;2007 ;AFTER (defmethod/cc supercool (x) (print (+ 1000 x))) (with-call/cc (supercool 7)) ;BEFORE ;1007 ;2007 ;AFTER (defmethod/cc supercool :around (x) (print 'pre) (call-next-method x) (print 'post)) (defmethod/cc supercool :around ((x integer)) (print 'ipre) (call-next-method x) (print 'ipost)) (with-call/cc (supercool 7)) ;IPRE ;PRE ;BEFORE ;1007 ;2007 ;AFTER ;POST ;IPOST (defparameter *c* nil) (defmethod/cc supercool :before (x) (print 'before) (let/cc k (setq *c* k))) (with-call/cc (supercool 7)) ;IPRE ;PRE ;BEFORE (kall *c*) ;1007 ;2007 ;AFTER ;POST ;IPOST -------------- next part -------------- New patches: [ method combination smoof-ra at elder-gods.org**20050810035825] { hunk ./src/cc-interpreter.lisp 170 + + ((and (eql 'call-next-method (operator func)) + (second (multiple-value-list (lookup env :next-method t)))) + (aif (lookup env :next-method t) + (evaluate-arguments-then-apply + (lambda (arguments) + (apply-lambda/cc it arguments k)) + (arguments func) '() env) + (error "no next method"))) + + ((and (eql 'next-method-p (operator func)) + (second (multiple-value-list (lookup env :next-method t)))) + (kontinue k (lookup env :next-method t))) hunk ./src/cc-interpreter.lisp 264 - (optional-function-argument-form + (rest-function-argument-form + (setf env (register env :let (name parameter) remaining-arguments)) + (setf remaining-arguments nil)) + (optional-function-argument-form hunk ./src/cc-interpreter.lisp 591 -(defmacro defmethod/cc (name arguments &body body) - `(progn - (setf (get ',name 'defmethod/cc) t) - (defmethod ,name ,arguments - (declare (ignorable ,@(extract-argument-names arguments :allow-specializers t))) - (make-instance 'closure/cc - :code (walk-form '(lambda ,(extract-argument-names arguments :allow-specializers t - :keep-lambda-keywords t) - , at body) - nil nil) - :env nil)))) +; for emacs: (setf (get 'defmethod/cc 'common-lisp-indent-function) 'lisp-indent-defmethod) + +(defmacro defmethod/cc (name &rest args) + (let ((qlist (if (symbolp (car args)) + (prog1 + (list (car args)) + (setf args (cdr args)))))) + (destructuring-bind (arguments &body body) args + `(progn + (setf (get ',name 'defmethod/cc) t) + (defmethod ,name , at qlist ,arguments + (declare (ignorable ,@(extract-argument-names arguments :allow-specializers t))) + (make-instance 'closure/cc + :code (walk-form '(lambda ,(extract-argument-names arguments :allow-specializers t + :keep-lambda-keywords t) + , at body) + nil nil) + :env nil)))))) + hunk ./src/cc-interpreter.lisp 614 + + +(defun closure-with-nextmethod (closure next) + (make-instance 'closure/cc + :code (code closure) + :env (register (env closure) :next-method t next))) + +(defun closure-with-befores (closure befores) + (make-instance 'closure/cc + :code (walk-form `(lambda (&rest args) + ,@(loop + for before in befores + collect `(apply ,before args)) + (apply ,closure args))) + :env nil)) + +(defun closure-with-afters (closure afters) + (make-instance 'closure/cc + :code (walk-form `(lambda (&rest args) + (prog1 + (apply ,closure args) + ,@(loop + for after in afters + collect `(apply ,after args))))) + :env nil)) + +(define-method-combination cc-standard + (&key (around-order :most-specific-first) + (before-order :most-specific-first) + (primary-order :most-specific-first) + (after-order :most-specific-last)) + ((around (:around)) + (before (:before)) + (primary () :required t) + (after (:after))) + + (labels ((effective-order (methods order) + (ecase order + (:most-specific-first methods) + (:most-specific-last (reverse methods)))) + (primary-wrap (methods &optional nextmethod) + (case (length methods) + (1 `(closure-with-nextmethod + (call-method ,(first methods)) + ,nextmethod)) + (t `(closure-with-nextmethod + (call-method ,(first methods)) + ,(primary-wrap (cdr methods) nextmethod))))) + (call-methods (methods) + `(list ,@(loop + for m in methods + collect `(call-method ,m))))) + (let* (;; reorder the methods based on the -order arguments + (around (effective-order around around-order)) + (before (effective-order before before-order)) + (primary (effective-order primary primary-order)) + (after (effective-order after after-order)) + (form (primary-wrap primary))) + (when after + (setf form `(closure-with-afters ,form ,(call-methods after)))) + (when before + (setf form `(closure-with-befores ,form ,(call-methods before)))) + (when around + (setf form (primary-wrap around form))) + form))) + + + } Context: [Added copyright notice to cc-interpreter.lisp Marco Baringer **20050809151738] [Remove occurences of 'cps' in the api. We don't actually cps transforme anymore so this is misleading. Marco Baringer **20050809125933] [Remove 'cps' from test suite, replace it with 'call/cc' Marco Baringer **20050809104818] [Rename cps.lisp to cc-interpreter.lisp Marco Baringer **20050809104737] [Fix typo in fold-strings' docstring Marco Baringer **20050809083006] [Trivial change to the name of the gensym generated by DOLIST* Marco Baringer **20050809061102] [Fix lexical-variables and lexical-functions on clisp Marco Baringer **20050807223244] [Use FDEFINITION instead of SYMBOL-FUNCTION to get a function from a function name. Marco Baringer **20050807222932] [Make sure we only pass symbols to functions like GET and MACRO-FUNCTION Marco Baringer **20050807222905] [Implement lexical-functions for CLISP Marco Baringer **20050807204738] [Implement lexical-variables and lexical-functions for NIL environments Marco Baringer **20050807204711] [Remove arnesi.el from ssytem def Marco Baringer **20050807204654] [Fix evaluation of #'(foo bar) in cps interpreter Marco Baringer **20050806182653] [Delete arnesi.el. SLIME is perfectly able to figure out the indententation by itself. Marco Baringer **20050807075500] [aparently global variables can be found in sbcl lexical environments smoof-ra at elder-gods.org**20050804164859] [Implement environment-p and lexical-variables for CLISP Marco Baringer **20050804165821] [Make the lexenv stuff use generic-functions and methods Marco Baringer **20050804161857] [Fixup lexical-variables and lexical-functions for OpenMCL Marco Baringer **20050804152727 This patch causes lexical-variables to no longer return ignored variables and symbol-macrolets. We've also implemented lexical-functions (though we do some hackery to convert functions names to something "normal" (ie SETF::|FOO::BAR| ==> (SETF FOO::BAR)) ] [Typo in lexical-variables for sbcl (we were accessing lexenv-funs instead of lexenv-vars) Marco Baringer **20050804152051] [Change lexical-variables for sbcl so that it doesn't return ignored variables Marco Baringer **20050804150841] [Fix lexical-variables for cmucl to not return ignored variables Marco Baringer **20050804150256] [Typo in previous patch Marco Baringer **20050804150242] [Implement lexical-functions for cmucl Marco Baringer **20050804143350] [recognise flets from the lexical environment (on sbcl) smoof-ra at elder-gods.org**20050803222732] [Rewrite multiple-value-setf so that my simple mind can understand it. Marco Baringer **20050803104652] [Added cps evaluation of THE forms Marco Baringer **20050803092059] [minor comment fixup Marco Baringer **20050803085322] [Moved defclass progv-form to keep the walker classes defined in alphabetical order Marco Baringer **20050803085254] [Added walker class for THE forms Marco Baringer **20050803085210] [allow new special forms to be added to the walker by shadowing *walker-handlers* smoof-ra at elder-gods.org**20050802165355] [Minor spacing fixs to the previous patch Marco Baringer **20050802152421] [progv smoof-ra at elder-gods.org**20050802150342] [labels can have declarations inside the body smoof-ra at elder-gods.org**20050801193433] [declares needs to be copied in the labels handler just like the other lambda-function-form slots smoof-ra at elder-gods.org**20050801193107] [oops i forgot to actually make the declaration-form instances smoof-ra at elder-gods.org**20050801185641] [initial support for remembering declarations smoof-ra at elder-gods.org**20050801184329 this patch adds a mixin called implicit-progn-with-declare-mixin and uses it instead of implicit-progn-mixin in all the places that allow declares. It has slot which should contain a list of the declares at the top of the implicit-progn. This patch doesn't do anything clever with the declares, it just creates declaration-form objects and points their source slots at the original declares, however it would be easy to modify parse-declaration to generate more usefull declaration objects. ] [Call the property :FEATURES, not FEATURES Marco Baringer **20050729103229] [Rename asdf property version to features, add "cps-interpreter" Marco Baringer **20050728120238] [dont need to register allow-other-keys because its not a binding smoof-ra at elder-gods.org**20050727153603] [fixed type name mismatch for allow-other-keys-function-arguement-form smoof-ra at elder-gods.org**20050727152456] [defmethod arguments should be ignorable, not ignore (openmcl warns whenever you ignore a specialized argument) Marco Baringer **20050726090308] [Typo in extract-argument-names Marco Baringer **20050726090256] [Fix generation of defmethod froms from defmethod/cc; added tests Marco Baringer **20050726085226] [Fix handling of optional arguments in apply-cps-lambda Marco Baringer **20050726085155] [More tests Marco Baringer **20050723133158] [Fix a bug in the handling of the case when LOOKUP finds a value for a name but the value is NIL Marco Baringer **20050723133106] [Export the symbol KALL Marco Baringer **20050723133052] [Change the test for constant-form'ness in walk.lisp Marco Baringer **20050723113019] [Extend the walker to handle #'(setf foo) function names Marco Baringer **20050723104431] [Fix bug in the lambda generated for method forms Marco Baringer **20050720144450] [Added ignore declarations to defun/cc and defmethod/cc to make the compiler happy Marco Baringer **20050720110112] [Temporarily comment out the log tests Marco Baringer **20050720092312] [Rename (optional|keyword|rest)-argument-form classes to include the -form suffix Marco Baringer **20050720092124] [Allow defun/cc defined functions te be called outside of a with-call/cc Marco Baringer **20050720091826] [Added support for &optional arguments in cps closures Marco Baringer **20050720091658] [Added defgeneric/cc Marco Baringer **20050719153441] [Move the error checking code for lambda arguments into apply, not lambda (in cps interpreter) Marco Baringer **20050719153121] [More cps tests Marco Baringer **20050719152327] [Fix openmcl's definition of lexical-variables to deal with ccl::definition-environment Marco Baringer **20050719152230] [Added support to the cps interpreter forl communicating with lexical variables Marco Baringer **20050707094608] [walk.lisp depends on lexenv.lisp Marco Baringer **20050707093140] [added support for walking local varibales in the lexical environment Marco Baringer **20050707093027 this applies to all those variables defined the envorinment object grabbed via an &environment macro argument. ] [mistyped #+openmcl in lexenv.lisp Marco Baringer **20050707092959] [added src/lexenv.lisp to arnesi.asd Marco Baringer **20050707091127] [Rename src/environment.lisp Marco Baringer **20050707091114] [Initial version of environment.lisp Marco Baringer **20050707091019] [Minor docstring fixup for with-call/cc Marco Baringer **20050707090619] [Big patch including all the cps interpreter stuff upto now Marco Baringer **20050707083739] [Fix bug in handling of defclass-struct's :predicate option Marco Baringer **20050706105324] [Initial Import Marco Baringer **20050706101657 This import moves arnesi from arch to darcs. Nothing has actually changed since bese-2004 at common-lisp.net/arnesi--dev--1.4--patch-14 ] [added arch stuff to boring file Marco Baringer **20050706101630] [Setup boring file Marco Baringer **20050706100535] Patch bundle hash: 1047890ba1af393a7dd7bc77565211c5d3a5ff11 From mb at bese.it Wed Aug 10 05:32:03 2005 From: mb at bese.it (Marco Baringer) Date: Wed, 10 Aug 2005 07:32:03 +0200 Subject: [Bese-devel] method combination In-Reply-To: <20050810040738.GA21777@melkor.elder-gods.org> (Larry D'Anna's message of "Wed, 10 Aug 2005 00:07:38 -0400") References: <20050810040738.GA21777@melkor.elder-gods.org> Message-ID: Larry D'Anna writes: > here's standard method combination for the interpreter. Also adds > &rest support. oh my. that is really really cool. -- -Marco Ring the bells that still can ring. Forget the perfect offering. There is a crack in everything. That's how the light gets in. -Leonard Cohen From marco_simon at web.de Wed Aug 10 07:38:44 2005 From: marco_simon at web.de (Marco Simon) Date: Wed, 10 Aug 2005 09:38:44 +0200 Subject: [Bese-devel] Documentation Message-ID: <42F9AF04.6070008@web.de> Hi list, once again some questions from a lisp and ucw-beginner: Marco Baringer mentioned in his great "hello-world" video that one could use the (ok x y) function for catching the field- values from a html-form for further processing. The ok-functions seem only to return one single field y out of the component x. So I can process a single html-form-field. But how can I process an html-form with several fields ? I just tried something like ( (Marco Simon's message of "Wed, 10 Aug 2005 09:38:44 +0200") References: <42F9AF04.6070008@web.de> Message-ID: Marco Simon writes: > Hi list, > > once again some questions from a lisp and ucw-beginner: > Marco Baringer mentioned in his great "hello-world" video > that one could use the (ok x y) function for catching the field- > values from a html-form for further processing. ok is an action which takes two arguments: 1) the component 2) the value. what it does is to cause the call form which created the component (the first argument to OK) to return the second argument pased to ok. (with the new cc-interpreter i am seriously considering redefining OK like this: (defaction ok ((c component) &rest values) (values-list values)) ) > The ok-functions seem only to return one single field y out of the > component x. So I can process a single html-form-field. But how can > I process an html-form with several fields ? I just tried something > like ( field2))) in order to get the fields' value returned as a list, but > that didn't seem to work. nope. there are basically two (or three) options for collecting form info. 1: (let ((field1 ...) (field2 ...) (field3 ...)) ( Wha other actions beside (ok x y) could I have used ? I guess it isn't the > only one for processing html-formular-data. And much more important: There are no 'form processing' actions. All actions are 'form processing' actions. does this make any sense? an action is just a function which takes a component as the first parameter and is defined via defaction. you can write an action which takes as may other args as you want and you can get the parameters to an action from just about anywhere. > How could I answer that question by myself ? At this point I am used to > pic some function-reference and have a look for the fitting function. basically anything defined via defaction. with a very very recent ucw/arnesi you can inspect the variable arnesi::*cc-functions* and find out all the functions defined via defmethod/cc (the macro underlying defaction). > A futher problem, which perhaps is related to my > developement-environment (xemacs via ssh, cmucl, slime/swank, ucw) > is that my emacs gets stuck as soon as any error appears while my > ucw-application is running. The the browser starts loading the next > "page" endlessly, my emacs/slime shows me the the debugger, but I'm > not able do anything futher in emacs because it doesn't react on any > further input. Any Ideas what the problem might be ? > Compile-time-errors can be debugged without any problems and without > getting stuck. this is really really bad :( this basically makes an instantaneous edit/compile/debug cycle (the core of lisp development) impossible. slime has a know bug where, when an sldb buffer first pops up, the first key you hit (whatever it is) generates a error, but subsequent key presses should work. first off a few questions: what version of cmucl? is the entire setup running remotely or is xemacs local and everything else is remote? what's in the *slime-events* buffer? have you run mp::startup-idle-and-toplevel-loops? (i believe slime runs this automatically on startup, but adding it to .cmuclrc can't hurt) hth. -- -Marco Ring the bells that still can ring. Forget the perfect offering. There is a crack in everything. That's how the light gets in. -Leonard Cohen From mb at bese.it Wed Aug 10 14:16:10 2005 From: mb at bese.it (Marco Baringer) Date: Wed, 10 Aug 2005 16:16:10 +0200 Subject: [Bese-devel] &key, &allow-other-keys in with-call/cc [more breakage] Message-ID: hi, I just commited a patch to arnesi_dev which allows for &key in lambdas lists (and therefore in actions as well). this is an essential step on the way to integrating sacla. i've probably broken things along the way. -- -Marco Ring the bells that still can ring. Forget the perfect offering. There is a crack in everything. That's how the light gets in. -Leonard Cohen From mb at bese.it Wed Aug 10 14:22:10 2005 From: mb at bese.it (Marco Baringer) Date: Wed, 10 Aug 2005 16:22:10 +0200 Subject: [Bese-devel] method combination In-Reply-To: (Marco Baringer's message of "Wed, 10 Aug 2005 07:32:03 +0200") References: <20050810040738.GA21777@melkor.elder-gods.org> Message-ID: "Marco Baringer" writes: > Larry D'Anna writes: > >> here's standard method combination for the interpreter. Also adds >> &rest support. unless you're carefull you may not realize exactly for cool larry's patch is. let's pretend (i actually have this setup) that you have three or four task components which represent the central workflows of your app, and they all need to update userinfo after a certain amount of time (so they all subclass the my-generic-task component): (defaction start :before ((task my-generic-task)) (when (user-data-too-old (call 'my-login)) (call 'update-user-info))) come on, how fucking cool is that? instant "web aspect oriented programming". if you make the my-login-component use ajax (aka javascript) you get 'ajax aspect oriented programming' for more buzzwordness. of course, since this app runs on expensive servers and i wear a coat and tie when i meet the client it's actually "enterprise ajax aspect oriented programming objects". p.s. - i've looked through (and even commited!) larry's patch but i haven't actually tested it yet... p.p.s. - this is begging for a video :) -- -Marco Ring the bells that still can ring. Forget the perfect offering. There is a crack in everything. That's how the light gets in. -Leonard Cohen From whalliburton at gmail.com Wed Aug 10 16:51:02 2005 From: whalliburton at gmail.com (William Halliburton) Date: Wed, 10 Aug 2005 11:51:02 -0500 Subject: [Bese-devel] Incorrect behavior with continuations. Message-ID: <4e7bd29e05081009515b8d20f1@mail.gmail.com> Using the latest arnesi. (Same behavior with arnesi darcs from Aug 7). Embedding a call/cc withing a with-call/cc does not seem to complete the execution. (with-call/cc (call/cc (lambda (cc) ())) 3) returns nill but should return 3 Will From smoof-ra at elder-gods.org Wed Aug 10 18:08:26 2005 From: smoof-ra at elder-gods.org (Larry D'Anna) Date: Wed, 10 Aug 2005 14:08:26 -0400 Subject: [Bese-devel] Incorrect behavior with continuations. In-Reply-To: <4e7bd29e05081009515b8d20f1@mail.gmail.com> References: <4e7bd29e05081009515b8d20f1@mail.gmail.com> Message-ID: <20050810180826.GA17829@melkor.elder-gods.org> * William Halliburton (whalliburton at gmail.com) [050810 12:51]: > Using the latest arnesi. (Same behavior with arnesi darcs from Aug 7). > > Embedding a call/cc withing a with-call/cc does not seem to complete > the execution. > > (with-call/cc > (call/cc (lambda (cc) ())) > 3) > > returns nill but should return 3 http://common-lisp.net/pipermail/bese-devel/2005-June/000546.html --larry From joseph at mammalia.net Wed Aug 10 19:56:54 2005 From: joseph at mammalia.net (R. Joseph Wright) Date: Wed, 10 Aug 2005 12:56:54 -0700 Subject: [Bese-devel] method combination In-Reply-To: <20050810040738.GA21777@melkor.elder-gods.org> References: <20050810040738.GA21777@melkor.elder-gods.org> Message-ID: <24672315-29A1-4836-8A1A-11F0AAEB3C6A@mammalia.net> On Aug 9, 2005, at 9:07 PM, Larry D'Anna wrote: > here's standard method combination for the interpreter. Also adds > &rest support. Can you explain this part? >(defparameter *c* nil) > >defmethod/cc supercool :before (x) > (print 'before) > (let/cc k (setq *c* k))) > >(with-call/cc > (supercool 7)) > >;IPRE >;PRE >;BEFORE > >(kall *c*) > >;1007 >;2007 >;AFTER >;POST >;IPOST (\_/) Joseph (o,o) Those are my principles. If you don't like them I have others. ()_() --Groucho Marx " " From smoof-ra at elder-gods.org Wed Aug 10 20:08:35 2005 From: smoof-ra at elder-gods.org (Larry D'Anna) Date: Wed, 10 Aug 2005 16:08:35 -0400 Subject: [Bese-devel] method combination In-Reply-To: <24672315-29A1-4836-8A1A-11F0AAEB3C6A@mammalia.net> References: <20050810040738.GA21777@melkor.elder-gods.org> <24672315-29A1-4836-8A1A-11F0AAEB3C6A@mammalia.net> Message-ID: <20050810200835.GA25692@melkor.elder-gods.org> * R. Joseph Wright (joseph at mammalia.net) [050810 15:57]: > > On Aug 9, 2005, at 9:07 PM, Larry D'Anna wrote: > > >here's standard method combination for the interpreter. Also adds > >&rest support. > > Can you explain this part? > > >(defparameter *c* nil) > > > >defmethod/cc supercool :before (x) > > (print 'before) > > (let/cc k (setq *c* k))) > > > >(with-call/cc > > (supercool 7)) > > > >;IPRE > >;PRE > >;BEFORE > > > >(kall *c*) > > > >;1007 > >;2007 > >;AFTER > >;POST > >;IPOST It's the same as the part before except this time we save the continuation and quit in the :before method, and then resume the continuation on a separate line. The point of the patch is to make sure that the logic that runs the various methods of a generic function occurs in the cc-interpreter, so call/cc can be used in any of the methods. --larry From whalliburton at gmail.com Thu Aug 11 04:05:03 2005 From: whalliburton at gmail.com (William Halliburton) Date: Wed, 10 Aug 2005 23:05:03 -0500 Subject: [Bese-devel] Incorrect behavior with continuations. In-Reply-To: <20050810180826.GA17829@melkor.elder-gods.org> References: <4e7bd29e05081009515b8d20f1@mail.gmail.com> <20050810180826.GA17829@melkor.elder-gods.org> Message-ID: <4e7bd29e050810210573e4214b@mail.gmail.com> Thank you for the pointer. Setting *call/cc-returns* gives me the behavior I wanted. I did notice that your examples do not work with the current arnesi. You have to currently call kall on the continuation and they also give a different behavior. (with-call/cc (print (list 'foo (let/cc k (kall k 'bar) 'baz)))) Prints (FOO BAR) and returns (FOO BAR) regardless of *call/cc-returns*. Will On 8/10/05, Larry D'Anna wrote: > * William Halliburton (whalliburton at gmail.com) [050810 12:51]: > > Using the latest arnesi. (Same behavior with arnesi darcs from Aug 7). > > > > Embedding a call/cc withing a with-call/cc does not seem to complete > > the execution. > > > > (with-call/cc > > (call/cc (lambda (cc) ())) > > 3) > > > > returns nill but should return 3 > > > http://common-lisp.net/pipermail/bese-devel/2005-June/000546.html > > --larry > > _______________________________________________ > bese-devel mailing list > bese-devel at common-lisp.net > http://common-lisp.net/cgi-bin/mailman/listinfo/bese-devel > From Alan-Shields at omrf.ouhsc.edu Thu Aug 11 21:23:23 2005 From: Alan-Shields at omrf.ouhsc.edu (Alan Shields) Date: Thu, 11 Aug 2005 16:23:23 -0500 Subject: [Bese-devel] darcs patch: Add :fiveam to *features* Message-ID: Thu Aug 11 16:20:32 CDT 2005 Alan Shields * Add :fiveam to *features* I've found that I prefer to add testing code in my other code, but I dislike adding :fiveam to my package requirements list. This allows users of fiveam to delineate testing code with #+fiveam() - whereupon it will be totally ignored by those who do not have fiveam. Happiness for all and love ensue. -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/x-darcs-patch Size: 1186 bytes Desc: A darcs patch for your repository! URL: From mb at bese.it Fri Aug 12 12:32:41 2005 From: mb at bese.it (Marco Baringer) Date: Fri, 12 Aug 2005 14:32:41 +0200 Subject: [Bese-devel] httpd backend Message-ID: i taught the httpd backend how to serve up files (so that the example app in its default configuration gets stylesheets and javascript files). this would be really cool, if it weren't for the fact that it doesn't work :(. if i use curl or if i manually put the urls of stylesheet.css into my browser the files come back normally. i've compared the data the httpd backend sends to what apache sends (with mod_lisp everything works fine) and it can't seem to figure out what the difference is. anybody have any ideas? p.s. - it works with safari but not with explorer, camino or firefox. -- -Marco Ring the bells that still can ring. Forget the perfect offering. There is a crack in everything. That's how the light gets in. -Leonard Cohen From mb at bese.it Fri Aug 12 14:34:08 2005 From: mb at bese.it (Marco Baringer) Date: Fri, 12 Aug 2005 16:34:08 +0200 Subject: [Bese-devel] darcs patch: Add :fiveam to *features* In-Reply-To: (Alan Shields's message of "Thu, 11 Aug 2005 16:23:23 -0500") References: Message-ID: Alan Shields writes: > Thu Aug 11 16:20:32 CDT 2005 Alan Shields > * Add :fiveam to *features* > I've found that I prefer to add testing code in my other code, but I dislike > adding :fiveam to my package requirements list. i am hesitant to modify *features*, it's not really supposed to be used for this (afaict). you could do this: (defun :fiveam () (if (find-package :it.bese.fiveam) '(and) '(or))) ... #+#.(fiveam) (test ...) if you want to avoid giving a keyword a function value you'll have to fully qualify the function name: #+#.(my-package:fiveam) is this Good Enough(TM)? (since you want the code to run without fiveam loaded you will need to define the fiveam function for every package which uses fiveam (or any other test suite for that matter)). if this becomes common i could distribute a 'boot strap' file for fiveam which contains: (in-package :common-lisp-user) (defpackage :it.bese.fiveam (:nicknames :5am) (:export :?)) (defun 5am:? () (if (find-package :it.bese.fiveam) '(and) '(or))) and you'd litter your code with: #.#+(5am:?) (test ...) you'd then include this file in all your projects. loading fiveam will replace the package definition but until then the reader will be happy. on second thought, i think this idea sucks. -- -Marco Ring the bells that still can ring. Forget the perfect offering. There is a crack in everything. That's how the light gets in. -Leonard Cohen From mb at bese.it Fri Aug 12 14:39:43 2005 From: mb at bese.it (Marco Baringer) Date: Fri, 12 Aug 2005 16:39:43 +0200 Subject: [Bese-devel] darcs patch: Add :fiveam to *features* In-Reply-To: (Marco Baringer's message of "Fri, 12 Aug 2005 16:34:08 +0200") References: Message-ID: "Marco Baringer" writes: > (in-package :common-lisp-user) > > (defpackage :it.bese.fiveam of course, this should :it.bese.fiveam.bootstrap or something if i want it to actually work :) -- -Marco Ring the bells that still can ring. Forget the perfect offering. There is a crack in everything. That's how the light gets in. -Leonard Cohen From asf at boinkor.net Fri Aug 12 15:23:14 2005 From: asf at boinkor.net (Andreas Fuchs) Date: Fri, 12 Aug 2005 17:23:14 +0200 Subject: [Bese-devel] darcs patch: Add :fiveam to *features* In-Reply-To: References: Message-ID: <871x4z5gd9.wl%asf@boinkor.net> Today, Marco Baringer wrote: > Alan Shields writes: > >> Thu Aug 11 16:20:32 CDT 2005 Alan Shields >> >> * Add :fiveam to *features* >> I've found that I prefer to add testing code in my other code, but I dislike >> adding :fiveam to my package requirements list. > > i am hesitant to modify *features*, it's not really supposed to be > used for this (afaict). you could do this: > > (defun :fiveam () > (if (find-package :it.bese.fiveam) > '(and) > '(or))) Careful, there! suite:testp should return '(or) and '(and), of course (: n-uhuh '(:or) '(:and) ah, right. I was in the keyword package (: lots of people get that wrong, including clrfi authors -- Andreas Fuchs, , asf at jabber.at, antifuchs From mb at bese.it Fri Aug 12 15:37:22 2005 From: mb at bese.it (Marco Baringer) Date: Fri, 12 Aug 2005 17:37:22 +0200 Subject: [Bese-devel] darcs patch: Add :fiveam to *features* In-Reply-To: <871x4z5gd9.wl%asf@boinkor.net> (Andreas Fuchs's message of "Fri, 12 Aug 2005 17:23:14 +0200") References: <871x4z5gd9.wl%asf@boinkor.net> Message-ID: Andreas Fuchs writes: > Today, Marco Baringer wrote: >> Alan Shields writes: >> >>> Thu Aug 11 16:20:32 CDT 2005 Alan Shields >>> >>> * Add :fiveam to *features* >>> I've found that I prefer to add testing code in my other code, but I dislike >>> adding :fiveam to my package requirements list. >> >> i am hesitant to modify *features*, it's not really supposed to be >> used for this (afaict). you could do this: >> >> (defun :fiveam () >> (if (find-package :it.bese.fiveam) >> '(and) >> '(or))) > > Careful, there! um, the function definition is not read in the keyword package. notice that the function is named :FIVEAM so you can use it like this: #+#.(fiveam) since the string "fiveam" _will_ be read in the keyword package. -- -Marco Ring the bells that still can ring. Forget the perfect offering. There is a crack in everything. That's how the light gets in. -Leonard Cohen From asf at boinkor.net Fri Aug 12 15:40:37 2005 From: asf at boinkor.net (Andreas Fuchs) Date: Fri, 12 Aug 2005 17:40:37 +0200 Subject: [Bese-devel] darcs patch: Add :fiveam to *features* In-Reply-To: References: <871x4z5gd9.wl%asf@boinkor.net> Message-ID: <87zmrn40zu.wl%asf@boinkor.net> Today, Marco Baringer wrote: > Andreas Fuchs writes: >> Today, Marco Baringer wrote: >>> (defun :fiveam () >>> (if (find-package :it.bese.fiveam) >>> '(and) >>> '(or))) >> >> Careful, there! > > um, the function definition is not read in the keyword > package. Right, so symbols it returns should be in the keyword package. It should be '(:or) and '(:and), not '(or) and '(and). > notice that the function is named :FIVEAM so you can use it like > this: #+#.(fiveam) since the string "fiveam" _will_ be read in the > keyword package. Correct. -- Andreas Fuchs, , asf at jabber.at, antifuchs From mb at bese.it Fri Aug 12 15:55:01 2005 From: mb at bese.it (Marco Baringer) Date: Fri, 12 Aug 2005 17:55:01 +0200 Subject: [Bese-devel] darcs patch: Add :fiveam to *features* In-Reply-To: <87zmrn40zu.wl%asf@boinkor.net> (Andreas Fuchs's message of "Fri, 12 Aug 2005 17:40:37 +0200") References: <871x4z5gd9.wl%asf@boinkor.net> <87zmrn40zu.wl%asf@boinkor.net> Message-ID: Andreas Fuchs writes: > Today, Marco Baringer wrote: >> Andreas Fuchs writes: >>> Today, Marco Baringer wrote: >>>> (defun :fiveam () >>>> (if (find-package :it.bese.fiveam) >>>> '(and) >>>> '(or))) >>> >>> Careful, there! >> >> um, the function definition is not read in the keyword >> package. > > Right, so symbols it returns should be in the keyword package. It > should be '(:or) and '(:and), not '(or) and '(and). good catch. how can something so simple be so damn confusing? -- -Marco Ring the bells that still can ring. Forget the perfect offering. There is a crack in everything. That's how the light gets in. -Leonard Cohen From pjb at informatimago.com Fri Aug 12 15:59:42 2005 From: pjb at informatimago.com (Pascal Bourguignon) Date: Fri, 12 Aug 2005 17:59:42 +0200 Subject: [Bese-devel] darcs patch: Add :fiveam to *features* In-Reply-To: References: <871x4z5gd9.wl%asf@boinkor.net> Message-ID: <17148.51054.734431.64434@thalassa.informatimago.com> Marco Baringer writes: > Andreas Fuchs writes: > > > Today, Marco Baringer wrote: > >> Alan Shields writes: > >> > >>> Thu Aug 11 16:20:32 CDT 2005 Alan Shields > >>> > >>> * Add :fiveam to *features* > >>> I've found that I prefer to add testing code in my other code, but I dislike > >>> adding :fiveam to my package requirements list. > >> > >> i am hesitant to modify *features*, it's not really supposed to be > >> used for this (afaict). you could do this: > >> > >> (defun :fiveam () > >> (if (find-package :it.bese.fiveam) > >> '(and) > >> '(or))) > > > > Careful, there! > > um, the function definition is not read in the keyword package. notice > that the function is named :FIVEAM so you can use it like this: > > #+#.(fiveam) since the string "fiveam" _will_ be read in the keyword > package. Why should it be read in the keyword package? [39]> #.(zaphod-beeblebrox) *** - EVAL: undefined function ZAPHOD-BEEBLEBROX The following restarts are available: USE-VALUE :R1 You may input a value to be used instead of (FDEFINITION 'ZAPHOD-BEEBLEBROX). RETRY :R2 Retry STORE-VALUE :R3 You may input a new value for (FDEFINITION 'ZAPHOD-BEEBLEBROX). ABORT :R4 ABORT Break 1 [40]> *package* # Break 1 [40]> :a [41]> (find-symbol "ZAPHOD-BEEBLEBROX" "KEYWORD") NIL ; NIL [42]> (find-symbol "ZAPHOD-BEEBLEBROX" "COMMON-LISP-USER") ZAPHOD-BEEBLEBROX ; :INTERNAL You should write: #+#.(:fiveam) -- __Pascal Bourguignon__ http://www.informatimago.com/ Until real software engineering is developed, the next best practice is to develop with a dynamic system that has extreme late binding in all aspects. The first system to really do this in an important way is Lisp. -- Alan Kay From asf at boinkor.net Fri Aug 12 16:15:38 2005 From: asf at boinkor.net (Andreas Fuchs) Date: Fri, 12 Aug 2005 18:15:38 +0200 Subject: [Bese-devel] darcs patch: Add :fiveam to *features* In-Reply-To: <17148.51054.734431.64434@thalassa.informatimago.com> References: <871x4z5gd9.wl%asf@boinkor.net> <17148.51054.734431.64434@thalassa.informatimago.com> Message-ID: <87y8773zdh.wl%asf@boinkor.net> Today, Pascal Bourguignon wrote: >> #+#.(fiveam) since the string "fiveam" _will_ be read in the >> #keyword >> package. > > Why should it be read in the keyword package? Because the spec says so. See 2.4.8.17. -- Andreas Fuchs, , asf at jabber.at, antifuchs From carlos.ungil at bluewin.ch Fri Aug 12 18:56:56 2005 From: carlos.ungil at bluewin.ch (Carlos Ungil) Date: Fri, 12 Aug 2005 20:56:56 +0200 Subject: [Bese-devel] yaclml test suite failures Message-ID: <8ee8d4efa73b44cd3ce8570ed47d50d0@bluewin.ch> Hello, I had a problems with ucw on linux (only part of the html output was visible, and the pages couldn't be rendered) and I thought it was related to the indentation inserted inside tags. Finally it looks like the origin of my problems was elsewhere (I don't understand why, but everything works now). However, I noticed that this indentation doesn't pass the tests (later I've seen in some old mails that this is indeed a feature) . There are as well errors in the test suite (the output for sbcl 0.9.3 on linux FC3 is included at the end of this message). Maybe if the test suite is not valid it can be removed, or at least this fact could be mentioned in the README). Cheers, Carlos ................................. Did 39 checks. Pass: 31 (79%) Skip: 0 ( 0%) Fail: 8 (20%) Failure Details: NON-TAL []: "
   one

two
" was not STRING= to "
   one

two
". NON-TAL []: "" was not STRING= to "". NON-TAL []: "" was not STRING= to "". TAL-WHEN []: Unexpected Error: #.. TAL-REPLACE []: Unexpected Error: #.. TAL-CONTENT []: Unexpected Error: #.. TAL-INCLUDE []: Unexpected Error: #.. TAL-ENV []: Unexpected Error: #.. From mb at bese.it Fri Aug 12 22:31:16 2005 From: mb at bese.it (Marco Baringer) Date: Sat, 13 Aug 2005 00:31:16 +0200 Subject: [Bese-devel] yaclml test suite failures In-Reply-To: <8ee8d4efa73b44cd3ce8570ed47d50d0@bluewin.ch> (Carlos Ungil's message of "Fri, 12 Aug 2005 20:56:56 +0200") References: <8ee8d4efa73b44cd3ce8570ed47d50d0@bluewin.ch> Message-ID: Carlos Ungil writes: > However, I noticed that this indentation doesn't pass the tests > (later I've seen in some old mails that this is indeed a feature) . 'feature' is a strong word. however the funny indentation is the only way i can think of to indent html code without changing how browsers interpret the code and without having to know wether a block should be display: block or display: inline (and since this is impossible to know with divs and spans we don't have much choice). > There are as well errors in the test suite (the output for sbcl 0.9.3 > on linux FC3 is included at the end of this message). thanks for pointing this out. (i think the last time i ran yaclml's test suite was in mid 2004...) > Maybe if the test suite is not valid it can be removed, or at least > this fact could be mentioned in the README). it should be updated, it will probably be removed (ucw is a far better test suite than anything i could come up with by hand). -- -Marco Ring the bells that still can ring. Forget the perfect offering. There is a crack in everything. That's how the light gets in. -Leonard Cohen From frido at q-software-solutions.de Sat Aug 13 16:11:07 2005 From: frido at q-software-solutions.de (Friedrich Dominicus) Date: Sat, 13 Aug 2005 18:11:07 +0200 Subject: [Bese-devel] Changes II In-Reply-To: <87pssndria.fsf@flarge.here> (Friedrich Dominicus's message of "Tue, 09 Aug 2005 18:06:21 +0200") References: <873bpjf7bj.fsf@flarge.here> <87pssndria.fsf@flarge.here> Message-ID: <87zmrl95r8.fsf@flarge.here> May I ask if anyone has encountered the same problem than I did? Is it on purpose and why does it happen. I'd appriciate to know what this extraction of the lambda was necessary. Regards Friedrich From mb at bese.it Sun Aug 14 11:24:42 2005 From: mb at bese.it (Marco Baringer) Date: Sun, 14 Aug 2005 13:24:42 +0200 Subject: [Bese-devel] Changes II In-Reply-To: <87zmrl95r8.fsf@flarge.here> (Friedrich Dominicus's message of "Sat, 13 Aug 2005 18:11:07 +0200") References: <873bpjf7bj.fsf@flarge.here> <87pssndria.fsf@flarge.here> <87zmrl95r8.fsf@flarge.here> Message-ID: Friedrich Dominicus writes: > May I ask if anyone has encountered the same problem than I did? Is it > on purpose and why does it happen. I'd appriciate to know what this > extraction of the lambda was necessary. did you not recieve this email? http://common-lisp.net/pipermail/bese-devel/2005-August/000756.html or was i simply not clear enough? -- -Marco Ring the bells that still can ring. Forget the perfect offering. There is a crack in everything. That's how the light gets in. -Leonard Cohen From marco_simon at web.de Sun Aug 14 12:36:29 2005 From: marco_simon at web.de (Marco Simon) Date: Sun, 14 Aug 2005 14:36:29 +0200 Subject: [Bese-devel] How to use tal-templates In-Reply-To: References: <873bpjf7bj.fsf@flarge.here> <87pssndria.fsf@flarge.here> <87zmrl95r8.fsf@flarge.here> Message-ID: <42FF3ACD.6020602@web.de> Hello list, could somebody please give me short "hello world" on how to use the tal-template engine ? I thought it would be as easy as declaring an component with the super-class "template-component" and a template-name, but that seemed not to be enough. I even had a look at Marco Baringers's "counter" example which uses the tal-template mechanism - but didn't manage it. So could you please give me some example-lines which show how to implement *.tal - files ? Beside that (but this hasnt to do with ucw) I'm looking for a lisp-function which escapes all " within a string to \" but didn't find any predifined cl-function so far. Any hints ? Thanks a lot best regards Marco From whalliburton at gmail.com Sun Aug 14 14:39:49 2005 From: whalliburton at gmail.com (William Halliburton) Date: Sun, 14 Aug 2005 09:39:49 -0500 Subject: [Bese-devel] How to use tal-templates In-Reply-To: <42FF3ACD.6020602@web.de> References: <873bpjf7bj.fsf@flarge.here> <87pssndria.fsf@flarge.here> <87zmrl95r8.fsf@flarge.here> <42FF3ACD.6020602@web.de> Message-ID: <4e7bd29e05081407395c10d780@mail.gmail.com> Ok. Here is an answer the second part. (defun escape-char (char str) "Return string with CHAR escaped in string STR with #\\" (with-output-to-string (s) (loop for c across str do (cond ((char= c char) (write-char #\\ s) (write-char c s)) (t (write-char c s)))))) On 8/14/05, Marco Simon wrote: > Hello list, > > could somebody please give me short "hello world" on how to > use the tal-template engine ? > I thought it would be as easy as declaring an component with > the super-class "template-component" and a template-name, but > that seemed not to be enough. > I even had a look at Marco Baringers's "counter" example which uses the > tal-template mechanism - but didn't manage it. > So could you please give me some example-lines which show how > to implement *.tal - files ? > > Beside that (but this hasnt to do with ucw) I'm looking for a lisp-function > which escapes all " within a string to \" but didn't find any predifined > cl-function > so far. Any hints ? > > Thanks a lot > best regards > Marco > > > _______________________________________________ > bese-devel mailing list > bese-devel at common-lisp.net > http://common-lisp.net/cgi-bin/mailman/listinfo/bese-devel > From mlist at rogers.com Sun Aug 14 23:39:11 2005 From: mlist at rogers.com (vedm) Date: 14 Aug 2005 19:39:11 -0400 Subject: [Bese-devel] UCW "Hello World" error Message-ID: <86ll34ks0w.fsf@localhost.localdomain> I tried UCW with CMUCL and SBCL (Debian unstable). In both of them when I try to load http://127.0.0.1:8080/ucw/examples/index.ucw in the browser, I get the following error in the SLIME debugger: Type-error in KERNEL::OBJECT-NOT-SYMBOL-ERROR-HANDLER: (SETF IT.BESE.UCW:COMPONENT.PLACE) is not of type SYMBOL [Condition of type TYPE-ERROR] Any idea how to fix this? -- vedm From whalliburton at gmail.com Mon Aug 15 01:15:19 2005 From: whalliburton at gmail.com (William Halliburton) Date: Sun, 14 Aug 2005 20:15:19 -0500 Subject: [Bese-devel] UCW "Hello World" error In-Reply-To: <86ll34ks0w.fsf@localhost.localdomain> References: <86ll34ks0w.fsf@localhost.localdomain> Message-ID: <4e7bd29e05081418151f0fab42@mail.gmail.com> Hello, I believe the answer you are looking for is at http://common-lisp.net/pipermail/bese-devel/2005-August/000732.html http://common-lisp.net/pipermail/bese-devel/2005-August/000733.html This is fixed in latest ucw_dev + arnesi_dev. Will On 14 Aug 2005 19:39:11 -0400, vedm wrote: > > I tried UCW with CMUCL and SBCL (Debian unstable). In both of them when > I try to load http://127.0.0.1:8080/ucw/examples/index.ucw in the > browser, I get the following error in the SLIME debugger: > > Type-error in KERNEL::OBJECT-NOT-SYMBOL-ERROR-HANDLER: > (SETF IT.BESE.UCW:COMPONENT.PLACE) is not of type SYMBOL > [Condition of type TYPE-ERROR] > > Any idea how to fix this? > > -- > vedm > _______________________________________________ > bese-devel mailing list > bese-devel at common-lisp.net > http://common-lisp.net/cgi-bin/mailman/listinfo/bese-devel > From mb at bese.it Mon Aug 15 05:46:45 2005 From: mb at bese.it (Marco Baringer) Date: Mon, 15 Aug 2005 07:46:45 +0200 Subject: [Bese-devel] How to use tal-templates In-Reply-To: <42FF3ACD.6020602@web.de> (Marco Simon's message of "Sun, 14 Aug 2005 14:36:29 +0200") References: <873bpjf7bj.fsf@flarge.here> <87pssndria.fsf@flarge.here> <87zmrl95r8.fsf@flarge.here> <42FF3ACD.6020602@web.de> Message-ID: Marco Simon writes: > could somebody please give me short "hello world" on how to use the > tal-template engine? > I thought it would be as easy as declaring an component with the > super-class "template-component" and a template-name, but that > seemed not to be enough. > I even had a look at Marco Baringers's "counter" example which uses > the tal-template mechanism - but didn't manage it. So could you > please give me some example-lines which show how to implement *.tal > - files ? using a tal template requires that 1) we create the .tal file and 2) we tell ucw haw to find it. #1 is, i hope, obvious, #2 requires that we pass :template-name as an initarg when creating the component (most of the time, but not always, you'll use the class option :default-initargs) and setting up the proper tal-generator. a tal-generator is an object which, given a template filename, returns a function which, given a tal evironment, actually prints the page to *yaclml-stream*. at some point i planned on having multiple types of tal-generators, for now all we have is the file-system-generator, and i don't think we need more. every application has its own generator (which is _not_ tied to the single component), this lets use the same component with different templates in different apps (though the same component with differnt templates in the same app will require multiple component classes). (defvar *example-application* (make-instance 'cookie-session-application :url-prefix "/ucw/examples/" :tal-generator (make-instance 'yaclml:file-system-generator :cachep t :root-directories (list *ucw-tal-root*)) :www-roots (list (merge-pathnames "./ucw/examples/" *ucw-tal-root*)))) that's the form whcih creates the example application object, notice the :tal-generator keyword. file-system-generator has a list of directories, in this case just *ucw-tal-root*, which it uses to search for the actually template file. if our file-system-generator has "/foo/" on its list of root-directories and we're looking for a template named "here/there/whatever.tal" it will load the file at "/foo/here/there/whatever.tal". in the case of the counter example the template is named "ucw/examples/counter.tal" and the root-directories of the example app's generator is just (list "/path/to/ucw/wwwroot/") hence counter.tal needs to live at "/path/to/ucw/wwwroot/ucw/examples/counter.tal". does this make sense? once we've found the template we need to actually use it. all tal templates are eventually converted to lisp code and use yaclml macros underneath, with some extensions. when you use an anchor tag in a tal file (if you've setup the xmlns properly) you'll eventually "run" the <:A macro, when you see blah blah that is exactly the same as ( - does nothing in and of itself, but it provides a place to put tal:attributes when you don't want to add another tag.
or should work just as well but browsers aren't perfect. - include another tal template. tal:name="whateverl.tal" - the name of the of the file to include (not evaluated). the file is found using the same mechanism as described above. param:xyz="(something)" - something is evaluated and its return value (a list object) is put into included file's environment under the name xyz. (xyz is converted into a symbol in the current tal package). ... - xyz is bound to the _string_ which the body of the tag produces. Other things: tal attributes are normally evaluated. there is a read macro bound to #\$ which will lookup in the current env the value associated with the symbol. So $whatever in a tal attribute correspands to the value of the lisp object bonud to the name whatever (whatever is a symbol in the current tal package (see tal:in-package above)). non tal attributes are generally strings which are left alone. the exception is if the contain ${ ... } or @{ ... }. in this case the body of ... is evaluated it it's return value (a string in the case of $, a list of strings in the case of @) is substituted for the text occupied by the ${ ... } code. example: dummy value goes here
hth. p.s. - this is the way things _should_ be. i haven't done a lot of tal coding lately so there may be deviations (which are bugs and sholud be reported as such). -- -Marco Ring the bells that still can ring. Forget the perfect offering. There is a crack in everything. That's how the light gets in. -Leonard Cohen From mb at bese.it Mon Aug 15 06:29:46 2005 From: mb at bese.it (Marco Baringer) Date: Mon, 15 Aug 2005 08:29:46 +0200 Subject: [Bese-devel] ucw and parenscript Message-ID: as of festerday now ucw depends on parenscript. You can get parenscript from the darcs repo here: http://common-lisp.net/project/ucw/repos/parenscript -- -Marco Ring the bells that still can ring. Forget the perfect offering. There is a crack in everything. That's how the light gets in. -Leonard Cohen From mb at bese.it Mon Aug 15 08:23:41 2005 From: mb at bese.it (Marco Baringer) Date: Mon, 15 Aug 2005 10:23:41 +0200 Subject: [Bese-devel] ucw and parenscript In-Reply-To: <7c23adaa05081501203302f321@mail.gmail.com> (Ivan Toshkov's message of "Mon, 15 Aug 2005 11:20:09 +0300") References: <7c23adaa05081501203302f321@mail.gmail.com> Message-ID: Ivan Toshkov writes: > I've modified it your version of parenscript and send it here. > Incidentally, `dolist' has the same problem as `dotimes'. This patch > fixes that, too. applied. thanks. -- -Marco Ring the bells that still can ring. Forget the perfect offering. There is a crack in everything. That's how the light gets in. -Leonard Cohen From marco_simon at web.de Mon Aug 15 08:25:04 2005 From: marco_simon at web.de (Marco Simon) Date: Mon, 15 Aug 2005 10:25:04 +0200 Subject: [Bese-devel] How to use tal-templates In-Reply-To: <4e7bd29e05081407395c10d780@mail.gmail.com> References: <873bpjf7bj.fsf@flarge.here> <87pssndria.fsf@flarge.here> <87zmrl95r8.fsf@flarge.here> <42FF3ACD.6020602@web.de> <4e7bd29e05081407395c10d780@mail.gmail.com> Message-ID: <43005160.2070601@web.de> Hi William, I fear I didn't explain correctly what's my need. Perhaps I should tell what I wanna do: I want to embed some html or js snippets directly into my ucw-code. (something like (<:as-is code_snippet) An easy example would be: (<:as-is "' ?> I'm absolutely sure that something similar is even possible with lisp, but I didn't realize how to do so far. Thanks for your hints, best regards Marco William Halliburton schrieb: >Ok. Here is an answer the second part. > >(defun escape-char (char str) > "Return string with CHAR escaped in string STR with #\\" > (with-output-to-string (s) > (loop > for c across str > do (cond > ((char= c char) > (write-char #\\ s) > (write-char c s)) > (t (write-char c s)))))) > >On 8/14/05, Marco Simon wrote: > > >>Hello list, >> >>could somebody please give me short "hello world" on how to >>use the tal-template engine ? >>I thought it would be as easy as declaring an component with >>the super-class "template-component" and a template-name, but >>that seemed not to be enough. >>I even had a look at Marco Baringers's "counter" example which uses the >>tal-template mechanism - but didn't manage it. >>So could you please give me some example-lines which show how >>to implement *.tal - files ? >> >>Beside that (but this hasnt to do with ucw) I'm looking for a lisp-function >>which escapes all " within a string to \" but didn't find any predifined >>cl-function >>so far. Any hints ? >> >>Thanks a lot >> best regards >> Marco >> >> >>_______________________________________________ >>bese-devel mailing list >>bese-devel at common-lisp.net >>http://common-lisp.net/cgi-bin/mailman/listinfo/bese-devel >> >> >> > > > > From itoshkov at gmail.com Mon Aug 15 08:20:09 2005 From: itoshkov at gmail.com (Ivan Toshkov) Date: Mon, 15 Aug 2005 11:20:09 +0300 Subject: [Bese-devel] ucw and parenscript In-Reply-To: References: Message-ID: <7c23adaa05081501203302f321@mail.gmail.com> On 8/15/05, Marco Baringer wrote: > > as of festerday now ucw depends on parenscript. You can get > parenscript from the darcs repo here: > > http://common-lisp.net/project/ucw/repos/parenscript > Some time ago I found the following problem with parenscipt's dotimes: > (js:js (dotimes (i args.length) (print i))) "for (var i = 0; i != args.length; i = i++) { print(i); }" As you can see this is an infinite loop unless `args.length' is zero. Unfortunately, I was unable to reach parenscript's author and left the patch in the cliki page. I've modified it your version of parenscript and send it here. Incidentally, `dolist' has the same problem as `dotimes'. This patch fixes that, too. Cheers, Ivan -- All languages are equal, but Lisp is more equal than others. -------------- next part -------------- A non-text attachment was scrubbed... Name: patch Type: application/octet-stream Size: 1985 bytes Desc: not available URL: From mb at bese.it Mon Aug 15 08:34:09 2005 From: mb at bese.it (Marco Baringer) Date: Mon, 15 Aug 2005 10:34:09 +0200 Subject: [Bese-devel] How to use tal-templates In-Reply-To: <43005160.2070601@web.de> (Marco Simon's message of "Mon, 15 Aug 2005 10:25:04 +0200") References: <873bpjf7bj.fsf@flarge.here> <87pssndria.fsf@flarge.here> <87zmrl95r8.fsf@flarge.here> <42FF3ACD.6020602@web.de> <4e7bd29e05081407395c10d780@mail.gmail.com> <43005160.2070601@web.de> Message-ID: Marco Simon writes: > Hi William, > > I fear I didn't explain correctly what's my need. > Perhaps I should tell what I wanna do: > > I want to embed some html or js snippets directly into > my ucw-code. (something like > (<:as-is code_snippet) > > An easy example would be: > (<:as-is "' ?> > > I'm absolutely sure that something similar is even possible with > lisp, but I didn't realize how to do so far. hth. -- -Marco Ring the bells that still can ring. Forget the perfect offering. There is a crack in everything. That's how the light gets in. -Leonard Cohen From mb at bese.it Mon Aug 15 09:36:40 2005 From: mb at bese.it (Marco Baringer) Date: Mon, 15 Aug 2005 11:36:40 +0200 Subject: [Bese-devel] How to use tal-templates In-Reply-To: <20050815091319.GA58357@pvv.ntnu.no> (astor@pvv.ntnu.no's message of "Mon, 15 Aug 2005 11:13:19 +0200") References: <873bpjf7bj.fsf@flarge.here> <87pssndria.fsf@flarge.here> <87zmrl95r8.fsf@flarge.here> <42FF3ACD.6020602@web.de> <4e7bd29e05081407395c10d780@mail.gmail.com> <43005160.2070601@web.de> <20050815091319.GA58357@pvv.ntnu.no> Message-ID: astor at pvv.ntnu.no writes: > On Mon, Aug 15, 2005 at 10:34:09AM +0200, Marco Baringer wrote: >> >> grab a very recent ucw and parenscript (see other email to >> bese-devel): >> >> (> (alert "Hello World")) >> >> that is sooooo much better. >> > > ( Pages are supposed to be faster when scripts are put in the HEADER > section since this section can be processed before/while the page is > being laid out. sorry, i don't follow, why not just put it in the header then? it's not available quite yet the :inline-javascript simple-window-component initarg will soon take a list of parenscript code and not a string as it does now. -- -Marco Ring the bells that still can ring. Forget the perfect offering. There is a crack in everything. That's how the light gets in. -Leonard Cohen From frido at q-software-solutions.de Mon Aug 15 10:15:55 2005 From: frido at q-software-solutions.de (Friedrich Dominicus) Date: Mon, 15 Aug 2005 12:15:55 +0200 Subject: [Bese-devel] Got in troubles again Message-ID: <87pssfh5es.fsf@flarge.here> I do not understand what's wrong with the following code: ;;; Just for testing (defcomponent ir-test (simple-window-component form-component) ((num :accessor num :component (integer-range-field :min-value 0 :max-value 20)) (foo-num :accessor foo-num :initarg :foo-num :component (integer-field)))) (defmethod render-on ((res response) (tf ir-test)) (render-on res (num tf)) (render-on res (foo-num tf))) (defentry-point "ti.ucw" (:application *shop*) () (call 'ir-test :foo-num 10)) Error message I got is: There is no applicable method for the generic function # when called with arguments (# 10). [Condition of type SIMPLE-ERROR] Restarts: 0: [SHOW-BACKTRACE] Send the client a backtrace page. 1: [RETRY] Clearout the response and retry calling the action. 2: [SERVER-ERROR] Send the client an internal server error page. 3: [GENERATE-BACKTRACE-FOR-EMACS] Generate a bug report in Emacs. 4: [ABORT-RESPONSE] Abort this response and answer another request 5: [ABORT] Exit debugger, returning to top level. It was my impresson that I can put in the same argument to call as I can for make-intance So what does this ..... error message mean? What do I have to to get that running? Regards Friedrich From mb at bese.it Mon Aug 15 10:28:08 2005 From: mb at bese.it (Marco Baringer) Date: Mon, 15 Aug 2005 12:28:08 +0200 Subject: [Bese-devel] Got in troubles again In-Reply-To: <87pssfh5es.fsf@flarge.here> (Friedrich Dominicus's message of "Mon, 15 Aug 2005 12:15:55 +0200") References: <87pssfh5es.fsf@flarge.here> Message-ID: Friedrich Dominicus writes: > I do not understand what's wrong with the following code: > > ;;; Just for testing > (defcomponent ir-test (simple-window-component form-component) > ((num :accessor num > :component (integer-range-field :min-value 0 :max-value 20)) > (foo-num :accessor foo-num > :initarg :foo-num > :component (integer-field)))) > > > > (defmethod render-on ((res response) (tf ir-test)) > (render-on res (num tf)) > (render-on res (foo-num tf))) > > > > (defentry-point "ti.ucw" (:application *shop*) () > (call 'ir-test :foo-num 10)) the foo-num slot is assumed to be component, you've set it to 10, which isn't a component. ucw barfs when it tries to set the place of the number 10. what you want is this: (defmethod shared-initialize :after ((c ir-test) slot-names &key foo-num &allow-other-keys) (setf (lisp-value (foo-num c)) foo-num)) iow you want the value passed as :foo-num to end up in a slot of the underlying component. the fact that this shared-initialize is neccessary is pretty ugly, but i have yet to figure out a good way to structure it, suggestions welcome. -- -Marco Ring the bells that still can ring. Forget the perfect offering. There is a crack in everything. That's how the light gets in. -Leonard Cohen From mb at bese.it Mon Aug 15 10:37:16 2005 From: mb at bese.it (Marco Baringer) Date: Mon, 15 Aug 2005 12:37:16 +0200 Subject: [Bese-devel] Got in troubles again In-Reply-To: (Marco Baringer's message of "Mon, 15 Aug 2005 12:28:08 +0200") References: <87pssfh5es.fsf@flarge.here> Message-ID: "Marco Baringer" writes: > > what you want is this: > > (defmethod shared-initialize :after ((c ir-test) slot-names &key foo-num &allow-other-keys) > (setf (lisp-value (foo-num c)) foo-num)) > > iow you want the value passed as :foo-num to end up in a slot of the > underlying component. > > the fact that this shared-initialize is neccessary is pretty ugly, but > i have yet to figure out a good way to structure it, suggestions > welcome. this could alse be nice: (defentry-point "ti.ucw" (:application *shop*) () (call 'ir-test :foo-num `(:lisp-value 10))) basically we take anything passed as an initarg to a component slot and pass that as initargs when creating the underlying component. this would also allow you to do stuff like: (call 'ir-test :foo-num `(:lisp-value ,*default-value* :client-value "")) good enough? -- -Marco Ring the bells that still can ring. Forget the perfect offering. There is a crack in everything. That's how the light gets in. -Leonard Cohen From astor at pvv.ntnu.no Mon Aug 15 11:50:48 2005 From: astor at pvv.ntnu.no (astor at pvv.ntnu.no) Date: Mon, 15 Aug 2005 13:50:48 +0200 Subject: [Bese-devel] How to use tal-templates In-Reply-To: References: <873bpjf7bj.fsf@flarge.here> <87pssndria.fsf@flarge.here> <87zmrl95r8.fsf@flarge.here> <42FF3ACD.6020602@web.de> <4e7bd29e05081407395c10d780@mail.gmail.com> <43005160.2070601@web.de> <20050815091319.GA58357@pvv.ntnu.no> Message-ID: <20050815115048.GD58357@pvv.ntnu.no> On Mon, Aug 15, 2005 at 11:36:40AM +0200, Marco Baringer wrote: > astor at pvv.ntnu.no writes: > > Pages are supposed to be faster when scripts are put in the HEADER > > section since this section can be processed before/while the page is > > being laid out. > > sorry, i don't follow, why not just put it in the header then? > > it's not available quite yet the :inline-javascript > simple-window-component initarg will soon take a list of parenscript > code and not a string as it does now. > Typically you want to keep the javascript and the HTML close to each other for a component. So you might want an easy way to add to the "header" section in the way that render-on adds to the "body" section. Adding to an inline-javascript slot or something like that would do the trick I guess. astor From mb at bese.it Mon Aug 15 13:25:38 2005 From: mb at bese.it (Marco Baringer) Date: Mon, 15 Aug 2005 15:25:38 +0200 Subject: [Bese-devel] How to use tal-templates In-Reply-To: <20050815115048.GD58357@pvv.ntnu.no> (astor@pvv.ntnu.no's message of "Mon, 15 Aug 2005 13:50:48 +0200") References: <873bpjf7bj.fsf@flarge.here> <87pssndria.fsf@flarge.here> <87zmrl95r8.fsf@flarge.here> <42FF3ACD.6020602@web.de> <4e7bd29e05081407395c10d780@mail.gmail.com> <43005160.2070601@web.de> <20050815091319.GA58357@pvv.ntnu.no> <20050815115048.GD58357@pvv.ntnu.no> Message-ID: astor at pvv.ntnu.no writes: > On Mon, Aug 15, 2005 at 11:36:40AM +0200, Marco Baringer wrote: >> astor at pvv.ntnu.no writes: >> > Pages are supposed to be faster when scripts are put in the HEADER >> > section since this section can be processed before/while the page is >> > being laid out. >> >> sorry, i don't follow, why not just put it in the header then? >> >> it's not available quite yet the :inline-javascript >> simple-window-component initarg will soon take a list of parenscript >> code and not a string as it does now. >> > > Typically you want to keep the javascript and the HTML close to each > other for a component. So you might want an easy way to add to the > "header" section in the way that render-on adds to the "body" section. > Adding to an inline-javascript slot or something like that would do > the trick I guess. currenlty we don't have a way for a nested componnet to affect the tags generated by the window component, nor do we have an already existing mechanism which would allow this. would it be worth the effort to make simple-window-component (or something) walk the component tree before the render-on phase and collect extra head headers (like script or even meta or link)? -- -Marco Ring the bells that still can ring. Forget the perfect offering. There is a crack in everything. That's how the light gets in. -Leonard Cohen From frido at q-software-solutions.de Mon Aug 15 14:19:01 2005 From: frido at q-software-solutions.de (Friedrich Dominicus) Date: Mon, 15 Aug 2005 16:19:01 +0200 Subject: [Bese-devel] Got in troubles again In-Reply-To: (Marco Baringer's message of "Mon, 15 Aug 2005 12:28:08 +0200") References: <87pssfh5es.fsf@flarge.here> Message-ID: <87fytbgu5m.fsf@flarge.here> Thanks I found out half an hour after my posting how this works and was "hacking" something similiar but it's really ugly. Assume you have an object with 10 slots and 10 initargs, there must be a better way, but I have no idea yet. It's a pitty. Friedrich From astor at pvv.ntnu.no Mon Aug 15 15:34:45 2005 From: astor at pvv.ntnu.no (astor at pvv.ntnu.no) Date: Mon, 15 Aug 2005 17:34:45 +0200 Subject: [Bese-devel] How to use tal-templates In-Reply-To: References: <87zmrl95r8.fsf@flarge.here> <42FF3ACD.6020602@web.de> <4e7bd29e05081407395c10d780@mail.gmail.com> <43005160.2070601@web.de> <20050815091319.GA58357@pvv.ntnu.no> <20050815115048.GD58357@pvv.ntnu.no> Message-ID: <20050815153445.GF58357@pvv.ntnu.no> On Mon, Aug 15, 2005 at 03:25:38PM +0200, Marco Baringer wrote: > > currenlty we don't have a way for a nested componnet to affect the > tags generated by the window component, nor do we have an already > existing mechanism which would allow this. > > would it be worth the effort to make simple-window-component (or > something) walk the component tree before the render-on phase and > collect extra head headers (like script or even meta or link)? > I think so. But just to complete the picture, I can think of the following use-cases: o Sometimes you want to place supporting javascript in HEAD. This is the proper way to ensure that they are available. Putting the script in BODY could often be buggy since the code might not be available when an event fires in the javascript world. o Sometimes a component might want to place supporting javascript in HEAD _once_ even if the component is rendered multiple times. (maybe a property-like interface would be good for this stuff). o Maybe a component would like to produce an "external" .js-file for that particular component and refer to that .js-file _once_ in HEAD if the component is being used. This could be a good solution for complex components (AJAX maybe). o Sometimes you want to put javascript in BODY, but AFAIK, that will typically not be code that simply defines functions, but rather code that does stuff, like your alert example. But this is supported rather well already I think. So to me it seems like a component might want to produce: o Global code (external .js-file) o Per request, "per instance" code in HEAD. o Per request, "per instance" code in BODY. o Per request, "per class" code in HEAD. astor From mb at bese.it Mon Aug 15 15:53:55 2005 From: mb at bese.it (Marco Baringer) Date: Mon, 15 Aug 2005 17:53:55 +0200 Subject: [Bese-devel] How to use tal-templates In-Reply-To: <20050815153445.GF58357@pvv.ntnu.no> (astor@pvv.ntnu.no's message of "Mon, 15 Aug 2005 17:34:45 +0200") References: <87zmrl95r8.fsf@flarge.here> <42FF3ACD.6020602@web.de> <4e7bd29e05081407395c10d780@mail.gmail.com> <43005160.2070601@web.de> <20050815091319.GA58357@pvv.ntnu.no> <20050815115048.GD58357@pvv.ntnu.no> <20050815153445.GF58357@pvv.ntnu.no> Message-ID: astor at pvv.ntnu.no writes: > So to me it seems like a component might want to produce: > o Global code (external .js-file) > o Per request, "per class" code in HEAD. these two can be done with the same mechanism? if we had a method add-to-head-once-only: (defmethod add-to-head-once-only ((c my-component)) (<:script :src "foo.js") (<:meta ...) (<:link ...)) > o Per request, "per instance" code in HEAD. how does the name add-to-head sound? > o Per request, "per instance" code in BODY. as you said i'm fairly pleased with what we have now. -- -Marco Ring the bells that still can ring. Forget the perfect offering. There is a crack in everything. That's how the light gets in. -Leonard Cohen From Alan-Shields at omrf.ouhsc.edu Mon Aug 15 18:31:21 2005 From: Alan-Shields at omrf.ouhsc.edu (Alan Shields) Date: Mon, 15 Aug 2005 13:31:21 -0500 Subject: [Bese-devel] darcs patch: Add :fiveam to *features* In-Reply-To: References: Message-ID: <20050815183121.GA18785@inquisitor.omrf.org> On Fri, Aug 12, 2005 at 04:34:08PM +0200, Marco Baringer wrote: > Alan Shields writes: > > > Thu Aug 11 16:20:32 CDT 2005 Alan Shields > > * Add :fiveam to *features* > > I've found that I prefer to add testing code in my other code, but I dislike > > adding :fiveam to my package requirements list. > > i am hesitant to modify *features*, it's not really supposed to be > used for this (afaict). Several packages modify *features* (such as CL-PPCRE, and SPLIT-SEQUENCE) to include their package name. ASDF as well. While CLTL specifies that *features* contains tokens "provided by the implementation", CLHS specifies that the tokens "correspond to some aspect of the implementation or environment." This difference would seem to be deliberate. I am no common lisp expert, but it would seem to me that *features* exists to solve exactly the problem that we're facing here: conditional inclusion of code based on the environment in which the code is loaded. As you say yourself further in the thread: the #. solution leads to uglyness. Alan From smoof-ra at elder-gods.org Mon Aug 15 20:31:06 2005 From: smoof-ra at elder-gods.org (Larry D'Anna) Date: Mon, 15 Aug 2005 16:31:06 -0400 Subject: [Bese-devel] declarations Message-ID: <20050815203105.GA843@melkor.elder-gods.org> Here's another declarations patch. Now they have parent pointers and are parsed into useful classes. --larry -------------- next part -------------- New patches: [more usefull declaration objects smoof-ra at elder-gods.org**20050815202603] { hunk ./src/walk.lisp 141 -(defun split-body (body env &key (docstring t) (declare t)) +(defun split-body (body env &key parent (docstring t) (declare t)) hunk ./src/walk.lisp 143 - (decl nil) + (newdecls nil) hunk ./src/walk.lisp 155 - (multiple-value-setf (env decl) (parse-declaration dec env)) - (when decl - (push decl decls)))) + (multiple-value-setf (env newdecls) (parse-declaration dec env parent)) + (setf decls (append newdecls decls)))) hunk ./src/walk.lisp 180 -(defun parse-declaration (declaration environment) - (macrolet ((extend-env ((var list) &rest datum) - `(dolist (,var ,list) - (setf environment (register environment :declare , at datum))))) - (destructuring-bind (type &rest arguments) - declaration - (case type - (dynamic-extent - (extend-env (var arguments) - var `(dynamic-extent))) - (ftype - (extend-env (function-name (cdr arguments)) - function-name `(ftype ,(first arguments)))) - (ignorable - (extend-env (var arguments) - var `(ignorable))) - (ignore - (extend-env (var arguments) - var `(ignorable))) - (inline - (extend-env (function arguments) function `(ignorable))) - (notinline - (extend-env (function arguments) function `(notinline))) - (optimize - (extend-env (optimize-spec arguments) 'optimize optimize-spec)) - (special - (extend-env (var arguments) var `(special))) - (type - (extend-env (var (rest arguments)) var `(type ,(first arguments)))) - (t - (extend-env (var arguments) var `(type ,type)))))) - (values environment (make-instance 'declaration-form :source declaration))) +(defclass optimize-declaration-form (declaration-form) + ((optimize-spec :accessor optimize-spec :initarg :optimize-spec))) + +(defclass variable-declaration-form (declaration-form) + ((name :accessor name :initarg :name))) + +(defclass function-declaration-form (declaration-form) + ((name :accessor name :initarg :name))) + +(defclass dynamic-extent-declaration-form (variable-declaration-form) + ()) + +(defclass ignorable-declaration-form-mixin (declaration-form) + ()) + +(defclass variable-ignorable-declaration-form (variable-declaration-form ignorable-declaration-form-mixin) + ()) + +(defclass function-ignorable-declaration-form (function-declaration-form ignorable-declaration-form-mixin) + ()) + +(defclass special-declaration-form (variable-declaration-form) + ()) + +(defclass type-declaration-form (variable-declaration-form) + ((type-form :accessor type-form :initarg :type-form))) + +(defclass ftype-declaration-form (function-declaration-form) + ((type-form :accessor type-form :initarg :type-form))) + +(defclass notinline-declaration-form (function-declaration-form) + ()) + + +(defun parse-declaration (declaration environment parent) + (let ((declares nil)) + (flet ((funname (form) + (if (and (consp form) (eql (car form) 'function)) + (cadr form) + nil))) + (macrolet ((mkdecl (varname formclass &rest rest) + `(make-instance ,formclass :parent parent :source (list type ,varname) , at rest)) + (extend-env ((var list) newdeclare &rest datum) + `(dolist (,var ,list) + (when ,newdeclare (push ,newdeclare declares)) + (setf environment (register environment :declare , at datum))))) + (destructuring-bind (type &rest arguments) + declaration + (case type + (dynamic-extent + (extend-env (var arguments) + (mkdecl var 'variable-ignorable-declaration-form) + var `(dynamic-extent))) + (ftype + (extend-env (function-name (cdr arguments)) + (make-instance 'ftype-declaration-form + :parent parent + :source `(ftype ,(first arguments) function-name) + :name function-name + :type-form (first arguments)) + function-name `(ftype ,(first arguments)))) + ((ignore ignorable) + (extend-env (var arguments) + (aif (funname var) + (mkdecl var 'function-ignorable-declaration-form :name it) + (mkdecl var 'variable-ignorable-declaration-form :name var)) + var `(ignorable))) + (inline + (extend-env (function arguments) + (mkdecl function 'function-ignorable-declaration-form :name function) + function `(ignorable))) + (notinline + (extend-env (function arguments) + (mkdecl function 'notinline-declaration-form :name function) + function `(notinline))) + (optimize + (extend-env (optimize-spec arguments) + (mkdecl optimize-spec 'optimize-declaration-form :optimize-spec optimize-spec) + 'optimize optimize-spec)) + (special + (extend-env (var arguments) + (mkdecl var 'special-declaration-form :name var) + var `(special))) + (type + (extend-env (var (rest arguments)) + (make-instance 'type-declaration-form + :parent parent + :source `(type ,(first arguments) var) + :name var + :type-form (first arguments)) + var `(type ,(first arguments)))) + (t + (extend-env (var arguments) + (make-instance 'type-declaration-form + :parent parent + :source `(,type var) + :name var + :type-form type) + var `(type ,type))))))) + (when (null declares) + (setq declares (list (make-instance 'declaration-form :parent parent :source declaration)))) + (values environment declares))) hunk ./src/walk.lisp 285 - (split-body forms env :docstring docstring :declare declare) + (split-body forms env :parent parent :docstring docstring :declare declare) } Context: [Change the name of the walker handler for atom so that it doesn't used to walk forms whose car is CL:ATOM. Marco Baringer **20050812114613] [Added required specifier :primary to cc-standard method combination Marco Baringer **20050812114343 This prevents people from accidentaly using defmethod on a cc generic function. You must now either use defmethod/cc (which retains the same API as before), or pass the :primary method qualifier (and if you do we'll assume you know what you're doing). ] [Update the list of exported symbols Marco Baringer **20050812102709] [Two minor indentation fixups Marco Baringer **20050812102429] [Remove type declarations form join-string (ucw passes in strings which violate some of the type declarations) Marco Baringer **20050812102333] [JOIN-STRINGS was not returning the result :( Marco Baringer **20050812070730] [Added more tests for cc-standard method combination Marco Baringer **20050811152516] [Make the arguments to a continuation all option (the equivalent of evaluating (values)) Marco Baringer **20050811152449] [Added cc definintions of common standard functions whcih take functions as parameters (assoc and mapXYZ) Marco Baringer **20050811152400] [Added missing cleane-argument-list function and tests Marco Baringer **20050811130722] [Fix generic/method/function lambda list handling and manipulation in walker and cc-interpreter Marco Baringer **20050811130002] [Added support for &key, &allow-other-keys in lambda/cc (and therefore defun/cc and defmethod/cc) Marco Baringer **20050810140725] [keyword-function-argument-form is not a subclass of optional-argument-form, even though they are superficially similar Marco Baringer **20050810140659] [Move debugging code into DEFK where have access to the name of the continuation we're calling (as apposed to KLAMBDA) Marco Baringer **20050810121305] [Refactor cc-interpreter into a few smaller files in the call-cc directory Marco Baringer **20050810104819] [Refactor FOLD-STRING (Patch by: Janis Dzerins ) Marco Baringer **20050810103438] [the fdefinition/cc table must remeber, other than the def, whether it was a function or a method (since we treat those two differently) Marco Baringer **20050810101541] [Added :method-combination option to the expaniosn of the defgeneric/cc macro Marco Baringer **20050810101446] [Added *debug-evaluate/cc* and related functions Marco Baringer **20050810063228] [Use fedinition/cc, not fdefinition, for defun/cc Marco Baringer **20050810055126] [Typo in name of k-for-apply/cc/optional-argument-default-value continuation Marco Baringer **20050810055105] [Don't use GET so that we don't break package locks. Add now function fdefinition/cc Marco Baringer **20050810054327 Basically it's a bad idea to use #'get and #'(setf get) on standard symbols, however this is something we're going to want to do. We know have our own hash-table (*cc-functions*) which maps symbols to closure objects. ] [ method combination smoof-ra at elder-gods.org**20050810035825] [make closure/cc a funcallable instance (in sbcl) smoof-ra at elder-gods.org**20050809182900 funcalling a closure/cc will just call it with a toplevel continuation that way cc closures can be called totally transparently by non-cc code as long as the cc-closure doesn't call/cc. ] [Added copyright notice to cc-interpreter.lisp Marco Baringer **20050809151738] [Remove occurences of 'cps' in the api. We don't actually cps transforme anymore so this is misleading. Marco Baringer **20050809125933] [Remove 'cps' from test suite, replace it with 'call/cc' Marco Baringer **20050809104818] [Rename cps.lisp to cc-interpreter.lisp Marco Baringer **20050809104737] [Fix typo in fold-strings' docstring Marco Baringer **20050809083006] [Trivial change to the name of the gensym generated by DOLIST* Marco Baringer **20050809061102] [Fix lexical-variables and lexical-functions on clisp Marco Baringer **20050807223244] [Use FDEFINITION instead of SYMBOL-FUNCTION to get a function from a function name. Marco Baringer **20050807222932] [Make sure we only pass symbols to functions like GET and MACRO-FUNCTION Marco Baringer **20050807222905] [Implement lexical-functions for CLISP Marco Baringer **20050807204738] [Implement lexical-variables and lexical-functions for NIL environments Marco Baringer **20050807204711] [Remove arnesi.el from ssytem def Marco Baringer **20050807204654] [Fix evaluation of #'(foo bar) in cps interpreter Marco Baringer **20050806182653] [Delete arnesi.el. SLIME is perfectly able to figure out the indententation by itself. Marco Baringer **20050807075500] [aparently global variables can be found in sbcl lexical environments smoof-ra at elder-gods.org**20050804164859] [Implement environment-p and lexical-variables for CLISP Marco Baringer **20050804165821] [Make the lexenv stuff use generic-functions and methods Marco Baringer **20050804161857] [Fixup lexical-variables and lexical-functions for OpenMCL Marco Baringer **20050804152727 This patch causes lexical-variables to no longer return ignored variables and symbol-macrolets. We've also implemented lexical-functions (though we do some hackery to convert functions names to something "normal" (ie SETF::|FOO::BAR| ==> (SETF FOO::BAR)) ] [Typo in lexical-variables for sbcl (we were accessing lexenv-funs instead of lexenv-vars) Marco Baringer **20050804152051] [Change lexical-variables for sbcl so that it doesn't return ignored variables Marco Baringer **20050804150841] [Fix lexical-variables for cmucl to not return ignored variables Marco Baringer **20050804150256] [Typo in previous patch Marco Baringer **20050804150242] [Implement lexical-functions for cmucl Marco Baringer **20050804143350] [recognise flets from the lexical environment (on sbcl) smoof-ra at elder-gods.org**20050803222732] [Rewrite multiple-value-setf so that my simple mind can understand it. Marco Baringer **20050803104652] [Added cps evaluation of THE forms Marco Baringer **20050803092059] [minor comment fixup Marco Baringer **20050803085322] [Moved defclass progv-form to keep the walker classes defined in alphabetical order Marco Baringer **20050803085254] [Added walker class for THE forms Marco Baringer **20050803085210] [allow new special forms to be added to the walker by shadowing *walker-handlers* smoof-ra at elder-gods.org**20050802165355] [Minor spacing fixs to the previous patch Marco Baringer **20050802152421] [progv smoof-ra at elder-gods.org**20050802150342] [labels can have declarations inside the body smoof-ra at elder-gods.org**20050801193433] [declares needs to be copied in the labels handler just like the other lambda-function-form slots smoof-ra at elder-gods.org**20050801193107] [oops i forgot to actually make the declaration-form instances smoof-ra at elder-gods.org**20050801185641] [initial support for remembering declarations smoof-ra at elder-gods.org**20050801184329 this patch adds a mixin called implicit-progn-with-declare-mixin and uses it instead of implicit-progn-mixin in all the places that allow declares. It has slot which should contain a list of the declares at the top of the implicit-progn. This patch doesn't do anything clever with the declares, it just creates declaration-form objects and points their source slots at the original declares, however it would be easy to modify parse-declaration to generate more usefull declaration objects. ] [Call the property :FEATURES, not FEATURES Marco Baringer **20050729103229] [Rename asdf property version to features, add "cps-interpreter" Marco Baringer **20050728120238] [dont need to register allow-other-keys because its not a binding smoof-ra at elder-gods.org**20050727153603] [fixed type name mismatch for allow-other-keys-function-arguement-form smoof-ra at elder-gods.org**20050727152456] [defmethod arguments should be ignorable, not ignore (openmcl warns whenever you ignore a specialized argument) Marco Baringer **20050726090308] [Typo in extract-argument-names Marco Baringer **20050726090256] [Fix generation of defmethod froms from defmethod/cc; added tests Marco Baringer **20050726085226] [Fix handling of optional arguments in apply-cps-lambda Marco Baringer **20050726085155] [More tests Marco Baringer **20050723133158] [Fix a bug in the handling of the case when LOOKUP finds a value for a name but the value is NIL Marco Baringer **20050723133106] [Export the symbol KALL Marco Baringer **20050723133052] [Change the test for constant-form'ness in walk.lisp Marco Baringer **20050723113019] [Extend the walker to handle #'(setf foo) function names Marco Baringer **20050723104431] [Fix bug in the lambda generated for method forms Marco Baringer **20050720144450] [Added ignore declarations to defun/cc and defmethod/cc to make the compiler happy Marco Baringer **20050720110112] [Temporarily comment out the log tests Marco Baringer **20050720092312] [Rename (optional|keyword|rest)-argument-form classes to include the -form suffix Marco Baringer **20050720092124] [Allow defun/cc defined functions te be called outside of a with-call/cc Marco Baringer **20050720091826] [Added support for &optional arguments in cps closures Marco Baringer **20050720091658] [Added defgeneric/cc Marco Baringer **20050719153441] [Move the error checking code for lambda arguments into apply, not lambda (in cps interpreter) Marco Baringer **20050719153121] [More cps tests Marco Baringer **20050719152327] [Fix openmcl's definition of lexical-variables to deal with ccl::definition-environment Marco Baringer **20050719152230] [Added support to the cps interpreter forl communicating with lexical variables Marco Baringer **20050707094608] [walk.lisp depends on lexenv.lisp Marco Baringer **20050707093140] [added support for walking local varibales in the lexical environment Marco Baringer **20050707093027 this applies to all those variables defined the envorinment object grabbed via an &environment macro argument. ] [mistyped #+openmcl in lexenv.lisp Marco Baringer **20050707092959] [added src/lexenv.lisp to arnesi.asd Marco Baringer **20050707091127] [Rename src/environment.lisp Marco Baringer **20050707091114] [Initial version of environment.lisp Marco Baringer **20050707091019] [Minor docstring fixup for with-call/cc Marco Baringer **20050707090619] [Big patch including all the cps interpreter stuff upto now Marco Baringer **20050707083739] [Fix bug in handling of defclass-struct's :predicate option Marco Baringer **20050706105324] [Initial Import Marco Baringer **20050706101657 This import moves arnesi from arch to darcs. Nothing has actually changed since bese-2004 at common-lisp.net/arnesi--dev--1.4--patch-14 ] [added arch stuff to boring file Marco Baringer **20050706101630] [Setup boring file Marco Baringer **20050706100535] Patch bundle hash: 5f28ccaa2a4bdc7b3974b3e4ad0762bdf6f6e9b6 From mb at bese.it Tue Aug 16 05:43:06 2005 From: mb at bese.it (Marco Baringer) Date: Tue, 16 Aug 2005 07:43:06 +0200 Subject: [Bese-devel] darcs patch: Add :fiveam to *features* References: <20050815183121.GA18785@inquisitor.omrf.org> Message-ID: Alan Shields writes: > Several packages modify *features* (such as CL-PPCRE, and > SPLIT-SEQUENCE) to include their package name. ASDF as well. well, if split-sequence does it than why can't i? :) > While CLTL specifies that *features* contains tokens "provided by the > implementation", CLHS specifies that the tokens "correspond to some > aspect of the implementation or environment." This difference would seem > to be deliberate. > > I am no common lisp expert, but it would seem to me that *features* > exists to solve exactly the problem that we're facing here: conditional > inclusion of code based on the environment in which the code is loaded. the issue with using *features* is mainly one of compatability. people have often used on feature (like #+sbcl) to actually imply something else (for example #+sbcl-has-a-weird-internal-function-named-foo). this has lead to a push away from the use of *features*. > As you say yourself further in the thread: the #. solution leads to > uglyness. consider me convinced. i'm going to do this, but i'm going to put :5am, not :fiveam (that logic being that i've already used up that name for the package so no harm can come from using it for *features* as well). -- -Marco Ring the bells that still can ring. Forget the perfect offering. There is a crack in everything. That's how the light gets in. -Leonard Cohen From frido at q-software-solutions.de Tue Aug 16 07:34:01 2005 From: frido at q-software-solutions.de (Friedrich Dominicus) Date: Tue, 16 Aug 2005 09:34:01 +0200 Subject: [Bese-devel] Got in troubles again In-Reply-To: <87fytbgu5m.fsf@flarge.here> (Friedrich Dominicus's message of "Mon, 15 Aug 2005 16:19:01 +0200") References: <87pssfh5es.fsf@flarge.here> <87fytbgu5m.fsf@flarge.here> Message-ID: <8764u6qqs6.fsf@flarge.here> I though about it quite some time now what about a thing like the following. As I understand a integer-field just can have one value, the initarg name is unimporant then, because he value should end in lisp-value. Shouldn't it be possible to write something along this lines then? (defclass t1 () ((lisp-value :accessor lisp-value))) (defmethod shared-initialize :after ((obj t1) slot-names &rest initargs &key &allow-other-keys) (setf (lisp-value obj) (cadr initargs)) obj) (defvar *t1-obj* nil) (setf *t1-obj* (make-instance 't1 :num 10)) I guess one better check that initargs really consist of one element, but I hope I could state the "base idea". However, I'm sure I'm missing something even in this context and definitly in the UCW context. Regards Friedrich From mb at bese.it Tue Aug 16 08:52:07 2005 From: mb at bese.it (Marco Baringer) Date: Tue, 16 Aug 2005 10:52:07 +0200 Subject: [Bese-devel] Got in troubles again References: <87pssfh5es.fsf@flarge.here> <87fytbgu5m.fsf@flarge.here> <8764u6qqs6.fsf@flarge.here> Message-ID: Friedrich Dominicus writes: > I though about it quite some time now what about a thing like the > following. As I understand a integer-field just can have one value, > the initarg name is unimporant then, because he value should end in > lisp-value. Shouldn't it be possible to write something along this > lines then? > > (defclass t1 () > ((lisp-value :accessor lisp-value))) > > (defmethod shared-initialize :after ((obj t1) slot-names &rest > initargs &key &allow-other-keys) > (setf (lisp-value obj) (cadr initargs)) > obj) sorry, why do you use &rest + #'cadr instead of &key? > (defvar *t1-obj* nil) > (setf *t1-obj* (make-instance 't1 :num 10)) > > I guess one better check that initargs really consist of one element, > but I hope I could state the "base idea". the base idea is correct, but there are situations where the lisp-value and the client-value will be different (though this is admittedly rare for an integer field), for example select input fields may want an initial client-value of "---" to correspond to some default lisp value. > However, I'm sure I'm missing something even in this context and > definitly in the UCW context. no, i don't think so. i think it's just, as it currently stands, ugly. -- -Marco Ring the bells that still can ring. Forget the perfect offering. There is a crack in everything. That's how the light gets in. -Leonard Cohen From mb at bese.it Tue Aug 16 11:38:08 2005 From: mb at bese.it (Marco Baringer) Date: Tue, 16 Aug 2005 13:38:08 +0200 Subject: [Bese-devel] lookingup symbols in parenscript code Message-ID: question: seeing as how javascript doesn't have namespaces, why does parenscript? consider this code (assuming we've not imported the js package): (js:js* `(new (*abstract.*event-observer ,(lookup-js-id field)))) since NEW is not eql to JS:NEW that will get compiled into: "new(AbstractEventObserver('foobar'))" instead of what i wanted: "new AbstractEventObserver('foobar')" macros aside (since those are actually lisp functions) is there any point to this behavior? does this code make any sense: (js:js (defun ucw::foo () t) (defun cl-user::foo () nil)) currently it doesn't even work (both UCW::FOO and CL-USER::FOO are converted to "foo") but it could be made to work, if someone could convince me that it's worth it (i really don't think it is). -- -Marco Ring the bells that still can ring. Forget the perfect offering. There is a crack in everything. That's how the light gets in. -Leonard Cohen From mb at bese.it Tue Aug 16 11:41:55 2005 From: mb at bese.it (Marco Baringer) Date: Tue, 16 Aug 2005 13:41:55 +0200 Subject: [Bese-devel] lookingup symbols in parenscript code In-Reply-To: (Marco Baringer's message of "Tue, 16 Aug 2005 13:38:08 +0200") References: Message-ID: "Marco Baringer" writes: > question: seeing as how javascript doesn't have namespaces, why does > parenscript? consider this code (assuming we've not imported the js > package): sorry, that's makes no sense at all. what i meant to say was: question: seeing as how javascript doesn't have namespaces, why does parenscript consider symbols in different packages to be different? take for example this code (assuming we've not imported the js package): -- -Marco Ring the bells that still can ring. Forget the perfect offering. There is a crack in everything. That's how the light gets in. -Leonard Cohen From alexander.kjeldaas at gmail.com Tue Aug 16 13:11:20 2005 From: alexander.kjeldaas at gmail.com (Alexander Kjeldaas) Date: Tue, 16 Aug 2005 15:11:20 +0200 Subject: [Bese-devel] How to use tal-templates In-Reply-To: References: <87zmrl95r8.fsf@flarge.here> <4e7bd29e05081407395c10d780@mail.gmail.com> <43005160.2070601@web.de> <20050815091319.GA58357@pvv.ntnu.no> <20050815115048.GD58357@pvv.ntnu.no> <20050815153445.GF58357@pvv.ntnu.no> Message-ID: On 8/15/05, Marco Baringer wrote: > astor at pvv.ntnu.no writes: > > > So to me it seems like a component might want to produce: > > o Global code (external .js-file) > > o Per request, "per class" code in HEAD. > > these two can be done with the same mechanism? if we had a method > add-to-head-once-only: > > (defmethod add-to-head-once-only ((c my-component)) > (<:script :src "foo.js") > (<:meta ...) > (<:link ...)) > > > o Per request, "per instance" code in HEAD. > > how does the name add-to-head sound? > Good. astor From Alan-Shields at omrf.ouhsc.edu Tue Aug 16 18:45:23 2005 From: Alan-Shields at omrf.ouhsc.edu (Alan Shields) Date: Tue, 16 Aug 2005 13:45:23 -0500 Subject: [Bese-devel] darcs patch: Add :fiveam to *features* Message-ID: Tue Aug 16 13:44:54 CDT 2005 Alan Shields * Add :fiveam to *features* I've found that I prefer to add testing code in my other code, but I dislike adding :fiveam to my package requirements list. This allows users of fiveam to delineate testing code with #+fiveam() - whereupon it will be totally ignored by those who do not have fiveam. Happiness for all and love ensue. -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/x-darcs-patch Size: 1144 bytes Desc: A darcs patch for your repository! URL: From mb at bese.it Tue Aug 16 19:00:30 2005 From: mb at bese.it (Marco Baringer) Date: Tue, 16 Aug 2005 21:00:30 +0200 Subject: [Bese-devel] darcs patch: Add :fiveam to *features* In-Reply-To: (Alan Shields's message of "Tue, 16 Aug 2005 13:45:23 -0500") References: Message-ID: Alan Shields writes: > Tue Aug 16 13:44:54 CDT 2005 Alan Shields > * Add :fiveam to *features* > I've found that I prefer to add testing code in my other code, but I dislike > adding :fiveam to my package requirements list. > > This allows users of fiveam to delineate testing code with #+fiveam() - whereupon > it will be totally ignored by those who do not have fiveam. > > Happiness for all and love ensue. applied. thanks. -- -Marco Ring the bells that still can ring. Forget the perfect offering. There is a crack in everything. That's how the light gets in. -Leonard Cohen From tim at fractaldragon.net Tue Aug 16 19:14:19 2005 From: tim at fractaldragon.net (Tim Lavoie) Date: Tue, 16 Aug 2005 14:14:19 -0500 Subject: [Bese-devel] YACML needs join-strings-return-value Message-ID: <20050816191419.GA19136@fractaldragon.net> Hi all, I've just updated my local darcs repositories for YACML, arnesi and UCW, and am now running into the following problem. YACLML requires the join-strings-return-value feature of system :ARNESI. :ARNESI currently only provides ("v1.4.0" "v1.4.1" "cps-interpreter"). Try pull'ing the latest arnesi or send an email to bese-devel at common-lisp.net Am I just a little out of sync on these, or have I mangled something else? Thanks, Tim -- "Some people's idea of free speech is that they are free to say anything they like, but if anyone says anything back, that is an outrage." -- Winston Churchill From alex.mizrahi at gmail.com Tue Aug 16 17:21:05 2005 From: alex.mizrahi at gmail.com (Alex Mizrahi) Date: Tue, 16 Aug 2005 20:21:05 +0300 Subject: [Bese-devel] arnesi version mismatch? Message-ID: <007001c5a286$e430d4d0$0e3705c3@ALEXCOMP> hello i was going to try latest version of uncommon web, but it failed to load: YACLML requires the join-strings-return-value feature of system :ARNESI. :ARNESI currently only provides ("v1.4.0" "v1.4.1" "cps-interpreter"). Try pull'ing the latest arnesi or send an email to bese-devel at common-lisp.net with latest libs from darcs repository. are there some problems on my system or it's inconsistent state of repositories? with best regards, Alex 'killer_storm' Mizrahi. From bobstopper at bobturf.org Tue Aug 16 23:28:48 2005 From: bobstopper at bobturf.org (Robert Marlow) Date: Wed, 17 Aug 2005 07:28:48 +0800 Subject: [Bese-devel] arnesi version mismatch? In-Reply-To: <007001c5a286$e430d4d0$0e3705c3@ALEXCOMP> References: <007001c5a286$e430d4d0$0e3705c3@ALEXCOMP> Message-ID: <87k6iljwb3.wl%bobstopper@bobturf.org> I got this too. Try pulling from http://common-lisp.net/project/ucw/repos/ucw_dev/ and http://common-lisp.net/project/bese/repos/arnesi_dev/ instead. That's how I got around it. At Tue, 16 Aug 2005 20:21:05 +0300, Alex Mizrahi wrote: > > hello > > i was going to try latest version of uncommon web, but it failed to load: > > YACLML requires the join-strings-return-value feature of system :ARNESI. > :ARNESI currently only provides ("v1.4.0" "v1.4.1" "cps-interpreter"). > Try pull'ing the latest arnesi or send an email to > bese-devel at common-lisp.net > > with latest libs from darcs repository. > are there some problems on my system or it's inconsistent state of > repositories? > > with best regards, Alex 'killer_storm' Mizrahi. > > _______________________________________________ > bese-devel mailing list > bese-devel at common-lisp.net > http://common-lisp.net/cgi-bin/mailman/listinfo/bese-devel > From mb at bese.it Wed Aug 17 05:24:45 2005 From: mb at bese.it (Marco Baringer) Date: Wed, 17 Aug 2005 07:24:45 +0200 Subject: [Bese-devel] YACML needs join-strings-return-value In-Reply-To: <20050816191419.GA19136@fractaldragon.net> (Tim Lavoie's message of "Tue, 16 Aug 2005 14:14:19 -0500") References: <20050816191419.GA19136@fractaldragon.net> Message-ID: Tim Lavoie writes: > Hi all, > > I've just updated my local darcs repositories for YACML, arnesi and > UCW, and am now running into the following problem. > > YACLML requires the join-strings-return-value feature of system :ARNESI. > :ARNESI currently only provides ("v1.4.0" "v1.4.1" "cps-interpreter"). > Try pull'ing the latest arnesi or send an email to bese-devel at common-lisp.net i think you're just pulling from arnesi and not arnesi_dev. i plan on moving the _dev branches (which work) over to the stable branches (which are broken) Real Soon Now(TM). in the mean time make sure you're pulling from: http://common-lisp.net/project/ucw/repos/ucw_dev/ http://common-lisp.net/project/bese/repos/arnesi_dev/ http://common-lisp.net/project/bese/repos/yaclml/ -- -Marco Ring the bells that still can ring. Forget the perfect offering. There is a crack in everything. That's how the light gets in. -Leonard Cohen From bobstopper at bobturf.org Wed Aug 17 05:44:39 2005 From: bobstopper at bobturf.org (bobstopper at bobturf.org) Date: Wed, 17 Aug 2005 13:44:39 +0800 Subject: [Bese-devel] darcs patch: removall of *s from tal-environment Message-ID: <20050817054439.50C31CB9ED@spengler.bobturf.org> Wed Aug 17 13:43:29 WST 2005 bobstopper at bobturf.org * removall of *s from tal-environment -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/x-darcs-patch Size: 2088 bytes Desc: A darcs patch for your repository! URL: From mb at bese.it Wed Aug 17 10:37:45 2005 From: mb at bese.it (Marco Baringer) Date: Wed, 17 Aug 2005 12:37:45 +0200 Subject: [Bese-devel] ucw coolness story Message-ID: hi, i'm sure you all know this already, but it really made me smile: i'm currently working on an app for managing the patients in a hospital. one of the (many, many, many) things it needs to do is generate statistics, one of those statistics requires that you chose a private clinic from a list or type the name into a text box. i initially had these two actions: (defaction dati-fatturazione ((c component) (istituto-name string)) (dati-fatturazione c (find-istituto istituto-name))) (defaction dati-fatturazione ((c component) (istituto istituto)) ...) (sorry for the weird mix of english and italian. 'istituto' is what the app calls the private clinics and dati-fatturazione basically means billing info.) one of the things that kept coming up was that, when using the 'type the name' form people would misspell the name of the clinic, which would trigger an error page since find-istituto returned NIL. so i changed the first method to this: (defaction dati-fatturazione ((c component) (istituto-name string)) (aif (find-istituto istituto-name) (dati-fatturazione c it) (call 'info-message :message "No clinic with that name."))) then we decided i'd be nice if the app tried to guess what clinic they wanted, so the action became: (defaction dati-fatturazione ((c component) (istituto-name string)) (aif (find-istituto istituto-name) (dati-fatturazione c it) (aif (possible-istituto istituto-name) (dati-fatturazione c it) (call 'info-message :message "No clinic with that name.")))) then we decided that, since some ambiguity can result, it'd be nice to show them the list of possible clinics and let them chose: (defaction dati-fatturazione ((c component) (istituto-name string)) (aif (find-istituto istituto-name) (dati-fatturazione c it) (let ((possibilities (possible-istituti istituto-name))) (case (length possibilities) (0 (call 'info-message :message "Nessun istituto con quel nome.")) (1 (dati-fatturazione c (first possibilities))) (t (dati-fatturazione c (call 'option-dialog :message (format nil "Nessun istituto col nome ~S" istituto-name) :options (mapcar (lambda (istituto) (cons istituto (format nil "Dati per l'istituto ~A." (nome istituto)))) possibilities)))))))) notice that in the n possibilities case we still call dati-fatturazione but we get the istituto from an option-dialog component. anyway, my point: sure i could have done that in any web framework but i don't think i would have if it hadn't been so easy. some things need to be _easy_, and not just possible, in order to take advantage of them. p.s. - among other things i've been doing some java work and trust me, nothing hurts as much as xml configuration files and edit-wait-compile-wait-debug-wait when you've tasted lisp and ucw (and slime). p.p.s. - yes, i'm bragging about something i wrote. sue me. -- -Marco Ring the bells that still can ring. Forget the perfect offering. There is a crack in everything. That's how the light gets in. -Leonard Cohen From der_julian at web.de Wed Aug 17 12:56:28 2005 From: der_julian at web.de (Julian Stecklina) Date: Wed, 17 Aug 2005 14:56:28 +0200 Subject: [Bese-devel] ucw coolness story In-Reply-To: References: Message-ID: <20050817145628.069eb7ff@localhost> On Wed, 17 Aug 2005 12:37:45 +0200 "Marco Baringer" wrote: > p.p.s. - yes, i'm bragging about something i wrote. sue me. But you surely have a point. :) Regards, -- Julian Stecklina (Of course SML does have its weaknesses, but by comparison, a discussion of C++'s strengths and flaws always sounds like an argument about whether one should face north or east when one is sacrificing one's goat to the rain god.) -- Thant Tessman From pjb at informatimago.com Fri Aug 19 01:47:58 2005 From: pjb at informatimago.com (Pascal Bourguignon) Date: Fri, 19 Aug 2005 03:47:58 +0200 (CEST) Subject: [Bese-devel] enctype multipart/form-data hangs Message-ID: <20050819014758.E26FB10FBF3@thalassa.informatimago.com> Hello, When I specify: (. 1. Trace: (IT.BESE.UCW::READ-REQUEST '# '#) 2005-08-04T02:56.19 +DRIBBLE+ UCW-LOGGER: Reading request from # 2005-08-04T02:56.19 +DRIBBLE+ UCW-LOGGER: "content-length"="689" 2005-08-04T02:56.19 +DRIBBLE+ UCW-LOGGER: "content-type"="multipart/form-data; boundary=---------------------------90641591112385285421222996919" 2005-08-04T02:56.19 +DRIBBLE+ UCW-LOGGER: "remote-ip-addr"="62.93.174.79" 2005-08-04T02:56.19 +DRIBBLE+ UCW-LOGGER: "remote-ip-port"="49423" 2005-08-04T02:56.19 +DRIBBLE+ UCW-LOGGER: "script-filename"="/local/html/local/app" 2005-08-04T02:56.19 +DRIBBLE+ UCW-LOGGER: "server-ip-addr"="62.93.174.79" 2005-08-04T02:56.19 +DRIBBLE+ UCW-LOGGER: "server-ip-port"="80" 2005-08-04T02:56.19 +DRIBBLE+ UCW-LOGGER: "server-protocol"="HTTP/1.1" 2005-08-04T02:56.19 +DRIBBLE+ UCW-LOGGER: "method"="POST" 2005-08-04T02:56.19 +DRIBBLE+ UCW-LOGGER: "url"="/app/bellerophon/" 2005-08-04T02:56.19 +DRIBBLE+ UCW-LOGGER: "server-id"="bellerophon" 2005-08-04T02:56.19 +DRIBBLE+ UCW-LOGGER: "server-baseversion"="Apache/1.3.27" 2005-08-04T02:56.19 +DRIBBLE+ UCW-LOGGER: "modlisp-version"="2.42" 2005-08-04T02:56.19 +DRIBBLE+ UCW-LOGGER: "Accept"="text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5" 2005-08-04T02:56.19 +DRIBBLE+ UCW-LOGGER: "Accept-Charset"="ISO-8859-1,utf-8;q=0.7,*;q=0.7" 2005-08-04T02:56.19 +DRIBBLE+ UCW-LOGGER: "Accept-Encoding"="gzip,deflate" 2005-08-04T02:56.19 +DRIBBLE+ UCW-LOGGER: "Accept-Language"="en-us,en;q=0.9,fr;q=0.7,es;q=0.6,pt;q=0.4,ca;q=0.3,de;q=0.1" 2005-08-04T02:56.19 +DRIBBLE+ UCW-LOGGER: "Connection"="keep-alive" 2005-08-04T02:56.19 +DRIBBLE+ UCW-LOGGER: "Content-Length"="689" 2005-08-04T02:56.19 +DRIBBLE+ UCW-LOGGER: "Content-Type"="multipart/form-data; boundary=---------------------------90641591112385285421222996919" 2005-08-04T02:56.19 +DRIBBLE+ UCW-LOGGER: "Cookie"="ucw-session-id=chsuiNZkEyjfeyOyOTZexwfMEwvrlLCJBaFpldek" 2005-08-04T02:56.19 +DRIBBLE+ UCW-LOGGER: "Host"="thalassa.informatimago.com" 2005-08-04T02:56.19 +DRIBBLE+ UCW-LOGGER: "Keep-Alive"="300" 2005-08-04T02:56.19 +DRIBBLE+ UCW-LOGGER: "Referer"="http://thalassa.informatimago.com/app/bellerophon/" 2005-08-04T02:56.19 +DRIBBLE+ UCW-LOGGER: "User-Agent"="Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040713" ;; hangs here. C-c C-c But when I remove :enctype: ( '#) 2005-08-04T03:25.54 +DRIBBLE+ UCW-LOGGER: Reading request from # 2005-08-04T03:25.54 +DRIBBLE+ UCW-LOGGER: "content-length"="78" 2005-08-04T03:25.54 +DRIBBLE+ UCW-LOGGER: "content-type"="application/x-www-form-urlencoded" 2005-08-04T03:25.54 +DRIBBLE+ UCW-LOGGER: "remote-ip-addr"="192.168.0.64" 2005-08-04T03:25.54 +DRIBBLE+ UCW-LOGGER: "remote-ip-port"="49550" 2005-08-04T03:25.54 +DRIBBLE+ UCW-LOGGER: "script-filename"="/local/html/local/app" 2005-08-04T03:25.54 +DRIBBLE+ UCW-LOGGER: "server-ip-addr"="62.93.174.79" 2005-08-04T03:25.54 +DRIBBLE+ UCW-LOGGER: "server-ip-port"="80" 2005-08-04T03:25.54 +DRIBBLE+ UCW-LOGGER: "server-protocol"="HTTP/1.1" 2005-08-04T03:25.54 +DRIBBLE+ UCW-LOGGER: "method"="POST" 2005-08-04T03:25.54 +DRIBBLE+ UCW-LOGGER: "url"="/app/bellerophon/" 2005-08-04T03:25.54 +DRIBBLE+ UCW-LOGGER: "server-id"="bellerophon" 2005-08-04T03:25.54 +DRIBBLE+ UCW-LOGGER: "server-baseversion"="Apache/1.3.27" 2005-08-04T03:25.54 +DRIBBLE+ UCW-LOGGER: "modlisp-version"="2.42" 2005-08-04T03:25.54 +DRIBBLE+ UCW-LOGGER: "Accept"="*/*" 2005-08-04T03:25.54 +DRIBBLE+ UCW-LOGGER: "Accept-Encoding"="gzip, deflate" 2005-08-04T03:25.54 +DRIBBLE+ UCW-LOGGER: "Accept-Language"="en" 2005-08-04T03:25.54 +DRIBBLE+ UCW-LOGGER: "Connection"="close" 2005-08-04T03:25.54 +DRIBBLE+ UCW-LOGGER: "Content-Length"="78" 2005-08-04T03:25.54 +DRIBBLE+ UCW-LOGGER: "Content-Type"="application/x-www-form-urlencoded" 2005-08-04T03:25.54 +DRIBBLE+ UCW-LOGGER: "Cookie"="ucw-session-id=wKpectxuxvEFJVNNeKKbqhNzBIceMmbVhXLwAcck" 2005-08-04T03:25.54 +DRIBBLE+ UCW-LOGGER: "Host"="thalassa.informatimago.com" 2005-08-04T03:25.54 +DRIBBLE+ UCW-LOGGER: "Referer"="http://thalassa.informatimago.com/app/bellerophon/" 2005-08-04T03:25.54 +DRIBBLE+ UCW-LOGGER: "User-Agent"="Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en) AppleWebKit/312.1.1 (KHTML, like Gecko) Safari/312" 2005-08-04T03:25.54 +DRIBBLE+ UCW-LOGGER: Body: s=wKpectxuxvEFJVNNeKKbqhNzBIceMmbVhXLwAcck&f=YqmRmtUMXbqakxkoYYbM&a=rVJKgVJpjM 1. Trace: IT.BESE.UCW::READ-REQUEST ==> # 2005-08-04T03:25.54 +INFO+ UCW-LOGGER: Serving action UCW::SWITCH-COMPONENT in session "wKpectxuxvEFJVNNeKKbqhNzBIceMmbVhXLwAcck". #### # 2005-08-04T03:25.54 +DRIBBLE+ UCW-LOGGER: Sending mod-lisp response. 2005-08-04T03:25.54 +DRIBBLE+ UCW-LOGGER: Sending ---- 2005-08-04T03:25.54 +DRIBBLE+ UCW-LOGGER:
Utilisateur BELLEROPHON I hoped to be able to use "multipart/form-data" to get better utf-8 encoding support... -- __Pascal Bourguignon__ http://www.informatimago.com/ The world will now reboot. don't bother saving your artefacts. From mb at bese.it Fri Aug 19 11:09:45 2005 From: mb at bese.it (Marco Baringer) Date: Fri, 19 Aug 2005 13:09:45 +0200 Subject: [Bese-devel] enctype multipart/form-data hangs References: <20050819014758.E26FB10FBF3@thalassa.informatimago.com> Message-ID: Pascal Bourguignon writes: > I hoped to be able to use "multipart/form-data" to get better utf-8 > encoding support... i do not believe this a utf-8 issue. i took the form example and switched it over to multipart/form-data, while i don't get the hanging problems you have all of the form data is getting lost somewhere down in rfc2388 :( -- -Marco Ring the bells that still can ring. Forget the perfect offering. There is a crack in everything. That's how the light gets in. -Leonard Cohen From jdz at dir.lv Fri Aug 19 11:36:04 2005 From: jdz at dir.lv (Janis Dzerins) Date: Fri, 19 Aug 2005 14:36:04 +0300 Subject: [Bese-devel] enctype multipart/form-data hangs In-Reply-To: References: <20050819014758.E26FB10FBF3@thalassa.informatimago.com> Message-ID: <4305C424.3030109@dir.lv> Marco Baringer wrote: > Pascal Bourguignon writes: > > >>I hoped to be able to use "multipart/form-data" to get better utf-8 >>encoding support... > > > i do not believe this a utf-8 issue. i took the form example and > switched it over to multipart/form-data, while i don't get the hanging > problems you have all of the form data is getting lost somewhere down > in rfc2388 :( > First, be sure to update to the latest release of rfc2388. If it the problem persists, I'd be glad to test / correct it -- I would need a test case (self-contained preferrably) that would exhibit this problem. -- Janis Dzerins From rusabd at gmail.com Fri Aug 19 07:56:06 2005 From: rusabd at gmail.com (Ruslan Abdulkhalikov) Date: Fri, 19 Aug 2005 13:56:06 +0600 Subject: [Bese-devel] port #1 Message-ID: <2f11360405081900562e9c0195@mail.gmail.com> Hello ladies and gentlemen. I've been using UCW for few weeks and found that patches are applied on _dev repository frequently... So, could you suggest me some CL implementation which is checked first after OpenMCL? CMUCL SBCL, CLISP, Allegro? Actually SBCL works almost fine for my very simple examples but I failed to make work UCW against CLISP on Windows... Thanks. Best Regards, Ruslan From frido at q-software-solutions.de Sat Aug 20 07:08:51 2005 From: frido at q-software-solutions.de (Friedrich Dominicus) Date: Sat, 20 Aug 2005 09:08:51 +0200 Subject: [Bese-devel] another question about the ucw way Message-ID: <87y86xrsos.fsf@flarge.here> Ok, I'm back again ;-(, let me introduce a simple example assume you'd ahve the class (defclass foo () ((num-1 ...) (num-2 ...) ... some other slots)) Now you like to present it so you write a render-on method. (defmethod render-on ((res response) (foo foo)) .... all you need to render that class. Now you want to be able to edit the slots of the class foo. So you'd need another render-on method but you still have the first one, so what are you supposed to do? it may be that my understanding of ucw is so sparse (despite the fact that I spend now at least 3 weeks on it), that I can't see the obvious but for me there is no way to write different render-on methods for one class. On the other hand even if there would I see that lot of code would have to be duplicated, but the difference is just: one time you like to have an editable view and the other time you just want a "read-only" view. The clumsy workaround I think I have to take is declare diverse classes (defclass foo () .... (defclass editable-foo().... and the like. However I would need to copy the slots over to the new class just for the filling the slots and write another method. So I had to write nearly identical classes over and over again and copy values from one class to another. This can't be the "right" solution. A solution might be adding another parameter to the render-on method which is named view. Of course one would have to write specialiced methods for the different views but one would not have to invent things like editable-foo. The render-on method would then look like (defgeneric render-on (response class view)) (defmethod render-on ((res response) (foo foo) (editable-view editable-view)) What is your opinion about that? Have I missed the obvious ucw way? Regards Friedrich From whalliburton at gmail.com Thu Aug 18 02:47:33 2005 From: whalliburton at gmail.com (William Halliburton) Date: Wed, 17 Aug 2005 21:47:33 -0500 Subject: [Bese-devel] Sbcl disassembly pretty printer Message-ID: <4e7bd29e05081719475eb0d370@mail.gmail.com> Hello. You wanted a copy of the sbcl disassembly pretty printer. I have attached the files. The disassembler will stay permanently at http://licentiae.com/diss.ucw from now out. I hope to put annotation based on pattern matching. I used displaced arrays all over the place in order to not copy the text data, is this practice ok or do you know of possible problems? Do you know of a more succinct way to map-over-lines? Will -------------- next part -------------- A non-text attachment was scrubbed... Name: disassemble-component.lisp Type: application/octet-stream Size: 7082 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: nasm_doc.lisp Type: application/octet-stream Size: 25309 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: diss.css Type: text/css Size: 874 bytes Desc: not available URL: From mb at bese.it Sat Aug 20 10:47:40 2005 From: mb at bese.it (Marco Baringer) Date: Sat, 20 Aug 2005 12:47:40 +0200 Subject: [Bese-devel] another question about the ucw way In-Reply-To: <87y86xrsos.fsf@flarge.here> (Friedrich Dominicus's message of "Sat, 20 Aug 2005 09:08:51 +0200") References: <87y86xrsos.fsf@flarge.here> Message-ID: Friedrich Dominicus writes: > Now you want to be able to edit the slots of the class foo. So you'd > need another render-on method but you still have the first one, so > what are you supposed to do? ucw does not, directly, deal with this issue. the only thing we have so far are the presentations (which works but i don't particularly like even though i've been used them to develop some very complex apps) and drew's lisp-on-lines (darcs get http://tech.coop/darcs/lisp-on-lines). if you do come up with something you like i'd love to hear about it. -- -Marco Ring the bells that still can ring. Forget the perfect offering. There is a crack in everything. That's how the light gets in. -Leonard Cohen From frido at q-software-solutions.de Sat Aug 20 10:58:19 2005 From: frido at q-software-solutions.de (Friedrich Dominicus) Date: Sat, 20 Aug 2005 12:58:19 +0200 Subject: [Bese-devel] renamed parenscript? Message-ID: <87wtmgj2no.fsf@flarge.here> Well if you check out the latest ucw_dev stuff you'll find a parenscript in the modules to have, it seem this has to be renamed to klammerscript. Regards Friedrich From mb at bese.it Sat Aug 20 11:02:57 2005 From: mb at bese.it (Marco Baringer) Date: Sat, 20 Aug 2005 13:02:57 +0200 Subject: [Bese-devel] port #1 In-Reply-To: <2f11360405081900562e9c0195@mail.gmail.com> (Ruslan Abdulkhalikov's message of "Fri, 19 Aug 2005 13:56:06 +0600") References: <2f11360405081900562e9c0195@mail.gmail.com> Message-ID: Ruslan Abdulkhalikov writes: > Hello ladies and gentlemen. > > I've been using UCW for few weeks and found that patches are applied > on _dev repository frequently... So, could you suggest me some CL > implementation which is checked first after OpenMCL? CMUCL SBCL, > CLISP, Allegro? Actually SBCL works almost fine for my very simple > examples but I failed to make work UCW against CLISP on Windows... quite a few people use _dev with sbcl. i generally test on sbcl then cmucl then clisp, though lately i've been testing on openmcl and clisp only. i do not have easy access to a windows machine, what issues are you running into? -- -Marco Ring the bells that still can ring. Forget the perfect offering. There is a crack in everything. That's how the light gets in. -Leonard Cohen From frido at q-software-solutions.de Sat Aug 20 11:37:14 2005 From: frido at q-software-solutions.de (Friedrich Dominicus) Date: Sat, 20 Aug 2005 13:37:14 +0200 Subject: [Bese-devel] small patch to ucw-tags Message-ID: <87pss8j0ut.fsf@flarge.here> I found the following typo in the mentioned fiel here's a patch. Regards Friedrich --- ucw-tags.lisp.old 2005-08-20 13:35:15.000000000 +0200 +++ ucw-tags.lisp 2005-08-20 13:33:17.000000000 +0200 @@ -231,7 +231,7 @@ (deftag-macro " ~%))) ;; Copyright (c) 2003-2005 Edward Marco Baringer From frido at q-software-solutions.de Sat Aug 20 12:14:57 2005 From: frido at q-software-solutions.de (Friedrich Dominicus) Date: Sat, 20 Aug 2005 14:14:57 +0200 Subject: [Bese-devel] another patch Message-ID: <87ll2wiz3y.fsf@flarge.here> for error.lisp Regards Friedrich --- error.lisp.2005-08-20 2005-08-20 13:58:00.000000000 +0200 +++ error.lisp 2005-08-20 13:58:07.000000000 +0200 @@ -52,7 +52,7 @@ for index upfrom 0 for div-id = (concatenate 'string "frame-" (princ-to-string index) "-details") do (<:div - (<:p (<:button :onclick (js:js-inline* `(toggle-display ,div-id)) "[ + ]") + (<:p (<:button :onclick (js:js-inline `(toggle-display ,div-id)) "[ + ]") " " (<:as-html (let ((desc (backtrace-frame-description frame)) From mb at bese.it Sat Aug 20 12:45:40 2005 From: mb at bese.it (Marco Baringer) Date: Sat, 20 Aug 2005 14:45:40 +0200 Subject: [Bese-devel] small patch to ucw-tags In-Reply-To: <87pss8j0ut.fsf@flarge.here> (Friedrich Dominicus's message of "Sat, 20 Aug 2005 13:37:14 +0200") References: <87pss8j0ut.fsf@flarge.here> Message-ID: Friedrich Dominicus writes: > --- ucw-tags.lisp.old 2005-08-20 13:35:15.000000000 +0200 > +++ ucw-tags.lisp 2005-08-20 13:33:17.000000000 +0200 > @@ -231,7 +231,7 @@ > (deftag-macro `(<:script :type "text/javascript" > (<:as-is ~% "// - (js:js* , at body) > + (js:js , at body) > ~% "// ]]>" ~%))) this isn't a feature, not a bug :) if you use js:js there's no way to inject data into the generated javascript like this: (with-unique-js-name (my-func) ( (Marco Baringer's message of "Sat, 20 Aug 2005 14:45:40 +0200") References: <87pss8j0ut.fsf@flarge.here> Message-ID: "Marco Baringer" writes: > this isn't a feature, not a bug :) this _is_ a feature, not a bug :) -- -Marco Ring the bells that still can ring. Forget the perfect offering. There is a crack in everything. That's how the light gets in. -Leonard Cohen From mb at bese.it Sat Aug 20 12:48:15 2005 From: mb at bese.it (Marco Baringer) Date: Sat, 20 Aug 2005 14:48:15 +0200 Subject: [Bese-devel] renamed parenscript? In-Reply-To: <87wtmgj2no.fsf@flarge.here> (Friedrich Dominicus's message of "Sat, 20 Aug 2005 12:58:19 +0200") References: <87wtmgj2no.fsf@flarge.here> Message-ID: Friedrich Dominicus writes: > Well if you check out the latest ucw_dev stuff you'll find a > parenscript in the modules to have, it seem this has to be renamed to > klammerscript. sorry, i don't understand. -- -Marco Ring the bells that still can ring. Forget the perfect offering. There is a crack in everything. That's how the light gets in. -Leonard Cohen From der_julian at web.de Sat Aug 20 13:43:00 2005 From: der_julian at web.de (Julian Stecklina) Date: Sat, 20 Aug 2005 15:43:00 +0200 Subject: [Bese-devel] Sbcl disassembly pretty printer In-Reply-To: <4e7bd29e05081719475eb0d370@mail.gmail.com> References: <4e7bd29e05081719475eb0d370@mail.gmail.com> Message-ID: <20050820154300.10bf21ec@localhost> On Wed, 17 Aug 2005 21:47:33 -0500 William Halliburton wrote: > The disassembler will stay permanently at > http://licentiae.com/diss.ucw from now out. I hope to put annotation > based on pattern matching. Bad Gateway The proxy server received an invalid response from an upstream server. ?? Regards, -- Julian Stecklina (Of course SML does have its weaknesses, but by comparison, a discussion of C++'s strengths and flaws always sounds like an argument about whether one should face north or east when one is sacrificing one's goat to the rain god.) -- Thant Tessman From frido at q-software-solutions.de Sat Aug 20 14:39:27 2005 From: frido at q-software-solutions.de (Friedrich Dominicus) Date: Sat, 20 Aug 2005 16:39:27 +0200 Subject: [Bese-devel] renamed parenscript? In-Reply-To: (Marco Baringer's message of "Sat, 20 Aug 2005 14:48:15 +0200") References: <87wtmgj2no.fsf@flarge.here> Message-ID: <87hddkisf4.fsf@flarge.here> sorry for beeing unclear the ucw.asd files says: :depends-on (:arnesi :yaclml :swank :iterate :rfc2388 :klammerscript)) (in fact it says :parenscript at the end but after install parenscript via asdf-install you read in the asd file (defpackage :klammerscript.system (:use :cl :asdf)) (in-package :klammerscript.system) (defsystem :klammerscript ... so the name seems to be klammerscript, at least with the changes in ucw I got this compiled. Regards Friedrich From frido at q-software-solutions.de Sat Aug 20 14:45:15 2005 From: frido at q-software-solutions.de (Friedrich Dominicus) Date: Sat, 20 Aug 2005 16:45:15 +0200 Subject: [Bese-devel] small patch to ucw-tags In-Reply-To: (Marco Baringer's message of "Sat, 20 Aug 2005 14:45:40 +0200") References: <87pss8j0ut.fsf@flarge.here> Message-ID: <87d5o8is5g.fsf@flarge.here> "Marco Baringer" writes: > (<:input :on-change (js:js-inline* `(,my-func this.value)))) > > though maybe it would be better to follow the js naming convention and > have (Friedrich Dominicus's message of "Sat, 20 Aug 2005 16:45:15 +0200") References: <87pss8j0ut.fsf@flarge.here> <87d5o8is5g.fsf@flarge.here> Message-ID: Friedrich Dominicus writes: > "Marco Baringer" writes: > >> (<:input :on-change (js:js-inline* `(,my-func this.value)))) > > >> though maybe it would be better to follow the js naming convention and >> have > could you please tell me where it is defined then? i believe you're using manuel's 0.1.0 release. you'll need to use my branch: darcs get http://common-lisp.net/project/ucw/repos/parenscript/ this contains the rename from klammerscript to parenscript, the js* macros, and a few other minor changes. -- -Marco Ring the bells that still can ring. Forget the perfect offering. There is a crack in everything. That's how the light gets in. -Leonard Cohen From frido at q-software-solutions.de Sat Aug 20 17:02:18 2005 From: frido at q-software-solutions.de (Friedrich Dominicus) Date: Sat, 20 Aug 2005 19:02:18 +0200 Subject: [Bese-devel] small patch to ucw-tags In-Reply-To: (Marco Baringer's message of "Sat, 20 Aug 2005 17:22:44 +0200") References: <87pss8j0ut.fsf@flarge.here> <87d5o8is5g.fsf@flarge.here> Message-ID: <873bp4ilt1.fsf@flarge.here> "Marco Baringer" writes: > > darcs get http://common-lisp.net/project/ucw/repos/parenscript/ > > this contains the rename from klammerscript to parenscript, the js* > macros, and a few other minor changes. You're right about that, but how should I know? Regards Friedrich From mb at bese.it Sat Aug 20 17:10:21 2005 From: mb at bese.it (Marco Baringer) Date: Sat, 20 Aug 2005 19:10:21 +0200 Subject: [Bese-devel] small patch to ucw-tags In-Reply-To: <873bp4ilt1.fsf@flarge.here> (Friedrich Dominicus's message of "Sat, 20 Aug 2005 19:02:18 +0200") References: <87pss8j0ut.fsf@flarge.here> <87d5o8is5g.fsf@flarge.here> <873bp4ilt1.fsf@flarge.here> Message-ID: Friedrich Dominicus writes: > "Marco Baringer" writes: > >> >> darcs get http://common-lisp.net/project/ucw/repos/parenscript/ >> >> this contains the rename from klammerscript to parenscript, the js* >> macros, and a few other minor changes. > You're right about that, but how should I know? i sent an email to the list: http://common-lisp.net/pipermail/bese-devel/2005-August/000789.html and i added a note to the README. Since manuel has given me his 'do what with it' approval i will update the cliki page as well to point to this new (and maintained) version. -- -Marco Ring the bells that still can ring. Forget the perfect offering. There is a crack in everything. That's how the light gets in. -Leonard Cohen From frido at q-software-solutions.de Sat Aug 20 17:17:37 2005 From: frido at q-software-solutions.de (Friedrich Dominicus) Date: Sat, 20 Aug 2005 19:17:37 +0200 Subject: [Bese-devel] small patch to ucw-tags In-Reply-To: (Marco Baringer's message of "Sat, 20 Aug 2005 19:10:21 +0200") References: <87pss8j0ut.fsf@flarge.here> <87d5o8is5g.fsf@flarge.here> <873bp4ilt1.fsf@flarge.here> Message-ID: <87vf20h6j2.fsf@flarge.here> Ok, I did not have seen that mail. Me bad. Will try to make it better in the future. Regards Friedrich From whalliburton at gmail.com Sat Aug 20 20:46:48 2005 From: whalliburton at gmail.com (William Halliburton) Date: Sat, 20 Aug 2005 15:46:48 -0500 Subject: [Bese-devel] Sbcl disassembly pretty printer In-Reply-To: <20050820154300.10bf21ec@localhost> References: <4e7bd29e05081719475eb0d370@mail.gmail.com> <20050820154300.10bf21ec@localhost> Message-ID: <4e7bd29e05082013464feb274@mail.gmail.com> Server was rebooted by provider for Xen upgrade. Sorry. Have not made sbcl start on boot. Should be up now. Will add it to boot sequence. Are there any tricks to adding sbcl/ucw to linux boot sequence? Just an open ended question, as I do not think I will have problems. I have added regular expressions for the instructions. (see blue comment line at wch.web::foo). If anyone has any similar hacks/knowledge, please send them my way. Will On 8/20/05, Julian Stecklina wrote: > On Wed, 17 Aug 2005 21:47:33 -0500 > William Halliburton wrote: > > > The disassembler will stay permanently at > > http://licentiae.com/diss.ucw from now out. I hope to put annotation > > based on pattern matching. > > Bad Gateway > > The proxy server received an invalid response from an upstream server. > > ?? > > Regards, > -- > Julian Stecklina > > (Of course SML does have its weaknesses, but by comparison, a > discussion of C++'s strengths and flaws always sounds like an > argument about whether one should face north or east when one > is sacrificing one's goat to the rain god.) -- Thant Tessman > _______________________________________________ > bese-devel mailing list > bese-devel at common-lisp.net > http://common-lisp.net/cgi-bin/mailman/listinfo/bese-devel > From frido at q-software-solutions.de Sun Aug 21 03:03:24 2005 From: frido at q-software-solutions.de (Friedrich Dominicus) Date: Sun, 21 Aug 2005 05:03:24 +0200 Subject: [Bese-devel] general question of understanding Message-ID: <87br3s6lfn.fsf@flarge.here> Well ucw is way too much a mystery too me, as you've seen but giving up is not what I like to do. So I have a general question Do I understand it correctly that creating of a component can not be done with make-instance? Regards Friedrich From frido at q-software-solutions.de Sun Aug 21 03:28:44 2005 From: frido at q-software-solutions.de (Friedrich Dominicus) Date: Sun, 21 Aug 2005 05:28:44 +0200 Subject: [Bese-devel] what's wrong with the following code? Message-ID: <874q9k6k9f.fsf@flarge.here> (defaction shop-login ((login shop-login) username password) (setf (login.username login) username (login.password login) password) (let* ((user-data (check-credentials login)) (shipping-adr (make-instance 'shipping-adr :adr (car (qss.db::shipping-address user-data))))) ;; car is needed because a join slot always returns a list! (inspect login) (inspect shipping-adr) (if shipping-adr (call 'customer-input-page :customer-data user-data :address shipping-adr :payment-details nil) (call 'info-message :message "Login failed")))) The shipping-adr class is defined this way: (defcomponent address-mixin () ((adr :initarg :adr :accessor adr :backtrack t :initform (make-instance 'qss.db::shipping-address))) (:metaclass standard-component-class)) ;; (forget-class :shipping-adr) (defclass shipping-adr (address-mixin) () (:metaclass standard-component-class)) If I inspect login I see the following: 0. CONTINUATION: (IT.BESE.ARNESI::TOPLEVEL-K) 1. CALLING-COMPONENT: # 2. PLACE: # that's ok, the shipping-adr has the following 0. CONTINUATION: "unbound" 1. CALLING-COMPONENT: "unbound" 2. PLACE: "unbound" which seems itself reasonable, but then I do the following (defmethod render-on ((res response) (customer-page customer-input-page)) (<:h1 "Your adress data: ") (render-on res (address customer-page))) which then calls this: (defmethod render-on ((res response) (adr shipping-adr)) (let ((address (adr adr))) (inspect adr) (. [Condition of type UNBOUND-SLOT] Restarts: 0: [SHOW-BACKTRACE] Send the client a backtrace page. 1: [RETRY] Clearout the response and retry calling the action. 2: [SERVER-ERROR] Send the client an internal server error page. 3: [GENERATE-BACKTRACE-FOR-EMACS] Generate a bug report in Emacs. That's of course true, but not what I like to see of course I'd like to call the next action and go on from there. So how am I supposed to build such a action-render-render-action chain? what i want is: checking the login credentials if the the customer can be found then show me his/her address if the data have changed allow to change them change the data display the changed data go on wiht the state as if he/she had not changed the address display e.g the payment terms the customer has taken. allow changes as needed etc. Help would be very appreciated. Regards Friedrich From rusabd at gmail.com Mon Aug 22 07:12:08 2005 From: rusabd at gmail.com (Ruslan Abdulkhalikov) Date: Mon, 22 Aug 2005 13:12:08 +0600 Subject: [Bese-devel] port #1 In-Reply-To: References: <2f11360405081900562e9c0195@mail.gmail.com> Message-ID: <2f11360405082200127a543c1f@mail.gmail.com> On 8/20/05, Marco Baringer wrote: > Ruslan Abdulkhalikov writes: > > > Hello ladies and gentlemen. > > > > I've been using UCW for few weeks and found that patches are applied > > on _dev repository frequently... So, could you suggest me some CL > > implementation which is checked first after OpenMCL? CMUCL SBCL, > > CLISP, Allegro? Actually SBCL works almost fine for my very simple > > examples but I failed to make work UCW against CLISP on Windows... > > quite a few people use _dev with sbcl. i generally test on sbcl then > cmucl then clisp, though lately i've been testing on openmcl and clisp > only. > > i do not have easy access to a windows machine, what issues are you > running into? I tried it a week ago - it just hangs on initial examples page (127.0.0.1:8080/ucw/examples/index.ucw) - did not replied with any result... But it can be some local firewall issue, I do not know... Win32 is not absolutly necessary for me, actually SBCL and clisp on linux is ok :) But I thought about creating local web applications running on the most popular client OS (win). and UCW is great choice for web applications running on client's box since perfomance is not issue in this case... > -- > -Marco > Ring the bells that still can ring. > Forget the perfect offering. > There is a crack in everything. > That's how the light gets in. > -Leonard Cohen -- Ruslan Abdulkhalikov -- Quantum Mechanics is God's version of "Trust me." From mb at bese.it Tue Aug 23 12:35:31 2005 From: mb at bese.it (Marco Baringer) Date: Tue, 23 Aug 2005 14:35:31 +0200 Subject: [Bese-devel] general question of understanding In-Reply-To: <87br3s6lfn.fsf@flarge.here> (Friedrich Dominicus's message of "Sun, 21 Aug 2005 05:03:24 +0200") References: <87br3s6lfn.fsf@flarge.here> Message-ID: Friedrich Dominicus writes: > Well ucw is way too much a mystery too me, as you've seen but giving > up is not what I like to do. So I have a general question > Do I understand it correctly that creating of a component can not be > done with make-instance? it can be done (call macro expands into a make-instance form). however the call-component method does some neccassary bookkeeping work (like setting up the continuation, the place, the parent, etc.) which you'll need to repeat if you just use make-instance. of course, this bookkeeping stuff requires that there be a valid *context* object in the dynamic environment. basically it can be done, but it's a goodly amoun of work. why are you trying to do it? -- -Marco Ring the bells that still can ring. Forget the perfect offering. There is a crack in everything. That's how the light gets in. -Leonard Cohen From a_bakic at yahoo.com Tue Aug 23 16:31:04 2005 From: a_bakic at yahoo.com (Aleksandar Bakic) Date: Tue, 23 Aug 2005 09:31:04 -0700 (PDT) Subject: [Bese-devel] portable aserve/sbcl/utf-8 (cl-ppcre?) Message-ID: <20050823163105.57395.qmail@web40614.mail.yahoo.com> Hi, I am using the aserve backend with sbcl, and am trying to pass utf-8 requests and responses through. I modified the definition of *default-aserve-external-format* in aserve/main.cl to contain #+sbcl :utf-8 (and also added "charset=utf-8" to content-type), but am still getting errors like this: 18:00:46 - While reading http request from 127.0.0.1: invalid array index 197 for #*0000000000000000000000000000000010111110000110010000000000111111100000000000000000000000000111101000000000000000000000000001110 (should be nonnegative and <127) Looks like it's coming from cl-ppcre. Is anyone familiar with this stuff? (I recently added cl-automaton, a regexp-engine, to climacs to get around cl-ppcre's inability to handle Unicode.) Thanks, Alex ____________________________________________________ Start your day with Yahoo! - make it your home page http://www.yahoo.com/r/hs From a_bakic at yahoo.com Tue Aug 23 19:02:50 2005 From: a_bakic at yahoo.com (Aleksandar Bakic) Date: Tue, 23 Aug 2005 12:02:50 -0700 (PDT) Subject: [Bese-devel] portable aserve/sbcl/utf-8 (cl-ppcre?) In-Reply-To: <20050823163105.57395.qmail@web40614.mail.yahoo.com> Message-ID: <20050823190250.23025.qmail@web40621.mail.yahoo.com> > I am using the aserve backend with sbcl, and am trying to pass utf-8 requests > and responses through. I just found out that Araneida seems to work fine with sbcl and utf-8. (BTW, one should probably use #+(or unicode sb-unicode) instead of #+sbcl in aserve/main.cl.) Alex ____________________________________________________ Start your day with Yahoo! - make it your home page http://www.yahoo.com/r/hs From frido at q-software-solutions.de Wed Aug 24 07:35:02 2005 From: frido at q-software-solutions.de (Friedrich Dominicus) Date: Wed, 24 Aug 2005 09:35:02 +0200 Subject: [Bese-devel] general question of understanding In-Reply-To: (Marco Baringer's message of "Tue, 23 Aug 2005 14:35:31 +0200") References: <87br3s6lfn.fsf@flarge.here> Message-ID: <87mzn7vlcp.fsf@flarge.here> You've to see it togeher with the other posting. I try to get the latter running and am failing... I have not idea what I can make about the posted render construct. It seems I had to fill in all the missing slots, but that can't be the solution really. Regards Friedrich From frido at q-software-solutions.de Wed Aug 24 08:09:47 2005 From: frido at q-software-solutions.de (Friedrich Dominicus) Date: Wed, 24 Aug 2005 10:09:47 +0200 Subject: [Bese-devel] what's wrong with the following code? In-Reply-To: <874q9k6k9f.fsf@flarge.here> (Friedrich Dominicus's message of "Sun, 21 Aug 2005 05:28:44 +0200") References: <874q9k6k9f.fsf@flarge.here> Message-ID: <87irxvvjqs.fsf@flarge.here> could that be a bug? the declaration of the shipping-adr class is: (defcomponent address-mixin () ((adr :initarg :adr :accessor adr :backtrack t :initform (make-instance 'qss.db::shipping-address))) (:metaclass standard-component-class)) ;; (forget-class :shipping-adr) (defclass shipping-adr (address-mixin) () (:metaclass standard-component-class)) So it should be a standard component class, looking through the sources I found: (defun initialize-component-class-after (class) ":after initialization function for standard-component-class objects. ... shouldn't that fill the missing slots? Regards Friedrich From joe13x at hotmail.com Wed Aug 24 09:30:15 2005 From: joe13x at hotmail.com (P. Joe Bootvong) Date: Wed, 24 Aug 2005 16:30:15 +0700 Subject: [Bese-devel] Bug in UCW Examples: Add some numbers? Message-ID: Hi, I think this is a bug, or may be I don't understand how it is supposed to work. Step to reproduce: * Start UCW Examples Goto "Add some numbers" example. * Enter 2 for number of number to read. * Enter 10 for first number that was asked, then OK * Push the browser's back button. * Enter 5 for the a number, then OK. Result: The sum is: 5 Expected Result: There are two sensible behavior I can think of: 1.) UCW think I go back to edit the last value I have entered. So It should prompt me for another value. In addition to enter 10, then back to edit to 5, I should be asked for one more number. Or 2.) UCW think there is nothing in the page indicating that the value I went back and submit is first value. So it took the new value as the second number and add both result in, And return the result of 15. The current behavior is neither of this. From digash at gmail.com Wed Aug 24 14:05:08 2005 From: digash at gmail.com (Dimitry Gashinsky) Date: Wed, 24 Aug 2005 10:05:08 -0400 Subject: [Bese-devel] Bug in UCW Examples: Add some numbers? In-Reply-To: References: Message-ID: I get a different behavior. It asks me for another number and then adds it to 5 following your example. Which makes perfect sense to me. You can try it here https://dam.digash.com/ucw/examples/index.ucw Regards, DiG On 8/24/05, P. Joe Bootvong wrote: > Hi, > > I think this is a bug, or may be I don't understand how it is supposed to > work. > > Step to reproduce: > > * Start UCW Examples Goto "Add some numbers" example. > * Enter 2 for number of number to read. > * Enter 10 for first number that was asked, then OK > * Push the browser's back button. > * Enter 5 for the a number, then OK. > > Result: The sum is: 5 > > Expected Result: > There are two sensible behavior I can think of: > > 1.) UCW think I go back to edit the last value I have entered. So It should > prompt me for another value. In addition to enter 10, then back to edit to > 5, I should be asked for one more number. > Or > 2.) UCW think there is nothing in the page indicating that the value I went > back and submit is first value. So it took the new value as the second > number and add both result in, And return the result of 15. > > The current behavior is neither of this. > > > _______________________________________________ > bese-devel mailing list > bese-devel at common-lisp.net > http://common-lisp.net/cgi-bin/mailman/listinfo/bese-devel > -- ((LAMBDA (LAMBDA) `(,LAMBDA ',LAMBDA)) '(LAMBDA (LAMBDA) `(,LAMBDA ',LAMBDA))) From mb at bese.it Wed Aug 24 17:01:48 2005 From: mb at bese.it (Marco Baringer) Date: Wed, 24 Aug 2005 19:01:48 +0200 Subject: [Bese-devel] Bug in UCW Examples: Add some numbers? In-Reply-To: (P. Joe Bootvong's message of "Wed, 24 Aug 2005 16:30:15 +0700") References: Message-ID: "P. Joe Bootvong" writes: > Expected Result: > There are two sensible behavior I can think of: > > 1.) UCW think I go back to edit the last value I have entered. So It > should prompt me for another value. In addition to enter 10, then > back to edit to 5, I should be asked for one more number. this is what should happen. the problem is this (in ucw/examples/sum.lisp): (loop repeat how-many sum (call 'read-a-number) into total finally (call 'info-message :message (format nil "The sum is: ~D." total))) the repeat clause of loop does not play well with continuations. basically repeat setups a local counter and medifies that value each time through the loop. however since this is a modification and not a fresh binding calling the contiunation does not undo the modification (this is the way things should be (though i damit that it looks wrong in this particular case)). the only way to fix is to use recursion (which gets 'undone' when stepping back to a previous continuation): (defaction start ((s sum)) (let ((how-many (call 'read-a-number :label "How many numbers should we read?"))) (labels ((sum-numbers (how-many sum) (if (zerop how-many) ;; all done (call 'info-message :message (format nil "The sum is: ~D." sum)) ;; more to go (sum-numbers (1- how-many) (+ sum (call 'read-a-number)))))) (sum-numbers how-many 0)))) NB: while writing this fix i discovered a bug in cc interpreter, local function application was broken. UPDATE ARNESI. > 2.) UCW think there is nothing in the page indicating that the value I > went back and submit is first value. So it took the new value as the > second number and add both result in, And return the result of 15. > > The current behavior is neither of this. nope :( -- -Marco Ring the bells that still can ring. Forget the perfect offering. There is a crack in everything. That's how the light gets in. -Leonard Cohen From frido at q-software-solutions.de Thu Aug 25 12:56:53 2005 From: frido at q-software-solutions.de (Friedrich Dominicus) Date: Thu, 25 Aug 2005 14:56:53 +0200 Subject: [Bese-devel] a thing I can't believe Message-ID: <87pss2899m.fsf@flarge.here> Amd I now going nuts. How can I prefill text input field in a form? (defmethod render-on ((res response) (field text-field)) ( No it can't be and it isn't at least that has turned out to work one has to use something along this lines: ( (Marco Baringer's message of "Wed, 24 Aug 2005 19:01:48 +0200") References: Message-ID: "Marco Baringer" writes: > the only way to fix is to use recursion (which gets 'undone' when > stepping back to a previous continuation): > > (defaction start ((s sum)) > (let ((how-many (call 'read-a-number > :label "How many numbers should we read?"))) > (labels ((sum-numbers (how-many sum) > (if (zerop how-many) > ;; all done > (call 'info-message > :message (format nil "The sum is: ~D." sum)) > ;; more to go > (sum-numbers (1- how-many) > (+ sum (call 'read-a-number)))))) > (sum-numbers how-many 0)))) this is another way to fix the problem. we're using ucw's backtracking mechanism to work around the fact that continuations don't undo side effects. (defaction start ((s sum)) (loop for how-many = (call 'read-a-number :label "How many numbers should we read?") initially (backtrack (ucw::context.current-frame *context*) (make-place how-many)) do (loop for count below how-many initially (backtrack (ucw::context.current-frame *context*) (make-place count)) sum (call 'read-a-number) into total finally (call 'info-message :message (format nil "The sum is: ~D." total))))) now that i think about it may be worth the effort, since we've already got the neccessary infrastructure, to have an action automatically backtrack all local variables. though this will help in a lot of casse it will still leave weird edge cases sucha s this one: (let ((a (cons 1 2))) (setf (car a) 'foo) ;; the modification to the car of a is not backtracked ) the only way to fix this would be to use deep copying of all backtracked places, this sounds like a _horrible_ idea. -- -Marco Ring the bells that still can ring. Forget the perfect offering. There is a crack in everything. That's how the light gets in. -Leonard Cohen From frido at q-software-solutions.de Fri Aug 26 10:04:52 2005 From: frido at q-software-solutions.de (Friedrich Dominicus) Date: Fri, 26 Aug 2005 12:04:52 +0200 Subject: [Bese-devel] unclear usage again Message-ID: <87mzn53tff.fsf@flarge.here> Well there is the class form-element which has two slots client-value and lisp-value, as I understand you can use the client-value field to initialize the content of form field. After it has been displayd to the user and the user has changed it one can use read-client-value which however fills lisp-value with the content of the client-value field. So I'd like to know how lisp-value and client-value play together and what purpose they have. Regards Friedrich From frido at q-software-solutions.de Fri Aug 26 10:21:28 2005 From: frido at q-software-solutions.de (Friedrich Dominicus) Date: Fri, 26 Aug 2005 12:21:28 +0200 Subject: [Bese-devel] yet another question (suggestion?) Message-ID: <87irxt3snr.fsf@flarge.here> Well for the moment I have find at least a way to proceed. But there are a still a lot of open questions. Does anyone here have used UCW together with CLSQL? for the time beeing it seems on needs quite few extra classed to get them going together. e.g you like to read an object from a database and "display" it. That's the "easy" part, but then you migh want to change the display so you have to put e.g an text-field out for a field you like to change. to initialize the view it seems on has to write: (let ((address (adr adr))) ;; (inspect adr) (when address (setf (ucw::client-value (zip adr)) (zip address) (ucw::client-value (street adr)) (street address) (ucw::client-value (city adr)) (city address) (ucw::client-value (country adr)) (country address) (ucw::client-value (email adr)) (email address))) ... so me seems this isn't an unusual request you want to initialze the few from a database objects,but one has to use a "private" feature of ucw to achieve that. I think client-value should be an exported function. Ok now let's see further. You got your view, now you change the value now you have to propagate the changes in the view to the database so you have to use code like this IIUC. (defun update-db-address-from-view (slot-name address) (setf (slot-value (adr address) slot-name) (read-client-value (slot-value address slot-name)))) Of course one can generalize it but me things at least this back/forth between has to be code explicitly. Am I missing something or is that a correct impression? As I understand lisp-on-lines, the author there has worked for autmating this task. Is anyone using lisp-on-lines and can confirm that? Thanks Friedrich From smoof-ra at elder-gods.org Fri Aug 26 13:34:41 2005 From: smoof-ra at elder-gods.org (Larry D'Anna) Date: Fri, 26 Aug 2005 09:34:41 -0400 Subject: [Bese-devel] Bug in UCW Examples: Add some numbers? In-Reply-To: References: Message-ID: <20050826133441.GA4420@melkor.elder-gods.org> * Marco Baringer (mb at bese.it) [050826 04:13]: > this is another way to fix the problem. we're using ucw's backtracking > mechanism to work around the fact that continuations don't undo side > effects. > > (defaction start ((s sum)) > (loop > for how-many = (call 'read-a-number :label "How many numbers should we read?") > initially (backtrack (ucw::context.current-frame *context*) (make-place how-many)) > do (loop > for count below how-many > initially (backtrack (ucw::context.current-frame *context*) > (make-place count)) > sum (call 'read-a-number) into total > finally (call 'info-message > :message (format nil "The sum is: ~D." total))))) > > now that i think about it may be worth the effort, since we've already > got the neccessary infrastructure, to have an action automatically > backtrack all local variables. though this will help in a lot of casse > it will still leave weird edge cases sucha s this one: > > (let ((a (cons 1 2))) > (setf (car a) 'foo) > ;; the modification to the car of a is not backtracked > ) > > the only way to fix this would be to use deep copying of all > backtracked places, this sounds like a _horrible_ idea. Maybe we should have looping constructs that create new bindings at each iteration, and encourage people to use those. I don't think the behavior ucw is exhibiting here is a bug at all. The bug is only in the example code that doesn't take into account the fact that it might be continued at the same point more than once. --larry From chalub at gmail.com Sat Aug 27 02:10:11 2005 From: chalub at gmail.com (Fabricio Chalub) Date: 26 Aug 2005 23:10:11 -0300 Subject: [Bese-devel] Two problems with CMUCL HEAD 2005-08-26 (19b) in UCW and ARNESI (dev) Message-ID: <87pss0870c.fsf@eq.local> Hello! I'm trying UCW (latest dev repositories, etc.) on CMUCL HEAD (2005-08-26) (19b) and am having two different problems; the first is with the actual compilation of UCW per se and an attempt in fixing it is provided, while the second is in one of the examples. The problem is an error raised by ARNESI when CMUCL loads/compiles control-flow.lisp in rerl/standard-component, as follows (note also the minor typo `lexcial'): Error in function (METHOD IT.BESE.ARNESI::LEXICAL-FUNCTIONS NIL (C::LEXENV)): Sorry, don't know how to handle the lexcial function spec (IT.BESE.UCW:ANSWER . #). [Condition of type SIMPLE-ERROR] Which is raised by LEXICAL-FUNCTIONS in LEXENV.LISP. It appears that the function spec (ANSWER . #) + ;; if we get here we're confused :( + else + do (error "Sorry, don't know how to handle the lexcial function spec ~S." + func-spec))) With the above patch the LEXICAL-FUNCTION apparently works, except now that the PRESENTATIONS example of UCW fails with the following error. Generic function CREATE-PERSON: Invalid generic function parameter name ((LAST-NAME LAST-NAME)) Which completely baffles me as I cannot find any problems in CREATE-PERSON on a superficial look. I don't discard this being a fallout from my "patch". Anybody else have similar problems with CMUCL? (Ignoring the PRESENTATIONS example, the rest works perfectly well, thanks for the magnificent work.) Best regards, Fabricio From mb at bese.it Sat Aug 27 10:36:55 2005 From: mb at bese.it (Marco Baringer) Date: Sat, 27 Aug 2005 12:36:55 +0200 Subject: [Bese-devel] a thing I can't believe In-Reply-To: <87pss2899m.fsf@flarge.here> (Friedrich Dominicus's message of "Thu, 25 Aug 2005 14:56:53 +0200") References: <87pss2899m.fsf@flarge.here> Message-ID: Friedrich Dominicus writes: > Amd I now going nuts. How can I prefill text input field in a form? > > (defmethod render-on ((res response) (field text-field)) > ( :size (size field))) > > No way to give an initial value? two options: 1) use the :value attribute. 2) since text-field your own component use :initform on the client-value slot (or initialize the client-value in a shared-initialize method or whatever). -- -Marco Ring the bells that still can ring. Forget the perfect offering. There is a crack in everything. That's how the light gets in. -Leonard Cohen From mb at bese.it Sat Aug 27 10:40:27 2005 From: mb at bese.it (Marco Baringer) Date: Sat, 27 Aug 2005 12:40:27 +0200 Subject: [Bese-devel] unclear usage again In-Reply-To: <87mzn53tff.fsf@flarge.here> (Friedrich Dominicus's message of "Fri, 26 Aug 2005 12:04:52 +0200") References: <87mzn53tff.fsf@flarge.here> Message-ID: Friedrich Dominicus writes: > So I'd like to know how lisp-value and client-value play together and > what purpose they have. for a text input the relation between the two is trivial (they're both strings). for a number input the relation is a bit more interesting so i'll use that. the first thing to realize is that the client-value will _always_ be a string, while the lisp-value may be a string or any lisp object (like a number). when we call the submit action on a form element it calls the read-client-value method which converts (and validates) the string the client sent into a lisp object and fills the lisp-value slot appropiatly. in code terms: (when (validate-client-value form-element) (setf (lisp-value form-element) (read-client-value form-element))) -- -Marco Ring the bells that still can ring. Forget the perfect offering. There is a crack in everything. That's how the light gets in. -Leonard Cohen From mb at bese.it Sat Aug 27 10:46:57 2005 From: mb at bese.it (Marco Baringer) Date: Sat, 27 Aug 2005 12:46:57 +0200 Subject: [Bese-devel] yet another question (suggestion?) In-Reply-To: <87irxt3snr.fsf@flarge.here> (Friedrich Dominicus's message of "Fri, 26 Aug 2005 12:21:28 +0200") References: <87irxt3snr.fsf@flarge.here> Message-ID: Friedrich Dominicus writes: > Of course one can generalize it but me things at least this back/forth > between has to be code explicitly. Am I missing something or is that a > correct impression? your impression is correct. ucw does _not_ provide support for mapping between db abjects and web forms, this is an intentional design chocie. there are over 18 gazillion ways of doing this mapping, each with its own pros and cons. i'm not about to chose one and use only that. i have so far used various db backends (clsql, elephant, prevalence, ccl:save-application or sb-ext:save-lisp-and-die) and for each one i've needed a fundamentally different way of mapping the db objects to web forms. the presentation facility is my initial (not very successfull) attempt to automate this job. the way i use the presentations is to a have a macro, in each application, which creates the clos class, the presentations, and any db specific infrastructure. > as I understand lisp-on-lines, the author there has worked for > autmating this task. Is anyone using lisp-on-lines and can confirm > that? i am not activly using lisp-on-lines, though i have looked at it and believe that your time would be better spent learning drew's code than the presentation/form stuff i've written. -- -Marco Ring the bells that still can ring. Forget the perfect offering. There is a crack in everything. That's how the light gets in. -Leonard Cohen From emailmac at gmail.com Sat Aug 27 07:11:27 2005 From: emailmac at gmail.com (Mac Chan) Date: Sat, 27 Aug 2005 00:11:27 -0700 Subject: [Bese-devel] Two problems with CMUCL HEAD 2005-08-26 (19b) in UCW and ARNESI (dev) In-Reply-To: References: Message-ID: <4877ae64050827001172bdd5f3@mail.gmail.com> On 26 Aug 2005 23:10:11 -0300, Fabricio Chalub wrote: > I'm trying UCW (latest dev repositories, etc.) on CMUCL HEAD > (2005-08-26) (19b) and am having two different problems; the first is > with the actual compilation of UCW per se and an attempt in fixing it is > provided, while the second is in one of the examples. Marco was kind enough to walk me thru these two problems on irc yesterday. I'm not sure if this is a complete fix but here you go: arnesi_dev diff Index: src/call-cc/generic-functions.lisp =================================================================== --- src/call-cc/generic-functions.lisp (revision 203) +++ src/call-cc/generic-functions.lisp (working copy) @@ -127,11 +127,11 @@ ((or required-function-argument-form specialized-function-argument-form) (push (name arg) generic-lambda-list)) - (keyword-function-argument-form - (pushnew '&key generic-lambda-list) - (push (list (list (keyword-name arg) - (name arg))) - generic-lambda-list)) + + (keyword-function-argument-form + (pushnew '&key generic-lambda-list) + (push (list (keyword-name arg)) generic-lambda-list)) + (rest-function-argument-form (push '&rest generic-lambda-list) (push (name arg) generic-lambda-list)) Index: src/lexenv.lisp =================================================================== --- src/lexenv.lisp (revision 203) +++ src/lexenv.lisp (working copy) @@ -126,6 +126,9 @@ (eql 'system:macro (second func-spec))) ;; except that we don't return macros for now do (progn) + ;; sometimes, oddly, we get (NAME DEF) + else if (symbolp (first func-spec)) + collect (first func-spec) ;; if we get here we're confused :( else do (error "Sorry, don't know how to handle the lexcial function spec ~S." Also, here are some minor fixes for cmucl ucw_dev diff Index: src/control.lisp =================================================================== --- src/control.lisp (revision 203) +++ src/control.lisp (working copy) @@ -1,4 +1,4 @@ -(in-package :ucw) +(in-package :it.bese.ucw) (defun threaded-lisp-p () #+(and sbcl sb-thread) t Index: bin/start.lisp =================================================================== --- bin/start.lisp (revision 203) +++ bin/start.lisp (working copy) @@ -2,6 +2,19 @@ (in-package :common-lisp-user) +#+cmu +(defun init-cmu-mp () + ;; this isn't strictly necessary, but scheduling feels very coarse + ;; without startup-idle-and-top-level-loops, leading to answer delays + ;; of about 1s per request. + (unless (find-if + #'(lambda (proc) (string= (mp:process-name proc) "Top Level Loop")) + (mp:all-processes)) + (mp::startup-idle-and-top-level-loops))) + +#+cmu +(init-cmu-mp) + ;;;; * UCW server initialization "script" @@ -66,6 +79,9 @@ (register-application *default-server* ucw::*admin-application*) +#+cmu +(defparameter swank:*communication-style* :spawn) + From mb at bese.it Sat Aug 27 10:58:39 2005 From: mb at bese.it (Marco Baringer) Date: Sat, 27 Aug 2005 12:58:39 +0200 Subject: [Bese-devel] Bug in UCW Examples: Add some numbers? In-Reply-To: <20050826133441.GA4420@melkor.elder-gods.org> (Larry D'Anna's message of "Fri, 26 Aug 2005 09:34:41 -0400") References: <20050826133441.GA4420@melkor.elder-gods.org> Message-ID: Larry D'Anna writes: > Maybe we should have looping constructs that create new bindings at > each iteration, and encourage people to use those. I don't think the > behavior ucw is exhibiting here is a bug at all. The bug is only in > the example code that doesn't take into account the fact that it might > be continued at the same point more than once. there are a few different issues: 1) (dolist (i my-list) (<:li ( (Fabricio Chalub's message of "26 Aug 2005 23:10:11 -0300") References: <87pss0870c.fsf@eq.local> Message-ID: Fabricio Chalub writes: > An ugly attempt at covering this case follows, but it surely does not > solve the problem satisfactorily as I have no experience in CMUCL's > internals. My solution is to add another ELSE IF before the ERROR call, > considering the 'C::FUNCTIONAL case as follows: what we're doing in the lexical-xyz functions isn't kosher, there is no 'clean' solution (unless all implementations started providing environment access like allegro is doing). > --- lexenv.lisp.~1~ 2005-08-25 23:38:43.000000000 -0300 > +++ lexenv.lisp 2005-08-26 22:32:07.531838568 -0300 > @@ -126,10 +126,13 @@ > (eql 'system:macro (second func-spec))) > ;; except that we don't return macros for now > do (progn) > - ;; if we get here we're confused :( > - else > - do (error "Sorry, don't know how to handle the lexcial function spec ~S." > - func-spec))) > + else if (typep (cdr func-spec) 'C::FUNCTIONAL) > + collect (car func-spec) > + ;; handle the case (NAME . #) > + ;; if we get here we're confused :( > + else > + do (error "Sorry, don't know how to handle the lexcial function spec ~S." > + func-spec))) applied, thanks. > With the above patch the LEXICAL-FUNCTION apparently works, except now > that the PRESENTATIONS example of UCW fails with the following error. > > Generic function CREATE-PERSON: Invalid generic function parameter name > ((LAST-NAME > LAST-NAME)) > > Which completely baffles me as I cannot find any problems in > CREATE-PERSON on a superficial look. I don't discard this being a > fallout from my "patch". the problem is that cumcl does not support generic-function lambda lists like this: (defgeneric foobar (&key ((:keyword variable)))) this is, according to my reading of the spec and #lisp's denziens, a legal defgeneric form. this looks like a bug in cmucl. however, i just commited a patch which only passes the keyword if the user actually supplied one differenet from the argument. so basically this: (defmethod/cc foo (&key bar)) will now work, but this: (defmethod/cc foo (&key ((:goo bar)))) still won't. -- -Marco Ring the bells that still can ring. Forget the perfect offering. There is a crack in everything. That's how the light gets in. -Leonard Cohen From mb at bese.it Sat Aug 27 11:29:57 2005 From: mb at bese.it (Marco Baringer) Date: Sat, 27 Aug 2005 13:29:57 +0200 Subject: [Bese-devel] Two problems with CMUCL HEAD 2005-08-26 (19b) in UCW and ARNESI (dev) In-Reply-To: <4877ae64050827001172bdd5f3@mail.gmail.com> (Mac Chan's message of "Sat, 27 Aug 2005 00:11:27 -0700") References: <4877ae64050827001172bdd5f3@mail.gmail.com> Message-ID: Mac Chan writes: > Also, here are some minor fixes for cmucl applied. thanks. -- -Marco Ring the bells that still can ring. Forget the perfect offering. There is a crack in everything. That's how the light gets in. -Leonard Cohen From binarin at agava.com Sat Aug 27 14:51:13 2005 From: binarin at agava.com (Alexey Lebedeff) Date: Sat, 27 Aug 2005 18:51:13 +0400 Subject: [Bese-devel] UTF-8 Message-ID: <871x4fcu1q.fsf@binarin.domain> I'm using ucw with mod_lisp backend and sbcl. To make it work with utf-8 I made few small changes to arnesi & ucw. Changes to arnesi: - When utf-8 is used, encoding of characters > 127 with '&xXXXX'; is not the right thing. So i dissallowed such encoding when sb-unicode feature is present. This is not quite correct - not all users of unicode-enabled sbcl wants this behavior(that's for sure) - but my superficial knowledge of arnesi doesn't allow me to make this change in better way. - nunescape-as-uri is now accepting external-format argument, same as unescape-as-uri. Changes to ucw: - Allow to specify various external-formats for different purposes: unescaping of urls, communication with slime and http. Accompanied by setting slime-net-coding-system on emacs side, it works pretty well. And also unrelated to external formats change: There was missing argument in call to ucw.backend.dribble. So, when I was starting ucw, sbcl complained to me about "format" arguments mismatch, resulting in impossibilty to start ucw without user intervention. -------------- next part -------------- A non-text attachment was scrubbed... Name: arnesi.CHANGESET Type: text/x-patch Size: 14060 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: ucw.CHANGESET Type: text/x-patch Size: 15907 bytes Desc: inline URL: -------------- next part -------------- -- [1180'99:11-6a] [BMSTU-AK:5-111] From mb at bese.it Sat Aug 27 19:15:40 2005 From: mb at bese.it (Marco Baringer) Date: Sat, 27 Aug 2005 21:15:40 +0200 Subject: [Bese-devel] UTF-8 In-Reply-To: <871x4fcu1q.fsf@binarin.domain> (Alexey Lebedeff's message of "Sat, 27 Aug 2005 18:51:13 +0400") References: <871x4fcu1q.fsf@binarin.domain> Message-ID: Alexey Lebedeff writes: > I'm using ucw with mod_lisp backend and sbcl. > > To make it work with utf-8 I made few small changes to arnesi & ucw. > > Changes to arnesi: > > - When utf-8 is used, encoding of characters > 127 with '&xXXXX'; is not > the right thing. So i dissallowed such encoding when sb-unicode feature > is present. This is not quite correct - not all users of > unicode-enabled sbcl wants this behavior(that's for sure) - but my > superficial knowledge of arnesi doesn't allow me to make this change in > better way. > > - nunescape-as-uri is now accepting external-format argument, same as > unescape-as-uri. applied. thanks! > Changes to ucw: > > - Allow to specify various external-formats for different purposes: > unescaping of urls, communication with slime and http. > > Accompanied by setting slime-net-coding-system on emacs side, it works > pretty well. when trying to apply this i get this message: soma:~/lisp/ucw mb$ darcs apply patch darcs: bug in get_extra. Most likely this is caused by a bug that existed in darcs prior to version 1.0.1. Details for dealing with this issue can be found at http://darcs.net/DarcsWiki/Issues1.0.1 soma:~/lisp/ucw mb$ cd ../arnesi/ the solution suggested by that page is to use an older version of darcs, which i don't have. could you try upgrading darcs and reverting/rerecording the pages? otherwise i can apply the differences and just create a new patch, though you'll then have to unrecord your patch and apply mine. suggestions? > And also unrelated to external formats change: > There was missing argument in call to ucw.backend.dribble. So, when I was > starting ucw, sbcl complained to me about "format" arguments mismatch, > resulting in impossibilty to start ucw without user intervention. thanks anyway. -- -Marco Ring the bells that still can ring. Forget the perfect offering. There is a crack in everything. That's how the light gets in. -Leonard Cohen From a_bakic at yahoo.com Sat Aug 27 19:29:11 2005 From: a_bakic at yahoo.com (Aleksandar Bakic) Date: Sat, 27 Aug 2005 12:29:11 -0700 (PDT) Subject: [Bese-devel] a minor typo fix Message-ID: <20050827192912.36032.qmail@web40610.mail.yahoo.com> Hi, diff -rN old-ucw_dev/src/yaclml/ucw-tags.lisp new-ucw_dev/src/yaclml/ucw-tags.lisp 62c62 < `(defun set-action-paramater (value) --- > `(defun set-action-parameter (value) will make the presentation demo work better. Alex ____________________________________________________ Start your day with Yahoo! - make it your home page http://www.yahoo.com/r/hs From mb at bese.it Sat Aug 27 19:43:35 2005 From: mb at bese.it (Marco Baringer) Date: Sat, 27 Aug 2005 21:43:35 +0200 Subject: [Bese-devel] a minor typo fix In-Reply-To: <20050827192912.36032.qmail@web40610.mail.yahoo.com> (Aleksandar Bakic's message of "Sat, 27 Aug 2005 12:29:11 -0700 (PDT)") References: <20050827192912.36032.qmail@web40610.mail.yahoo.com> Message-ID: Aleksandar Bakic writes: > Hi, > > diff -rN old-ucw_dev/src/yaclml/ucw-tags.lisp > new-ucw_dev/src/yaclml/ucw-tags.lisp > 62c62 > < `(defun set-action-paramater (value) > --- >> `(defun set-action-parameter (value) > > will make the presentation demo work better. that explains a lot of things :) thanks a bunch. -- -Marco Ring the bells that still can ring. Forget the perfect offering. There is a crack in everything. That's how the light gets in. -Leonard Cohen From a_bakic at yahoo.com Sat Aug 27 19:55:05 2005 From: a_bakic at yahoo.com (Aleksandar Bakic) Date: Sat, 27 Aug 2005 12:55:05 -0700 (PDT) Subject: [Bese-devel] a minor typo fix In-Reply-To: Message-ID: <20050827195506.87119.qmail@web40604.mail.yahoo.com> > > will make the presentation demo work better. > > that explains a lot of things :) Well, just a little bit better. I am now getting the following type error in the Javascript console: UCW Examples http://localhost:8080/ucw/examples/index.ucw?s=YBreWHzydwOKZzlqLFGDItCPxMPCLtYUYJrSnxXE&f=EmrdzaAflPPTnivSpBky&a=BIvWFqxFkJ Event thread: click Error: name: TypeError message: Statement on line 4: Could not convert undefined or null to object Backtrace: Line 4 of inline#1 script in http://localhost:8080/ucw/examples/index.ucw?s=YBreWHzydwOKZzlqLFGDItCPxMPCLtYUYJrSnxXE&f=EmrdzaAflPPTnivSpBky&a=BIvWFqxFkJ this.form["a"].value = value; Line 1 of script setActionParameter("vjDxpiFLbt"); return true; At unknown location [statement source code not available] Alex ____________________________________________________ Start your day with Yahoo! - make it your home page http://www.yahoo.com/r/hs From binarin at agava.com Sat Aug 27 20:12:05 2005 From: binarin at agava.com (Alexey Lebedeff) Date: Sun, 28 Aug 2005 00:12:05 +0400 Subject: [Bese-devel] UTF-8 In-Reply-To: (Marco Baringer's message of "Sat, 27 Aug 2005 21:15:40 +0200") References: <871x4fcu1q.fsf@binarin.domain> Message-ID: <87slwvw356.fsf@binarin.domain> ## On Sat, 27 Aug 2005 21:15:40 +0200 ## you wrote: >> Changes to ucw: >> >> - Allow to specify various external-formats for different purposes: >> unescaping of urls, communication with slime and http. >> >> Accompanied by setting slime-net-coding-system on emacs side, it works >> pretty well. MB> when trying to apply this i get this message: MB> soma:~/lisp/ucw mb$ darcs apply patch MB> darcs: bug in get_extra. MB> Most likely this is caused by a bug that existed in darcs prior MB> to version 1.0.1. Details for dealing with this issue can be found MB> at http://darcs.net/DarcsWiki/Issues1.0.1 MB> soma:~/lisp/ucw mb$ cd ../arnesi/ MB> the solution suggested by that page is to use an older version of MB> darcs, which i don't have. could you try upgrading darcs and MB> reverting/rerecording the pages? I have darcs-1.0.2 from debian stable (and 1.0.3 is available from testing/unstable). So i think this is not about 1.0.1 bug. The working copy against which i maded patches was fetched only today. MB> otherwise i can apply the differences and just create a new patch, MB> though you'll then have to unrecord your patch and apply mine. That will be ok. -- [1180'99:11-6a] [BMSTU-AK:5-111] From a_bakic at yahoo.com Sat Aug 27 22:05:34 2005 From: a_bakic at yahoo.com (Aleksandar Bakic) Date: Sat, 27 Aug 2005 15:05:34 -0700 (PDT) Subject: [Bese-devel] a minor typo fix In-Reply-To: <20050827195506.87119.qmail@web40604.mail.yahoo.com> Message-ID: <20050827220534.57237.qmail@web40622.mail.yahoo.com> BTW, I changed ucw-tags.lisp to get "this.form.a.value=...", but this resulted in the same error. On the other hand, Firefox says "Error: this.form has no properties". Alex ____________________________________________________ Start your day with Yahoo! - make it your home page http://www.yahoo.com/r/hs From a_bakic at yahoo.com Sat Aug 27 22:42:27 2005 From: a_bakic at yahoo.com (Aleksandar Bakic) Date: Sat, 27 Aug 2005 15:42:27 -0700 (PDT) Subject: [Bese-devel] a minor typo fix In-Reply-To: <20050827220534.57237.qmail@web40622.mail.yahoo.com> Message-ID: <20050827224227.82832.qmail@web40628.mail.yahoo.com> This seems to be one correct way: diff -rN old-ucw_dev/src/yaclml/ucw-tags.lisp new-ucw_dev/src/yaclml/ucw-tags.lisp 41c41 < (set-action-parameter --- > (set-action-parameter this.form 62,63c62,63 < `(defun set-action-paramater (value) < (setf (slot-value (aref this.form ,',+action-parameter-name+) 'value) --- > `(defun set-action-parameter (form value) > (setf (slot-value (slot-value form ,(intern +action-parameter-name+)) 'value) 102c102,103 < (set-action-parameter ,(register-action--- > (set-action-parameter this.form > ,(register-action 166c167 < (set-action-parameter ,(make-new-action (context.current-frame *context*) --- > (set-action-parameter this.form ,(make-new-action (context.current-frame *context*) Alex __________________________________ Yahoo! Mail Stay connected, organized, and protected. Take the tour: http://tour.mail.yahoo.com/mailtour.html From drewc at tech.coop Sun Aug 28 14:22:58 2005 From: drewc at tech.coop (Drew Crampsie) Date: Sun, 28 Aug 2005 07:22:58 -0700 Subject: [Bese-devel] yet another minor typo fix In-Reply-To: <20050827224227.82832.qmail@web40628.mail.yahoo.com> References: <20050827224227.82832.qmail@web40628.mail.yahoo.com> Message-ID: <4311C8C2.8010307@tech.coop> it's "text/css", not "test/css" :). drewc -------------- next part -------------- A non-text attachment was scrubbed... Name: css.patch Type: text/x-patch Size: 14467 bytes Desc: not available URL: From drewc at tech.coop Sun Aug 28 14:27:53 2005 From: drewc at tech.coop (Drew Crampsie) Date: Sun, 28 Aug 2005 07:27:53 -0700 Subject: [Bese-devel] patch: add :target attribute to yaclml form In-Reply-To: <4311C8C2.8010307@tech.coop> References: <20050827224227.82832.qmail@web40628.mail.yahoo.com> <4311C8C2.8010307@tech.coop> Message-ID: <4311C9E9.3050208@tech.coop> A non-text attachment was scrubbed... Name: target.patch Type: text/x-patch Size: 1456 bytes Desc: not available URL: From drewc at tech.coop Sun Aug 28 14:44:25 2005 From: drewc at tech.coop (Drew Crampsie) Date: Sun, 28 Aug 2005 07:44:25 -0700 Subject: [Bese-devel] arnesi patch: enhanced defmethod/cc to work in the case of a null argument list and missing body.] Message-ID: <4311CDC9.1000702@tech.coop> -------------- next part -------------- A non-text attachment was scrubbed... Name: method.patch Type: text/x-patch Size: 14912 bytes Desc: not available URL: From a_bakic at yahoo.com Sun Aug 28 00:32:02 2005 From: a_bakic at yahoo.com (Aleksandar Bakic) Date: Sat, 27 Aug 2005 17:32:02 -0700 (PDT) Subject: [Bese-devel] another presentation issue Message-ID: <20050828003202.14830.qmail@web40601.mail.yahoo.com> Hi, I am able to edit a person's data, but when I click OK, I get an error: Backtrace: 0: ((SB-PCL::FAST-METHOD SWANK-BACKEND:CALL-WITH-DEBUGGING-ENVIRONMENT (T)) # # #) 1: (SWANK::CALL-WITH-BINDINGS ((*PRINT-PRETTY*) (*PRINT-LEVEL* . 4) (*PRINT-LENGTH* . 10) (*PRINT-CIRCLE* . T) (*PRINT-READABLY*) (*PRINT-PPRINT-DISPATCH* . #) (*PRINT-GENSYM* . T) (*PRINT-BASE* . 10) (*PRINT-RADIX*) (*PRINT-ARRAY* . T) ...) #) 2: (SWANK::DEBUG-IN-EMACS #) 3: ((LAMBDA NIL)) 4: (SWANK::CALL-WITH-REDIRECTED-IO # #) 5: (SWANK::CALL-WITH-CONNECTION # #) 6: ((SB-PCL::FAST-METHOD IT.BESE.UCW::HANDLE-ACTION-ERROR (ERROR T)) # # # (#S(IT.BESE.UCW::BACKTRACE-FRAME :INDEX 4 :DESCRIPTION "(ERROR TYPE-ERROR)" :LOCALS (# #) :SOURCE-LOCATION (:ERROR "The source-path (NIL) is not valid.")) #S(IT.BESE.UCW::BACKTRACE-FRAME :INDEX 5 :DESCRIPTION "(SB-KERNEL::OBJECT-NOT-TYPE-ERROR-HANDLER # #.(SB-SYS:INT-SAP #XF7B85478) # (14 78))" :LOCALS (# # # # #) :SOURCE-LOCATION (:LOCATION # # #)) #S(IT.BESE.UCW::BACKTRACE-FRAME :INDEX 6 :DESCRIPTION "(SB-KERNEL:INTERNAL-ERROR #.(SB-SYS:INT-SAP #XF7B85168) #)" :LOCALS (# # #) :SOURCE-LOCATION (:LOCATION # # #)) #S(IT.BESE.UCW::BACKTRACE-FRAME :INDEX 7 :DESCRIPTION "(\"foreign function: call_into_lisp\")" :LOCALS NIL :SOURCE-LOCATION (:ERROR "The value # is not of type SB-DI::COMPILED-DEBUG-FUN.")) #S(IT.BESE.UCW::BACKTRACE-FRAME :INDEX 8 :DESCRIPTION "(\"foreign function: funcall2\")" :LOCALS NIL :SOURCE-LOCATION (:ERROR "The value # is not of type SB-DI::COMPILED-DEBUG-FUN.")) #S(IT.BESE.UCW::BACKTRACE-FRAME :INDEX 9 :DESCRIPTION "(\"foreign function: interrupt_internal_error\")" :LOCALS NIL :SOURCE-LOCATION (:ERROR "The value # is not of type SB-DI::COMPILED-DEBUG-FUN.")) #S(IT.BESE.UCW::BACKTRACE-FRAME :INDEX 10 :DESCRIPTION "(\"foreign function: sigtrap_handler\")" :LOCALS NIL :SOURCE-LOCATION (:ERROR "The value # is not of type SB-DI::COMPILED-DEBUG-FUN.")) #S(IT.BESE.UCW::BACKTRACE-FRAME :INDEX 11 :DESCRIPTION "(FDEFINITION #)" :LOCALS (# #) :SOURCE-LOCATION (:ERROR "The source-path (NIL) is not valid.")) #S(IT.BESE.UCW::BACKTRACE-FRAME :INDEX 12 :DESCRIPTION "((LAMBDA (IT.BESE.ARNESI::ARGUMENTS)) (# #))" :LOCALS (#) :SOURCE-LOCATION (:LOCATION # # #)) #S(IT.BESE.UCW::BACKTRACE-FRAME :INDEX 13 :DESCRIPTION "(IT.BESE.ARNESI::DRIVE-INTERPRETER/CC #)" :LOCALS (#) :SOURCE-LOCATION (:LOCATION # # #)) ...)) 7: (SIGNAL #) 8: (ERROR TYPE-ERROR) 9: (SB-KERNEL::OBJECT-NOT-TYPE-ERROR-HANDLER # #.(SB-SYS:INT-SAP #XF7B85478) # (14 78)) 10: (SB-KERNEL:INTERNAL-ERROR #.(SB-SYS:INT-SAP #XF7B85168) #) 11: ("foreign function: call_into_lisp") 12: ("foreign function: funcall2") 13: ("foreign function: interrupt_internal_error") 14: ("foreign function: sigtrap_handler") 15: (FDEFINITION #) 16: ((LAMBDA (IT.BESE.ARNESI::ARGUMENTS)) (# #)) 17: (IT.BESE.ARNESI::DRIVE-INTERPRETER/CC #) 18: ((LAMBDA (IT.BESE.ARNESI::ARGUMENTS)) (# #)) 19: (IT.BESE.ARNESI::DRIVE-INTERPRETER/CC #) 20: ((LABELS IT.BESE.UCW::CALL-ACTION) #) 21: ((SB-PCL::FAST-METHOD IT.BESE.UCW::SERVICE (IT.BESE.UCW::STANDARD-SESSION-FRAME IT.BESE.UCW::REQUEST-CONTEXT)) # # # #) Alex ____________________________________________________ Start your day with Yahoo! - make it your home page http://www.yahoo.com/r/hs From a_bakic at yahoo.com Sun Aug 28 00:35:51 2005 From: a_bakic at yahoo.com (Aleksandar Bakic) Date: Sat, 27 Aug 2005 17:35:51 -0700 (PDT) Subject: [Bese-devel] another presentation issue In-Reply-To: <20050828003202.14830.qmail@web40601.mail.yahoo.com> Message-ID: <20050828003551.75745.qmail@web40610.mail.yahoo.com> Sorry, I forgot a piece: The value # is not of type (OR SYMBOL CONS). [Condition of type TYPE-ERROR] (Wild guess: (OR SYMBOL CONS) comes from function name.) Alex ____________________________________________________ Start your day with Yahoo! - make it your home page http://www.yahoo.com/r/hs From smoof-ra at elder-gods.org Sun Aug 28 04:00:09 2005 From: smoof-ra at elder-gods.org (Larry D'Anna) Date: Sun, 28 Aug 2005 00:00:09 -0400 Subject: [Bese-devel] Bug in UCW Examples: Add some numbers? In-Reply-To: References: <20050826133441.GA4420@melkor.elder-gods.org> Message-ID: <20050828040009.GA24774@melkor.elder-gods.org> * Marco Baringer (mb at bese.it) [050827 06:59]: > (loop > repeat 5 > do (call 'foo-bar)) If we had ucw:loop that translated this into (labels ((theloop (n) (when (> n 0) (call 'foo-bar) (theloop (1- n))))) (theloop 5))) everything would work great. --larry From mb at bese.it Sun Aug 28 08:21:01 2005 From: mb at bese.it (Marco Baringer) Date: Sun, 28 Aug 2005 10:21:01 +0200 Subject: [Bese-devel] yet another minor typo fix In-Reply-To: <4311C8C2.8010307@tech.coop> (Drew Crampsie's message of "Sun, 28 Aug 2005 07:22:58 -0700") References: <20050827224227.82832.qmail@web40628.mail.yahoo.com> <4311C8C2.8010307@tech.coop> Message-ID: Drew Crampsie writes: > it's "text/css", not "test/css" :). now i'm worried. i get the 'bug in get_extra' with this patch and the :target patch you sent. :( -- -Marco Ring the bells that still can ring. Forget the perfect offering. There is a crack in everything. That's how the light gets in. -Leonard Cohen From der_julian at web.de Sun Aug 28 16:59:13 2005 From: der_julian at web.de (Julian Stecklina) Date: Sun, 28 Aug 2005 18:59:13 +0200 Subject: [Bese-devel] Compilation error with ACL 7 Message-ID: <20050828185913.3e86a073@localhost> Hello, I just tried to compile a current UCW with Allegro CL 7.0 on FreeBSD and got: ;;; Compiling file /home/blitz/src/ucw/src/rerl/backtracking.lisp ;;; Writing fasl file /home/blitz/src/ucw/src/rerl/backtracking.fasl Error: Class # is not yet finalized. [condition type: PROGRAM-ERROR] Regards, -- Julian Stecklina (Of course SML does have its weaknesses, but by comparison, a discussion of C++'s strengths and flaws always sounds like an argument about whether one should face north or east when one is sacrificing one's goat to the rain god.) -- Thant Tessman From chalub at gmail.com Sun Aug 28 17:06:10 2005 From: chalub at gmail.com (Fabricio Chalub) Date: 28 Aug 2005 14:06:10 -0300 Subject: [Bese-devel] Problems with MP::STARTUP-IDLE-AND-TOP-LEVEL-LOOPS in start.lisp Message-ID: <87slwuout9.fsf@eq.local> Hi, a side effect of adding STARTUP-IDLE-AND-TOP-LEVEL-LOOPS in start.lisp is that CMUCL stops loading start.lisp at that point, since that function creates a new REPL. A search on Google shows that people usually recommends that function as an addition to .CMUCL-INIT.LISP. It seems that some further magic is needed for the correct MP initialization. A possible source of inspiration comes from PORTEABLEASERVE's INSTALL.lisp that has been bit by this problem in the past ('DOUBLE-KLUDGE', below). Unfortunately, I can't retrieve the last version from CVS as Sourceforge appears to be down for maintenance now. ---- begin of INSTALL.LISP cut ;; Startup multiprocessing. ;; ;; this isn't strictly necessary, but scheduling feels very coarse ;; before the evaluation of (startup-idle-and-top-level-loops) -- ;; answer delays of about 1s per http request. ;; ;; KLUDGE: startup-idle-and-top-level-loops can only be evaluated ;; once, so we look for something resembling an existing idle loop ;; before invoking it. #|| #+mp (unless (find-if #'(lambda (proc) (string= (mp:process-name proc) "Idle Loop")) (mp:all-processes)) (mp::startup-idle-and-top-level-loops)) ||# ;; DOUBLE KLUDGE: The preceding (commented-out) form caused the ;; loading of INSTALL.lisp to abort silently (!), so we do the ;; following, pilfered from eclipse the window manager: #+mp (setf mp::*idle-process* mp::*initial-process*) ---- end of INSTALL.LISP cut So, apparently UCW should use #+(and cmu mp) (setf mp::*idle-process* mp::*initial-process*) instead of the MP::S-I-A-T-L-L + FIND-IF call. Cheers, Fabricio From drewc at tech.coop Mon Aug 29 23:52:24 2005 From: drewc at tech.coop (Drew Crampsie) Date: Mon, 29 Aug 2005 16:52:24 -0700 Subject: Quick Lisp-on-Lines tutorial (was Re: [Bese-devel] yet another question (suggestion?)) In-Reply-To: <87ek8fsuy9.fsf@flarge.here> References: <87irxt3snr.fsf@flarge.here> <43106736.3090005@tech.coop> <87ek8fsuy9.fsf@flarge.here> Message-ID: <43139FB8.6060300@tech.coop> Friedrich Dominicus wrote: > Drew Crampsie writes: > > >>Friedrich Dominicus wrote: > > Here's the requested stuff. > > I have however quite few questions: > I have a clsq database model. Is it possible to just exchange > def-view-class with the here mentioend macro? Might work, unless your model happens to use inheritance, in which case not without adding support for inheritance to LoL. > > I tried to get hairierpub running, but without tweaking the files it > failed here: The version of hairiepub that is in that repo probably does not build. The whole thing is in a big state of flux right now, and has never been released anyway. > I'm (more and more) sceptical about the usefullness of ucw and sorry > hairiepub does not help to improve on my doubts. Well, pulling pre-alpha software and expecting it to work out-of-the-box is a little crazy. [snipped whining] > See my message about the read-only before a modifiable version. Nobody > has explained it to me and I have worked three days on it to figure > out what's going on without success. I don't know what post you are refering to, but the likely reason nobody has answered it is because it is not a "smart question". See http://www.catb.org/~esr/faqs/smart-questions.html for details about what i mean. Also, when someone gives you a good detailed answer, responding as you did to this one will probably piss them off enough to not care about your problems anymore. you're welcome. drewc From jan at rychter.com Mon Aug 29 09:46:47 2005 From: jan at rychter.com (Jan Rychter) Date: Mon, 29 Aug 2005 11:46:47 +0200 Subject: [Bese-devel] Minor fixes Message-ID: Tiny annoyances, but one was causing an error when trying to use the httpd backend. --J. -------------- next part -------------- A non-text attachment was scrubbed... Name: jwr-ucw-fixes.patch Type: text/x-patch Size: 14589 bytes Desc: not available URL: From frido at q-software-solutions.de Mon Aug 29 10:07:55 2005 From: frido at q-software-solutions.de (Friedrich Dominicus) Date: Mon, 29 Aug 2005 12:07:55 +0200 Subject: Quick Lisp-on-Lines tutorial (was Re: [Bese-devel] yet another question (suggestion?)) In-Reply-To: <43139FB8.6060300@tech.coop> (Drew Crampsie's message of "Mon, 29 Aug 2005 16:52:24 -0700") References: <87irxt3snr.fsf@flarge.here> <43106736.3090005@tech.coop> <87ek8fsuy9.fsf@flarge.here> <43139FB8.6060300@tech.coop> Message-ID: <871x4d6op0.fsf@flarge.here> Drew Crampsie writes: > Friedrich Dominicus wrote: >> Drew Crampsie writes: >> >>>Friedrich Dominicus wrote: > >> Here's the requested stuff. I have however quite few questions: >> I have a clsq database model. Is it possible to just exchange >> def-view-class with the here mentioend macro? > > Might work, unless your model happens to use inheritance, in which > case not without adding support for inheritance to LoL. > >> I tried to get hairierpub running, but without tweaking the files it >> failed here: > > The version of hairiepub that is in that repo probably does not > build. The whole thing is in a big state of flux right now, and has > never been released anyway. Well I feel that is unfair, the README contains the following: > HairiePub requires LISP-ON-LINES, cl-l10n and POSTGRESQL > > Add the following lines to your /etc/postgres/pg_hba.conf > > ## HairiePub User > local all hairiepub password > host all hairiepub 127.0.0.1 255.255.255.255 password > > And then create a user and a database in postgres : > > template1=# CREATE USER hairiepub PASSWORD 'hp01'; > CREATE USER > template1=# CREATE DATABASE hairiepub OWNER hairiepub; > CREATE DATABASE > > Once you've done that you are ready to create that database. There is a file 'database/sql-schema.lisp'. Load it into a running lisp (i use C-c C-k in slime) to create the database. > > Make sure ASDF can see the system : > > drewc at osiris:~/.sbcl/systems $ ln -s /home/drewc/src/hairiepub/hairiepub.asd /home/drewc/.sbcl/systems/ > > > once you've done that, it should be a simple matter of running './bin/ucwctl start && ./bin/ucwctl attach' > > So I can't see that it's not supposed to work. > >> I'm (more and more) sceptical about the usefullness of ucw and sorry >> hairiepub does not help to improve on my doubts. > > Well, pulling pre-alpha software and expecting it to work > out-of-the-box is a little crazy. Well then you should at least mention it. > > [snipped whining] Well it was an exact description on all the things going wrong. So why do you start blaming me of whining? I send it to you because I though you might be interested, sorry for misjudging you. > I don't know what post you are refering to, but the likely reason > nobody has answered it is because it is not a "smart question". See > http://www.catb.org/~esr/faqs/smart-questions.html for details about > what i mean. Well I repeat this question that you got an idea. I don'f feel that the question was too dump. (defaction shop-login ((login shop-login) username password) (setf (login.username login) username (login.password login) password) (let* ((user-data (check-credentials login)) (shipping-adr (make-instance 'shipping-adr :adr (car (qss.db::shipping-address user-data))))) ;; car is needed because a join slot always returns a list! (inspect login) (inspect shipping-adr) (if shipping-adr (call 'customer-input-page :customer-data user-data :address shipping-adr :payment-details nil) (call 'info-message :message "Login failed")))) The shipping-adr class is defined this way: (defcomponent address-mixin () ((adr :initarg :adr :accessor adr :backtrack t :initform (make-instance 'qss.db::shipping-address))) (:metaclass standard-component-class)) ;; (forget-class :shipping-adr) (defclass shipping-adr (address-mixin) () (:metaclass standard-component-class)) If I inspect login I see the following: 0. CONTINUATION: (IT.BESE.ARNESI::TOPLEVEL-K) 1. CALLING-COMPONENT: # 2. PLACE: # that's ok, the shipping-adr has the following 0. CONTINUATION: "unbound" 1. CALLING-COMPONENT: "unbound" 2. PLACE: "unbound" which seems itself reasonable, but then I do the following (defmethod render-on ((res response) (customer-page customer-input-page)) (<:h1 "Your adress data: ") (render-on res (address customer-page))) which then calls this: (defmethod render-on ((res response) (adr shipping-adr)) (let ((address (adr adr))) (inspect adr) (. [Condition of type UNBOUND-SLOT] Restarts: 0: [SHOW-BACKTRACE] Send the client a backtrace page. 1: [RETRY] Clearout the response and retry calling the action. 2: [SERVER-ERROR] Send the client an internal server error page. 3: [GENERATE-BACKTRACE-FOR-EMACS] Generate a bug report in Emacs. That's of course true, but not what I like to see of course I'd like to call the next action and go on from there. So how am I supposed to build such a action-render-render-action chain? what i want is: checking the login credentials if the the customer can be found then show me his/her address if the data have changed allow to change them change the data display the changed data go on wiht the state as if he/she had not changed the address display e.g the payment terms the customer has taken. allow changes as needed etc. Help would be very appreciated. > > Also, when someone gives you a good detailed answer, responding as you > did to this one will probably piss them off enough to not care about > your problems anymore. Well I can not see in any message that I'd made someone down. Oh, well I asked dump question also but if I thought I had to ask them one can assume that I had my reasons. Now I'm getting a bit angry about your wording. I did spend a lot of time getting things going. I wrote > 30 k code to implement a shop solution. It took me a lot of work and I run into all kind of troubles. What I especially dislike about your wording is that you insnuate that I did not try. And what I dislike also is that it seems one is not allowed to criticize things. You made your stuff available as example I suppose. I tried it. I followed you instructions but it turned out that it won't work the intended way, I send you a long reply about the toubles, but instead of saying. "yeah, there are problems" are you starting flaming around. If you feel that is ok, well go for it. I won't bother you again. Friedrich From mb at bese.it Mon Aug 29 11:55:27 2005 From: mb at bese.it (Marco Baringer) Date: Mon, 29 Aug 2005 13:55:27 +0200 Subject: [Bese-devel] UTF-8 In-Reply-To: <871x4fcu1q.fsf@binarin.domain> (Alexey Lebedeff's message of "Sat, 27 Aug 2005 18:51:13 +0400") References: <871x4fcu1q.fsf@binarin.domain> Message-ID: Alexey Lebedeff writes: > Changes to ucw: > > - Allow to specify various external-formats for different purposes: > unescaping of urls, communication with slime and http. it seems that there's an encoding issue in my mailer (or someplace). would you mind gzip'ing this (so that mailers will leave the contents alone) and resending it as an attachement? -- -Marco Ring the bells that still can ring. Forget the perfect offering. There is a crack in everything. That's how the light gets in. -Leonard Cohen From mb at bese.it Mon Aug 29 11:56:11 2005 From: mb at bese.it (Marco Baringer) Date: Mon, 29 Aug 2005 13:56:11 +0200 Subject: [Bese-devel] yet another minor typo fix In-Reply-To: <4311C8C2.8010307@tech.coop> (Drew Crampsie's message of "Sun, 28 Aug 2005 07:22:58 -0700") References: <20050827224227.82832.qmail@web40628.mail.yahoo.com> <4311C8C2.8010307@tech.coop> Message-ID: Drew Crampsie writes: > it's "text/css", not "test/css" :). would you mind reseding the patch as an attachement (so that hopefully the various mailers involved won't screw up the contents of the patch)? -- -Marco Ring the bells that still can ring. Forget the perfect offering. There is a crack in everything. That's how the light gets in. -Leonard Cohen From binarin at agava.com Mon Aug 29 12:00:23 2005 From: binarin at agava.com (Alexey Lebedeff) Date: Mon, 29 Aug 2005 16:00:23 +0400 Subject: [Bese-devel] UTF-8 In-Reply-To: (Marco Baringer's message of "Mon, 29 Aug 2005 13:55:27 +0200") References: <871x4fcu1q.fsf@binarin.domain> Message-ID: <87y86lq7fs.fsf@binarin.domain> ## On Mon, 29 Aug 2005 13:55:27 +0200 ## you wrote: >> Changes to ucw: >> >> - Allow to specify various external-formats for different purposes: >> unescaping of urls, communication with slime and http. MB> it seems that there's an encoding issue in my mailer (or MB> someplace). would you mind gzip'ing this (so that mailers will leave MB> the contents alone) and resending it as an attachement? -------------- next part -------------- A non-text attachment was scrubbed... Name: ucw.CHANGESET.gz Type: application/octet-stream Size: 5411 bytes Desc: not available URL: -------------- next part -------------- -- [1180'99:11-6?] [BMSTU_-_fuck'??????_??:5-111] From mb at bese.it Mon Aug 29 12:05:53 2005 From: mb at bese.it (Marco Baringer) Date: Mon, 29 Aug 2005 14:05:53 +0200 Subject: [Bese-devel] UTF-8 In-Reply-To: <87y86lq7fs.fsf@binarin.domain> (Alexey Lebedeff's message of "Mon, 29 Aug 2005 16:00:23 +0400") References: <871x4fcu1q.fsf@binarin.domain> <87y86lq7fs.fsf@binarin.domain> Message-ID: applied. thanks. -- -Marco Ring the bells that still can ring. Forget the perfect offering. There is a crack in everything. That's how the light gets in. -Leonard Cohen From slawek.zak at gmail.com Mon Aug 29 12:33:09 2005 From: slawek.zak at gmail.com (Slawek Zak) Date: Mon, 29 Aug 2005 14:33:09 +0200 Subject: [Bese-devel] Compilation error with ACL 7 In-Reply-To: <20050828185913.3e86a073@localhost> References: <20050828185913.3e86a073@localhost> Message-ID: <787bbe1c050829053341ca2c75@mail.gmail.com> On 8/28/05, Julian Stecklina wrote: > Hello, > > I just tried to compile a current UCW with Allegro CL 7.0 on FreeBSD > and got: > > ;;; Compiling file /home/blitz/src/ucw/src/rerl/backtracking.lisp > ;;; Writing fasl file /home/blitz/src/ucw/src/rerl/backtracking.fasl > Error: Class # is not > yet finalized. > [condition type: PROGRAM-ERROR] It's a known problem. I've reported it to Marco. You can get around it by finalizing the classes manually during compilation with finalize-inheritance. /S From carlos.ungil at bluewin.ch Mon Aug 29 15:35:12 2005 From: carlos.ungil at bluewin.ch (Carlos Ungil) Date: Mon, 29 Aug 2005 17:35:12 +0200 Subject: Quick Lisp-on-Lines tutorial (was Re: [Bese-devel] yet another question (suggestion?)) In-Reply-To: <871x4d6op0.fsf@flarge.here> References: <87irxt3snr.fsf@flarge.here> <43106736.3090005@tech.coop> <87ek8fsuy9.fsf@flarge.here> <43139FB8.6060300@tech.coop> <871x4d6op0.fsf@flarge.here> Message-ID: <1f84f5672c39cf8e710095dd07a21bfe@bluewin.ch> Hello, On Aug 29, 2005, at 12:07 PM, Friedrich Dominicus wrote: > Well I feel that is unfair, the README contains the following: >> HairiePub requires LISP-ON-LINES, cl-l10n and POSTGRESQL >> .... > So I can't see that it's not supposed to work. >> Well, pulling pre-alpha software and expecting it to work >> out-of-the-box is a little crazy. > Well then you should at least mention it. Given that hairypub is based on lisp-on-lines, and lisp-on-lines' README file states that > This is a very early release, and there are more bugs [than] docs. HERE BE DRAGONS! you could have imagined that it wouldn't be terrible reliable. Cheers, Carlos PD: I hope Drew and Marco won't stop publishing their code for fear of complaints about incomplete or inaccurate documentation. From frido at q-software-solutions.de Mon Aug 29 16:28:14 2005 From: frido at q-software-solutions.de (Friedrich Dominicus) Date: Mon, 29 Aug 2005 18:28:14 +0200 Subject: Quick Lisp-on-Lines tutorial (was Re: [Bese-devel] yet another question (suggestion?)) In-Reply-To: <1f84f5672c39cf8e710095dd07a21bfe@bluewin.ch> (Carlos Ungil's message of "Mon, 29 Aug 2005 17:35:12 +0200") References: <87irxt3snr.fsf@flarge.here> <43106736.3090005@tech.coop> <87ek8fsuy9.fsf@flarge.here> <43139FB8.6060300@tech.coop> <871x4d6op0.fsf@flarge.here> <1f84f5672c39cf8e710095dd07a21bfe@bluewin.ch> Message-ID: <87mzn06735.fsf@flarge.here> Yes if you see it that way, you're right. So I better stay away from both I guess. Regards Friedrich From mb at bese.it Mon Aug 29 17:18:41 2005 From: mb at bese.it (Marco Baringer) Date: Mon, 29 Aug 2005 19:18:41 +0200 Subject: [Bese-devel] Minor fixes In-Reply-To: (Jan Rychter's message of "Mon, 29 Aug 2005 11:46:47 +0200") References: Message-ID: Jan Rychter writes: > New patches: > > [Add a missing argument. > Jan Rychter **20050829094338] { > hunk ./src/backend/httpd.lisp 500 > - headers body) > + (cdr it) headers body) > } Aleksandar Bakic's previous patch had already fixed this (the patch is infact exactly the same). what's the best thing (as far as using darcs is concrened) to do here, apply yours and the record a trivial merge-conflict patch or just not apply yours? -- -Marco Ring the bells that still can ring. Forget the perfect offering. There is a crack in everything. That's how the light gets in. -Leonard Cohen From jan at rychter.com Mon Aug 29 19:44:14 2005 From: jan at rychter.com (Jan Rychter) Date: Mon, 29 Aug 2005 21:44:14 +0200 Subject: [Bese-devel] Minor fixes In-Reply-To: (Marco Baringer's message of "Mon, 29 Aug 2005 19:18:41 +0200") References: Message-ID: Marco Baringer wrote: > Jan Rychter writes: > > New patches: > > > > [Add a missing argument. > > Jan Rychter **20050829094338] { > > hunk ./src/backend/httpd.lisp 500 > > - headers body) > > + (cdr it) headers body) > > } > > Aleksandar Bakic's previous patch had already fixed this (the patch is > infact exactly the same). what's the best thing (as far as using darcs > is concrened) to do here, apply yours and the record a trivial > merge-conflict patch or just not apply yours? No idea about darcs, but if I were you I'd just drop my patch. --J. From tim at fractaldragon.net Tue Aug 30 05:59:06 2005 From: tim at fractaldragon.net (Tim Lavoie) Date: Tue, 30 Aug 2005 00:59:06 -0500 Subject: [Bese-devel] Getting at higher-level state in contained components Message-ID: <20050830055905.GA15494@fractaldragon.net> Hi all, I've got a window component defined, where there are pieces which I would like to use to control other components, or the top-level window. It starts out basically like this: (defcomponent foo-window (template-component simple-window-component) ((nav1 :component side-nav1 :accessor foo-window.nav1) (body :component simple-container :accessor foo-window.body) (profile :component profile :accessor ww-profile)) ........ The body is the main content area, nav1 would be something like the typical side-bar navigation area, and profile is a user profile which I've changed from defaults to results from an SQL query once they've logged in. What I would like to do ideally is get a reference in one component to another, without manually hard-coding the path to use the appropriate number of parent links. This does work, but is fragile in the face of changing page structure. This allows me already to have navigation links do something to the main content area as an example, or get something from the profile. Is there a nice way to define this sort of find-in-parents behaviour already? It seems obvious, but I didn't find anything of the sort already. I think it would work well and allow arbitrary nesting without changing template code, which would be quite nice. Any suggestions? Thanks, Tim From pjb at informatimago.com Tue Aug 30 07:34:55 2005 From: pjb at informatimago.com (Pascal Bourguignon) Date: Tue, 30 Aug 2005 09:34:55 +0200 (CEST) Subject: [Bese-devel] can we do coroutines with cps? Message-ID: <20050830073455.A741510F9F6@thalassa.informatimago.com> With cps from ucw-0.3.9, I'm trying to implement coroutines suspend/resume: (defparameter *coroutine* (cons t t)) (defun/cc resume () (print `(:resume-1 *coroutine* = ,*coroutine*)) (setf (cdr *Coroutine*) t) (call/cc (car *coroutine*)) (print `(:resume-2 *coroutine* = ,*coroutine*))) (defun/cc suspend (escape) (print `(:suspend-1 *coroutine* = ,*coroutine*)) (setf (car *Coroutine*) (progn (setf (cdr *Coroutine*) nil) (call/cc (function identity)))) (print `(:suspend-2 *coroutine* = ,*coroutine*)) (unless (cdr *coroutine*) (funcall escape nil)) (print `(:suspend-3 *coroutine* = ,*coroutine*))) (defun/cc routine (escape) (let ((i 0)) (loop (print `(:routine *coroutine* = ,*coroutine*)) (print (incf i)) (suspend escape)))) (defun/cc f (dummy) (print `(:f *coroutine* = ,*coroutine*)) (call/cc (function routine))) (with-call/cc (progn (setf (car *Coroutine*) (function f)) (loop repeat 4 do (print :before) (resume) (print :after)))) Unfortunately this doesn't work: routine is not resumed. It seems the (call/cc (function identity)) doens't return the current continuation, but jumps to the end of with-call/cc: :BEFORE (:RESUME-1 *COROUTINE* = (#)) (:F *COROUTINE* = (# . T)) (:ROUTINE *COROUTINE* = (# . T)) 1 (:SUSPEND-1 *COROUTINE* = (# . T)) # Is it possible to do co-routines with arnesi cps? -- __Pascal Bourguignon__ http://www.informatimago.com/ Kitty like plastic. Confuses for litter box. Don't leave tarp around. From mb at bese.it Tue Aug 30 13:13:36 2005 From: mb at bese.it (Marco Baringer) Date: Tue, 30 Aug 2005 15:13:36 +0200 Subject: [Bese-devel] can we do coroutines with cps? In-Reply-To: <20050830073455.A741510F9F6@thalassa.informatimago.com> (Pascal Bourguignon's message of "Tue, 30 Aug 2005 09:34:55 +0200 (CEST)") References: <20050830073455.A741510F9F6@thalassa.informatimago.com> Message-ID: Pascal Bourguignon writes: > Unfortunately this doesn't work: routine is not resumed. It seems the > (call/cc (function identity)) doens't return the current continuation, > but jumps to the end of with-call/cc: there's a variable, *call/cc-returns* which controls this behaviour. try setting it t T and (after a recompile since it has effect at macro expansion time) see what happens. this should work (i consider this email a bug report), i'm now trying to figure out why the interpeter breaks on this. -- -Marco Ring the bells that still can ring. Forget the perfect offering. There is a crack in everything. That's how the light gets in. -Leonard Cohen From jan at rychter.com Tue Aug 30 13:33:37 2005 From: jan at rychter.com (Jan Rychter) Date: Tue, 30 Aug 2005 15:33:37 +0200 Subject: [Bese-devel] UCW guidance Message-ID: I need some guidance on what is the best way to design UCW applications: 1. I needed to enclose some components within a TAL template page. There is a menu/navigation bar and the main application area. I ended up defining a window object subclassing window-component and template-component. So far so good. But now I have two simple-container slots, one for the menu and one for the body. Each container slot in turn contains the menu component and the component that is the current body. This extra level of indirection (the simple-containers) seems unnecessary, but without it I couldn't figure out how to switch the body component. Any advice? 2. I'm using (defmethod shared-initialize :after...) to add my subcomponents to the main window-component (copied from the examples). Surely there has to be a better way? 3. When you have a three-step-process (say, a shopping cart checkout), would you rather implement three separate components that call each other or one component with internal (backtracked) state, going through the three states? 4. I believe this question is similar to the one posted earlier by Tim Lavoie. I ended up writing the following piece of code: (defaction switch-to ((component main-menu) new-label) (setf (selected-item component) new-label) (switch-component (main.body (ucw::parent (ucw::parent component))) new-label)) Needless to say, I find this to be rather ugly. There are two ucw::parent calls because of the extra level of indirection that I had to design in (see question 1), but even if it wasn't for that, I'd need at least one ucw::parent call. There surely is a better way? Also, I've just been bitten by the cps transformer -- I was trying to generate an (Tim Lavoie's message of "Tue, 30 Aug 2005 00:59:06 -0500") References: <20050830055905.GA15494@fractaldragon.net> Message-ID: Tim Lavoie writes: > Hi all, > > I've got a window component defined, where there are pieces which I > would like to use to control other components, or the top-level > window. > > It starts out basically like this: > > (defcomponent foo-window (template-component simple-window-component) > ((nav1 :component side-nav1 :accessor foo-window.nav1) > (body :component simple-container :accessor foo-window.body) > (profile :component profile :accessor ww-profile)) > > ........ > > The body is the main content area, nav1 would be something like the > typical side-bar navigation area, and profile is a user profile which > I've changed from defaults to results from an SQL query once they've > logged in. > > What I would like to do ideally is get a reference in one component to > another, without manually hard-coding the path to use the appropriate > number of parent links. This does work, but is fragile in the face of > changing page structure. This allows me already to have navigation > links do something to the main content area as an example, or get > something from the profile. at some point you're going to be forced to tell one component about the other component, and this is going to require, on some level, a hard coded path. that said it'd be easier for the nav component if you informed it about the body component, instead of having the nav bar's code littered with calls to (body (parent self)). (defcomponent navbar () ((nav-tree) (current-node) (body))) (defmethod render-on ((res response) (navbar navbar)) (dolist* (node nav-tree) ( Is there a nice way to define this sort of find-in-parents behaviour > already? It seems obvious, but I didn't find anything of the sort > already. I think it would work well and allow arbitrary nesting > without changing template code, which would be quite nice. Any > suggestions? could you be a bit more precise about what you want? we already have the parent accessor (every component knows what component its nested in) but something a well done navbar component would be a good idea as well. of course, it'd be built on top of a well done tree-view component... -- -Marco Ring the bells that still can ring. Forget the perfect offering. There is a crack in everything. That's how the light gets in. -Leonard Cohen From mb at bese.it Tue Aug 30 15:35:07 2005 From: mb at bese.it (Marco Baringer) Date: Tue, 30 Aug 2005 17:35:07 +0200 Subject: [Bese-devel] UCW guidance In-Reply-To: (Jan Rychter's message of "Tue, 30 Aug 2005 15:33:37 +0200") References: Message-ID: Jan Rychter writes: > I need some guidance on what is the best way to design UCW applications: > > 1. I needed to enclose some components within a TAL template page. There > is a menu/navigation bar and the main application area. I ended up > defining a window object subclassing window-component and > template-component. So far so good. But now I have two > simple-container slots, one for the menu and one for the body. Each > container slot in turn contains the menu component and the component > that is the current body. This extra level of indirection (the > simple-containers) seems unnecessary, but without it I couldn't > figure out how to switch the body component. Any advice? why make the navbar a container? could something like the component in the other mail (the one i just sent to Tim Lavoie) work? the body component you pass to navbar need not even be a contianer, all it needs is a switch-component method. > 2. I'm using (defmethod shared-initialize :after...) to add my > subcomponents to the main window-component (copied from the > examples). Surely there has to be a better way? the example-window should be written like this: (defcomponent example-window (simple-window-component) ((body :component (simple-container :current-component-name 'example-welcome :contents `((example-welcome . ,(make-instance 'example-welcome)) (counter . ,(make-instance 'counter)) (transaction-example . ,(make-instance 'transaction-example)) (example-form . ,(make-instance 'example-form)) (sum . ,(make-instance 'sum)) (presentations-example . ,(make-instance 'presentations-example)) (file-upload-example . ,(make-instance 'file-upload-example)))) :accessor example-window.body))) no, i don't know why it's not already done that way and yes, this could be improved on. > 3. When you have a three-step-process (say, a shopping cart checkout), > would you rather implement three separate components that call each > other or one component with internal (backtracked) state, going > through the three states? personally i prefer the former (three components) especially since people (like those pesky clients) keep changing the order of things and it's easier for me to move three seperate component around in a single action than change the state handling in a single component. > 4. I believe this question is similar to the one posted earlier by Tim > Lavoie. I ended up writing the following piece of code: > > (defaction switch-to ((component main-menu) new-label) > (setf (selected-item component) new-label) > (switch-component (main.body (ucw::parent (ucw::parent component))) new-label)) > > Needless to say, I find this to be rather ugly. There are two > ucw::parent calls because of the extra level of indirection that I had > to design in (see question 1), but even if it wasn't for that, I'd need > at least one ucw::parent call. There surely is a better way? i'd do it like so: (defaction switch-to ((menu main-menu) new-label) (setf (selected-item menu) new-label (container.current-component-name (controlled-component menu)) label)) setting up the controlled-component slot should be done in the shared-initialize method of the component which contains the navbar (and presumably the 'content' component). if this seems like a good idea (at the very least better than the nothing we have now) i'll implement it in the example app. > Also, I've just been bitten by the cps transformer -- I was trying to > generate an out that using dolist instead of loop solves my problem... (I guess this > is to be expected in the ucw_dev branch and will change with the cps > interpreter?) no, the 'fresh-binding' vs. 'one-binding+modification' is a buch deeper issue i can't really "fix." as odd as it may seem the current effect is what is supposed to happen. > Any advice would be much appreciated! i hope this helps. the more info (doubts, questions, other possiblities) the better i can help and the more ideas we can bounce around. i think i've said this in the past but i'll repeat it here just in case. component based continuation enabled web frameworks (libraries, platform whatever the hell they're called today) are young (ucw especially so). i do not know what the 'right' answer to these questions could be: never ever believe that i know what i'm talking about. -- -Marco Ring the bells that still can ring. Forget the perfect offering. There is a crack in everything. That's how the light gets in. -Leonard Cohen From mb at bese.it Tue Aug 30 15:52:31 2005 From: mb at bese.it (Marco Baringer) Date: Tue, 30 Aug 2005 17:52:31 +0200 Subject: [Bese-devel] patches Message-ID: i just push'd all the patches i've recieved in the past few days (arnesi, ucw and yaclml stuff). i made a bit a mess of the emails and the patches and i'm pretty sure i forgot something, not that i can figure out what... if there's a patch you sent which i haven't applied would you mind reminding me about it? p.s. - how cool is it to have this problem? :) -- -Marco Ring the bells that still can ring. Forget the perfect offering. There is a crack in everything. That's how the light gets in. -Leonard Cohen From asbjxrn at bjxrnstad.net Tue Aug 30 16:28:03 2005 From: asbjxrn at bjxrnstad.net (=?ISO-8859-1?Q?Asbj=F8rn_Bj=F8rnstad?=) Date: Wed, 31 Aug 2005 00:28:03 +0800 Subject: [Bese-devel] UCW guidance In-Reply-To: References: Message-ID: <531E4BD0-FA00-4535-A685-6F0637C5AE18@bjxrnstad.net> On 30 Aug 2005, at 11:35 PM, Marco Baringer wrote: > Jan Rychter writes: >> 4. I believe this question is similar to the one posted earlier by >> Tim >> Lavoie. I ended up writing the following piece of code: >> >> (defaction switch-to ((component main-menu) new-label) >> (setf (selected-item component) new-label) >> (switch-component (main.body (ucw::parent (ucw::parent >> component))) new-label)) >> >> Needless to say, I find this to be rather ugly. There are two >> ucw::parent calls because of the extra level of indirection that I >> had >> to design in (see question 1), but even if it wasn't for that, I'd >> need >> at least one ucw::parent call. There surely is a better way? >> > > i'd do it like so: > > (defaction switch-to ((menu main-menu) new-label) > (setf (selected-item menu) new-label > (container.current-component-name (controlled-component > menu)) label)) > > setting up the controlled-component slot should be done in the > shared-initialize method of the component which contains the navbar > (and presumably the 'content' component). > > if this seems like a good idea (at the very least better than the > nothing we have now) i'll implement it in the example app. The way I've done it is to have a slot "top-pane" in all components and work my way down the tree. That way I can access different containers depending on need. For example switching the content-pane becomes something like: (defmacro bodyswitch-link (label component) `( References: <20050830055905.GA15494@fractaldragon.net> Message-ID: <20050830164030.GA30979@fractaldragon.net> On Tue, Aug 30, 2005 at 05:14:53PM +0200, Marco Baringer wrote: > > > > What I would like to do ideally is get a reference in one component to > > another, without manually hard-coding the path to use the appropriate > > number of parent links. This does work, but is fragile in the face of > > changing page structure. This allows me already to have navigation > > links do something to the main content area as an example, or get > > something from the profile. > > at some point you're going to be forced to tell one component about > the other component, and this is going to require, on some level, a > hard coded path. that said it'd be easier for the nav component if you > informed it about the body component, instead of having the nav bar's > code littered with calls to (body (parent self)). Yeah, that's why I asked. I had tested out the idea with some (body (parent self)) -type code in the TAL template for the nav component, but wasn't thrilled with it. > > (defcomponent navbar () > ((nav-tree) > (current-node) > (body))) > > (defmethod render-on ((res response) (navbar navbar)) > (dolist* (node nav-tree) > ( (<:as-html (title node))))) > > and then in the window's shard-initialize tell the navbar what > component it should control: > > (defmethod shard-initialize :after ((foo foo-window) slot-names &rest ignore) > (setf (body (navbar foo)) (body foo))) > > could that work? (i'm not really sure what answer you want here (and > there are 1e20 possibilities) so i'm just guessing). Yes, I think that should work fine, and is certainly more direct than what I had been thinking; rather than simply coding in the reference as you showed here, I started playing with the idea of a method to follow the chain of (parent self) calls until either the top is reached, or the desired component found. I suspect I won't be doing the sort of nesting to make this approach really needed, so I'll try your way first. > > Is there a nice way to define this sort of find-in-parents behaviour > > already? It seems obvious, but I didn't find anything of the sort > > already. I think it would work well and allow arbitrary nesting > > without changing template code, which would be quite nice. Any > > suggestions? > > could you be a bit more precise about what you want? we already have > the parent accessor (every component knows what component its nested > in) but something a well done navbar component would be a good idea as > well. of course, it'd be built on top of a well done tree-view > component... Heh. I'll try the simple and expedient method for the time being, but you are right, there is room for a couple of helpful widgets. Thanks, Tim -- I've finally learned what "upward compatible" means. It means we get to keep all our old mistakes. -- Dennie van Tassel From jan at rychter.com Wed Aug 31 07:30:25 2005 From: jan at rychter.com (Jan Rychter) Date: Wed, 31 Aug 2005 09:30:25 +0200 Subject: [Bese-devel] UCW file upload example In-Reply-To: (Marco Baringer's message of "Thu, 21 Jul 2005 16:45:05 +0200") References: Message-ID: [replying to a fairly old thread...] >>>>> "Marco" == Marco Baringer : Marco> Mac Chan writes: >> Hi, >> >> I was unable to run the file upload example. Upon playing around >> with the sample code for a while I figured it out. >> >> Please see the attached diff. Marco> thakn you. >> I'm building a site for teachers to upload multimedia contents which >> can be upward of 100mb+ files. The way ucw stores uploaded content >> in memory cannot cut it. Marco> no, it definetly can't. but even if it could wouldn't it be Marco> better to use something like ftp (or any protocol which allows Marco> resumes) for files that big? >> TBNL implemented a hack (write-content-to-file t) where they put a >> hook in cl-rfc2388 to allow writing uploaded content to file >> directly. Since it's a hack (TBNL manages the file creation, >> uploaded contents itself) for TBNL only, it is not usable for other >> frameworks. >> >> Even if it does, I do not have a good idea of how to incorporate >> this into ucw cleanly. Marco> just change the mime-part object (i took a quick walk through Marco> the backend code it shouldn't be very hard at all). Has anybody worked on this? I've just hit the same problem. On a gigabit or fast ethernet LAN uploading files 1GB in size really isn't an issue -- and users really want it to be simple (meaning: no FTP, just in-browser buttons). --J. From mb at bese.it Wed Aug 31 11:49:56 2005 From: mb at bese.it (Marco Baringer) Date: Wed, 31 Aug 2005 13:49:56 +0200 Subject: [Bese-devel] UCW file upload example In-Reply-To: (Jan Rychter's message of "Wed, 31 Aug 2005 09:30:25 +0200") References: Message-ID: Jan Rychter writes: > Has anybody worked on this? I've just hit the same problem. i will need it soon-ish (mid september maybe) so it'll happen around then, but i can't dedicate any time to it now. > On a gigabit or fast ethernet LAN uploading files 1GB in size really > isn't an issue -- and users really want it to be simple (meaning: no > FTP, just in-browser buttons). too true. -- -Marco Ring the bells that still can ring. Forget the perfect offering. There is a crack in everything. That's how the light gets in. -Leonard Cohen From frido at q-software-solutions.de Wed Aug 31 14:58:34 2005 From: frido at q-software-solutions.de (Friedrich Dominicus) Date: Wed, 31 Aug 2005 16:58:34 +0200 Subject: [Bese-devel] small patch suggestion Message-ID: <87psrurw4l.fsf@flarge.here> After Drew has put me in the ground (to some extend he's right) here's a small addition to form.lisp. I'm not sure if it's good idea, or if it would be better to derive another component, but I feel if things are available in standard HTML they should be easy accessible to Common Lisp also I guess it's clear what the patch is supposed to do. It should limit the entry field length, I replaces the nil :initform to size because I do not think that size could be anything else but a number. I tried this patch here and it "seems" to be ok. So feel free to ignore or apply this patch Marco. The numbers are arbitrary, I do not know if there is a useful default for it. BTW. I'm quite happy that UCW exists, but I feld and sometimes feel lost in it's usage. Regards Friedrich --- form.lisp.2005-08-31 2005-08-20 13:45:59.000000000 +0200 +++ form.lisp 2005-08-31 16:47:24.000000000 +0200 @@ -52,12 +52,14 @@ ;;;; Generic Text (defclass text-field (form-element) - ((size :accessor size :initarg :size :initform nil)) + ((size :accessor size :initarg :size :initform 0) + (maxlength :accessor maxlength :initarg :maxlength :initform 20)) (:metaclass standard-component-class)) (defmethod render-on ((res response) (field text-field)) (