<br><br><div class="gmail_quote">On Fri, Jan 22, 2010 at 1:32 PM, Stéphane Ducasse <span dir="ltr">&lt;<a href="mailto:stephane.ducasse@inria.fr">stephane.ducasse@inria.fr</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<br>
Hi ralph and eliot<br>
<div class="im"><br>
&gt; Nevertheless there are advantages to both and I wonder to what<br>
&gt; extent I can have my cake and eat it too  (that would be an orapple<br>
&gt; cake I suppose).  I should also point out that my discussion is abstract;<br>
&gt; I am asking if it would have been better if Smalltalk had<br>
&gt; been designed the way I propose and not should some Smalltalk,<br>
&gt; say Squeak, now be modified to be so.<br>
<br>
</div>Yes I think that we can the best of both world. A minimal (but not smaller)<br>
runtime with a good separation between the infrastructure for the runtime<br>
and the loadeble ide and others.<br>
<div class="im"><br>
&gt; The thing, particular to this discussion, about Eclipse that I like<br>
&gt; is that the Eclipse (image I will call it) is separate from the<br>
&gt; application (image I will call it).  In Smalltalk the two images are<br>
&gt; combined.  This means that a lot of code is encorporated<br>
&gt; into your application image that you may not want.<br>
<br>
</div>I imagine that in Pharo in a couple of versions this will be different.<br>
At least this is where we want to go.<br>
<div class="im"><br>
&gt; Of course, before you release your application you can run a<br>
&gt; stripping program or process that strips out code that is not<br>
&gt; used in your application. (I have never done this but my<br>
&gt; understanding is that this is possible.)<br>
<br>
</div>Stripping should not be the process.<br>
<div class="im"><br>
&gt; Never having done this I assume that stripping is not that<br>
&gt; satisfactory because there is much code that cannot be<br>
&gt; stripped out; certainly unused methods and likely unused<br>
&gt; classes as well; the dynamic nature of Smalltalk means that<br>
&gt; much necessary information to determine that a method or<br>
&gt; class is not used is not available so such methods and classes<br>
&gt; must be included in the application release.<br>
<br>
</div>Stripping in VW was not satisfactory not really easy.<br></blockquote><div><br></div><div>It was not easy precisely because it had to strip out its own tools.  If the tools are remote then stripping is much easier.  I&#39;m not proposing stripping as a standard step in deploying applications.  I;m proposing stripping via remote tools as a way to get down to a small kernel image.  Part of the difficulty in producing the small kernel image is needing to keep tools around so that the development system keeps working.  This is all much easier if that development system is remote.</div>
<div><br></div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im"><br>
&gt; Some may argue, that with all the memory processing power<br>
&gt; available today, who cares; but I care.  For example, I would<br>
&gt; like to be able to put a Smalltalk application into a linux pipe<br>
&gt; as in:<br>
&gt;<br>
&gt; a | b &gt; c<br>
&gt;<br>
&gt; where a or b or both are applications written in Smalltalk.<br>
<br>
</div>me too :)<br>
<div class="im"><br>
&gt; Similarly I would like to use Smalltalk applications in bash (Linux)<br>
&gt; shells scripts or use it in other scripting languages. So it<br>
&gt; may be important that my image not be unnecessarily<br>
&gt; large as getting it started may take longer than what it<br>
&gt; does once it is started.<br>
<br>
</div>Yes we want that too. So any help in that direction is welcomed.<br>
<div class="im"><br>
&gt; Of course I could use GNU Smalltalk for this but is it really<br>
&gt; necessary that I know/use two smalltalks?<br>
&gt;<br>
&gt; I think the Eclipse model suggests an improvement to Smalltalk.<br>
&gt; It seems to me that when you run Smalltalk ideally you would<br>
&gt; run two images.  One would be the development environment image<br>
&gt; and the other would be the application image.  When you started<br>
&gt; a new project you would choose from a selection of start images<br>
&gt; each including some subset of the development classes you<br>
&gt; expect to need.<br>
<br>
</div>for minimal image to work, we need a way to manage parts<br>
this is why metacello is important. Because you want to have ways to build<br>
coherent images out of components with dependencies.<br>
This is just because of that that we did not started to heavily remove packages from the image.<br>
<div class="im"><br>
&gt; I can&#39;t speak in detail to the Firewall work done at Digitalk by people like Steve Messick, but they did get stuff done in the late 90&#39;s, although I don&#39;t think anything was productised.  I think they made the mistake of focussing on being able to produce very small executables rather than just separating the development and deployment images.  I think Steve was able to produce a tiny executable that only contained SmallInteger and hence was able to eliminate tagged pointers and method lookup.  But the focus on optimization was I think a step too far.<br>

