Eliot Miranda uploaded a new version of EToys to project The Trunk:
http://source.squeak.org/trunk/EToys-eem.417.mcz
==================== Summary ====================
Name: EToys-eem.417
Author: eem
Time: 23 January 2021, 6:19:52.973089 pm
UUID: 90068d9d-ef84-4cb9-92d2-5bb0ec54994e
Ancestors: EToys-mt.416
Move two base system methods to System.
=============== Diff against EToys-mt.416 ===============
Item was removed:
- ----- Method: SystemDictionary>>copyright (in category '*Etoys-Squeakland-sources, change log') -----
- copyright
- "The Smalltalk copyright."
-
- ^'Copyright (c) 1996 Apple Computer, Inc. All Rights Reserved.
- Copyright (c) 1996-2009 Viewpoints Research Institute, and Contributors;
- Copyright (c) 2010-2012 Squeak Community Contributors'!
Item was removed:
- ----- Method: SystemDictionary>>currentChangeSetString (in category '*Etoys-Squeakland-sources, change log') -----
- currentChangeSetString
- "Smalltalk currentChangeSetString"
- ^ 'Current Change Set: ' translated, ChangeSet current name!
Levente Uzonyi uploaded a new version of Collections to project The Trunk:
http://source.squeak.org/trunk/Collections-ul.922.mcz
==================== Summary ====================
Name: Collections-ul.922
Author: ul
Time: 19 January 2021, 1:28:51.784086 pm
UUID: 7d688371-2966-43d3-9000-3985ae9f6afa
Ancestors: Collections-nice.921
Fix off-by-one errors in OrderedCollection's #removeFirst: and #removeLast:. The argument of those methods can be zero.
=============== Diff against Collections-nice.921 ===============
Item was changed:
----- Method: OrderedCollection>>removeFirst: (in category 'removing') -----
removeFirst: n
"Remove the first n objects into an array."
| lastIndexToRemove result |
+ n < 0 ifTrue: [ self errorNoSuchElement ].
- n < 1 ifTrue: [ self errorNoSuchElement ].
lastIndex < (lastIndexToRemove := firstIndex + n - 1) ifTrue: [ self errorNotEnoughElements ].
result := array copyFrom: firstIndex to: lastIndexToRemove.
array from: firstIndex to: lastIndexToRemove put: nil.
firstIndex := lastIndexToRemove + 1.
^result!
Item was changed:
----- Method: OrderedCollection>>removeLast: (in category 'removing') -----
removeLast: n
"Remove the last n objects into an array with last in last position."
| firstIndexToRemove result |
+ n < 0 ifTrue: [ self errorNoSuchElement ].
- n < 1 ifTrue: [ self errorNoSuchElement ].
(firstIndexToRemove := lastIndex - n + 1) < firstIndex ifTrue: [ self errorNotEnoughElements ].
result := array copyFrom: firstIndexToRemove to: lastIndex.
array from: firstIndexToRemove to: lastIndex put: nil.
lastIndex := firstIndexToRemove - 1.
^result!
One of the things I had to make for NuScratch was a keyboardlistener that keeps a bitmap of the keys currently pressed - quite a few Scratch things are state dependent rather than even responsive. It originally worked pretty well as far as anybody could ever see; I had no reports of problems for years.
Whilst trying to make a 5.3 version it seems that something is making it much less reliable. It is clear from some tracking code that if one holds down a key, presses and releases another key and then finally releases the initial key, that we are losing the final expected key-up of the held-down key. Which in turn leaves my keyboard listener thinking the key is still pressed. This is a Bad Thing. It causes me to lose games of Asteroid Blaster. I don't like to lose at Asteroid Blaster.
Looking at the unix VM keystroke handling code causes migraines. Has anybody got any idea what on earth is going on down there? I'll build a VM with the relevant debug code turned on soon but really... if anyone that knows this part could save some pain it would be very pleasant.
tim
--
tim Rowledge; tim(a)rowledge.org; http://www.rowledge.org/tim
Hmm. That’s the second time today I’ve seen a Word doc eat a man’s soul. Time for a bug report...
Christoph Thiede uploaded a new version of Tests to project The Inbox:
http://source.squeak.org/inbox/Tests-ct.447.mcz
==================== Summary ====================
Name: Tests-ct.447
Author: ct
Time: 18 January 2021, 12:55:37.357232 pm
UUID: 675252a4-a6d9-d442-b594-3c85592290a4
Ancestors: Tests-dtl.443
Fixes and supplements BecomeTest.
- Updated #testBecomeForwardIdentityHash which has been broken since Collections-eem.885. Note that the referenced patch to #becomeForward: was a breaking change which we should make sure to document in the final release notes.
- Added #testBecomeForwardIdentityAndHash to have a test for the classical primitiveArrayBecomeOneWay (primitive 72) again.
- Added #testBecomeForwardCopyIdentityHash to test both bindings of the copyHash argument indeed.
Please review! Fur further reference, see https://github.com/codefrau/SqueakJS/pull/117 where we were discussing the limitations/correctness of the current BecomeTest implementation.
=============== Diff against Tests-dtl.443 ===============
Item was added:
+ ----- Method: BecomeTest>>testBecomeForwardCopyIdentityHash (in category 'tests') -----
+ testBecomeForwardCopyIdentityHash
+ "Check that
+ 1. the argument to becomeForward: is modified to have the receiver's identity hash.
+ 2. the receiver's identity hash is unchanged."
+
+ | a b ha hb |
+ a := 'ab' copy.
+ b := 'cd' copy.
+ ha := a identityHash.
+ hb := b identityHash.
+
+ a becomeForward: b copyHash: true.
+
+ self
+ assert: ha equals: a identityHash;
+ assert: ha equals: b identityHash.!
Item was added:
+ ----- Method: BecomeTest>>testBecomeForwardIdentityAndHash (in category 'tests') -----
+ testBecomeForwardIdentityAndHash
+ "Check that
+ 1. the argument to becomeForward: is NOT modified to have the receiver's identity hash.
+ 2. the receiver's identity hash is unchanged."
+
+ | a b ha |
+ a := 'ab' copy.
+ b := 'cd' copy.
+ ha := a identityHash.
+
+ {a} elementsForwardIdentityAndHashTo: {b}.
+
+ self
+ assert: ha equals: a identityHash;
+ assert: ha equals: b identityHash.!
Item was changed:
----- Method: BecomeTest>>testBecomeForwardIdentityHash (in category 'tests') -----
testBecomeForwardIdentityHash
"Check that
+ 1. the argument to becomeForward: is NOT modified to have the receiver's identity hash.
- 1. the argument to becomeForward: is modified to have the receiver's identity hash.
2. the receiver's identity hash is unchanged."
+ | a b hb |
- | a b ha |
-
a := 'ab' copy.
b := 'cd' copy.
+ hb := b identityHash.
+
- ha := a identityHash.
-
a becomeForward: b.
+
-
self
+ assert: a identityHash = hb;
+ assert: b identityHash = hb.!
- assert: a identityHash = ha;
- assert: b identityHash = ha.
-
- !
Reading the code I again noticed "Squeak V3" as name for the old bytecode
set. Always wanted to know: Where does the "V3" nomenclature come from?
What's V1 and V2? And should we consider Sista to be V4, or treat it as
completely unrelated?
Vanessa