Hacker Newsnew | past | comments | ask | show | jobs | submit | guenchi's commentslogin

Yes, it embeds the python interpreter into Scheme via C-api.


Every language with FFI has the same ABI. Because they use C Language's ABI to port another language.

Looking at it from another perspective, any language can call another language through this ABI.

So any language with FFI can call any compiled binary code. For interpreted languages, you must embed the runtime (or interpreter).


I am researching julia's code.

https://github.com/JuliaPy/PyCall.jl/blob/master/src/PyCall....

I guess it is like this: Importing the pycall library is to turn on the python interpreter thread and not interrupt it. Then you can call any python library you want.


The GIL is mostly managed by CPython and the host application doesn't touch it directly. Host extension modules may use PyEval_SaveThread et al. just like regular extension modules to release the GIL during blocking operations when called by CPython. There is a separate API for fondling the GIL when you're in a host-created thread (not created by CPython) and want to call CPython. Those are orthogonal (called by CPython vs. calling CPython).


Chez is compile direct to Native Code

Chicken has much more library and bigger community.

BUT...

Chez is the only commercial compiler (before open source) and very stable and fast...


I have been working hard to promote the construction of the (Chez)Scheme community for a year. Being useful to you is the best gift for me.

By the way, we have a scheme binding of tensorflow. That calling direct by tensorflow's C API.

FLI is in order to solve the problem of calling Numpy by Scheme which is lack of C - api.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: