[info-mcl] ? cffi

james anderson james.anderson at setf.de
Mon Sep 27 17:41:50 CDT 2010


good morning;

i have worked out enough of a cffi-mcl to be able to accomplish the  
immediate goal - to use the cl-zmq zeromq ffi binding.[1]
in case someone wants to carry it further, it's posted along with a  
mcl-compatible zmq version,[2] which eliminates un-ported dependencies.

---
[1] : http://repo.or.cz/w/cl-zmq.git
[2] : http://github.com/lisp/de.setf.zeromq

On 2010-09-22, at 08:29 , Chun Tian (binghe) wrote:

> I've read these documents. MCL 4.0's FFI seems based on the  
> function "define-entry-point" which then depends on "ppc-ff-call",  
> both of them are still available in MCL 5.x, and the related MCL  
> source code is "lib/deftrap.lisp", which was last modified in 2005.
>
> However, I think "define-entry-point" is not the preferred way any  
> more:
>
> ; Change log
> ;
> ; put back define-entry-point and things it depends on - though MCL  
> doesn't use it users may
> ; ------ 5.2b2
>
> I think CFFI people, if want to support MCL, should research  
> "deftrap.lisp" and figure out the preferred way to do the work. But  
> for me, a USOCKET maintainer, I'd like to use this interface  
> directly to implement UDP networking, which was lack from  
> OpenTransport.
>
> --binghe
>
> 在 2010-9-22,13:30, james anderson 写道:
>
>> there are two sources.
>>
>> if you go to ftp.clozure.com, you will find the 5.2 release and a  
>> copy of the documentation for 4.0.
>> i know of no revised documentation for 5.2. other than that, there  
>> is always the source.
>> i believe 5.2 has a very different calling mechanism then 4.0, as  
>> it uses a different os x facility to manage foreign libraries.
>>
>> the biggest '?' is turning off the gc for the dynamic extent of  
>> any foreign calls which pass lisp data. i do not know if that is  
>> possible in mcl, but it could be faked by moving the data to/from  
>> temporary external storage just to get it working.
>> two little question marks are the data type size calculations and  
>> the call-back protocol.
>> since the source is there, there's nothing stopping me from  
>> adapting the clozure-specific code to work in mcl.
>> i was just hoping to avoid having to wrap my head around those bits.
>>
>>
>> On 2010-09-22, at 04:45 , Chun Tian (binghe) wrote:
>>
>>> Never know how to do FFI in Digitool MCL ... Where can I find  
>>> some API documents?
>>>
>>> --binghe
>>>
>>> 在 2010-9-22,05:36, james anderson 写道:
>>>
>>>> good morning;
>>>>
>>>> has anyone ported cffi to mcl?
>>>>
>>>>
>>>> _______________________________________________
>>>> info-mcl mailing list
>>>> info-mcl at clozure.com
>>>> http://clozure.com/mailman/listinfo/info-mcl
>>>
>>> _______________________________________________
>>> info-mcl mailing list
>>> info-mcl at clozure.com
>>> http://clozure.com/mailman/listinfo/info-mcl
>>
>> _______________________________________________
>> info-mcl mailing list
>> info-mcl at clozure.com
>> http://clozure.com/mailman/listinfo/info-mcl
>
> _______________________________________________
> info-mcl mailing list
> info-mcl at clozure.com
> http://clozure.com/mailman/listinfo/info-mcl




More information about the info-mcl mailing list