Re: [Pharo-dev] better name for #aggregateRuns:

2017-12-13 Thread Stephane Ducasse
groupByRuns: looks good to me. On Tue, Dec 12, 2017 at 9:48 PM, Todd Blanchard wrote: > I'm kind of trying to figure out when I'd want that operation. > > groupsWithSeparatorsWhereSeparatatorsMatch: feels like it says what it does > > On Dec 12, 2017, at 10:19 AM, Ben Coman wrote: > > > > On 1

Re: [Pharo-dev] better name for #aggregateRuns:

2017-12-12 Thread Todd Blanchard
I'm kind of trying to figure out when I'd want that operation. groupsWithSeparatorsWhereSeparatatorsMatch: feels like it says what it does > On Dec 12, 2017, at 10:19 AM, Ben Coman wrote: > > > > On 12 December 2017 at 20:03, Nicolas Cellier > > wr

Re: [Pharo-dev] better name for #aggregateRuns:

2017-12-12 Thread Ben Coman
On 12 December 2017 at 20:03, Nicolas Cellier < nicolas.cellier.aka.n...@gmail.com> wrote: > > > 2017-12-12 13:01 GMT+01:00 Henrik Sperre Johansen < > henrik.s.johan...@veloxit.no>: > >> Ben Coman wrote >> > >> > But after pondering a while for a better name, I wonder what is wrong >> with >> > th

Re: [Pharo-dev] better name for #aggregateRuns:

2017-12-12 Thread Cyril Ferlicot
On Tue, Dec 12, 2017 at 10:23 AM, Pavel Krivanek wrote: > Hi, > > do you have some proposals for a better name for the message named > #aggregateRuns? > > (#(1 2 3 4 1 2 3 5 6 ) aggregateRuns: [ :each | each = 4]) > >>> #(#(1 2 3) #(4) #(1 2 3 5 6)). > > (#(1 2 3 4 1 2 3 4 5 6 ) aggregateRuns

Re: [Pharo-dev] better name for #aggregateRuns:

2017-12-12 Thread Nicolas Cellier
2017-12-12 13:01 GMT+01:00 Henrik Sperre Johansen < henrik.s.johan...@veloxit.no>: > Ben Coman wrote > > > > But after pondering a while for a better name, I wonder what is wrong > with > > the existing? > > Googling "define aggregate" provides... > > aggregate (noun) = a whole formed by combi

Re: [Pharo-dev] better name for #aggregateRuns:

2017-12-12 Thread Henrik Sperre Johansen
Ben Coman wrote > > But after pondering a while for a better name, I wonder what is wrong with > the existing? > Googling "define aggregate" provides... > aggregate (noun) = a whole formed by combining several separate > elements. > aggregate (verb) = form or group into a class or cluster.

Re: [Pharo-dev] better name for #aggregateRuns:

2017-12-12 Thread Ben Coman
On 12 December 2017 at 17:23, Pavel Krivanek wrote: > Hi, > > do you have some proposals for a better name for the message named > #aggregateRuns? > > (#(1 2 3 4 1 2 3 5 6 ) aggregateRuns: [ :each | each = 4]) > >>> #(#(1 2 3) #(4) #(1 2 3 5 6)). > > (#(1 2 3 4 1 2 3 4 5 6 ) aggregateRuns:

Re: [Pharo-dev] better name for #aggregateRuns:

2017-12-12 Thread Norbert Hartl
Sorry, I’m not sure what I’ve read but it does not seem to be the mail of Pavel :) Norbert > Am 12.12.2017 um 11:05 schrieb Norbert Hartl : > > For me split methods operate on separators which are not included in the > result. So name it splitXXX might not be the best idea. And I think it sho

Re: [Pharo-dev] better name for #aggregateRuns:

2017-12-12 Thread Pavel Krivanek
If short names not work, what about to use something more descriptive like #splitToGroupsThatAlternatelySafisfy: -- Pavel 2017-12-12 10:23 GMT+01:00 Pavel Krivanek : > Hi, > > do you have some proposals for a better name for the message named > #aggregateRuns? > > (#(1 2 3 4 1 2 3 5 6 ) aggregat

Re: [Pharo-dev] better name for #aggregateRuns:

2017-12-12 Thread Thomas Dupriez
Oups, spoke too fast. My bad. I mean that I don't really see a 'matching element' here, it's more that the collection is cut whenever the block given as argument evaluates to a different value. Le 12/12/2017 à 11:11, Thomas Dupriez a écrit : Hm, aggregateRuns: separates the collection both a

Re: [Pharo-dev] better name for #aggregateRuns:

