The bootstrap-dependency graph and report [1] mark dependency
System-Announcements --> PragmaCollector for pruning. This is due to... SystemAnnouncer>>restoreAllNotifications | collector | self reset. collector := PragmaCollector filter: [ :pragma | pragma keyword = #systemEventRegistration ]. collector reset. collector do: [ :pragma | pragma methodClass theNonMetaClass perform: pragma selector ] Browsing around I came to understand that PragmaCollector is useful as a pragma cache, but here the collector is thrown away, so that facility is not needed. A key part is "collector reset" which does... self class allSystemPragmas do: [:pragma | self addPragma: pragma] where the #addPragma: evaluates the initialize'd #filter: block. Now it seems that #allSystemPragmas might fit nicely on Pragma rather than PragmaCollector such that the following should be equivalent... SystemAnnouncer>>restoreAllNotifications | systemPragmas | self reset. systemPragmas := Pragma allSystemPragmas collect: [ :pragma | pragma keyword = #systemEventRegistration ]. systemPragmas do: [ :pragma | pragma methodClass theNonMetaClass perform: pragma selector However #allSystemPragmas depends on SystemNavigation, so is it be okay for Pragma to depend on SystemNavigation? Actually, class side of Pragma has several #named:in: like methods, so something like the following would be neat... SystemAnnouncer>>restoreAllNotifications self reset. Pragma allNamed: #systemEventRegistration do: [ :pragma | pragma methodClass theNonMetaClass perform: pragma selector ]. cheers -ben [1] https://ci.inria.fr/pharo/job/Pharo-5.0-DependencyAnalysis/Dependencies_HTML_Report/ |
> On 10 Sep 2015, at 17:22, Ben Coman <[hidden email]> wrote: > > The bootstrap-dependency graph and report [1] mark dependency > System-Announcements --> PragmaCollector for pruning. This is due to... > > SystemAnnouncer>>restoreAllNotifications > | collector | > self reset. > collector := PragmaCollector filter: [ :pragma | > pragma keyword = #systemEventRegistration ]. > collector reset. > collector do: [ :pragma | > pragma methodClass theNonMetaClass perform: pragma selector ] > > Browsing around I came to understand that PragmaCollector is useful as > a pragma cache, but here the collector is thrown away, so that > facility is not needed. A key part is "collector reset" which does... > self class allSystemPragmas > do: [:pragma | self addPragma: pragma] > > where the #addPragma: evaluates the initialize'd #filter: block. Now > it seems that #allSystemPragmas might fit nicely on Pragma rather than > PragmaCollector > such that the following should be equivalent... > > SystemAnnouncer>>restoreAllNotifications > | systemPragmas | > self reset. > systemPragmas := Pragma allSystemPragmas collect: [ :pragma | > pragma keyword = #systemEventRegistration ]. > systemPragmas do: [ :pragma | > pragma methodClass theNonMetaClass perform: pragma selector > Cool. I like that better. > However #allSystemPragmas depends on SystemNavigation, so is it be > okay for Pragma to depend on SystemNavigation? Spontaneously I’d say that SystemNavigation should depend on Pragma or PragmaCollector for looking up pragmas, not the other way around. > > Actually, class side of Pragma has several #named:in: like methods, so > something like the following would be neat... > SystemAnnouncer>>restoreAllNotifications > self reset. > Pragma allNamed: #systemEventRegistration do: [ :pragma | > pragma methodClass theNonMetaClass perform: pragma selector ]. > > cheers -ben > > [1] https://ci.inria.fr/pharo/job/Pharo-5.0-DependencyAnalysis/Dependencies_HTML_Report/ > |
On Fri, Sep 11, 2015 at 12:43 AM, Max Leske <[hidden email]> wrote:
> >> On 10 Sep 2015, at 17:22, Ben Coman <[hidden email]> wrote: >> >> The bootstrap-dependency graph and report [1] mark dependency >> System-Announcements --> PragmaCollector for pruning. This is due to... >> >> SystemAnnouncer>>restoreAllNotifications >> | collector | >> self reset. >> collector := PragmaCollector filter: [ :pragma | >> pragma keyword = #systemEventRegistration ]. >> collector reset. >> collector do: [ :pragma | >> pragma methodClass theNonMetaClass perform: pragma selector ] >> >> Browsing around I came to understand that PragmaCollector is useful as >> a pragma cache, but here the collector is thrown away, so that >> facility is not needed. A key part is "collector reset" which does... >> self class allSystemPragmas >> do: [:pragma | self addPragma: pragma] >> >> where the #addPragma: evaluates the initialize'd #filter: block. Now >> it seems that #allSystemPragmas might fit nicely on Pragma rather than >> PragmaCollector >> such that the following should be equivalent... >> >> SystemAnnouncer>>restoreAllNotifications >> | systemPragmas | >> self reset. >> systemPragmas := Pragma allSystemPragmas collect: [ :pragma | >> pragma keyword = #systemEventRegistration ]. >> systemPragmas do: [ :pragma | >> pragma methodClass theNonMetaClass perform: pragma selector >> > > Cool. I like that better. > >> However #allSystemPragmas depends on SystemNavigation, so is it be >> okay for Pragma to depend on SystemNavigation? > > Spontaneously I’d say that SystemNavigation should depend on Pragma or PragmaCollector for looking up pragmas, not the other way around. So you mean something like... SystemAnnouncer>>restoreAllNotifications self reset. SystemNavigation allPragmasNamed: #systemEventRegistration do: [ :pragma | pragma methodClass theNonMetaClass perform: pragma selector ]. where... SystemNavigation>>allPragmasNamed: symbol do: aBlock | systemPragmas | systemPragmas := self allSystemPragmas collect: [ :pragma | pragma keyword = symbol ]. systemPragmas do: [ :pragma | pragma methodClass theNonMetaClass perform: pragma selector SystemNavigation>>allSystemPragmas ^ (Array streamContents: [:stream | self allBehaviorsDo: [:behavior | Pragma withPragmasIn: behavior do: [:pragma | stream nextPut: pragma]]]) cheers -ben >> Actually, class side of Pragma has several #named:in: like methods, so >> something like the following would be neat... >> SystemAnnouncer>>restoreAllNotifications >> self reset. >> Pragma allNamed: #systemEventRegistration do: [ :pragma | >> pragma methodClass theNonMetaClass perform: pragma selector ]. |
In reply to this post by Ben Coman
Hi ben
I agree with you. I had the impression that many pragmaCollector methods would make sense in Pragma class level. Please continue your analysis. We should drastically clean SystemNavigation. - It should work on environment - remove all the browse behavior. Stef Le 10/9/15 17:22, Ben Coman a écrit : > The bootstrap-dependency graph and report [1] mark dependency > System-Announcements --> PragmaCollector for pruning. This is due to... > > SystemAnnouncer>>restoreAllNotifications > | collector | > self reset. > collector := PragmaCollector filter: [ :pragma | > pragma keyword = #systemEventRegistration ]. > collector reset. > collector do: [ :pragma | > pragma methodClass theNonMetaClass perform: pragma selector ] > > Browsing around I came to understand that PragmaCollector is useful as > a pragma cache, but here the collector is thrown away, so that > facility is not needed. A key part is "collector reset" which does... > self class allSystemPragmas > do: [:pragma | self addPragma: pragma] > > where the #addPragma: evaluates the initialize'd #filter: block. Now > it seems that #allSystemPragmas might fit nicely on Pragma rather than > PragmaCollector > such that the following should be equivalent... > > SystemAnnouncer>>restoreAllNotifications > | systemPragmas | > self reset. > systemPragmas := Pragma allSystemPragmas collect: [ :pragma | > pragma keyword = #systemEventRegistration ]. > systemPragmas do: [ :pragma | > pragma methodClass theNonMetaClass perform: pragma selector > > However #allSystemPragmas depends on SystemNavigation, so is it be > okay for Pragma to depend on SystemNavigation? > > Actually, class side of Pragma has several #named:in: like methods, so > something like the following would be neat... > SystemAnnouncer>>restoreAllNotifications > self reset. > Pragma allNamed: #systemEventRegistration do: [ :pragma | > pragma methodClass theNonMetaClass perform: pragma selector ]. > > cheers -ben > > [1] https://ci.inria.fr/pharo/job/Pharo-5.0-DependencyAnalysis/Dependencies_HTML_Report/ > > |
In reply to this post by Ben Coman
Pragma should not depend on SystemNavigation. The inverse
Le 10/9/15 19:44, Ben Coman a écrit : > On Fri, Sep 11, 2015 at 12:43 AM, Max Leske <[hidden email]> wrote: >>> On 10 Sep 2015, at 17:22, Ben Coman <[hidden email]> wrote: >>> >>> The bootstrap-dependency graph and report [1] mark dependency >>> System-Announcements --> PragmaCollector for pruning. This is due to... >>> >>> SystemAnnouncer>>restoreAllNotifications >>> | collector | >>> self reset. >>> collector := PragmaCollector filter: [ :pragma | >>> pragma keyword = #systemEventRegistration ]. >>> collector reset. >>> collector do: [ :pragma | >>> pragma methodClass theNonMetaClass perform: pragma selector ] >>> >>> Browsing around I came to understand that PragmaCollector is useful as >>> a pragma cache, but here the collector is thrown away, so that >>> facility is not needed. A key part is "collector reset" which does... >>> self class allSystemPragmas >>> do: [:pragma | self addPragma: pragma] >>> >>> where the #addPragma: evaluates the initialize'd #filter: block. Now >>> it seems that #allSystemPragmas might fit nicely on Pragma rather than >>> PragmaCollector >>> such that the following should be equivalent... >>> >>> SystemAnnouncer>>restoreAllNotifications >>> | systemPragmas | >>> self reset. >>> systemPragmas := Pragma allSystemPragmas collect: [ :pragma | >>> pragma keyword = #systemEventRegistration ]. >>> systemPragmas do: [ :pragma | >>> pragma methodClass theNonMetaClass perform: pragma selector >>> >> Cool. I like that better. >> >>> However #allSystemPragmas depends on SystemNavigation, so is it be >>> okay for Pragma to depend on SystemNavigation? >> Spontaneously I’d say that SystemNavigation should depend on Pragma or PragmaCollector for looking up pragmas, not the other way around. > So you mean something like... > > SystemAnnouncer>>restoreAllNotifications > self reset. > SystemNavigation allPragmasNamed: #systemEventRegistration do: > [ :pragma | > pragma methodClass theNonMetaClass perform: pragma selector ]. > > where... > > SystemNavigation>>allPragmasNamed: symbol do: aBlock > | systemPragmas | > systemPragmas := > self allSystemPragmas collect: [ :pragma | pragma keyword > = symbol ]. > systemPragmas do: [ :pragma | > pragma methodClass theNonMetaClass perform: pragma selector > > SystemNavigation>>allSystemPragmas > ^ (Array > streamContents: [:stream | > self allBehaviorsDo: [:behavior | > Pragma > withPragmasIn: behavior > do: [:pragma | stream nextPut: pragma]]]) > > cheers -ben > > >>> Actually, class side of Pragma has several #named:in: like methods, so >>> something like the following would be neat... >>> SystemAnnouncer>>restoreAllNotifications >>> self reset. >>> Pragma allNamed: #systemEventRegistration do: [ :pragma | >>> pragma methodClass theNonMetaClass perform: pragma selector ]. > |
I think SystemNavigation should essentially dissolve in the near future. Moose used to have one of these some 10 years ago, and now all queries are implemented as fluent APIs distributed throughout the model classes. I would want the Pharo code model should move in the same direction. Doru On Thu, Sep 10, 2015 at 8:29 PM, stepharo <[hidden email]> wrote: Pragma should not depend on SystemNavigation. The inverse |
> On 10 Sep 2015, at 23:01, Tudor Girba <[hidden email]> wrote: > > I think SystemNavigation should essentially dissolve in the near future. Moose used to have one of these some 10 years ago, and now all queries are implemented as fluent APIs distributed throughout the model classes. I would want the Pharo code model should move in the same direction. > Yes! Marcus |
In reply to this post by Ben Coman
Yes, exactly.
|
In reply to this post by Tudor Girba-2
yes but we are focusing on bootstrap and we cannot do deep first :)
Doing a pass on systemnavigation will help. And having the dependencies in the right order would help too. Le 10/9/15 23:01, Tudor Girba a écrit :
|
In reply to this post by Tudor Girba-2
On Fri, Sep 11, 2015 at 5:01 AM, Tudor Girba <[hidden email]> wrote:
> I think SystemNavigation should essentially dissolve in the near future. What timeline do you consider *near* ? ;) Should we go with my last proposal in the meantime? > Moose used to have one of these some 10 years ago, and now all queries are > implemented as fluent APIs distributed throughout the model classes. Could you clue me in on the "model" classes? cheers -ben > On Thu, Sep 10, 2015 at 8:29 PM, stepharo <[hidden email]> wrote: >> >> Pragma should not depend on SystemNavigation. The inverse >> >> >> Le 10/9/15 19:44, Ben Coman a écrit : >> >>> On Fri, Sep 11, 2015 at 12:43 AM, Max Leske <[hidden email]> wrote: >>>>> >>>>> On 10 Sep 2015, at 17:22, Ben Coman <[hidden email]> wrote: >>>>> >>>>> The bootstrap-dependency graph and report [1] mark dependency >>>>> System-Announcements --> PragmaCollector for pruning. This is due to... >>>>> >>>>> SystemAnnouncer>>restoreAllNotifications >>>>> | collector | >>>>> self reset. >>>>> collector := PragmaCollector filter: [ :pragma | >>>>> pragma keyword = #systemEventRegistration ]. >>>>> collector reset. >>>>> collector do: [ :pragma | >>>>> pragma methodClass theNonMetaClass perform: pragma >>>>> selector ] >>>>> >>>>> Browsing around I came to understand that PragmaCollector is useful as >>>>> a pragma cache, but here the collector is thrown away, so that >>>>> facility is not needed. A key part is "collector reset" which does... >>>>> self class allSystemPragmas >>>>> do: [:pragma | self addPragma: pragma] >>>>> >>>>> where the #addPragma: evaluates the initialize'd #filter: block. Now >>>>> it seems that #allSystemPragmas might fit nicely on Pragma rather than >>>>> PragmaCollector >>>>> such that the following should be equivalent... >>>>> >>>>> SystemAnnouncer>>restoreAllNotifications >>>>> | systemPragmas | >>>>> self reset. >>>>> systemPragmas := Pragma allSystemPragmas collect: [ :pragma | >>>>> pragma keyword = #systemEventRegistration ]. >>>>> systemPragmas do: [ :pragma | >>>>> pragma methodClass theNonMetaClass perform: pragma >>>>> selector >>>>> >>>> Cool. I like that better. >>>> >>>>> However #allSystemPragmas depends on SystemNavigation, so is it be >>>>> okay for Pragma to depend on SystemNavigation? >>>> >>>> Spontaneously I’d say that SystemNavigation should depend on Pragma or >>>> PragmaCollector for looking up pragmas, not the other way around. >>> >>> So you mean something like... >>> >>> SystemAnnouncer>>restoreAllNotifications >>> self reset. >>> SystemNavigation allPragmasNamed: #systemEventRegistration do: >>> [ :pragma | >>> pragma methodClass theNonMetaClass perform: pragma >>> selector ]. >>> >>> where... >>> >>> SystemNavigation>>allPragmasNamed: symbol do: aBlock >>> | systemPragmas | >>> systemPragmas := >>> self allSystemPragmas collect: [ :pragma | pragma keyword >>> = symbol ]. >>> systemPragmas do: [ :pragma | >>> pragma methodClass theNonMetaClass perform: pragma >>> selector >>> >>> SystemNavigation>>allSystemPragmas >>> ^ (Array >>> streamContents: [:stream | >>> self allBehaviorsDo: [:behavior | >>> Pragma >>> withPragmasIn: behavior >>> do: [:pragma | stream nextPut: pragma]]]) >>> >>> cheers -ben >>> >>> >>>>> Actually, class side of Pragma has several #named:in: like methods, so >>>>> something like the following would be neat... >>>>> SystemAnnouncer>>restoreAllNotifications >>>>> self reset. >>>>> Pragma allNamed: #systemEventRegistration do: [ :pragma | >>>>> pragma methodClass theNonMetaClass perform: pragma >>>>> selector ]. |
Le 11/9/15 14:15, Ben Coman a écrit : > On Fri, Sep 11, 2015 at 5:01 AM, Tudor Girba <[hidden email]> wrote: >> I think SystemNavigation should essentially dissolve in the near future. > What timeline do you consider *near* ? ;) > Should we go with my last proposal in the meantime? yes never never stops to incrementally improve the system because something better will happen especially when doing this small steps is the first one in building the better one :) This makes me realizes that I lost my great Calvin and Hobbes quote :) > >> Moose used to have one of these some 10 years ago, and now all queries are >> implemented as fluent APIs distributed throughout the model classes. > Could you clue me in on the "model" classes? > cheers -ben > >> On Thu, Sep 10, 2015 at 8:29 PM, stepharo <[hidden email]> wrote: >>> Pragma should not depend on SystemNavigation. The inverse >>> >>> >>> Le 10/9/15 19:44, Ben Coman a écrit : >>> >>>> On Fri, Sep 11, 2015 at 12:43 AM, Max Leske <[hidden email]> wrote: >>>>>> On 10 Sep 2015, at 17:22, Ben Coman <[hidden email]> wrote: >>>>>> >>>>>> The bootstrap-dependency graph and report [1] mark dependency >>>>>> System-Announcements --> PragmaCollector for pruning. This is due to... >>>>>> >>>>>> SystemAnnouncer>>restoreAllNotifications >>>>>> | collector | >>>>>> self reset. >>>>>> collector := PragmaCollector filter: [ :pragma | >>>>>> pragma keyword = #systemEventRegistration ]. >>>>>> collector reset. >>>>>> collector do: [ :pragma | >>>>>> pragma methodClass theNonMetaClass perform: pragma >>>>>> selector ] >>>>>> >>>>>> Browsing around I came to understand that PragmaCollector is useful as >>>>>> a pragma cache, but here the collector is thrown away, so that >>>>>> facility is not needed. A key part is "collector reset" which does... >>>>>> self class allSystemPragmas >>>>>> do: [:pragma | self addPragma: pragma] >>>>>> >>>>>> where the #addPragma: evaluates the initialize'd #filter: block. Now >>>>>> it seems that #allSystemPragmas might fit nicely on Pragma rather than >>>>>> PragmaCollector >>>>>> such that the following should be equivalent... >>>>>> >>>>>> SystemAnnouncer>>restoreAllNotifications >>>>>> | systemPragmas | >>>>>> self reset. >>>>>> systemPragmas := Pragma allSystemPragmas collect: [ :pragma | >>>>>> pragma keyword = #systemEventRegistration ]. >>>>>> systemPragmas do: [ :pragma | >>>>>> pragma methodClass theNonMetaClass perform: pragma >>>>>> selector >>>>>> >>>>> Cool. I like that better. >>>>> >>>>>> However #allSystemPragmas depends on SystemNavigation, so is it be >>>>>> okay for Pragma to depend on SystemNavigation? >>>>> Spontaneously I’d say that SystemNavigation should depend on Pragma or >>>>> PragmaCollector for looking up pragmas, not the other way around. >>>> So you mean something like... >>>> >>>> SystemAnnouncer>>restoreAllNotifications >>>> self reset. >>>> SystemNavigation allPragmasNamed: #systemEventRegistration do: >>>> [ :pragma | >>>> pragma methodClass theNonMetaClass perform: pragma >>>> selector ]. >>>> >>>> where... >>>> >>>> SystemNavigation>>allPragmasNamed: symbol do: aBlock >>>> | systemPragmas | >>>> systemPragmas := >>>> self allSystemPragmas collect: [ :pragma | pragma keyword >>>> = symbol ]. >>>> systemPragmas do: [ :pragma | >>>> pragma methodClass theNonMetaClass perform: pragma >>>> selector >>>> >>>> SystemNavigation>>allSystemPragmas >>>> ^ (Array >>>> streamContents: [:stream | >>>> self allBehaviorsDo: [:behavior | >>>> Pragma >>>> withPragmasIn: behavior >>>> do: [:pragma | stream nextPut: pragma]]]) >>>> >>>> cheers -ben >>>> >>>> >>>>>> Actually, class side of Pragma has several #named:in: like methods, so >>>>>> something like the following would be neat... >>>>>> SystemAnnouncer>>restoreAllNotifications >>>>>> self reset. >>>>>> Pragma allNamed: #systemEventRegistration do: [ :pragma | >>>>>> pragma methodClass theNonMetaClass perform: pragma >>>>>> selector ]. > |
When in doubt, just do small steps :). Moose dissolved this central navigation class in about 4 years. I certainly do not think that we should wait for anything. I just think that we should pick it as a target and guide the incremental improvements towards distributing the queries throughout the object model. Cheers, Doru On Sat, Sep 12, 2015 at 8:43 AM, stepharo <[hidden email]> wrote:
|
Free forum by Nabble | Edit this page |