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