[self-interest] Saving objects with Hackney

Russell Allen mail at russell-allen.com
Mon Jan 3 23:18:39 UTC 2011


Sorry, being opaque :)

It's a reference to http://www.erights.org/   http://en.wikipedia.org/wiki/E_(programming_language)

Croquet's Islands are a sort of Smalltalk derivative.

On 04/01/2011, at 9:00 AM, Josh Flowers wrote:

> 
> Quick question as I digest this - what's E Vat niceness?
> 
>> 
>> 
>> The VM holds references to a number of objects in the system. From http://docs.selflanguage.org/vmref.html#the-initial-self-world this includes nil, true, false, prototype string, mirrors etc.
>> 
>> This complicates having completely separate worlds living in the one vm. For example, if you read from stdin the vm has to create a string object representing the input. To do this, it needs to know what a string is - this makes it tricky if there are multiple worlds all with different implementations of string (say one with unicode, one without etc)
>> 
>> I'd love separate lobbies because we could possibly get some of the E Vat niceness, but as it stands the single world seems to be a natural level of granularity in Self.  
>> 
>> One way forward would be to make a really nice IPC mechanism and run different worlds in different VMs.  Share nothing, message pass between them. This gets us multicore of sorts. We've got tonnes of memory in modern systems.
>> 
>> Alternatively, create a kernel world which intermediates between the VM and the subworlds. Like L4 microkernels, the subworlds only access the VM primitives by sending messages to the kernel. Each subworld could register its string prototype with the kernel etc.
>> 
>> - Russell
>> 
>> On 03/01/2011, at 8:43 AM, Josh Flowers wrote:
>> 
>>> This sounds great Russell. The transporter was a point of 
>>> unsureness when I worked on the IRC client, so I'll be looking at 
>>> your code with interest.
>>> 
>>> Your e-mail brings up a question I've been pondering (when I have 
>>> time to ponder Self) - could we load multiple snapshots into a single 
>>> running VM? Last time I played with Squeak it had the concept of 
>>> Projects (least that's what I think they were called) which were 
>>> almost like separate worlds within a single VM. Is it technically 
>>> possible to do something similar in Self? Is there anything about the 
>>> VM that precludes having multiple, separate lobbies? Or traits? 
>>> true's and false's?
>>> 
>>> > All the talk about object saving etc inspired me to throw together a rough sketch of a framework for object saving as a exercise in building stuff in Self. The code builds upon the transporter's facilities but ignores modules.
>>> > 
>>> > All it does is take a object root, map out the bounds of the object cluster using a fitness test, then write out the set of objects on the file in a pleasing indented manner. It more or less handles internal loops; but a nice mechanism for that depends on moving the parser from the VM into Self. It has a hardcoded limit of 1000 objects to iterate over, just to make development easier by preventing accidentally iterating over the entire image.
>>> > 
>>> > The current fitness test is simply whether (a) the sub-object has a creatorPath and (b) whether it is a worldMorph. Playing with this is a good illustration of Dave's point that the tricky question is where to stop!
>>> > 
>>> > This is a rough outline of a framework for testing stuff (in particular there aren't any tests and the code is ugly :) - it probably isn't particularly useful.
>>> > 
>>> > Things I missed while writing this: a streams library, a unit testing framework, a modifiable Self parser 
>>> > 
>>> > If you take a clean snapshot and put the attached hackney.self file in the same directory, you can load it by:
>>> > 
>>> > bootstrap read: 'hackney' From: ''
>>> > 
>>> > and then save objects as:
>>> > 
>>> > transporter hackney save: myObject As: fileName
>>> > 
>>> > and load by getting the results of:
>>> > 
>>> > transporter hackney read: fileName
>>> > 
>>> > Have fun, Russell
>>> > 
>>> > 
>>> > 
>>> > 
>>> > ------------------------------------
>>> > 
>>> > Yahoo! Groups Links
>>> > 
>>> > 
>>> > 
>>> 
>>> 
>> 
>> 
>> 
> 
> 
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.selflanguage.org/pipermail/self-interest/attachments/20110104/d20cb265/attachment.html>


More information about the Self-interest mailing list