From: Ahrimanes Belial
Subject: Stupid Question..
Date: 
Message-ID: <f1kGOPQOZinB54Yq0PqTQSPRRhOA@4ax.com>
Hi,

Stupid question, please bear with me. You can make executable files
out of a lisp program correct? I'm reading some tutorials on lisp,
trying to pick some up to get started, and most say that is is an
interpreter language, but isn't that emacs web browser written in
lisp? how do they compile the file into an exe? again, sorry for the
ignorance, just an 11th-grader trying to pick up a new hobby :)

dave nard

From: Robert Monfera
Subject: Re: Stupid Question..
Date: 
Message-ID: <380683F2.B04545E3@fisec.com>
Ahrimanes Belial wrote:
> You can make executable files
> out of a lisp program correct? 

Yes, depending on which implementation you are using.  You could check
out the implementations here:
http://www.elwoodcorp.com/alu/table/systems.htm

Normally you should not be concerned about generating .exe-s, but
instead try to learn Common Lisp first.

> I'm reading some tutorials on lisp,
> trying to pick some up to get started, and most say that is is an
> interpreter language,

You may have some obsolete books or have read misleading statements. 
These days Common Lisp is almost always compiled.  Note that .exe
generation is not necessary to get the performance benefits of
compilation, you can compile function by function.

> but isn't that emacs web browser written in
> lisp? 

Yes, but that works atop of Emacs, which uses a quite old and
non-standard version of Lisp.  These days modern applications are mostly
written in Common Lisp (amongst lisp applications, that is).

For lisp materials, check out
http://www.elwoodcorp.com/alu/table/contents.htm

Robert
From: Gareth McCaughan
Subject: Re: Stupid Question..
Date: 
Message-ID: <86bta1h5qw.fsf@g.local>
Ahrimanes Belial wrote:

> Stupid question, please bear with me. You can make executable files
> out of a lisp program correct? I'm reading some tutorials on lisp,
> trying to pick some up to get started, and most say that is is an
> interpreter language, but isn't that emacs web browser written in
> lisp? how do they compile the file into an exe? again, sorry for the
> ignorance, just an 11th-grader trying to pick up a new hobby :)

If you have any tutorials saying "Lisp is an interpreted language",
throw them away. A Lisp system doesn't have to have an interpreter
at all, and this fact has been well known for long enough that any
tutorial claiming otherwise is either (1) written long enough ago
to be out of date, (2) written by someone with only unreliable
second-hand knowledge, or (3) just plain misleading. Lisp systems
*are* supposed to be *interactive*, but that's not the same thing
at all.

Some Lisp systems let you make "standalone" executables. Some
don't. (Some of the ones that do produce very large executables,
which might or might not be a problem.)

Emacs is written partly in (a very nasty dialect of) Lisp, and
partly in C. One of the bits written in C is a Lisp interpreter,
which executes the Lisp. (Actually, most of the Lisp code a
typical Emacs runs isn't exactly interpreted; it's been through
a "byte-compiler", which turns it into a sort of intermediate
code somewhere in between source and machine code.)

Most Common Lisp[1] systems that produce standalone executables
do so in a less unsatisfactory way; what they produce is code
that can be executed natively by your CPU (hence, much faster
than anything written in emacs lisp is likely to be).

  [1] Common Lisp is probably the most important modern dialect
      of Lisp. There are several good implementations available,
      some free, some commercial. Other notable dialects:
      Scheme (small, elegant, lots of mutually incompatible
      implementations, an excellent teaching language but
      not so great for "real-world" applications; Emacs lisp
      (only two implementations, rather old-fashioned, both
      implementations are rather slow); Autolisp (exists only
      inside AutoCAD, a CAD package.

Just out of curiosity: why do you want to produce standalone
executables in Lisp?

-- 
Gareth McCaughan  ················@pobox.com
sig under construction
From: Ahrimanes Belial
Subject: Re: Stupid Question..
Date: 
Message-ID: <zJ8GOCP+azyRRqJtMNLSdO=1IUUC@4ax.com>
Thanks for the replies, they were very helpful :) Why do I want to
make an executable? I guess mainly because when I learned vb and vc++,
everythign I wrote, I compiled into an exe...and to do any other way
is just sort of native to me :) I will focus first on learning the
actual language, but I just have that hangup that if I can't compile
it to an exe, its not a true program..I dont' know I'm not saying what
I want to say correctly, its late and I've just spent 2 hours on trig
so my brain is fried :) but thanks again for the replies.

also, these tutorials I have are kinda crappy..can anyone recommend a
good tutorial? I am curently using Corman Lisp, mainly because of my
budget (nil).

Thanks
dave nard
From: Andrew Cooke
Subject: Re: Stupid Question..
Date: 
Message-ID: <7u6p53$53h$1@nnrp1.deja.com>
In article <····························@4ax.com>,
  ···········@hotmail.com wrote:
> also, these tutorials I have are kinda crappy..can anyone recommend a
> good tutorial? I am curently using Corman Lisp, mainly because of my
> budget (nil).

Check out www.alu.org - they include pointers to free (online)
tutorials.  You'll also want to download either "common lisp the
language" or the "hyperspec" or both as language references (again, info
on that site).

