This post was updated on .
CONTENTS DELETED
The author has deleted this message.
|
You should have a look at the Python bridge of Kilon, which operates in a similar fashion. I am working on a bridge for Anatella http://anatella.com/ so that I can make "Pharo Boxes" in it. There was another thread with COM Objects and this would be super nice to have as well. I dug out this old thing: http://wiki.squeak.org/squeak/459 - TL;DR version: unless one is biting the bullet and does a full sized COM plugin, well, this are not going to move much. Phil On Tue, Oct 11, 2016 at 10:04 PM, CodeDmitry <[hidden email]> wrote: I woke up this morning and was wondering if it is possible to create a |
This post was updated on .
CONTENTS DELETED
The author has deleted this message.
|
In reply to this post by philippeback
I am still trying to make a bridge between Pharo and C++ via shared memory which is by far the fastest inter process communication also known as IPC. For Python I use the slowest IPC which is sockets , however it has the advantage of remote communication. There are other IPCs , zeroMQ, RabittMQ, pipes, json files, Apache Thrift and of course Microsoft COM. Apple has its own COM like IPC called shared objects, Linux has dbus.
So what you ask is certainly doable, though I have to say shared memory it's proven a tough cookie to crack but I will figure it out. With IPC you can make anything talk to everything, Java to Python, assembly to JavaScript, COM to shared objects, two computers in the opposite corners of the planet, etc etc. The advantages ? You don't need to modify the VM It's easier to maintain Cross platform with exception of course of Microsoft COM and Apple Shared Objects Language agnostic Super flexible Even remote execution |
Here is for reference how COM works: On Tue, Oct 11, 2016 at 11:02 PM, Dimitris Chloupis <[hidden email]> wrote:
|
In reply to this post by kilon.alios
Here is for reference, how COM works inside: Wrapping that with a .NET layer hurts my eyes. Phil On Tue, Oct 11, 2016 at 11:02 PM, Dimitris Chloupis <[hidden email]> wrote:
|
This post was updated on .
In reply to this post by CodeDmitry
CONTENTS DELETED
The author has deleted this message.
|
.NET Interop just works ... until it doesn't. Try that with some COM objects for hundreds of thousands of calls and run for the bar. COM is fine, as is ATL (I wrote quite a set of things using that in the past), what isn't is that MS just changes direction every N years, leaving the underlying tech intact (COM is not going away, nor are basic NT calls) adding layer upon layer. I do not want to take the full .NET SDK around for interfacing with COM. Phil On Tue, Oct 11, 2016 at 11:26 PM, CodeDmitry <[hidden email]> wrote: To be fair COM would be significantly simpler if it had a cleaner API. |
This post was updated on .
CONTENTS DELETED
The author has deleted this message.
|
Shared libraries if you refer to DLLs it's actually a bad name, it's one of the rare occasions that Microsoft got the naming correct. It's actually a dynamically linked library, there is no sharing of execution or data and that applies for all OSes whether they call them shared libraries or not. Actually shared memory is one of the very few exception that an OS will share memory and even in that case you won't be given the data or code memory of another process .
So each time an executable loads the DLL/Shared Library a new instance get linked dynamically with its own execution and data memory which only the executable that is linked to can access , however only one executable can do this. If that was not the case then there would be no reason to use Shared Memory and we all would be using DLLs.if you want share data , shared memory is your only option, other IPCs just copy memory around. On Wed, 12 Oct 2016 at 00:49, CodeDmitry <[hidden email]> wrote: Is the layering really that horrible as long as the library is already shared |
This post was updated on .
CONTENTS DELETED
The author has deleted this message.
|
Here you go
http://stackoverflow.com/questions/19373061/what-happens-to-global-and-static-variables-in-a-shared-library-when-it-is-dynam On Wed, 12 Oct 2016 at 02:33, CodeDmitry <[hidden email]> wrote: O.o can you please elaborate? |
CONTENTS DELETED
The author has deleted this message.
|
#pragma data_seg("SHARED") looks like this is doing some serious IPC magic behing the scenes. Check this out for some critters: https://social.msdn.microsoft.com/Forums/vstudio/en-US/bc93445e-cec3-456d-9596-15528060dc94/sharing-data-between-processes-using-pragma-dataseg-and-windows-7?forum=vcgeneral Phil On Wed, Oct 12, 2016 at 9:34 AM, CodeDmitry <[hidden email]> wrote: Have you got my modified message? or have I been wasting my revisions all |
Indeed that pragma looks like a shared memory macro to me Actually one thing I found out is that DLLs and Shared Libraries are implemented via shared memory mapped files without giving access to shared memory. CodeDmitry I did get your message as you can see by the quote of my last reply. You are basically using Shared Memory IPC , its just an ungly Windows hack via a pragma and from the thread that Phil linked it looks like its also bug prone. This is also confirmed by Mircrosoft itself here -> https://msdn.microsoft.com/en-us/library/h90dkhs0(v=vs.90).aspx Summary: Use shared memory mapped files, far safer and far more cross platform
|
Free forum by Nabble | Edit this page |