From: Wonky
Subject: Hello World in Lisp
Date: 
Message-ID: <3b4a9d22@nap-ns1.netconnect.net.au>
Hello Lispers,

rms told me that I don't know half of what programming languages can do
until I've learnt lisp or scheme. I wonder what he was referring to? I'm
curious. I gotta learn lisp or scheme, I'm thinking scheme is easier since
it's cut-down lisp? Hmm, anyway, I think I'll go the whole way and learn
lisp.

Are there any good tutorials on Lisp somewhere that I can read for free? I'm
a student and have no money so I will need free stuff.

Also, how does one invoke a lisp compiler or interpreter, on Linux and on
Windows? What is the best Lisp implementation on Linux? (Must be free!)

Can someone post a Hello World lisp programme for me to see, and give a link
to a manual where I can see functions and their params etc.

Thanks for your help,
James

From: Thomas A. Russ
Subject: Re: Hello World in Lisp
Date: 
Message-ID: <ymi3d84wsnv.fsf@sevak.isi.edu>
"Wonky" <······@northnetNOSPAMTHANKS.com.au> writes:

> Hello Lispers,
> 
> rms told me that I don't know half of what programming languages can do
> until I've learnt lisp or scheme. I wonder what he was referring to? I'm
> curious. I gotta learn lisp or scheme, I'm thinking scheme is easier since
> it's cut-down lisp? Hmm, anyway, I think I'll go the whole way and learn
> lisp.

If your main goal is to learn one of these languages in order to gain
exposure to new ways of thinking about computer programming, I think I
would go with Scheme, and accompany it with the purchase of the book
"Structure and Interpretation of Computer Programs" by Sussman &
Abelson.

The book won't be free -- it won't even be cheap :< -- but you should be
able to find some way of coming up with the money to buy it.  (At
half.com there is a copy for only $35)  Working through that book will
be a good way of becoming exposed to new ways of thinking about how
computer programs are organized and how computation can work.

-- 
Thomas A. Russ,  USC/Information Sciences Institute          ···@isi.edu    
From: Jordan Katz
Subject: Re: Hello World in Lisp
Date: 
Message-ID: <m3u20keh8o.fsf@underlevel.underlevel.net>
···@sevak.isi.edu (Thomas A. Russ) writes:

> "Wonky" <······@northnetNOSPAMTHANKS.com.au> writes:
> 
> > Hello Lispers,
> > 
> > rms told me that I don't know half of what programming languages can do
> > until I've learnt lisp or scheme. I wonder what he was referring to? I'm
> > curious. I gotta learn lisp or scheme, I'm thinking scheme is easier since
> > it's cut-down lisp? Hmm, anyway, I think I'll go the whole way and learn
> > lisp.
> 
> If your main goal is to learn one of these languages in order to gain
> exposure to new ways of thinking about computer programming, I think I
> would go with Scheme, and accompany it with the purchase of the book
> "Structure and Interpretation of Computer Programs" by Sussman &
> Abelson.
> 
> The book won't be free -- it won't even be cheap :< -- but you should be
> able to find some way of coming up with the money to buy it.  (At
> half.com there is a copy for only $35)  Working through that book will
> be a good way of becoming exposed to new ways of thinking about how
> computer programs are organized and how computation can work.

Actually, SICP [full text + exercises] is free online at:
http://mitpress.mit.edu/sicp/full-text/book/book.html
-- 
Jordan Katz <····@underlevel.net>  |  Mind the gap
From: Thom Goodsell
Subject: Re: Hello World in Lisp
Date: 
Message-ID: <7vzoacy333.fsf@shalott.cra.com>
···@sevak.isi.edu (Thomas A. Russ) writes:

> If your main goal is to learn one of these languages in order to gain
> exposure to new ways of thinking about computer programming, I think I
> would go with Scheme, and accompany it with the purchase of the book
> "Structure and Interpretation of Computer Programs" by Sussman &
> Abelson.
> 
> The book won't be free

Then again:
http://mitpress.mit.edu/sicp/full-text/book/book.html

