From: Jim Morrison
Subject: newbie question
Date: 
Message-ID: <3E73E96F.90601@attbi.com>
Hello all,

I'm a student, using CMUCL on a unix system (command line only here).  I 
have a little program and I invoke the interrpretor using the command

list -load myprog.lisp

which is all well and good, it comes up with the debugger ( i believer). 
 When I am at the top level I get a

*

for a prompt.  My stupid question is how do I get out of this, 
completely exit back to unix?  I've tried everything I can think of with 
no success.

Thanks,

Jim

From: Matthew Danish
Subject: Re: newbie question
Date: 
Message-ID: <20030315231257.D1644@lain.cheme.cmu.edu>
On Sun, Mar 16, 2003 at 03:02:08AM +0000, Jim Morrison wrote:
> Hello all,
> 
> I'm a student, using CMUCL on a unix system (command line only here).  I 
> have a little program and I invoke the interrpretor using the command
> 
> list -load myprog.lisp
> 
> which is all well and good, it comes up with the debugger ( i believer). 
>  When I am at the top level I get a
> 
> *
> 
> for a prompt.  My stupid question is how do I get out of this, 
> completely exit back to unix?  I've tried everything I can think of with 
> no success.

Well, Adam has already given you the immediate answer, but there's
another answer which may be of more use.  When you work in Common Lisp,
you should try to work from the top-level prompt as much as possible.  A
lot of the advantages of Lisp come from having this environment to work
within.  For one thing, by loading the way you do, you are not taking
advantage of the CMUCL compiler, Python.  You should evaluate
(compile-file "myprog") at least to generate (for CMUCL) a myprog.x86f
file which you can then -load later on, if you wish.  Or you can work,
in the top-level environment, with the compiled version of the code
(load "myprog") will load the compiled version if available.

The CMUCL top-level is a bit spartan, I recommend using Emacs with the
ILISP package which interfaces with CMUCL and other Lisps.

Some URLs of note:
http://www.cliki.net/
http://cl-cookbook.sourceforge.net/
http://www.cons.org/cmucl/

-- 
; Matthew Danish <·······@andrew.cmu.edu>
; OpenPGP public key: C24B6010 on keyring.debian.org
; Signed or encrypted mail welcome.
; "There is no dark side of the moon really; matter of fact, it's all dark."
From: Thomas F. Burdick
Subject: Re: newbie question
Date: 
Message-ID: <xcvel57yu1c.fsf@conquest.OCF.Berkeley.EDU>
Matthew Danish <·······@andrew.cmu.edu> writes:

> The CMUCL top-level is a bit spartan, I recommend using Emacs with the
> ILISP package which interfaces with CMUCL and other Lisps.

If you're already familiar with Emacs, then this is fine advice.
Except on Debian, setting up ILISP is pretty scary for an
Emacs-newbie, though.  In that case, you might use Hemlock, which is
the editor that comes with CMUCL.

