From: ·······@gmail.com
Subject: SLIME questions
Date: 
Message-ID: <5b9d0d79-11c5-4893-945c-b33942c27045@u12g2000prd.googlegroups.com>
I'm new to LISP and SLIME.

What's the preferred way to load an existing LISP file for execution?
Key sequence?

How do you normally create a new LISP file for editing and execution?

Thanks!

Per

From: Pascal J. Bourguignon
Subject: Re: SLIME questions
Date: 
Message-ID: <7cej55jd8z.fsf@pbourguignon.anevia.com>
·······@gmail.com writes:

> I'm new to LISP and SLIME.
>
> What's the preferred way to load an existing LISP file for execution?
> Key sequence?

I just type (load "file.lisp") C-x C-e

I'm as lazy as you and never even typed C-h m to know what keybinding
slime provides...


> How do you normally create a new LISP file for editing and execution?

C-x C-f new-file.lisp RET
(+ 1 2) C-x C-e

-- 
__Pascal Bourguignon__
From: Tamas K Papp
Subject: Re: SLIME questions
Date: 
Message-ID: <6fo6e9Fc94l4U1@mid.individual.net>
On Mon, 04 Aug 2008 12:17:16 +0200, Pascal J. Bourguignon wrote:

> ·······@gmail.com writes:
> 
>> I'm new to LISP and SLIME.
>>
>> What's the preferred way to load an existing LISP file for execution?
>> Key sequence?
> 
> I just type (load "file.lisp") C-x C-e

Or, if you have already opened that file for editing, C-c C-k will  
compile & load the buffer.

> I'm as lazy as you and never even typed C-h m to know what keybinding
> slime provides...

Check out the SLIME quick reference card, eg from CVS

http://common-lisp.net/cgi-bin/viewcvs.cgi/slime/doc/slime-refcard.pdf?
rev=1.1&root=slime&view=auto

Tamas
From: Pascal J. Bourguignon
Subject: Re: SLIME questions
Date: 
Message-ID: <7c7iaxj9r9.fsf@pbourguignon.anevia.com>
Tamas K Papp <······@gmail.com> writes:
> On Mon, 04 Aug 2008 12:17:16 +0200, Pascal J. Bourguignon wrote:
>> ·······@gmail.com writes:
>>> What's the preferred way to load an existing LISP file for execution?
>>> Key sequence?
>> I'm as lazy as you and never even typed C-h m to know what keybinding
>> slime provides...
>
> Check out the SLIME quick reference card, eg from CVS
>
> http://common-lisp.net/cgi-bin/viewcvs.cgi/slime/doc/slime-refcard.pdf?
> rev=1.1&root=slime&view=auto

Thanks,
-- 
__Pascal Bourguignon__
From: Vinay
Subject: Re: SLIME questions
Date: 
Message-ID: <e241bfaf-e543-4d65-952c-56d9d97e85b5@j1g2000prb.googlegroups.com>
On Aug 4, 4:32 am, ····@informatimago.com (Pascal J. Bourguignon)
wrote:
> Tamas K Papp <······@gmail.com> writes:
>
> > On Mon, 04 Aug 2008 12:17:16 +0200, Pascal J. Bourguignon wrote:
> >> ·······@gmail.com writes:
> >>> What's the preferred way to load an existing LISP file for execution?
> >>> Key sequence?
> >> I'm as lazy as you and never even typed C-h m to know what keybinding
> >> slime provides...
>
> > Check out the SLIME quick reference card, eg from CVS
>
> >http://common-lisp.net/cgi-bin/viewcvs.cgi/slime/doc/slime-refcard.pdf?
> > rev=1.1&root=slime&view=auto
>
> Thanks,
> --
> __Pascal Bourguignon__

Is there a way I can save my environment using Slime ? Im using Slime
& ClozureCL. What I want is to save the state of my REPL, so that when
I fire it up later, I can load things to the state I last left it in..
From: blandest
Subject: Re: SLIME questions
Date: 
Message-ID: <19e88a02-50f0-42cb-ab59-dbe7dcf7fe5e@w7g2000hsa.googlegroups.com>
On Aug 5, 10:11 am, Vinay <·······@gmail.com> wrote:
> On Aug 4, 4:32 am, ····@informatimago.com (Pascal J. Bourguignon)
> wrote:
>
>
>
> > Tamas K Papp <······@gmail.com> writes:
>
> > > On Mon, 04 Aug 2008 12:17:16 +0200, Pascal J. Bourguignon wrote:
> > >> ·······@gmail.com writes:
> > >>> What's the preferred way to load an existing LISP file for execution?
> > >>> Key sequence?
> > >> I'm as lazy as you and never even typed C-h m to know what keybinding
> > >> slime provides...
>
> > > Check out the SLIME quick reference card, eg from CVS
>
> > >http://common-lisp.net/cgi-bin/viewcvs.cgi/slime/doc/slime-refcard.pdf?
> > > rev=1.1&root=slime&view=auto
>
> > Thanks,
> > --
> > __Pascal Bourguignon__
>
> Is there a way I can save my environment using Slime ? Im using Slime
> & ClozureCL. What I want is to save the state of my REPL, so that when
> I fire it up later, I can load things to the state I last left it in..

Saving the environment is implementation specific (not SLIME). You
have two options: dump the image (http://ccl.clozure.com/manual/
chapter4.7.html) or use a running image and connect  slime to that
process (http://www.cliki.net/SLIME-HOWTO, see the "Starting SLIME"
section).
From: Pascal J. Bourguignon
Subject: Re: SLIME questions
Date: 
Message-ID: <7cej53j3rd.fsf@pbourguignon.anevia.com>
Vinay <·······@gmail.com> writes:

> On Aug 4, 4:32�am, ····@informatimago.com (Pascal J. Bourguignon)
> wrote:
>> Tamas K Papp <······@gmail.com> writes:
>>
>> > On Mon, 04 Aug 2008 12:17:16 +0200, Pascal J. Bourguignon wrote:
>> >> ·······@gmail.com writes:
>> >>> What's the preferred way to load an existing LISP file for execution?
>> >>> Key sequence?
>> >> I'm as lazy as you and never even typed C-h m to know what keybinding
>> >> slime provides...
>>
>> > Check out the SLIME quick reference card, eg from CVS
>>
>> >http://common-lisp.net/cgi-bin/viewcvs.cgi/slime/doc/slime-refcard.pdf?
>> > rev=1.1&root=slime&view=auto
>>
>> Thanks,
>> --
>> __Pascal Bourguignon__
>
> Is there a way I can save my environment using Slime ? Im using Slime
> & ClozureCL. What I want is to save the state of my REPL, so that when
> I fire it up later, I can load things to the state I last left it in..

Yes and now.

You can save it with #+clisp ext:saveinitmem #+sbcl
sb-ext:save-lisp-and-die (better fork around it in sbcl), etc.  But to
be able to restart the saved image with a reactivated swank, you'll
have to work harder.

Note that clisp tries to help here, by reopening open files when
they're still there at the same path.  But it doesn't help anymore
than sbcl for network protocols. It couldn't and wouldn't replay a
protocol to revert to the suspended state; imagine you were connected
to your bank web site and had transfered $100,000 to those nigerian
bankers, you save the state, and when you relaunch the image, it would
replay the network traffic to resend again $100,000 just to be in the
same state again.  Well, sending $100,000 to nigerian bankers, or
sending results of forms evaluated to emacs is about the same. :-)

-- 
__Pascal Bourguignon__