hex

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

hex

stephane ducasse
in pharo

#[122 43 213 7] hex = '7A2BD507'

in squeak

#[122 43 213 7] hex = '7a2bd507'

do you think that it makes a difference?

Stef


_______________________________________________
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: hex

Eliot Miranda-2


On Tue, Feb 23, 2010 at 1:25 PM, stephane ducasse <[hidden email]> wrote:
in pharo

#[122 43 213 7] hex = '7A2BD507'

in squeak

#[122 43 213 7] hex = '7a2bd507'

do you think that it makes a difference?


Much of the "rest of the world" (e.g. gdb, md5sum) uses lower case.  Personally I find lower-case much easier to read because I find the lower-case letters visually more different from the digits than the upper case letters.  For these two reasons I prefer lower-case.   I haven't always been this way.  I used to prefer upper case because I think the upper case letters look neater, having the same height as the digits.  But now I prefer legibility over neatness.


Eliot 

Stef


_______________________________________________
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: hex

Stéphane Ducasse
Ok thanks.

"
The UUID spec (RFC 4122) allows both upper and lower case hex digits, so I don't see a reason not to.

"
Bert


On Feb 23, 2010, at 10:43 PM, Eliot Miranda wrote:

>
>
> On Tue, Feb 23, 2010 at 1:25 PM, stephane ducasse <[hidden email]> wrote:
> in pharo
>
> #[122 43 213 7] hex = '7A2BD507'
>
> in squeak
>
> #[122 43 213 7] hex = '7a2bd507'
>
> do you think that it makes a difference?
>
>
> Much of the "rest of the world" (e.g. gdb, md5sum) uses lower case.  Personally I find lower-case much easier to read because I find the lower-case letters visually more different from the digits than the upper case letters.  For these two reasons I prefer lower-case.   I haven't always been this way.  I used to prefer upper case because I think the upper case letters look neater, having the same height as the digits.  But now I prefer legibility over neatness.
>
> 2¢
>
> Eliot
>
> Stef
>
>
> _______________________________________________
> 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
Reply | Threaded
Open this post in threaded view
|

Re: hex

Nicolas Cellier
The main reason for not using lowercase in squeak was Dan extension of
number with radix plus exponent.
16r8e7 -> 16r8 * (16 raisedTo: 7)
and the Float variations...

If you decided to abandon this notation, then go with either upper or lower.
But a bit of consistency could help...

Nicolas

2010/2/23 Stéphane Ducasse <[hidden email]>:

> Ok thanks.
>
> "
> The UUID spec (RFC 4122) allows both upper and lower case hex digits, so I don't see a reason not to.
>
> "
> Bert
>
>
> On Feb 23, 2010, at 10:43 PM, Eliot Miranda wrote:
>
>>
>>
>> On Tue, Feb 23, 2010 at 1:25 PM, stephane ducasse <[hidden email]> wrote:
>> in pharo
>>
>> #[122 43 213 7] hex = '7A2BD507'
>>
>> in squeak
>>
>> #[122 43 213 7] hex = '7a2bd507'
>>
>> do you think that it makes a difference?
>>
>>
>> Much of the "rest of the world" (e.g. gdb, md5sum) uses lower case.  Personally I find lower-case much easier to read because I find the lower-case letters visually more different from the digits than the upper case letters.  For these two reasons I prefer lower-case.   I haven't always been this way.  I used to prefer upper case because I think the upper case letters look neater, having the same height as the digits.  But now I prefer legibility over neatness.
>>
>> 2¢
>>
>> Eliot
>>
>> Stef
>>
>>
>> _______________________________________________
>> 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
>

_______________________________________________
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: hex

Stéphane Ducasse

> The main reason for not using lowercase in squeak was Dan extension of
> number with radix plus exponent.
> 16r8e7 -> 16r8 * (16 raisedTo: 7)
> and the Float variations...
>
> If you decided to abandon this notation, then go with either upper or lower.
> But a bit of consistency could help...

I'm confused what is the situation now in squeak?
Because it seems that hex in squeak now prints and read lowercase?
So did
        16r8e7 and float
so will someone fix squeak to be consistent.
I'm a bit confused by the decision process in squeak (even if I should not worried too much).

Stef
_______________________________________________
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: hex

Stéphane Ducasse
In reply to this post by Nicolas Cellier
Nicolas and others

I was thinking also about the implication of the 16rFF changes on 16r8e7
                http://code.google.com/p/pharo/issues/detail?id=2068

I would really like to take the time to think and discuss it as a community to see what we want to do.
What is the current situation in squeak?

Stef




On Feb 23, 2010, at 11:16 PM, Nicolas Cellier wrote:

> The main reason for not using lowercase in squeak was Dan extension of
> number with radix plus exponent.
> 16r8e7 -> 16r8 * (16 raisedTo: 7)
> and the Float variations...
>
> If you decided to abandon this notation, then go with either upper or lower.
> But a bit of consistency could help...

Yes
_______________________________________________
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: hex

