From: Jeffrey S. Sharp
Subject: General Lisp Questions (Revised)
Date: 
Message-ID: <h%ax4.3213$fE5.13748@typhoon2.kc.rr.com>
[Please pay no attention to the earlier post with this
subject; I screwed it up royally...]

I am evaluating programming languages for implementing
a large project in the industrial security industry.
I've recently started learning Common Lisp for personal
enjoyment, and it seems like the next best thing to sex.
I have a few general questions:

* What interfaces exist to modern GUI toolkits?  Qt or
Gtk would be nice.

* What interfaces exist to C/C++ shared libs in general?

* What interfaces exist to networking and databases?

* Can you make system calls from Lisp?

* Can Lisp be low-level enough to do hardware control?

* Can Lisp programs run on low-powered (386) embedded
boards?

Thanks in advance for any assistance.

--
===============================
Jeffrey S. Sharp   (XorAxAx)
jss at subatomix dot com

-----BEGIN GEEK CODE BLOCK-----
Version 3.12
GCS/IT/MU ··@ s-:+ a21 C++(++++) UBL+(+++$)> P L+(+++$)>
E+> W++ N+(++) o? K? w++$> !O M(-) !V PS+ PE Y PGP- t+
5 X+ R(+) tv+ b+ DI++(+++) G++ e> h--- r+++ y+++
------END GEEK CODE BLOCK------

From: Thom Goodsell
Subject: Re: General Lisp Questions (Revised)
Date: 
Message-ID: <38C57FDA.E64B546D@cra.com>
Jeffrey,

Here's my best shot at your answers, someone else might know better.

"Jeffrey S. Sharp" wrote:
> * What interfaces exist to modern GUI toolkits?  Qt or
> Gtk would be nice.

I stumbled across a gtk-lisp binding somewhere (I might be able to find
it again), but it was "unreleased" and I couldn't get it to compile
(though I didn't try very hard).

There are several Lisp only toolkits around, most implemented on top of
CLX (the Common Lisp X interface).  Garnet and CLUE seem to be popular
(though Garnet is not longer actively maintained).  I've never gotten
either to work, but I'm not exactly running a mainstream lisp (CLISP on
Linux) and I haven't tried very hard.

Check out:
http://www.lisp.org/table/tools.htm#windows

If you find one (especially to gtk), let me know.

> * What interfaces exist to C/C++ shared libs in general?

This is vendor/implementation specific.  I know that Allegro has a very
complete foreign function interface and I presume that all other
commercial Lisps do as well.  Since many non-commercial versions are
written in C, they usually do, too.  The code likely won't be portable,
however.

> * What interfaces exist to networking and databases?

Networking is semi-implementation specific.  Every version I've ever
worked with had some way to generate a stream object on a socket
connection, but it's not in the standard, so again, it won't be
portable.

Same goes for databases (starting to sense a theme here?).  I know that
Allegro and LispWorks both have ODBC support. 

> * Can you make system calls from Lisp?

Nope.  Well . . . it depends on the implementation.  :)  Allegro
supports many system calls natively and, I think, allows you to wrap any
shell command in a lisp form.  CLISP supports some calls, too.  I'm
positive LispWorks does, as well.

> * Can Lisp be low-level enough to do hardware control?

AFAIK, no.  Then again, browsing the posts here I found some references
to serial/parallel port control, so maybe so.

> * Can Lisp programs run on low-powered (386) embedded
> boards?

I haven't got a clue, though my first bet would be . . . depends on the
implementation.
From: Rob Linwood
Subject: Re: General Lisp Questions (Revised)
Date: 
Message-ID: <8EF0C3C93rcl211is9nyuedu@128.122.253.77>
···@cra.com (Thom Goodsell) wrote in <·················@cra.com>:

