<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div></div><div><br></div><div>For fun, here is the transporter hackney object as rendered by itself:</div><div><br></div><div><blockquote type="cite"><div><font class="Apple-style-span" color="#000000">(|{ 'ModuleInfo: Creator: globals transporter hackney.\n' }</font></div><div><font class="Apple-style-span" color="#000000">        { 'ModuleInfo: Module: hackney InitialContents: FollowSlotVisibility: public'</font></div><div><font class="Apple-style-span" color="#000000">        fromFile: n = ( | f. s |</font></div><div><font class="Apple-style-span" color="#000000">            f: os_file openForReading: n.</font></div><div><font class="Apple-style-span" color="#000000">            s: f contents.</font></div><div><font class="Apple-style-span" color="#000000">            f close.</font></div><div><font class="Apple-style-span" color="#000000">            fromString: s).</font></div><div><font class="Apple-style-span" color="#000000">        }</font></div><div><font class="Apple-style-span" color="#000000">        { 'ModuleInfo: Module: hackney InitialContents: FollowSlotVisibility: public'</font></div><div><font class="Apple-style-span" color="#000000">        fromString: s = ( reader copy read: s).</font></div><div><font class="Apple-style-span" color="#000000">        }</font></div><div><font class="Apple-style-span" color="#000000">        { 'Category: serializationModuleInfo: Module: hackney InitialContents: FollowSlot'</font></div><div><font class="Apple-style-span" color="#000000">        hackneyFitnessTest: m = ( </font></div><div><font class="Apple-style-span" color="#000000">            (m = reflect: printer)   ifTrue: [^ true].</font></div><div><font class="Apple-style-span" color="#000000">            (m = reflect: reader)    ifTrue: [^ true].</font></div><div><font class="Apple-style-span" color="#000000">            (m = reflect: registrar) ifTrue: [^ true].</font></div><div><font class="Apple-style-span" color="#000000"><br></font></div><div><font class="Apple-style-span" color="#000000">            m creatorPathIfPresent: [m creatorPath == nullPath] </font></div><div><font class="Apple-style-span" color="#000000">                          IfAbsent: [m isMorph && [m morphTypeName = 'worldMorph'] ]</font></div><div><font class="Apple-style-span" color="#000000">        ).</font></div><div><font class="Apple-style-span" color="#000000">        }</font></div><div><font class="Apple-style-span" color="#000000">        { 'ModuleInfo: Module: hackney InitialContents: FollowSlot'</font></div><div><font class="Apple-style-span" color="#000000">        parent* = traits oddball.</font></div><div><font class="Apple-style-span" color="#000000">        }</font></div><div><font class="Apple-style-span" color="#000000">        { 'ModuleInfo: Module: hackney InitialContents: FollowSlot'</font></div><div><font class="Apple-style-span" color="#000000">        printer = (|{ 'ModuleInfo: Creator: globals transporter hackney printer.\n' }</font></div><div><font class="Apple-style-span" color="#000000">                { 'ModuleInfo: Module: hackney InitialContents: InitializeToExpression: (())'</font></div><div><font class="Apple-style-span" color="#000000">                alreadyPrinted <- nil.</font></div><div><font class="Apple-style-span" color="#000000">                }</font></div><div><font class="Apple-style-span" color="#000000">                { 'ModuleInfo: Module: hackney InitialContents: FollowSlot'</font></div><div><font class="Apple-style-span" color="#000000">                cleanAnnotation: a = ( (a replace: '\n' With: '\\n') replace: '\'' With: '\\\'').</font></div><div><font class="Apple-style-span" color="#000000">                }</font></div><div><font class="Apple-style-span" color="#000000">                { 'ModuleInfo: Module: hackney InitialContents: FollowSlot'</font></div><div><font class="Apple-style-span" color="#000000">                defaultFitnessTest: o = ( </font></div><div><font class="Apple-style-span" color="#000000">                    m creatorPathIfPresent: [m creatorPath == nullPath] </font></div><div><font class="Apple-style-span" color="#000000">                                  IfAbsent: [m isMorph && [m morphTypeName = 'worldMorph'] ]</font></div><div><font class="Apple-style-span" color="#000000">                ).</font></div><div><font class="Apple-style-span" color="#000000">                }</font></div><div><font class="Apple-style-span" color="#000000">                { 'ModuleInfo: Module: hackney InitialContents: FollowSlotVisibility: private'</font></div><div><font class="Apple-style-span" color="#000000">                hackneyFitnessTest: o = ( </font></div><div><font class="Apple-style-span" color="#000000">                    root = o ifTrue: [^ true].</font></div><div><font class="Apple-style-span" color="#000000">                    (root lookupKey: 'hackneyFitnessTest:') isEmpty</font></div><div><font class="Apple-style-span" color="#000000">                      ifTrue: [defaultFitnessTest: o]</font></div><div><font class="Apple-style-span" color="#000000">                       False: [root reflectee hackneyFitnessTest: o]).</font></div><div><font class="Apple-style-span" color="#000000">                }</font></div><div><font class="Apple-style-span" color="#000000">                { 'ModuleInfo: Module: hackney InitialContents: FollowSlot'</font></div><div><font class="Apple-style-span" color="#000000">                indent: i = ( 0 to: i Do: [output: output, '        ']).</font></div><div><font class="Apple-style-span" color="#000000">                }</font></div><div><font class="Apple-style-span" color="#000000">                { 'ModuleInfo: Module: hackney InitialContents: InitializeToExpression: (\'\')'</font></div><div><font class="Apple-style-span" color="#000000">                output <- ''.</font></div><div><font class="Apple-style-span" color="#000000">                }</font></div><div><font class="Apple-style-span" color="#000000">                { 'ModuleInfo: Module: hackney InitialContents: FollowSlot'</font></div><div><font class="Apple-style-span" color="#000000">                parent* = traits clonable.</font></div><div><font class="Apple-style-span" color="#000000">                }</font></div><div><font class="Apple-style-span" color="#000000">                { 'ModuleInfo: Module: hackney InitialContents: FollowSlot'</font></div><div><font class="Apple-style-span" color="#000000">                print = ( </font></div><div><font class="Apple-style-span" color="#000000">                    alreadyPrinted: dictionary copy.</font></div><div><font class="Apple-style-span" color="#000000">                    printObj: root Named: '' Indent: 0.</font></div><div><font class="Apple-style-span" color="#000000">                    output).</font></div><div><font class="Apple-style-span" color="#000000">                }</font></div><div><font class="Apple-style-span" color="#000000">                { 'ModuleInfo: Module: hackney InitialContents: FollowSlotVisibility: public'</font></div><div><font class="Apple-style-span" color="#000000">                printAll: o = ( root: reflect: o. print).</font></div><div><font class="Apple-style-span" color="#000000">                }</font></div><div><font class="Apple-style-span" color="#000000">                { 'ModuleInfo: Module: hackney InitialContents: FollowSlot'</font></div><div><font class="Apple-style-span" color="#000000">                printCoreSlot: s Named: n Indent: i = ( </font></div><div><font class="Apple-style-span" color="#000000">                    indent: i.</font></div><div><font class="Apple-style-span" color="#000000">                    output: output, s longerKeyWithAssigner, ' '.</font></div><div><font class="Apple-style-span" color="#000000">                    printObj: s value Named: (n, ' ', s key) Indent: i + 1).</font></div><div><font class="Apple-style-span" color="#000000">                }</font></div><div><font class="Apple-style-span" color="#000000">                { 'ModuleInfo: Module: hackney InitialContents: FollowSlot'</font></div><div><font class="Apple-style-span" color="#000000">                printObj: r Named: n Indent: i = ( | a |</font></div><div><font class="Apple-style-span" color="#000000">                    "We treat these as unique in Self"</font></div><div><font class="Apple-style-span" color="#000000">                    r isReflecteeInteger ifTrue: [</font></div><div><font class="Apple-style-span" color="#000000">                      output: output, r reflectee printString, '.\n'. ^ self ].</font></div><div><font class="Apple-style-span" color="#000000">                    r isReflecteeMethod ifTrue: [</font></div><div><font class="Apple-style-span" color="#000000">                      output: output, (r evalName indent: i * 8) shrinkwrapped, '.\n'.  </font></div><div><font class="Apple-style-span" color="#000000">                      ^ self ].</font></div><div><font class="Apple-style-span" color="#000000"><br></font></div><div><font class="Apple-style-span" color="#000000">                    "Is this outside object?"</font></div><div><font class="Apple-style-span" color="#000000">                    (hackneyFitnessTest: r) ifFalse: [</font></div><div><font class="Apple-style-span" color="#000000">                      output: output, r evalName, '.\n'. ^ self ].</font></div><div><font class="Apple-style-span" color="#000000"><br></font></div><div><font class="Apple-style-span" color="#000000">                    "Have we been here before?"</font></div><div><font class="Apple-style-span" color="#000000">                    (alreadyPrinted includesKey: r) ifTrue: [</font></div><div><font class="Apple-style-span" color="#000000">                      output: output, '(| r* = transporter carrier registrar. v = \'', (alreadyPrinted at: r), '\'|).\n'. ^self ].</font></div><div><font class="Apple-style-span" color="#000000"><br></font></div><div><font class="Apple-style-span" color="#000000">                    "No? Then let's begin"</font></div><div><font class="Apple-style-span" color="#000000">                    alreadyPrinted at: r Put: n. </font></div><div><font class="Apple-style-span" color="#000000">                    r isReflecteeString ifTrue: [ </font></div><div><font class="Apple-style-span" color="#000000">                      output: output, '\'', r reflectee escaped, '\'.\n'.</font></div><div><font class="Apple-style-span" color="#000000">                      ^ self ].</font></div><div><font class="Apple-style-span" color="#000000">                    r isReflecteeVector ifTrue: [| rs |</font></div><div><font class="Apple-style-span" color="#000000">                      rs: (r reflecteeSizeIfFail: [error: 'Unknown vector size']).</font></div><div><font class="Apple-style-span" color="#000000">                      0 to: rs - 1 Do: [ output: output, '(' ].</font></div><div><font class="Apple-style-span" color="#000000">                      output: output, '(vector copySize: ', rs asString, '\n'.</font></div><div><font class="Apple-style-span" color="#000000">                      0 to: rs - 1 Do: [|:vi |</font></div><div><font class="Apple-style-span" color="#000000">                        indent: i.</font></div><div><font class="Apple-style-span" color="#000000">                        output: output, ') at: ', vi asString, ' Put: '.</font></div><div><font class="Apple-style-span" color="#000000">                        printObj: (r reflecteeMirrorAt: vi IfFail: [error: 'Huh?']) value Named: n Indent: i + 1.</font></div><div><font class="Apple-style-span" color="#000000">                        ].</font></div><div><font class="Apple-style-span" color="#000000">                      indent: i.</font></div><div><font class="Apple-style-span" color="#000000">                      output: output, ') asVector.\n'.</font></div><div><font class="Apple-style-span" color="#000000">                      ^ self].</font></div><div><font class="Apple-style-span" color="#000000"><br></font></div><div><font class="Apple-style-span" color="#000000">                    "We are a simple list of slots, like we should be"</font></div><div><font class="Apple-style-span" color="#000000">                    output: output, '(|'. </font></div><div><font class="Apple-style-span" color="#000000">                      a: cleanAnnotation: (r annotationIfFail: '') asString.</font></div><div><font class="Apple-style-span" color="#000000">                      a == '' ifTrue: [output: output, '\n'] False: [output: output, '{ \'', a, '\' }\n'].</font></div><div><font class="Apple-style-span" color="#000000">                      r do: [| :e | printSlot: e Named: n Indent: i].</font></div><div><font class="Apple-style-span" color="#000000">                    output: output, ('|).\n' indent: i * 8)).</font></div><div><font class="Apple-style-span" color="#000000">                }</font></div><div><font class="Apple-style-span" color="#000000">                { 'ModuleInfo: Module: hackney InitialContents: FollowSlot'</font></div><div><font class="Apple-style-span" color="#000000">                printSlot: s Named: n Indent: i = ( | a |</font></div><div><font class="Apple-style-span" color="#000000">                    s isAssignment ifFalse: [</font></div><div><font class="Apple-style-span" color="#000000">                      a: cleanAnnotation: ((s annotationIfFail: [ ^ printCoreSlot: s Named: n Indent: i ]) asString).</font></div><div><font class="Apple-style-span" color="#000000">                      a = '' ifTrue: [ ^ printCoreSlot: s Named: n Indent: i ].</font></div><div><font class="Apple-style-span" color="#000000">                      indent: i.</font></div><div><font class="Apple-style-span" color="#000000">                      output: output, '{ \'', a, '\'\n'.</font></div><div><font class="Apple-style-span" color="#000000">                      printCoreSlot: s Named: n Indent: i.</font></div><div><font class="Apple-style-span" color="#000000">                      indent: i.</font></div><div><font class="Apple-style-span" color="#000000">                      output: output, '}\n'.</font></div><div><font class="Apple-style-span" color="#000000">                    ]).</font></div><div><font class="Apple-style-span" color="#000000">                }</font></div><div><font class="Apple-style-span" color="#000000">                { 'ModuleInfo: Module: hackney InitialContents: InitializeToExpression: (nil.)'</font></div><div><font class="Apple-style-span" color="#000000">                root <- nil.</font></div><div><font class="Apple-style-span" color="#000000">                }</font></div><div><font class="Apple-style-span" color="#000000">        |).</font></div><div><font class="Apple-style-span" color="#000000">        }</font></div><div><font class="Apple-style-span" color="#000000">        { 'ModuleInfo: Module: hackney InitialContents: FollowSlot'</font></div><div><font class="Apple-style-span" color="#000000">        reader = (|{ 'ModuleInfo: Creator: globals transporter hackney reader.\n' }</font></div><div><font class="Apple-style-span" color="#000000">                { 'ModuleInfo: Module: hackney InitialContents: FollowSlot'</font></div><div><font class="Apple-style-span" color="#000000">                constructInternalReferences = ( | e |</font></div><div><font class="Apple-style-span" color="#000000">                    e: enumerating references copy filterBlock: [|:r| r includesKey: 'r' ].</font></div><div><font class="Apple-style-span" color="#000000">                    (e enumerate: reflect: transporter hackney registrar) </font></div><div><font class="Apple-style-span" color="#000000">                      do: [|:r. no | </font></div><div><font class="Apple-style-span" color="#000000">                        no: (r holder reflectee v evalInContext: (reflect: o) FileName: '<eval>').</font></div><div><font class="Apple-style-span" color="#000000">                        r holder define: (reflect: no).</font></div><div><font class="Apple-style-span" color="#000000">                    ]).</font></div><div><font class="Apple-style-span" color="#000000">                }</font></div><div><font class="Apple-style-span" color="#000000">                { 'ModuleInfo: Module: hackney InitialContents: InitializeToExpression: (())'</font></div><div><font class="Apple-style-span" color="#000000">                o <- 0 _AsObject.</font></div><div><font class="Apple-style-span" color="#000000">                }</font></div><div><font class="Apple-style-span" color="#000000">                { 'ModuleInfo: Module: hackney InitialContents: FollowSlot'</font></div><div><font class="Apple-style-span" color="#000000">                parent* = traits clonable.</font></div><div><font class="Apple-style-span" color="#000000">                }</font></div><div><font class="Apple-style-span" color="#000000">                { 'ModuleInfo: Module: hackney InitialContents: FollowSlot'</font></div><div><font class="Apple-style-span" color="#000000">                parseObject = ( o: s eval).</font></div><div><font class="Apple-style-span" color="#000000">                }</font></div><div><font class="Apple-style-span" color="#000000">                { 'ModuleInfo: Module: hackney InitialContents: FollowSlot'</font></div><div><font class="Apple-style-span" color="#000000">                read: st = ( </font></div><div><font class="Apple-style-span" color="#000000">                    s: st copy. </font></div><div><font class="Apple-style-span" color="#000000">                    parseObject.</font></div><div><font class="Apple-style-span" color="#000000">                    constructInternalReferences.</font></div><div><font class="Apple-style-span" color="#000000">                    o).</font></div><div><font class="Apple-style-span" color="#000000">                }</font></div><div><font class="Apple-style-span" color="#000000">                { 'ModuleInfo: Module: hackney InitialContents: InitializeToExpression: (\'\')'</font></div><div><font class="Apple-style-span" color="#000000">                s <- ''.</font></div><div><font class="Apple-style-span" color="#000000">                }</font></div><div><font class="Apple-style-span" color="#000000">        |).</font></div><div><font class="Apple-style-span" color="#000000">        }</font></div><div><font class="Apple-style-span" color="#000000">        { 'ModuleInfo: Module: hackney InitialContents: FollowSlot'</font></div><div><font class="Apple-style-span" color="#000000">        registrar = (|{ 'ModuleInfo: Creator: globals transporter hackney registrar.\n' }</font></div><div><font class="Apple-style-span" color="#000000">        |).</font></div><div><font class="Apple-style-span" color="#000000">        }</font></div><div><font class="Apple-style-span" color="#000000">        { 'ModuleInfo: Module: hackney InitialContents: FollowSlotVisibility: public'</font></div><div><font class="Apple-style-span" color="#000000">        save: o As: n = ( | f |</font></div><div><font class="Apple-style-span" color="#000000">            f: os_file openForWriting: n.</font></div><div><font class="Apple-style-span" color="#000000">            f write: toString: o.</font></div><div><font class="Apple-style-span" color="#000000">            f close).</font></div><div><font class="Apple-style-span" color="#000000">        }</font></div><div><font class="Apple-style-span" color="#000000">        { 'ModuleInfo: Module: hackney InitialContents: FollowSlotVisibility: public'</font></div><div><font class="Apple-style-span" color="#000000">        toString: o = ( printer copy printAll: o).</font></div><div><font class="Apple-style-span" color="#000000">        }</font></div><div><font class="Apple-style-span" color="#000000">|).</font></div></blockquote></div><div><div><br></div></div><br><div><div>On 04/01/2011, at 10:18 AM, Russell Allen wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">



