From: Amit Shah
Subject: GCL some basic questions
Date: 
Message-ID: <384A84CC.2370F6B3@A-t-t.N-e-t>
Hello all, 

I am tottaly new to Lisp and I need to use GCL for some school
assignment. If anybody can help me with some basic questions, I'll be
really grateful. I do not need to do anything fancy, just basic stuff
like reversing a list sorting a list etc. So far I am only familiar with
the basic functions like CONS, CAR, CDR, COND etc.

1) where can I find some documentation on using GCL? 
2) How do I exit GCL? ( I currently use ^d)
3) how do load a function from a file?   I tried 
   > (load 'myfile.lisp)
      That gave me the error myfile.lisp not found. I even tried it with
the 
    full  path name to get the same error
4)The functions I define, does not recognize the parameters. 
   to give  simple example
   > (defun mycar(lst)(car(lst)))
     MYCAR
   > (mycar '(a b c))
      This gives the error. The function LST is undefined. 

Please take the hyphens out of the address before replying


Thank you 

Amit Shah

From: Axel Schairer
Subject: Re: GCL some basic questions
Date: 
Message-ID: <fm9g0xhclkq.fsf@cally.dai.ed.ac.uk>
Amit Shah <·········@Att.Net> writes:
> 1) where can I find some documentation on using GCL? 

Perhaps by following some of the links in

	http://search.metacrawler.com/crawler?general=gcl+documentation&method=0&sid=&sno=0&domainLimit=0&rpp=20&timeout=0&hpe=10&format=regular&power=0&swizzled=1

although I am not sure about this.

