SmalltalkImage current

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
32 messages Options
12
Reply | Threaded
Open this post in threaded view
|

Re: SmalltalkImage current

Blake-5
On Sat, 30 Jun 2007 04:38:11 -0700, stephane ducasse  
<[hidden email]> wrote:

> Retrospectively it was also a mistake for me to invest in Squeak and in  
> the future I will see if we can gather a
> group of people that just want to have fun building a better system but  
> not taking the responsibility of the rest.
> Forking is the only way so it should that way.

I don't think that's such a horrible or tragic outcome. Squeak benefits  
greatly from Stephane's work (IMO), so it's a loss in one sense if he  
decides not to work on it, but at the same time, if he's frustrated by  
those who are at cross-purposes, a fork is a good solution.

On the one hand, Smalltalk is meant to be altered in dramatic ways, on the  
other, people are trying to get work done. Those two purposes are going to  
cross at times.

        ===Blake===

Reply | Threaded
Open this post in threaded view
|

Re: SmalltalkImage current

stephane ducasse
In reply to this post by Lukas Renggli
>> I don't wish image go blow . And I think masters time is important  
>> to waste
>> remembering only a particular Squeak is different.
>
> I think it is always worth to also look at other Smalltalk
> implementations. No Smalltalk that I know of puts all its image
> related functionality into Smalltalk the root namespace. They all have
> something like ObjectMemory, ObjectMachine, etc.

Indeed.... but they should be all fools :)

Stef

PS: I'm not happy with SmalltalkImage (may be with Smalltalk pointing  
to it, yes).
But indeed you are right. Other people faced this problem and they  
found an OO solution
to the problem.

Reply | Threaded
Open this post in threaded view
|

Re: SmalltalkImage current

stephane ducasse
In reply to this post by Blake-5
Hi

This is not about tragedy but about energy and beauty. We have always  
been influenced by the vision
of dan than Smalltalk would be so nice and simple than a single guy  
could understand it and more important
to learn from it. Now it was related to the notion that it is better  
to learn from clean code than hacks.

Now if at the end of the day you spent a lot of energy just arguing  
with people then after a while
may be you should to do something else of your evenings.

I think that SmalltalkImage is not the best move we did but as lukas  
remarked other Smalltalk
have similar solutions. Now as I said I think that the architecture  
of Squeak is too old to support
solutions that would nicely support security concerns (separate  
namespace for global.... - I'm not talking
about namespace at the language level just at the infrastructure  
level). So for us cleaning SystemDictionary
was justified if we consider it as a namespace. if you take 3.4 you  
see it more like a aggregate of behavior
and a not so cosy one.

So I'm really questioning myself to know what to do in the future.

Stef

> I don't think that's such a horrible or tragic outcome. Squeak  
> benefits greatly from Stephane's work (IMO), so it's a loss in one  
> sense if he decides not to work on it, but at the same time, if  
> he's frustrated by those who are at cross-purposes, a fork is a  
> good solution.
>
> On the one hand, Smalltalk is meant to be altered in dramatic ways,  
> on the other, people are trying to get work done. Those two  
> purposes are going to cross at times.
>
> ===Blake===
>
>


Reply | Threaded
Open this post in threaded view
|

Re: SmalltalkImage current

ccrraaiigg
In reply to this post by Joshua Gargus-2

Hi all--

     I'd just like to remind everyone again of my design for shared
variables from July of last year[1], implemented in Spoon at that time.
I removed SystemDictionary; each class is responsible for its own name
literal (so each one appears in only one place, instead of the two we
had before). Each class name literal (an association between a symbol
and a class object) is unique, so the name symbols need not be. Humans
can distinguish classes from one another without regard to name by other
means (e.g., author, version, class categories, object identity), with
help from the development tools. Given this support, there is no need
for namespaces in the common sense; the name symbol of each class can be
anything, so in effect each and every class has its own namespace.

     As for where to put the behavior formerly provided by the
SystemDictionary instance, I prefer that it live at (Interpreter class).
A normal system will have only that behavior there, a system with the
support to actually build an interpreter will have a bunch more
(currently provided by the VMMaker package).

     Please see the design for more details.


     thanks,

