it leads to a 4-5x performance loss .
*From:*Pharo-users [mailto:pharo-users-boun...@lists.pharo.org] *On
Behalf Of *Damien Pollet
*Sent:* Friday, November 11, 2016 4:14 PM
*To:* Any question about pharo is welcome
*Subject:* Re: [Pharo-users] Little challenges for a friday evening
On 11 Nov
A nice read. What audience is it aimed at?
Difficult question :)
First or second year students and more.
So with and without a Java lecture before.
But the guy should know how to program a bit
I told you that it was fuzzy
Some grammar suggestions...
Oh I'm sure that they are
A nice read. What audience is it aimed at?
Some grammar suggestions...
> Sets are collections that only contains one element.
Being pedantic ;) the following Set does more than "contain one element"...
(Set new) add: 1; add: 2.
so maybe...
"Sets are unordered collections where elements d
I love all these solutions!!!
Thank for you for such cool but compact discussions!
I did a check to see how I could get isograms for french so over a
dictionary of 30 entities around 5 are
and I got really surprised because stupily I was counting é, ê, e and è
as the same letter and wel
).” Then it leads to
a 4-5x performance loss .
From: Pharo-users [mailto:pharo-users-boun...@lists.pharo.org] On Behalf Of
Damien Pollet
Sent: Friday, November 11, 2016 4:14 PM
To: Any question about pharo is welcome
Subject: Re: [Pharo-users] Little challenges for a friday evening
On 11 November
On 11 November 2016 at 12:02, stepharo wrote:
> String>>#isIsogram
>> | letters |
>> letters := Dictionary new.
>> self do: [ :x | letters at: x ifAbsent: [] ifPresent: [ ^false ].
>>
> Yes I did that one too and I was surprised because it was as slow as the
> bag implementation.
>
---Original Message-
From: Pharo-users [mailto:pharo-users-boun...@lists.pharo.org] On Behalf Of
Sven Van Caekenberghe
Sent: Thursday, November 10, 2016 11:10 PM
To: Any question about pharo is welcome
Subject: Re: [Pharo-users] Little challenges for a friday evening
[ :string | string siz
en Van Caekenberghe
Sent: Thursday, November 10, 2016 11:10 PM
To: Any question about pharo is welcome
Subject: Re: [Pharo-users] Little challenges for a friday evening
[ :string | string size = string asSet size ] value: 'Pharo'.
true
[ :string | string size = string asSet size ] value: &
Le 11/11/16 à 01:09, Ben Coman a écrit :
First I've heard of an isogram. Wikipedia [1] is ambiguous. Are you
considering only single occurrence of letters, or also equal
occurrence of letters.
I like Sven's answer best, but just as an exercise I thought of an alternative.
String>>#isIsogram
First I've heard of an isogram. Wikipedia [1] is ambiguous. Are you
considering only single occurrence of letters, or also equal
occurrence of letters.
I like Sven's answer best, but just as an exercise I thought of an alternative.
String>>#isIsogram
| letters |
letters := Dictionary new
false ]
].
^ true
-Original Message-
From: Pharo-users [mailto:pharo-users-boun...@lists.pharo.org] On Behalf Of
Sven Van Caekenberghe
Sent: Thursday, November 10, 2016 11:10 PM
To: Any question about pharo is welcome
Subject: Re: [Pharo-users] Little challenges for a friday evening
[ :
you're right, should probably be case insensitive.
> On 10 Nov 2016, at 23:14, Cyril Ferlicot D. wrote:
>
> Le 10/11/2016 à 23:09, Sven Van Caekenberghe a écrit :
>> [ :string | string size = string asSet size ] value: 'Pharo'.
>>
> true
>>
>> [ :string | string size = string asSet size ]
Le 10/11/2016 à 23:09, Sven Van Caekenberghe a écrit :
> [ :string | string size = string asSet size ] value: 'Pharo'.
>
true
>
> [ :string | string size = string asSet size ] value: 'Pharoo'.
>
false
>
> String>>#isIsogram
> ^ self size = self asSet size
>
> ?
>
'Pharop' size =
[ :string | string size = string asSet size ] value: 'Pharo'.
>>> true
[ :string | string size = string asSet size ] value: 'Pharoo'.
>>> false
String>>#isIsogram
^ self size = self asSet size
?
> On 10 Nov 2016, at 22:19, stepharo wrote:
>
> Hi
>
> I'm checking how I would implement an
14 matches
Mail list logo