> 3) how do load a function from a file?   I tried 
>    > (load 'myfile.lisp)

You should give the file name as a string as in (load "myfile.lisp")
rather than as a symbol.

> 4)The functions I define, does not recognize the parameters. 
>    to give  simple example
>    > (defun mycar(lst)(car(lst)))
>      MYCAR
>    > (mycar '(a b c))
>       This gives the error. The function LST is undefined. 

You need to distinguish between a reference to a variable as in X and
calling a function, as in (F).  (CAR (LST)) basically tries to call the
function CAR on the result of calling the function LST with zero
arguments.

You might want to have a look at the first few sections of a good lisp
book (the one I like best is Graham: ANSI Common Lisp).  If you do not
want to invest in a book,

	http://psg.com/~dlamkins/left/sl/sl.html 

is a online book that was reported on this newsgroup to be good though
I haven't used it myself.  Reading Chapter 3 should answer your
question and probably many others as well.

Hope this helps,
Axel

-- 
Axel Schairer, http://www.dai.ed.ac.uk/~schairer 
From: His Holiness the Reverend Doktor Xenophon Fenderson, the Carbon(d)ated
Subject: Re: GCL some basic questions
Date: 
Message-ID: <w4o7lit1cmv.fsf@nemesis.irtnog.org>
>>>>> "AS" == Amit Shah <·········@Att.Net> writes:

    AS> So far I am only familiar with the basic functions like CONS,
    AS> CAR, CDR, COND etc.

Well, the first thing you want to do is go pick up a copy of Graham's
_ANSI Common Lisp_ (ISBN 0-13-370875-6).  Or, you'll want to browse
David Lamkins' excellent on-line work _Successful Lisp_, at
<URL:http://psg.com/~dlamkins/left/sl/sl.html>.

    AS> how do load a function from a file?  I tried
    AS>  (load 'myfile.lisp)
    AS> That gave me the error myfile.lisp not found.

Try "myfile.lisp" instead of quoting it.  The expression 'myfile.lisp
creates a symbol with that name, not a string.  I don't think Common
Lisp lets one use symbols as strings, although older Lisps (MacLisp?)
did.  If CL does allow you to use symbols as strings, keep in mind
that the default internal representation for Lisp symbol names and
such is UPPER CASE (which you can see by executing the command
(symbol-name 'myfile.lisp) in GCL).

    AS> The functions I define, does not recognize the parameters.  to
    AS> give simple example

	(defun mycar (lst)
	  (car (lst)))

    AS> This gives the error. The function LST is undefined.

(Note how I reformatted your code.)

When Lisp evaluates an expression, e.g. (FOO 1 2 3), it knows that the
first item in the list is a function.  In the expression above, (LST),
Lisp is trying to execute a function called LST (hence the error).  To
get the *value* of LST, drop the parentheses, e.g. (CAR (LST)) becomes
(CAR LST).  Do you understand the difference?

-- 
"Applying computer technology is simply finding the right wrench to pound
in the correct screw." --.sig of Tim Wright, Sequent Computer Systems.
From: Kenneth P. Turvey
Subject: Re: GCL some basic questions
Date: 
Message-ID: <slrn84lm50.32g.kt-alt@pug1.sprocketshop.com>
On Sun, 05 Dec 1999 10:29:16 -0500, Amit Shah <·········@Att.Net> wrote:
>Hello all, 
>
>I am tottaly new to Lisp and I need to use GCL for some school
>assignment. If anybody can help me with some basic questions, I'll be
>really grateful. I do not need to do anything fancy, just basic stuff
>like reversing a list sorting a list etc. So far I am only familiar with
>the basic functions like CONS, CAR, CDR, COND etc.

GCL is probably not the best lisp for you to be using.  Take a look at
CLisp.

http://clisp.cons.org

This is probably one of the better lisps available for learning the
language.  GCL is not. 

-- 
Kenneth P. Turvey <······@SprocketShop.com> 
--------------------------------------------
  Every country has the government it deserves.
        -- Joseph de Maistre
From: Jeff Dalton
Subject: Re: GCL some basic questions
Date: 
Message-ID: <x2aenmlpjv.fsf@todday.aiai.ed.ac.uk>
······@SprocketShop.com (Kenneth P. Turvey) writes:

> GCL is probably not the best lisp for you to be using.  Take a look at
> CLisp.

What's so bad about GCL?  I have used it happily for many years,
both when teaching Common Lisp and for my own work.  (Yes, I know
it's more CLtL 1 than ANSI.)

(Does clisp compile to native code these days?)
From: Kenneth P. Turvey
Subject: Re: GCL some basic questions
Date: 
Message-ID: <slrn84qv8f.j08.kt-alt@pug1.sprocketshop.com>
On 07 Dec 1999 15:48:52 +0000, 
Jeff Dalton <····@todday.aiai.ed.ac.uk> wrote:
>
>What's so bad about GCL?  I have used it happily for many years,
>both when teaching Common Lisp and for my own work.  (Yes, I know
>it's more CLtL 1 than ANSI.)
>
>(Does clisp compile to native code these days?)

No it doesn't.  I typically use ACL now, but I still believe that Clisp is
probably the way to go if you are just learning the language.  GCL does
not match the documentation that someone learning Lisp  will probably be
using.  This makes learning the language more difficult than it has to be.


-- 
Kenneth P. Turvey <······@SprocketShop.com> 
--------------------------------------------
  It is dangerous to be right when the government is wrong.
        -- Voltaire
From: IBMackey
Subject: Re: GCL some basic questions
Date: 
Message-ID: <aenlv8v3.fsf@stic.net>
······@SprocketShop.com (Kenneth P. Turvey) writes:

> On 07 Dec 1999 15:48:52 +0000, 
> Jeff Dalton <····@todday.aiai.ed.ac.uk> wrote:
> >
> >What's so bad about GCL?  I have used it happily for many years,
> >both when teaching Common Lisp and for my own work.  (Yes, I know
> >it's more CLtL 1 than ANSI.)
> >
> >(Does clisp compile to native code these days?)
> 
> No it doesn't.  I typically use ACL now, but I still believe that Clisp is
> probably the way to go if you are just learning the language.  GCL does
> not match the documentation that someone learning Lisp  will probably be
> using.  This makes learning the language more difficult than it has to be.
> 

Actually, if you use your local library, and use the older lisp books
to learn lisp, GCL is pretty good. You can also use the clisp
documentation to learn GCL if you're so disposed. I use the clisp docs 
as a sort of quick reference to common lisp.

i.b.

-----------------------------------------------------------------
E-Mail: $m
Date: $d
Time: $t

                    "In clouds, bones of steel", from Gnus
-----------------------------------------------------------------
From: Jeff Dalton
Subject: Re: GCL some basic questions
Date: 
Message-ID: <x266y92z1o.fsf@todday.aiai.ed.ac.uk>
······@SprocketShop.com (Kenneth P. Turvey) writes:

> On 07 Dec 1999 15:48:52 +0000, 
> Jeff Dalton <····@todday.aiai.ed.ac.uk> wrote:
> >
> >What's so bad about GCL?  I have used it happily for many years,
> >both when teaching Common Lisp and for my own work.  (Yes, I know
> >it's more CLtL 1 than ANSI.)
> >
> >(Does clisp compile to native code these days?)
> 
> No it doesn't.  I typically use ACL now, but I still believe that Clisp is
> probably the way to go if you are just learning the language.  GCL does
> not match the documentation that someone learning Lisp  will probably be
> using.  This makes learning the language more difficult than it has to be.

But usually not much more difficult.  After all, it's pretty easy to
"upgrade" GCL with a few things, such as DEFPACKAGE and parts of the
condition system, that make it possible to write the same code in GCL
as in ANSI-compliant Common Lisp, without it being too awkward.

And students will tend to be using a fairly small subset of the
language in any case.

Clisp may still be better, of course.  I can't really say, because
I've hardly ever used it.  I just don't think GCL is all that bad.

Comp.lang.lisp seems to be steering people away from GCL these
days, and I think we ought to be a bit careful about that, lest
the implementation cease to exist.

-- j
From: Marco Antoniotti
Subject: Re: GCL some basic questions
Date: 
Message-ID: <lw3dtccvb4.fsf@parades.rm.cnr.it>
Jeff Dalton <····@todday.aiai.ed.ac.uk> writes:

> ······@SprocketShop.com (Kenneth P. Turvey) writes:
> 
> > On 07 Dec 1999 15:48:52 +0000, 
> > Jeff Dalton <····@todday.aiai.ed.ac.uk> wrote:
> > >
> > >What's so bad about GCL?  I have used it happily for many years,
> > >both when teaching Common Lisp and for my own work.  (Yes, I know
> > >it's more CLtL 1 than ANSI.)
> > >
> > >(Does clisp compile to native code these days?)
> > 
> > No it doesn't.  I typically use ACL now, but I still believe that Clisp is
> > probably the way to go if you are just learning the language.  GCL does
> > not match the documentation that someone learning Lisp  will probably be
> > using.  This makes learning the language more difficult than it has to be.
> 
> But usually not much more difficult.  After all, it's pretty easy to
> "upgrade" GCL with a few things, such as DEFPACKAGE and parts of the
> condition system, that make it possible to write the same code in GCL
> as in ANSI-compliant Common Lisp, without it being too awkward.

Since it is so easy to "upgrade" GCL with DEFPACKAGE, LOOP and the
CONDITION system, why don't the maintainers do so and start to
distribute a version which had these features included?

> Comp.lang.lisp seems to be steering people away from GCL these
> days, and I think we ought to be a bit careful about that, lest
> the implementation cease to exist.

Indeed, this is a problem for the community.  However, this is a
*responsability* of the GCL maintainers.

Cheers

-- 
Marco Antoniotti ===========================================
PARADES, Via San Pantaleo 66, I-00186 Rome, ITALY
tel. +39 - 06 68 10 03 17, fax. +39 - 06 68 80 79 26
http://www.parades.rm.cnr.it/~marcoxa
From: Jeff Dalton
Subject: Re: GCL some basic questions
Date: 
Message-ID: <x23dtc2gmp.fsf@todday.aiai.ed.ac.uk>
Marco Antoniotti <·······@parades.rm.cnr.it> writes:

> Jeff Dalton <····@todday.aiai.ed.ac.uk> writes:

> > ······@SprocketShop.com (Kenneth P. Turvey) writes:

> > > GCL does not match the documentation that someone learning Lisp
> > > will probably be using.  This makes learning the language more
> > > difficult than it has to be.
> > 
> > But usually not much more difficult.  After all, it's pretty easy to
> > "upgrade" GCL with a few things, such as DEFPACKAGE and parts of the
> > condition system, that make it possible to write the same code in GCL
> > as in ANSI-compliant Common Lisp, without it being too awkward.
> 
> Since it is so easy to "upgrade" GCL with DEFPACKAGE, LOOP and the
> CONDITION system, why don't the maintainers do so and start to
> distribute a version which had these features included?

Are you suggesting that it's *not* easy to make the upgrades
I mentioned?

> > Comp.lang.lisp seems to be steering people away from GCL these
> > days, and I think we ought to be a bit careful about that, lest
> > the implementation cease to exist.
> 
> Indeed, this is a problem for the community.  However, this is a
> *responsability* of the GCL maintainers.

But when GCL is not as bad as people suggest, they have some
responsibility too.

GCL has some advantages over clisp, after all.  For instance, it
compiles to native code (via C).
From: Raymond Toy
Subject: Re: GCL some basic questions
Date: 
Message-ID: <4nn1rjvrkl.fsf@rtp.ericsson.se>
>>>>> "Jeff" == Jeff Dalton <····@todday.aiai.ed.ac.uk> writes:

    Jeff> Marco Antoniotti <·······@parades.rm.cnr.it> writes:
    >> Jeff Dalton <····@todday.aiai.ed.ac.uk> writes:

    >> > ······@SprocketShop.com (Kenneth P. Turvey) writes:

    >> > > GCL does not match the documentation that someone learning Lisp
    >> > > will probably be using.  This makes learning the language more
    >> > > difficult than it has to be.
    >> > 
    >> > But usually not much more difficult.  After all, it's pretty easy to
    >> > "upgrade" GCL with a few things, such as DEFPACKAGE and parts of the
    >> > condition system, that make it possible to write the same code in GCL
    >> > as in ANSI-compliant Common Lisp, without it being too awkward.
    >> 
    >> Since it is so easy to "upgrade" GCL with DEFPACKAGE, LOOP and the
    >> CONDITION system, why don't the maintainers do so and start to
    >> distribute a version which had these features included?

    Jeff> Are you suggesting that it's *not* easy to make the upgrades
    Jeff> I mentioned?

On www.mindspring.com/~rtoy there is a defpackage and loop for gcl.
These packages were obtained from CMU Lisp archives and only required
very minor changes.

I see that there's a new version of gcl (and maxima) available now, so
perhaps these things can be added in now.

Ray
From: Paolo Amoroso
Subject: Re: GCL some basic questions
Date: 
Message-ID: <38531da1.1607884@news.mclink.it>
On 09 Dec 1999 14:31:54 -0500, Raymond Toy <···@rtp.ericsson.se> wrote:

> I see that there's a new version of gcl (and maxima) available now, so

Do you refer to GCL 2.3 or to a later version?


Paolo
-- 
EncyCMUCLopedia * Extensive collection of CMU Common Lisp documentation
http://cvs2.cons.org:8000/cmucl/doc/EncyCMUCLopedia/
From: Raymond Toy
Subject: Re: GCL some basic questions
Date: 
Message-ID: <4nogbytppw.fsf@rtp.ericsson.se>
>>>>> "Paolo" == Paolo Amoroso <·······@mclink.it> writes:

    Paolo> On 09 Dec 1999 14:31:54 -0500, Raymond Toy <···@rtp.ericsson.se> wrote:
    >> I see that there's a new version of gcl (and maxima) available now, so

    Paolo> Do you refer to GCL 2.3 or to a later version?

GCL 2.3 and Maxima 5.4.  I'm pretty sure they weren't there on
prep.ai.mit.edu a month or two ago.

I also notice that Maxima is now truly GPL.  William Schelter has
obtained permission to distribute Maxima as he sees fit.

Ray
From: Robert Monfera
Subject: Re: GCL some basic questions
Date: 
Message-ID: <38500C1C.7E0055A8@fisec.com>
Jeff Dalton wrote:
>
> Marco Antoniotti <·······@parades.rm.cnr.it> writes:
>
> > Jeff Dalton <····@todday.aiai.ed.ac.uk> writes:
>
> > > ······@SprocketShop.com (Kenneth P. Turvey) writes:
>
> > > > GCL does not match the documentation that someone learning Lisp
> > > > will probably be using.  This makes learning the language more
> > > > difficult than it has to be.
> > >
> > > But usually not much more difficult.  After all, it's pretty easy to
> > > "upgrade" GCL with a few things, such as DEFPACKAGE and parts of the
> > > condition system, that make it possible to write the same code in GCL
> > > as in ANSI-compliant Common Lisp, without it being too awkward.
> >
> > Since it is so easy to "upgrade" GCL with DEFPACKAGE, LOOP and the
> > CONDITION system, why don't the maintainers do so and start to
> > distribute a version which had these features included?
>
> Are you suggesting that it's *not* easy to make the upgrades
> I mentioned?

"Easy" is a subjective term.  My reading of Marco's point is that easy
or not, the maintainers are better equipped to do it than others,
especially the people mentioned in the first place (beginners, learners
of Lisp), and there is not much reason why the upgrade is not done, as
they are normally part of Lisp implementations.  It is very easy to put
wheels on a car, but your wife will expect them _on_ when you give her
one.

Robert
From: Jeff Dalton
Subject: Re: GCL some basic questions
Date: 
Message-ID: <x2ln6yafmh.fsf@todday.aiai.ed.ac.uk>
Robert Monfera <·······@fisec.com> writes:

> Jeff Dalton wrote:
> >
> > Marco Antoniotti <·······@parades.rm.cnr.it> writes:
> >
> > > Jeff Dalton <····@todday.aiai.ed.ac.uk> writes:
> >
> > > > ······@SprocketShop.com (Kenneth P. Turvey) writes:
> >
> > > > > GCL does not match the documentation that someone learning Lisp
> > > > > will probably be using.  This makes learning the language more
> > > > > difficult than it has to be.
> > > >
> > > > But usually not much more difficult.  After all, it's pretty easy to
> > > > "upgrade" GCL with a few things, such as DEFPACKAGE and parts of the
> > > > condition system, that make it possible to write the same code in GCL
> > > > as in ANSI-compliant Common Lisp, without it being too awkward.
> > >
> > > Since it is so easy to "upgrade" GCL with DEFPACKAGE, LOOP and the
> > > CONDITION system, why don't the maintainers do so and start to
> > > distribute a version which had these features included?
> >
> > Are you suggesting that it's *not* easy to make the upgrades
> > I mentioned?
> 
> "Easy" is a subjective term.

I know it's "pretty easy" to do what I suggested, because I've
done it, and I therefore know what it entails.  I didn't mention
LOOP, but the standard MIT code works with only trivial modifications;
and CMU CL DEFPACKAGE is also straightforward.  The condition system
is trickier, because you really want to change GCL so that the
errors it generates are turned into proper condition objects.
That's one of the reasons I said "parts of" in that case.

I'm not suggesting that everyone individually have to make these
changes, only that it's reasonably easy to make certain upgrades.
Someone who wanted to use GCL for teaching could do it, for instance.

And there at least to be a separate tar file, available from the
same place as GCL, that provided versions of PCL and the condition
system and probably some other things.

> My reading of Marco's point is that easy
> or not, the maintainers are better equipped to do it than others,

Well, that isn't what he said.  Anyway, it appeared to be either a
genuine (ie, not rhetorical) question or else a suggested modus
tollens.

> especially the people mentioned in the first place (beginners, learners
> of Lisp), and there is not much reason why the upgrade is not done, as
> they are normally part of Lisp implementations.  It is very easy to put
> wheels on a car, but your wife will expect them _on_ when you give her
> one.

I just don't think these things are all that big a deal.

GCL is not all that bad a verhicle for learning even if you don't
make any upgrades.

There seems to be a hostility to GCL here in comp.lang.lisp that I
don't understand.  Is it because it's GNU, or something?
From: Marco Antoniotti
Subject: Re: GCL some basic questions
Date: 
Message-ID: <lwhfhrt9th.fsf@parades.rm.cnr.it>
Jeff Dalton <····@todday.aiai.ed.ac.uk> writes:

> Marco Antoniotti <·······@parades.rm.cnr.it> writes:
>
> > Since it is so easy to "upgrade" GCL with DEFPACKAGE, LOOP and the
> > CONDITION system, why don't the maintainers do so and start to
> > distribute a version which had these features included?
> 
> Are you suggesting that it's *not* easy to make the upgrades
> I mentioned?

No.  I am suggesting that it is unexplicable why the GCL maintainers
refuse to make this upgrade.

> > Indeed, this is a problem for the community.  However, this is a
> > *responsability* of the GCL maintainers.
> 
> But when GCL is not as bad as people suggest, they have some
> responsibility too.
> 
> GCL has some advantages over clisp, after all.  For instance, it
> compiles to native code (via C).

Yes it does.  But it would be much easier to use if the maintainers
would bite the bullet and include *at least* DEFPACKAGE and LOOP.

Morevoer, if you want an interesting KCL derivative you should have a
look at ECoLisp (all right, this is a bit nationalistic and the
package may not be very up to date, but what the heck! :) )

Cheers

-- 
Marco Antoniotti ===========================================
PARADES, Via San Pantaleo 66, I-00186 Rome, ITALY
tel. +39 - 06 68 10 03 17, fax. +39 - 06 68 80 79 26
http://www.parades.rm.cnr.it/~marcoxa
From: Bruno Haible
Subject: Re: GCL some basic questions
Date: 
Message-ID: <82p3s2$cg4$1@news.u-bordeaux.fr>
Marco Antoniotti <·······@parades.rm.cnr.it> wrote:
>
>> Comp.lang.lisp seems to be steering people away from GCL these
>> days, and I think we ought to be a bit careful about that, lest
>> the implementation cease to exist.
>
> Indeed, this is a problem for the community.  However, this is a
> *responsability* of the GCL maintainers.

In the Free Software world, anyone can start a fork and become maintainer
of GCL. Therefore it is just as much your responsibility to start a new
fork of GCL than it is WFS's responsibility to maintain the existing one.
WFS's only responsibility is to teach at the University of Austin, Texas.

Of course, if you start a fork, it would be nice if you contacted him
before. But forks are not bad. Recall that GCL is a fork of KCL, by the way.

                     Bruno                     http://clisp.cons.org/~haible/
From: Marco Antoniotti
Subject: Re: GCL some basic questions
Date: 
Message-ID: <lwemcvt99l.fsf@parades.rm.cnr.it>
······@clisp.cons.org (Bruno Haible) writes:

> Marco Antoniotti <·······@parades.rm.cnr.it> wrote:
> >
> >> Comp.lang.lisp seems to be steering people away from GCL these
> >> days, and I think we ought to be a bit careful about that, lest
> >> the implementation cease to exist.
> >
> > Indeed, this is a problem for the community.  However, this is a
> > *responsability* of the GCL maintainers.
> 
> In the Free Software world, anyone can start a fork and become maintainer
> of GCL. Therefore it is just as much your responsibility to start a new
> fork of GCL than it is WFS's responsibility to maintain the existing one.
> WFS's only responsibility is to teach at the University of Austin,
> Texas.

Bruno, I may have used the term "responsability" in an inappropriate
way, but allow me to point out that in this case the amount of work to
be done (include two files and change the GCL Makefiles) is really
really minimal.

> Of course, if you start a fork, it would be nice if you contacted him
> before. But forks are not bad. Recall that GCL is a fork of KCL, by
> the way.

Well, I would contend that GCL is an "offspring" of KCL.  AFAIK,
development of KCL pretty much stopped.  Apart from that, I am not
much in favor of "forking".  In the current situation I believe it
leads to more confusion than it is necessary.

Besides, I use CMUCL and CLisp as free environments.

Cheers

-- 
Marco Antoniotti ===========================================
PARADES, Via San Pantaleo 66, I-00186 Rome, ITALY
tel. +39 - 06 68 10 03 17, fax. +39 - 06 68 80 79 26
http://www.parades.rm.cnr.it/~marcoxa
From: Tim Bradshaw
Subject: Re: GCL some basic questions
Date: 
Message-ID: <ey3hfhrdogw.fsf@cley.com>
* Marco Antoniotti wrote:

> Well, I would contend that GCL is an "offspring" of KCL.  AFAIK,
> development of KCL pretty much stopped.  Apart from that, I am not
> much in favor of "forking".  In the current situation I believe it
> leads to more confusion than it is necessary.

Well, it's easy enough to mail the maintainers and *offer to take on
the maintenance* or offer to submit a tested set of changes which
you're willing to stand by.  Unless you've done that & had changes
turned down, complaining `the responsibility of the maintainers' seems
rather rude.

--tim
From: John M Adams
Subject: Re: GCL some basic questions
Date: 
Message-ID: <xaowvqiacam.fsf@anarky.sogs.stsci.edu>
Jeff Dalton <····@todday.aiai.ed.ac.uk> writes:

> ······@SprocketShop.com (Kenneth P. Turvey) writes:
> 
> > GCL is probably not the best lisp for you to be using.  Take a look at
> > CLisp.
> 
> What's so bad about GCL?  I have used it happily for many years,
> both when teaching Common Lisp and for my own work.  (Yes, I know
> it's more CLtL 1 than ANSI.)

As a complete beginner about 6 months ago, I started out with GCL but
soon switched to CMUCL--a reasonably well documented, actively
maintained implementation.  Nothing against GCL, mind you, but it
isn't either of those two things.

-- 
John M. Adams
From: Jeff Dalton
Subject: Re: GCL some basic questions
Date: 
Message-ID: <x23dt5scvh.fsf@todday.aiai.ed.ac.uk>
John M Adams <·······@anarky.sogs.stsci.edu> writes:

> Jeff Dalton <····@todday.aiai.ed.ac.uk> writes:
> 
> > ······@SprocketShop.com (Kenneth P. Turvey) writes:
> > 
> > > GCL is probably not the best lisp for you to be using.  Take a look at
> > > CLisp.
> > 
> > What's so bad about GCL?  I have used it happily for many years,
> > both when teaching Common Lisp and for my own work.  (Yes, I know
> > it's more CLtL 1 than ANSI.)
> 
> As a complete beginner about 6 months ago, I started out with GCL but
> soon switched to CMUCL--a reasonably well documented, actively
> maintained implementation.  Nothing against GCL, mind you, but it
> isn't either of those two things.

KCL, at least, was reasonably well documented.  GCL isn't all
that different, and there's on-line documentation that at least
used to be up to date.

And new GCL versions appear from time to time, so there does seem
to be maintenance.

CMUCL is an excellent implementation.  I think it is in some ways
the best, though not in every way.

But GCL does have some good points.  It's considerably smaller both in
code size and at run-time than typical CL implementations.  It compiles
to C which makes it relatively easy to port.  (I've done it with KCL;
friends have done it with AKCL.)  It's fairly straightforward to
rebuild (without the aid of any working Lisp) and to fix bugs.
It makes it easy to mix in pieces of C code with your Lisp.  It's
available on a fairly wide range of machine/OS combinations.

-- j
From: Tim Bradshaw
Subject: Re: GCL some basic questions
Date: 
Message-ID: <ey3k8mh89y0.fsf@cley.com>
* Jeff Dalton wrote:
> But GCL does have some good points.  It's considerably smaller both in
> code size and at run-time than typical CL implementations.  

And:

    time echo "(print 1)" | gcl
    GCL (GNU Common Lisp)  Version(2.3) Sat Dec 11 01:16:39 GMT 1999
    Licensed under GNU Library General Public License
    Contains Enhancements by W. Schelter

    >
    1 
    1

    >
    real    0m0.043s
    user    0m0.030s
    sys     0m0.000s

(on a year-and-a-bit old Sun)

--tim
From: Tim Bradshaw
Subject: Re: GCL some basic questions
Date: 
Message-ID: <ey3emcp86yg.fsf@cley.com>
* I wrote:

>     time echo "(print 1)" | gcl

What I should have done in fact was:

	time sh -c 'echo "(print 1)" | gcl'

Which is a bit slower -- about 0.05 sec.  The equivalent for perl:

	time sh -c 'echo "print 1;" | perl'

is about 0.035. clisp is about 0.08, probably less if you suppress the
rc file and so on.

Anyway, the subtext of all this is that these kinds of CL systems are
now completely acceptable for use as things like scripting languages
or for cgi scripts.

--tim
From: Rob Warnock
Subject: Re: GCL some basic questions
Date: 
Message-ID: <837t0c$dbsp4@fido.engr.sgi.com>
Tim Bradshaw  <···@cley.com> wrote:
+---------------
| * I wrote:
| >     time echo "(print 1)" | gcl
| What I should have done in fact was:
| 	time sh -c 'echo "(print 1)" | gcl'
+---------------

Better still would be:

	echo "(print 1)" | time gcl


-Rob

-----
Rob Warnock, 8L-846		····@sgi.com
Applied Networking		http://reality.sgi.com/rpw3/
Silicon Graphics, Inc.		Phone: 650-933-1673
1600 Amphitheatre Pkwy.		FAX: 650-933-0511
Mountain View, CA  94043	PP-ASEL-IA
From: Tim Bradshaw
Subject: Re: GCL some basic questions
Date: 
Message-ID: <ey366y0miot.fsf@cley.com>
* Rob Warnock wrote:

> 	echo "(print 1)" | time gcl

Dang, I should have thought of that. 

Unfortunately, on my machine, this uses the time program, not bash's
built in time, and the time is too short for it to measure!

However this works:

	echo "(print 1)" | bash -c "time  gcl"

and the answer is ~0.037, and ~0.020 for perl (they both have about
+/- 1 in the last decimal place and the odd large glitch when
something else gets scheduled I guess).

--tim
From: Michael Dingler
Subject: Re: GCL some basic questions
Date: 
Message-ID: <38568971.24A78A6B@mindless.com>
> But GCL does have some good points.  It's considerably smaller both in
> code size and at run-time than typical CL implementations.  It compiles
> to C which makes it relatively easy to port.  (I've done it with KCL;
> friends have done it with AKCL.)  It's fairly straightforward to
> rebuild (without the aid of any working Lisp) and to fix bugs.
> It makes it easy to mix in pieces of C code with your Lisp.  It's
> available on a fairly wide range of machine/OS combinations.

BTW, does anybody still use Ecolisp or CLiCC? 

...Michael...
From: Amit Shah
Subject: Re: GCL some basic questions
Date: 
Message-ID: <384F18A4.7B9F68A1@Att.Net>
Thanks to all that replied to my mail in this news group and in person,
I was able to complete my assignment successfully. I needed just the
basic command set ( DEFUNE,  CAR, CDR, CONS, COND ATOM, NULL, NIL) And
GCL sufficed for that. Of course the requirements were modest too.
Reverse a list, sort a list, convert infix to postfix .

In my experience, once I was past the initial learning stage, and
suppressed my imperative instincts to enclose parameters in parentheses,
things just followed smoothly. I also found the book Successful Lisp by
David Lamkins http://psg.com/~dlamkins/left/sl/sl.html very useful

Thanks once again.

Warmest regards
Amit


Amit Shah wrote:
> 
> Hello all,
> 
> I am tottaly new to Lisp and I need to use GCL for some school
> assignment. If anybody can help me with some basic questions, I'll be
> really grateful. I do not need to do anything fancy, just basic stuff
> like reversing a list sorting a list etc. So far I am only familiar with
> the basic functions like CONS, CAR, CDR, COND etc.
> 
> 1) where can I find some documentation on using GCL?
> 2) How do I exit GCL? ( I currently use ^d)
> 3) how do load a function from a file?   I tried
>    > (load 'myfile.lisp)
>       That gave me the error myfile.lisp not found. I even tried it with
> the
>     full  path name to get the same error
> 4)The functions I define, does not recognize the parameters.
>    to give  simple example
>    > (defun mycar(lst)(car(lst)))
>      MYCAR
>    > (mycar '(a b c))
>       This gives the error. The function LST is undefined.
> 
> Please take the hyphens out of the address before replying
> 
> Thank you
> 
> Amit Shah