Am 2011-07-25 um 11:53 schrieb commits(a)source.squeak.org:
> Bert Freudenberg uploaded a new version of Tools to project The Trunk:
> http://source.squeak.org/trunk/Tools-bf.369.mcz
>
> ==================== Summary ====================
>
> Name: Tools-bf.369
> Author: bf
> Time: 25 July 2011, 1:53:10.449 pm
> UUID: 5a6e4b62-4914-406e-b5e2-71f2be15e8cd
> Ancestors: Tools-btc.368
>
> If the user changes a class comment in the SystemBrowser's annotation pane, make it do what the user expects. See http://stackoverflow.com/questions/6802798
No, please don't!
98% of the time I accept in the annotations pane, it
is purely by accident because my cursor was in
the annotations pane and not in the editing window.
Accepting in the annotations pane would somewhat
destroy my (accident-driven ?!) workflow.
Best
-Tobias
Eliot Miranda uploaded a new version of System to project The Trunk:
http://source.squeak.org/trunk/System-eem.450.mcz
==================== Summary ====================
Name: System-eem.450
Author: eem
Time: 25 July 2011, 10:54:32.489 am
UUID: aef72684-3068-4139-92cd-874af8591b31
Ancestors: System-ul.449
Fix allBehaviorsDo: to avoid duplicates, and to be a lot simpler.
=============== Diff against System-ul.449 ===============
Item was changed:
----- Method: SystemNavigation>>allBehaviorsDo: (in category 'query') -----
allBehaviorsDo: aBlock
"Evaluate the argument, aBlock, for each kind of Behavior in the system
(that is, Object and its subclasses and Traits).
ar 7/15/1999: The code below will not enumerate any obsolete or anonymous
behaviors for which the following should be executed:
Smalltalk allObjectsDo:[:obj| obj isBehavior ifTrue:[aBlock value: obj]].
but what follows is way faster than enumerating all objects."
+ Class rootsOfTheWorld do:
+ [:root|
+ root withAllSubclassesDo:
+ [:class|
+ class isMeta ifFalse: "The metaclasses are rooted at Class; don't include them twice."
+ [aBlock value: class; value: class class]]].
+ ClassDescription allTraitsDo:
+ [:trait | aBlock value: trait]!
- aBlock value: ProtoObject.
- ProtoObject allSubclassesDoGently: aBlock. "don't bring in ImageSegments"
-
- "Classes outside the ProtoObject hierarchy"
- Class subclassesDo: [:aClass |
- (aClass == ProtoObject class
- or: [aClass isInMemory not
- or: [aClass isMeta not]]) ifFalse:
- ["Enumerate the non-meta class and its subclasses"
- aBlock value: aClass soleInstance.
- aClass soleInstance allSubclassesDoGently: aBlock]].
-
- ClassDescription allTraitsDo:[:trait | aBlock value: trait].!
Bert Freudenberg uploaded a new version of Graphics to project The Trunk:
http://source.squeak.org/trunk/Graphics-bf.188.mcz
==================== Summary ====================
Name: Graphics-bf.188
Author: bf
Time: 25 July 2011, 5:16:41.997 pm
UUID: c886cf33-2585-40a1-b8b3-0d7974b9f2c7
Ancestors: Graphics-nice.187
- show floats when exploring transforms
=============== Diff against Graphics-nice.187 ===============
Item was added:
+ ----- Method: MatrixTransform2x3>>explorerContents (in category 'explorer') -----
+ explorerContents
+ ^(FloatArray newFrom: self) explorerContents!
Bert Freudenberg uploaded a new version of Tools to project The Trunk:
http://source.squeak.org/trunk/Tools-bf.370.mcz
==================== Summary ====================
Name: Tools-bf.370
Author: bf
Time: 25 July 2011, 1:59:10.829 pm
UUID: 249933b1-fb5f-4876-a520-d5438745b491
Ancestors: Tools-bf.369
remove method that accidentally slipped into last commit
=============== Diff against Tools-bf.369 ===============
Item was removed:
- ----- Method: CodeHolder>>acceptAnnotation: (in category 'annotation') -----
- acceptAnnotation: aString
- "The user accepted aString in our annotion pane. Return false because by default we cannot edit annotations"
- ^ false
- !
Hello,
I am reposting with easier data to read as my previous posts were confusing.
What is profiled is an user interaction with a DrGeo sketch: the user
drags a point, a segment then the whole sketch is recomputed in real
time. The sketch in question is the one shown in picture
http://squeak.ofset.org/tmp/profile1a.PNG
When interacting with the sketch, artifacts appear in the smaller morphs
like the small red rectangles representing points. There is a tiny delay
when they are redrawn, however once the interaction ends, the whole
sktech is clean without any artifacts.
I still can't have a text form for the profile on iPad, but I have
pasted the two images in one, easier to read in one shot. Sorry.
So the profile is in the file
http://squeak.ofset.org/tmp/profile1iPad.PNG
I also included a profile of the same interaction on a PC, file
profile1PC.txt
Looking at the profile, I see in the iPad a lot of time spent in the
method #idleProcess. The #eventLoop also counts for a lot.
I don't know how to interpret these two results.
Thanks
Hilaire
PS: for those interested, I have a fee scripts to build from scratch a
DrGeo image for the iPad, see
https://gforge.inria.fr/scm/?group_id=1308https://gforge.inria.fr/scm/viewvc.php/drgeo2/?root=istoa
--
Education 0.2 -- http://blog.ofset.org/hilaire
Levente Uzonyi uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-ul.557.mcz
==================== Summary ====================
Name: Morphic-ul.557
Author: ul
Time: 25 July 2011, 11:25:48.544 am
UUID: 1722d2af-9a53-8645-bd3b-10277d1f4e36
Ancestors: Morphic-ul.556
Added a missing whitespace.
=============== Diff against Morphic-ul.556 ===============
Item was changed:
----- Method: SequenceableCollection>>closedCubicSlopes (in category '*Morphic-NewCurves-cubic support') -----
closedCubicSlopes
"Sent to knots returns the slopes of a closed cubic spline.
From the same set of java sources as naturalCubic. This is a squeak
transliteration of the java code."
"from java code NatCubicClosed extends NatCubic
solves for the set of equations for all knots:
b1+4*b2+b3=3*(a3-a1)
where a1 is (knots atWrap: index + 1) etc.
and the b's are the slopes .
by decomposing the matrix into upper triangular and lower matrices
and then back sustitution. See Spath 'Spline Algorithms for Curves
and Surfaces' pp 19--21. The D[i] are the derivatives at the knots.
"
| v w x y z n1 D F G H |
n1 := self size.
n1 < 3
ifTrue: [self error: 'Less than 3 points makes a poor curve'].
v := Array new: n1.
w := Array new: n1.
y := Array new: n1.
D := Array new: n1.
x := self.
z := 1.0 / 4.0.
v at: 2 put: z.
w at: 2 put: z.
y at: 1 put: z * 3.0 * ((x at: 2)
- (x at: n1)).
H := 4.0.
F := 3 * ((x at: 1)
- (x at: n1 - 1)).
G := 1.
2 to: n1 - 1
do: [:k |
z := 1.0 / (4.0
- (v at: k)).
v at: k + 1 put: z.
w at: k + 1 put: z negated
* (w at: k).
y at: k put: z * (3.0 * ((x at: k + 1)
- (x at: k - 1))
- (y at: k - 1)).
H := H - (G
* (w at: k)).
F := F - (G
* (y at: k - 1)).
G := (v at: k) negated * G].
H := H - (G + 1 * ((v at: n1)
+ (w at: n1))).
y at: n1 put: F - (G + 1
* (y at: n1 - 1)).
D at: n1 put: (y at: n1)
/ H.
D at: n1 - 1 put: (y at: n1 - 1)
- ((v at: n1)
+ (w at: n1)
* (D at: n1)).
+ n1 - 2 to: 1 by: -1 do: [ :k |
- n1 -2 to: 1 by: -1 do: [ :k |
D at: k put:
(y at: k)
- ((v at: k + 1)
* (D at: k + 1)) - ((w at: k + 1)
* (D at: n1))].
^ D .!
Levente Uzonyi uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-ul.556.mcz
==================== Summary ====================
Name: Morphic-ul.556
Author: ul
Time: 25 July 2011, 1:41:43.183 am
UUID: 674e0386-e032-5c40-8708-f89d2f73edd7
Ancestors: Morphic-ul.555
Various speedups for curves:
- avoid an unnecessary assert (with an unnecessary block) in Cubic>>honeIn:.
- pass a point for #polynomialEval:, instead of a Float to avoid Point-Float multiplications in Cubic>>measureFor:
- avoid interval creation in SequenceableCollection>>changeOfChangesInSlopes: and SequenceableCollection>>closedCubicSlopes
- avoid creating intermediate objects in SequenceableCollection>>cubicPointPolynomialAt:
=============== Diff against Morphic-ul.555 ===============
Item was changed:
----- Method: Cubic>>honeIn: (in category 'cubic support') -----
honeIn: enough
"Find if there is a smaller n than enough that give the same
measure for n."
+
+ enough < 2 ifTrue: [ ^enough].
- self
- assert: [enough isPowerOfTwo].
- enough < 2
- ifTrue: [^ enough].
^ self
honeIn: enough
step: enough // 2
measure: (self measureFor: enough)
withIn: self leeway!
Item was changed:
----- Method: Cubic>>measureFor: (in category 'cubic support') -----
measureFor: n
"Return a distance measure for cubic curve with n segments.
For convienence and accuracy we use the sum of the
distances. "
"first point is poly of 0."
+ | p1 measure |
+ p1 := self at: 1.
- | p1 p2 measure |
- p1 := self first.
measure := 0.
+ 1 to: n do: [ :i |
+ | x p2 |
+ x := i asFloat / n.
+ p2 := self polynomialEval: x @ x.
+ measure := measure + (p2 dist: p1).
+ p1 := p2 ].
+ ^measure!
- 1 to: n
- do: [:i |
- p2 := self polynomialEval: i / n asFloat.
- measure := measure
- + (p2 dist: p1).
- p1 := p2].
- ^ measure!
Item was changed:
----- Method: SequenceableCollection>>changeOfChangesInSlopes: (in category '*Morphic-NewCurves-cubic support') -----
changeOfChangesInSlopes: slopes
"A message to knots of a spline. Returns an array with the 4rd
cubic coeff."
"The last nth item is correct iff this is a closed cubic.
Presumably that is the only time we care.
We always return the same sized array as self."
| n changes |
n := self size.
n = slopes size
ifFalse: [^ self error: 'vertices and slopes differ in number'].
changes := Array new: n.
+ 1 to: n do: [ :i |
+ changes at: i put: (self at: i)
+ - (self atWrap: i + 1) * 2
+ + (slopes at: i)
+ + (slopes atWrap: i + 1) ].
- (1 to: n)
- do: [:i | changes at: i put: (self at: i)
- - (self atWrap: i + 1) * 2
- + (slopes at: i)
- + (slopes atWrap: i + 1)].
-
^ changes!
Item was changed:
----- Method: SequenceableCollection>>closedCubicSlopes (in category '*Morphic-NewCurves-cubic support') -----
closedCubicSlopes
"Sent to knots returns the slopes of a closed cubic spline.
From the same set of java sources as naturalCubic. This is a squeak
transliteration of the java code."
"from java code NatCubicClosed extends NatCubic
solves for the set of equations for all knots:
b1+4*b2+b3=3*(a3-a1)
where a1 is (knots atWrap: index + 1) etc.
and the b's are the slopes .
by decomposing the matrix into upper triangular and lower matrices
and then back sustitution. See Spath 'Spline Algorithms for Curves
and Surfaces' pp 19--21. The D[i] are the derivatives at the knots.
"
| v w x y z n1 D F G H |
n1 := self size.
n1 < 3
ifTrue: [self error: 'Less than 3 points makes a poor curve'].
v := Array new: n1.
w := Array new: n1.
y := Array new: n1.
D := Array new: n1.
x := self.
z := 1.0 / 4.0.
v at: 2 put: z.
w at: 2 put: z.
y at: 1 put: z * 3.0 * ((x at: 2)
- (x at: n1)).
H := 4.0.
F := 3 * ((x at: 1)
- (x at: n1 - 1)).
G := 1.
2 to: n1 - 1
do: [:k |
z := 1.0 / (4.0
- (v at: k)).
v at: k + 1 put: z.
w at: k + 1 put: z negated
* (w at: k).
y at: k put: z * (3.0 * ((x at: k + 1)
- (x at: k - 1))
- (y at: k - 1)).
H := H - (G
* (w at: k)).
F := F - (G
* (y at: k - 1)).
G := (v at: k) negated * G].
H := H - (G + 1 * ((v at: n1)
+ (w at: n1))).
y at: n1 put: F - (G + 1
* (y at: n1 - 1)).
D at: n1 put: (y at: n1)
/ H.
D at: n1 - 1 put: (y at: n1 - 1)
- ((v at: n1)
+ (w at: n1)
* (D at: n1)).
+ n1 -2 to: 1 by: -1 do: [ :k |
+ D at: k put:
+ (y at: k)
- (1 to: n1 - 2)
- reverseDo: [:k | D at: k put: (y at: k)
- ((v at: k + 1)
* (D at: k + 1)) - ((w at: k + 1)
* (D at: n1))].
^ D .!
Item was changed:
----- Method: SequenceableCollection>>cubicPointPolynomialAt: (in category '*Morphic-NewCurves-cubic support') -----
cubicPointPolynomialAt: vIndex
"From curve information assemble a 4-array of points representing the coefficents for curve segment between to points. Beginning point is first point in array endpoint is the pointSum of the array. Meant to be sent to newcurves idea of curve coefficents."
+
+ | result |
+ result := Cubic new: 4.
+ 1 to: 4 do: [ :i |
+ result at: i put: ((self at: i) at: vIndex) @ ((self at: 4 + i) at: vIndex) ].
+ ^result!
- ^ ((1 to: 4)
- collect: [:i | ((self at: i)
- at: vIndex)
- @ ((self at: 4 + i)
- at: vIndex)]) asCubic!