Binary (external) objects

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

Binary (external) objects

Hans
Hi,

is it possible - at least in theory - to build a VM such that Pharo could handle binary objects ? For example, there may be objects written in C, in Golang, Lisp... you could load the objects into to image, you would see their methods as all other Smalltalk Code, with the difference that you could not see the implementation or do Smalltalk level debugging. I have in mind the FMI of Modelica (http://fmi-standard.org)
I don’t now if the modern FFI already works like this. And now, I don’t reestablidvh CORBA :) 

Cheers

Hans
Reply | Threaded
Open this post in threaded view
|

Re: Binary (external) objects

tblanchard
UFFI (Universal Foreign Function Interface) is pretty good.

It is how we access things like sqlite, cairo, and some other native frameworks.  There is work going on to make it more automatic by leveraging libclang to parse headers and automate a lot of the grunt work.  Search the list for FFI in the subject lines and you will find some things.

-Todd Blanchard

On Nov 16, 2017, at 7:14 AM, Hans N Beck <[hidden email]> wrote:

Hi,

is it possible - at least in theory - to build a VM such that Pharo could handle binary objects ? For example, there may be objects written in C, in Golang, Lisp... you could load the objects into to image, you would see their methods as all other Smalltalk Code, with the difference that you could not see the implementation or do Smalltalk level debugging. I have in mind the FMI of Modelica (http://fmi-standard.org)
I don’t now if the modern FFI already works like this. And now, I don’t reestablidvh CORBA :) 

Cheers

Hans

Reply | Threaded
Open this post in threaded view
|

Re: Binary (external) objects

Ben Coman
Another effort leveraging FFI is CPPBridge...

and TalkFFI (this announcement for Pharo 4)

cheers -ben

On 17 November 2017 at 02:55, Todd Blanchard <[hidden email]> wrote:
UFFI (Universal Foreign Function Interface) is pretty good.

It is how we access things like sqlite, cairo, and some other native frameworks.  There is work going on to make it more automatic by leveraging libclang to parse headers and automate a lot of the grunt work.  Search the list for FFI in the subject lines and you will find some things.

-Todd Blanchard

On Nov 16, 2017, at 7:14 AM, Hans N Beck <[hidden email]> wrote:

Hi,

is it possible - at least in theory - to build a VM such that Pharo could handle binary objects ? For example, there may be objects written in C, in Golang, Lisp... you could load the objects into to image, you would see their methods as all other Smalltalk Code, with the difference that you could not see the implementation or do Smalltalk level debugging. I have in mind the FMI of Modelica (http://fmi-standard.org)
I don’t now if the modern FFI already works like this. And now, I don’t reestablidvh CORBA :) 

Cheers

Hans


Reply | Threaded
Open this post in threaded view
|

Re: Binary (external) objects

Hans
Hi,

thx for the hints :) 

But to be sure that we are talking about the same: the Foreign Mock-up  Interface and FMU works like this: you have an SDK generating an interface description (the FMI) and an d some kind of binary object (the FMU). Any simulation tool supporting this standard can do reflection by looking at the FMI and then call on binary level the appropriate Methods in the FMU. It is all based on ANSI C.

The Pharo FFI approaches perform their reflection from the header files, right ? The advantage is that you have nothing to do on the application side. 

Cheers

Hans

Am 16.11.2017 um 22:15 schrieb Ben Coman <[hidden email]>:

Another effort leveraging FFI is CPPBridge...

and TalkFFI (this announcement for Pharo 4)

cheers -ben

On 17 November 2017 at 02:55, Todd Blanchard <[hidden email]> wrote:
UFFI (Universal Foreign Function Interface) is pretty good.

It is how we access things like sqlite, cairo, and some other native frameworks.  There is work going on to make it more automatic by leveraging libclang to parse headers and automate a lot of the grunt work.  Search the list for FFI in the subject lines and you will find some things.

-Todd Blanchard

On Nov 16, 2017, at 7:14 AM, Hans N Beck <[hidden email]> wrote:

Hi,

is it possible - at least in theory - to build a VM such that Pharo could handle binary objects ? For example, there may be objects written in C, in Golang, Lisp... you could load the objects into to image, you would see their methods as all other Smalltalk Code, with the difference that you could not see the implementation or do Smalltalk level debugging. I have in mind the FMI of Modelica (http://fmi-standard.org)
I don’t now if the modern FFI already works like this. And now, I don’t reestablidvh CORBA :) 

Cheers

Hans