Hi all, I know we are in feature freeze, but that won't stop me from having {fun with, new ideas for} Squeak :-)
So please have a look at the following mini-changeset. It implements #tempNamed: and #tempNamed:put: on Context, which I personally find quite useful when debugging and working with Context objects.
Print it:
thisContext sender tempNamed: #value put: 42
:-)
Feedback welcome as always!
Best,
Christoph
<http://www.hpi.de/>
A new version of Kernel was added to project The Inbox:
http://source.squeak.org/inbox/Kernel-ct.1385.mcz
==================== Summary ====================
Name: Kernel-ct.1385
Author: ct
Time: 12 April 2021, 10:15:07.18369 pm
UUID: e2817a6e-1a1f-e246-aa66-2fa9289a7703
Ancestors: Kernel-nice.1384
Improves multilingual support for basic errors on Object.
=============== Diff against Kernel-nice.1384 ===============
Item was changed:
----- Method: Object>>error (in category 'error handling') -----
error
"Throw a generic Error exception."
+ ^ self error: 'Error!!' translated!
- ^self error: 'Error!!'.!
Item was changed:
----- Method: Object>>errorImproperStore (in category 'private') -----
errorImproperStore
"Create an error notification that an improper store was attempted."
+ ^ self error: 'Improper store into indexable object' translated!
- self error: 'Improper store into indexable object'!
Item was changed:
----- Method: Object>>errorNonIntegerIndex (in category 'private') -----
errorNonIntegerIndex
"Create an error notification that an improper object was used as an index."
+ ^ self error: 'Only integers should be used as indices' translated!
- self error: 'only integers should be used as indices'!
Item was changed:
----- Method: Object>>errorSubscriptBounds: (in category 'private') -----
errorSubscriptBounds: index
"Create an error notification that an improper integer was used as an index."
+ ^ self error: ('Subscript is out of bounds: {1}' translated format: {index})!
- self error: 'subscript is out of bounds: ' , index printString!
A new version of KernelTests was added to project The Inbox:
http://source.squeak.org/inbox/KernelTests-ct.387.mcz
==================== Summary ====================
Name: KernelTests-ct.387
Author: ct
Time: 24 October 2020, 12:40:40.526058 am
UUID: aa73c56f-88e1-3b4d-9d59-fb29df3363a7
Ancestors: KernelTests-ul.386
Adds regression test for Kernel-ct.1355 (source logging after SyntaxError). Should I invest further complexity into this test for the purpose of keeping the production source logs clean?
=============== Diff against KernelTests-ul.386 ===============
Item was added:
+ ----- Method: ClassDescriptionTest>>testLogSourceAfterReparseSyntaxError (in category 'testing') -----
+ testLogSourceAfterReparseSyntaxError
+
+ | class source |
+ SystemChangeNotifier uniqueInstance doSilently: [[
+ class := Object newSubclass.
+ source := 'foo [x'.
+ [class compile: source]
+ on: SyntaxErrorNotification do: [:error |
+ error resume: (source := source , ']')].
+ self assert: source equals: (class sourceCodeAt: #foo) asString.
+ ] ensure: [class removeFromSystem]].!
Item was changed:
+ ----- Method: ClassDescriptionTest>>testOrganization (in category 'testing') -----
- ----- Method: ClassDescriptionTest>>testOrganization (in category 'tests') -----
testOrganization
| aClassOrganizer |
aClassOrganizer := ClassDescription organization.
self assert: (aClassOrganizer isKindOf: ClassOrganizer).!
Nicolas Cellier uploaded a new version of Kernel to project The Inbox:
http://source.squeak.org/inbox/Kernel-nice.1294.mcz
==================== Summary ====================
Name: Kernel-nice.1294
Author: nice
Time: 6 February 2020, 10:00:19.603883 pm
UUID: c78e67da-95e5-42ad-af82-089c149f165d
Ancestors: Kernel-tonyg.1293
Complex log function was missing (base 10 logarithm)
Complex already provides ln and log:, so why not log?
=============== Diff against Kernel-tonyg.1293 ===============
Item was added:
+ ----- Method: Complex>>log (in category 'mathematical functions') -----
+ log
+ "Answer the base 10 logarithm of the receiver."
+
+ ^self ln / 10 ln!
Hi all!
I rarely discovered that much errors with one single command :-)
Steps to reproduce
Print it:
(ObjectTracer on: true) ifTrue: [1]
Expected behavior
It is printed: 1
Actual behavior
The following tracer notifications appear (proceed them all):
1. (3x) #printStringLimitedTo:, #longPrintOn:limitedTo:indent: and again #printStringLimitedTo:, caused by SmalltalkImage >> #logSqueakError:inContext:
2. #mustBeBoolean
3. (3 more print message called by #logSqueakError:inContext: again, see the next error)
4. Error: Where's the jump?
Caused by #mustBeBooleanIn:, #skipBackBeforeJump
If you still keep proceeding:
1. (3 more print message called by #logSqueakError:inContext: again, see the next error)
2. Finally, the NonBooleanReceiver error from 2.
3. VM crashes.
Summarizing the bugs
ObjectTracer traces too much
The amount of messages printed by the ObjectTracer is an unintended side effect of the way it signals calls via the debugger. The debugger logs this error, including the stack trace. How can we avoid this? Should we suppress all further notifications from one ObjectTracer instance during the first one is debugged?
#mustBeBoolean is sent to boolean proxy
This is caused by the simulation of the inlined #ifTrue: call.
I don't know whether this is worth to be fixed before Scorch?
If yes, I think we would need to disable inlining for this particular selector or make inlining opt-out-able as proposed here (this would probably be way too slow)<http://forum.world.st/The-Inbox-HelpSystem-Core-ct-123-mcz-tp5105402p511363…>.
#mustBoBoolean depends on caller chain
It turns out that #mustBeBoolean relies on being called from a context that just did a jump. This makes it impossible to forward this message as usual via a transparent proxy/decorator.
We use this pattern in other methods as well. How can we enable transparent wrappers not to collide with method contexts depending on their sender?
Best,
Christoph
Hello,
Try dragging and dropping the Tile object into the PasteUp (World) and
try clicking on it. It disappears when clicked. The same is for Flaps.
Version 5.1 is the last one it worked correctly.
regards,
Vaidotas
Patrick Rein uploaded a new version of Collections to project The Trunk:
http://source.squeak.org/trunk/Collections-pre.857.mcz
==================== Summary ====================
Name: Collections-pre.857
Author: pre
Time: 4 October 2019, 11:04:30.363303 am
UUID: 5ef00b65-3884-c445-b276-0cc01f0b10a1
Ancestors: Collections-pre.856
Adds startOfHeader to Character, adds empty abstract implementations of scanFrom:, writeScanOn: to TextAttribute to allow for Texts which include TextAttributes which do not implement serialization to still be serialized, adds a comment to these methods.
=============== Diff against Collections-pre.856 ===============
Item was added:
+ ----- Method: Character class>>startOfHeader (in category 'accessing untypeable characters') -----
+ startOfHeader
+
+ ^ self value: 1 !
Item was added:
+ ----- Method: TextAttribute class>>scanFrom: (in category 'fileIn/Out') -----
+ scanFrom: strm
+ "Read the text attribute properties from the stream. When this method has
+ been called the concrete TextAttribute class has already been selected via
+ scanCharacter. (see TextAttribute class>>#newFrom:).
+ For writing the format see TextAttribute>>#writeScanOn:"!
Item was added:
+ ----- Method: TextAttribute>>writeScanOn: (in category 'fileIn/fileOut') -----
+ writeScanOn: strm
+ "Implement this method for a text attribute to define how it it should be written
+ to a serialized form of a text object. The form should correspond to the source
+ file format, i.e. use a scan character to denote its subclass.
+ As TextAttributes are stored in RunArrays, this method is mostly called from RunArray>>#write scan.
+ For reading the written information see TextAttribute class>>#scanFrom:"
+
+ "Do nothing because of abstract class"!