Fwd: [plt-scheme] Online code update.

From: Jay McCarthy (jay.mccarthy at gmail.com)
Date: Wed Nov 18 13:28:29 EST 2009

Just realized this didn't go to the list.

---------- Forwarded message ----------
From: Jay McCarthy <jay.mccarthy at gmail.com>
Date: Wed, Nov 18, 2009 at 11:27 AM
Subject: Re: [plt-scheme] Online code update.
To: Sergey Lilo <power.real at gmail.com>


You can't reload with serve/servlet without restarting.

If you use the command-line, then you can use /conf/refresh-servlets.

If you are crazy, you can put the serve/servlet in another thread:

(thread (lambda () (serve/servlet ...)))

Then from the REPL you could just:

(set! title "I am insane")

and it would change.

Normal craziness with this development style would apply.

Jay

On Wed, Nov 18, 2009 at 11:23 AM, Sergey Lilo <power.real at gmail.com> wrote:
> Thank you.
> But can you show me a primer?
>
> For example, I running this code:
>
> (define title "Hello world")
>
> (define (guestbook request)
>  (list #"text/html"
>        (include-template "templates/index.tpl")))
>
> (serve/servlet guestbook
>                #:port 8080
>                #:servlet-path "/")
> How can I redefine "title"?
>
> 2009/11/19 Jay McCarthy <jay.mccarthy at gmail.com>:
>> This is what /conf/refresh-servlets does.
>>
>> Jay
>>
>> On Wed, Nov 18, 2009 at 11:07 AM, Sergey Lilo <power.real at gmail.com> wrote:
>>> Hello, everybody.
>>> I just started to study Scheme - I'm writing simple guestbook with Plt
>>> Web Server.
>>> It works fine, but is there a method for update code without
>>> restarting webserver?
>>> I saw the Swank for CL, and I want something like it for PLT-Scheme.
>>> Or, if you have better way - tell me. :)
>>> Thanks.
>>> _________________________________________________
>>>  For list-related administrative tasks:
>>>  http://list.cs.brown.edu/mailman/listinfo/plt-scheme
>>>
>>
>>
>>
>> --
>> Jay McCarthy <jay at cs.byu.edu>
>> Assistant Professor / Brigham Young University
>> http://teammccarthy.org/jay
>>
>> "The glory of God is Intelligence" - D&C 93
>>
>



--
Jay McCarthy <jay at cs.byu.edu>
Assistant Professor / Brigham Young University
http://teammccarthy.org/jay

"The glory of God is Intelligence" - D&C 93



-- 
Jay McCarthy <jay at cs.byu.edu>
Assistant Professor / Brigham Young University
http://teammccarthy.org/jay

"The glory of God is Intelligence" - D&C 93


Posted on the users mailing list.