Nicolas Cellier uploaded a new version of Kernel to project The Trunk:
http://source.squeak.org/trunk/Kernel-nice.1262.mcz
==================== Summary ====================
Name: Kernel-nice.1262
Author: nice
Time: 29 August 2019, 12:28:31.665288 pm
UUID: 3e167d35-e96e-7649-8324-28d9cb255a65
Ancestors: Kernel-nice.1261
Accelerate LargeInteger asFloat in 64bits images.
=============== Diff against Kernel-nice.1261 ===============
Item was added:
+ ----- Method: Integer>>digitsAsFloat (in category 'private') -----
+ digitsAsFloat
+ "private - naive conversion method.
+ This method should be used if and only if
+ Float precision + 8 >= self highBit.
+ This way, all floating point operations will be exact, but eventually the
+ last one, giving a guaranty that result will be the nearest Float."
+ | result n |
+ result := (self digitAt: (n := self digitLength)) asFloat.
+ [(n := n - 1) > 0]
+ whileTrue: [result := 256.0 * result + (self digitAt: n) asFloat].
+ ^ result!
Item was changed:
----- Method: LargePositiveInteger>>asFloat (in category 'converting') -----
asFloat
"Answer a Float that best approximates the value of the receiver.
This algorithm is optimized to process only the significant digits of a LargeInteger.
And it does honour IEEE 754 round to nearest even mode in case of excess precision (see details below)."
"How numbers are rounded in IEEE 754 default rounding mode:
A shift is applied so that the highest 53 bits are placed before the floating point to form a mantissa.
The trailing bits form the fraction part placed after the floating point.
This fractional number must be rounded to the nearest integer.
If fraction part is 2r0.1, exactly between two consecutive integers, there is a tie.
The nearest even integer is chosen in this case.
Examples (First 52bits of mantissa are omitted for brevity):
2r0.00001 is rounded downward to 2r0
2r1.00001 is rounded downward to 2r1
2r0.1 is a tie and rounded to 2r0 (nearest even)
2r1.1 is a tie and rounded to 2r10 (nearest even)
2r0.10001 is rounded upward to 2r1
2r1.10001 is rounded upward to 2r10
Thus, if the next bit after floating point is 0, the mantissa is left unchanged.
If next bit after floating point is 1, an odd mantissa is always rounded upper.
An even mantissa is rounded upper only if the fraction part is not a tie."
"Algorihm details:
The floating point hardware can perform the rounding correctly with several excess bits as long as there is a single inexact operation.
- This can be obtained by splitting the mantissa plus excess bits in two part with less bits than Float precision.
Note 1: the inexact flag in floating point hardware must not be trusted because in some cases the operations would be exact but would not take into account some bits that were truncated before the Floating point operations.
Note 2: the floating point hardware is presumed configured in default rounding mode."
+ | mantissa shift excess |
- | mantissa shift excess result n |
"Check how many bits excess the maximum precision of a Float mantissa."
excess := self highBitOfMagnitude - Float precision.
excess > 7
ifTrue:
["Remove the excess bits but seven."
mantissa := self bitShiftMagnitude: 7 - excess.
shift := excess - 7.
"An even mantissa with a single excess bit immediately following would be truncated.
But this would not be correct if above shift has truncated some extra bits.
Check this case, and round excess bits upper manually."
((mantissa digitAt: 1) = 2r01000000 and: [self anyBitOfMagnitudeFrom: 1 to: shift])
ifTrue: [mantissa := mantissa + 1]]
ifFalse:
[mantissa := self.
shift := 0].
+ "We can use naive digit by digit conversion because there will be a single inexact round off at last iteration.
+ But the nice thing is that Float precision + 7 excess bits = 60 which fit in a SmallInteger in Spur64.
+ So the best to do is to delegate this final operation"
+ ^mantissa digitsAsFloat timesTwoPower: shift.!
- "There will be a single inexact round off at last iteration"
- result := (mantissa digitAt: (n := mantissa digitLength)) asFloat.
- [(n := n - 1) > 0] whileTrue: [
- result := 256.0 * result + (mantissa digitAt: n) asFloat].
- ^result timesTwoPower: shift.!
Item was added:
+ ----- Method: SmallInteger>>digitsAsFloat (in category 'private') -----
+ digitsAsFloat
+ "private - let the primitive take care to answer the nearest float"
+ <primitive: 40>
+ ^super digitsAsFloat!
Hi, there.
Please find attached a changeset. It represents a quick prototype to make the CMD+Dot command more powerful. One might extend it to provide user-friendly, domain-specific clean-up or restarts of applications.
Best,
Marcel
Whilst looking into ways to script loading packages I noticed a few items we could probably clean up to benefit the next release
a) the class doc is currently at http://installer.pbwiki.com/Installer and it is quite old. That doesn't mean it is bad per se but it does mean it likely needs some updates and corrections. There are some 'interesting' related scripts etc that might be useful to look into and either update or remove. I think a lot are completely out of date now.
Note that there is/was a complaint about not using a swiki page (which I'd prefer for less-obscure) because of 'lack of real urls". No idea. Is that actually a problem now?
b) quite a few of the class side methods providing short cuts to repositories are now invalid-
cobalt (no server)
goran (seems not to be a repo any more, lets me into what looks like some fairly private directories)
impara (no server)
keith (no apparent server, also see this rather cool - https://en.wikipedia.org/wiki/Warrosquyoake_Shire page)
lukas (seems to be very out of date?)
saltypickle (no domain - but it is for sale!)
sophie (no domain - also for sale - whee!)
ssMirror (no server)
swasource (seems to have a squeaksource3 service but nothing in it?)
wiresong (just set as a webdav server?)
I propose copying most of the pbwiki description of the use of Installer to the class method and removing the above list of locations. Can anyone provide further info on the locations and their status?
tim
--
tim Rowledge; tim(a)rowledge.org; http://www.rowledge.org/tim
Strange OpCodes: FSRA: Forms Skip and Run-Away
Tobias Pape uploaded a new version of WebClient-Core to project The Trunk:
http://source.squeak.org/trunk/WebClient-Core-topa.118.mcz
==================== Summary ====================
Name: WebClient-Core-topa.118
Author: topa
Time: 29 August 2019, 7:32:57.767498 pm
UUID: 4a038521-5fb9-4b3f-8a46-b66d41afd028
Ancestors: WebClient-Core-pre.117
Fix ssl hostname pass-through in Proxy settings
(see https://github.com/squeak-smalltalk/squeakssl/issues/5)
=============== Diff against WebClient-Core-pre.117 ===============
Item was changed:
----- Method: WebClient>>sslConnect (in category 'initialize') -----
sslConnect
"Do the SSL handshake"
"Connect the client to a web server"
| sqSSL |
proxyServer ifNotNil:[ | resp |
"If we have a proxy server, do the proxy connect"
resp := self proxyConnect.
resp isSuccess ifFalse:[^resp].
].
sqSSL := Smalltalk at: #SqueakSSL ifAbsent:[self error: 'SqueakSSL is missing'].
"Convert the stream to a secure stream"
stream := sqSSL secureSocketStream on: stream socket.
stream timeout: timeout.
+ self sslConnect: stream to: self serverName.
- self sslConnect: stream to: lastServer.
"And cert verification"
self canVerify
ifTrue: [stream verifyCert: self serverName].
^ nil"indicating success"
!
Levente Uzonyi uploaded a new version of Kernel to project The Trunk:
http://source.squeak.org/trunk/Kernel-ul.1263.mcz
==================== Summary ====================
Name: Kernel-ul.1263
Author: ul
Time: 29 August 2019, 2:23:08.696311 pm
UUID: 06ff84ab-3ba9-40f8-90f7-9fcdcca39692
Ancestors: Kernel-nice.1262
- restore Object >> #perform:with:with:with:with:with: , which was accidentally removed by Kernel-nice.1261
=============== Diff against Kernel-nice.1262 ===============
Item was added:
+ ----- Method: Object>>perform:with:with:with:with:with: (in category 'message handling') -----
+ perform: aSymbol with: firstObject with: secondObject with: thirdObject with: fourthObject with: fifthObject
+ "Send the selector, aSymbol, to the receiver with the given arguments.
+ Fail if the number of arguments expected by the selector is not four.
+ Primitive. Optional. See Object documentation whatIsAPrimitive."
+
+ <primitive: 83>
+ ^ self perform: aSymbol withArguments: { firstObject. secondObject. thirdObject. fourthObject. fifthObject }!
"Try this one wierd trick"
Object subclass: #Foo
instanceVariableNames: ''
classVariableNames: 'PageId PageTitle Lua'
poolDictionaries: ''
category: 'Foo-Bar'.
"Open a browser and highlight the Foo-Bar category. Then.."
1 to:3000 do: [:each | | newclassname|
newclassname := ('FooBar', each asString) asSymbol.
Foo subclass: newclassname
instanceVariableNames: ''
classVariableNames: ''
poolDictionaries: ''
category: 'Foo-Bar']
"Your system should slow to a crawl.
Be patient and click off of the 'Foo-Bar' category and the system should free up.
Now open a HierarchyBrowser on Foo
Things will continue to work smoothly.
Conclusion? Something funky with Browser.
"
Foo allSubclasses do: [:each |
Smalltalk removeClassNamed: (each name)
]
Smalltalk removeClassNamed: #Foo
ClassOrganizer removeCategory:'Foo-Bar'
Motivation.
I am on a "import that as a class" kick for SeasideDock and the WikitextParser I am working on.
I am comfortable working with these classes as I have learned to NEVER open certain categories and use the HierarchyBrowser when I need to scan the classes therein.
Thought somebody might be intrigued with the "Why" of this on purely technical grounds. I am not that guy (:
cheers.
t
Nicolas Cellier uploaded a new version of Kernel to project The Trunk:
http://source.squeak.org/trunk/Kernel-nice.1261.mcz
==================== Summary ====================
Name: Kernel-nice.1261
Author: nice
Time: 28 August 2019, 11:00:52.985296 pm
UUID: b8758656-d1f0-49cd-976c-cbd7d772b1f3
Ancestors: Kernel-nice.1260
Oups, I forgot to fix Float negativeInfinity < 0 when arithmetic primitives are configured to refuse to convert a SmallInteger asFloat...
=============== Diff against Kernel-nice.1260 ===============
Item was changed:
----- Method: Number>>adaptToFloat:andCompare: (in category 'converting') -----
adaptToFloat: rcvr andCompare: selector
"If I am involved in comparison with a Float, convert rcvr to a
Fraction. This way, no bit is lost and comparison is exact."
rcvr isFinite
ifFalse: [
selector == #= ifTrue: [^false].
selector == #~= ifTrue: [^true].
rcvr isNaN ifTrue: [^ false].
(selector = #< or: [selector = #'<='])
+ ifTrue: [^ rcvr < 0.0].
- ifTrue: [^ rcvr positive not].
(selector = #> or: [selector = #'>='])
+ ifTrue: [^ rcvr > 0.0].
- ifTrue: [^ rcvr >= 0.0].
^self error: 'unknow comparison selector'].
"Try to avoid asTrueFraction because it can cost"
self isAnExactFloat ifTrue: [^rcvr perform: selector with: self asExactFloat].
selector == #= ifTrue: [^false].
selector == #~= ifTrue: [^true].
^ rcvr asTrueFraction perform: selector with: self!
Item was removed:
- ----- Method: Object>>perform:with:with:with:with:with: (in category 'message handling') -----
- perform: aSymbol with: firstObject with: secondObject with: thirdObject with: fourthObject with: fifthObject
- "Send the selector, aSymbol, to the receiver with the given arguments.
- Fail if the number of arguments expected by the selector is not four.
- Primitive. Optional. See Object documentation whatIsAPrimitive."
-
- <primitive: 83>
- ^ self perform: aSymbol withArguments: { firstObject. secondObject. thirdObject. fourthObject. fifthObject }!
It's time to make serious moves to make a 5.3 release.
At the last SOB meeting we were pleased to learn the Hannes has agreed to be the release manager this time. Marcel agreed to assist in being the test manager, and I agreed to accept the adulation of the crowd once all the work is completed.
Now would be a good time for interested parties to declare interests in what should be included, or indeed, excluded, in the release. And of course, to volunteer with helping that happen.
tim
--
tim Rowledge; tim(a)rowledge.org; http://www.rowledge.org/tim
Strange OpCodes: LAG: Load and Garble