Re: [Chicken-users] string-ci<=? and string-ci>=?

2018-09-11 Thread Peter Bex
On Tue, Sep 11, 2018 at 08:26:49AM +0200, Sven Hartrumpf wrote:
> Hi.
> 
> The issue reported by Nils Holm
> in http://groups.google.com/group/comp.lang.scheme/t/6b8be06b84b39a7
> affects chicken 5, too:
> 
> > (string-ci<=? "test" "tes")
> #t
> > (string-ci>=? "test" "tes")
> #f

Thanks for reporting this.  I've filed a ticket to track this at
https://bugs.call-cc.org/ticket/1534

I've assigned it to milestone 5.0 and version 5.0.0rc2 so we don't
forget to fix it before releasing 5.0 and it should be in the list
of things which changes since 5.0.0rc2.  We still should apply it
to the chicken-4 branch, so it's included if we ever make a 4.14
version.

Cheers,
Peter


signature.asc
Description: PGP signature
___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] [ANN] CHICKEN 5.0.0 release candidate 2 available

2018-09-11 Thread J K
Operating system: Arch Linux
Hardware platform:   x86-64
C Compiler:GCC 8.2.1
Installation works?:   yes
Tests work?:   yes
Installation of eggs works?:  yes (matchable and fmt)

Cheers,
Julius

On Sun, Sep 9, 2018 at 12:37 PM Peter Bex  wrote:

> Hello all,
>
> The second release candidate for CHICKEN 5.0.0 is now available for
> download:
>
>   http://code.call-cc.org/dev-snapshots/2018/09/09/chicken-5.0.0rc2.tar.gz
>
> The sha256sum of that tarball is:
>
>   237c88fcdd0d31f01923d9c5d0e4a564d22cdee98687a4e1daa2bc97d173e460
>
> The list of changes since 4.13.0 is available here (which is the
> same as that of 5.0.0rc1):
>
>   http://code.call-cc.org/dev-snapshots/2018/09/09/NEWS
>
> Quite a few issues have been fixed, especially with chicken-install
> and quoting (most of those on Windows).  For an overview of fixed
> tickets since 5.0.0rc1, see the Trac page:
>
>
> http://bugs.call-cc.org/query?status=closed=5.0.0rc1=5.0=status=id=summary=owner=type=priority=component=version=priority
>
> Please give this new release candidate a try and report your findings
> to the mailing list.  Here's a suggested test procedure:
>
>   $ make PLATFORM= PREFIX= install check
>   $ /bin/chicken-install pastiche
>
> If you can, please let us know the following information about the
> environment on which you test the RC:
>
>   Operating system: (e.g., FreeBSD 10.1, Debian 8, Windows 7 mingw-msys)
>   Hardware platform: (e.g., x86, x86-64, PPC)
>   C Compiler: (e.g., GCC 4.9.2, clang 3.6)
>   Installation works?: yes or no
>   Tests work?: yes or no
>   Installation of eggs works?: yes or no
>
> Thanks in advance!
>
> The CHICKEN Team
> ___
> Chicken-users mailing list
> Chicken-users@nongnu.org
> https://lists.nongnu.org/mailman/listinfo/chicken-users
>
___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] string-ci<=? and string-ci>=?

2018-09-11 Thread Sven Hartrumpf
Hi Vasilij.

VS wrote, 2018-09-11 09:26:
>> > (string-ci<=? "test" "tes")
>> #t
>> > (string-ci>=? "test" "tes")
>> #f
> 
> This is odd. Here's some source code:
> 
>   (set! scheme#string-ci<=? (lambda (s1 s2)
>   (compare
>s1 s2 'string-ci<=?
>(lambda (len1 len2 cmp)
>  (if (eq? cmp 0)
>  (fx>= len1 len2)
>  (fx< cmp 0) ) ) ) ) )
>   (set! scheme#string-ci>=? (lambda (s1 s2)
>   (compare
>s1 s2 'string-ci>=?
>(lambda (len1 len2 cmp)
>  (if (eq? cmp 0)
>  (fx<= len1 len2)
>  (fx> cmp 0) ) ) ) ) ) 
> 
> From what I can tell, `cmp` ends up being zero if the `memcmp` called by
> `compare` returns zero for both strings, with the smaller length as last
> argument.  This happens when they share the same prefix, so in this case
> you'd run into that branch, then compare `len1` against `len2`.  As
> `len1` is larger, `string-ci<=?` returns #t.  The question is, what
> should the correct comparator be here?

The line
  (fx>= len1 len2)
should be moved down to scheme#string-ci>=?, and the line
  (fx<= len1 len2)
should be moved to to scheme#string-ci<=?
Am I missing something?

Ciao
Sven

___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] string-ci<=? and string-ci>=?

2018-09-11 Thread Vasilij Schneidermann
Hey Sven,

> > (string-ci<=? "test" "tes")
> #t
> > (string-ci>=? "test" "tes")
> #f

This is odd. Here's some source code:

  (set! scheme#string-ci<=? (lambda (s1 s2)
  (compare
   s1 s2 'string-ci<=?
   (lambda (len1 len2 cmp)
 (if (eq? cmp 0)
 (fx>= len1 len2)
 (fx< cmp 0) ) ) ) ) )
  (set! scheme#string-ci>=? (lambda (s1 s2)
  (compare
   s1 s2 'string-ci>=?
   (lambda (len1 len2 cmp)
 (if (eq? cmp 0)
 (fx<= len1 len2)
 (fx> cmp 0) ) ) ) ) ) 

>From what I can tell, `cmp` ends up being zero if the `memcmp` called by
`compare` returns zero for both strings, with the smaller length as last
argument.  This happens when they share the same prefix, so in this case
you'd run into that branch, then compare `len1` against `len2`.  As
`len1` is larger, `string-ci<=?` returns #t.  The question is, what
should the correct comparator be here?

Vasilij

___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users


[Chicken-users] string-ci<=? and string-ci>=?

2018-09-11 Thread Sven Hartrumpf
Hi.

The issue reported by Nils Holm
in http://groups.google.com/group/comp.lang.scheme/t/6b8be06b84b39a7
affects chicken 5, too:

> (string-ci<=? "test" "tes")
#t
> (string-ci>=? "test" "tes")
#f

Ciao
Sven

___
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users