-C

[1] http://tinyurl.com/yn7f9h (lists.squeakfoundation.org)

--
Craig Latta
improvisational musical informaticist
www.netjam.org
Smalltalkers do: [:it | All with: Class, (And love: it)]


Reply | Threaded
Open this post in threaded view
|

Re: SmalltalkImage current

Igor Stasenko
On 03/07/07, Craig Latta <[hidden email]> wrote:

>
> Hi all--
>
>      I'd just like to remind everyone again of my design for shared
> variables from July of last year[1], implemented in Spoon at that time.
> I removed SystemDictionary; each class is responsible for its own name
> literal (so each one appears in only one place, instead of the two we
> had before). Each class name literal (an association between a symbol
> and a class object) is unique, so the name symbols need not be. Humans
> can distinguish classes from one another without regard to name by other
> means (e.g., author, version, class categories, object identity), with
> help from the development tools. Given this support, there is no need
> for namespaces in the common sense; the name symbol of each class can be
> anything, so in effect each and every class has its own namespace.
>
>      As for where to put the behavior formerly provided by the
> SystemDictionary instance, I prefer that it live at (Interpreter class).
> A normal system will have only that behavior there, a system with the
> support to actually build an interpreter will have a bunch more
> (currently provided by the VMMaker package).
>
>      Please see the design for more details.
>

Your solution is good one. And i prefer to see it in future versions of squeak.
But this actually raises a more broader question: what to do with
global variables, which is identified by name?
Can system be designed in such way, that it does not have any global
variables (which actually forces us to introduce a structure like
SystemDictionary)?

>
>      thanks,
>
> -C
>
> [1] http://tinyurl.com/yn7f9h (lists.squeakfoundation.org)
>
> --
> Craig Latta
> improvisational musical informaticist
> www.netjam.org
> Smalltalkers do: [:it | All with: Class, (And love: it)]
>
>
>

Reply | Threaded
Open this post in threaded view
|

RE: SmalltalkImage current

Gary Chambers-4
Seems like the idea of "Global Variables" has got a bad name from misuse in
other languages. Remember, Smalltalk is an Environment. Globals are
good/necessary when appropriate!

-----Original Message-----
From: [hidden email]
[mailto:[hidden email]] On Behalf Of sig
Sent: 03 July 2007 11:39 am
To: The general-purpose Squeak developers list
Subject: Re: SmalltalkImage current


On 03/07/07, Craig Latta <[hidden email]> wrote:

>
> Hi all--
>
>      I'd just like to remind everyone again of my design for shared
> variables from July of last year[1], implemented in Spoon at that
> time. I removed SystemDictionary; each class is responsible for its
> own name literal (so each one appears in only one place, instead of
> the two we had before). Each class name literal (an association
> between a symbol and a class object) is unique, so the name symbols
> need not be. Humans can distinguish classes from one another without
> regard to name by other means (e.g., author, version, class
> categories, object identity), with help from the development tools.
> Given this support, there is no need for namespaces in the common
> sense; the name symbol of each class can be anything, so in effect
> each and every class has its own namespace.
>
>      As for where to put the behavior formerly provided by the
> SystemDictionary instance, I prefer that it live at (Interpreter
> class). A normal system will have only that behavior there, a system
> with the support to actually build an interpreter will have a bunch
> more (currently provided by the VMMaker package).
>
>      Please see the design for more details.
>

Your solution is good one. And i prefer to see it in future versions of
squeak. But this actually raises a more broader question: what to do with
global variables, which is identified by name? Can system be designed in
such way, that it does not have any global variables (which actually forces
us to introduce a structure like SystemDictionary)?

>
>      thanks,
>
> -C
>
> [1] http://tinyurl.com/yn7f9h (lists.squeakfoundation.org)
>
> --
> Craig Latta
> improvisational musical informaticist
> www.netjam.org
> Smalltalkers do: [:it | All with: Class, (And love: it)]
>
>
>


Reply | Threaded
Open this post in threaded view
|

Re: SmalltalkImage current

