From: Steve Graham
Subject: Developing a Program in Lisp
Date: 
Message-ID: <511f5bbf-0da0-4b5f-8dea-2423b0654958@k30g2000hse.googlegroups.com>
Hello.  I have been programming since 1980, albeit not in Lisp.  Most
of the time, though, it has been in an interpretive/interactive
language, so my programs were either developed in the interpreter and
tested as I went along, or they were created in a text editor/loaded
into the interpreter/then tested.

I see that developing in Lisp is different.  I have downloaded Corman
Lisp and note that it brings up a Lisp worksheet.  When I develop,
say, a function in it and try to execute it, nothing happens unless I
first highlight the text and then execute the selection.

So, how does one normally go about developing a program/application in
Lisp?

Thanks, Steve

From: Pascal J. Bourguignon
Subject: Re: Developing a Program in Lisp
Date: 
Message-ID: <87mykwuwr6.fsf@hubble.informatimago.com>
Steve Graham <···················@gmail.com> writes:

> Hello.  I have been programming since 1980, albeit not in Lisp.  Most
> of the time, though, it has been in an interpretive/interactive
> language, so my programs were either developed in the interpreter and
> tested as I went along, or they were created in a text editor/loaded
> into the interpreter/then tested.
>
> I see that developing in Lisp is different.  

Perhaps you need spectacles?  Watch again.  You can do as you did,
either way, with all the known Common Lisp implementations.


> I have downloaded Corman
> Lisp and note that it brings up a Lisp worksheet.  When I develop,
> say, a function in it and try to execute it, nothing happens unless I
> first highlight the text and then execute the selection.
>
> So, how does one normally go about developing a program/application in
> Lisp?

The exact way the REPL works is not specified by the Common Lisp
standard.  If in your implementation you have to select the function
to have it entered at the REPL, so be it.  But you cannot say that you
cannot work interactively there.  Check the user manual, or compare
this implementation with the other ones available on your system.
Since some of them are free (that is, with some of them you have the
freedom to modify them), I'd avise you to use one of them, so you will
be able to modify them to do exactly what you want.

On the other hand, LOAD and COMPILE-FILE are standardized, so if your
implementation is not an implementation for a subset of Common Lisp,
it will implement it and you will be able to work in your alternative
style.


-- 
__Pascal Bourguignon__                     http://www.informatimago.com/

COMPONENT EQUIVALENCY NOTICE: The subatomic particles (electrons,
protons, etc.) comprising this product are exactly the same in every
measurable respect as those used in the products of other
manufacturers, and no claim to the contrary may legitimately be
expressed or implied.
From: Rainer Joswig
Subject: Re: Developing a Program in Lisp
Date: 
Message-ID: <joswig-D25D4F.18420605072008@news-europe.giganews.com>
In article 
<····································@k30g2000hse.googlegroups.com>,
 Steve Graham <···················@gmail.com> wrote:

> Hello.  I have been programming since 1980, albeit not in Lisp.  Most
> of the time, though, it has been in an interpretive/interactive
> language, so my programs were either developed in the interpreter and
> tested as I went along, or they were created in a text editor/loaded
> into the interpreter/then tested.
> 
> I see that developing in Lisp is different.  I have downloaded Corman
> Lisp and note that it brings up a Lisp worksheet.  When I develop,
> say, a function in it and try to execute it, nothing happens unless I
> first highlight the text and then execute the selection.

In Corman Lisp:

shift-return evaluates the current top-level form where your cursor is.
Exception: if the cursor is before ( or after ), the it
shift-return evaluates that expression.

Your cursor has to be directly before, directly after or in the top-level
form. You don't need to select it.

Then use shift-return to evaluate it and the result will be
printed at the end of the worksheet.

Notice that evaluating from the editor windows will place the
result in the worksheet window.

The worksheet user interface is a mix of a REPL and an Editor.
You don't have a prompt though. Just type and then execute the form.

Note also that Common Lisp has functions for LOAD and COMPILE-FILE.
Note also that Corman Lisp uses a compiler.

> 
> So, how does one normally go about developing a program/application in
> Lisp?

Probably a) interactive and b) after/while reading the manual.  ;-)
Though I'm not so sure about the latter. I would recommend
it anyway.

> 
> Thanks, Steve

-- 
http://lispm.dyndns.org/
From: Steve Graham
Subject: Re: Developing a Program in Lisp
Date: 
Message-ID: <cae8747d-9fd2-46bf-ba53-cbae89a25768@a1g2000hsb.googlegroups.com>
On Jul 5, 10:42 am, Rainer Joswig <······@lisp.de> wrote:
> In article
> <····································@k30g2000hse.googlegroups.com>,
>  Steve Graham <···················@gmail.com> wrote:
>
> > Hello.  I have been programming since 1980, albeit not in Lisp.  Most
> > of the time, though, it has been in an interpretive/interactive
> > language, so my programs were either developed in the interpreter and
> > tested as I went along, or they were created in a text editor/loaded
> > into the interpreter/then tested.
>
> > I see that developing in Lisp is different.  I have downloaded Corman
> > Lisp and note that it brings up a Lisp worksheet.  When I develop,
> > say, a function in it and try to execute it, nothing happens unless I
> > first highlight the text and then execute the selection.
>
> In Corman Lisp:
>
> shift-return evaluates the current top-level form where your cursor is.
> Exception: if the cursor is before ( or after ), the it
> shift-return evaluates that expression.
>
> Your cursor has to be directly before, directly after or in the top-level
> form. You don't need to select it.
>
> Then use shift-return to evaluate it and the result will be
> printed at the end of the worksheet.
>
> Notice that evaluating from the editor windows will place the
> result in the worksheet window.
>
> The worksheet user interface is a mix of a REPL and an Editor.
> You don't have a prompt though. Just type and then execute the form.
>
> Note also that Common Lisp has functions for LOAD and COMPILE-FILE.
> Note also that Corman Lisp uses a compiler.
>
>
>
> > So, how does one normally go about developing a program/application in
> > Lisp?
>
> Probably a) interactive and b) after/while reading the manual.  ;-)
> Though I'm not so sure about the latter. I would recommend
> it anyway.
>
>
>
> > Thanks, Steve
>
> --http://lispm.dyndns.org/

Thanks, Rainer and Pascal for your help.


Steve