>
>I stumbled across a gtk-lisp binding somewhere (I might be able to find
>it again), but it was "unreleased" and I couldn't get it to compile
>(though I didn't try very hard).

It's located at http://www.uni-karlsruhe.de/~unk6/ which is also home to 
the Closure web browser, among other things.  It looks like it's for Gtk 
1.1, if that matters.

-- 
Rob Linwood -- ···@auntfloyd.com -- ······@is9.nyu.edu
http://www.auntfloyd.com/ (down at the moment, sorry)
From: Hannu Koivisto
Subject: Re: General Lisp Questions (Revised)
Date: 
Message-ID: <87og8qtf3x.fsf@senstation.vvf.fi>
······@is9.nyu.edu (Rob Linwood) writes:

| It's located at http://www.uni-karlsruhe.de/~unk6/ which is also home to 
| the Closure web browser, among other things.  It looks like it's for Gtk 
| 1.1, if that matters.

Here's another one for 1.2: <URL:ftp://ftp.sol.no/users/e/espejohn/>.
This is, IMHO, more solid than the one you mention.  One may have
to recompile CMUCL with "-Xlinker --export-dynamic" added to
OS_LINK_FLAGS in Config.linux and Config.linux_gencgc in src/lisp/,
though.  There's at least one little problem with this (it should
be modified not to fiddle with the top-level repl), but that should
be fixable and it may not even be a problem for all uses.

-- 
Hannu
From: Marco Antoniotti
Subject: Re: General Lisp Questions (Revised)
Date: 
Message-ID: <lw4sahscnr.fsf@parades.rm.cnr.it>
Hannu Koivisto <·····@iki.fi.ns> writes:

> ······@is9.nyu.edu (Rob Linwood) writes:
> 
> | It's located at http://www.uni-karlsruhe.de/~unk6/ which is also home to 
> | the Closure web browser, among other things.  It looks like it's for Gtk 
> | 1.1, if that matters.
> 
> Here's another one for 1.2: <URL:ftp://ftp.sol.no/users/e/espejohn/>.
> This is, IMHO, more solid than the one you mention.  One may have
> to recompile CMUCL with "-Xlinker --export-dynamic" added to
> OS_LINK_FLAGS in Config.linux and Config.linux_gencgc in src/lisp/,
> though.  There's at least one little problem with this (it should
> be modified not to fiddle with the top-level repl), but that should
> be fixable and it may not even be a problem for all uses.

From a quick perusal of the code, I believe that the problem with the
re-definition of the REPL could be easily done away with, now that the
GTK guts are a little more exposed.

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: Espen S Johnsen
Subject: Re: General Lisp Questions (Revised)
Date: 
Message-ID: <x7u2ic0zql.fsf@online.no>
Hannu Koivisto <·····@iki.fi.ns> writes:

> Here's another one for 1.2: <URL:ftp://ftp.sol.no/users/e/espejohn/>.

Unfornately my ISP has closed anonymous FTP so this URL is no longer
valid. I will try to make it available throught HTTP in a few days. In
the meanwhile I could mail it to anyone interested.

> though.  There's at least one little problem with this (it should
> be modified not to fiddle with the top-level repl), but that should
> be fixable and it may not even be a problem for all uses.

Could not agree more. This was just a quick hack to enable one to run
GTK main loop without blocking the toplevel. I think the solution is to
use threads (which I have not looked into yet) or the CMUCL serve-event
extension.

-- 
Espen
From: Marco Antoniotti
Subject: Re: General Lisp Questions (Revised)
Date: 
Message-ID: <lwaek3l02p.fsf@parades.rm.cnr.it>
Espen S Johnsen <········@online.no> writes:

> Hannu Koivisto <·····@iki.fi.ns> writes:
> 
> > Here's another one for 1.2: <URL:ftp://ftp.sol.no/users/e/espejohn/>.
> 
> Unfornately my ISP has closed anonymous FTP so this URL is no longer
> valid. I will try to make it available throught HTTP in a few days. In
> the meanwhile I could mail it to anyone interested.
> 
> > though.  There's at least one little problem with this (it should
> > be modified not to fiddle with the top-level repl), but that should
> > be fixable and it may not even be a problem for all uses.
> 
> Could not agree more. This was just a quick hack to enable one to run
> GTK main loop without blocking the toplevel. I think the solution is to
> use threads (which I have not looked into yet) or the CMUCL serve-event
> extension.