<br>
</div>+ 1.<br>
<div class="im"><br>
&gt; One thing I remember was that the communications stub in the deployment image was in the VM, not in Smalltalk code, again I think a mistake. Can anyone from Digitalk put flesh on these bones?<br>
</div>?<br>
<br>
eliot what is the communications stub<br></blockquote><div><br></div><div>Is is some code that sits on a socket in the target image and receives remote message send requests from the UI image, evaluates them and returns the results.  So it is a minimal communications port through which the UI can send messages to objects in the target image.  It should be written entirely in Smalltalk for flexibility and simplicity.  We don&#39;t need to get to 100&#39;s of bytes of image (e.g. being able to implement the unix mv command) we need to get down below 1Mb.  </div>
<div><br></div><div>I think Craig has such a remote messaging scheme in Spoon.</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">&gt; We spent a lot of time discussing doing this in the VisualWorks team about 10 years ago but as far as I&#39;m aware none of it was realised.  Splitting tools UIs from the image under development (the target image) was a major design goal behind OpenTalk, the distributed messaging framework that Xu Wang did.  We had the idea of the Model in an MVC triad being the interface between the UI and target images, the natural point at which one would define an API narrow enough to be efficiently distributed.  If the API is designed appropriately one would be exchanging symbols (class names, selectors etc) not complex objects (classes, compiled methods) and that because symbols and numbers are immutable they can be passed by value.<br>

&gt;<br>
&gt; We had the idea of the model being split in two, one half being specific to a tool and the same whether one was in a single image or in the ui/target pair, and the other half being an adaptor to either the local image or the remote target.  This adaptor would have sat between a model and some complex object graph (like the class hierarchy) and defined the entire API through which the object graph was accessed, narrowing the interface to make it suitable for distribution, and doumenting the interface to make it easier to understand.  Vassili named these things between the model and an object graph TTIBs for &quot;The Things In Between&quot;.<br>

<br>
</div>Was using distribution just one way to make sure that your two systems were decoupled?<br>
Because we could achieve the same using seaside? or<br></blockquote><div><br></div><div>Exactly.  The TTIB serves as a specification and a filter.  But it is independent of the transport.  Seaside is a valid transport.  If things are done right one can have many different kinds of UI.  But one is making the choice that the transport is Smalltalk messages over some non-Smalltalk stream.  No one is contemplating using SOAP or CORBA or... (I hope).</div>
<div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im"><br>
&gt; We very much wanted to produce a set of tools in a tools UI image that could be targetted either at itself or at a remote target, and wanted to be able to attach the tools image to a remote target dynamically (which we called &quot;dynamic capitation&quot;, for dynamically gaining a head) so that one could have full debuggability on a remote image deployed in the field.<br>