<div style="background-color: #fff;">
<span style="display:none"> </span>



    <div id="ygrp-text"><div><br class="webkit-block-placeholder"></div><div>Sorry, being opaque :)</div><div><br></div><div>It's a reference to <a href="http://www.erights.org/">http://www.erights.org/</a>   <a href="http://en.wikipedia.org/wiki/E_(programming_language)">http://en.wikipedia.org/wiki/E_(programming_language)</a></div><div><br></div><div>Croquet's Islands are a sort of Smalltalk derivative.</div><br><div><div>On 04/01/2011, at 9:00 AM, Josh Flowers wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">



<div style="background-color: #fff;">
<span> </span>



    <div id="ygrp-text"><div><br class="webkit-block-placeholder"></div><div>Quick question as I digest this - what's E Vat niceness?</div><div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="font-family: Helvetica;"><br><br><div>The VM holds references to a number of objects in the system. From <a href="http://docs.selflanguage.org/vmref.html#the-initial-self-world">http://docs.selflanguage.org/vmref.html#the-initial-self-world</a><span class="Apple-converted-space"> </span>this includes nil, true, false, prototype string, mirrors etc.</div><div><br></div><div>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)</div><div><br></div><div>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.  </div><div><br></div><div>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.</div><div><br></div><div>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.</div><div><br></div><div>- Russell</div><br><div><div>On 03/01/2011, at 8:43 AM, Josh Flowers wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="background-color: rgb(255, 255, 255);"><div id="ygrp-text"><p>This sounds great Russell. The transporter was a point of<span class="Apple-converted-space"> </span><br>unsureness when I worked on the IRC client, so I'll be looking at<span class="Apple-converted-space"> </span><br>your code with interest.<br><br>Your e-mail brings up a question I've been pondering (when I have<span class="Apple-converted-space"> </span><br>time to ponder Self) - could we load multiple snapshots into a single<span class="Apple-converted-space"> </span><br>running VM? Last time I played with Squeak it had the concept of<span class="Apple-converted-space"> </span><br>Projects (least that's what I think they were called) which were<span class="Apple-converted-space"> </span><br>almost like separate worlds within a single VM. Is it technically<span class="Apple-converted-space"> </span><br>possible to do something similar in Self? Is there anything about the<span class="Apple-converted-space"> </span><br>VM that precludes having multiple, separate lobbies? Or traits?<span class="Apple-converted-space"> </span><br>true's and false's?<br><br>> 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.<br>><span class="Apple-converted-space"> </span><br>> 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.<br>><span class="Apple-converted-space"> </span><br>> 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!<br>><span class="Apple-converted-space"> </span><br>> 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.<br>><span class="Apple-converted-space"> </span><br>> Things I missed while writing this: a streams library, a unit testing framework, a modifiable Self parser<span class="Apple-converted-space"> </span><br>><span class="Apple-converted-space"> </span><br>> If you take a clean snapshot and put the attached hackney.self file in the same directory, you can load it by:<br>><span class="Apple-converted-space"> </span><br>> bootstrap read: 'hackney' From: ''<br>><span class="Apple-converted-space"> </span><br>> and then save objects as:<br>><span class="Apple-converted-space"> </span><br>> transporter hackney save: myObject As: fileName<br>><span class="Apple-converted-space"> </span><br>> and load by getting the results of:<br>><span class="Apple-converted-space"> </span><br>> transporter hackney read: fileName<br>><span class="Apple-converted-space"> </span><br>> Have fun, Russell<br>><span class="Apple-converted-space"> </span><br>><span class="Apple-converted-space"> </span><br>><span class="Apple-converted-space"> </span><br>><span class="Apple-converted-space"> </span><br>> ------------------------------------<br>><span class="Apple-converted-space"> </span><br>> Yahoo! Groups Links<br>><span class="Apple-converted-space"> </span><br>><span class="Apple-converted-space"> </span><br>><span class="Apple-converted-space"> </span><br><br></p></div></div></blockquote></div><br><br><br><div width="1" style="color: white;"></div></div></blockquote></div><br><div><br class="webkit-block-placeholder"></div>

    </div>
     

    

</div>



<!-- end group email -->

</blockquote></div><br><div><br class="webkit-block-placeholder"></div>

    </div>
     

    

</div>



<!-- end group email -->

</blockquote></div><br></body></html>