<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On 18 Apr 2015, at 19:36, Eliot Miranda <<a href="mailto:eliot.miranda@gmail.com" class="">eliot.miranda@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="content-type" content="text/html; charset=utf-8" class=""><div dir="auto" class=""><div class="">Hi Stef,<br class=""><br class=""></div><div class="">On Apr 18, 2015, at 10:13 AM, stepharo <<a href="mailto:stepharo@free.fr" class="">stepharo@free.fr</a>> wrote:<br class=""><br class=""></div><blockquote type="cite" class=""><div class=""><span class=""></span></div></blockquote><blockquote type="cite" class=""><div class="">
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" class="">
I think that the idea of eliot is independent from NB but use FFI.<br class="">
Esteban will resume his task to use NB syntax for FFI and NB as a
back-end of the UnifiedFFI.<br class=""></div></blockquote><div class=""><br class=""></div>I hope we can revise this slightly to agree with the back end that Ronie, Clément and I propose, which is to use the unsafe bytecodes in Sista/Scorch to include Ronie's lowcode and do the marshaling, avoiding NB. This gives us platform independence, the ability to function in the interpreter (the Sista interpreter can execute these bytecodes too), and security, since when jitted the code lives in the code zone which we can secure, and avoid making the whole heap executable. Maybe you can discuss with Clément when he returns.</div></div></blockquote><div><br class=""></div><div>yes, we are in sync here. </div><div>our idea is to keep NB syntax, because is very good (and for backward compatibility), but to adopt your approach :)</div><div><br class=""></div><div>Esteban</div><br class=""><blockquote type="cite" class=""><div class=""><div dir="auto" class=""><div class=""><br class=""><blockquote type="cite" class=""><div class="">
<br class="">
Stef<br class="">
<br class="">
<div class="moz-cite-prefix">Le 18/4/15 18:24, Nicolai Hess a
écrit :<br class="">
</div>
<blockquote cite="mid:CAPED3SS5xx83=0OaV2t4iPtwPNn7Q7HjdoYvQFOvJcHPT0iXww@mail.gmail.com" type="cite" class="">
<pre wrap="" class=""> </pre>
<br class="">
<fieldset class="mimeAttachmentHeader"></fieldset>
<br class="">
<div dir="ltr" class="">Thank you Esteban,<br class="">
<div class="">
<div class="gmail_extra"><br class="">
<div class="gmail_quote">2015-04-18 9:36 GMT+02:00 Esteban
Lorenzano <span dir="ltr" class=""><<a moz-do-not-send="true" href="mailto:estebanlm@gmail.com" target="_blank" class="">estebanlm@gmail.com</a>></span>:<br class="">
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex"> <br class="">
<div style="word-wrap:break-word" class="">Hi,
<div class=""><br class="">
</div>
<div class="">So… “multithread” is a complicated issue. Pharo
as most Smalltalks is designed thinking is as
monolithic so if you are trying to make the image to
work in different processes… it will not be easy at
all :)</div>
<div class="">Time ago Eliot did a prototype (more than a
prototype in fact, but still far from “production
ready”) to have Threaded FFI and I’m quite sure this
is the way to go, at least as a 1st milestone. </div>
<div class=""><br class="">
</div>
<div class="">I already have a process building this
experimental VM:</div>
<div class=""><br class="">
</div>
<div class=""><a moz-do-not-send="true" href="https://ci.inria.fr/pharo/view/VM/job/CogMTVM/" target="_blank" class="">https://ci.inria.fr/pharo/view/VM/job/CogMTVM/</a></div>
</div>
</blockquote>
<div class=""><br class="">
</div>
<div class="">But this one does not include NativeBoost support. Do
we have a build with MT and NB?<br class="">
</div>
<div class=""> </div>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="word-wrap:break-word" class="">
<div class=""><br class="">
</div>
<div class="">(No idea why windows build failed last two times…
this can be a random fail).</div>
<div class=""><br class="">
</div>
<div class="">I do not remember exactly the changes needed in
the image to take advantage of it… it was just an
instVar in Process, I think, but then FFI package
was adapted to take advantage of this… no idea where
it is now (if is already incorporated in latest FFI,
which we have).</div>
<div class=""><br class="">
</div>
<div class="">Then, after this… I imagine the callback
mechanism can be adapted to work in multithread
environments but probably we will need something
like isolates from Dart to provide some degree of
multithread processing without killing the image
(but I’m just thinking in loud here, this can be a
really bad idea, and probably there are other ways
to do this better… I will let Eliot to explain
better). </div>
<div class=""><br class="">
</div>
<div class=""><b class="">TL;DR: </b>Start for the CogMTVM, is the way
to go.</div>
<div class=""><br class="">
</div>
<div class="">cheers, </div>
<div class="">Esteban</div>
<div class=""><br class="">
<div class="">
<blockquote type="cite" class="">
<div class="">On 17 Apr 2015, at 09:06, Nicolai Hess <<a moz-do-not-send="true" href="mailto:nicolaihess@web.de" target="_blank" class="">nicolaihess@web.de</a>>
wrote:</div>
<br class="">
<div class="">
<div dir="ltr" class="">
<div class="">
<div class="">
<div class="">
<div class="">
<div class="">
<div class="">
<div class="">
<div class="">
<div class="">
<div class="">
<div class="">
<div class="">
<div class="">
<div class="">Hi, <br class="">
<br class="">
</div>
I've tried to
build a pharovm
with multithread
support. I changed
the config in the
<br class="">
</div>
pharo
generator.image to
use the cogmt config
and was able to
build a vm.<br class="">
</div>
But this vm crashes on
startup. (windows7)<br class="">
<br class="">
Is this the right way
and did anyone got
this to work (windows
or linux)?<br class="">
<br class="">
</div>
And can this work to
make NB callbacks
working for
multithreaded libraries.<br class="">
</div>
<br class="">
(I made some simple
bindings for the gstreamer
lib with NB, this works<br class="">
</div>
for simple calls (create
element/change state). But I
guess this won't work<br class="">
</div>
for any gstreamer function
that requests a callback that
may b e called from<br class="">
</div>
a different thread)<br class="">
<br class="">
</div>
Would this be the right way to do:<br class="">
</div>
- build a vm with MT support<br class="">
</div>
- guard the NB callback entry/leave
code with the ownVM()/disownVM() call.<br class="">
<br class="">
</div>
Or is there more to do.<br class="">
<br class="">
</div>
<div class="">Thanks in advance<br class="">
</div>
<br class="">
<br class="">
</div>
nicolai<br class="">
<div class="">
<div class="">
<div class=""><br class="">
<br class="">
</div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
<br class="">
</div>
</div>
<br class="">
</blockquote>
</div>
<br class="">
</div>
</div>
</div>
</blockquote>
<br class="">
</div></blockquote></div></div></div></blockquote></div><br class=""></body></html>