From frido at q-software-solutions.de Sat Jun 17 07:18:56 2006 From: frido at q-software-solutions.de (Friedrich Dominicus) Date: Sat, 17 Jun 2006 09:18:56 +0200 Subject: [kpax-devel] successfull installation Debian Linux 64-bit Message-ID: <87d5d8dzbz.fsf@flarge.here> just in case someone is interested. I got kpax installed and running with mod_lisp2 on a Debian Linux unstable box. (running an AMD64 processor) Regards Friedrich From bsd1628 at comcast.net Sun Jun 18 03:59:02 2006 From: bsd1628 at comcast.net (bsd1628) Date: Sat, 17 Jun 2006 23:59:02 -0400 Subject: [kpax-devel] Problem with s-http-client Message-ID: <4494CF86.8040005@comcast.net> Client locks up and never returns from call when doing (do-http-request "http://www.supelec.fr/docs/cltl/clm/clm.html") other sites seem to work fine. what could be the problem here? From bsd1628 at comcast.net Sun Jun 18 06:19:06 2006 From: bsd1628 at comcast.net (bsd1628) Date: Sun, 18 Jun 2006 02:19:06 -0400 Subject: [kpax-devel] Problem with s-http-client In-Reply-To: <4494CF86.8040005@comcast.net> References: <4494CF86.8040005@comcast.net> Message-ID: <4494F05A.4050901@comcast.net> bsd1628 wrote: > Client locks up and never returns from call > when doing > > (do-http-request "http://www.supelec.fr/docs/cltl/clm/clm.html") > > other sites seem to work fine. > > what could be the problem here? > > _______________________________________________ > KPAX-devel mailing list > KPAX-devel at common-lisp.net > http://common-lisp.net/cgi-bin/mailman/listinfo/kpax-devel > Let me add that this is using SBCL 0.9.12 under Linux and the darcs version of s-http-client and other required packages. Also (:method :head) locks up with other sites as well and seems less reliable. Any help greatly appreciated. From frido at q-software-solutions.de Mon Jun 19 09:13:34 2006 From: frido at q-software-solutions.de (Friedrich Dominicus) Date: Mon, 19 Jun 2006 11:13:34 +0200 Subject: [kpax-devel] rendering of text-area In-Reply-To: <4494F05A.4050901@comcast.net> (bsd's message of "Sun, 18 Jun 2006 02:19:06 -0400") References: <4494CF86.8040005@comcast.net> <4494F05A.4050901@comcast.net> Message-ID: <87y7vt7bk1.fsf_-_@flarge.here> I have the following defwebform: (defwebform products-form ((tag :text :label "Tag" :options (:size 20)) (description :text-area :label "Description" :cols 30 :rows 20) (price :text :label "Price") (id :hidden) (vat :text :label "VAT")) (:submit "save-product")) However the text area field is sequezed to a much smaller field. Is something wrong witth my usage? Regards Friedrich From frido at q-software-solutions.de Mon Jun 19 09:19:10 2006 From: frido at q-software-solutions.de (Friedrich Dominicus) Date: Mon, 19 Jun 2006 11:19:10 +0200 Subject: [kpax-devel] Pretty HTML output? Message-ID: <87u06h7bap.fsf@flarge.here> There is a variable *pprint-html* but it seems it does not do anything with the HTML. I checked out the cl-who stuff and it seems there should be some move whitespace (aka new lines) in the code. Can anyone give me a hand on this? Regards Friedrich From frido at q-software-solutions.de Mon Jun 19 09:27:27 2006 From: frido at q-software-solutions.de (Friedrich Dominicus) Date: Mon, 19 Jun 2006 11:27:27 +0200 Subject: [kpax-devel] rendering of text-area In-Reply-To: <87y7vt7bk1.fsf_-_@flarge.here> (Friedrich Dominicus's message of "Mon, 19 Jun 2006 11:13:34 +0200") References: <4494CF86.8040005@comcast.net> <4494F05A.4050901@comcast.net> <87y7vt7bk1.fsf_-_@flarge.here> Message-ID: <87mzc97aww.fsf@flarge.here> Sorry I forget the html-output: textarea name='DESCRIPTION'> no cols and no rows attrbute there. Of course this does not look nice ;-( Regards Friedrich From frido at q-software-solutions.de Mon Jun 19 09:29:36 2006 From: frido at q-software-solutions.de (Friedrich Dominicus) Date: Mon, 19 Jun 2006 11:29:36 +0200 Subject: [kpax-devel] And yet another question Message-ID: <87irmx7atb.fsf@flarge.here> is there a way to save an lisp object between pages? webactions has a nice feature with session-variable. I did not found anything in the examples (it seems the dispatching is done on some sort of id field). So I have to reconstruct the objects between the diverse pages. I wonder if it's possible to avoid that. Regards Friedrich From scaekenberghe at common-lisp.net Mon Jun 19 11:59:02 2006 From: scaekenberghe at common-lisp.net (Sven Van Caekenberghe) Date: Mon, 19 Jun 2006 13:59:02 +0200 Subject: [kpax-devel] Re: small additon to my mail form yesterday In-Reply-To: <8764ix8t31.fsf@flarge.here> References: <8764ix8t31.fsf@flarge.here> Message-ID: <02CADB8D-DE3E-487E-A0AB-91B50EBF5EFF@common-lisp.net> On 19 Jun 2006, at 10:09, Friedrich Dominicus wrote: > I've overseen forms2.lisp. The validators are there, I've not seen > them. > > Sorry > Friedrich Yes, Friedrich, you raised so many points in your mail that I was still contemplating my reply ! Indeed there are some higher level facilities in KPAX, built on top of, but independent of, the basic layer (which in itself is not that well defined, except maybe in my head ;-). There is support for HTML generation, automagic web forms with validation, menu bars, table formatting , full localization, uploading with multipart encoding, argument translations, ... In some of the examples, there is even more: lisp server pages, a wiki, alternative authorization, ... But there is not enough documentation, nor is everything polished enough. Rest assured that we used KPAX for varioius production projects for several years, so most things that we (and most people) need, are there! May the source be with you ;-) Sven From scaekenberghe at common-lisp.net Mon Jun 19 12:27:07 2006 From: scaekenberghe at common-lisp.net (Sven Van Caekenberghe) Date: Mon, 19 Jun 2006 14:27:07 +0200 Subject: [kpax-devel] Problem with s-http-client In-Reply-To: <4494F05A.4050901@comcast.net> References: <4494CF86.8040005@comcast.net> <4494F05A.4050901@comcast.net> Message-ID: <426E24FF-703F-447F-9E1C-72849DCF742B@common-lisp.net> On 18 Jun 2006, at 08:19, bsd1628 wrote: > bsd1628 wrote: >> Client locks up and never returns from call >> when doing >> (do-http-request "http://www.supelec.fr/docs/cltl/clm/clm.html") >> other sites seem to work fine. >> what could be the problem here? >> _______________________________________________ >> KPAX-devel mailing list >> KPAX-devel at common-lisp.net >> http://common-lisp.net/cgi-bin/mailman/listinfo/kpax-devel > > Let me add that this is using SBCL 0.9.12 under Linux > and the darcs version of s-http-client and other required > packages. > > Also (:method :head) locks up with other sites as well > and seems less reliable. > > Any help greatly appreciated. As mentioned on the list, I made some recent changes to the mechanism by which lines are read in both s-http-client and server; although they did work for me (lispworks), maybe they broke things on other platforms. Maybe, Friedrich can help you, since he is using SBCL daily, I think ... I will be looking into this later, after installing ASDF-Binary- Locations to remove the FASL conflicts of using many lisp implementation - I will then try sbcl; but even then, I might not be able to help you since my platform (mac os x) doesn't equal yours; and sbcl does not have the same feature set on all platforms. Stay tuned! Sven From scaekenberghe at common-lisp.net Mon Jun 19 12:18:53 2006 From: scaekenberghe at common-lisp.net (Sven Van Caekenberghe) Date: Mon, 19 Jun 2006 14:18:53 +0200 Subject: [kpax-devel] Pretty HTML output? In-Reply-To: <87u06h7bap.fsf@flarge.here> References: <87u06h7bap.fsf@flarge.here> Message-ID: On 19 Jun 2006, at 11:19, Friedrich Dominicus wrote: > There is a variable *pprint-html* but it seems it does not do anything > with the HTML. I checked out the cl-who stuff and it seems there > should be some move whitespace (aka new lines) in the code. > > Can anyone give me a hand on this? This is a bit of a implementation problem/bug: the variable *pprint-html* and the :pretty-print keyword are used in a macro __at complile time__, so the only solution to make this work is to force a recompile of everything ;-) Sven From scaekenberghe at common-lisp.net Mon Jun 19 12:17:37 2006 From: scaekenberghe at common-lisp.net (Sven Van Caekenberghe) Date: Mon, 19 Jun 2006 14:17:37 +0200 Subject: [kpax-devel] And yet another question In-Reply-To: <87irmx7atb.fsf@flarge.here> References: <87irmx7atb.fsf@flarge.here> Message-ID: Friedrich, On 19 Jun 2006, at 11:29, Friedrich Dominicus wrote: > is there a way to save an lisp object between pages? > > webactions has a nice feature with session-variable. I did not found > anything in the examples (it seems the dispatching is done on some > sort of id field). So I have to reconstruct the objects between the > diverse pages. I wonder if it's possible to avoid that. There is of course session support in KPAX ! Unless explicitly disabled, every web app does session tracking by default. To access the session while handling a request, use get-session on a request-response. The web-app-server, the web-app, the request-response and the session implement the attributes protocol using the attributes-mixin. So storing something as session state, goes as follows: (let ((session (get-session request-response))) (setf (get-attribute session :foo) 'foo)) On the next request-response cycle, you can retrieve the state as follows: (let ((session (get-session request-response)) (foo(get-attribute session :foo))) (print foo)) To debug, inspect *last-request-response* after a request-response cycle. Please do check all the examples for more info. HTH, Sven PS: session tracking can work with cookies (the default) or URL rewriting From frido at q-software-solutions.de Mon Jun 19 12:48:44 2006 From: frido at q-software-solutions.de (Friedrich Dominicus) Date: Mon, 19 Jun 2006 14:48:44 +0200 Subject: [kpax-devel] And yet another question In-Reply-To: <87irmx7atb.fsf@flarge.here> (Friedrich Dominicus's message of "Mon, 19 Jun 2006 11:29:36 +0200") References: <87irmx7atb.fsf@flarge.here> Message-ID: <87ejxl71lf.fsf@flarge.here> Ok, I found that something like that exsits it's named get-attribute So it seems I can throw objects at it. That's good news ;-) Regards Friedrich From scaekenberghe at common-lisp.net Mon Jun 19 12:57:58 2006 From: scaekenberghe at common-lisp.net (Sven Van Caekenberghe) Date: Mon, 19 Jun 2006 14:57:58 +0200 Subject: [kpax-devel] rendering of text-area In-Reply-To: <87y7vt7bk1.fsf_-_@flarge.here> References: <4494CF86.8040005@comcast.net> <4494F05A.4050901@comcast.net> <87y7vt7bk1.fsf_-_@flarge.here> Message-ID: On 19 Jun 2006, at 11:13, Friedrich Dominicus wrote: > (defwebform products-form > ((tag :text :label "Tag" > :options (:size 20)) > > (description :text-area :label "Description" :cols 30 :rows 20) > (price :text :label "Price") > (id :hidden) > (vat :text :label "VAT")) > > (:submit "save-product")) The correct syntax is :options like this: (defwebform products-form ((tag :text :label "Tag" :options (:size 20)) (description :text-area :label "Description" :options (:cols 30 :rows 20)) (price :text :label "Price" :options (:size 99)) (id :hidden) (vat :text :label "VAT")) (:submit "save-product")) I haven't actually tested this, only inspected the webform definition object - and it seemed OK. Let me known if it works. Sven PS: Again, the web forms facility is pretty powerful, but also quite complex and underdocumented.... Inspect *last-request-response* after submitting. From frido at q-software-solutions.de Mon Jun 19 13:14:48 2006 From: frido at q-software-solutions.de (Friedrich Dominicus) Date: Mon, 19 Jun 2006 15:14:48 +0200 Subject: [kpax-devel] small addition? In-Reply-To: <87irmx7atb.fsf@flarge.here> (Friedrich Dominicus's message of "Mon, 19 Jun 2006 11:29:36 +0200") References: <87irmx7atb.fsf@flarge.here> Message-ID: <87ac8970dz.fsf@flarge.here> Don't know wether you'll find it useful: (defun get-session-variable (request-response key) (get-attribute (get-session request-response) key)) ; (defun (setf get-session-variable) (val request-response key) (setf (get-attribute (get-session request-response) key) val)) in session.lisp Regards Friedrich From frido at q-software-solutions.de Mon Jun 19 14:01:27 2006 From: frido at q-software-solutions.de (Friedrich Dominicus) Date: Mon, 19 Jun 2006 16:01:27 +0200 Subject: [kpax-devel] Problem with s-http-client In-Reply-To: <426E24FF-703F-447F-9E1C-72849DCF742B@common-lisp.net> (Sven Van Caekenberghe's message of "Mon, 19 Jun 2006 14:27:07 +0200") References: <4494CF86.8040005@comcast.net> <4494F05A.4050901@comcast.net> <426E24FF-703F-447F-9E1C-72849DCF742B@common-lisp.net> Message-ID: <87y7vt5jns.fsf@flarge.here> Sven Van Caekenberghe writes: > > Maybe, Friedrich can help you, since he is using SBCL daily, I think >... Lispworks on Linux Debian 64-but unstable works SBCL "0.9.13.42" seems to hang. Can not tell the reason Regards Friedrich From frido at q-software-solutions.de Mon Jun 19 14:07:16 2006 From: frido at q-software-solutions.de (Friedrich Dominicus) Date: Mon, 19 Jun 2006 16:07:16 +0200 Subject: [kpax-devel] Problem with s-http-client In-Reply-To: <426E24FF-703F-447F-9E1C-72849DCF742B@common-lisp.net> (Sven Van Caekenberghe's message of "Mon, 19 Jun 2006 14:27:07 +0200") References: <4494CF86.8040005@comcast.net> <4494F05A.4050901@comcast.net> <426E24FF-703F-447F-9E1C-72849DCF742B@common-lisp.net> Message-ID: <87r71l5je3.fsf@flarge.here> Well it works for another page with SBCL also That's really strange. Regards Friedrich From frido at q-software-solutions.de Mon Jun 19 14:45:40 2006 From: frido at q-software-solutions.de (Friedrich Dominicus) Date: Mon, 19 Jun 2006 16:45:40 +0200 Subject: [kpax-devel] Problem with s-http-client In-Reply-To: <87r71l5je3.fsf@flarge.here> (Friedrich Dominicus's message of "Mon, 19 Jun 2006 16:07:16 +0200") References: <4494CF86.8040005@comcast.net> <4494F05A.4050901@comcast.net> <426E24FF-703F-447F-9E1C-72849DCF742B@common-lisp.net> <87r71l5je3.fsf@flarge.here> Message-ID: <87mzc95hm3.fsf@flarge.here> Friedrich Dominicus writes: > Well it works for another page with SBCL also > > That's really strange. It seems some not initialized buffer is the reason, but that's all I can say currently. Sorry Friedrich