<br><br><div class="gmail_quote">On Tue, Mar 2, 2010 at 1:20 PM, Nicolas Cellier <span dir="ltr">&lt;<a href="mailto:nicolas.cellier.aka.nice@gmail.com">nicolas.cellier.aka.nice@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;">
2010/3/2 Igor Stasenko &lt;<a href="mailto:siguctua@gmail.com">siguctua@gmail.com</a>&gt;:<br>
<div><div></div><div class="h5">&gt; On 2 March 2010 22:00, Nicolas Cellier<br>
&gt; &lt;<a href="mailto:nicolas.cellier.aka.nice@gmail.com">nicolas.cellier.aka.nice@gmail.com</a>&gt; wrote:<br>
&gt;&gt; 2010/3/2 Andreas Raab &lt;<a href="mailto:andreas.raab@gmx.de">andreas.raab@gmx.de</a>&gt;:<br>
&gt;&gt;&gt; On 3/2/2010 8:55 AM, Igor Stasenko wrote:<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; If you remember previous discussion about this, i proposed to use<br>
&gt;&gt;&gt;&gt; Smalltalk, which having a &#39;globals&#39; ivar , which is a SystemDictionary<br>
&gt;&gt;&gt;&gt; so, that Smalltalk&gt;&gt;at: x<br>
&gt;&gt;&gt;&gt; implemented as<br>
&gt;&gt;&gt;&gt;   globals at: x<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; then Smalltalk global is an instance of SmalltalkImage , equal to<br>
&gt;&gt;&gt;&gt; SmalltalkImage current.<br>
&gt;&gt;&gt;&gt; And SystemDictionary is just a dictionary without any extra utility<br>
&gt;&gt;&gt;&gt; methods.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; This is option #2 below. (Sorry I didn&#39;t recall your post; otherwise I<br>
&gt;&gt;&gt; would&#39;ve named it the Igor variant :-)<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Cheers,<br>
&gt;&gt;&gt;  - Andreas<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; On 2 March 2010 18:32, Chris Muller&lt;<a href="mailto:asqueaker@gmail.com">asqueaker@gmail.com</a>&gt;  wrote:<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt; Smalltalk is a SystemDictionary, which is-a Dictionary.  This suggests<br>
&gt;&gt;&gt;&gt;&gt; Smalltalk&#39;s main responsibility is mapping the list of global names to<br>
&gt;&gt;&gt;&gt;&gt; their global objects, and providing access to them by direct<br>
&gt;&gt;&gt;&gt;&gt; reference.<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt; I don&#39;t understand why would want to commingle a bunch of utility<br>
&gt;&gt;&gt;&gt;&gt; methods in with this primary (global name mapping) responsibility..?<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt; What is the problem exactly?<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt; Also, I&#39;m curious about Cuis compatibility; is this really realistic<br>
&gt;&gt;&gt;&gt;&gt; or important?  Why is it important?  This would seem to be a<br>
&gt;&gt;&gt;&gt;&gt; relatively superficial difference with Cuis and other Smalltalk&#39;s, so<br>
&gt;&gt;&gt;&gt;&gt; I hope we will base decisions on what we think is the &quot;right thing&quot; to<br>
&gt;&gt;&gt;&gt;&gt; do rather than compatibility with something else that might not<br>
&gt;&gt;&gt;&gt;&gt; matter..<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt; On Mon, Mar 1, 2010 at 10:08 PM, Andreas Raab&lt;<a href="mailto:andreas.raab@gmx.de">andreas.raab@gmx.de</a>&gt;<br>
&gt;&gt;&gt;&gt;&gt;  wrote:<br>
&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt; Folks -<br>
&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt; I was just trying to load some other code and once too many I got bitten<br>
&gt;&gt;&gt;&gt;&gt;&gt; by<br>
&gt;&gt;&gt;&gt;&gt;&gt; this silly SmalltalkImage current vs. Smalltalk stuff, so I&#39;ll fix it<br>
&gt;&gt;&gt;&gt;&gt;&gt; now.<br>
&gt;&gt;&gt;&gt;&gt;&gt; The only question is which way. There are two alternatives which achieve<br>
&gt;&gt;&gt;&gt;&gt;&gt; the<br>
&gt;&gt;&gt;&gt;&gt;&gt; goal of &quot;SmalltalkImage current == Smalltalk&quot;:<br>
&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt; 1) The Cuis variant: Move all the code back to SystemDictionary;<br>
&gt;&gt;&gt;&gt;&gt;&gt; implement<br>
&gt;&gt;&gt;&gt;&gt;&gt; SmalltalkImage current as ^Smalltalk.<br>
&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt; Pro: Compatible with Cuis.<br>
&gt;&gt;&gt;&gt;&gt;&gt; Con: Lack of separation of concerns.<br>
&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt; 2) The inverse Cuis variant: Move all the code from SystemDictionary to<br>
&gt;&gt;&gt;&gt;&gt;&gt; SmalltalkImage; add a &#39;globals&#39; variable (populated by an instance of<br>
&gt;&gt;&gt;&gt;&gt;&gt; SystemDictionary) and convert everything roughly like this:<br>
&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt;        SmalltalkImage current globals: Smalltalk.<br>
&gt;&gt;&gt;&gt;&gt;&gt;        Smalltalk := SmalltalkImage current.<br>
&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt; Pro: Better separation of concerns.<br>
&gt;&gt;&gt;&gt;&gt;&gt; Con: Different from Cuis.<br>
&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt; I really don&#39;t care which way we do it; all I want is to get out of the<br>
&gt;&gt;&gt;&gt;&gt;&gt; mess<br>
&gt;&gt;&gt;&gt;&gt;&gt; we&#39;ve created by introducing &quot;SmalltalkImage current&quot;.<br>
&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt; If you have an opinion, voice it, otherwise I&#39;ll just pick one.<br>
&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt; Cheers,<br>
&gt;&gt;&gt;&gt;&gt;&gt;  - Andreas<br>
&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; What if instead of writing (SmalltalkImage current) you would just say<br>
&gt;&gt; (Smalltalk vm).<br>
&gt;&gt; Would this be tolerably short ?<br>
&gt;&gt; Would the compatibility layer be short enough ?<br>
&gt;&gt;<br>
&gt;&gt; Squeak 3.8: SystemDictionary&gt;&gt;vm ^ self<br>
&gt;&gt; Squeak 3.9 and upper: SystemDictionary&gt;&gt;vm ^ SmalltalkImage current<br>
&gt;&gt;<br>
&gt;&gt; I took a look, and except source code management, a majority of<br>
&gt;&gt; SmalltalkImage methods are related to VM and command line.<br>
&gt;&gt; We could as well move messages to SmalltalkVM and just let a<br>
&gt;&gt; SmalltalkImage class current hook<br>
&gt;&gt; But I don&#39;t think it is necessary.<br>
&gt;&gt;<br>
&gt;&gt; What do you think ?<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt; I think we should define a distinctive roles for these parts and make<br>
&gt; sure none of them overlap.<br>
&gt; &#39;vm&#39; is for tuning/poking GC options/attributes and various<br>
&gt; interpreter specific stuff.<br>
&gt; &#39;system&#39; is for poking with host system options/attributes<br>
&gt; &#39;image&#39; is for poking with language-wide (global) stuff &amp; utils<br>
&gt;<br>
&gt; then , for any behavior it would be clear, what entity is responsible<br>
&gt; for it, not like currently<br>
&gt; when you don&#39;t know what is better &#39;Smalltalk&#39; or &#39;SmalltalkImage current&#39;<br>
&gt;<br>
<br>
</div></div>like this ?<br>
<br>
Smalltalk vm version<br>
Smalltalk vm extraMemory<br>
Smalltalk vm listLoadedModules<br>
<br>
But then:<br>
Smalltalk vm allocationCount<br>
or Smalltalk memory allocationCount ?<br>
or Smalltalk gc allocationCount ?<br>
<br>
Smalltalk host windowSystem<br>
Smalltalk host platformName<br>
Smalltalk host osVersion<br>
<br>
Smalltalk commandLine vmPath.<br>
Smalltalk commandLine imagePath.<br>
Smalltalk commandLine documentPath.<br>
Smalltalk commandLine optionNumber: 2.<br>
Smalltalk commandLine options.<br>
Smalltalk commandLine argumentNumber: 1.<br>
Smalltalk commandLine arguments.<br>
<br>
Smalltalk sourceCode condenseChanges.<br></blockquote><div><br></div><div>This is very nice.  So...</div><div><br></div><div>Smalltalk query allImplementorsOf: #printOn:</div><div>Smalltalk query browseSendersOf: #ensure:</div>
<div><br></div><div>?</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
...<br>
<br>
<br>
&gt; --<br>
<div><div></div><div class="h5">&gt; Best regards,<br>
&gt; Igor Stasenko AKA sig.<br>
&gt;<br>
&gt;<br>
<br>
</div></div></blockquote></div><br>