Re: [Factor-talk] Exporting a C API

2015-02-10 Thread Jon Harper
This sounds like mixing the features from: - http://docs.factorcode.org/content/article-embedding.html which initializes everything, but then requires the compiler to use a string -> factor eval -> string call. - http://docs.factorcode.org/content/article-alien-callback.html which allows to directl

Re: [Factor-talk] Exporting a C API

2015-02-09 Thread John Benediktsson
Should be possible as the FFI supports calls and callbacks, but I'm not aware of anyone who has tried. Love the idea, though! On Sat, Feb 7, 2015 at 6:22 AM, Marmaduke Woodman wrote: > Hi > > I'm curious as to the feasability of exporting a C API for a library > written in Factor. > > From the

[Factor-talk] Exporting a C API

2015-02-07 Thread Marmaduke Woodman
Hi I'm curious as to the feasability of exporting a C API for a library written in Factor. >From the FFI docs, I expect that it would be possible for a small stub library in C to initialize the VM and populate a table of alien callbacks which could be used from another language... in theory. Doe