Re: [Pharo-users] i feel dumb / Pharo3 > OrderedCollection >> do:

2015-02-24 Thread Stephan Eggermont
On 24/02/15 08:05, Marcus Denker wrote: And then, with the new fast #become:, we can go back the the old implementation and grow OrderedCollection using #become:, which would mean that we would not need two objects anymore… Until the collection grows large. Then we need some chunked format, to

Re: [Pharo-users] i feel dumb / Pharo3 > OrderedCollection >> do:

2015-02-23 Thread Marcus Denker
> On 23 Feb 2015, at 21:15, Mariano Martinez Peck wrote: > > > > On Fri, Feb 20, 2015 at 5:48 AM, Clément Bera > wrote: > It depends on your OrderedCollection implementation. > > OrderedCollection has a variable size in memory. When instantiated, it has > for

Re: [Pharo-users] i feel dumb / Pharo3 > OrderedCollection >> do:

2015-02-23 Thread Sven Van Caekenberghe
(class side) #new: (instance side) #growAtFirst #growAtLast #makeRoomAtFirst #makeRoomAtLast > On 23 Feb 2015, at 21:15, Mariano Martinez Peck wrote: > > > > On Fri, Feb 20, 2015 at 5:48 AM, Clément Bera wrote: > It depends on your OrderedCollection implementation. > > OrderedCo

Re: [Pharo-users] i feel dumb / Pharo3 > OrderedCollection >> do:

2015-02-23 Thread Mariano Martinez Peck
On Fri, Feb 20, 2015 at 5:48 AM, Clément Bera wrote: > It depends on your OrderedCollection implementation. > > OrderedCollection has a variable size in memory. When instantiated, it has > for example 10 slots, and if you have more than 10 objects, it needs to > change its size to hold more slots

Re: [Pharo-users] i feel dumb / Pharo3 > OrderedCollection >> do:

2015-02-20 Thread Clément Bera
It depends on your OrderedCollection implementation. OrderedCollection has a variable size in memory. When instantiated, it has for example 10 slots, and if you have more than 10 objects, it needs to change its size to hold more slots. The current implementation relies on an indirection to an arr

Re: [Pharo-users] i feel dumb / Pharo3 > OrderedCollection >> do:

2015-02-19 Thread Marcus Denker
> On 20 Feb 2015, at 06:23, S Krish wrote: > > > I presumed shallowCopy for literal arrays / OrderedCollection should have > been a true copy. Perhaps need to understand this.. > OrderdCollection is not just one object, but it holds on to an Array that has it’s content. You copy the outsid

Re: [Pharo-users] i feel dumb / Pharo3 > OrderedCollection >> do:

2015-02-19 Thread S Krish
I presumed shallowCopy for literal arrays / OrderedCollection should have been a true copy. Perhaps need to understand this.. shallowCopy "Answer a copy of the receiver which shares the receiver's instance variables. It should never be overridden. I'm invoked from the copy template method. Sub

Re: [Pharo-users] i feel dumb / Pharo3 > OrderedCollection >> do:

2015-02-18 Thread Marcus Denker
> On 18 Feb 2015, at 18:13, Cameron Sanders via Pharo-users > wrote: > > > Date: 18 Feb 2015 18:12:33 CET > Subject: i feel dumb / Pharo3 > OrderedCollection >> do: > From: Cameron Sanders > To: Any question about pharo is welcome > > > I must be making some silly error here that i cannot

[Pharo-users] i feel dumb / Pharo3 > OrderedCollection >> do:

2015-02-18 Thread Cameron Sanders via Pharo-users
--- Begin Message --- I must be making some silly error here that i cannot see clearly. Why does the following leave anything in the list 'a'? Run it in a workspace. With or without the shallowCopy, i am left with a list with half of the elements in it. Always half. This version of Pharo3 (21.0) w