wa := WeakArray new: 1. Smalltalk garbageCollect. obj := Object new. wb := WeakArray with: obj. wa replaceFrom: 1 to: 1 with: wb startingAt: 1. obj := nil. Smalltalk garbageCollectMost. Transcript show: wa
Ian Piumarta wrote:
wa := WeakArray new: 1. Smalltalk garbageCollect. obj := Object new. wb := WeakArray with: obj. wa replaceFrom: 1 to: 1 with: wb startingAt: 1. obj := nil. Smalltalk garbageCollectMost. Transcript show: wa
Wow!!!
Why happens this????
I don't know also garbageCollectMost, seeing at the image says "Reclaims recently created garbage (which is usually most of it) fairly quickly", This means that work faster than normal garbageCollector? Can explain a bit more about it?
Thanks. gsa.
"Ian Piumarta" ian.piumarta@inria.fr wrote:
wa := WeakArray new: 1. Smalltalk garbageCollect. obj := Object new. wb := WeakArray with: obj. wa replaceFrom: 1 to: 1 with: wb startingAt: 1. obj := nil. Smalltalk garbageCollectMost. Transcript show: wa
Very interesting. Have you noted that the crash does not occur when you copy the definition of SequenceableCollection>>replaceFrom:to:with:startingAt: into the instance protocol of WeakArray. This prevents the use of primitive 105.
(For Squeak 3.7 #5989)
Strange.
Boris
On Mar 30, 2005, at 02:52, Boris Gaertner wrote:
"Ian Piumarta" ian.piumarta@inria.fr wrote:
wa replaceFrom: 1 to: 1 with: wb startingAt: 1.
Very interesting. Have you noted that the crash
Before anyone else spends unnecessary mental cycles on this, I've already fixed the primitive (primStringReplace) in the Interpreter. It'll be released, along with the ready-for-mainstream 64-bit support, in the next day or two.
(The post was for mischief value only. I think it's my fourth since '96. All of them good detectors of people who don't snapshot often enough. One of them got me yelled at, quite severely, for crashing someone's entire machine. I'm getting soft in my old age though, putting a warning in the subject line... ;-)
Cheers, Ian
The post was for mischief value only.
I'm still fond of:
***
true become: false. false become: true
***
...which, wonderfully, does not crash anything. :) I especially like how you can sorta use MVC afer the first expression, enough to evaluate the second expression. :)
-C
Ian wrote...
The post was for mischief value only.
and Craig replied...
I'm still fond of:
true become: false. false become: true
...which, wonderfully, does not crash anything. :) I especially like how you can sorta use MVC afer the first expression, enough to evaluate the second expression. :)
That's a good one!
I believe that if we simply reloaded specialOops after become: that everything would work perfectly. Truth is just a token of agreement, right?
- Dan
Dan Ingalls Dan@SqueakLand.org wrote:
Ian wrote...
The post was for mischief value only.
and Craig replied...
I'm still fond of:
true become: false. false become: true
...which, wonderfully, does not crash anything. :) I especially like how you can sorta use MVC afer the first expression, enough to evaluate the second expression. :)
That's a good one!
I believe that if we simply reloaded specialOops after become: that everything would work perfectly. Truth is just a token of agreement, right?
No, no. Truth is beauty.
tim -- Tim Rowledge, tim@sumeru.stanford.edu, http://sumeru.stanford.edu/tim Spelling checkers at maximum! Fire!
Craig Latta wrote:
The post was for mischief value only.
I'm still fond of:
true become: false. false become: true
...which, wonderfully, does not crash anything. :) I especially like how you can sorta use MVC afer the first expression, enough to evaluate the second expression. :)
Lovely! Works on VisualWorks too, you only need to proceed through the Core.NoModification error.
R -
Reinout Heeck wrote:
Craig Latta wrote:
The post was for mischief value only.
I'm still fond of:
true become: false. false become: true
...which, wonderfully, does not crash anything. :)
Lovely! Works on VisualWorks too, you only need to proceed through the Core.NoModification error.
What happens if you save and restart the image?
squeak-dev@lists.squeakfoundation.org