see bug report 12231, I added a fix for the unix config.
But it has to applied by someone. (I don't know where to put this else).
But the issue is two years old, if no one responds, I'll just close the
issue.
Lovely little discussion which would be great for beginning OO programmers
to see. The question of whether to return 0 for an empty collection is
interesting. While other things can be summed, we tend to think of sums
returning numbers. In that sense, 0 is a great default return. On the other
Hi,
> On Dec 1, 2015, at 3:24 PM, Sven Van Caekenberghe wrote:
>
> Doru,
>
>> On 01 Dec 2015, at 15:11, Tudor Girba wrote:
>>
>> Hi,
>>
>>> On Dec 1, 2015, at 12:52 PM, Sven Van Caekenberghe wrote:
>>>
>>>
On 01 Dec 2015, at 12:45,
> On 01 Dec 2015, at 17:43, Tudor Girba wrote:
>
> Hi,
>
>> On Dec 1, 2015, at 3:24 PM, Sven Van Caekenberghe wrote:
>>
>> Doru,
>>
>>> On 01 Dec 2015, at 15:11, Tudor Girba wrote:
>>>
>>> Hi,
>>>
On Dec 1, 2015, at 12:52 PM,
Branch: refs/tags/50479
Home: https://github.com/pharo-project/pharo-core
Branch: refs/heads/5.0
Home: https://github.com/pharo-project/pharo-core
Commit: 65f8f438b2ae6582490f361b3048f8e99dccb87f
https://github.com/pharo-project/pharo-core/commit/65f8f438b2ae6582490f361b3048f8e99dccb87f
Author: Jenkins Build Server
Date:
To return to this conversation, I used more versioner, and, though it still
can be improved, it makes creating new versions easier.
So, all in all, for now, we can keep the current configurations as they are.
Cheers,
Andrei
On Thu, Oct 15, 2015 at 8:49 PM, Tudor Girba
Branch: refs/heads/5.0
Home: https://github.com/pharo-project/pharo-core
Commit: 74be61eb5aa0233563d3baa28d92c0c70356af0a
https://github.com/pharo-project/pharo-core/commit/74be61eb5aa0233563d3baa28d92c0c70356af0a
Author: Jenkins Build Server
Date:
Branch: refs/tags/50480
Home: https://github.com/pharo-project/pharo-core
Note that the sum with #anyOne is wrong.
#(1 2 3 4 5) inject: #(1 2 3 4 5) anyOne into: [ :sum :each | sum + each ]
returns 16 instead of 15.
Thierry
2015-12-01 10:18 GMT+01:00 Ben Coman :
> On Tue, Dec 1, 2015 at 4:45 PM, Sven Van Caekenberghe
> wrote:
>
Hi Max,
Interesting results...
replacing the #yourself in newSum: cuts the runtime by a factor of two.
using an [:x | x ] block cost 10% compared to a direct version of sum.
So the fastest sum is:
sum
^ self
inject:
(self ifEmpty: [ ^ 0 ] ifNotEmpty: [ self anyOne ])
into: [ :sum :each | sum +
The differences between #sum: and #sumNumbers: are well described in
the respective method comments, but I agree that this may be a problem
as most people will go for #sum: even for basic numeric collections.
(And I personally got bit by this.)
So maybe #sum: could adopt #sumNumbers:
I am all for a cleanup, the current situation is confusing.
The basic #sum should be fast AND work for empty collections with 0 as starting
element.
I know why the #anyOne is used, and that use case should be preserved, but it
is less common IMHO.
> On 01 Dec 2015, at 09:38, Thierry Goubier
Hi,
Probably you need to have two different operating system windows.
In this case, the work you are probably interested in is OSWindow. For example,
when you now switch to a Bloc world, you will get a separate OS window.
Cheers,
Doru
> On Dec 1, 2015, at 8:50 AM, Peter Uhnak
On Tue, Dec 1, 2015 at 4:45 PM, Sven Van Caekenberghe wrote:
> I am all for a cleanup, the current situation is confusing.
> The basic #sum should be fast AND work for empty collections with 0 as
> starting element.
> I know why the #anyOne is used, and that use case should be
> On 01 Dec 2015, at 10:24, Thierry Goubier wrote:
>
> Note that the sum with #anyOne is wrong.
>
> #(1 2 3 4 5) inject: #(1 2 3 4 5) anyOne into: [ :sum :each | sum + each ]
>
> returns 16 instead of 15.
You have subtract the element you picked with #anyOne !
>
> On 01 Dec 2015, at 10:18, Ben Coman wrote:
>
> On Tue, Dec 1, 2015 at 4:45 PM, Sven Van Caekenberghe wrote:
>> I am all for a cleanup, the current situation is confusing.
>> The basic #sum should be fast AND work for empty collections with 0 as
>>
2015-12-01 10:26 GMT+01:00 Sven Van Caekenberghe :
>
> > On 01 Dec 2015, at 10:24, Thierry Goubier
> wrote:
> >
> > Note that the sum with #anyOne is wrong.
> >
> > #(1 2 3 4 5) inject: #(1 2 3 4 5) anyOne into: [ :sum :each | sum + each
> ]
> >
> >
2015-12-01 10:26 GMT+01:00 Sven Van Caekenberghe :
>
> > On 01 Dec 2015, at 10:18, Ben Coman wrote:
> >
> > On Tue, Dec 1, 2015 at 4:45 PM, Sven Van Caekenberghe
> wrote:
> >> I am all for a cleanup, the current situation is confusing.
> >> The
Depends on how you want to use it. Two different OS Windows may be OK -
but usually you want to display one world on several monitors similar
to what for instance Window operating system itself is doing.
So when you drag a Pharo window around you move it from one monitor to the
other. For this
Hi guys,
Collection defines #sum:, #detectSum: and #sumNumbers:, all of which accomplish
the same (in principal) but with subtle differences:
#sum:
- uses #inject:into: with #anyOne as the injected element and will thus fail
for empty collections
#detectSum:
- uses “nextValue + sum” instead
Branch: refs/heads/5.0
Home: https://github.com/pharo-project/pharo-core
Commit: f720c316501315a530a14e49d6445cd395a25151
https://github.com/pharo-project/pharo-core/commit/f720c316501315a530a14e49d6445cd395a25151
Author: Jenkins Build Server
Date:
Branch: refs/tags/50478
Home: https://github.com/pharo-project/pharo-core
2015-12-01 10:29 GMT+01:00 Nicolai Hess :
>
>
> 2015-12-01 10:26 GMT+01:00 Sven Van Caekenberghe :
>
>>
>> > On 01 Dec 2015, at 10:24, Thierry Goubier
>> wrote:
>> >
>> > Note that the sum with #anyOne is wrong.
>> >
>> > #(1 2 3 4
The basic question for me is, what should
#() sum
return. Right now, it is an error, I would very much like that for this common
case the result would be 0. There is a lot of power (easy of use) in a unary
selector, we should not destroy that with semantics that force a test before
using
Le 30 nov. 2015 à 15:37, Stephan Eggermont a écrit :
> On 30-11-15 11:06, Nicolai Hess wrote:
>> no issue validation since last weekend.
>
> We now get timeout within a few minutes
yes Jenkins messed up build numbers
now back to normal
smime.p7s
Description: S/MIME cryptographic
2015-12-01 11:46 GMT+01:00 Sven Van Caekenberghe :
> The basic question for me is, what should
>
> #() sum
>
> return. Right now, it is an error, I would very much like that for this
> common case the result would be 0. There is a lot of power (easy of use) in
> a unary selector,
Hello.
My name is Denis Kudriashov. I'm a new engineer in Rmod team. I'm working
on remote debugger project. And I want to share a little progress on it.
Our idea is make current tools working with remote smalltalk images. We not
try to build new tools but we will adapt existed ones to be able
On 12/01, Thierry Goubier wrote:
> 2015-12-01 11:46 GMT+01:00 Sven Van Caekenberghe :
>
> > The basic question for me is, what should
> >
> > #() sum
> >
> > return. Right now, it is an error, I would very much like that for this
> > common case the result would be 0. There is a
On 01-12-15 11:46, Sven Van Caekenberghe wrote:
The basic question for me is, what should
#() sum
return. Right now, it is an error, I would very much like that for this common
case the result would be 0. There is a lot of power (easy of use) in a unary
selector, we should not destroy
> On 01 Dec 2015, at 12:45, Stephan Eggermont wrote:
>
> On 01-12-15 11:46, Sven Van Caekenberghe wrote:
>> The basic question for me is, what should
>>
>> #() sum
>>
>> return. Right now, it is an error, I would very much like that for this
>> common case the result
#sum:ifEmpty: looks nice
> On 01 Dec 2015, at 12:45, Stephan Eggermont wrote:
>
> On 01-12-15 11:46, Sven Van Caekenberghe wrote:
>> The basic question for me is, what should
>>
>> #() sum
>>
>> return. Right now, it is an error, I would very much like that for this
>>
Doru,
> On 01 Dec 2015, at 15:11, Tudor Girba wrote:
>
> Hi,
>
>> On Dec 1, 2015, at 12:52 PM, Sven Van Caekenberghe wrote:
>>
>>
>>> On 01 Dec 2015, at 12:45, Stephan Eggermont wrote:
>>>
>>> On 01-12-15 11:46, Sven Van Caekenberghe
I don't want to be heretic (or too orthodox), but why not to delegate
this behavior to other class (an iterator maybe?).
It's too tempting adding these convenience methods to Collection
and/or subclasses, but anything that requires an explicit protocol of
its elements is wrong, IMO.
something
Hi,
> On Dec 1, 2015, at 3:21 PM, Yuriy Tymchuk wrote:
>
>>
>> On 01 Dec 2015, at 15:11, Tudor Girba wrote:
>>
>> Hi,
>>
>>> On Dec 1, 2015, at 12:52 PM, Sven Van Caekenberghe wrote:
>>>
>>>
On 01 Dec 2015, at 12:45, Stephan
Well, I’m glad I've struck a nerve there :)
I agree that signalling an exception isn’t wrong, it’s just annoying because
you have to do the check manually each time. I think I like #sum:ifEmpty:. When
you look through the methods in Collection you’ll see #sum, #sum: and
#sum:ifEmpty together
Hi,
> On Dec 1, 2015, at 12:52 PM, Sven Van Caekenberghe wrote:
>
>
>> On 01 Dec 2015, at 12:45, Stephan Eggermont wrote:
>>
>> On 01-12-15 11:46, Sven Van Caekenberghe wrote:
>>> The basic question for me is, what should
>>>
>>> #() sum
>>>
>>> return.
> On 01 Dec 2015, at 15:11, Tudor Girba wrote:
>
> Hi,
>
>> On Dec 1, 2015, at 12:52 PM, Sven Van Caekenberghe wrote:
>>
>>
>>> On 01 Dec 2015, at 12:45, Stephan Eggermont wrote:
>>>
>>> On 01-12-15 11:46, Sven Van Caekenberghe wrote:
@Doru
You’re missing the point: #anyOne *fails* for empty collections.
> On 01 Dec 2015, at 15:31, Esteban A. Maringolo wrote:
>
> I don't want to be heretic (or too orthodox), but why not to delegate
> this behavior to other class (an iterator maybe?).
>
> It's too
On Tue, Dec 1, 2015 at 10:24 PM, Sven Van Caekenberghe wrote:
> Doru,
>
>> On 01 Dec 2015, at 15:11, Tudor Girba wrote:
>>
>> Hi,
>>
>>> On Dec 1, 2015, at 12:52 PM, Sven Van Caekenberghe wrote:
>>>
>>>
On 01 Dec 2015, at 12:45, Stephan
Hi,
> On Dec 1, 2015, at 5:13 PM, Max Leske wrote:
>
> @Doru
> You’re missing the point: #anyOne *fails* for empty collections.
I am not missing the point at all. I am saying that if you want sum: to be
generic, it cannot assume a specific Zero object.
And sum: should be
That is exciting to hear. Potentially great for web servers and
embedded systems.
Are you consider handling/testing poor internet connections...
http://stackoverflow.com/questions/130354/how-do-i-simulate-a-low-bandwidth-high-latency-environment
cheers -ben
On Tue, Dec 1, 2015 at 11:44 PM, Denis
42 matches
Mail list logo