Magritte

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

Magritte

Nick
Hi,

There have been some fixes in Magritte that I'd like to incorporate into my project. I've locally updated a ConfigurationOfMagritte2 and created a version2052: (the previous latest version being version2051:). However from version Magritte-Model-lr.397 the extension method SequenceableCollection>>reduce: was removed - the method is in Pharo Collection>>reduce: from Pharo 1.1. It seems that is should be added to the "*squeak-enumerating" protocol of Collection within Gemstone. 

Should I hold off committing my updates to ConfigurationOfMigritte2 until the  Collection>>reduce: is added to Gemstone?

Cheers

Nick
Reply | Threaded
Open this post in threaded view
|

Re: Magritte

Tobias Pape
Am 2010-10-19 um 16:59 schrieb Nick Ager:
> Hi,
>
> There have been some fixes in Magritte that I'd like to incorporate into my project. I've locally updated a ConfigurationOfMagritte2 and created a version2052: (the previous latest version being version2051:). However from version Magritte-Model-lr.397 the extension method SequenceableCollection>>reduce: was removed - the method is in Pharo Collection>>reduce: from Pharo 1.1. It seems that is should be added to the "*squeak-enumerating" protocol of Collection within Gemstone.
>
> Should I hold off committing my updates to ConfigurationOfMigritte2 until the  Collection>>reduce: is added to Gemstone?
>

Probably you are fine using #inject:into:

#(1 2 3) inject: 0 into: [:sum :each | sum + each]. " => 6"

#('a' 'b' 'c')
        inject: OrderedCollection new
        into: [:coll :each | coll add: each asUppercase; yourself]. "=>  an OrderedCollection('A' 'B' 'C')"

Note that the last expression of the block will be assigned to the value
that will be passed as the first variable (col or sum above) in the block
for the next iteration.

So Long,
        -Tobias

Reply | Threaded
Open this post in threaded view
|

Re: Magritte

Nick
HI Tobias,

> Should I hold off committing my updates to ConfigurationOfMigritte2 until the  Collection>>reduce: is added to Gemstone?
>

Probably you are fine using #inject:into:

The problem is that the other platforms support Collection>>reduce: and it's used in a few places in Magritte. I'd have thought it would be better to add support for #reduce: in Gemstone than rewrite the Magritte code to avoid #reduce: Unless I've misunderstood

Nick

 
Reply | Threaded
Open this post in threaded view
|

Re: Magritte

Dale Henrichs
In reply to this post by Nick
On 10/19/2010 07:59 AM, Nick Ager wrote:

> Hi,
>
> There have been some fixes in Magritte that I'd like to incorporate into
> my project. I've locally updated a ConfigurationOfMagritte2 and created
> a version2052: (the previous latest version being version2051:). However
> from version Magritte-Model-lr.397 the extension method
> SequenceableCollection>>reduce: was removed - the method is in Pharo
> Collection>>reduce: from Pharo 1.1. It seems that is should be added to
> the "*squeak-enumerating" protocol of Collection within Gemstone.
>
> Should I hold off committing my updates to ConfigurationOfMigritte2
> until the  Collection>>reduce: is added to Gemstone?
>
> Cheers
>
> Nick

Nick,

Yes hold off ... it would help if you added
SequenceableCollection>>reduce: to the Squeak package (in Norbert's
latest version of Squeak)...

I'm heads down on a GemStone 3.0 that's consuming a lot of my time ... I
plan to get a Seaside3.0 release out in the next day or two so I'l
coordinate with you on the Magritte config update as well...

I am not opposed to folks updating the GLASS configs if you want to
tackle it ... 1.0-beta.8.4 is the current release, so I'd expect that
you'd do a 1.0-beta.8.4.1 and announce your intentions to the list, so
no one else collides ...

Dale
Reply | Threaded
Open this post in threaded view
|

Re: Magritte

Tobias Pape
Am 2010-10-19 um 20:17 schrieb Dale Henrichs:

> On 10/19/2010 07:59 AM, Nick Ager wrote:
>> Hi,
>>
>> There have been some fixes in Magritte that I'd like to incorporate into
>> my project. I've locally updated a ConfigurationOfMagritte2 and created
>> a version2052: (the previous latest version being version2051:). However
>> from version Magritte-Model-lr.397 the extension method
>> SequenceableCollection>>reduce: was removed - the method is in Pharo
>> Collection>>reduce: from Pharo 1.1. It seems that is should be added to
>> the "*squeak-enumerating" protocol of Collection within Gemstone.
>>
>> Should I hold off committing my updates to ConfigurationOfMigritte2
>> until the  Collection>>reduce: is added to Gemstone?
>>
>> Cheers
>>
>> Nick
>
> Nick,
>
> Yes hold off ... it would help if you added SequenceableCollection>>reduce: to the Squeak package (in Norbert's latest version of Squeak)...


Probably Collection>>reduce: too, I just found it in my Squeak 4.x image :)

So Long,
        -Tobias