Re: [ILUG] LISP & Prologue

From: Smelly Pooh (plop at domain redbrick.dcu.ie)
Date: Wed 02 Feb 2000 - 05:43:29 GMT


In reply to Ross Lynch's flatulent wordings,
> Hey all,
>
> Just a few _basic_ questions about LISP & Prologue...
>
> Which is easier first off?

Lisp by a long shot, it is made to be a general purpose language whereas
Prolog is limited to logic programming

> Also, how are they in terms of easyness and comparibility with respect to C?

Prolog is nothing like C, one defines logical rules at the start of a prolog
program and then use predicates to test values with those rules. Lisp is like
C in that their both procedural languages, however Lisp is a functional
language (functional language not meaning a language that uses a lot of
functions, but a language that treats functions as values, relies on very few
side effects such as variable assignment etc., check the functional languages
FAQ at www.faqs.org/faqs/func-lang-faq/index.html) whereas C is an imperative
language, both demand different programming styles but do the same things.

> And lastly, _is_ Linux the best
> environment for programming 'em in? (unbiased answers expected ;)).

Unix and its clones and derivatives to be fairer. There are 2 common dialects
of Lisp, they would be common Lisp which is supposedly the most common
(although there are only 3 free Unix interpretters for it, GCL, CMUCL and
another I can't remember) and there's Scheme which is the dialect I would
recommend, it's much smaller and cleaner than Common Lisp (CL was defined by
an ANSI committee and has a lot of useless old crud to keep venders happy,
it's also nowhere near as fun or cleverly put together as Scheme). There are
also more Scheme compilers and interpretters than you can shake a finger at,
double digits free on unix alone, about 7 or 8 that run on Java on top of that
(incidentally I'll be adding a 9th for my 4th year project). If you're
looking for an interpretter you'd probably want to try out GUILE (GNU's
Ubiquitous Intelligent Language for Extension), the documentation is very
skimpy but the GNU project intends to use it for everything requiring
extensions including from what I hear, emacs 21 (no affiliation with xemacs
21). Check out Rscheme if you want an object oriented interpretter with
decent documentation, Bigloo for a handy compiler, Stalin if you want an
optimized compiler (supposedly produces code that comes close to hand coded C
in speed), scsh for a scripting version of Scheme, there are loads loads more,
you could find them a lot of them at freshmeat.net, just search for scheme.

People have mentioned that stuff like emacs and sawmill use Lisp, I'd also
point out that Gimp Script-FU uses SIOD embedded Scheme and AutoCad uses
AutoLisp.

If you actually want to learn Scheme have a quick look at

http://www.cs.rice.edu/~dorai/t-y-scheme/t-y-scheme.html
http://www.scheme.com/tspl2d/



This archive was generated by hypermail 2.1.6 : Thu 06 Feb 2003 - 13:05:20 GMT