In article <firstname.lastname@example.org> email@example.com (Paul Wilson)
> >A port would have the following hurdles:
> >- low-level C interfaces not R4RS
> >- low-level macro hacks not R4RS
> >- Record structures and exceptions
> Could you elaborate on this? Several issues:
> - there's no C FFI in standard Scheme. Is there an emerging de facto
> standard? If not, what should a Scheme ffi look like, in its broad
> outlines? This is something that we've been meaning to look into
> but never get around to. My impression of Guile's FFI is that it's
> not very impressive. (Too closely linked to the SCM implementation
> strategy.) The new C++ header reader for SCM (developed at the Media
> Lab to support X and 3D graphics standards) sounds more interesting,
> but I haven't looked into it.
The scheme48 FFI is similar to the Java FFI: it involves "marshalling"
the arguments to do impedence matching between the C heap and the scheme
But nobody's FFI interoperates with anybody elses.
I haven't looked very closely, but I suspect both the scheme48 and Java
FFI could be replaced with ILU. Given compatible runtimes, you might
get inter-language interoperability in the same address space. But
failing that, you get it across address spaces.
ILU has been interfaced with python, and the results are truly nifty.
I hear the work on ILU/Java is succeeding. (And of cource C, C++,
common lisp, and Modula 3 have been done for a long time). I expect
perl5 will have an ILU module before long too. And the apache HTTP
server has been hacked to interface with ILU.
Check it out:
(I had to type that by hand -- beware of typos)
Daniel W. Connolly "We believe in the interconnectedness of all things"
Research Scientist, MIT/W3C PGP: EDF8 A8E4 F3BB 0F3C FD1B 7BE0 716C FF21