OrderedSet

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
15 messages Options
bpi
Reply | Threaded
Open this post in threaded view
|

OrderedSet

bpi
Hi Squeakers,

Does anyone know of an OrderedSet implementation for Squeak somewhere?

Bernhard

Reply | Threaded
Open this post in threaded view
|

Re: OrderedSet

Squeak - Dev mailing list
There's that on SqueakSource.


-----------------
Benoît St-Jean
Yahoo! Messenger: bstjean
Twitter: @BenLeChialeux
Pinterest: benoitstjean
Instagram: Chef_Benito
IRC: lamneth
Blogue: endormitoire.wordpress.com
"A standpoint is an intellectual horizon of radius zero".  (A. Einstein)


On Tuesday, November 27, 2018, 5:18:51 p.m. EST, Bernhard Pieber <[hidden email]> wrote:


Hi Squeakers,

Does anyone know of an OrderedSet implementation for Squeak somewhere?

Bernhard



Reply | Threaded
Open this post in threaded view
|

Re: OrderedSet

David T. Lewis
That link does not work, but there is an OrderedDictionary project on
at http://www.squeaksource.com/TFOrderedDictionary.html. It that it?


On Wed, Nov 28, 2018 at 12:08:06AM +0000, Benoit St-Jean via Squeak-dev wrote:

> There's that on SqueakSource.
> http://squeaksource.com/@Ilyu71XtQNt-3Xwp/UMBrp13p
> -----------------
> Beno??t St-Jean
> Yahoo! Messenger: bstjean
> Twitter: @BenLeChialeux
> Pinterest: benoitstjean
> Instagram: Chef_Benito
> IRC: lamneth
> Blogue: endormitoire.wordpress.com
> "A standpoint is an intellectual horizon of radius zero".?? (A. Einstein)
>
>     On Tuesday, November 27, 2018, 5:18:51 p.m. EST, Bernhard Pieber <[hidden email]> wrote:  
>  
>  Hi Squeakers,
>
> Does anyone know of an OrderedSet implementation for Squeak somewhere?
>
> Bernhard
>
>  
>


Reply | Threaded
Open this post in threaded view
|

Re: OrderedSet

Squeak - Dev mailing list
Your link doesn't work either.

Go to Projects
Type OrderedSet in the search box.
Only one result will come up (as PharoTaskForces)!
If you click on that and browse the versions, you'll see the OrderedSet packages!

-----------------
Benoît St-Jean
Yahoo! Messenger: bstjean
Twitter: @BenLeChialeux
Pinterest: benoitstjean
Instagram: Chef_Benito
IRC: lamneth
Blogue: endormitoire.wordpress.com
"A standpoint is an intellectual horizon of radius zero".  (A. Einstein)


On Tuesday, November 27, 2018, 7:58:38 p.m. EST, David T. Lewis <[hidden email]> wrote:


That link does not work, but there is an OrderedDictionary project on
at http://www.squeaksource.com/TFOrderedDictionary.html. It that it?


On Wed, Nov 28, 2018 at 12:08:06AM +0000, Benoit St-Jean via Squeak-dev wrote:

> There's that on SqueakSource.
> http://squeaksource.com/@Ilyu71XtQNt-3Xwp/UMBrp13p
> -----------------
> Beno??t St-Jean

> Yahoo! Messenger: bstjean
> Twitter: @BenLeChialeux
> Pinterest: benoitstjean
> Instagram: Chef_Benito
> IRC: lamneth
> Blogue: endormitoire.wordpress.com
> "A standpoint is an intellectual horizon of radius zero".?? (A. Einstein)
>
>    On Tuesday, November 27, 2018, 5:18:51 p.m. EST, Bernhard Pieber <[hidden email]> wrote: 

>  Hi Squeakers,
>
> Does anyone know of an OrderedSet implementation for Squeak somewhere?
>
> Bernhard
>

>



Reply | Threaded
Open this post in threaded view
|

Re: OrderedSet

David T. Lewis
Thanks Benoit,

The repository is http://www.squeaksource.com/PharoTaskForces, the package
is OrderedSet, and the latest version is OrderedSet-StephaneDucasse.2.mcz

Dave

On Wed, Nov 28, 2018 at 01:06:49AM +0000, Benoit St-Jean via Squeak-dev wrote:

> Your link doesn't work either.
> Go to ProjectsType OrderedSet in the search box.Only one result will come up (as PharoTaskForces)!If you click on that and browse the versions, you'll see the OrderedSet packages!
>
> -----------------
> Beno??t St-Jean
> Yahoo! Messenger: bstjean
> Twitter: @BenLeChialeux
> Pinterest: benoitstjean
> Instagram: Chef_Benito
> IRC: lamneth
> Blogue: endormitoire.wordpress.com
> "A standpoint is an intellectual horizon of radius zero".?? (A. Einstein)
>
>     On Tuesday, November 27, 2018, 7:58:38 p.m. EST, David T. Lewis <[hidden email]> wrote:  
>  
>  That link does not work, but there is an OrderedDictionary project on
> at http://www.squeaksource.com/TFOrderedDictionary.html. It that it?
>
>
> On Wed, Nov 28, 2018 at 12:08:06AM +0000, Benoit St-Jean via Squeak-dev wrote:
> > There's that on SqueakSource.
> > http://squeaksource.com/@Ilyu71XtQNt-3Xwp/UMBrp13p
> > -----------------
> > Beno??t St-Jean
> > Yahoo! Messenger: bstjean
> > Twitter: @BenLeChialeux
> > Pinterest: benoitstjean
> > Instagram: Chef_Benito
> > IRC: lamneth
> > Blogue: endormitoire.wordpress.com
> > "A standpoint is an intellectual horizon of radius zero".?? (A. Einstein)
> >
> >?? ?? On Tuesday, November 27, 2018, 5:18:51 p.m. EST, Bernhard Pieber <[hidden email]> wrote:??
> >??
> >?? Hi Squeakers,
> >
> > Does anyone know of an OrderedSet implementation for Squeak somewhere?
> >
> > Bernhard
> >
> >??
> >
>
>  
>


