Thanks for all the responses this is great

On Fri, Dec 17, 2010 at 9:00 AM, <pro-request@common-lisp.net> wrote:
Send pro mailing list submissions to
       pro@common-lisp.net

To subscribe or unsubscribe via the World Wide Web, visit
       http://common-lisp.net/cgi-bin/mailman/listinfo/pro
or, via email, send a message with subject or body 'help' to
       pro-request@common-lisp.net

You can reach the person managing the list at
       pro-owner@common-lisp.net

When replying, please edit your Subject line so it is more specific
than "Re: Contents of pro digest..."


Today's Topics:

  1. How to interact with a running lisp instance? (Steve Morin)
  2. Re: How to interact with a running lisp instance? (Jack Harper)
  3. Re: How to interact with a running lisp instance? (David Owen)
  4. Re: How to interact with a running lisp instance? (Peter Herth)
  5. Re: How to interact with a running lisp instance? (Tom Emerson)
  6. Re: How to interact with a running lisp instance? (Sam Steingold)


----------------------------------------------------------------------

Message: 1
Date: Thu, 16 Dec 2010 09:25:32 -0800
From: Steve Morin <steve.morin@gmail.com>
Subject: [pro] How to interact with a running lisp instance?
To: pro@common-lisp.net
Message-ID:
       <AANLkTinWBZgHg_zgTjpvdMODdeFus2PSZ3+4fbRxDJZ8@mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"

How to interact with a running lisp instance?  I have been trying to figure
this out.  I know this is being done with slime.  Does any one have any good
pointer on this.  I am thinking of writing a web application and would like
to be able to update it on the fly for updates and bug fixes.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://common-lisp.net/pipermail/pro/attachments/20101216/012199e2/attachment.html

------------------------------

Message: 2
Date: Fri, 17 Dec 2010 09:05:36 -0500
From: Jack Harper <jharper@frobenius.com>
Subject: Re: [pro] How to interact with a running lisp instance?
To: Steve Morin <steve.morin@gmail.com>
Cc: "pro@common-lisp.net" <pro@common-lisp.net>
Message-ID: <54D43704-18D3-4871-837E-664C11033F7A@frobenius.com>
Content-Type: text/plain;       charset=us-ascii

...an interesting idea.

Years ago (1984), I had dinner with Nils Nilsson (AI pioneer) and he mentioned the idea that he wanted to build a system that once alive would never be powered down again - in his view a minor but necessary prerequisite of an AI system.

It will be interesting to see what people will say about how to do this.

Regards to the List

Jack Harper
Secure Outcomes Inc

Sent from my iPhone

On Dec 16, 2010, at 12:25, Steve Morin <steve.morin@gmail.com> wrote:

> How to interact with a running lisp instance?  I have been trying to figure this out.  I know this is being done with slime.  Does any one have any good pointer on this.  I am thinking of writing a web application and would like to be able to update it on the fly for updates and bug fixes.
> _______________________________________________
> pro mailing list
> pro@common-lisp.net
> http://common-lisp.net/cgi-bin/mailman/listinfo/pro



------------------------------

Message: 3
Date: Fri, 17 Dec 2010 08:31:31 -0700 (MST)
From: David Owen <dsowen@fugue88.ws>
Subject: Re: [pro] How to interact with a running lisp instance?
To: pro@common-lisp.net
Message-ID: <alpine.LNX.2.00.1012170827290.11742@tux.l.fugue88.ws>
Content-Type: text/plain; charset="iso-8859-1"

On Thu, 16 Dec 2010, Steve Morin wrote:

> How to interact with a running lisp instance? ?I have been trying to figure
> this out. ?I know this is being done with slime. ?Does any one have any good
> pointer on this. ?I am thinking of writing a web application and would like
> to be able to update it on the fly for updates and bug fixes.

I run a Lisp webapp from detachtty.  It leaves a Unix socket around so you
can talk to the fake tty later.  I have done live-updates using this.

  http://www.cliki.net/detachtty

Whether you pass functions as functions or symbols in various places can
have an impact on your ability to do a live update (symbols being an
indirect reference, are more conducive).

-David

------------------------------

