From: Jeff
Subject: Posix and Lisp Implementation Portability
Date: 
Message-ID: <1130145495.817903.316970@g47g2000cwa.googlegroups.com>
I'm a hobbyist and recently have been doing some Lisp programming.  The
project I'm currently working on requires making a few system level
calls and interacting with the operating system in ways not covered by
Common Lisp.  I've been able to address this need via Lisp
Implementation dependent interfaces/modules (e.g. posix, system, etc).
However, it seems each Lisp Implementation (e.g. clips, cmucl, sbcl,
etc.) has their own calling convention/packages for this.  As a result,
my code would not have been portable across implementations.  It seemed
that it wouldn't be too difficult to create a POSIX API using CFFI that
would be portable across all implementations supported by CFFI.  I have
done some toying around with this concept and have various things
working.  Enough working that my code should now be portable across
implementations supported by CFFI instead of relying on a single
implementation.

Basically, I'd like to go further with this POSIX/system call API and
create something more full fledged and more widely useful.  However, I
can't seem to decide what the API should be.  Basically, of the various
implementations, which system level APIs do people prefer?  What do you
wish these API's provided but do not, etc.?  Any suggestions
appreciated.

Jeff

From: Edi Weitz
Subject: Re: Posix and Lisp Implementation Portability
Date: 
Message-ID: <uy84j6zau.fsf@agharta.de>
On 24 Oct 2005 02:18:15 -0700, "Jeff" <··········@bigfoot.com> wrote:

> I'm a hobbyist and recently have been doing some Lisp programming.
> The project I'm currently working on requires making a few system
> level calls and interacting with the operating system in ways not
> covered by Common Lisp.  I've been able to address this need via
> Lisp Implementation dependent interfaces/modules (e.g. posix,
> system, etc).  However, it seems each Lisp Implementation
> (e.g. clips, cmucl, sbcl, etc.) has their own calling
> convention/packages for this.  As a result, my code would not have
> been portable across implementations.  It seemed that it wouldn't be
> too difficult to create a POSIX API using CFFI that would be
> portable across all implementations supported by CFFI.  I have done
> some toying around with this concept and have various things
> working.  Enough working that my code should now be portable across
> implementations supported by CFFI instead of relying on a single
> implementation.
>
> Basically, I'd like to go further with this POSIX/system call API
> and create something more full fledged and more widely useful.

Sounds like a good idea.

> However, I can't seem to decide what the API should be.  Basically,
> of the various implementations, which system level APIs do people
> prefer?  What do you wish these API's provided but do not, etc.?
> Any suggestions appreciated.

This doesn't answer your question but just to make sure - you're aware
of these pages?

  <http://www.cliki.net/Common-Lisp-POSIX>
  <http://www.cliki.net/cl-posix-generalities>

That could be a starting point.

There's also a "lightweight" implementation called Osicat:

  <http://common-lisp.net/project/osicat/>

Cheers,
Edi.

-- 

Lisp is not dead, it just smells funny.

Real email: (replace (subseq ·········@agharta.de" 5) "edi")
From: Jeff
Subject: Re: Posix and Lisp Implementation Portability
Date: 
Message-ID: <1130162389.654563.175510@g14g2000cwa.googlegroups.com>
Edi Weitz wrote:
> This doesn't answer your question but just to make sure - you're aware
> of these pages?
>
>   <http://www.cliki.net/Common-Lisp-POSIX>
>   <http://www.cliki.net/cl-posix-generalities>

Is this project active?  I came across this a few months ago and since
had forgotten about it.  I think it may be useful to provide some
ideas.  But it seems there is a great deal of "text" but very little
"code".
>
> That could be a starting point.
>
> There's also a "lightweight" implementation called Osicat:
>
>   <http://common-lisp.net/project/osicat/>
Yes.  I was aware of this one.  But it was too "lightweight" for my
purposes.

Thanks for the leads/reminder.  I need to look at these again.
>
> Cheers,
> Edi.
>
> --
>
> Lisp is not dead, it just smells funny.
> 
> Real email: (replace (subseq ·········@agharta.de" 5) "edi")
From: Thomas F. Burdick
Subject: Re: Posix and Lisp Implementation Portability
Date: 
Message-ID: <xcv4q75zwfu.fsf@conquest.OCF.Berkeley.EDU>
"Jeff" <··········@bigfoot.com> writes:

> Edi Weitz wrote:
> > This doesn't answer your question but just to make sure - you're aware
> > of these pages?
> >
> >   <http://www.cliki.net/Common-Lisp-POSIX>
> >   <http://www.cliki.net/cl-posix-generalities>
> 
> Is this project active?  I came across this a few months ago and since
> had forgotten about it.  I think it may be useful to provide some
> ideas.  But it seems there is a great deal of "text" but very little
> "code".

As far as I can tell, there wasn't much interest in it outside of the
community of SBCL users.  However, the sb-posix contrib to SBCL is
quite close to an actual cl-posix implementation -- it has quite a lot
of POSIX covered, in the style that was discussed for cl-posix.
Anythin missing from it is only missing because no one has needed it
yet.  If you wanted to wrap what remains of SUSV3, I'm sure it would
be welcome.

I think it would be much easier to make sb-posix portable than to
start fresh on a portable cl-posix.  It uses a header-groveller, so
that could be changed to emit Alien or CFFI bindings -- and it uses
some SBCL specific functionality (eg, making a stream out of a file
descriptor), but that's just a matter of factoring the code a bit
because it will need to be implemented on every platform anyhow.

-- 
           /|_     .-----------------------.                        
         ,'  .\  / | Free Mumia Abu-Jamal! |
     ,--'    _,'   | Abolish the racist    |
    /       /      | death penalty!        |
   (   -.  |       `-----------------------'
   |     ) |                               
  (`-.  '--.)                              
   `. )----'                               
From: Julian Squires
Subject: Re: Posix and Lisp Implementation Portability
Date: 
Message-ID: <c7GdndYYuehp7PzeRVn-vQ@rogers.com>
On 2005-10-24, Jeff <··········@bigfoot.com> wrote:
> Edi Weitz wrote:
>> There's also a "lightweight" implementation called Osicat:
>>
>>   <http://common-lisp.net/project/osicat/>
>
> Yes.  I was aware of this one.  But it was too "lightweight" for my
> purposes.

The intent is to gradually expand the interface to encompass things that
people are actually doing, rather than just adding a full posix
interface in one shot.  As I've been adding various things to osicat as
they come up in my work, I would also appreciate thoughts you have on
improving it, though I think a nice, really-close-to-posix-but-portable
library would be really useful, too.

Cheers.

-- 
Julian Squires