On Sun, 3 Feb 2019 at 17:50, Todd Blanchard via Pharo-users < pharo-users@lists.pharo.org> wrote:
Seems like an opportunity...I have no idea what the addition of slots does but I would like to learn.
On Feb 3, 2019, at 1:33 AM, ducasse <stepharo@netcourrier.com> wrote:
Hello,
Where I can find documentation for slots?
I am trying to access the pharo books site but it is unreachable from my network right now, I got a connection time out (It works from my 3G though (??) ), but if I remember correctly the is no slot description in any book.
Regards, Vitor
Hello victor
There is no documentation about slots that I know. Iâm sorry. Marcus may want to write one in the future.
Stef
I believe its an implementation of this paper... https://rmod.inria.fr/archives/papers/Verw11a-OOSPLA11-FlexibleObjectLayouts... cheers -ben
Thanks, I had already read this paper, which got me interested in the concept of slots :) . Is it a prototype in Pharo or is ready to use? it will become as an official part of it? On Sun, Feb 3, 2019 at 10:13 AM Ben Coman <btc@openinworld.com> wrote:
On Sun, 3 Feb 2019 at 17:50, Todd Blanchard via Pharo-users < pharo-users@lists.pharo.org> wrote:
Seems like an opportunity...I have no idea what the addition of slots does but I would like to learn.
On Feb 3, 2019, at 1:33 AM, ducasse <stepharo@netcourrier.com> wrote:
Hello,
Where I can find documentation for slots?
I am trying to access the pharo books site but it is unreachable from my network right now, I got a connection time out (It works from my 3G though (??) ), but if I remember correctly the is no slot description in any book.
Regards, Vitor
Hello victor
There is no documentation about slots that I know. Iâm sorry. Marcus may want to write one in the future.
Stef
I believe its an implementation of this paper...
https://rmod.inria.fr/archives/papers/Verw11a-OOSPLA11-FlexibleObjectLayouts...
cheers -ben
On 4 Feb 2019, at 20:11, Vitor Medina Cruz <vitormcruz@gmail.com> wrote:
Thanks, I had already read this paper, which got me interested in the concept of slots :) . Is it a prototype in Pharo or is ready to use? it will become as an official part of it?
Is ready, is official, is there :) Esteban
On Sun, Feb 3, 2019 at 10:13 AM Ben Coman <btc@openinworld.com <mailto:btc@openinworld.com>> wrote:
On Sun, 3 Feb 2019 at 17:50, Todd Blanchard via Pharo-users <pharo-users@lists.pharo.org <mailto:pharo-users@lists.pharo.org>> wrote: Seems like an opportunity...I have no idea what the addition of slots does but I would like to learn.
On Feb 3, 2019, at 1:33 AM, ducasse <stepharo@netcourrier.com <mailto:stepharo@netcourrier.com>> wrote:
Hello,
Where I can find documentation for slots?
I am trying to access the pharo books site but it is unreachable from my network right now, I got a connection time out (It works from my 3G though (??) ), but if I remember correctly the is no slot description in any book.
Regards, Vitor
Hello victor
There is no documentation about slots that I know. Iâm sorry. Marcus may want to write one in the future.
Stef
I believe its an implementation of this paper... https://rmod.inria.fr/archives/papers/Verw11a-OOSPLA11-FlexibleObjectLayouts... <https://rmod.inria.fr/archives/papers/Verw11a-OOSPLA11-FlexibleObjectLayouts...>
cheers -ben
Vitor Medina Cruz wrote
Thanks, I had already read this paper, which got me interested in the concept of slots :) . Is it a prototype in Pharo or is ready to use? it will become as an official part of it?
On Sun, Feb 3, 2019 at 10:13 AM Ben Coman <
btc@
> wrote:
On Sun, 3 Feb 2019 at 17:50, Todd Blanchard via Pharo-users <
pharo-users@.pharo
wrote:
Seems like an opportunity...I have no idea what the addition of slots does but I would like to learn.
On Feb 3, 2019, at 1:33 AM, ducasse <
stepharo@
> wrote:
Hello,
Where I can find documentation for slots?
I am trying to access the pharo books site but it is unreachable from my network right now, I got a connection time out (It works from my 3G though (??) ), but if I remember correctly the is no slot description in any book.
Regards, Vitor
Hello victor
There is no documentation about slots that I know. Iâm sorry. Marcus may want to write one in the future.
Stef
I believe its an implementation of this paper...
https://rmod.inria.fr/archives/papers/Verw11a-OOSPLA11-FlexibleObjectLayouts...
cheers -ben
Slots are already part of Pharo and are totally useable. Some example slots are buggy though. Explore Slot and subclasses, their class comments and methods. One thing to note is if you change #emitStore: or #emitValue: methods in your slot class, you need to trigger change in classes that use it. -- Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html
Slots are already part of Pharo and are totally useable. Some example slots are buggy though.
Yes, I have a list of issues to fix. Especially related to instance migration when changing class definitions. (among others). I sometimes wonder how to find the concentrate time to really looks as all this.. there is already so much todo...
Explore Slot and subclasses, their class comments and methods.
One thing to note is if you change #emitStore: or #emitValue: methods in your slot class, you need to trigger change in classes that use it.
Yes, we need to recompile method that use slots with code generation if the code gen methods change. I think there should be even a way to do that automatically. Marcus
I couldn't find examples of Slot usage. Is there any ackage I can load that use it so that I can look as an example? On Mon, Feb 4, 2019 at 6:17 PM webwarrior <reg@webwarrior.ws> wrote:
Vitor Medina Cruz wrote
Thanks, I had already read this paper, which got me interested in the concept of slots :) . Is it a prototype in Pharo or is ready to use? it will become as an official part of it?
On Sun, Feb 3, 2019 at 10:13 AM Ben Coman <
btc@
> wrote:
On Sun, 3 Feb 2019 at 17:50, Todd Blanchard via Pharo-users <
pharo-users@.pharo
wrote:
Seems like an opportunity...I have no idea what the addition of slots does but I would like to learn.
On Feb 3, 2019, at 1:33 AM, ducasse <
stepharo@
> wrote:
Hello,
Where I can find documentation for slots?
I am trying to access the pharo books site but it is unreachable from
my
network right now, I got a connection time out (It works from my 3G though (??) ), but if I remember correctly the is no slot description in any book.
Regards, Vitor
Hello victor
There is no documentation about slots that I know. Iâm sorry. Marcus may want to write one in the future.
Stef
I believe its an implementation of this paper...
https://rmod.inria.fr/archives/papers/Verw11a-OOSPLA11-FlexibleObjectLayouts...
cheers -ben
Slots are already part of Pharo and are totally useable. Some example slots are buggy though.
Explore Slot and subclasses, their class comments and methods.
One thing to note is if you change #emitStore: or #emitValue: methods in your slot class, you need to trigger change in classes that use it.
-- Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html
Would be nice to have a command in browser to show users of selected slot 6 ÑевÑ. 2019 г. 11:32 полÑзоваÑÐµÐ»Ñ "Vitor Medina Cruz" <vitormcruz@gmail.com> напиÑал: I couldn't find examples of Slot usage. Is there any ackage I can load that use it so that I can look as an example? On Mon, Feb 4, 2019 at 6:17 PM webwarrior <reg@webwarrior.ws> wrote:
Vitor Medina Cruz wrote
Thanks, I had already read this paper, which got me interested in the concept of slots :) . Is it a prototype in Pharo or is ready to use? it will become as an official part of it?
On Sun, Feb 3, 2019 at 10:13 AM Ben Coman <
btc@
> wrote:
On Sun, 3 Feb 2019 at 17:50, Todd Blanchard via Pharo-users <
pharo-users@.pharo
wrote:
Seems like an opportunity...I have no idea what the addition of slots does but I would like to learn.
On Feb 3, 2019, at 1:33 AM, ducasse <
stepharo@
> wrote:
Hello,
Where I can find documentation for slots?
I am trying to access the pharo books site but it is unreachable from
my
network right now, I got a connection time out (It works from my 3G though (??) ), but if I remember correctly the is no slot description in any book.
Regards, Vitor
Hello victor
There is no documentation about slots that I know. Iâm sorry. Marcus may want to write one in the future.
Stef
I believe its an implementation of this paper...
https://rmod.inria.fr/archives/papers/Verw11a-OOSPLA11-FlexibleObjectLayouts...
cheers -ben
Slots are already part of Pharo and are totally useable. Some example slots are buggy though.
Explore Slot and subclasses, their class comments and methods.
One thing to note is if you change #emitStore: or #emitValue: methods in your slot class, you need to trigger change in classes that use it.
-- Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html
Thanks, I was looking for usages of InstanceVariableSlot. In the case of SlotExampleMovie, #name and #year are of IntanceVariableSlot layout (this definition is correct? A slot is or has some Layout defined by the Slot class?) On Wed, Feb 6, 2019 at 10:14 AM Marcus Denker <marcus.denker@inria.fr> wrote:
On 6 Feb 2019, at 12:41, Denis Kudriashov <dionisiydk@gmail.com> wrote:
Would be nice to have a command in browser to show users of selected slot
Yes!
Marcus
On 6 Feb 2019, at 13:25, Vitor Medina Cruz <vitormcruz@gmail.com> wrote:
Thanks, I was looking for usages of InstanceVariableSlot.
All instance variables are InstanceVariableSlots. But to make it less verbose, we have a way to specify these without having to put the name. Object subclass: #Point slots: { #x. #y } classVariables: { } package: 'Kernel-BasicObjectsâ is the same as Object subclass: #Point slots: { #x => InstanceVariableSlot . #y => InstanceVariableSlot} classVariables: { } package: 'Kernel-BasicObjects' If you evaluate: Point slotNamed: #x you see that it returns a #x => InstanceVariableSlot Slot instance. (with all that: I sometime wonder if we should not get rid of the name âSlotâ and just use the term âVariableâ⦠because that is what they areâ¦)
In the case of SlotExampleMovie, #name and #year are of IntanceVariableSlot layout (this definition is correct? A slot is or has some Layout defined by the Slot class?)
No, the class has a Layout. See subclasses of AbstractLayout. This reifies the magic number that is in the âformatâ ivar of Behaviors (third ivar of all class like objects). In addition it makes class definition *explicitly* specify the layout. So Array in ST 80 is something like: ArrayedCollection variableSubclass: #Array instanceVariableNames: '' classVariableNames: '' package: 'Collections-Sequenceable-Base' so the layout chosen is hidden in the class creation method (variableSubclassâ¦), while with the reified layouts, it explicit: ArrayedCollection subclass: #Array layout: VariableLayout slots: { } classVariables: { } package: 'Collections-Sequenceable-Baseâ e.g. for CompiledMethod it makes clear that is a very special class: CompiledCode subclass: #CompiledMethod layout: CompiledMethodLayout slots: { } classVariables: { } package: 'Kernel-Methodsâ
On Wed, Feb 6, 2019 at 10:14 AM Marcus Denker <marcus.denker@inria.fr <mailto:marcus.denker@inria.fr>> wrote:
On 6 Feb 2019, at 12:41, Denis Kudriashov <dionisiydk@gmail.com <mailto:dionisiydk@gmail.com>> wrote:
Would be nice to have a command in browser to show users of selected slot
Yes!
Marcus
Ok, thanks, I think I am understanding. I was trying to create a class to experiment but if I try to: Object subclass: #TestClassWithSlots slots: { } classVariables: { } package: 'Experiment-Slots' Code is reversed to: Object subclass: #TestClassWithSlots instanceVariableNames: '' classVariableNames: '' package: 'Experiment-Slots' Even if I do: Object subclass: #TestClassWithSlots slots: { #tests => BaseSlot } classVariables: { } package: ''Experiment-Slots' It reverts back to the instanceVariableNames version. Putting BooleanSlot avoids this reversion. I also tried to put RelationSlot just to see what happens and it entered in an infinite loop error. All those things are errors? If so, where should I report? On Wed, Feb 6, 2019 at 10:46 AM Marcus Denker <marcus.denker@inria.fr> wrote:
On 6 Feb 2019, at 13:25, Vitor Medina Cruz <vitormcruz@gmail.com> wrote:
Thanks, I was looking for usages of InstanceVariableSlot.
All instance variables are InstanceVariableSlots.
But to make it less verbose, we have a way to specify these without having to put the name.
Object subclass: #Point slots: { #x. #y } classVariables: { } package: 'Kernel-BasicObjectsâ
is the same as
Object subclass: #Point slots: { #x => InstanceVariableSlot . #y => InstanceVariableSlot} classVariables: { } package: 'Kernel-BasicObjects'
If you evaluate:
Point slotNamed: #x
you see that it returns a
#x => InstanceVariableSlot
Slot instance.
(with all that: I sometime wonder if we should not get rid of the name âSlotâ and just use the term âVariableâ⦠because that is what they areâ¦)
In the case of SlotExampleMovie, #name and #year are of IntanceVariableSlot layout (this definition is correct? A slot is or has some Layout defined by the Slot class?)
No, the class has a Layout. See subclasses of AbstractLayout. This reifies the magic number that is in the âformatâ ivar of Behaviors (third ivar of all class like objects).
In addition it makes class definition *explicitly* specify the layout.
So Array in ST 80 is something like:
ArrayedCollection variableSubclass: #Array instanceVariableNames: '' classVariableNames: '' package: 'Collections-Sequenceable-Base'
so the layout chosen is hidden in the class creation method (variableSubclassâ¦), while with the reified layouts, it explicit:
ArrayedCollection subclass: #Array layout: VariableLayout slots: { } classVariables: { } package: 'Collections-Sequenceable-Baseâ
e.g. for CompiledMethod it makes clear that is a very special class:
CompiledCode subclass: #CompiledMethod layout: CompiledMethodLayout slots: { } classVariables: { } package: 'Kernel-Methodsâ
On Wed, Feb 6, 2019 at 10:14 AM Marcus Denker <marcus.denker@inria.fr> wrote:
On 6 Feb 2019, at 12:41, Denis Kudriashov <dionisiydk@gmail.com> wrote:
Would be nice to have a command in browser to show users of selected slot
Yes!
Marcus
On 6 Feb 2019, at 18:17, Vitor Medina Cruz <vitormcruz@gmail.com> wrote:
Ok, thanks, I think I am understanding.
I was trying to create a class to experiment but if I try to:
Object subclass: #TestClassWithSlots slots: { } classVariables: { } package: 'Experiment-Slots'
Code is reversed to:
Object subclass: #TestClassWithSlots instanceVariableNames: '' classVariableNames: '' package: 'Experiment-Slots'
Even if I do:
Right now if you want to *always* see the slot class definition, you need to turn it on in the preferences. (The browser has a shortcut radio button down on the right down, too).
Object subclass: #TestClassWithSlots slots: { #tests => BaseSlot } classVariables: { } package: ''Experiment-Slots'
It reverts back to the instanceVariableNames version. Putting BooleanSlot avoids this reversion. I also tried to put RelationSlot just to see what happens and it entered in an infinite loop error.BaseSlot
BaseSlot is an internal slot used e.g. for BooleanSlot (to store the data). It is a hidden slot, that is, one that is not visible in the class definition. (I will add a comment to make clear that this is not meant to be used directly). Marcus
On 6 Feb 2019, at 12:30, Vitor Medina Cruz <vitormcruz@gmail.com> wrote:
I couldn't find examples of Slot usage. Is there any ackage I can load that use it so that I can look as an example?
The Slot-Tests has some. But most tests there are creating classes not he fly (to test the creation) The only classes using slots are for now SlotExampleMovie SlotExamplePerson which test the RelationSlot examples. We should make a package which has more classes that use them⦠Marcus
participants (6)
-
Ben Coman -
Denis Kudriashov -
Esteban Lorenzano -
Marcus Denker -
Vitor Medina Cruz -
webwarrior