<br><br><div class="gmail_quote">On Tue, Aug 25, 2009 at 12:35 PM, Igor Stasenko <span dir="ltr">&lt;<a href="mailto:siguctua@gmail.com">siguctua@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div><div></div><div class="h5">2009/8/25 Eliot Miranda &lt;<a href="mailto:eliot.miranda@gmail.com">eliot.miranda@gmail.com</a>&gt;:<br>
&gt;<br>
&gt;<br>
&gt; On Tue, Aug 25, 2009 at 3:57 AM, Igor Stasenko &lt;<a href="mailto:siguctua@gmail.com">siguctua@gmail.com</a>&gt; wrote:<br>
&gt;&gt;<br>
&gt;&gt; 2009/8/25 Eliot Miranda &lt;<a href="mailto:eliot.miranda@gmail.com">eliot.miranda@gmail.com</a>&gt;:<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; On Wed, Aug 19, 2009 at 6:56 PM, Igor Stasenko &lt;<a href="mailto:siguctua@gmail.com">siguctua@gmail.com</a>&gt;<br>
&gt;&gt; &gt; wrote:<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; 2009/8/20 Eliot Miranda &lt;<a href="mailto:eliot.miranda@gmail.com">eliot.miranda@gmail.com</a>&gt;:<br>
&gt;&gt; &gt;&gt; &gt; Hi Igor,<br>
&gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt; &gt; On Wed, Aug 19, 2009 at 6:00 PM, Igor Stasenko &lt;<a href="mailto:siguctua@gmail.com">siguctua@gmail.com</a>&gt;<br>
&gt;&gt; &gt;&gt; &gt; wrote:<br>
&gt;&gt; &gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; &gt;&gt; 2009/8/20 Jecel Assumpcao Jr &lt;<a href="mailto:jecel@merlintec.com">jecel@merlintec.com</a>&gt;:<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt; Colin Putney wrote on Wed, 19 Aug 2009 14:25:21 -0700:<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt; On 19-Aug-09, at 10:15 AM, Jecel Assumpcao Jr wrote:<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt; &gt; For example, I would far prefer to<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt; &gt; see Squeak move to a binary based development model (I would<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt; &gt; mention<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt; &gt; Projects and Etoys here) than the current source based things<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt; &gt; we<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt; &gt; are<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt; &gt; doing (trunk, bob or whatever).<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt; Forgive me for seizing on a throw-away comment like this, but<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt; would<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt; you mind expanding on this a bit? Are you saying you prefer<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt; something<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt; spoonish, where CompiledMethods  are passed directly from image<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt; to<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt; image? Something else?<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt; Heh, I got asked about this on IRC as well. Though I had actually<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt; started to explain this a little in the original email, I ended up<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt; deleting it to keep on topic. With a new subject line I don&#39;t feel<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt; I<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt; have to worry about that. Some details about this (with a few<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt; drawings)<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt; can be found in the Chunky Squeak wiki page:<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt; <a href="http://wiki.squeak.org/squeak/584" target="_blank">http://wiki.squeak.org/squeak/584</a><br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt; The idea is to be more like the Etoys users which can load binary<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt; projects containing not only the code they need but also hand<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt; crafted<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt; objects which have no source (like a drawing, some nested Morphs<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt; or<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt; even<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt; some text). This is very simplistic compared to Spoon, and my<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt; proposal<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt; was even more simplistic. In particular, this doesn&#39;t handle the<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt; case<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt; where any changes to bytecodes or object format are needed.<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; &gt;&gt; The central question, which arising immediately is, what is the<br>
&gt;&gt; &gt;&gt; &gt;&gt; credible way(s) to reproduce such artifacts?<br>
&gt;&gt; &gt;&gt; &gt;&gt; When we having a source code, we could (re)compile it on a different<br>
&gt;&gt; &gt;&gt; &gt;&gt; system. But what you propose to do with pure binary data, a soup of<br>
&gt;&gt; &gt;&gt; &gt;&gt; objects, in respect that it is incredibly hard to understand, what<br>
&gt;&gt; &gt;&gt; &gt;&gt; bits you need and what&#39;s not, in case if you need to do clean-up ,<br>
&gt;&gt; &gt;&gt; &gt;&gt; refactor, rewrite and simply analyze what is happening.<br>
&gt;&gt; &gt;&gt; &gt;&gt; This is what making a huge difference, for instance, between<br>
&gt;&gt; &gt;&gt; &gt;&gt; applications with open source code and applications shipped in<br>
&gt;&gt; &gt;&gt; &gt;&gt; binary<br>
&gt;&gt; &gt;&gt; &gt;&gt; form - you can only report bugs, but can&#39;t realy make any<br>
&gt;&gt; &gt;&gt; &gt;&gt; suggestions<br>
&gt;&gt; &gt;&gt; &gt;&gt; about what happening.<br>
&gt;&gt; &gt;&gt; &gt;&gt; I don&#39;t think that developers of Squeak should be victims of such<br>
&gt;&gt; &gt;&gt; &gt;&gt; situation(s).<br>
&gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt; &gt;     it is possible to have your cake and eat it too.  One can create<br>
&gt;&gt; &gt;&gt; &gt; a<br>
&gt;&gt; &gt;&gt; &gt; binary format that includes source and includes the meta-source for<br>
&gt;&gt; &gt;&gt; &gt; its<br>
&gt;&gt; &gt;&gt; &gt; creation.  But including a binary representation allows much faster<br>
&gt;&gt; &gt;&gt; &gt; loading,<br>
&gt;&gt; &gt;&gt; &gt; loading without a<br>
&gt;&gt; &gt;&gt; &gt; compiler, and source hiding if one choses not to include the source.<br>
&gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt; &gt; There are other advantages, such as not cluttering up the changes file when one loads a package  In the VW parcel system, to which I added source management, we replaced the SourceFiles with a SourceFileManager whose job was to manage the sources and changes file and an arbitrary number of source files for parcels, the binary format.  In<br>

