Logging package does not compile

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

Logging package does not compile

François Tanguy
Hello,

did anyone ever tried to load the "Logging" package from Keith Hodges ?
http://lists.squeakfoundation.org/pipermail/squeak-dev/2008-December/132923.html

In pharo, the following method does not compile.

testFilter: aMessage
        | lowerString |
        lowerString := aMessage value value asLowercase.
        ^(self searchString asString substrings allSatisfy: [:sub |
                sub := (sub asLowercase) replaceAll: $_ with: (Character space).
                ((sub first = $-) and: [(lowerString includesSubString: sub  
allButFirst) not]) or:
                [(sub first = $+) and: [lowerString includesSubString: sub  
allButFirst]] or:
                [lowerString includesSubString: sub]])

It is easy to fix by using an extra variable.
My question, should we ask Keith to fix this method so that this  
package would be "pharo loadable" ?

François
_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: Logging package does not compile

Stéphane Ducasse

On Jun 6, 2009, at 7:37 PM, François Tanguy wrote:

> Hello,
>
> did anyone ever tried to load the "Logging" package from Keith  
> Hodges ?
> http://lists.squeakfoundation.org/pipermail/squeak-dev/2008-December/132923.html
>
> In pharo, the following method does not compile.
>
> testFilter: aMessage
> | lowerString |
> lowerString := aMessage value value asLowercase.
> ^(self searchString asString substrings allSatisfy: [:sub |
> sub := (sub asLowercase) replaceAll: $_ with: (Character space).
> ((sub first = $-) and: [(lowerString includesSubString: sub
> allButFirst) not]) or:
> [(sub first = $+) and: [lowerString includesSubString: sub
> allButFirst]] or:
> [lowerString includesSubString: sub]])
>
> It is easy to fix by using an extra variable.
> My question, should we ask Keith to fix this method so that this
> package would be "pharo loadable" ?

If you need it please ask him or even propose a fix.
Keith is asking for participation so I do not see why he would be  
against that.

Stef
>
>
> François
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: Logging package does not compile

keith1y
In reply to this post by François Tanguy
François Tanguy wrote:

> Hello,
>
> did anyone ever tried to load the "Logging" package from Keith Hodges ?
> http://lists.squeakfoundation.org/pipermail/squeak-dev/2008-December/132923.html
>
> In pharo, the following method does not compile.
>
> testFilter: aMessage
> | lowerString |
> lowerString := aMessage value value asLowercase.
> ^(self searchString asString substrings allSatisfy: [:sub |
> sub := (sub asLowercase) replaceAll: $_ with: (Character space).
> ((sub first = $-) and: [(lowerString includesSubString: sub  
> allButFirst) not]) or:
> [(sub first = $+) and: [lowerString includesSubString: sub  
> allButFirst]] or:
> [lowerString includesSubString: sub]])
>
> It is easy to fix by using an extra variable.
> My question, should we ask Keith to fix this method so that this  
> package would be "pharo loadable" ?
>
> François
You dont have to ask me to fix it, all of my projects are open access. I
look forward to receiving contributions that will ensure things are
compatible.

Keith

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: Logging package does not compile

François Tanguy
Le 8 juin 09 à 03:42, Keith Hodges a écrit :

> François Tanguy wrote:
>> Hello,
>>
>> did anyone ever tried to load the "Logging" package from Keith  
>> Hodges ?
>> http://lists.squeakfoundation.org/pipermail/squeak-dev/2008-December/132923.html
>>
>> In pharo, the following method does not compile.
>>
>> testFilter: aMessage
>> | lowerString |
>> lowerString := aMessage value value asLowercase.
>> ^(self searchString asString substrings allSatisfy: [:sub |
>> sub := (sub asLowercase) replaceAll: $_ with: (Character space).
>> ((sub first = $-) and: [(lowerString includesSubString: sub
>> allButFirst) not]) or:
>> [(sub first = $+) and: [lowerString includesSubString: sub
>> allButFirst]] or:
>> [lowerString includesSubString: sub]])
>>
>> It is easy to fix by using an extra variable.
>> My question, should we ask Keith to fix this method so that this
>> package would be "pharo loadable" ?
>>
>> François
> You dont have to ask me to fix it, all of my projects are open  
> access. I
> look forward to receiving contributions that will ensure things are
> compatible.

I have commited the fix.

François

>
>
> Keith
>
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project