The Inbox: MorphicExtras-ct.263.mcz

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

The Inbox: MorphicExtras-ct.263.mcz

commits-2
A new version of MorphicExtras was added to project The Inbox:
http://source.squeak.org/inbox/MorphicExtras-ct.263.mcz

==================== Summary ====================

Name: MorphicExtras-ct.263
Author: ct
Time: 7 September 2019, 12:35:29.653698 pm
UUID: 7205ede8-7f4d-3842-bb5f-01738abfc5cb
Ancestors: MorphicExtras-ct.262

Switch from preamble to postscript and from DateAndTime to TimeStamp

=============== Diff against MorphicExtras-mt.260 ===============

Item was changed:
  StringMorph subclass: #FrameRateMorph
+ instanceVariableNames: 'lastDisplayTime framesSinceLastDisplay updateInterval mSecsPerFrame framesPerSec'
- instanceVariableNames: 'lastDisplayTime framesSinceLastDisplay'
  classVariableNames: ''
  poolDictionaries: ''
  category: 'MorphicExtras-Demo'!

Item was changed:
  ----- Method: FrameRateMorph class>>descriptionForPartsBin (in category 'parts bin') -----
  descriptionForPartsBin
  ^ self partName: 'FrameRate' translatedNoop
+ categories: {'Tools' translatedNoop}
- categories: {'Just for Fun' translatedNoop}
  documentation: 'A readout that allows you to monitor the frame rate of your system' translatedNoop!

Item was added:
+ ----- Method: FrameRateMorph>>framesPerSec (in category 'accessing') -----
+ framesPerSec
+
+ ^ framesPerSec!

Item was changed:
  ----- Method: FrameRateMorph>>initialize (in category 'initialization') -----
  initialize
  "initialize the state of the receiver"
  super initialize.
  ""
+ lastDisplayTime := DateAndTime new.
- lastDisplayTime := 0.
  framesSinceLastDisplay := 0.
+ self updateInterval: 500 milliSeconds.
  self font: (Preferences standardMenuFont emphasized: 1).
  !

Item was added:
+ ----- Method: FrameRateMorph>>mSecsPerFrame (in category 'accessing') -----
+ mSecsPerFrame
+
+ ^ mSecsPerFrame!

Item was changed:
  ----- Method: FrameRateMorph>>step (in category 'stepping and presenter') -----
  step
  "Compute and display (every half second or so) the current framerate"
 
+ | now timePassed |
- | now mSecs mSecsPerFrame framesPerSec newContents |
  framesSinceLastDisplay := framesSinceLastDisplay + 1.
+ now := DateAndTime now.
+ timePassed := now - lastDisplayTime.
+ (timePassed > self updateInterval) ifTrue:
+ [| mSecs |
+ mSecs := timePassed asMilliSeconds.
+ mSecsPerFrame := mSecs // framesSinceLastDisplay.
- now := Time millisecondClockValue.
- mSecs := now - lastDisplayTime.
- (mSecs > 500 or: [mSecs < 0 "clock wrap-around"]) ifTrue:
- [mSecsPerFrame := mSecs // framesSinceLastDisplay.
  framesPerSec := (framesSinceLastDisplay * 1000) // mSecs.
+ self contents: ('{1} mSecs ({2} frame{3}/sec)'
+ format: {mSecsPerFrame. framesPerSec. framesPerSec = 1 ifTrue: [''] ifFalse: ['s']}).
- newContents := mSecsPerFrame printString, ' mSecs (', framesPerSec printString, ' frame', (framesPerSec = 1 ifTrue: [''] ifFalse: ['s']), '/sec)'.
- self contents: newContents.
  lastDisplayTime := now.
  framesSinceLastDisplay := 0]
  ifFalse:
  ["Ensure at least one pixel is drawn per frame"
  Preferences higherPerformance ifTrue: [self invalidRect: (self position extent: 1@1)]]!

Item was added:
+ ----- Method: FrameRateMorph>>updateInterval (in category 'accessing') -----
+ updateInterval
+
+ ^ updateInterval!

Item was added:
+ ----- Method: FrameRateMorph>>updateInterval: (in category 'accessing') -----
+ updateInterval: aNumber
+
+ updateInterval := aNumber!

Item was changed:
+ (PackageInfo named: 'MorphicExtras') postscript: 'FrameRateMorph allSubInstances do: [:frm | | wasStepping |
+ wasStepping := frm isStepping.
+ wasStepping ifTrue: [frm stopStepping].
+ frm
+ instVarNamed: #lastDisplayTime
+ put: DateAndTime now;
+ updateInterval: 500 milliSeconds.
+ wasStepping ifTrue: [frm startStepping]].'!
- (PackageInfo named: 'MorphicExtras') postscript: 'TrashCanMorph preserveTrash: Preferences preserveTrash.
- TrashCanMorph slideDismissalsToTrash: Preferences slideDismissalsToTrash.
-
- Preferences removePreference: #preserveTrash.
- Preferences removePreference: #slideDismissalsToTrash.'!