2017-12-12 Thread Thomas Dupriez
Hm, aggregateRuns: separates the collection both after and before the separator. #(1 2 3 4 1 2 4 5 6 ) aggregateRuns:  [ :each | each = 4] ->    #(#(1 2 3) #(4) #(1 2) #(4) #(5 6)) Le 12/12/2017 à 11:05, Norbert Hartl a écrit : For me split methods operate on separators which are not include

Re: [Pharo-dev] better name for #aggregateRuns:

2017-12-12 Thread Norbert Hartl
For me split methods operate on separators which are not included in the result. So name it splitXXX might not be the best idea. And I think it should be more explicit. When the matching elements are included in the result it needs to indicate where the are added. So it is rather something like

Re: [Pharo-dev] better name for #aggregateRuns:

2017-12-12 Thread Thomas Dupriez
#splitByGroupingWhile: The 'split' indicates it's a method to split a collection, and the 'GroupingWhile' expresses how it's done: by grouping elements while they make the block evaluate to the same value. Le 12/12/2017 à 10:50, Sven Van Caekenberghe a écrit : #splitWhile: because the block

Re: [Pharo-dev] better name for #aggregateRuns:

2017-12-12 Thread Sven Van Caekenberghe
#splitWhile: because the block does not define separators but its value indicates runs ? > On 12 Dec 2017, at 10:34, Thomas Dupriez > wrote: > > #(1 2 3 4 1 2 3 5 6 ) splitWhen: [ :each | each = 4] > > > Le 12/12/2017 à 10:23, Pavel Krivanek a écrit : >> Hi, >> >> do you have some proposal

Re: [Pharo-dev] better name for #aggregateRuns:

2017-12-12 Thread Pavel Krivanek
maybe something in the direction of splitOnThresholds:? 2017-12-12 10:38 GMT+01:00 Pavel Krivanek : > We already have #splitOn: with slightly different behavior: > > (#(1 2 3 4 1 2 3 5 6 ) splitOn: [ :each | each = 4]) > > So splitOnEach: and splitWhen: would be probably confusing > > 2017-12-12

Re: [Pharo-dev] better name for #aggregateRuns:

2017-12-12 Thread Pavel Krivanek
We already have #splitOn: with slightly different behavior: (#(1 2 3 4 1 2 3 5 6 ) splitOn: [ :each | each = 4]) So splitOnEach: and splitWhen: would be probably confusing 2017-12-12 10:34 GMT+01:00 Thomas Dupriez < thomas.dupr...@ens-paris-saclay.fr>: > #(1 2 3 4 1 2 3 5 6 ) splitWhen: [ :ea

Re: [Pharo-dev] better name for #aggregateRuns:

2017-12-12 Thread Thomas Dupriez
#(1 2 3 4 1 2 3 5 6 ) splitWhen:  [ :each | each = 4] Le 12/12/2017 à 10:23, Pavel Krivanek a écrit : Hi, do you have some proposals for a better name for the message named #aggregateRuns? (#(1 2 3 4 1 2 3 5 6 ) aggregateRuns:  [ :each | each = 4])     >>> #(#(1 2 3) #(4) #(1 2 3 5 6)). (#

Re: [Pharo-dev] better name for #aggregateRuns:

2017-12-12 Thread Denis Kudriashov
Hi #(1 2 3 4 1 2 3 5 6 ) collectGroupsWhere: [ :each | each = 4]) 2017-12-12 10:23 GMT+01:00 Pavel Krivanek : > Hi, > > do you have some proposals for a better name for the message named > #aggregateRuns? > > (#(1 2 3 4 1 2 3 5 6 ) aggregateRuns: [ :each | each = 4]) > >>> #(#(1 2 3) #(4)

Re: [Pharo-dev] better name for #aggregateRuns:

2017-12-12 Thread Alistair Grant
Hi Pavel, On 12 December 2017 at 10:23, Pavel Krivanek wrote: > Hi, > > do you have some proposals for a better name for the message named > #aggregateRuns? > > (#(1 2 3 4 1 2 3 5 6 ) aggregateRuns: [ :each | each = 4]) > >>> #(#(1 2 3) #(4) #(1 2 3 5 6)). > > (#(1 2 3 4 1 2 3 4 5 6 ) aggreg

[Pharo-dev] better name for #aggregateRuns:

2017-12-12 Thread Pavel Krivanek
Hi, do you have some proposals for a better name for the message named #aggregateRuns? (#(1 2 3 4 1 2 3 5 6 ) aggregateRuns: [ :each | each = 4]) >>> #(#(1 2 3) #(4) #(1 2 3 5 6)). (#(1 2 3 4 1 2 3 4 5 6 ) aggregateRuns: [ :each | each = 4]) >>> #(#(1 2 3) #(4) #(1 2 3) #(4) #(5 6)).