K. K. Subramaniam
On Tuesday 03 July 2007 7:53 pm, Gary Chambers wrote:
> Seems like the idea of "Global Variables" has got a bad name from misuse in
> other languages. Remember, Smalltalk is an Environment. Globals are
> good/necessary when appropriate!
It has to do with scope. A global variable can be modified by any method in
the entire image, so it is very vulnerable to unintended modifications. Safe
designs use as minimal a scope as possible for variables.

In Squeak, classes are global in scope. With over 2000 of them in newer
images, Squeak is as vulnerable as other language environments :-(. Lack of
modular scoping mechanisms leads to "Batman" syndrome where programmers use
prefixes to mark out scopes - Only BatMan can drive a BatMobile or fly a  
BatJet fitted with BatWings.

Regards .. Subbu

Reply | Threaded
Open this post in threaded view
|

re: SmalltalkImage current

ccrraaiigg
In reply to this post by Igor Stasenko

Hi--

> what to do with global variables, which is identified by name?

     From the Spoon mailing list message I just mentioned[1]:

***

     I addressed the associations [in the SystemDictionary instance]
that refer to classes, but there are others. These are the other
so-called "global" variables (like Display, the primary display) as well
as all the "shared pools" (like TextConstants and, strictly speaking,
Undeclared). I think each currently-global variable should be the
responsibility of some class. So the primary display could be something
you get by sending "primary" to DisplayScreen.

     Shared pools are dictionaries of shared-variable associations,
similar to the system dictionary (in fact, I'd call the system
dictionary just another shared pool). I know some think we should simply
banish all shared pools, but I'll assume for the moment that we're
keeping them. I find them useful, I just think some class should take
responsibility for each one. I've added a "publishedPools" instance
variable to Class, which stores all the shared pool dictionaries for
which a class has responsibility (i.e., the class that introduced the
pool into the system). I renamed the traditional "sharedPools" instance
variable in Class to "receivedPools"; these are the pools that a class
merely uses. Finally, I renamed the "classPool" instance variable to
"classVariablesPool", just to be clearer.

     When you want to use a shared pool, you access the pool by sending
a message to the responsible class, rather than relying on its name
being a "global variable".

***

     And to that I'll just add that each responsible class can provide
access to individual published variables by direct message when appropriate.


     thanks again,

-C

[1] http://tinyurl.com/yn7f9h (lists.squeakfoundation.org)

--
Craig Latta
improvisational musical informaticist
www.netjam.org
Smalltalkers do: [:it | All with: Class, (And love: it)]


Reply | Threaded
Open this post in threaded view
|

Re: SmalltalkImage current

stephane ducasse
Hi craig

what would be a migration strategy and how can we in a piecemeal way
(possibly) cherrypick your enhancements?

Stef


>
> Hi--
>
>> what to do with global variables, which is identified by name?
>
>      From the Spoon mailing list message I just mentioned[1]:
>
> ***
>
>      I addressed the associations [in the SystemDictionary instance]
> that refer to classes, but there are others. These are the other
> so-called "global" variables (like Display, the primary display) as  
> well
> as all the "shared pools" (like TextConstants and, strictly speaking,
> Undeclared). I think each currently-global variable should be the
> responsibility of some class. So the primary display could be  
> something
> you get by sending "primary" to DisplayScreen.
>
>      Shared pools are dictionaries of shared-variable associations,
> similar to the system dictionary (in fact, I'd call the system
> dictionary just another shared pool). I know some think we should  
> simply
> banish all shared pools, but I'll assume for the moment that we're
> keeping them. I find them useful, I just think some class should take
> responsibility for each one. I've added a "publishedPools" instance
> variable to Class, which stores all the shared pool dictionaries for
> which a class has responsibility (i.e., the class that introduced the
> pool into the system). I renamed the traditional "sharedPools"  
> instance
> variable in Class to "receivedPools"; these are the pools that a class
> merely uses. Finally, I renamed the "classPool" instance variable to
> "classVariablesPool", just to be clearer.
>
>      When you want to use a shared pool, you access the pool by  
> sending
> a message to the responsible class, rather than relying on its name
> being a "global variable".
>
> ***
>
>      And to that I'll just add that each responsible class can provide
> access to individual published variables by direct message when  
> appropriate.
>
>
>      thanks again,
>
> -C
>
> [1] http://tinyurl.com/yn7f9h (lists.squeakfoundation.org)
>
> --
> Craig Latta
> improvisational musical informaticist
> www.netjam.org
> Smalltalkers do: [:it | All with: Class, (And love: it)]
>
>
>


Reply | Threaded
Open this post in threaded view
|

Re: SmalltalkImage current

Igor Stasenko
In reply to this post by ccrraaiigg
I like it. Now the final question on road to remove globals at all :
what you propose to do with these three symbols:
#nil
#true
#false
?
And, maybe this is not related problem - what strategy for accessing
class of smallint objects, because there's no direct information in
smallint object about its class, because its tagged oop, not mem oop
in squeak. I know this is mostly a VM responsibility, but still it
introduces a limitations: VM must know a sole instance of SmallInteger
class and thus it must be global in VM's context (can't say if it
global in language context).
And also, if nil object represented by machine word, with all bits =
0, its too , can't point to own class directly.

