[fetter-devel] Question

Kenny Tilton ktilton at nyc.rr.com
Fri Jul 1 15:17:02 UTC 2005



C Y wrote:

>I'm not really technically qualified to discuss FFIs, but I do have an
>interst in them as a possible future aid to the Maxima project.  I have
>a question as to the "scale" of FFIs, and it looks like this is the
>place to ask :-).
>
>AFAICT, there seem to be two levels, or maybe philosophies, to Lisp FFI
>interactions.  The first is low level, doing the minimal mapping needed
>to be able to interact with foreign library constructs in Lisp.  The
>second is much higher level (and maybe more ambitious?) - to make
>interacting with the library in question a "lisp-like" experience -
>i.e. the interaction between programmer and library takes place at a
>level where the details of the foreign nature of the library can be
>safely ignored.  Have I understood this correctly?
>
>If so, my question is whether these goals are complementary or mutually
>exclusive.  I have heard good things about both Allegro's and Clisp's
>FFIs, but IIRC those are both "high level."  Is there some reason the
>"high level" activity can't be built on the lower level work, with both
>accessable?
>
No, that is a sensible approach. You can even have three levels, with a 
new higher level doing even lispier things, such as taking output 
parameters to a C function (I pass a pointer, the function writes to it) 
and returning them along with the function result in a values form.

Check out the CFFI project, also on c-l.net. James is going for 
low-level FFI of the type I think you mean. Hello-C, a sister project of 
Fetter, is looking closely at that as the implementation mechanism for a 
truly portable CL FFI.

-- 
Kenny

Why Lisp? http://lisp.tech.coop/RtL%20Highlight%20Film

"If you plan to enter text which our system might consider to be obscene, check here to certify that you are old enough to hear the resulting output." -- Bell Labs text-to-speech interactive Web page






More information about the fetter-devel mailing list