Nicolas Cellier uploaded a new version of Kernel to project The Trunk:
http://source.squeak.org/trunk/Kernel-nice.1377.mcz
==================== Summary ====================
Name: Kernel-nice.1377
Author: nice
Time: 4 March 2021, 10:10:29.295967 pm
UUID: ddcc60af-76a7-4d50-b5e3-ebf4ff39eb07
Ancestors: Kernel-nice.1376
Fix log2 implementation to make it robust in the neighbourhood of 1.0.
Let aFloat isPowerOfTwo answer true if its value is a power of two. There is no obvious reason nor documentation why it should be false, and the implementation is neat.
Introduce isDenormal to test if a Float is denormalized. A denormalized Float is one with minimal exponent, and significand part gradually loosing significant bits (a.k.a. gradual underflow).
I.O.W, denormals loose precision.
If we would define:
Float>>precision
^(self exponent - Float emin min: 0) + self class precision
Then, we would have
Float fminNormalized precision = Float precision.
Float fminNormalized predecessor = (Float precision - 1).
Float fminDenormalized precision = 1.
=============== Diff against Kernel-nice.1376 ===============
Item was added:
+ ----- Method: Float>>isDenormal (in category 'testing') -----
+ isDenormal
+ "Return true if the receiver is a denormal."
+
+ ^ self exponent < self class emin and: [self isZero not]!
Item was changed:
----- Method: Float>>isPowerOfTwo (in category 'testing') -----
isPowerOfTwo
+ "Return true if the receiver is an integral power of two."
+ ^self significand = 1.0!
- "Return true if the receiver is an integral power of two.
- Floats never return true here."
- ^false!
Item was changed:
----- Method: Float>>log2 (in category 'mathematical functions') -----
log2
"Answer the base 2 logarithm of the receiver.
Arrange to answer exact result in case of exact power of 2."
+ | s |
+ s := self significand.
+ ^s > 1.3333333333333333
+ ifTrue: [(0.5 * s) ln / Ln2 + (1 + self exponent)]
+ ifFalse: [s ln / Ln2 + self exponent]!
- ^ self significand ln / Ln2 + self exponent!
Eliot Miranda uploaded a new version of Multilingual to project The Trunk:
http://source.squeak.org/trunk/Multilingual-eem.255.mcz
==================== Summary ====================
Name: Multilingual-eem.255
Author: eem
Time: 4 March 2021, 10:23:00.658047 am
UUID: 55a1972b-10f3-4938-bc52-fa293e2b7973
Ancestors: Multilingual-ul.254
Cleanup related to Files-eem.187.
BTW, seems to me that MultiByteFileStream no longer belongs in Multilingual, but would be better off in Files.
=============== Diff against Multilingual-ul.254 ===============
Item was changed:
----- Method: MultiByteFileStream>>requestDropStream: (in category 'private') -----
requestDropStream: dropIndex
+ "Override to install proper converter."
- "Needs to install proper converter"
+ ^(super requestDropStream: dropIndex) ifNotNil:
+ [:result|
- | result |
- result := super requestDropStream: dropIndex.
- result ifNotNil: [
converter ifNil: [self converter: UTF8TextConverter new].
+ lineEndConvention ifNil: [ self detectLineEndConvention ].
+ result]!
- lineEndConvention ifNil: [ self detectLineEndConvention ]
- ].
- ^result!
Eliot Miranda uploaded a new version of Files to project The Trunk:
http://source.squeak.org/trunk/Files-eem.187.mcz
==================== Summary ====================
Name: Files-eem.187
Author: eem
Time: 4 March 2021, 10:21:30.924262 am
UUID: f14c3a5e-9f1b-4aff-9c3d-b239a4c9a5e9
Ancestors: Files-ul.186
Robustness with drop events.
Put colleting directories and streams in a utility method for headless apps (drop events can be launch events on OSs such as macOS).
Fix a speeling roore.
=============== Diff against Files-ul.186 ===============
Item was added:
+ ----- Method: FileDirectory class>>dropFilesAndDirectories: (in category 'dnd requests') -----
+ dropFilesAndDirectories: numFiles
+ "Answer a sequence of directories and/or streams for a drop event.
+ The collect5ion may be empty."
+ ^(1 to: numFiles)
+ collect:
+ [:index |
+ (self requestDropDirectory: index) ifNil:
+ [FileStream requestDropStream: index]]
+ thenSelect: [:directoryOrStreamOrNil| directoryOrStreamOrNil notNil]!
Item was changed:
----- Method: FileDirectory class>>requestDropDirectory: (in category 'dnd requests') -----
requestDropDirectory: dropIndex
^(FileStream primDropRequestFileName: dropIndex) ifNotNil:
+ [:dropFileName| | potentialDirectory |
+ potentialDirectory := self on: dropFileName.
- [:dropFileDirdectoryName| | potentialDirectory |
- potentialDirectory := self on: dropFileDirdectoryName.
potentialDirectory exists ifTrue: [potentialDirectory]]!
Item was changed:
----- Method: StandardFileStream>>requestDropStream: (in category 'dnd requests') -----
requestDropStream: dropIndex
+ "Answer a read-only stream for some file the user has just dropped onto Squeak,
+ or nil if dropIndex does not refer to a file."
+ ^(self class primDropRequestFileName: dropIndex) ifNotNil:
+ [:rawName|
+ name := rawName vmPathToSqueakPath.
+ fileID := self primDropRequestFileHandle: dropIndex.
+ fileID ifNotNil:
+ [self register.
+ rwmode := false.
+ buffer1 := String new: 1.
+ self enableReadBuffering.
+ self]]!
- "Return a read-only stream for some file the user has just dropped onto Squeak."
- | rawName |
- rawName := self class primDropRequestFileName: dropIndex.
- name := rawName vmPathToSqueakPath.
- fileID := self primDropRequestFileHandle: dropIndex.
- fileID == nil ifTrue:[^nil].
- self register.
- rwmode := false.
- buffer1 := String new: 1.
- self enableReadBuffering
- !
Nicolas Cellier uploaded a new version of Collections to project The Trunk:
http://source.squeak.org/trunk/Collections-nice.929.mcz
==================== Summary ====================
Name: Collections-nice.929
Author: nice
Time: 4 March 2021, 6:55:05.090663 pm
UUID: 6e327843-eedc-4eeb-ba1b-0e14d4f40e56
Ancestors: Collections-nice.928
Don't hardcode Interval and LimitedPrecisionInterval so as to enable subclassing.
Note: a subclass wanting to handle limited precision bounds or increment by itself should define:
limitedPrecisionSpecies
^self.
This is not the case of TextLineInterval that only ever see Integer bounds.
=============== Diff against Collections-nice.928 ===============
Item was changed:
----- Method: Interval class>>from:to: (in category 'instance creation') -----
from: startInteger to: stopInteger
"Answer an instance of me, starting at startNumber, ending at
stopNumber, and with an interval increment of 1."
^((startInteger hasLimitedPrecision or: [stopInteger hasLimitedPrecision])
+ ifTrue: [self limitedPrecisionSpecies]
+ ifFalse: [self]) basicNew
- ifTrue: [LimitedPrecisionInterval]
- ifFalse: [Interval]) basicNew
setFrom: startInteger
to: stopInteger
by: 1!
Item was changed:
----- Method: Interval class>>from:to:by: (in category 'instance creation') -----
from: startInteger to: stopInteger by: stepInteger
"Answer an instance of me, starting at startNumber, ending at
stopNumber, and with an interval increment of stepNumber."
^((startInteger hasLimitedPrecision or: [stopInteger hasLimitedPrecision or: [stepInteger hasLimitedPrecision]])
+ ifTrue: [self limitedPrecisionSpecies]
+ ifFalse: [self]) basicNew
- ifTrue: [LimitedPrecisionInterval]
- ifFalse: [Interval]) basicNew
setFrom: startInteger
to: stopInteger
by: stepInteger!
Item was added:
+ ----- Method: Interval class>>limitedPrecisionSpecies (in category 'instance creation') -----
+ limitedPrecisionSpecies
+ "Answer a class able to handle limited precision bounds or step"
+
+ ^LimitedPrecisionInterval!
Marcel Taeumel uploaded a new version of ST80 to project The Trunk:
http://source.squeak.org/trunk/ST80-mt.264.mcz
==================== Summary ====================
Name: ST80-mt.264
Author: mt
Time: 4 March 2021, 5:16:37.757335 pm
UUID: 9600a535-6bad-a54c-80b6-902c4a8d87be
Ancestors: ST80-mt.263
Work around the changes in Collections-nice.925 to make MVC work again. :-)
=============== Diff against ST80-mt.263 ===============
Item was added:
+ ----- Method: TextLineInterval class>>from:to:by: (in category 'instance creation') -----
+ from: startInteger to: stopInteger by: stepInteger
+ "Answer an instance of me, starting at startNumber, ending at
+ stopNumber, and with an interval increment of stepNumber."
+
+ ^ self basicNew
+ setFrom: startInteger
+ to: stopInteger
+ by: stepInteger!
Item was changed:
----- Method: TextLineInterval class>>start:stop:internalSpaces:paddingWidth: (in category 'instance creation') -----
start: startInteger stop: stopInteger internalSpaces: spacesInteger paddingWidth: padWidthInteger
"Answer an instance of me with the arguments as the start, stop points,
number of spaces in the line, and width of the padding."
| newSelf |
+ newSelf := self from: startInteger to: stopInteger by: 1.
- newSelf := super from: startInteger to: stopInteger by: 1.
^newSelf internalSpaces: spacesInteger paddingWidth: padWidthInteger!
Marcel Taeumel uploaded a new version of MonticelloConfigurations to project The Trunk:
http://source.squeak.org/trunk/MonticelloConfigurations-mt.165.mcz
==================== Summary ====================
Name: MonticelloConfigurations-mt.165
Author: mt
Time: 4 March 2021, 4:48:08.507431 pm
UUID: bc7f26e0-4549-cc43-9e87-b1e9dd0c96d0
Ancestors: MonticelloConfigurations-mt.164
Adds a safe guard to not overwrite existing configurations in the update map by accident.
=============== Diff against MonticelloConfigurations-mt.164 ===============
Item was changed:
----- Method: MCConfigurationBrowser>>completeStoreAction (in category 'actions') -----
completeStoreAction
"The store method will arrange for this to be called after the user has entered
a comment for the configuration version being stored."
self activeEditWindow: nil. "Close the editor window"
self pickRepository
ifNotNil: [:repo |
configuration authorInitials: Utilities authorInitials.
configuration timeStamp: (DateAndTime fromSeconds: DateAndTime now asSeconds) printString.
configuration id: UUID new asString.
+ (repo includesVersionNamed: configuration name)
+ ifTrue: [self notify: ('The configuration does already exist in the repository you specified. If you proceed, it will be overwritten.\\Repository: {1}\Configuration: {2}\\Do you want to proceed anyway?' translated withCRs format: { repo description. configuration name })].
repo storeVersion: configuration.
self inform: 'Saved ', configuration name]!
Marcel Taeumel uploaded a new version of Monticello to project The Trunk:
http://source.squeak.org/trunk/Monticello-mt.736.mcz
==================== Summary ====================
Name: Monticello-mt.736
Author: mt
Time: 4 March 2021, 4:47:21.662431 pm
UUID: 79f9cc15-fc98-ad48-9907-49abd9a3808e
Ancestors: Monticello-mt.735
Fixes typo.
=============== Diff against Monticello-mt.735 ===============
Item was changed:
----- Method: MCRepositoryInspector>>save (in category 'actions') -----
save
self pickRepository ifNotNil:
[:repository |
(self repository = MCRepository inbox and:
[repository = MCRepository trunk or: [repository = MCRepository treated]]) ifTrue:
+ [self notify: 'Versions from the inbox should only be moved, not copied. Instead, use the web interface via source.squeak.org to manage inbox contributions.\\Do you want to proceed anyway?' translated withCRs].
- [self notify: 'Versions from the inbox should only be moved, not copied. Instead, use the web interface via source.squeak.org to manage inbox constributions.\\Do you want to proceed anyway?' translated withCRs].
repository storeVersion: self version]!