I assume, these associations must be held somewhere in Interpreter
class, because its a reflection of VM (or smalltalk environment).

On 04/07/07, Craig Latta <[hidden email]> wrote:

>
> Hi--
>
> > what to do with global variables, which is identified by name?
>
>      From the Spoon mailing list message I just mentioned[1]:
>
> ***
>
>      I addressed the associations [in the SystemDictionary instance]
> that refer to classes, but there are others. These are the other
> so-called "global" variables (like Display, the primary display) as well
> as all the "shared pools" (like TextConstants and, strictly speaking,
> Undeclared). I think each currently-global variable should be the
> responsibility of some class. So the primary display could be something
> you get by sending "primary" to DisplayScreen.
>
>      Shared pools are dictionaries of shared-variable associations,
> similar to the system dictionary (in fact, I'd call the system
> dictionary just another shared pool). I know some think we should simply
> banish all shared pools, but I'll assume for the moment that we're
> keeping them. I find them useful, I just think some class should take
> responsibility for each one. I've added a "publishedPools" instance
> variable to Class, which stores all the shared pool dictionaries for
> which a class has responsibility (i.e., the class that introduced the
> pool into the system). I renamed the traditional "sharedPools" instance
> variable in Class to "receivedPools"; these are the pools that a class
> merely uses. Finally, I renamed the "classPool" instance variable to
> "classVariablesPool", just to be clearer.
>
>      When you want to use a shared pool, you access the pool by sending
> a message to the responsible class, rather than relying on its name
> being a "global variable".
>
> ***
>
>      And to that I'll just add that each responsible class can provide
> access to individual published variables by direct message when appropriate.
>
>
>      thanks again,
>
> -C
>
> [1] http://tinyurl.com/yn7f9h (lists.squeakfoundation.org)
>
> --
> Craig Latta
> improvisational musical informaticist
> www.netjam.org
> Smalltalkers do: [:it | All with: Class, (And love: it)]
>
>
>

Reply | Threaded
Open this post in threaded view
|

Re: SmalltalkImage current

Klaus D. Witzel
On Wed, 04 Jul 2007 10:09:30 +0200, sig <[hidden email]> wrote:

> I like it. Now the final question on road to remove globals at all :
> what you propose to do with these three symbols:
> #nil
> #true
> #false
> ?
> And, maybe this is not related problem - what strategy for accessing
> class of smallint objects, because there's no direct information in
> smallint object about its class, because its tagged oop, not mem oop
> in squeak. I know this is mostly a VM responsibility, but still it
> introduces a limitations: VM must know a sole instance of SmallInteger
> class and thus it must be global in VM's context (can't say if it
> global in language context).
> And also, if nil object represented by machine word, with all bits =
> 0, its too , can't point to own class directly.
>
> I assume, these associations must be held somewhere in Interpreter
> class, because its a reflection of VM (or smalltalk environment).