Reply | Threaded
Open this post in threaded view
|

Re: The Inbox: MorphicExtras-ct.263.mcz

Christoph Thiede

See HTML below, is that ancestry a problem?


Please also note I moved the FRMorph from the fun to the tools parts bin category. Would you agree with that?



Von: Squeak-dev <[hidden email]> im Auftrag von [hidden email] <[hidden email]>
Gesendet: Samstag, 7. September 2019 12:44 Uhr
An: [hidden email]
Betreff: [squeak-dev] The Inbox: MorphicExtras-ct.263.mcz
 
A new version of MorphicExtras was added to project The Inbox:
http://source.squeak.org/inbox/MorphicExtras-ct.263.mcz

==================== Summary ====================

Name: MorphicExtras-ct.263
Author: ct
Time: 7 September 2019, 12:35:29.653698 pm
UUID: 7205ede8-7f4d-3842-bb5f-01738abfc5cb
Ancestors: MorphicExtras-ct.262

Switch from preamble to postscript and from DateAndTime to TimeStamp

=============== Diff against MorphicExtras-mt.260 ===============

Item was changed:
  StringMorph subclass: #FrameRateMorph
+        instanceVariableNames: 'lastDisplayTime framesSinceLastDisplay updateInterval mSecsPerFrame framesPerSec'
-        instanceVariableNames: 'lastDisplayTime framesSinceLastDisplay'
         classVariableNames: ''
         poolDictionaries: ''
         category: 'MorphicExtras-Demo'!

Item was changed:
  ----- Method: FrameRateMorph class>>descriptionForPartsBin (in category 'parts bin') -----
  descriptionForPartsBin
         ^ self partName:        'FrameRate' translatedNoop
+                categories:             {'Tools' translatedNoop}
-                categories:             {'Just for Fun' translatedNoop}
                 documentation:  'A readout that allows you to monitor the frame rate of your system' translatedNoop!

Item was added:
+ ----- Method: FrameRateMorph>>framesPerSec (in category 'accessing') -----
+ framesPerSec
+
+        ^ framesPerSec!

Item was changed:
  ----- Method: FrameRateMorph>>initialize (in category 'initialization') -----
  initialize
  "initialize the state of the receiver"
         super initialize.
  ""
+        lastDisplayTime := DateAndTime new.
-        lastDisplayTime := 0.
         framesSinceLastDisplay := 0.
+        self updateInterval: 500 milliSeconds.
         self font: (Preferences standardMenuFont emphasized: 1).
  !

Item was added:
+ ----- Method: FrameRateMorph>>mSecsPerFrame (in category 'accessing') -----
+ mSecsPerFrame
+
+        ^ mSecsPerFrame!

Item was changed:
  ----- Method: FrameRateMorph>>step (in category 'stepping and presenter') -----
  step
         "Compute and display (every half second or so) the current framerate"
 
