chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-users] Working with Spiffy incrementally


From: Jack Lucas
Subject: Re: [Chicken-users] Working with Spiffy incrementally
Date: Fri, 10 Nov 2017 13:48:24 -0500

Thank you!  That video was exactly what I was looking for.

Jack



-------- Original Message --------
Subject: Re: [Chicken-users] Working with Spiffy incrementally
Local Time: November 10, 2017 7:07 AM
UTC Time: November 10, 2017 12:07 PM
From: address@hidden
To: Jack Lucas <address@hidden>, address@hidden <address@hidden>


Hi Lucas,

I try to explore this in my screencast:
https://m.youtube.com/watch?v=eXB3I3S3vJc

Perhaps that can help you out.
K.

On Friday, November 10, 2017, Peter Bex <address@hidden> wrote:
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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]