[squeak-dev] Re: [ANN] Kernel methods license audit
nicolas cellier
ncellier at ifrance.com
Fri Mar 21 21:33:12 UTC 2008
Paolo Bonzini a écrit :
>
>> However, looking at the source, apart accessors, some methods will
>> hardly ever change, like:
>> Integer>>bitInvert
>> ^-1-self
>>
>> There is no added value in such method but very obvious algorithm:
>> two complement: bitinvert the digits, and add 1
>> => bitInvert: take two complement, and subtract 1
>
Another much simpler view is that -1 is an infinite sequence of
...1111111111111111111
Subtracting any integer is just like performing 1-b on each bit b
because there is not any chance to raise a carry.
1111111111 -
1010010111
----------
0101101000
> This could become "^self bitXor: -1", at least if bitXor does not use
> bitInvert. :-)
>
Yes, that's a good solution that would work (though 7x slower in squeak
for LargeInteger, because not primitive).
But what i meant is that rewriting a single obvious method does not make
much sense, since it's not really copyright-able by itself.
>> The trick is not here, it is in pretending LargeNegativeInteger are
>> stored in two complements, what they are not...
>> So the trick is in all the bitOr:, bitAnd:, bitXor:, bitShift:
>> implementations, as a whole.
>
> If you want a >0% chance to have different code, look at libgst/mpz.c
> from GNU Smalltalk. It contains the exact same algorithms written in C
> (so don't be afraid of tainting anything with anything). And XOR does
> not use NOT so you get a chance to rewrite #bitInvert too. :-)
>
> Paolo
>
>
Yes, it is possible to rewrite the whole thing if REALLY necessary.
That makes a little more sense than a single method.
However, taking from GPL, to transform SqueakL into MIT... :)
This adds to the total nonsense of licence and copyrights...
Sisyphe is still very modern. Unless it's more like Danaids, you fill
the image with code, but there is a licence leakage that let it flow out.
Kind of missinterpretation of "dynamic" language i presume... (rewrite
it every 5 years).
Nicolas
More information about the Squeak-dev
mailing list
|