+        | now timePassed |
-        | now mSecs mSecsPerFrame framesPerSec newContents |
         framesSinceLastDisplay := framesSinceLastDisplay + 1.
+        now := DateAndTime now.
+        timePassed := now - lastDisplayTime.
+        (timePassed > self updateInterval) ifTrue:
+                [| mSecs |
+                mSecs := timePassed asMilliSeconds.
+                mSecsPerFrame := mSecs // framesSinceLastDisplay.
-        now := Time millisecondClockValue.
-        mSecs := now - lastDisplayTime.
-        (mSecs > 500 or: [mSecs < 0 "clock wrap-around"]) ifTrue:
-                [mSecsPerFrame := mSecs // framesSinceLastDisplay.
                 framesPerSec := (framesSinceLastDisplay * 1000) // mSecs.
+                self contents: ('{1} mSecs ({2} frame{3}/sec)'
+                        format: {mSecsPerFrame. framesPerSec. framesPerSec = 1 ifTrue: [''] ifFalse: ['s']}).
-                newContents := mSecsPerFrame printString, ' mSecs (', framesPerSec printString, ' frame', (framesPerSec = 1 ifTrue: [''] ifFalse: ['s']), '/sec)'.
-                self contents: newContents.
                 lastDisplayTime := now.
                 framesSinceLastDisplay := 0]
         ifFalse:
                 ["Ensure at least one pixel is drawn per frame"
                 Preferences higherPerformance ifTrue: [self invalidRect: (self position extent: 1@1)]]!

Item was added:
+ ----- Method: FrameRateMorph>>updateInterval (in category 'accessing') -----
+ updateInterval
+
+        ^ updateInterval!

Item was added:
+ ----- Method: FrameRateMorph>>updateInterval: (in category 'accessing') -----
+ updateInterval: aNumber
+
+        updateInterval := aNumber!

Item was changed:
+ (PackageInfo named: 'MorphicExtras') postscript: 'FrameRateMorph allSubInstances do: [:frm | | wasStepping |
+        wasStepping := frm isStepping.
+        wasStepping ifTrue: [frm stopStepping].
+        frm
+                instVarNamed: #lastDisplayTime
+                        put: DateAndTime now;
+                updateInterval: 500 milliSeconds.
+        wasStepping ifTrue: [frm startStepping]].'!
- (PackageInfo named: 'MorphicExtras') postscript: 'TrashCanMorph preserveTrash: Preferences preserveTrash.
- TrashCanMorph slideDismissalsToTrash: Preferences slideDismissalsToTrash.
-
- Preferences removePreference: #preserveTrash.
- Preferences removePreference: #slideDismissalsToTrash.'!




Carpe Squeak!
Reply | Threaded
Open this post in threaded view
|

Re: The Inbox: MorphicExtras-ct.263.mcz

Chris Muller-3
Hi Christoph,

Thanks for regarding the ancestry as an important part of the code model too.  It absolutely is.  If your question is about the break in consecutiveness, it's absolutely fine, not a problem at all.

Overall, what is important, IMO, is to do our best to keep the ancestry as meaty and meaningful as we can.  Whether Dave designed it for this purpose or not, the new "Reparent" function on the Repository browser is very useful to employ before committing Inbox items for which feedback has been received, to trunk.  By reparenting to the original trunk version, the whole logical change is captured into one commit instead of spread across multiple commits.  If not, though, its just be sure every one of those interim version of the ancestry is present in the same repository, otherwise the tools will produce errors when diffing those versions...

Best,
  Chris





On Sat, Sep 7, 2019 at 5:51 AM Thiede, Christoph <[hidden email]> wrote:

See HTML below, is that ancestry a problem?


Please also note I moved the FRMorph from the fun to the tools parts bin category. Would you agree with that?



Von: Squeak-dev <[hidden email]> im Auftrag von [hidden email] <[hidden email]>
Gesendet: Samstag, 7. September 2019 12:44 Uhr
An: [hidden email]
Betreff: [squeak-dev] The Inbox: MorphicExtras-ct.263.mcz
 