Indeed, they are. Inspect (Smalltalk specialObjectsArray). And since it's  
Smalltalk, you can pass your own (0 class) and (nil class) to the VM :)

BTW nil,false,true are associated with their respective bytecode. So  
compiler knows that VM knows how to access objects in (Smalltalk  
specialObjectsArray).

/Klaus

> On 04/07/07, Craig Latta <[hidden email]> wrote:
>>
>> Hi--
>>
>> > what to do with global variables, which is identified by name?
>>
>>      From the Spoon mailing list message I just mentioned[1]:
>>
>> ***
>>
>>      I addressed the associations [in the SystemDictionary instance]
>> that refer to classes, but there are others. These are the other
>> so-called "global" variables (like Display, the primary display) as well
>> as all the "shared pools" (like TextConstants and, strictly speaking,
>> Undeclared). I think each currently-global variable should be the
>> responsibility of some class. So the primary display could be something
>> you get by sending "primary" to DisplayScreen.
>>
>>      Shared pools are dictionaries of shared-variable associations,
>> similar to the system dictionary (in fact, I'd call the system
>> dictionary just another shared pool). I know some think we should simply
>> banish all shared pools, but I'll assume for the moment that we're
>> keeping them. I find them useful, I just think some class should take
>> responsibility for each one. I've added a "publishedPools" instance
>> variable to Class, which stores all the shared pool dictionaries for
>> which a class has responsibility (i.e., the class that introduced the
>> pool into the system). I renamed the traditional "sharedPools" instance
>> variable in Class to "receivedPools"; these are the pools that a class
>> merely uses. Finally, I renamed the "classPool" instance variable to
>> "classVariablesPool", just to be clearer.
>>
>>      When you want to use a shared pool, you access the pool by sending
>> a message to the responsible class, rather than relying on its name
>> being a "global variable".
>>
>> ***
>>
>>      And to that I'll just add that each responsible class can provide
>> access to individual published variables by direct message when  
>> appropriate.
>>
>>
>>      thanks again,
>>
>> -C
>>
>> [1] http://tinyurl.com/yn7f9h (lists.squeakfoundation.org)
>>
>> --
>> Craig Latta
>> improvisational musical informaticist
>> www.netjam.org
>> Smalltalkers do: [:it | All with: Class, (And love: it)]
>>
>>
>>
>
>



Reply | Threaded
Open this post in threaded view
|

Re: SmalltalkImage current

Igor Stasenko
On 04/07/07, Klaus D. Witzel <[hidden email]> wrote:

> On Wed, 04 Jul 2007 10:09:30 +0200, sig <[hidden email]> wrote:
>
> > I like it. Now the final question on road to remove globals at all :
> > what you propose to do with these three symbols:
> > #nil
> > #true
> > #false
> > ?
> > And, maybe this is not related problem - what strategy for accessing
> > class of smallint objects, because there's no direct information in
> > smallint object about its class, because its tagged oop, not mem oop
> > in squeak. I know this is mostly a VM responsibility, but still it
> > introduces a limitations: VM must know a sole instance of SmallInteger
> > class and thus it must be global in VM's context (can't say if it
> > global in language context).
> > And also, if nil object represented by machine word, with all bits =
> > 0, its too , can't point to own class directly.
> >
> > I assume, these associations must be held somewhere in Interpreter
> > class, because its a reflection of VM (or smalltalk environment).
>
> Indeed, they are. Inspect (Smalltalk specialObjectsArray). And since it's
> Smalltalk, you can pass your own (0 class) and (nil class) to the VM :)
>
> BTW nil,false,true are associated with their respective bytecode. So
> compiler knows that VM knows how to access objects in (Smalltalk
> specialObjectsArray).
>
Ok, so, instead of having multiple globals tied with VM, we having a
single one - specialObjectsArray.

The reason why i'm asking to a problem which raised when you using
these objects in foreign (Spoon naiads) classes/methods.
Its obvious, that smallint/nils in different images can behave
differently, because anyone can add new methods or modify existing and
then produce code based on these changes.
I'm interesting, what solution Craig proposed to solve this problem.

12