[Lispweb] debugging and serving web pages at the same time in lisp (specifically clisp)
Richard Newman
r.newman at reading.ac.uk
Thu Oct 5 17:58:16 CDT 2006
On 5 Oct 2006, at 11:11 PM, Yin-So Chen wrote:
> Thanks Ivan, Richard, and Lawrence for responding - this is all
> very intriguing. Sounds like CGI is the only sure way to go with
> Clisp if I am looking to run multiple concurrent sessions?
Depends. If you're limited to clisp, perhaps.
> Also - Lawrence, I am assuming you have a way to capture your
> changes in life system back into source code form easily? I've
> heard the save-image capability, but would think you still need to
> have source code so you can rebuild image again if you can, is this
> correct?
Generally, you make changes in the source, then evaluate your changes
in the REPL. If you're lucky, things will work out :)
> Richard - you meant you can (trace) h-r-r in SBCL, right? In
> CLISP, once (host-serve-events) is called, it blocks REPL, so I
> can't do trace just-in-time without killing off the lisp session (I
> can't tell whether there is a way to accept a control-character
> within araneida).
Hmm. On SBCL serve-event does not block the REPL; I don't use clisp.
> BTW Ivan - I did find a blog article by BillClementson discussing
> the same topic at http://bc.tech.coop/blog/040224.html.
>
> Based on all the descriptions so far, I am wondering if the
> development "methodology" is completely different with lisp.
Yes, it is.
> I so far lived in the compile-link-install-test world, where most
> of syntactic bugs and some semantic bugs are caught during the
> compile phase. And that leaves the bugs that are harder to find in
> live systems. Of course, examining trace files is horrible
> compared to live traces, but I've found that a good majority of the
> bugs found in production requires non-trivial changes (even with
> decent abstraction layers) and hence my experience is that without
> going through another test cycle, changing is extremely risky.
You verify things on a test server, if you can, or by local testing
of some kind... then make the change in the running server without a
restart.
> Unless... there is a way to quickly verify and rollback changes
> easily in lisp?
Do it locally.
> It would be great if someone with experiences in both worlds (I am
> sure many of you do ;p) can share some light on whether lisp's
> development cycle is completely different than c/c++/java/c#
> world. I've started to write lisp code, but my limited experience
> does not allow me to grok this yet.
Yes, it is. You don't ever need to restart, unless you're testing
startup code! I've had systems which I've maintained, running, for 6
months; I keep the source up to date on-disk, and they've shut down
and restarted without any difficulties.
You're also not limited to a compile-run-test-edit cycle to find out
if you're right; you can work with live data in a REPL, so you're
much more likely to be right, and you don't ever have the shutdown/
restart delay.
-R
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.red-bean.com/pipermail/lispweb/attachments/20061005/8f164a8a/attachment.htm
More information about the lispweb
mailing list