If your nil budget grows to the point where you can afford a book (or
have a library nearby) then Norvig's "paradigms of ai - case studies in
common lisp" is interesting (if you're keen and don't mind asking
questions here it even contains enough introductory material to start
programming) and Graham's "on lisp" is supposed to be good (especially
about macros) - but I haven't got that yet.

Good luck - Lisp is nice (to me, coming from C/C++/Java/Python it's like
having a scripting language that is powerful enough to write large
programs in - great fun),

Andrew

PS The site also lists the free/low price lisps available.


Sent via Deja.com http://www.deja.com/
Before you buy.
From: William Deakin
Subject: Re: Stupid Question..
Date: 
Message-ID: <380702B8.C0129D8C@pindar.com>
Ahrimanes Belial wrote:

> these tutorials I have are kinda crappy..can anyone recommend a good
> tutorial? I am curently using Corman Lisp, mainly because of my budget
> (nil).

There are a number of good books that I would recommend (although I not
sure what that recomendation is worth :()

'ANSI Common Lisp' by Paul Graham;
'Paradigms of Artificial Intelligence Programming: Case Studies in Common
Lisp' by Peter Norvig;

For an introduction about the c.l. object system (CLOS) look at:
(although I'm not sure this is in print) 'Understanding CLOS: The Common
Lisp Object System' by Jo A Lawless and Molly M. Miller;
'Object Oriented Programming in Common Lisp, A Programmer's Guide to CLOS'
by Sonya Keene;

For reference there is:
www.harlequin.com/education/books/HyperSpec/FrontMatter/index.html (thank
you Kent!:)
'Common Lisp: The Language, second Edition' by Guy Steele;

More advanced, but highly recommended is:
'On Lisp: Advanced Techniques for Common Lisp' by Paul Graham;

Finally, one of the best books I have ever read (though it uses Scheme for
examples) is:
'Structure and Interpretation of Computer Programs, second edition' by
Abelson and Sussman.

As to compilers, as you speak of vc++, so I take it that you are running
under some MSWindows kind of stuff? (although I believe there is a vc++
port for Macintosh). This kind of information helps will help people make
some suggestions.

Anyway, look at the alu links and see what other people say about these
books or compilers. Also, if you are keen, I sure that you would
appreciated getting a birthday/chrimbo/pagan-festival-of-light... present
of one of these books ;)

Good Luck and Enjoy,

:) will

ps: There is not such thing as a stupid question. Only stupid answers.
From: Paolo Amoroso
Subject: Re: Stupid Question..
Date: 
Message-ID: <3808277c.1724309@news.mclink.it>
On Thu, 14 Oct 1999 23:34:28 -0400, Ahrimanes Belial
<···········@hotmail.com> wrote:

> also, these tutorials I have are kinda crappy..can anyone recommend a
> good tutorial? I am curently using Corman Lisp, mainly because of my
> budget (nil).

Check "Successful Lisp", which is compatible with your budget:

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

Have (de)fun,


Paolo
-- 
EncyCMUCLopedia * Extensive collection of CMU Common Lisp documentation
http://cvs2.cons.org:8000/cmucl/doc/EncyCMUCLopedia/
From: Roger Corman
Subject: Re: Stupid Question..
Date: 
Message-ID: <38077de4.1545986250@nntp.best.com>
On Thu, 14 Oct 1999 23:34:28 -0400, Ahrimanes Belial
<···········@hotmail.com> wrote:

>Thanks for the replies, they were very helpful :) Why do I want to
>make an executable? I guess mainly because when I learned vb and vc++,
>everythign I wrote, I compiled into an exe...and to do any other way
>is just sort of native to me :) I will focus first on learning the
>actual language, but I just have that hangup that if I can't compile
>it to an exe, its not a true program..I dont' know I'm not saying what
>I want to say correctly, its late and I've just spent 2 hours on trig
>so my brain is fried :) but thanks again for the replies.
>
>also, these tutorials I have are kinda crappy..can anyone recommend a
>good tutorial? I am curently using Corman Lisp, mainly because of my
>budget (nil).
>
>Thanks
>dave nard

Since you noted you are using Corman Lisp, and interested in compiling
executables, I just thought I would mention a feature in the new
version of Corman Lisp due out in the next few weeks.

It can compile a lisp application to a single file, which includes the
compiled lisp image, the kernel, and your code, as one .exe file. This
is a very fast operation (only takes a second or two) and the
resulting .exe for a small application is around 800k in size. This is
in contrast to Corman Lisp 1.3, which requires you distribute 3 files,
a small .exe, a 2 meg+ lisp image file, and the kernel dll.

Roger Corman
From: Chris Double
Subject: Re: Stupid Question..
Date: 
Message-ID: <wkr9iwsutl.fsf@double.co.nz>
Ahrimanes Belial <···········@hotmail.com> writes:

> also, these tutorials I have are kinda crappy..can anyone recommend a
> good tutorial? I am curently using Corman Lisp, mainly because of my
> budget (nil).

David Lamkins online book, Successful Lisp is excellent:
http://psg.com/~dlamkins/left/sl/sl.html

Answering a question from your prior post about making executables,
you can do this with Corman Lisp for Windows using 'save-application':

  (save-application "filename", #'function)

Where filename is the name of the executable file that you want and
function is the function to be executed when the user starts the
executable. This is contained in the documentation that ships with
Corman Lisp.

Chris.
-- 
http://www.double.co.nz/dylan