Reply | Threaded
Open this post in threaded view
|

Re: OrderedSet

Squeak - Dev mailing list
Thanks everyone! That's sounds exactly what I was after. I will give it a try.

Bernhard

> Am 28.11.2018 um 02:46 schrieb David T. Lewis <[hidden email]>:
>
> Thanks Benoit,
>
> The repository is http://www.squeaksource.com/PharoTaskForces, the package
> is OrderedSet, and the latest version is OrderedSet-StephaneDucasse.2.mcz
>
> Dave
>
> On Wed, Nov 28, 2018 at 01:06:49AM +0000, Benoit St-Jean via Squeak-dev wrote:
>> Your link doesn't work either.
>> Go to ProjectsType OrderedSet in the search box.Only one result will come up (as PharoTaskForces)!If you click on that and browse the versions, you'll see the OrderedSet packages!
>>
>> -----------------
>> Beno??t St-Jean
>> Yahoo! Messenger: bstjean
>> Twitter: @BenLeChialeux
>> Pinterest: benoitstjean
>> Instagram: Chef_Benito
>> IRC: lamneth
>> Blogue: endormitoire.wordpress.com
>> "A standpoint is an intellectual horizon of radius zero".?? (A. Einstein)
>>
>>    On Tuesday, November 27, 2018, 7:58:38 p.m. EST, David T. Lewis <[hidden email]> wrote:  
>>
>> That link does not work, but there is an OrderedDictionary project on
>> at http://www.squeaksource.com/TFOrderedDictionary.html. It that it?
>>
>>
>> On Wed, Nov 28, 2018 at 12:08:06AM +0000, Benoit St-Jean via Squeak-dev wrote:
>>> There's that on SqueakSource.
>>> http://squeaksource.com/@Ilyu71XtQNt-3Xwp/UMBrp13p
>>> -----------------
>>> Beno??t St-Jean
>>> Yahoo! Messenger: bstjean
>>> Twitter: @BenLeChialeux
>>> Pinterest: benoitstjean
>>> Instagram: Chef_Benito
>>> IRC: lamneth
>>> Blogue: endormitoire.wordpress.com
>>> "A standpoint is an intellectual horizon of radius zero".?? (A. Einstein)
>>>
>>> ?? ?? On Tuesday, November 27, 2018, 5:18:51 p.m. EST, Bernhard Pieber <[hidden email]> wrote:??
>>> ??
>>> ?? Hi Squeakers,
>>>
>>> Does anyone know of an OrderedSet implementation for Squeak somewhere?
>>>
>>> Bernhard
>>>
>>> ??
>>>
>>
>>
>>
>
>


Reply | Threaded
Open this post in threaded view
|

Re: OrderedSet

Levente Uzonyi
In reply to this post by David T. Lewis
That OrderedSet is not really a set, just a thin wrapper over
OrderedCollection, so performance will be surprisingly bad.
Squeak has OrderedDictionary which has all the methods a Set needs:
#at: anObject put: nil <=> #add: anObject
#includesKey: anObject <=> #includes:anObject
#keysDo: aBlock <=> #do: aBlock
#removeKey: anObject <=> #remove: anObject

Note that removal will take O(size) time. If you need anything better, you
have to implement your own set (e.g. a linked hash set. Squeak's LRUCache
has a list implementation that can come handy).

Levente

On Tue, 27 Nov 2018, David T. Lewis wrote:

> Thanks Benoit,
>
> The repository is http://www.squeaksource.com/PharoTaskForces, the package
> is OrderedSet, and the latest version is OrderedSet-StephaneDucasse.2.mcz
>
> Dave
>
> On Wed, Nov 28, 2018 at 01:06:49AM +0000, Benoit St-Jean via Squeak-dev wrote:
>> Your link doesn't work either.
>> Go to ProjectsType OrderedSet in the search box.Only one result will come up (as PharoTaskForces)!If you click on that and browse the versions, you'll see the OrderedSet packages!
>>
>> -----------------
>> Beno??t St-Jean
>> Yahoo! Messenger: bstjean
>> Twitter: @BenLeChialeux
>> Pinterest: benoitstjean
>> Instagram: Chef_Benito
>> IRC: lamneth
>> Blogue: endormitoire.wordpress.com
>> "A standpoint is an intellectual horizon of radius zero".?? (A. Einstein)
>>
>>     On Tuesday, November 27, 2018, 7:58:38 p.m. EST, David T. Lewis <[hidden email]> wrote:
>>
>>  That link does not work, but there is an OrderedDictionary project on
>> at http://www.squeaksource.com/TFOrderedDictionary.html. It that it?
>>
>>
>> On Wed, Nov 28, 2018 at 12:08:06AM +0000, Benoit St-Jean via Squeak-dev wrote:
>> > There's that on SqueakSource.
>> > http://squeaksource.com/@Ilyu71XtQNt-3Xwp/UMBrp13p
>> > -----------------
>> > Beno??t St-Jean
>> > Yahoo! Messenger: bstjean
>> > Twitter: @BenLeChialeux
>> > Pinterest: benoitstjean
>> > Instagram: Chef_Benito
>> > IRC: lamneth
>> > Blogue: endormitoire.wordpress.com
>> > "A standpoint is an intellectual horizon of radius zero".?? (A. Einstein)
>> >
>> >?? ?? On Tuesday, November 27, 2018, 5:18:51 p.m. EST, Bernhard Pieber <[hidden email]> wrote:??
>> >??
>> >?? Hi Squeakers,
>> >
>> > Does anyone know of an OrderedSet implementation for Squeak somewhere?
>> >
>> > Bernhard
>> >
>> >??
>> >
>>
>>
>>

