[ANN] More License Rewriting

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

[ANN] More License Rewriting

gcotelli
Hi,
I upload to Pharo Inbox the following slice:

Name: SLICE-RelicensingPartII-GabrielOmarCotelli.2
Author: GabrielOmarCotelli
Time: 25 May 2009, 5:01:17 pm
UUID: 429de0c7-19cf-6043-a4ba-e4a858fb1dcd
Ancestors: SLICE-RelicensingPartII-GabrielOmarCotelli.1
Dependencies: Collections-Strings-GabrielOmarCotelli.19, CollectionsTests-GabrielOmarCotelli.350, KernelTests-GabrielOmarCotelli.105, Kernel-GabrielOmarCotelli.renggli.330

I re-write for license cleaning:

Number>>raisedToInteger:
Character>>codePoint
Character class>>codePoint:
DependentsArray>>size
BlockContext>>argumentCount

and made some test cases to cover this.

Please somebody review the changes.

Thanks,
Gabriel

_______________________________________________
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: [ANN] More License Rewriting

Nicolas Cellier
Thanks Gabriel.
For #raisedToInteger: please use algorithm in (n log: 2) efficiency
from previous license clean implementation:

        anInteger < 0 ifTrue: [^(self raisedToInteger: anInteger negated) reciprocal].
        bitProbe := 1 bitShift: anInteger highBit - 1.
        result := self class one.
        [(anInteger bitAnd: bitProbe) = 0 ifFalse: [result := result * self].
        (bitProbe := bitProbe bitShift: -1) > 0]
                whileTrue:
                        [result := result * result].
        ^result

rather than an efficiency in n:

        anInteger abs timesRepeat: [ result := result * self ].

Nicolas


2009/5/25 Gabriel Cotelli <[hidden email]>:

> Hi,
> I upload to Pharo Inbox the following slice:
>
> Name: SLICE-RelicensingPartII-GabrielOmarCotelli.2
> Author: GabrielOmarCotelli
> Time: 25 May 2009, 5:01:17 pm
> UUID: 429de0c7-19cf-6043-a4ba-e4a858fb1dcd
> Ancestors: SLICE-RelicensingPartII-GabrielOmarCotelli.1
> Dependencies: Collections-Strings-GabrielOmarCotelli.19,
> CollectionsTests-GabrielOmarCotelli.350, KernelTests-GabrielOmarCotelli.105,
> Kernel-GabrielOmarCotelli.renggli.330
>
> I re-write for license cleaning:
>
> Number>>raisedToInteger:
> Character>>codePoint
> Character class>>codePoint:
> DependentsArray>>size
> BlockContext>>argumentCount
>
> and made some test cases to cover this.
>
> Please somebody review the changes.
>
> Thanks,
> Gabriel
>
> _______________________________________________
> 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: [ANN] More License Rewriting

gcotelli
Ok,
I change that and later post a new SLICE.

Thanks,
Gabriel

On Mon, May 25, 2009 at 6:27 PM, Nicolas Cellier <[hidden email]> wrote:
Thanks Gabriel.
For #raisedToInteger: please use algorithm in (n log: 2) efficiency
from previous license clean implementation:

       anInteger < 0 ifTrue: [^(self raisedToInteger: anInteger negated) reciprocal].
       bitProbe := 1 bitShift: anInteger highBit - 1.
       result := self class one.
       [(anInteger bitAnd: bitProbe) = 0 ifFalse: [result := result * self].
       (bitProbe := bitProbe bitShift: -1) > 0]
               whileTrue:
                       [result := result * result].
       ^result

rather than an efficiency in n:

       anInteger abs timesRepeat: [ result := result * self ].

Nicolas


2009/5/25 Gabriel Cotelli <[hidden email]>:
> Hi,
> I upload to Pharo Inbox the following slice:
>
> Name: SLICE-RelicensingPartII-GabrielOmarCotelli.2
> Author: GabrielOmarCotelli
> Time: 25 May 2009, 5:01:17 pm
> UUID: 429de0c7-19cf-6043-a4ba-e4a858fb1dcd
> Ancestors: SLICE-RelicensingPartII-GabrielOmarCotelli.1
> Dependencies: Collections-Strings-GabrielOmarCotelli.19,
> CollectionsTests-GabrielOmarCotelli.350, KernelTests-GabrielOmarCotelli.105,
> Kernel-GabrielOmarCotelli.renggli.330
>
> I re-write for license cleaning:
>
> Number>>raisedToInteger:
> Character>>codePoint
> Character class>>codePoint:
> DependentsArray>>size
> BlockContext>>argumentCount
>
> and made some test cases to cover this.
>
> Please somebody review the changes.
>
> Thanks,
> Gabriel
>
> _______________________________________________
> 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


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