From stesch at no-spoon.de Tue Mar 1 15:03:37 2005 From: stesch at no-spoon.de (Stefan Scholl) Date: Tue, 1 Mar 2005 16:03:37 +0100 Subject: [tbnl-devel] Handling HTTP errors In-Reply-To: <20040731001011.GH4076@parsec.no-spoon.de> References: <20040731001011.GH4076@parsec.no-spoon.de> Message-ID: <20050301150337.GU29337@parsec.no-spoon.de> Hi! On 2004-07-31 02:10:11, Stefan Scholl wrote: > Function send-output in modlisp.lisp handles the response for > different return codes. E. g. there's a "The requested URL ~A was > not found on this server." for the 404 (+http-not-found+). > > How about letting the user change this behavior? > > One could explain the error to the user. Maybe in another > language. > > Or think of all the funny 404 games. Remember the SGI babies? I've implemented a very easy solution for this: [Special variable] *http-error-handler* This variable holds NIL or a function designator. The function gets called with an error code other than +http-ok+ or +http-not-modified+ and can return the content of an error page. Return NIL if the submitted error can't be handled. (Note that the handler function can access the request and reply data.) Now my own error handler can see if it has something to say. Checking error code and maybe some further data from the request. Very KISS. Patch attached. Regards, Stefan -------------- next part -------------- diff -ru --exclude='*.fasl' --exclude='*~' tbnl-0.3.11/doc/index.html tbnl-0.3.11-stesch/doc/index.html --- tbnl-0.3.11/doc/index.html 2005-03-01 15:46:11.746925000 +0100 +++ tbnl-0.3.11-stesch/doc/index.html 2005-03-01 15:56:07.729322000 +0100 @@ -223,6 +223,7 @@
  • http-token-p
  • *tmp-directory*
  • *save-raw-post-data-p* +
  • *http-error-handler*
  • Debugging TBNL applications
      @@ -1521,6 +1522,17 @@ saved and may be retrieved with RAW-POST-DATA. +


      [Special variable] +
      *http-error-handler* + +


      +This variable holds NIL or a function designator. The function gets called with an error code +other than +http-ok+ or +http-not-modified+ and can return the content of an +error page. Return NIL if the submitted error can't be handled.
      +(Note that the handler function can access the request and reply data.) +
      +

      Debugging TBNL applications

      If you want to debug your TBNL applications it is recommend that you start Apache (i.e. the httpd binary) with the -X command-line option. Then set *DEBUG-MODE* to a true value and poke around in the listener. Good luck... :) diff -ru --exclude='*.fasl' --exclude='*~' tbnl-0.3.11/modlisp.lisp tbnl-0.3.11-stesch/modlisp.lisp --- tbnl-0.3.11/modlisp.lisp 2005-03-01 15:05:31.000000000 +0100 +++ tbnl-0.3.11-stesch/modlisp.lisp 2005-03-01 15:31:08.000000000 +0100 @@ -51,26 +51,30 @@ return-code +http-internal-server-error+ status-line (status-line return-code))) (unless (member return-code `(,+http-ok+ ,+http-not-modified+)) - ;; handle common return codes other than 200 - (setf (content-type *reply*) + ;; Call error handler, if any. Should return nil if it can't handle the error. + (when *http-error-handler* + (setq content (funcall *http-error-handler* return-code))) + ;; handle common return codes other than 200, which weren't handled by the error handler. + (unless content + (setf (content-type *reply*) "text/html; charset=iso-8859-1" - content + content (format nil "~D ~A

      ~A

      ~A


      ~A / mod_lisp~A/~A / TBNL ~A (~A ~A) at ~A Port ~D

      " return-code status-line status-line (case return-code ((#.+http-internal-server-error+) - content) + content) ((#.+http-moved-temporarily+ #.+http-moved-permanently+) - (format nil "The document has moved here" - (header-out "Location"))) + (format nil "The document has moved here" + (header-out "Location"))) ((#.+http-authorization-required+) - "The server could not verify that you are authorized to access the document requested. Either you supplied the wrong credentials \(e.g., bad password), or your browser doesn't understand how to supply the credentials required.") + "The server could not verify that you are authorized to access the document requested. Either you supplied the wrong credentials \(e.g., bad password), or your browser doesn't understand how to supply the credentials required.") ((#.+http-forbidden+) - (format nil "You don't have permission to access ~A on this server." - (script-name))) + (format nil "You don't have permission to access ~A on this server." + (script-name))) ((#.+http-not-found+) - (format nil "The requested URL ~A was not found on this server." - (script-name)))) + (format nil "The requested URL ~A was not found on this server." + (script-name)))) (or (header-in "server-baseversion") "Apache") (or (header-in "modlisp-major-version") "") (or (header-in "modlisp-version") "") @@ -79,7 +83,7 @@ (lisp-implementation-type) (lisp-implementation-version) (host *request*) - (server-port :request *request*)))) + (server-port :request *request*))))) ;; start with status line (write-header-line "Status" (format nil "~d ~a" return-code status-line)) ;; if there's content write the corresponding headers diff -ru --exclude='*.fasl' --exclude='*~' tbnl-0.3.11/packages.lisp tbnl-0.3.11-stesch/packages.lisp --- tbnl-0.3.11/packages.lisp 2005-03-01 15:24:13.000000000 +0100 +++ tbnl-0.3.11-stesch/packages.lisp 2005-03-01 15:32:00.000000000 +0100 @@ -40,6 +40,7 @@ #:*error* #:*default-content-type* #:*default-handler* + #:*http-error-handler* #:*default-log-level* #:*dispatch-table* #:*lisp-errors-log-level* diff -ru --exclude='*.fasl' --exclude='*~' tbnl-0.3.11/specials.lisp tbnl-0.3.11-stesch/specials.lisp --- tbnl-0.3.11/specials.lisp 2005-03-01 15:23:57.000000000 +0100 +++ tbnl-0.3.11-stesch/specials.lisp 2005-03-01 15:27:46.000000000 +0100 @@ -242,6 +242,9 @@ (defparameter *default-handler* 'default-handler "The name of the function which is always returned by DEFAULT-DISPATCHER.") +(defvar *http-error-handler* nil + "A list of error dispatch functions.") + (defparameter *default-log-level* nil "The default log level for LOG-MESSAGE*") From stesch at no-spoon.de Tue Mar 1 18:11:13 2005 From: stesch at no-spoon.de (Stefan Scholl) Date: Tue, 1 Mar 2005 19:11:13 +0100 Subject: [tbnl-devel] Accessing match information for regex dispatchers? Message-ID: <20050301181113.GV29337@parsec.no-spoon.de> Hi! Would it be bad style or a bad idea to extend CREATE-REGEX-DISPATCHER (html.lisp) to hold the result of CL-PPCRE:SCAN in variables you then DECLARE as SPECIAL so that the called handler function can access the match information? Something like *MATCH-START*, *MATCH-END*, *REG-STARTS*, and *REG-ENDS* just visible for the handler. Regards, Stefan From edi at agharta.de Tue Mar 1 22:30:15 2005 From: edi at agharta.de (Edi Weitz) Date: Tue, 01 Mar 2005 23:30:15 +0100 Subject: [tbnl-devel] New version 0.3.12 Message-ID: Changelog: Version 0.3.12 2005-03-01 Added *HTTP-ERROR-HANDLER* (suggested and coded by Stefan Scholl) Exported and documented *SESSION-MAX-TIME* Download: Cheers, Edi. From edi at agharta.de Tue Mar 1 22:32:23 2005 From: edi at agharta.de (Edi Weitz) Date: Tue, 01 Mar 2005 23:32:23 +0100 Subject: [tbnl-devel] Accessing match information for regex dispatchers? In-Reply-To: <20050301181113.GV29337@parsec.no-spoon.de> (Stefan Scholl's message of "Tue, 1 Mar 2005 19:11:13 +0100") References: <20050301181113.GV29337@parsec.no-spoon.de> Message-ID: Hi! (And thanks for the error handler patch.) On Tue, 1 Mar 2005 19:11:13 +0100, Stefan Scholl wrote: > Would it be bad style or a bad idea to extend > CREATE-REGEX-DISPATCHER (html.lisp) to hold the result of > CL-PPCRE:SCAN in variables you then DECLARE as SPECIAL so that the > called handler function can access the match information? > > Something like *MATCH-START*, *MATCH-END*, *REG-STARTS*, and > *REG-ENDS* just visible for the handler. I'm not sure if it's bad style but I wouldn't like it. Why would you need it? The handler has access to the URL anyway. Cheers, Edi. From stesch at no-spoon.de Wed Mar 2 01:57:39 2005 From: stesch at no-spoon.de (Stefan Scholl) Date: Wed, 2 Mar 2005 02:57:39 +0100 Subject: [tbnl-devel] Accessing match information for regex dispatchers? In-Reply-To: References: <20050301181113.GV29337@parsec.no-spoon.de> Message-ID: <20050302015739.GW29337@parsec.no-spoon.de> Hi! On 2005-03-01 23:32:23, Edi Weitz wrote: > On Tue, 1 Mar 2005 19:11:13 +0100, Stefan Scholl wrote: > > Would it be bad style or a bad idea to extend > > CREATE-REGEX-DISPATCHER (html.lisp) to hold the result of > > CL-PPCRE:SCAN in variables you then DECLARE as SPECIAL so that the > > called handler function can access the match information? > > > > Something like *MATCH-START*, *MATCH-END*, *REG-STARTS*, and > > *REG-ENDS* just visible for the handler. > > I'm not sure if it's bad style but I wouldn't like it. Why would you > need it? The handler has access to the URL anyway. It was the first time I used CREATE-REGEX-DISPATCHER and I had to parse the URL in the handler with the same regex. It was just an idea. But I like CL-PPCRE:SCAN-TO-STRINGS more and it's clearer this way, without the specials. I've done some projects which used mod_rewrite. Typical rewrite rules matched and parsed a URL giving the registers as parameters to the "real" address. Maybe that's the reason for my first impression using CREATE-REGEX-DISPATCHER. Regards, Stefan From hutch at recursive.ca Thu Mar 3 15:10:07 2005 From: hutch at recursive.ca (Bob Hutchison) Date: Thu, 3 Mar 2005 10:10:07 -0500 Subject: [tbnl-devel] Running TBNL Standalone Message-ID: <444a4a8ac1ee0c50a96b64157024aad5@recursive.ca> Hi, Has anybody thought of how TBNL might be run without an apache server or mod_lisp involved? Why? I've got an application that would normally be run on a server, but it would be useful to have a standalone demo version. Setting up apache is not the kind of skill I'd expect from the end user of this particular application. It seems to me that somehow getting Araneida talking to TBNL would be one route -- fake mod_lisp in an Araneida handler or replace TBNL's modlisp.lisp would be two possibilities. I suppose aserve and cl-http are also possibilities, but I suspect that Araneida has something more to gain from TBNL. Cheers, Bob ---- Bob Hutchison -- blogs at Recursive Design Inc. -- From edi at agharta.de Thu Mar 3 15:24:49 2005 From: edi at agharta.de (Edi Weitz) Date: Thu, 03 Mar 2005 16:24:49 +0100 Subject: [tbnl-devel] Running TBNL Standalone In-Reply-To: <444a4a8ac1ee0c50a96b64157024aad5@recursive.ca> (Bob Hutchison's message of "Thu, 3 Mar 2005 10:10:07 -0500") References: <444a4a8ac1ee0c50a96b64157024aad5@recursive.ca> Message-ID: On Thu, 3 Mar 2005 10:10:07 -0500, Bob Hutchison wrote: > Has anybody thought of how TBNL might be run without an apache > server or mod_lisp involved? Why? I've got an application that would > normally be run on a server, but it would be useful to have a > standalone demo version. Setting up apache is not the kind of skill > I'd expect from the end user of this particular application. > > It seems to me that somehow getting Araneida talking to TBNL would > be one route -- fake mod_lisp in an Araneida handler or replace > TBNL's modlisp.lisp would be two possibilities. > > I suppose aserve and cl-http are also possibilities, but I suspect > that Araneida has something more to gain from TBNL. Sounds like an interesting idea. I've never done this until now, though. Cheers, Edi. From stesch at no-spoon.de Thu Mar 3 15:26:43 2005 From: stesch at no-spoon.de (Stefan Scholl) Date: Thu, 3 Mar 2005 16:26:43 +0100 Subject: [tbnl-devel] Running TBNL Standalone In-Reply-To: <444a4a8ac1ee0c50a96b64157024aad5@recursive.ca> References: <444a4a8ac1ee0c50a96b64157024aad5@recursive.ca> Message-ID: <20050303152643.GB29337@parsec.no-spoon.de> Hi! On 2005-03-03 10:10:07, Bob Hutchison wrote: > It seems to me that somehow getting Araneida talking to TBNL would be > one route -- fake mod_lisp in an Araneida handler or replace TBNL's > modlisp.lisp would be two possibilities. And when you're at it: How about a FastCGI bridge? There are some nice and new http servers out there, which support FastCGI. Regards, Stefan From edi at agharta.de Thu Mar 3 15:38:14 2005 From: edi at agharta.de (Edi Weitz) Date: Thu, 03 Mar 2005 16:38:14 +0100 Subject: [tbnl-devel] Running TBNL Standalone In-Reply-To: <20050303152643.GB29337@parsec.no-spoon.de> (Stefan Scholl's message of "Thu, 3 Mar 2005 16:26:43 +0100") References: <444a4a8ac1ee0c50a96b64157024aad5@recursive.ca> <20050303152643.GB29337@parsec.no-spoon.de> Message-ID: On Thu, 3 Mar 2005 16:26:43 +0100, Stefan Scholl wrote: > And when you're at it: How about a FastCGI bridge? There are some > nice and new http servers out there, which support FastCGI. One would need to integrate this one or write a new implementation-independent version. From hutch at recursive.ca Thu Mar 3 15:49:11 2005 From: hutch at recursive.ca (Bob Hutchison) Date: Thu, 3 Mar 2005 10:49:11 -0500 Subject: [tbnl-devel] Running TBNL Standalone In-Reply-To: References: <444a4a8ac1ee0c50a96b64157024aad5@recursive.ca> Message-ID: <0a5a94a3a6cce9905bc06828026cbe88@recursive.ca> On Mar 3, 2005, at 10:24 AM, Edi Weitz wrote: > On Thu, 3 Mar 2005 10:10:07 -0500, Bob Hutchison > wrote: > >> Has anybody thought of how TBNL might be run without an apache >> server or mod_lisp involved? Why? I've got an application that would >> normally be run on a server, but it would be useful to have a >> standalone demo version. Setting up apache is not the kind of skill >> I'd expect from the end user of this particular application. >> >> It seems to me that somehow getting Araneida talking to TBNL would >> be one route -- fake mod_lisp in an Araneida handler or replace >> TBNL's modlisp.lisp would be two possibilities. >> >> I suppose aserve and cl-http are also possibilities, but I suspect >> that Araneida has something more to gain from TBNL. > > Sounds like an interesting idea. I've never done this until now, > though. I think this is worth pursuing -- the more I think about it the more I'm convinced. I think Araneida might be the way to go because both packages will benefit. I want to avoid any changes to either Araneida or TBNL at least for the first pass at this, so I guess that an Araneida handler with a socket connection between them is an easy way to achieve this. The socket can be eliminated later. Going to have to worry about concurrent requests too... Now all I have to do is find the time. Cheers, Bob > > Cheers, > Edi. > > ---- Bob Hutchison -- blogs at Recursive Design Inc. -- From randomtalk at gmail.com Sat Mar 5 21:17:05 2005 From: randomtalk at gmail.com (Jason Wang) Date: Sat, 5 Mar 2005 16:17:05 -0500 Subject: [tbnl-devel] a problem while installing.. In-Reply-To: References: <939cf2005020104293e8e87a0@mail.gmail.com> <939cf2005020510332acdcf62@mail.gmail.com> <939cf2005020511251634c6e8@mail.gmail.com> <939cf200502201428347bd04@mail.gmail.com> <939cf200502201512289f568b@mail.gmail.com> Message-ID: <939cf2005030513172b1ce8d2@mail.gmail.com> hi, when i go to http://localhost/tbnl/test/test.lisp, i just get a TBNL Default Page, is that wat i suppose to get? since when i look in the source, i see alot of different stuff, wayy too complicated to be generating that simple page :|.. am i missing something here? -- www.programer.name - my own personal blog : ) From edi at agharta.de Sat Mar 5 21:30:22 2005 From: edi at agharta.de (Edi Weitz) Date: Sat, 05 Mar 2005 22:30:22 +0100 Subject: [tbnl-devel] a problem while installing.. In-Reply-To: <939cf2005030513172b1ce8d2@mail.gmail.com> (Jason Wang's message of "Sat, 5 Mar 2005 16:17:05 -0500") References: <939cf2005020104293e8e87a0@mail.gmail.com> <939cf2005020510332acdcf62@mail.gmail.com> <939cf2005020511251634c6e8@mail.gmail.com> <939cf200502201428347bd04@mail.gmail.com> <939cf200502201512289f568b@mail.gmail.com> <939cf2005030513172b1ce8d2@mail.gmail.com> Message-ID: Hi! On Sat, 5 Mar 2005 16:17:05 -0500, Jason Wang wrote: > hi, when i go to http://localhost/tbnl/test/test.lisp, i just get a > TBNL Default Page, is that wat i suppose to get? Depends on what you've been doing. > since when i look in the source, i see alot of different stuff, wayy > too complicated to be generating that simple page :|.. am i missing > something here? This looks as if you have done something like (asdf:oos 'asdf:load-op :tbnl) (tbnl:start-tbnl) while you were supposed to do (asdf:oos 'asdf:load-op :tbnl-test) (tbnl:start-tbnl) to see the test pages. Is that the case? Cheers, Edi. From randomtalk at gmail.com Sun Mar 6 03:31:08 2005 From: randomtalk at gmail.com (Jason Wang) Date: Sat, 5 Mar 2005 22:31:08 -0500 Subject: [tbnl-devel] a problem while installing.. In-Reply-To: References: <939cf2005020104293e8e87a0@mail.gmail.com> <939cf2005020511251634c6e8@mail.gmail.com> <939cf200502201428347bd04@mail.gmail.com> <939cf200502201512289f568b@mail.gmail.com> <939cf2005030513172b1ce8d2@mail.gmail.com> Message-ID: <939cf20050305193157483702@mail.gmail.com> hi.... i looked through the test program, understand most of it :D mmm.. however, i am still hopelessly lost when trying to write a simple program, prob just my new experience with lisp, but, is there any tutorials online that'll bring you through the construction of a simple lisp web application? i donno if allegroserve is almost the same as tbnl + apache, but i read alot of stuff about it in Practical Common Lisp.. However, i can't seem to get allegroserve to work for me.. i'm running the following packages for lisp web applications: cl-base64-3.3.1 cl-ppcre-1.2.1 cl-who-0.4.4 kmrcl-1.78 md5-1.8.5 tbnl-0.3.10 url-rewrite i've read about uncommon web, don't quite get what's good about it :| and considers to use clsql for database (since i have been using mysql for 2 years, thought wouldn't be too hard to transfer my knowledge..), though reading Paul Graham's book, he said we should be just using flat files to store infomation.. i've went on multiple times, though i don't get what they are doing.. mmm.. you told me to google for alternative ways of persisting data, though i tried multiple terms, turned up with not much helpful results, terms have tried "lisp web applications", "lisp + persist data", "lisp + web + data"... what terms do you suggest? thanks alot for your help :D -- www.programer.name - my own personal blog : ) From edi at agharta.de Sun Mar 6 08:26:48 2005 From: edi at agharta.de (Edi Weitz) Date: Sun, 06 Mar 2005 09:26:48 +0100 Subject: [tbnl-devel] a problem while installing.. In-Reply-To: <939cf2005030517495f6bfbfa@mail.gmail.com> (Jason Wang's message of "Sat, 5 Mar 2005 20:49:12 -0500") References: <939cf2005020104293e8e87a0@mail.gmail.com> <939cf2005020511251634c6e8@mail.gmail.com> <939cf200502201428347bd04@mail.gmail.com> <939cf200502201512289f568b@mail.gmail.com> <939cf2005030513172b1ce8d2@mail.gmail.com> <939cf2005030517495f6bfbfa@mail.gmail.com> Message-ID: On Sat, 5 Mar 2005 20:49:12 -0500, Jason Wang wrote: > ahhh.. that is indeed wat's wrong.. so can you tell me what is going > on? It's all in the docs. > why do i need to load :tbnl-test? You only need to load it if you want to see the test website. > since from my php experience whatever page you point to the server > suppose to serve up? mmm. Luckily this is not PHP but Lisp. (And, FWIW, you can also tweak PHP not to do that.) Edi. From edi at agharta.de Sun Mar 6 08:40:40 2005 From: edi at agharta.de (Edi Weitz) Date: Sun, 06 Mar 2005 09:40:40 +0100 Subject: [tbnl-devel] a problem while installing.. In-Reply-To: <939cf20050305193157483702@mail.gmail.com> (Jason Wang's message of "Sat, 5 Mar 2005 22:31:08 -0500") References: <939cf2005020104293e8e87a0@mail.gmail.com> <939cf2005020511251634c6e8@mail.gmail.com> <939cf200502201428347bd04@mail.gmail.com> <939cf200502201512289f568b@mail.gmail.com> <939cf2005030513172b1ce8d2@mail.gmail.com> <939cf20050305193157483702@mail.gmail.com> Message-ID: On Sat, 5 Mar 2005 22:31:08 -0500, Jason Wang wrote: > and considers to use clsql for database (since i have been using > mysql for 2 years, thought wouldn't be too hard to transfer my > knowledge..), though reading Paul Graham's book, he said we should > be just using flat files to store infomation.. i've went on > multiple times, though i don't get what they are > doing.. mmm.. you told me to google for alternative ways of > persisting data, though i tried multiple terms, turned up with not > much helpful results, terms have tried "lisp web applications", > "lisp + persist data", "lisp + web > + data"... what terms do you suggest? Non-SQL alternatives for persistent storage: - Plob! - cl-elephant - bknr's persistent store - cl-prevalence - cl-store - Paul Foley's interface to Berkeley DB Cheers, Edi. From marc.battyani at fractalconcept.com Mon Mar 7 16:41:46 2005 From: marc.battyani at fractalconcept.com (Marc Battyani) Date: Mon, 7 Mar 2005 17:41:46 +0100 Subject: [tbnl-devel] Running TBNL Standalone References: <444a4a8ac1ee0c50a96b64157024aad5@recursive.ca> <0a5a94a3a6cce9905bc06828026cbe88@recursive.ca> Message-ID: <06e701c52334$8dfa7480$0a02a8c0@marcxp> "Bob Hutchison" wrote: > On Mar 3, 2005, at 10:24 AM, Edi Weitz wrote: > > > On Thu, 3 Mar 2005 10:10:07 -0500, Bob Hutchison > > wrote: > > > >> Has anybody thought of how TBNL might be run without an apache > >> server or mod_lisp involved? Why? I've got an application that would > >> normally be run on a server, but it would be useful to have a > >> standalone demo version. Setting up apache is not the kind of skill > >> I'd expect from the end user of this particular application. > >> > >> It seems to me that somehow getting Araneida talking to TBNL would > >> be one route -- fake mod_lisp in an Araneida handler or replace > >> TBNL's modlisp.lisp would be two possibilities. > >> > >> I suppose aserve and cl-http are also possibilities, but I suspect > >> that Araneida has something more to gain from TBNL. > > > > Sounds like an interesting idea. I've never done this until now, > > though. I've done this once with paserve. IIRC there was just very few lines to write to call the normal mod_lisp handler function. Marc From hutch at recursive.ca Mon Mar 7 19:38:40 2005 From: hutch at recursive.ca (Bob Hutchison) Date: Mon, 7 Mar 2005 14:38:40 -0500 Subject: [tbnl-devel] Running TBNL Standalone In-Reply-To: <06e701c52334$8dfa7480$0a02a8c0@marcxp> References: <444a4a8ac1ee0c50a96b64157024aad5@recursive.ca> <0a5a94a3a6cce9905bc06828026cbe88@recursive.ca> <06e701c52334$8dfa7480$0a02a8c0@marcxp> Message-ID: On Mar 7, 2005, at 11:41 AM, Marc Battyani wrote: > "Bob Hutchison" wrote: >> On Mar 3, 2005, at 10:24 AM, Edi Weitz wrote: >> >>> On Thu, 3 Mar 2005 10:10:07 -0500, Bob Hutchison >>> wrote: >>> >>>> Has anybody thought of how TBNL might be run without an apache >>>> server or mod_lisp involved? Why? I've got an application that would >>>> normally be run on a server, but it would be useful to have a >>>> standalone demo version. Setting up apache is not the kind of skill >>>> I'd expect from the end user of this particular application. >>>> >>>> It seems to me that somehow getting Araneida talking to TBNL would >>>> be one route -- fake mod_lisp in an Araneida handler or replace >>>> TBNL's modlisp.lisp would be two possibilities. >>>> >>>> I suppose aserve and cl-http are also possibilities, but I suspect >>>> that Araneida has something more to gain from TBNL. >>> >>> Sounds like an interesting idea. I've never done this until now, >>> though. > > I've done this once with paserve. IIRC there was just very few lines to > write to call the normal mod_lisp handler function. You mean calling mod_lisp from the lisp server, presumably using an FFI? Hadn't thought of that. > > Marc > > > ---- Bob Hutchison -- blogs at Recursive Design Inc. -- From marc.battyani at fractalconcept.com Mon Mar 7 20:15:30 2005 From: marc.battyani at fractalconcept.com (Marc Battyani) Date: Mon, 7 Mar 2005 21:15:30 +0100 Subject: [tbnl-devel] Running TBNL Standalone References: <444a4a8ac1ee0c50a96b64157024aad5@recursive.ca> <0a5a94a3a6cce9905bc06828026cbe88@recursive.ca> <06e701c52334$8dfa7480$0a02a8c0@marcxp> Message-ID: <07b101c52352$6a0c2b40$0a02a8c0@marcxp> "Bob Hutchison" wrote: > On Mar 7, 2005, at 11:41 AM, Marc Battyani wrote: > > > I've done this once with paserve. IIRC there was just very few lines to > > write to call the normal mod_lisp handler function. > > You mean calling mod_lisp from the lisp server, presumably using an > FFI? Hadn't thought of that. No, I mean calling the mod_lisp handler on the Lisp side. Generally it's the #'process-apache-command or #'process-apache-request function. Marc From ocorrain at yahoo.com Tue Mar 8 12:35:32 2005 From: ocorrain at yahoo.com (=?iso-8859-1?Q?Tiarn=E1n_=D3_Corr=E1in?=) Date: Tue, 08 Mar 2005 12:35:32 +0000 Subject: [tbnl-devel] Problem with file uploads Message-ID: Hi-- I'm using tbnl to run a site (educational in purpose), which will be rich in texts and images. I want people with the appropriate privileges to be able to upload images to the server, where various incantations will be performed to ensure that the images are formatted correctly for the site. However, I seem to be running into a problem with either mod lisp or tbnl, for images >=~1MB. When I try to upload an image of this site, an internal server error is returned after a few seconds, and the converted image (using imagemagick) appears in the thumbnail gallery with a portion of the bottom shown in grey, as if the image did not upload completely to the server. Is there some configurable upper limit to the size of file uploads, or can someone point me to the likely source of the problem? regards -- Tiarn?n From marc.battyani at fractalconcept.com Tue Mar 8 12:57:57 2005 From: marc.battyani at fractalconcept.com (Marc Battyani) Date: Tue, 8 Mar 2005 13:57:57 +0100 Subject: [tbnl-devel] Problem with file uploads References: Message-ID: <0a6101c523de$745cae30$0a02a8c0@marcxp> "Tiarn?n ? Corr?in" wrote: [...] >However, I seem to be running into a problem with either mod lisp or >tbnl, for images >=~1MB. When I try to upload an image of this site, >an internal server error is returned after a few seconds, and the >converted image (using imagemagick) appears in the thumbnail gallery >with a portion of the bottom shown in grey, as if the image did not >upload completely to the server. >Is there some configurable upper limit to the size of file uploads, or >can someone point me to the likely source of the problem? What Lisp are you using ? For instance in Lispworks the array-total-size-limit is very small: 1048448 so you can't have strings greater than that. :-( Marc From ocorrain at yahoo.com Tue Mar 8 15:58:05 2005 From: ocorrain at yahoo.com (=?iso-8859-1?Q?Tiarn=E1n_=D3_Corr=E1in?=) Date: Tue, 08 Mar 2005 15:58:05 +0000 Subject: [tbnl-devel] Problem with file uploads In-Reply-To: <0a6101c523de$745cae30$0a02a8c0@marcxp> (Marc Battyani's message of "Tue, 8 Mar 2005 13:57:57 +0100") References: <0a6101c523de$745cae30$0a02a8c0@marcxp> Message-ID: "Marc Battyani" writes: > What Lisp are you using ? OpenMCL on Mac OS X (for development), and CMUCL on FreeBSD (deployment). Just checked, and CMUCL seems to be more forgiving, with an array-total-size-limit of 536870911, as opposed to 16777216 in OpenMCL. Is there any way of getting around these limitations, perhaps by rewriting the code that handles uploads? If so, could you point me in the direction of what needs to change? regards Tiarn?n From edi at agharta.de Tue Mar 8 16:45:11 2005 From: edi at agharta.de (Edi Weitz) Date: Tue, 08 Mar 2005 17:45:11 +0100 Subject: [tbnl-devel] Problem with file uploads In-Reply-To: =?iso-8859-1?q?=28Tiarn=E1n_=D3=2E_Corr=E1in's?= message of "Tue, 08 Mar 2005 15:58:05 +0000") References: <0a6101c523de$745cae30$0a02a8c0@marcxp> Message-ID: On Tue, 08 Mar 2005 15:58:05 +0000, ocorrain at yahoo.com (Tiarn?n ? Corr?in) wrote: > Is there any way of getting around these limitations, perhaps by > rewriting the code that handles uploads? If so, could you point me > in the direction of what needs to change? I'm not aware of any limitations - I specifically rewrote Janis Dzerins' to read from a stream and write to a stream. FWIW, I just uploaded a 126MB MP3 file via TBNL/LispWorks (using the upload test that comes with the distribution), downloaded it again, and got a result which is identical to the original file according to diff. Cheers, Edi. From edi at agharta.de Tue Mar 8 16:55:51 2005 From: edi at agharta.de (Edi Weitz) Date: Tue, 08 Mar 2005 17:55:51 +0100 Subject: [tbnl-devel] Problem with file uploads In-Reply-To: (Edi Weitz's message of "Tue, 08 Mar 2005 17:45:11 +0100") References: <0a6101c523de$745cae30$0a02a8c0@marcxp> Message-ID: On Tue, 08 Mar 2005 17:45:11 +0100, Edi Weitz wrote: > I'm not aware of any limitations - I specifically rewrote Janis > Dzerins' to read from a stream and write to a stream. ^------- RFC 2388 code From ocorrain at yahoo.com Tue Mar 8 17:35:19 2005 From: ocorrain at yahoo.com (=?iso-8859-1?Q?Tiarn=E1n_=D3_Corr=E1in?=) Date: Tue, 08 Mar 2005 17:35:19 +0000 Subject: [tbnl-devel] Problem with file uploads In-Reply-To: (Edi Weitz's message of "Tue, 08 Mar 2005 17:45:11 +0100") References: <0a6101c523de$745cae30$0a02a8c0@marcxp> Message-ID: Edi Weitz writes: > On Tue, 08 Mar 2005 15:58:05 +0000, ocorrain at yahoo.com (Tiarn?n ? Corr?in) wrote: > >> Is there any way of getting around these limitations, perhaps by >> rewriting the code that handles uploads? If so, could you point me >> in the direction of what needs to change? > > I'm not aware of any limitations - I specifically rewrote Janis > Dzerins' to read from a stream and write to a stream. What version of tbnl? I'm using 0.3.11 at the mo, and am definitely running into problems that seem to be related to array-size-limit. I'll see if I can come up with a reproducible bug report. -- Tiarn?n From edi at agharta.de Tue Mar 8 18:12:20 2005 From: edi at agharta.de (Edi Weitz) Date: Tue, 08 Mar 2005 19:12:20 +0100 Subject: [tbnl-devel] Problem with file uploads In-Reply-To: =?iso-8859-1?q?=28Tiarn=E1n_=D3=2E_Corr=E1in's?= message of "Tue, 08 Mar 2005 17:35:19 +0000") References: <0a6101c523de$745cae30$0a02a8c0@marcxp> Message-ID: On Tue, 08 Mar 2005 17:35:19 +0000, ocorrain at yahoo.com (Tiarn?n ? Corr?in) wrote: > What version of tbnl? I tested with 0.3.12 and 0.3.10, both worked. > I'm using 0.3.11 at the mo, and am definitely running into problems > that seem to be related to array-size-limit. Are you sure you have problems at file upload time and not when delivering the uploaded file back to the user? Delivering large files through TBNL won't work, of course, because all the content is sent to mod_lisp at once. This is a deliberate design decision of TBNL. If you want to serve large static files you can always bypass TBNL and serve them directly through Apache. > I'll see if I can come up with a reproducible bug report. That would be nice. Cheers, Edi. From ocorrain at yahoo.com Tue Mar 8 18:21:37 2005 From: ocorrain at yahoo.com (=?iso-8859-1?Q?Tiarn=E1n_=D3_Corr=E1in?=) Date: Tue, 08 Mar 2005 18:21:37 +0000 Subject: [tbnl-devel] Problem with file uploads In-Reply-To: (Edi Weitz's message of "Tue, 08 Mar 2005 19:12:20 +0100") References: <0a6101c523de$745cae30$0a02a8c0@marcxp> Message-ID: Edi Weitz writes: > On Tue, 08 Mar 2005 17:35:19 +0000, ocorrain at yahoo.com (Tiarn?n ? Corr?in) wrote: > I tested with 0.3.12 and 0.3.10, both worked. I'll upgrade and see if it's still a problem. > Are you sure you have problems at file upload time and not when > delivering the uploaded file back to the user? Delivering large files > through TBNL won't work, of course, because all the content is sent to > mod_lisp at once. This is a deliberate design decision of TBNL. Fair enough. I'm sure that it isn't a problem with serving the files, since I do bypass TBNL for serving images. The flow goes like this: 1. Upload file to server 2. File is changed using imagemagick to a sensible size 3. Thumbnail is produced. 4. User is given gallery of thumbnails As I described earlier in the thread, the thumbnail/processed image is grey at the bottom, leading me to believe that imagemagick is processing an incomplete jpeg. Is there any reason at all that array-max-size-limit would restrict upload size? -- Tiarn?n From edi at agharta.de Tue Mar 8 19:32:16 2005 From: edi at agharta.de (Edi Weitz) Date: Tue, 08 Mar 2005 20:32:16 +0100 Subject: [tbnl-devel] Problem with file uploads In-Reply-To: =?iso-8859-1?q?=28Tiarn=E1n_=D3=2E_Corr=E1in's?= message of "Tue, 08 Mar 2005 18:21:37 +0000") References: <0a6101c523de$745cae30$0a02a8c0@marcxp> Message-ID: On Tue, 08 Mar 2005 18:21:37 +0000, ocorrain at yahoo.com (Tiarn?n ? Corr?in) wrote: > Is there any reason at all that array-max-size-limit would restrict > upload size? Not that I'm aware of at the moment. But it wouldn't be the first time that my memory fails... :) From tbnl at bignoli.it Fri Mar 11 21:03:10 2005 From: tbnl at bignoli.it (Aurelio Bignoli) Date: Fri, 11 Mar 2005 22:03:10 +0100 Subject: [tbnl-devel] Problem with file uploads In-Reply-To: References: Message-ID: <16946.1934.145593.201879@vav.19216810.loc> Tiarn?n ? Corr?in writes: > However, I seem to be running into a problem with either mod lisp or > tbnl, for images >=~1MB. When I try to upload an image of this site, > an internal server error is returned after a few seconds, and the > converted image (using imagemagick) appears in the thumbnail gallery > with a portion of the bottom shown in grey, as if the image did not > upload completely to the server. I had the same problem trying to upload a 23MB TIFF file to a PIII/733MHz server running Linux, Apache 1.3 and CMUCL. The cause was the "excessive" speed of Apache: the Lisp server is not so fast in handling POST body, its socket buffer is filled up by mod_lisp, which gets a write error and closes the connection. To solve the problem, I added some declarations in rfc2388.lisp and modified the inner loop to read the POST request body in chunks of 4096 byte, using the "Content-length" HTTP header. The result was a 25% increase in file transfer speed, I was able to handle about 3.8MB/sec. Not bad, but not enough for data coming from a 100Mbit/sec LAN. So I had also to "enlarge" the socket buffer with a call to the setsockopt Unix system call. If someone is interested, I could post my changes. With a caveat: request body is read using READ-SEQUENCE; if the connection is closed during transfer, the corresponding server thread hangs indefinitely. Regards, Aurelio From hutch at recursive.ca Fri Mar 11 21:26:41 2005 From: hutch at recursive.ca (Bob Hutchison) Date: Fri, 11 Mar 2005 16:26:41 -0500 Subject: [tbnl-devel] Running TBNL Standalone In-Reply-To: <0a5a94a3a6cce9905bc06828026cbe88@recursive.ca> References: <444a4a8ac1ee0c50a96b64157024aad5@recursive.ca> <0a5a94a3a6cce9905bc06828026cbe88@recursive.ca> Message-ID: <029013934a1766fccaa9a5a78bb0324a@recursive.ca> On Mar 3, 2005, at 10:49 AM, Bob Hutchison wrote: > > On Mar 3, 2005, at 10:24 AM, Edi Weitz wrote: > >> On Thu, 3 Mar 2005 10:10:07 -0500, Bob Hutchison >> wrote: >> >>> Has anybody thought of how TBNL might be run without an apache >>> server or mod_lisp involved? Why? I've got an application that would >>> normally be run on a server, but it would be useful to have a >>> standalone demo version. Setting up apache is not the kind of skill >>> I'd expect from the end user of this particular application. >>> >>> It seems to me that somehow getting Araneida talking to TBNL would >>> be one route -- fake mod_lisp in an Araneida handler or replace >>> TBNL's modlisp.lisp would be two possibilities. >>> >>> I suppose aserve and cl-http are also possibilities, but I suspect >>> that Araneida has something more to gain from TBNL. >> >> Sounds like an interesting idea. I've never done this until now, >> though. > > I think this is worth pursuing -- the more I think about it the more > I'm convinced. I think Araneida might be the way to go because both > packages will benefit. I want to avoid any changes to either Araneida > or TBNL at least for the first pass at this, so I guess that an > Araneida handler with a socket connection between them is an easy way > to achieve this. The socket can be eliminated later. Going to have to > worry about concurrent requests too... > > Now all I have to do is find the time. > I've found some time in the last couple of days and pretty much have this working with Araneida (in LispWorks at least). I've got to track down a few little problems but nothing much (e.g. a spurious 404 error when using FireFox that doesn't happen with other browsers, and some also spurious and intermittent socket errors). While doing this I noticed something a little funny with the dates associated with If-modified-since. TBNL (rfc-1123-date) produces dates like "Tue, 1 Feb 2005 13:49:29 GMT" while Safari produces dates like "Tue, 01 Feb 2005 13:49:29 GMT" -- same date but you can't compare them as strings. If you look at rfc2616 section 3.3.1 there is an example that has the leading 0 on the day of month. Safari produces a header with the leading 0 for If-modified-since, so files in the first 9 days of any month will never match. FireFox appears to return whatever you send it, so it works there. I think this is probably a bug in TBNL. This turned out to be fairly straight forward in the end -- I tried several strategies and think I have a pretty simple one. Unfortunately the question becomes what is Araneida adding to this other than handling the request parsing. It is *very* fast on my machine. I've appended part of the output from the apache ab utility for the direct to Araneida and apache/mod_lisp configurations (unfortunately, if I increase the concurrency level to 15 or more I get a lot of errors from Araneida). I don't have Araneida operating as a proxy behind apache at the moment so I have no benchmarks for that configuration (and this also means that I've not tested it). A similar application in Java (that is being replace by this CL version) can barely sustain 18 Kbytes/s (don't read too much into that number, the Java application runs much better if it is operating on something other than my notebook (Mac powerbook G4 1GHz 2G RAM) -- of course so might the lisp application). And remember, this is not a well conceived benchmark -- make of it what you will. I'm going to download the most recent version of TBNL and integrate changes into that. There are not many and perhaps I can avoid them all. I'll get this cleaned up and then make it available. Cheers, Bob Araneida (directly) -> TBNL ------------------------------------- Document Length: 4288 bytes Concurrency Level: 10 Time taken for tests: 63.614 seconds Complete requests: 5000 Failed requests: 0 Broken pipe errors: 0 Total transferred: 22415000 bytes HTML transferred: 21440000 bytes Requests per second: 78.60 [#/sec] (mean) Time per request: 127.23 [ms] (mean) Time per request: 12.72 [ms] (mean, across all concurrent requests) Transfer rate: 352.36 [Kbytes/sec] received Connnection Times (ms) min mean[+/-sd] median max Connect: 0 17 218.8 0 3016 Processing: 10 109 42.7 100 365 Waiting: 9 109 42.7 100 365 Total: 10 127 221.6 101 3144 Percentage of the requests served within a certain time (ms) 50% 101 66% 119 75% 132 80% 141 90% 170 95% 198 98% 234 99% 282 100% 3144 (last request) mod_lisp -> TBNL ------------------------------------- Document Length: 4288 bytes Concurrency Level: 10 Time taken for tests: 96.451 seconds Complete requests: 5000 Failed requests: 0 Broken pipe errors: 0 Total transferred: 22764006 bytes HTML transferred: 21440000 bytes Requests per second: 51.84 [#/sec] (mean) Time per request: 192.90 [ms] (mean) Time per request: 19.29 [ms] (mean, across all concurrent requests) Transfer rate: 236.02 [Kbytes/sec] received Connnection Times (ms) min mean[+/-sd] median max Connect: 0 5 13.5 0 154 Processing: 8 187 222.2 107 2246 Waiting: 0 185 222.9 105 2245 Total: 8 192 221.5 115 2246 Percentage of the requests served within a certain time (ms) 50% 115 66% 180 75% 248 80% 291 90% 445 95% 614 98% 890 99% 1083 100% 2246 (last request) From peter.barabas at gmail.com Fri Mar 11 21:30:59 2005 From: peter.barabas at gmail.com (Peter BARABAS) Date: Fri, 11 Mar 2005 22:30:59 +0100 Subject: [tbnl-devel] Running TBNL Standalone In-Reply-To: <029013934a1766fccaa9a5a78bb0324a@recursive.ca> References: <444a4a8ac1ee0c50a96b64157024aad5@recursive.ca> <0a5a94a3a6cce9905bc06828026cbe88@recursive.ca> <029013934a1766fccaa9a5a78bb0324a@recursive.ca> Message-ID: <4f2a8db5050311133053906eea@mail.gmail.com> > > I've found some time in the last couple of days and pretty much have > this working with Araneida (in LispWorks at least). I've got to track > down a few little problems but nothing much (e.g. a spurious 404 error > when using FireFox that doesn't happen with other browsers, and some > also spurious and intermittent socket errors). The 404s are probably caused by Firefox wanting to leech "favicon.ico". Regards, Peter. -- ((call/cc call/cc) (call/cc call/cc)) From edi at agharta.de Sat Mar 12 08:48:04 2005 From: edi at agharta.de (Edi Weitz) Date: Sat, 12 Mar 2005 09:48:04 +0100 Subject: [tbnl-devel] Problem with file uploads In-Reply-To: <16946.1934.145593.201879@vav.19216810.loc> (Aurelio Bignoli's message of "Fri, 11 Mar 2005 22:03:10 +0100") References: <16946.1934.145593.201879@vav.19216810.loc> Message-ID: On Fri, 11 Mar 2005 22:03:10 +0100, Aurelio Bignoli wrote: > I had the same problem trying to upload a 23MB TIFF file to a > PIII/733MHz server running Linux, Apache 1.3 and CMUCL. The cause > was the "excessive" speed of Apache: the Lisp server is not so fast > in handling POST body, its socket buffer is filled up by mod_lisp, > which gets a write error and closes the connection. I wonder why I haven't seen this when I tested with large (>100MB) files on my machine - see previous posting. I tested with server and client on the same machine so the speed should have been high enough. My combination was LW/WinXP/Apache2 so your results /might/ show problems specific to CMUCL or to Linux or to Apache 1.x... Cheers, Edi. From edi at agharta.de Sat Mar 12 08:50:33 2005 From: edi at agharta.de (Edi Weitz) Date: Sat, 12 Mar 2005 09:50:33 +0100 Subject: [tbnl-devel] Running TBNL Standalone In-Reply-To: <029013934a1766fccaa9a5a78bb0324a@recursive.ca> (Bob Hutchison's message of "Fri, 11 Mar 2005 16:26:41 -0500") References: <444a4a8ac1ee0c50a96b64157024aad5@recursive.ca> <0a5a94a3a6cce9905bc06828026cbe88@recursive.ca> <029013934a1766fccaa9a5a78bb0324a@recursive.ca> Message-ID: On Fri, 11 Mar 2005 16:26:41 -0500, Bob Hutchison wrote: > While doing this I noticed something a little funny with the dates > associated with If-modified-since. TBNL (rfc-1123-date) produces > dates like "Tue, 1 Feb 2005 13:49:29 GMT" while Safari produces > dates like "Tue, 01 Feb 2005 13:49:29 GMT" -- same date but you > can't compare them as strings. If you look at rfc2616 section 3.3.1 > there is an example that has the leading 0 on the day of > month. Safari produces a header with the leading 0 for > If-modified-since, so files in the first 9 days of any month will > never match. FireFox appears to return whatever you send it, so it > works there. I think this is probably a bug in TBNL. Thanks, I'll look into this if I find some time. Or maybe Stefan will... :) > I'm going to download the most recent version of TBNL and integrate > changes into that. There are not many and perhaps I can avoid them > all. I'll get this cleaned up and then make it available. Thanks. If you send patches it'd be very nice if you could also add a section to the docs which explains how to set up TBNL with Araneida. Cheers, Edi. From stesch at no-spoon.de Sat Mar 12 18:34:54 2005 From: stesch at no-spoon.de (Stefan Scholl) Date: Sat, 12 Mar 2005 19:34:54 +0100 Subject: [tbnl-devel] mod_negotiation and wrong Last-Modified Message-ID: <1434owv9kgang.dlg@parsec.no-spoon.de> [That's what I've sent to gmane.comp.apache.user today.] Hi! I use Apache 1.3.33 (Gentoo) under Linux 2.6 together with mod_lisp 2.42. mod_lisp is a simple handler which communicates with running Lisp images. This is what I've found today: When setting "Last-Modified" (the handler correctly calls ap_parseHTTPdate(), ap_update_mtime(), and ap_set_last_modified()) the resulting response header has an other date in the "Last-Modified" field. It is the mtime of the DocumentRoot. But only if the mtime of DocumentRoot is _newer_ than the date you want to set. There's no "Last-Modified" in the response header when you don't set it yourself. ap_update_mtime() only updates r->mtime when the supplied time is _newer_. So I've guessed that some other handler sets r->mtime to the DocumentRoot. I've found mod_negotiation. After removing it from the server config the response header had the correct "Last-Modified" date. 2 possible workarounds: 1.) touch the DocumentRoot to an older date 2.) remove mod_negotiation Regards, Stefan -- Web: http://www.no-spoon.de/ -*- IRC: stesch @ freenode From edi at agharta.de Sat Mar 12 20:42:21 2005 From: edi at agharta.de (Edi Weitz) Date: Sat, 12 Mar 2005 21:42:21 +0100 Subject: New version 0.3.13 (Was: [tbnl-devel] Running TBNL Standalone) In-Reply-To: <029013934a1766fccaa9a5a78bb0324a@recursive.ca> (Bob Hutchison's message of "Fri, 11 Mar 2005 16:26:41 -0500") References: <444a4a8ac1ee0c50a96b64157024aad5@recursive.ca> <0a5a94a3a6cce9905bc06828026cbe88@recursive.ca> <029013934a1766fccaa9a5a78bb0324a@recursive.ca> Message-ID: On Fri, 11 Mar 2005 16:26:41 -0500, Bob Hutchison wrote: > While doing this I noticed something a little funny with the dates > associated with If-modified-since. TBNL (rfc-1123-date) produces > dates like "Tue, 1 Feb 2005 13:49:29 GMT" while Safari produces > dates like "Tue, 01 Feb 2005 13:49:29 GMT" -- same date but you > can't compare them as strings. If you look at rfc2616 section 3.3.1 > there is an example that has the leading 0 on the day of > month. Safari produces a header with the leading 0 for > If-modified-since, so files in the first 9 days of any month will > never match. FireFox appears to return whatever you send it, so it > works there. I think this is probably a bug in TBNL. Thanks for the info, I've uploaded a new version (0.3.13) which fixes this. Stefan Scholl provided some additional info which I'll include here: 1. This bug didn't show up before because Apache silently parses and rewrites this header. Only because you sent it through Araneida which obviously just lets it through could you see the wrong format. 2. While Safari's behaviour is not strictly wrong it doesn't follow the recommendation given in the RFC to send the header back exactly as received from the server. Thanks again, Edi. From hutch at recursive.ca Sun Mar 13 15:06:15 2005 From: hutch at recursive.ca (Bob Hutchison) Date: Sun, 13 Mar 2005 10:06:15 -0500 Subject: [tbnl-devel] Running TBNL Standalone In-Reply-To: <4f2a8db5050311133053906eea@mail.gmail.com> References: <444a4a8ac1ee0c50a96b64157024aad5@recursive.ca> <0a5a94a3a6cce9905bc06828026cbe88@recursive.ca> <029013934a1766fccaa9a5a78bb0324a@recursive.ca> <4f2a8db5050311133053906eea@mail.gmail.com> Message-ID: Could be. I'll check into that. On Mar 11, 2005, at 4:30 PM, Peter BARABAS wrote: >> >> I've found some time in the last couple of days and pretty much have >> this working with Araneida (in LispWorks at least). I've got to track >> down a few little problems but nothing much (e.g. a spurious 404 error >> when using FireFox that doesn't happen with other browsers, and some >> also spurious and intermittent socket errors). > > The 404s are probably caused by Firefox wanting to leech "favicon.ico". > > Regards, > Peter. > > -- > ((call/cc call/cc) (call/cc call/cc)) > _______________________________________________ > tbnl-devel site list > tbnl-devel at common-lisp.net > http://common-lisp.net/mailman/listinfo/tbnl-devel > > ---- Bob Hutchison -- blogs at Recursive Design Inc. -- From hutch at recursive.ca Sun Mar 13 15:32:44 2005 From: hutch at recursive.ca (Bob Hutchison) Date: Sun, 13 Mar 2005 10:32:44 -0500 Subject: [tbnl-devel] Running TBNL Standalone In-Reply-To: References: <444a4a8ac1ee0c50a96b64157024aad5@recursive.ca> <0a5a94a3a6cce9905bc06828026cbe88@recursive.ca> <029013934a1766fccaa9a5a78bb0324a@recursive.ca> Message-ID: <6d902ac640d45bac33a79693abb282b3@recursive.ca> On Mar 12, 2005, at 3:50 AM, Edi Weitz wrote: > >> I'm going to download the most recent version of TBNL and integrate >> changes into that. There are not many and perhaps I can avoid them >> all. I'll get this cleaned up and then make it available. > > Thanks. If you send patches it'd be very nice if you could also add a > section to the docs which explains how to set up TBNL with Araneida. > So. I was thinking. What if somebody didn't want to use Araneida, just TBNL? It turns out that with a relatively straight forward re-organisation of Araneida's daemon.lisp code that *simultaneous* support for: * browser->apache->mod_lisp->tbnl * browser->apache->araneida * browser->apache->araneida->tbnl * browser->araneida * browser->araneida->tbnl * browser->tbnl are all possible if you get your port numbers right. There's a little problem though. The browser->tbnl support isn't behaving properly. It serves the pages fine, but the memory use is growing monotonically. Something is not being released. I'm not sure what. Maybe the socket isn't closed? The number of processes remains small (actually only one in TBNL, a few in aranedia). Any ideas? If not, I'll try to work out what is happening. I may post the patches with this problem still there. I have a small test of the setup. I'll include that in the test directory (I still have to clean it up a bit). I'll try to post the patches to TBNL and Araneida later today. Cheers, Bob ---- Bob Hutchison -- blogs at Recursive Design Inc. -- From ocorrain at yahoo.com Sun Mar 13 16:35:55 2005 From: ocorrain at yahoo.com (=?iso-8859-1?Q?Tiarn=E1n_=D3_Corr=E1in?=) Date: Sun, 13 Mar 2005 16:35:55 +0000 Subject: [tbnl-devel] Problem with file uploads In-Reply-To: (Edi Weitz's message of "Sat, 12 Mar 2005 09:48:04 +0100") References: <16946.1934.145593.201879@vav.19216810.loc> Message-ID: Edi Weitz writes: > On Fri, 11 Mar 2005 22:03:10 +0100, Aurelio Bignoli wrote: > >> I had the same problem trying to upload a 23MB TIFF file to a >> PIII/733MHz server running Linux, Apache 1.3 and CMUCL. The cause >> was the "excessive" speed of Apache: the Lisp server is not so fast >> in handling POST body, its socket buffer is filled up by mod_lisp, >> which gets a write error and closes the connection. > > My combination was LW/WinXP/Apache2 so your results /might/ show > problems specific to CMUCL or to Linux or to Apache 1.x... I have the problem (or a similar one) with OpenMCL/MacOSX/Apache 1.3.31. Haven't experienced it yet on the server, which runs CMUCL/FreeBSD/Apache 1.3.31 -- Tiarn?n From stesch at no-spoon.de Sun Mar 13 18:31:16 2005 From: stesch at no-spoon.de (Stefan Scholl) Date: Sun, 13 Mar 2005 19:31:16 +0100 Subject: [tbnl-devel] arbitrary per-request data? In-Reply-To: References: <20050214135640.GI18781@xach.com> Message-ID: <20050313183116.GE28782@parsec.no-spoon.de> On 2005-02-14 15:16:42, Edi Weitz wrote: > On Mon, 14 Feb 2005 08:56:40 -0500, Zach Beane wrote: > > But it occurred to me that there is already the *request* > > structure. Would it make sense to be able to have a table of > > arbitrary keys and values in the request structure for application > > use? I was thinking of an accessor like this: > > I'm wondering if what you really want isn't just per-session info. If > in your CURRENT-USER function you replace REQUEST-DATA with > SESSION-VALUE isn't that the info you'd like to have? You'd get the > sessions for free. I'm sitting at a similar problem. One function is called two times and has to read some data. It would be nice if I could cache this data for one request so it only has to be read one time. Can't use a closure because AFAIK one request doesn't always start a new process and the data could be too old in further requests. I don't want to start a session at this time. Or maby just two variables in a closure. One holds the data and the other *REQUEST*. Then I check against *REQUEST* with EQ and I know if the stored data is from an old request or the current one. Am I right? Regards, Stefan From edi at agharta.de Sun Mar 13 21:37:53 2005 From: edi at agharta.de (Edi Weitz) Date: Sun, 13 Mar 2005 22:37:53 +0100 Subject: [tbnl-devel] arbitrary per-request data? In-Reply-To: <20050313183116.GE28782@parsec.no-spoon.de> (Stefan Scholl's message of "Sun, 13 Mar 2005 19:31:16 +0100") References: <20050214135640.GI18781@xach.com> <20050313183116.GE28782@parsec.no-spoon.de> Message-ID: On Sun, 13 Mar 2005 19:31:16 +0100, Stefan Scholl wrote: > I don't want to start a session at this time. Why not? > Or maby just two variables in a closure. One holds the data and the > other *REQUEST*. Then I check against *REQUEST* with EQ and I know > if the stored data is from an old request or the current one. Am I > right? Sounds reasonable. Cheers, Edi. From edi at agharta.de Mon Mar 14 08:57:44 2005 From: edi at agharta.de (Edi Weitz) Date: Mon, 14 Mar 2005 09:57:44 +0100 Subject: [tbnl-devel] Running TBNL Standalone In-Reply-To: <6d902ac640d45bac33a79693abb282b3@recursive.ca> (Bob Hutchison's message of "Sun, 13 Mar 2005 10:32:44 -0500") References: <444a4a8ac1ee0c50a96b64157024aad5@recursive.ca> <0a5a94a3a6cce9905bc06828026cbe88@recursive.ca> <029013934a1766fccaa9a5a78bb0324a@recursive.ca> <6d902ac640d45bac33a79693abb282b3@recursive.ca> Message-ID: On Sun, 13 Mar 2005 10:32:44 -0500, Bob Hutchison wrote: > It turns out that with a relatively straight forward re-organisation > of Araneida's daemon.lisp code that *simultaneous* support for: > > * browser->apache->mod_lisp->tbnl > * browser->apache->araneida > * browser->apache->araneida->tbnl > * browser->araneida > * browser->araneida->tbnl > * browser->tbnl > > are all possible if you get your port numbers right. Huh? browser->tbnl? How does that work? Who does the http part? Cheers, Edi. From hutch at recursive.ca Mon Mar 14 13:22:00 2005 From: hutch at recursive.ca (Bob Hutchison) Date: Mon, 14 Mar 2005 08:22:00 -0500 Subject: [tbnl-devel] Patches and example for running TBNL and Araneida together Message-ID: Hi, I've attached patches for both Araneida and TBNL to this message. Sorry for the cross-posting but there is some co-ordination required here and I thought this would be a good way to do it. I've included this message the text from a README file that is part of the tgz file I've attached. Unfortunately there is a really *nasty* bug with the browser->tbnl connection -- it consumes about 250k of memory for every access. I cannot see the problem, and I'm looking for help :-) It appears to be completely stable for browser->araneida->tbnl (tested for 100's of thousands of hits). I don't know how the tbnl-araneida package with the example should be distributed. I'm sure this description is too brief, I'll answer what questions I can. I hope you find this useful. Cheers, Bob -------- Some changes have been made to allow TBNL to be used with Araneida. In particular, it is now possible to use Araneida as a server to TBNL handlers and it is possible to send HTTP requests directly to the TBNL socket (in effect by-passing Araneida). This means that the following connections are possible *simultaneously* browser->apache->araneida browser->apache->araneida->tbnl (NEW) browser->apache->mod_lisp->tbnl browser->araneida browser->araneida->tbnl (NEW) browser->tbnl (NEW) There is a package, tbnl-araneida, that shows how this works. In Summary... To connect directly to TBNL, all that is required is that araneida is compiled and loaded *before* tbnl is compiled and loaded. (There is conditionally compiled code in TBNL). To connect to TBNL through Araneida, use the the Araneida handler -- tbnl-araneida-handler -- provided for this purpose. Note that in both cases the TBNL *dispatch-table* must be set up as you normally would when using TBNL. The sense of the installed Araneida handler changes slightly to a url prefix mapper to TBNL (which further refines the request using the *dispatch-table*). -------- -------------- next part -------------- A non-text attachment was scrubbed... Name: tbnl-araneida.tgz Type: application/x-gzip Size: 7959 bytes Desc: not available URL: -------------- next part -------------- ---- Bob Hutchison -- blogs at Recursive Design Inc. -- From hutch at recursive.ca Mon Mar 14 13:25:28 2005 From: hutch at recursive.ca (Bob Hutchison) Date: Mon, 14 Mar 2005 08:25:28 -0500 Subject: [tbnl-devel] Running TBNL Standalone In-Reply-To: References: <444a4a8ac1ee0c50a96b64157024aad5@recursive.ca> <0a5a94a3a6cce9905bc06828026cbe88@recursive.ca> <029013934a1766fccaa9a5a78bb0324a@recursive.ca> <6d902ac640d45bac33a79693abb282b3@recursive.ca> Message-ID: On Mar 14, 2005, at 3:57 AM, Edi Weitz wrote: > On Sun, 13 Mar 2005 10:32:44 -0500, Bob Hutchison > wrote: > >> It turns out that with a relatively straight forward re-organisation >> of Araneida's daemon.lisp code that *simultaneous* support for: >> >> * browser->apache->mod_lisp->tbnl >> * browser->apache->araneida >> * browser->apache->araneida->tbnl >> * browser->araneida >> * browser->araneida->tbnl >> * browser->tbnl >> >> are all possible if you get your port numbers right. > > Huh? browser->tbnl? How does that work? Who does the http part? I hacked, er, enhanced, yes, that's it, enhanced, Araneida's daemon.lisp to open it up a bit so that TBNL can use it's header parsing stuff. When the first line received to TBNL has a space in it the assumption is made that this is a direct HTTP request, otherwise a mod_lisp request. Cheers, Bob > > Cheers, > Edi. > > ---- Bob Hutchison -- blogs at Recursive Design Inc. -- From edi at agharta.de Mon Mar 14 21:50:57 2005 From: edi at agharta.de (Edi Weitz) Date: Mon, 14 Mar 2005 22:50:57 +0100 Subject: [tbnl-devel] New version 0.4.0 (Was: Patches and example for running TBNL and Araneida together) In-Reply-To: (Bob Hutchison's message of "Mon, 14 Mar 2005 08:22:00 -0500") References: Message-ID: Hi! On Mon, 14 Mar 2005 08:22:00 -0500, Bob Hutchison wrote: > I've attached patches for both Araneida and TBNL to this > message. Sorry for the cross-posting but there is some co-ordination > required here and I thought this would be a good way to do it. Thanks. I've released a new version of TBNL (0.4.0) which includes your patches and some initial documentation on how to use it - please check. It worked for me with LispWorks and AllegroCL but I get an error with CMUCL: No matching method for the generic function #, when called with arguments (#). [Condition of type PCL::NO-APPLICABLE-METHOD-ERROR] > Unfortunately there is a really *nasty* bug with the browser->tbnl > connection -- it consumes about 250k of memory for every access. I > cannot see the problem, and I'm looking for help :-) How does one test the browser->tbnl part? > I don't know how the tbnl-araneida package with the example should > be distributed. I've modified it and added it to the TBNL distribution. It'll now basically show the same pages the Apache/mod_lisp demo shows. Hope that's OK for you. Thanks again, Edi. From tbnl at bignoli.it Mon Mar 14 16:35:56 2005 From: tbnl at bignoli.it (Aurelio Bignoli) Date: Mon, 14 Mar 2005 17:35:56 +0100 Subject: [tbnl-devel] Problem with file uploads In-Reply-To: References: <16946.1934.145593.201879@vav.19216810.loc> Message-ID: <16949.48492.511634.882875@vav.19216810.loc> Edi Weitz writes: > My combination was LW/WinXP/Apache2 so your results /might/ show > problems specific to CMUCL or to Linux or to Apache 1.x... well, I tried also with LWL Personal and the result was the same. If I have time I'll install Apache 2 and I'll give it a try. Regards, Aurelio From ignas.mikalajunas at gmail.com Tue Mar 15 00:12:13 2005 From: ignas.mikalajunas at gmail.com (Ignas Mikalajunas) Date: Tue, 15 Mar 2005 02:12:13 +0200 Subject: [tbnl-devel] Problem with file uploads In-Reply-To: <16949.48492.511634.882875@vav.19216810.loc> References: <16946.1934.145593.201879@vav.19216810.loc> <16949.48492.511634.882875@vav.19216810.loc> Message-ID: Just started newest tbnl 0.4 and uploaded 180mb file. Yet the name of the file is "[en] Shrek 3D [2004].avi" so i am geting "http://localhost/tbnl/test/files/%5Ben%5D+Shrek+3D+%5B2004%5D.avi?path=%2Ftmp%2Ftbnl%2Ftest%2Ftbnl-test-1" as a download link which leads to an error when trying to download it ... Error in function LISP::FD-STREAM-READ-N-BYTES: Error reading #: Bad address though the file in that place exists ... The backtrace is attached in a file. Ignas Mikalaj?nas -------------- next part -------------- An HTML attachment was scrubbed... URL: From hutch at recursive.ca Tue Mar 15 00:30:48 2005 From: hutch at recursive.ca (Bob Hutchison) Date: Mon, 14 Mar 2005 19:30:48 -0500 Subject: [tbnl-devel] Re: New version 0.4.0 (Was: Patches and example for running TBNL and Araneida together) In-Reply-To: References: Message-ID: <99f74eac2d1e5e90e834b99366001ada@recursive.ca> On Mar 14, 2005, at 4:50 PM, Edi Weitz wrote: > Hi! > > On Mon, 14 Mar 2005 08:22:00 -0500, Bob Hutchison > wrote: > >> I've attached patches for both Araneida and TBNL to this >> message. Sorry for the cross-posting but there is some co-ordination >> required here and I thought this would be a good way to do it. > > Thanks. I've released a new version of TBNL (0.4.0) which includes > your patches and some initial documentation on how to use it - please > check. I've downloaded it and installed. Encountered a little problem. In araneida-test it seems that the setq of the *dispatch-table* has to be a top level form the way the path to the fz.jpg file is written. If you move it out of the setup code and onto the top level then compile and load (in Lispworks) it will work... at least for me. > > It worked for me with LispWorks and AllegroCL but I get an error with > CMUCL: > > No matching method for the generic function > # {5964F471}>, > when called with arguments > (#). > [Condition of type PCL::NO-APPLICABLE-METHOD-ERROR] I think I might know what this is. I can't run CMUCL but I'll have a look. > >> Unfortunately there is a really *nasty* bug with the browser->tbnl >> connection -- it consumes about 250k of memory for every access. I >> cannot see the problem, and I'm looking for help :-) > > How does one test the browser->tbnl part? Hit port 3000 from your browser, for example in my setup. You have to apply the patches to Araneida 0.9 of course, and *make* *sure* you recompile and use ASDF to load it. > >> I don't know how the tbnl-araneida package with the example should >> be distributed. > > I've modified it and added it to the TBNL distribution. It'll now > basically show the same pages the Apache/mod_lisp demo shows. Hope > that's OK for you. Fine by me. Thanks for doing this so quickly. Cheers, Bob > > Thanks again, > Edi. > > ---- Bob Hutchison -- blogs at Recursive Design Inc. -- From edi at agharta.de Tue Mar 15 01:36:58 2005 From: edi at agharta.de (Edi Weitz) Date: Tue, 15 Mar 2005 02:36:58 +0100 Subject: [tbnl-devel] Re: New version 0.4.0 In-Reply-To: <99f74eac2d1e5e90e834b99366001ada@recursive.ca> (Bob Hutchison's message of "Mon, 14 Mar 2005 19:30:48 -0500") References: <99f74eac2d1e5e90e834b99366001ada@recursive.ca> Message-ID: On Mon, 14 Mar 2005 19:30:48 -0500, Bob Hutchison wrote: > Encountered a little problem. In araneida-test it seems that the > setq of the *dispatch-table* has to be a top level form the way the > path to the fz.jpg file is written. If you move it out of the setup > code and onto the top level then compile and load (in Lispworks) it > will work... at least for me. Hmm, that should be irrelevant as I had the SETQ disabled with #+(or). The *DISPATCH-TABLE* is supposed to be set by the top-level form in test.lisp. You did load the test as described here , didn't you? Cheers, Edi. From edi at agharta.de Tue Mar 15 01:53:44 2005 From: edi at agharta.de (Edi Weitz) Date: Tue, 15 Mar 2005 02:53:44 +0100 Subject: [tbnl-devel] Problem with file uploads In-Reply-To: (Ignas Mikalajunas's message of "Tue, 15 Mar 2005 02:12:13 +0200") References: <16946.1934.145593.201879@vav.19216810.loc> <16949.48492.511634.882875@vav.19216810.loc> Message-ID: On Tue, 15 Mar 2005 02:12:13 +0200, Ignas Mikalajunas wrote: > Just started newest tbnl 0.4 and uploaded 180mb file. Yet the name > of the file is "[en] Shrek 3D [2004].avi" so i am geting > "http://localhost/tbnl/test/files/%5Ben%5D+Shrek+3D+%5B2004%5D.avi?path=%2Ftmp%2Ftbnl%2Ftest%2Ftbnl-test-1" > as a download link which leads to an error when trying to download > it ... > > Error in function LISP::FD-STREAM-READ-N-BYTES: > Error reading #: Bad address > > though the file in that place exists ... > > The backtrace is attached in a file. You didn't say which Lisp and OS you were using but I guess it's CMUCL, right? I don't think the name of the file matters, I guess the file is simply too big to be served by TBNL. See this message: If you think this is not the cause for the error try this (with or without TBNL loaded): (with-open-file (file "/path/to/tbnl-test-1" :direction :input :element-type '(unsigned-byte 8)) (let* ((len (file-length file)) (buf (make-array len :element-type '(unsigned-byte 8)))) (read-sequence buf file) 'OK)) Does that work? Can you check (with diff) whether tbnl-test-1 and the file you uploaded are identical? Cheers, Edi. From edi at agharta.de Tue Mar 15 02:19:59 2005 From: edi at agharta.de (Edi Weitz) Date: Tue, 15 Mar 2005 03:19:59 +0100 Subject: [tbnl-devel] Re: New version 0.4.0 In-Reply-To: <99f74eac2d1e5e90e834b99366001ada@recursive.ca> (Bob Hutchison's message of "Mon, 14 Mar 2005 19:30:48 -0500") References: <99f74eac2d1e5e90e834b99366001ada@recursive.ca> Message-ID: On Mon, 14 Mar 2005 19:30:48 -0500, Bob Hutchison wrote: > Hit port 3000 from your browser, for example > in my setup. You have to apply > the patches to Araneida 0.9 of course, and *make* *sure* you recompile > and use ASDF to load it. Hmm, I can't seem to reproduce the memory leaks you reported. I've reloaded the info.html page from the test suite about 200 times and the output of (ROOM) is stable. LW 4.4.0 on WinXP. BTW, how exactly does this direct connection to port 3000 work? Araneida isn't used at all and all the communication with the browser is directly handled by TBNL? (Yeah, I could look it up myself but it's 3 a.m. here and I'm tired... :) Cheers, Edi. From hutch at recursive.ca Tue Mar 15 12:08:34 2005 From: hutch at recursive.ca (Bob Hutchison) Date: Tue, 15 Mar 2005 07:08:34 -0500 Subject: [tbnl-devel] Re: New version 0.4.0 In-Reply-To: References: <99f74eac2d1e5e90e834b99366001ada@recursive.ca> Message-ID: <72939d1df179df4d4967d157413a6598@recursive.ca> On Mar 14, 2005, at 8:36 PM, Edi Weitz wrote: > On Mon, 14 Mar 2005 19:30:48 -0500, Bob Hutchison > wrote: > >> Encountered a little problem. In araneida-test it seems that the >> setq of the *dispatch-table* has to be a top level form the way the >> path to the fz.jpg file is written. If you move it out of the setup >> code and onto the top level then compile and load (in Lispworks) it >> will work... at least for me. > > Hmm, that should be irrelevant as I had the SETQ disabled with #+(or). > The *DISPATCH-TABLE* is supposed to be set by the top-level form in > test.lisp. You did load the test as described here > > , > > didn't you? I guess the trouble started when I restarted it. > > Cheers, > Edi. > > ---- Bob Hutchison -- blogs at Recursive Design Inc. -- From edi at agharta.de Tue Mar 15 12:13:58 2005 From: edi at agharta.de (Edi Weitz) Date: Tue, 15 Mar 2005 13:13:58 +0100 Subject: [tbnl-devel] Re: New version 0.4.0 In-Reply-To: <72939d1df179df4d4967d157413a6598@recursive.ca> (Bob Hutchison's message of "Tue, 15 Mar 2005 07:08:34 -0500") References: <99f74eac2d1e5e90e834b99366001ada@recursive.ca> <72939d1df179df4d4967d157413a6598@recursive.ca> Message-ID: On Tue, 15 Mar 2005 07:08:34 -0500, Bob Hutchison wrote: > I guess the trouble started when I restarted it. You did (STOP) and then (START) again? And what happened? Is that a reproducible problem? Thanks, Edi. From hutch at recursive.ca Tue Mar 15 12:34:29 2005 From: hutch at recursive.ca (Bob Hutchison) Date: Tue, 15 Mar 2005 07:34:29 -0500 Subject: [tbnl-devel] Re: New version 0.4.0 In-Reply-To: References: <99f74eac2d1e5e90e834b99366001ada@recursive.ca> Message-ID: On Mar 14, 2005, at 9:19 PM, Edi Weitz wrote: > On Mon, 14 Mar 2005 19:30:48 -0500, Bob Hutchison > wrote: > >> Hit port 3000 from your browser, for example >> in my setup. You have to apply >> the patches to Araneida 0.9 of course, and *make* *sure* you recompile >> and use ASDF to load it. > > Hmm, I can't seem to reproduce the memory leaks you reported. I've > reloaded the info.html page from the test suite about 200 times and > the output of (ROOM) is stable. LW 4.4.0 on WinXP. I'm using LW 4.4.0 on OS/X I ran the following commands ab -n 200 -c 10 http://localhost:3000/tbnl-araneida | tee results.ab.3000 ab -n 200 -c 10 http://localhost:3000/tbnl-araneida | tee results.ab.3000 ab -n 1400 -c 10 http://localhost:3000/tbnl-araneida | tee results.ab.3000 Then using the process monitor saw the following growth (in MB): before after 400 after 1400 real 70.74 77.86 89.82 virtual 249.16 461.91 969.97 (room) before Generation 0: Total Size 14505K, Allocated 9137K, Free 5335K Generation 1: Total Size 18806K, Allocated 3796K, Free 14977K Generation 2: Total Size 16196K, Allocated 11197K, Free 4977K Generation 3: Total Size 10631K, Allocated 10518K, Free 67K (room) after 400 Generation 0: Total Size 14505K, Allocated 1964K, Free 12509K Generation 1: Total Size 18934K, Allocated 3422K, Free 15479K Generation 2: Total Size 18756K, Allocated 11816K, Free 6914K Generation 3: Total Size 10631K, Allocated 10518K, Free 67K (room) after 1400 Generation 0: Total Size 14505K, Allocated 1778K, Free 12694K Generation 1: Total Size 19062K, Allocated 3454K, Free 15575K Generation 2: Total Size 25796K, Allocated 11816K, Free 13954K Generation 3: Total Size 10631K, Allocated 10518K, Free 67K > > BTW, how exactly does this direct connection to port 3000 work? > Araneida isn't used at all and all the communication with the browser > is directly handled by TBNL? (Yeah, I could look it up myself but > it's 3 a.m. here and I'm tired... :) I changed get-apache-command to (unroll the first iteration of the loop and so) read the first line and check to see if it contains a space. If the line came from mod_lisp it will not have a space in it. If it has a space, we know it wasn't mod_lisp so assume that we've got a direct HTTP request. When handling HTTP, call the read-request-from-stream/tbnl function (just above get-apache-command in modlisp.lisp). This sets up the new araneida::*standard-araneida* special variable (to nil) and calls araneida::read-request-from-stream/guts which is a new entry point in Araneida that I added by breaking up the previous function (read-request-from-stream). It then adds a couple of headers (url, content-stream, and server-ip-port) that TBNL seems to want. It then calls process-apache-command and returns. Cheers, Bob > > Cheers, > Edi. > > ---- Bob Hutchison -- blogs at Recursive Design Inc. -- From edi at agharta.de Tue Mar 15 12:39:16 2005 From: edi at agharta.de (Edi Weitz) Date: Tue, 15 Mar 2005 13:39:16 +0100 Subject: [tbnl-devel] Re: New version 0.4.0 In-Reply-To: (Bob Hutchison's message of "Tue, 15 Mar 2005 07:34:29 -0500") References: <99f74eac2d1e5e90e834b99366001ada@recursive.ca> Message-ID: On Tue, 15 Mar 2005 07:34:29 -0500, Bob Hutchison wrote: > I changed get-apache-command to (unroll the first iteration of the > loop and so) read the first line and check to see if it contains a > space. If the line came from mod_lisp it will not have a space in > it. If it has a space, we know it wasn't mod_lisp so assume that > we've got a direct HTTP request. When handling HTTP, call the > read-request-from-stream/tbnl function (just above > get-apache-command in modlisp.lisp). This sets up the new > araneida::*standard-araneida* special variable (to nil) and calls > araneida::read-request-from-stream/guts which is a new entry point > in Araneida that I added by breaking up the previous function > (read-request-from-stream). It then adds a couple of headers (url, > content-stream, and server-ip-port) that TBNL seems to want. It then > calls process-apache-command and returns. So this should basically work without Araneida being there at all, right? Or is Araneida involved in sending the reply back to the browser? From hutch at recursive.ca Tue Mar 15 12:56:35 2005 From: hutch at recursive.ca (Bob Hutchison) Date: Tue, 15 Mar 2005 07:56:35 -0500 Subject: [tbnl-devel] Re: New version 0.4.0 In-Reply-To: References: <99f74eac2d1e5e90e834b99366001ada@recursive.ca> Message-ID: On Mar 15, 2005, at 7:39 AM, Edi Weitz wrote: > On Tue, 15 Mar 2005 07:34:29 -0500, Bob Hutchison > wrote: > >> I changed get-apache-command to (unroll the first iteration of the >> loop and so) read the first line and check to see if it contains a >> space. If the line came from mod_lisp it will not have a space in >> it. If it has a space, we know it wasn't mod_lisp so assume that >> we've got a direct HTTP request. When handling HTTP, call the >> read-request-from-stream/tbnl function (just above >> get-apache-command in modlisp.lisp). This sets up the new >> araneida::*standard-araneida* special variable (to nil) and calls >> araneida::read-request-from-stream/guts which is a new entry point >> in Araneida that I added by breaking up the previous function >> (read-request-from-stream). It then adds a couple of headers (url, >> content-stream, and server-ip-port) that TBNL seems to want. It then >> calls process-apache-command and returns. > > So this should basically work without Araneida being there at all, > right? Or is Araneida involved in sending the reply back to the > browser? > Other than it uses the daemon.lisp code from Araneida to parse headers on the way in, it does not need Araneida. I had considered writing an HTTP header parser specifically for TBNL but I thought that modifying the daemon.lisp code would be quicker. It isn't hard writing HTTP header parsers, you only have to watch for multi-line headers. I had to modify TBNL to write HTTP headers on the way out in order to make it work with Araneida as a front end. So, saying this explicitly, TBNL is writing the HTTP response directly to the socket. (Though I have not tested this with redirect or require-authorization -- I had modified send-output and write-header-line to accomplish this). I didn't do anything about logging for either the stand-alone or with-araneida versions. The next logical step is to write an HTTP header parser for TBNL (or negotiate with the Araneida folks to use their code). > ---- Bob Hutchison -- blogs at Recursive Design Inc. -- From hutch at recursive.ca Tue Mar 15 12:58:45 2005 From: hutch at recursive.ca (Bob Hutchison) Date: Tue, 15 Mar 2005 07:58:45 -0500 Subject: [tbnl-devel] Re: New version 0.4.0 In-Reply-To: References: <99f74eac2d1e5e90e834b99366001ada@recursive.ca> <72939d1df179df4d4967d157413a6598@recursive.ca> Message-ID: On Mar 15, 2005, at 7:13 AM, Edi Weitz wrote: > On Tue, 15 Mar 2005 07:08:34 -0500, Bob Hutchison > wrote: > >> I guess the trouble started when I restarted it. > > You did (STOP) and then (START) again? And what happened? Is that a > reproducible problem? If I start it the way you document the startup of LW fails because multiprocessing isn't running yet. So I've got to run start later. The start that I wrote, attempts to stop first. The other thing that I wanted to be able to do is add handlers without restarting LW, that takes a long time in my configuration (a couple of minutes). Cheers, Bob > > Thanks, > Edi. > > ---- Bob Hutchison -- blogs at Recursive Design Inc. -- From edi at agharta.de Tue Mar 15 15:11:48 2005 From: edi at agharta.de (Edi Weitz) Date: Tue, 15 Mar 2005 16:11:48 +0100 Subject: [tbnl-devel] Re: New version 0.4.0 In-Reply-To: (Bob Hutchison's message of "Tue, 15 Mar 2005 07:56:35 -0500") References: <99f74eac2d1e5e90e834b99366001ada@recursive.ca> Message-ID: On Tue, 15 Mar 2005 07:56:35 -0500, Bob Hutchison wrote: > Other than it uses the daemon.lisp code from Araneida to parse > headers on the way in, it does not need Araneida. I had considered > writing an HTTP header parser specifically for TBNL but I thought > that modifying the daemon.lisp code would be quicker. It isn't hard > writing HTTP header parsers, you only have to watch for multi-line > headers. > > I had to modify TBNL to write HTTP headers on the way out in order > to make it work with Araneida as a front end. So, saying this > explicitly, TBNL is writing the HTTP response directly to the > socket. (Though I have not tested this with redirect or > require-authorization -- I had modified send-output and > write-header-line to accomplish this). OK, thanks for the info. I'll try to do some more tests and add more documentation about this feature. > I didn't do anything about logging for either the stand-alone or > with-araneida versions. Maybe we should address this in one of the future releases. Kind of embarassing if you send your logging data back to the client as a header... :) > The next logical step is to write an HTTP header parser for TBNL (or > negotiate with the Araneida folks to use their code). Can't we just steal it? Araneida also has a BSD license. Cheers, Edi. From edi at agharta.de Tue Mar 15 15:17:00 2005 From: edi at agharta.de (Edi Weitz) Date: Tue, 15 Mar 2005 16:17:00 +0100 Subject: [tbnl-devel] Re: New version 0.4.0 In-Reply-To: (Bob Hutchison's message of "Tue, 15 Mar 2005 07:58:45 -0500") References: <99f74eac2d1e5e90e834b99366001ada@recursive.ca> <72939d1df179df4d4967d157413a6598@recursive.ca> Message-ID: On Tue, 15 Mar 2005 07:58:45 -0500, Bob Hutchison wrote: > If I start it the way you document the startup of LW fails because > multiprocessing isn't running yet. So I've got to run start later. I've got (mp:initialize-multiprocessing) at the end of my ~/.lispworks file. But I don't understand how something I describe in the TBNL docs can cause LW startup to fail. I was assuming that you've already started your Lisp before you load Araneida and TBNL. What exactly do you mean? > The other thing that I wanted to be able to do is add handlers > without restarting LW, that takes a long time in my configuration (a > couple of minutes). You should be able to add/remove handlers just by modifying *DISPATCH-TABLE*, no need to stop or restart anything. Cheers, Edi. From marc.battyani at fractalconcept.com Tue Mar 15 15:24:20 2005 From: marc.battyani at fractalconcept.com (Marc Battyani) Date: Tue, 15 Mar 2005 16:24:20 +0100 Subject: [tbnl-devel] Re: New version 0.4.0 References: <99f74eac2d1e5e90e834b99366001ada@recursive.ca> Message-ID: <0aa801c52973$1081ff60$0a02a8c0@marcxp> "Bob Hutchison" wrote: [...] > The next logical step is to write an HTTP header parser for TBNL (or > negotiate with the Araneida folks to use their code). I would be very interested to add such a front-end to the mod_lisp repository. (Some kind of mod_pure_lisp ;-) Several people (including me) have been interested by the possibility of having a light-weight stand-alone server compatible with mod_lisp (mostly for demonstrations or small apps) without all the overhead and constraints imposed by paserve or areneida. As I posted here some time ago, I used paserve for this but a clean stand-alone HTTP front-end would be nicer. Marc From marc.battyani at fractalconcept.com Tue Mar 15 15:31:17 2005 From: marc.battyani at fractalconcept.com (Marc Battyani) Date: Tue, 15 Mar 2005 16:31:17 +0100 Subject: [tbnl-devel] Re: New version 0.4.0 References: <99f74eac2d1e5e90e834b99366001ada@recursive.ca> Message-ID: <0ab301c52974$08aa2280$0a02a8c0@marcxp> "Edi Weitz" wrote: > On Tue, 15 Mar 2005 07:56:35 -0500, Bob Hutchison wrote: > > > The next logical step is to write an HTTP header parser for TBNL (or > > negotiate with the Araneida folks to use their code). > > Can't we just steal it? Araneida also has a BSD license. Heh! Maybe "borrowing" is more politically correct than "stealing" ;-) As long as the copyright is left it should be OK IMO. (I've put iterate in cl-pdf and I will probably put Zach Beane's zlib in it as well) Marc From edi at agharta.de Tue Mar 15 15:48:20 2005 From: edi at agharta.de (Edi Weitz) Date: Tue, 15 Mar 2005 16:48:20 +0100 Subject: [tbnl-devel] Re: New version 0.4.0 In-Reply-To: <0ab301c52974$08aa2280$0a02a8c0@marcxp> (Marc Battyani's message of "Tue, 15 Mar 2005 16:31:17 +0100") References: <99f74eac2d1e5e90e834b99366001ada@recursive.ca> <0ab301c52974$08aa2280$0a02a8c0@marcxp> Message-ID: On Tue, 15 Mar 2005 16:31:17 +0100, "Marc Battyani" wrote: > Heh! Maybe "borrowing" is more politically correct than "stealing" > ;-) Hehe... :) > As long as the copyright is left it should be OK IMO. (I've put > iterate in cl-pdf and I will probably put Zach Beane's zlib in it as > well) Yes, I already wanted to mention that lib to you. One more step towards the "get rid of all FFI calls" direction... :) Cheers, Edi. From marc.battyani at fractalconcept.com Tue Mar 15 16:01:04 2005 From: marc.battyani at fractalconcept.com (Marc Battyani) Date: Tue, 15 Mar 2005 17:01:04 +0100 Subject: [tbnl-devel] Re: New version 0.4.0 References: <99f74eac2d1e5e90e834b99366001ada@recursive.ca> <0ab301c52974$08aa2280$0a02a8c0@marcxp> Message-ID: <0afc01c52978$31f45e40$0a02a8c0@marcxp> "Edi Weitz" wrote: > On Tue, 15 Mar 2005 16:31:17 +0100, "Marc Battyani" wrote: > > > iterate in cl-pdf and I will probably put Zach Beane's zlib in it as > > well) > > Yes, I already wanted to mention that lib to you. One more step > towards the "get rid of all FFI calls" direction... :) Yes, it's very interesting. The zlib FFI has been the major portability problem for cl-pdf. I'm already in contact with Zach about this and I will put it in cl-pdf as soon as it works on the major implementations. Marc From hutch at recursive.ca Tue Mar 15 16:33:11 2005 From: hutch at recursive.ca (Bob Hutchison) Date: Tue, 15 Mar 2005 11:33:11 -0500 Subject: [tbnl-devel] Re: New version 0.4.0 In-Reply-To: References: <99f74eac2d1e5e90e834b99366001ada@recursive.ca> <72939d1df179df4d4967d157413a6598@recursive.ca> Message-ID: On Mar 15, 2005, at 10:17 AM, Edi Weitz wrote: > On Tue, 15 Mar 2005 07:58:45 -0500, Bob Hutchison > wrote: > >> If I start it the way you document the startup of LW fails because >> multiprocessing isn't running yet. So I've got to run start later. > > I've got > > (mp:initialize-multiprocessing) > > at the end of my ~/.lispworks file. But I don't understand how > something I describe in the TBNL docs can cause LW startup to fail. I > was assuming that you've already started your Lisp before you load > Araneida and TBNL. What exactly do you mean? I load it in my .lispworks file... which is why I'm having problems I think. > >> The other thing that I wanted to be able to do is add handlers >> without restarting LW, that takes a long time in my configuration (a >> couple of minutes). > > You should be able to add/remove handlers just by modifying > *DISPATCH-TABLE*, no need to stop or restart anything. > > Cheers, > Edi. > > ---- Bob Hutchison -- blogs at Recursive Design Inc. -- From hutch at recursive.ca Tue Mar 15 16:34:44 2005 From: hutch at recursive.ca (Bob Hutchison) Date: Tue, 15 Mar 2005 11:34:44 -0500 Subject: [tbnl-devel] Re: New version 0.4.0 In-Reply-To: References: <99f74eac2d1e5e90e834b99366001ada@recursive.ca> Message-ID: <2e51a381cf79779d7c2c3cd130889198@recursive.ca> On Mar 15, 2005, at 10:11 AM, Edi Weitz wrote: > On Tue, 15 Mar 2005 07:56:35 -0500, Bob Hutchison > wrote: > >> Other than it uses the daemon.lisp code from Araneida to parse >> headers on the way in, it does not need Araneida. I had considered >> writing an HTTP header parser specifically for TBNL but I thought >> that modifying the daemon.lisp code would be quicker. It isn't hard >> writing HTTP header parsers, you only have to watch for multi-line >> headers. >> >> I had to modify TBNL to write HTTP headers on the way out in order >> to make it work with Araneida as a front end. So, saying this >> explicitly, TBNL is writing the HTTP response directly to the >> socket. (Though I have not tested this with redirect or >> require-authorization -- I had modified send-output and >> write-header-line to accomplish this). > > OK, thanks for the info. I'll try to do some more tests and add more > documentation about this feature. > >> I didn't do anything about logging for either the stand-alone or >> with-araneida versions. > > Maybe we should address this in one of the future releases. Kind of > embarassing if you send your logging data back to the client as a > header... :) Yes, I agree :-) > >> The next logical step is to write an HTTP header parser for TBNL (or >> negotiate with the Araneida folks to use their code). > > Can't we just steal it? Araneida also has a BSD license. I've just written a little parser that I am trying out. What format do you expect the header 'keys' to be in? Araneida has them as symbols, I think TBNL wants strings... what about case sensitivity? Cheers, Bob > > Cheers, > Edi. > > ---- Bob Hutchison -- blogs at Recursive Design Inc. -- From hutch at recursive.ca Tue Mar 15 16:37:54 2005 From: hutch at recursive.ca (Bob Hutchison) Date: Tue, 15 Mar 2005 11:37:54 -0500 Subject: [tbnl-devel] Re: New version 0.4.0 In-Reply-To: <0aa801c52973$1081ff60$0a02a8c0@marcxp> References: <99f74eac2d1e5e90e834b99366001ada@recursive.ca> <0aa801c52973$1081ff60$0a02a8c0@marcxp> Message-ID: <2490159c3100bbebe12e5ace89c0ee5b@recursive.ca> On Mar 15, 2005, at 10:24 AM, Marc Battyani wrote: > "Bob Hutchison" wrote: > > [...] >> The next logical step is to write an HTTP header parser for TBNL (or >> negotiate with the Araneida folks to use their code). > > I would be very interested to add such a front-end to the mod_lisp > repository. (Some kind of mod_pure_lisp ;-) > Several people (including me) have been interested by the possibility > of > having a light-weight stand-alone server compatible with mod_lisp > (mostly > for demonstrations or small apps) without all the overhead and > constraints > imposed by paserve or areneida. As I posted here some time ago, I used > paserve for this but a clean stand-alone HTTP front-end would be nicer. I've just written a tiny http header parser that I'll make available real soon. What did you want to do, call mod_lisp directly (e.g. FFI)? or something else? Cheers, Bob > > Marc > > > ---- Bob Hutchison -- blogs at Recursive Design Inc. -- From marc.battyani at fractalconcept.com Tue Mar 15 17:15:47 2005 From: marc.battyani at fractalconcept.com (Marc Battyani) Date: Tue, 15 Mar 2005 18:15:47 +0100 Subject: [tbnl-devel] Re: New version 0.4.0 References: <99f74eac2d1e5e90e834b99366001ada@recursive.ca> <0aa801c52973$1081ff60$0a02a8c0@marcxp> <2490159c3100bbebe12e5ace89c0ee5b@recursive.ca> Message-ID: <0bb601c52982$a21fd690$0a02a8c0@marcxp> "Bob Hutchison" wrote: > On Mar 15, 2005, at 10:24 AM, Marc Battyani wrote: > > > I would be very interested to add such a front-end to the mod_lisp > > repository. (Some kind of mod_pure_lisp ;-) [...] > I've just written a tiny http header parser that I'll make available > real soon. What did you want to do, call mod_lisp directly (e.g. FFI)? > or something else? No FFI, just the Lisp HTTP front-end/parser so that it can be used instead of mod_lisp for demos and/or non-critical applications. Just keep mod_lisp compatible headers (the strings in the alist)) Marc From marc.battyani at fractalconcept.com Tue Mar 15 17:18:23 2005 From: marc.battyani at fractalconcept.com (Marc Battyani) Date: Tue, 15 Mar 2005 18:18:23 +0100 Subject: [tbnl-devel] Re: New version 0.4.0 References: <99f74eac2d1e5e90e834b99366001ada@recursive.ca> <2e51a381cf79779d7c2c3cd130889198@recursive.ca> Message-ID: <0bbf01c52982$ff130110$0a02a8c0@marcxp> "Bob Hutchison" wrote: > > I've just written a little parser that I am trying out. What format do > you expect the header 'keys' to be in? Araneida has them as symbols, I > think TBNL wants strings... what about case sensitivity? Just keep mod_lisp compatible headers (the strings in the alist)) so that it can be interchangeable with mod_lisp. It's case sensitive normally. Marc From hutch at recursive.ca Tue Mar 15 22:10:02 2005 From: hutch at recursive.ca (Bob Hutchison) Date: Tue, 15 Mar 2005 17:10:02 -0500 Subject: [tbnl-devel] Another patch to add a non-araneida HTTP header parser Message-ID: <2a8f8eb6cb36218428851bb9a8b77541@recursive.ca> Hi, Here is a patch that will modify TBNL so that it no longer needs Araneida to work stand-alone. It is pretty simple. You'll be wanting to look at read-http-request and read-http-headers in modlisp.lisp Cheers, Bob ---- Bob Hutchison -- blogs at Recursive Design Inc. -- From hutch at recursive.ca Tue Mar 15 22:25:47 2005 From: hutch at recursive.ca (Bob Hutchison) Date: Tue, 15 Mar 2005 17:25:47 -0500 Subject: [tbnl-devel] Re: Another patch to add a non-araneida HTTP header parser In-Reply-To: <2a8f8eb6cb36218428851bb9a8b77541@recursive.ca> References: <2a8f8eb6cb36218428851bb9a8b77541@recursive.ca> Message-ID: <8c640fbfbf6d699b1394b220eef4a121@recursive.ca> No, *here* is the patch. Sorry. -------------- next part -------------- A non-text attachment was scrubbed... Name: tbnl.patch Type: application/octet-stream Size: 5698 bytes Desc: not available URL: -------------- next part -------------- On Mar 15, 2005, at 5:10 PM, Bob Hutchison wrote: > Hi, > > Here is a patch that will modify TBNL so that it no longer needs > Araneida to work stand-alone. It is pretty simple. You'll be wanting > to look at read-http-request and read-http-headers in modlisp.lisp > > Cheers, > Bob > ---- > Bob Hutchison -- blogs at > Recursive Design Inc. -- > > ---- Bob Hutchison -- blogs at Recursive Design Inc. -- From edi at agharta.de Wed Mar 16 10:15:21 2005 From: edi at agharta.de (Edi Weitz) Date: Wed, 16 Mar 2005 11:15:21 +0100 Subject: [tbnl-devel] Re: Another patch to add a non-araneida HTTP header parser In-Reply-To: <8c640fbfbf6d699b1394b220eef4a121@recursive.ca> (Bob Hutchison's message of "Tue, 15 Mar 2005 17:25:47 -0500") References: <2a8f8eb6cb36218428851bb9a8b77541@recursive.ca> <8c640fbfbf6d699b1394b220eef4a121@recursive.ca> Message-ID: On Tue, 15 Mar 2005 17:25:47 -0500, Bob Hutchison wrote: > No, *here* is the patch. Sorry. Thanks, Bob. I'll release a new version later today. Cheers, Edi. From hutch at recursive.ca Wed Mar 16 12:23:42 2005 From: hutch at recursive.ca (Bob Hutchison) Date: Wed, 16 Mar 2005 07:23:42 -0500 Subject: [tbnl-devel] Re: New version 0.4.0 In-Reply-To: References: <99f74eac2d1e5e90e834b99366001ada@recursive.ca> <0ab301c52974$08aa2280$0a02a8c0@marcxp> Message-ID: <4c1a53c995d844bc102204420971d07f@recursive.ca> On Mar 15, 2005, at 10:48 AM, Edi Weitz wrote: > On Tue, 15 Mar 2005 16:31:17 +0100, "Marc Battyani" > wrote: > >> Heh! Maybe "borrowing" is more politically correct than "stealing" >> ;-) > > Hehe... :) > >> As long as the copyright is left it should be OK IMO. (I've put >> iterate in cl-pdf and I will probably put Zach Beane's zlib in it as >> well) > > Yes, I already wanted to mention that lib to you. One more step > towards the "get rid of all FFI calls" direction... :) Actually, I wanted to mention that library to *you* Edi. What do you think about supporting gzip (and/or deflate) encoding? I was going to add it to TBNL -- the application I am working on used to be in Java and gzip encoding had an enormous (positive) impact on performance. If somebody else is already doing this then I won't worry about it. Marc, what happens with mod_lisp if an gzip encoded body is returned? I think you must just pass it along, but that part is written in C and, well, I'd rather ask than look for myself :-) Cheers, Bob > > Cheers, > Edi. > > ---- Bob Hutchison -- blogs at Recursive Design Inc. -- From hutch at recursive.ca Wed Mar 16 12:28:37 2005 From: hutch at recursive.ca (Bob Hutchison) Date: Wed, 16 Mar 2005 07:28:37 -0500 Subject: [tbnl-devel] Re: New version 0.4.0 In-Reply-To: <0aa801c52973$1081ff60$0a02a8c0@marcxp> References: <99f74eac2d1e5e90e834b99366001ada@recursive.ca> <0aa801c52973$1081ff60$0a02a8c0@marcxp> Message-ID: On Mar 15, 2005, at 10:24 AM, Marc Battyani wrote: > "Bob Hutchison" wrote: > > [...] >> The next logical step is to write an HTTP header parser for TBNL (or >> negotiate with the Araneida folks to use their code). > > I would be very interested to add such a front-end to the mod_lisp > repository. (Some kind of mod_pure_lisp ;-) > Several people (including me) have been interested by the possibility > of > having a light-weight stand-alone server compatible with mod_lisp > (mostly > for demonstrations or small apps) without all the overhead and > constraints > imposed by paserve or areneida. As I posted here some time ago, I used > paserve for this but a clean stand-alone HTTP front-end would be nicer. Actually, the bits and pieces that are in TBNL's modlisp.lisp file are probably sufficient to be used as a simple stand-alone server (when the last patch I posted is applied, or Edi releases a new version). I think maybe some small refactoring will make things a bit cleaner, but if you are willing to write a standard TBNL handler for the requests it works now (i.e. you don't have to use any of TBNL's facilities other than the dispatcher, which isn't so bad because you'll probably want to dispatch anyway -- and, if you are using TBNL dispatchers the server is going to be pretty clean as it is). Cheers, bob > > Marc > > > ---- Bob Hutchison -- blogs at Recursive Design Inc. -- From hutch at recursive.ca Wed Mar 16 12:33:58 2005 From: hutch at recursive.ca (Bob Hutchison) Date: Wed, 16 Mar 2005 07:33:58 -0500 Subject: [tbnl-devel] Re: New version 0.4.0 In-Reply-To: <0bbf01c52982$ff130110$0a02a8c0@marcxp> References: <99f74eac2d1e5e90e834b99366001ada@recursive.ca> <2e51a381cf79779d7c2c3cd130889198@recursive.ca> <0bbf01c52982$ff130110$0a02a8c0@marcxp> Message-ID: <3c9c907273a234c73b2b268ae6e23e01@recursive.ca> On Mar 15, 2005, at 12:18 PM, Marc Battyani wrote: > "Bob Hutchison" wrote: >> >> I've just written a little parser that I am trying out. What format do >> you expect the header 'keys' to be in? Araneida has them as symbols, I >> think TBNL wants strings... what about case sensitivity? > > Just keep mod_lisp compatible headers (the strings in the alist)) so > that it > can be interchangeable with mod_lisp. > It's case sensitive normally. So now is the time to ask I think :-) Marc, what headers are you adding in mod_lisp? Is this documented someplace? I'm already adding a few headers that TBNL needs, it would be very easy to add more. Edi, is there a recommended way to find headers in TBNL? I can't find it, but I might be staring right at it and still not see it -- this has happened before :-) If there isn't, maybe this would be a good time to add one? Oh, same question for you Edi, what headers do you need to be present that may not be supplied by the user's browser? Cheers, Bob > > Marc > > > ---- Bob Hutchison -- blogs at Recursive Design Inc. -- From stesch at no-spoon.de Wed Mar 16 12:36:52 2005 From: stesch at no-spoon.de (Stefan Scholl) Date: Wed, 16 Mar 2005 13:36:52 +0100 Subject: [tbnl-devel] Re: New version 0.4.0 In-Reply-To: <4c1a53c995d844bc102204420971d07f@recursive.ca> References: <99f74eac2d1e5e90e834b99366001ada@recursive.ca> <0ab301c52974$08aa2280$0a02a8c0@marcxp> <4c1a53c995d844bc102204420971d07f@recursive.ca> Message-ID: <20050316123652.GM28782@parsec.no-spoon.de> On 2005-03-16 07:23:42, Bob Hutchison wrote: > Actually, I wanted to mention that library to *you* Edi. What do you > think about supporting gzip (and/or deflate) encoding? I was going to Yesterday on #lisp: 17:43 < stesch> OK, now for any "Accept-Encoding:.*gzip" one could run Xach's zlib thing. Who implements this for TBNL? (No answers. :-) From hutch at recursive.ca Wed Mar 16 12:43:33 2005 From: hutch at recursive.ca (Bob Hutchison) Date: Wed, 16 Mar 2005 07:43:33 -0500 Subject: [tbnl-devel] Re: New version 0.4.0 In-Reply-To: <20050316123652.GM28782@parsec.no-spoon.de> References: <99f74eac2d1e5e90e834b99366001ada@recursive.ca> <0ab301c52974$08aa2280$0a02a8c0@marcxp> <4c1a53c995d844bc102204420971d07f@recursive.ca> <20050316123652.GM28782@parsec.no-spoon.de> Message-ID: <1cfb9d30a4ddd448d2bacd8fcb651ab9@recursive.ca> On Mar 16, 2005, at 7:36 AM, Stefan Scholl wrote: > On 2005-03-16 07:23:42, Bob Hutchison wrote: >> Actually, I wanted to mention that library to *you* Edi. What do you >> think about supporting gzip (and/or deflate) encoding? I was going to > > Yesterday on #lisp: > > 17:43 < stesch> OK, now for any "Accept-Encoding:.*gzip" one > could run Xach's zlib thing. Who implements this > for TBNL? > > (No answers. :-) What's #lisp? I can do it easily enough I think. If I can't get it done in the next couple of days it will be a few weeks (I have a vacation scheduled and I -- voluntarily -- subject myself to computer and internet withdrawal for the duration -- for some reason I imagine that this somehow proves to my wife that I'm not really an addict :-) Cheers, Bob > > > > _______________________________________________ > tbnl-devel site list > tbnl-devel at common-lisp.net > http://common-lisp.net/mailman/listinfo/tbnl-devel > > ---- Bob Hutchison -- blogs at Recursive Design Inc. -- From stesch at no-spoon.de Wed Mar 16 12:46:00 2005 From: stesch at no-spoon.de (Stefan Scholl) Date: Wed, 16 Mar 2005 13:46:00 +0100 Subject: [tbnl-devel] Re: New version 0.4.0 In-Reply-To: <2e51a381cf79779d7c2c3cd130889198@recursive.ca> References: <99f74eac2d1e5e90e834b99366001ada@recursive.ca> <2e51a381cf79779d7c2c3cd130889198@recursive.ca> Message-ID: <20050316124600.GN28782@parsec.no-spoon.de> On 2005-03-15 11:34:44, Bob Hutchison wrote: > On Mar 15, 2005, at 10:11 AM, Edi Weitz wrote: > >Maybe we should address this in one of the future releases. Kind of > >embarassing if you send your logging data back to the client as a > >header... :) > > Yes, I agree :-) I haven't read all the recent patches. Is this problem addressed? I'd say let the user supply his own logging function which gets all the "Log*" lines TBNL sends to Araneida or standalone-thingy. *LOG-FUNCTION* or something. For presentation nobody gets strange header lines. And if you really have to debug you can use a simple function to write in a logfile or use CL-SYSLOG for a more sophisticated way. From stesch at no-spoon.de Wed Mar 16 12:54:09 2005 From: stesch at no-spoon.de (Stefan Scholl) Date: Wed, 16 Mar 2005 13:54:09 +0100 Subject: [tbnl-devel] Re: New version 0.4.0 In-Reply-To: <1cfb9d30a4ddd448d2bacd8fcb651ab9@recursive.ca> References: <0ab301c52974$08aa2280$0a02a8c0@marcxp> <4c1a53c995d844bc102204420971d07f@recursive.ca> <20050316123652.GM28782@parsec.no-spoon.de> <1cfb9d30a4ddd448d2bacd8fcb651ab9@recursive.ca> Message-ID: <20050316125409.GA7527@parsec.no-spoon.de> On 2005-03-16 07:43:33, Bob Hutchison wrote: > On Mar 16, 2005, at 7:36 AM, Stefan Scholl wrote: > >Yesterday on #lisp: > >17:43 < stesch> OK, now for any "Accept-Encoding:.*gzip" one > > could run Xach's zlib thing. Who implements this > > for TBNL? > > What's #lisp? IRC channel #lisp on the IRC network freenode. http://www.cliki.net/IRC > I can do it easily enough I think. If I can't get it done in the next Should be easy. I would look for the documentation of mod_gzip to see what headers have to be set and questioned. AFAIK incoming "Accept-Encoding" must be checked for "gzip" and in the response header "Vary: Accept-Encoding" and "Content-Encoding: gzip" must be set. (I've just read the request and response header for a website that uses mod_gzip.) Err, is it "gzip" or "deflate"? > for the duration -- for some reason I imagine that this somehow proves > to my wife that I'm not really an addict :-) I can quit any time I want! :-) From hutch at recursive.ca Wed Mar 16 12:56:35 2005 From: hutch at recursive.ca (Bob Hutchison) Date: Wed, 16 Mar 2005 07:56:35 -0500 Subject: [tbnl-devel] Re: New version 0.4.0 In-Reply-To: <20050316124600.GN28782@parsec.no-spoon.de> References: <99f74eac2d1e5e90e834b99366001ada@recursive.ca> <2e51a381cf79779d7c2c3cd130889198@recursive.ca> <20050316124600.GN28782@parsec.no-spoon.de> Message-ID: <078146c583164e9bdc61077b62a1286d@recursive.ca> On Mar 16, 2005, at 7:46 AM, Stefan Scholl wrote: > On 2005-03-15 11:34:44, Bob Hutchison wrote: >> On Mar 15, 2005, at 10:11 AM, Edi Weitz wrote: >>> Maybe we should address this in one of the future releases. Kind of >>> embarassing if you send your logging data back to the client as a >>> header... :) >> >> Yes, I agree :-) > > I haven't read all the recent patches. Is this problem addressed? > > I'd say let the user supply his own logging function which gets > all the "Log*" lines TBNL sends to Araneida or standalone-thingy. > > *LOG-FUNCTION* or something. > > For presentation nobody gets strange header lines. And if you > really have to debug you can use a simple function to write in a > logfile or use CL-SYSLOG for a more sophisticated way. This sounds good. I'd just add one thing: this function should be able to return nil or values representing a header's name/value. This would allow the header to be 'handled' or 're-written' or passed-through. I can imagine situations where I'd like to be able to pass log messages back to the client (e.g. debugging a server-server situation) > > > > _______________________________________________ > tbnl-devel site list > tbnl-devel at common-lisp.net > http://common-lisp.net/mailman/listinfo/tbnl-devel > > ---- Bob Hutchison -- blogs at Recursive Design Inc. -- From edi at agharta.de Wed Mar 16 13:20:17 2005 From: edi at agharta.de (Edi Weitz) Date: Wed, 16 Mar 2005 14:20:17 +0100 Subject: [tbnl-devel] Re: New version 0.4.0 In-Reply-To: <4c1a53c995d844bc102204420971d07f@recursive.ca> (Bob Hutchison's message of "Wed, 16 Mar 2005 07:23:42 -0500") References: <99f74eac2d1e5e90e834b99366001ada@recursive.ca> <0ab301c52974$08aa2280$0a02a8c0@marcxp> <4c1a53c995d844bc102204420971d07f@recursive.ca> Message-ID: On Wed, 16 Mar 2005 07:23:42 -0500, Bob Hutchison wrote: > Actually, I wanted to mention that library to *you* Edi. What do you > think about supporting gzip (and/or deflate) encoding? I was going > to add it to TBNL -- the application I am working on used to be in > Java and gzip encoding had an enormous (positive) impact on > performance. If somebody else is already doing this then I won't > worry about it. Hmm, since I've always used Apache/mod_lisp in front of TBNL I also used mod_gzip which works quite well. I don't think that adding this to TBNL is a good idea because it'll complicate things and is already available in the backend. What do others think? Cheers, Edi. From edi at agharta.de Wed Mar 16 13:22:59 2005 From: edi at agharta.de (Edi Weitz) Date: Wed, 16 Mar 2005 14:22:59 +0100 Subject: [tbnl-devel] Re: New version 0.4.0 In-Reply-To: <3c9c907273a234c73b2b268ae6e23e01@recursive.ca> (Bob Hutchison's message of "Wed, 16 Mar 2005 07:33:58 -0500") References: <99f74eac2d1e5e90e834b99366001ada@recursive.ca> <2e51a381cf79779d7c2c3cd130889198@recursive.ca> <0bbf01c52982$ff130110$0a02a8c0@marcxp> <3c9c907273a234c73b2b268ae6e23e01@recursive.ca> Message-ID: On Wed, 16 Mar 2005 07:33:58 -0500, Bob Hutchison wrote: > Oh, same question for you Edi, what headers do you need to be > present that may not be supplied by the user's browser? I've begun to prepare a new release which includes your patch and a new logging facility. This new release will also include updated docs and when I'm finished doing that I can answer this question in more detail. Unfortunately, I have to work for money now, so the release will have to wait until tonight or so... :) Cheers, Edi. From marc.battyani at fractalconcept.com Wed Mar 16 14:15:31 2005 From: marc.battyani at fractalconcept.com (Marc Battyani) Date: Wed, 16 Mar 2005 15:15:31 +0100 Subject: [tbnl-devel] Re: New version 0.4.0 References: <99f74eac2d1e5e90e834b99366001ada@recursive.ca> <2e51a381cf79779d7c2c3cd130889198@recursive.ca> <0bbf01c52982$ff130110$0a02a8c0@marcxp> <3c9c907273a234c73b2b268ae6e23e01@recursive.ca> Message-ID: <101701c52a32$9d5f7f60$0a02a8c0@marcxp> "Bob Hutchison" wrote: > > So now is the time to ask I think :-) Marc, what headers are you > adding in mod_lisp? Is this documented someplace? I'm already adding a > few headers that TBNL needs, it would be very easy to add more. Basically it's the HTTP headers that are in the request. So what you should do is to add all the headers you parse to the alist so that the application can do whatever it wants with it. You can also add some ones ot comming from the browser, like the client IP for instance. Marc From marc.battyani at fractalconcept.com Wed Mar 16 14:35:31 2005 From: marc.battyani at fractalconcept.com (Marc Battyani) Date: Wed, 16 Mar 2005 15:35:31 +0100 Subject: [tbnl-devel] Re: New version 0.4.0 References: <99f74eac2d1e5e90e834b99366001ada@recursive.ca> <0ab301c52974$08aa2280$0a02a8c0@marcxp> <4c1a53c995d844bc102204420971d07f@recursive.ca> Message-ID: <103701c52a35$691da170$0a02a8c0@marcxp> "Bob Hutchison" wrote: > > Actually, I wanted to mention that library to *you* Edi. What do you > think about supporting gzip (and/or deflate) encoding? I was going to > add it to TBNL -- the application I am working on used to be in Java > and gzip encoding had an enormous (positive) impact on performance. If > somebody else is already doing this then I won't worry about it. > > Marc, what happens with mod_lisp if an gzip encoded body is returned? I > think you must just pass it along, but that part is written in C and, > well, I'd rather ask than look for myself :-) You can pass what you want to mod_lisp as long as you give the correct content-length and headers. But If you use Apache you should better use mod_gzip. I don't think it's a good idea to try to compete with Apache for a production server. Even paserve and Areneida servers generally hide behind Apache for real production use. It's just that they do it the wrong way with mod_proxy rather than mod_lisp. ;-) Marc From marc.battyani at fractalconcept.com Wed Mar 16 14:35:50 2005 From: marc.battyani at fractalconcept.com (Marc Battyani) Date: Wed, 16 Mar 2005 15:35:50 +0100 Subject: [tbnl-devel] Re: New version 0.4.0 References: <99f74eac2d1e5e90e834b99366001ada@recursive.ca> <0aa801c52973$1081ff60$0a02a8c0@marcxp> Message-ID: <103801c52a35$74d3ad70$0a02a8c0@marcxp> "Bob Hutchison" wrote: > On Mar 15, 2005, at 10:24 AM, Marc Battyani wrote: > > > I would be very interested to add such a front-end to the mod_lisp > > repository. (Some kind of mod_pure_lisp ;-) > > Several people (including me) have been interested by the possibility > > of > > having a light-weight stand-alone server compatible with mod_lisp > > (mostly > > for demonstrations or small apps) without all the overhead and > > constraints > > imposed by paserve or areneida. As I posted here some time ago, I used > > paserve for this but a clean stand-alone HTTP front-end would be nicer. > > Actually, the bits and pieces that are in TBNL's modlisp.lisp file are > probably sufficient to be used as a simple stand-alone server (when the > last patch I posted is applied, or Edi releases a new version). I think > maybe some small refactoring will make things a bit cleaner, but if you > are willing to write a standard TBNL handler for the requests it works > now (i.e. you don't have to use any of TBNL's facilities other than the > dispatcher, which isn't so bad because you'll probably want to dispatch > anyway -- and, if you are using TBNL dispatchers the server is going to > be pretty clean as it is). OK I will look at that in the next release. Marc From marc.battyani at fractalconcept.com Wed Mar 16 14:40:44 2005 From: marc.battyani at fractalconcept.com (Marc Battyani) Date: Wed, 16 Mar 2005 15:40:44 +0100 Subject: [tbnl-devel] Re: New version 0.4.0 References: <99f74eac2d1e5e90e834b99366001ada@recursive.ca> <0ab301c52974$08aa2280$0a02a8c0@marcxp><4c1a53c995d844bc102204420971d07f@recursive.ca> Message-ID: <106601c52a36$234433c0$0a02a8c0@marcxp> "Edi Weitz" wrote: > On Wed, 16 Mar 2005 07:23:42 -0500, Bob Hutchison wrote: > > > Actually, I wanted to mention that library to *you* Edi. What do you > > think about supporting gzip (and/or deflate) encoding? I was going > > to add it to TBNL -- the application I am working on used to be in > > Java and gzip encoding had an enormous (positive) impact on > > performance. If somebody else is already doing this then I won't > > worry about it. > > Hmm, since I've always used Apache/mod_lisp in front of TBNL I also > used mod_gzip which works quite well. I don't think that adding this > to TBNL is a good idea because it'll complicate things and is already > available in the backend. What do others think? I also think that trying to duplicate Apache is a waste of time. Having a lightweight standalone front-end for demos or small apps is a good idea but using it for real production applications seems a bad idea. Marc From hutch at recursive.ca Wed Mar 16 16:13:45 2005 From: hutch at recursive.ca (Bob Hutchison) Date: Wed, 16 Mar 2005 11:13:45 -0500 Subject: [tbnl-devel] Re: Another patch to add a non-araneida HTTP header parser In-Reply-To: References: <2a8f8eb6cb36218428851bb9a8b77541@recursive.ca> <8c640fbfbf6d699b1394b220eef4a121@recursive.ca> Message-ID: <1211b55d144b47486535b37929af1437@recursive.ca> Hi, Here is a better patch, it fixes a problem in the last patch I gave you yesterday (this patches your 0.4.0 release). -------------- next part -------------- A non-text attachment was scrubbed... Name: tbnl.patch Type: application/octet-stream Size: 3438 bytes Desc: not available URL: -------------- next part -------------- When you make the next release I'm going to have to chase down that memory problem. I just tried a little experiment. I called the tbnl::apache-listen function from Araneida, basically inserting TBNL's handling of requests onto Araneida's handling of the sockets. There is no memory problem when this is done. The only time I get this memory problem is when I use TBNL's standard plumbing -- and it seems to me to be the krmcl:listener stuff, perhaps exclusively. Cheers, Bob On Mar 16, 2005, at 5:15 AM, Edi Weitz wrote: > On Tue, 15 Mar 2005 17:25:47 -0500, Bob Hutchison > wrote: > >> No, *here* is the patch. Sorry. > > Thanks, Bob. I'll release a new version later today. > > Cheers, > Edi. > > ---- Bob Hutchison -- blogs at Recursive Design Inc. -- From edi at agharta.de Wed Mar 16 16:21:00 2005 From: edi at agharta.de (Edi Weitz) Date: Wed, 16 Mar 2005 17:21:00 +0100 Subject: [tbnl-devel] Re: Another patch to add a non-araneida HTTP header parser In-Reply-To: <1211b55d144b47486535b37929af1437@recursive.ca> (Bob Hutchison's message of "Wed, 16 Mar 2005 11:13:45 -0500") References: <2a8f8eb6cb36218428851bb9a8b77541@recursive.ca> <8c640fbfbf6d699b1394b220eef4a121@recursive.ca> <1211b55d144b47486535b37929af1437@recursive.ca> Message-ID: On Wed, 16 Mar 2005 11:13:45 -0500, Bob Hutchison wrote: > Here is a better patch, it fixes a problem in the last patch I gave > you yesterday (this patches your 0.4.0 release). Argh! I already made a lot of changes compared to 0.4.0 - the patch doesn't work anymore. Could you just tell me the difference to your last patch so I can apply the modifications manually? Thanks. > When you make the next release I'm going to have to chase down that > memory problem. I just tried a little experiment. I called the > tbnl::apache-listen function from Araneida, basically inserting > TBNL's handling of requests onto Araneida's handling of the > sockets. There is no memory problem when this is done. The only time > I get this memory problem is when I use TBNL's standard plumbing -- > and it seems to me to be the krmcl:listener stuff, perhaps > exclusively. Hmm, that's with LispWorks, right? Which version? On Linux? Which KMRCL version? Cheers, Edi. From hutch at recursive.ca Wed Mar 16 16:48:26 2005 From: hutch at recursive.ca (Bob Hutchison) Date: Wed, 16 Mar 2005 11:48:26 -0500 Subject: [tbnl-devel] Re: Another patch to add a non-araneida HTTP header parser In-Reply-To: References: <2a8f8eb6cb36218428851bb9a8b77541@recursive.ca> <8c640fbfbf6d699b1394b220eef4a121@recursive.ca> <1211b55d144b47486535b37929af1437@recursive.ca> Message-ID: <896f9d93316f6729ac930d3339eea908@recursive.ca> On Mar 16, 2005, at 11:21 AM, Edi Weitz wrote: > On Wed, 16 Mar 2005 11:13:45 -0500, Bob Hutchison > wrote: > >> Here is a better patch, it fixes a problem in the last patch I gave >> you yesterday (this patches your 0.4.0 release). > > Argh! I already made a lot of changes compared to 0.4.0 - the patch > doesn't work anymore. Could you just tell me the difference to your > last patch so I can apply the modifications manually? Thanks. I was afraid of that. Sorry. Here is the modlisp.lisp -------------- next part -------------- A non-text attachment was scrubbed... Name: modlisp.lisp Type: application/octet-stream Size: 20445 bytes Desc: not available URL: -------------- next part -------------- > >> When you make the next release I'm going to have to chase down that >> memory problem. I just tried a little experiment. I called the >> tbnl::apache-listen function from Araneida, basically inserting >> TBNL's handling of requests onto Araneida's handling of the >> sockets. There is no memory problem when this is done. The only time >> I get this memory problem is when I use TBNL's standard plumbing -- >> and it seems to me to be the krmcl:listener stuff, perhaps >> exclusively. > > Hmm, that's with LispWorks, right? Which version? On Linux? Which > KMRCL version? Lispworks on OS/X version 4.4.0. KMRCL version 1.78 I just substituted the version of apache-listen that I've pasted into this message below for the real apache-listen. Same problem. The real memory usage went from 70.64MB to 134.74MB, virtual memory from 289.10MB to 839.18 after 1000 requests of this page using wget. So, I've pretty much convinced myself it is KRMCL that is doing something weird. (defun apache-listen (*apache-stream* command-processor &rest args) (declare (ignore args)) (let ((*close-apache-stream* t)) (unwind-protect (progn (loop for *apache-socket-usage-counter* from 0 do (let ((headers (read-line *apache-stream* nil nil))) #+nil (loop for key = (read-line *apache-stream* nil nil) while (and key (string-not-equal key "end")) for value = (read-line *apache-stream* nil nil) collect (cons key value)) (format t "COMMAND: ~S~%" headers) (format *apache-stream* "HTTP/1.0 200 OK~a Content-Length: 296~a Lisp-Content-Length: 296~a Content-Type: text/html; charset=iso-8859-1~a Keep-Socket: 1~a ~a HELLX

      HELLX from TBNL and Araneida on LispWorks 4.4.0

      Fill in a Form

      " #\Return #\Return #\Return #\Return #\Return #\Return) (format t "11111 ~%") (force-output *apache-stream*) (format t "22222 ~%") (setf *close-apache-stream* t) (format t "33333 ~%") (kmrcl:close-active-socket *apache-stream*) (format t "44444 ~%") (return))) (format t "55555 ~%")) (ignore-errors (kmrcl:close-active-socket *apache-stream*))))) > > Cheers, > Edi. > > ---- Bob Hutchison -- blogs at Recursive Design Inc. -- From hutch at recursive.ca Wed Mar 16 16:50:02 2005 From: hutch at recursive.ca (Bob Hutchison) Date: Wed, 16 Mar 2005 11:50:02 -0500 Subject: [tbnl-devel] Re: Another patch to add a non-araneida HTTP header parser In-Reply-To: <896f9d93316f6729ac930d3339eea908@recursive.ca> References: <2a8f8eb6cb36218428851bb9a8b77541@recursive.ca> <8c640fbfbf6d699b1394b220eef4a121@recursive.ca> <1211b55d144b47486535b37929af1437@recursive.ca> <896f9d93316f6729ac930d3339eea908@recursive.ca> Message-ID: Oh, and I'll try to put together a patch but that'll take a few minutes. On Mar 16, 2005, at 11:48 AM, Bob Hutchison wrote: >> Argh! I already made a lot of changes compared to 0.4.0 - the patch >> doesn't work anymore. Could you just tell me the difference to your >> last patch so I can apply the modifications manually? Thanks. > > I was afraid of that. Sorry. Here is the modlisp.lisp > > > > ---- Bob Hutchison -- blogs at Recursive Design Inc. -- From hutch at recursive.ca Wed Mar 16 17:04:27 2005 From: hutch at recursive.ca (Bob Hutchison) Date: Wed, 16 Mar 2005 12:04:27 -0500 Subject: [tbnl-devel] Re: Another patch to add a non-araneida HTTP header parser In-Reply-To: References: <2a8f8eb6cb36218428851bb9a8b77541@recursive.ca> <8c640fbfbf6d699b1394b220eef4a121@recursive.ca> <1211b55d144b47486535b37929af1437@recursive.ca> <896f9d93316f6729ac930d3339eea908@recursive.ca> Message-ID: <88dde055af1b5911959786ace65d0292@recursive.ca> And here is the patch from 0.4.0 with yesterday's patch applied. -------------- next part -------------- A non-text attachment was scrubbed... Name: tbnl.patch Type: application/octet-stream Size: 3438 bytes Desc: not available URL: -------------- next part -------------- On Mar 16, 2005, at 11:50 AM, Bob Hutchison wrote: > Oh, and I'll try to put together a patch but that'll take a few > minutes. > > On Mar 16, 2005, at 11:48 AM, Bob Hutchison wrote: > >>> Argh! I already made a lot of changes compared to 0.4.0 - the patch >>> doesn't work anymore. Could you just tell me the difference to your >>> last patch so I can apply the modifications manually? Thanks. >> >> I was afraid of that. Sorry. Here is the modlisp.lisp >> From edi at agharta.de Thu Mar 17 01:17:19 2005 From: edi at agharta.de (Edi Weitz) Date: Thu, 17 Mar 2005 02:17:19 +0100 Subject: [tbnl-devel] New version 0.5.0 / Multiple back-ends Message-ID: Hi! I've finally found some time to incorporate Bob's changes, test them and document them. I've also changed the logging API and re-factored some of the code. I'm sure I broke something in the process so please test... :) Specifically, I tried to explain in the documentation how TBNL talks with the different back-ends. I also changed the test setup so that it now hopefully adapts to all three back-ends and gives new users a chance to understand how TBNL works. While testing the "stand-alone" version I had some problems with MS Internet Explorer but I /think/ I've nailed them down now. Note that some of the changes in 0.5.0 might break API compatibility with earlier versions so be careful if you use this release for an existing deployment of TBNL and resort to the docs if in doubt. Special thanks to Bob Hutchison who made this all possible! Download: . Have fun, Edi. From stesch at no-spoon.de Thu Mar 17 18:46:22 2005 From: stesch at no-spoon.de (Stefan Scholl) Date: Thu, 17 Mar 2005 19:46:22 +0100 Subject: [tbnl-devel] Session cookie should be set for path=/ Message-ID: <20050317184622.GD7527@parsec.no-spoon.de> Hi! I was hunting a bug. The session cookie was missing on all pages other than the originating page. Then I've looked for the internal representation of the Cookie. My Firefox has stored it with a path value equal to the originating page. I've checke some websites which use session cookies, too. One PHP site has a "path=/" in the Set-Cookie line of the response header. RFC 2109 says about Set-Cookie: Path Defaults to the path of the request URL that generated the Set-Cookie response, up to, but not including, the right-most /. So that's the correct behavior of my browser. For sessions the path should be set to "/" by the server. In session.lisp, function start-session (set-cookie *session-cookie-name* :value (session-cookie-value session)) changed to (set-cookie *session-cookie-name* :value (session-cookie-value session) :path "/") Regards, Stefan From edi at agharta.de Thu Mar 17 21:29:33 2005 From: edi at agharta.de (Edi Weitz) Date: Thu, 17 Mar 2005 22:29:33 +0100 Subject: [tbnl-devel] New version 0.5.1 Message-ID: ChangeLog: Version 0.5.1 2005-03-17 Changed default cookie path in START-SESSION (suggested by Stefan Scholl) Small bugfixes More headers from the Araneida front-end Added *SHOW-ACCESS-LOG-MESSAGES* Changed "back-end" to "front-end" :) Download: Cheers, Edi. From edi at agharta.de Thu Mar 17 21:31:59 2005 From: edi at agharta.de (Edi Weitz) Date: Thu, 17 Mar 2005 22:31:59 +0100 Subject: [tbnl-devel] Session cookie should be set for path=/ In-Reply-To: <20050317184622.GD7527@parsec.no-spoon.de> (Stefan Scholl's message of "Thu, 17 Mar 2005 19:46:22 +0100") References: <20050317184622.GD7527@parsec.no-spoon.de> Message-ID: On Thu, 17 Mar 2005 19:46:22 +0100, Stefan Scholl wrote: > I was hunting a bug. The session cookie was missing on all pages > other than the originating page. > > Then I've looked for the internal representation of the Cookie. My > Firefox has stored it with a path value equal to the originating > page. > > I've checke some websites which use session cookies, too. One PHP > site has a "path=/" in the Set-Cookie line of the response header. > > RFC 2109 says about Set-Cookie: > > Path Defaults to the path of the request URL that generated the > Set-Cookie response, up to, but not including, the > right-most /. > > So that's the correct behavior of my browser. For sessions the path > should be set to "/" by the server. I've added that to 0.5.1 although I'm not fully convinced that that's the right way. It should probably be customizable. Maybe you don't /want/ the session to be valid for the whole site... Anyway, not today... :) Thanks, Edi. From hutch at recursive.ca Thu Mar 17 21:50:09 2005 From: hutch at recursive.ca (Bob Hutchison) Date: Thu, 17 Mar 2005 16:50:09 -0500 Subject: [tbnl-devel] Session cookie should be set for path=/ In-Reply-To: References: <20050317184622.GD7527@parsec.no-spoon.de> Message-ID: <23636c15c4749b0db6df0a732e70e093@recursive.ca> On Mar 17, 2005, at 4:31 PM, Edi Weitz wrote: > On Thu, 17 Mar 2005 19:46:22 +0100, Stefan Scholl > wrote: > >> I was hunting a bug. The session cookie was missing on all pages >> other than the originating page. >> >> Then I've looked for the internal representation of the Cookie. My >> Firefox has stored it with a path value equal to the originating >> page. >> >> I've checke some websites which use session cookies, too. One PHP >> site has a "path=/" in the Set-Cookie line of the response header. >> >> RFC 2109 says about Set-Cookie: >> >> Path Defaults to the path of the request URL that generated the >> Set-Cookie response, up to, but not including, the >> right-most /. >> >> So that's the correct behavior of my browser. For sessions the path >> should be set to "/" by the server. > > I've added that to 0.5.1 although I'm not fully convinced that that's > the right way. It should probably be customizable. Maybe you don't > /want/ the session to be valid for the whole site... > > Anyway, not today... :) I think this might address part of the problem that I was complaining about a couple of weeks ago ("Weird problem with cookies and startup"). I don't think I'll get a chance to test this today, so it'll be a little over a week before I can confirm. Cheers, Bob > > Thanks, > Edi. > _______________________________________________ > tbnl-devel site list > tbnl-devel at common-lisp.net > http://common-lisp.net/mailman/listinfo/tbnl-devel > > ---- Bob Hutchison -- blogs at Recursive Design Inc. -- From stesch at no-spoon.de Thu Mar 17 21:50:43 2005 From: stesch at no-spoon.de (Stefan Scholl) Date: Thu, 17 Mar 2005 22:50:43 +0100 Subject: [tbnl-devel] Session cookie should be set for path=/ In-Reply-To: References: <20050317184622.GD7527@parsec.no-spoon.de> Message-ID: <20050317215043.GE7527@parsec.no-spoon.de> On 2005-03-17 22:31:59, Edi Weitz wrote: > On Thu, 17 Mar 2005 19:46:22 +0100, Stefan Scholl wrote: > > So that's the correct behavior of my browser. For sessions the path > > should be set to "/" by the server. > > I've added that to 0.5.1 although I'm not fully convinced that that's > the right way. It should probably be customizable. Maybe you don't > /want/ the session to be valid for the whole site... Depending on the following click path there could be a session without a session cookie. The URL rewriting cares for that. Only the people who are paranoid enough to forbid cookies should be punished by strang URLs. :-) Regards, Stefan From sergio.garcia at gmail.com Fri Mar 18 18:48:35 2005 From: sergio.garcia at gmail.com (Sergio Garcia) Date: Fri, 18 Mar 2005 19:48:35 +0100 Subject: [tbnl-devel] problem with the example Message-ID: <34ec2575050318104834edf24f@mail.gmail.com> Hello; I have just installed TBNL on debian sarge, using SBCL 0.8.19.39. The Kevin Rosemberg packages were installed using apt-get, and TBNL and other dependencies were installed using asdf-install The example seems to work fine, except for the "session" page. The page is displayed fine initially, but when I try to submit a change it displays the "An error has occured" message. (The upload files example works fine). This error occurs using both mod_lisp and 'stand-alone' tbnl. When using mod_lisp, thefollwing messaged is logged in the apache error log: [Fri Mar 18 20:28:55 2005] [error] (20014)Error string not specified yet: [TBNL] The assertion (NOT [Fri Mar 18 20:28:55 2005] [error] (20014)Error string not specified yet: [TBNL] (EQL SB-THREAD::NEW-VALUE [Fri Mar 18 20:28:55 2005] [error] (20014)Error string not specified yet: [TBNL] (SB-THREAD:MUTEX-VALUE SB-THREAD::LOCK))) failed. Any hint about why this error appears? Is there anything I can do to get a more detailed description of the error in the lisp repl or in the browser? Thanks, Sergio From randomtalk at gmail.com Sat Mar 19 03:16:55 2005 From: randomtalk at gmail.com (Jason Wang) Date: Fri, 18 Mar 2005 22:16:55 -0500 Subject: [tbnl-devel] installing mod_lisp2 + tbnl on mepis(debian) Message-ID: <939cf2005031819165ce7c548@mail.gmail.com> hi (Again), i have just installed CMUCL + Slime on mepis (heavily based on debian).. i just found out that i have no idea how to install mod_lisp2, i know i have apache2 working, since if i go to http://localhost/, the default page will show up.. but i can't seem to find the httpd.conf anywhere, only the apache 1.3 httpd.conf can be found. I only found httpd.conf in /etc/apache2/ that says the following: # This is here for backwards compatability reasons and to support # installing 3rd party modules directly via apxs2, rather than # through the /etc/apache2/mods-{available,enabled} mechanism. # #LoadModule mod_placeholder /usr/lib/apache2/modules/mod_placeholder.so prob the right place is in the new apache2.conf?? though i can't find a place to add modules as directed on the offical install guide.. then there is apxs -i -c mod_lisp-2.35.c not working.. it says bash cannot find the command.. i have no idea what's wrong :| oh yah, one more thing, where do you put the website files? i can't find htdocs folder.. thanks alot for all your help :D Jason -- www.programer.name - my own personal blog : ) From edi at agharta.de Sat Mar 19 07:12:04 2005 From: edi at agharta.de (Edi Weitz) Date: Sat, 19 Mar 2005 08:12:04 +0100 Subject: [tbnl-devel] problem with the example In-Reply-To: <34ec2575050318104834edf24f@mail.gmail.com> (Sergio Garcia's message of "Fri, 18 Mar 2005 19:48:35 +0100") References: <34ec2575050318104834edf24f@mail.gmail.com> Message-ID: On Fri, 18 Mar 2005 19:48:35 +0100, Sergio Garcia wrote: > [Fri Mar 18 20:28:55 2005] [error] (20014)Error string not specified > yet: [TBNL] The assertion (NOT > [Fri Mar 18 20:28:55 2005] [error] (20014)Error string not specified > yet: [TBNL] (EQL SB-THREAD::NEW-VALUE > [Fri Mar 18 20:28:55 2005] [error] (20014)Error string not specified > yet: [TBNL] (SB-THREAD:MUTEX-VALUE > SB-THREAD::LOCK))) failed. That seems to a problem with SBCL's threading. Do you use an x86 processor? Are threads enabled in your build of SBCL? Do you use a 2.4 or a 2.6 kernel? > Any hint about why this error appears? Is there anything I can do to > get a more detailed description of the error in the lisp repl or in > the browser? Yes, see here: . You can, for example, show backtraces in the error log or in the browser. HTH, Edi. From edi at agharta.de Sat Mar 19 07:16:24 2005 From: edi at agharta.de (Edi Weitz) Date: Sat, 19 Mar 2005 08:16:24 +0100 Subject: [tbnl-devel] installing mod_lisp2 + tbnl on mepis(debian) In-Reply-To: <939cf2005031819165ce7c548@mail.gmail.com> (Jason Wang's message of "Fri, 18 Mar 2005 22:16:55 -0500") References: <939cf2005031819165ce7c548@mail.gmail.com> Message-ID: This is actually not the right mailing list for Apache or Debian problems but here are some hints: On Fri, 18 Mar 2005 22:16:55 -0500, Jason Wang wrote: > hi (Again), i have just installed CMUCL + Slime on mepis (heavily > based on debian).. i just found out that i have no idea how to install > mod_lisp2, i know i have apache2 working, since if i go to > http://localhost/, the default page will show up.. but i can't seem to > find the httpd.conf anywhere, only the apache 1.3 httpd.conf can be > found. I only found httpd.conf in /etc/apache2/ that says the > following: > # This is here for backwards compatability reasons and to support > # installing 3rd party modules directly via apxs2, rather than > # through the /etc/apache2/mods-{available,enabled} mechanism. > # > #LoadModule mod_placeholder /usr/lib/apache2/modules/mod_placeholder.so So, it says this is the place to install 3rd party modules directly via apxs2. Looks like you've found the place. > prob the right place is in the new apache2.conf?? though i can't > find a place to add modules as directed on the offical install > guide.. > > then there is apxs -i -c mod_lisp-2.35.c not working.. it says bash > cannot find the command.. i have no idea what's wrong :| See above - it says apxs2, not apxs. > oh yah, one more thing, where do you put the website files? i can't > find htdocs folder.. Debian has a per-site organization in /etc/apache2. Look for folders called sites-available and sites-enabled or somesuch. There you can specify your document roots. Cheers, Edi. From sergio.garcia at gmail.com Sat Mar 19 08:47:31 2005 From: sergio.garcia at gmail.com (Sergio Garcia) Date: Sat, 19 Mar 2005 09:47:31 +0100 Subject: [tbnl-devel] Re: installing mod_lisp2 + tbnl on mepis(debian) In-Reply-To: References: <939cf2005031819165ce7c548@mail.gmail.com> Message-ID: <34ec257505031900472d7f81f0@mail.gmail.com> > > > hi (Again), i have just installed CMUCL + Slime on mepis (heavily > > based on debian).. i just found out that i have no idea how to install > > mod_lisp2, i know i have apache2 working, since if i go to > > http://localhost/, the default page will show up.. but i can't seem to > > find the httpd.conf anywhere, only the apache 1.3 httpd.conf can be > > found. I only found httpd.conf in /etc/apache2/ that says the > > following: > > # This is here for backwards compatability reasons and to support > > # installing 3rd party modules directly via apxs2, rather than > > # through the /etc/apache2/mods-{available,enabled} mechanism. > > # > > #LoadModule mod_placeholder /usr/lib/apache2/modules/mod_placeholder.so There is a mod_lisp for apache2 debian package on: http://debian.progn.org Add the line "deb http://debian.progn.org/ unstable main" to your /etc/apt/sources.list file and run the command apt-get update && apt-get install libapache2-mod-lisp apache2 modules config files should be normally at /etc/apache2/mods-enabled/ Add a file there called mod_lisp.load with the line: LoadModule lisp_module /usr/lib/apache2/modules/mod_lisp.so and a file mod_lisp.conf containing: LispServer 127.0.0.1 3000 "tbnl" SetHandler lisp-handler That should do the trick Sergio From sergio.garcia at gmail.com Sat Mar 19 14:20:34 2005 From: sergio.garcia at gmail.com (Sergio Garcia) Date: Sat, 19 Mar 2005 15:20:34 +0100 Subject: [tbnl-devel] Re: problem with the example In-Reply-To: References: <34ec2575050318104834edf24f@mail.gmail.com> Message-ID: <34ec25750503190620113e18af@mail.gmail.com> > That seems to a problem with SBCL's threading. Do you use an x86 > processor? Are threads enabled in your build of SBCL? Do you use a > 2.4 or a 2.6 kernel? > Ah!. I just read SBCL threading is only supported on 2.6 kernels, and I am using a 2.4. Thanks. Sergio From sergio.garcia at gmail.com Sat Mar 19 18:50:22 2005 From: sergio.garcia at gmail.com (Sergio Garcia) Date: Sat, 19 Mar 2005 19:50:22 +0100 Subject: [tbnl-devel] Re: problem with the example In-Reply-To: <34ec25750503190620113e18af@mail.gmail.com> References: <34ec2575050318104834edf24f@mail.gmail.com> <34ec25750503190620113e18af@mail.gmail.com> Message-ID: <34ec2575050319105022a9bc0c@mail.gmail.com> > Ah!. I just read SBCL threading is only supported on 2.6 kernels, and > I am using a 2.4. Thanks. > > Sergio I upgraded to a 2.6 kernel, and the error message stopped. However, the problem changed. Now, the browser just freezed, and in the sbcl REPL I got: WARNING: recursive lock attempt #S(SB-THREAD:MUTEX :NAME "session-data-lock" :LOCK 0 :DATA NIL :VALUE 5041) I had a look at the code of session, and it seems to me that setting-f a session-value when a session has not been created, creates a nested "with-lock-held" on a same object by calling start-session. I just put a start-session at the beggining of the session test, and it seems to work fine now. Is this right? From edi at agharta.de Sat Mar 19 19:52:34 2005 From: edi at agharta.de (Edi Weitz) Date: Sat, 19 Mar 2005 20:52:34 +0100 Subject: [tbnl-devel] Re: problem with the example In-Reply-To: <34ec2575050319105022a9bc0c@mail.gmail.com> (Sergio Garcia's message of "Sat, 19 Mar 2005 19:50:22 +0100") References: <34ec2575050318104834edf24f@mail.gmail.com> <34ec25750503190620113e18af@mail.gmail.com> <34ec2575050319105022a9bc0c@mail.gmail.com> Message-ID: On Sat, 19 Mar 2005 19:50:22 +0100, Sergio Garcia wrote: > I upgraded to a 2.6 kernel, and the error message stopped. However, > the problem changed. Now, the browser just freezed, and in the sbcl > REPL I got: > > WARNING: > recursive lock attempt #S(SB-THREAD:MUTEX > :NAME "session-data-lock" > :LOCK 0 > :DATA NIL > :VALUE 5041) > > I had a look at the code of session, and it seems to me that > setting-f a session-value when a session has not been created, > creates a nested "with-lock-held" on a same object by calling > start-session. I just put a start-session at the beggining of the > session test, and it seems to work fine now. Is this right? The analysis is right, but the cure isn't. (Well, in this particular case it probably is.) The problem is that parts of TBNL assume that locks /can/ be nested which is the case for CMUCL, LW, and AllegroCL. You might want to ask on the SBCL mailing list how to get locks that can be nested or alternatively ask Kevin Rosenberg to patch KMRCL. The easiest way is to switch to CMUCL, though... :) Cheers, Edi. From sergio.garcia at gmail.com Sat Mar 19 19:58:48 2005 From: sergio.garcia at gmail.com (Sergio Garcia) Date: Sat, 19 Mar 2005 20:58:48 +0100 Subject: [tbnl-devel] Re: problem with the example In-Reply-To: References: <34ec2575050318104834edf24f@mail.gmail.com> <34ec25750503190620113e18af@mail.gmail.com> <34ec2575050319105022a9bc0c@mail.gmail.com> Message-ID: <34ec2575050319115871922612@mail.gmail.com> Ok, thanks! I just switched to SBCL from CMUCL because of the lack of unicode support in CMUCL :( *sigh* On Sat, 19 Mar 2005 20:52:34 +0100, Edi Weitz wrote: > On Sat, 19 Mar 2005 19:50:22 +0100, Sergio Garcia > wrote: > > > I upgraded to a 2.6 kernel, and the error message stopped. However, > > the problem changed. Now, the browser just freezed, and in the sbcl > > REPL I got: > > > > WARNING: > > recursive lock attempt #S(SB-THREAD:MUTEX > > :NAME "session-data-lock" > > :LOCK 0 > > :DATA NIL > > :VALUE 5041) > > > > I had a look at the code of session, and it seems to me that > > setting-f a session-value when a session has not been created, > > creates a nested "with-lock-held" on a same object by calling > > start-session. I just put a start-session at the beggining of the > > session test, and it seems to work fine now. Is this right? > > The analysis is right, but the cure isn't. (Well, in this particular > case it probably is.) The problem is that parts of TBNL assume that > locks /can/ be nested which is the case for CMUCL, LW, and AllegroCL. > You might want to ask on the SBCL mailing list how to get locks that > can be nested or alternatively ask Kevin Rosenberg to patch KMRCL. > > The easiest way is to switch to CMUCL, though... :) > > Cheers, > Edi. > From edi at agharta.de Sat Mar 19 20:17:49 2005 From: edi at agharta.de (Edi Weitz) Date: Sat, 19 Mar 2005 21:17:49 +0100 Subject: [tbnl-devel] Re: problem with the example In-Reply-To: <34ec2575050319115871922612@mail.gmail.com> (Sergio Garcia's message of "Sat, 19 Mar 2005 20:58:48 +0100") References: <34ec2575050318104834edf24f@mail.gmail.com> <34ec25750503190620113e18af@mail.gmail.com> <34ec2575050319105022a9bc0c@mail.gmail.com> <34ec2575050319115871922612@mail.gmail.com> Message-ID: On Sat, 19 Mar 2005 20:58:48 +0100, Sergio Garcia wrote: > I just switched to SBCL from CMUCL because of the lack of unicode > support in CMUCL :( *sigh* Well, I think it's not too hard. Something like (untested): cd /path/to/tbnl perl -i.bak -p -e 's/kmrcl::with-lock-held/with-lock-held*/' *lisp Then in specials.lisp add: #+:sbcl (defvar *locked* nil) And in util.lisp: #-:sbcl (defmacro with-lock-held* ((lock) &body body) `(kmrcl::with-lock-held (,lock) , at body)) #+:sbcl (defmacro with-lock-held* ((lock) &body body) `(cond (*locked* , at body) (t (let ((*locked* t)) (kmrcl::with-lock-held (,lock) , at body))))) Cheers, Edi. From edi at agharta.de Sat Mar 19 20:24:46 2005 From: edi at agharta.de (Edi Weitz) Date: Sat, 19 Mar 2005 21:24:46 +0100 Subject: [tbnl-devel] Re: problem with the example In-Reply-To: (Edi Weitz's message of "Sat, 19 Mar 2005 21:17:49 +0100") References: <34ec2575050318104834edf24f@mail.gmail.com> <34ec25750503190620113e18af@mail.gmail.com> <34ec2575050319105022a9bc0c@mail.gmail.com> <34ec2575050319115871922612@mail.gmail.com> Message-ID: On Sat, 19 Mar 2005 21:17:49 +0100, Edi Weitz wrote: > Something like (untested): This doesn't take into account that newer TBNL versions employ two different locks so the actual solution will be a little more complicated. But the idea should be the same. From edi at agharta.de Sat Mar 19 20:30:27 2005 From: edi at agharta.de (Edi Weitz) Date: Sat, 19 Mar 2005 21:30:27 +0100 Subject: [tbnl-devel] Re: problem with the example In-Reply-To: (Edi Weitz's message of "Sat, 19 Mar 2005 21:17:49 +0100") References: <34ec2575050318104834edf24f@mail.gmail.com> <34ec25750503190620113e18af@mail.gmail.com> <34ec2575050319105022a9bc0c@mail.gmail.com> <34ec2575050319115871922612@mail.gmail.com> Message-ID: Maybe like this (again untested): #+:sbcl (defvar *locks* nil) #-:sbcl (defmacro with-lock-held* ((lock) &body body) `(kmrcl::with-lock-held (,lock) , at body)) #+:sbcl (defmacro with-lock-held* ((lock) &body body) (with-rebinding (lock) `(cond ((find ,lock *locks*) , at body) (t (let ((*locks* (cons ,lock *locks*))) (kmrcl::with-lock-held (,lock) , at body)))))) From sergio.garcia at gmail.com Sat Mar 19 21:44:28 2005 From: sergio.garcia at gmail.com (Sergio Garcia) Date: Sat, 19 Mar 2005 22:44:28 +0100 Subject: [tbnl-devel] Re: problem with the example In-Reply-To: References: <34ec2575050318104834edf24f@mail.gmail.com> <34ec25750503190620113e18af@mail.gmail.com> <34ec2575050319105022a9bc0c@mail.gmail.com> <34ec2575050319115871922612@mail.gmail.com> Message-ID: <34ec25750503191344505c8262@mail.gmail.com> On Sat, 19 Mar 2005 21:30:27 +0100, Edi Weitz wrote: > Maybe like this (again untested): [code follows[ I found a "with-recursive-lock" in SBCL that did the trick. Kevin Rosenberg told me on IRC he will modify kmrcl accordingly. Thanks for your help, and see you in Amsterdam. Sergio. From edi at agharta.de Sat Mar 26 22:08:48 2005 From: edi at agharta.de (Edi Weitz) Date: Sat, 26 Mar 2005 23:08:48 +0100 Subject: [tbnl-devel] New version 0.5.2 Message-ID: ChangeLog: Version 0.5.2 2005-03-26 Fixed bug in modlisp.html where *CLOSE-TBNL-STREAM* could be NIL although it should be T Set correct content type for 304 replies Download: Happy Easter, Edi. From randomtalk at gmail.com Sun Mar 27 04:03:48 2005 From: randomtalk at gmail.com (Jason Wang) Date: Sat, 26 Mar 2005 23:03:48 -0500 Subject: [tbnl-devel] basic package question Message-ID: <939cf2005032620032a2ac077@mail.gmail.com> hi, i have read through the documentation for both TBNL and CL-WHO, i have created a page based on what i read.. but i found out i can't figure out how to test the page.. i can see the test page by doing (asdf:oos 'asdf:load-op :tbnl-test), how do i change package from :tbnl-test to something else? what code do i need to add? i have tried just adding a folder and declare (in-package #:tbnl-test2), that didn't work out too well.. what do i need to do in order to start test2? thanks alot :D ps. if this is on the documentation, please excuse my ignorance.. i indeed have read all of it and didn't find any answers to it.. -- www.programer.name - my own personal blog : ) From edi at agharta.de Sun Mar 27 09:15:31 2005 From: edi at agharta.de (Edi Weitz) Date: Sun, 27 Mar 2005 11:15:31 +0200 Subject: [tbnl-devel] basic package question In-Reply-To: <939cf2005032620032a2ac077@mail.gmail.com> (Jason Wang's message of "Sat, 26 Mar 2005 23:03:48 -0500") References: <939cf2005032620032a2ac077@mail.gmail.com> Message-ID: On Sat, 26 Mar 2005 23:03:48 -0500, Jason Wang wrote: > hi, i have read through the documentation for both TBNL and CL-WHO, > i have created a page based on what i read.. but i found out i can't > figure out how to test the page.. i can see the test page by doing > (asdf:oos 'asdf:load-op :tbnl-test), how do i change package from > :tbnl-test to something else? what code do i need to add? > > i have tried just adding a folder and declare (in-package > #:tbnl-test2), that didn't work out too well.. what do i need to do > in order to start test2? For basic questions about Common Lisp see for example Peter Seibel's great book at . In a few weeks you can also buy it in your local bookstore. Chapter 21 is about packages in particular. Cheers, Edi.