Nicolas Cellier uploaded a new version of Kernel to project The Inbox: http://source.squeak.org/inbox/Kernel-nice.1200.mcz
==================== Summary ====================
Name: Kernel-nice.1200 Author: nice Time: 9 December 2018, 11:17:42.830548 am UUID: 4608ee87-5859-4132-918f-df0f71dcc07e Ancestors: Kernel-eem.1199
Let's make basicInspect robust to crazy numbers.
With http://www.squeaksource.com/ArbitraryPrecisionFl.html I can create crazy numbers like this: ((1 asArbitraryPrecisionFloatNumBits: 100) timesTwoPower: 1e100)
But then I can't print to decimal form (a bit too many bytes to be allocated....).
The problem when debugging such monster is that basicInspect is not basicEnough: it insists on printing the Number in the inspector title (label)!
If we invoke basicInspect, we generally want something basic. Even if we just inspect, having a label spanning more than 100 chars is vain...
So let's be robust.
=============== Diff against Kernel-eem.1199 ===============
Item was changed: ----- Method: Number>>defaultLabelForInspector (in category 'printing') ----- defaultLabelForInspector "Answer the default label to be used for an Inspector window on the receiver."
+ ^ super defaultLabelForInspector, ': ', ([self printStringLimitedTo: 100] + ifError: ['<error cannot print this number>'])! - ^ super defaultLabelForInspector, ': ', self printString!
Hi Nicolas,
I think you should move this to trunk.
On Sun, Dec 9, 2018 at 2:17 AM commits@source.squeak.org wrote:
Nicolas Cellier uploaded a new version of Kernel to project The Inbox: http://source.squeak.org/inbox/Kernel-nice.1200.mcz
==================== Summary ====================
Name: Kernel-nice.1200 Author: nice Time: 9 December 2018, 11:17:42.830548 am UUID: 4608ee87-5859-4132-918f-df0f71dcc07e Ancestors: Kernel-eem.1199
Let's make basicInspect robust to crazy numbers.
With http://www.squeaksource.com/ArbitraryPrecisionFl.html I can create crazy numbers like this: ((1 asArbitraryPrecisionFloatNumBits: 100) timesTwoPower: 1e100)
But then I can't print to decimal form (a bit too many bytes to be allocated....).
The problem when debugging such monster is that basicInspect is not basicEnough: it insists on printing the Number in the inspector title (label)!
If we invoke basicInspect, we generally want something basic. Even if we just inspect, having a label spanning more than 100 chars is vain...
So let's be robust.
=============== Diff against Kernel-eem.1199 ===============
Item was changed:
----- Method: Number>>defaultLabelForInspector (in category 'printing')
defaultLabelForInspector "Answer the default label to be used for an Inspector window on the receiver."
^ super defaultLabelForInspector, ': ', ([self
printStringLimitedTo: 100]
ifError: ['<error cannot print this number>'])!
^ super defaultLabelForInspector, ': ', self printString!
On Sun, Dec 09, 2018 at 10:45:15PM -0800, Eliot Miranda wrote:
Hi Nicolas,
I think you should move this to trunk.
+1
Dave
On Sun, Dec 9, 2018 at 2:17 AM commits@source.squeak.org wrote:
Nicolas Cellier uploaded a new version of Kernel to project The Inbox: http://source.squeak.org/inbox/Kernel-nice.1200.mcz
==================== Summary ====================
Name: Kernel-nice.1200 Author: nice Time: 9 December 2018, 11:17:42.830548 am UUID: 4608ee87-5859-4132-918f-df0f71dcc07e Ancestors: Kernel-eem.1199
Let's make basicInspect robust to crazy numbers.
With http://www.squeaksource.com/ArbitraryPrecisionFl.html I can create crazy numbers like this: ((1 asArbitraryPrecisionFloatNumBits: 100) timesTwoPower: 1e100)
But then I can't print to decimal form (a bit too many bytes to be allocated....).
The problem when debugging such monster is that basicInspect is not basicEnough: it insists on printing the Number in the inspector title (label)!
If we invoke basicInspect, we generally want something basic. Even if we just inspect, having a label spanning more than 100 chars is vain...
So let's be robust.
=============== Diff against Kernel-eem.1199 ===============
Item was changed:
----- Method: Number>>defaultLabelForInspector (in category 'printing')
defaultLabelForInspector "Answer the default label to be used for an Inspector window on the receiver."
^ super defaultLabelForInspector, ': ', ([self
printStringLimitedTo: 100]
ifError: ['<error cannot print this number>'])!
^ super defaultLabelForInspector, ': ', self printString!
-- _,,,^..^,,,_ best, Eliot
squeak-dev@lists.squeakfoundation.org