<br>
</div>:)<br>
I would really like to know what are the issue at the level of the Display.... VM code. What are the existing hypotheses<br>
that have to be broken. Like global access to sensor or<br></blockquote><div><br></div><div>Yes, lots of things break potentally.  Transcript, self confirm: etc.  Part of the challenge is in coming up with &quot;pluggable&quot; replacements.  So that for example Transcript in the target image is something that sends its output to stdout until one attaches a tools UI, at which it becomes something that sends its output to the Transcript in the UI image.  This takes some thought :)</div>
<div><br></div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">&gt; Alas we never managed to get the priority of the project high enough to actually commit major resources to it.  There were always more pressing more mundane things to do.  Frustration at not doing things like this was in part behind my leaving Cincom.  Xu got quite far with a prototype, demonstrating things like a distributed inspector that allowed one to walk though an object graph spanning more than one image.  The inspector would change colour to indicate which machine the current object was one.<br>

&gt;<br>
&gt;<br>
&gt; Personally I think that Smalltalk is the ideal vehicle for this kind of approach.  We have lightweight remote messaging which is relatively easy to implement.  We have UI architectures which are relatively well-decomposed and amenable to distribution.  We have a reified exception system which is not pushed down into hidden execution machinery and which has resume semantics.  We now have a much faster much more reliable internet.  We could relatively easily add things like delegation which can enable interesting interleaving of tools and target images (see below).  I think we could have something truly revolutionary, the ability to interact with a remote headless image that contains no development tools or UI frameworks and only a relatively small communications module (remote messaging interface).  This would enable us to get to images of a few 10s or 100s of kilobytes.  I fervently hope you work on this.  Lots of people want this.  I was reading Colin&#39;s Thin Air pages on wiresong yesterday and what he wants is realised by this.<br>

<br>
</div>Yes this would be good to have that.<br>
I think that cleaning the left over of years of experimentations (which we started with 3.6 Kernel Cleaning project<br>
and continue in 3.9 and now is taking a large part in current pharo) is the first phase so that we can<br>
make sure kind of system happening.<br>
<div class="im"><br>
&gt; If you do work on this remember your goals.  The most important thing is incremental deliverables and useful progress.  Don&#39;t focus on whizzy optimisations or cool demos (such as the inspector changing colour).  Dn&#39;t focus on arbitrarily complex topologies of remote images.  Instead focus on building a robust, well-engineered remote tools framework that just allows one to do what one can do today in a browser and debugger, but remotely between two images.<br>

<br>
</div>We were thinking just about that with marcus and noury for mariano PhD.<br>
this could be used to debug remote image running on robots.<br>
<div class="im"><br>
&gt; I would start with browser, debugger and stripper, where stripper would be something that allowed you to eliminate code from the target image using the UI image to discover what was there and what was needed or not, i.e. remote stripping, not the much trickier auto-stripping.<br>

&gt;<br>
&gt; On delegation I think one really cool thing is to wrap remote objects with local development-only code.  In a deployed image I would expect there to be no inspectorClass methods or debugPrintOn: messages etc.  The target is lean and mean.  Anything not needed for deployment except that which supports adequate remote messaging is absent.  So one wants to be able to add methods that add debugging features to remote objects, and delegation is the way.  If the local handle on a remote object is wrapped by a delegate, the delegate can implement the debugging methods.  Catching doesNotUnderstand: in the target mage can allow one to intercept computations in the target and resume them in the development image.  So when connecting a tools image to a target one would layer tools and UI code upon objects in the target but that code would reside only in the tools image.<br>

&gt;<br>
&gt; Naming conventions in packaging, like splitting a Foo package into Foo-Deployment &amp; Foo-Development could help in making this kind of split easy to navigate and conceptualise.  So after producing the tools/target split I would next focus on packaging tools, including analysis of call graphs etc to help automating the deployment/development split.<br>

<br>
</div>You forget deliver often :)<br></blockquote><div><br></div><div>Right!</div><div><br></div><div>best</div><div>Eliot</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

<br>
<br>
<br>
<br>
<br>
<br>
_______________________________________________<br>
Pharo-project mailing list<br>
<a href="mailto:Pharo-project@lists.gforge.inria.fr">Pharo-project@lists.gforge.inria.fr</a><br>
<a href="http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project" target="_blank">http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project</a><br>
</blockquote></div><br>