[Pharo-users] Re: How can I make this more OOP

2020-09-15 Thread Stéphane Ducasse
still my point holds. And I’m like saint christophe I only believe what I saw and we will never see what you are doing so it does not exist. This is the rule of open-source. S. > On 16 Sep 2020, at 04:51, Richard O'Keefe wrote: > > In a language like Java or C# or Ada we can insist at > comp

[Pharo-users] Re: How can I make this more OOP

2020-09-15 Thread Richard O'Keefe
In a language like Java or C# or Ada we can insist at compile time that an argument conforms to a protocol, whatever class it might be an instance of. In Smalltalk, we can use #isKindOf: to test whether an object inherits from a class, but that is often the wrong test. We can use (multiple calls

[Pharo-users] Re: [Pharo-dev] Updating lists.pharo.org: New server, Mailman3 and more

2020-09-15 Thread Stéphane Ducasse
marcus I tried and I could not see the archive. Apparently the archive is still private. > On 14 Sep 2020, at 19:54, Marcus Denker wrote: > > Migration is Complete! > > If you want to login at the website, you need to create a new account with > the email address that the lists are now sendin

[Pharo-users] Re: Updating lists.pharo.org: New server, Mailman3 and more

2020-09-15 Thread Stéphane Ducasse
And the cool thing about it is that we will have soon a mailing list for github and other logs (that we can browse while not be forced to register too) and with that Pharo-dev will be less polluted and we want to have it back a place to exchange about Pharo. S.

[Pharo-users] Re: How can I make this more OOP

2020-09-15 Thread Stéphane Ducasse
> On 14 Sep 2020, at 16:02, Roelof Wobben via Pharo-users > wrote: > > > Thanks Richard for this explanation. > and I like also your idea of using #respondTo instead of asking a object if > its a collection or a item. refrain from using respondTo: I make code difficult to evolve and can in

[Pharo-users] Re: Updating lists.pharo.org: New server, Mailman3 and more

2020-09-15 Thread Offray Vladimir Luna Cárdenas
+100^100. As Susan Leigh Star said, infrastructure is invisible until it fails. So all the work behind the invisible to keep it running, lean and smooth is really important. Offray On 15/09/20 3:06 a. m., Sven Van Caekenberghe wrote: > >> On 14 Sep 2020, at 17:46, Sean P. DeNigris wrote: >> >>

[Pharo-users] Re: how can I improve this

2020-09-15 Thread Roelof Wobben via Pharo-users
Op 15-9-2020 om 15:42 schreef Roelof Wobben via Pharo-users: with: other count: testBlock     |r|     r := 0.     self with: other do: [:x :y |     (testBlock value: x value: y) ifTr

[Pharo-users] Re: how can I improve this

2020-09-15 Thread Roelof Wobben via Pharo-users
Oke, I can try this but im afraid the test which test a particular error il fail. The error messages are given. And I miss you.  yes, SequenceableCollection has with do: but should I add the with count to it ? Roelof

[Pharo-users] Re: how can I improve this

2020-09-15 Thread Richard O'Keefe
SequenceableCollection has with:do:. Add with: other count: testBlock |r| r := 0. self with: other do: [:x :y | (testBlock value: x value: y) ifTrue: [r := r + 1]]. ^r I have this in my library anyway. Now distanceStrand1: a strand2: b ^a with:

[Pharo-users] Re: Rounding in Floats

2020-09-15 Thread Richard O'Keefe
If you are going to use floating point numbers in any programming language, Pharo included, you need to understand something about them. Things like - the relevant precision is *fixed*; a Float in Pharo is *always* a 64-bit IEEE floating-point number, which amongst other things means (to a

[Pharo-users] Re: How can I make this more OOP

2020-09-15 Thread Richard O'Keefe
I take Sean's point. However, while I agree that practising using polymorphism instead of 'if' is a good idea, I don't think that *this* exercise is a good one for getting such practice. Roelof is going through the Pharo track of Exercism. This particular one is called 'flatten-array'. The one con

[Pharo-users] Re: Updating lists.pharo.org: New server, Mailman3 and more

2020-09-15 Thread Sven Van Caekenberghe
> On 14 Sep 2020, at 17:46, Sean P. DeNigris wrote: > > Marcus Denker-4 wrote >> We are updating the mailinglists (everything https://lists.pharo.org/ >> ;) > > Thanks, Marcus - all this logistical stuff gets no glory but is so important > :) +100 Indeed, thank you