Message: 4
Date: Fri, 17 Dec 2010 16:34:44 +0100
From: Peter Herth <herth@peter-herth.de>
Subject: Re: [pro] How to interact with a running lisp instance?
To: Steve Morin <steve.morin@gmail.com>
Cc: pro@common-lisp.net
Message-ID:
       <AANLkTi=FS8hJsvop0Hara4p8EVF5rAv9AuVd9g3Ya5=O@mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1

Hi Steve,

when I am running server-style lisp applications, I actually do start
swank (the lisp side of slime) in it and at any time I wish, I can
connect with slime to it and interact.

Peter



------------------------------

Message: 5
Date: Fri, 17 Dec 2010 10:35:20 -0500
From: Tom Emerson <tremerson@gmail.com>
Subject: Re: [pro] How to interact with a running lisp instance?
To: Steve Morin <steve.morin@gmail.com>
Cc: pro@common-lisp.net
Message-ID:
       <AANLkTinZtpB7TU+zxcbJ3Q1OAfN5i2wfDvr63KbDkP8F@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

The following blog post describes how to get Hunchentoot running on a Linux
box with Swank running so that you can connect to the Lisp instance running
the webserver through Slime:

http://blog.ponto-dot.com/2010/08/15/setting-up-common-lisp-on-a-web-server

On Thu, Dec 16, 2010 at 12:25 PM, Steve Morin <steve.morin@gmail.com> wrote:

> How to interact with a running lisp instance?  I have been trying to figure
> this out.  I know this is being done with slime.  Does any one have any good
> pointer on this.  I am thinking of writing a web application and would like
> to be able to update it on the fly for updates and bug fixes.
> _______________________________________________
> pro mailing list
> pro@common-lisp.net
> http://common-lisp.net/cgi-bin/mailman/listinfo/pro
>
>
--
Tom Emerson
tremerson@gmail.com
http://treerex.blogspot.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://common-lisp.net/pipermail/pro/attachments/20101217/c42e11c7/attachment-0001.html

------------------------------

Message: 6
Date: Fri, 17 Dec 2010 10:33:50 -0500
From: Sam Steingold <sds@gnu.org>
Subject: Re: [pro] How to interact with a running lisp instance?
To: Steve Morin <steve.morin@gmail.com>
Cc: pro@common-lisp.net
Message-ID:
       <AANLkTikAK555+2Tq-t12C+upNVSY3fZqnmTK-FzQCEXr@mail.gmail.com>
Content-Type: text/plain; charset=UTF-8

On Thu, Dec 16, 2010 at 12:25 PM, Steve Morin <steve.morin@gmail.com> wrote:
> How to interact with a running lisp instance? ?I have been trying to figure
> this out. ?I know this is being done with slime. ?Does any one have any good
> pointer on this. ?I am thinking of writing a web application and would like
> to be able to update it on the fly for updates and bug fixes.

The best generic answer is probably the following:
if you have started something  at the REPL, you can interrupt the
process (Ctrl-C or something like that)
and bet a "break" prompt, from which you can do everything you can do
from the regular prompt: load/compile files,
define functions, fix bugs &c &c &c.
Then you should be able to continue the process you just interrupted.

A less generic answer would be to start an extra thread which would be
listening on a port and then you can connect to that port to get a
lisp prompt without interrupting all the other processes currently
running.
Then you can do everything (load/compile files, define functions, fix
bugs &c &c &c) and the lisp should be able to figure out which
processes have to be stopped for which actions (e.g., a process using
CLOS might have to be stopped while low-level MOP stuff is redefined).
You (and the lisp implementors) have to be careful, of course, about
the safe points when things can be interrupted and watch out for the
little things like if you interrupt lisp inside a recursive function F
and redefine F, or if you redefine F by connecting to a separate
thread, then you don't know whether the recursive calls to F will be
using the new or the old definition of F unless you disassemble the
old definition of F and find out whether the recursive call is
compiled as a jump (old definition will be used) or as a (FUNCALL #'F)
(also old definition) or as a (FUNCALL 'F) (new definition will be
used).


--
Sam Steingold <http://sds.podval.org>



------------------------------

_______________________________________________
pro mailing list
pro@common-lisp.net
http://common-lisp.net/cgi-bin/mailman/listinfo/pro


End of pro Digest, Vol 4, Issue 13
**********************************



--
Steve Morin | Hacker, Entrepreneur, Startup Advisor 
twitter.com/SteveMorin | stevemorin.com
Live the dream start a startup. Make the world ... a better place.