Reply | Threaded
Open this post in threaded view
|

Re: OrderedSet

Squeak - Dev mailing list
Never really looked at how it was implemented for that specific package...  But then, one might ask (which is my case), do you really need an ordered set?  I never had in 26 years of smalltalking!


-----------------
Benoît St-Jean
Yahoo! Messenger: bstjean
Twitter: @BenLeChialeux
Pinterest: benoitstjean
Instagram: Chef_Benito
IRC: lamneth
Blogue: endormitoire.wordpress.com
"A standpoint is an intellectual horizon of radius zero".  (A. Einstein)


On Wednesday, November 28, 2018, 12:48:11 p.m. EST, Levente Uzonyi <[hidden email]> wrote:


That OrderedSet is not really a set, just a thin wrapper over
OrderedCollection, so performance will be surprisingly bad.
Squeak has OrderedDictionary which has all the methods a Set needs:
#at: anObject put: nil <=> #add: anObject
#includesKey: anObject <=> #includes:anObject
#keysDo: aBlock <=> #do: aBlock
#removeKey: anObject <=> #remove: anObject

Note that removal will take O(size) time. If you need anything better, you
have to implement your own set (e.g. a linked hash set. Squeak's LRUCache
has a list implementation that can come handy).

Levente

On Tue, 27 Nov 2018, David T. Lewis wrote:

> Thanks Benoit,
>
> The repository is http://www.squeaksource.com/PharoTaskForces, the package
> is OrderedSet, and the latest version is OrderedSet-StephaneDucasse.2.mcz
>
> Dave
>
> On Wed, Nov 28, 2018 at 01:06:49AM +0000, Benoit St-Jean via Squeak-dev wrote:
>> Your link doesn't work either.
>> Go to ProjectsType OrderedSet in the search box.Only one result will come up (as PharoTaskForces)!If you click on that and browse the versions, you'll see the OrderedSet packages!
>>
>> -----------------
>> Beno??t St-Jean
>> Yahoo! Messenger: bstjean
>> Twitter: @BenLeChialeux
>> Pinterest: benoitstjean
>> Instagram: Chef_Benito
>> IRC: lamneth
>> Blogue: endormitoire.wordpress.com
>> "A standpoint is an intellectual horizon of radius zero".?? (A. Einstein)
>>
>>    On Tuesday, November 27, 2018, 7:58:38 p.m. EST, David T. Lewis <[hidden email]> wrote:
>>
>>  That link does not work, but there is an OrderedDictionary project on
>> at http://www.squeaksource.com/TFOrderedDictionary.html. It that it?
>>
>>
>> On Wed, Nov 28, 2018 at 12:08:06AM +0000, Benoit St-Jean via Squeak-dev wrote:
>> > There's that on SqueakSource.
>> > http://squeaksource.com/@Ilyu71XtQNt-3Xwp/UMBrp13p
>> > -----------------
>> > Beno??t St-Jean
>> > Yahoo! Messenger: bstjean
>> > Twitter: @BenLeChialeux
>> > Pinterest: benoitstjean
>> > Instagram: Chef_Benito
>> > IRC: lamneth
>> > Blogue: endormitoire.wordpress.com
>> > "A standpoint is an intellectual horizon of radius zero".?? (A. Einstein)
>> >
>> >?? ?? On Tuesday, November 27, 2018, 5:18:51 p.m. EST, Bernhard Pieber <[hidden email]> wrote:??
>> >??
>> >?? Hi Squeakers,
>> >
>> > Does anyone know of an OrderedSet implementation for Squeak somewhere?
>> >
>> > Bernhard
>> >
>> >??
>> >
>>
>>
>>


Reply | Threaded
Open this post in threaded view
|

Re: OrderedSet

Karl Ramberg
I used Stack just a few weeks ago. I didn't even know it was a class before I needed it. :-)

Cheers,
Karl


On Wed, Nov 28, 2018 at 7:48 PM Benoit St-Jean via Squeak-dev <[hidden email]> wrote:
Never really looked at how it was implemented for that specific package...  But then, one might ask (which is my case), do you really need an ordered set?  I never had in 26 years of smalltalking!


-----------------
Benoît St-Jean
Yahoo! Messenger: bstjean
Twitter: @BenLeChialeux
Pinterest: benoitstjean
Instagram: Chef_Benito
IRC: lamneth
Blogue: endormitoire.wordpress.com
"A standpoint is an intellectual horizon of radius zero".  (A. Einstein)