In CMUCL the SERVE-EVENT facility is the way to go, and it is really
easy once you get the hang of it.  What prevented this solution in the
past was the fact that the gdk_display (maybe the name is incorrect)
was declared 'static'.

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: Espen S Johnsen
Subject: Gtk bindings for CMUCL/CLISP
Date: 
Message-ID: <x7g0ttp8ev.fsf_-_@online.no>
I writes:

> Hannu Koivisto <·····@iki.fi.ns> writes:
> 
> > Here's another one for 1.2: <URL:ftp://ftp.sol.no/users/e/espejohn/>.
> 
> Unfornately my ISP has closed anonymous FTP so this URL is no longer
> valid. I will try to make it available throught HTTP in a few days. In
> the meanwhile I could mail it to anyone interested.

It is now avaible at <URL:http://home.sol.no/~espejohn>. To avoid confuison
with Gilbert Baumann's package with the same name, I have changed the name
to clg. Unfornately I will not be able to answer any messages or mails
regarding this package for the next two months.

-- 
Espen
From: Reini Urban
Subject: Re: General Lisp Questions (Revised)
Date: 
Message-ID: <38c80e3c.35843179@judy>
Thom Goodsell wrote:
>> * What interfaces exist to C/C++ shared libs in general?
>
>This is vendor/implementation specific.  I know that Allegro has a very
>complete foreign function interface and I presume that all other
>commercial Lisps do as well.  Since many non-commercial versions are
>written in C, they usually do, too.  The code likely won't be portable,
>however.

see http://xarch.tu-graz.ac.at/autocad/lisp/ffis.html 
(though not quite finished yet)

clocc has an example for cross-platform calls in three packages: 
acl, mcl and lww.
http://wilson.ai.mit.edu/cl-http/contributions/pmeurer/sql/odbc/odbc-ff-interface.lisp

for the three others: cmucl, clisp, corman, I'd like to see clocc
versions as well (as only published sample with an attempt to collect
most versions). I'll check this out.

there was also a discussion on the X3J13 list last year about a common
FFI framework (amongst other useful and similar things).

>> * Can you make system calls from Lisp?
>
>Nope.  Well . . . it depends on the implementation.  :)  Allegro
>supports many system calls natively and, I think, allows you to wrap any
>shell command in a lisp form.  CLISP supports some calls, too.  I'm
>positive LispWorks does, as well.

yes, do it with the FFI or by spawning a shell (or any other program) 
in any lisp.

--
Reini Urban
http://xarch.tu-graz.ac.at/autocad/news/faq/autolisp.html
From: Chris Double
Subject: Re: General Lisp Questions (Revised)
Date: 
Message-ID: <wkwvnb4dag.fsf@double.co.nz>
······@x-ray.at (Reini Urban) writes:

> for the three others: cmucl, clisp, corman, I'd like to see clocc
> versions as well (as only published sample with an attempt to
> collect most versions). I'll check this out.

A version of the cross platform ffi used in Paul Meurer's SQL library
for Corman Lisp is available at http://www.double.co.nz/cl in the
archive containing the Corman compatible version of the SQL library.

What is the clocc version you mention?

Chris.
-- 
http://www.double.co.nz/cl
From: Paolo Amoroso
Subject: Re: General Lisp Questions (Revised)
Date: 
Message-ID: <RyrJOHfrZ5zpE51V+fKNX8Hk+pB9@4ax.com>
On 10 Mar 2000 18:14:31 +1300, Chris Double <·····@double.co.nz> wrote:

> What is the clocc version you mention?

  CLOCC - Common Lisp Open Code Collection
  http://clocc.sourceforge.net/


Paolo
-- 
EncyCMUCLopedia * Extensive collection of CMU Common Lisp documentation
http://cvs2.cons.org:8000/cmucl/doc/EncyCMUCLopedia/