csrabak
In reply to this post by Stéphane Ducasse
Stef,

Squeak prints in lowercase and reads *correctly* only in uppercase. . .

--
Cesar Rabak


Em 24/02/2010 04:05, Stéphane Ducasse < [hidden email] > escreveu:

> The main reason for not using lowercase in squeak was Dan extension of
> number with radix plus exponent.
> 16r8e7 -> 16r8 * (16 raisedTo: 7)
> and the Float variations...
>
> If you decided to abandon this notation, then go with either upper or lower.
> But a bit of consistency could help...

I'm confused what is the situation now in squeak?
Because it seems that hex in squeak now prints and read lowercase?
So did
 16r8e7 and float
so will someone fix squeak to be consistent.
I'm a bit confused by the decision process in squeak (even if I should not worried too much).

Stef
_______________________________________________
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: hex

Nicolas Cellier
2010/2/24  <[hidden email]>:
> Stef,
>
> Squeak prints in lowercase and reads *correctly* only in uppercase. . .
>
> --
> Cesar Rabak
>

I think recent trunk version read both correctly.
Did you try recently?

Nicolas

>
> Em 24/02/2010 04:05, Stéphane Ducasse < [hidden email] > escreveu:
>
>> The main reason for not using lowercase in squeak was Dan extension of
>> number with radix plus exponent.
>> 16r8e7 -> 16r8 * (16 raisedTo: 7)
>> and the Float variations...
>>
>> If you decided to abandon this notation, then go with either upper or lower.
>> But a bit of consistency could help...
>
> I'm confused what is the situation now in squeak?
> Because it seems that hex in squeak now prints and read lowercase?
> So did
>  16r8e7 and float
> so will someone fix squeak to be consistent.
> I'm a bit confused by the decision process in squeak (even if I should not worried too much).
>
> Stef
> _______________________________________________
> 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
Reply | Threaded
Open this post in threaded view
|

Re: hex

Stéphane Ducasse
In reply to this post by csrabak

On Feb 24, 2010, at 6:47 PM, [hidden email] wrote:

> Stef,
>
> Squeak prints in lowercase and reads *correctly* only in uppercase. . .

can you post the expression you use?
Are you talking about byteArray? or plain number?

>
> --
> Cesar Rabak
>
>
> Em 24/02/2010 04:05, Stéphane Ducasse < [hidden email] > escreveu:
>
>> The main reason for not using lowercase in squeak was Dan extension of
>> number with radix plus exponent.
>> 16r8e7 -> 16r8 * (16 raisedTo: 7)
>> and the Float variations...
>>
>> If you decided to abandon this notation, then go with either upper or lower.
>> But a bit of consistency could help...
>
> I'm confused what is the situation now in squeak?
> Because it seems that hex in squeak now prints and read lowercase?
> So did
> 16r8e7 and float
> so will someone fix squeak to be consistent.
> I'm a bit confused by the decision process in squeak (even if I should not worried too much).
>
> Stef
> _______________________________________________
> 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
Reply | Threaded
Open this post in threaded view
|

Re: hex

Nicolas Cellier
2010/2/24 Stéphane Ducasse <[hidden email]>:
>
> On Feb 24, 2010, at 6:47 PM, [hidden email] wrote:
>
>> Stef,
>>
>> Squeak prints in lowercase and reads *correctly* only in uppercase. . .
>
> can you post the expression you use?
> Are you talking about byteArray? or plain number?

ByteArray, UUID and plain Number

Andreas Raab uploaded a new version of Collections to project The Trunk:
http://source.squeak.org/trunk/Collections-ar.310.mcz

==================== Summary ====================

Name: Collections-ar.310
Author: ar
Time: 23 February 2010, 7:16:34.191 am
UUID: eb685ed0-dba7-d546-b63e-08f76154d027
Ancestors: Collections-ul.309

Conversions from/to hex representations in ByteArray, for example:

       #[122 43 213 7] hex
               => '7a2bd507'

       ByteArray readHexFrom: '7a2bd507'
               => #[122 43 213 7]

Similarly these can be used for subclasses, e.g.,

       UUID new hex
               => '97c1f2ddf9209948b329319a30c16386'

       UUID readHexFrom: '97c1f2ddf9209948b329319a30c16386'
               => 97c1f2dd-f920-9948-b329-319a30c16386


Andreas Raab uploaded a new version of Multilingual to project The Trunk:
http://source.squeak.org/trunk/Multilingual-ar.87.mcz

==================== Summary ====================

Name: Multilingual-ar.87
Author: ar
Time: 11 February 2010, 11:48:33.736 pm
UUID: ca61be1a-7e30-2840-9b77-9cc7ecfc2d3f
Ancestors: Multilingual-ar.86

Change EncodedCharSet>>digitValue: to EncodedCharSet>>digitValueOf:. Part 3/3.

=============== Diff against Multilingual-ar.86 ===============