&gt;&gt; &gt;&gt; &gt; the parcel file the source pointers of compiled methods are the<br>
&gt;&gt; &gt;&gt; &gt; positions of<br>
&gt;&gt; &gt;&gt; &gt; their source in the parcel source file.  When one loads a parcel the<br>
&gt;&gt; &gt;&gt; &gt; SourceFileManager adds the file to its set of managed files and<br>
&gt;&gt; &gt;&gt; &gt; assigns<br>
&gt;&gt; &gt;&gt; &gt; an<br>
&gt;&gt; &gt;&gt; &gt; index for the source file.  The parcle loader then swizzles all the<br>
&gt;&gt; &gt;&gt; &gt; source<br>
&gt;&gt; &gt;&gt; &gt; pointers so that they include the source file index along with the<br>
&gt;&gt; &gt;&gt; &gt; position.<br>
&gt;&gt; &gt;&gt; &gt;  So accessing the source for a method loaded form a parcel accesses<br>
&gt;&gt; &gt;&gt; &gt; that<br>
&gt;&gt; &gt;&gt; &gt; parcel&#39;s source file.  We used a floating-point like format for<br>
&gt;&gt; &gt;&gt; &gt; source<br>
&gt;&gt; &gt;&gt; &gt; pointers, where the exponent was the source file index, and the<br>
&gt;&gt; &gt;&gt; &gt; mantissa<br>
&gt;&gt; &gt;&gt; &gt; was<br>
&gt;&gt; &gt;&gt; &gt; the position in the file.<br>
&gt;&gt; &gt;&gt; &gt; We didn&#39;t create a single file format, having two separate files for<br>
&gt;&gt; &gt;&gt; &gt; binary<br>
&gt;&gt; &gt;&gt; &gt; and source, which is probably a mistake.  A format with a short<br>
&gt;&gt; &gt;&gt; &gt; header,<br>
&gt;&gt; &gt;&gt; &gt; followed by source, followed by binary, followed by metasource, would<br>
&gt;&gt; &gt;&gt; &gt; be<br>
&gt;&gt; &gt;&gt; &gt; easier to manage than three separate files.<br>
&gt;&gt; &gt;&gt; &gt; We didn&#39;t include any metasource, but we did include pre-read, load<br>
&gt;&gt; &gt;&gt; &gt; and<br>
&gt;&gt; &gt;&gt; &gt; unload actions.  I did a very bad job on version numbering and<br>
&gt;&gt; &gt;&gt; &gt; prerequisite<br>
&gt;&gt; &gt;&gt; &gt; selection.<br>
&gt;&gt; &gt;&gt; &gt; That&#39;s not the whole story but enough to start answering your<br>
&gt;&gt; &gt;&gt; &gt; question.<br>
&gt;&gt; &gt;&gt; &gt;  If<br>
&gt;&gt; &gt;&gt; &gt; there is a well-defined definition of the objects in a package and<br>
&gt;&gt; &gt;&gt; &gt; that<br>
&gt;&gt; &gt;&gt; &gt; definition is included in the package as metasource, then one can<br>
&gt;&gt; &gt;&gt; &gt; comprehend<br>
&gt;&gt; &gt;&gt; &gt; the binary package&#39;s contents by examining the metasource and can<br>
&gt;&gt; &gt;&gt; &gt; reproduce<br>
&gt;&gt; &gt;&gt; &gt; creating the package, provided that the tools are careful to impose<br>
&gt;&gt; &gt;&gt; &gt; ordering, etc.<br>
&gt;&gt; &gt;&gt; &gt; best<br>
&gt;&gt; &gt;&gt; &gt; Eliot<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; I think you inevitably made wrong decisions, because you went this way<br>
&gt;&gt; &gt;&gt; by allowing an<br>
&gt;&gt; &gt;&gt; arbitrary binary data , held by package.<br>
&gt;&gt; &gt;&gt; In such situations it is much more easier to make a mistakes.<br>
&gt;&gt; &gt;&gt; But sure, one who&#39;s making no mistakes is one who doing nothing :)<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; We didn&#39;t disallow representation of arbitrary data but we also didn&#39;t<br>
&gt;&gt; &gt; support it.  The only thing the Parcel system supports (as in the tool<br>
&gt;&gt; &gt; set,<br>
&gt;&gt; &gt; rather than what one can extend the framework to do in specific<br>
&gt;&gt; &gt; circumstances) is to represent code, which it does very well.<br>
&gt;&gt; &gt; What are these mistakes?  Can you be specific?  I think the parcel<br>
&gt;&gt; &gt; system<br>
&gt;&gt; &gt; has been a major success.  VW is now deployed as a system of components,<br>
&gt;&gt; &gt; the<br>
&gt;&gt; &gt; base image and a much larger suite of parcels.  Parcels are not tied to<br>
&gt;&gt; &gt; a<br>
&gt;&gt; &gt; particular version or implementation and yet are still fast to publish<br>
&gt;&gt; &gt; and<br>
&gt;&gt; &gt; load.  What&#39;s not to like?<br>
&gt;&gt;<br>
&gt;&gt; I referred mainly to your own statements about mistake(s).<br>
&gt;<br>
&gt; Ah, ok,  Sorry :)<br>
&gt;<br>
&gt;&gt;<br>
&gt;&gt; I don&#39;t know about parcels so much to tell exactly where is the flaws.<br>
&gt;&gt; I&#39;m still wondering, how you could unload a parcel if its not longer<br>
&gt;&gt; needed, but<br>
&gt;&gt; there are still object(s) which used/created by parcel sitting in image.<br>
&gt;<br>
&gt; Smalltalk has this problem with or without binary loading; they&#39;re called<br>
&gt; obsolete classes :)  However, the problem of knowing what to remove when the<br>
&gt; user says &quot;unload&quot; means that a loaded parcel requires a data structure that<br>
&gt; names the classes and methods it loaded.  In addition we maintain overrides,<br>
&gt; the older versions of methods and class definitions, in a stack, so that<br>
&gt; these can be restored when unloading a parcel.  I made lots of mistakes here<br>
&gt; (not allowing the tools to publish a parcel that has code overridden by<br>
&gt; others, not integrating source management and browsing queries with<br>
&gt; overridden code, not compressing the changes correctly with overridden code,<br>
&gt; etc, etc).  Tests would have helped :/<br>
&gt; VW did (does?) test for open instances of applications when we unload a<br>
&gt; parcel so that if the parcel contains a subclass(s) of ApplicationModel<br>
&gt; (VW&#39;s top-level GUI app class) all open applications are tested to see if<br>
&gt; they contain instances of the class(es) and a warning is issued.<br>
&gt;&gt;<br>
&gt;&gt; A basic use case is: developer needs some specific tool (like UI<br>
&gt;&gt; design tool) when he working<br>
&gt;&gt; on application. But at the moment when he ships the application, it is<br>
&gt;&gt; no longer needed.<br>
&gt;<br>
&gt; Right.  I don&#39;t know of an automatic solution, but a good convention is to<br>
&gt; split all packages into a development and deployment pair where<br>
&gt; the deployment half is a prerequisite of the development half.  Sticking to<br>
&gt; the convention and using good names makes it easier to remember to remove<br>
&gt; deevelopment components and to guess which parts of someone else&#39;s<br>
&gt; components are development only.<br>
<br>
</div></div>Yes, and this is what i really missing in smalltalk-80 based<br>
environments: distinction between development<br>
and deployment modes &amp; models.<br>
It would be cool to have some basic things to behave different when in<br>
deployed mode (like preventing access &amp; data overrides).<br>
The main problem in open system (such as smalltalk object memory) is<br>
that when something goes wrong, often you<br>
having two choices: reboot the system or debug and fix the problem in<br>
a living environment.<br>
Often, none of the choices is acceptable, because if we are talking<br>
about end-user application, we don&#39;t expect that<br>
user is able to debug &amp; fix the issue. As well as rebooting an image<br>
means loss of data and/or interruption of serving other jobs.</blockquote><div><br></div><div>Yes, I agree.  One of the things the headless support in VW allows which is quite nice is taking a shapshot which can then be restarted in a headless mode for debugging.  This can easily be mailed or ftp&#39;ed back for analysis.</div>
<div><br></div><div>Not quite the same, but very neat:  The other day at Qwaq Craig Latta had a VM crash while running in a Parallels Linux VM under gdb.  He was able to give me a copy of the VM snapshot at the point where gdb stopped the process, giving me the opportunity to debug the live app at my leisure.  A cool idea.</div>
<div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><br>
<br>
But, if system modelled in modular layers , like kernel -&gt; services -&gt;<br>
interfaces -&gt; working set,  then things<br>
would be much easier to handle.</blockquote><div><br></div><div>Yes, yes, yes!!  The system should be like an onion where each layer of the onion is a set of interlocking techtonic plates of modules of functionality.</div>
<div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><br>
<div class="im"><br>
&gt; I added a bulk instancesOf primitive that answered all instances of an Array<br>
&gt; of classes that my colleague Steve Dahl wanted to use in instance migration<br>
&gt; on class redefinition.  This could be used to look for all instances of the<br>
&gt; classes defined by a parcel prior to unload.  Do a GC, collect all instaces<br>
&gt; of classes defined (rather than redefined) by a parcel and warn if non-empty<br>
&gt; (if in a dev image).<br>
<br>
</div>I think that independent tiny layers (isles/vats) is the future system<br>
organization in smalltalk-like VMs.<br>
First, it gives the strong answer to question, what belongs to what.<br>
There is no possibility to reference a foreign object<br>
other than by far ref. You can count/enumerate them easily, and this<br>
approach also makes possible to run code in vats concurrently.<br>
The problem here is how to handle the shared behavior, like Arrays,<br>
Collections etc in order to avoid duplication. Since in smalltalk<br>
everything is objects, and so methods &amp; classes too, they can belong<br>
only to a single island/vat, and therefore , only owning island can<br>
manipulate with it. This creates a major bottleneck in effective<br>
implementation of concurrently (and independently) running the code.<br>
Trade space for speed? Allow each island to have own Array class with<br>
own implementation?<br>
This question remains open for me.</blockquote><div><br></div><div>Yes, this is a cool radical idea that I haven&#39;t got my head around yet.  I need to think about this at length.  The obvious approach to the duplication is copy-on-write where any modifications to the root Array class get propagated to the copies, assuming there is some hierarchical control organization.  I think this approach is taken in Alex&#39;s worlds where modifications to a parent world are seen my children.  But then the merge problem rears its head when trying to propagate modifications to a child that has made its own local modifications in the same region.</div>
<div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><br>
<div class="im"><br>
&gt;&gt;<br>
&gt;&gt; &gt;&gt; Obviously one of the side of such problem is uniform object memory,<br>
&gt;&gt; &gt;&gt; where each object could<br>
&gt;&gt; &gt;&gt; reference any other object and limited only by a imagination of people.<br>
&gt;&gt; &gt;&gt; There is no layers or any other means which could establish a certain<br>
&gt;&gt; &gt;&gt; barriers (which we calling a modules)<br>
&gt;&gt; &gt;&gt; in smalltalk.<br>
&gt;&gt; &gt;&gt; It means, that once you integrated the parcel into image, and started<br>
&gt;&gt; &gt;&gt; using it, you may have a hard times trying to unload it.<br>
&gt;&gt; &gt;&gt; It is possible to develop an image as an artifact, which contains both<br>
&gt;&gt; &gt;&gt; binary &amp; sources , but such approach<br>
&gt;&gt; &gt;&gt; having a drawbacks, which we, by the way, trying to overcome nowadays.<br>
&gt;&gt; &gt;&gt; Practice shows that such approach is credible only<br>
&gt;&gt; &gt;&gt; for a small group of individuals, but becomes a bottleneck if you<br>
&gt;&gt; &gt;&gt; adopt such scheme for a wider community.<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; So, i think , that before entering this domain (allowing binary data),<br>
&gt;&gt; &gt;&gt; first we should solve more basic problems of smalltalk &amp; its design -<br>
&gt;&gt; &gt;&gt; modularity, name spaces, layering &amp; etc etc.. Only the we could return<br>
&gt;&gt; &gt;&gt; to original question and solve it.<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; --<br>
&gt;&gt; &gt;&gt; Best regards,<br>
&gt;&gt; &gt;&gt; Igor Stasenko AKA sig.<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; --<br>
&gt;&gt; Best regards,<br>
&gt;&gt; Igor Stasenko AKA sig.<br>
&gt;&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
<br>
<br>
<br>
</div>--<br>
<div><div></div><div class="h5">Best regards,<br>
Igor Stasenko AKA sig.<br>
<br>
</div></div></blockquote></div><br>