A new version of MorphicExtras was added to project The Inbox:
http://source.squeak.org/inbox/MorphicExtras-ct.263.mcz

==================== Summary ====================

Name: MorphicExtras-ct.263
Author: ct
Time: 7 September 2019, 12:35:29.653698 pm
UUID: 7205ede8-7f4d-3842-bb5f-01738abfc5cb
Ancestors: MorphicExtras-ct.262

Switch from preamble to postscript and from DateAndTime to TimeStamp

=============== Diff against MorphicExtras-mt.260 ===============

Item was changed:
  StringMorph subclass: #FrameRateMorph
+        instanceVariableNames: 'lastDisplayTime framesSinceLastDisplay updateInterval mSecsPerFrame framesPerSec'
-        instanceVariableNames: 'lastDisplayTime framesSinceLastDisplay'
         classVariableNames: ''
         poolDictionaries: ''
         category: 'MorphicExtras-Demo'!

Item was changed:
  ----- Method: FrameRateMorph class>>descriptionForPartsBin (in category 'parts bin') -----
  descriptionForPartsBin
         ^ self partName:        'FrameRate' translatedNoop
+                categories:             {'Tools' translatedNoop}
-                categories:             {'Just for Fun' translatedNoop}
                 documentation:  'A readout that allows you to monitor the frame rate of your system' translatedNoop!

Item was added:
+ ----- Method: FrameRateMorph>>framesPerSec (in category 'accessing') -----
+ framesPerSec
+
+        ^ framesPerSec!

Item was changed:
  ----- Method: FrameRateMorph>>initialize (in category 'initialization') -----
  initialize
  "initialize the state of the receiver"
         super initialize.
  ""
+        lastDisplayTime := DateAndTime new.
-        lastDisplayTime := 0.
         framesSinceLastDisplay := 0.
+        self updateInterval: 500 milliSeconds.
         self font: (Preferences standardMenuFont emphasized: 1).
  !

Item was added:
+ ----- Method: FrameRateMorph>>mSecsPerFrame (in category 'accessing') -----
+ mSecsPerFrame
+
+        ^ mSecsPerFrame!

Item was changed:
  ----- Method: FrameRateMorph>>step (in category 'stepping and presenter') -----
  step
         "Compute and display (every half second or so) the current framerate"
 
+        | now timePassed |
-        | now mSecs mSecsPerFrame framesPerSec newContents |
         framesSinceLastDisplay := framesSinceLastDisplay + 1.
+        now := DateAndTime now.
+        timePassed := now - lastDisplayTime.
+        (timePassed > self updateInterval) ifTrue:
+                [| mSecs |
+                mSecs := timePassed asMilliSeconds.
+                mSecsPerFrame := mSecs // framesSinceLastDisplay.
-        now := Time millisecondClockValue.
-        mSecs := now - lastDisplayTime.
-        (mSecs > 500 or: [mSecs < 0 "clock wrap-around"]) ifTrue:
-                [mSecsPerFrame := mSecs // framesSinceLastDisplay.
                 framesPerSec := (framesSinceLastDisplay * 1000) // mSecs.
+                self contents: ('{1} mSecs ({2} frame{3}/sec)'
+                        format: {mSecsPerFrame. framesPerSec. framesPerSec = 1 ifTrue: [''] ifFalse: ['s']}).
-                newContents := mSecsPerFrame printString, ' mSecs (', framesPerSec printString, ' frame', (framesPerSec = 1 ifTrue: [''] ifFalse: ['s']), '/sec)'.
-                self contents: newContents.
                 lastDisplayTime := now.
                 framesSinceLastDisplay := 0]
         ifFalse:
                 ["Ensure at least one pixel is drawn per frame"
                 Preferences higherPerformance ifTrue: [self invalidRect: (self position extent: 1@1)]]!

Item was added:
+ ----- Method: FrameRateMorph>>updateInterval (in category 'accessing') -----
+ updateInterval
+
+        ^ updateInterval!

Item was added:
+ ----- Method: FrameRateMorph>>updateInterval: (in category 'accessing') -----
+ updateInterval: aNumber
+
+        updateInterval := aNumber!

Item was changed:
+ (PackageInfo named: 'MorphicExtras') postscript: 'FrameRateMorph allSubInstances do: [:frm | | wasStepping |
+        wasStepping := frm isStepping.
+        wasStepping ifTrue: [frm stopStepping].
+        frm
+                instVarNamed: #lastDisplayTime
+                        put: DateAndTime now;
+                updateInterval: 500 milliSeconds.
+        wasStepping ifTrue: [frm startStepping]].'!
- (PackageInfo named: 'MorphicExtras') postscript: 'TrashCanMorph preserveTrash: Preferences preserveTrash.
- TrashCanMorph slideDismissalsToTrash: Preferences slideDismissalsToTrash.
-
- Preferences removePreference: #preserveTrash.
- Preferences removePreference: #slideDismissalsToTrash.'!





