Working on transporter trees (This week in Self)
mail at russell-allen.com
Sun Nov 30 23:24:35 UTC 2014
This week I've been looking at the transporter trees code.
I have committed a slightly more robust version of transporter trees - the code is in the transporter-trees branch of the main github.com/russellallen/self repo. Not VM changes are required, so just "git checkout transporter-trees" and then build a snapshot to check it out.
Usage is as in the github.com/russellallen/self-webserver repo:
bootstrap read: 'webserver'
Important considerations: module names are globally unique (that is, two modules called 'webserver' in different trees are considered the same module and will overwrite each other). The tree name itself should also be globally unique - that is it is not possible to have two trees with the same name in a single Self world.
The advantages of this over a simple symbolic link to a separate filesystem tree is we can do overlays - if you want special string behaviour, then put it in your tree in my_tree/core/string.self and it will override as expected.
Modules that import subparts will try to import them from the same tree by default.
Also bumped up versions on relevant modules, and reworked worldBuilder.self so that it isn't a module.
That way code can check for the core version in a module preFileIn method as so:
modules allCore version >= (modules init moduleVersion copyOn: '1.0.0')
ifFalse: [log warning: 'Ancient version of Self!']
I'm not sure if I'm completely happy with this yet. I have two main issues.
1) should I reversion all the modules in the system to get rid of the residual $SUN-Revision$ stuff? At the moment I just work round it.
2) should module names continue to be a single global namespace? Won't this lead to us going down the icky Squeak path of having initials everywhere? eg RAClassName? Or is it less important because although modules must be globally unique, object paths from the lobby don't have to be?
More information about the Self-interest