[Vm-dev] Fwd: Nix package for Pharo flavor of opensmalltalk-vm
K K Subbu
kksubbu.ml at gmail.com
Sun Apr 23 13:25:50 UTC 2017
On Thursday 20 April 2017 04:13 PM, Luke Gorrie wrote:
> Pharo upstream are distributing releases as binary vm+image pairs with
> some third party libraries included. The most faithful way to package
> this for nix would be to take these binaries and make them work (using
> patchelf to fix up the shared library paths.) This is how people package
> other binary software for nix e.g. Skype.
The vm+image is like chicken+egg ;-). Separated across time, they have a
recursive dependency between them. VM Maker app run on an existing image
(Pharo 5 or Squeak 5) to generate a new VM (e.g. Spur) and that in turn
is used to evolve the next image release (e.g. Squeak 6, Pharo 6). VM is
machine-specific code while Image an object graph on disk.
This is analogous to linux+rootfs except that linux can handle multiple
filesystems while our VM can only deal with one format at this time. In
Linux, filesystem modules translates objects on disk to object graph
(tree) in memory and the rest of the kernel refer to these objects
through a VFS namespace, so they are oblivious to the physical layout on
disk. This indirection is nicely brought out in :
https://www.dmst.aueb.gr/dds/pubs/inbook/beautiful_code/html/Spi07g.html
Linux itself is split into the kernel+initramfs, but there is no such
equivalent in our VM. We could introduce indirection by building a
bootstrap image into the VM itself (perhaps as a special plugin) and
have the vm load it initially. This image can then probe user-given
image files, match it with the right loader plugins and then switch to it.
Regards .. Subbu
"All problems in computer science can be solved by another level of
indirection" .. David Wheeler
More information about the Vm-dev
mailing list