BTrees with Strings on 3.8/3.9 broken

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

BTrees with Strings on 3.8/3.9 broken

Benjamin Pollack
Hi all,

I'm working with the BTree package (avi.67) and have noticed that
BTree>>testStringKeys fails consistently on 3.8/3.9, while it succeeds
consistently on 3.7. The exact failure point varies randomly, but the
symptom is consistent: keys are sorted properly by content, but
reverse by length (e.g., 'aa' comes before 'a', but both would come
before 'ab'). I'm pretty confident that the problem's due to the
String changes, but beyond that I'm stuck. Any ideas on what might be
happening?

Thanks.

--Benjamin

Reply | Threaded
Open this post in threaded view
|

Re: BTrees with Strings on 3.8/3.9 broken

Andreas.Raab
See the discussion starting at:

http://lists.squeakfoundation.org/pipermail/squeak-dev/2005-April/090957.html

Cheers,
   - Andreas

Benjamin Pollack wrote:

> Hi all,
>
> I'm working with the BTree package (avi.67) and have noticed that
> BTree>>testStringKeys fails consistently on 3.8/3.9, while it succeeds
> consistently on 3.7. The exact failure point varies randomly, but the
> symptom is consistent: keys are sorted properly by content, but
> reverse by length (e.g., 'aa' comes before 'a', but both would come
> before 'ab'). I'm pretty confident that the problem's due to the
> String changes, but beyond that I'm stuck. Any ideas on what might be
> happening?
>
> Thanks.
>
> --Benjamin
>
>


Reply | Threaded
Open this post in threaded view
|

Re: BTrees with Strings on 3.8/3.9 broken

Lukas Renggli
> I'm pretty confident that the problem's due to the
> String changes, but beyond that I'm stuck. Any
> ideas on what might be happening?

Please can somebody fix that in 3.9? It annoys me since it first noticed it.

Cheers,
Lukas

--
Lukas Renggli
http://www.lukas-renggli.ch

Reply | Threaded
Open this post in threaded view
|

RE: BTrees with Strings on 3.8/3.9 broken

Ron Teitelbaum
> From: Lukas Renggli
> Sent: Friday, June 09, 2006 2:11 AM
>
> > I'm pretty confident that the problem's due to the
> > String changes, but beyond that I'm stuck. Any
> > ideas on what might be happening?
>
> Please can somebody fix that in 3.9? It annoys me since it first noticed
> it.
>
> Cheers,
> Lukas

+1

==================================================================
From:
http://lists.squeakfoundation.org/pipermail/squeak-dev/2005-April/090974.htm
l Martin says:

I just checked other Smalltalks

            Dolphin  VSE      VW      NewSqueak  OldSqueak
'A' < 'b'  true     true     true    true       true
'a' < 'B'  true     true     true    true       false
'a' <= 'A' true     true     false   false      false
'A' <= 'a' true     true     true    true       true
'Az'<'aa'  false    false    false   true       true
'A' = 'a'  false    false    false   false      false

VW does it best. VSE and Dolphin do it like I proposed, or whatsoever
that was.

(self compare: aString caseSensitive: false) for #< #<= #> #>=
(self compare: aString caseSensitive: true) for #=

Given that the current Squeak sorting is still funny ('Az' < 'aa')
and Dolphin and VSE seem not worried about logical implications like

  'A'<='a' and 'a'<='A' must that mean that 'A'='a' ??

perhaps an interesting alternative?

=========================================================================

I like Dolphin and VSE and I'm not concerned with 'A'='a'. I would also
rather see this go away and be replaced by plain AsciiOrder as Andreas
suggested.

Ron Teitelbaum