Re: Why Lisp for web applications?



On Fri, 11 Nov 2005 11:29:18 -0800, Sylvain wrote:

> Bill Atkins wrote:
>> - If you're using swank and SLIME, you can connect to your running
>> application and make changes. This is useful for testing out specific
>> customer issues or for taking a look at your running system for
>> debugging purposes.
>
> ok, I am playing toying with dynamic web pages and lisp, but I
> haven't figured out how to do what you describe; my current set up
> uses detachtty to run lisp as a daemon talking to mod_lisp2); sorry
> for asking such a dumb question, but it would be neat to hook up
> emacs to the running app, I just don't know how to do it... any
> 'HOWTO' out there?

Here's a rather short step-by-step guide:

$ sbcl
;; make slime known to asdf
(pushnew #p"/path/to/slime/" asdf:*central-registry* :test #'equal)

;; Load slime
;; Note: slime' Common Lisp side is called swank
(asdf:oos 'asdf:load-op :swank)

;; Start a server
(swank:create-server :port 4005 :external-format :utf-8-unix)
;; Swank started at port: 4005.
; Adding fd handler: 7

4005

On the emacs side:
Load slime and then do 'M-x slime-connect'
Press enter when prompted for the host and port (assuming that the port
number is correct).

HTH Ralf Mattes


> --Sylvain



.



Relevant Pages