Hi C'edrick,
on Mon, 18 Feb 2008 01:10:41 +0100, you wrote:
David T. Lewis wrote:
If you comment out the primitive like this is should definitely work:
If I comment out the primitive, in Float= ... and put a self halt
after, the halt point has no effect.
This is correct, both your
On Feb 18, 2008, at 20:41 , itsme213 wrote:
I want to clear its contents (size goes back to zero), and can't
seem to
find something like #clear or #empty. Cannot use a new collection
as there
are shared references to it.
myCollection removeAllSuchThat: [:each | true]
- Bert -
I can load the following packages out of the squeaksource repository:
Rome-Balloon
Rome-Base
Rome-PluginCanvas
Rome-SVG
Rome-Strike
Rome-Tests
Rome-Reference
Rome-BalloonCanvas
The rest give me errors about lacking other classes, which I reproduce
below. Are the packages that load enough to be
Isn't Cedrick's aida solution going to be significantly faster?
this is not mine :)
butI'd interested to see if it's a good use of #become:... Does it
keep references ? is it safe ?
Thanks
___
Beginners mailing list
Isn't Cedrick's aida solution going to be significantly faster?
On Feb 19, 2008 1:02 AM, Ron Teitelbaum [EMAIL PROTECTED] wrote:
Hi Sophie,
aCollection copy do: [:anElement |
aCollection remove: anElement
].
Why copy? If you start removing items from the collection, increasing the
My understanding as well is that this is the purpose of #become:, but
also that it is not very efficient in some versions of Smalltalk. If
you are using an OrderedCollection, this is probably a reasonably
efficient method as it doesn't need to search through the whole list
every time it removes an
Hi Marcin,
I'm not a fan of using #become. I will use it for very specific behavior
when I need to retain pointers to an object. For example for implementing a
proxy. In that case become is a very useful tool. I think that #become is
overkill for this situation, but I won't argue that it
#become: apparently (effectively) swaps object ids.
Is there anything like
x oneWayBecome: y
that would pass this test:
testOneWayBecome: x to: y
| a b |
a := x.
b := y.
x oneWayBecome: y.
self assert: [x == y].
self assert: [a == y].
self assert: [b == y].
(Not
See becomeForward:
Gulik.
On Feb 19, 2008 4:59 PM, itsme213 [EMAIL PROTECTED] wrote:
#become: apparently (effectively) swaps object ids.
Is there anything like
x oneWayBecome: y
that would pass this test:
testOneWayBecome: x to: y
| a b |
a := x.
b := y.
x
On Tue, 19 Feb 2008 02:35:34 +0100, Marcin Tustin wrote:
Isn't Cedrick's aida solution going to be significantly faster?
No, solutions based on #become: are the slowest possible. The VM has to
sweep the whole memory, for all variables in the system, to find all
references during #become:,
10 matches
Mail list logo