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
|
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 |
HI Tobias,
> Should I hold off committing my updates to ConfigurationOfMigritte2 until the Collection>>reduce: is added to Gemstone?
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 |
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 |
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 |
Free forum by Nabble | Edit this page |