Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to call C functions from femtolisp?

I recently came across small lisp dialect called femtolisp, written by Jeff Bezanson, the author of famous Julia Language. (For more information about femtolisp visit https://code.google.com/p/femtolisp/ and https://github.com/JeffBezanson/femtolisp) and I really like it.

However, I wonder is there some way to call C functions from femtolisp?

like image 827
Racket Noob Avatar asked Apr 24 '14 19:04

Racket Noob


1 Answers

No, there is currently no way to call arbitrary C functions from within the femtolisp language. As Matt B. says, there is an extension API that lets you write functions in C (which can in turn call any C function) and register them to become callable from femtolisp. It would be possible to use this mechanism to add a ccall function that used e.g. libffi to call any C function.

like image 119
Jeff Bezanson Avatar answered Oct 18 '22 19:10

Jeff Bezanson