chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-users] Problems with the "dollar" egg.


From: Alaric Snell-Pym
Subject: Re: [Chicken-users] Problems with the "dollar" egg.
Date: Mon, 03 Mar 2014 16:57:30 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130713 Thunderbird/17.0.7

On 02/03/14 17:27, John Cowan wrote:
> Daniel Carrera scripsit:
> 
>> Does that apply to other languages like Python?
> 
> 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.

ABS

-- 
Alaric Snell-Pym
http://www.snell-pym.org.uk/alaric/

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]