On Wednesday, November 28, 2018, 12:48:11 p.m. EST, Levente Uzonyi <[hidden email]> wrote:


That OrderedSet is not really a set, just a thin wrapper over
OrderedCollection, so performance will be surprisingly bad.
Squeak has OrderedDictionary which has all the methods a Set needs:
#at: anObject put: nil <=> #add: anObject
#includesKey: anObject <=> #includes:anObject
#keysDo: aBlock <=> #do: aBlock
#removeKey: anObject <=> #remove: anObject

Note that removal will take O(size) time. If you need anything better, you
have to implement your own set (e.g. a linked hash set. Squeak's LRUCache
has a list implementation that can come handy).

Levente

On Tue, 27 Nov 2018, David T. Lewis wrote:

> Thanks Benoit,
>
> The repository is http://www.squeaksource.com/PharoTaskForces, the package
> is OrderedSet, and the latest version is OrderedSet-StephaneDucasse.2.mcz
>
> Dave
>
> On Wed, Nov 28, 2018 at 01:06:49AM +0000, Benoit St-Jean via Squeak-dev wrote:
>> Your link doesn't work either.
>> Go to ProjectsType OrderedSet in the search box.Only one result will come up (as PharoTaskForces)!If you click on that and browse the versions, you'll see the OrderedSet packages!
>>
>> -----------------
>> Beno??t St-Jean
>> Yahoo! Messenger: bstjean
>> Twitter: @BenLeChialeux
>> Pinterest: benoitstjean
>> Instagram: Chef_Benito
>> IRC: lamneth
>> Blogue: endormitoire.wordpress.com
>> "A standpoint is an intellectual horizon of radius zero".?? (A. Einstein)
>>
>>    On Tuesday, November 27, 2018, 7:58:38 p.m. EST, David T. Lewis <[hidden email]> wrote:
>>
>>  That link does not work, but there is an OrderedDictionary project on
>> at http://www.squeaksource.com/TFOrderedDictionary.html. It that it?
>>
>>
>> On Wed, Nov 28, 2018 at 12:08:06AM +0000, Benoit St-Jean via Squeak-dev wrote:
>> > There's that on SqueakSource.
>> > http://squeaksource.com/@Ilyu71XtQNt-3Xwp/UMBrp13p
>> > -----------------
>> > Beno??t St-Jean
>> > Yahoo! Messenger: bstjean
>> > Twitter: @BenLeChialeux
>> > Pinterest: benoitstjean
>> > Instagram: Chef_Benito
>> > IRC: lamneth
>> > Blogue: endormitoire.wordpress.com
>> > "A standpoint is an intellectual horizon of radius zero".?? (A. Einstein)
>> >
>> >?? ?? On Tuesday, November 27, 2018, 5:18:51 p.m. EST, Bernhard Pieber <[hidden email]> wrote:??
>> >??
>> >?? Hi Squeakers,
>> >
>> > Does anyone know of an OrderedSet implementation for Squeak somewhere?
>> >
>> > Bernhard
>> >
>> >??
>> >
>>
>>
>>



Reply | Threaded
Open this post in threaded view
|

Re: OrderedSet

Ron Teitelbaum
aBag sortedElements?

All the best,

Ron Teitelbaum

On Wed, Nov 28, 2018 at 4:03 PM karl ramberg <[hidden email]> wrote:
I used Stack just a few weeks ago. I didn't even know it was a class before I needed it. :-)

Cheers,
Karl


On Wed, Nov 28, 2018 at 7:48 PM Benoit St-Jean via Squeak-dev <[hidden email]> wrote:
Never really looked at how it was implemented for that specific package...  But then, one might ask (which is my case), do you really need an ordered set?  I never had in 26 years of smalltalking!


-----------------
Benoît St-Jean
Yahoo! Messenger: bstjean
Twitter: @BenLeChialeux
Pinterest: benoitstjean
Instagram: Chef_Benito
IRC: lamneth
Blogue: endormitoire.wordpress.com
"A standpoint is an intellectual horizon of radius zero".  (A. Einstein)


On Wednesday, November 28, 2018, 12:48:11 p.m. EST, Levente Uzonyi <[hidden email]> wrote:


That OrderedSet is not really a set, just a thin wrapper over
OrderedCollection, so performance will be surprisingly bad.
Squeak has OrderedDictionary which has all the methods a Set needs:
#at: anObject put: nil <=> #add: anObject
#includesKey: anObject <=> #includes:anObject
#keysDo: aBlock <=> #do: aBlock
#removeKey: anObject <=> #remove: anObject

Note that removal will take O(size) time. If you need anything better, you
have to implement your own set (e.g. a linked hash set. Squeak's LRUCache
has a list implementation that can come handy).

Levente

On Tue, 27 Nov 2018, David T. Lewis wrote:

> Thanks Benoit,
>
> The repository is http://www.squeaksource.com/PharoTaskForces, the package
> is OrderedSet, and the latest version is OrderedSet-StephaneDucasse.2.mcz
>
> Dave
>
> On Wed, Nov 28, 2018 at 01:06:49AM +0000, Benoit St-Jean via Squeak-dev wrote:
>> Your link doesn't work either.
>> Go to ProjectsType OrderedSet in the search box.Only one result will come up (as PharoTaskForces)!If you click on that and browse the versions, you'll see the OrderedSet packages!
>>
>> -----------------
>> Beno??t St-Jean
>> Yahoo! Messenger: bstjean
>> Twitter: @BenLeChialeux
>> Pinterest: benoitstjean
>> Instagram: Chef_Benito
>> IRC: lamneth
>> Blogue: endormitoire.wordpress.com
>> "A standpoint is an intellectual horizon of radius zero".?? (A. Einstein)
>>
>>    On Tuesday, November 27, 2018, 7:58:38 p.m. EST, David T. Lewis <[hidden email]> wrote:
>>
>>  That link does not work, but there is an OrderedDictionary project on
>> at http://www.squeaksource.com/TFOrderedDictionary.html. It that it?
>>
>>
>> On Wed, Nov 28, 2018 at 12:08:06AM +0000, Benoit St-Jean via Squeak-dev wrote:
>> > There's that on SqueakSource.
>> > http://squeaksource.com/@Ilyu71XtQNt-3Xwp/UMBrp13p
>> > -----------------
>> > Beno??t St-Jean
>> > Yahoo! Messenger: bstjean
>> > Twitter: @BenLeChialeux
>> > Pinterest: benoitstjean
>> > Instagram: Chef_Benito
>> > IRC: lamneth
>> > Blogue: endormitoire.wordpress.com
>> > "A standpoint is an intellectual horizon of radius zero".?? (A. Einstein)
>> >
>> >?? ?? On Tuesday, November 27, 2018, 5:18:51 p.m. EST, Bernhard Pieber <[hidden email]> wrote:??
>> >??
>> >?? Hi Squeakers,
>> >
>> > Does anyone know of an OrderedSet implementation for Squeak somewhere?
>> >
>> > Bernhard
>> >
>> >??
>> >
>>
>>
>>




cbc
Reply | Threaded
Open this post in threaded view
|

Re: OrderedSet

cbc
That depends on what is meant by 'ordered'.  Whenever I wanted an Ordered thing (usually Dictionary, never yet Set) what I really wanted was the order in which the elements (or keys) were added.
  aBag sortedElements
is more like a SortedSet.
-cbc

On Wed, Nov 28, 2018 at 1:41 PM Ron Teitelbaum <[hidden email]> wrote:
aBag sortedElements?

All the best,

Ron Teitelbaum

On Wed, Nov 28, 2018 at 4:03 PM karl ramberg <[hidden email]> wrote:
I used Stack just a few weeks ago. I didn't even know it was a class before I needed it. :-)

Cheers,
Karl


On Wed, Nov 28, 2018 at 7:48 PM Benoit St-Jean via Squeak-dev <[hidden email]> wrote:
Never really looked at how it was implemented for that specific package...  But then, one might ask (which is my case), do you really need an ordered set?  I never had in 26 years of smalltalking!


-----------------
Benoît St-Jean
Yahoo! Messenger: bstjean
Twitter: @BenLeChialeux
Pinterest: benoitstjean
Instagram: Chef_Benito
IRC: lamneth
Blogue: endormitoire.wordpress.com
"A standpoint is an intellectual horizon of radius zero".  (A. Einstein)


On Wednesday, November 28, 2018, 12:48:11 p.m. EST, Levente Uzonyi <[hidden email]> wrote:


That OrderedSet is not really a set, just a thin wrapper over
OrderedCollection, so performance will be surprisingly bad.
Squeak has OrderedDictionary which has all the methods a Set needs:
#at: anObject put: nil <=> #add: anObject
#includesKey: anObject <=> #includes:anObject
#keysDo: aBlock <=> #do: aBlock
#removeKey: anObject <=> #remove: anObject

Note that removal will take O(size) time. If you need anything better, you
have to implement your own set (e.g. a linked hash set. Squeak's LRUCache
has a list implementation that can come handy).

Levente

On Tue, 27 Nov 2018, David T. Lewis wrote:

> Thanks Benoit,
>
> The repository is http://www.squeaksource.com/PharoTaskForces, the package
> is OrderedSet, and the latest version is OrderedSet-StephaneDucasse.2.mcz
>
> Dave
>
> On Wed, Nov 28, 2018 at 01:06:49AM +0000, Benoit St-Jean via Squeak-dev wrote:
>> Your link doesn't work either.
>> Go to ProjectsType OrderedSet in the search box.Only one result will come up (as PharoTaskForces)!If you click on that and browse the versions, you'll see the OrderedSet packages!
>>
>> -----------------
>> Beno??t St-Jean
>> Yahoo! Messenger: bstjean
>> Twitter: @BenLeChialeux
>> Pinterest: benoitstjean
>> Instagram: Chef_Benito
>> IRC: lamneth
>> Blogue: endormitoire.wordpress.com
>> "A standpoint is an intellectual horizon of radius zero".?? (A. Einstein)
>>
>>    On Tuesday, November 27, 2018, 7:58:38 p.m. EST, David T. Lewis <[hidden email]> wrote:
>>
>>  That link does not work, but there is an OrderedDictionary project on
>> at http://www.squeaksource.com/TFOrderedDictionary.html. It that it?
>>
>>
>> On Wed, Nov 28, 2018 at 12:08:06AM +0000, Benoit St-Jean via Squeak-dev wrote:
>> > There's that on SqueakSource.
>> > http://squeaksource.com/@Ilyu71XtQNt-3Xwp/UMBrp13p
>> > -----------------
>> > Beno??t St-Jean
>> > Yahoo! Messenger: bstjean
>> > Twitter: @BenLeChialeux
>> > Pinterest: benoitstjean
>> > Instagram: Chef_Benito
>> > IRC: lamneth
>> > Blogue: endormitoire.wordpress.com
>> > "A standpoint is an intellectual horizon of radius zero".?? (A. Einstein)
>> >
>> >?? ?? On Tuesday, November 27, 2018, 5:18:51 p.m. EST, Bernhard Pieber <[hidden email]> wrote:??
>> >??
>> >?? Hi Squeakers,
>> >
>> > Does anyone know of an OrderedSet implementation for Squeak somewhere?
>> >
>> > Bernhard
>> >
>> >??
>> >
>>
>>
>>





