Hi, CFFI developers
Digitool MCL was a old&famous Common Lisp implementation on PPC Mac OS. Recently it was ported into Intel Mac OS X by running in Rosetta (a PPC emulator by Apple). So there're people still using this platform even when Clozure CL is a better choice.
Attach is two patches, one is a CFFI MCL support patch made by James Anderson, the other is a trivial patch for MCL support of trivial-features made by me. With these two patch, CFFI can now be loaded into Digitool MCL.
This work seems work with James' own project which is based on CFFI. But CFFI-TESTS cannot run at this time, because ASDF:RUN-SHELL-COMMAND doesn't support MCL (I don't know how to fix this right now). IOlib also cannot work in MCL because Gray Streams wasn't supported by MCL yet ...
However, I hope CFFI maintainer could merge this patch and let other MCL users help improving exist work.
Chun Tian (binghe)
在 2010-9-28,06:41, james anderson 写道:
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@clozure.com http://clozure.com/mailman/listinfo/info-mcl
info-mcl mailing list info-mcl@clozure.com http://clozure.com/mailman/listinfo/info-mcl
info-mcl mailing list info-mcl@clozure.com http://clozure.com/mailman/listinfo/info-mcl
info-mcl mailing list info-mcl@clozure.com http://clozure.com/mailman/listinfo/info-mcl
info-mcl mailing list info-mcl@clozure.com http://clozure.com/mailman/listinfo/info-mcl