Item was changed:
 ----- Method: EncodedCharSet class>>digitValueOf: (in category 'class
methods') -----
 digitValueOf: char
       "Answer 0-9 if the receiver is $0-$9, 10-35 if it is $A-$Z, and < 0
       otherwise. This is used to parse literal numbers of radix 2-36."

       | value |
       value := char charCode.
+       value <= $9 asciiValue ifTrue:
+               [^value - $0 asciiValue].
+       value >= $A asciiValue ifTrue:
+               [value <= $Z asciiValue ifTrue: [^value - $A asciiValue + 10].
+                (value >= $a asciiValue and: [value <= $z asciiValue]) ifTrue:
+                       [^value - $a asciiValue + 10]].
-       value <= $9 asciiValue
-               ifTrue: [^value - $0 asciiValue].
-       value >= $A asciiValue
-               ifTrue: [value <= $Z asciiValue ifTrue: [^value - $A
asciiValue + 10]].
       ^ -1
 !

snip...



>>
>> --
>> Cesar Rabak
>>
>>
>> Em 24/02/2010 04:05, Stéphane Ducasse < [hidden email] > escreveu:
>>
>>> The main reason for not using lowercase in squeak was Dan extension of
>>> number with radix plus exponent.
>>> 16r8e7 -> 16r8 * (16 raisedTo: 7)
>>> and the Float variations...
>>>
>>> If you decided to abandon this notation, then go with either upper or lower.
>>> But a bit of consistency could help...
>>
>> I'm confused what is the situation now in squeak?
>> Because it seems that hex in squeak now prints and read lowercase?
>> So did
>> 16r8e7 and float
>> so will someone fix squeak to be consistent.
>> I'm a bit confused by the decision process in squeak (even if I should not worried too much).
>>
>> Stef
>> _______________________________________________
>> 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
>

_______________________________________________
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: hex

csrabak
In reply to this post by Nicolas Cellier
Em 24/02/2010 16:03, Nicolas Cellier < [hidden email] > escreveu:
2010/2/24  :

> > Stef,
> > Squeak  prints   in  lowercase  and  reads   *correctly*  only  in
> > uppercase. . .
> >
> > -- Cesar Rabak
> >
>  I  think recent  trunk version  read both  correctly.  Did  you try
> recently?

Nicolas,

As I reported in an earlier post to this list, I used: In Squeak (3.10.2-7179), I've not been downloading newer images for Squeak for long time indeed. If newer Squeak versions work differently, I cannot ascertain that, others will have to perform the test as well.

HTH,

--
Cesar Rabak



_______________________________________________
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: hex

csrabak
In reply to this post by Stéphane Ducasse
Stef,

I've posted this yesterday, but here it is:

In Pharo

'16r7A2BD507' asNumber = 2049692935

'16r7a2bd507' asNumber = 7

In Squeak (3.10.2-7179)

'16r7A2BD507' asNumber = 2049692935

'16r7a2bd507' asNumber = 7

Obviously I printed in the Workspace (Shout)

--
Cesar Rabak


Em 24/02/2010 19:41, Stéphane Ducasse < [hidden email] > escreveu:

On Feb 24, 2010, at 6:47 PM, [hidden email] wrote:

> Stef,
>
> Squeak prints in lowercase and reads *correctly* only in uppercase. . .

can you post the expression you use?
Are you talking about byteArray? or plain number?

>
> --
> Cesar Rabak
>
>
> Em 24/02/2010 04:05, Stéphane Ducasse < [hidden email] > escreveu:
>
>> The main reason for not using lowercase in squeak was Dan extension of
>> number with radix plus exponent.
>> 16r8e7 -> 16r8 * (16 raisedTo: 7)
>> and the Float variations...
>>
>> If you decided to abandon this notation, then go with either upper or lower.
>> But a bit of consistency could help...
>
> I'm confused what is the situation now in squeak?
> Because it seems that hex in squeak now prints and read lowercase?
> So did
> 16r8e7 and float
> so will someone fix squeak to be consistent.
> I'm a bit confused by the decision process in squeak (even if I should not worried too much).
>
> Stef
> _______________________________________________
> 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


_______________________________________________
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: hex

Nicolas Cellier
In reply to this post by csrabak
2010/2/25  <[hidden email]>:

> Em 24/02/2010 16:03, Nicolas Cellier < [hidden email] > escreveu:
> 2010/2/24  :
>
>> > Stef,
>> > Squeak  prints   in  lowercase  and  reads   *correctly*  only  in
>> > uppercase. . .
>> >
>> > -- Cesar Rabak
>> >
>>  I  think recent  trunk version  read both  correctly.  Did  you try
>> recently?
>
> Nicolas,
>
> As I reported in an earlier post to this list, I used: In Squeak (3.10.2-7179), I've not been downloading newer images for Squeak for long time indeed. If newer Squeak versions work differently, I cannot ascertain that, others will have to perform the test as well.
>
> HTH,
>
> --
> Cesar Rabak
>

Ah, OK, so you should maybe conjugate with preterit :)

Nicolas

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