-- 
           /|_     .-----------------------.                        
         ,'  .\  / | No to Imperialist war |                        
     ,--'    _,'   | Wage class war!       |                        
    /       /      `-----------------------'                        
   (   -.  |                               
   |     ) |                               
  (`-.  '--.)                              
   `. )----'                               
From: Marc Spitzer
Subject: Re: newbie question
Date: 
Message-ID: <86smto6j72.fsf@bogomips.optonline.net>
Jim Morrison <······@attbi.com> writes:

> Hello all,
> 
> I'm a student, using CMUCL on a unix system (command line only here).
> I have a little program and I invoke the interrpretor using the command
> 
> 
> list -load myprog.lisp
> 
> which is all well and good, it comes up with the debugger ( i
> believer). When I am at the top level I get a
> 
> 
> *
> 
> for a prompt.  My stupid question is how do I get out of this,
> completely exit back to unix?  I've tried everything I can think of
> with no success.

First it would help if you read the manual, it has the answer and
many others as well.

or you could just type (quit) at the prompt

marc
From: Jim Morrison
Subject: Re: newbie question
Date: 
Message-ID: <3E74A6C0.1030802@attbi.com>
--------------030405020008010901030302
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit



Marc Spitzer wrote:

>
>First it would help if you read the manual, it has the answer and
>many others as well.
>
>or you could just type (quit) at the prompt
>
>  
>
I searched the user manual, never could i find (quit). It does say quit 
(Section 3.7) but being new to lisp I didn't put two and two together to 
use quit with paranthesis.... Excuse my ignorance!

Jim

--------------030405020008010901030302
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1">
  <title></title>
</head>
<body>
<br>
<br>
Marc Spitzer wrote:<br>
<blockquote type="cite" ·······················@bogomips.optonline.net">
  <pre wrap=""><!---->
First it would help if you read the manual, it has the answer and
many others as well.

or you could just type (quit) at the prompt

  </pre>
</blockquote>
I searched the user manual, never could i find (quit). It does say quit (Section
3.7) but being new to lisp I didn't put two and two together to use quit
with paranthesis.... Excuse my ignorance!<br>
<br>
Jim<br>
</body>
</html>

--------------030405020008010901030302--
From: Matthew Danish
Subject: Re: newbie question
Date: 
Message-ID: <20030316143718.E1644@lain.cheme.cmu.edu>
On Sun, Mar 16, 2003 at 04:29:57PM +0000, Jim Morrison wrote:
> I searched the user manual, never could i find (quit). It does say quit 
> (Section 3.7) but being new to lisp I didn't put two and two together to 
> use quit with paranthesis.... Excuse my ignorance!

Most manuals will assume you know how to call a function, so they will
only give you the name of the function and the argument list syntax if
it has one.  

Lisp assumes that the first element of a list it is evaluating is a
function /name/; therefore in the list (QUIT), it assumes that the
symbol QUIT is a function name because it is first in the list.  Then it
calls the function, obtained from the function-name QUIT, with the rest
of the list being evaluated and passed as arguments.

Note that there is a difference between the name of a function and a
function.  For example: (funcall (function quit)).  FUNCALL is a symbol
which names a function which calls its first argument as a function.
QUIT is a symbol which names a function, and you obtain the function
from the name with the special operator named by the symbol FUNCTION.
The shorthand for FUNCTION is #' so you would often see the above
example as (funcall #'quit).

-- 
; Matthew Danish <·······@andrew.cmu.edu>
; OpenPGP public key: C24B6010 on keyring.debian.org
; Signed or encrypted mail welcome.
; "There is no dark side of the moon really; matter of fact, it's all dark."
From: Edi Weitz
Subject: Re: newbie question
Date: 
Message-ID: <87d6ks7woy.fsf@bird.agharta.de>
Jim Morrison <······@attbi.com> writes:

> Hello all,
> 
> I'm a student, using CMUCL on a unix system (command line only here).
> I have a little program and I invoke the interrpretor using the command
> 
> list -load myprog.lisp
> 
> which is all well and good, it comes up with the debugger ( i
> believer). When I am at the top level I get a
> 
> *
> 
> for a prompt.  My stupid question is how do I get out of this,
> completely exit back to unix?  I've tried everything I can think of
> with no success.

This sound as if you have a misconception about how to work with a
Lisp system. The usual way is to start the system (in your case with
"lisp" or "cmucl") and then develop your program interactively. The
"*" that you're seeing is not the debugger but the read-eval-print
loop (REPL) where Lispers spend most of their time.

The behaviour that you seem to be expecting would be how you'd work
with, say, Perl. (Although Perl also has a REPL, kind of.)

You might want to read a book about Lisp.

Also note that while technically CMUCL will interpret your code if you
use the system like above almost all Common Lisp implementations
(including CMUCL) are able to compile to native code. It would be
another misconception if you were thinking that Lisp was just another
scripting language which has to interpret your code every time you
execute it.

HTH,
Edi.
From: Jim Morrison
Subject: Re: newbie question
Date: 
Message-ID: <3E74A88A.2020108@attbi.com>
Edi Weitz wrote:

>This sound as if you have a misconception about how to work with a
>Lisp system. 
>
Believe me, my conceptions are very backwards in this environment. 
 Thanks for all the great suggestions, any help is greatly appreciated.

Jim
From: Adam Warner
Subject: Re: newbie question
Date: 
Message-ID: <pan.2003.03.16.03.32.35.622660@consulting.net.nz>
Hi Jim Morrison,

> I'm a student, using CMUCL on a unix system (command line only here).  I
> have a little program and I invoke the interrpretor using the command
> 
> list -load myprog.lisp
> 
> which is all well and good, it comes up with the debugger ( i believer).
>  When I am at the top level I get a
> 
> *
> 
> for a prompt.  My stupid question is how do I get out of this, completely
> exit back to unix?  I've tried everything I can think of with no success.

It has always annoyed me that [CTRL]-D doesn't work. Just type:
(quit) [ENTER]

Regards,
Adam
From: Steven M. Haflich
Subject: Re: newbie question
Date: 
Message-ID: <3E77C655.7020606@alum.mit.edu>
Adam Warner wrote:

> It has always annoyed me that [CTRL]-D doesn't work. Just type:
> (quit) [ENTER]

I disagree.  Unlike some silly scripting program, a Lisp execution
(world) is sometimes used for development over many days and
may accumulate a huge amount of definitions, data, and other
results.  Having to reestablish all this because a finger spaz
typed ^D by accident would not be a good implementation feature.
Having the implementation confirm your intentions when you type
^D would defeat the reason for having a single keychord for
quitting.