Towards Threaded FFI

17 January, 2016

spur_gear

Eliot Miranda writes:

.. I expect this is the year [the threaded FFI] will be [production ready].  Spur provides pinning, so the VM infrastructure is there.  The Pharo community plus some commercial relationships that have developed are providing funding.  Esteban Lorenzano and I want to collaborate on this and I hope to get help from some other people, such as Ronie Salgado.  And Mariano is working on an important part of the problem.  So I feel there’s sufficient momentum for us to realize the threaded FFI this year.

.. and when Craig Latta tried to use it late last year it worked up to a point.  The thing that didn’t work was callbacks from foreign threads.  So it looks like the core threading code is not too far away from working.

Another really important part, bigger than threading, is marshaling.  Being able to handle the full x86_64 abi requires a better approach than interpreting tops signatures.  Igor’s NativeBoost gave an example of how to generate marshaling machine code, but alas only for x86.  But Sista includes an extensible bytecode set for arbitrary instructions.  Sista is close to production, and we know the bytecode set works.  So the plan is to use these bytecodes to do the marshaling.  That neatly solves the problems of a) associating marshaling machine code with a method and b) marshaling in an interpreted stack VM, since the bytecode set works in any Cog VM.  So the plan is to write an ABI compiler from C signatures to marshaling code to replace the interpreted FFI plugin.

So this year I hope we will have an excellent high-performance FFI.

SqueakJS-Etoys-20140704

From Bert Freudenberg:

Hi all,

my SqueakJS VM has reached a major milestone. It is now sufficiently complete to run a full Etoys image (and possibly other non-closure images, too). It has support for most BitBlt modes, WarpBlt, even some Balloon2D rendering (for TTF fonts), a virtual file system, image saving etc.

Try it: http://bertfreudenberg.github.io/SqueakJS/etoys/
(Safari and IE are significantly faster than Firefox and Chrome, best is Safari Webkit nightly, works on iPad too, hopefully Android)

For more details, see my blogpost:
http://croquetweak.blogspot.de/2014/07/squeakjs-runs-etoys-now.html

Feedback and contributions welcome 🙂

– Bert –

OLPC-logo

OLPC-4.0
Check out OLPC XO-4.

I would hate to add to the speculation that OLPC is dead because it’s not.  Wayan Wota has been calling OLPC dead for 5 years. This is not news. He has not been involved with the project in a long time. His article is about the XO-1, apparently he doesn’t even know the XO-4 was officially introduced at this year’s CES, alongside the tablet.

If you really want to know what’s going on with current OLPC community projects see Adam Holt’s http://www.unleashkids.org/

Full OLPC Statement (from: http://gizmodo.com/one-laptop-per-child-isnt-quite-dead-yet-1541430670):

OLPC’s mission to empower the world’s children through education is far from over. OLPC is thriving and making more inroads at bringing education to those who can’t easily access it. OLPC recently formed a strategic alliance with the Zamora Teran family through many of their enterprises and their philanthropic foundation, the “Fundación Zamora Teran to deliver XO laptops not only to Central and South America, but also to Africa.

Aside from distributing more laptops in several schools in Costa Rica, Uruguay is receiving its first 50k units of the XO-4 Touch (running Android) in a few weeks’ time. In addition, the XO Tablet is currently available directly through governments and NGOs, as well as in Europe and Canada and through all major retail outlets in the United States including Walmart, Amazon, Toys ‘R Us among the others.

OLPC also has outsourced many of the software and development units because the organization is becoming more hardware and OS agnostic, concentrating on its core values – education. As an example, we’ve partnered with the Smithsonian Museum to bring feature-rich, interactive and more targeted content to our young learners.

We have more exciting things planned in the horizon including the implementation of very large scale projects in several regions of the world, so be sure to stay tuned.

OLPC is a concept, it is a movement, it is a community and it is about helping children.  Sure the grand vision may be delayed, but the benefits of education and technology, of improving the human condition is not dead.  We all knew that it’s not profitable to teach third world children.  Still,  no one thought that companies would compete against OLPC.  Countries opted for different technologies for hardware but never matched the promise or the vision of the software.  Had the world united around this platform children would have benefited and the world today would be a better place as we develop together and stamp out ignorance.  There is nothing like education to improve the world and that mission is not dead.  OLPC is evolving, finding new ways to reach more children, making more with less, and finding ways to make a real difference in the world.

Support OLPC!  Long Live the vision.

spur_gear

 

Clément Béra just posted an excellent article explaining the new Spur Object format.  Definitely worth a read!

Eliot Miranda has also mentioned that Spur is coming to life in Newspeak as we speak and then Squeak 5.0.

Find out more about the Squeak VM called Cog and the new memory manager called Spur at Eliot’s Cog Blog.

Bert VM Icon(icon by Bert)

Word has it that Clément Béra is working With Eliot Miranda on Cog.  Göran pointed out Clements excellent blog: here, to me a few weeks ago after meeting him at ESUG.

From Eliot: Clément Béra is, amongst other things, working on Cog performance, looking at adaptive optimization/speculative inlining (Sista in Cog, for Speculative Inlining Smalltalk Architecture).

I just wanted to welcome Clément Béra and to say thank you to everyone working on the VM for both communities, you know who you are (and we do to) and especially Eliot for working on Cog and keeping the advancements coming!  Hip Hip … and all that.

spur_gear

 

 

I’ve just published a blog post on lazy become and the partial read barrier in Spur.  I’d really appreciate criticism, preferably as comments on the blog page (Eliot’s blog not this one, please follow the link to comment).  This is one of the riskier parts of the design so it really does need to be pounded on.


thanks,

Eliot

 

A Spur gear for Cog

5 September, 2013

Cog-Spur

 

 

Moving the Squeak GC forward in COG.

http://www.mirandabanda.org/cogblog/2013/09/05/a-spur-gear-for-cog/