> -- it won't even be cheap :< -- but you should be
> able to find some way of coming up with the money to buy it.  (At
> half.com there is a copy for only $35)  Working through that book will
> be a good way of becoming exposed to new ways of thinking about how
> computer programs are organized and how computation can work.
> 

-- 
Thom Goodsell                           ···@cra.com
Scientist                       (617) 491-3474 x574
Charles River Analytics         http://www.cra.com/
From: romeo bernardi
Subject: Re: Hello World in Lisp
Date: 
Message-ID: <kGJ27.48925$q77.327590@news2.tin.it>
"Thomas A. Russ" <···@sevak.isi.edu> ha scritto nel messaggio
····················@sevak.isi.edu...

> If your main goal is to learn one of these languages in order to gain
> exposure to new ways of thinking about computer programming, I think I
> would go with Scheme, and accompany it with the purchase of the book
> "Structure and Interpretation of Computer Programs" by Sussman &
> Abelson.
>
> The book won't be free -- it won't even be cheap

SICP is available for free on the web.

Search. Or ask on the Scheme newsgroup.

P.
From: Friedrich Dominicus
Subject: Re: Hello World in Lisp
Date: 
Message-ID: <871ynp15f9.fsf@frown.here>
"Wonky" <······@northnetNOSPAMTHANKS.com.au> writes:

        
> 
> Are there any good tutorials on Lisp somewhere that I can read for free? I'm
> a student and have no money so I will need free stuff.
Please check out www.alu.org
> 
> Also, how does one invoke a lisp compiler or interpreter, on Linux and on
> Windows?
There are quite a few again you'll find it on the mentioned pages.

>What is the best Lisp implementation on Linux? (Must be free!)
Bad try. I'm preferring LispWorks from Xanalys which comes in a free
flavor but too as a supported product. That does not mean in any way
it's the best Lisp or whatever, it suits my needs and it's a well
supported product. You may check out CMUCL or CLISP.



> 
> Can someone post a Hello World lisp programme for me to see, and give a link
> to a manual where I can see functions and their params etc.
(defun hello ()
        "hello world")

type in a Listener
(hello)
-> Hello World

Of course you can use print, prin, write or whatever.

Check out the mentioned URL and you'll find whatever you like. To be
mentioned especially is the Hyperspec and the online version of Common
Lisp the Language.

Regards
Friedrich
From: Reini Urban
Subject: Re: Hello World in Lisp
Date: 
Message-ID: <3b4b6e3b.297940595@news.tu-graz.ac.at>
Friedrich Dominicus wrote:
>(defun hello ()
>        "hello world")
>
>type in a Listener
>(hello)
>-> Hello World

I'd prefer not to use strings. symbols are more powerful.

$ clisp -M lispinit.mem

