From mb at bese.it Thu Dec 1 14:15:18 2005 From: mb at bese.it (Marco Baringer) Date: Thu, 01 Dec 2005 15:15:18 +0100 Subject: [Bese-devel] UCWInputCompleter.js patch In-Reply-To: <2f1136040511300642h1e27a761j178ddfdea6dfa1b1@mail.gmail.com> (Ruslan Abdulkhalikov's message of "Wed, 30 Nov 2005 20:42:41 +0600") References: <2f1136040511300642h1e27a761j178ddfdea6dfa1b1@mail.gmail.com> Message-ID: Ruslan Abdulkhalikov writes: > Here is a small patch which makes work text element with completion under IE. I > check it with FF, IE and Mozilla only under windows. you sent darcs' internal patch bundle, unfortunetly this isn't apply'able. you'll neeed to do darcs send -o file_name_goes_here and email that to me. -- -Marco Ring the bells that still can ring. Forget the perfect offering. There is a crack in everything. That's how the light gets in. -Leonard Cohen From mb at bese.it Thu Dec 1 18:48:30 2005 From: mb at bese.it (Marco Baringer) Date: Thu, 01 Dec 2005 19:48:30 +0100 Subject: [Bese-devel] ucw documentation effort References: Message-ID: Adam Jones writes: > Looking at the documentation provided from the source code I was > thinking that a decent place to start a reference would be to > restructure the current source documentation into a one page per > function/macro/class/(computational object just to have a generic term > for everything involved). From there the next step I see would be to > add descriptions for it and provide a facility for user comments. Yes, > this is almost exactly like the PHP documentation system, but that > works really well and I think it would be good here. allowing user comments will take a bit more work. however i did change qbook to output one html page per computational object (the latex output is unchanged), indexes (cross referencing is next on the todo list) and there's the infrastructre neccessary for having extra info extracted from defmethod, defgeneric, defWHATEVER forms. we now also look for and process docstrings (and have the neccosary code to extract docstrings from methods, classes, functions, etc.) the names of the pages for computational elements are strange, but they're chosen so that 1) they'll work on all file systems no matter what the symbol's name is and 2) they won't change unless the symbol's name changes (so book marks will live even when the docs are regenerated) see: http://uncommon-web.com/qbook/arnesi/ http://uncommon-web.com/qbook/qbook/ http://uncommon-web.com/qbook/yaclml/ (i'm still having some trouble building ucw's docs so those aren't available yet) comments welcome. (these are updated automatically from the darcs repos every night at midnight). -- -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 maciekp at japhy.fnord.org Thu Dec 1 19:44:00 2005 From: maciekp at japhy.fnord.org (Maciek Pasternacki) Date: Thu, 01 Dec 2005 20:44:00 +0100 Subject: [Bese-devel] Re: Araneida backends and regexp-entry-point References: <87veyd2chu.fsf@lizard.king> <20051129034206.46311.qmail@web34604.mail.mud.yahoo.com> <87r78z35xu.fsf@lizard.king> <5ok6eq5prf.fsf@nelja.ifi.uio.no> Message-ID: <87fypcy54v.fsf@lizard.king> On Prickle-Prickle, The Aftermath 42, 3171 YOLD, Asbj?rn Bj?rnstad wrote: >> I assume this list is the proper place to post patches to ucw -- or >> should I rather send them directly to Marco? > > There is a third alternative, ucw_public: > http://uncommon-web.com/darcsweb/darcsweb.cgi > > Marco monitors the darcs activity and imports changes to ucw_dev. Which way is the preferred one? I have some more patches now and will probably be sending them regularly, and I don't want to spam people's mailboxes. -- __ Maciek Pasternacki [ http://japhy.fnord.org/ ] `| _ |_\ / { ...Can't you understand that the way things were planned ,|{-}|}| }\/ it never worked out, so I just went crazy... } \/ |____/ ( Fish ) -><- From mb at bese.it Thu Dec 1 19:57:07 2005 From: mb at bese.it (Marco Baringer) Date: Thu, 01 Dec 2005 20:57:07 +0100 Subject: [Bese-devel] Re: Araneida backends and regexp-entry-point In-Reply-To: <87fypcy54v.fsf@lizard.king> (Maciek Pasternacki's message of "Thu, 01 Dec 2005 20:44:00 +0100") References: <87veyd2chu.fsf@lizard.king> <20051129034206.46311.qmail@web34604.mail.mud.yahoo.com> <87r78z35xu.fsf@lizard.king> <5ok6eq5prf.fsf@nelja.ifi.uio.no> <87fypcy54v.fsf@lizard.king> Message-ID: Maciek Pasternacki writes: > On Prickle-Prickle, The Aftermath 42, 3171 YOLD, Asbj?rn Bj?rnstad wrote: > >>> I assume this list is the proper place to post patches to ucw -- or >>> should I rather send them directly to Marco? >> >> There is a third alternative, ucw_public: >> http://uncommon-web.com/darcsweb/darcsweb.cgi >> >> Marco monitors the darcs activity and imports changes to ucw_dev. > > Which way is the preferred one? I have some more patches now and will > probably be sending them regularly, and I don't want to spam people's > mailboxes. then use ucw_public. i'm fairly busy lately (most of the recent qbook work has been done on a train between 6 and 7:30 in the morning :() so ucw_public is the fastest way to get your code out into the open. -- -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 maciekp at japhy.fnord.org Thu Dec 1 19:54:20 2005 From: maciekp at japhy.fnord.org (Maciek Pasternacki) Date: Thu, 01 Dec 2005 20:54:20 +0100 Subject: [Bese-devel] Re: ucw documentation effort References: Message-ID: <878xv4y4nn.fsf@lizard.king> On Pungenday, The Aftermath 21, 3171 YOLD, Adam Jones wrote: > Looking at the documentation provided from the source code I was > thinking that a decent place to start a reference would be to > restructure the current source documentation into a one page per > function/macro/class/(computational object just to have a generic term > for everything involved). From there the next step I see would be to > add descriptions for it and provide a facility for user comments. Yes, > this is almost exactly like the PHP documentation system, but that > works really well and I think it would be good here. Maybe some auto-docstring-to-wiki? By the way, I started documenting my way through UCW source (where to start, in which order to read files/directories and how is the code divided, how do pieces fit together etc). When it gets some shape, I'll drop a link. -- __ Maciek Pasternacki [ http://japhy.fnord.org/ ] `| _ |_\ / { ...Can't you understand that the way things were planned ,|{-}|}| }\/ it never worked out, so I just went crazy... } \/ |____/ ( Fish ) -><- From mb at bese.it Thu Dec 1 20:12:18 2005 From: mb at bese.it (Marco Baringer) Date: Thu, 01 Dec 2005 21:12:18 +0100 Subject: [Bese-devel] Re: ucw documentation effort In-Reply-To: <878xv4y4nn.fsf@lizard.king> (Maciek Pasternacki's message of "Thu, 01 Dec 2005 20:54:20 +0100") References: <878xv4y4nn.fsf@lizard.king> Message-ID: Maciek Pasternacki writes: > By the way, I started documenting my way through UCW source (where > to start, in which order to read files/directories and how is the > code divided, how do pieces fit together etc). When it gets some > shape, I'll drop a link. if there's an ordering which you find easier to understand than the one we currently uses i'd love to hear about it. -- -Marco Ring the bells that still can ring. Forget the perfect offering. There is a crack in everything. That's how the light gets in. -Leonard Cohen From mb at bese.it Thu Dec 1 20:23:56 2005 From: mb at bese.it (Marco Baringer) Date: Thu, 01 Dec 2005 21:23:56 +0100 Subject: [Bese-devel] Small form patch In-Reply-To: <17E10D66-2030-4E1A-BC7E-8BA5084B5A81@bjxrnstad.net> (=?iso-8859-1?Q?Asbj=F8rn_Bj=F8rnstad's?= message of "Mon, 28 Nov 2005 23:59:17 +0800") References: <17E10D66-2030-4E1A-BC7E-8BA5084B5A81@bjxrnstad.net> Message-ID: Asbj?rn Bj?rnstad writes: > (Any cron job coming soon, Marco? I'd add it to ucw_public, but darcs > fails) i'm not going to create a cronjob since conflicts need to be resolved by hand. doesn't 'darcs send -a' create a patch file with all the missing 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 Thu Dec 1 20:32:46 2005 From: mb at bese.it (Marco Baringer) Date: Thu, 01 Dec 2005 21:32:46 +0100 Subject: [Bese-devel] Re: ucw documentation effort In-Reply-To: (Marco Baringer's message of "Thu, 01 Dec 2005 21:12:18 +0100") References: <878xv4y4nn.fsf@lizard.king> Message-ID: "Marco Baringer" writes: > Maciek Pasternacki writes: > >> By the way, I started documenting my way through UCW source (where >> to start, in which order to read files/directories and how is the >> code divided, how do pieces fit together etc). When it gets some >> shape, I'll drop a link. > > if there's an ordering which you find easier to understand than the > one we currently uses i'd love to hear about it. the qbook'ified ucw source code is now available. http://uncommon-web.com/qbook/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 asbjxrn at bjxrnstad.net Fri Dec 2 12:49:36 2005 From: asbjxrn at bjxrnstad.net (=?iso-8859-1?q?Asbj=F8rn_Bj=F8rnstad?=) Date: 02 Dec 2005 13:49:36 +0100 Subject: [Bese-devel] Re: Small form patch References: <17E10D66-2030-4E1A-BC7E-8BA5084B5A81@bjxrnstad.net> Message-ID: <5o1x0vd5pb.fsf@kolme.ifi.uio.no> "Marco Baringer" writes: > Asbj?rn Bj?rnstad writes: > > > (Any cron job coming soon, Marco? I'd add it to ucw_public, but darcs > > fails) > > i'm not going to create a cronjob since conflicts need to be resolved > by hand. doesn't 'darcs send -a' create a patch file with all the > missing patches? Quite possible. Darcs is another piece of software I'm unfamiliar with. I was also a bit reluctant to add others patches to the repository. I'll try it if I have to next time. -- -asbjxrn From svg at surnet.ru Fri Dec 2 13:24:34 2005 From: svg at surnet.ru (Vladimir Sekissov) Date: Fri, 02 Dec 2005 18:24:34 +0500 (YEKT) Subject: [Bese-devel] [PATCH] wrapping-standard method combination In-Reply-To: References: <20051126.051010.191085822.svg@surnet.ru> Message-ID: <20051202.182434.51298581.svg@surnet.ru> Good day, mb> > Other things I can do with other methods but wrapping methods seems mb> > for me the only right place for initialization. mb> mb> then i think we wolud do better to _add_ something to wrapping mb> standard as opposed to changing the current evaluation order. mb> mb> if you can think of a name for methods which wrap around sub class mb> methods and are not (in any way) overridable What about :wraparound. mb> , i'll add it. Thank you, Marco. It'll be very useful addition. With such method combination I could write initialisation/finalisation code for method chains easily. Something like: (defmethod save-object :wraparound (obj &optional kind) (if kind (call-next-method) ;; initialize defaults (call-next-method obj (kind-from-obj-state obj))) ;; ok - all job done, nobody on the path, ;; do cleanup and logging (clear-changes obj) (notify-event-handler '(:changed ,obj))) Best Regards, Vladimir Sekissov From svg at surnet.ru Fri Dec 2 14:26:22 2005 From: svg at surnet.ru (Vladimir Sekissov) Date: Fri, 02 Dec 2005 19:26:22 +0500 (YEKT) Subject: [Bese-devel] Small form patch In-Reply-To: <17E10D66-2030-4E1A-BC7E-8BA5084B5A81@bjxrnstad.net> References: <17E10D66-2030-4E1A-BC7E-8BA5084B5A81@bjxrnstad.net> Message-ID: <20051202.192622.134135815.svg@surnet.ru> Good day, asbjxrn> It seemed to me that the condition strings were thrown away during asbjxrn> validation, if I'm wrong and there is a way of using them already asbjxrn> please disregard this patch. I supposed that error collection would be done with `status-bar' component or something similar to centrilize message/error rendering by simply overwriting `report-error' method: (defmethod report-error (component slot-name condition) (show-message (format-error-pretty component slot-name condition))) `show-message' is a `status-bar' method and sends message to it. `status-bar' shows collected during request processing messages and clears them after. Of couse it is the matter of taste and preferences. Best Regards, Vladimir Sekissov From ajones1 at gmail.com Fri Dec 2 16:31:57 2005 From: ajones1 at gmail.com (Adam Jones) Date: Fri, 2 Dec 2005 08:31:57 -0800 Subject: [Bese-devel] Re: ucw documentation effort In-Reply-To: <878xv4y4nn.fsf@lizard.king> References: <878xv4y4nn.fsf@lizard.king> Message-ID: On 12/1/05, Maciek Pasternacki wrote: > On Pungenday, The Aftermath 21, 3171 YOLD, Adam Jones wrote: > > > Looking at the documentation provided from the source code I was > > thinking that a decent place to start a reference would be to > > restructure the current source documentation into a one page per > > function/macro/class/(computational object just to have a generic term > > for everything involved). From there the next step I see would be to > > add descriptions for it and provide a facility for user comments. Yes, > > this is almost exactly like the PHP documentation system, but that > > works really well and I think it would be good here. > > Maybe some auto-docstring-to-wiki? That is pretty much what I was thinking. The problem there is versioning. If version X of ucw comes out which comments are valid? A good workaround for problem foo is awesome to have right there in the wiki, up until problem foo actually gets solved in the code, then it is just confusing. I think the answer would be to have people categorize things as general tips vs workarounds. That said then someone has to evaluate every workaround with a new version ... which feels like busywork. It would be neat to see some kind of capacity to link wiki comments to a bug database, allowing now-invalid comments to be marked so when a bug is fixed. Seems like something too big for this kind of project though. From a_bakic at yahoo.com Fri Dec 2 19:15:08 2005 From: a_bakic at yahoo.com (Aleksandar Bakic) Date: Fri, 2 Dec 2005 11:15:08 -0800 (PST) Subject: [Bese-devel] Re: Araneida backends and regexp-entry-point In-Reply-To: <87r78z35xu.fsf@lizard.king> Message-ID: <20051202191508.36371.qmail@web34607.mail.mud.yahoo.com> Hi, > OK, I attach changeset with this patch and also recoding strings > received from Araneida (Araneida handles all i/o as iso-8859-1, so > strings received as iso-8859-1 and then returned as Unicode were > messed-up). I tried your patch, but it didn't work for me. First of all, I had significantly modified araneida and rfc2388 to allow for uploading and downloading binary images. The only stuff that currently works for me is: 1. In araneida's compat-sbcl.lisp (defparameter *open-external-format-arguments* '(:external-format :iso-8859-1)) Adding :element-type (unsigned-byte 8) in here breaks a call to copy-stream in the static file handler (I don't know exactly why, probably due to the other patches mentioned above). 2. In the same file (defun listener-accept-stream (listener) (let ((socket (sb-bsd-sockets:socket-accept (http-listener-socket listener)))) (sb-bsd-sockets:socket-make-stream socket :element-type :default :name "socket" :input t :output t :buffering :full))) Using 'character for :element-type (and :external-format :iso-8859-1) breaks image uploading. 3. Your %recode... function breaks when I enter some Unicode characters in a form; the errors is something like "cannot encode in :latin1". I thought I should report all of this knowing that your setup is possibly different and things probably work for you. If you can upload and download binary images in addition to Unicode text, please send a complete solution (and I can send mine, as I already have off-the-list). I also noticed that new alan-araneida uses a different setup for sb-unicode (it seems that yours is based on it), but it does not seem to address images yet. Alex __________________________________________ Yahoo! DSL ? Something to write home about. Just $16.99/mo. or less. dsl.yahoo.com From a_bakic at yahoo.com Fri Dec 2 19:23:43 2005 From: a_bakic at yahoo.com (Aleksandar Bakic) Date: Fri, 2 Dec 2005 11:23:43 -0800 (PST) Subject: [Bese-devel] qescape Message-ID: <20051202192343.73072.qmail@web34614.mail.mud.yahoo.com> Hi, I noticed that I needed a function that escapes single and double quotes in cdata-based attributes. I could not find one with this functionality in arnesi/ucw/... sources after a brief look. So, here is one: (defun qescape (str) ;(declare (optimize (speed 3))) ;(declare ((or null simple-string) str)) (with-output-to-string (escaped) (loop for c across str do (case c (#\' (princ "'" escaped)) (#\" (princ """ escaped)) (t (write-char c escaped)))))) Alex __________________________________________ Yahoo! DSL ? Something to write home about. Just $16.99/mo. or less. dsl.yahoo.com From itoshkov at gmail.com Thu Dec 1 20:37:17 2005 From: itoshkov at gmail.com (Ivan Toshkov) Date: Thu, 1 Dec 2005 22:37:17 +0200 Subject: [Bese-devel] ucw documentation effort In-Reply-To: References: Message-ID: <7c23adaa0512011237i63fd6194jc877fb3702f9ba94@mail.gmail.com> On 12/1/05, Marco Baringer wrote: > > http://uncommon-web.com/qbook/arnesi/ The correct URL is http://uncommon-web.com/qbook/arnesi_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 > _______________________________________________ > bese-devel mailing list > bese-devel at common-lisp.net > http://common-lisp.net/cgi-bin/mailman/listinfo/bese-devel > -- All languages are equal, but Lisp is more equal than others. From a_bakic at yahoo.com Fri Dec 2 21:33:56 2005 From: a_bakic at yahoo.com (Aleksandar Bakic) Date: Fri, 2 Dec 2005 13:33:56 -0800 (PST) Subject: [Bese-devel] Re: Araneida backends and regexp-entry-point In-Reply-To: <20051202191508.36371.qmail@web34607.mail.mud.yahoo.com> Message-ID: <20051202213356.79886.qmail@web34602.mail.mud.yahoo.com> > 1. In araneida's compat-sbcl.lisp > > (defparameter *open-external-format-arguments* > '(:external-format :iso-8859-1)) > > Adding :element-type (unsigned-byte 8) in here breaks a call to copy-stream > in > the static file handler (I don't know exactly why, probably due to the other > patches mentioned above). A workaround for this is to disable the unless-subtypep assertion in copy-stream. It probably does not account for bivalent streams. Alex __________________________________ Start your day with Yahoo! - Make it your home page! http://www.yahoo.com/r/hs From Alan-Shields at omrf.ouhsc.edu Fri Dec 2 22:43:11 2005 From: Alan-Shields at omrf.ouhsc.edu (Alan Shields) Date: Fri, 2 Dec 2005 16:43:11 -0600 Subject: [Bese-devel] Re: Araneida backends and regexp-entry-point In-Reply-To: <20051202213356.79886.qmail@web34602.mail.mud.yahoo.com> References: <20051202191508.36371.qmail@web34607.mail.mud.yahoo.com> <20051202213356.79886.qmail@web34602.mail.mud.yahoo.com> Message-ID: <20051202224311.GY29109@inquisitor.omrf.org> On Fri, Dec 02, 2005 at 01:33:56PM -0800, Aleksandar Bakic wrote: > > 1. In araneida's compat-sbcl.lisp > > > > (defparameter *open-external-format-arguments* > > '(:external-format :iso-8859-1)) > > > > Adding :element-type (unsigned-byte 8) in here breaks a call to copy-stream > > in > > the static file handler (I don't know exactly why, probably due to the other > > patches mentioned above). > > A workaround for this is to disable the unless-subtypep assertion in > copy-stream. It probably does not account for bivalent streams. > Araneida 0.90 fixes this issue. Or, at least, it should. Alan From a_bakic at yahoo.com Sat Dec 3 00:10:24 2005 From: a_bakic at yahoo.com (Aleksandar Bakic) Date: Fri, 2 Dec 2005 16:10:24 -0800 (PST) Subject: [Bese-devel] Re: Araneida backends and regexp-entry-point In-Reply-To: <20051202224311.GY29109@inquisitor.omrf.org> Message-ID: <20051203001024.6098.qmail@web34601.mail.mud.yahoo.com> > > A workaround for this is to disable the unless-subtypep assertion in > > copy-stream. It probably does not account for bivalent streams. > > > > Araneida 0.90 fixes this issue. Or, at least, it should. Yes, it does. I am using it in isolation (because of so many patches all over the place), and I noticed that it did not have this problem, but I could not find out why for some time. Alex __________________________________ Start your day with Yahoo! - Make it your home page! http://www.yahoo.com/r/hs From asbjxrn at bjxrnstad.net Sat Dec 3 07:04:38 2005 From: asbjxrn at bjxrnstad.net (=?iso-8859-1?q?Asbj=F8rn_Bj=F8rnstad?=) Date: 03 Dec 2005 08:04:38 +0100 Subject: [Bese-devel] Re: Small form patch References: <17E10D66-2030-4E1A-BC7E-8BA5084B5A81@bjxrnstad.net> <20051202.192622.134135815.svg@surnet.ru> Message-ID: <5oiru6mzjt.fsf@kaksi.ifi.uio.no> Vladimir Sekissov writes: > I supposed that error collection would be done with `status-bar' > component or something similar to centrilize message/error rendering > by simply overwriting `report-error' method: > > (defmethod report-error (component slot-name condition) > (show-message (format-error-pretty component slot-name condition))) > > `show-message' is a `status-bar' method and sends message to it. > `status-bar' shows collected during request processing messages and > clears them after. Ah, I see. I'll have to try that. Meanwhile I wonder how I can pass arguments to the constraints. I got two scenarios: I'd like the user to type in a password, and repeat it and then check that they match. So I'd like a :equal-to 'password, but I haven't figured out how to pass an argument to the constraint function. Another scenario is that I want a :unique 'table 'column check that looks up in my database. Again, I need to pass arguments to the function. Any hints? -- -asbjxrn From svg at surnet.ru Sat Dec 3 15:49:49 2005 From: svg at surnet.ru (Vladimir Sekissov) Date: Sat, 03 Dec 2005 20:49:49 +0500 (YEKT) Subject: [Bese-devel] Re: Small form patch In-Reply-To: <5oiru6mzjt.fsf@kaksi.ifi.uio.no> References: <17E10D66-2030-4E1A-BC7E-8BA5084B5A81@bjxrnstad.net> <20051202.192622.134135815.svg@surnet.ru> <5oiru6mzjt.fsf@kaksi.ifi.uio.no> Message-ID: <20051203.204949.65985166.svg@surnet.ru> Good day, > Meanwhile I wonder how I can pass arguments to the constraints. > I got two scenarios: > I'd like the user to type in a password, and repeat it and then check > that they match. So I'd like a :equal-to 'password, but I haven't > figured out how to pass an argument to the constraint function. > > Another scenario is that I want a :unique 'table 'column check that > looks up in my database. Again, I need to pass arguments to the > function. There are two ways probably. - from constraint function: (defun my-passwd-constraint (value-first element) (let* ((form (parent element)) ;; we don't know the order of elements in the form ;; get value directly (value-second (read-client-value (password-second form)))) (unless (equal value-second value-first) (signal-ie-constraint-violation ...)))) - from form/composite VALIDATE-VALUE method: (defmethod validate-value :after ((f my-form) slot-alist &key &allow-other-keys) (when (not (equal (cdr (assoc 'password slot-alist)) (cdr (assoc 'password-second slot-alist)))) (report-error f 'password "Don't mutch") (push 'password (invalid-slots f)))) The second case is probably relevant to the first. Best Regards, Vladimir Sekissov From a_bakic at yahoo.com Sun Dec 4 00:48:33 2005 From: a_bakic at yahoo.com (Aleksandar Bakic) Date: Sat, 3 Dec 2005 16:48:33 -0800 (PST) Subject: [Bese-devel] new regexp stuff needs a patch? Message-ID: <20051204004833.88142.qmail@web34605.mail.mud.yahoo.com> Hi, I just noticed this. (I doubt it is due to my local changes.) ; in: ; DEFMETHOD ARANEIDA:UNINSTALL-HANDLER (UCW-REGEXP-DISPATCHING-HANDLER T T) ; (IT.BESE.UCW::HANDLER-DISPATCH-LIST IT.BESE.UCW:PARENT) ; ; caught STYLE-WARNING: ; The function was called with one argument, but wants exactly two. Alex __________________________________ Start your day with Yahoo! - Make it your home page! http://www.yahoo.com/r/hs From mb at bese.it Sun Dec 4 16:26:03 2005 From: mb at bese.it (Marco Baringer) Date: Sun, 04 Dec 2005 17:26:03 +0100 Subject: [Bese-devel] [PATCH] wrapping-standard method combination In-Reply-To: <20051202.182434.51298581.svg@surnet.ru> (Vladimir Sekissov's message of "Fri, 02 Dec 2005 18:24:34 +0500 (YEKT)") References: <20051126.051010.191085822.svg@surnet.ru> <20051202.182434.51298581.svg@surnet.ru> Message-ID: Vladimir Sekissov writes: > Good day, > mb> > Other things I can do with other methods but wrapping methods seems > mb> > for me the only right place for initialization. > mb> > mb> then i think we wolud do better to _add_ something to wrapping > mb> standard as opposed to changing the current evaluation order. > mb> > mb> if you can think of a name for methods which wrap around sub class > mb> methods and are not (in any way) overridable > > What about :wraparound. This code: (in-package :arnesi) (defgeneric foo (a) (:method-combination wrapping-standard)) (defmethod foo ((a symbol)) (write-line "primary")) (defmethod foo :before ((a symbol)) (write-line "before")) (defmethod foo :after ((a symbol)) (write-line "after")) (defmethod foo :wrapping ((a symbol)) (write-line "pre wrapping") (call-next-method) (write-line "post wrapping")) (defmethod foo :wrap-around ((a symbol)) (write-line "pre wrap-around") (call-next-method) (write-line "post wrap-around")) Produces this output: ARNESI> (foo 'a) pre wrap-around before pre wrapping primary post wrapping after post wrap-around "post wrap-around" ARNESI> I'm not sure whether wrap-around's value should have been returned or the primary method's, i decided to return wrap-around's value (otherwise there's no good way to _not_ return wrap-around's value). applied to arnesi_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 maciekp at japhy.fnord.org Mon Dec 5 22:59:58 2005 From: maciekp at japhy.fnord.org (Maciek Pasternacki) Date: Mon, 05 Dec 2005 23:59:58 +0100 Subject: [Bese-devel] Re: Araneida backends and regexp-entry-point References: <87r78z35xu.fsf@lizard.king> <20051202191508.36371.qmail@web34607.mail.mud.yahoo.com> Message-ID: <87r78rxi8h.fsf@lizard.king> On Sweetmorn, The Aftermath 44, 3171 YOLD, Aleksandar Bakic wrote: > 3. Your %recode... function breaks when I enter some Unicode characters in a > form; the errors is something like "cannot encode in > :latin1". What is your locale? Try pulling my patches from ucw_dev (exactly, the `Recode string from Araneida to current application's default charset; when decoding is not possible, keep value as byte array.' one). Probably you use Latin1 locale, so it's sbcl's default charset; now default charset is taken from application object, and default charset for app on Unicode-enabled sbcl is utf-8, regardless of locale. > I thought I should report all of this knowing that your setup is possibly > different and things probably work for you. If you can upload and download > binary images in addition to Unicode text, please send a complete solution (and > I can send mine, as I already have off-the-list). I also noticed that new > alan-araneida uses a different setup for sb-unicode (it seems that yours is > based on it), but it does not seem to address images yet. I use alan-araneida-testing, current darcs checkout. It doesn't address images directly but we can leave araneida alone and treat its iso-8859-1 strings as unencoded octet strings (every possible value is legal in iso-8859-1), and recode them to Unicode strings or byte arrays by hand (for images use (araneida::request-unparsed-body request)). I'm currently working on it. Maybe it would be useful to factor out Unicode/binary functions to separate file, to allow easy porting to other Unicode-enabled Lisps? -- __ Maciek Pasternacki [ http://japhy.fnord.org/ ] `| _ |_\ / { ...For I was born with a habit, from a sign, ,|{-}|}| }\/ the habit of a windswept thumb, \/ |____/ and a sign of the rain... } ( Fish ) -><- From maciekp at japhy.fnord.org Mon Dec 5 23:14:32 2005 From: maciekp at japhy.fnord.org (Maciek Pasternacki) Date: Tue, 06 Dec 2005 00:14:32 +0100 Subject: [Bese-devel] Re: new regexp stuff needs a patch? References: <20051204004833.88142.qmail@web34605.mail.mud.yahoo.com> Message-ID: <87mzjfxhk7.fsf@lizard.king> On Pungenday, The Aftermath 46, 3171 YOLD, Aleksandar Bakic wrote: > Hi, > > I just noticed this. (I doubt it is due to my local changes.) > > ; in: > ; DEFMETHOD ARANEIDA:UNINSTALL-HANDLER (UCW-REGEXP-DISPATCHING-HANDLER T > T) > ; (IT.BESE.UCW::HANDLER-DISPATCH-LIST IT.BESE.UCW:PARENT) > ; > ; caught STYLE-WARNING: > ; The function was called with one argument, but wants exactly two. A typo. Fix commited to ucw_public. -- __ Maciek Pasternacki [ http://japhy.fnord.org/ ] `| _ |_\ / { ...For I was born with a habit, from a sign, ,|{-}|}| }\/ the habit of a windswept thumb, \/ |____/ and a sign of the rain... } ( Fish ) -><- From nathan at acceleration.net Wed Dec 7 00:27:03 2005 From: nathan at acceleration.net (Nathan Bird) Date: Tue, 6 Dec 2005 19:27:03 -0500 Subject: [Bese-devel] Patch Problems with "Make the form.lisp select-element use Earlier to day I pushed this patch up, but then discovered that the time-element in the demo had stopped working. This has to do with default values and I am currently tracking down this bug. However, you might be happier not pulling that patch until the problem is solved. I tried the unpull link on darcsweb, but that didn't work. Sorry for any inconvenience, this shouldn't be a problem for long, Nathan and Russ -------------- next part -------------- An HTML attachment was scrubbed... URL: From maciekp at japhy.fnord.org Wed Dec 7 15:38:18 2005 From: maciekp at japhy.fnord.org (Maciek Pasternacki) Date: Wed, 07 Dec 2005 16:38:18 +0100 Subject: [Bese-devel] Backend refactor (httpd, araneida): Unicode and binary uploads. Message-ID: <87bqzsex3p.fsf@lizard.king> I just pushed into ucw_public four patches that factor out some functionality (Unicode-related functions and, later, body and url query parsing) to src/backend/shared.lisp to be used by multiple backends. For Unicode-enabled sbcl file uploads (binary ones too) and Unicode content do work now (at least for me). Porting this functionality to other Unicode-enabled Lisp implementations should be easy. Please review the diffs and test if it works and doesn't break anything (especially on other Lisps). As seen in file upload example, uploaded files are received as strings if Content-Type is text/* and it can be decoded as application's default charset; undecodable text files and other file types are returned as byte arrays. Parameters (query, POST) are treated like text files -- if they can't be decoded, they are passed as byte arrays. I changed only httpd and araneida backends (araneida tested with current alan-araneida-testing, but it should work with other versions since it uses now only unparsed body and url query strings); I will work also on mod_lisp, when I manage to get the Apache side up. If anybody has some comments on how uploads should work (especially large file uploads -- I will also work on not keeping uploaded files in memory since our app will need to work on large files), please send them in, as my opinion on the Right Thing is not necessarily the correct one. -- __ Maciek Pasternacki [ http://japhy.fnord.org/ ] `| _ |_\ / { ...For I was born with a habit, from a sign, ,|{-}|}| }\/ the habit of a windswept thumb, \/ |____/ and a sign of the rain... } ( Fish ) -><- From albertosantini at tiscali.it Wed Dec 7 19:10:39 2005 From: albertosantini at tiscali.it (Alberto Santini) Date: Wed, 7 Dec 2005 20:10:39 +0100 Subject: [Bese-devel] Patch for docs/QUICKSTART_DEV... Message-ID: <941E97DD-F322-43B7-9D26-A191A702261E@tiscali.it> Hello. I applied a patch to ucw_public for docs/QUICKSTART_DEV rel. 0.3 added how to define package, www-roots, js Regards, Alberto Santini From as at albertosantini.it Mon Dec 5 18:39:56 2005 From: as at albertosantini.it (Alberto Santini) Date: Mon, 5 Dec 2005 19:39:56 +0100 Subject: [Bese-devel] Patch docs/QUICKSTART... Message-ID: I applied a patch to ucw_public about docs/QUICKSTART. rel. 0.4 added http, mod-lisp backend configuration Regards, Alberto Santini From as at albertosantini.it Sun Dec 11 10:51:44 2005 From: as at albertosantini.it (Alberto Santini) Date: Sun, 11 Dec 2005 11:51:44 +0100 Subject: [Bese-devel] httpd error... Message-ID: <6E4DE055-6C87-4969-B033-E7503088AF20@albertosantini.it> Hello. After the backend refactoring, using httpd with OpenMCL 1.0 on Mac, I report you this error: Welcome to OpenMCL Version 1.0 (DarwinPPC32)! ? 2005-12-11T11:43.48 IT.BESE.ARNESI:+INFO+ IT.BESE.UCW::UCW.BACKEND: Handling request for "/admin/index.ucw" 2005-12-11T11:43.48 IT.BESE.ARNESI:+INFO+ IT.BESE.UCW::UCW-LOGGER: CALL'ing to /# 2005-12-11T11:43.48 IT.BESE.ARNESI:+INFO+ IT.BESE.UCW::UCW.BACKEND: Shutdown down # (Status: "200"). 2005-12-11T11:43.48 IT.BESE.ARNESI:+ERROR+ IT.BESE.UCW::UCW.BACKEND: Worker thread # reported #. The result is a blank page. Sorry, I have no time to investigate further. Thanks in advance, Alberto Santini. From asbjxrn at bjxrnstad.net Sun Dec 11 12:25:16 2005 From: asbjxrn at bjxrnstad.net (=?iso-8859-1?q?Asbj=F8rn_Bj=F8rnstad?=) Date: 11 Dec 2005 13:25:16 +0100 Subject: [Bese-devel] Re: httpd error... References: <6E4DE055-6C87-4969-B033-E7503088AF20@albertosantini.it> Message-ID: <5omzj795xv.fsf@kahdeksan.ifi.uio.no> Alberto Santini writes: > After the backend refactoring, using httpd with OpenMCL 1.0 on Mac, > I report you this error: It's a missing encode-string function that causes this. I applied a dummy function patch to ucw_public that fixes this, although a version that actually implements the function for other lisps would better. -- -asbjxrn From maciekp at japhy.fnord.org Sun Dec 11 17:19:30 2005 From: maciekp at japhy.fnord.org (Maciek Pasternacki) Date: Sun, 11 Dec 2005 18:19:30 +0100 Subject: [Bese-devel] Re: httpd error... References: <6E4DE055-6C87-4969-B033-E7503088AF20@albertosantini.it> <5omzj795xv.fsf@kahdeksan.ifi.uio.no> Message-ID: <87k6eba6vx.fsf@lizard.king> On Setting Orange, The Aftermath 53, 3171 YOLD, Asbj?rn Bj?rnstad wrote: >> After the backend refactoring, using httpd with OpenMCL 1.0 on Mac, >> I report you this error: > > It's a missing encode-string function that causes this. I applied a > dummy function patch to ucw_public that fixes this, although a version > that actually implements the function for other lisps would better. I see Marco had just posted more complete patch with dummy functions to ucw_dev. The complete solution (implementing a function for other Lisps) would require writing portable Unicode library, which is not trivial. With conditional reading one can provide alternatives for other Unicode Lisps -- this should be fairly easy, just grep the sources for sb-unicode (outside shared.lisp there are only some minor changes for application's default charset) -- but atually working dummy functions for non-Unicode Lisps are non-trivial. -- __ Maciek Pasternacki [ http://japhy.fnord.org/ ] `| _ |_\ / { ...elbow deep within the borderline, show me that you love me ,|{-}|}| }\/ and that we belong together; shoulder deep within the borderline, \/ |____/ relax, turn around and take my hand... } ( M. J. Keenan ) -><- From eslick at csail.mit.edu Sun Dec 11 19:29:22 2005 From: eslick at csail.mit.edu (Ian Eslick) Date: Sun, 11 Dec 2005 14:29:22 -0500 Subject: [Bese-devel] make-load-form Message-ID: <439C7E12.2090801@csail.mit.edu> The call to class-slots in make-load-form fails under Allegro CL 7.0 due to finalize-inheritance not being called on application-form. This appears to be a problem that only shows up in the Allegro MOP. I added a call to finalize just before the call to class-slots to ensure finalization since, ostensibly, the class heirarchy is in fact completely defined when you start using walk-form. Not sure exactly why it isn't called beforehand but wanted to provide a heads up on that. Ian From mb at bese.it Sun Dec 11 22:22:46 2005 From: mb at bese.it (Marco Baringer) Date: Sun, 11 Dec 2005 23:22:46 +0100 Subject: [Bese-devel] make-load-form In-Reply-To: <439C7E12.2090801@csail.mit.edu> (Ian Eslick's message of "Sun, 11 Dec 2005 14:29:22 -0500") References: <439C7E12.2090801@csail.mit.edu> Message-ID: Ian Eslick writes: > I added a call to finalize just before the call to class-slots to > ensure finalization since, ostensibly, the class heirarchy is in fact > completely defined when you start using walk-form. Not sure exactly > why it isn't called beforehand but wanted to provide a heads up on > that. i'm pretty sure finalize-inheritance must be called before an instance of the class is made, and since make-load-form must be called on an existing instance i don't see why finalize-inheritance isn't being called. any mop gurus listening? i'll add the call to finalize-inheritance anyway (is it safe to call finalize-inheritance multiple times like that?) -- -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 eslick at csail.mit.edu Sun Dec 11 22:50:23 2005 From: eslick at csail.mit.edu (Ian Eslick) Date: Sun, 11 Dec 2005 17:50:23 -0500 Subject: [Bese-devel] make-load-form In-Reply-To: References: <439C7E12.2090801@csail.mit.edu> Message-ID: <439CAD2F.2020103@csail.mit.edu> My understanding is that finalize-inheritance will not fail if called multiple times. There's a nice discussion here: http://groups.google.com/group/comp.lang.lisp/browse_thread/thread/8636fb5d2cdd7aef/8e8d6d75d51f8535?lnk=st&q=finalize-inheritance+allegro+error+class+not+finalized&rnum=1&hl=en#8e8d6d75d51f8535 I think this is an interaction between the mop ordering of when make-load-form is called on the base class 'form' during the creation of the first instance of subclass 'application-form' during the compilation of (defmethod place ((place place))) in backtracking.lisp where with-call/cc is expanded and then calls walk which instantiates application-form leading to the mop instance creation & class finalization procedures being executed in a particular order. My guess is that the classes are finalized in order of inheratence but that your use of the mop methods on the base class in the (defmethod make-load-form ((object form) ...) ...) are called before the subclasses have been finalized. I'm not sure what the clean solution is although it may just be to call finalize explicitly in a 'eval-when' form after all the classes are defined. I don't see that you have any forward-referenced classes so there shouldn't be any surprises. I hope that made sense! Ian Marco Baringer wrote: >Ian Eslick writes: > > > >>I added a call to finalize just before the call to class-slots to >>ensure finalization since, ostensibly, the class heirarchy is in fact >>completely defined when you start using walk-form. Not sure exactly >>why it isn't called beforehand but wanted to provide a heads up on >>that. >> >> > >i'm pretty sure finalize-inheritance must be called before an instance >of the class is made, and since make-load-form must be called on an >existing instance i don't see why finalize-inheritance isn't being >called. any mop gurus listening? > >i'll add the call to finalize-inheritance anyway (is it safe to call >finalize-inheritance multiple times like that?) > > > From svg at surnet.ru Tue Dec 13 20:48:55 2005 From: svg at surnet.ru (Vladimir Sekissov) Date: Wed, 14 Dec 2005 01:48:55 +0500 (YEKT) Subject: [Bese-devel] [PATCH] arnesi:write-as-html escaping Message-ID: <20051214.014855.239651382.svg@surnet.ru> Good day, Current behaviour of `arnesi:write-as-html' function is escaping all characters with codes greater than 127. But such escapes correspond to latin-1 character entities nor characters of document charset. 8-bit characters are valid HTML entities and you need such escaping only when you mix another 8-bit charset with latin-1 in your document. This patch is based on information from: http://ppewww.ph.gla.ac.uk/~flavell/charset/ Best Regards, Vladimir Sekissov -------------- next part -------------- A non-text attachment was scrubbed... Name: CHANGESET.gz Type: application/octet-stream Size: 6517 bytes Desc: not available URL: From mb at bese.it Thu Dec 15 13:50:13 2005 From: mb at bese.it (Marco Baringer) Date: Thu, 15 Dec 2005 14:50:13 +0100 Subject: [Bese-devel] character issues. aka: http is a binary protocol, get over it. Message-ID: [this is directed to those of you who are using ucw and non latin-1 charsets.] i'm currently trying to make ucw do the Right Thing(TM) with regard to non ascii characters. the first change, and the one i've almost finished, is a large patch to rfc2388 which makes it work on unsigned-byte streams (instead of character streams). this moves the encoding problems out of rfc2388 (who shoudn't be bothered) and into the application (where we have enough information to decide how to handle it)[1]. once rfc2388 is "fixed" i'll move on to the httpd (and therefore mod_lisp) backend and start treating the input/output streams as unsigned-byte streams[2]. at this point much user code will break, i'll try and make things as backward compatable as possible, but it's still going to be painfull, though i'm pretty sure it'll be worth it in the end. it would be helpfull for me if i could get copies of the data people are trying to send back and forth (especially non latin-1 stuff). if anyone could send me some example forms and files containing latin-9 (or whatever) data so i can test things out it that would be great. even just an explanation of what you're trying to do (and currently doesn't work without ugly hacks) would be enough. [1] - as a side effect of this i'll finally fix the large file problem. if we attemtp to parse more than N bytes of data in a form submit we'll open a file and put the data there. the value passed to user code will always be a _binary_ stream (even if the data was small enough to be kept in memory) and the user can do what they want with it, users will have access to the content-type and charset parameters passed plus a set of utility functions for encoding/decoding data. [2] - added bonus: sending images and pdf files as responses will become trivial. -- -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 Thu Dec 15 14:25:12 2005 From: a_bakic at yahoo.com (Aleksandar Bakic) Date: Thu, 15 Dec 2005 06:25:12 -0800 (PST) Subject: [Bese-devel] character issues. aka: http is a binary protocol, get over it. In-Reply-To: Message-ID: <20051215142512.92877.qmail@web34613.mail.mud.yahoo.com> > [this is directed to those of you who are using ucw and non latin-1 > charsets.] [... lots of good stuff :) ] Thanks! There are currently six ucw_dev patches that I have been skipping because my local patches are all over the place and not compatible with the former ones. I'll *try* (too busy at the moment) to collect forms/data I transfer in both directions and send them to you; perhaps you might guess based on my earlier email containing my patches. (Basically, I use utf-8 in textual forms and binary images in multipart/form-data ones. I serve images using my skip-rendering trick, where only the binary image content, and not HTML content, is output.) Alex __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From mb at bese.it Thu Dec 15 14:41:04 2005 From: mb at bese.it (Marco Baringer) Date: Thu, 15 Dec 2005 15:41:04 +0100 Subject: [Bese-devel] character issues. aka: http is a binary protocol, get over it. In-Reply-To: (Marco Baringer's message of "Thu, 15 Dec 2005 14:50:13 +0100") References: Message-ID: "Marco Baringer" writes: > [this is directed to those of you who are using ucw and non latin-1 > charsets.] is it safe to assume that in all modern code sets (iso-ABC-X, utf-ABC, etc.) the bytes from 0 to 128 correspond to 7 bit ascii? in other words: can i assume that whatever encoding/decoding is enabled (code-char X), for 0 <= x < 128, will return the same thing on all lisps? -- -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 Thu Dec 15 14:55:24 2005 From: a_bakic at yahoo.com (Aleksandar Bakic) Date: Thu, 15 Dec 2005 06:55:24 -0800 (PST) Subject: [Bese-devel] character issues. aka: http is a binary protocol, get over it. In-Reply-To: Message-ID: <20051215145524.52680.qmail@web34602.mail.mud.yahoo.com> > is it safe to assume that in all modern code sets (iso-ABC-X, utf-ABC, > etc.) the bytes from 0 to 128 correspond to 7 bit ascii? I don't know :) but, modern or not, can you abstract this part out so that later you can plug in a function to recode that byte range if necessary? Alex __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From mb at bese.it Thu Dec 15 16:16:49 2005 From: mb at bese.it (Marco Baringer) Date: Thu, 15 Dec 2005 17:16:49 +0100 Subject: [Bese-devel] character issues. aka: http is a binary protocol, get over it. In-Reply-To: (Marco Baringer's message of "Thu, 15 Dec 2005 14:50:13 +0100") References: Message-ID: "Marco Baringer" writes: > it would be helpfull for me if i could get copies of the data people > are trying to send back and forth (especially non latin-1 stuff). if > anyone could send me some example forms and files containing latin-9 > (or whatever) data so i can test things out it that would be > great. even just an explanation of what you're trying to do (and > currently doesn't work without ugly hacks) would be enough. in particular: what do various browsers send when the name of a field contains non ascii chars? (i ask only about the name because i'm completly ignoring how to handle the data for now). i'm interested in both GET and POST (with application/x-www-form-urlencoded and multipart/form-data encoding). I'm pretty sure that application/x-www-form-urlencoded (GET and regular POST) only allows latin-1 characters, but 1) i don't know what happens if we try to do it anyway, 2) there's always multipart/form-data which would allow it via the =?utf-16?Q?=00=DF?= syntax. this would unfortunetly require that rfc2388 know about character sets and encodings (which is something i'm trying hard to avoid). -- -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 maciekp at japhy.fnord.org Thu Dec 15 17:38:53 2005 From: maciekp at japhy.fnord.org (Maciek Pasternacki) Date: Thu, 15 Dec 2005 18:38:53 +0100 Subject: [Bese-devel] Re: character issues. aka: http is a binary protocol, get over it. References: Message-ID: <87bqzigt02.fsf@lizard.king> On Prickle-Prickle, The Aftermath 57, 3171 YOLD, Marco Baringer wrote: > what do various browsers send when the name of a field contains non > ascii chars? (i ask only about the name because i'm completly ignoring > how to handle the data for now). i'm interested in both GET and POST > (with application/x-www-form-urlencoded and multipart/form-data > encoding). > > I'm pretty sure that application/x-www-form-urlencoded (GET and > regular POST) only allows latin-1 characters, but 1) i don't know what > happens if we try to do it anyway, 2) there's always > multipart/form-data which would allow it via the =?utf-16?Q?=00=DF?= > syntax. this would unfortunetly require that rfc2388 know about > character sets and encodings (which is something i'm trying hard to > avoid). As for latin-1 characters, practically it allows page to use any octets, which are passed as `cookies' without meaning and charset (in latin-1 all octets are legal, so when I do
xfoobar
What is the advantage of putting the closing angle bracket on the next line. Can this behavior be turned off? -- Bill Atkins From sketerpot at gmail.com Sat Dec 17 15:12:07 2005 From: sketerpot at gmail.com (Peter Scott) Date: Sat, 17 Dec 2005 09:12:07 -0600 Subject: [Bese-devel] YACLML formatting In-Reply-To: <66b7e34b0512170035l46c39c94t79f80c8b0d2421d6@mail.gmail.com> References: <66b7e34b0512170035l46c39c94t79f80c8b0d2421d6@mail.gmail.com> Message-ID: <7e267a920512170712r1866eae1u34a3f307066232e1@mail.gmail.com> On 12/17/05, Bill Atkins wrote: > The YACLML macros generate HTML that looks like > [snip > What is the advantage of putting the closing angle bracket on the next > line. Can this behavior be turned off? Marco wanted to produce indented HTML output, but if you put the indentation outside the tags, it sometimes shows up in the displayed web page. He decided that it was easier to simply put the spacing *inside* the tag. It's the price you pay for nice indentation. I believe you can turn it off by setting it.bese.yaclml:*yaclml-indent* to nil before compiling code that produces yaclml output. -Peter From mb at bese.it Sun Dec 18 18:31:10 2005 From: mb at bese.it (Marco Baringer) Date: Sun, 18 Dec 2005 19:31:10 +0100 Subject: [Bese-devel] binary http Message-ID: http://common-lisp.net/project/ucw/repos/ucw_binary_http currently only the httpd backend has been converted. i still need to fix a bug with rfc2388 and then i'll work on mod_lisp. unfortunetly these changes don't, yet, make it any easier than before to send images or non iso-8859-1 data... soon-ish i'll look into the araneida and aserve backends (my lack of immediate interest in these backends is the main reason i'm doing this work on a seperate branch and not 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 henrik.hjelte at poboxes.com Mon Dec 19 14:26:01 2005 From: henrik.hjelte at poboxes.com (Henrik Hjelte) Date: Mon, 19 Dec 2005 15:26:01 +0100 Subject: [Bese-devel] Some patches for parenscript Message-ID: <1135002361.31100.39.camel@localhost.localdomain> Here are some patches for ParenScript: In order to make it less scary to change stuff, I have made a function to make testcases of all the code which is in the reference. So the file reference-tests.lisp is autogenerated. Then I cleaned the reference.lisp file from small typos and errors. The css generator that is in the parenscript project is lisp server-side, so I made a corresponding little css generator that makes it possible to generate style tags in parenscript. A bug in the function dwim-join (see the testcase in test.lisp) was solved. The dwim-join function is not easy to understand, I hope I have not created any new problems, but the reference tests run OK. Finally, what I consider a bug in the parenscript slot-value function was solved. See the testcases in test.lisp. The pdf reference really ought to be updated, but I don't know latex so I couldn't get the pbook script to work, I think there are some styles missing. Merry christmas everyone, /Henrik Hjelte -------------- next part -------------- New patches: [quotes in introduction henrik.hjelte at poboxes.com**20051216153949] { hunk ./introduction.lisp 1 +(in-package :js) hunk ./introduction.lisp 22 - +" hunk ./introduction.lisp 26 - +" hunk ./introduction.lisp 56 - +" hunk ./introduction.lisp 58 - alert("i is " + i + " and j is " + j); + alert('i is ' + i + ' and j is ' + j); hunk ./introduction.lisp 60 - +" hunk ./introduction.lisp 80 - -{ foo : "foo", - bla : "bla" } - +" +{ foo : 'foo', + bla : 'bla' } +" hunk ./introduction.lisp 98 - +" hunk ./introduction.lisp 100 - document.write("
The link is: " - + linkText + "
"); + document.write('
The link is: ' + + linkText + '
'); hunk ./introduction.lisp 104 - +" } [tests from the reference henrik.hjelte at poboxes.com**20051216180844] { addfile ./parenscript-test.asd hunk ./parenscript-test.asd 1 +;;;; -*- lisp -*- + +(in-package :cl-user) + +(defpackage #:parenscript-test.system + (:use :cl :asdf)) + +(in-package #:parenscript-test.system) + +(defsystem #:parenscript-test + :depends-on (:parenscript :fiveam) + :components ((:file "test-package") + (:file "test" :depends-on ("test-package")) + (:file "ref2test" :depends-on ("test")) + (:file "reference-tests" :depends-on ("test")))) addfile ./ref2test.lisp hunk ./ref2test.lisp 1 +(in-package :js-test) +;;Generates automatic tests from the reference + +(defparameter +reference-file+ (make-pathname :name "reference" + :type "lisp" + :defaults *load-truename*)) +(defparameter +generate-file+ (make-pathname :name "reference-tests" + :type "lisp" + :defaults *load-truename*)) + +(defparameter +head+ "(in-package :js-test) +;; Tests of everything in the reference. +;; File is generated automatically from the text in reference.lisp by +;; the function make-reference-tests-dot-lisp in ref2test.lisp +;; so do not edit this file. +(def-suite ref-tests) +(in-suite ref-tests)~%~%") ; a double-quote for emacs: " + +(defun make-reference-tests-dot-lisp() + (let ((built "") + heading + heading-count) + (with-open-file (out-stream +generate-file+ + :direction :output + :if-exists :supersede) + (labels + ((empty-p (str) + (zerop (length str))) + (trim-whitespace (str) + (string-trim '(#\Space #\Tab #\Newline) str)) + (left (str count) + (subseq str 0 (min count (length str)))) + (lispify-heading (heading) + (remove-if (lambda (ch) (or (char= ch #\`)(char= ch #\'))) + (substitute #\- #\Space (string-downcase (trim-whitespace heading)) + :test #'char=))) + (clean-quotes (str) + (substitute #\' #\" str :test #'char=)) + (strip-indentation (str indentation) + (if indentation + (js::string-join (mapcar #'(lambda (str) + (if (> (length str) indentation) + (subseq str indentation) + str)) + (js::string-split str (list #\Newline))) + (string #\Newline)) + str)) + + (make-test () + (let* ((sep-pos (search "=>" built)) + (cr-before-sep (when sep-pos + (or (position #\Newline + (left built sep-pos) + :from-end t + :test #'char=) + 0))) + (js-indent-width (when cr-before-sep + (+ 2 (- sep-pos cr-before-sep)))) + (lisp-part (and sep-pos (left built sep-pos))) + (javascript-part (when cr-before-sep + (subseq built (+ 1 cr-before-sep))))) + (cond + ((null sep-pos) + (print "Warning, separator not found")) + ((search "=>" (subseq built (+ 1 sep-pos))) + (print "Error , two separators found")) + ((and (string= heading "regular-expression-literals") + (= 2 heading-count)) ;requires cl-interpol reader + (print "Skipping regex-test two")) + ((and lisp-part javascript-part) + (format out-stream "(test-ps-js ~a-~a ~% ~a ~% ~S)~%~%" + heading heading-count + (trim-whitespace lisp-part) + (clean-quotes (strip-indentation javascript-part js-indent-width)))) + (t (print "Error, should not be here")))))) + (format out-stream +head+) + (with-open-file (stream +reference-file+ :direction :input) + (loop for line = (read-line stream nil nil) + with is-collecting + while line do + (cond + ((string= (left line 4) ";;;#") + (setf heading (lispify-heading (subseq line 5))) + (setf heading-count 0) + (when (string= (trim-whitespace heading) + "the-parenscript-compiler") + (return))) + ((string= (left line 1) ";") 'skip-comment) + ((empty-p (trim-whitespace line)) + (when is-collecting + (setf is-collecting nil) + (incf heading-count) + (make-test) + (setf built ""))) + (t + (setf is-collecting t + built (concatenate 'string built + (when (not (empty-p built)) + (list #\Newline)) + line)))))) + (format out-stream "~%(run! 'ref-tests)~%"))))) addfile ./reference-tests.lisp hunk ./reference-tests.lisp 1 +(in-package :js-test) +;; Tests of everything in the reference. +;; File is generated automatically from the text in reference.lisp by +;; the function make-reference-tests-dot-lisp in ref2test.lisp +;; so do not edit this file. +(def-suite ref-tests) +(in-suite ref-tests) + +(test-ps-js statements-and-expressions-1 + (+ i (if 1 2 3)) + "i + (1 ? 2 : 3)") + +(test-ps-js statements-and-expressions-2 + (if 1 2 3) + "if (1) { + 2; +} else { + 3; +}") + +(test-ps-js symbol-conversion-1 + !?#$@% + "bangwhathashdollaratpercent") + +(test-ps-js symbol-conversion-2 + bla-foo-bar + "blaFooBar") + +(test-ps-js symbol-conversion-3 + *array + "Array") + +(test-ps-js symbol-conversion-6 + *global-array* + "GLOBALARRAY") + +(test-ps-js symbol-conversion-7 + *global-array*.length + "GLOBALARRAY.length") + +(test-ps-js number-literals-1 + 1 + "1") + +(test-ps-js number-literals-2 + 123.123 + "123.123") + +(test-ps-js number-literals-3 + #x10 + "16") + +(test-ps-js array-literals-1 + (array) + "[ ]") + +(test-ps-js array-literals-2 + (array 1 2 3) + "[ 1, 2, 3 ]") + +(test-ps-js array-literals-3 + (array (array 2 3) + (array "foobar" "bratzel bub")) + "[ [ 2, 3 ], [ 'foobar', 'bratzel bub' ] ]") + +(test-ps-js array-literals-4 + (make-array) + "new Array()") + +(test-ps-js array-literals-5 + (make-array 1 2 3) + "new Array(1, 2, 3)") + +(test-ps-js array-literals-6 + (make-array + (make-array 2 3) + (make-array "foobar" "bratzel bub")) + "new Array(new Array(2, 3), new Array('foobar', 'bratzel bub'))") + +(test-ps-js object-literals-1 + (create :foo "bar" :blorg 1) + "{ foo : 'bar', + blorg : 1 }") + +(test-ps-js object-literals-2 + (create :foo "hihi" + :blorg (array 1 2 3) + :another-object (create :schtrunz 1)) + "{ foo : 'hihi', + blorg : [ 1, 2, 3 ], + anotherObject : { schtrunz : 1 } }") + +(test-ps-js object-literals-3 + (slot-value an-object 'foo) + "anObject.foo") + +(test-ps-js object-literals-4 + an-object.foo + "anObject.foo") + +(test-ps-js object-literals-5 + (with-slots (a b c) this + (+ a b c)) + "this.a + this.b + this.c") + +(test-ps-js regular-expression-literals-1 + (regex "/foobar/i") + "/foobar/i") + +(test-ps-js literal-symbols-2 + NIL + "null") + +(test-ps-js literal-symbols-3 + UNDEFINED + "undefined") + +(test-ps-js literal-symbols-4 + THIS + "this") + +(test-ps-js variables-1 + variable + "variable") + +(test-ps-js variables-2 + a-variable + "aVariable") + +(test-ps-js variables-3 + *math + "Math") + +(test-ps-js variables-4 + *math.floor + "Math.floor") + +(test-ps-js function-calls-and-method-calls-1 + (blorg 1 2) + "blorg(1, 2)") + +(test-ps-js function-calls-and-method-calls-2 + (foobar (blorg 1 2) (blabla 3 4) (array 2 3 4)) + "foobar(blorg(1, 2), blabla(3, 4), [ 2, 3, 4 ])") + +(test-ps-js function-calls-and-method-calls-3 + ((aref foo i) 1 2) + "foo[i](1, 2)") + +(test-ps-js function-calls-and-method-calls-4 + (.blorg this 1 2) + "this.blorg(1, 2)") + +(test-ps-js function-calls-and-method-calls-5 + (this.blorg 1 2) + "this.blorg(1, 2)") + +(test-ps-js function-calls-and-method-calls-6 + (.blorg (aref foobar 1) NIL T) + "foobar[1].blorg(null, true)") + +(test-ps-js operator-expressions-1 + (* 1 2) + "1 * 2") + +(test-ps-js operator-expressions-2 + (= 1 2) + "1 == 2") + +(test-ps-js operator-expressions-3 + (eql 1 2) + "1 == 2") + +(test-ps-js operator-expressions-5 + (* 1 (+ 2 3 4) 4 (/ 6 7)) + "1 * (2 + 3 + 4) * 4 * (6 / 7)") + +(test-ps-js operator-expressions-6 + (++ i) + "i++") + +(test-ps-js operator-expressions-7 + (-- i) + "i--") + +(test-ps-js operator-expressions-8 + (incf i) + "++i") + +(test-ps-js operator-expressions-9 + (decf i) + "--i") + +(test-ps-js operator-expressions-10 + (1- i) + "i - 1") + +(test-ps-js operator-expressions-11 + (1+ i) + "i + 1") + +(test-ps-js operator-expressions-12 + (not (< i 2)) + "i >= 2") + +(test-ps-js operator-expressions-13 + (not (eql i 2)) + "i != 2") + +(test-ps-js body-forms-1 + (progn (blorg i) (blafoo i)) + "blorg(i); +blafoo(i);") + +(test-ps-js body-forms-2 + (+ i (progn (blorg i) (blafoo i))) + "i + (blorg(i), blafoo(i))") + +(test-ps-js function-definition-1 + (defun a-function (a b) + (return (+ a b))) + "function aFunction(a, b) { + return a + b; +}") + +(test-ps-js function-definition-2 + (lambda (a b) (return (+ a b))) + "function (a, b) { + return a + b; +}") + +(test-ps-js assignment-1 + (setf a 1) + "a = 1") + +(test-ps-js assignment-2 + (setf a 2 b 3 c 4 x (+ a b c)) + "a = 2; +b = 3; +c = 4; +x = a + b + c;") + +(test-ps-js assignment-3 + (setf a (1+ a)) + "a++") + +(test-ps-js assignment-4 + (setf a (* 2 3 4 a 4 a)) + "a *= 2 * 3 * 4 * 4 * a") + +(test-ps-js assignment-5 + (setf a (- 1 a)) + "a = 1 - a") + +(test-ps-js single-argument-statements-1 + (return 1) + "return 1") + +(test-ps-js single-argument-statements-2 + (throw "foobar") + "throw 'foobar'") + +(test-ps-js single-argument-expression-1 + (delete (new (*foobar 2 3 4))) + "delete new Foobar(2, 3, 4)") + +(test-ps-js single-argument-expression-2 + (if (= (typeof blorg) *string) + (alert (+ "blorg is a string: " blorg)) + (alert "blorg is not a string")) + "if (typeof blorg == String) { + alert('blorg is a string: ' + blorg); +} else { + alert('blorg is not a string'); +}") + +(test-ps-js conditional-statements-1 + (if (blorg.is-correct) + (progn (carry-on) (return i)) + (alert "blorg is not correct!")) + "if (blorg.isCorrect()) { + carryOn(); + return i; +} else { + alert('blorg is not correct!'); +}") + +(test-ps-js conditional-statements-2 + (+ i (if (blorg.add-one) 1 2)) + "i + (blorg.addOne() ? 1 : 2)") + +(test-ps-js conditional-statements-3 + (when (blorg.is-correct) + (carry-on) + (return i)) + "if (blorg.isCorrect()) { + carryOn(); + return i; +}") + +(test-ps-js conditional-statements-4 + (unless (blorg.is-correct) + (alert "blorg is not correct!")) + "if (!blorg.isCorrect()) { + alert('blorg is not correct!'); +}") + +(test-ps-js variable-declaration-1 + (defvar *a* (array 1 2 3)) + "var A = [ 1, 2, 3 ]") + +(test-ps-js variable-declaration-2 + (if (= i 1) + (progn (defvar blorg "hallo") + (alert blorg)) + (progn (defvar blorg "blitzel") + (alert blorg))) + "if (i == 1) { + var blorg = 'hallo'; + alert(blorg); +} else { + var blorg = 'blitzel'; + alert(blorg); +}") + +(test-ps-js variable-declaration-3 + (if (= i 1) + (let ((blorg "hallo")) + (alert blorg)) + (let ((blorg "blitzel")) + (alert blorg))) + "if (i == 1) { + var blorg = 'hallo'; + alert(blorg); +} else { + var blorg = 'blitzel'; + alert(blorg); +}") + +(test-ps-js iteration-constructs-1 + (do ((i 0 (1+ i)) + (l (aref blorg i) (aref blorg i))) + ((or (= i blorg.length) + (eql l "Fumitastic"))) + (document.write (+ "L is " l))) + "for (var i = 0, l = blorg[i]; +i == blorg.length || l == 'Fumitastic'); + i = i + 1, l = blorg[i]) { + document.write('L is ' + l); +}") + +(test-ps-js iteration-constructs-2 + (dotimes (i blorg.length) + (document.write (+ "L is " (aref blorg i)))) + "for (var i = 0; i != blorg.length; i = i++) { + document.write('L is ' + blorg[i]); +}") + +(test-ps-js iteration-constructs-3 + (dolist (l blorg) + (document.write (+ "L is " l))) + "var tmpArr1 = blorg; +for (var tmpI2 = 0; tmpI2 < tmpArr1.length; +pI2 = tmpI2++) { + var l = tmpArr1[tmpI2]; + document.write('L is ' + l); +}") + +(test-ps-js iteration-constructs-4 + (doeach (i object) + (document.write (+ i " is " (aref object i)))) + "for (var i in object) { + document.write(i + ' is ' + object[i]); +}") + +(test-ps-js iteration-constructs-5 + (while (film.is-not-finished) + (this.eat (new *popcorn))) + "while (film.isNotFinished()) { + this.eat(new Popcorn); +}") + +(test-ps-js the-case-statement-1 + (case (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 the-with-statement-1 + (with ((create :foo "foo" :i "i")) + (alert (+ "i is now intermediary scoped: " i))) + "with ({ foo : 'foo', + i : 'i' }) { + alert('i is now intermediary scoped: ' + i); +}") + +(test-ps-js the-try-statement-1 + (try (throw "i") + (:catch (error) + (alert (+ "an error happened: " error))) + (:finally + (alert "Leaving the try form"))) + "try { + throw 'i'; +} catch (error) { + alert('an error happened: ' + error); +} finally { + alert('Leaving the try form'); +}") + +(test-ps-js the-html-generator-1 + (html ((:a :href "foobar") "blorg")) + "'blorg'") + +(test-ps-js the-html-generator-2 + (html ((:a :href (generate-a-link)) "blorg")) + "'blorg'") + +(test-ps-js the-html-generator-3 + (document.write + (html ((:a :href "#" + :onclick (js-inline (transport))) "link"))) + "document.write('link')") + + +(run! 'ref-tests) addfile ./test-package.lisp hunk ./test-package.lisp 1 +(in-package :cl-user) + +(defpackage :js-test + (:use :common-lisp :js :5am) + (:shadowing-import-from :js :!) + (:export #:run-tests + #:make-reference-tests-dot-lisp)) addfile ./test.lisp hunk ./test.lisp 1 +(in-package :js-test) +;; Testcases for parenscript + +(defun trim-whitespace(str) + (string-trim '(#\Space #\Tab #\Newline) str)) + +(defmacro test-ps-js (testname parenscript javascript) + `(test ,testname () + (is (string= (trim-whitespace (js-to-string ',parenscript)) + (trim-whitespace ,javascript))))) + +(defun run-tests() + (run! 'ref-tests)) } [cleaned reference henrik.hjelte at poboxes.com**20051217095257] { hunk ./parenscript-test.asd 11 - :depends-on (:parenscript :fiveam) + :depends-on (:parenscript :fiveam :cl-ppcre) hunk ./ref2test.lisp 37 - (clean-quotes (str) - (substitute #\' #\" str :test #'char=)) hunk ./ref2test.lisp 62 - (print "Warning, separator not found")) + (format t "Ignoring:~a...~%" (left built 40))) hunk ./ref2test.lisp 64 - (print "Error , two separators found")) + (format t "Error , two separators found~%")) hunk ./ref2test.lisp 67 - (print "Skipping regex-test two")) + (format t "Skipping regex-test two~&")) hunk ./ref2test.lisp 69 - (format out-stream "(test-ps-js ~a-~a ~% ~a ~% ~S)~%~%" + (format out-stream "(test-ps-js ~a-~a ~% ~a ~% \"~a\")~%~%" hunk ./ref2test.lisp 72 - (clean-quotes (strip-indentation javascript-part js-indent-width)))) - (t (print "Error, should not be here")))))) + (strip-indentation javascript-part js-indent-width))) + (t (format t "Error, should not be here~%")))))) hunk ./reference-tests.lisp 53 +(test-ps-js string-literals-1 + "foobar" + "'foobar'") + +(test-ps-js string-literals-2 + "bratzel bub" + "'bratzel bub'") + hunk ./reference-tests.lisp 63 - "[ ]") + "[ ]") hunk ./reference-tests.lisp 112 - "this.a + this.b + this.c") + "this.a + this.b + this.c;") hunk ./reference-tests.lisp 118 +(test-ps-js literal-symbols-1 + T + "true") + hunk ./reference-tests.lisp 123 + FALSE + "false") + +(test-ps-js literal-symbols-3 hunk ./reference-tests.lisp 130 -(test-ps-js literal-symbols-3 +(test-ps-js literal-symbols-4 hunk ./reference-tests.lisp 134 -(test-ps-js literal-symbols-4 +(test-ps-js literal-symbols-5 hunk ./reference-tests.lisp 326 - "var A = [ 1, 2, 3 ]") + "var A = [ 1, 2, 3 ];") hunk ./reference-tests.lisp 362 - "for (var i = 0, l = blorg[i]; -i == blorg.length || l == 'Fumitastic'); + "for (var i = 0, l = blorg[i]; + !(i == blorg.length || l == 'Fumitastic'); hunk ./reference-tests.lisp 371 - "for (var i = 0; i != blorg.length; i = i++) { + "for (var i = 0; i < blorg.length; i = i + 1) { hunk ./reference-tests.lisp 378 - "var tmpArr1 = blorg; -for (var tmpI2 = 0; tmpI2 < tmpArr1.length; -pI2 = tmpI2++) { - var l = tmpArr1[tmpI2]; - document.write('L is ' + l); + "{ + var tmpArr1 = blorg; + for (var tmpI2 = 0; tmpI2 < tmpArr1.length; + tmpI2 = tmpI2 + 1) { + var l = tmpArr1[tmpI2]; + document.write('L is ' + l); + } hunk ./reference-tests.lisp 436 - "'blorg'") + "'blorg'") hunk ./reference-tests.lisp 440 - "'blorg'") + "'blorg'") hunk ./reference-tests.lisp 444 - (html ((:a :href "#" + (html ((:a :href "#" hunk ./reference-tests.lisp 446 - "document.write('link')") + "document.write +('link')") hunk ./reference.lisp 123 -"foobar" => "foobar" -"bratzel bub" => "bratzel bub" +"foobar" => 'foobar' + +"bratzel bub" => 'bratzel bub' hunk ./reference.lisp 148 -(array) => [ ] +(array) => [ ] hunk ./reference.lisp 154 - => [ [ 2, 3 ], [ "foobar", "bratzel bub" ] ] + => [ [ 2, 3 ], [ 'foobar', 'bratzel bub' ] ] hunk ./reference.lisp 167 - => new Array(new Array(2, 3), new Array("foobar", "bratzel bub")) + => new Array(new Array(2, 3), new Array('foobar', 'bratzel bub')) hunk ./reference.lisp 200 - => { foo : "bar", + => { foo : 'bar', hunk ./reference.lisp 206 - => { foo : "hihi", + => { foo : 'hihi', hunk ./reference.lisp 225 - => this.a + this.b + this.c + => this.a + this.b + this.c; hunk ./reference.lisp 262 + hunk ./reference.lisp 526 -(throw "foobar") => throw "foobar" +(throw "foobar") => throw 'foobar' hunk ./reference.lisp 558 - alert("blorg is a string: " + blorg); + alert('blorg is a string: ' + blorg); hunk ./reference.lisp 560 - alert("blorg is not a string"); + alert('blorg is not a string'); hunk ./reference.lisp 593 - alert("blorg is not correct!"); + alert('blorg is not correct!'); hunk ./reference.lisp 613 - alert("blorg is not correct!"); + alert('blorg is not correct!'); hunk ./reference.lisp 636 -(defvar *a* (array 1 2 3)) => var A = [ 1, 2, 3 ] +(defvar *a* (array 1 2 3)) => var A = [ 1, 2, 3 ]; hunk ./reference.lisp 644 - var blorg = "hallo"; + var blorg = 'hallo'; hunk ./reference.lisp 647 - var blorg = "blitzel"; + var blorg = 'blitzel'; hunk ./reference.lisp 660 - var blorg = "hallo"; + var blorg = 'hallo'; hunk ./reference.lisp 663 - var blorg = "blitzel"; + var blorg = 'blitzel'; hunk ./reference.lisp 709 - => for (var i = 0, l = blorg[i]; - !(i == blorg.length || l == "Fumitastic"); + => for (var i = 0, l = blorg[i]; + !(i == blorg.length || l == 'Fumitastic'); hunk ./reference.lisp 712 - document.write("L is " + l); + document.write('L is ' + l); hunk ./reference.lisp 720 - => for (var i = 0; i != blorg.length; i = i++) { - document.write("L is " + blorg[i]); + => for (var i = 0; i < blorg.length; i = i + 1) { + document.write('L is ' + blorg[i]); hunk ./reference.lisp 730 - => var tmpArr1 = blorg; - for (var tmpI2 = 0; tmpI2 < tmpArr1.length; - tmpI2 = tmpI2++) { - var l = tmpArr1[tmpI2]; - document.write("L is " + l); + => { + var tmpArr1 = blorg; + for (var tmpI2 = 0; tmpI2 < tmpArr1.length; + tmpI2 = tmpI2 + 1) { + var l = tmpArr1[tmpI2]; + document.write('L is ' + l); + } hunk ./reference.lisp 738 + hunk ./reference.lisp 747 - document.write(i + " is " + object[i]); + document.write(i + ' is ' + object[i]); hunk ./reference.lisp 780 - case 1: alert("one"); - case 2: alert("two"); - default: alert("default clause"); + case 1: alert('one'); + case 2: alert('two'); + default: alert('default clause'); hunk ./reference.lisp 803 - => with ({ foo : "foo", - i : "i" }) { - alert("i is now intermediary scoped: " + i); + => with ({ foo : 'foo', + i : 'i' }) { + alert('i is now intermediary scoped: ' + i); hunk ./reference.lisp 832 - throw "i"; + throw 'i'; hunk ./reference.lisp 834 - alert("an error happened: " + error); + alert('an error happened: ' + error); hunk ./reference.lisp 836 - alert("Leaving the try form"); + alert('Leaving the try form'); hunk ./reference.lisp 852 - => "blorg" + => 'blorg' hunk ./reference.lisp 855 - => "blorg" + => 'blorg' hunk ./reference.lisp 860 - (html ((:a :href "#" + (html ((:a :href "#" hunk ./reference.lisp 862 - => document.write("link") + => document.write + ('link') hunk ./test.lisp 7 +(defun same-space-between-statements(code) + (cl-ppcre:regex-replace-all "\\s*;\\s*" code (concatenate 'string (list #\; #\Newline)))) + +(defun no-indentation(code) + (cl-ppcre:regex-replace-all (cl-ppcre:create-scanner "^\\s*" :multi-line-mode t) code "")) + +(defun no-trailing-spaces(code) + (cl-ppcre:regex-replace-all (cl-ppcre:create-scanner "\\s*$" :multi-line-mode t) code "")) + +(defun normalize-js-code(str) + (trim-whitespace (no-indentation (no-trailing-spaces (same-space-between-statements str))))) + hunk ./test.lisp 21 - (is (string= (trim-whitespace (js-to-string ',parenscript)) - (trim-whitespace ,javascript))))) + (setf js::*var-counter* 0) + ;; is-macro expands its argument again when reporting failures, so + ;; the reported temporary js-variables get wrong if we don't evalute first. + (let ((generated-code (js-to-string ',parenscript)) + (js-code ,javascript)) + (is (string= (normalize-js-code generated-code) + (normalize-js-code js-code)))))) } [css-inline generator henrik.hjelte at poboxes.com**20051218111426] { hunk ./js-html.lisp 62 +(defun process-css-forms(proplist) + (optimize-string-list (butlast + (loop for propval on proplist by #'cddr appending + (list (string-downcase ( symbol-name (first propval))) + ":" + (second propval) + ";"))))) + + +(define-js-compiler-macro css-inline (&rest forms) + (js-compile-to-expression (cons '+ (process-css-forms forms)))) + hunk ./reference-tests.lisp 449 +(test-ps-js the-html-generator-4 + (css-inline :color "red" + :font-size "x-small") + "'color:red;font-size:x-small'") + +(test-ps-js the-html-generator-5 + (defun make-color-div(color-name) + (return (html ((:div :style (css-inline :color color-name)) + color-name " looks like this.")))) + "function makeColorDiv(colorName) { + return '
' + colorName + + ' looks like this.
'; +}") + hunk ./reference.lisp 842 +;;;t \index{CSS} +;;;t \index{CSS generation} + hunk ./reference.lisp 867 + +; (CSS-INLINE css-expression) + +;;; Stylesheets can also be created in ParenScript. + +(css-inline :color "red" + :font-size "x-small") + => 'color:red;font-size:x-small' + +(defun make-color-div(color-name) + (return (html ((:div :style (css-inline :color color-name)) + color-name " looks like this.")))) + => function makeColorDiv(colorName) { + return '
' + colorName + + ' looks like this.
'; + } } [bug in dwim-join henrik.hjelte at poboxes.com**20051218171724] { hunk ./js.lisp 122 - &key start end - join-before join-after - white-space (separator " ") + &key (start "") + end + (join-before "") + join-after + (white-space (make-string (length start) :initial-element #\Space)) + (separator " ") hunk ./js.lisp 133 - (unless start - (setf start "")) - - (unless join-before - (setf join-before "")) - hunk ./js.lisp 138 + (is-first t nil) hunk ./js.lisp 140 - (white-space (or white-space (make-string (length start) :initial-element #\Space))) hunk ./js.lisp 151 - hunk ./js.lisp 172 - (if cur-empty "" (concatenate 'string separator join-before)) + (if (or is-first (and cur-empty (string= join-before ""))) + "" (concatenate 'string separator join-before)) hunk ./js.lisp 189 - cur-elt (if (null res) - "" join-before) + cur-elt + (if (null res) + "" join-before) hunk ./js.lisp 194 - (cdr string-list)))) res)) + (cdr string-list)))) + res)) hunk ./js.lisp 481 - (dwim-join value-string-lists max-length :join-before op-string))) + (dwim-join value-string-lists max-length :join-before op-string) + )) hunk ./ref2test.lisp 99 - (format out-stream "~%(run! 'ref-tests)~%"))))) + (format out-stream "~%(run-tests)~%"))))) hunk ./reference-tests.lisp 464 -(run! 'ref-tests) +(run-tests) hunk ./test.lisp 2 + hunk ./test.lisp 31 - (run! 'ref-tests)) + (format t "Running reference tests:~&") + (run! 'ref-tests) + (format t "Running other tests:~&") + (run! 'ps-tests)) + +;;--------------------------------------------------------------------------- +(def-suite ps-tests) +(in-suite ps-tests) + +;; A problem with long nested operator, when the statement spanned several rows +;; the rows would not be joined together correctly. +(test-ps-js bug-dwim-join + (alert (html ((:div :id 777 + :style (css-inline :border "1pxsssssssssss" + :font-size "x-small" + :height (* 2 200) + :width (* 2 300)))))) + "alert +('
')") ;";This line should start with a plus character. } [bugfix slot-value henrik.hjelte at poboxes.com**20051219131901] { hunk ./js.lisp 730 - :slot (js-compile-to-symbol slot))) + :slot (js-compile slot))) hunk ./js.lisp 734 - (format nil ".~A" (symbol-to-js (sv-slot sv))))) + (if (symbolp (sv-slot sv)) + (format nil ".~A" (symbol-to-js (sv-slot sv))) + (format nil "[~A]" (first (js-to-strings (sv-slot sv) 0)))))) hunk ./js.lisp 1376 - hunk ./test.lisp 54 + +(test-ps-js simple-slot-value + (let ((foo (create :a 1))) + (alert (slot-value foo 'a))) + "{ + var foo = { a : 1 }; + alert(foo.a); + }") + +(test-ps-js buggy-slot-value + (let ((foo (create :a 1)) + (slot-name "a")) + (alert (slot-value foo slot-name))) + "{ + var foo = { a : 1 }; + var slotName = 'a'; + alert(foo[slotName]); + }"); Last line was alert(foo.slotName) before bug-fix. + +(test-ps-js buggy-slot-value-two + (slot-value foo (get-slot-name)) + "foo[getSlotName()]") + } Context: [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: 629c8b00ea6e22bbeaf2b1622c4265a92521dfe3 From mb at bese.it Mon Dec 19 16:01:39 2005 From: mb at bese.it (Marco Baringer) Date: Mon, 19 Dec 2005 17:01:39 +0100 Subject: [Bese-devel] Some patches for parenscript In-Reply-To: <1135002361.31100.39.camel@localhost.localdomain> (Henrik Hjelte's message of "Mon, 19 Dec 2005 15:26:01 +0100") References: <1135002361.31100.39.camel@localhost.localdomain> Message-ID: Henrik Hjelte writes: > Here are some patches for ParenScript: nice, very nice. > In order to make it less scary to change stuff, > I have made a function to make testcases of all the > code which is in the reference. So the file reference-tests.lisp > is autogenerated. excellent idea. > Then I cleaned the reference.lisp file from small typos and errors. > > The css generator that is in the parenscript project is lisp > server-side, so I made a corresponding little css generator that makes > it possible to generate style tags in parenscript. > > A bug in the function dwim-join (see the testcase in test.lisp) was > solved. The dwim-join function is not easy to understand, I hope I have > not created any new problems, but the reference tests run OK. > > Finally, what I consider a bug in the parenscript slot-value function > was solved. See the testcases in test.lisp. > > The pdf reference really ought to be updated, but I don't know latex so > I couldn't get the pbook script to work, I think there are some styles > missing. i haven't looked at the pbook stuff lately but once upon a time i was able to build the docs. > Merry christmas everyone, thanks for the christmas gift! -- -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 waldo at trianet.net Tue Dec 20 05:25:53 2005 From: waldo at trianet.net (Waldo Rubinstein) Date: Tue, 20 Dec 2005 00:25:53 -0500 Subject: [Bese-devel] Problem with UCW Message-ID: <35E3E1EA-5E71-4D06-845C-96005C471731@trianet.net> I just did a darcs pull of ucw_dev and when I try running UCW in sbcl (Mac OS), I get to a point: debugger invoked on a SIMPLE-ERROR: Error during processing of --eval option "(|LOAD| \"bin/start.lisp \")": erred while invoking # on # 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). If I continue with 1, it continues compiling until it repeats this with control-flow file, and then with a few other ones. Any ideas? Thanks, - Waldo From mb at bese.it Tue Dec 20 10:00:49 2005 From: mb at bese.it (Marco Baringer) Date: Tue, 20 Dec 2005 11:00:49 +0100 Subject: [Bese-devel] Problem with UCW In-Reply-To: <35E3E1EA-5E71-4D06-845C-96005C471731@trianet.net> (Waldo Rubinstein's message of "Tue, 20 Dec 2005 00:25:53 -0500") References: <35E3E1EA-5E71-4D06-845C-96005C471731@trianet.net> Message-ID: Waldo Rubinstein writes: > I just did a darcs pull of ucw_dev and when I try running UCW in sbcl > (Mac OS), I get to a point: > > debugger invoked on a SIMPLE-ERROR: > Error during processing of --eval option "(|LOAD| \"bin/start.lisp > \")": > > erred while invoking # on > # you need to figure out what compile-time error this is referering to (the error you're seeing is sbcl's way of saying "i'm trying to load a file which i wasn't able to compile"). if you look close enough you sholud see, somewhere, an erro message from sbcl. it'll probably be something regardig a failed macro expansion or a read-time form which barfed. -- -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 waldo at trianet.net Tue Dec 20 15:53:15 2005 From: waldo at trianet.net (Waldo Rubinstein) Date: Tue, 20 Dec 2005 10:53:15 -0500 Subject: [Bese-devel] Problem with UCW In-Reply-To: References: <35E3E1EA-5E71-4D06-845C-96005C471731@trianet.net> Message-ID: <44772154-3ECF-400A-8BB0-AF7D91BF6FD3@trianet.net> You're right. Apparently, the problem is somewhere control-flow.lisp. I loaded it on my machine (another Mac). Any suggestions? See below: This is SBCL 0.9.4, an implementation of ANSI Common Lisp. More information about SBCL is available at . SBCL is free software, provided as is, with absolutely no warranty. It is mostly in the public domain; some portions are provided under BSD-style licenses. See the CREDITS and COPYING files in the distribution for more information. ; loading system definition from ; /Users/waldo/.asdf-install-dir/systems/arnesi.asd into # ; registering # as ARNESI ; registering # as ARNESI.TEST ; registering # as ; ARNESI.CL-PPCRE-EXTRAS WARNING: Unimplemented MOP symbol: IT.BESE.ARNESI.MOPP:METAOBJECT STYLE-WARNING: implicitly creating new generic function EFFECTIVE- KEYWORD-NAME STYLE-WARNING: implicitly creating new generic function APPLY-LAMBDA/CC STYLE-WARNING: implicitly creating new generic function ENABLED-P STYLE-WARNING: implicitly creating new generic function LOG.LEVEL STYLE-WARNING: implicitly creating new generic function (SETF LOG.LEVEL) ; loading system definition from ; /Users/waldo/.asdf-install-dir/systems/ucw.asd into # ; registering # as UCW ; registering # as UCW.ADMIN ; registering # as UCW.EXAMPLES ; registering # as UCW.HTTPD ; registering # as UCW.MOD-LISP ; registering # as UCW.ASERVE ; registering # as UCW.ARANEIDA ; registering # as UCW.CL-ICU ; registering # as UCW.EXAMPLES.I18N ; loading system definition from ; /Users/waldo/.asdf-install-dir/systems/cl-ppcre.asd into ; # ; registering # as CL-PPCRE ; loading system definition from ; /Users/waldo/.asdf-install-dir/systems/parenscript.asd into ; # ; registering # as PARENSCRIPT ; loading system definition from ; /Users/waldo/.asdf-install-dir/systems/rfc2388.asd into ; # ; registering # as RFC2388 ; loading system definition from ; /Users/waldo/.asdf-install-dir/systems/iterate.asd into ; # ; registering # as ITERATE ; registering # as ITERATE-PG ; registering # as ITERATE-TESTS ; loading system definition from ; /Users/waldo/.asdf-install-dir/systems/swank.asd into # ; registering # as SWANK ; loading system definition from ; /Users/waldo/.asdf-install-dir/systems/yaclml.asd into # ; registering # as YACLML ; registering # as YACLML.TEST ;;; loading #P"/Users/waldo/.slime/fasl/sbcl-0.9.4-darwin-ppc/swank- backend.fasl" ;;; loading #P"/Users/waldo/.slime/fasl/sbcl-0.9.4-darwin-ppc/ nregex.fasl" ;;; loading #P"/Users/waldo/.slime/fasl/sbcl-0.9.4-darwin-ppc/swank- sbcl.fasl" STYLE-WARNING: redefining PREFERRED-COMMUNICATION-STYLE NIL in DEFMETHOD STYLE-WARNING: redefining CALL-WITHOUT-INTERRUPTS (T) in DEFMETHOD STYLE-WARNING: redefining LISP-IMPLEMENTATION-TYPE-NAME NIL in DEFMETHOD STYLE-WARNING: redefining CALL-WITH-SYNTAX-HOOKS (T) in DEFMETHOD STYLE-WARNING: redefining DEFAULT-READTABLE-ALIST NIL in DEFMETHOD STYLE-WARNING: redefining ARGLIST (T) in DEFMETHOD STYLE-WARNING: redefining INSTALL-DEBUGGER-GLOBALLY (T) in DEFMETHOD STYLE-WARNING: redefining CALL-WITH-DEBUGGER-HOOK (T T) in DEFMETHOD STYLE-WARNING: redefining FORMAT-SLDB-CONDITION (T) in DEFMETHOD STYLE-WARNING: redefining CONDITION-REFERENCES (T) in DEFMETHOD STYLE-WARNING: redefining UNPROFILE-ALL NIL in DEFMETHOD ;;; loading #P"/Users/waldo/.slime/fasl/sbcl-0.9.4-darwin-ppc/swank- source-path-parser.fasl" ;;; loading #P"/Users/waldo/.slime/fasl/sbcl-0.9.4-darwin-ppc/swank- source-file-cache.fasl" STYLE-WARNING: redefining BUFFER-FIRST-CHANGE (T) in DEFMETHOD ;;; loading #P"/Users/waldo/.slime/fasl/sbcl-0.9.4-darwin-ppc/swank- gray.fasl" STYLE-WARNING: implicitly creating new generic function STREAM-READ-CHAR-WILL- HANG-P ;;; loading #P"/Users/waldo/.slime/fasl/sbcl-0.9.4-darwin-ppc/ swank.fasl" STYLE-WARNING: implicitly creating new generic function INSPECT-BIGGER-PIECE- ACTIONS STYLE-WARNING: implicitly creating new generic function INSPECT-WHOLE-THING-ACTION STYLE-WARNING: implicitly creating new generic function INSPECT-SHOW- MORE-ACTION STYLE-WARNING: implicitly creating new generic function MENU-CHOICES-FOR- PRESENTATION WARNING: These Swank interfaces are unimplemented: (ACTIVATE-STEPPING ALL-THREADS CALLS-WHO DISASSEMBLE-FRAME FIND-THREAD INSPECT-FOR-EMACS INTERRUPT-THREAD RECEIVE RESTART-FRAME SEND SLDB-BREAK-AT-START SLDB-BREAK-ON-RETURN SPAWN THREAD-ID WHO-BINDS WHO-CALLS WHO-MACROEXPANDS WHO-REFERENCES WHO-SETS WHO-SPECIALIZES) STYLE-WARNING: implicitly creating new generic function JS-TO-STRINGS STYLE-WARNING: implicitly creating new generic function JS-TO- STATEMENT-STRINGS STYLE-WARNING: implicitly creating new generic function EXPRESSION- PRECEDENCE STYLE-WARNING: implicitly creating new generic function FUNCTION- START-STRING STYLE-WARNING: implicitly creating new generic function (SETF DEBUG- ON-ERROR) STYLE-WARNING: implicitly creating new generic function PLACE STYLE-WARNING: implicitly creating new generic function (SETF PLACE) STYLE-WARNING: implicitly creating new generic function CLONE-PLACE- VALUE STYLE-WARNING: implicitly creating new generic function SAVE-BACKTRACKED STYLE-WARNING: implicitly creating new generic function REINSTATE- BACKTRACKED STYLE-WARNING: implicitly creating new generic function BACKTRACK STYLE-WARNING: implicitly creating new generic function BACKTRACK-SLOT ; compiling file "/Users/waldo/dev/lisp/ucw_dev/src/rerl/standard- component/standard-component-class.lisp" (written 20 DEC 2005 12:21:51 AM): ; compiling (IN-PACKAGE :IT.BESE.UCW) ; compiling (DEFCLASS STANDARD-COMPONENT-CLASS ...) ; compiling (DEFMETHOD SB-MOP:VALIDATE-SUPERCLASS ...) ; compiling (DEFUN INITIALIZE-COMPONENT-CLASS-AFTER ...) ; compiling (DEFVAR *PRELIMINARY-MODIFIED-CLASSES* ...) ; compiling (DEFUN INITIALIZE-CLASS-METAOBJECT ...) ; compiling (DEFUN REINITIALIZE-CLASS-METAOBJECT ...) ; compiling (DEFMETHOD INITIALIZE-INSTANCE ...) ; compiling (DEFMETHOD REINITIALIZE-INSTANCE ...) ; compiling (DEFMETHOD SB-MOP:FINALIZE-INHERITANCE ...) ; compiling (DEFCLASS STANDARD-COMPONENT-DIRECT-SLOT ...) ; compiling (DEFGENERIC STANDARD-COMPONENT-DIRECT-SLOT-P ...) ; compiling (DEFMETHOD SB-MOP:DIRECT-SLOT-DEFINITION-CLASS ...) ; compiling (DEFCLASS STANDARD-COMPONENT-EFFECTIVE-SLOT ...) ; compiling (DEFMETHOD SB-MOP:EFFECTIVE-SLOT-DEFINITION-CLASS ...) ; compiling (DEFMETHOD SB-MOP:COMPUTE-EFFECTIVE-SLOT-DEFINITION ...) ; /Users/waldo/dev/lisp/ucw_dev/src/rerl/standard-component/standard- component-class.fasl written ; compilation finished in 0:00:02 ; compiling file "/Users/waldo/dev/lisp/ucw_dev/src/rerl/standard- component/standard-component.lisp" (written 20 DEC 2005 12:22:03 AM): ; compiling (IN-PACKAGE :IT.BESE.UCW) ; compiling (DEFCLASS STANDARD-COMPONENT ...) ; compiling (DEFUN INITIALIZE-BACKTRACKING ...) ; compiling (DEFUN INITIALIZE-COMPONENT-SLOTS ...) ; compiling (DEFUN INITIALIZE-PLACE-SLOT ...) ; compiling (DEFMETHOD SHARED-INITIALIZE ...) ; compiling (DEFMETHOD RENDER ...) ; compiling (DEFMETHOD RENDER ...) ; compiling (DEFMETHOD COMPUTE-URL ...) ; compiling (DEFMETHOD UPDATE-URL ...) ; compiling (DEFMETHOD RUN-ISOLATED ...) ; compiling (DEFMACRO DEFCOMPONENT ...) ; /Users/waldo/dev/lisp/ucw_dev/src/rerl/standard-component/standard- component.fasl written ; compilation finished in 0:00:01 STYLE-WARNING: implicitly creating new generic function RUN-ISOLATED ; compiling file "/Users/waldo/dev/lisp/ucw_dev/src/rerl/standard- component/control-flow.lisp" (written 20 DEC 2005 12:22:03 AM): ; compiling (IN-PACKAGE :IT.BESE.UCW) ; compiling (DEFMETHOD CALL-REQUEST-PATH ...) ; compiling (DEFMETHOD/CC CALL-COMPONENT ...) ; compiling (DEFMETHOD/CC CALL-COMPONENT ...) ; compiling (DEFMETHOD ANSWER-COMPONENT ...) ; compiling (DEFMETHOD JUMP-TO-COMPONENT ...) ; compiling (DEFGENERIC/CC REFRESH-COMPONENT ...) ; compiling (DEFACTION REFRESH-COMPONENT ...) ; file: /Users/waldo/dev/lisp/ucw_dev/src/rerl/standard-component/ control-flow.lisp ; in: DEFACTION REFRESH-COMPONENT ; ((IT.BESE.UCW::C IT.BESE.UCW:COMPONENT)) ; ; caught ERROR: ; illegal function call ; (IT.BESE.UCW:DEFACTION IT.BESE.UCW:REFRESH-COMPONENT ; ((IT.BESE.UCW::C IT.BESE.UCW:COMPONENT)) ; NIL) ; ; note: deleting unreachable code ; compiling (DEFGENERIC/CC OK ...) ; compiling (DEFACTION OK ...) ; file: /Users/waldo/dev/lisp/ucw_dev/src/rerl/standard-component/ control-flow.lisp ; in: DEFACTION OK ; ((IT.BESE.UCW::C IT.BESE.UCW:COMPONENT) &OPTIONAL ; (IT.BESE.UCW::VALUE IT.BESE.UCW::C)) ; ; caught ERROR: ; illegal function call ; (IT.BESE.UCW:ANSWER IT.BESE.UCW::VALUE) ; --> IT.BESE.UCW:ANSWER-COMPONENT ; ==> ; IT.BESE.UCW::VALUE ; ; note: deleting unreachable code ; /Users/waldo/dev/lisp/ucw_dev/src/rerl/standard-component/control- flow.fasl written ; compilation finished in 0:00:01 WARNING: COMPILE-FILE warned while performing # on #. debugger invoked on a SIMPLE-ERROR: Error during processing of --eval option "(|LOAD| \"bin/start.lisp \")": erred while invoking # on # 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)) #) 0] On Dec 20, 2005, at 5:00 AM, Marco Baringer wrote: > Waldo Rubinstein writes: > >> I just did a darcs pull of ucw_dev and when I try running UCW in sbcl >> (Mac OS), I get to a point: >> >> debugger invoked on a SIMPLE-ERROR: >> Error during processing of --eval option "(|LOAD| \"bin/start.lisp >> \")": >> >> erred while invoking # on >> # > > you need to figure out what compile-time error this is referering to > (the error you're seeing is sbcl's way of saying "i'm trying to load a > file which i wasn't able to compile"). > > if you look close enough you sholud see, somewhere, an erro message > from sbcl. it'll probably be something regardig a failed macro > expansion or a read-time form which barfed. > > -- > -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 Dec 20 18:28:43 2005 From: masmxx at gmail.com (Marco Monteiro) Date: Tue, 20 Dec 2005 18:28:43 +0000 Subject: [Bese-devel] Problem with UCW In-Reply-To: <35E3E1EA-5E71-4D06-845C-96005C471731@trianet.net> References: <35E3E1EA-5E71-4D06-845C-96005C471731@trianet.net> Message-ID: <3b5a0edf0512201028v226f60b0u5e8992d54a473ce4@mail.gmail.com> Have you tried to remove all *.fasl files of ucw? One problem similar to this one has stroke me and that solved it. Don't know why. Marco On 12/20/05, Waldo Rubinstein wrote: > > I just did a darcs pull of ucw_dev and when I try running UCW in sbcl > (Mac OS), I get to a point: > > debugger invoked on a SIMPLE-ERROR: > Error during processing of --eval option "(|LOAD| \"bin/start.lisp > \")": > > erred while invoking # on > # > > 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). > > If I continue with 1, it continues compiling until it repeats this > with control-flow file, and then with a few other ones. > > Any ideas? > > Thanks, > - Waldo > > _______________________________________________ > bese-devel mailing list > bese-devel at common-lisp.net > http://common-lisp.net/cgi-bin/mailman/listinfo/bese-devel > -------------- next part -------------- An HTML attachment was scrubbed... URL: From albertosantini at tiscali.it Tue Dec 20 18:51:24 2005 From: albertosantini at tiscali.it (Alberto Santini) Date: Tue, 20 Dec 2005 19:51:24 +0100 Subject: [Bese-devel] Problem with UCW In-Reply-To: <44772154-3ECF-400A-8BB0-AF7D91BF6FD3@trianet.net> References: <35E3E1EA-5E71-4D06-845C-96005C471731@trianet.net> <44772154-3ECF-400A-8BB0-AF7D91BF6FD3@trianet.net> Message-ID: I have Mac and sbcl 0.9.7. UCW works fine. I remember I had some problem with previous releases of sbcl with ucw_dev version of UCW. Regards, Alberto Santini On Dec 20, 2005, at 16:53 PM, Waldo Rubinstein wrote: > You're right. Apparently, the problem is somewhere control- > flow.lisp. I loaded it on my machine (another Mac). Any > suggestions? See below: From waldo at trianet.net Tue Dec 20 19:18:44 2005 From: waldo at trianet.net (Waldo Rubinstein) Date: Tue, 20 Dec 2005 14:18:44 -0500 Subject: [Bese-devel] Problem with UCW In-Reply-To: <3b5a0edf0512201028v226f60b0u5e8992d54a473ce4@mail.gmail.com> References: <35E3E1EA-5E71-4D06-845C-96005C471731@trianet.net> <3b5a0edf0512201028v226f60b0u5e8992d54a473ce4@mail.gmail.com> Message-ID: <162E62EE-240C-4B75-A2F3-93B41354F08C@trianet.net> I actually wiped the ucw_dev directory and got a fresh darcs copy. - Waldo On Dec 20, 2005, at 1:28 PM, Marco Monteiro wrote: > Have you tried to remove all *.fasl files of ucw? > One problem similar to this one has stroke me and that solved it. > Don't know why. > > Marco > > On 12/20/05, Waldo Rubinstein wrote: > I just did a darcs pull of ucw_dev and when I try running UCW in sbcl > (Mac OS), I get to a point: > > debugger invoked on a SIMPLE-ERROR: > Error during processing of --eval option "(|LOAD| \"bin/start.lisp > \")": > > erred while invoking # on > # > > 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). > > If I continue with 1, it continues compiling until it repeats this > with control-flow file, and then with a few other ones. > > Any ideas? > > Thanks, > - Waldo > > _______________________________________________ > bese-devel mailing list > bese-devel at common-lisp.net > http://common-lisp.net/cgi-bin/mailman/listinfo/bese-devel > -------------- next part -------------- An HTML attachment was scrubbed... URL: From waldo at trianet.net Tue Dec 20 20:52:54 2005 From: waldo at trianet.net (Waldo Rubinstein) Date: Tue, 20 Dec 2005 15:52:54 -0500 Subject: [Bese-devel] Problem with UCW In-Reply-To: References: <35E3E1EA-5E71-4D06-845C-96005C471731@trianet.net> <44772154-3ECF-400A-8BB0-AF7D91BF6FD3@trianet.net> Message-ID: <65FF7BFB-BE49-4BF6-908B-46F6DAA787EA@trianet.net> Ok. I also had to remove the fasl's of puri and, again, of ucw. Then it all compiled just fine. Thanks all, Waldo On Dec 20, 2005, at 2:50 PM, Waldo Rubinstein wrote: > I wasn't aware of version 0.9.7 of sbcl. > > I downloaded it, recompiled all the fasl's of iterate, yacml, > slime, arnesi_dev, rfc2388, parenscript, cl-ppcre. > > Then, after some compilation time, I still got an error. A > different one, but still an error. Any ideas? See below: > > ; /Users/waldo/dev/lisp/ucw_dev/src/rerl/standard-component/ > standard-component.fasl written > ; compilation finished in 0:00:01 > STYLE-WARNING: implicitly creating new generic function RUN-ISOLATED > ; compiling file "/Users/waldo/dev/lisp/ucw_dev/src/rerl/standard- > component/control-flow.lisp" (written 20 DEC 2005 02:33:36 PM): > ; compiling (IN-PACKAGE :IT.BESE.UCW) > ; compiling (DEFMETHOD CALL-REQUEST-PATH ...) > ; compiling (DEFMETHOD/CC CALL-COMPONENT ...) > ; compiling (DEFMETHOD/CC CALL-COMPONENT ...) > ; compiling (DEFMETHOD ANSWER-COMPONENT ...) > ; compiling (DEFMETHOD JUMP-TO-COMPONENT ...) > ; compiling (DEFGENERIC/CC REFRESH-COMPONENT ...) > ; compiling (DEFACTION REFRESH-COMPONENT ...) > ; file: /Users/waldo/dev/lisp/ucw_dev/src/rerl/standard-component/ > control-flow.lisp > ; in: DEFACTION REFRESH-COMPONENT > ; ((IT.BESE.UCW::C IT.BESE.UCW:COMPONENT)) > ; > ; caught ERROR: > ; illegal function call > > ; (IT.BESE.UCW:DEFACTION IT.BESE.UCW:REFRESH-COMPONENT > ; ((IT.BESE.UCW::C IT.BESE.UCW:COMPONENT)) > ; NIL) > ; > ; note: deleting unreachable code > > ; compiling (DEFGENERIC/CC OK ...) > ; compiling (DEFACTION OK ...) > ; file: /Users/waldo/dev/lisp/ucw_dev/src/rerl/standard-component/ > control-flow.lisp > ; in: DEFACTION OK > ; ((IT.BESE.UCW::C IT.BESE.UCW:COMPONENT) &OPTIONAL > ; (IT.BESE.UCW::VALUE IT.BESE.UCW::C)) > ; > ; caught ERROR: > ; illegal function call > > ; (IT.BESE.UCW:ANSWER IT.BESE.UCW::VALUE) > ; --> IT.BESE.UCW:ANSWER-COMPONENT > ; ==> > ; IT.BESE.UCW::VALUE > ; > ; note: deleting unreachable code > > > ; /Users/waldo/dev/lisp/ucw_dev/src/rerl/standard-component/control- > flow.fasl written > ; compilation finished in 0:00:00 > WARNING: > COMPILE-FILE warned while performing # > on > #. > > debugger invoked on a SIMPLE-ERROR: > Error during processing of --eval option "(|LOAD| \"bin/start.lisp > \")": > > erred while invoking # on > # > > 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)) #) > 0] > > On Dec 20, 2005, at 1:51 PM, Alberto Santini wrote: > >> I have Mac and sbcl 0.9.7. UCW works fine. >> I remember I had some problem with previous releases of sbcl with >> ucw_dev >> version of UCW. >> >> Regards, >> Alberto Santini >> >> On Dec 20, 2005, at 16:53 PM, Waldo Rubinstein wrote: >> >>> You're right. Apparently, the problem is somewhere control- >>> flow.lisp. I loaded it on my machine (another Mac). Any >>> suggestions? See below: >> _______________________________________________ >> bese-devel mailing list >> bese-devel at common-lisp.net >> http://common-lisp.net/cgi-bin/mailman/listinfo/bese-devel From dsalama at user.net Tue Dec 20 19:50:33 2005 From: dsalama at user.net (Daniel Salama) Date: Tue, 20 Dec 2005 14:50:33 -0500 Subject: [Bese-devel] Problem with UCW In-Reply-To: References: <35E3E1EA-5E71-4D06-845C-96005C471731@trianet.net> <44772154-3ECF-400A-8BB0-AF7D91BF6FD3@trianet.net> Message-ID: I wasn't aware of version 0.9.7 of sbcl. I downloaded it, recompiled all the fasl's of iterate, yacml, slime, arnesi_dev, rfc2388, parenscript, cl-ppcre. Then, after some compilation time, I still got an error. A different one, but still an error. Any ideas? See below: ; /Users/waldo/dev/lisp/ucw_dev/src/rerl/standard-component/standard- component.fasl written ; compilation finished in 0:00:01 STYLE-WARNING: implicitly creating new generic function RUN-ISOLATED ; compiling file "/Users/waldo/dev/lisp/ucw_dev/src/rerl/standard- component/control-flow.lisp" (written 20 DEC 2005 02:33:36 PM): ; compiling (IN-PACKAGE :IT.BESE.UCW) ; compiling (DEFMETHOD CALL-REQUEST-PATH ...) ; compiling (DEFMETHOD/CC CALL-COMPONENT ...) ; compiling (DEFMETHOD/CC CALL-COMPONENT ...) ; compiling (DEFMETHOD ANSWER-COMPONENT ...) ; compiling (DEFMETHOD JUMP-TO-COMPONENT ...) ; compiling (DEFGENERIC/CC REFRESH-COMPONENT ...) ; compiling (DEFACTION REFRESH-COMPONENT ...) ; file: /Users/waldo/dev/lisp/ucw_dev/src/rerl/standard-component/ control-flow.lisp ; in: DEFACTION REFRESH-COMPONENT ; ((IT.BESE.UCW::C IT.BESE.UCW:COMPONENT)) ; ; caught ERROR: ; illegal function call ; (IT.BESE.UCW:DEFACTION IT.BESE.UCW:REFRESH-COMPONENT ; ((IT.BESE.UCW::C IT.BESE.UCW:COMPONENT)) ; NIL) ; ; note: deleting unreachable code ; compiling (DEFGENERIC/CC OK ...) ; compiling (DEFACTION OK ...) ; file: /Users/waldo/dev/lisp/ucw_dev/src/rerl/standard-component/ control-flow.lisp ; in: DEFACTION OK ; ((IT.BESE.UCW::C IT.BESE.UCW:COMPONENT) &OPTIONAL ; (IT.BESE.UCW::VALUE IT.BESE.UCW::C)) ; ; caught ERROR: ; illegal function call ; (IT.BESE.UCW:ANSWER IT.BESE.UCW::VALUE) ; --> IT.BESE.UCW:ANSWER-COMPONENT ; ==> ; IT.BESE.UCW::VALUE ; ; note: deleting unreachable code ; /Users/waldo/dev/lisp/ucw_dev/src/rerl/standard-component/control- flow.fasl written ; compilation finished in 0:00:00 WARNING: COMPILE-FILE warned while performing # on #. debugger invoked on a SIMPLE-ERROR: Error during processing of --eval option "(|LOAD| \"bin/start.lisp \")": erred while invoking # on # 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)) #) 0] On Dec 20, 2005, at 1:51 PM, Alberto Santini wrote: > I have Mac and sbcl 0.9.7. UCW works fine. > I remember I had some problem with previous releases of sbcl with > ucw_dev > version of UCW. > > Regards, > Alberto Santini > > On Dec 20, 2005, at 16:53 PM, Waldo Rubinstein wrote: > >> You're right. Apparently, the problem is somewhere control- >> flow.lisp. I loaded it on my machine (another Mac). Any >> suggestions? See below: > _______________________________________________ > bese-devel mailing list > bese-devel at common-lisp.net > http://common-lisp.net/cgi-bin/mailman/listinfo/bese-devel Daniel Salama dsalama at user.net Voice: (954) 655-8051 Fax : (954) 252-3988 ------------------------ This e-mail contains information which may be confidential and privileged. Unless you are the addressee (or authorized to receive for the addressee), you may not use, copy or disclose to anyone the message or any information contained in the message. If you have received the message in error, please advise the sender by reply e-mail to dsalama at user.net or tel. +1-954-655-8051 and delete the material from any computer. From hoan at ton-that.org Thu Dec 22 02:06:36 2005 From: hoan at ton-that.org (Hoan Ton-That) Date: Thu, 22 Dec 2005 13:06:36 +1100 Subject: [Bese-devel] Tasks Message-ID: Hey everyone, I've written an insy-winsy macro for tasks. (defmacro deftask (name &body body) `(progn (defcomponent ,name (task-component) ()) ;; We use `self' as the magic variable, so tasks can answer. (defaction start ((self ,name)) , at body) ',name)) Does anyone add extra slots to the task component? Hoan From waldo at trianet.net Thu Dec 22 03:05:58 2005 From: waldo at trianet.net (Waldo Rubinstein) Date: Wed, 21 Dec 2005 22:05:58 -0500 Subject: [Bese-devel] Tasks In-Reply-To: References: Message-ID: <1F985891-47A8-43DB-845F-30FC6336827A@trianet.net> If you don't mind me asking, what is a task and where can I read about them? Thanks, Waldo On Dec 21, 2005, at 9:06 PM, Hoan Ton-That wrote: > Hey everyone, > > I've written an insy-winsy macro for tasks. > > (defmacro deftask (name &body body) > `(progn > (defcomponent ,name (task-component) > ()) > ;; We use `self' as the magic variable, so tasks can answer. > (defaction start ((self ,name)) > , at body) > ',name)) > > Does anyone add extra slots to the task component? > > Hoan > _______________________________________________ > bese-devel mailing list > bese-devel at common-lisp.net > http://common-lisp.net/cgi-bin/mailman/listinfo/bese-devel From joesb.coe9 at gmail.com Wed Dec 21 07:04:54 2005 From: joesb.coe9 at gmail.com (JoeSB COE9) Date: Wed, 21 Dec 2005 14:04:54 +0700 Subject: [Bese-devel] Patch: CLISP string encoding Message-ID: Hi, This is patch to make Arnesi_dev compile over CLISP 2.36 on Windows. It fixed two things - CHARSET:UTF-16 encoding is only available where there is GNU libc or libiconv, may be it is nolonger supported on Win32. Use CHARSET:UCS-2 instead, works for most character. - ext:convert-bytes-to-string name is changed to ext:convert-string-from-bytes --------------------------------------------- { hunk ./src/string.lisp 136 - (:utf-16 charset:utf-16) + #-win32(:utf-16 charset:utf-16) hunk ./src/string.lisp 143 - (ext:convert-bytes-to-string octets (encoding-keyword-to-native encoding))) ) + (ext:convert-string-from-bytes octets (encoding-keyword-to-native encoding) ))) } ---------------------------------------------- Pisin Bootvong, From a_bakic at yahoo.com Thu Dec 22 10:54:58 2005 From: a_bakic at yahoo.com (Aleksandar Bakic) Date: Thu, 22 Dec 2005 02:54:58 -0800 (PST) Subject: [Bese-devel] Tasks In-Reply-To: Message-ID: <20051222105458.57088.qmail@web34609.mail.mud.yahoo.com> Hi, > (defmacro deftask (name &body body) > `(progn > (defcomponent ,name (task-component) > ()) [...] > Does anyone add extra slots to the task component? Sure, I use task-component as a mixin or a superclass of mixins. I mean, a task-component subclass often has additional slots. Alex __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From tongucyumruk at member.fsf.org Fri Dec 23 21:08:21 2005 From: tongucyumruk at member.fsf.org (Tonguc Yumruk) Date: Fri, 23 Dec 2005 23:08:21 +0200 Subject: [Bese-devel] Reddit in UCW Message-ID: <20051223210818.GA10417@terra.galaxy> Hi, After watching the Reddit in 20 Minutes video [1] from Sven Van Caekenberghe [2] I decided to write a UCW version of it. It took about 45 minutes to write it (remember, I'm a newbie). So, the code is available here [3] for download. [1] http://homepage.mac.com/svc/LispMovies/index.html [2] http://homepage.mac.com/svc/ [3] http://tonguc.ath.cx/reddit.lisp -- Love Respect GNU/Linux ######################################################################## * joeyh_ wonders if linux is supposed to lock up when you ask 100 processes to cat the entire cd drive ######################################################################## Tongu? Yumruk -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: Digital signature URL: From ml13 at onlinehome.de Tue Dec 27 13:38:20 2005 From: ml13 at onlinehome.de (ml13 at onlinehome.de) Date: Tue, 27 Dec 2005 14:38:20 +0100 Subject: [Bese-devel] CPS + loop Message-ID: Hi, I was toying around with simple choose and fail, which was basically working fine, but when I introduced loop, things broke... I'd be happy about any comments on the code snippet below, specifically I am wondering, whether this loop thing is to be considered a bug of the CPS transformer or a problem in my code. Cheers, Kilian Sprotte (setq *call/cc-returns* t) ;; => T (defvar ks nil "continuation stack") ;; => KS (defun/cc choose123 () (block nil (let/cc k (push k ks) (return 1)) (let/cc k (push k ks) (return 2)) 3)) ;; => CHOOSE123 (defun/cc fail () (if ks (kall (pop ks)) :fail)) ;; => FAIL (defun next () (with-call/cc (fail))) ;; => NEXT (with-call/cc (setq ks nil) (let ((l (list (choose123) (choose123) (choose123)))) (if (not (= 4 (apply #'+ l))) (fail) l))) ;; => (1 1 2) (next) ;; => (1 2 1) (next) ;; => (2 1 1) (next) ;; => :FAIL ;; so far so good... ;; let's try with loop (with-call/cc (setq ks nil) (let ((l (loop repeat 3 collect (choose123)))) (if (not (= 4 (apply #'+ l))) (fail) l))) ;; => (1 1 2) (next) ;; => (1 3) (next) ;; => :FAIL From a_bakic at yahoo.com Wed Dec 28 13:21:59 2005 From: a_bakic at yahoo.com (Aleksandar Bakic) Date: Wed, 28 Dec 2005 05:21:59 -0800 (PST) Subject: [Bese-devel] checkboxes Message-ID: <20051228132159.55643.qmail@web34612.mail.mud.yahoo.com> Hi, When a checkbox is off in a form, its value is not submitted as part of the http request. This means that the corresponding ucw callback is not called at all in this case. Has anyone found a nice solution to this problem in ucw? Thanks, Alex __________________________________________ Yahoo! DSL ? Something to write home about. Just $16.99/mo. or less. dsl.yahoo.com From waldo at trianet.net Wed Dec 28 14:39:32 2005 From: waldo at trianet.net (Waldo Rubinstein) Date: Wed, 28 Dec 2005 09:39:32 -0500 Subject: [Bese-devel] checkboxes In-Reply-To: <20051228132159.55643.qmail@web34612.mail.mud.yahoo.com> References: <20051228132159.55643.qmail@web34612.mail.mud.yahoo.com> Message-ID: <39D86AD8-A3B6-4B66-A12E-E132A2F5CF0F@trianet.net> Alex, I learned this trick when using Ruby on Rails. Basically, you create a hidden field of the same name as the checkbox AFTER the actual input tag with a value for when the check box is off. This way, when the form is submitted, the user did not select the check box you will get the "off" value and if the user selected the check box, you will receive the on value. Feel free to read here: http://api.rubyonrails.org/classes/ActionView/Helpers/ FormHelper.html#M000346 - Waldo On Dec 28, 2005, at 8:21 AM, Aleksandar Bakic wrote: > Hi, > > When a checkbox is off in a form, its value is not submitted as > part of the > http request. This means that the corresponding ucw callback is not > called at > all in this case. Has anyone found a nice solution to this problem > in ucw? > > Thanks, > Alex > > > > __________________________________________ > Yahoo! DSL ? Something to write home about. > Just $16.99/mo. or less. > dsl.yahoo.com > > _______________________________________________ > bese-devel mailing list > bese-devel at common-lisp.net > http://common-lisp.net/cgi-bin/mailman/listinfo/bese-devel From svg at surnet.ru Wed Dec 28 15:01:26 2005 From: svg at surnet.ru (Vladimir Sekissov) Date: Wed, 28 Dec 2005 20:01:26 +0500 (YEKT) Subject: [Bese-devel] checkboxes In-Reply-To: <20051228132159.55643.qmail@web34612.mail.mud.yahoo.com> References: <20051228132159.55643.qmail@web34612.mail.mud.yahoo.com> Message-ID: <20051228.200126.23811684.svg@surnet.ru> Good day, a_bakic> When a checkbox is off in a form, its value is not submitted as part of the a_bakic> http request. This means that the corresponding ucw callback is not called at a_bakic> all in this case. Has anyone found a nice solution to this problem in ucw? Checkbox values are T or NIL. Changed value will be a string. You can use this to check was value changed or not. Probably something like: (defmethod coerce-client-value ((e checkbox-element) value) (unless (stringp value) ; value unchanged, return NIL (when (call-next-method) (setf (slot-value e 'client-value) t) t))) Best Regards, Vladimir Sekissov From svg at surnet.ru Wed Dec 28 15:12:08 2005 From: svg at surnet.ru (Vladimir Sekissov) Date: Wed, 28 Dec 2005 20:12:08 +0500 (YEKT) Subject: [Bese-devel] checkboxes In-Reply-To: <20051228.200126.23811684.svg@surnet.ru> References: <20051228132159.55643.qmail@web34612.mail.mud.yahoo.com> <20051228.200126.23811684.svg@surnet.ru> Message-ID: <20051228.201208.191554175.svg@surnet.ru> svg> (defmethod coerce-client-value ((e checkbox-element) value) svg> (unless (stringp value) ; value unchanged, return NIL svg> (when (call-next-method) svg> (setf (slot-value e 'client-value) t) svg> t))) Sorry, typo: (defmethod coerce-client-value ((e checkbox-element) value) (when (and (stringp value) ; when value unchanged, return NIL (call-next-method)) (setf (slot-value e 'client-value) t) t)) Best Regards, Vladimir Sekissov From a_bakic at yahoo.com Wed Dec 28 15:12:38 2005 From: a_bakic at yahoo.com (Aleksandar Bakic) Date: Wed, 28 Dec 2005 07:12:38 -0800 (PST) Subject: [Bese-devel] checkboxes In-Reply-To: <39D86AD8-A3B6-4B66-A12E-E132A2F5CF0F@trianet.net> Message-ID: <20051228151238.25323.qmail@web34605.mail.mud.yahoo.com> > input tag with a value for when the check box is off. This way, when > the form is submitted, the user did not select the check box you will > get the "off" value and if the user selected the check box, you will > receive the on value. Thanks. I am a bit puzzled by the solution -- is there any standard document saying that this is how clients should behave? I am playing with ucw::call-callbacks and friends. I read elsewhere about server-side reset methods, so I am trying to add "reset callbacks", which should be called before other callbacks, to clear checkboxes. However, one has to be careful about when to call a "reset callback", i.e., not to call it unless a form is submitted. (Otherwise, it is a mess.) Alex __________________________________________ Yahoo! DSL ? Something to write home about. Just $16.99/mo. or less. dsl.yahoo.com From a_bakic at yahoo.com Wed Dec 28 15:16:02 2005 From: a_bakic at yahoo.com (Aleksandar Bakic) Date: Wed, 28 Dec 2005 07:16:02 -0800 (PST) Subject: [Bese-devel] checkboxes In-Reply-To: <20051228.201208.191554175.svg@surnet.ru> Message-ID: <20051228151602.11942.qmail@web34614.mail.mud.yahoo.com> Thanks, but I believe I have this part of the machinery (in the same or similar form). The problem is that the method does not get called at all when the user unchecks a checkbox, because the client does not send that parameter back to the server. (Am I missing somethig?) Alex __________________________________________ Yahoo! DSL ? Something to write home about. Just $16.99/mo. or less. dsl.yahoo.com From svg at surnet.ru Wed Dec 28 15:34:03 2005 From: svg at surnet.ru (Vladimir Sekissov) Date: Wed, 28 Dec 2005 20:34:03 +0500 (YEKT) Subject: [Bese-devel] checkboxes In-Reply-To: <20051228151602.11942.qmail@web34614.mail.mud.yahoo.com> References: <20051228.201208.191554175.svg@surnet.ru> <20051228151602.11942.qmail@web34614.mail.mud.yahoo.com> Message-ID: <20051228.203403.11642681.svg@surnet.ru> a_bakic> Thanks, but I believe I have this part of the machinery (in the same or similar a_bakic> form). The problem is that the method does not get called at all when the user a_bakic> unchecks a checkbox, because the client does not send that parameter back to a_bakic> the server. (Am I missing somethig?) By default client set only client-value slot directly so no methods are triggering. Try (read-client-value element) to get the desired value. read-client-value chain: - for element: client-value -> filter-client-value -> coerce-client-value => value (input-filter) - for form: client-value => ((slot-name . (read-client-value (slot-value form slot-name)))*) Best Regards, Vladimir Sekissov From a_bakic at yahoo.com Wed Dec 28 15:44:17 2005 From: a_bakic at yahoo.com (Aleksandar Bakic) Date: Wed, 28 Dec 2005 07:44:17 -0800 (PST) Subject: [Bese-devel] checkboxes In-Reply-To: <20051228151238.25323.qmail@web34605.mail.mud.yahoo.com> Message-ID: <20051228154417.44460.qmail@web34611.mail.mud.yahoo.com> > Thanks. I am a bit puzzled by the solution -- is there any standard document > saying that this is how clients should behave? Actully, it is probably correct: a client may send multiple parameters with the same name. In src/backend/araneida.lisp, get-param uses assoc and gets the first one sent by the client. Alex __________________________________________ Yahoo! DSL ? Something to write home about. Just $16.99/mo. or less. dsl.yahoo.com From a_bakic at yahoo.com Wed Dec 28 16:25:25 2005 From: a_bakic at yahoo.com (Aleksandar Bakic) Date: Wed, 28 Dec 2005 08:25:25 -0800 (PST) Subject: [Bese-devel] checkboxes In-Reply-To: <20051228154417.44460.qmail@web34611.mail.mud.yahoo.com> Message-ID: <20051228162525.8645.qmail@web34606.mail.mud.yahoo.com> > Actully, it is probably correct: a client may send multiple parameters with > the > same name. In src/backend/araneida.lisp, get-param uses assoc and gets the > first one sent by the client. It turns out that it is better to put the hidden field first (unless the checkbox is disabled), which will reset the checkbox first (because its callback is called first by call-callbacks/map-params). If the hidden param is followed by an "on" one, its callback will be called next. With this solution, note however that get-param, and its callers such as with-request-params, may not work well with checkboxes. Alex __________________________________________ Yahoo! DSL ? Something to write home about. Just $16.99/mo. or less. dsl.yahoo.com From a_bakic at yahoo.com Wed Dec 28 16:34:03 2005 From: a_bakic at yahoo.com (Aleksandar Bakic) Date: Wed, 28 Dec 2005 08:34:03 -0800 (PST) Subject: [Bese-devel] checkboxes In-Reply-To: <20051228154417.44460.qmail@web34611.mail.mud.yahoo.com> Message-ID: <20051228163403.42429.qmail@web34614.mail.mud.yahoo.com> > Actully, it is probably correct: a client may send multiple parameters with > the > same name. In src/backend/araneida.lisp, get-param uses assoc and gets the > first one sent by the client. The question is, does the client send multiple checkbox params, as claimed in http://academ.hvcc.edu/~kantopet/old/xhtml/index.php?page=xhtml+selection+fields&parent=xhtml+forms or not? The latter seems to be the case. Alex __________________________________ Yahoo! for Good - Make a difference this year. http://brand.yahoo.com/cybergivingweek2005/ From a_bakic at yahoo.com Wed Dec 28 16:51:02 2005 From: a_bakic at yahoo.com (Aleksandar Bakic) Date: Wed, 28 Dec 2005 08:51:02 -0800 (PST) Subject: [Bese-devel] checkboxes In-Reply-To: <20051228163403.42429.qmail@web34614.mail.mud.yahoo.com> Message-ID: <20051228165102.58145.qmail@web34604.mail.mud.yahoo.com> > The question is, does the client send multiple checkbox params, as claimed in > > http://academ.hvcc.edu/~kantopet/old/xhtml/index.php?page=xhtml+selection+fields&parent=xhtml+forms > > or not? The latter seems to be the case. I got it working, somehow... I'll try to find a better solution when I get a chance, though. Alex __________________________________ Yahoo! for Good - Make a difference this year. http://brand.yahoo.com/cybergivingweek2005/ From waldo at trianet.net Thu Dec 29 04:30:27 2005 From: waldo at trianet.net (Waldo Rubinstein) Date: Wed, 28 Dec 2005 23:30:27 -0500 Subject: [Bese-devel] checkboxes In-Reply-To: <20051228151238.25323.qmail@web34605.mail.mud.yahoo.com> References: <20051228151238.25323.qmail@web34605.mail.mud.yahoo.com> Message-ID: I can't say I have read documentation about it, but I have used it in the past and it has worked in just about every browser version I've used as well as my clients. - Waldo On Dec 28, 2005, at 10:12 AM, Aleksandar Bakic wrote: > Thanks. I am a bit puzzled by the solution -- is there any standard > document > saying that this is how clients should behave? -------------- next part -------------- An HTML attachment was scrubbed... URL: From peter.schuller at infidyne.com Thu Dec 29 18:37:36 2005 From: peter.schuller at infidyne.com (Peter Schuller) Date: Thu, 29 Dec 2005 19:37:36 +0100 Subject: [Bese-devel] Developing with ucw without threads Message-ID: <20051229183735.GA78388@starfury.scode.org> Hello, lack of threads means UCW cannot start the swank server. How do people develop UCW applications in an environment without threads, without having to restart UCW all the time (after making changes)? -- / Peter Schuller, InfiDyne Technologies HB PGP userID: 0xE9758B7D or 'Peter Schuller ' Key retrieval: Send an E-Mail to getpgpkey at scode.org E-Mail: peter.schuller at infidyne.com Web: http://www.scode.org From a_bakic at yahoo.com Thu Dec 29 23:46:29 2005 From: a_bakic at yahoo.com (Aleksandar Bakic) Date: Thu, 29 Dec 2005 15:46:29 -0800 (PST) Subject: [Bese-devel] clone-backtracks question Message-ID: <20051229234629.72037.qmail@web34608.mail.mud.yahoo.com> Hi, I hit a case (hard to debug and reproduce) when copy-tree seems to get into an infinite recursion. I suspect that happens in clone-backtracks (places and slots are being copied), because I am not aware of other calls to copy-tree. Has anyone seen this situation before; any suggestions? Thanks, Alex __________________________________________ Yahoo! DSL ? Something to write home about. Just $16.99/mo. or less. dsl.yahoo.com From pjb at informatimago.com Fri Dec 30 08:40:24 2005 From: pjb at informatimago.com (Pascal Bourguignon) Date: Fri, 30 Dec 2005 09:40:24 +0100 Subject: [Bese-devel] Developing with ucw without threads In-Reply-To: <20051229183735.GA78388@starfury.scode.org> References: <20051229183735.GA78388@starfury.scode.org> Message-ID: <17332.62072.878354.934800@thalassa.informatimago.com> Peter Schuller writes: > lack of threads means UCW cannot start the swank server. How do people > develop UCW applications in an environment without threads, without > having to restart UCW all the time (after making changes)? I just interrupt ucw, and while in the debugger, load the new functions, then continue. -- __Pascal Bourguignon__ http://www.informatimago.com/ Wanna go outside. Oh, no! Help! I got outside! Let me back inside! From peter.schuller at infidyne.com Sat Dec 31 15:39:24 2005 From: peter.schuller at infidyne.com (Peter Schuller) Date: Sat, 31 Dec 2005 16:39:24 +0100 Subject: [Bese-devel] Developing with ucw without threads In-Reply-To: <17332.62072.878354.934800@thalassa.informatimago.com> References: <20051229183735.GA78388@starfury.scode.org> <17332.62072.878354.934800@thalassa.informatimago.com> Message-ID: <20051231153923.GB98412@starfury.scode.org> > > lack of threads means UCW cannot start the swank server. How do people > > develop UCW applications in an environment without threads, without > > having to restart UCW all the time (after making changes)? > > I just interrupt ucw, and while in the debugger, load the new > functions, then continue. Alright. Thanks! -- / Peter Schuller, InfiDyne Technologies HB PGP userID: 0xE9758B7D or 'Peter Schuller ' Key retrieval: Send an E-Mail to getpgpkey at scode.org E-Mail: peter.schuller at infidyne.com Web: http://www.scode.org