Subject: [clisp-list] Using CLISP as a scripting language

From: Andrew Topp <[email-masked]>
Date: Mon, 20 Aug 2001 14:45:59 -0400 (EDT)

I'm writing a game in C++, but I'd like to have Lisp scripting integrated
into it for the following functions:

Game Server: 
 - `command shell', and command scripting, some UI scripting.
 - Game object scripting
 - Config files

Client:
 - Much of the client's UI will be handled in Lisp, for a customizable
   L&F.

The game object scripting I'd like to be somewhat in the style of LPC.
Each source file is an object, public functions defined within that file
are available for other objects (using something similar to LPC's
call_other) and the underlying C++ class. It may be better/easier to
use CLOS, but I haven't looked into that much yet.

I'm in the middle of writing my own Lisp interpreter, but I noticed 
someone say something about embedding with CLISP on comp.lang.lisp.

I'm sure that CLISP would be able to do a better job, speed and efficiency 
wise, than any Lisp interpreter I produce. My own is stripped extremely
bare of functionality, still in its early buggy stages.

Could anyone please provide me with info, or where to get it, on embedding
with CLISP?

Secondly, I'm unable to get clisp.cons.org or www.cons.org. The router
at 165.113.22.149 goes into a loop with itself until TTL expires. Every 
comp with net access I've tried does this. Are there any mirrors?

Thirdly, I've already investigated and rejected:
 - siod
 - umb-scheme
 - MIT scheme
 - elisp
 - ECLS
 - VSLisp
 - ELK
 - GCL
 - Guile

   ..and a few others I can't recall, as a suitable embedded Lisp/Lisp-like
      system.

Thanks,
>> DeSigna.

optimist, n:
        A bagpiper with a beeper.

---

From: Dave <[email-masked]>
Date: Mon, 20 Aug 2001 01:26:06 -0600 (MDT)

>    ..and a few others I can't recall, as a suitable embedded Lisp/Lisp-like

Have you looked at librep (http://librep.sourceforge.net/)?

---

From: Sam Steingold <[email-masked]>
Date: 20 Aug 2001 09:57:18 -0400

> * In message <[email-masked]>
> * On the subject of "[clisp-list] Using CLISP as a scripting language"
> * Sent on Mon, 20 Aug 2001 14:45:59 -0400 (EDT)
> * Honorable Andrew Topp <[email-masked]> writes:
>
> I'm writing a game in C++, but I'd like to have Lisp scripting

I urge you to write the whole thing using CLOS and use the FFI to run
things which _have_ to be in C.
You will win on many accounts, mostly with automatic memory management,
interactive development (==> short cycle), and the power of CLOS.

Lisps (except for those which are designed to be embedded, like ECLS or
ELK which you have rejected already :-) have an unfortunate tendency of
thinking of themselves as being only the masters.  FFIs usually call
other languages, not allow Lisp to be called from them.
There is a good reason for that - you can easily embed assembly code in
C, but not vice versa (who would want to call C from assembly?), and
since Lisp is higher level than any other widely deployed language, you
would not want to call it from those other inferior beasts.

Thus I repeat my suggestion: use C/C++ to implement the system-level
functionality which have to be very fast, and do the main coding in
CLOS.  This is the right design path!

> at 165.113.22.149 goes into a loop with itself until TTL
> expires. Every comp with net access I've tried does this. Are there
> any mirrors?

cons.org is dead until further notice.
this is beyond our control.
please use clisp.sf.net for now.

> Thirdly, I've already investigated and rejected:

the list is impressive.
librep, guile and elisp have been successfully used as scripting
languages for large C programs, librep and guile having been designed
for that specific purpose.
I discourage you from using elisp and librep since they implement
non-standard dialects of Lisp.
I do not recommend guile either since the standard part is too tiny to
be usable for real programming and the extensions (object and package
systems) are non-standard.

Thus I repeat my suggestion - use CLOS for everything except for
speed-critical parts _after_ profiling.

-- 
Sam Steingold (http://www.podval.org/~sds)
Support Israel's right to defend herself! <http://www.i-charity.com/go/israel>
Read what the Arab leaders say to their people on <http://www.memri.org/>
There are two ways to write error-free programs; only the third one works.