Reply | Threaded
Open this post in threaded view
|

Re: The Inbox: MorphicExtras-ct.263.mcz

Christoph Thiede

Alright, thanks for the explanation :)


Best,

Christoph


Von: Squeak-dev <[hidden email]> im Auftrag von Chris Muller <[hidden email]>
Gesendet: Dienstag, 10. September 2019 01:21:14
An: The general-purpose Squeak developers list
Betreff: Re: [squeak-dev] The Inbox: MorphicExtras-ct.263.mcz
 
Hi Christoph,

Thanks for regarding the ancestry as an important part of the code model too.  It absolutely is.  If your question is about the break in consecutiveness, it's absolutely fine, not a problem at all.

Overall, what is important, IMO, is to do our best to keep the ancestry as meaty and meaningful as we can.  Whether Dave designed it for this purpose or not, the new "Reparent" function on the Repository browser is very useful to employ before committing Inbox items for which feedback has been received, to trunk.  By reparenting to the original trunk version, the whole logical change is captured into one commit instead of spread across multiple commits.  If not, though, its just be sure every one of those interim version of the ancestry is present in the same repository, otherwise the tools will produce errors when diffing those versions...

Best,
  Chris





On Sat, Sep 7, 2019 at 5:51 AM Thiede, Christoph <[hidden email]> wrote:

See HTML below, is that ancestry a problem?


Please also note I moved the FRMorph from the fun to the tools parts bin category. Would you agree with that?



Von: Squeak-dev <[hidden email]> im Auftrag von [hidden email] <[hidden email]>
Gesendet: Samstag, 7. September 2019 12:44 Uhr
An: [hidden email]
Betreff: [squeak-dev] The Inbox: MorphicExtras-ct.263.mcz
 
A new version of MorphicExtras was added to project The Inbox:
http://source.squeak.org/inbox/MorphicExtras-ct.263.mcz

==================== Summary ====================

Name: MorphicExtras-ct.263
Author: ct
Time: 7 September 2019, 12:35:29.653698 pm
UUID: 7205ede8-7f4d-3842-bb5f-01738abfc5cb
Ancestors: MorphicExtras-ct.262

Switch from preamble to postscript and from DateAndTime to TimeStamp

=============== Diff against MorphicExtras-mt.260 ===============

Item was changed:
  StringMorph subclass: #FrameRateMorph
+        instanceVariableNames: 'lastDisplayTime framesSinceLastDisplay updateInterval mSecsPerFrame framesPerSec'
-        instanceVariableNames: 'lastDisplayTime framesSinceLastDisplay'
         classVariableNames: ''
         poolDictionaries: ''
         category: 'MorphicExtras-Demo'!

Item was changed:
  ----- Method: FrameRateMorph class>>descriptionForPartsBin (in category 'parts bin') -----
  descriptionForPartsBin
         ^ self partName:        'FrameRate' translatedNoop
