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
·······@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__
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
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__
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..
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).
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__