Re: [Chicken-users] Starting up spiffy for dynamic content

2016-03-19 Thread Peter Bex
On Wed, Mar 09, 2016 at 03:01:56PM +, Norman Gray wrote: > The new section 'A simple dynamic web page example' is perfect, in > combination with the pointer to the spiffy+sxml example. Hi Norman, Excellent, glad to be of help. > I marginally adjusted the linked webserver.scm to use >

Re: [Chicken-users] Starting up spiffy for dynamic content

2016-03-09 Thread Kristian Lein-Mathisen
Hi Norman! We've been using the vhost-map a lot in our systems too. I've put together (so far an unofficial) egg that turns spiffy's current-request and current-response into function arguments and return values respectively. Maybe that could be useful for some code-samples, if not useful as a

Re: [Chicken-users] Starting up spiffy for dynamic content

2016-03-09 Thread Norman Gray
Peter, hello. On 8 Mar 2016, at 20:41, Peter Bex wrote: On Tue, Mar 08, 2016 at 02:48:00PM +, Norman Gray wrote: So you mean including handlers like: (define (vhost-handler cont) (let ((uri (uri-path (request-uri (current-request) (if (string=? (cadr uri) "wibble") ;; we want to

Re: [Chicken-users] Starting up spiffy for dynamic content

2016-03-08 Thread Andy Bennett
Hi, >> Some preconceptions, yes, but I've used enough frameworks such as >> this to make sure that I keep such preconceptions pretty >> lightweight, so they're merely a guide as a search for how the >> system wants to be used. I thus did find vhost-map quickly, but the >> documentation appeared

Re: [Chicken-users] Starting up spiffy for dynamic content

2016-03-08 Thread Andy Bennett
Hi, > Thanks for these clarifications. > > On 8 Mar 2016, at 12:40, Peter Bex wrote: > >> On Tue, Mar 08, 2016 at 12:02:29PM +, Norman Gray wrote: >>> It occurred to me that I could/should use the vhost-map to do this >>> dispatching, using something like >>> >>> (vhost-map `((".*" .

Re: [Chicken-users] Starting up spiffy for dynamic content

2016-03-08 Thread Peter Bex
On Tue, Mar 08, 2016 at 02:48:00PM +, Norman Gray wrote: > Peter, hello. > > Thanks for these clarifications. You're welcome. > So you mean including handlers like: > > (define (vhost-handler cont) > (let ((uri (uri-path (request-uri (current-request) > (if (string=? (cadr uri)

Re: [Chicken-users] Starting up spiffy for dynamic content

2016-03-08 Thread Norman Gray
Peter, hello. Thanks for these clarifications. On 8 Mar 2016, at 12:40, Peter Bex wrote: On Tue, Mar 08, 2016 at 12:02:29PM +, Norman Gray wrote: It occurred to me that I could/should use the vhost-map to do this dispatching, using something like (vhost-map `((".*" . ,(lambda

Re: [Chicken-users] Starting up spiffy for dynamic content

2016-03-08 Thread Caolan McMahon
Peter, for what it's worth I encountered exactly the same confusion when I first used spiffy (or rather, I arrived with the same preconceptions?). Perhaps this might be fixed by adding a clearly signposted example to the wiki which demonstrates the recommended way to implement this kind of dynamic

Re: [Chicken-users] Starting up spiffy for dynamic content

2016-03-08 Thread Peter Bex
On Tue, Mar 08, 2016 at 12:02:29PM +, Norman Gray wrote: > It occurred to me that I could/should use the vhost-map to do this > dispatching, using something like > > (vhost-map `((".*" . ,(lambda (continue) ... and ignore (continue) > > But (a) that would clearly be a hack Actually,

[Chicken-users] Starting up spiffy for dynamic content

2016-03-08 Thread Norman Gray
Greetings. I'm having difficulty working out how to start spiffy, to serve entirely dynamic content. I feel sure I'm missing something really obvious. I want to serve entirely dynamic content; that is, no static file content, but with me supplying code which turns a request structure into