#017 (en) - Hello? Smalltalk calling! Igor Stasenko on FFI, Alien and NativeBoost17.06.12, 20:57:09 by SmalltalkInspect
In this episode we talk to Igor Stasenko about ways to call external code in Smalltalk code, especially on Pharo Smalltalk (most of the FFI discussion is also valid for Squeak). Igor is a software engineer at the Inria Research Institute in Lille, France, the inofficial (?) epicenter of the Pharo world. His job there is to maintain and look after all and everything related to "infrastructure" in and around Pharo Smalltalk, including the VM.
We start our discussion with the question whether and when you'd want to interface to external libraries before we speak about to the available technologies in Pharo to do so. This ranges from how to declare external functions and define output and input data structures to hand between the Smalltalk Image and external functions.
We not only cover FFI (Foreign Function Interface) but also speak about Alien, which started life in the Newspeak project.
A discussion on such technical stuff as calling native code and external libraries from within a VM wouldn't be complete without some talk on the actual VM (Cog), so we also cover the cog VM and Eliot Miranda's work on latest Smalltalk VM technologies.
The third part of the interview concentrates on NativeBoost, a project started by Igor that allows to define executable machine code within a Smalltalk image and run it (natively) under the control of the Smalltalk image. Igor used it to use the cairo Graphics Library as one of the backends for Athens- a vector graphics framework for Pharo (see video here)
You can learn more at the following sites:
- Homepage of the Pharo Smalltalk Project, where you can also download the Pharo one-click image
- Short overview of FFI
- Video of a talk by Igor on FFI at ESUG
- Code to load FFI into a Pharo image:
(Smalltalk at: #ConfigurationOfFFI) project lastVersion load
- Alien on the squeak wiki
- NativeBoost project page and its Jenkins Build Server
- Video of a talk by Igor on NativeBoost at ESUG
- NativeBoost OpenGL-binding
- OpenGLSpecs, A tool for parsing and analyzing the OpenGL spec files
- Igor's Blog named "My Computer Adventures"
Download MP3 (37,3 MB)