[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-users] Working with Spiffy incrementally
From: |
Peter Bex |
Subject: |
Re: [Chicken-users] Working with Spiffy incrementally |
Date: |
Fri, 10 Nov 2017 08:38:43 +0100 |
User-agent: |
NeoMutt/20170113 (1.7.2) |
On Thu, Nov 09, 2017 at 06:00:14PM -0500, Jack Lucas wrote:
> Is anyone aware of a method where I can work with spiffy incrementally?
>
> Current workflow as I see it would look like editing the source and then
> running csi -s script.scm.
>
> It'd be very nice if I could (start-server) in a repl in emacs and be able to
> re-evaluate vhost-map and any functions mapped in vhost-map. I tried doing
> this but when I refreshed the page in my browser it didn't seem like it
> updated to the new evaluation.
Hi!
vhost-map is a parameter, which is thread-local, so if you modify it in
the repl, that's not going to affect the thread running the server.
I presume you're not going to change the vhost entries all that much,
so perhaps an extra layer of indirection would solve the problem:
(vhost-map `(("localhost" . ,(lambda (c) (my-proc c)))))
Then you should be able to redefine my-proc, and the lambda in the vhost
should pick it up.
HTH,
Peter
signature.asc
Description: PGP signature