[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Axiom-developer] Lisp portability

From: Waldek Hebisch
Subject: [Axiom-developer] Lisp portability
Date: Tue, 22 May 2007 04:54:38 +0200 (CEST)

In my private tree Axiom is nicely working on top of sbcl and clisp.
The remaining known problems are sockets and writeablep function.
Also, currently for clisp I need cl-fad library, which I consider
problematic.  Namely, cl-fad does not work with gcl, so for gcl
we need separate code.  We need only few functions from cl-fad,
to work around clisp weirdness (clisp makes strong distinction
between paths to files and paths to directories and refuses
to perform file operations on directories).  So my current plan
is to eliminate use of cl-fad and provide the needed functions
directly.  Related problem is performing operations on
directories -- to gain portability between Unix and Windows
I tried to use Lisp code.  But each Lisp is doing them
differently (and apparently some operations sometimes are missing).
So I got a maze of conditionals over Lisp implementations.
Looking at resulting code I feel that it is better to
call operationg system utilities and have just use 
conditionals to choose between Unix and Windows versions
of file utilities.

Concerning sockets, we need Unix domain sockets and select.  It
seems that clisp provide both, but to get Unix domain sockets
one needs version including rawsock module, which is not included
in default clisp configuration.  

sbcl offers sb-bsd-sockets which seem to have basic functions,
but I do not see select.

gcl documentation suggest that Unix domain sockets are unsupported.
Also, I see no traces of select.

There is "portable" cl-sockets library but the manual says it supports
Allegro CL, sbcl and cmucl.  The manual does not say anything about
Unix domain sockets or select.  The manual says that cl-sockets requires
UFFI, so presumably cl-sockets works on top of "portable" C library.

In short my finding is that portable Lisp sockets are a myth: all
implementations provide different interface and frequently miss
some essential services.  People who want portablity between Lisp
implementations interface to C. 

Given that it seems that most reasonable way for Axiom is to use
existiong C code.  There is are drawbacks: we need to interface to
C and typical Lisp implementation can only interface to shared
libraries via dlopen.  So we need to handle issues related to making
shared library.

But AFAICS we will need C interface anyway, so we need to resolve
problems of C interface and shared libraries.

                              Waldek Hebisch

reply via email to

[Prev in Thread] Current Thread [Next in Thread]