[Pharo-project] Spec news
Hi Ben, trying to run Periscope on the latest Pharo image, I see that everything is broken again. Please, start to write some documentation about Spec development, what have you changed, what do you plan to change, what are the new prefered ways to write UI specification and how to migrate old code. At least write some short mails here. I know, it is a lot of work but we cannot write tools and bindings to other user interface if the basic UI framework is undocumented and changing silently. Cheers, -- Pavel
I didn't change anything :( I know that Stef made some major refactor, but I can't tell more I have my final exams this week so I can't have a look, but I will the next week Ben On Jan 8, 2013, at 11:04 AM, Pavel Krivanek wrote:
Hi Ben,
trying to run Periscope on the latest Pharo image, I see that everything is broken again. Please, start to write some documentation about Spec development, what have you changed, what do you plan to change, what are the new prefered ways to write UI specification and how to migrate old code. At least write some short mails here. I know, it is a lot of work but we cannot write tools and bindings to other user interface if the basic UI framework is undocumented and changing silently.
Cheers, -- Pavel
Hi Ben,
trying to run Periscope on the latest Pharo image, I see that everything is broken again. Please, start to write some documentation about Spec development, what have you changed, what do you plan to change, what are the new prefered ways to write UI specification and how to migrate old code. At least write some short mails here.
Hi pavel where is your code? Because we did a massive refactoring with igor to free layoutFrame users from the tyranny of fractions:offset: so you can have a look at some spec in the latest 20 and you will see that now we use #layout: . #(0 0 1 1 0 22 0 0) when it was #layout: {#LayoutFrame . #fractions:offsets:. (0@0 corner: 1@0). (0@0 corner: 0@20). Now may be LayoutFrame should not be in morphic so that Spec is independent from Morphic but for now we prefered to avoid to have reference to LayoutFrame and more important use of #fractions:offsets: Esteban will start to work on a UIBuilder because we do not want to have to code such methods and he will do a pass on Spec. After we will stabilize it.
I know, it is a lot of work but we cannot write tools and bindings to other user interface if the basic UI framework is undocumented and changing silently.
Cheers, -- Pavel
On Jan 8, 2013, at 2:59 PM, Stéphane Ducasse wrote:
Hi Ben,
trying to run Periscope on the latest Pharo image, I see that everything is broken again. Please, start to write some documentation about Spec development, what have you changed, what do you plan to change, what are the new prefered ways to write UI specification and how to migrate old code. At least write some short mails here.
Hi pavel
where is your code? Because we did a massive refactoring with igor to free layoutFrame users from the tyranny of fractions:offset:
so you can have a look at some spec in the latest 20 and you will see that now we use
#layout: . #(0 0 1 1 0 22 0 0)
why ?????? Why using a meaningless array when we could use object ? Ben
when it was #layout: {#LayoutFrame . #fractions:offsets:. (0@0 corner: 1@0). (0@0 corner: 0@20).
Now may be LayoutFrame should not be in morphic so that Spec is independent from Morphic but for now we prefered to avoid to have reference to LayoutFrame and more important use of #fractions:offsets:
Esteban will start to work on a UIBuilder because we do not want to have to code such methods and he will do a pass on Spec. After we will stabilize it.
I know, it is a lot of work but we cannot write tools and bindings to other user interface if the basic UI framework is undocumented and changing silently.
Cheers, -- Pavel
Hi pavel
where is your code? Because we did a massive refactoring with igor to free layoutFrame users from the tyranny of fractions:offset:
so you can have a look at some spec in the latest 20 and you will see that now we use
#layout: . #(0 0 1 1 0 22 0 0)
why ?????? Why using a meaningless array when we could use object ?
because we want to deprecate the use of fractions:offsets: So if you do not have fractions:offsets: then you should find a way (for spec) to create a layout. So we introduce a literal format and below the scene we are using a layoutFrame.
Ben
when it was #layout: {#LayoutFrame . #fractions:offsets:. (0@0 corner: 1@0). (0@0 corner: 0@20).
Now may be LayoutFrame should not be in morphic so that Spec is independent from Morphic but for now we prefered to avoid to have reference to LayoutFrame and more important use of #fractions:offsets:
Esteban will start to work on a UIBuilder because we do not want to have to code such methods and he will do a pass on Spec. After we will stabilize it.
I know, it is a lot of work but we cannot write tools and bindings to other user interface if the basic UI framework is undocumented and changing silently.
Cheers, -- Pavel
Benjamin Van Ryseghem-2 wrote
Why using a meaningless array when we could use object ?
+1. This seems hard to use/understand. If we don't want to depend on Morphic, let Spec define its own intention revealing messages. -- View this message in context: http://forum.world.st/Spec-news-tp4662445p4662524.html Sent from the Pharo Smalltalk mailing list archive at Nabble.com.
On 8 January 2013 18:12, Sean P. DeNigris <sean@clipperadams.com> wrote:
Benjamin Van Ryseghem-2 wrote
Why using a meaningless array when we could use object ?
+1. This seems hard to use/understand. If we don't want to depend on Morphic, let Spec define its own intention revealing messages.
Or pull LayoutFrame out into a separate package. That Morphic depends on that new package doesn't matter at all; what matters is that LayoutFrame doesn't depend on Morphic. LayoutFrame's a nice simple class. frank
Ok so to clarify what I want with Spec: - move LayoutFrame outside of Morphic. Now I'm not sure that spec should depend on it, may be. - LayoutFrame is a bad name for a transformation specification. - I do not think that an Array is good but I do not think that using two rectangles is good either Do we think that (0@0 corner: 1@1). (0@22 corner: 0@0). is readable? No it looks quite bad and as bad as #(0 0 1 1 0 22 0 0) Probably we should have layout {LayoutFrame rightOffset: 22) instead of specifying everything when this is not needed especially since now LayoutFrame new is equivalent to (0@0 corner: 1@1). (0@00 corner: 0@0) - Finally we should not edit by hand such methods and esteban will work on that. - We should - rethink the contents of spec methods they should cover structural information such color, defaultExtent; minimalExtent:â¦and this should be modular (it is already). Each kind of spec should be responsible of declaring what it needs to create its visual component. - we should be able to mix structural specification with DSL driven ones. RIght now when you use the dsl you cannot specify structural information at the composite level (I may be wrong) - rethink if we use a class for each specific spec elements so that we can build nice visitors I do not remember how this is done in Spec. In VW this is like that (but visitors are not used or I missed them). - revisit the interpreter because it is not modular. right now this is difficult to extend it and it would be better that the interpreter delegates to each of the spec elements their interpretation. Have a look at the method interpretASpec: aPresenter - rethink the asArray methods. You will see that they implement some spec layout algorithms that are not independent of Morphic and quite complex (note that we simplified these methods). So we should understand and see because I have the impression that they are outside of Spec more on layout in general. - with igor we fixed fractions:offsets because it creates rectangles with negative height and width. => this brings some problems when we want to fix intersect: and this is really important because the intersection of disjoint rectangles is not a negative ones. Right now this works because the primitives are discarding call with negative arguments but this is doomed by construction. Now we could have ignored Spec and let benjamin do the dirty work and we would have waited to be able to go to the next step. So we took our energy and fixed Spec too which I think is normal because if this is part of the infrastructure then we should maintain it. But we are not expert on Spec and it would have been more fun to do it with Ben. Now we just did what we think is good and during holidays is one of the few moment of calm I can haveâ¦. so we did it at that time because of that. Stef
On 8 January 2013 18:12, Sean P. DeNigris <sean@clipperadams.com> wrote:
Benjamin Van Ryseghem-2 wrote
Why using a meaningless array when we could use object ?
+1. This seems hard to use/understand. If we don't want to depend on Morphic, let Spec define its own intention revealing messages.
Or pull LayoutFrame out into a separate package. That Morphic depends on that new package doesn't matter at all; what matters is that LayoutFrame doesn't depend on Morphic. LayoutFrame's a nice simple class.
frank
Hi Stef, get it here: Gofer new smalltalkhubUser: 'PavelKrivanek' project: 'Periscope'; package: 'Periscope'; load. activate with: Nautilus pluginClasses add: {(Smalltalk at: #NautilusPeriscopePlugin). #none} . I tried to change it to the array form but it doesn't help. This is the error stack: #('Array(Object)' 'doesNotUnderstand: #layoutFrame:') #('SpecInterpreter' 'actionToPerformWithSelector:arguments:') #('SpecInterpreter' 'interpretASpec:') #('SpecInterpreter' 'interpretASpec:model:superSpec:') #('SpecInterpreter class' 'private_interpretASpec:model:superSpec:') #('[...] in SpecInterpreter' 'interpretASpec:') #('Array(SequenceableCollection)' 'collect:') #('SpecInterpreter' 'interpretASpec:') #('SpecInterpreter' 'interpretASpec:model:superSpec:') #('SpecInterpreter class' 'private_interpretASpec:model:superSpec:') #('SpecInterpreter' 'retreiveSpecFrom:') #('SpecInterpreter' 'interpretASpec:') #('SpecInterpreter' 'interpretASpec:model:superSpec:') #('SpecInterpreter class' 'private_interpretASpec:model:superSpec:') #('[...] in SpecInterpreter' 'interpretASpec:') #('Array(SequenceableCollection)' 'collect:') #('SpecInterpreter' 'interpretASpec:') #('SpecInterpreter' 'interpretASpec:model:superSpec:') #('SpecInterpreter class' 'private_interpretASpec:model:superSpec:') #('SpecInterpreter class' 'interpretASpec:model:superSpec:') -- Pavel On Tue, Jan 8, 2013 at 2:59 PM, Stéphane Ducasse <stephane.ducasse@inria.fr> wrote:
Hi Ben,
trying to run Periscope on the latest Pharo image, I see that everything is broken again. Please, start to write some documentation about Spec development, what have you changed, what do you plan to change, what are the new prefered ways to write UI specification and how to migrate old code. At least write some short mails here.
Hi pavel
where is your code? Because we did a massive refactoring with igor to free layoutFrame users from the tyranny of fractions:offset:
so you can have a look at some spec in the latest 20 and you will see that now we use
#layout: . #(0 0 1 1 0 22 0 0)
when it was #layout: {#LayoutFrame . #fractions:offsets:. (0@0 corner: 1@0). (0@0 corner: 0@20).
Now may be LayoutFrame should not be in morphic so that Spec is independent from Morphic but for now we prefered to avoid to have reference to LayoutFrame and more important use of #fractions:offsets:
Esteban will start to work on a UIBuilder because we do not want to have to code such methods and he will do a pass on Spec. After we will stabilize it.
I know, it is a lot of work but we cannot write tools and bindings to other user interface if the basic UI framework is undocumented and changing silently.
Cheers, -- Pavel
Can you show me your SpecLayout please ? Ben On Jan 8, 2013, at 3:57 PM, Pavel Krivanek wrote:
Hi Stef,
get it here:
Gofer new smalltalkhubUser: 'PavelKrivanek' project: 'Periscope'; package: 'Periscope'; load.
activate with:
Nautilus pluginClasses add: {(Smalltalk at: #NautilusPeriscopePlugin). #none} .
I tried to change it to the array form but it doesn't help. This is the error stack:
#('Array(Object)' 'doesNotUnderstand: #layoutFrame:') #('SpecInterpreter' 'actionToPerformWithSelector:arguments:') #('SpecInterpreter' 'interpretASpec:') #('SpecInterpreter' 'interpretASpec:model:superSpec:') #('SpecInterpreter class' 'private_interpretASpec:model:superSpec:') #('[...] in SpecInterpreter' 'interpretASpec:') #('Array(SequenceableCollection)' 'collect:') #('SpecInterpreter' 'interpretASpec:') #('SpecInterpreter' 'interpretASpec:model:superSpec:') #('SpecInterpreter class' 'private_interpretASpec:model:superSpec:') #('SpecInterpreter' 'retreiveSpecFrom:') #('SpecInterpreter' 'interpretASpec:') #('SpecInterpreter' 'interpretASpec:model:superSpec:') #('SpecInterpreter class' 'private_interpretASpec:model:superSpec:') #('[...] in SpecInterpreter' 'interpretASpec:') #('Array(SequenceableCollection)' 'collect:') #('SpecInterpreter' 'interpretASpec:') #('SpecInterpreter' 'interpretASpec:model:superSpec:') #('SpecInterpreter class' 'private_interpretASpec:model:superSpec:') #('SpecInterpreter class' 'interpretASpec:model:superSpec:')
-- Pavel
On Tue, Jan 8, 2013 at 2:59 PM, Stéphane Ducasse <stephane.ducasse@inria.fr> wrote:
Hi Ben,
trying to run Periscope on the latest Pharo image, I see that everything is broken again. Please, start to write some documentation about Spec development, what have you changed, what do you plan to change, what are the new prefered ways to write UI specification and how to migrate old code. At least write some short mails here.
Hi pavel
where is your code? Because we did a massive refactoring with igor to free layoutFrame users from the tyranny of fractions:offset:
so you can have a look at some spec in the latest 20 and you will see that now we use
#layout: . #(0 0 1 1 0 22 0 0)
when it was #layout: {#LayoutFrame . #fractions:offsets:. (0@0 corner: 1@0). (0@0 corner: 0@20).
Now may be LayoutFrame should not be in morphic so that Spec is independent from Morphic but for now we prefered to avoid to have reference to LayoutFrame and more important use of #fractions:offsets:
Esteban will start to work on a UIBuilder because we do not want to have to code such methods and he will do a pass on Spec. After we will stabilize it.
I know, it is a lot of work but we cannot write tools and bindings to other user interface if the basic UI framework is undocumented and changing silently.
Cheers, -- Pavel
It does in plugin specs, for example defaultSpec ^{ #ComposableSpec. #vResizing:. #shrinkWrap. #add:. {{self. #textModel}. #layout:. #(0 0 1 1 0 0 0 0)}. } -- Pavel On Tue, Jan 8, 2013 at 3:59 PM, Benjamin <benjamin.vanryseghem.pharo@gmail.com> wrote:
Can you show me your SpecLayout please ?
Ben
On Jan 8, 2013, at 3:57 PM, Pavel Krivanek wrote:
Hi Stef,
get it here:
Gofer new smalltalkhubUser: 'PavelKrivanek' project: 'Periscope'; package: 'Periscope'; load.
activate with:
Nautilus pluginClasses add: {(Smalltalk at: #NautilusPeriscopePlugin). #none} .
I tried to change it to the array form but it doesn't help. This is the error stack:
#('Array(Object)' 'doesNotUnderstand: #layoutFrame:') #('SpecInterpreter' 'actionToPerformWithSelector:arguments:') #('SpecInterpreter' 'interpretASpec:') #('SpecInterpreter' 'interpretASpec:model:superSpec:') #('SpecInterpreter class' 'private_interpretASpec:model:superSpec:') #('[...] in SpecInterpreter' 'interpretASpec:') #('Array(SequenceableCollection)' 'collect:') #('SpecInterpreter' 'interpretASpec:') #('SpecInterpreter' 'interpretASpec:model:superSpec:') #('SpecInterpreter class' 'private_interpretASpec:model:superSpec:') #('SpecInterpreter' 'retreiveSpecFrom:') #('SpecInterpreter' 'interpretASpec:') #('SpecInterpreter' 'interpretASpec:model:superSpec:') #('SpecInterpreter class' 'private_interpretASpec:model:superSpec:') #('[...] in SpecInterpreter' 'interpretASpec:') #('Array(SequenceableCollection)' 'collect:') #('SpecInterpreter' 'interpretASpec:') #('SpecInterpreter' 'interpretASpec:model:superSpec:') #('SpecInterpreter class' 'private_interpretASpec:model:superSpec:') #('SpecInterpreter class' 'interpretASpec:model:superSpec:')
-- Pavel
On Tue, Jan 8, 2013 at 2:59 PM, Stéphane Ducasse <stephane.ducasse@inria.fr> wrote:
Hi Ben,
trying to run Periscope on the latest Pharo image, I see that everything is broken again. Please, start to write some documentation about Spec development, what have you changed, what do you plan to change, what are the new prefered ways to write UI specification and how to migrate old code. At least write some short mails here.
Hi pavel
where is your code? Because we did a massive refactoring with igor to free layoutFrame users from the tyranny of fractions:offset:
so you can have a look at some spec in the latest 20 and you will see that now we use
#layout: . #(0 0 1 1 0 22 0 0)
when it was #layout: {#LayoutFrame . #fractions:offsets:. (0@0 corner: 1@0). (0@0 corner: 0@20).
Now may be LayoutFrame should not be in morphic so that Spec is independent from Morphic but for now we prefered to avoid to have reference to LayoutFrame and more important use of #fractions:offsets:
Esteban will start to work on a UIBuilder because we do not want to have to code such methods and he will do a pass on Spec. After we will stabilize it.
I know, it is a lot of work but we cannot write tools and bindings to other user interface if the basic UI framework is undocumented and changing silently.
Cheers, -- Pavel
it seems that #layout is expecting a LayoutFrame as argument. But since I do not know what Stef and Igor changed (and what they didn't fix ^^) I can't tell more than that :s And I do not have too much time right now, sorry Ben On Jan 8, 2013, at 4:05 PM, Pavel Krivanek wrote:
It does in plugin specs, for example
defaultSpec
^{ #ComposableSpec. #vResizing:. #shrinkWrap. #add:. {{self. #textModel}. #layout:. #(0 0 1 1 0 0 0 0)}. }
-- Pavel
On Tue, Jan 8, 2013 at 3:59 PM, Benjamin <benjamin.vanryseghem.pharo@gmail.com> wrote:
Can you show me your SpecLayout please ?
Ben
On Jan 8, 2013, at 3:57 PM, Pavel Krivanek wrote:
Hi Stef,
get it here:
Gofer new smalltalkhubUser: 'PavelKrivanek' project: 'Periscope'; package: 'Periscope'; load.
activate with:
Nautilus pluginClasses add: {(Smalltalk at: #NautilusPeriscopePlugin). #none} .
I tried to change it to the array form but it doesn't help. This is the error stack:
#('Array(Object)' 'doesNotUnderstand: #layoutFrame:') #('SpecInterpreter' 'actionToPerformWithSelector:arguments:') #('SpecInterpreter' 'interpretASpec:') #('SpecInterpreter' 'interpretASpec:model:superSpec:') #('SpecInterpreter class' 'private_interpretASpec:model:superSpec:') #('[...] in SpecInterpreter' 'interpretASpec:') #('Array(SequenceableCollection)' 'collect:') #('SpecInterpreter' 'interpretASpec:') #('SpecInterpreter' 'interpretASpec:model:superSpec:') #('SpecInterpreter class' 'private_interpretASpec:model:superSpec:') #('SpecInterpreter' 'retreiveSpecFrom:') #('SpecInterpreter' 'interpretASpec:') #('SpecInterpreter' 'interpretASpec:model:superSpec:') #('SpecInterpreter class' 'private_interpretASpec:model:superSpec:') #('[...] in SpecInterpreter' 'interpretASpec:') #('Array(SequenceableCollection)' 'collect:') #('SpecInterpreter' 'interpretASpec:') #('SpecInterpreter' 'interpretASpec:model:superSpec:') #('SpecInterpreter class' 'private_interpretASpec:model:superSpec:') #('SpecInterpreter class' 'interpretASpec:model:superSpec:')
-- Pavel
On Tue, Jan 8, 2013 at 2:59 PM, Stéphane Ducasse <stephane.ducasse@inria.fr> wrote:
Hi Ben,
trying to run Periscope on the latest Pharo image, I see that everything is broken again. Please, start to write some documentation about Spec development, what have you changed, what do you plan to change, what are the new prefered ways to write UI specification and how to migrate old code. At least write some short mails here.
Hi pavel
where is your code? Because we did a massive refactoring with igor to free layoutFrame users from the tyranny of fractions:offset:
so you can have a look at some spec in the latest 20 and you will see that now we use
#layout: . #(0 0 1 1 0 22 0 0)
when it was #layout: {#LayoutFrame . #fractions:offsets:. (0@0 corner: 1@0). (0@0 corner: 0@20).
Now may be LayoutFrame should not be in morphic so that Spec is independent from Morphic but for now we prefered to avoid to have reference to LayoutFrame and more important use of #fractions:offsets:
Esteban will start to work on a UIBuilder because we do not want to have to code such methods and he will do a pass on Spec. After we will stabilize it.
I know, it is a lot of work but we cannot write tools and bindings to other user interface if the basic UI framework is undocumented and changing silently.
Cheers, -- Pavel
I will check. May be this evening. We transformed systematically defaultSpec ^ { #ComposableSpec. #add:. { self topSpec. #layout:. {#LayoutFrame. #fractions:offsets:. (0@0 corner: 1@0). (0@0 corner: 0@20). }}. #add:. {{#model. #container.}. #layout:. {#LayoutFrame. #fractions:offsets:. (0@0 corner: 1@1). (0@22 corner: 0@0). }}} into defaultSpec ^ { #ComposableSpec. #add:. { self topSpec. #layout:. #(0 0 1 0 0 0 0 20) }. #add:. {{#model . #container } . #layout: . #(0 0 1 1 0 22 0 0) } } So I do not see why this is different from what we did. Stef
It does in plugin specs, for example
defaultSpec
^{ #ComposableSpec. #vResizing:. #shrinkWrap. #add:. {{self. #textModel}. #layout:. #(0 0 1 1 0 0 0 0)}. }
-- Pavel
On Tue, Jan 8, 2013 at 3:59 PM, Benjamin <benjamin.vanryseghem.pharo@gmail.com> wrote:
Can you show me your SpecLayout please ?
Ben
On Jan 8, 2013, at 3:57 PM, Pavel Krivanek wrote:
Hi Stef,
get it here:
Gofer new smalltalkhubUser: 'PavelKrivanek' project: 'Periscope'; package: 'Periscope'; load.
activate with:
Nautilus pluginClasses add: {(Smalltalk at: #NautilusPeriscopePlugin). #none} .
I tried to change it to the array form but it doesn't help. This is the error stack:
#('Array(Object)' 'doesNotUnderstand: #layoutFrame:') #('SpecInterpreter' 'actionToPerformWithSelector:arguments:') #('SpecInterpreter' 'interpretASpec:') #('SpecInterpreter' 'interpretASpec:model:superSpec:') #('SpecInterpreter class' 'private_interpretASpec:model:superSpec:') #('[...] in SpecInterpreter' 'interpretASpec:') #('Array(SequenceableCollection)' 'collect:') #('SpecInterpreter' 'interpretASpec:') #('SpecInterpreter' 'interpretASpec:model:superSpec:') #('SpecInterpreter class' 'private_interpretASpec:model:superSpec:') #('SpecInterpreter' 'retreiveSpecFrom:') #('SpecInterpreter' 'interpretASpec:') #('SpecInterpreter' 'interpretASpec:model:superSpec:') #('SpecInterpreter class' 'private_interpretASpec:model:superSpec:') #('[...] in SpecInterpreter' 'interpretASpec:') #('Array(SequenceableCollection)' 'collect:') #('SpecInterpreter' 'interpretASpec:') #('SpecInterpreter' 'interpretASpec:model:superSpec:') #('SpecInterpreter class' 'private_interpretASpec:model:superSpec:') #('SpecInterpreter class' 'interpretASpec:model:superSpec:')
-- Pavel
On Tue, Jan 8, 2013 at 2:59 PM, Stéphane Ducasse <stephane.ducasse@inria.fr> wrote:
Hi Ben,
trying to run Periscope on the latest Pharo image, I see that everything is broken again. Please, start to write some documentation about Spec development, what have you changed, what do you plan to change, what are the new prefered ways to write UI specification and how to migrate old code. At least write some short mails here.
Hi pavel
where is your code? Because we did a massive refactoring with igor to free layoutFrame users from the tyranny of fractions:offset:
so you can have a look at some spec in the latest 20 and you will see that now we use
#layout: . #(0 0 1 1 0 22 0 0)
when it was #layout: {#LayoutFrame . #fractions:offsets:. (0@0 corner: 1@0). (0@0 corner: 0@20).
Now may be LayoutFrame should not be in morphic so that Spec is independent from Morphic but for now we prefered to avoid to have reference to LayoutFrame and more important use of #fractions:offsets:
Esteban will start to work on a UIBuilder because we do not want to have to code such methods and he will do a pass on Spec. After we will stabilize it.
I know, it is a lot of work but we cannot write tools and bindings to other user interface if the basic UI framework is undocumented and changing silently.
Cheers, -- Pavel
participants (5)
-
Benjamin -
Frank Shearar -
Pavel Krivanek -
Sean P. DeNigris -
Stéphane Ducasse