[ANN] FFI Tutorial, Pharo5 / Libclang
hi all, Just announcing that I'm writing a series of posts on using FFI in Pharo 5 to interface to libclang, the interface library for the LLVM C compiler. http://blog.openinworld.com/2016/09/pharo-libclang-ffi-part-1-preamble/ I'm writing this from the perspective of a FFI newbie progressively learning the system. I've left in a few mis-steps since I think it can be useful seeing what didn't work. cheers -ben
Hi, I'm quite interested in this, though not in UFFI bit, rather in bindings as such. What is the goal of the project? Thanks! Best, Jan On Sun, 2016-09-25 at 01:25 +0800, Ben Coman wrote:
hi all,
Just announcing that I'm writing a series of posts on using FFI in Pharo 5 to interface to libclang, the interface library for the LLVM C compiler.
http://blog.openinworld.com/2016/09/pharo-libclang-ffi-part-1-preambl e/
I'm writing this from the perspective of a FFI newbie progressively learning the system.  I've left in a few mis-steps since I think it can be useful seeing what didn't work.
cheers -ben
The immediate driver is that I want to parse the VM platform sources and use Roassal to arrange them graphically to look for cross-platform patterns. I started doing this manually but its a error prone and tedious. http://forum.world.st/code-chart-of-time-inside-the-VM-td4916951.html I am replicating a bit the TalkFFI project [1] which provides Pharo 4 NativeBoost bindings to libclang but that needs to be ported to Pharo 5 UFFI and a secondary goal was for me to learn about FFI, so I'm proceeding from scratch. What I learn will help in porting TalkFFI to Pharo 5. [1] http://smalltalkhub.com/#!/~CipT/TalkFFI In the back of my mind I consider a possibility of storing C code in-Image, and calling out to libclang to compile it, dynamically l ink and run it without ever leaving Pharo. Or imagine for the VM when saving a modified Slang primitive it generated the C code just for that primitive, via FFI got libclang to compile and link it to the platform library, then started off the new VM running tests all in one go. But thats a pie in the sky idea probably a long way off. cheers -ben On Sun, Sep 25, 2016 at 4:56 AM, Jan Vrany <jan.vrany@fit.cvut.cz> wrote:
Hi,
I'm quite interested in this, though not in UFFI bit, rather in bindings as such.
What is the goal of the project?
Thanks!
Best, Jan
On Sun, 2016-09-25 at 01:25 +0800, Ben Coman wrote:
hi all,
Just announcing that I'm writing a series of posts on using FFI in Pharo 5 to interface to libclang, the interface library for the LLVM C compiler.
http://blog.openinworld.com/2016/09/pharo-libclang-ffi-part-1-preambl e/
I'm writing this from the perspective of a FFI newbie progressively learning the system. I've left in a few mis-steps since I think it can be useful seeing what didn't work.
cheers -ben
this is super good⦠thanks for doing this. once finished I would like to use it as tutorial reference :) cheers, Esteban
On 24 Sep 2016, at 19:25, Ben Coman <btc@openInWorld.com> wrote:
hi all,
Just announcing that I'm writing a series of posts on using FFI in Pharo 5 to interface to libclang, the interface library for the LLVM C compiler.
http://blog.openinworld.com/2016/09/pharo-libclang-ffi-part-1-preamble/
I'm writing this from the perspective of a FFI newbie progressively learning the system. I've left in a few mis-steps since I think it can be useful seeing what didn't work.
cheers -ben
participants (3)
-
Ben Coman -
Esteban Lorenzano -
Jan Vrany