[ANN] FFI Tutorial, Pharo5 / Libclang

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

[ANN] FFI Tutorial, Pharo5 / Libclang

Ben Coman
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

Reply | Threaded
Open this post in threaded view
|

Re: [ANN] FFI Tutorial, Pharo5 / Libclang

stepharo
Excellent!

Tx for writing that.


Le 24/9/16 à 20:25, Ben Coman a écrit :

> 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
>
>


Reply | Threaded
Open this post in threaded view
|

Re: [ANN] FFI Tutorial, Pharo5 / Libclang

stepharo
In reply to this post by Ben Coman
Did you let


LibC class >> ticksSinceStart
       ^ self ffiCall: #( uint clock () ) module: LibC
and in Playground inspect following…

FFIPlay ticksSinceStart
"==> 32709046 (or something similar)"

FFIPlay on purpose? It was unclear to me how this is related to LibC



Le 24/9/16 à 20:25, Ben Coman a écrit :

> 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


Reply | Threaded
Open this post in threaded view
|

Re: [ANN] FFI Tutorial, Pharo5 / Libclang

Ben Coman
On Sun, Sep 25, 2016 at 1:46 AM, stepharo <[hidden email]> wrote:

> Did you let
>
>
> LibC class >> ticksSinceStart
>       ^ self ffiCall: #( uint clock () ) module: LibC
> and in Playground inspect following…
>
> FFIPlay ticksSinceStart
> "==> 32709046 (or something similar)"
>
> FFIPlay on purpose? It was unclear to me how this is related to LibC

An error. Thanks for picking that up.  When I first was trying it I
had created that class to hold experiements, but it wsa shorter for
the post to put in on the existing class.

cheers -ben

>
>
>
> Le 24/9/16 à 20:25, Ben Coman a écrit :
>>
>> 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
>
>
>

Reply | Threaded
Open this post in threaded view
|

Re: [Pharo-dev] [ANN] FFI Tutorial, Pharo5 / Libclang

EstebanLM
In reply to this post by Ben Coman
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 <[hidden email]> 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
>