+                categories:             {'Tools' translatedNoop}
-                categories:             {'Just for Fun' translatedNoop}
                 documentation:  'A readout that allows you to monitor the frame rate of your system' translatedNoop!

Item was added:
+ ----- Method: FrameRateMorph>>framesPerSec (in category 'accessing') -----
+ framesPerSec
+
+        ^ framesPerSec!

Item was changed:
  ----- Method: FrameRateMorph>>initialize (in category 'initialization') -----
  initialize
  "initialize the state of the receiver"
         super initialize.
  ""
+        lastDisplayTime := DateAndTime new.
-        lastDisplayTime := 0.
         framesSinceLastDisplay := 0.
+        self updateInterval: 500 milliSeconds.
         self font: (Preferences standardMenuFont emphasized: 1).
  !

Item was added:
+ ----- Method: FrameRateMorph>>mSecsPerFrame (in category 'accessing') -----
+ mSecsPerFrame
+
+        ^ mSecsPerFrame!

Item was changed:
  ----- Method: FrameRateMorph>>step (in category 'stepping and presenter') -----
  step
         "Compute and display (every half second or so) the current framerate"
 
+        | now timePassed |
-        | now mSecs mSecsPerFrame framesPerSec newContents |
         framesSinceLastDisplay := framesSinceLastDisplay + 1.
+        now := DateAndTime now.
+        timePassed := now - lastDisplayTime.
+        (timePassed > self updateInterval) ifTrue:
+                [| mSecs |
+                mSecs := timePassed asMilliSeconds.
+                mSecsPerFrame := mSecs // framesSinceLastDisplay.
-        now := Time millisecondClockValue.
-        mSecs := now - lastDisplayTime.
-        (mSecs > 500 or: [mSecs < 0 "clock wrap-around"]) ifTrue:
-                [mSecsPerFrame := mSecs // framesSinceLastDisplay.
                 framesPerSec := (framesSinceLastDisplay * 1000) // mSecs.
+                self contents: ('{1} mSecs ({2} frame{3}/sec)'
+                        format: {mSecsPerFrame. framesPerSec. framesPerSec = 1 ifTrue: [''] ifFalse: ['s']}).
-                newContents := mSecsPerFrame printString, ' mSecs (', framesPerSec printString, ' frame', (framesPerSec = 1 ifTrue: [''] ifFalse: ['s']), '/sec)'.
-                self contents: newContents.
                 lastDisplayTime := now.
                 framesSinceLastDisplay := 0]
         ifFalse:
                 ["Ensure at least one pixel is drawn per frame"
                 Preferences higherPerformance ifTrue: [self invalidRect: (self position extent: 1@1)]]!

Item was added:
+ ----- Method: FrameRateMorph>>updateInterval (in category 'accessing') -----
+ updateInterval
+
+        ^ updateInterval!

Item was added:
+ ----- Method: FrameRateMorph>>updateInterval: (in category 'accessing') -----
+ updateInterval: aNumber
+
+        updateInterval := aNumber!

Item was changed:
+ (PackageInfo named: 'MorphicExtras') postscript: 'FrameRateMorph allSubInstances do: [:frm | | wasStepping |
+        wasStepping := frm isStepping.
+        wasStepping ifTrue: [frm stopStepping].
+        frm
+                instVarNamed: #lastDisplayTime
+                        put: DateAndTime now;
+                updateInterval: 500 milliSeconds.
+        wasStepping ifTrue: [frm startStepping]].'!
- (PackageInfo named: 'MorphicExtras') postscript: 'TrashCanMorph preserveTrash: Preferences preserveTrash.
- TrashCanMorph slideDismissalsToTrash: Preferences slideDismissalsToTrash.
-
- Preferences removePreference: #preserveTrash.
- Preferences removePreference: #slideDismissalsToTrash.'!





Carpe Squeak!