From jan at rychter.com Wed Feb 1 10:43:16 2006 From: jan at rychter.com (Jan Rychter) Date: Wed, 01 Feb 2006 11:43:16 +0100 Subject: [Bese-devel] looking for advice: mixing applications and other content Message-ID: I'm building a site where I'd like to have optional users sessions. Only one part of this site is an "application", the rest could be easily implemented with simple PHP. The non-application part should have persistent, externally accessible URLs. The non-application part is not static for the most part, so simple file serving won't do. I'd like to use yaclml or TAL to generate most of the content there, some dynamically and some offline. How do people deal with this using UCW? I've pondered running araneida with TBNL and UCW, but it seems like overkill. Any advice? --J. From henrik at evahjelte.com Wed Feb 1 12:07:33 2006 From: henrik at evahjelte.com (Henrik Hjelte) Date: Wed, 01 Feb 2006 13:07:33 +0100 Subject: [Bese-devel] Parenscript patches Message-ID: <1138795653.9481.80.camel@localhost.localdomain> 1. A nicer and lispier CASE statement. The old case was really a javascript Switch. I have renamed the old case version to Switch instead if some masochist wants it. This patch may break old code, if old case statements are not changed to switch. 2. re2test finds reference.lisp in its new location in docs directory. reference.lisp is updated but I still can't make the pdf documentation. There are styles missing and all sorts of errors, see below... /Henrik Hjelte python pbook.py -o tutorial.pdf tutorial.lisp cd /tmp; latex pbookQpzjd_.tex && pdflatex pbookQpzjd_.tex This is e-TeX, Version 3.14159-2.1 (Web2C 7.4.5) entering extended mode (./pbookQpzjd_.tex LaTeX2e <2001/06/01> Babel and hyphenation patterns for american, french, german, ngerman, b ahasa, basque, catalan, croatian, czech, danish, dutch, finnish, greek, iceland ic, irish, italian, latin, magyar, norsk, norsk, portuges, romanian, russian, s lovak, slovene, spanish, swedish, turkish, ukrainian, nohyphenation, loaded. (/usr/share/texmf/tex/latex/base/article.cls Document Class: article 2001/04/21 v1.4e Standard LaTeX document class (/usr/share/texmf/tex/latex/base/size10.clo)) ! LaTeX Error: File `fancyvrb.sty' not found. .... and more... -------------- next part -------------- New patches: [changed CASE to SWITCH and made CASE more like Lisp. henrik.hjelte at poboxes.com**20051227190529] { hunk ./src/js.lisp 1117 -(defjsclass js-case (statement) +(defjsclass js-switch (statement) hunk ./src/js.lisp 1121 -(define-js-compiler-macro case (value &rest clauses) +(define-js-compiler-macro switch (value &rest clauses) hunk ./src/js.lisp 1131 - (make-instance 'js-case :value check + (make-instance 'js-switch :value check hunk ./src/js.lisp 1134 -(defmethod js-to-statement-strings ((case js-case) start-pos) +(defmethod js-to-statement-strings ((case js-switch) start-pos) hunk ./src/js.lisp 1154 + +(defjsmacro case (value &rest clauses) + (labels ((make-clause (val body more) + (cond ((listp val) + (append (mapcar #'list (butlast val)) + (make-clause (first (last val)) body more))) + ((member val '(t otherwise)) + (make-clause 'default body more)) + (more `((,val , at body break))) + (t `((,val , at body)))))) + `(switch ,value ,@(mapcon #'(lambda (x) + (make-clause (car (first x)) + (cdr (first x)) + (rest x))) + clauses)))) hunk ./t/reference-tests.lisp 403 - (1 (alert "one")) + ((1 "one") (alert "one")) merger 0.0 ( hunk ./t/reference-tests.lisp 405 - (default (alert "default clause"))) + (default (alert "default clause"))) hunk ./t/reference-tests.lisp 405 - (default (alert "default clause"))) + (t (alert "default clause"))) ) hunk ./t/reference-tests.lisp 407 - case 1: alert('one'); - case 2: alert('two'); + case 1: ; + case 'one': + alert('one'); + break; + case 2: + alert('two'); + break; hunk ./t/reference-tests.lisp 415 +}") + +(test-ps-js the-case-statement-2 + (switch (aref blorg i) + (1 (alert "If I get here")) + (2 (alert "I also get here")) + (default (alert "I always get here"))) + "switch (blorg[i]) { + case 1: alert('If I get here'); + case 2: alert('I also get here'); + default: alert('I always get here'); hunk ./docs/reference.lisp 761 +;;;t \index{SWITCH} hunk ./docs/reference.lisp 766 -; clause ::= (value body) +; clause ::= (value body) | ((value*) body) | t-clause hunk ./docs/reference.lisp 769 +; t-clause ::= {t | otherwise | default} body hunk ./docs/reference.lisp 774 -;;; ParenScript. The default case is not named `T' in ParenScript, but -;;; `DEFAULT' instead. +;;; ParenScript. hunk ./docs/reference.lisp 777 - (1 (alert "one")) + ((1 "one") (alert "one")) hunk ./docs/reference.lisp 779 - (default (alert "default clause"))) + (t (alert "default clause"))) hunk ./docs/reference.lisp 781 - case 1: alert('one'); - case 2: alert('two'); + case 1: ; + case 'one': + alert('one'); + break; + case 2: + alert('two'); + break; hunk ./docs/reference.lisp 790 + +; (SWITCH case-value clause*) +; clause ::= (value body) | (default body) + +;;; The `SWITCH' form is the equivalent to a javascript switch statement. +;;; No break statements are inserted, and the default case is named `DEFAULT'. +;;; The `CASE' form should be prefered in most cases. + +(switch (aref blorg i) + (1 (alert "If I get here")) + (2 (alert "I also get here")) + (default (alert "I always get here"))) + => switch (blorg[i]) { + case 1: alert('If I get here'); + case 2: alert('I also get here'); + default: alert('I always get here'); + } + hunk ./t/test.lisp 77 +(test-ps-js old-case-is-now-switch + ;; Switch was "case" before, but that was very non-lispish. + ;; For example, this code makes three messages and not one + ;; which may have been expected. This is because a switch + ;; statment must have a break statement for it to return + ;; after the alert. Otherwise it continues on the next + ;; clause. + (switch (aref blorg i) + (1 (alert "one")) + (2 (alert "two")) + (default (alert "default clause"))) + "switch (blorg[i]) { + case 1: alert('one'); + case 2: alert('two'); + default: alert('default clause'); + }") + +(test-ps-js lisp-like-case + (case (aref blorg i) + (1 (alert "one")) + (2 (alert "two")) + (default (alert "default clause"))) + "switch (blorg[i]) { + case 1: + alert('one'); + break; + case 2: + alert('two'); + break; + default: alert('default clause'); + }") + + +(test-ps-js even-lispier-case + (case (aref blorg i) + ((1 2) (alert "Below three")) + (3 (alert "Three")) + (t (alert "Something else"))) + "switch (blorg[i]) { + case 1: ; + case 2: + alert('Below three'); + break; + case 3: + alert('Three'); + break; + default: alert('Something else'); + }") + +(test-ps-js otherwise-case + (case (aref blorg i) + (1 (alert "one")) + (otherwise (alert "default clause"))) + "switch (blorg[i]) { + case 1: + alert('one'); + break; + default: alert('default clause'); + }") + } [ref2test finds reference.lisp in docs dir henrik.hjelte at poboxes.com**20060201111712] { hunk ./t/ref2test.lisp 4 -(defparameter +reference-file+ (make-pathname :name "reference" - :type "lisp" - :defaults *load-truename*)) +(defparameter +reference-file+ (merge-pathnames + (make-pathname :directory '(:relative :back "docs")) + (make-pathname :name "reference" + :type "lisp" + :defaults *load-truename*))) + + hunk ./t/ref2test.lisp 73 - (format out-stream "(test-ps-js ~a-~a ~% ~a ~% \"~a\")~%~%" + (format out-stream "(test-ps-js ~a-~a~% ~a~% \"~a\")~%~%" hunk ./t/reference-tests.lisp 405 - (default (alert "default clause"))) + (t (alert "default clause"))) hunk ./t/reference-tests.lisp 417 -(test-ps-js the-case-statement-2 +(test-ps-js the-case-statement-2 hunk ./t/reference-tests.lisp 421 - (default (alert "I always get here"))) + (default (alert "I always get here"))) } Context: [merge parenscript-test.asd into parenscript.asd Luca Capello **20060127085709] [move doc files to docs/ Luca Capello **20060123222548] [move test files to t/ and modify parenscript-test.asd as well Luca Capello **20060123215026] [move source files to src/ and modify parenscript.asd as well Luca Capello **20060123213152] [remove trailing spaces at endlines in *.lisp Luca Capello **20060123211927] [remove trailing spaces at empty lines in *.lisp Luca Capello **20060122215742] [pbook.py: convert endlines to Unix format Luca Capello **20060122211704] [css-inline compiles with cmucl henrik.hjelte at poboxes.com**20060109113602] [New function gen-js-name-string Marco Baringer **20051219160435 This allows you to get a unique javascript name as a string and not just as a symbol. ] [bugfix slot-value henrik.hjelte at poboxes.com**20051219131901] [bug in dwim-join henrik.hjelte at poboxes.com**20051218171724] [css-inline generator henrik.hjelte at poboxes.com**20051218111426] [cleaned reference henrik.hjelte at poboxes.com**20051217095257] [tests from the reference henrik.hjelte at poboxes.com**20051216180844] [quotes in introduction henrik.hjelte at poboxes.com**20051216153949] [Added defgenerics for all the defmethods Alan-Shields at omrf.ouhsc.edu**20051201191709 Ze style warnings! Zey drive me craaaazy. ] [enable #+parenscript Alan-Shields at omrf.ouhsc.edu**20051115235351 To integrate Parenscript with Araneida without requiring Parenscript, I had to do some compile conditionals. This would make it much easier. Marco, eventually I am going to add this to every last one of your projects. ;-p ] [need a function for css-inlining Alan-Shields at omrf.ouhsc.edu**20051115235233 If you have code that needs to inline CSS across an array, it's difficult to use the current macro. Having a function helps - mapping the macro to the function only completes things. ] [Proper concatenation of inline CSS Alan-Shields at omrf.ouhsc.edu**20051115234812 CSS-INLINE does a simple concatenation of the results of CSS directives. This looks like: color:blacksize:200% Unfortunately, it should look like this: color:black;size:200% It now does. ] [added COPYING file Luca Capello **20051107123047] [Escape { and } chars in boring regexps Marco Baringer **20051107102118] [Need to escape #\' in javascript strings Marco Baringer **20051005090942] [Fix buf in JS-INLINE causing infinite macro expansion Marco Baringer **20051005082900] [Add in checks to deal with functions/macros whose names aren't symbols Marco Baringer **20050912081700] [Use strings, and not symbols, to name javascript functions/macros Marco Baringer **20050905082735 This effectivly flattens the namespace of javascript code. While this change makes js similar to javascript, and removes the need to export symbols from the JS package, it may break previous code which depended on, for expample, js:and not being equivalent to js:and. ] [Added support for literal objects ( "{ ... }" syntax) Marco Baringer **20050905081702] [Export cen-js-names and with-unique-js-names Marco Baringer **20050831115820] [Added docstrings to previous patch Marco Baringer **20050815135128] [Added GEN-JS-NAME and WITH-UNIQUE-JS-NAMES Marco Baringer **20050815134940] [dotimes-dolist-fix Ivan Toshkov **20050815080906 Fixes the infinite loop problems of `dotimes' and `dolist'. ] [Parenscript, documentation not withstandanding, does not depend on htmlgen Marco Baringer **20050815080053] [Attempt to improve the conversion of (js ((lambda ...) ...)) Marco Baringer **20050815074902] [Introduce the JS-LAMBDA class. Make JS-DEFUN a subclass of JS-LAMBDA Marco Baringer **20050815074836] [Implement JS and JS-INLINE in terms of JS* and JS-INLINE* Marco Baringer **20050815063921] [Symbols starting with #\: are left as is, no case conversion or other mangling Marco Baringer **20050814141629] [Added JS* and JS-INLINE*. Marco Baringer **20050814134534] [Javascript strings need to be quated with ' and not " to avoid interfering with the surrounding HTML. Marco Baringer **20050814134344] [Ugly hack to support ((lambda ...) ...) Marco Baringer **20050813142023] [Mention that I'm maintaining this version of parenscript Marco Baringer **20050813135238] [Rename the system/package in the system definition, just renaming the file doesn't cut it :(. Marco Baringer **20050813135107] [Added images used in documentation Marco Baringer **20050813134441] [Added the pbook.py file used to generate the documentation Marco Baringer **20050813133732] [Added declare ignore forms for unused function arguments Marco Baringer **20050808154843] [Rename system def Marco Baringer **20050808154836] [Setup boringfile Marco Baringer **20050726100549] [Added files from parenscript 0.1.0 as distributed by Manuel Odendahl Marco Baringer **20050726100416] Patch bundle hash: 95099fc7c27d4b068d569c8005265a171003704c From mb at bese.it Wed Feb 1 12:23:35 2006 From: mb at bese.it (Marco Baringer) Date: Wed, 01 Feb 2006 13:23:35 +0100 Subject: [Bese-devel] Re: latest version of arnesi In-Reply-To: References: Message-ID: Ignas Mikalajunas wrote: > As these are unofficial package packages of arnesi, yaclml the only > way to update them is to bug me or repackage them yourselves. if you're willing to package arnesi, yaclml (or even ucw) i'll be more than happy to give you write acces to ucw's web space (and darcs repo so we can tag these). -- -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 Feb 1 12:26:37 2006 From: mb at bese.it (Marco Baringer) Date: Wed, 01 Feb 2006 13:26:37 +0100 Subject: [Bese-devel] Re: Parenscript patches In-Reply-To: <1138795653.9481.80.camel@localhost.localdomain> References: <1138795653.9481.80.camel@localhost.localdomain> Message-ID: Henrik Hjelte wrote: > 1. A nicer and lispier CASE statement. The old case was really a > javascript Switch. I have renamed the old case version to Switch instead > if some masochist wants it. > This patch may break old code, if old case statements are not changed to > switch. > > 2. re2test finds reference.lisp in its new location in docs directory. > > reference.lisp is updated but I still can't make the pdf documentation. > There are styles missing and all sorts of errors, see below... 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 Wed Feb 1 12:35:55 2006 From: mb at bese.it (Marco Baringer) Date: Wed, 01 Feb 2006 13:35:55 +0100 Subject: [Bese-devel] Re: Adding a new slot-presentation In-Reply-To: <87u0bphhbv.fsf@core.gen.tr> References: <87u0bphhbv.fsf@core.gen.tr> Message-ID: Aycan iRiCAN wrote: > Hi, > > I wanted to make a textarea with a javascript wysiwyg editor (tinymce) for a simple > content editing task. > > (ucw::defslot-presentation text-content-slot-presentation () > ((cols :accessor cols :initarg :cols :initform 40) > (rows :accessor rows :initarg :rows :initform 20)) > (:type-name text-content)) this looks good. > Execution of a form compiled with errors. > Form: > (SLOT-PRESENTATIONS > (STRING LABEL Title SLOT-NAME 'TITLE MAX-LENGTH 30 EDITABLEP NIL) > (TEXT-CONTENT LABEL Content SLOT-NAME 'DATA EDITABLEP NIL)) > > Compile-time-error: > (in macroexpansion of (SLOT-PRESENTATIONS # #)) > (hint: For more precise location, try *BREAK-ON-SIGNALS*.) Unknown > slot type TEXT-CONTENT. the "Unknown slot type TEXT-CONTENT" error is given when we don't find the mapping your-package::text-content in ucw::*slot-type-mapping*. if, after executing the defslot-presentation-form, the ucw::*slot-type-mapping* variable (a hash table), doesn't cantain an entry for text-content then you've triggered a bug in ucw. not however that ucw::*slot-type-mapping* is read at compile and not run time. > This is probably because text-content is defined in ucw > package. What is the proper way to add new slot-presentations? text-content is not, unless you explicity add ucw:: in your code, defined in the ucw package (even though it's held in a hash table bound to a name in the ucw package) and you are, theoreticaly, doing the right thing. could you quickly test and look at ucw::*slot-type-mapping* after executing the defslot-presentation form? -- -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 Feb 1 12:37:21 2006 From: mb at bese.it (Marco Baringer) Date: Wed, 01 Feb 2006 13:37:21 +0100 Subject: [Bese-devel] Re: presentations.lisp In-Reply-To: <43D3D643.6020007@core.gen.tr> References: <43D3D643.6020007@core.gen.tr> Message-ID: Evrim ULU wrote: > Hi Marco, > > I've noticed that there is no ":" before "instance" (for initializing arguments). the idea, once upon a time, was that user code sholud not ever need to initialize the instance of a presentation object (hence the use of an internal symbol and not a keyword). i admit to doing exactly this in my own code so maybe it's time to change that from instance to :instance. -- -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 Feb 1 12:48:02 2006 From: mb at bese.it (Marco Baringer) Date: Wed, 01 Feb 2006 13:48:02 +0100 Subject: [Bese-devel] Re: looking for advice: mixing applications and other content In-Reply-To: References: Message-ID: Jan Rychter wrote: > The non-application part is not static for the most part, so simple file > serving won't do. I'd like to use yaclml or TAL to generate most of the > content there, some dynamically and some offline. > > How do people deal with this using UCW? with a macro like this: this is not the actual code i use (i don't have that code at hand on this machine) but it's the general idea. (defmacro deftalpage (url args &optional (template-name url)) "defines an entry-point for url which calls a template and puts all of the query-params passed to the url into the page's tal environement (for easy access via the $foo syntax" `(progn (defcomponent ,(intern url :my-package) (template-component window-component) ((args :initarg :args)) (:default-initargs :template-name ,template-name)) (defentry-point ,url (:application *my-app*) ,args (call ',(intern url :my-package) :args (list ,@(mapcar (lambda (a) (if (listp a) (first a) a)) args)))) (defmethod template-component-environment nconc ((template ,(intern url :my-package))) (slot-value template 'args)) ',url)) and then lots of these: (deftalpage "" () "index.tal") (deftalpage "product" (p-id sku-id) "catalog/product.tal") (deftalpage "news" (news-id) "content/news.tal") > I've pondered running araneida with TBNL and UCW, but it seems like > overkill. if we could get ucw to drop the session/frame stuff for certain entry-points then i'd agree. until then there is an overhead difference between the two which may (or may not) make the difference 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 henrik at evahjelte.com Wed Feb 1 12:56:05 2006 From: henrik at evahjelte.com (Henrik Hjelte) Date: Wed, 01 Feb 2006 13:56:05 +0100 Subject: [Bese-devel] AJAX teaser In-Reply-To: <43DFD361.2080905@core.gen.tr> References: <43D59F1F.5060001@tech.coop> <1138095925.9072.66.camel@localhost.localdomain> <43DECD9A.9090107@core.gen.tr> <1138710766.9481.50.camel@localhost.localdomain> <43DFD361.2080905@core.gen.tr> Message-ID: <1138798565.9481.118.camel@localhost.localdomain> On tis, 2006-01-31 at 23:15 +0200, Evrim ULU wrote: > Assume a button changes the color of a dojo component, one may use > javascript methods to set the style of the component. I'm looking for a > solution to send these style changes to server, if it is the case with > LiveConnect (java+js ipc) it seems its easy. Just pass the style objects > and persist it. Other types of data may need also persistence. > > I couldn't figure out how to do this with dojo,ucw. It takes time.. > Do you have any > idea? Then I may use ajax to transport data and i'll be very cool:) I'm finishing a little Lisp library for the Json data format, which is really convenient for this. Coming very soon... Use parenscript. Use dojo.io.bind to send a string (for example json) as a get parameter. Collect the string in UCW. Be inspired by the Ajax teaser from Hoan Ton-That or the macros / LoL from Drew Crampsie, or my code below. /Henrik Hjelte My version in an experimental state looks like this: in a render method: (defmethod render ((p user-page)) ;; Do stuff ;; Use this url for dojo.io.bind, send parameters as "content" (action-href (lambda () (some-ajax-fn p))) Another method: (defmethod some-ajax-fn((p user-page)) ;; grab a get parameter ;; Do stuff with it, return msg back to javascript (setf (context.window-component *context*) (make-instance 'ajax-answer :text msg)) ) (defun ajax-request-parameter(parameter-name) (ucw::get-parameter (ucw::context.request *context*) parameter-name)) (defcomponent ajax-answer (window-component) ((text :initarg :text :accessor ajax-answer.text)) (:default-initargs :content-type "text/plain")) (defmethod render((a ajax-answer)) (<:as-is (ajax-answer.text a))) From luca at pca.it Wed Feb 1 13:43:08 2006 From: luca at pca.it (Luca Capello) Date: Wed, 01 Feb 2006 14:43:08 +0100 Subject: [Bese-devel] Parenscript patches In-Reply-To: <1138795653.9481.80.camel@localhost.localdomain> References: <1138795653.9481.80.camel@localhost.localdomain> Message-ID: <87psm742kz.fsf@gismo.pca.it> Hello! On Wed, 01 Feb 2006 13:07:33 +0100, Henrik Hjelte wrote: > 2. re2test finds reference.lisp in its new location in docs > directory. Ops, I forgot that one when I moved the docs... Thank you! > reference.lisp is updated but I still can't make the pdf > documentation. There are styles missing and all sorts of errors, > see below... [...] > python pbook.py -o tutorial.pdf tutorial.lisp ^^^^^^^^^^^^^^^ You don't necessarily need to specify the output if the name is the same as the lisp file, because this is the default output ;-) > ! LaTeX Error: File `fancyvrb.sty' not found. > .... and more... I bet this is a problem with your LaTeX environment. On my Debian unstable, I can successfully create the documentation, provided that I copy the docs/images/ folder to /tmp (I guess this is a Debian-specific behaviour, i.e., creating temporary pdf in /tmp, as in [1]). ===== luca at gismo:~/Hacking/cl-debian/repository/parenscript-upstream/docs$ \ cp -r images/ /tmp/ luca at gismo:~/Hacking/cl-debian/repository/parenscript-upstream/docs$ \ python pbook.py tutorial.lisp cd /tmp; latex pbookHpT1d_.tex && pdflatex pbookHpT1d_.tex This is pdfeTeX, Version 3.141592-1.21a-2.2 (Web2C 7.5.4) entering extended mode (./pbookHpT1d_.tex LaTeX2e <2003/12/01> [...] Transcript written on pbookHpT1d_.log. Wrote output to tutorial.pdf luca at gismo:~/Hacking/cl-debian/repository/parenscript-upstream/docs$ \ locate fancyvrb.sty /usr/share/texmf-tetex/tex/latex/fancyvrb/fancyvrb.sty luca at gismo:~/Hacking/cl-debian/repository/parenscript-upstream/docs$ \ dlocate fancyvrb.sty tetex-extra: /usr/share/texmf-tetex/tex/latex/fancyvrb/fancyvrb.sty ===== Thx, bye, Gismo / Luca [1] http://common-lisp.net/pipermail/bese-devel/2006-January/001480.html -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 188 bytes Desc: not available URL: From henrik at evahjelte.com Wed Feb 1 16:42:21 2006 From: henrik at evahjelte.com (Henrik Hjelte) Date: Wed, 01 Feb 2006 17:42:21 +0100 Subject: [Bese-devel] Parenscript patches In-Reply-To: <87psm742kz.fsf@gismo.pca.it> References: <1138795653.9481.80.camel@localhost.localdomain> <87psm742kz.fsf@gismo.pca.it> Message-ID: <1138812141.9481.130.camel@localhost.localdomain> On ons, 2006-02-01 at 14:43 +0100, Luca Capello wrote: > I bet this is a problem with your LaTeX environment. You were right, I installed the following packages (on ubuntu) and now it almost works tetex-bin tetex-base tetex-extras (forgot that one before) Now I can build the reference.pdf, but when I try to make the tutorial I get the error below. I tried to install some random tex packages related to graphics, but it didn't help so I give up for this time... Thanks! /Henrik LaTeX Warning: No \author given. No file pbook5nfRnr.toc. (/usr/share/texmf/tex/latex/psnfss/ot1pcr.fd) [1] Overfull \hbox (10.6557pt too wide) in paragraph at lines 84--88 \OT1/ppl/m/n/10 Browsing ``http://localhost:8000/tutorial1'' should re-turn an empty HTML page. ! LaTeX Error: Cannot determine size of graphic in images/tutorial1-1.png (no B oundingBox). See the LaTeX manual or LaTeX Companion for explanation. From erick at cibercalli.com Wed Feb 1 20:52:40 2006 From: erick at cibercalli.com (Erick Ivaan Lopez Carreon) Date: Wed, 01 Feb 2006 14:52:40 -0600 Subject: [Bese-devel] Help installing UCW Message-ID: <1138827161.3941.41.camel@localhost.localdomain> Hello: This is my first post. I have installed UCW in Debian Sid,my settings are: * Debian Sid x86 * SBCL 1:0.9.9.0-1 * emacs 21.4a-3 * slime 1:20051227-1 * cl-asdf 1.89-1 * cl-arnesi 1:20060122-1 * cl-yaclml 1:20060122-1 * cl-ppcre 1.2.13-1 * cl-iterate 1.4.2-1 * cl-puri 1.4-1 * cl-rfc2388 1.1-2 * cl-modlisp 0.6-1 * parenscript from yesterday * ucw_dev from yesterday I have mod_lisp configured on port 3000 with an Apache backend. And the test pages of mod_lisp shows right. My: ASDF:*CENTRAL-REGISTRY* ((MERGE-PATHNAMES ".clc/systems/" (USER-HOMEDIR-PATHNAME)) (MERGE-PATHNAMES ".sbcl/systems/" (USER-HOMEDIR-PATHNAME)) (MERGE-PATHNAMES "site-systems/" (TRUENAME (POSIX-GETENV "SBCL_HOME"))) (MERGE-PATHNAMES "systems/" (TRUENAME (POSIX-GETENV "SBCL_HOME"))) (MERGE-PATHNAMES ".sbcl/systems/" (USER-HOMEDIR-PATHNAME)) (MERGE-PATHNAMES "site-systems/" (TRUENAME (POSIX-GETENV "SBCL_HOME"))) (MERGE-PATHNAMES "systems/" (TRUENAME (POSIX-GETENV "SBCL_HOME"))) *DEFAULT-PATHNAME-DEFAULTS* #P"/usr/share/common-lisp/systems/") Contains the symlinks for ucw and its dependencies. but whe i do: ./bin/ucwctl start && ./bin/ucwctl attach After a wile i get: 109: (SB-IMPL::PROCESS-EVAL-OPTIONS ("(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*))" "(mapc (lambda (name) (asdf:oos 'asdf:load-op name)) '(:ucw :ucw.mod-lisp :ucw.admin :ucw.examples))" "(ucw:start-swank)" "(ucw:create-server :backend :mod-lisp :host \"127.0.0.1\" :port 3000 :applications (list it.bese.ucw-user::*example-application* ucw::*admin-application*) :debug-on-error T :inspect-components NIL :log-root-directory #P \"/home/user/.sbcl/site//logs/\" :log-level it.bese.arnesi: +INFO+)")) 110: (SB-IMPL::TOPLEVEL-INIT) 111: ((LABELS SB-IMPL::RESTART-LISP)) debugger invoked on a SIMPLE-ERROR in thread #: Maximum error nesting depth exceeded Type HELP for debugger help, or (SB-EXT:QUIT) to exit from SBCL. restarts (invokable by number or by possibly-abbreviated name): 0: [RETRY ] Retry performing # on #. 1: [ACCEPT ] Continue, treating # on # as having been successful. 2: [CONTINUE] Ignore and continue with next --eval option. 3: [ABORT ] Skip rest of --eval options. 4: Skip to toplevel READ/EVAL/PRINT loop. 5: [QUIT ] Quit SBCL (calling #'QUIT, killing the process). ((LAMBDA (SB-IMPL::E)) #) Any clues?? Thanks in advance. -- Erick Ivaan Lopez Carreon "Don't let school interfere with your education. " "No permitas que la escuela interfiera con tu educaci??n" -- Mark Twain From mdanish at andrew.cmu.edu Wed Feb 1 23:30:12 2006 From: mdanish at andrew.cmu.edu (Matthew Danish) Date: Wed, 1 Feb 2006 18:30:12 -0500 Subject: [Bese-devel] the limitations of the code within actions Message-ID: <20060201233012.GG562@mapcar.org> I tried to use a HANDLER-CASE form within a defaction and it seems that Arnesi's library can't handle that (in this case it expanded to a MULTIPLE-VALUE-PROG1 which caused it to choke). Is this a limitation I should expect, or is it a bug? -- ;; Matthew Danish -- user: mrd domain: cmu.edu ;; OpenPGP public key: C24B6010 on keyring.debian.org From aycan.irican at core.gen.tr Thu Feb 2 06:24:25 2006 From: aycan.irican at core.gen.tr (Aycan iRiCAN) Date: Thu, 02 Feb 2006 08:24:25 +0200 Subject: [Bese-devel] TAL, dojo, namespaces Message-ID: <87vevyqnvq.fsf@core.gen.tr> Hi, I just tried to write a simple TAL template. In order to define properties of the dojo editor non-programmatically, dojo suggests that aditional
attributes can be given. So I first tried to define dojo namespace and used the proper attributes.
content goes here
But now I'm getting this error: Unrecognized namespace "dojo" referenced. I can programmatically set the editor properties but I want to first get your opinions. Best Regards, -- Aycan iRiCAN C0R3 Computer Security Group http://www.core.gen.tr -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 188 bytes Desc: not available URL: From henrik at evahjelte.com Thu Feb 2 08:46:09 2006 From: henrik at evahjelte.com (henrik hjelte) Date: Thu, 02 Feb 2006 09:46:09 +0100 Subject: [Bese-devel] Help installing UCW In-Reply-To: <1138827161.3941.41.camel@localhost.localdomain> References: <1138827161.3941.41.camel@localhost.localdomain> Message-ID: <1138869969.5131.14.camel@localhost.localdomain> On ons, 2006-02-01 at 14:52 -0600, Erick Ivaan Lopez Carreon wrote: > (mapc (lambda (name) (asdf:oos 'asdf:load-op > name)) '(:ucw :ucw.mod-lisp :ucw.admin :ucw.examples)) There seems to be a problem loading the file package.lisp in one of the components of UCW, try to load them in order directly in emacs without the start script. M-x start-slime then (asdf:oos 'asdf:load-op :ucw) ;;or just require :ucw if you use sbcl) the same with ucw.mod-lisp :ucw.admin :ucw.examples Then it is easier to see what's going on. My guess is some missing dependency. /Henrik Hkelte From henrik at evahjelte.com Thu Feb 2 08:57:18 2006 From: henrik at evahjelte.com (henrik hjelte) Date: Thu, 02 Feb 2006 09:57:18 +0100 Subject: [Bese-devel] the limitations of the code within actions In-Reply-To: <20060201233012.GG562@mapcar.org> References: <20060201233012.GG562@mapcar.org> Message-ID: <1138870638.5131.26.camel@localhost.localdomain> On ons, 2006-02-01 at 18:30 -0500, Matthew Danish wrote: > I tried to use a HANDLER-CASE form within a defaction and it seems that > Arnesi's library can't handle that (in this case it expanded to a > MULTIPLE-VALUE-PROG1 which caused it to choke). Is this a limitation I > should expect, or is it a bug? > Maybe Marco has a better answer, anyway here is mine. This is an expected limitation. One work-around could maybe be to split up the defaction form so it calls a helper method /function that contains the handler case. The interpreter only walks the forms in the defaction form, so if you put the code in a method or function instead you are back in plain Lisp. /Henrik Hjelte (defaction my-action ((c my-component)) (handler-case (do-stuff) (error (e) ...))) becomes: (defaction my-action ((c my-component)) (when (my-action-method c) (answer 'ok))) (defmethod my-action (handler-case (do-stuff) ;; Note you can't call 'components or answer here (error (e) ...))) From henrik at evahjelte.com Thu Feb 2 09:11:25 2006 From: henrik at evahjelte.com (henrik hjelte) Date: Thu, 02 Feb 2006 10:11:25 +0100 Subject: [Bese-devel] TAL, dojo, namespaces In-Reply-To: <87vevyqnvq.fsf@core.gen.tr> References: <87vevyqnvq.fsf@core.gen.tr> Message-ID: <1138871485.5131.36.camel@localhost.localdomain> > But now I'm getting this error: > > Unrecognized namespace "dojo" referenced. Is this an error in the generated html? Then I would suggest asking on the dojo mailing list (with the generated html that is, few will understand what a TAL template is). I don't use TAL so I don't know much about your problems. I use a special I can programmatically set the editor properties but I want to first > get your opinions. Some day I hope one could make some nice lispy way to generate this code, then one could have a fast, flexible and pretty solution. /Henrik Hjelte From mb at bese.it Thu Feb 2 09:16:19 2006 From: mb at bese.it (Marco Baringer) Date: Thu, 02 Feb 2006 10:16:19 +0100 Subject: [Bese-devel] Re: Help installing UCW In-Reply-To: <1138827161.3941.41.camel@localhost.localdomain> References: <1138827161.3941.41.camel@localhost.localdomain> Message-ID: Erick Ivaan Lopez Carreon wrote: > 109: (SB-IMPL::PROCESS-EVAL-OPTIONS ("(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*))" "(mapc (lambda (name) (asdf:oos 'asdf:load-op > name)) '(:ucw :ucw.mod-lisp :ucw.admin :ucw.examples))" > "(ucw:start-swank)" "(ucw:create-server :backend :mod-lisp > :host \"127.0.0.1\" > :port 3000 > :applications (list > it.bese.ucw-user::*example-application* > ucw::*admin-application*) > :debug-on-error T > :inspect-components NIL > :log-root-directory #P > \"/home/user/.sbcl/site//logs/\" > :log-level it.bese.arnesi: > +INFO+)")) > 110: (SB-IMPL::TOPLEVEL-INIT) > 111: ((LABELS SB-IMPL::RESTART-LISP)) > > debugger invoked on a SIMPLE-ERROR in thread # thread" {A90E321}>: Maximum error nesting depth exceeded this means that someone, somewhere, is lost in an infinite recursion loop :( > > Type HELP for debugger help, or (SB-EXT:QUIT) to exit from SBCL. > > restarts (invokable by number or by possibly-abbreviated name): > 0: [RETRY ] Retry performing # on > #. the only package, of the ones you listed above, that has a file named package.lisp is parenscript (afaik). what happens if you do a simple (asdf:oos 'asdf:load-op :parenscript) ? > 1: [ACCEPT ] Continue, treating # on > # as having been successful. > 2: [CONTINUE] Ignore and continue with next --eval option. > 3: [ABORT ] Skip rest of --eval options. > 4: Skip to toplevel READ/EVAL/PRINT loop. > 5: [QUIT ] Quit SBCL (calling #'QUIT, killing the process). > > ((LAMBDA (SB-IMPL::E)) #) this is definetly odd, you should be getting a 'stale fasl' error message if this is the case. > Any clues?? mrs. plum, in the kitchen, with the rope :) did you upgrade sbcl recently? the first thing to do is try and delete all the .fasl files you have lying around (including slime's .slime directory) and reload. should that fail try loading the system one by one, in order, and see who breaks, send me a complete backtrace (including stack locals) and i'll see who's fault 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 Thu Feb 2 09:54:20 2006 From: mb at bese.it (Marco Baringer) Date: Thu, 02 Feb 2006 10:54:20 +0100 Subject: [Bese-devel] Re: TAL, dojo, namespaces In-Reply-To: <87vevyqnvq.fsf@core.gen.tr> References: <87vevyqnvq.fsf@core.gen.tr> Message-ID: Aycan iRiCAN wrote: > But now I'm getting this error: > > Unrecognized namespace "dojo" referenced. there are a copule of problems with dojo:foobar attributes: 1) when xmls (upon which tal is built) sees dojo:foobar it will attempt to intern "FOOBAR" into the package corresponding to the dojo namespace. the first thing you'll need to do is: (defpackage :dojo (:use) (:export)) (push (cons "http://dojotoolkit.org/2006/dojoml" :dojo) yaclml:*uri-to-package*) this way xmls will know how to handle your dojo namespace and you'll stop gettng errors. but your code still won't work :( 2) the hard problem is that yaclml tags (and therefore tal) are not designed to handle non keyword attributes nor output attributes with namespace prefixes. this is due to how we, in yaclml, distinguish between attributes and the body of the tag...turns out what i originally thought was a pretty cool thing is biting us. i don't have a quick fix for this atm. -- -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 luca at pca.it Thu Feb 2 09:56:58 2006 From: luca at pca.it (Luca Capello) Date: Thu, 02 Feb 2006 10:56:58 +0100 Subject: [Bese-devel] Re: Help installing UCW In-Reply-To: References: <1138827161.3941.41.camel@localhost.localdomain> Message-ID: <87oe1q5bit.fsf@gismo.pca.it> Hello! On Thu, 02 Feb 2006 10:16:19 +0100, Marco Baringer wrote: > Erick Ivaan Lopez Carreon wrote: >> Type HELP for debugger help, or (SB-EXT:QUIT) to exit from SBCL. >> >> restarts (invokable by number or by possibly-abbreviated name): >> 0: [RETRY ] Retry performing # on >> #. > > the only package, of the ones you listed above, that has a file > named package.lisp is parenscript (afaik). what happens if you do a > simple (asdf:oos 'asdf:load-op :parenscript) ? FWIW, with the same SBCL version and on Debian sid (last upgraded this morning), I can compile parenscript without any error (even on CMUCL and CLISP). Thx, bye, Gismo / Luca -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 188 bytes Desc: not available URL: From mb at bese.it Thu Feb 2 10:01:59 2006 From: mb at bese.it (Marco Baringer) Date: Thu, 02 Feb 2006 11:01:59 +0100 Subject: [Bese-devel] Re: TAL mystery In-Reply-To: <20060128000331.GC18347@mapcar.org> References: <20060128000331.GC18347@mapcar.org> Message-ID: Matthew Danish wrote: > (defcomponent view-wiki-page (window-component template-component) > ((page-name :accessor :page-name :initarg :page-name)) > (:default-initargs :template-name "/home/mrd/ucw/wiki/view.tal")) this is really weird. :template-names are resolved according to the application's tal-generator (which is often tied to multiple different directories). whatever generator you've used you should never have found a tal file located at "/home/mrd/ucw/wiki/view.tal" (unless you had a generator who's root directory was "/"). > I decided to check out the TAL file that I thought I had copied into > that location. Turns out, it didn't exist, I had copied it to the wrong > directory. And yet, the Wiki functions properly. So tell me, exactly > how does TAL find a copy of the template file it is supposed to use? tal calls template-truename on the application's tal generator, if this ruterns true then we call load-tal after have calculated the tal-environment. > How come the template worked, even though the pathname I specified did > not exist? i have no idea. the only thing i can think of is that somehow we're not calling the expected render method, but looking at your class hierarchy i can't think of which. try tracing ucw::render-template, if that's getting called then at least we know the problem is in ucw's template loading code, if it does't get called then there's a render method being called when it shouldn'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 luca at pca.it Thu Feb 2 10:00:27 2006 From: luca at pca.it (Luca Capello) Date: Thu, 02 Feb 2006 11:00:27 +0100 Subject: [Bese-devel] darcs patch: remove docs/reference.pdf, already included in manual.pdf Message-ID: <87d5i65bd0.fsf@gismo.pca.it> Hello! For parenscript, I think that keeping docs/reference.pdf is useless, at least for 2 reasons: 1) it's already included in docs/manual.pdf (which comprises the PDF versions of introduction.lisp, tutorial.lisp and reference.lisp); I checked both versions and they seem exactly the same. 2) it's easily generated using the pbook.py script (assuming that you have pdflatex and python): python pbook.py reference.lisp Another point could be that reading the lisp source is better if you want to copy&paste inside Emacs, for example ;-) The attached patch removes docs/reference.pdf. Thx, bye, Gismo / Luca -------------- next part -------------- A non-text attachment was scrubbed... Name: parenscript_remove-reference.pdf_20060127.patch.gz Type: application/octet-stream Size: 120179 bytes Desc: remove docs/reference.pdf, already included in manual.pdf URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 188 bytes Desc: not available URL: From mb at bese.it Thu Feb 2 10:03:27 2006 From: mb at bese.it (Marco Baringer) Date: Thu, 02 Feb 2006 11:03:27 +0100 Subject: [Bese-devel] Re: ucw on windows and acl In-Reply-To: <000e01c6263f$90cb1020$2302a8c0@p4> References: <000e01c6263f$90cb1020$2302a8c0@p4> Message-ID: Vagif Hagverdiyev wrote: > In order to start it under windows acl you need to add following code to > walk.lisp ok. i'll add it (with a #+allegro canditional). you have any idea why? -- -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 wojtekk at kofeina.net Thu Feb 2 11:03:33 2006 From: wojtekk at kofeina.net (Wojciech Kaczmarek) Date: Thu, 2 Feb 2006 12:03:33 +0100 Subject: [Bese-devel] latest version of arnesi In-Reply-To: <1138542445.9481.30.camel@localhost.localdomain> References: <1138542445.9481.30.camel@localhost.localdomain> Message-ID: On 29 Jan 2006, at 14:47, henrik hjelte wrote: > On l?r, 2006-01-28 at 23:24 +0000, Tiarn?n ? Corr?in wrote: > >> What is the best place >> to get the latest and greatest versions of the various UCW >> dependencies (yaclml + arnesi, especially), and has anyone attempted >> to make UCW asdf-installable? Would there be value in doing so? > > The homepage at http://common-lisp.net/project/bese/arnesi.html > says the following: > darcs repository > http://common-lisp.net/project/bese/repos/arnesi_dev/ > > Releases > There are none. We did use to have 'official' releases but it was a lot > of work, introduced a lot of incompatable version problems, and > installing a release is just as easy as doing darcs get .... I noticed that qbook doesn't generate CPS-related docs from latest arnesi_dev repository. The whole doc bunch is also out of sync with the docs accesible via a webpage, ie. http://common-lisp.net/project/bese/docs/arnesi/html/index.html are related to an old version of arnesi which isn't available anymore (at least - isn't directly from a website). Kinda confusing.. :) From jan at rychter.com Thu Feb 2 12:01:35 2006 From: jan at rychter.com (Jan Rychter) Date: Thu, 02 Feb 2006 13:01:35 +0100 Subject: [Bese-devel] Re: looking for advice: mixing applications and other content In-Reply-To: (Marco Baringer's message of "Wed, 01 Feb 2006 13:48:02 +0100") References: Message-ID: > Jan Rychter wrote: > > The non-application part is not static for the most part, so simple file > > serving won't do. I'd like to use yaclml or TAL to generate most of the > > content there, some dynamically and some offline. > > > > How do people deal with this using UCW? > > with a macro like this: this is not the actual code i use (i don't have > that code at hand on this machine) but it's the general idea. > > (defmacro deftalpage (url args &optional (template-name url)) > "defines an entry-point for url which calls a template and puts all of > the query-params passed to the url into the page's tal environement (for > easy access via the $foo syntax" > `(progn > (defcomponent ,(intern url :my-package) > (template-component window-component) > ((args :initarg :args)) > (:default-initargs :template-name ,template-name)) > (defentry-point ,url (:application *my-app*) ,args > (call ',(intern url :my-package) > :args (list ,@(mapcar (lambda (a) > (if (listp a) (first a) a)) > args)))) > (defmethod template-component-environment nconc > ((template ,(intern url :my-package))) > (slot-value template 'args)) > ',url)) > > and then lots of these: > > (deftalpage "" () "index.tal") > (deftalpage "product" (p-id sku-id) "catalog/product.tal") > (deftalpage "news" (news-id) "content/news.tal") Thanks for the very precise advice! I have one question though -- the component gets called but never answers. When does it get garbage collected? > > I've pondered running araneida with TBNL and UCW, but it seems like > > overkill. > > if we could get ucw to drop the session/frame stuff for certain > entry-points then i'd agree. until then there is an overhead difference > between the two which may (or may not) make the difference for you. The overhead difference isn't significant for the moment, but will be in the future. A very, very desirable feature would be to have entry-points without sessions. When the user lands at an entry point, he doesn't get a session unless he clicks on a link or presents a valid cookie. By default we present him with a page that possibly contains links leading to entry points with sessions. In the case of a blog site, for example, you'd get nice permanent URLs and low overhead for most content, while still being able to offer "applications" after the user logs in or enters a particular area of the site. Best of both worlds, all in the same framework. --J. From jan at rychter.com Thu Feb 2 12:42:01 2006 From: jan at rychter.com (Jan Rychter) Date: Thu, 02 Feb 2006 13:42:01 +0100 Subject: [Bese-devel] Re: looking for advice: mixing applications and other content In-Reply-To: (Marco Baringer's message of "Wed, 01 Feb 2006 13:48:02 +0100") References: Message-ID: > Jan Rychter wrote: > > The non-application part is not static for the most part, so simple file > > serving won't do. I'd like to use yaclml or TAL to generate most of the > > content there, some dynamically and some offline. > > > > How do people deal with this using UCW? > > with a macro like this: this is not the actual code i use (i don't have > that code at hand on this machine) but it's the general idea. > > (defmacro deftalpage (url args &optional (template-name url)) > "defines an entry-point for url which calls a template and puts all of > the query-params passed to the url into the page's tal environement (for > easy access via the $foo syntax" > `(progn > (defcomponent ,(intern url :my-package) > (template-component window-component) > ((args :initarg :args)) > (:default-initargs :template-name ,template-name)) > (defentry-point ,url (:application *my-app*) ,args > (call ',(intern url :my-package) > :args (list ,@(mapcar (lambda (a) > (if (listp a) (first a) a)) > args)))) > (defmethod template-component-environment nconc > ((template ,(intern url :my-package))) > (slot-value template 'args)) > ',url)) > > and then lots of these: > > (deftalpage "" () "index.tal") > (deftalpage "product" (p-id sku-id) "catalog/product.tal") > (deftalpage "news" (news-id) "content/news.tal") Ahem, the parameter passing doesn't seem to work for me. I've defined (deftalpage "example2.ucw" (title) "example.tal") and example.tal contains (among other lines): TITLE accessing http://localhost/example2.ucw?title=23 gives me There is no applicable method for the generic function # when called with arguments (JWR-WEB::TITLE "23"). [Condition of type SIMPLE-ERROR] --J. From henrik at evahjelte.com Thu Feb 2 12:57:58 2006 From: henrik at evahjelte.com (Henrik Hjelte) Date: Thu, 02 Feb 2006 13:57:58 +0100 Subject: [Bese-devel] Darcs patch parenscript Message-ID: <1138885078.5131.51.camel@localhost.localdomain> Lisp strings are now properly converted to javascript strings. Newlines, quotes, backquotes, tabs, unicode and other annoyances should now be perfectly safe. /Henrik Hjelte -------------- next part -------------- New patches: [proper escape sequences in strings henrik.hjelte at poboxes.com**20060202123912] { hunk ./src/js.lisp 383 - (declare (ignore start-pos)) + (declare (ignore start-pos) + (inline lisp-special-char-to-js)) hunk ./src/js.lisp 387 - initially (write-char #\' escaped) - for char across (value string) - if (char= #\' char) - do (write-string "\\'" escaped) - else - do (write-char char escaped) - finally (write-char #\' escaped))))) + initially (write-char #\' escaped) + for char across (value string) + for code = (char-code char) + for special = (lisp-special-char-to-js char) + do + (cond + (special + (write-char #\\ escaped) + (write-char special escaped)) + ((or (<= code #x1f) (>= code #x80)) + (format escaped "\\u~4,'0x" code)) + (t (write-char char escaped))) + finally (write-char #\' escaped))))) + +(defparameter *js-lisp-escaped-chars* + '((#\' . #\') + (#\\ . #\\) + (#\b . #\Backspace) + (#\f . #\Form) + (#\n . #\Newline) + (#\r . #\Return) + (#\t . #\Tab))) + +(defun lisp-special-char-to-js(lisp-char) + (car (rassoc lisp-char *js-lisp-escaped-chars*))) hunk ./t/test.lisp 137 +(test escape-sequences-in-string + (let ((escapes `((#\\ . #\\) + (#\b . #\Backspace) + (#\f . #\Form) + ("u000B" . ,(code-char #x000b));;Vertical tab, too uncommon to bother with + (#\n . #\Newline) + (#\r . #\Return) + (#\' . #\');;Double quote need not be quoted because parenscript strings are single quoted + (#\t . #\Tab) + ("u001F" . ,(code-char #x001f));; character below 32 + ("u0080" . ,(code-char 128)) ;;Character over 127. Actually valid, parenscript escapes them to be sure. + ("uABCD" . ,(code-char #xabcd)))));; Really above ascii. + (loop for (js-escape . lisp-char) in escapes + for generated = (js-to-string `(let ((x , (format nil "hello~ahi" lisp-char))))) + for wanted = (format nil "{ + var x = 'hello\\~ahi'; +}" js-escape) + do (is (string= generated wanted))))) + } Context: [ref2test finds reference.lisp in docs dir henrik.hjelte at poboxes.com**20060201111712] [merge parenscript-test.asd into parenscript.asd Luca Capello **20060127085709] [move doc files to docs/ Luca Capello **20060123222548] [move test files to t/ and modify parenscript-test.asd as well Luca Capello **20060123215026] [move source files to src/ and modify parenscript.asd as well Luca Capello **20060123213152] [remove trailing spaces at endlines in *.lisp Luca Capello **20060123211927] [remove trailing spaces at empty lines in *.lisp Luca Capello **20060122215742] [pbook.py: convert endlines to Unix format Luca Capello **20060122211704] [css-inline compiles with cmucl henrik.hjelte at poboxes.com**20060109113602] [changed CASE to SWITCH and made CASE more like Lisp. henrik.hjelte at poboxes.com**20051227190529] [New function gen-js-name-string Marco Baringer **20051219160435 This allows you to get a unique javascript name as a string and not just as a symbol. ] [bugfix slot-value henrik.hjelte at poboxes.com**20051219131901] [bug in dwim-join henrik.hjelte at poboxes.com**20051218171724] [css-inline generator henrik.hjelte at poboxes.com**20051218111426] [cleaned reference henrik.hjelte at poboxes.com**20051217095257] [tests from the reference henrik.hjelte at poboxes.com**20051216180844] [quotes in introduction henrik.hjelte at poboxes.com**20051216153949] [Added defgenerics for all the defmethods Alan-Shields at omrf.ouhsc.edu**20051201191709 Ze style warnings! Zey drive me craaaazy. ] [enable #+parenscript Alan-Shields at omrf.ouhsc.edu**20051115235351 To integrate Parenscript with Araneida without requiring Parenscript, I had to do some compile conditionals. This would make it much easier. Marco, eventually I am going to add this to every last one of your projects. ;-p ] [need a function for css-inlining Alan-Shields at omrf.ouhsc.edu**20051115235233 If you have code that needs to inline CSS across an array, it's difficult to use the current macro. Having a function helps - mapping the macro to the function only completes things. ] [Proper concatenation of inline CSS Alan-Shields at omrf.ouhsc.edu**20051115234812 CSS-INLINE does a simple concatenation of the results of CSS directives. This looks like: color:blacksize:200% Unfortunately, it should look like this: color:black;size:200% It now does. ] [added COPYING file Luca Capello **20051107123047] [Escape { and } chars in boring regexps Marco Baringer **20051107102118] [Need to escape #\' in javascript strings Marco Baringer **20051005090942] [Fix buf in JS-INLINE causing infinite macro expansion Marco Baringer **20051005082900] [Add in checks to deal with functions/macros whose names aren't symbols Marco Baringer **20050912081700] [Use strings, and not symbols, to name javascript functions/macros Marco Baringer **20050905082735 This effectivly flattens the namespace of javascript code. While this change makes js similar to javascript, and removes the need to export symbols from the JS package, it may break previous code which depended on, for expample, js:and not being equivalent to js:and. ] [Added support for literal objects ( "{ ... }" syntax) Marco Baringer **20050905081702] [Export cen-js-names and with-unique-js-names Marco Baringer **20050831115820] [Added docstrings to previous patch Marco Baringer **20050815135128] [Added GEN-JS-NAME and WITH-UNIQUE-JS-NAMES Marco Baringer **20050815134940] [dotimes-dolist-fix Ivan Toshkov **20050815080906 Fixes the infinite loop problems of `dotimes' and `dolist'. ] [Parenscript, documentation not withstandanding, does not depend on htmlgen Marco Baringer **20050815080053] [Attempt to improve the conversion of (js ((lambda ...) ...)) Marco Baringer **20050815074902] [Introduce the JS-LAMBDA class. Make JS-DEFUN a subclass of JS-LAMBDA Marco Baringer **20050815074836] [Implement JS and JS-INLINE in terms of JS* and JS-INLINE* Marco Baringer **20050815063921] [Symbols starting with #\: are left as is, no case conversion or other mangling Marco Baringer **20050814141629] [Added JS* and JS-INLINE*. Marco Baringer **20050814134534] [Javascript strings need to be quated with ' and not " to avoid interfering with the surrounding HTML. Marco Baringer **20050814134344] [Ugly hack to support ((lambda ...) ...) Marco Baringer **20050813142023] [Mention that I'm maintaining this version of parenscript Marco Baringer **20050813135238] [Rename the system/package in the system definition, just renaming the file doesn't cut it :(. Marco Baringer **20050813135107] [Added images used in documentation Marco Baringer **20050813134441] [Added the pbook.py file used to generate the documentation Marco Baringer **20050813133732] [Added declare ignore forms for unused function arguments Marco Baringer **20050808154843] [Rename system def Marco Baringer **20050808154836] [Setup boringfile Marco Baringer **20050726100549] [Added files from parenscript 0.1.0 as distributed by Manuel Odendahl Marco Baringer **20050726100416] Patch bundle hash: 6c7d141cb31eedb1ceb568961e082718ec71d381 From mb at bese.it Thu Feb 2 14:03:56 2006 From: mb at bese.it (Marco Baringer) Date: Thu, 02 Feb 2006 15:03:56 +0100 Subject: [Bese-devel] Re: looking for advice: mixing applications and other content In-Reply-To: References: Message-ID: Jan Rychter wrote: > Ahem, the parameter passing doesn't seem to work for me. I've > defined > > (deftalpage "example2.ucw" (title) "example.tal") > > and example.tal contains (among other lines): > > TITLE > > accessing http://localhost/example2.ucw?title=23 gives me > > There is no applicable method for the generic function > # > when called with arguments > (JWR-WEB::TITLE "23"). > [Condition of type SIMPLE-ERROR] the template-environment method should be: (this is still untested) (defmethod template-component-environment nconc ((template ,(intern url :my-package))) `(make-standard-environment (list ,@(mapcar (lambda (argument) `(cons ',argument ,argument)) (mapcar (lambda (arg-spec) (if (consp arg-spec) (first arg-spec) arg-spec)) args))))) basically if the args are foo, bar, goo we want the tal env to be and alist like: (list (cons 'foo foo) (cons 'bar bar) (cons 'goo goo)) the construction of this form is a little messy when dealing with default vales for parameters. -- -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 Feb 2 14:30:11 2006 From: mb at bese.it (Marco Baringer) Date: Thu, 02 Feb 2006 15:30:11 +0100 Subject: [Bese-devel] Re: playing with forms In-Reply-To: <20060129223100.GC562@mapcar.org> References: <20060129223100.GC562@mapcar.org> Message-ID: Matthew Danish wrote: > 16: ((SB-PCL::FAST-METHOD SB-MOP:SLOT-VALUE-USING-CLASS (IT.BESE.UCW::INDIRECT-VALUE-MIXIN-CLASS T T)) # # 17: ((SB-PCL::FAST-METHOD SB-MOP:SLOT-BOUNDP-USING-CLASS (IT.BESE.UCW::INDIRECT-VALUE-MIXIN-CLASS T T)) # #S$ > 18: ((LAMBDA NIL)) > 19: ((SB-PCL::FAST-METHOD IT.BESE.UCW::SAVE-BACKTRACKED (IT.BESE.UCW::STANDARD-SESSION-FRAME)) # # I noticed that when you use tags, the normal root directories of your filesystem-generator do not get searched. I suspect this is unintended, but I'm not submitting a darcs patch, as it might break some installations (you will no longer be able to include files from the directory where the including template is, unless that directory is in your list of root-directories). The culprit is: (def-tag-handler tal:include (tag) [...] (with-tal-compile-environment (generator) `(funcall (load-tal ,generator ,(merge-pathnames template-name *tal-truename*)) (extend-environment (tal-env ,@(augmented-env)) tal-environment) ,generator)))))) ... and you probably want: (with-tal-compile-environment (generator) `(funcall (load-tal ,generator ,template-name) (extend-environment (tal-env ,@(augmented-env)) tal-environment) ,generator)))))) ... since it's supposed to be the generator's job to deal with directories. --J. From jan at rychter.com Thu Feb 2 15:57:56 2006 From: jan at rychter.com (Jan Rychter) Date: Thu, 02 Feb 2006 16:57:56 +0100 Subject: [Bese-devel] TAL template searching In-Reply-To: (Jan Rychter's message of "Thu, 02 Feb 2006 16:35:16 +0100") References: Message-ID: Incidentally, I also noticed that template-truename gets called twice for each template I render. Not that it matters all that much, but one day we'll be after efficiency... --J. From mdanish at andrew.cmu.edu Thu Feb 2 16:42:48 2006 From: mdanish at andrew.cmu.edu (Matthew Danish) Date: Thu, 2 Feb 2006 11:42:48 -0500 Subject: [Bese-devel] the limitations of the code within actions In-Reply-To: <1138870638.5131.26.camel@localhost.localdomain> References: <20060201233012.GG562@mapcar.org> <1138870638.5131.26.camel@localhost.localdomain> Message-ID: <20060202164248.GH562@mapcar.org> On Thu, Feb 02, 2006 at 09:57:18AM +0100, henrik hjelte wrote: > On ons, 2006-02-01 at 18:30 -0500, Matthew Danish wrote: > > I tried to use a HANDLER-CASE form within a defaction and it seems that > > Arnesi's library can't handle that (in this case it expanded to a > > MULTIPLE-VALUE-PROG1 which caused it to choke). Is this a limitation I > > should expect, or is it a bug? > > > Maybe Marco has a better answer, anyway here is mine. > This is an expected limitation. One work-around could maybe be to split > up the defaction form so it calls a helper method /function that > contains the handler case. > The interpreter only walks the forms in the defaction form, so if you > put the code in a method or function instead you are back in plain Lisp. > > /Henrik Hjelte > > (defaction my-action ((c my-component)) > (handler-case > (do-stuff) > (error (e) > ...))) > > becomes: > > (defaction my-action ((c my-component)) > (when (my-action-method c) > (answer 'ok))) > > (defmethod my-action > (handler-case > (do-stuff) > ;; Note you can't call 'components or answer here > (error (e) > ...))) > Well this is basically what I did, but it did bring up another problem: I used MULTIPLE-VALUE-CALL to invoke an outside normal function which handled the errors and returned values indicating what happened. What it returned, however, was not what I expected: (multiple-value-call (lambda (cc result msg) What I found was that the first value returned was some kind of Arnesi data structure named CLOSURE, rather than my result. I inserted the extra parameter cc into the function and now it works fine, but this makes me wonder if there is something better I can do here. -- ;; Matthew Danish -- user: mrd domain: cmu.edu ;; OpenPGP public key: C24B6010 on keyring.debian.org From mdanish at andrew.cmu.edu Thu Feb 2 16:50:45 2006 From: mdanish at andrew.cmu.edu (Matthew Danish) Date: Thu, 2 Feb 2006 11:50:45 -0500 Subject: [Bese-devel] Re: TAL mystery In-Reply-To: References: <20060128000331.GC18347@mapcar.org> Message-ID: <20060202165045.GI562@mapcar.org> I did track it down, was some leftover render method. -- ;; Matthew Danish -- user: mrd domain: cmu.edu ;; OpenPGP public key: C24B6010 on keyring.debian.org From mdanish at andrew.cmu.edu Thu Feb 2 16:52:44 2006 From: mdanish at andrew.cmu.edu (Matthew Danish) Date: Thu, 2 Feb 2006 11:52:44 -0500 Subject: [Bese-devel] Re: playing with forms In-Reply-To: References: <20060129223100.GC562@mapcar.org> Message-ID: <20060202165244.GJ562@mapcar.org> On Thu, Feb 02, 2006 at 03:30:11PM +0100, Marco Baringer wrote: > Matthew Danish wrote: > > 16: ((SB-PCL::FAST-METHOD SB-MOP:SLOT-VALUE-USING-CLASS (IT.BESE.UCW::INDIRECT-VALUE-MIXIN-CLASS T T)) # # > 17: ((SB-PCL::FAST-METHOD SB-MOP:SLOT-BOUNDP-USING-CLASS (IT.BESE.UCW::INDIRECT-VALUE-MIXIN-CLASS T T)) # #S$ > > 18: ((LAMBDA NIL)) > > 19: ((SB-PCL::FAST-METHOD IT.BESE.UCW::SAVE-BACKTRACKED (IT.BESE.UCW::STANDARD-SESSION-FRAME)) # # > this makes me think it's a problem whereby the backtracking stuff (which > happens even when you reload) is using stale data to access the slots. > i'll try it out with sbcl later on. > When I came back to it in the morning, everything worked fine :/ I don't think I did anything different. -- ;; Matthew Danish -- user: mrd domain: cmu.edu ;; OpenPGP public key: C24B6010 on keyring.debian.org From erick at cibercalli.com Thu Feb 2 18:12:19 2006 From: erick at cibercalli.com (Erick Ivaan Lopez Carreon) Date: Thu, 02 Feb 2006 12:12:19 -0600 Subject: [Bese-devel] Re: Help installing UCW In-Reply-To: <87oe1q5bit.fsf@gismo.pca.it> References: <1138827161.3941.41.camel@localhost.localdomain> <87oe1q5bit.fsf@gismo.pca.it> Message-ID: <1138903939.3942.37.camel@localhost.localdomain> Hello: Thanks to Henrik, Marco and Luca for your answers. Followup: Yestarday at night after send my first ucw helpemail, i continue working on this subject and find the following: - I install parenscript and ucw in a wrong way mixing both one one directory: ~/.sbcl/site Although i install them with: (asdf-install:install "/tmp/****.tar.gz" Maybe i don't read the "Install where?" carefully. Whit this bad setup when i try: (require :parenscript) i get: utils.fasl version 61 but require version 62 or something similar. I remove parenscript and ucw an reinstall again. bust this time i do: mkdir ~/.sbcl/site/parenscript mkdir ~/.sbcl/site/ucw And copy there. Then symlink to a path within asdf:*central-registry* And retry : (require :parenscript) works! (require :ucw) works! But... when i configure ucwctl and start.lsip to use mod_lisp backend i get: ------------------------------------------------------------------- 182: (SB-IMPL::PROCESS-EVAL-OPTIONS ("(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*))" "(mapc (lambda (name) (asdf:oos 'asdf:load-op name)) '(:ucw :ucw.mod-lisp :ucw.admin :ucw.examples))" "(ucw:start-swank)" "(ucw:create-server :backend :mod-lisp :host \"127.0.0.1\" :port 8080 :applications (list it.bese.ucw-user::*example-application* ucw::*admin-application*) :debug-on-error T :inspect-components NIL :log-root-directory #P \"/home/user/.sbcl/site/ucw/logs/\" :log-level it.bese.arnesi: +INFO+)")) 183: (SB-IMPL::TOPLEVEL-INIT) 184: ((LABELS SB-IMPL::RESTART-LISP)) debugger invoked on a SIMPLE-ERROR in thread #: Maximum error nesting depth exceeded Type HELP for debugger help, or (SB-EXT:QUIT) to exit from SBCL. restarts (invokable by number or by possibly-abbreviated name): 0: [CONTINUE] Ignore and continue with next --eval option. 1: [ABORT ] Skip rest of --eval options. 2: Skip to toplevel READ/EVAL/PRINT loop. 3: [QUIT ] Quit SBCL (calling #'QUIT, killing the process). ((LAMBDA (SB-IMPL::E)) #) 0] 0 ------------------------------------------------------------------- And seems to start but with errors: ------------------------------------------------------------------- 2006-02-02T11:38.41 IT.BESE.ARNESI:+WARN+ IT.BESE.UCW::UCW.BACKEND: Attempting to publish #P"/home/user/.sbcl/site/ucw/wwwroot/./" at "/" but mod_lisp backend does not support publish-directory. 2006-02-02T11:38.41 IT.BESE.ARNESI:+WARN+ IT.BESE.UCW::UCW.BACKEND: Attempting to publish #P"/home/user/.sbcl/site/ucw/wwwroot/./admin/" at "/admin/" but mod_lisp backend does not support publish-directory. 2006-02-02T11:38.41 IT.BESE.ARNESI:+INFO+ IT.BESE.UCW::UCW-LOGGER: Starting up standard server #. * ------------------------------------------------------------------- An i can't acces the web page examples: http://127.0.0.1:8080/ :( ------------------------------------------------------------------- 2006-02-02T11:42.00 IT.BESE.ARNESI:+ERROR+ IT.BESE.UCW::UCW.BACKEND: Worker thread # reported #. ------------------------------------------------------------------- But the port 808o is Listening: ------------------------------------------------------------------- tcp 0 0 127.0.0.1:8080 0.0.0.0:* LISTEN 5037/sbcl ------------------------------------------------------------------- So i change the backend for httpd an then: ------------------------------------------------------------------- 182: (SB-IMPL::PROCESS-EVAL-OPTIONS ("(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*))" "(mapc (lambda (name) (asdf:oos 'asdf:load-op name)) '(:ucw :ucw.httpd :ucw.admin :ucw.examples))" "(ucw:start-swank)" "(ucw:create-server :backend :httpd :host \"127.0.0.1\" :port 8080 :applications (list it.bese.ucw-user::*example-application* ucw::*admin-application*) :debug-on-error T :inspect-components NIL :log-root-directory #P \"/home/erick/.sbcl/site/ucw/logs/\" :log-level it.bese.arnesi: +INFO+)")) 183: (SB-IMPL::TOPLEVEL-INIT) 184: ((LABELS SB-IMPL::RESTART-LISP)) debugger invoked on a SIMPLE-ERROR in thread #: Maximum error nesting depth exceeded Type HELP for debugger help, or (SB-EXT:QUIT) to exit from SBCL. restarts (invokable by number or by possibly-abbreviated name): 0: [CONTINUE] Ignore and continue with next --eval option. 1: [ABORT ] Skip rest of --eval options. 2: Skip to toplevel READ/EVAL/PRINT loop. 3: [QUIT ] Quit SBCL (calling #'QUIT, killing the process). ((LAMBDA (SB-IMPL::E)) #) 0] 0 ------------------------------------------------------------------- UCW starts! :) ------------------------------------------------------------------- 2006-02-02T12:01.36 IT.BESE.ARNESI:+INFO+ IT.BESE.UCW::UCW-LOGGER: Starting up standard server #. ------------------------------------------------------------------- An i can view: http://127.0.0.1:8080/ examples :) ------------------------------------------------------------------- But ... ia want to use apache + mod_lisp so pls give me your advice on this. My apache config for mod lisp is: SetHandler lisp-handler SetHandler lisp-handler What means : 2006-02-02T11:38.41 IT.BESE.ARNESI:+WARN+ IT.BESE.UCW::UCW.BACKEND: Attempting to publish #P"/home/user/.sbcl/site/ucw/wwwroot/./" at "/" but mod_lisp backend does not support publish-directory. Thanks in advance. From evrim at core.gen.tr Fri Feb 3 04:27:50 2006 From: evrim at core.gen.tr (Evrim ULU) Date: Fri, 03 Feb 2006 06:27:50 +0200 Subject: [Bese-devel] Serving static content with ucw Message-ID: <43E2DBC6.5050108@core.gen.tr> Hi, I was thinking about best practices with ucw web applications and just wanted to hear your comments if any:) My aim is simply letting people upload static content to my ucw application. However, form-upload is not a good way for more than 10 files. I have made a test and saw that moderate web sites have more than 100 files. So, uploading 100 files via form is not a good choice. I've searched web and could not find any webdav servers for lisp:( I thought apache2.0 will handle this for me, but syncronizing the authentication/authorization requires a new auth module which will connect to my sbcl process via for instance simple IPC/cl-ipc with uffi or cffi . Also, I'm worried about the performance/scalabilty of this method. Afterwards, i've looked for the old method, the FTP. Allegro has an opensource ftp server. I tried to port it until security issues have taken me over. FTP is an old plain-text protocol:( I propose this problem may be solved via reverse proxing through Apache using modules mod_proxy and mod_ftp_proxy. However, it sounds complicated for an average ucw application. I'm looking for comments about above methods, or, any suggestions would be appriciated. PS. i'm not using any persistence like sql/ldap to gather authentication information. Thanks. Evrim. From luca at pca.it Fri Feb 3 09:03:29 2006 From: luca at pca.it (Luca Capello) Date: Fri, 03 Feb 2006 10:03:29 +0100 Subject: [Bese-devel] Re: Help installing UCW In-Reply-To: <1138903939.3942.37.camel@localhost.localdomain> References: <1138827161.3941.41.camel@localhost.localdomain> <87oe1q5bit.fsf@gismo.pca.it> <1138903939.3942.37.camel@localhost.localdomain> Message-ID: <87wtgcizku.fsf@gismo.pca.it> Hello! On Thu, 02 Feb 2006 19:12:19 +0100, Erick Ivaan Lopez Carreon wrote: > Thanks to Henrik, Marco and Luca for your answers. You're welcome :-) > - I install parenscript and ucw in a wrong way mixing both one one > directory: > > ~/.sbcl/site > > Although i install them with: > > (asdf-install:install "/tmp/****.tar.gz" FWIW, Debian uses the Common Lisp Controller [1]. This means that for every CL library which is ASDF-compliant you can directly use the sources without any headache if you upgrade your Lisp implementations. So, basically, my advice will be to: [this is for the CL library/software] $ mkdir /folder/where/you/store/CL/sources $ cd /folder/where/you/store/CL/sources $ grab the CL sources (darcs get [Marco's software], for example) [this is for the Common Lisp Controller, specific to $USER] $ mkdir -p ~/.clc $ mkdir -p ~/.clc/systems $ ln -s /folder/where/you/store/CL/sources/package/package.asd \ package.asd Then, you can just call (asdf:oos 'asdf:load-op 'package) When some CL source files are modified or your Lisp implementation is upgraded, the Common Lisp Controller automatically rebuilds/reloads what is needed :-) > (require :parenscript) [...] > utils.fasl version 61 but require version 62 or something similar. As Marco posted yesterday, this means that utils.fasl was compiled with a previous SBCL version. Thx, bye, Gismo / Luca [1] http://www.cliki.net/common-lisp-controller -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 188 bytes Desc: not available URL: From mb at bese.it Fri Feb 3 09:52:40 2006 From: mb at bese.it (Marco Baringer) Date: Fri, 03 Feb 2006 10:52:40 +0100 Subject: [Bese-devel] Re: the limitations of the code within actions In-Reply-To: <20060202164248.GH562@mapcar.org> References: <20060201233012.GG562@mapcar.org> <1138870638.5131.26.camel@localhost.localdomain> <20060202164248.GH562@mapcar.org> Message-ID: Matthew Danish wrote: > Well this is basically what I did, but it did bring up another problem: > > I used MULTIPLE-VALUE-CALL to invoke an outside normal function which > handled the errors and returned values indicating what happened. What > it returned, however, was not what I expected: > > (multiple-value-call > (lambda (cc result msg) > > What I found was that the first value returned was some kind of Arnesi > data structure named CLOSURE, rather than my result. I inserted the > extra parameter cc into the function and now it works fine, but this > makes me wonder if there is something better I can do here. can you post the actual code? (just the action and the outside 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 jan at rychter.com Fri Feb 3 14:49:20 2006 From: jan at rychter.com (Jan Rychter) Date: Fri, 03 Feb 2006 15:49:20 +0100 Subject: [Bese-devel] strings as parameters in TAL templates Message-ID: How do you handle string parameters in TAL tags? Specifically, quoting? I've tried this: but it results in garbage generated after the tag is replaced, I get extra: /></a > I need to pass a lisp string to the inline-image function. --J. From mb at bese.it Fri Feb 3 15:06:29 2006 From: mb at bese.it (Marco Baringer) Date: Fri, 03 Feb 2006 16:06:29 +0100 Subject: [Bese-devel] Re: strings as parameters in TAL templates In-Reply-To: References: Message-ID: Jan Rychter wrote: > How do you handle string parameters in TAL tags? Specifically, quoting? > > I've tried this: > > > > but it results in garbage generated after the tag is replaced, I get > extra: > /></a > > > > I need to pass a lisp string to the inline-image function. if inline-image is a string containing #\< or #\> yaclml will escape those and generate > and <, this may be your problem. try adding tal:escape-html='nil' to the tal:tal tag and see if that helps. if it doesn't i'll need enough code to reproduce the 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 jan at rychter.com Fri Feb 3 15:36:59 2006 From: jan at rychter.com (Jan Rychter) Date: Fri, 03 Feb 2006 16:36:59 +0100 Subject: [Bese-devel] Re: strings as parameters in TAL templates In-Reply-To: (Marco Baringer's message of "Fri, 03 Feb 2006 16:06:29 +0100") References: Message-ID: >>>>> "Marco" == Marco Baringer writes: Marco> Jan Rychter wrote: >> How do you handle string parameters in TAL tags? Specifically, >> quoting? >> >> I've tried this: >> >> >> >> but it results in garbage generated after the tag is replaced, I get >> extra: /></a > >> >> I need to pass a lisp string to the inline-image function. Marco> if inline-image is a string containing #\< or #\> yaclml will Marco> escape those and generate > and <, this may be your Marco> problem. try adding tal:escape-html='nil' to the tal:tal tag and Marco> see if that helps. if it doesn't i'll need enough code to Marco> reproduce the bug. It doesn't, but there is clearly something I don't understand. inline-image generates HTML using yaclml, here is a narrowed-down case: (defun inline-image (filename) (<:div :class "inline-image" (<:a :class "inline-image" :href "sample/image.jpg" filename))) This results in:
--J. From mb at bese.it Fri Feb 3 15:44:44 2006 From: mb at bese.it (Marco Baringer) Date: Fri, 03 Feb 2006 16:44:44 +0100 Subject: [Bese-devel] Defining new TAL tags (Was: strings as parameters in TAL templates) In-Reply-To: References: Message-ID: > Jan Rychter wrote: >> How do you handle string parameters in TAL tags? Specifically, quoting? >> >> I've tried this: >> >> >> >> but it results in garbage generated after the tag is replaced, I get >> extra: >> /></a >> > this is as good a time as any to describe the (probably too many) steps required to create your own tal tag: 1) define a yaclml tag macro which does what you want: (deftag-macro my-package:my-img (&attribute image-name) (rebinding (image-name) `(<:a :href (inline-image ,image-name) (<:as-html (inline-image ,image-name))))) [nb: don't forget the &attribute if you want to be able to use this from a tal file] 2) so now we could use our tag from regular code and what we need to do is tal how to find it and associate it with a tag in an xml file: (push (cons "http://example.com/tal/" (find-package :my-package) yaclml:*uri-to-package*) 3) within a tal file we can now use our tag if we setup the proper namespaces: ... ... nb: the image-name attribute need not be prefixed with a particular namespace (though it probably should). unless there's a tal handler for that particular attribute it'll get coalesced into the keyword package no matter what package was specified in the tal file. not that you asked for this, but hope it helps 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 mb at bese.it Fri Feb 3 15:55:46 2006 From: mb at bese.it (Marco Baringer) Date: Fri, 03 Feb 2006 16:55:46 +0100 Subject: [Bese-devel] Re: strings as parameters in TAL templates In-Reply-To: References: Message-ID: Jan Rychter wrote: > It doesn't, but there is clearly something I don't > understand. inline-image generates HTML using yaclml, here is a > narrowed-down case: there's a bit of confusion as to what happens where and when: the various <:blah-blah-blah macros all work by sending strings to the yaclml:*yaclml-stream* stream, their return value is, generally, not used. in your particular case i think the return value of inline-image is something along the lines of "". however tal:content (and tal:replace) do not inline the code but send the result of the form to yaclml:*yaclml-stream*. in other words, is equivalent to doing: (<:as-html (inline-image "blah")) with the tal:escape-html="nil" it would be: (<:as-is (inline-image "blah")) unfortunetly inline-image sends some text to *yaclml-stream* and then <:as-is send more text (the garbage you're getting) to the stream. you've two options at this point: 1) use tal:lisp like so: (inline-image "blah") 2) read the mail i just sent about defing new tal tags and do: but you'll need to change inline-image to: (defun inline-image (&key filename) ... > (defun inline-image (filename) > (<:div :class "inline-image" > (<:a :class "inline-image" > :href "sample/image.jpg" > filename))) > > This results in: > >
> > >
> > > --J. -- -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 Fri Feb 3 16:04:34 2006 From: jan at rychter.com (Jan Rychter) Date: Fri, 03 Feb 2006 17:04:34 +0100 Subject: [Bese-devel] Defining new TAL tags (Was: strings as parameters in TAL templates) In-Reply-To: (Marco Baringer's message of "Fri, 03 Feb 2006 16:44:44 +0100") References: Message-ID: >>>>> "Marco" == Marco Baringer writes: >> Jan Rychter wrote: >>> How do you handle string parameters in TAL tags? Specifically, >>> quoting? >>> >>> I've tried this: >>> >>> >>> >>> but it results in garbage generated after the tag is replaced, I >>> get extra: /></a > Marco> this is as good a time as any to describe the (probably too Marco> many) steps required to create your own tal tag: [...] Marco> not that you asked for this, but hope it helps anyway. This is exactly what I asked for, I just wasn't aware that I was asking for it. Thanks, it does precisely what I want and it does it well! --J. From erick at cibercalli.com Sat Feb 4 02:24:42 2006 From: erick at cibercalli.com (Erick Ivaan Lopez Carreon) Date: Fri, 03 Feb 2006 20:24:42 -0600 Subject: [Bese-devel] Re: Help installing UCW In-Reply-To: <87wtgcizku.fsf@gismo.pca.it> References: <1138827161.3941.41.camel@localhost.localdomain> <87oe1q5bit.fsf@gismo.pca.it> <1138903939.3942.37.camel@localhost.localdomain> <87wtgcizku.fsf@gismo.pca.it> Message-ID: <1139019882.3897.8.camel@localhost.localdomain> Hello again: On Fri, 2006-02-03 at 10:03 +0100, Luca Capello wrote: > [this is for the CL library/software] > $ mkdir /folder/where/you/store/CL/sources > $ cd /folder/where/you/store/CL/sources > $ grab the CL sources (darcs get [Marco's software], for example) > Thanks, i do that and UCW is working if i use the httpd backend, but not with apache backend. > [this is for the Common Lisp Controller, specific to $USER] > $ mkdir -p ~/.clc > $ mkdir -p ~/.clc/systems > $ ln -s /folder/where/you/store/CL/sources/package/package.asd \ > package.asd > I do that with: clc-register-user-package /path/asdf-system-name.asd > Then, you can just call > > (asdf:oos 'asdf:load-op 'package) > I use : (require :package) It's correct?? > When some CL source files are modified or your Lisp implementation is > upgraded, the Common Lisp Controller automatically rebuilds/reloads > what is needed :-) > cool! > > (require :parenscript) > [...] > > utils.fasl version 61 but require version 62 or something similar. > > As Marco posted yesterday, this means that utils.fasl was compiled > with a previous SBCL version. > Yes, i delete and reinstall and this error disappear :) But, i can't get Apache + modlisp backend works :( apache 1.3.34-2 cl-modlisp 0.6-1 libapache-mod-lisp 2.41-0.1 ------------------------------------------------------------ My apache config: LispServer 127.0.0.1 3001 ucw SetHandler lisp-handler SetHandler lisp-handler ------------------------------------------------------------ My ucwctl: LISP="`which sbcl`" EVAL="--eval" UCWROOT="/home/user/.sbcl/site/ucw" VARROOT="$UCWROOT/var" LOGROOT="$UCWROOT/logs" LOGLEVEL="INFO" HOST="127.0.0.1" PORT="3001" DEBUGGER="T" INSPECTOR="NIL" #BACKEND="httpd" BACKEND="mod-lisp" ------------------------------------------------------------ My start.lisp: (ucw:create-server :backend ;;:httpd :mod-lisp ;; :araneida ;; :aserve :host "127.0.0.1" :port 3001 ------------------------------------------------------------ I start ucw with: ./bin/ucwctl start && ./bin/ucwctl attach and this happens: 2006-02-03T19:39.28 IT.BESE.ARNESI:+WARN+ IT.BESE.UCW::UCW.BACKEND: Attempting to publish #P"/home/user/.sbcl/site/ucw/wwwroot/./" at "/" but mod_lisp backend does not support publish-directory. 2006-02-03T19:39.28 IT.BESE.ARNESI:+WARN+ IT.BESE.UCW::UCW.BACKEND: Attempting to publish #P"/home/user/.sbcl/site/ucw/wwwroot/./admin/" at "/admin/" but mod_lisp backend does not support publish-directory. 2006-02-03T19:39.28 IT.BESE.ARNESI:+INFO+ IT.BESE.UCW::UCW-LOGGER: Starting up standard server #. ------------------------------------------------------------ But when i try to access the url: http://127.0.0.1:3001/ Nothing happens, the page seems to be loading forever and when stop the loading i get the following errors: 2006-02-03T19:58.13 IT.BESE.ARNESI:+ERROR+ IT.BESE.UCW::UCW.BACKEND: Worker thread # reported #. ------------------------------------------------------------ I googled for: UCW apache mod_lisp and found : http://people.core.gen.tr/~aycan.irican/web/publish/WebGelistirme.html Also Read: ucw_dev/README ucw_dev/docs/QUICKSTART And still don't work :( I'm concerned about: Attempting to publish #P"/home/user/.sbcl/site/ucw/wwwroot/./" at "/" but mod_lisp backend does not support publish-directory. Maybe i need a newer mod_lisp?? I am grateful in advance for any advice on this matter. Greetings. From mdanish at andrew.cmu.edu Sat Feb 4 07:18:53 2006 From: mdanish at andrew.cmu.edu (Matthew Danish) Date: Sat, 4 Feb 2006 02:18:53 -0500 Subject: [Bese-devel] Re: the limitations of the code within actions In-Reply-To: References: <20060201233012.GG562@mapcar.org> <1138870638.5131.26.camel@localhost.localdomain> <20060202164248.GH562@mapcar.org> Message-ID: <20060204071853.GL562@mapcar.org> On Fri, Feb 03, 2006 at 10:52:40AM +0100, Marco Baringer wrote: > Matthew Danish wrote: > > Well this is basically what I did, but it did bring up another problem: > > > > I used MULTIPLE-VALUE-CALL to invoke an outside normal function which > > handled the errors and returned values indicating what happened. What > > it returned, however, was not what I expected: > > > > (multiple-value-call > > (lambda (cc result msg) > > > > What I found was that the first value returned was some kind of Arnesi > > data structure named CLOSURE, rather than my result. I inserted the > > extra parameter cc into the function and now it works fine, but this > > makes me wonder if there is something better I can do here. > > can you post the actual code? (just the action and the outside function) Part of a larger LABELS inside DEFACTION: (create-guest-password (guest-info) (loop for password = (call 'guest-password-form :email (email guest-info)) do (multiple-value-call (lambda (cc result msg) (cond ((eql result ':simple-error) (call 'info-message :ok-text "Go back" :message msg)) ((eql result 't) (return password)))) (new-guest-password password guest-info)))) (defun new-guest-password (password guest-info) (handler-case (values (set-guest-password password :email (email guest-info)) "") (invalid-parameters () (values :simple-error "Invalid parameters")) (simple-error (e) (values :simple-error (apply 'format nil (simple-condition-format-control e) (simple-condition-format-arguments e)))))) -- ;; Matthew Danish -- user: mrd domain: cmu.edu ;; OpenPGP public key: C24B6010 on keyring.debian.org From albertosantini at gmail.com Sat Feb 4 22:56:37 2006 From: albertosantini at gmail.com (Alberto Santini) Date: Sat, 4 Feb 2006 23:56:37 +0100 Subject: [Bese-devel] Parenscript: Unknown character name - "Form"... Message-ID: <6a066ca20602041456w6eec0188o1754c17cb98d29eb@mail.gmail.com> Hello. Using the latest dev release of parenscript and openmcl 1.0 on Mac, I catch this error: ... Read error between positions 12878 and 12991 in /Users/albertosantini/My/Dev/Lisp/ucw_libs/parenscript/src/js.lisp. > Error in process listener(1): Unknown character name - "Form" . ... I commented the line containing "Form" in js.lisp file. ... (defparameter *js-lisp-escaped-chars* '((#\' . #\') (#\\ . #\\) (#\b . #\Backspace) ; (#\f . #\Form) (#\n . #\Newline) (#\r . #\Return) (#\t . #\Tab))) Thanks, Alberto Santini From henrik at evahjelte.com Sun Feb 5 16:46:57 2006 From: henrik at evahjelte.com (henrik hjelte) Date: Sun, 05 Feb 2006 17:46:57 +0100 Subject: [Bese-devel] Parenscript: Unknown character name - "Form"... In-Reply-To: <6a066ca20602041456w6eec0188o1754c17cb98d29eb@mail.gmail.com> References: <6a066ca20602041456w6eec0188o1754c17cb98d29eb@mail.gmail.com> Message-ID: <1139158017.24998.34.camel@localhost.localdomain> Sorry, I wish I had a Mac to test things on. A little patch is attachted which solves this. /Henrik Hjelte -------------- next part -------------- New patches: [No form-character on openmcl henrik.hjelte at poboxes.com**20060205164045] { hunk ./src/js.lisp 402 - '((#\' . #\') + `((#\' . #\') hunk ./src/js.lisp 405 - (#\f . #\Form) + (#\f . ,(code-char 12)) } Context: [proper escape sequences in strings henrik.hjelte at poboxes.com**20060202123912] [ref2test finds reference.lisp in docs dir henrik.hjelte at poboxes.com**20060201111712] [merge parenscript-test.asd into parenscript.asd Luca Capello **20060127085709] [move doc files to docs/ Luca Capello **20060123222548] [move test files to t/ and modify parenscript-test.asd as well Luca Capello **20060123215026] [move source files to src/ and modify parenscript.asd as well Luca Capello **20060123213152] [remove trailing spaces at endlines in *.lisp Luca Capello **20060123211927] [remove trailing spaces at empty lines in *.lisp Luca Capello **20060122215742] [pbook.py: convert endlines to Unix format Luca Capello **20060122211704] [css-inline compiles with cmucl henrik.hjelte at poboxes.com**20060109113602] [changed CASE to SWITCH and made CASE more like Lisp. henrik.hjelte at poboxes.com**20051227190529] [New function gen-js-name-string Marco Baringer **20051219160435 This allows you to get a unique javascript name as a string and not just as a symbol. ] [bugfix slot-value henrik.hjelte at poboxes.com**20051219131901] [bug in dwim-join henrik.hjelte at poboxes.com**20051218171724] [css-inline generator henrik.hjelte at poboxes.com**20051218111426] [cleaned reference henrik.hjelte at poboxes.com**20051217095257] [tests from the reference henrik.hjelte at poboxes.com**20051216180844] [quotes in introduction henrik.hjelte at poboxes.com**20051216153949] [Added defgenerics for all the defmethods Alan-Shields at omrf.ouhsc.edu**20051201191709 Ze style warnings! Zey drive me craaaazy. ] [enable #+parenscript Alan-Shields at omrf.ouhsc.edu**20051115235351 To integrate Parenscript with Araneida without requiring Parenscript, I had to do some compile conditionals. This would make it much easier. Marco, eventually I am going to add this to every last one of your projects. ;-p ] [need a function for css-inlining Alan-Shields at omrf.ouhsc.edu**20051115235233 If you have code that needs to inline CSS across an array, it's difficult to use the current macro. Having a function helps - mapping the macro to the function only completes things. ] [Proper concatenation of inline CSS Alan-Shields at omrf.ouhsc.edu**20051115234812 CSS-INLINE does a simple concatenation of the results of CSS directives. This looks like: color:blacksize:200% Unfortunately, it should look like this: color:black;size:200% It now does. ] [added COPYING file Luca Capello **20051107123047] [Escape { and } chars in boring regexps Marco Baringer **20051107102118] [Need to escape #\' in javascript strings Marco Baringer **20051005090942] [Fix buf in JS-INLINE causing infinite macro expansion Marco Baringer **20051005082900] [Add in checks to deal with functions/macros whose names aren't symbols Marco Baringer **20050912081700] [Use strings, and not symbols, to name javascript functions/macros Marco Baringer **20050905082735 This effectivly flattens the namespace of javascript code. While this change makes js similar to javascript, and removes the need to export symbols from the JS package, it may break previous code which depended on, for expample, js:and not being equivalent to js:and. ] [Added support for literal objects ( "{ ... }" syntax) Marco Baringer **20050905081702] [Export cen-js-names and with-unique-js-names Marco Baringer **20050831115820] [Added docstrings to previous patch Marco Baringer **20050815135128] [Added GEN-JS-NAME and WITH-UNIQUE-JS-NAMES Marco Baringer **20050815134940] [dotimes-dolist-fix Ivan Toshkov **20050815080906 Fixes the infinite loop problems of `dotimes' and `dolist'. ] [Parenscript, documentation not withstandanding, does not depend on htmlgen Marco Baringer **20050815080053] [Attempt to improve the conversion of (js ((lambda ...) ...)) Marco Baringer **20050815074902] [Introduce the JS-LAMBDA class. Make JS-DEFUN a subclass of JS-LAMBDA Marco Baringer **20050815074836] [Implement JS and JS-INLINE in terms of JS* and JS-INLINE* Marco Baringer **20050815063921] [Symbols starting with #\: are left as is, no case conversion or other mangling Marco Baringer **20050814141629] [Added JS* and JS-INLINE*. Marco Baringer **20050814134534] [Javascript strings need to be quated with ' and not " to avoid interfering with the surrounding HTML. Marco Baringer **20050814134344] [Ugly hack to support ((lambda ...) ...) Marco Baringer **20050813142023] [Mention that I'm maintaining this version of parenscript Marco Baringer **20050813135238] [Rename the system/package in the system definition, just renaming the file doesn't cut it :(. Marco Baringer **20050813135107] [Added images used in documentation Marco Baringer **20050813134441] [Added the pbook.py file used to generate the documentation Marco Baringer **20050813133732] [Added declare ignore forms for unused function arguments Marco Baringer **20050808154843] [Rename system def Marco Baringer **20050808154836] [Setup boringfile Marco Baringer **20050726100549] [Added files from parenscript 0.1.0 as distributed by Manuel Odendahl Marco Baringer **20050726100416] Patch bundle hash: b95ebb46dc900623948f96bb3e369ad430be3cfc From aycan.irican at core.gen.tr Sun Feb 5 17:12:53 2006 From: aycan.irican at core.gen.tr (Aycan iRiCAN) Date: Sun, 05 Feb 2006 19:12:53 +0200 Subject: [Bese-devel] File upload with mod-lisp Message-ID: <877j89ivai.fsf@core.gen.tr> I'm having this error when I try to upload a file. 2006-02-05T18:29.16 +ERROR+ UCW.BACKEND: Worker thread # reported #. This happens when read-request in mod-lisp.lisp tries to read-sequence From network-stream. (awhen (get-header request "Content-Length") (let ((content-length (parse-integer it :junk-allowed t))) (when content-length (setf raw-body (make-array content-length :element-type 'character)) (read-sequence raw-body network-stream)))) Is there an unpublished fix for this problem? Best Regards, -- Aycan iRiCAN C0R3 Computer Security Group http://www.core.gen.tr -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 188 bytes Desc: not available URL: From a_bakic at yahoo.com Sun Feb 5 18:04:09 2006 From: a_bakic at yahoo.com (Aleksandar Bakic) Date: Sun, 5 Feb 2006 10:04:09 -0800 (PST) Subject: [Bese-devel] defaction/:isolate problem Message-ID: <20060205180409.82827.qmail@web34603.mail.mud.yahoo.com> Hi, I tried to add :isolate to an action: (defaction update-line-item :isolate ((self line-item-editor) place) (%update-line-item (instance self) place (order self)) (answer nil)) However, when invoked, the action signals an error (when invoked for the first time): The function T is undefined. Using *trace-cc*, I noticed that the guarded action's function is plain T (probably generated by defmethod/cc, which is called by %defaction...). Am I using this incorrectly?.. Thanks, Alex __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From albertosantini at gmail.com Sun Feb 5 18:55:48 2006 From: albertosantini at gmail.com (Alberto Santini) Date: Sun, 5 Feb 2006 19:55:48 +0100 Subject: [Bese-devel] Parenscript: Unknown character name - "Form"... In-Reply-To: <1139158017.24998.34.camel@localhost.localdomain> References: <6a066ca20602041456w6eec0188o1754c17cb98d29eb@mail.gmail.com> <1139158017.24998.34.camel@localhost.localdomain> Message-ID: <6a066ca20602051055u23025c0dt99c889caa97d2325@mail.gmail.com> Thanks. I saw the Marco's patch too: * The #\Form is not a standard character name, use #.(code-char 12) instead. Alberto On 2/5/06, henrik hjelte wrote: > Sorry, I wish I had a Mac to test things on. A little patch is attachted which solves this. > > /Henrik Hjelte From attila.lendvai at gmail.com Mon Feb 6 12:59:15 2006 From: attila.lendvai at gmail.com (Attila Lendvai) Date: Mon, 6 Feb 2006 13:59:15 +0100 Subject: [Bese-devel] Dynamic environment and Arnesi Message-ID: Hello! I'm missing special variables when using Arnesi, and I was thinking wether it would be possible for Arnesi to give some support in this. Could be I don't know enough about the CPS voodoo, but I think it's possible for Arnesi to provide two functions in /cc code similar to these: (let/cc-dynamic name value) (makunbound/cc-dynamic name) The names are silly, but hopefully intuitive. The first one would define a dynamic variable in the continuation, that could be looked up from /cc code using (declare special) or some other similar way. The second would remove that binding. Maybe the lookup method could also be explicit, with a (lookup/cc-dynamic name). Also it would be useful if these could be nested just like dynamic vars. With the help of these we could emulate similar functionality as the with-... macros and special variables in normal lisp code. Am I missing something and this is already available in a form I don't know about? If not, then is it possible to implement this feature? Was anybody thinking about it? Does it make sense ignoring the details? Thanks in advance, - attila (alias 101 on irc &no 'its not lisp code :) From a_bakic at yahoo.com Mon Feb 6 14:39:22 2006 From: a_bakic at yahoo.com (Aleksandar Bakic) Date: Mon, 6 Feb 2006 06:39:22 -0800 (PST) Subject: [Bese-devel] Dynamic environment and Arnesi In-Reply-To: Message-ID: <20060206143922.10767.qmail@web34604.mail.mud.yahoo.com> Hi, > Am I missing something and this is already available in a form I don't > know about? I am not sure if dynamic variables are already available (probably not yet), but there was talk on the list about them a few months ago (look for unwinding/throwing). There should be infrastructure, based on the addition of dynamic environments, now ready for implementing dynamic variables, at least, I believe. Alex __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From masmxx at gmail.com Tue Feb 7 02:35:36 2006 From: masmxx at gmail.com (Marco Monteiro) Date: Tue, 7 Feb 2006 02:35:36 +0000 Subject: [Bese-devel] Parenscript enhancement Message-ID: <3b5a0edf0602061835n4e85a604x88c1b2b7fa4546a2@mail.gmail.com> The attached hack enables forms like: (js (create :create 1)) ; notice the :create With the patch, most old reserved keywords are 'special' only if they are the first subexpression in an expression. Apparently it works: it passes all regression tests. Marco -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: js.lisp.diff Type: application/octet-stream Size: 2619 bytes Desc: not available URL: From mb at bese.it Tue Feb 7 10:23:48 2006 From: mb at bese.it (Marco Baringer) Date: Tue, 07 Feb 2006 11:23:48 +0100 Subject: [Bese-devel] Re: File upload with mod-lisp In-Reply-To: <877j89ivai.fsf@core.gen.tr> References: <877j89ivai.fsf@core.gen.tr> Message-ID: Aycan iRiCAN wrote: > I'm having this error when I try to upload a file. > > 2006-02-05T18:29.16 +ERROR+ UCW.BACKEND: Worker thread # reported #. > > This happens when read-request in mod-lisp.lisp tries to read-sequence > From network-stream. > > (awhen (get-header request "Content-Length") > (let ((content-length (parse-integer it :junk-allowed t))) > (when content-length > (setf raw-body (make-array content-length :element-type 'character)) > (read-sequence raw-body network-stream)))) > > Is there an unpublished fix for this problem? try the ucw_binary_http branch: http://common-lisp.net/project/ucw/repos/ucw_binary_http (this will become ucw_dev very soon) -- -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 masmxx at gmail.com Tue Feb 7 16:09:25 2006 From: masmxx at gmail.com (Marco Monteiro) Date: Tue, 7 Feb 2006 16:09:25 +0000 Subject: [Bese-devel] Re: Parenscript enhancement In-Reply-To: <3b5a0edf0602061835n4e85a604x88c1b2b7fa4546a2@mail.gmail.com> References: <3b5a0edf0602061835n4e85a604x88c1b2b7fa4546a2@mail.gmail.com> Message-ID: <3b5a0edf0602070809g6b46dab0r2af7d1aed0ccb35c@mail.gmail.com> I have just discovered 'darcs send'. Disregard the other email... and this one too. Marco On 2/7/06, Marco Monteiro wrote: > > The attached hack enables forms like: > > (js (create :create 1)) ; notice the :create > > With the patch, most old reserved keywords are 'special' only if they are > the first > subexpression in an expression. > Apparently it works: it passes all regression tests. > > Marco > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From henrik at evahjelte.com Wed Feb 8 07:35:00 2006 From: henrik at evahjelte.com (henrik hjelte) Date: Wed, 08 Feb 2006 08:35:00 +0100 Subject: [Bese-devel] File upload with mod-lisp In-Reply-To: <877j89ivai.fsf@core.gen.tr> References: <877j89ivai.fsf@core.gen.tr> Message-ID: <1139384100.9215.6.camel@localhost.localdomain> On s?n, 2006-02-05 at 19:12 +0200, Aycan iRiCAN wrote: > I'm having this error when I try to upload a file. > > 2006-02-05T18:29.16 +ERROR+ UCW.BACKEND: Worker thread # reported #. > > This happens when read-request in mod-lisp.lisp tries to read-sequence > From network-stream. > > (awhen (get-header request "Content-Length") > (let ((content-length (parse-integer it :junk-allowed t))) > (when content-length > (setf raw-body (make-array content-length :element-type 'character)) > (read-sequence raw-body network-stream)))) > > Is there an unpublished fix for this problem? The latest version of mod-lisp didn't work at all for me on linux+x86 sbcl due because read-line and write-line wouldn't write to a stream of type (unsigned-byte 8). Maybe something is in the works that fixes this, in the meanwhile I have made a patch to the ucw_public branch that solves this problem. /Henrik Hjelte From mb at bese.it Wed Feb 8 15:47:37 2006 From: mb at bese.it (Marco Baringer) Date: Wed, 08 Feb 2006 16:47:37 +0100 Subject: [Bese-devel] Re: File upload with mod-lisp In-Reply-To: <1139384100.9215.6.camel@localhost.localdomain> References: <877j89ivai.fsf@core.gen.tr> <1139384100.9215.6.camel@localhost.localdomain> Message-ID: henrik hjelte wrote: > The latest version of mod-lisp didn't work at all for me > on linux+x86 sbcl due because read-line and write-line wouldn't > write to a stream of type (unsigned-byte 8). Maybe something is in the > works that fixes this, in the meanwhile I have made a patch to the > ucw_public branch that solves this problem. > > /Henrik Hjelte i had the code which fixed mod_lisp but had never recorded and pushed the patches :( -- -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 Feb 8 16:04:24 2006 From: mb at bese.it (Marco Baringer) Date: Wed, 08 Feb 2006 17:04:24 +0100 Subject: [Bese-devel] ucw_binary_http Message-ID: warning: i've just merged the ucw_dev and ucw_binary branches. this code has been tested on openmcl and sbcl (ppc and x86). pull patches when you're sure you can afoard to have something break (not that i think anything will). -- -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 mbaringer at common-lisp.net Wed Feb 8 17:52:55 2006 From: mbaringer at common-lisp.net (Marco Baringer) Date: Wed, 8 Feb 2006 11:52:55 -0600 (CST) Subject: [Bese-devel] New patches: 7-Feb-2006 Message-ID: <20060208175255.03B515F00E@common-lisp.net> An updated tarball of CFFI's source can be downloaded here: http://common-lisp.net/project/cffi/tarballs/arnesi_dev-20060207.tar.gz Darcsweb URL: http://common-lisp.net/cgi-bin/darcsweb/darcsweb.cgi?r=cffi;a=summary From der_julian at web.de Wed Feb 8 23:17:59 2006 From: der_julian at web.de (Julian Stecklina) Date: Thu, 9 Feb 2006 00:17:59 +0100 Subject: [Bese-devel] Compilation error with ACL 7 In-Reply-To: <787bbe1c050829053341ca2c75@mail.gmail.com> References: <20050828185913.3e86a073@localhost> <787bbe1c050829053341ca2c75@mail.gmail.com> Message-ID: <20060209001759.36700720@localhost> On Mon, 29 Aug 2005 14:33:09 +0200 Slawek Zak wrote: > 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. Has someone figured out what the actual problem is? It makes UCW quite a pain to compile on Allegro CL. Regards, -- Julian Stecklina "I object to doing things that computers can do." - Olin Shivers From levente.meszaros at gmail.com Thu Feb 9 21:51:07 2006 From: levente.meszaros at gmail.com (=?ISO-8859-1?Q?Levente_M=E9sz=E1ros?=) Date: Thu, 9 Feb 2006 22:51:07 +0100 Subject: [Bese-devel] Special variable handling for call/cc Message-ID: Hi, Attached is a preliminary version of supporting special variables in arnesi call/cc code. I think the test cases look good even tough two of them still fail. I am not so satisfied with the implementation, especially with the part that captures the dynamic variables from the caller lisp code and the part that makes it visible within the called lisp code. They are using dynamically compiled code, so it might be a big performance drop. Maybe I should introduce a global variable whether this feature is required or not. Or it would even be better to be able to do this on a per variable basis. Defining and looking up special variables within cc code looks good I think. Suggestions are welcomed to improve the patch. Levy -------------- next part -------------- A non-text attachment was scrubbed... Name: special.patch Type: application/octet-stream Size: 26739 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: special-tests.patch Type: application/octet-stream Size: 24970 bytes Desc: not available URL: From mb at bese.it Fri Feb 10 10:13:56 2006 From: mb at bese.it (Marco Baringer) Date: Fri, 10 Feb 2006 11:13:56 +0100 Subject: [Bese-devel] Re: Special variable handling for call/cc In-Reply-To: References: Message-ID: Levente M?sz?ros wrote: > Hi, > > Attached is a preliminary version of supporting special variables in > arnesi call/cc code. > > I think the test cases look good even tough two of them still fail. I > am not so satisfied with the implementation, especially with the part > that captures the dynamic variables from the caller lisp code and the > part that makes it visible within the called lisp code. They are using > dynamically compiled code, so it might be a big performance drop. > Maybe I should introduce a global variable whether this feature is > required or not. Or it would even be better to be able to do this on a > per variable basis. > > Defining and looking up special variables within cc code looks good I think. > > Suggestions are welcomed to improve the patch. i get a few unbound variable errors, but since all the other tests pass so i've applied 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 luca at pca.it Fri Feb 10 13:58:29 2006 From: luca at pca.it (Luca Capello) Date: Fri, 10 Feb 2006 14:58:29 +0100 Subject: [Bese-devel] darcs patch: remove docs/reference.pdf, already included in manual.pdf In-Reply-To: <87d5i65bd0.fsf@gismo.pca.it> References: <87d5i65bd0.fsf@gismo.pca.it> Message-ID: <87hd77b9iy.fsf@gismo.pca.it> Hello! On Thu, 02 Feb 2006 11:00:27 +0100, Luca Capello wrote: > The attached patch removes docs/reference.pdf. Any news (positive or negative) on this patch? :-) Thx, bye, Gismo / Luca -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 188 bytes Desc: not available URL: From henrik at evahjelte.com Fri Feb 10 14:33:56 2006 From: henrik at evahjelte.com (henrik hjelte) Date: Fri, 10 Feb 2006 15:33:56 +0100 Subject: [Bese-devel] darcs patch: remove docs/reference.pdf, already included in manual.pdf In-Reply-To: <87hd77b9iy.fsf@gismo.pca.it> References: <87d5i65bd0.fsf@gismo.pca.it> <87hd77b9iy.fsf@gismo.pca.it> Message-ID: <1139582036.9215.32.camel@localhost.localdomain> On fre, 2006-02-10 at 14:58 +0100, Luca Capello wrote: > Hello! > > On Thu, 02 Feb 2006 11:00:27 +0100, Luca Capello wrote: > > The attached patch removes docs/reference.pdf. > > Any news (positive or negative) on this patch? :-) I think it is a good idea. The latex script doesn't work for me anyway...:( (But I guess I can work around it by removing the references to the pictures). By the way, the manual maybe should be updated with chapter on "Common Pitfalls for Common Lispers". I have comments about this and that spread all over my code. I can't be the only one that forgets that most parenscript statements don't return values automatically. /Henrik Hjelte > > Thx, bye, > Gismo / Luca > _______________________________________________ > bese-devel mailing list > bese-devel at common-lisp.net > http://common-lisp.net/cgi-bin/mailman/listinfo/bese-devel From luca at pca.it Fri Feb 10 15:06:49 2006 From: luca at pca.it (Luca Capello) Date: Fri, 10 Feb 2006 16:06:49 +0100 Subject: [Bese-devel] darcs patch: remove docs/reference.pdf, already included in manual.pdf In-Reply-To: <1139582036.9215.32.camel@localhost.localdomain> References: <87d5i65bd0.fsf@gismo.pca.it> <87hd77b9iy.fsf@gismo.pca.it> <1139582036.9215.32.camel@localhost.localdomain> Message-ID: <878xsjb6d2.fsf@gismo.pca.it> Hello! On Fri, 10 Feb 2006 15:33:56 +0100, henrik hjelte wrote: > I think it is a good idea. The latex script doesn't work for me > anyway...:( (But I guess I can work around it by removing the > references to the pictures). [1] or [2]? In the former case, for the Debian package I've prepared a small script to deal with. I'm attaching the script, but I don't consider it for upstream inclusion, as some things are Debian-specific and it's really a dirty hack. In the latter, I'm sorry, I don't know the root of your problem (I'm still a LaTeX newbie). IMHO, the best option should be to convert the documentation into the qbook format [3], but my Lisp time is already missing... > By the way, the manual maybe should be updated with chapter on > "Common Pitfalls for Common Lispers". I have comments about this and > that spread all over my code. I can't be the only one that forgets > that most parenscript statements don't return values automatically. As stated above, missing time :-( Thx, bye, Gismo / Luca [1] http://common-lisp.net/pipermail/bese-devel/2006-January/001480.html [2] http://common-lisp.net/pipermail/bese-devel/2006-February/001519.html [3] http://common-lisp.net/pipermail/bese-devel/2006-January/001469.html -------------- next part -------------- A non-text attachment was scrubbed... Name: make-pdf.sh.gz Type: application/octet-stream Size: 843 bytes Desc: Debian script to generate ParenScript documentation from lisp sources URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 188 bytes Desc: not available URL: From mbaringer at common-lisp.net Fri Feb 10 15:05:54 2006 From: mbaringer at common-lisp.net (Marco Baringer) Date: Fri, 10 Feb 2006 09:05:54 -0600 (CST) Subject: [Bese-devel] New patches to ucw_public: 9-Feb-2006 Message-ID: <20060210150554.8F14565011@common-lisp.net> Thu Feb 9 15:03:16 CST 2006 attila.lendvai at gmail.com * Removed unnecessary html-stream accessor from aserve backend (fix endless loop) M ./src/backend/aserve.lisp -3 Wed Feb 8 14:02:34 CST 2006 svg at surnet.ru * fix my bug M ./src/rerl/standard-session.lisp -3 +4 Wed Feb 8 12:56:35 CST 2006 svg at surnet.ru * redisplay current frame if it was found but action was not instead of threw to entry point M ./src/rerl/standard-session-frame.lisp -2 +4 M ./src/rerl/standard-session.lisp -25 +32 Wed Feb 8 04:54:45 CST 2006 svg at surnet.ru * limit backtracking depth to resonable size M ./src/rerl/standard-classes.lisp +3 M ./src/rerl/standard-session.lisp -3 +25 M ./src/rerl/standard-vars.lisp +3 Wed Feb 8 03:17:26 CST 2006 henrik.hjelte at poboxes.com * utf-8 for url M ./src/backend/common.lisp -2 +2 M ./src/vars.lisp -1 +10 An updated tarball of ucw_public's source can be downloaded here: http://common-lisp.net/project/ucw/tarballs/ucw_public-20060209.tar.gz Darcsweb URL: http://common-lisp.net/cgi-bin/darcsweb/darcsweb.cgi?r=ucw_public;a=summary From henrik at evahjelte.com Fri Feb 10 18:03:01 2006 From: henrik at evahjelte.com (Henrik Hjelte) Date: Fri, 10 Feb 2006 19:03:01 +0100 Subject: [Bese-devel] darcs patch: remove docs/reference.pdf, already included in manual.pdf In-Reply-To: <878xsjb6d2.fsf@gismo.pca.it> References: <87d5i65bd0.fsf@gismo.pca.it> <87hd77b9iy.fsf@gismo.pca.it> <1139582036.9215.32.camel@localhost.localdomain> <878xsjb6d2.fsf@gismo.pca.it> Message-ID: <1139594581.9215.48.camel@localhost.localdomain> On fre, 2006-02-10 at 16:06 +0100, Luca Capello wrote: > Hello! > > On Fri, 10 Feb 2006 15:33:56 +0100, henrik hjelte wrote: > > I think it is a good idea. The latex script doesn't work for me > > anyway...:( (But I guess I can work around it by removing the > > references to the pictures). > > [1] or [2]? Unfortunately it is number two, ! LaTeX Error: Cannot determine size of graphic in images/slideshow.png (no BoundingBox). > > In the former case, for the Debian package I've prepared a small > script to deal with. I'm attaching the script, but I don't consider > it for upstream inclusion, as some things are Debian-specific and it's > really a dirty hack. Nice script, I don't think its particularly dirty, it's not your fault that the path to the images are hardcoded to /tmp/. The only real dirt i found was that the source path of the image folder is hardcoded, when you copy the images. > In the latter, I'm sorry, I don't know the root of your problem (I'm > still a LaTeX newbie). > > IMHO, the best option should be to convert the documentation into the > qbook format [3], but my Lisp time is already missing... maybe a project for the parenscript-gardeners :-) > > > By the way, the manual maybe should be updated with chapter on > > "Common Pitfalls for Common Lispers". I have comments about this and > > that spread all over my code. I can't be the only one that forgets > > that most parenscript statements don't return values automatically. I'll do this... sometime... /Henrik > > As stated above, missing time :-( > > Thx, bye, > Gismo / Luca > > [1] http://common-lisp.net/pipermail/bese-devel/2006-January/001480.html > [2] http://common-lisp.net/pipermail/bese-devel/2006-February/001519.html > [3] http://common-lisp.net/pipermail/bese-devel/2006-January/001469.html > From mbaringer at common-lisp.net Sat Feb 11 06:00:04 2006 From: mbaringer at common-lisp.net (Marco Baringer) Date: Sat, 11 Feb 2006 00:00:04 -0600 (CST) Subject: [Bese-devel] New patches to parenscript: 10-Feb-2006 Message-ID: <20060211060004.C8C985B016@common-lisp.net> Fri Jan 27 07:25:11 CST 2006 Luca Capello * remove docs/reference.pdf, already included in manual.pdf R ./docs/reference.pdf An updated tarball of parenscript's source can be downloaded here: http://common-lisp.net/project/ucw/tarballs/parenscript-20060210.tar.gz Darcsweb URL: http://common-lisp.net/cgi-bin/darcsweb/darcsweb.cgi?r=parenscript;a=summary From mbaringer at common-lisp.net Sat Feb 11 06:00:05 2006 From: mbaringer at common-lisp.net (Marco Baringer) Date: Sat, 11 Feb 2006 00:00:05 -0600 (CST) Subject: [Bese-devel] New patches to arnesi_dev: 10-Feb-2006 Message-ID: <20060211060005.1F66A5B015@common-lisp.net> Fri Feb 10 09:48:19 CST 2006 Marco Baringer * (setf log.level) needs to, as all setf methods, return the new-value M ./src/log.lisp -1 +2 Thu Feb 9 15:37:39 CST 2006 Levente M??sz??ros * Add test cases for dynamic variable handling M ./t/call-cc.lisp +81 Wed Feb 8 15:40:15 CST 2006 Levente M??sz??ros * Support capturing dynamic variables from lisp via declare. M ./src/call-cc/apply.lisp -1 +5 M ./src/call-cc/handlers.lisp -2 +10 M ./src/walk.lisp -4 +11 Mon Feb 6 16:46:03 CST 2006 Levente M??sz??ros * Makes visible the dynamic variables defined in cc code for normal lisp code. This has some performance issues when dynamic variables are defined in cc code. M ./src/call-cc/apply.lisp -2 +13 Mon Feb 6 16:42:08 CST 2006 Levente M??sz??ros * Support (declare (special var)) declarations and put variable values in the dynamic environment. This patch allows to access dynamic variables defined in cc code from cc code. M ./src/call-cc/handlers.lisp -4 +18 An updated tarball of arnesi_dev's source can be downloaded here: http://common-lisp.net/project/bese/tarballs/arnesi_dev-20060210.tar.gz Darcsweb URL: http://common-lisp.net/cgi-bin/darcsweb/darcsweb.cgi?r=arnesi_dev;a=summary From mbaringer at common-lisp.net Sat Feb 11 06:00:05 2006 From: mbaringer at common-lisp.net (Marco Baringer) Date: Sat, 11 Feb 2006 00:00:05 -0600 (CST) Subject: [Bese-devel] New patches to ucw_dev: 10-Feb-2006 Message-ID: <20060211060005.CB9105E004@common-lisp.net> Fri Feb 10 09:54:21 CST 2006 Marco Baringer * Drop the dump-application(s) methods. This code hasn't been used for ages (and probably shouldn't have been used in the first place). Using compile-file and #. is just begging to get bitten. M ./src/rerl/standard-application.lisp -7 M ./src/rerl/standard-server.lisp -33 An updated tarball of ucw_dev's source can be downloaded here: http://common-lisp.net/project/ucw/tarballs/ucw_dev-20060210.tar.gz Darcsweb URL: http://common-lisp.net/cgi-bin/darcsweb/darcsweb.cgi?r=ucw_dev;a=summary From mb at bese.it Fri Feb 10 19:39:22 2006 From: mb at bese.it (Marco Baringer) Date: Fri, 10 Feb 2006 20:39:22 +0100 Subject: [Bese-devel] Re: darcs patch: remove docs/reference.pdf, already included in manual.pdf In-Reply-To: <1139594581.9215.48.camel@localhost.localdomain> References: <87d5i65bd0.fsf@gismo.pca.it> <87hd77b9iy.fsf@gismo.pca.it> <1139582036.9215.32.camel@localhost.localdomain> <878xsjb6d2.fsf@gismo.pca.it> <1139594581.9215.48.camel@localhost.localdomain> Message-ID: Henrik Hjelte wrote: >> IMHO, the best option should be to convert the documentation into the >> qbook format [3], but my Lisp time is already missing... > maybe a project for the parenscript-gardeners :-) if i were to find some time and do this we'd lose the images in parenscripts current docs. any problems with 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 mb at bese.it Sat Feb 11 16:59:13 2006 From: mb at bese.it (Marco Baringer) Date: Sat, 11 Feb 2006 17:59:13 +0100 Subject: [Bese-devel] Re: the limitations of the code within actions In-Reply-To: <20060204071853.GL562@mapcar.org> References: <20060201233012.GG562@mapcar.org> <1138870638.5131.26.camel@localhost.localdomain> <20060202164248.GH562@mapcar.org> <20060204071853.GL562@mapcar.org> Message-ID: Matthew Danish wrote: > On Fri, Feb 03, 2006 at 10:52:40AM +0100, Marco Baringer wrote: >> Matthew Danish wrote: >>> Well this is basically what I did, but it did bring up another problem: >>> >>> I used MULTIPLE-VALUE-CALL to invoke an outside normal function which >>> handled the errors and returned values indicating what happened. What >>> it returned, however, was not what I expected: >>> >>> (multiple-value-call >>> (lambda (cc result msg) >>> >>> What I found was that the first value returned was some kind of Arnesi >>> data structure named CLOSURE, rather than my result. I inserted the >>> extra parameter cc into the function and now it works fine, but this >>> makes me wonder if there is something better I can do here. this was a bug in the interpreter's handling of multiple-value-call. it should be fixed now (it passes all the tests i could think of). -- -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 mbaringer at common-lisp.net Sun Feb 12 06:00:06 2006 From: mbaringer at common-lisp.net (Marco Baringer) Date: Sun, 12 Feb 2006 00:00:06 -0600 (CST) Subject: [Bese-devel] New patches to arnesi_dev: 11-Feb-2006 Message-ID: <20060212060006.21D272A033@common-lisp.net> Sat Feb 11 10:56:54 CST 2006 Marco Baringer * Fixed bug in with-call/cc's handling of multiple-value-call. (Reported by: Matthew Danish ) When the function in a multiple-value-call form was a literal lambda we were accidentaly passing _all_ the arguments passed to m-v-c to the function (the first of these arguments is always the function itself). M ./src/call-cc/handlers.lisp -2 +2 M ./t/call-cc.lisp +27 An updated tarball of arnesi_dev's source can be downloaded here: http://common-lisp.net/project/bese/tarballs/arnesi_dev-20060211.tar.gz Darcsweb URL: http://common-lisp.net/cgi-bin/darcsweb/darcsweb.cgi?r=arnesi_dev;a=summary From levente.meszaros at gmail.com Sat Feb 11 21:06:44 2006 From: levente.meszaros at gmail.com (=?ISO-8859-1?Q?Levente_M=E9sz=E1ros?=) Date: Sat, 11 Feb 2006 22:06:44 +0100 Subject: [Bese-devel] Special variables Message-ID: Hello, This is an update on the preliminary special variable support in arnesi/cc. Now special variables should work correctly in defun/cc, let and let* forms with the well known lisp declare forms. The cc code integrates well with normal lisp code regarding special variables. There is a comprehensive test suite to check this. To import special variables from the calling lisp code and capture them within the continuation one can use (declare (special var)) within defun/cc, let and let*. Exporting special variables to called lisp code is done automatically. We might consider to change this in the future, maybe there should be a special (declare (export var)) or something like that. Levy -------------- next part -------------- A non-text attachment was scrubbed... Name: special.patch Type: application/octet-stream Size: 33350 bytes Desc: not available URL: From attila.lendvai at gmail.com Sun Feb 12 16:59:52 2006 From: attila.lendvai at gmail.com (Attila Lendvai) Date: Sun, 12 Feb 2006 17:59:52 +0100 Subject: [Bese-devel] list-container and aserve backend endless loop fix Message-ID: fyi, i've pushed two patches to the public repo: - a fix for an endless loop with aserve backend - a list-container class that is like simple-container but it renders the components in a <:ol tag with css-class. simple-container is not a good name imho, maybe one-of-container? but i'm not native english... - attila (alias 101 on irc &no 'its not lisp code :) From mb at bese.it Sun Feb 12 17:10:13 2006 From: mb at bese.it (Marco Baringer) Date: Sun, 12 Feb 2006 18:10:13 +0100 Subject: [Bese-devel] Re: Special variables In-Reply-To: References: Message-ID: Levente M?sz?ros wrote: > Hello, > > This is an update on the preliminary special variable support in arnesi/cc. i get this when attempting to apply the patch: darcs: Cannot apply this patch bundle, since we're missing: Thu Feb 9 22:51:58 CET 2006 Levente M?sz?ros * Add test cases for dynamic variable handling am i missing one of your emails? -- -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 Feb 12 17:11:02 2006 From: mb at bese.it (Marco Baringer) Date: Sun, 12 Feb 2006 18:11:02 +0100 Subject: [Bese-devel] Re: list-container and aserve backend endless loop fix In-Reply-To: References: Message-ID: Attila Lendvai wrote: > fyi, > > i've pushed two patches to the public repo: > - a fix for an endless loop with aserve backend > - a list-container class that is like simple-container but it renders > the components in a <:ol tag with css-class. i've setup a program to email the list with the new patches applied to ucw_public, so this kind of announcement shouldn't be neccessary anymore (let's hope) > simple-container is not a good name imho, maybe one-of-container? but > i'm not native english... generic-container? -- -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 attila.lendvai at gmail.com Sun Feb 12 17:43:28 2006 From: attila.lendvai at gmail.com (Attila Lendvai) Date: Sun, 12 Feb 2006 18:43:28 +0100 Subject: [Bese-devel] Re: list-container and aserve backend endless loop fix In-Reply-To: References: Message-ID: i've mostly meant that as a reminder for you Marco, or for those of you who can pull patches into the dev branch, because the aserve endless loop is a show-stopper for anyone who pulled from the dev branch in the last few days and uses the aserve backend. > > simple-container is not a good name imho, maybe one-of-container? but > > i'm not native english... > > generic-container? well, what i'm missing from its name is that it's about showing one of a bunch of components. as opposed to grid-container, list-container, etc that show all their components in different layouts. imho simple-container or generic-container does not intuitively say that it's about showing a single selected one at a time. but i have no good name ideas either... :| choice-container, choosing-container, selecting-container, show-selected-container, they are all a bit silly... - attila (alias 101 on irc &no 'its not lisp code :) From levente.meszaros at gmail.com Sun Feb 12 18:29:13 2006 From: levente.meszaros at gmail.com (=?ISO-8859-1?Q?Levente_M=E9sz=E1ros?=) Date: Sun, 12 Feb 2006 19:29:13 +0100 Subject: [Bese-devel] Special vars in arnesi/cc Message-ID: Dear Marco, Hope, now I have included everything. Levy -------------- next part -------------- A non-text attachment was scrubbed... Name: special.patch Type: application/octet-stream Size: 36173 bytes Desc: not available URL: From mbaringer at common-lisp.net Mon Feb 13 06:00:05 2006 From: mbaringer at common-lisp.net (Marco Baringer) Date: Mon, 13 Feb 2006 00:00:05 -0600 (CST) Subject: [Bese-devel] New patches to ucw_dev: 12-Feb-2006 Message-ID: <20060213060005.B821850003@common-lisp.net> Sun Feb 12 09:58:33 CST 2006 attila.lendvai at gmail.com * Added list-container It renders its elements in <:ol/<:li tags, and is also a widget-component to wrap the contents in a DIV. The default css-class is "list-container" end adds "vertical" or "horizontal" to it according to the :orientation initarg. M ./src/components/container.lisp -13 +75 M ./src/components/widget.lisp -1 +1 M ./src/packages.lisp +3 M ./wwwroot/stylesheet.css +13 Thu Feb 9 15:03:16 CST 2006 attila.lendvai at gmail.com * Removed unnecessary html-stream accessor from aserve backend (fix endless loop) M ./src/backend/aserve.lisp -3 Wed Feb 8 14:02:34 CST 2006 svg at surnet.ru * fix my bug M ./src/rerl/standard-session.lisp -3 +4 Wed Feb 8 12:56:35 CST 2006 svg at surnet.ru * redisplay current frame if it was found but action was not instead of threw to entry point M ./src/rerl/standard-session-frame.lisp -2 +4 M ./src/rerl/standard-session.lisp -25 +32 An updated tarball of ucw_dev's source can be downloaded here: http://common-lisp.net/project/ucw/tarballs/ucw_dev-20060212.tar.gz Darcsweb URL: http://common-lisp.net/cgi-bin/darcsweb/darcsweb.cgi?r=ucw_dev;a=summary From mbaringer at common-lisp.net Mon Feb 13 06:00:19 2006 From: mbaringer at common-lisp.net (Marco Baringer) Date: Mon, 13 Feb 2006 00:00:19 -0600 (CST) Subject: [Bese-devel] New patches to ucw_public: 12-Feb-2006 Message-ID: <20060213060019.5EE6967006@common-lisp.net> Sun Feb 12 09:58:33 CST 2006 attila.lendvai at gmail.com * Added list-container It renders its elements in <:ol/<:li tags, and is also a widget-component to wrap the contents in a DIV. The default css-class is "list-container" end adds "vertical" or "horizontal" to it according to the :orientation initarg. M ./src/components/container.lisp -13 +75 M ./src/components/widget.lisp -1 +1 M ./src/packages.lisp +3 M ./wwwroot/stylesheet.css +13 An updated tarball of ucw_public's source can be downloaded here: http://common-lisp.net/project/ucw/tarballs/ucw_public-20060212.tar.gz Darcsweb URL: http://common-lisp.net/cgi-bin/darcsweb/darcsweb.cgi?r=ucw_public;a=summary From aycan.irican at core.gen.tr Mon Feb 13 08:41:04 2006 From: aycan.irican at core.gen.tr (Aycan iRiCAN) Date: Mon, 13 Feb 2006 10:41:04 +0200 Subject: [Bese-devel] rfc2388:GET-HEADERS Message-ID: <87d5hrk5wf.fsf@core.gen.tr> Hi, I'm getting this error with latest ucw and can't compile it. READER-ERROR at 4865 (line 124, column 36) on #: Symbol "GET-HEADER" not found in the RFC2388 package. Is there a special rfc2388 package somewhere? Best Regards, -- Aycan iRiCAN C0R3 Computer Security Group http://www.core.gen.tr -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 188 bytes Desc: not available URL: From asbjxrn at bjxrnstad.net Mon Feb 13 12:44:55 2006 From: asbjxrn at bjxrnstad.net (=?utf-8?b?QXNiasO4cm4gQmrDuHJuc3Q=?= =?utf-8?b?YWQ=?=) Date: 13 Feb 2006 13:44:55 +0100 Subject: [Bese-devel] Re: rfc2388:GET-HEADERS References: <87d5hrk5wf.fsf@core.gen.tr> Message-ID: <5oy80fctrs.fsf@viisi.ifi.uio.no> "Aycan iRiCAN" writes: > Hi, > > I'm getting this error with latest ucw and can't compile it. > > READER-ERROR at 4865 (line 124, column 36) on #: > Symbol "GET-HEADER" not found in the RFC2388 package. > > Is there a special rfc2388 package somewhere? Yes, you have to use the one in the ucw repository: http://common-lisp.net/project/ucw/repos/rfc2388 -- -asbjxrn From asbjxrn at bjxrnstad.net Mon Feb 13 13:52:26 2006 From: asbjxrn at bjxrnstad.net (=?utf-8?b?QXNiasO4cm4gQmrDuHJuc3Q=?= =?utf-8?b?YWQ=?=) Date: 13 Feb 2006 14:52:26 +0100 Subject: [Bese-devel] httpd bug/question Message-ID: <5ou0b3cqn9.fsf@viisi.ifi.uio.no> First: small bug I think, the :iso-8859-1 seems to be misplaced in the read-request function in the httpd backend: (setf (query-path request) (make-displaced-array (raw-uri request) 0 it) (parameters request) (parse-query-parameters (make-displaced-array (raw-uri request) (1+ it) :iso-8859-1))) Secondly: Is it a good Idea to specify :external-format when reading a file in the serve-file function? (The locale on my machine is en_SG.UTF-8) -- -asbjxrn From mb at bese.it Mon Feb 13 15:59:16 2006 From: mb at bese.it (Marco Baringer) Date: Mon, 13 Feb 2006 16:59:16 +0100 Subject: [Bese-devel] Re: httpd bug/question In-Reply-To: <5ou0b3cqn9.fsf@viisi.ifi.uio.no> References: <5ou0b3cqn9.fsf@viisi.ifi.uio.no> Message-ID: Asbj?rn Bj?rnstad wrote: > First: small bug I think, the :iso-8859-1 seems to be misplaced in > the read-request function in the httpd backend: thanks for pointing this out. > > (setf (query-path request) (make-displaced-array (raw-uri request) 0 it) > (parameters request) (parse-query-parameters > (make-displaced-array (raw-uri request) > (1+ it) > :iso-8859-1))) > Secondly: Is it a good Idea to specify :external-format when reading a > file in the serve-file function? (The locale on my machine is en_SG.UTF-8) i believe so, but the external formta should be (unsigned-byte 8) and we should write the data directly to network-stream. -- -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 levente.meszaros at gmail.com Mon Feb 13 18:15:36 2006 From: levente.meszaros at gmail.com (=?ISO-8859-1?Q?Levente_M=E9sz=E1ros?=) Date: Mon, 13 Feb 2006 19:15:36 +0100 Subject: [Bese-devel] Special again Message-ID: Hello, After confusing myself with several darcs repos here and there I did a clean arnesi checkout. levy at gargantuan:~/workspace/arnesi_dev$ date Mon Feb 13 19:08:36 CET 2006 levy at gargantuan:~/workspace/arnesi_dev$ darcs pull Pulling from "http://common-lisp.net/project/bese/repos/arnesi_dev"... No remote changes to pull in! Then I have updated very carefully my special variable support and merged a few patched into the repo. I think this should apply to the arnesi_dev repo without problems. I have eliminated the calls to eval and made exporting and importing variables separate functions. Also reworked the test cases and I got no errors for call-cc test cases. Find the result attached. Levy -------------- next part -------------- A non-text attachment was scrubbed... Name: special.patch.gz Type: application/x-gzip Size: 9645 bytes Desc: not available URL: From a_bakic at yahoo.com Mon Feb 13 22:26:49 2006 From: a_bakic at yahoo.com (Aleksandar Bakic) Date: Mon, 13 Feb 2006 14:26:49 -0800 (PST) Subject: [Bese-devel] instance vs. :instance initarg Message-ID: <20060213222649.99945.qmail@web34613.mail.mud.yahoo.com> Hi, IIRC, there were changes from 'instance to :instance in a few places. I just noticed one more 'instance that appears to need this change, too: components/presentations.lisp (defmacro present-object (object &key using presentation) ... `(call ',type , at args 'instance ,object)) Alex __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From evrim at core.gen.tr Mon Feb 13 22:36:07 2006 From: evrim at core.gen.tr (Evrim ULU) Date: Tue, 14 Feb 2006 00:36:07 +0200 Subject: [Bese-devel] instance vs. :instance initarg In-Reply-To: <20060213222649.99945.qmail@web34613.mail.mud.yahoo.com> References: <20060213222649.99945.qmail@web34613.mail.mud.yahoo.com> Message-ID: <43F109D7.9040605@core.gen.tr> Aleksandar Bakic wrote: >Hi, > >IIRC, there were changes from 'instance to :instance in a few places. I just >noticed one more 'instance that appears to need this change, too: > >components/presentations.lisp > >(defmacro present-object (object &key using presentation) >... > `(call ',type , at args 'instance ,object)) > > > yes, i can be solved via: `(call ',type , at args 'instance ,object :instance ,object)) which is backward compatible. I was too lazy to send a patch for it. Evrim. From damir at x-si.org Mon Feb 13 23:56:41 2006 From: damir at x-si.org (Damir Horvat) Date: Tue, 14 Feb 2006 00:56:41 +0100 Subject: [Bese-devel] ucw & cmucl threads Message-ID: <20060213235641.GA46904@semp.x-si.org> Hi! Today is my first day with ucw and I've got it working with cmucl on FreeBSD. However, I cant get REPL from emacs (slime). If I dont start ucw, I can work normaly, when ucw is running, REPL is not acceessible. How can I fix this? And what is _the_ most simple .cmucl-init.lisp for loading ucw and then beeing able to connect to this remote REPL? Thanks, Damir From mbaringer at common-lisp.net Tue Feb 14 06:00:06 2006 From: mbaringer at common-lisp.net (Marco Baringer) Date: Tue, 14 Feb 2006 00:00:06 -0600 (CST) Subject: [Bese-devel] New patches to ucw_dev: 13-Feb-2006 Message-ID: <20060214060006.1BA564B003@common-lisp.net> Mon Feb 13 13:09:57 CST 2006 Marco Baringer * Remove stray :iso-8859-1 (Reported by: Asbj??rn Bj??rnstad ) M ./src/backend/httpd.lisp -3 +2 Mon Feb 13 13:07:08 CST 2006 Marco Baringer * the class stream-log-appender is no longer instantiable, use brief-stream-log-appender instead. M ./bin/make-image.lisp -1 +2 M ./src/backend/araneida.lisp -1 +1 M ./src/control.lisp -1 +2 M ./src/loggers.lisp -2 +2 An updated tarball of ucw_dev's source can be downloaded here: http://common-lisp.net/project/ucw/tarballs/ucw_dev-20060213.tar.gz Darcsweb URL: http://common-lisp.net/cgi-bin/darcsweb/darcsweb.cgi?r=ucw_dev;a=summary From mbaringer at common-lisp.net Tue Feb 14 06:00:11 2006 From: mbaringer at common-lisp.net (Marco Baringer) Date: Tue, 14 Feb 2006 00:00:11 -0600 (CST) Subject: [Bese-devel] New patches to arnesi_dev: 13-Feb-2006 Message-ID: <20060214060011.A2F8B4C004@common-lisp.net> Mon Feb 13 12:55:41 CST 2006 Marco Baringer * Split stream-log-append into brief-stream-log-appender and verbose-stream-log-appender The stream-log-appender was wasting too much space on extremly reptative information. The new hierarchy contains three classes: the abstract base class stream-log-appender; a verbose out class (exactly the same output as the original stream-log-appender) called verbose-stream-log-appender and a quieter append called brief-stream-log-appender. NB: This change breaks backwards compatability. All occurences of "make-instance 'stream-log-appender" will need to be replaced with "make-instance 'verbose-stream-log-appender" M ./src/log.lisp -24 +69 M ./src/packages.lisp +2 Mon Feb 13 11:32:30 CST 2006 Marco Baringer * Fix infinite loop in (setf log.level) argh. we'd defined a method for (setf log.level) specialized on SYMBOLs, this method called (get-logger symbol) and passed that back again to (setf log.level). However, when get-logger returned nil (which happens the symbol didn't specify a logging category) we'd again call the same method (since nil is a symbol), and not the one specialized on category objects :( M ./src/log.lisp +4 Mon Feb 13 12:12:17 CST 2006 Marco Baringer * conflict resolution with levente's special variable patch M ./t/call-cc.lisp +162 Sat Feb 11 14:51:54 CST 2006 Levente M??sz??ros * Rework test cases for special variable handling. Sat Feb 11 14:50:43 CST 2006 Levente M??sz??ros * Make importing and exporting specials explicit functions, plus support importing in defun/cc. M ./src/call-cc/apply.lisp -12 +21 M ./src/call-cc/handlers.lisp -10 +15 Thu Feb 9 15:51:58 CST 2006 Levente M??sz??ros * Add test cases for dynamic variable handling M! ./t/call-cc.lisp -108 An updated tarball of arnesi_dev's source can be downloaded here: http://common-lisp.net/project/bese/tarballs/arnesi_dev-20060213.tar.gz Darcsweb URL: http://common-lisp.net/cgi-bin/darcsweb/darcsweb.cgi?r=arnesi_dev;a=summary From mbaringer at common-lisp.net Tue Feb 14 06:00:22 2006 From: mbaringer at common-lisp.net (Marco Baringer) Date: Tue, 14 Feb 2006 00:00:22 -0600 (CST) Subject: [Bese-devel] New patches to ucw_public: 13-Feb-2006 Message-ID: <20060214060022.56D7E61004@common-lisp.net> Tue Feb 7 16:26:24 CST 2006 Nathan Bird * action-href-body M ./src/packages.lisp +1 M ./src/rerl/standard-action.lisp +9 Mon Feb 13 13:22:24 CST 2006 levente.meszaros at gmail.com * Fix if-bind after changing answer-component. M ./src/rerl/standard-component/control-flow.lisp -1 +1 Mon Feb 13 13:07:18 CST 2006 levente.meszaros at gmail.com * Introduce answer-component* with 3 parameters: source, target and value. It allows the source component to restore dynamic environment when somebody is answering to it. (using around method) M ./src/rerl/standard-component/control-flow.lisp -4 +7 An updated tarball of ucw_public's source can be downloaded here: http://common-lisp.net/project/ucw/tarballs/ucw_public-20060213.tar.gz Darcsweb URL: http://common-lisp.net/cgi-bin/darcsweb/darcsweb.cgi?r=ucw_public;a=summary From attila.lendvai at gmail.com Tue Feb 14 10:50:16 2006 From: attila.lendvai at gmail.com (Attila Lendvai) Date: Tue, 14 Feb 2006 11:50:16 +0100 Subject: [Bese-devel] answer-component patch in ucw_public Message-ID: I've seen a patch in ucw_public repo with an answer-component* that dispatches on the (from, to, value) parameters. This is a good idea, because there are times when you want to specialize things in such cases. The name is not a good one, tough. IMHO it should be called answer-component and break compatibility (most users use the answer macro anyway) and the two arg version should go away. Optionally the two arg version could be renamed to answer-from and be kept, but I don't see the need for that. - attila (alias 101 on irc &no 'its not lisp code :) From nathan at acceleration.net Tue Feb 14 17:30:45 2006 From: nathan at acceleration.net (Nathan Bird) Date: Tue, 14 Feb 2006 12:30:45 -0500 Subject: [Bese-devel] Streams Binary Flexi? Message-ID: <000001c6318c$6382b250$d80a0a0a@acceleration.net> I'm currently looking at some bug in ucw where it is having a hard time dealing with form posts using mod_lisp I see that there is this patch out there (which I am currently trying to figure out what is what in merging with darcs) Tue Feb 7 15:23:35 EST 2006 henrik.hjelte at poboxes.com . mod-lisp reads and writes to a byte-stream But I wanted to toss out this idea of using flexi-streams http://www.weitz.de/flexi-streams/ to handle the binary to character conversion and back. I've had occasion to use it on another project recently and was pretty happy with it. For example it handles the octet<->string conversion that is currently in arnesi's string.lisp (that's what I was using it for at the time). It handles conversion between different external-formats pretty well. This suggestion might be coming a bit late I don't know, but I am in favor of using good libraries where they exist rather than having unnecessarily competing implementations. Any thoughts on the matter? Nathan Bird nathan at acceleration.net From carlos.ungil at gmail.com Tue Feb 14 14:17:15 2006 From: carlos.ungil at gmail.com (Carlos Ungil) Date: Tue, 14 Feb 2006 15:17:15 +0100 Subject: [Bese-devel] Problems with araneida backend Message-ID: <7c3f44500602140617y514f5798s8ecb556b3a83e07e@mail.gmail.com> Hello, I've found a couple of places where the araneida backend is broken due to recent (i.e. since the last time I updated ucw a few months ago) changes: In ucw.asd (defsystem :ucw.araneida :components ((:module :src :pathname "src/backend/" :components ((:file "common") (:file "araneida" :depends-on ("shared"))))) :depends-on (:ucw :araneida :rfc2388)) shared is now common In src/backend/araneida.lisp (defmethod shutdown ((r araneida-response)) ............. (let ((content (if (starts-with content-type "text") (encode-string (get-output-stream-string (html-stream r))) encode-string is not defined anymore. Cheers, Carlos -------------- next part -------------- An HTML attachment was scrubbed... URL: From carlos.ungil at gmail.com Tue Feb 14 20:04:04 2006 From: carlos.ungil at gmail.com (Carlos Ungil) Date: Tue, 14 Feb 2006 21:04:04 +0100 Subject: [Bese-devel] Fwd: Problems with araneida backend In-Reply-To: <7c3f44500602140617y514f5798s8ecb556b3a83e07e@mail.gmail.com> References: <7c3f44500602140617y514f5798s8ecb556b3a83e07e@mail.gmail.com> Message-ID: <7c3f44500602141204o3090f183v64910551bca20250@mail.gmail.com> it didn't arrive before, maybe gmail is incompatible with the list manager ---------- Forwarded message ---------- From: Carlos Ungil Date: Feb 14, 2006 3:17 PM Subject: Problems with araneida backend To: bese-devel at common-lisp.net Hello, I've found a couple of places where the araneida backend is broken due to recent (i.e. since the last time I updated ucw a few months ago) changes: In ucw.asd (defsystem :ucw.araneida :components ((:module :src :pathname "src/backend/" :components ((:file "common") (:file "araneida" :depends-on ("shared"))))) :depends-on (:ucw :araneida :rfc2388)) shared is now common In src/backend/araneida.lisp (defmethod shutdown ((r araneida-response)) ............. (let ((content (if (starts-with content-type "text") (encode-string (get-output-stream-string (html-stream r))) encode-string is not defined anymore. Cheers, Carlos From henrik at evahjelte.com Tue Feb 14 22:21:53 2006 From: henrik at evahjelte.com (henrik hjelte) Date: Tue, 14 Feb 2006 23:21:53 +0100 Subject: [Bese-devel] Streams Binary Flexi? In-Reply-To: <000001c6318c$6382b250$d80a0a0a@acceleration.net> References: <000001c6318c$6382b250$d80a0a0a@acceleration.net> Message-ID: <1139955714.9215.198.camel@localhost.localdomain> On tis, 2006-02-14 at 12:30 -0500, Nathan Bird wrote: > I'm currently looking at some bug in ucw where it is having a hard time > dealing with form posts using mod_lisp With my latest bugfix it works for me with a fresh get from darcs. At least the form demo, the form upload demo doesn't work like before because mime-part-body now returns a binary-stream to a temporary file. Which is really quite nice. > I see that there is this patch out there (which I am currently trying to > figure out what is what in merging with darcs) > Tue Feb 7 15:23:35 EST 2006 henrik.hjelte at poboxes.com > . mod-lisp reads and writes to a byte-stream There are two versions of mod-lisp, one in ucw_dev and one in ucw_public. But both works for me! > But I wanted to toss out this idea of using flexi-streams > http://www.weitz.de/flexi-streams/ to handle the binary to character > conversion and back. I've had occasion to use it on another project recently > and was pretty happy with it. > > For example it handles the octet<->string conversion that is currently in > arnesi's string.lisp (that's what I was using it for at the time). > > It handles conversion between different external-formats pretty well. > > This suggestion might be coming a bit late I don't know, but I am in favor > of using good libraries where they exist rather than having unnecessarily > competing implementations. > > > Any thoughts on the matter? I just tried the flexi-stream for loading characters from the new mime-part-body, and it was really easy. Flexi-streams looks nice and Edi Weitz is a great coder. Still, I think that the problems have already been solved, so maybe it is not necessary to switch now. Marcos code seems from the look of it to be fast, something that is desirable for me at least. And Marco is a great coder! /Henrik Hjelte From mdanish at andrew.cmu.edu Wed Feb 15 03:29:32 2006 From: mdanish at andrew.cmu.edu (Matthew Danish) Date: Tue, 14 Feb 2006 22:29:32 -0500 Subject: [Bese-devel] reinitializing a component slot Message-ID: <20060215032932.GN562@mapcar.org> Suppose I have a form which the user types in some data and presses Submit. Now I have this information and I wish to update a :component slot with a new component with the new data. (defcomponent view () (... (body :accessor body :component (table ...)))) (defaction update ((c view)) (setf (body c) (make-instance 'table ...???))) Or should I be going about this differently? -- ;; Matthew Danish -- user: mrd domain: cmu.edu ;; OpenPGP public key: C24B6010 on keyring.debian.org From mbaringer at common-lisp.net Wed Feb 15 06:00:23 2006 From: mbaringer at common-lisp.net (Marco Baringer) Date: Wed, 15 Feb 2006 00:00:23 -0600 (CST) Subject: [Bese-devel] New patches to ucw_public: 14-Feb-2006 Message-ID: <20060215060023.5557A70002@common-lisp.net> Tue Feb 14 11:09:07 CST 2006 Nathan Bird * Changing set-action-paramter js-macro This code should do the same thing as before, just without introducing a variable which was causing some spurious parenscript behavior. M ./src/yaclml/ucw-tags.lisp -3 +1 Tue Feb 14 12:42:03 CST 2006 henrik.hjelte at poboxes.com * bugfix default-encoding-for-uri M ./src/vars.lisp -1 +1 Mon Feb 13 13:07:08 CST 2006 Marco Baringer * the class stream-log-appender is no longer instantiable, use brief-stream-log-appender instead. M ./bin/make-image.lisp -1 +2 M ./src/backend/araneida.lisp -1 +1 M ./src/control.lisp -1 +2 M ./src/loggers.lisp -2 +2 Mon Feb 6 01:58:15 CST 2006 henrik.hjelte at poboxes.com * Can make a single-threaded backend if wished M ./src/control.lisp +8 Mon Feb 6 01:31:51 CST 2006 henrik.hjelte at poboxes.com * response parameter removed from range-view M ./src/components/range-view.lisp -4 +4 M ./wwwroot/ucw/range-view.tal -1 +1 An updated tarball of ucw_public's source can be downloaded here: http://common-lisp.net/project/ucw/tarballs/ucw_public-20060214.tar.gz Darcsweb URL: http://common-lisp.net/cgi-bin/darcsweb/darcsweb.cgi?r=ucw_public;a=summary From henrik at evahjelte.com Tue Feb 14 21:32:55 2006 From: henrik at evahjelte.com (Henrik Hjelte) Date: Tue, 14 Feb 2006 22:32:55 +0100 Subject: [Bese-devel] Two patches for the window component Message-ID: <1139952776.9215.175.camel@localhost.localdomain> The ucw_public_apply.cgi darcs script complains about some conflict in ./src/components/window.lisp when I try to apply these two small changes to the window component. Maybe they can added manually? First is a bugfix that inline javascript should be rendered as-is rather than as html. Then is a small addition to the window component. By specificing some javascript inline-code as first-inline-javascript you can be sure that it is executed first of all. I needed this for the dojo toolkit, which presumes some parameters are set before the dojo.js file is included. /Henrik Hjelte -------------- next part -------------- New patches: [inline-javascript rendered as-is henrik.hjelte at poboxes.com**20060214155803] { hunk ./src/components/window.lisp 67 - (<:as-html (window-component.inline-javascript window))))) + (<:as-is (window-component.inline-javascript window))))) } [known order of javascripts in window-component henrik.hjelte at poboxes.com**20060214155856] { hunk ./src/components/window.lisp 33 + (first-inline-javascript :accessor window-component.first-inline-javascript + :initarg :first-inline-javascript + :initform nil + :documentation "Inline javascript, rendered before other javascript.") hunk ./src/components/window.lisp 40 - :documentation "The URL of the javascript file to include in this window.") + :documentation "List of the URL:s of the javascript files to include in this window.") hunk ./src/components/window.lisp 43 - :initform nil)) + :initform nil + :documentation "Inline javascript, rendered after javascript includes")) hunk ./src/components/window.lisp 46 - (:documentation "A convience class for writing window components.")) + (:documentation "A convenience class for writing window components.")) + hunk ./src/components/window.lisp 65 + (when (window-component.first-inline-javascript window) + (<:script :type "text/javascript" + (<:as-is (window-component.first-inline-javascript window)))) } Context: [the class stream-log-appender is no longer instantiable, use brief-stream-log-appender instead. Marco Baringer **20060213190708] [Can make a single-threaded backend if wished henrik.hjelte at poboxes.com**20060206075815] [response parameter removed from range-view henrik.hjelte at poboxes.com**20060206073151] [action-href-body Nathan Bird **20060207222624] [Fix if-bind after changing answer-component. levente.meszaros at gmail.com**20060213192224] [Introduce answer-component* with 3 parameters: source, target and value. It allows the source component to restore dynamic environment when somebody is answering to it. (using around method) levente.meszaros at gmail.com**20060213190718] [Added list-container attila.lendvai at gmail.com**20060212155833 It renders its elements in <:ol/<:li tags, and is also a widget-component to wrap the contents in a DIV. The default css-class is "list-container" end adds "vertical" or "horizontal" to it according to the :orientation initarg. ] [Removed unnecessary html-stream accessor from aserve backend (fix endless loop) attila.lendvai at gmail.com**20060209210316] [fix my bug svg at surnet.ru**20060208200234] [redisplay current frame if it was found but action was not instead of threw to entry point svg at surnet.ru**20060208185635] [limit backtracking depth to resonable size svg at surnet.ru**20060208105445] [utf-8 for url henrik.hjelte at poboxes.com**20060208091726] [mod-lisp reads and writes to a byte-stream henrik.hjelte at poboxes.com**20060207202335] [query-string decoding ok in mod-lisp and httpd henrik.hjelte at poboxes.com**20060207202204] [query components are decoded cottpd backend henrik.hjelte at poboxes.com*-20060207200940] [query components are decoded cottpd backend henrik.hjelte at poboxes.com**20060207200940] [Use mime.types file to send Content-Type: header in :HTTPD backend (adds dependence on SPLIT-SEQUENCE). Maciek Pasternacki **20060205233242] [Backend debugging tweaks (don't output non-ascii characters, some cosmetics). Maciek Pasternacki **20060205231127] [Fix handling of POST parameters. Marco Baringer **20060202122624 POST parameters were being parsed, but ignored, by both the mod_lisp and httpd backends. We've also decided the url parameters (if present) are placed before POST paramaters and so take precedence (only in the case where you ask for one value but multiple values are present). ] [Write HTTP response as binary. Maciek Pasternacki **20060115163304] [Handle lack of Content-Length: header gracefully. Maciek Pasternacki **20060115163248] [Specify :external-format for served static file as :iso-8859-1, treating it as binary string. Maciek Pasternacki **20060115163022] [Minor fixs to the debugging statements in the rfc2388 stuff Marco Baringer **20060112201949] [more debugging statements in rfc2388 callback Marco Baringer **20060111184848] [fix form uploading example Marco Baringer **20060111182836] [use mime-part-boy in the form example Marco Baringer **20060111165301] [More rfc2388 (for the httpd and mod_lisp backends) fixs Marco Baringer **20060110184237] [:ucw.araneida system depends on rfc2388 Marco Baringer **20060110173402] [Update *httpd-trace-functions* Marco Baringer **20051221114025] [Added debugging statements Marco Baringer **20051221114011] [Added missing :test #'string= in rfc2388-callback Marco Baringer **20051221113944] [Merge with Maciek Pasternacki's last patch (which i'd sadly forgotten to merge earlier) Marco Baringer **20051219172624] [Minor comment touch-ups Marco Baringer **20051219172518] [Unfortuently the examples depend no the new rfc2388 Marco Baringer **20051219172454] [Drop unused constants Marco Baringer **20051219172444] [fix examples to use rfc2388:mime-part accessors Marco Baringer **20051219151740] [Fix mod_lisp to use binary http streams Marco Baringer **20051219151712] [Changed make-displaced-array's api Marco Baringer **20051219151621] [Rename http-parser back to common Marco Baringer **20051218180920] [the parse-body function now requires a stream, and not a string, as its first argument Marco Baringer **20051218180830] [Change the httpd backend to treat the input/output streams as binary Marco Baringer **20051218180757 and not character streams. ] [Renamed shared to http-parser Marco Baringer **20051218150541] [Drop trivial-sockets package prefix to symbols. Marco Baringer **20051218142247] [Missed a call to content-stream. changed to html-stream Marco Baringer **20051218142116] [UCW does not depend on rfc2388, only the httpd backend. Marco Baringer **20051218141734] [Make the UCW package import from trivial-sockets Marco Baringer **20051218114739] [Rename content-stream to html-stream. Marco Baringer **20051218114657 The CONTENT-STREAM is not intended to be used for sending any random data, only html text. The name should reflect this. ] [Use trivial-sockets, instead of swank, for the socket compatability layer. Marco Baringer **20051216150201] [Fix some typos in presentation.lisp attila.lendvai at gmail.com**20060122214222] [Added note about jump-to-component's behaviour wrt the session's object pool Marco Baringer **20060124193634] [minor documentation work Marco Baringer **20051218113938] [nested components initialization svg at surnet.ru**20060119124505 `component-class.component-slots' slots of `standard-component' can be components only. Treating non components initargs values for these slots as initargs for these components we can easily initialize nested components: (make-instance 'top-component :comp1 '(:comp-slot11 (:comp-slot111 (:slot val1 ...)))...) ] [add calling-component slot to backtracking svg at surnet.ru**20060112183459 Without backtracking the sequence call -> answer -> reload (answer again in the same frame) will cause the called component to replace calling or answer to the wrong one in some cases ] [fix indirect-value-class typo svg at surnet.ru**20060112181314] [add report-error to user-login svg at surnet.ru**20051224205617] [add secure-application-mixin and supplementary login component svg at surnet.ru**20051224204118] [fix search criteria svg at surnet.ru**20051224203917] [added missing styles svg at surnet.ru**20051224203827] [escape error message svg at surnet.ru**20051224203741] [fix **20051212012843] [Dummy application.charset method to avoid errors on nil context.application. Maciek Pasternacki **20051212005518] [Removed leftover debug line. Maciek Pasternacki **20051212005436] [Implement unicode stuff for non sbcl lisps Marco Baringer **20051211144941] [Fix ignore declarations in presentation stuff Marco Baringer **20051211144918] [Use the arnesi function extract-argument-names intsead of mapcar #'name Marco Baringer **20051211135342] [Missing dummy encode-string functions for non-sb-unicode lisps. asbjxrn at bjxrnstad.net**20051210061234] [Increase default maxlength of text-element Nathan Bird **20051208015710] [form.lisp select-element use ucw:select (Pt 2) Nathan Bird **20051208015306 This is the fix to the previous patch that makes it work. At issue is what should be done with the key. We set up the relationship that: ;;;; (funcall (test select-element) (funcall (key select-element) an-option) lisp-value) => T The key is applied to the incoming values in this code before it gets to the **20051208013852 Added some commenting questioning the reasoning behind applying key to the selected value. Based on multiple create a list or not instead of using ensure list. This helps out in the non-multiple case where the option happens to be a cons cell (or full list). ] [rel. 0.3 added how to define package, www-roots, js Alberto Santini **20051207190337] [Factor out body and parameter parsing from httpd.lisp to shared.lisp; make it recode strings/arrays as necessary; make araneida backend use it. Maciek Pasternacki **20051207152439] [Make httpd backend send encoded byte sequence instead of a string. Maciek Pasternacki **20051207151819] [Move parse-urlencoded and parse-form-data-encoded to shared.lisp Maciek Pasternacki **20051206230820] [New file src/backend/shared.lisp to factor out code shared by multiple backends; Unicode function moved to this file. Maciek Pasternacki **20051206224454] [Make the form.lisp select-element use **20051206182536 Making the select-element from form.lisp use **20051206182350] [Typo fix. Maciek Pasternacki **20051205231207] [Update .boring to exclude generated documentation Marco Baringer **20051204153555] [rel. 0.4 added http, mod-lisp backend configuration Alberto Santini **20051204120908] [UCWInputCompleter.js patch rusabd at gmail.com**20051202055720 This is a small patch which makes work text element with completion under IE. I check it with FF, IE and Mozilla only under windows. ] [minor fixs to qbook comments Marco Baringer **20051201202629] [Don't attempt to qbook'ify the backends Marco Baringer **20051201194905] [Textarea shouldn't render "Nil" on nil values. Nathan Bird **20051205171753] [Removed src/backend/protocol.lisp from the qbook includes Marco Baringer **20051201183320] [Recode string from Araneida to current application's default charset; when decoding is not possible, keep value as byte array. Maciek Pasternacki **20051201191342] [New slot charset in standard-application class, used to render windows-component's content-type if not set statically. Maciek Pasternacki **20051201184031] [Docstring fix. Maciek Pasternacki **20051201160457] [Recode strings received from Araneida to sbcl's default format when on Unicode SBCL. Maciek Pasternacki **20051129135631] [Second half of Aleksandar Bakic's sb-unicode patch. Maciek Pasternacki **20051129135412] [Regexp dispatching handler for Araneida. Maciek Pasternacki **20051128021334] [Pushing condition as well as slot to invalid-slots asbjxrn at bjxrnstad.net**20051127162544 This is to enable ucw to display an error message to the user describing why the slot was found to be invalid. I also changed the hardcoded red border around invalid slots to use class "ucw-invalid-slot" instead. ] [Handle unicode content using the araneida backend Marco Baringer **20051127110904] [Fix Content-Length value when using mod-lisp and UTF-8 binarin at binarin.ru**20051126172518] [New note in TODO Marco Baringer **20051126160826] [Remove tabs and reindent the multithread-httpd code Marco Baringer **20051126153356] [Added wwwroot/favincon.ico Alberto Santini **20051126112748] [Actually use (external-format-for :slime) Maciek Pasternacki **20051126100748] [Added a timeout and debugging to the control loop russ at acceleration.net**20051121161834] [added why Lisp in web application and some minor changes albertosantini at tiscali.it**20051115221159] [minor changes to QUICKSTART albertosantini at tiscali.it**20051112144827] [Allow the CALL macro to accept an already initialized component object. Marco Baringer **20051117120126 This change allows users to create and initialize a component and then call it without having to use another function (call-component) and know about the 'magic' SELF variable. ] [adding the logs folder russ at acceleration.net**20051116221147] [Fix for %b %B and 12hour am/pm time-elements. Asbj??rn Bj??rnstad **20051118192715] [checkbox returns nil if unchecked, not a string Asbj??rn Bj??rnstad **20051115115410] [Intelligent error when slot not found Nathan Bird **20051115014216 When trying to access the slot-indirect-value of an object with a given slot name, if the object didn't have a slot named as such it was going into an infinite loop on (slot-indirect-value obj nil). ] [stop present on set trying to access slots that aren't there Nathan Bird **20051115013459] [splitting out render-slots to be a bit finer grained Nathan Bird **20051115013007] [lisp-value on composite-element initialize Nathan Bird **20051115012829] [Extending slot-elements to filter on ie-type Nathan Bird **20051115012422] [Added h-a-e-u-a method for standard-application Marco Baringer **20051114091738] [Removed bedugging relatod code and actually pass the backtrace, instead of nil, to h-a-e-u-a Marco Baringer **20051114091655] [Added Abltero Santini's quickstart for developers Marco Baringer **20051113114557] [Export PARENT from the ucw package (Suggested by: Asbj??rn Bj??rnstad ) Marco Baringer **20051112125419] [Added handle-action-error-using-application. hook for app specific error handling. Marco Baringer **20051111164530] [multithread-httpd in ucw.asd henrik.hjelte at poboxes.com**20051113105017] [Seperating multithread-httpd-backend into its own file Nathan Bird **20051111162051] [Multithreaded-httpd-backend thread pooling Nathan Bird **20051111160037] [visual seperation of ucw style vs regular style Nathan Bird **20050908232519] [Set the *current-condition* variable even when *debug-on-error* is nil Marco Baringer **20051110194104] [Update register-callback for make-new-callback's new api (Patch by: Aleksandar Bakic ) Marco Baringer **20051110115845] [Form comment typo Nathan Bird **20051020181046] [Resolve the conflicts between the two 'thinko in call-as-window' patches Marco Baringer **20051109160831] [Make the ucw.backend logger NOT be related to the ucw-logger logger. Marco Baringer **20051109155743] [Fix thinko in handling of ucw:accessor and select tags in TAL templates. Marco Baringer **20051109154948] [Use action-href instead of (print-uri (compute-url ...)) Marco Baringer **20051109151406] [fix typo in docstring Marco Baringer **20051109151355] [Added the :name parameter to the **20051109145620] [Make sure both make-new-callback and make-new-callback-using-class return the name of callback. Marco Baringer **20051109145312] [Changed api of make-new-callback to adapt to usage. Added make-new-callback-using-class. Marco Baringer **20051109143530 In practice the first parameter of make-new-callback was always the same thing (the current frame accessed through *context*). MAKE-NEW-CALLBACK now takes one required parameter, the lambda, and two keyword parameters: the frame and the request parameter name of callback to create. In the name of exensability we still go through a generic-function, make-new-callback-using-class which is specialized on standard-frame. ] [Added (again) the window-component. This component now serves only as a way to easily specify the content-type of a response. Marco Baringer **20051109140233] [Added Alberto Santini's quick start guide Marco Baringer **20051109111249] [Allow multiple stylesheets to be specified in a simple-window-component Marco Baringer **20051109105334] [Added back action-href (with different API and semantics) and exported the symbol. Marco Baringer **20051108180155] [Drop generate-action-url and action-href, replaced with calls to compute-url Marco Baringer **20051108175525] [Fix thinko in call-as-window Marco Baringer **20051108175255] [Small typo corrections Jan Rychter **20051108140350] [Fix thinkos in call-as-window Jan Rychter **20051108140057] [Presentation checkbox fix hoan at ton-that.org**20051106030559 Fix the displaying of checkboxes in presentations. There is also a misc fix for the server backend. ] [Added the CALL-AS-WINDOW component. Marco Baringer **20051105134902] [Added the debug-on-error parameter to ucw:create-server (who knows why i removed it...) Marco Baringer **20051105133352] [adress example render-on fix henrik.hjelte at poboxes.com**20051107084853] [number-element size attribute asbjxrn at bjxrnstad.net**20051105020117] [Fix LISP vs LISP_LOAD confusion in ucwctl Marco Baringer **20051104131259] [Fix call/answer bugs caused by the 'dropped window-components' patch Marco Baringer **20051104125719 We had removed the code which handling calling and answering when the call-componint was nil (as is the case of etry points) but we hadn't put it back into the generic call-component and answer-component methods. ] [Backtrack components' parent slot Marco Baringer **20051103184801] [Use CALL-REQUEST-PATH in the call, answer and action logging statements Marco Baringer **20051103184619 CALL-REQUEST-PATH has also been changed to warn if any circularities are detected in the component parent chain. ] [added search-element svg at surnet.ru**20051031182539] [added clone-element method, fixed some bugs svg at surnet.ru**20051031182207] [added slot-indirect-boundp method svg at surnet.ru**20051031182115] [export composite-element svg at surnet.ru**20051030230559] [make slot-elements more generic svg at surnet.ru**20051030203648] [log current component path svg at surnet.ru**20051029184829] [Reinstate the ENSURE-SYSTEM function which was accidentaly removed by the previous patch Marco Baringer **20051029150206] [Merge bin/start.lisp and bin/utils.lisp; remove a lot of extra junk. Marco Baringer **20051029145357 UCW's startup process may be slightly (but just slightly) less newbie friendly, on the other hand it is far easier for people who know what they're doing to get started. ] [Allegroserve backend fixes hoan at ton-that.org**20051029010435 The backend now uses the wserver slot. This makes it possible to shutdown the server. Also, unpublishing urls was implemented. ] [Dropped the window-component class and the requirement that entry-points call window-components Marco Baringer **20051028172817] [Expert, and document, *debug-on-error*. Marco Baringer **20051028105018 *debug-on-error* now serves as the system-wide default. Applications retain the ability to override this if they want. ] [Added ignore declares for unused variables Marco Baringer **20051027173803] [Remove the response parameter from show-status-bar (no longer required by render) Jan Rychter **20051027150304] [typos Jan Rychter **20051027150252] [refactoring composite-element from form-element, update examples to show composite-element svg at surnet.ru**20051027122537] [add slot order to definition svg at surnet.ru**20051026192622] [change examples to demonstrate range-set svg at surnet.ru**20051026114834] [added range-set component svg at surnet.ru**20051026114753] [presentation functionality to interface elements svg at surnet.ru**20051024165152] [Fix formats to POSIX, zone and client-value bugs svg at surnet.ru**20051024164755] [Fix unknown url variable (Reported by: Aleksandar Bakic ) Marco Baringer **20051024164025] [Make the admin repl's textarea bigger Marco Baringer **20051023150606] [Added ignore declaration for unused variable Marco Baringer **20051023150414] [Added jump-to-component method (and jump macro) Marco Baringer **20051023145524] [Fix admin.lisp, complete indirect-value-class svg at surnet.ru**20051022174742] [fix default response values for aserve backend svg at surnet.ru**20051020174417] [fix form-id, action-id generation svg at surnet.ru**20051019185952] [Mention cl-ppcre in the README Marco Baringer **20051018174649] [Make the example app use a regex entry point Marco Baringer **20051018174547] [Added :class parametert to :entry-point option in defcomponent macro Marco Baringer **20051018174525] [Added regexp-entry-point. Marco Baringer **20051018174422 Currently only the httpd backend supports regexp-entry-point (the other backends treat them just like standard entry-points) ] [Implement unregister-url-handler for the httpd backend Marco Baringer **20051018172411] [When shuting down an application we need to remeber to unregister all its entry-points Marco Baringer **20051018172350] [register-url-handler now takes an entry-point, and not a sting, as its second argument Marco Baringer **20051018171732] [Merge the backend protocol into the rerl protocol Marco Baringer **20051018162457 The backend protocol is a core part of ucw internal server mechanisms, as such it should be included with the rest of ucw's core protocol. ] [Compare headers using #'string-equal, not #'eql (araneida backend) Marco Baringer **20051018093132] [Fix to time-element's handling of zones (Patch by: Mac Chan ) Marco Baringer **20051017021917] [Export container.contents Marco Baringer **20051016184834] [The components passed to a container component's :contents initarg should be kept in order (and not reversed) Marco Baringer **20051016171145] [Typo in inspector component's OK link Marco Baringer **20051016143940] [Added element-id and initial-focus slots to interface-element Marco Baringer **20051016141333 The initial-focus slot specifies whcih part of the form (if any) should be focused after a page load. This change required adding an element-id slot and the code to output the :id attribute in all the various tags. ] [Documentation improvement for task-component Marco Baringer **20051016125641] [Another render-on -> render fix (Patch by: Aleksandar Bakic ) Marco Baringer **20051016104445] [Added caching of the find-entry-point method for standard-applications Marco Baringer **20051014120322] [Store an application's entry-points in a list and not a hash table Marco Baringer **20051014115306] [Dropped the url parameter from register-entry-point and unregister-entry-point. added url and application slots to entry-points Marco Baringer **20051014115127] [Added caching components (this is a first draft, there are still some rough edges) Marco Baringer **20051013165327] [Remove duplicate occurance of render-component in < package's expert list Marco Baringer **20051013145758] [Added a default render method. (it provides a better error than 'no applicable method group') Marco Baringer **20051013145736] [Removed RENDER-ON text in the retry rendering restart Marco Baringer **20051013143931] [change send-backtrace-to-emacs to use swank::eval-in-emacs (swank::evaluate-in-emacs no longer exists) Marco Baringer **20051013123519] [Trivial indentation fixup Marco Baringer **20051013123008] [Added a default-value example in the form example Marco Baringer **20051013122921] [Actually fix time-element's default output-format (previous patch only fixed 50% of the problem) Marco Baringer **20051011231059] [Typo in time-element's default output-format (Patch by: Aleksandar Bakic ) Marco Baringer **20051011230551] [Rename RENDER-ON to RENDER, drop first argument Marco Baringer **20051011122512 This patch supersedes (and conflicts violently with) the previous render-on patch. ] [password and checkbox elements for forms asbjxrn at bjxrnstad.net**20051010144929] [Trivial refactoring in VALIDATE-VALUE Marco Baringer **20051009184213] [Export the symbols related to the completing-text-element Marco Baringer **20051009181807] [Use :after method instead of primary method which calls call-next-method first and then ignores the return value. Marco Baringer **20051009153050] [Added (declare (ignore ...)) forms to keep openmcl quiet. Marco Baringer **20051009153024] [Use nconc method-combination for slot-elements as that seems more appropiate. Marco Baringer **20051009152858] [Fix 'closing-over-something-bound-by-dolist' bug. replaced dolist with dolist*. Marco Baringer **20051009152809] [Bugs fixed, added auxslots-form-element, time-element and examples svg at surnet.ru**20051008221416] [New HTML form API (Patch by: Vladimir Sekissov ) Marco Baringer **20051007193513] [Fix the httpd backend's static-file serving Marco Baringer **20051007191117 The way in which we were deteriming the local file name from a url was completly broken. ] [Export symbols related to the ucw-inspector Marco Baringer **20051007175929] [Remove duplicate occurance of *inspect-componets* from ucw's defpackage form Marco Baringer **20051007175817] [Fix rendering of error-components when the error occurs in the call to RENDER-ON Marco Baringer **20051005051341] [Fix ucwctl's detection of detachtty and attachtty (Suggested by: Asbj??rn Bj??rnstad ) Marco Baringer **20051001171643] [Fix the location of mod-lisp-httpd13.conf in the README Marco Baringer **20051001092639] [Removed unused junk in the upload form example Marco Baringer **20050927193446] [Move the stylesheet and the www-roots for the various apps. Marco Baringer **20050925164227] [Fix silly and stupid bug in parse-form-data-encoded (we were forgetting that dolist always returns NIL) Marco Baringer **20050925164121] [Moved example add to the urls "/" and "/index.ucw" and the admin app to "/admin/index.ucw" Marco Baringer **20050922152436] [Another presentations examples fix (Patch by: Aleksandar Bakic ) Marco Baringer **20050921133819] [Add :size and :maxlength options to text-field and number-field. Also, allow them to be initialized with values. Jan Rychter **20050920200830] [standard-application's DEBUG-ON-ERROR method sholud call (debug-on-error nil) if the app hasn't been explicitly told to debug or not Marco Baringer **20050920174855] [*debug-on-error* no longer exists, use (setf debug-on-error) instead. Marco Baringer **20050920174412] [Fixes to the presentation examples (Patch by: Aleksandar Bakic ) Marco Baringer **20050920174200] [Fix JS error svg at surnet.ru**20050915193137] [Typo fix svg at surnet.ru**20050915081215] [Fix set-action-parameter JS function svg at surnet.ru**20050914204726] [Fix thinko in the timestamp-slot presentation Marco Baringer **20050914150239] [parse-integer fixes (Patch by: Aleksandar Bakic ) Marco Baringer **20050913072452] [Make the method (debug-on-error null) use an internal variable *debug-on-error* to hold the default value. Marco Baringer **20050912073413 This new *debug-on-error* is differente from the old *debug-on-error* in that it sholud not be accessed directly and is not part of ucw's public api. ] [MAke printing of admin-repl's return values robust in the face of print errors Marco Baringer **20050910141831] [Each **20050910141720] [Added print-object method for standard-application Marco Baringer **20050910141610] [Export DEBUG-ON-ERORR and not *DEBUG-ON-ERROR* Marco Baringer **20050910112959] [Minor docstring fix Marco Baringer **20050910112948] [Removed the global variable *debug-on-error* Marco Baringer **20050910112229] [Make debug-on-error be a method and not a global variable. Marco Baringer **20050910111732 This change allows to control the value of *debug-on-error* based on the current app and not force one value on all the apps in the server. ] [Add in ensure-system-for-ucw whcih had been removed in a previous patch but is still neccessary Marco Baringer **20050910104436] [Change the default port back to 8080 Marco Baringer **20050910104407] [Load the applications with map Nathan Bird **20050908234136] [Attempt to guess the location of detachtty and attachtty (Patch by: Jamie Border ) Marco Baringer **20050909224843] [Default host should be 127.0.0.1. Marco Baringer **20050909080513] [Indentation and whitespace fixs to previous patches (no tabs in lisp code) Marco Baringer **20050909080102] [Merge the use-XYZ-backend functions from bin/utils.lisp into src/control.lisp Marco Baringer **20050909075356] [remove duplicate symbol export *ucw-tal-root* Nathan Bird **20050908231752] ['Simplify' start.lisp mostly by taking advantage of create-server Nathan Bird **20050908221901] [Remove lispworks note about ASDF. We must eb able to assume that basic setup of ASDF is done before loading UCW. Marco Baringer **20050909072739] [Revert to using the --eval argument to attachtty Marco Baringer **20050908175755] [Fix conflicts in previous patch Marco Baringer **20050908175308] [Small changes to make-image.lisp and control.lisp for Lispworks asbjxrn at bjxrnstad.net**20050908165654] [bin/ucwctl fixes Craig McDaniel **20050907190904] [THREADED-LISP-P for lispworks (Patch by: Asbj??rn Bj??rnstad ) Marco Baringer **20050908162753] [Added the hello and bye-bye functions Marco Baringer **20050907212148 these are actually really bady names, but i can't of anything better (and for some reason start/stop just doesn't appeal to me now). ] [Keep list of applications in a server sorted by the length of the url-prefix. This allows applications to 'shadow' other applications' url space. Marco Baringer **20050907004819] [Export the symbols for status-bar Jan Rychter **20050906140902] [Added status-bar component (Patch by: Vladimir Sekissov ) Marco Baringer **20050906091035] [Removed "ignore" declaration for two variables which are used. Peter Scott **20050904194151] [Remove notes regarding tla from the README Marco Baringer **20050901062836] [Added maxlength slot to text-field (Patch by: Friedrich Dominicus ) Marco Baringer **20050901062356] [added a bunch of docstrings Marco Baringer **20050831114350] [We need to use defmethod/cc, not just defmethod, in the presentations Marco Baringer **20050831110507] [Change the **20050831103142] [Change the example app to use initargs and not shared-initialize Marco Baringer **20050831103127] [Fixed typo in CSS mime-type code for httpd backend. drewc at tech.coop**20050827231400] [Fix a lisp-mode typo. Jan Rychter **20050829094417] [Rework sum example to use loop and backtracking Marco Baringer **20050828082311] [Argument for ucw.backend.dribble was missing binarin at gmail.com**20050827135018] [Add precise control of external format used for url unescaping, slime and http intercommunication binarin at gmail.com**20050827134632] [Fix typo ) Marco Baringer **20050827193931] [cmucl fixs. (Patch by: Mac Chan ) Marco Baringer **20050827112915] [Rewrite the sum examples to act as we expect it to in the presence of back tracking Marco Baringer **20050824170029] [Use parenscript instead of (concatenate 'string ... Marco Baringer **20050824125546] [Adde convenience functions to change ucw's logging levels Marco Baringer **20050824125459] [Refactoring in httpd backend Marco Baringer **20050824125423] [Added a logging statement in httpd backend Marco Baringer **20050824125337] [minor updates to TODO Marco Baringer **20050824125306] [Removed have-threads-p from bin/start.lisp. Use the threaded-lisp-p function from control.lisp instead. Marco Baringer **20050824125007] [Fix shutdown-backend method for araneida. (Patch by: Friedrich Dominicus ) (only two months late...) Marco Baringer **20050819082155] [Use prin1 (instead of the default princ) for printing the admin-repl's values. (Reported by: Pascal Bourguignon ) Marco Baringer **20050818145347] [The macro SHOW was being defined in standard-action.lisp, it' already defined with the template component. removed it. Marco Baringer **20050817100830] [Use swank-backend:close-socket to close the httpd backend's socket, not cl:close. Marco Baringer **20050814163132] [Use parenscript. New tag **20050814141501] [Added dependency on parenscript Marco Baringer **20050814135145] [Fix typos in README Marco Baringer **20050814135114] [Make the transaction-example component a task-component Marco Baringer **20050814111842] [standard-session-frame depends on macros defined in request-loop-error Marco Baringer **20050814111809] [Wrap calls to transaction continuations in with-call/cc, used kall and not funcall to continue a continuation. Marco Baringer **20050814111715] [The class is not called arnesi::cps-closure anymore, it's closure/cc Marco Baringer **20050812174701] [Added the Status header to the mod_lisp backend Marco Baringer **20050812122805] [Use arnesi:+cr-lf+ to get a CR-LF string Marco Baringer **20050812122742] [Change the logging statements so they're clearer and so that +info+ gives decent information Marco Baringer **20050812122701] [indentation fixup Marco Baringer **20050812114933] [form-component's submit action needs to use defaction, not just defmethod Marco Baringer **20050812114907] [Deal with method qualifiers in defaction forms Marco Baringer **20050812114752] [When serving files we try to infer the file type from the file's extension Marco Baringer **20050812114718] [Added a few debugging statements to the httpd backend Marco Baringer **20050812114647] [The Status header isn't really a header and the httpd backend needs to deal with it differently Marco Baringer **20050812113758] [Implement publish-directory for the httpd backend. Changed how handlers work in this backend. Marco Baringer **20050812090052] [The www-root for the damin app is "/ucw/admin/", not "/ucw/examples/" :( Marco Baringer **20050812071421] [Fix hint text for when yaclml is missing a required feature Marco Baringer **20050810053746] [Fix bug in DEFCOMPONENT's handling of :metaclass option (Reported by: Friedrich Dominicus ) Marco Baringer **20050809130342] [fix bug in ensure-system-has-feature Marco Baringer **20050809122624] [Added hint parameter to ensure-system-has-feature Marco Baringer **20050809112951] [Fix bug in log messages in araneida backend (Reported by: Friedrich Dominicus ) Marco Baringer **20050809064728] [When a component-slot is passed the :component keyword we need to setup the slot for backtracking Marco Baringer **20050809055756] [Minor refactoring in initialize-backtracking Marco Baringer **20050809054005] [Minor formatting touchup in generate-backtrace-for-emacs Marco Baringer **20050807140906] [Setup *current-condition* and *current-backtrace* in the server's handler-bind (the one which takes care of internal ucw errors) Marco Baringer **20050807135042] [Added the generate-backtrace-for-emacs restart Marco Baringer **20050807134832 This new restart requires some really hacky stuff that we'll probably need to redo later on (we pass the condition and the backtrace from the handler to the restart via two special variables). ] [Rework error handling methods Marco Baringer **20050807122844 We've changed the API of handle-request-error and handle-action-error from (condition request response) to (conndition backtrace). we now collect the backtrace as soon as the error handler kicks, this removes some useless frames whcih were previously being inserted. we've also introduced the with-action-error-handler macro and a defgeneric form for handle-action-error. the methods on handle-request-error have been rewritten to use the new with-error-page macro. ] [Use DEFCOMPONENT's new options in the examples Marco Baringer **20050807122639] [Extend and refactor the DEFCOMPONENT macro. (see new docstring for details) Marco Baringer **20050807121844] [Added a few logging statements Marco Baringer **20050807091151] [Don't use ITERATE around **20050807075849] [Don't copy backtrack values in save-backtrack (this isn't neccessary for proper backtracking) Marco Baringer **20050806093402] [Fix backtracking on non immediate objects Marco Baringer **20050806090550 This changes the times when values are copied in the backtracking stuff. Previously we'd copy when saving the bt list and when cloning it, we now copy when saving, when restoring, but not when cloning. The previous implementation caused already stored backtracked values to be modified, when they'd later be restorted they'd have values which didn't reflect what the user (and the developer) expects (this is bad). ] [Added, and initialized, the generating-frame slot to standard-session-frame. Marco Baringer **20050806090059] [removed standard-application's service :after method Marco Baringer **20050806085933 The method was just calling save-backtracked, standard-session-frame already does that and is the 'proper' place for thaht stuff. ] [Fix various typos/thinkos on control.lisp Marco Baringer **20050806082907] [Make the inspector output more readable (Patch by: William Halliburton ) Marco Baringer **20050806054207] [Fix slot options for deleteablep in list-presentation (Reported by: Pascal Bourguignon ) Marco Baringer **20050805073024] [Properly deal with the backtracking of unbound slots Marco Baringer **20050803095347] [Remove the update.sh script Marco Baringer **20050802161726] [Change API of MAKE-BACKEND Marco Baringer **20050802111231] [Another type in the defgeneric form for make-backend Marco Baringer **20050802110327] [Fix typo and change error message in the default method for MAKE-BACKEND Marco Baringer **20050802110151] [Need to wrap the form passed on <:select :on-change in a with-call/cc Marco Baringer **20050729105241] [Since call-inspector is a /cc method we need to call it within a with-call/cc form Marco Baringer **20050726095455] [Since the getter/setter of a PLACE object can be cps-closure objects we need to treat them explicitly Marco Baringer **20050726095425] [Even window components must use KALL and not FUNCALL for their continutation :) Marco Baringer **20050726095333] [Removed call to arnesi:assert-cc Marco Baringer **20050725121348] [Wrap call to the cc method START in a with-call/cc Marco Baringer **20050723133329] [Continuations are now called using ARNESI:KALL, not FUNCALL Marco Baringer **20050723133311] [Actions need to be wrapped in with-call/cc Marco Baringer **20050723113039] [Rename GET-BACKEND to MAKE-BACKEND Marco Baringer **20050801143643] [Edit CREATE-SERVER so that it properly updates *debug-on-error* and *inspect-components* Marco Baringer **20050801143254] [Remove spurious double lines between method definitions Marco Baringer **20050801142440] [Minor doc string fixups to GET-BACKEND Marco Baringer **20050801142247] [Added copyright notice to src/control.lisp Marco Baringer **20050801134638] [Lisp startable UCW Robert Marlow **20050801050720 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. ] [bash -> sh Julian Stecklina **20050731145119] [Use defcomponent instead of defclass for simple-template-component Marco Baringer **20050726095406] [When creating the string for request paramteers use the same element-type as the raw-uri array Marco Baringer **20050730114429] [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] [Added the "top-level" retry render-on restart Marco Baringer **20050726122803] [When printing the 'retry rendering' restart added the component object which caused the error Marco Baringer **20050726122740] [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] [Change the CALL macro to check for window-component'ness when used in entry-points Marco Baringer **20050723102841] [Fix the upload example Marco Baringer **20050721155417] [Only create a mime-part object for those mime-parts which have headers other than just "name" Marco Baringer **20050721155338] [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: e20068124207ff936eea733f28675b6b1445346e From adl at absentis.com Wed Feb 15 09:52:01 2006 From: adl at absentis.com (Andrew Lawson) Date: Wed, 15 Feb 2006 09:52:01 +0000 Subject: [Bese-devel] UCW beginners error; it.bese.ucw::place is unbound Message-ID: <20060215095201.GA8753@absentis.com> Hello all I've been playing with UCW for a day or so but have encountered an error that I can't seem to solve. I'm not sure whether I've not initialised something correctly ot whether I'm simply using the library on an unsupported platform (Lispworks 4.4.6, windows). The error I get is; The slot IT.BESE.UCW::PLACE is unbound in the object # (an instance of class #). Below is the code that causes this error when you click and it tries to call a new component, I've removed any code that seemed pointless and it still errors as before. (in-package :it.bese.ucw-user) (export 'startup) (defun startup () (asdf:oos 'asdf:load-op :ucw.admin) (asdf:oos 'asdf:load-op :ucw.examples) (ucw:start-swank) (ucw:create-server :backend :aserve :host "127.0.0.1" :port 8080 :applications (list it.bese.ucw-user::*example-application* ucw::*admin-application* *website-application*) :inspect-components nil :log-root-directory (make-pathname :name nil :type nil :directory (append (pathname-directory *load-truename*) (list :up "logs")) :defaults *load-truename*) :log-level it.bese.ucw::+info+ :start-p t)) ;(startup) (defparameter *website-application* (make-instance 'cookie-session-application :url-prefix "/website-application/")) (defentry-point "index.ucw" (:application *website-application*) () (call 'my-simple-window-component)) (defcomponent my-simple-window-component (simple-window-component) () (:default-initargs :title "My Website")) (defmethod initialize-instance :after ((self my-simple-window-component) &rest args) (setf (ucw:window-component.stylesheet self) "http://localhost:8080/css/standard.css")) (defmethod render ((com my-simple-window-component)) (<:div :class "body" (<:div :class "title" (<:div :class "header-1" "Website application")) (<:div :class "page" (render (make-instance 'my-module-choice))))) (defcomponent my-module-choice (widget-component) ()) (defmethod render ((self my-module-choice)) (<:div :class "header-4" "Module choice") (<:p "Choose the module you would like to use") ( References: <20060215095201.GA8753@absentis.com> Message-ID: > The slot IT.BESE.UCW::PLACE is unbound in the object # (an instance of class #). i'm new, too, take it with a grain of salt... i think you can only use the call/answer mechanism if ucw knows the place that it needs to set when replacing your calling component with the one being called. for that you need a container that holds your calling component and ucw will handle the details then (maybe it's enough if it is in a slot initialized with :component). with this you reify the component structure for ucw, so it can replace components in your component hierarchy when things are call-ed/answer-ed. hope it helps, - attila (alias 101 on irc &no 'its not lisp code :) From attila.lendvai at gmail.com Wed Feb 15 19:41:37 2006 From: attila.lendvai at gmail.com (Attila Lendvai) Date: Wed, 15 Feb 2006 20:41:37 +0100 Subject: [Bese-devel] generated content with ucw Message-ID: hi! i'm looking into serving generated content with ucw (generated png's), but i seem to be stuck. i only have a blurred picture how it should work: - generate a temporary random url and register it as an entry point - render this link somewhere in a page - from the handler lambda of the entry point extract the actual socket stream and write the content, set correct mime-type did anybody do this before? what part of the infrastructure is ready for this? how will the generated entry point be unregistered? am i way off? :) thanks all in advance, and now back to digging - attila (alias 101 on irc &no 'its not lisp code :) From henrik at evahjelte.com Wed Feb 15 09:46:07 2006 From: henrik at evahjelte.com (Henrik Hjelte) Date: Wed, 15 Feb 2006 10:46:07 +0100 Subject: [Bese-devel] Streams Binary Flexi? In-Reply-To: <87accthuzl.fsf@core.gen.tr> References: <000001c6318c$6382b250$d80a0a0a@acceleration.net> <1139955714.9215.198.camel@localhost.localdomain> <87accthuzl.fsf@core.gen.tr> Message-ID: <1139996768.9215.218.camel@localhost.localdomain> On ons, 2006-02-15 at 10:44 +0200, Aycan iRiCAN wrote: > henrik hjelte writes: > > > On tis, 2006-02-14 at 12:30 -0500, Nathan Bird wrote: > >> I'm currently looking at some bug in ucw where it is having a hard time > >> dealing with form posts using mod_lisp > > > > With my latest bugfix it works for me with a fresh get from darcs. At > > least the form demo, the form upload demo doesn't work like before > > because mime-part-body now returns a binary-stream to a temporary file. > > Which is really quite nice. > > It's nice but it's hard to use in some cases. Think of an upload form > that get's a picture from user. If you need to make a preview for this > form, you have to copy that temporary file into your webroot and > rename it's extension (to be able to show in a web page). Your > temporary files are growing with a factor of 2 now. Why not just move the temporary file and rename it in one operation? On most filesystems this is a very fast thing. This seems to me to be a perfect example when a temporary file is good, since it is converted to a permanent file. If the alternative is to have a stream into memory, prepare your server for the case when user decides to upload a zip file containing his collection of Hollywood movies in HDTV quality :-) Maybe a choice would be best, but are the temp files really a problem? /Henrik Hjelte From henrik at evahjelte.com Wed Feb 15 21:03:06 2006 From: henrik at evahjelte.com (henrik hjelte) Date: Wed, 15 Feb 2006 22:03:06 +0100 Subject: [Bese-devel] generated content with ucw In-Reply-To: References: Message-ID: <1140037386.9215.231.camel@localhost.localdomain> On ons, 2006-02-15 at 20:41 +0100, Attila Lendvai wrote: > hi! > > i'm looking into serving generated content with ucw (generated png's), > but i seem to be stuck. > > i only have a blurred picture how it should work: > - generate a temporary random url and register it as an entry point Do you need an entry point? I use action-href to generate a url: Somewhere in a render method ((p my-component)) ... An url is generated... (action-href (lambda () (my-method p) > - render this link somewhere in a page > - from the handler lambda of the entry point extract the actual socket > stream and write the content, set correct mime-type (defmethod my-method ((p my-component)) ..do things. ..At the end.. (setf (context.window-component *context*) (make-instance 'ajax-answer :text msg))))) (defcomponent ajax-answer (window-component) ((text :initarg :text :accessor ajax-answer.text)) (:default-initargs :content-type "text/plain")) (defmethod render((a ajax-answer)) (<:as-is (ajax-answer.text a))) I hope the general idea comes through. Just change the name from ajax to png and the content type. Maybe there are smarter solutions than this, but this works for me.. / Henrik Hjelte > > did anybody do this before? what part of the infrastructure is ready > for this? how will the generated entry point be unregistered? am i way > off? :) > > thanks all in advance, and now back to digging > > - attila > > (alias 101 on irc &no 'its not lisp code :) > _______________________________________________ > bese-devel mailing list > bese-devel at common-lisp.net > http://common-lisp.net/cgi-bin/mailman/listinfo/bese-devel > > From attila.lendvai at gmail.com Wed Feb 15 19:52:51 2006 From: attila.lendvai at gmail.com (Attila Lendvai) Date: Wed, 15 Feb 2006 20:52:51 +0100 Subject: [Bese-devel] Re: generated content with ucw In-Reply-To: References: Message-ID: > i only have a blurred picture how it should work: > - generate a temporary random url and register it as an entry point > - render this link somewhere in a page > - from the handler lambda of the entry point extract the actual socket > stream and write the content, set correct mime-type the random url should be a random parameter instead and the url should be handled by an ucw service where ucw client code can register a lambda that generates the dynamic content? the content could be cached in memory/disk... how and when would such a content be garbage collected? maybe when the enclosing frame is dropped? sorry for the flood, - attila (alias 101 on irc &no 'its not lisp code :) From keithley at easystreet.com Wed Feb 15 20:47:33 2006 From: keithley at easystreet.com (Donavon Keithley) Date: Wed, 15 Feb 2006 14:47:33 -0600 Subject: [Bese-devel] FiveAM Patch: (signals error ...) was always passing Message-ID: <200602151447.33795.keithley@easystreet.com> * Fix (signals error ...), was always passing If the body of the check didn't signal error, PROCESS-FAILURE would. So I simply moved PROCESS-FAILURE out of the HANDLER-BIND form. (I now better appreciate why TDD says to write a failing test first. ;-) ) Cheers, Donavon Keithley -------------- next part -------------- A non-text attachment was scrubbed... Name: fiveam-patch.bin Type: text/x-darcs-patch Size: 6801 bytes Desc: not available URL: From mdanish at andrew.cmu.edu Wed Feb 15 23:32:37 2006 From: mdanish at andrew.cmu.edu (Matthew Danish) Date: Wed, 15 Feb 2006 18:32:37 -0500 Subject: [Bese-devel] reinitializing a component slot In-Reply-To: <20060215032932.GN562@mapcar.org> References: <20060215032932.GN562@mapcar.org> Message-ID: <20060215233237.GO562@mapcar.org> On Tue, Feb 14, 2006 at 10:29:32PM -0500, Matthew Danish wrote: > Suppose I have a form which the user types in some data and presses > Submit. Now I have this information and I wish to update a :component > slot with a new component with the new data. > > (defcomponent view () > (... > (body :accessor body > :component (table ...)))) > > (defaction update ((c view)) > (setf (body c) (make-instance 'table ...???))) > > Or should I be going about this differently? > So far I've come up with: (defaction update ((c view)) (setf (body c) (make-instance 'table :parent c :place (make-place (body c)) ...))) This does what I want, so far. Don't know the pitfalls. -- ;; Matthew Danish -- user: mrd domain: cmu.edu ;; OpenPGP public key: C24B6010 on keyring.debian.org From mdanish at andrew.cmu.edu Thu Feb 16 00:47:11 2006 From: mdanish at andrew.cmu.edu (Matthew Danish) Date: Wed, 15 Feb 2006 19:47:11 -0500 Subject: [Bese-devel] mistake in recent patch Message-ID: <20060216004711.GP562@mapcar.org> [utf-8 for url henrik.hjelte at poboxes.com**20060208091726] { hunk ./src/backend/common.lisp 91 - (unescaped-key (unescape-as-uri key)) - (unescaped-value (unescape-as-uri value))) + (unescaped-key (unescape-as-uri key (external-format-for :url))) + (unescaped-value (unescape-as-uri value (external-format-for :url)))) hunk ./src/vars.lisp 13 -(defvar *external-formats* '(:url :latin-1 +(defconstant +default-encoding-for-uri+ :utf-8 + "UTF-8 is the semi-standard encoding for URL:s + RFC 2396 does not specify how multi-byte characters are encoded, but mentions UTF-8 as an example. + RFC 2718 Strongly recommends UTF-8 for new URI-schemes. + RFC 3987 The IRI (International Resource Identifier) proposed standard specifies UTF-8. + The Javascript ECMA standard specifies that the conversion functions (EncodeURI et al.) use UTF-8, + http://www.ecma-international.org/publications/files/ecma-st/ECMA-262.pdf +") + +(defvar *external-formats* '(:url +default-encoding-for-uri+ } Notice on the last line that it uses the symbol +default-encoding-for-uri+ instead of its value :utf-8. This causes an error in SBCL because it attempts to find an external format named, literally, "+default-encoding-for-uri+". I changed it to `(:url ,+default-encoding-for-uri+ and it works. -- ;; Matthew Danish -- user: mrd domain: cmu.edu ;; OpenPGP public key: C24B6010 on keyring.debian.org From henrik at evahjelte.com Thu Feb 16 02:59:01 2006 From: henrik at evahjelte.com (henrik hjelte) Date: Thu, 16 Feb 2006 03:59:01 +0100 Subject: [Bese-devel] mistake in recent patch In-Reply-To: <20060216004711.GP562@mapcar.org> References: <20060216004711.GP562@mapcar.org> Message-ID: <1140058741.9215.239.camel@localhost.localdomain> > Notice on the last line that it uses the symbol +default-encoding-for-uri+ > instead of its value :utf-8. > > This causes an error in SBCL because it attempts to find an external format > named, literally, "+default-encoding-for-uri+". > > I changed it to `(:url ,+default-encoding-for-uri+ and it works. Sorry, I added this change to the ucw_public repository yesterday but it hasn't been moved to ucw_dev yet. /Henrik Hjelte From luca at pca.it Wed Feb 15 18:23:57 2006 From: luca at pca.it (Luca Capello) Date: Wed, 15 Feb 2006 19:23:57 +0100 Subject: [Bese-devel] Re: darcs patch: remove docs/reference.pdf, already included in manual.pdf In-Reply-To: References: <87d5i65bd0.fsf@gismo.pca.it> <87hd77b9iy.fsf@gismo.pca.it> <1139582036.9215.32.camel@localhost.localdomain> <878xsjb6d2.fsf@gismo.pca.it> <1139594581.9215.48.camel@localhost.localdomain> Message-ID: <871wy47a6a.fsf@gismo.pca.it> Hello! On Fri, 10 Feb 2006 20:39:22 +0100, Marco Baringer wrote: > Henrik Hjelte wrote: >>> IMHO, the best option should be to convert the documentation into >>> the qbook format [3], but my Lisp time is already missing... >> maybe a project for the parenscript-gardeners :-) > > if i were to find some time and do this we'd lose the images in > parenscripts current docs. any problems with this? Actually, I think that as we already decided to keep the manual.pdf as it is, we don't need the images for the tutorial any more. I mean, the images are just screenshots of the tutorial examples. While they could be useful if something goes wrong, at the same time they are already presents in the manual.pdf, so I'd mark them as useless. Moreover, I don't know how many ParensScript users will generate the tutorial.pdf caring for the screenshots of the examples. These are the reason why I'm preparing a patch to remove them ;-) Marco, if you still want to convert the documentation to qbook, I'll second it :-) Thx, bye, Gismo / Luca -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 188 bytes Desc: not available URL: From mdanish at andrew.cmu.edu Thu Feb 16 19:14:30 2006 From: mdanish at andrew.cmu.edu (Matthew Danish) Date: Thu, 16 Feb 2006 14:14:30 -0500 Subject: [Bese-devel] interface-element-class Message-ID: <20060216191430.GQ562@mapcar.org> I'm using define-ie-type to make some custom form elements. I am using :metaclass interface-element-class, but it is not exported. Shouldn't it be exported, or should define-ie-type use it by default? -- ;; Matthew Danish -- user: mrd domain: cmu.edu ;; OpenPGP public key: C24B6010 on keyring.debian.org From levente.meszaros at gmail.com Thu Feb 16 20:12:55 2006 From: levente.meszaros at gmail.com (=?ISO-8859-1?Q?Levente_M=E9sz=E1ros?=) Date: Thu, 16 Feb 2006 21:12:55 +0100 Subject: [Bese-devel] Special variables in arnesi Message-ID: Hi, This is a small patch that replaces the runtime call to eval (with progv) when exporting special variables from cc code to lisp code. I send this patch, because I guess that my last patch could not be applied to the repository due to my fault. levy -------------- next part -------------- A non-text attachment was scrubbed... Name: special.patch Type: application/octet-stream Size: 27215 bytes Desc: not available URL: From mdanish at andrew.cmu.edu Thu Feb 16 20:50:57 2006 From: mdanish at andrew.cmu.edu (Matthew Danish) Date: Thu, 16 Feb 2006 15:50:57 -0500 Subject: [Bese-devel] UCW beginners error; it.bese.ucw::place is unbound In-Reply-To: <20060215095201.GA8753@absentis.com> References: <20060215095201.GA8753@absentis.com> Message-ID: <20060216205057.GR562@mapcar.org> On Wed, Feb 15, 2006 at 09:52:01AM +0000, Andrew Lawson wrote: > Hello all > I've been playing with UCW for a day or so but have encountered an error that I can't seem to solve. I'm not sure whether I've not initialised something correctly ot whether I'm simply using the library on an unsupported platform (Lispworks 4.4.6, windows). The error I get is; > > The slot IT.BESE.UCW::PLACE is unbound in the object # (an instance of class #). > > Below is the code that causes this error when you click and it tries to call a new component, I've removed any code that seemed pointless and it still errors as before. > > (in-package :it.bese.ucw-user) > > (export 'startup) > > (defun startup () > (asdf:oos 'asdf:load-op :ucw.admin) > (asdf:oos 'asdf:load-op :ucw.examples) > (ucw:start-swank) > (ucw:create-server > :backend :aserve > :host "127.0.0.1" > :port 8080 > :applications (list > it.bese.ucw-user::*example-application* > ucw::*admin-application* > *website-application*) > :inspect-components nil > :log-root-directory (make-pathname > :name nil > :type nil > :directory (append (pathname-directory *load-truename*) > (list :up "logs")) > :defaults *load-truename*) > :log-level it.bese.ucw::+info+ > :start-p t)) > > ;(startup) > > (defparameter *website-application* > (make-instance 'cookie-session-application :url-prefix "/website-application/")) > > (defentry-point "index.ucw" (:application *website-application*) () > (call 'my-simple-window-component)) > > > (defcomponent my-simple-window-component (simple-window-component) > () > (:default-initargs > :title "My Website")) (defcomponent my-simple-window-component (simple-window-component) ((body :accessor body :component (my-module-choice))) (:default-initargs :title "My Website")) > > (defmethod initialize-instance :after ((self my-simple-window-component) &rest args) > (setf (ucw:window-component.stylesheet self) "http://localhost:8080/css/standard.css")) > > (defmethod render ((com my-simple-window-component)) > (<:div > :class "body" > (<:div > :class "title" > (<:div :class "header-1" "Website application")) > (<:div > :class "page" > (render (make-instance 'my-module-choice))))) (render (body com)) What this achieves is that by using :COMPONENT it automatically sets up the PLACE and PARENT slots of MY-MODULE-CHOICE. You could do this without :COMPONENT by doing something like: (defmethod initialize-instance :after ((c my-simple-window-component) &rest initargs) (declare (ignore initargs)) (setf (body c) (make-instance 'my-module-choice :place (make-place (body c)) :parent c))) I'm no expert, but I'm pretty sure this is all :COMPONENT ends up doing anyhow. Note that MAKE-PLACE is a macro which accepts a form as argument, that form being the code which accesses the ``place'' of the object (in SETF terminology). Now when you use CALL-COMPONENT, there is a PLACE slot in the old component for it to bind to the new component. -- ;; Matthew Danish -- user: mrd domain: cmu.edu ;; OpenPGP public key: C24B6010 on keyring.debian.org From attila.lendvai at gmail.com Fri Feb 17 00:03:59 2006 From: attila.lendvai at gmail.com (Attila Lendvai) Date: Fri, 17 Feb 2006 01:03:59 +0100 Subject: [Bese-devel] generated content with ucw In-Reply-To: <1140037386.9215.231.camel@localhost.localdomain> References: <1140037386.9215.231.camel@localhost.localdomain> Message-ID: > Do you need an entry point? > I use action-href to generate a url: > > Somewhere in a render method ((p my-component)) > ... > An url is generated... > (action-href (lambda () (my-method p) > > > - render this link somewhere in a page > > - from the handler lambda of the entry point extract the actual socket > > stream and write the content, set correct mime-type > > (defmethod render((a ajax-answer)) > (<:as-is (ajax-answer.text a))) > > I hope the general idea comes through. Just change the name from ajax to > png and the content type. Maybe there are smarter solutions than this, > but this works for me.. thanks for the hints, it helped a lot. there are problems, tough... ucw writes all its output into a string buffer (html-stream in the request, which is basically the same as *yaclml-stream*). i've managed to get hold of the raw network stream, but: - it is hackend-dependent (no big deal) - it doesnt work, because the entire html header is written in the string buffer and therefore it will be rendered _after_ the binary data i've written into the raw stream i hope Marco can shed some light on the issue and propose some solution that i would be more then happy to implement if i can manage. i tought of a new component similar to window-component, that somehow manages to bind *yaclml-stream* to the raw output stream and does not use the response string buffering. but i don't understand ucw internals enough for these things... any hints/plans for this? - attila (alias 101 on irc &no 'its not lisp code :) From mb at bese.it Fri Feb 17 12:38:26 2006 From: mb at bese.it (Marco Baringer) Date: Fri, 17 Feb 2006 13:38:26 +0100 Subject: [Bese-devel] Re: ucw & cmucl threads In-Reply-To: <20060213235641.GA46904@semp.x-si.org> References: <20060213235641.GA46904@semp.x-si.org> Message-ID: Damir Horvat wrote: > Hi! > > Today is my first day with ucw and I've got it working with cmucl on > FreeBSD. i'm not certain that cmucl has threads on freebsd. > However, I cant get REPL from emacs (slime). If I dont start ucw, I can > work normaly, when ucw is running, REPL is not acceessible. > > How can I fix this? And what is _the_ most simple .cmucl-init.lisp for > loading ucw and then beeing able to connect to this remote REPL? what does (ucw::threaded-lisp-p) return? -- -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 Feb 17 12:45:40 2006 From: mb at bese.it (Marco Baringer) Date: Fri, 17 Feb 2006 13:45:40 +0100 Subject: [Bese-devel] Re: Streams Binary Flexi? In-Reply-To: <1139996768.9215.218.camel@localhost.localdomain> References: <000001c6318c$6382b250$d80a0a0a@acceleration.net> <1139955714.9215.198.camel@localhost.localdomain> <87accthuzl.fsf@core.gen.tr> <1139996768.9215.218.camel@localhost.localdomain> Message-ID: Henrik Hjelte wrote: > On ons, 2006-02-15 at 10:44 +0200, Aycan iRiCAN wrote: >> henrik hjelte writes: >> >>> On tis, 2006-02-14 at 12:30 -0500, Nathan Bird wrote: >>>> I'm currently looking at some bug in ucw where it is having a hard time >>>> dealing with form posts using mod_lisp >>> With my latest bugfix it works for me with a fresh get from darcs. At >>> least the form demo, the form upload demo doesn't work like before >>> because mime-part-body now returns a binary-stream to a temporary file. >>> Which is really quite nice. >> It's nice but it's hard to use in some cases. Think of an upload form >> that get's a picture from user. If you need to make a preview for this >> form, you have to copy that temporary file into your webroot and >> rename it's extension (to be able to show in a web page). Your >> temporary files are growing with a factor of 2 now. renaming is a simple and fast operation (as long as the orginial and the dest are on the same file system), so you've a problem here only when a) the files are large and b) /tmp/ and /webroot/ are on differente filesystems. the easy solution is to just tell ucw to put these temp files an the same filesystem as your web root, redefine ucw::make-temp-filename to this: (defun make-temp-filename () (strcat "/path/to/webroot/incoming/ucw" (princ-to-string (get-universal-time)))) will this do or is there some other issue i'm missing? -- -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 Feb 17 12:47:10 2006 From: mb at bese.it (Marco Baringer) Date: Fri, 17 Feb 2006 13:47:10 +0100 Subject: [Bese-devel] Re: reinitializing a component slot In-Reply-To: <20060215233237.GO562@mapcar.org> References: <20060215032932.GN562@mapcar.org> <20060215233237.GO562@mapcar.org> Message-ID: Matthew Danish wrote: > On Tue, Feb 14, 2006 at 10:29:32PM -0500, Matthew Danish wrote: >> Suppose I have a form which the user types in some data and presses >> Submit. Now I have this information and I wish to update a :component >> slot with a new component with the new data. >> >> (defcomponent view () >> (... >> (body :accessor body >> :component (table ...)))) >> >> (defaction update ((c view)) >> (setf (body c) (make-instance 'table ...???))) >> >> Or should I be going about this differently? >> > > So far I've come up with: > > (defaction update ((c view)) > (setf (body c) > (make-instance 'table :parent c > :place (make-place (body c)) > ...))) > > This does what I want, so far. Don't know the pitfalls. that works and the only problem you'll run into is call/answer'ing the new table component. why don't you just use call and answer on the body component instead of the 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 Fri Feb 17 12:58:23 2006 From: mb at bese.it (Marco Baringer) Date: Fri, 17 Feb 2006 13:58:23 +0100 Subject: [Bese-devel] Re: FiveAM Patch: (signals error ...) was always passing In-Reply-To: <200602151447.33795.keithley@easystreet.com> References: <200602151447.33795.keithley@easystreet.com> Message-ID: Donavon Keithley wrote: > * Fix (signals error ...), was always passing 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 Fri Feb 17 12:54:25 2006 From: mb at bese.it (Marco Baringer) Date: Fri, 17 Feb 2006 13:54:25 +0100 Subject: [Bese-devel] Re: Two patches for the window component In-Reply-To: <1139952776.9215.175.camel@localhost.localdomain> References: <1139952776.9215.175.camel@localhost.localdomain> Message-ID: Henrik Hjelte wrote: > The ucw_public_apply.cgi darcs script complains about some conflict > in ./src/components/window.lisp when I try to apply these two small > changes to the window component. Maybe they can added manually? > > First is a bugfix that inline javascript should be rendered as-is rather > than as html. > > Then is a small addition to the window component. By specificing some > javascript inline-code as first-inline-javascript you can be sure that > it is executed first of all. I needed this for the dojo toolkit, which > presumes some parameters are set before the dojo.js file is included. so now we have inline-javascript, javascript and first-inline-javascript, isn't this a bit much? how about if we removed all three slots and left only javascript but changed it to work like this: The javascript slot would be a list (and will be rendered in order) where each element is a list of: (:SRC url) - generate a (:JS string) - generate a this will allow any weird comination of file loading/script evaluating should the need arise. -- -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 damir at x-si.org Fri Feb 17 13:06:18 2006 From: damir at x-si.org (Damir Horvat) Date: Fri, 17 Feb 2006 14:06:18 +0100 Subject: [Bese-devel] Re: ucw & cmucl threads In-Reply-To: References: <20060213235641.GA46904@semp.x-si.org> Message-ID: <20060217130618.GA6991@semp.x-si.org> On Fri, Feb 17, 2006 at 01:38:26PM +0100, Marco Baringer wrote: > i'm not certain that cmucl has threads on freebsd. yes, it does. > > However, I cant get REPL from emacs (slime). If I dont start ucw, I can > > work normaly, when ucw is running, REPL is not acceessible. > > > > How can I fix this? And what is _the_ most simple .cmucl-init.lisp for > > loading ucw and then beeing able to connect to this remote REPL? > > what does (ucw::threaded-lisp-p) return? T I've just commented out ucw's swank starting func, and started swank normaly as w/o ucw after ucw is loaded. It works now as expected. Someone from #ucw thought of this scenario. ;-) Damir From mb at bese.it Fri Feb 17 13:08:32 2006 From: mb at bese.it (Marco Baringer) Date: Fri, 17 Feb 2006 14:08:32 +0100 Subject: [Bese-devel] Re: UCW beginners error; it.bese.ucw::place is unbound In-Reply-To: <20060215095201.GA8753@absentis.com> References: <20060215095201.GA8753@absentis.com> Message-ID: Andrew Lawson wrote: > (in-package :it.bese.ucw-user) > > (export 'startup) > > (defun startup () > (asdf:oos 'asdf:load-op :ucw.admin) > (asdf:oos 'asdf:load-op :ucw.examples) > (ucw:start-swank) > (ucw:create-server > :backend :aserve > :host "127.0.0.1" > :port 8080 > :applications (list > it.bese.ucw-user::*example-application* > ucw::*admin-application* > *website-application*) > :inspect-components nil > :log-root-directory (make-pathname > :name nil > :type nil > :directory (append (pathname-directory *load-truename*) > (list :up "logs")) > :defaults *load-truename*) > :log-level it.bese.ucw::+info+ > :start-p t)) > > ;(startup) > > (defparameter *website-application* > (make-instance 'cookie-session-application :url-prefix "/website-application/")) > > (defentry-point "index.ucw" (:application *website-application*) () > (call 'my-simple-window-component)) > > > (defcomponent my-simple-window-component (simple-window-component) > () > (:default-initargs > :title "My Website")) > > (defmethod initialize-instance :after ((self my-simple-window-component) &rest args) > (setf (ucw:window-component.stylesheet self) "http://localhost:8080/css/standard.css")) fwiw, these three forms can be reduced to: (defcomponent my-simple-window-component (simple-window-component) () (:default-initargs :title "My Website" :stylesheet "http://localhost:8080/css/standard.css") (:entry-point "index.ucw" (:application *website-application*))) > (defmethod render ((com my-simple-window-component)) > (<:div > :class "body" > (<:div > :class "title" > (<:div :class "header-1" "Website application")) > (<:div > :class "page" > (render (make-instance 'my-module-choice))))) here's your problem. components need to initialized in a special manor, the place slot must be set to something and the parent, continuation and calling-component slots should generally be set. all of this is done transparently if you use the :component initarg to defcomponent: (defcomponent my-simple-window-component (simple-window-component) ((page :accessor page :component (my-module-choice))) (:default-initargs :title "My Website" :stylesheet "http://localhost:8080/css/standard.css") (:entry-point "index.ucw" (:application *website-application*))) and change call to render in your render method to this: (render (page com)) > (defcomponent my-module-choice (widget-component) > ()) > > (defmethod render ((self my-module-choice)) > (<:div > :class "header-4" > "Module choice") > (<:p "Choose the module you would like to use") > ( (<:as-html "Open first module"))) > > (defaction open-module ((self my-module-choice) module-type) > (call-component self (make-instance module-type))) this is exactly the same as: (defaction open-module ((self my-module-choice) module-type) (call module-type)) but, imho, more idomatic. > (defcomponent first-module (widget-component) > ()) > > (defmethod render ((self first-module)) > (<:div > :class "header-4" > "First module")) 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 Fri Feb 17 12:59:29 2006 From: mb at bese.it (Marco Baringer) Date: Fri, 17 Feb 2006 13:59:29 +0100 Subject: [Bese-devel] Re: Special variables in arnesi In-Reply-To: References: Message-ID: Levente M?sz?ros wrote: > Hi, > > This is a small patch that replaces the runtime call to eval (with > progv) when exporting special variables from cc code to lisp code. applied. thanks! can you do a clean get of arnesi_dev and make sure i'm not missing anything? -- -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 Feb 17 13:14:52 2006 From: mb at bese.it (Marco Baringer) Date: Fri, 17 Feb 2006 14:14:52 +0100 Subject: [Bese-devel] Re: UCW beginners error; it.bese.ucw::place is unbound In-Reply-To: <20060216205057.GR562@mapcar.org> References: <20060215095201.GA8753@absentis.com> <20060216205057.GR562@mapcar.org> Message-ID: Matthew Danish wrote: > What this achieves is that by using :COMPONENT it automatically sets up > the PLACE and PARENT slots of MY-MODULE-CHOICE. You could do this > without :COMPONENT by doing something like: > > (defmethod initialize-instance :after > ((c my-simple-window-component) &rest initargs) > (declare (ignore initargs)) > (setf (body c) (make-instance 'my-module-choice > :place (make-place (body c)) :parent c))) > > I'm no expert, but I'm pretty sure this is all :COMPONENT ends up doing > anyhow. Note that MAKE-PLACE is a macro which accepts a form as > argument, that form being the code which accesses the ``place'' of the > object (in SETF terminology). exactly. a (:component foo :bar 42) initarg is equivalent to writing: :initform (make-instance 'foo :bar 42 :place (make-place (slot-value self 'name-of-slot)) except that, should you ever explictily pass an initarg for that slot, standard-component class will setup the place automatically. that doesn't make a lot of sense does it? example: (defcomponent foo () ((body :component (some-component)))) (call 'foo) will put a some-component instance in the body slot. (call 'foo :body (make-instance 'chooser)) will put a chooser instance in the foo slot _and_ setup the place and parent slots of the newly created chooser. > Now when you use CALL-COMPONENT, there is a PLACE slot in the old > component for it to bind to the new component. 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 Fri Feb 17 13:23:36 2006 From: mb at bese.it (Marco Baringer) Date: Fri, 17 Feb 2006 14:23:36 +0100 Subject: [Bese-devel] Re: generated content with ucw In-Reply-To: References: <1140037386.9215.231.camel@localhost.localdomain> Message-ID: Attila Lendvai wrote: > ucw writes all its output into a string buffer (html-stream in the > request, which is basically the same as *yaclml-stream*). i've managed > to get hold of the raw network stream, but: > - it is hackend-dependent (no big deal) > - it doesnt work, because the entire html header is written in the > string buffer and therefore it will be rendered _after_ the binary > data i've written into the raw stream this can be fixed by exposing the underlying content-stream as part of the backend protocol. however this stream may or may not be bivalent. > i hope Marco can shed some light on the issue and propose some > solution that i would be more then happy to implement if i can manage. you could try to first call (shutdown (context.request *context*)), this should write out the headers, and then write directly to the content-stream (which is, unfortunetly, backend specific). > i tought of a new component similar to window-component, that somehow > manages to bind *yaclml-stream* to the raw output stream and does not > use the response string buffering. but i don't understand ucw > internals enough for these things... it wouldn't be that hard to create such a component, but you'll lose much of ucw's error handling (the html erro pages at least, the slime debugger hook should remain) > any hints/plans for this? ucw would be better with it, but i don't know when i'll get around to it. it's not that hard really, but will require some carefull refactoring. -- -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 levente.meszaros at gmail.com Fri Feb 17 14:22:15 2006 From: levente.meszaros at gmail.com (=?ISO-8859-1?Q?Levente_M=E9sz=E1ros?=) Date: Fri, 17 Feb 2006 15:22:15 +0100 Subject: [Bese-devel] Special Message-ID: clean checked out arnesi_dev looks ok to me, all the special variable patches are included. levy -------------- next part -------------- An HTML attachment was scrubbed... URL: From henrik at evahjelte.com Fri Feb 17 14:59:24 2006 From: henrik at evahjelte.com (henrik hjelte) Date: Fri, 17 Feb 2006 15:59:24 +0100 Subject: [Bese-devel] Re: Two patches for the window component In-Reply-To: References: <1139952776.9215.175.camel@localhost.localdomain> Message-ID: <1140188364.9215.304.camel@localhost.localdomain> On fre, 2006-02-17 at 13:54 +0100, Marco Baringer wrote: > Henrik Hjelte wrote: > > The ucw_public_apply.cgi darcs script complains about some conflict > > in ./src/components/window.lisp when I try to apply these two small > > changes to the window component. Maybe they can added manually? > > > > First is a bugfix that inline javascript should be rendered as-is rather > > than as html. > > > > Then is a small addition to the window component. By specificing some > > javascript inline-code as first-inline-javascript you can be sure that > > it is executed first of all. I needed this for the dojo toolkit, which > > presumes some parameters are set before the dojo.js file is included. > > so now we have inline-javascript, javascript and > first-inline-javascript, isn't this a bit much? yes, it's ugly. > how about if we removed > all three slots and left only javascript but changed it to work like this: > > The javascript slot would be a list (and will be rendered in order) > where each element is a list of: > > (:SRC url) - generate a > (:JS string) - generate a > > this will allow any weird comination of file loading/script evaluating > should the need arise. Now that's pretty! Why didn't I think of that? /Henrik From a_bakic at yahoo.com Fri Feb 17 15:29:32 2006 From: a_bakic at yahoo.com (Aleksandar Bakic) Date: Fri, 17 Feb 2006 07:29:32 -0800 (PST) Subject: [Bese-devel] Re: Two patches for the window component In-Reply-To: <1140188364.9215.304.camel@localhost.localdomain> Message-ID: <20060217152932.65844.qmail@web34603.mail.mud.yahoo.com> > > so now we have inline-javascript, javascript and > > first-inline-javascript, isn't this a bit much? > yes, it's ugly. FWIW, I call these in render methods: (defun require-css (str) (pushnew str (stylesheet (context.window-component *context*)) :test #'equal)) (defun require-js (str) (pushnew str (javascript (context.window-component *context*)) :test #'equal)) (defun require-ijs (str) (pushnew str (inline-javascript (context.window-component *context*)) :test #'equal)) Alex __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From henrik at evahjelte.com Fri Feb 17 16:09:47 2006 From: henrik at evahjelte.com (Henrik Hjelte) Date: Fri, 17 Feb 2006 17:09:47 +0100 Subject: [Bese-devel] Re: Two patches for the window component In-Reply-To: <20060217152932.65844.qmail@web34603.mail.mud.yahoo.com> References: <20060217152932.65844.qmail@web34603.mail.mud.yahoo.com> Message-ID: <1140192587.9215.316.camel@localhost.localdomain> On fre, 2006-02-17 at 07:29 -0800, Aleksandar Bakic wrote: > FWIW, I call these in render methods: > > (defun require-css (str) > (pushnew > str (stylesheet (context.window-component *context*)) :test #'equal)) > > (defun require-js (str) > (pushnew > str (javascript (context.window-component *context*)) :test #'equal)) > > (defun require-ijs (str) > (pushnew > str (inline-javascript (context.window-component *context*)) :test #'equal)) Looks nice, it makes it easy to get exactly what is needed for this particular component. I vote that they are added to the window.lisp file as helper-functions. But they don't solve the problem that you may need a particular ordering of the includes/inline code, all inline-code still comes after the include files. /Henrik From mb at bese.it Fri Feb 17 16:46:55 2006 From: mb at bese.it (Marco Baringer) Date: Fri, 17 Feb 2006 17:46:55 +0100 Subject: [Bese-devel] Re: Streams Binary Flexi? In-Reply-To: References: <000001c6318c$6382b250$d80a0a0a@acceleration.net> <1139955714.9215.198.camel@localhost.localdomain> <87accthuzl.fsf@core.gen.tr> <1139996768.9215.218.camel@localhost.localdomain> Message-ID: Marco Baringer wrote: > > will this do or is there some other issue i'm missing? there's currently no way to get at that temp file's name. i'll add something in (got any preferences?) -- -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 Feb 17 20:29:13 2006 From: mb at bese.it (Marco Baringer) Date: Fri, 17 Feb 2006 21:29:13 +0100 Subject: [Bese-devel] dojo Message-ID: unless someone complains really loud i'm going to add dojo (http://dojotoolkit.org/) to the official list of ucw dependencies. -- -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 mbaringer at common-lisp.net Sat Feb 18 06:00:04 2006 From: mbaringer at common-lisp.net (Marco Baringer) Date: Sat, 18 Feb 2006 00:00:04 -0600 (CST) Subject: [Bese-devel] New patches to fiveam: 17-Feb-2006 Message-ID: <20060218060004.E335D51011@common-lisp.net> Wed Feb 15 14:11:41 CST 2006 Donavon Keithley * Fix (signals error ...), was always passing If the body of the check didn't signal error, PROCESS-FAILURE would. So I simply moved PROCESS-FAILURE out of the HANDLER-BIND form. M ./src/check.lisp -7 +7 An updated tarball of fiveam's source can be downloaded here: http://common-lisp.net/project/bese/tarballs/fiveam-20060217.tar.gz Darcsweb URL: http://common-lisp.net/cgi-bin/darcsweb/darcsweb.cgi?r=fiveam;a=summary From mbaringer at common-lisp.net Sat Feb 18 06:00:08 2006 From: mbaringer at common-lisp.net (Marco Baringer) Date: Sat, 18 Feb 2006 00:00:08 -0600 (CST) Subject: [Bese-devel] New patches to ucw_dev: 17-Feb-2006 Message-ID: <20060218060008.BCF2256018@common-lisp.net> Fri Feb 17 15:21:14 CST 2006 matley at muppetslab.org * Added Trivial Sockets to the list of requirements in the README M ./README +6 Fri Feb 17 13:22:37 CST 2006 Marco Baringer * Added the with-dummy-context macro M ./src/packages.lisp +1 M ./src/rerl/standard-request-context.lisp +52 Fri Feb 17 08:27:21 CST 2006 Marco Baringer * Changed window-component's javascript handling (only one slot now) Instead of having three different slot for the different ways we might want to include javascript we now have exactly one slot and each value specifies if it's a file to link to or a bit of javascript code to include. M ./src/components/window.lisp -25 +20 Fri Feb 17 08:16:40 CST 2006 Marco Baringer * ucw.araneida asdf definition was wrong M ./ucw.asd -1 +1 Tue Feb 14 09:58:56 CST 2006 henrik.hjelte at poboxes.com * known order of javascripts in window-component M ./src/components/window.lisp -3 +12 Tue Feb 14 09:58:03 CST 2006 henrik.hjelte at poboxes.com * inline-javascript rendered as-is M ./src/components/window.lisp -1 +1 Thu Feb 16 02:35:34 CST 2006 Marco Baringer * Fix mod-lisp's read/write-line functions We explicitly use string-to-octets here so that we remind ourselves that some conversion needs to happen to the string (even though we haven't yet decided what). M ./src/backend/mod-lisp.lisp -3 +12 Tue Feb 14 11:09:07 CST 2006 Nathan Bird * Changing set-action-paramter js-macro This code should do the same thing as before, just without introducing a variable which was causing some spurious parenscript behavior. M ./src/yaclml/ucw-tags.lisp -3 +1 Tue Feb 14 12:42:03 CST 2006 henrik.hjelte at poboxes.com * bugfix default-encoding-for-uri M ./src/vars.lisp -1 +1 Mon Feb 6 01:58:15 CST 2006 henrik.hjelte at poboxes.com * Can make a single-threaded backend if wished M ./src/control.lisp +8 Mon Feb 6 01:31:51 CST 2006 henrik.hjelte at poboxes.com * response parameter removed from range-view M ./src/components/range-view.lisp -4 +4 M ./wwwroot/ucw/range-view.tal -1 +1 Tue Feb 7 16:26:24 CST 2006 Nathan Bird * action-href-body M ./src/packages.lisp +1 M ./src/rerl/standard-action.lisp +9 Mon Feb 13 13:22:24 CST 2006 levente.meszaros at gmail.com * Fix if-bind after changing answer-component. M ./src/rerl/standard-component/control-flow.lisp -1 +1 Mon Feb 13 13:07:18 CST 2006 levente.meszaros at gmail.com * Introduce answer-component* with 3 parameters: source, target and value. It allows the source component to restore dynamic environment when somebody is answering to it. (using around method) M ./src/rerl/standard-component/control-flow.lisp -4 +7 Tue Feb 7 14:23:35 CST 2006 henrik.hjelte at poboxes.com * mod-lisp reads and writes to a byte-stream M! ./src/backend/mod-lisp.lisp -12 +5 Thu Feb 16 02:14:12 CST 2006 Marco Baringer * 'instance -> :instance (Reported by: Aleksandar Bakic ) M ./src/components/presentations.lisp -1 +1 An updated tarball of ucw_dev's source can be downloaded here: http://common-lisp.net/project/ucw/tarballs/ucw_dev-20060217.tar.gz Darcsweb URL: http://common-lisp.net/cgi-bin/darcsweb/darcsweb.cgi?r=ucw_dev;a=summary From mbaringer at common-lisp.net Sat Feb 18 06:00:15 2006 From: mbaringer at common-lisp.net (Marco Baringer) Date: Sat, 18 Feb 2006 00:00:15 -0600 (CST) Subject: [Bese-devel] New patches to arnesi_dev: 17-Feb-2006 Message-ID: <20060218060015.018E65C00C@common-lisp.net> Tue Feb 14 15:05:52 CST 2006 levente.meszaros at gmail.com * Eliminate runtime call to eval when exporting special variables from cc code to lisp code. M ./src/call-cc/apply.lisp -16 +11 An updated tarball of arnesi_dev's source can be downloaded here: http://common-lisp.net/project/bese/tarballs/arnesi_dev-20060217.tar.gz Darcsweb URL: http://common-lisp.net/cgi-bin/darcsweb/darcsweb.cgi?r=arnesi_dev;a=summary From mbaringer at common-lisp.net Sat Feb 18 06:00:20 2006 From: mbaringer at common-lisp.net (Marco Baringer) Date: Sat, 18 Feb 2006 00:00:20 -0600 (CST) Subject: [Bese-devel] New patches to ucw_public: 17-Feb-2006 Message-ID: <20060218060020.C06AA5F003@common-lisp.net> Thu Feb 16 02:35:34 CST 2006 Marco Baringer * Fix mod-lisp's read/write-line functions We explicitly use string-to-octets here so that we remind ourselves that some conversion needs to happen to the string (even though we haven't yet decided what). M ./src/backend/mod-lisp.lisp -3 +12 Thu Feb 16 02:14:12 CST 2006 Marco Baringer * 'instance -> :instance (Reported by: Aleksandar Bakic ) M ./src/components/presentations.lisp -1 +1 Mon Feb 13 13:09:57 CST 2006 Marco Baringer * Remove stray :iso-8859-1 (Reported by: Asbj??rn Bj??rnstad ) M ./src/backend/httpd.lisp -3 +2 Fri Feb 10 09:54:21 CST 2006 Marco Baringer * Drop the dump-application(s) methods. This code hasn't been used for ages (and probably shouldn't have been used in the first place). Using compile-file and #. is just begging to get bitten. M ./src/rerl/standard-application.lisp -7 M ./src/rerl/standard-server.lisp -33 Wed Feb 8 09:42:48 CST 2006 Marco Baringer * Fix bug in remove-expired-sessions We were accidentaly removing elements from within a hash-table-iterator after we'd iterated over them. M ./src/rerl/standard-application.lisp -3 +2 Wed Feb 8 09:42:13 CST 2006 Marco Baringer * Changed mod_lisp backend to deal with non-character streams coming from apache. M! ./src/backend/mod-lisp.lisp -16 +7 Wed Feb 8 09:38:48 CST 2006 Marco Baringer * Added :name paramters to * Avoid calculating tempalte-truename twice M ./src/yaclml/yaclml.lisp -2 +2 Wed Feb 8 09:31:24 CST 2006 Marco Baringer * Indentation fixup M ./bin/start.lisp -1 +1 An updated tarball of ucw_public's source can be downloaded here: http://common-lisp.net/project/ucw/tarballs/ucw_public-20060217.tar.gz Darcsweb URL: http://common-lisp.net/cgi-bin/darcsweb/darcsweb.cgi?r=ucw_public;a=summary From asbjxrn at bjxrnstad.net Sat Feb 18 05:43:14 2006 From: asbjxrn at bjxrnstad.net (=?ISO-8859-1?Q?Asbj=F8rn_Bj=F8rnstad?=) Date: Sat, 18 Feb 2006 13:43:14 +0800 Subject: [Bese-devel] dojo In-Reply-To: References: Message-ID: On 2/18/06, Marco Baringer wrote: > > > unless someone complains really loud i'm going to add dojo > (http://dojotoolkit.org/) to the official list of ucw dependencies. My only concern is that when I go to the higtly build examples the examples takes a long time to load/initialize. Several seconds for each one. I don't know if that is typical for apps using dojo. -- -asbjxrn -------------- next part -------------- An HTML attachment was scrubbed... URL: From attila.lendvai at gmail.com Sat Feb 18 10:50:00 2006 From: attila.lendvai at gmail.com (Attila Lendvai) Date: Sat, 18 Feb 2006 11:50:00 +0100 Subject: [Bese-devel] Re: generated content with ucw In-Reply-To: References: <1140037386.9215.231.camel@localhost.localdomain> Message-ID: > you could try to first call (shutdown (context.request *context*)), this > should write out the headers, and then write directly to the > content-stream (which is, unfortunetly, backend specific). success! i had to make a small dirty change to ucw: introduce a validp flag on the httpd response and handle double shutdown calls and empty responses. but with this i can serve cairo generated png's with ucw... :) > ucw would be better with it, but i don't know when i'll get around to > it. it's not that hard really, but will require some carefull refactoring. yep, that's why i don't apply it to the public repo... looking forward to a patch, but it fine until then. - attila (alias 101 on irc &no 'its not lisp code :) ps: (defcomponent binary-content-component (window-component) ((data :initarg :data :accessor data-of)) (:default-initargs :content-type "application/octet-stream") (:render (self) (let* ((response (ucw::context.response *context*)) (request (ucw::context.request *context*)) (content (data-of self)) (stream (ucw::network-stream request))) (ucw::shutdown response) (log.debug "Writing ~A bytes long binary content to the output stream" (length content)) (ucw::write-header-line "Content-Length" (princ-to-string (length content)) stream) (ucw::write-crlf stream) (write-sequence content stream)))) (defmethod serve-binary-content (byte-vector &key (content-type "application/octet-stream")) (setf (context.window-component *context*) (make-instance 'binary-content-component :data byte-vector :content-type content-type))) From drewc at tech.coop Sat Feb 18 19:39:00 2006 From: drewc at tech.coop (Drew Crampsie) Date: Sat, 18 Feb 2006 14:39:00 -0500 Subject: [Bese-devel] dojo In-Reply-To: References: Message-ID: <43F777D4.5070609@tech.coop> Asbj?rn Bj?rnstad wrote: > > On 2/18/06, *Marco Baringer* > wrote: > > > unless someone complains really loud i'm going to add dojo > (http://dojotoolkit.org/) to the official list of ucw dependencies. > > > My only concern is that when I go to the higtly build examples > the examples takes a long time to load/initialize. Several seconds > for each one. I don't know if that is typical for apps using dojo. This is because the nightly build examples are not built for delivery. You can bake a dojo that only uses the functionality you need, and this significantly faster. They also have a javascript compressor, which speeds things up again. drewc > -- > -asbjxrn > >------------------------------------------------------------------------ > >_______________________________________________ >bese-devel mailing list >bese-devel at common-lisp.net >http://common-lisp.net/cgi-bin/mailman/listinfo/bese-devel > > From robert.brown at gmail.com Sat Feb 18 20:41:01 2006 From: robert.brown at gmail.com (Robert Brown) Date: Sat, 18 Feb 2006 15:41:01 -0500 Subject: [Bese-devel] problem compiling Message-ID: <78d2fb3b0602181241m78a0f9e8v67a47522755147ae@mail.gmail.com> I checked out a copy of ucw_dev and am following the instructions to compile it. I'm having trouble compiling and loading src/backend/common.lisp because it refers to several symbols in the rfc2388 package that do not exist in my version of the rfc2388 code, which I found via the cliki page for it. Are you maintaining a more recent version of rfc2388? Can you point me to a version that includes the symbols that ucw_dev needs? Also, it would be nice if the reporting bugs section of the ucw README file mentioned that one needs to subscribe to bese-devel before sending email to the list. Thanks very much. bob From henrik at evahjelte.com Sat Feb 18 21:06:36 2006 From: henrik at evahjelte.com (henrik hjelte) Date: Sat, 18 Feb 2006 22:06:36 +0100 Subject: [Bese-devel] problem compiling In-Reply-To: <78d2fb3b0602181241m78a0f9e8v67a47522755147ae@mail.gmail.com> References: <78d2fb3b0602181241m78a0f9e8v67a47522755147ae@mail.gmail.com> Message-ID: <1140296797.28912.46.camel@localhost.localdomain> On l?r, 2006-02-18 at 15:41 -0500, Robert Brown wrote: > Are you maintaining a more recent version of rfc2388? Can you > point me to a version that includes the symbols that ucw_dev > needs? The version that works with ucw: darcs get http://common-lisp.net/project/ucw/repos/rfc2388 /Henrik Hjelte From robert.brown at gmail.com Sat Feb 18 20:21:22 2006 From: robert.brown at gmail.com (Robert Brown) Date: Sat, 18 Feb 2006 15:21:22 -0500 Subject: [Bese-devel] trouble loading ucw_dev Message-ID: <78d2fb3b0602181221h3cb05573v1fa1ed46c2de94fe@mail.gmail.com> I checked out a copy of ucw_dev and am following the instructions to compile it. I'm having trouble compiling and loading src/backend/common.lisp because it refers to several symbols in the rfc2388 package that do not exist in my version of the rfc2388 code, which I found via the cliki page for it. Are you maintaining a more recent version of rfc2388? Can you point me to a version that includes the symbols that ucw_dev needs? Thanks very much. bob From mbaringer at common-lisp.net Sun Feb 19 06:00:05 2006 From: mbaringer at common-lisp.net (Marco Baringer) Date: Sun, 19 Feb 2006 00:00:05 -0600 (CST) Subject: [Bese-devel] New patches to ucw_dev: 18-Feb-2006 Message-ID: <20060219060005.DFBBD4C001@common-lisp.net> Sat Feb 18 08:16:02 CST 2006 Marco Baringer * Added :application parametetr to with-dummy-context In the face of TAL templates it is very usefull to be able to supply an existing, and properly configured, application to use. M ./src/rerl/standard-request-context.lisp -8 +9 Sat Feb 18 05:18:13 CST 2006 Marco Baringer * standard-request-context depends on stadard-component Since standard-request-context now includes the dummy-request-context stuff, which includes a dummy-root-component component, we need the defcomponent to be defined when loading/compiling this file. M ./ucw.asd -1 +2 An updated tarball of ucw_dev's source can be downloaded here: http://common-lisp.net/project/ucw/tarballs/ucw_dev-20060218.tar.gz Darcsweb URL: http://common-lisp.net/cgi-bin/darcsweb/darcsweb.cgi?r=ucw_dev;a=summary From mbaringer at common-lisp.net Sun Feb 19 06:00:11 2006 From: mbaringer at common-lisp.net (Marco Baringer) Date: Sun, 19 Feb 2006 00:00:11 -0600 (CST) Subject: [Bese-devel] New patches to arnesi_dev: 18-Feb-2006 Message-ID: <20060219060011.CC3FA59008@common-lisp.net> Wed Feb 15 08:15:26 CST 2006 henrik.hjelte at poboxes.com * escape html unicode characters Not all unicode characters fit the latin-1 encoding, escaping them helps out. M ./src/http.lisp +6 An updated tarball of arnesi_dev's source can be downloaded here: http://common-lisp.net/project/bese/tarballs/arnesi_dev-20060218.tar.gz Darcsweb URL: http://common-lisp.net/cgi-bin/darcsweb/darcsweb.cgi?r=arnesi_dev;a=summary From mb at bese.it Sun Feb 19 13:17:31 2006 From: mb at bese.it (Marco Baringer) Date: Sun, 19 Feb 2006 14:17:31 +0100 Subject: [Bese-devel] ucw-presentations Message-ID: i plan on removing all the presentation/interface elment stuff and moving it into a seperate library. in place of that i'm going to put a much simpler, less functional, but more flexable form library. -- -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 Sun Feb 19 19:34:45 2006 From: a_bakic at yahoo.com (Aleksandar Bakic) Date: Sun, 19 Feb 2006 11:34:45 -0800 (PST) Subject: [Bese-devel] a guard for a log Message-ID: <20060219193445.91600.qmail@web34605.mail.mud.yahoo.com> Hi, I noticed that a "when self" was missing within %defaction. NOTE: The patch is reversed... Alex --- ucw/src/rerl/standard-action.lisp 2006-02-16 23:14:53.000000000 +0100 +++ tmp/ucw_dev/src/rerl/standard-action.lisp 2006-02-18 14:25:50.000000000 +0 100 @@ -124,16 +124,15 @@ (and (listp form) (eql 'cl:declare ( car form))))) (collect form) (pop body)) - (when ,self - (ucw.component.action.info - (format nil "Serving action (~{/~S~}/~A::~A ~S~{ ~S~})" - (call-request-path ,self) - ,(swank::shortest-package-nickname (symbol-packa ge name)) - ,(string name) - ,self - (list ,@(arnesi:extract-argument-names - (arnesi:walk-lambda-list other-args nil nil - :allow-special izers t)))))) + (ucw.component.action.info + (format nil "Serving action (~{/~S~}/~A::~A ~S~{ ~S~})" + (call-request-path ,self) + ,(swank::shortest-package-nickname (symbol-packag e name)) + ,(string name) + ,self + (list ,@(arnesi:extract-argument-names + (arnesi:walk-lambda-list other-args nil nil + :allow-speciali zers t))))) (let ((self ,self)) (declare (ignorable self)) (block ,name __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From mb at bese.it Sun Feb 19 20:08:49 2006 From: mb at bese.it (Marco Baringer) Date: Sun, 19 Feb 2006 21:08:49 +0100 Subject: [Bese-devel] Re: a guard for a log In-Reply-To: <20060219193445.91600.qmail@web34605.mail.mud.yahoo.com> References: <20060219193445.91600.qmail@web34605.mail.mud.yahoo.com> Message-ID: Aleksandar Bakic wrote: > Hi, > > I noticed that a "when self" was missing within %defaction. NOTE: The patch is > reversed... unless you have a defaction specialized or the null class self can never be nil. how are you getting a nil self? -- -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 Sun Feb 19 21:21:46 2006 From: a_bakic at yahoo.com (Aleksandar Bakic) Date: Sun, 19 Feb 2006 13:21:46 -0800 (PST) Subject: [Bese-devel] recent write-as-html patch Message-ID: <20060219212146.78984.qmail@web34611.mail.mud.yahoo.com> Hi, It seems that the last five added lines should not be added (as-is): --- src/http.lisp 2006-02-19 21:39:46.000000000 +0100 +++ ../tmp/arnesi_dev/src/http.lisp 2006-02-19 12:40:46.000000000 +0100 @@ -86,6 +86,7 @@ (defun write-as-html (string &key (stream t) (escape-whitespace nil)) (loop for char across string + for code = (char-code char) do (cond ((char= char #\Space) (if escape-whitespace @@ -93,6 +94,11 @@ (write-char char stream))) ((gethash char *html-entites*) (princ (gethash char *html-entites*) stream)) + ((or (> code 127) (< code 32)) + (write-char #\& stream) + (write-char #\# stream) + (princ code stream) + (write-char #\; stream)) (t (write-char char stream))))) The first reason is that, when using utf-8, some non-ascii characters get escaped and some not (not sure why, based on the code, but it appeared so). The second is that, at least in Opera 9, combo boxes do not parse escaped chars and they appear as if they were, e.g., cdata attributes. Alex __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From a_bakic at yahoo.com Mon Feb 20 01:37:38 2006 From: a_bakic at yahoo.com (Aleksandar Bakic) Date: Sun, 19 Feb 2006 17:37:38 -0800 (PST) Subject: [Bese-devel] Re: a guard for a log In-Reply-To: Message-ID: <20060220013738.36664.qmail@web34606.mail.mud.yahoo.com> > unless you have a defaction specialized or the null class self can never > be nil. how are you getting a nil self? Perhaps the following explains it, although the problem should have popped up earlier than when I noticed it... In a logout action, just before jump-ing to a window-component, I am setting self to nil (and there is a '?' comment next to that setf...). Should self never be nil, even when calling a component for the first time? Alex __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From mbaringer at common-lisp.net Mon Feb 20 06:00:06 2006 From: mbaringer at common-lisp.net (Marco Baringer) Date: Mon, 20 Feb 2006 00:00:06 -0600 (CST) Subject: [Bese-devel] New patches to ucw_dev: 19-Feb-2006 Message-ID: <20060220060006.98F675B005@common-lisp.net> Sun Feb 19 17:46:08 CST 2006 Marco Baringer * Implement date-field M ./examples/forms.lisp +6 M ./src/components/form.lisp -26 +73 M ./src/packages.lisp -1 +7 Sun Feb 19 15:43:08 CST 2006 Marco Baringer * Renamed formx.lisp to form.lisp ./src/components/formx.lisp -> ./src/components/form.lisp M ./ucw.asd -2 +2 Sun Feb 19 15:33:19 CST 2006 Marco Baringer * Removed presentation and interface-element stuff. This code, while very cool, belongs in a seperate library and not inside ucw inself. The wall-time stuff has been dropped as well. The code is now located in the ucw-presentations library located at: http://common-lisp.net/project/ucw/repos/ucw-presentations M ./examples/examples.lisp -2 R ./examples/presentations.lisp R ./src/components/aux-slots-mixin.lisp M ./src/components/form.lisp -909 R ./src/components/ie.lisp R ./src/components/indirect-value-class.lisp R ./src/components/presentations.lisp M ./src/components/range-set.lisp -228 R ./src/components/search-criteria.lisp R ./src/components/time-element.lisp M ./src/components/user-login.lisp -23 +20 M ./src/packages.lisp -48 +1 R ./src/wall-time.lisp M ./ucw.asd -12 +2 Sun Feb 19 15:31:25 CST 2006 Marco Baringer * Deal with logging an action call when SELF is NIL. (Reported by: Aleksandar Bakic ) M ./src/rerl/standard-action.lisp -2 +4 Sun Feb 19 14:19:53 CST 2006 Marco Baringer * Run javascript form checks on keyup, not onchange (onkeyup gives much more immediate feedback) M ./src/components/formx.lisp -1 +1 Sun Feb 19 13:13:45 CST 2006 Marco Baringer * Typo in print-object method M ./src/components/formx.lisp -1 +1 Sun Feb 19 13:13:01 CST 2006 Marco Baringer * Added missing declare ignore declaration M ./src/components/secure-application.lisp -1 +1 Sat Feb 18 12:40:11 CST 2006 Marco Baringer * Added new form library and reworked examples to use it The new form library (temporarily called formx) is much much simpler than the presentation stuff we currently have. This should make it easer to use and customize, while it may do a lot less it no longer imposes an entire framevork on every form tag. M ./examples/examples.lisp -7 +5 M ./examples/forms.lisp -239 +108 M ./src/admin/admin.lisp -17 +19 A ./src/components/formx.lisp M ./src/packages.lisp +21 M ./ucw.asd +1 A ./wwwroot/dojo.js M ./wwwroot/ucw/admin/admin-repl.tal -3 +3 Sat Feb 18 09:27:33 CST 2006 Marco Baringer * Added :script type to window-component's javascript slot. This now option does what :js said it did (but didn't acutally do). :js now mentions that its value will be passed to js:js* and then to <:script. M ./src/components/window.lisp -1 +4 An updated tarball of ucw_dev's source can be downloaded here: http://common-lisp.net/project/ucw/tarballs/ucw_dev-20060219.tar.gz Darcsweb URL: http://uncommon-web.com/darcsweb/darcsweb.cgi?r=ucw_dev;a=summary From cjstuij at gmail.com Mon Feb 20 09:42:11 2006 From: cjstuij at gmail.com (Ties Stuij) Date: Mon, 20 Feb 2006 10:42:11 +0100 Subject: [Bese-devel] some errors with ucw_dev Message-ID: he, caught some errors with the latest ucw_dev cmucl won't compile the new form.lisp file: Error in FDEFINITION: the function IT.BESE.UCW:VALUE is undefined. with sbcl everything loads fine but when i click a link on the example page the logfile outputs: (+INFO+ 3349415703 IT.BESE.UCW::UCW-LOGGER "CALL'ing to /# ") (+ERROR+ 3349415707 IT.BESE.UCW::UCW-LOGGER "Error # while serving action.") (+ERROR+ 3349415707 IT.BESE.UCW::UCW-LOGGER "Aborting action.") hope the info helps in some way, Ties From mb at bese.it Mon Feb 20 15:20:01 2006 From: mb at bese.it (Marco Baringer) Date: Mon, 20 Feb 2006 16:20:01 +0100 Subject: [Bese-devel] Re: some errors with ucw_dev In-Reply-To: References: Message-ID: Ties Stuij wrote: > he, caught some errors with the latest ucw_dev do you have the patch named 'Instead of checking whether SELF is NIL we moved the logging statement to within the let form, where we're sure it can't be NIL' ? this should be the lastest patch in ucw_dev -- -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 cjstuij at gmail.com Mon Feb 20 11:35:26 2006 From: cjstuij at gmail.com (Ties Stuij) Date: Mon, 20 Feb 2006 12:35:26 +0100 Subject: [Bese-devel] Re: some errors with ucw_dev In-Reply-To: References: Message-ID: ok i'm trying to keep up with marco's patches here. the sbcl error from my first post was fixed while i was muddling with the error. The Araneida error from the second post is unrelated though just as the cmucl error. Ties From henrik at evahjelte.com Mon Feb 20 08:26:58 2006 From: henrik at evahjelte.com (henrik hjelte) Date: Mon, 20 Feb 2006 09:26:58 +0100 Subject: [Bese-devel] recent write-as-html patch In-Reply-To: <20060219212146.78984.qmail@web34611.mail.mud.yahoo.com> References: <20060219212146.78984.qmail@web34611.mail.mud.yahoo.com> Message-ID: <1140424018.28912.66.camel@localhost.localdomain> I've rolled back this patch. I'll look deeper into why I had encoding problems in the first place. > The first reason is that, when using utf-8, some non-ascii characters get > escaped and some not (not sure why, based on the code, but it appeared so). Could it be that some characters are written <:as-html and some are written <:as-is ? /Henrik Hjelte > The > second is that, at least in Opera 9, combo boxes do not parse escaped chars and > they appear as if they were, e.g., cdata attributes. From cjstuij at gmail.com Mon Feb 20 10:23:29 2006 From: cjstuij at gmail.com (Ties Stuij) Date: Mon, 20 Feb 2006 11:23:29 +0100 Subject: [Bese-devel] Re: some errors with ucw_dev In-Reply-To: References: Message-ID: btw, araneida is a bit more verbose than httpd concerning the sbcl error: Caught error: The function IT.BESE.UCW::ENCODE-STRING is undefined. 0: (BACKTRACE 15 #) 1: (ARANEIDA::HANDLER-DEBUGGER-HOOK # #) 2: (INVOKE-DEBUGGER #) 3: (ERROR UNDEFINED-FUNCTION) Ties From mb at bese.it Mon Feb 20 15:40:23 2006 From: mb at bese.it (Marco Baringer) Date: Mon, 20 Feb 2006 16:40:23 +0100 Subject: [Bese-devel] Re: some errors with ucw_dev In-Reply-To: References: Message-ID: Ties Stuij wrote: > ok i'm trying to keep up with marco's patches here. the sbcl error > from my first post was fixed while i was muddling with the error. The > Araneida error from the second post is unrelated though just as the > cmucl error. what araneida error? -- -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 mbaringer at common-lisp.net Tue Feb 21 06:00:05 2006 From: mbaringer at common-lisp.net (Marco Baringer) Date: Tue, 21 Feb 2006 00:00:05 -0600 (CST) Subject: [Bese-devel] New patches to ucw_dev: 20-Feb-2006 Message-ID: <20060221060005.A9DCA2A024@common-lisp.net> Mon Feb 20 11:04:57 CST 2006 Marco Baringer * Don't attempt to parse the request's body if the content length is 0. M ./src/backend/common.lisp -13 +14 Mon Feb 20 11:02:27 CST 2006 Marco Baringer * Added ignore declaration M ./src/backend/araneida.lisp +1 Mon Feb 20 11:01:04 CST 2006 Marco Baringer * Fix araneida backend (it hasn't been kept up-to-date with the latest backend changes) This consisted of changing the call in araneida.lisp and, to make things esaier, changing parse-request-body's body api (so we needed to change the httpd backend as well). M ./src/backend/araneida.lisp -8 +24 M ./src/backend/common.lisp -16 +14 M ./src/backend/httpd.lisp -1 +6 Mon Feb 20 11:00:26 CST 2006 Marco Baringer * Notes and download locations regarding ucw's dependencies were waaaaay out of date M ./README -9 +27 Mon Feb 20 02:59:47 CST 2006 Marco Baringer * Instead of checking whether SELF is NIL we moved the logging statement to within the let form, where we're sure it can't be NIL M ./src/rerl/standard-action.lisp -12 +9 Mon Feb 20 02:59:16 CST 2006 Marco Baringer * Define (answer-without-caller* null standard-component t) method answer-without-caller* added the source argument, however this argument may be null in some cases. when there was only answer-without-caller the "null-caller" case was taken care of with an if form in the method, so we needed to drop the if form and add this second method specialized on null. M ./src/rerl/standard-component/control-flow.lisp -8 +7 An updated tarball of ucw_dev's source can be downloaded here: http://common-lisp.net/project/ucw/tarballs/ucw_dev-20060220.tar.gz Darcsweb URL: http://uncommon-web.com/darcsweb/darcsweb.cgi?r=ucw_dev;a=summary From mbaringer at common-lisp.net Tue Feb 21 06:00:11 2006 From: mbaringer at common-lisp.net (Marco Baringer) Date: Tue, 21 Feb 2006 00:00:11 -0600 (CST) Subject: [Bese-devel] New patches to arnesi_dev: 20-Feb-2006 Message-ID: <20060221060011.01FFE190EB@common-lisp.net> UNDO: escape html unicode characters Not all unicode characters fit the latin-1 encoding, escaping them helps out. M ./src/http.lisp -6 Wed Feb 15 08:15:26 CST 2006 henrik.hjelte at poboxes.com An updated tarball of arnesi_dev's source can be downloaded here: http://common-lisp.net/project/bese/tarballs/arnesi_dev-20060220.tar.gz Darcsweb URL: http://uncommon-web.com/darcsweb/darcsweb.cgi?r=arnesi_dev;a=summary From erick at fsl.org.mx Mon Feb 20 22:52:17 2006 From: erick at fsl.org.mx (Erick Ivaan Lopez Carreon) Date: Mon, 20 Feb 2006 16:52:17 -0600 Subject: [Bese-devel] There is no class named IT.BESE.UCW::BRIEF-STREAM-LOG-APPENDER error Message-ID: <1140475937.3882.10.camel@localhost.localdomain> Hello: With the newest darcs ucw_get when i try to start ucw i get: There is no class named IT.BESE.UCW::BRIEF-STREAM-LOG-APPENDER. [Condition of type SIMPLE-ERROR] I do: grep -rne 'brief-stream-log-appender' * And can't find the defclass of BRIEF-STREAM-LOG-APPENDER. Only the note: _darcs/inventory:978:[the class stream-log-appender is no longer instantiable, use brief-stream-log-appender instead. And some make instance like this: src/loggers.lisp:9: :appender (make-instance 'brief-stream-log-appender :stream t)) src/loggers.lisp:29: :appender (make-instance 'brief-stream-log-appender :stream t)) src/control.lisp:59: (console-appender (make-instance 'brief-stream-log-appender And in logs: logs/ucw.dribble:139: There is no class named BRIEF-STREAM-LOG-APPENDER. logs/ucw.dribble:241:95: (SB-PCL::FIND-CLASS-FROM-CELL IT.BESE.UCW::BRIEF-STREAM-LOG-APPENDER NIL T) What i am doing wrong? Thanks in advance. -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part URL: From mb at bese.it Tue Feb 21 06:47:04 2006 From: mb at bese.it (Marco Baringer) Date: Tue, 21 Feb 2006 07:47:04 +0100 Subject: [Bese-devel] Re: There is no class named IT.BESE.UCW::BRIEF-STREAM-LOG-APPENDER error In-Reply-To: <1140475937.3882.10.camel@localhost.localdomain> References: <1140475937.3882.10.camel@localhost.localdomain> Message-ID: Erick Ivaan Lopez Carreon wrote: > Hello: > > With the newest darcs ucw_get when i try to start ucw i get: > > There is no class named IT.BESE.UCW::BRIEF-STREAM-LOG-APPENDER. > [Condition of type SIMPLE-ERROR] you're missing some patches from arnesi, try cd arnesi_dev; darcs pull; -- -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 erick at cibercalli.com Tue Feb 21 17:02:19 2006 From: erick at cibercalli.com (Erick Ivaan Lopez Carreon) Date: Tue, 21 Feb 2006 11:02:19 -0600 Subject: [Bese-devel] Re: There is no class named IT.BESE.UCW::BRIEF-STREAM-LOG-APPENDER error In-Reply-To: References: <1140475937.3882.10.camel@localhost.localdomain> Message-ID: <1140541340.3948.3.camel@localhost.localdomain> On Tue, 2006-02-21 at 07:47 +0100, Marco Baringer wrote: > Erick Ivaan Lopez Carreon wrote: > > Hello: > > > > With the newest darcs ucw_get when i try to start ucw i get: > > > > There is no class named IT.BESE.UCW::BRIEF-STREAM-LOG-APPENDER. > > [Condition of type SIMPLE-ERROR] > > you're missing some patches from arnesi, try cd arnesi_dev; darcs pull; > Thank you That corrected the problem Now it works ok. BTW i have to install cl-split-sequence too. Greetings. -- Erick Ivaan Lopez Carreon "Don't worry about what anybody else is going to do. The best way to predict the future is to invent it." "No te preocupes acerca de lo que alguien mas vaya a hacer. La mejor manera de predecir el futuro es inventarlo." - Alan Kay From attila.lendvai at gmail.com Wed Feb 22 00:02:13 2006 From: attila.lendvai at gmail.com (Attila Lendvai) Date: Wed, 22 Feb 2006 01:02:13 +0100 Subject: [Bese-devel] actions and broswer refresh Message-ID: hi! recently i've discovered that if i render an action with action-href, press the link, and then refresh the browser, then the action is triggered again. is this the expected behviour? i've quickly wrapped a triggered closure flag in make-new-action and it solves this but this is not The Right Way (tm). then i tried playing with the action hashtable with less success. i think that the action should be unregistered once it was triggered, but i may miss some details here... any opinions? Marco? - attila (alias 101 on irc &no 'its not lisp code :) From drewc at tech.coop Wed Feb 22 01:17:54 2006 From: drewc at tech.coop (Drew Crampsie) Date: Tue, 21 Feb 2006 17:17:54 -0800 Subject: [Bese-devel] actions and broswer refresh In-Reply-To: References: Message-ID: <43FBBBC2.2090601@tech.coop> Attila Lendvai wrote: >hi! > >recently i've discovered that if i render an action with action-href, >press the link, and then refresh the browser, then the action is >triggered again. > >is this the expected behviour? > of course it is! :) imagine (i've quickly wrapped a triggered >closure flag in make-new-action and it solves this but this is not The >Right Way (tm). then i tried playing with the action hashtable with >less success. > > try (defaction foo :isolate ....), which may or may not still work (has anybody tried this lately?). If that doesn't work for you, mail me and i'll fix up the memoizing code. >i think that the action should be unregistered once it was triggered, >but i may miss some details here... > > One of the great things about UCW is that it supports the back button, session clones, and other webby features. Unregistering an action breaks this, and would break user expectations very quickly. imaging a page of search results ... i click a link in a new window, then close that window .. oops .. i want to view that link again... so i click it, trigger the unknown action restart, which puts me right back at the entry point, and i can't ever see those results again. the :isolate code ensures the the body of an action is only executed once, but still returns the value when the action in invoked again. I believe this is the 'correct' behavior. (assuming it still works). Is this sufficient for your needs? drewc >any opinions? Marco? > >- attila > >(alias 101 on irc &no 'its not lisp code :) >_______________________________________________ >bese-devel mailing list >bese-devel at common-lisp.net >http://common-lisp.net/cgi-bin/mailman/listinfo/bese-devel > > From mbaringer at common-lisp.net Wed Feb 22 06:00:03 2006 From: mbaringer at common-lisp.net (Marco Baringer) Date: Wed, 22 Feb 2006 00:00:03 -0600 (CST) Subject: [Bese-devel] New patches to parenscript: 21-Feb-2006 Message-ID: <20060222060003.124985101A@common-lisp.net> Thu Feb 16 02:42:59 CST 2006 Luca Capello * remove docs/images and relative references in tutorial.lisp R ./docs/images/ R ./docs/images/slideshow.png R ./docs/images/tutorial1-1.png R ./docs/images/tutorial1-2.png M ./docs/tutorial.lisp -6 An updated tarball of parenscript's source can be downloaded here: http://common-lisp.net/project/ucw/tarballs/parenscript-20060221.tar.gz Darcsweb URL: http://uncommon-web.com/darcsweb/darcsweb.cgi?r=parenscript;a=summary From attila.lendvai at gmail.com Wed Feb 22 23:12:26 2006 From: attila.lendvai at gmail.com (Attila Lendvai) Date: Thu, 23 Feb 2006 00:12:26 +0100 Subject: [Bese-devel] actions and broswer refresh In-Reply-To: <43FBBBC2.2090601@tech.coop> References: <43FBBBC2.2090601@tech.coop> Message-ID: > of course it is! :) imagine ( ...). click on it, now hit 'back', and then click on the link again. > You'd expect the time to update, right? i would. or a page with a > meta-refresh that shows the 'current' news items.... i felt something is wrong with my expectations... :) thanks for enlightening me! > try (defaction foo :isolate ....), which may or may not still work (has > anybody tried this lately?). If that doesn't work for you, mail me and > i'll fix up the memoizing code. that seems to be exactly what i need, but it doesnt seem to work. the problem is probably with this: (PROGN (IT.BESE.UCW::%DEFACTION INVALIDATE-IMAGE-G6971 ((FOO FOO)) (LOG.DEBUG "Invalidating image") (SETF (VALIDP (SLOT-VALUE SELF 'IMAGE)) FALSE)) (IT.BESE.UCW::%DEFACTION INVALIDATE-IMAGE ((FOO FOO)) (IT.BESE.UCW::RUN-ISOLATED FOO #'INVALIDATE-IMAGE-G6971 FOO))) this is the macroexpansion of a defaction :isolate, and the symptom is: The function T is undefined. coming from: 9: (SB-KERNEL:%COERCE-CALLABLE-TO-FUN T) 10: ((SB-PCL::FAST-METHOD IT.BESE.UCW::RUN-ISOLATED (IT.BESE.UCW:STANDARD-COMPONENT T)) # # # T (#)) 11: ((LAMBDA (IT.BESE.ARNESI::ARGUMENTS)) (#1=# T #1#)) for my naiive eyes it seems like the arnesi /cc code has some problem with #'invalidate-image. after walk-form it properly turns into a (function invalidate-image...) call: SOURCE = (IT.BESE.UCW::RUN-ISOLATED FOO (FUNCTION INVALIDATE-IMAGE-G6971) FOO) but when it comes to execution the (function ...) call turns into a T. but this all is wild theory... unfortunately i couldn't find any example of :isolate to check. > the :isolate code ensures the the body of an action is only executed > once, but still returns the value when the action in invoked again. I > believe this is the 'correct' behavior. (assuming it still works). Is > this sufficient for your needs? sure! and thanks a lot for the clarification! - attila (alias 101 on irc &no 'its not lisp code :) From evrim at core.gen.tr Thu Feb 23 14:07:43 2006 From: evrim at core.gen.tr (Evrim ULU) Date: Thu, 23 Feb 2006 16:07:43 +0200 Subject: [Bese-devel] dojo+ucw Message-ID: <43FDC1AF.3090206@core.gen.tr> Hi, Could somebody summarize what is the current situation of dojo integration? Is there an official way to integrate dojo with ucw? Thnx. From mb at bese.it Thu Feb 23 15:07:33 2006 From: mb at bese.it (Marco Baringer) Date: Thu, 23 Feb 2006 16:07:33 +0100 Subject: [Bese-devel] Re: dojo+ucw In-Reply-To: <43FDC1AF.3090206@core.gen.tr> References: <43FDC1AF.3090206@core.gen.tr> Message-ID: Evrim ULU wrote: > Hi, > > Could somebody summarize what is the current situation of dojo > integration? Is there an official way to integrate dojo with ucw? "integration" is a big word. currently the only references to dojo is this in src/components/form.lisp: (defmethod render :after ((field generic-html-input)) (when (validators field) ( References: <43FDC1AF.3090206@core.gen.tr> Message-ID: <43FDD00E.6080206@core.gen.tr> Marco Baringer wrote: >"integration" is a big word. currently the only references to dojo is >this in src/components/form.lisp: > > Last night, we discussed our tree navigation problem with Aycan. We are needing a dragndroppable tree and it seems dojo has it (EditorTree). We know that ucw is lacking ajax functionality and Aycan told me that we can use dojo namespace with neither tal templates nor parenscript. So, we've decided to post this message in order ucw community to decide the way to integrate dojo into ucw. I know that Drew has penetrated the problem before but not released yet, and i think he is needing a little bit help. In addition, we have examined gmail's ajax implementation and it seems they're building their UI on the client via javascript and render only parameters that is specific to user and page. This is better since data flow is low and server load is also decreased. Comments on this would be great:) Marco, if you can summarize the road-map to dojo integration, we would be glad. I think dojo integration attracts enough attention and we have enough people to get around this problem with your guidance. Thnx. Evrim. From henrik at evahjelte.com Thu Feb 23 16:56:45 2006 From: henrik at evahjelte.com (henrik hjelte) Date: Thu, 23 Feb 2006 17:56:45 +0100 Subject: [Bese-devel] dojo+ucw In-Reply-To: <43FDC1AF.3090206@core.gen.tr> References: <43FDC1AF.3090206@core.gen.tr> Message-ID: <1140713805.9140.153.camel@localhost.localdomain> On tor, 2006-02-23 at 16:07 +0200, Evrim ULU wrote: > Hi, > > Could somebody summarize what is the current situation of dojo > integration? Is there an official way to integrate dojo with ucw? At the moment I think there are several people working with dojo but not much collaboration. But it would be nice if we could discuss possible ways to share knowledge and code, and the relation between dojo and ucw. Here are my thoughts: Dojo is a javascript toolkit (or javascript library if you want) with several aspects. * The dojo event system , now in ucw_dev, which Marco mentioned. * The dojo io system, a wrapper round XmlHttpRequest for ajax-style calls. Several examples have been posted to this list on how to do this, but there is no "official" way. Dojo io could be integrated with UCW if you want to make components with javascript client code. * The dojo widgets. I use them and like them, but not everyone will. So I don't think they should be a required part of UCW. And the dojo widgets are not exactly stable and well-documented right now, and having ucw depend on the dojo widgets would be a possible pain for both beginners and experienced lispers starting out with ucw. I would suggest this: Have ucw integrated with a small and fast dojo build, configured for what is needed in the form of events and io. Make a separate project ucw-dojo for those of us that are interested in more usage of dojo. This could be either in a sub-directory of the ucw project, or as a separate project under bese or common-lisp.net. This mailing list could maybe be used, or is it better with a new one? What do people and especially Marco think? > Last night, we discussed our tree navigation problem with Aycan. We are > needing a dragndroppable tree and it seems dojo has it (EditorTree). > > We know that ucw is lacking ajax functionality and Aycan told me that we > can use dojo namespace with neither tal templates nor parenscript. Don't be sad, I currently have an EditorTree created in UCW with drag-and-drop and callbacks. When I made this I did a demo of how to make an EditorTree in ucw, so I have some code to start this project with. I have some macros to define dojo widgets in yaclml-style which I recently improved. To avoid hand-coding dojo properties in the tag definitions I also started to make a script that would parses the dojo sources to extract all properties of the widgets. But then I found out that the dojo project is making a similar parser in PHP!, so I am kind of waiting for theirs to improve. And I have made a JSON parser/generator that comes in handy for dojo work. darcs get http://common-lisp.net/project/cl-json/darcs/cl-json common-lisp.net is going down soon, but I can clean up my code a bit and then put it somewhere, depending on what we decide. /Henrik Hjelte From mb at bese.it Thu Feb 23 19:55:55 2006 From: mb at bese.it (Marco Baringer) Date: Thu, 23 Feb 2006 20:55:55 +0100 Subject: [Bese-devel] Re: dojo+ucw In-Reply-To: <43FDD00E.6080206@core.gen.tr> References: <43FDC1AF.3090206@core.gen.tr> <43FDD00E.6080206@core.gen.tr> Message-ID: Evrim ULU wrote: > We know that ucw is lacking ajax functionality and Aycan told me that we > can use dojo namespace with neither tal templates nor parenscript. So, > we've decided to post this message in order ucw community to decide the > way to integrate dojo into ucw. you can't, atm, use dojo attributes with TAL, but why can't you use parenscript? (i'm currently using dojo purely through javascript). > I know that Drew has penetrated the problem before but not released yet, > and i think he is needing a little bit help. i think drew's using just javascript, but maybe he'll chime in and speak for himself. > In addition, we have examined gmail's ajax implementation and it seems > they're building their UI on the client via javascript and render only > parameters that is specific to user and page. This is better since data > flow is low and server load is also decreased. Comments on this would be > great:) sound's like a great idea :) > Marco, if you can summarize the road-map to dojo integration, we would > be glad. I think dojo integration attracts enough attention and we have > enough people to get around this problem with your guidance. there is no road map. i'd be happy to provide support/code wherever you think it'd be usefull but at the moment i don't have any plans for exlpclit (or official) ucw support for dojo. -- -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 attila.lendvai at gmail.com Fri Feb 24 00:32:14 2006 From: attila.lendvai at gmail.com (Attila Lendvai) Date: Fri, 24 Feb 2006 01:32:14 +0100 Subject: [Bese-devel] defaction :isolate problem (followup to actions and browser refresh) Message-ID: i'm back with a little more info. i've spent some time trying to debug it myself, but no luck yet. i've got this action: (defaction invalidate-image :isolate ((foo foo)) (log.debug "Invalidating image") (setf (validp (slot-value self 'image)) false)) it macroexpands to this: (PROGN (IT.BESE.UCW::%DEFACTION INVALIDATE-IMAGE-G6947 ((FOO FOO)) (LOG.DEBUG "Invalidating image") (SETF (VALIDP (SLOT-VALUE SELF 'IMAGE)) FALSE)) (IT.BESE.UCW::%DEFACTION INVALIDATE-IMAGE ((FOO FOO)) (IT.BESE.UCW::RUN-ISOLATED FOO #'INVALIDATE-IMAGE-G6947 FOO))) yet, if i press C-c-c in slime, i get a warning like this: STYLE-WARNING: redefining INVALIDATE-IMAGE-G0 in DEFGENERIC STYLE-WARNING: redefining INVALIDATE-IMAGE-G0 :PRIMARY (FOO) in DEFMETHOD STYLE-WARNING: redefining INVALIDATE-IMAGE in DEFGENERIC STYLE-WARNING: redefining INVALIDATE-IMAGE :PRIMARY (FOO) in DEFMETHOD notice the method name, i have no idea what's going on. if i turn on call/cc trace i can see that arnesi is trying to look up the *-G0 names: Evaluating #'DWIM-PRESENTATION-TEST::INVALIDATE-IMAGE-G0. Got T Evaluating DWIM-PRESENTATION-TEST::FOO. Got # Calling function IT.BESE.UCW::RUN-ISOLATED with arguments (# T #) in the first line, the function lookup, silently turns into a T?! and then i naturally get the error: "The function T is undefined." DWIM-TEST> (apropos "invalidate-image") DWIM-PRESENTATION-TEST::INVALIDATE-IMAGE-G6942 DWIM-PRESENTATION-TEST::INVALIDATE-IMAGE-G6940 DWIM-PRESENTATION-TEST::INVALIDATE-IMAGE-G6944 DWIM-PRESENTATION-TEST::INVALIDATE-IMAGE-G6937 DWIM-PRESENTATION-TEST::INVALIDATE-IMAGE-G6946 DWIM-PRESENTATION-TEST::INVALIDATE-IMAGE-G6943 DWIM-PRESENTATION-TEST::INVALIDATE-IMAGE-G6936 DWIM-PRESENTATION-TEST::INVALIDATE-IMAGE-G6947 DWIM-PRESENTATION-TEST::INVALIDATE-IMAGE-G0 (fbound) DWIM-PRESENTATION-TEST::INVALIDATE-IMAGE-G6939 DWIM-PRESENTATION-TEST::INVALIDATE-IMAGE-G6945 DWIM-PRESENTATION-TEST::INVALIDATE-IMAGE (fbound) ; No value btw, is it necessary to generate a function definition at each macroexpand? couldn't the :isolate code be wrapping the action body inside the /cc code? but this is only a side-track that i would play with if it were working. i hope someone with more insight can spot the bug from these... or am i misusing something? thanks for any help, - attila (alias 101 on irc &no 'its not lisp code :) -------------- next part -------------- An HTML attachment was scrubbed... URL: From aycan.irican at core.gen.tr Fri Feb 24 10:49:40 2006 From: aycan.irican at core.gen.tr (Aycan iRiCAN) Date: Fri, 24 Feb 2006 12:49:40 +0200 Subject: [Bese-devel] Rendering a component to a string Message-ID: <87mzgh58vv.fsf@core.gen.tr> Hi, Is it possible to render a form component to a string? I want to send the filled form via email to someone. I tried to change the stream with with-yaclml-stream but can't success, abused a bit. Best Regards. -- Aycan iRiCAN C0R3 Computer Security Group http://www.core.gen.tr -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 188 bytes Desc: not available URL: From erick at cibercalli.com Fri Feb 24 16:40:45 2006 From: erick at cibercalli.com (Erick Ivaan Lopez Carreon) Date: Fri, 24 Feb 2006 10:40:45 -0600 Subject: [Bese-devel] Re: Help installing UCW [SOLVED] In-Reply-To: <1139019882.3897.8.camel@localhost.localdomain> References: <1138827161.3941.41.camel@localhost.localdomain> <87oe1q5bit.fsf@gismo.pca.it> <1138903939.3942.37.camel@localhost.localdomain> <87wtgcizku.fsf@gismo.pca.it> <1139019882.3897.8.camel@localhost.localdomain> Message-ID: <1140799245.3993.9.camel@localhost.localdomain> To do the follow up of my troubles installing UCW for firts time, i manage to get it working :) An here is the small guide resulting of my UCW install adventures: (English) http://www.cibercalli.com/index.pl/lispf/uncommon-web-installation (Spanish) http://www.cibercalli.com/index.pl/lispf/instalacin-de-uncommon-web Hope it helps to some one else newbie. I appreciate any comment's about them. Thank you. -- Erick Ivaan Lopez Carreon "All men dream: but not equally. Those who dream by night in the dusty recesses of their minds wake in the day to find that it was vanity: but the dreamers of the day are dangerous men, for they may act their dreams with open eyes, to make it possible." -T.E. Lawrence From mb at bese.it Fri Feb 24 19:22:08 2006 From: mb at bese.it (Marco Baringer) Date: Fri, 24 Feb 2006 20:22:08 +0100 Subject: [Bese-devel] Re: Help installing UCW [SOLVED] In-Reply-To: <1140799245.3993.9.camel@localhost.localdomain> References: <1138827161.3941.41.camel@localhost.localdomain> <87oe1q5bit.fsf@gismo.pca.it> <1138903939.3942.37.camel@localhost.localdomain> <87wtgcizku.fsf@gismo.pca.it> <1139019882.3897.8.camel@localhost.localdomain> <1140799245.3993.9.camel@localhost.localdomain> Message-ID: Erick Ivaan Lopez Carreon wrote: > To do the follow up of my troubles installing UCW for firts time, i > manage to get it working :) > > > An here is the small guide resulting of my UCW install adventures: > > (English) > http://www.cibercalli.com/index.pl/lispf/uncommon-web-installation > > (Spanish) > http://www.cibercalli.com/index.pl/lispf/instalacin-de-uncommon-web cool. mind if i link to these from ucw's project page? -- -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 Feb 24 19:21:27 2006 From: mb at bese.it (Marco Baringer) Date: Fri, 24 Feb 2006 20:21:27 +0100 Subject: [Bese-devel] Re: Rendering a component to a string In-Reply-To: <87mzgh58vv.fsf@core.gen.tr> References: <87mzgh58vv.fsf@core.gen.tr> Message-ID: Aycan iRiCAN wrote: > Hi, > > Is it possible to render a form component to a string? I want to send > the filled form via email to someone. the render :wrapping method on standard-component bind yaclml-stream to the response's html-stream. try messing with html-stream before calling render, something like this: (let ((old-stream (html-stream (context.request *context*)))) (with-output-to-string (render-output) (setf (html-stream (context.request *context*)) render-output) (render FORM-COMPONENT) (setf (html-stream (context.request *context*)) old-stream))) (totally untested) the more i think about it the stupider it seems to rebind yaclml-stream in each and every call to render, moving this someplace else (like the "top-level" call to render) would be a bit cleaner and make what you're trying to do trivial. 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 erick at cibercalli.com Fri Feb 24 20:13:15 2006 From: erick at cibercalli.com (Erick Ivaan Lopez Carreon) Date: Fri, 24 Feb 2006 14:13:15 -0600 Subject: [Bese-devel] Re: Help installing UCW [SOLVED] In-Reply-To: References: <1138827161.3941.41.camel@localhost.localdomain> <87oe1q5bit.fsf@gismo.pca.it> <1138903939.3942.37.camel@localhost.localdomain> <87wtgcizku.fsf@gismo.pca.it> <1139019882.3897.8.camel@localhost.localdomain> <1140799245.3993.9.camel@localhost.localdomain> Message-ID: <1140811995.3928.6.camel@localhost.localdomain> On Fri, 2006-02-24 at 20:22 +0100, Marco Baringer wrote: > Erick Ivaan Lopez Carreon wrote: > > To do the follow up of my troubles installing UCW for firts time, i > > manage to get it working :) > > > > > > An here is the small guide resulting of my UCW install adventures: > > > > (English) > > http://www.cibercalli.com/index.pl/lispf/uncommon-web-installation > > > > (Spanish) > > http://www.cibercalli.com/index.pl/lispf/instalacin-de-uncommon-web > > cool. mind if i link to these from ucw's project page? > Go ahead, include them :) If you want I can send to you the .html's Greetings. From mb at bese.it Sat Feb 25 01:10:00 2006 From: mb at bese.it (Marco Baringer) Date: Sat, 25 Feb 2006 02:10:00 +0100 Subject: [Fwd: Re: [Bese-devel] Re: dojo+ucw] Message-ID: <43FFAE68.8040007@bese.it> -------- Original Message -------- Subject: Re: [Bese-devel] Re: dojo+ucw Date: Sat, 25 Feb 2006 03:38:08 -0500 From: Drew Crampsie To: Marco Baringer References: <43FDC1AF.3090206 at core.gen.tr> <43FDD00E.6080206 at core.gen.tr> Marco Baringer wrote: > >you can't, atm, use dojo attributes with TAL, but why can't you use >parenscript? (i'm currently using dojo purely through javascript). >[snip] >i think drew's using just javascript, but maybe he'll chime in and speak >for himself. > > > Yeah, i loathe the idea of putting dojo tags in markup. What i'm doing in entirely within the context of LoL, which is so far gone from mainstream UCW i can't even use ( trying to do trivial. if you get the patch named 'Move the binding of yaclml-stream out of the main render :wrapping method and into standard-server's handle-request method' you will be able to successfully rebind yaclml-stream around calls to render and have the html code go where you want. 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 henrik at evahjelte.com Tue Feb 28 12:30:26 2006 From: henrik at evahjelte.com (Henrik Hjelte) Date: Tue, 28 Feb 2006 13:30:26 +0100 Subject: [Bese-devel] ucw-extras Message-ID: <1141129826.9559.61.camel@localhost.localdomain> I'm proposing a companion code repository for ucw, called ucw-extras. The description can be like below. If there are no objections I'll set it up on common-lisp.net soon. /Henrik Hjelte ucw-extras is a code repository related to Lisp based web-programming with an emphasis on UnCommonWeb. It is a place where you can share code, snippets, components, demos, documents and ideas that relates to UnCommonWeb but shouldn't be a part of it (yet!). This can be for several reasons. Maybe the code isn't of high enough quality, maybe it is not cross-platform, or maybe you are unsure if it fits. Then ucw-extras is the place. Maybe the code can evolve and be added to ucw later, or maybe it will grow into its own project. Or maybe it will be forgotten, only time will tell. All code and documents in ucw-extras are released under the revised BSD license (without the advertising clause). http://www.opensource.org/licenses/bsd-license.php How do I contribute? Subscribe to the mailing list. Send a darcs patch bundle to the mailing-list. If you want to have write access to the darcs repository, send a request to the mailing list. You don't have to be talented to be with the extras, you only need to like acting. From mb at bese.it Tue Feb 28 18:25:27 2006 From: mb at bese.it (Marco Baringer) Date: Tue, 28 Feb 2006 19:25:27 +0100 Subject: [Bese-devel] Re: ucw-extras References: <1141129826.9559.61.camel@localhost.localdomain> Message-ID: Henrik Hjelte writes: > I'm proposing a companion code repository for ucw, called ucw-extras. > The description can be like below. > If there are no objections I'll set it up on common-lisp.net soon. > > /Henrik Hjelte > > ucw-extras is a code repository related to Lisp based web-programming > with an emphasis on UnCommonWeb. It is a place where you can share code, > snippets, components, demos, documents and ideas that relates to > UnCommonWeb but shouldn't be a part of it (yet!). This can be for > several reasons. Maybe the code isn't of high enough quality, maybe it > is not cross-platform, or maybe you are unsure if it fits. Then > ucw-extras is the place. excellent idea! > Maybe the code can evolve and be added to ucw later, or maybe it will > grow into its own project. Or maybe it will be forgotten, only time will > tell. > > All code and documents in ucw-extras are released under the > revised BSD license (without the advertising clause). > http://www.opensource.org/licenses/bsd-license.php > > How do I contribute? > Subscribe to the mailing list. > Send a darcs patch bundle to the mailing-list. > If you want to have write access to the darcs repository, send a request > to the mailing list. i can setup another world writtable darcs repo on uncommon-web.com if you think it'd be a good idea (or even multiple world writable darcs repo: ucw-extras/forms, ucw-extras/docs, ucw-extras/presentations, etc). -- -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 dpatru at gmail.com Tue Feb 28 17:36:46 2006 From: dpatru at gmail.com (Daniel Patru) Date: Tue, 28 Feb 2006 12:36:46 -0500 Subject: [Bese-devel] accessing the url Message-ID: <483983b30602280936o954f4f1gce8c798ce9d452a3@mail.gmail.com> How can I access the URL of a request within a render method? I tried printing it out with: (<:p (ucw::query-path (ucw::context.request *context*))), but all I get are the paragraph tags. Thanks, Daniel -- "Work and play are used to describe the same thing under differing circumstance." - Mark Twain -------------- next part -------------- An HTML attachment was scrubbed... URL: From evrim at core.gen.tr Tue Feb 28 19:38:45 2006 From: evrim at core.gen.tr (Evrim ULU) Date: Tue, 28 Feb 2006 21:38:45 +0200 Subject: [Bese-devel] accessing the url In-Reply-To: <483983b30602280936o954f4f1gce8c798ce9d452a3@mail.gmail.com> References: <483983b30602280936o954f4f1gce8c798ce9d452a3@mail.gmail.com> Message-ID: <4404A6C5.6060001@core.gen.tr> Daniel Patru wrote: > How can I access the URL of a request within a render method? > I tried printing it out with: > (<:p (ucw::query-path (ucw::context.request *context*))), > but all I get are the paragraph tags. Some time ago, like other people, i've asked the same question to me, afterwards, i've realized that i also need to parse the url. below code may help. its ugly though. cya. evrim. (defentry-point "^(|[0-9]*.core)$" (:application core-app :class 'regexp-entry-point) () (let* ((uri (ucw::raw-uri (ucw::context.request *context*))) (seqs (split-sequence:split-sequence #\/ uri :remove-empty-subseqs t)) (current-entry-point (car (last seqs))) (endpos (search ".core" current-entry-point :from-end t)) (linkname (subseq current-entry-point 0 endpos)) (current-index (1- (parse-integer linkname :junk-allowed t))) (content-length (length (coretal.contents (core-application.coretal (ucw::context.application *context*)))))) (if (and (> current-index 0) (< current-index content-length)) (let* ((widgets (application-content-widgets)) (container (make-instance 'content-container-widget :components widgets))) (setf (container.current-component container) (nth current-index widgets)) (jump 'main-window :body container)) (call 'main-window)))) From mb at bese.it Tue Feb 28 20:51:58 2006 From: mb at bese.it (Marco Baringer) Date: Tue, 28 Feb 2006 21:51:58 +0100 Subject: [Bese-devel] Re: accessing the url References: <483983b30602280936o954f4f1gce8c798ce9d452a3@mail.gmail.com> Message-ID: "Daniel Patru" writes: > How can I access the URL of a request within a render method? > I tried printing it out with: > (<:p (ucw::query-path (ucw::context.request *context*))), > but all I get are the paragraph tags. yaclml tags do not print the results of forms in their bodies: (<:p (<:as-html (ucw::query-path (ucw::context.request *context*)))) ^^^^^^^^^^ ^ -- -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