Alien and FFI in Pharo

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

Alien and FFI in Pharo

Robert Withers
I want to get NIO sockets working using FFI, which I understand means
Alien. I can't seem to load Alien from the Catalog.

What do you suggest I do?
--
thanks,
Robert

Reply | Threaded
Open this post in threaded view
|

Re: Alien and FFI in Pharo

ccrraaiigg

> I want to get NIO sockets working using FFI, which I understand means
> Alien. I can't seem to load Alien from the Catalog.
>
> What do you suggest I do?

     If NIO sockets involve callbacks from threads forked by the
library, don't bother. Cog's scheduler deadlocks.


-C

--
Craig Latta
netjam.org
+31   6 2757 7177 (SMS ok)
+ 1 415  287 3547 (no SMS)


Reply | Threaded
Open this post in threaded view
|

Re: Alien and FFI in Pharo

Robert Withers
Hi Craig,

I saw your thread on that. Luckily NIO is a blocking call-out when you
call select, so no callbacks.

Callbacks would be nice to have available. It sounds like it is
potentially big in impact to the image environment...pure events. I
don't wish to see conversation completely stop on it, but I do not have
a compelling use for it yet. I'd rather see 64bit Cog/Spur on PI.

thanks,
Robert

On 10/13/2015 03:00 AM, Craig Latta wrote:

>
>> I want to get NIO sockets working using FFI, which I understand means
>> Alien. I can't seem to load Alien from the Catalog.
>>
>> What do you suggest I do?
>
>       If NIO sockets involve callbacks from threads forked by the
> library, don't bother. Cog's scheduler deadlocks.
>
>
> -C
>
> --
> Craig Latta
> netjam.org
> +31   6 2757 7177 (SMS ok)
> + 1 415  287 3547 (no SMS)
>
>

Reply | Threaded
Open this post in threaded view
|

Re: Alien and FFI in Pharo

Robert Withers
In reply to this post by ccrraaiigg
I'm sorry for not asking, Craig. Do you have a compelling use case? I
would think that the whole system would be much more agile and lean,
especially on the Pi. Callbacks would mean threaded plugins could run.

I'd like to see dual 32-bit stacks running in 64-bits .

thanks,
Robert

On 10/13/2015 03:00 AM, Craig Latta wrote:

>
>> I want to get NIO sockets working using FFI, which I understand means
>> Alien. I can't seem to load Alien from the Catalog.
>>
>> What do you suggest I do?
>
>       If NIO sockets involve callbacks from threads forked by the
> library, don't bother. Cog's scheduler deadlocks.
>
>
> -C
>
> --
> Craig Latta
> netjam.org
> +31   6 2757 7177 (SMS ok)
> + 1 415  287 3547 (no SMS)
>
>

Reply | Threaded
Open this post in threaded view
|

Re: Alien and FFI in Pharo

Robert Withers

On 10/13/2015 04:00 AM, Robert Withers wrote:
> I'm sorry for not asking, Craig. Do you have a compelling use case? I
> would think that the whole system would be much more agile and lean,
> especially on the Pi. Callbacks would mean threaded plugins could run.
>
> I'd like to see dual 32-bit stacks running in 64-bits .

Or not, depending on a bit. Then interleave 32-bit dualframes and 64-bit
frames.

I think that would be cool.


>
> thanks,
> Robert
>
> On 10/13/2015 03:00 AM, Craig Latta wrote:
>>
>>> I want to get NIO sockets working using FFI, which I understand means
>>> Alien. I can't seem to load Alien from the Catalog.
>>>
>>> What do you suggest I do?
>>
>>       If NIO sockets involve callbacks from threads forked by the
>> library, don't bother. Cog's scheduler deadlocks.
>>
>>
>> -C
>>
>> --
>> Craig Latta
>> netjam.org
>> +31   6 2757 7177 (SMS ok)
>> + 1 415  287 3547 (no SMS)
>>
>>

Reply | Threaded
Open this post in threaded view
|

Re: Alien and FFI in Pharo

EstebanLM
In reply to this post by Robert Withers
Hi,

this is the one you are looking for:

http://catalog.pharo.org/catalog/project/OldAlien

it should load fine in Pharo5 (maybe a couple of warnings), I’ve been using it… and I see no reason why it can’t be loaded in Pharo4 too.

Esteban

> On 13 Oct 2015, at 01:11, Robert Withers <[hidden email]> wrote:
>
> I want to get NIO sockets working using FFI, which I understand means Alien. I can't seem to load Alien from the Catalog.
>
> What do you suggest I do?
> --
> thanks,
> Robert
>


Reply | Threaded
Open this post in threaded view
|

Re: Alien and FFI in Pharo

Robert Withers
Excellent news, thank you Esteban.

Robert

On 10/13/2015 07:42 AM, Esteban Lorenzano wrote:

> Hi,
>
> this is the one you are looking for:
>
> http://catalog.pharo.org/catalog/project/OldAlien
>
> it should load fine in Pharo5 (maybe a couple of warnings), I’ve been using it… and I see no reason why it can’t be loaded in Pharo4 too.
>
> Esteban
>
>> On 13 Oct 2015, at 01:11, Robert Withers <[hidden email]> wrote:
>>
>> I want to get NIO sockets working using FFI, which I understand means Alien. I can't seem to load Alien from the Catalog.
>>
>> What do you suggest I do?
>> --
>> thanks,
>> Robert
>>
>
>

Reply | Threaded
Open this post in threaded view
|

Re: Alien and FFI in Pharo

Robert Withers
In reply to this post by Robert Withers
I just had a realization. I do need MT (is this what forking
callout/callback threaded vm is called?) I think, for callout, not
callback. The select call is a blocking call and will block the image
thread. Is it true?

If so, let's figure it out, Craig. I'm with you.

thanks,
Robert

On 10/13/2015 03:20 AM, Robert Withers wrote:

> Hi Craig,
>
> I saw your thread on that. Luckily NIO is a blocking call-out when you
> call select, so no callbacks.
>
> Callbacks would be nice to have available. It sounds like it is
> potentially big in impact to the image environment...pure events. I
> don't wish to see conversation completely stop on it, but I do not have
> a compelling use for it yet. I'd rather see 64bit Cog/Spur on PI.
>
> thanks,
> Robert
>
> On 10/13/2015 03:00 AM, Craig Latta wrote:
>>
>>> I want to get NIO sockets working using FFI, which I understand means
>>> Alien. I can't seem to load Alien from the Catalog.
>>>
>>> What do you suggest I do?
>>
>>       If NIO sockets involve callbacks from threads forked by the
>> library, don't bother. Cog's scheduler deadlocks.
>>
>>
>> -C
>>
>> --
>> Craig Latta
>> netjam.org
>> +31   6 2757 7177 (SMS ok)
>> + 1 415  287 3547 (no SMS)
>>
>>