|
From: | Daniel Carrera |
Subject: | Re: [Chicken-users] Problems with the "dollar" egg. |
Date: | Mon, 3 Mar 2014 18:10:52 +0100 |
> Python does not work in the Chicken interpreter either. :-) (Though in
> principle one could write a Python egg using the Python/C API.)
There's slightly more to it than this, however.
The FFI only works in compiled code, it's true. But you can compile a
module that uses the FFI, then use that module from the interpreter. You
just can't use the FFI *directly* because it works by integrating with
the compiler's generation of C code, which is then compiled by gcc.
Whereas the interpreter interprets directly, rather than going via C, so
the FFI doesn't have a C stage to integrate with.
This is similar to the situation with Python - to wrap a C library in
Python, you compile a stub module that you can then load from the Python
interpreter and away you go. The difference is that the stub module is
written in C, rather than Python; while Chicken "FFI stubs" are written
in whatever mix of Chicken and C you find convenient.
[Prev in Thread] | Current Thread | [Next in Thread] |