[1]> (defun hello1 () '(hello world))
HELLO1

[2]> (hello1)
(HELLO WORLD)

[3]> (defun hello2 () (values 'hello 'world))
HELLO2

[4]> (hello2)

HELLO ;
WORLD


-- 
Reini Urban
http://xarch.tu-graz.ac.at/autocad/news/faq/autolisp.html
From: Arseny Slobodjuck
Subject: Re: Hello World in Lisp
Date: 
Message-ID: <3b4afade.4314944@news.vtc.ru>
On Tue, 10 Jul 2001 16:17:33 +1000, "Wonky"
<······@northnetNOSPAMTHANKS.com.au> wrote:

>rms told me that I don't know half of what programming languages can do
>until I've learnt lisp or scheme. 
He's right.

>Are there any good tutorials on Lisp somewhere that I can read for free? I'm
>a student and have no money so I will need free stuff.
I've began from 'Common Lisp tutorial' by Geoffrey J. Gordon.
It exists anywhere, for example at
http://www-ccrma.stanford.edu/software/cm/clt.html
From: Coby Beck
Subject: Re: Hello World in Lisp
Date: 
Message-ID: <JhD27.146934$_T2.30036630@typhoon.tampabay.rr.com>
"Wonky" <······@northnetNOSPAMTHANKS.com.au> wrote in message
·············@nap-ns1.netconnect.net.au...

> Can someone post a Hello World lisp programme for me to see, and give a
link
> to a manual where I can see functions and their params etc.
>

(defun hello (&optional (stream *standard-output*))
    (format stream "Hello world"))

CL-USER 7 > (hello)
Hello world
NIL

> Thanks for your help,
> James
>

this is a link to a very good, completely on-line beginners tutorial.
http://psg.com/~dlamkins/sl/contents.html



Coby


--
(remove #\space "coby . beck @ opentechgroup . com")
From: Paul Rudin
Subject: Re: Hello World in Lisp
Date: 
Message-ID: <878zhw29sr.fsf@kerrera.scientia.com>
>>>>> "Coby" == Coby Beck <·····@mercury.bc.ca> writes:

 Coby> "Wonky" <······@northnetNOSPAMTHANKS.com.au> wrote in message
 Coby> ·············@nap-ns1.netconnect.net.au...

 >> Can someone post a Hello World lisp programme for me to see, and
 >> give a link to a manual where I can see functions and their params
 >> etc.
 >> 

 Coby> (defun hello (&optional (stream *standard-output*)) 
 Coby>        (format stream "Hello world"))


... or perhaps just:

  "Hello world"

does this count as a "program" (or even "programme")?








-- 
Clinton munitions Delta Force PLO domestic disruption ammunition Nazi
NSA $400 million in gold bullion Kennedy jihad Waco, Texas Serbian
Peking supercomputer
From: ·······@my-deja.com
Subject: Re: Hello World in Lisp
Date: 
Message-ID: <nm9vgl06bml.fsf@kindness.mit.edu>
Paul Rudin <··········@scientia.com> writes:

> ... or perhaps just:
> 
>   "Hello world"
> 
> does this count as a "program" (or even "programme")?

Absolutely yes!  One of the first things to un-learn coming from another
language is the expression/statement/function/program hierarchy required
for C or the expression/statement/method/object hierarchy required for
Java.  Everything is an expression.

Question: How much harder is it to learn CL if you learn Scheme first?
There's a very user-friendly tool called DrScheme that starts with
subsets of the language, so that unintentional use of advanced features
results in a newbie-friendly error message instead of unexpected
behavior or a "weird" message.  It has a debugger/stepper, and a UI that
looks/feels the same on Unix and Windows.  The original poster might
benefit from taking this route.

-- 
Bruce R. Lewis				http://brl.sourceforge.net/
I rarely read mail sent to ·······@my-deja.com
From: Wade Humeniuk
Subject: Re: Hello World in Lisp
Date: 
Message-ID: <9if9ek$1bc$1@news3.cadvision.com>
> Question: How much harder is it to learn CL if you learn Scheme first?
> There's a very user-friendly tool called DrScheme that starts with
> subsets of the language, so that unintentional use of advanced features
> results in a newbie-friendly error message instead of unexpected
> behavior or a "weird" message.  It has a debugger/stepper, and a UI that
> looks/feels the same on Unix and Windows.  The original poster might
> benefit from taking this route.

I learned Scheme first (MacScheme).  For me it did not make it harder to
learn CL, just as learning C++ did not make it harder.  What I found is that
my first CL programs used the comparable functions that scheme had.
Gradually I expanded my repertoire with what is available in CL.  I would
say it was a natural progression. An example would be packages.   I did not
start using packages until I was well into coding my first "real"
application.  Same for &key, &optional, hash tables, conditions, loop (like
it now, but started with do), macros, systems, ...

Looking back, even though I started with scheme I was really looking for the
capabilities of CL.

However learning CL first may make learning Scheme more difficult.  I would
not willingly go back.

Wade
From: Kent M Pitman
Subject: Re: Hello World in Lisp
Date: 
Message-ID: <sfwd778vix0.fsf@world.std.com>
Paul Rudin <··········@scientia.com> writes:

> >>>>> "Coby" == Coby Beck <·····@mercury.bc.ca> writes:
...
>  Coby> (defun hello (&optional (stream *standard-output*)) 
>  Coby>        (format stream "Hello world"))
> 
> 
> ... or perhaps just:
> 
>   "Hello world"
> 
> does this count as a "program" (or even "programme")?

It is a program, but it does no I/O.  It's fine interactively, but it's not
very spectacular if you build a .exe whose top-level driver is a functiont
that does 

 (defun hello-world () "hello world")

since you won't see the return value.

 (write-line "Hello, world.")

is probably (and rightly so) the most minimal hello world program.
From: Moritz Schulte
Subject: Re: Hello World in Lisp
Date: 
Message-ID: <871ynpdl42.fsf@gryffindor.sc>
"Wonky" <······@northnetNOSPAMTHANKS.com.au> writes:

> Are there any good tutorials on Lisp somewhere that I can read for
> free? I'm a student and have no money so I will need free stuff.

Have a look at 'Structure and Interpretation of Computer Programs'
(http://mitpress.mit.edu/sicp/sicp.html).

	moritz
-- 
Moritz Schulte <···@gmx.li> http://www.chaosdorf.de/moritz/
Debian/GNU supporter - http://www.debian.org/ http://www.gnu.org/
GPG fingerprint = 3A14 3923 15BE FD57 FC06  B501 0841 2D7B 6F98 4199
From: Gareth McCaughan
Subject: Re: Hello World in Lisp
Date: 
Message-ID: <slrn9kn3jd.3pj.Gareth.McCaughan@g.local>
"Wonky" wrote:

> Can someone post a Hello World lisp programme for me to see, and give a link
> to a manual where I can see functions and their params etc.

Various people have already done that. Here's a program that's
similar in length to some of those "Hello, World"s, but maybe
does something more interesting. At an interactive Lisp prompt,
try typing

    ((lambda (x) `(,x ',x)) '(lambda (x) `(,x ',x)))

and see what you get back. (Note: this is not guaranteed to
have the results I hope it will have, for boring reasons,
but it should certainly work if you're using either CMUCL
or CLISP. I haven't tried other implementations.)

Lisp is certainly not the only language in which you can
do this sort of thing, but it makes it easier than most.
And although the particular example above is useless,
it's closely related to one of the most important and
exciting things about Lisp: the way its macro system
(not to be confused with the vastly inferior thing of
the same name in C) allows you to write code that writes
code.

By the way, be careful to distinguish "'" (quote)
from "`" (backquote) in the code fragment above!

-- 
Gareth McCaughan  ················@pobox.com
.sig under construc
From: ROBcorp
Subject: Re: Hello World in Lisp
Date: 
Message-ID: <e6cfdd04.0107130332.fdec52c@posting.google.com>
················@pobox.com (Gareth McCaughan) wrote in message news:<·······························@g.local>...
> "Wonky" wrote:
> 
> > Can someone post a Hello World lisp programme for me to see, and give a link
> > to a manual where I can see functions and their params etc.
> 
> Various people have already done that. Here's a program that's
> similar in length to some of those "Hello, World"s, but maybe
> does something more interesting. At an interactive Lisp prompt,
> try typing
> 
>     ((lambda (x) `(,x ',x)) '(lambda (x) `(,x ',x)))
> 
> and see what you get back. (Note: this is not guaranteed to
> have the results I hope it will have, for boring reasons,
> but it should certainly work if you're using either CMUCL
> or CLISP. I haven't tried other implementations.)
> 
> Lisp is certainly not the only language in which you can
> do this sort of thing, but it makes it easier than most.
> And although the particular example above is useless,
> it's closely related to one of the most important and
> exciting things about Lisp: the way its macro system
> (not to be confused with the vastly inferior thing of
> the same name in C) allows you to write code that writes
> code.
> 
> By the way, be careful to distinguish "'" (quote)
> from "`" (backquote) in the code fragment above!

A Lisp quine!  I stumbled onto quines while surfing the web one day at
work and came upon this website:
http://www.catseye.mb.ca/esoteric/index.html

Interesting stuff.

Rob
From: Kaz Kylheku
Subject: Re: Hello World in Lisp
Date: 
Message-ID: <bHF37.690968$166.14277911@news1.rdc1.bc.home.com>
In article <···························@posting.google.com>, ROBcorp wrote:
>················@pobox.com (Gareth McCaughan) wrote in message news:<·······························@g.local>...
>> "Wonky" wrote:
>> 
>> Various people have already done that. Here's a program that's
>> similar in length to some of those "Hello, World"s, but maybe
>> does something more interesting. At an interactive Lisp prompt,
>> try typing
>> 
>>     ((lambda (x) `(,x ',x)) '(lambda (x) `(,x ',x)))

[ snip ]

>
>A Lisp quine!  I stumbled onto quines while surfing the web one day at
>work and came upon this website:
>http://www.catseye.mb.ca/esoteric/index.html

It's one of the first things I look for when investigating a new
language, because it can reveal something about that language. ;)

Note that the above classic ``quine'', though clever, is a somewhat of
a cheat: it assumes you are working interactively, in which case results
are echoed back by the listener, even though no output statements appear
in the program.

If such cheating is allowed, one can make a shorter quine:

	0 

A true quine actually not only computes its own representation, but
also manages to produce it as explicitly programmed output. (Of course,
computing your own representation in a clever way is not without merit!)
From: Kent M Pitman
Subject: Re: Hello World in Lisp
Date: 
Message-ID: <sfwhewgvi2i.fsf@world.std.com>
···@ashi.footprints.net (Kaz Kylheku) writes:

> A true quine actually not only computes its own representation, but
> also manages to produce it as explicitly programmed output. (Of course,
> computing your own representation in a clever way is not without merit!)

The classical one is the one by Michael McMahon from sometime around
the late 70's or early 80's (I have the exact date filed somewhere away).
I don't have the message handy exactly now but can probably reproduce
it from memory since once you see it, it's pretty obvious.
I'll leave it to someone else to test and make sure I didn't screw up
theq quotes.

 (let ((let '`(let ((let ',let)) ,let)))
   `(let ((let ',let)) ,let))

This one is better than the lambda one you quoted, I think, because it 
uses only one visible name.
From: Gareth McCaughan
Subject: Re: Hello World in Lisp
Date: 
Message-ID: <slrn9kv257.v9.Gareth.McCaughan@g.local>
Kent Pitman wrote:

> The classical one is the one by Michael McMahon from sometime around
> the late 70's or early 80's (I have the exact date filed somewhere away).
> I don't have the message handy exactly now but can probably reproduce
> it from memory since once you see it, it's pretty obvious.
> I'll leave it to someone else to test and make sure I didn't screw up
> theq quotes.
> 
>  (let ((let '`(let ((let ',let)) ,let)))
>    `(let ((let ',let)) ,let))
> 
> This one is better than the lambda one you quoted, I think, because it 
> uses only one visible name.

Astonishing, and beautiful. Thanks. I'm not sure I'd
describe it as "pretty obvious" even once seen. :-)

-- 
Gareth McCaughan  ················@pobox.com
.sig under construc
From: Kent M Pitman
Subject: Re: Hello World in Lisp
Date: 
Message-ID: <sfw7kxcwdp6.fsf@world.std.com>
················@pobox.com (Gareth McCaughan) writes:

> Kent Pitman wrote:
> 
> > The classical one is the one by Michael McMahon from sometime around
> > the late 70's or early 80's (I have the exact date filed somewhere away).
> > I don't have the message handy exactly now but can probably reproduce
> > it from memory since once you see it, it's pretty obvious.
> > I'll leave it to someone else to test and make sure I didn't screw up
> > theq quotes.
> > 
> >  (let ((let '`(let ((let ',let)) ,let)))
> >    `(let ((let ',let)) ,let))
> > 
> > This one is better than the lambda one you quoted, I think, because it 
> > uses only one visible name.
> 
> Astonishing, and beautiful. Thanks. I'm not sure I'd
> describe it as "pretty obvious" even once seen. :-)

Maybe "obvious once gotten" if not "obvious once seen".
Here, let me explain.  It works by constraint.

Once you know the key is using LET, you know that the form of the result
is:

 (LET ((LET something))
   something)

You assume that one of the two somethings has to be quoted so it can be
replicated.  So it has to be

 (LET ((LET 'something))
   something)

If you also remember the other fact that the inner form works by backquote,
you're pretty close to home free because you know it has to have the same 
shape as what you've done so far.

 (LET ((LET 'something))
   `(LET ((LET 'something))
      ...))

Now you know the ... has to be something that can rebuild the body of the
let you've just written so that means it has to be the same as the something
so you know you can use ,LET for that, and that all you have to do now is
copy the bottom let into the binding.

 (LET ((LET '`(LET ((LET 'something)) ...)))
   `(LET ((LET 'something)) ,LET))

Since the body matches the binding, the something is obviously ,LET also:

 (LET ((LET '`(LET ((LET ',LET)) ...)))
   `(LET ((LET ',LET)) ,LET))

and of course the body of the quoted insert has to match the body of the
other thing int he body

 (LET ((LET '`(LET ((LET ',LET)) ,LET)))
   `(LET ((LET ',LET)) ,LET))

And you're there.  So you don't have to remember the form, just  that it
involves LET and that it involves backquote and that the trick is the
replication of one part twice.  Everything else just follows from that.
From: Thomas F. Burdick
Subject: Re: Hello World in Lisp
Date: 
Message-ID: <xcvvgkwb89h.fsf@famine.OCF.Berkeley.EDU>
Kent M Pitman <······@world.std.com> writes:

> ················@pobox.com (Gareth McCaughan) writes:
> 
> > Kent Pitman wrote:
> > 
> > > The classical one is the one by Michael McMahon from sometime around
> > > the late 70's or early 80's (I have the exact date filed somewhere away).
> > > I don't have the message handy exactly now but can probably reproduce
> > > it from memory since once you see it, it's pretty obvious.
> > > I'll leave it to someone else to test and make sure I didn't screw up
> > > theq quotes.
> > > 
> > >  (let ((let '`(let ((let ',let)) ,let)))
> > >    `(let ((let ',let)) ,let))
> > > 
> > > This one is better than the lambda one you quoted, I think, because it 
> > > uses only one visible name.
> > 
> > Astonishing, and beautiful. Thanks. I'm not sure I'd
> > describe it as "pretty obvious" even once seen. :-)
> 
> Maybe "obvious once gotten" if not "obvious once seen".
> Here, let me explain.  It works by constraint.

Personally, the first time I saw that (similarly formatted) I had
trouble understanding it until I ran it through the pritty-printer:
   * (pprint '(let ((let '`(let ((let ',let)) ,let)))
                `(let ((let ',let)) ,let)))
   (LET ((LET
          '`(LET ((LET ',LET))
              ,LET)))
     `(LET ((LET ',LET))
        ,LET))
From: Gareth McCaughan
Subject: Re: Hello World in Lisp
Date: 
Message-ID: <slrn9kv22l.v9.Gareth.McCaughan@g.local>
Kaz Kylheku wrote:

[I wrote:]
> >>     ((lambda (x) `(,x ',x)) '(lambda (x) `(,x ',x)))
...
> Note that the above classic ``quine'', though clever, is a somewhat of
> a cheat: it assumes you are working interactively, in which case results
> are echoed back by the listener, even though no output statements appear
> in the program.

Absolutely true, but I don't think it's fair to equate it
with self-evaluating things like "0" as Kaz then goes on
to do. It's easy but uninteresting to turn the above into
an "honest" quine: the basic structure is there.

(print ((lambda (x) `(print (,x ',x))) '(lambda (x) `(print (,x ',x)))))

will do, modulo trivia about case and newlines.

-- 
Gareth McCaughan  ················@pobox.com
.sig under construc
From: Paolo Amoroso
Subject: Re: Hello World in Lisp
Date: 
Message-ID: <JnhMO1DJfgnPKPoIcNi90T0g25RW@4ax.com>
On Tue, 10 Jul 2001 16:17:33 +1000, "Wonky"
<······@northnetNOSPAMTHANKS.com.au> wrote:

> Are there any good tutorials on Lisp somewhere that I can read for free? I'm

Here are a few more resources besides the ones mentioned by others in this
thread:

  Common Lisp: A Gentle Introduction to Symbolic Computation
  http://www.cs.cmu.edu:80/afs/cs.cmu.edu/user/dst/www/LispBook/index.html
  (a bit out of date but still useful)

  Basic Lisp Techniques
  http://www.franz.com/resources/educational_resources/cooper.book.pdf

  CLiki
  http://ww.telent.net/cliki


> a student and have no money so I will need free stuff.

You may be able to find Peter Norvig's ("Paradigms of Artificial
Intelligence Programming - Case Studies in Common Lisp") or Paul Graham's
("ANSI Common Lisp", "On Lisp") books at your school's library.


> Can someone post a Hello World lisp programme for me to see, and give a link

Remember that RMS told you that you don't know half of what programming
languages can do until you have learnt Lisp or Scheme, and you wondered
what he was referring to. If so, a "Hello world"-style program is unlikely
to shed much light on this. The resources mentioned above provide better
examples.


Paolo
-- 
EncyCMUCLopedia * Extensive collection of CMU Common Lisp documentation
http://cvs2.cons.org:8000/cmucl/doc/EncyCMUCLopedia/
From: ········@hex.net
Subject: Re: Hello World in Lisp
Date: 
Message-ID: <AO%27.23989$as2.1316737@news20.bellglobal.com>
Paolo Amoroso <·······@mclink.it> writes:
> On Tue, 10 Jul 2001 16:17:33 +1000, "Wonky"
> <······@northnetNOSPAMTHANKS.com.au> wrote:

>> Are there any good tutorials on Lisp somewhere that I can read for
>> free? I'm

> Here are a few more resources besides the ones mentioned by others in this
> thread:
> 
>   Common Lisp: A Gentle Introduction to Symbolic Computation
>   http://www.cs.cmu.edu:80/afs/cs.cmu.edu/user/dst/www/LispBook/index.html
>   (a bit out of date but still useful)
> 
>   Basic Lisp Techniques
>   http://www.franz.com/resources/educational_resources/cooper.book.pdf

>   CLiki
>   http://ww.telent.net/cliki

Good choices; there's good stuff there.

> > a student and have no money so I will need free stuff.

> You may be able to find Peter Norvig's ("Paradigms of Artificial
> Intelligence Programming - Case Studies in Common Lisp") or Paul
> Graham's ("ANSI Common Lisp", "On Lisp") books at your school's
> library.

PAIP is excellent; "On Lisp" is probably a bit more advanced than is
appropriate at this point for the gentle poster.

>> Can someone post a Hello World lisp programme for me to see, and
>> give a link

> Remember that RMS told you that you don't know half of what
> programming languages can do until you have learnt Lisp or Scheme,
> and you wondered what he was referring to. If so, a "Hello
> world"-style program is unlikely to shed much light on this. The
> resources mentioned above provide better examples.

Personally, I'd go with:
   (format t "Hello, World!~%")

"Hello, World!" is a very basic program whose primary purpose should
_not_ be to figure out how a programming language works, but rather to
figure out how to work with the language's "environment."

The C version tends to demonstrate:
 -> You need to include library references via #include;
 -> You compile the program, perhaps linking libraries, and generating
    an executable program;
 -> Then there's some way of invoking that program.

- For Lisp, you'd set up a file containing the one liner:
      (format t "Hello, World!~%")

- Save it as either "hello.lsp" or "hello.lisp"

- Depending on the Lisp compiler, it may be meaningful to compile it
  via (compile-file "hello.lsp"), or to do this from command line
  (e.g. the command "clisp -c hello.lsp")

- To invoke it, you might start the Lisp environment, and do (load
  "hello"), to load it; alternatively, there may be a way to invoke it
  from the command line as with "clisp hello.fas" or "clisp
  hello.lsp".

The bulk of these details are implementation-specific; where, with C
programs, there's a lot of common convention for stuff like: 
   "cc -O -c test.c -o test.o"
there is _not_ the same degree of "unofficial standardization" with
Lisp implementations.

In effect, the "Hello, World!" program has _nothing_ to do with
language, and _everything_ to do with how the environment around the
language works.
-- 
(reverse (concatenate 'string ····················@" "454aa"))
http://vip.hyperusa.com/~cbbrowne/nonrdbms.html
Rules  of  the  Evil Overlord  #95.  "My  dungeon  will have  its  own
qualified  medical  staff complete  with  bodyguards.  That  way if  a
prisoner  becomes  sick and  his  cellmate  tells  the guard  it's  an
emergency, the  guard will fetch a  trauma team instead  of opening up
the cell for a look." <http://www.eviloverlord.com/>
From: Kent M Pitman
Subject: Re: Hello World in Lisp
Date: 
Message-ID: <sfwzoab9wuy.fsf@world.std.com>
········@hex.net writes:

> Personally, I'd go with:
>    (format t "Hello, World!~%")

Style:

Always start with ~& when you don't know the state of the I/O stream.
From: Paolo Amoroso
Subject: Re: Hello World in Lisp
Date: 
Message-ID: <jK1NO9HrJG1NSVLHH7RazDhf+zVf@4ax.com>
On Wed, 11 Jul 2001 17:13:04 GMT, ········@hex.net wrote:

> In effect, the "Hello, World!" program has _nothing_ to do with
> language, and _everything_ to do with how the environment around the
> language works.

Yes. But a novice may put too much emphasis on "Hello world"-style
programs, compare delivered binary sizes and startup times, confuse the
development/runtime environments with the language, and potentially draw
the wrong conclusions on the language itself.


Paolo
-- 
EncyCMUCLopedia * Extensive collection of CMU Common Lisp documentation
http://cvs2.cons.org:8000/cmucl/doc/EncyCMUCLopedia/
From: Wonky
Subject: Re: Hello World in Lisp- Thanks everybody!
Date: 
Message-ID: <3b4c166a@nap-ns1.netconnect.net.au>
I've found that book on MIT Press website and I'm reading through it now,
and I've downloaded MIT Scheme to practice with.

Thanks everybody!


"Wonky" <······@northnetNOSPAMTHANKS.com.au> wrote in message
·············@nap-ns1.netconnect.net.au...
> Hello Lispers,
>
> rms told me that I don't know half of what programming languages can do
> until I've learnt lisp or scheme. I wonder what he was referring to? I'm
> curious. I gotta learn lisp or scheme, I'm thinking scheme is easier since
> it's cut-down lisp? Hmm, anyway, I think I'll go the whole way and learn
> lisp.
>
> Are there any good tutorials on Lisp somewhere that I can read for free?
I'm
> a student and have no money so I will need free stuff.
>
> Also, how does one invoke a lisp compiler or interpreter, on Linux and on
> Windows? What is the best Lisp implementation on Linux? (Must be free!)
>
> Can someone post a Hello World lisp programme for me to see, and give a
link
> to a manual where I can see functions and their params etc.
>
> Thanks for your help,
> James
>
>
>
From: Larry Loen
Subject: Re: Hello World in Lisp
Date: 
Message-ID: <3B545188.869CD82F@rchland.vnet.ibm.com>
Wonky wrote:

> Also, how does one invoke a lisp compiler or interpreter, on Linux and on
> Windows? What is the best Lisp implementation on Linux? (Must be free!)

If "free" is your criteria, I can recommend CLISP (see sourceforge to get it).  I wanted the stuff that came with Linux to work, too, but they all
seem sufficiently nonstandard that none of the tutorials work with them.


Larry