Reply | Threaded
Open this post in threaded view
|

Re: OrderedSet

Squeak - Dev mailing list
In reply to this post by Levente Uzonyi
Hi Levente,

I like that idea! Performance is a non-issue for my use case. I don't even have the need to remove elements.

Are there any objections to include OrderedSet as a trivial subclass of OrderedDictionary to Squeak?

I have looked at the list implementation used in LRUCache. I love the terseness of the code. I wonder why you did not call it CircularDoublyLinkedList to make it easier to find for other uses?

Bernhard

> Am 28.11.2018 um 18:48 schrieb Levente Uzonyi <[hidden email]>:
>
> That OrderedSet is not really a set, just a thin wrapper over OrderedCollection, so performance will be surprisingly bad.
> Squeak has OrderedDictionary which has all the methods a Set needs:
> #at: anObject put: nil <=> #add: anObject
> #includesKey: anObject <=> #includes:anObject
> #keysDo: aBlock <=> #do: aBlock
> #removeKey: anObject <=> #remove: anObject
>
> Note that removal will take O(size) time. If you need anything better, you have to implement your own set (e.g. a linked hash set. Squeak's LRUCache has a list implementation that can come handy).
>
> Levente
>
> On Tue, 27 Nov 2018, David T. Lewis wrote:
>
>> Thanks Benoit,
>>
>> The repository is http://www.squeaksource.com/PharoTaskForces, the package
>> is OrderedSet, and the latest version is OrderedSet-StephaneDucasse.2.mcz
>>
>> Dave
>>
>> On Wed, Nov 28, 2018 at 01:06:49AM +0000, Benoit St-Jean via Squeak-dev wrote:
>>> Your link doesn't work either.
>>> Go to ProjectsType OrderedSet in the search box.Only one result will come up (as PharoTaskForces)!If you click on that and browse the versions, you'll see the OrderedSet packages!
>>> ----------------- Beno??t St-Jean Yahoo! Messenger: bstjean Twitter: @BenLeChialeux Pinterest: benoitstjean Instagram: Chef_Benito
>>> IRC: lamneth Blogue: endormitoire.wordpress.com "A standpoint is an intellectual horizon of radius zero".?? (A. Einstein)
>>>    On Tuesday, November 27, 2018, 7:58:38 p.m. EST, David T. Lewis <[hidden email]> wrote:
>>>
>>> That link does not work, but there is an OrderedDictionary project on
>>> at http://www.squeaksource.com/TFOrderedDictionary.html. It that it?
>>> On Wed, Nov 28, 2018 at 12:08:06AM +0000, Benoit St-Jean via Squeak-dev wrote:
>>> > There's that on SqueakSource.
>>> > http://squeaksource.com/@Ilyu71XtQNt-3Xwp/UMBrp13p
>>> > ----------------- > Beno??t St-Jean > Yahoo! Messenger: bstjean > Twitter: @BenLeChialeux > Pinterest: benoitstjean > Instagram: Chef_Benito
>>> > IRC: lamneth > Blogue: endormitoire.wordpress.com > "A standpoint is an intellectual horizon of radius zero".?? (A. Einstein) > >?? ?? On Tuesday, November 27, 2018, 5:18:51 p.m. EST, Bernhard Pieber <[hidden email]> wrote:?? >?? >?? Hi Squeakers,
>>> > > Does anyone know of an OrderedSet implementation for Squeak somewhere?
>>> > > Bernhard


bpi
Reply | Threaded
Open this post in threaded view
|

Re: OrderedSet

bpi
In reply to this post by Levente Uzonyi
Hi Levente,

I like that idea! Performance is a non-issue for my use case. I don't even have the need to remove elements.

Are there any objections to include OrderedSet as a trivial subclass of OrderedDictionary to Squeak?

I have looked at the list implementation used in LRUCache. I love the terseness of the code. I wonder why it is not called CircularDoublyLinkedList to make it easier to find for other uses.

Bernhard

> Am 28.11.2018 um 18:48 schrieb Levente Uzonyi <[hidden email]>:
>
> That OrderedSet is not really a set, just a thin wrapper over OrderedCollection, so performance will be surprisingly bad.
> Squeak has OrderedDictionary which has all the methods a Set needs:
> #at: anObject put: nil <=> #add: anObject
> #includesKey: anObject <=> #includes:anObject
> #keysDo: aBlock <=> #do: aBlock
> #removeKey: anObject <=> #remove: anObject
>
> Note that removal will take O(size) time. If you need anything better, you have to implement your own set (e.g. a linked hash set. Squeak's LRUCache has a list implementation that can come handy).
>
> Levente
>
> On Tue, 27 Nov 2018, David T. Lewis wrote:
>
>> Thanks Benoit,
>>
>> The repository is http://www.squeaksource.com/PharoTaskForces, the package
>> is OrderedSet, and the latest version is OrderedSet-StephaneDucasse.2.mcz
>>
>> Dave
>>
>> On Wed, Nov 28, 2018 at 01:06:49AM +0000, Benoit St-Jean via Squeak-dev wrote:
>>> Your link doesn't work either.
>>> Go to ProjectsType OrderedSet in the search box.Only one result will come up (as PharoTaskForces)!If you click on that and browse the versions, you'll see the OrderedSet packages!
>>> ----------------- Beno??t St-Jean Yahoo! Messenger: bstjean Twitter: @BenLeChialeux Pinterest: benoitstjean Instagram: Chef_Benito
>>> IRC: lamneth Blogue: endormitoire.wordpress.com "A standpoint is an intellectual horizon of radius zero".?? (A. Einstein)
>>>    On Tuesday, November 27, 2018, 7:58:38 p.m. EST, David T. Lewis <[hidden email]> wrote:
>>>
>>> That link does not work, but there is an OrderedDictionary project on
>>> at http://www.squeaksource.com/TFOrderedDictionary.html. It that it?
>>> On Wed, Nov 28, 2018 at 12:08:06AM +0000, Benoit St-Jean via Squeak-dev wrote:
>>> > There's that on SqueakSource.
>>> > http://squeaksource.com/@Ilyu71XtQNt-3Xwp/UMBrp13p
>>> > ----------------- > Beno??t St-Jean > Yahoo! Messenger: bstjean > Twitter: @BenLeChialeux > Pinterest: benoitstjean > Instagram: Chef_Benito
>>> > IRC: lamneth > Blogue: endormitoire.wordpress.com > "A standpoint is an intellectual horizon of radius zero".?? (A. Einstein) > >?? ?? On Tuesday, November 27, 2018, 5:18:51 p.m. EST, Bernhard Pieber <[hidden email]> wrote:?? >?? >?? Hi Squeakers,
>>> > > Does anyone know of an OrderedSet implementation for Squeak somewhere?
>>> > > Bernhard
>


Reply | Threaded
Open this post in threaded view
|

Re: OrderedSet

Levente Uzonyi
Hi Bernhard,

On Thu, 29 Nov 2018, Bernhard Pieber wrote:

> Hi Levente,
>
> I like that idea! Performance is a non-issue for my use case. I don't even have the need to remove elements.
>
> Are there any objections to include OrderedSet as a trivial subclass of OrderedDictionary to Squeak?

I'm not sure if it belongs to the Trunk. It's pretty much a niche
collection, though I was thinking the same about OrderedDictionary.
If I were to add it to the Trunk, I would implement it as a subclass of
Set instead of OrderedDictionary, because OrderedSet doesn't need the
methods provided by OrderedDictionary.

>
> I have looked at the list implementation used in LRUCache. I love the terseness of the code. I wonder why it is not called CircularDoublyLinkedList to make it easier to find for other uses.

Because I added it to improve LRUCache, and in practice the list nodes are
the best if they can be used as a mixin or a stateful trait, but Squeak
has neither of those.

Levente

>
> Bernhard
>
>> Am 28.11.2018 um 18:48 schrieb Levente Uzonyi <[hidden email]>:
>>
>> That OrderedSet is not really a set, just a thin wrapper over OrderedCollection, so performance will be surprisingly bad.
>> Squeak has OrderedDictionary which has all the methods a Set needs:
>> #at: anObject put: nil <=> #add: anObject
>> #includesKey: anObject <=> #includes:anObject
>> #keysDo: aBlock <=> #do: aBlock
>> #removeKey: anObject <=> #remove: anObject
>>
>> Note that removal will take O(size) time. If you need anything better, you have to implement your own set (e.g. a linked hash set. Squeak's LRUCache has a list implementation that can come handy).
>>
>> Levente
>>
>> On Tue, 27 Nov 2018, David T. Lewis wrote:
>>
>>> Thanks Benoit,
>>>
>>> The repository is http://www.squeaksource.com/PharoTaskForces, the package
>>> is OrderedSet, and the latest version is OrderedSet-StephaneDucasse.2.mcz
>>>
>>> Dave
>>>
>>> On Wed, Nov 28, 2018 at 01:06:49AM +0000, Benoit St-Jean via Squeak-dev wrote:
>>>> Your link doesn't work either.
>>>> Go to ProjectsType OrderedSet in the search box.Only one result will come up (as PharoTaskForces)!If you click on that and browse the versions, you'll see the OrderedSet packages!
>>>> ----------------- Beno??t St-Jean Yahoo! Messenger: bstjean Twitter: @BenLeChialeux Pinterest: benoitstjean Instagram: Chef_Benito
>>>> IRC: lamneth Blogue: endormitoire.wordpress.com "A standpoint is an intellectual horizon of radius zero".?? (A. Einstein)
>>>>    On Tuesday, November 27, 2018, 7:58:38 p.m. EST, David T. Lewis <[hidden email]> wrote:
>>>>
>>>> That link does not work, but there is an OrderedDictionary project on
>>>> at http://www.squeaksource.com/TFOrderedDictionary.html. It that it?
>>>> On Wed, Nov 28, 2018 at 12:08:06AM +0000, Benoit St-Jean via Squeak-dev wrote:
>>>> > There's that on SqueakSource.
>>>> > http://squeaksource.com/@Ilyu71XtQNt-3Xwp/UMBrp13p
>>>> > ----------------- > Beno??t St-Jean > Yahoo! Messenger: bstjean > Twitter: @BenLeChialeux > Pinterest: benoitstjean > Instagram: Chef_Benito
>>>> > IRC: lamneth > Blogue: endormitoire.wordpress.com > "A standpoint is an intellectual horizon of radius zero".?? (A. Einstein) > >?? ?? On Tuesday, November 27, 2018, 5:18:51 p.m. EST, Bernhard Pieber <[hidden email]> wrote:?? >?? >?? Hi Squeakers,
>>>> > > Does anyone know of an OrderedSet implementation for Squeak somewhere?
>>>> > > Bernhard
>>

Reply | Threaded
Open this post in threaded view
|

Re: OrderedSet

marcel.taeumel
Hi, there. :-)

Levente, could we please have that OrderedSet as subclass of Set in the
Trunk? Pretty please? :-D

Best,
Marcel


Levente Uzonyi wrote

> Hi Bernhard,
>
> On Thu, 29 Nov 2018, Bernhard Pieber wrote:
>
>> Hi Levente,
>>
>> I like that idea! Performance is a non-issue for my use case. I don't
>> even have the need to remove elements.
>>
>> Are there any objections to include OrderedSet as a trivial subclass of
>> OrderedDictionary to Squeak?
>
> I'm not sure if it belongs to the Trunk. It's pretty much a niche
> collection, though I was thinking the same about OrderedDictionary.
> If I were to add it to the Trunk, I would implement it as a subclass of
> Set instead of OrderedDictionary, because OrderedSet doesn't need the
> methods provided by OrderedDictionary.
>
>>
>> I have looked at the list implementation used in LRUCache. I love the
>> terseness of the code. I wonder why it is not called
>> CircularDoublyLinkedList to make it easier to find for other uses.
>
> Because I added it to improve LRUCache, and in practice the list nodes are
> the best if they can be used as a mixin or a stateful trait, but Squeak
> has neither of those.
>
> Levente
>
>>
>> Bernhard
>>
>>> Am 28.11.2018 um 18:48 schrieb Levente Uzonyi &lt;

> leves@.elte

> &gt;:
>>>
>>> That OrderedSet is not really a set, just a thin wrapper over
>>> OrderedCollection, so performance will be surprisingly bad.
>>> Squeak has OrderedDictionary which has all the methods a Set needs:
>>> #at: anObject put: nil <=> #add: anObject
>>> #includesKey: anObject <=> #includes:anObject
>>> #keysDo: aBlock <=> #do: aBlock
>>> #removeKey: anObject <=> #remove: anObject
>>>
>>> Note that removal will take O(size) time. If you need anything better,
>>> you have to implement your own set (e.g. a linked hash set. Squeak's
>>> LRUCache has a list implementation that can come handy).
>>>
>>> Levente
>>>
>>> On Tue, 27 Nov 2018, David T. Lewis wrote:
>>>
>>>> Thanks Benoit,
>>>>
>>>> The repository is http://www.squeaksource.com/PharoTaskForces, the
>>>> package
>>>> is OrderedSet, and the latest version is
>>>> OrderedSet-StephaneDucasse.2.mcz
>>>>
>>>> Dave
>>>>
>>>> On Wed, Nov 28, 2018 at 01:06:49AM +0000, Benoit St-Jean via Squeak-dev
>>>> wrote:
>>>>> Your link doesn't work either.
>>>>> Go to ProjectsType OrderedSet in the search box.Only one result will
>>>>> come up (as PharoTaskForces)!If you click on that and browse the
>>>>> versions, you'll see the OrderedSet packages!
>>>>> ----------------- Beno??t St-Jean Yahoo! Messenger: bstjean Twitter:
>>>>> @BenLeChialeux Pinterest: benoitstjean Instagram: Chef_Benito
>>>>> IRC: lamneth Blogue: endormitoire.wordpress.com "A standpoint is an
>>>>> intellectual horizon of radius zero".?? (A. Einstein)
>>>>>    On Tuesday, November 27, 2018, 7:58:38 p.m. EST, David T. Lewis
>>>>> &lt;

> lewis@.msen

> &gt; wrote:
>>>>>
>>>>> That link does not work, but there is an OrderedDictionary project on
>>>>> at http://www.squeaksource.com/TFOrderedDictionary.html. It that it?
>>>>> On Wed, Nov 28, 2018 at 12:08:06AM +0000, Benoit St-Jean via
>>>>> Squeak-dev wrote:
>>>>> > There's that on SqueakSource.
>>>>> > http://squeaksource.com/@Ilyu71XtQNt-3Xwp/UMBrp13p
>>>>> > ----------------- > Beno??t St-Jean > Yahoo! Messenger: bstjean >
>>>>> Twitter: @BenLeChialeux > Pinterest: benoitstjean > Instagram:
>>>>> Chef_Benito
>>>>> > IRC: lamneth > Blogue: endormitoire.wordpress.com > "A standpoint is
>>>>> an intellectual horizon of radius zero".?? (A. Einstein) > >?? ?? On
>>>>> Tuesday, November 27, 2018, 5:18:51 p.m. EST, Bernhard Pieber &lt;

> bernhard@

> &gt; wrote:?? >?? >?? Hi Squeakers,
>>>>> > > Does anyone know of an OrderedSet implementation for Squeak
>>>>> somewhere?
>>>>> > > Bernhard
>>>





--
Sent from: http://forum.world.st/Squeak-Dev-f45488.html