From debbugs-submit-bounces@debbugs.gnu.org Tue Apr 17 06:08:27 2012 Received: (at submit) by debbugs.gnu.org; 17 Apr 2012 10:08:27 +0000 Received: from localhost ([127.0.0.1]:37792 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SK5Kj-0007Pe-OG for submit@debbugs.gnu.org; Tue, 17 Apr 2012 06:08:26 -0400 Received: from eggs.gnu.org ([208.118.235.92]:46533) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SK5Kh-0007PQ-Hz for submit@debbugs.gnu.org; Tue, 17 Apr 2012 06:08:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SK5KT-0007h4-P0 for submit@debbugs.gnu.org; Tue, 17 Apr 2012 06:08:11 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=unavailable version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:56078) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SK5KT-0007gz-J9 for submit@debbugs.gnu.org; Tue, 17 Apr 2012 06:08:09 -0400 Received: from eggs.gnu.org ([208.118.235.92]:34763) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SK5KO-0003pZ-80 for bug-guile@gnu.org; Tue, 17 Apr 2012 06:08:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SK5KJ-0007dg-Fu for bug-guile@gnu.org; Tue, 17 Apr 2012 06:08:03 -0400 Received: from mail-iy0-f169.google.com ([209.85.210.169]:37788) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SK5KJ-0007cc-8d for bug-guile@gnu.org; Tue, 17 Apr 2012 06:07:59 -0400 Received: by iajr24 with SMTP id r24so10821672iaj.0 for ; Tue, 17 Apr 2012 03:07:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=bfKs8uPpfblv7K+owAFG10kCEaF3s5hi+AvNvUSqmgM=; b=rofEOh3OZur3YymKBooN3RoALzz8ztG01rncBl08hFQmbsSEZ5dE64InwjpSI4kQ2u u+nQNV4qn3EQgxhAntqntibH9mAwk/VTaUilDOA2OT+xR/f0AwRRiytl1mrcVWR4Jb13 rJEgVddDNEH/TZkczhqHR1H0XH9YT42HIHDajEOdk8YUl1V/si2yu9tOcMowbKlPMXtq MgpD0G5aHRHtF1K/HUe7HFFu1aENwC8+OMbMhQpJOzNJQDXwvBQajtvktBtW//Sh0pcW HcAsGVXtcJnwzPtF2H1MErykefWxSxDk5yh++LqhAp9sgO3wbkurTQJO1A7Q1k0a8nfr LO3A== MIME-Version: 1.0 Received: by 10.50.160.225 with SMTP id xn1mr8555660igb.3.1334657276790; Tue, 17 Apr 2012 03:07:56 -0700 (PDT) Received: by 10.231.136.74 with HTTP; Tue, 17 Apr 2012 03:07:56 -0700 (PDT) Date: Tue, 17 Apr 2012 12:07:56 +0200 Message-ID: Subject: help text fro sorted? predicate is wrong/misleading. From: Alexei Matveev To: bug-guile@gnu.org Content-Type: text/plain; charset=ISO-8859-1 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 208.118.235.17 X-Spam-Score: -6.1 (------) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.1 (------) Hi, Guilers, I seem to have almost convinced at least one another person that the docstring of sorted? predicate is at least misleading: guile> (sorted? '(0 0) <) #t guile> (help sorted?) `sorted?' is a primitive procedure in the (guile) module. -- Scheme Procedure: sorted? items less Return `#t' iff ITEMS is a list or a vector such that for all 1 <= i <= m, the predicate LESS returns true when applied to all elements i - 1 and i My suggestion for the docstring is below (feel free to improve my broken english). Alexei diff --git a/libguile/sort.c b/libguile/sort.c index ecadd82..b71d101 100644 --- a/libguile/sort.c +++ b/libguile/sort.c @@ -101,9 +101,10 @@ SCM_DEFINE (scm_restricted_vector_sort_x, "restricted-vector-sort!", 4, 0, 0, * (not (less? (list-ref list i) (list-ref list (- i 1)))). */ SCM_DEFINE (scm_sorted_p, "sorted?", 2, 0, 0, (SCM items, SCM less), - "Return @code{#t} iff @var{items} is a list or a vector such that\n" - "for all 1 <= i <= m, the predicate @var{less} returns true when\n" - "applied to all elements i - 1 and i") + "Return @code{#t} iff @var{items} is a list or a vector such\n" + "that for all 1 <= i <= m, the predicate @var{less} returns\n" + "@code{#f} when comparing element i to the preceeding element\n" + "i - 1.") #define FUNC_NAME s_scm_sorted_p { long len, j; /* list/vector length, temp j */ From debbugs-submit-bounces@debbugs.gnu.org Wed Apr 18 21:14:35 2012 Received: (at 11262) by debbugs.gnu.org; 19 Apr 2012 01:14:35 +0000 Received: from localhost ([127.0.0.1]:40625 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SKfxD-0004f9-2c for submit@debbugs.gnu.org; Wed, 18 Apr 2012 21:14:35 -0400 Received: from mail-iy0-f172.google.com ([209.85.210.172]:50321) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SKfxA-0004ev-Du for 11262@debbugs.gnu.org; Wed, 18 Apr 2012 21:14:33 -0400 Received: by iazz13 with SMTP id z13so10562153iaz.3 for <11262@debbugs.gnu.org>; Wed, 18 Apr 2012 18:14:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=aoLsqacX5oLtwlEnkLUcfmuNliqy9ksLXKr1dQdZAt0=; b=yzJdOV1SEZbX5zaF6HXGKgVXeBiZ36ATmJgCa0V03uLOOeurlfIsVg3TiohgJ+JkCT 1ZNmGbeOHk11l7qLeLMnEWXYmlK1VLdnkaN6m919c+m0Z42ltRW7Y27Hl8hs6uUSxJPM +r91sS6G0K6Wr93knrFImonjKaOtvb9QxriuI705Y0HwzZKNbs6egha3unKTl31kTJO1 sSrKz+wVLYKIYCBGVIZWDHShEQbApfDttMIqnqIVssowQTQ3a3ZaoGfzV+DaqTTeKJLF X8I244oBc6f67QAgGhZael6HsiC6C9lksyFfjmN5rV9dayNf8aFNIt25b6GXsSqdCLL0 xSuQ== MIME-Version: 1.0 Received: by 10.50.156.170 with SMTP id wf10mr108800igb.7.1334798050615; Wed, 18 Apr 2012 18:14:10 -0700 (PDT) Received: by 10.42.29.200 with HTTP; Wed, 18 Apr 2012 18:14:10 -0700 (PDT) In-Reply-To: References: Date: Wed, 18 Apr 2012 21:14:10 -0400 X-Google-Sender-Auth: 3SFp2SCFKpvO1gq5IP94e20oj4E Message-ID: Subject: Re: bug#11262: help text fro sorted? predicate is wrong/misleading. From: Noah Lavine To: Alexei Matveev Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 11262 Cc: 11262@debbugs.gnu.org, guile-devel X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.3 (--) It looks like you're right, and strangely enough there's a comment in sort.c right above the definition of sorted? that has the correct documentation. I hope other people will correct me if I'm wrong, but I believe the ideal thing for you to do now is submit a patch created with git format-patch. That way you can write a git log entry, and your name will be associated with the patch. You can see other recent log entries for the standard guile format. If you don't want to do this, I can do it for you, but I think it's nicer if you are listed as the author since you did the work. Thank you very much for reporting this, Noah On Tue, Apr 17, 2012 at 6:07 AM, Alexei Matveev wrote: > Hi, Guilers, > > I seem to have almost convinced at least one another person that > the docstring of sorted? predicate is at least misleading: > > guile> (sorted? '(0 0) <) > #t > > guile> (help sorted?) > `sorted?' is a primitive procedure in the (guile) module. > > =A0-- Scheme Procedure: sorted? items less > =A0 =A0 Return `#t' iff ITEMS is a list or a vector such that for all 1 <= =3D > =A0 =A0 i <=3D m, the predicate LESS returns true when applied to all > =A0 =A0 elements i - 1 and i > > My suggestion for the docstring is below (feel free to improve my broken > english). > > Alexei > > diff --git a/libguile/sort.c b/libguile/sort.c > index ecadd82..b71d101 100644 > --- a/libguile/sort.c > +++ b/libguile/sort.c > @@ -101,9 +101,10 @@ SCM_DEFINE (scm_restricted_vector_sort_x, > "restricted-vector-sort!", 4, 0, 0, > =A0* (not (less? (list-ref list i) (list-ref list (- i 1)))). */ > =A0SCM_DEFINE (scm_sorted_p, "sorted?", 2, 0, 0, > =A0 =A0 =A0 =A0 =A0 =A0 (SCM items, SCM less), > - =A0 =A0 =A0 =A0 =A0 "Return @code{#t} iff @var{items} is a list or a ve= ctor such that\n" > - =A0 =A0 =A0 =A0 =A0 "for all 1 <=3D i <=3D m, the predicate @var{less} = returns true when\n" > - =A0 =A0 =A0 =A0 =A0 "applied to all elements i - 1 and i") > + =A0 =A0 =A0 =A0 =A0 "Return @code{#t} iff @var{items} is =A0a list or a= vector such\n" > + =A0 =A0 =A0 =A0 =A0 "that for all =A01 <=3D i <=3D m, =A0the predicate = @var{less} returns\n" > + =A0 =A0 =A0 =A0 =A0 "@code{#f} when comparing element i to the preceedi= ng element\n" > + =A0 =A0 =A0 =A0 =A0 "i - 1.") > =A0#define FUNC_NAME s_scm_sorted_p > =A0{ > =A0 long len, j; =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 /* list/vector length, t= emp j */ > > > From debbugs-submit-bounces@debbugs.gnu.org Fri Apr 20 06:21:02 2012 Received: (at 11262) by debbugs.gnu.org; 20 Apr 2012 10:21:02 +0000 Received: from localhost ([127.0.0.1]:43609 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SLAxa-0002oW-Dx for submit@debbugs.gnu.org; Fri, 20 Apr 2012 06:21:02 -0400 Received: from mail-lpp01m010-f44.google.com ([209.85.215.44]:38287) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SLAxZ-0002o9-3p for 11262@debbugs.gnu.org; Fri, 20 Apr 2012 06:21:02 -0400 Received: by lagj5 with SMTP id j5so6419376lag.3 for <11262@debbugs.gnu.org>; Fri, 20 Apr 2012 03:20:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=parlQG8pwX5dIVLohdI2fY1ZShjBK1ez/uvovUxT6us=; b=NixcmwvLG8DmBpG4/JlY2rl460SIiup0abH8JdOZPTyVh7mDJJUzC6A5ulACiHZUPM OnNFl36974TfN7vPZxUqjueIZ2jc/Rvr2hQyrj2D6WaQofZh9gC2VJwQOXIKJTnChXGf dMHY+wLYMes9XY6ZpIRy5b5c/BZcuVKfiPclsPP8nU7jE78b62vmuq+kfC1Jw3S1QtRi uusSiFJZHwGjrFo243mj0wDb5USjSQgL8uMbWsTHwKS4L6KxtLgsK17wpSWS7Qt2sduZ cy04CjcSOHkUwjq7w9QrWKIWyCafyFjKBvWBdoUb9IHOCgIXTp3PMV6wyPFfJrBUmHBT ZYcw== MIME-Version: 1.0 Received: by 10.152.105.241 with SMTP id gp17mr5725972lab.21.1334917229897; Fri, 20 Apr 2012 03:20:29 -0700 (PDT) Received: by 10.112.56.138 with HTTP; Fri, 20 Apr 2012 03:20:29 -0700 (PDT) In-Reply-To: References: Date: Fri, 20 Apr 2012 12:20:29 +0200 Message-ID: Subject: Re: bug#11262: help text fro sorted? predicate is wrong/misleading. From: Alexei Matveev To: Noah Lavine Content-Type: multipart/mixed; boundary=f46d0407152b4ae75e04be19a3c5 X-Spam-Score: -2.6 (--) X-Debbugs-Envelope-To: 11262 Cc: 11262@debbugs.gnu.org, guile-devel X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) --f46d0407152b4ae75e04be19a3c5 Content-Type: text/plain; charset=ISO-8859-1 Hi, Noah, Hi Guilers, On Thu, Apr 19, 2012 at 3:14 AM, Noah Lavine wrote: > It looks like you're right, and strangely enough there's a comment in > sort.c right above the definition of sorted? that has the correct > documentation. Yes, that added me some confidence. > I hope other people will correct me if I'm wrong, but I believe the > ideal thing for you to do now is submit a patch created with git > format-patch. Attachment contains a patch created by "git format-patch origin". The patch does exactly the same as the diff sent earlier. Alexei --f46d0407152b4ae75e04be19a3c5 Content-Type: application/octet-stream; name="0001-Reformulate-misleading-output-of-help-sorted.patch" Content-Disposition: attachment; filename="0001-Reformulate-misleading-output-of-help-sorted.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: f_h19344qt0 RnJvbSAzYmE1NzFiMzUwMzFhYWZmMDc0ZDdkNjM0ZTU5YTJhODY5ZmEyMzM5IE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBBbGV4ZWkgTWF0dmVldiA8bWF0dmVldkB0aGVvY2hlbS50dS1t dWVuY2hlbi5kZT4KRGF0ZTogRnJpLCAyMCBBcHIgMjAxMiAxMjowNjo1MiArMDIwMApTdWJqZWN0 OiBbUEFUQ0hdIFJlZm9ybXVsYXRlIG1pc2xlYWRpbmcgb3V0cHV0IG9mIChoZWxwIHNvcnRlZD8p LgoKRml4ZXMgPGh0dHA6Ly9idWdzLmdudS5vcmcvMTEyNjI+LgoKKiBsaWJndWlsZS9zb3J0LmMg KHNjbV9zb3J0ZWRfcCk6IGNoYW5nZWQgc3RyaW5ncyBvbmx5Ci0tLQogbGliZ3VpbGUvc29ydC5j IHwgICAgNyArKysrLS0tCiAxIGZpbGVzIGNoYW5nZWQsIDQgaW5zZXJ0aW9ucygrKSwgMyBkZWxl dGlvbnMoLSkKCmRpZmYgLS1naXQgYS9saWJndWlsZS9zb3J0LmMgYi9saWJndWlsZS9zb3J0LmMK aW5kZXggZWNhZGQ4Mi4uYjcxZDEwMSAxMDA2NDQKLS0tIGEvbGliZ3VpbGUvc29ydC5jCisrKyBi L2xpYmd1aWxlL3NvcnQuYwpAQCAtMTAxLDkgKzEwMSwxMCBAQCBTQ01fREVGSU5FIChzY21fcmVz dHJpY3RlZF92ZWN0b3Jfc29ydF94LCAicmVzdHJpY3RlZC12ZWN0b3Itc29ydCEiLCA0LCAwLCAw LAogICogKG5vdCAobGVzcz8gKGxpc3QtcmVmIGxpc3QgaSkgKGxpc3QtcmVmIGxpc3QgKC0gaSAx KSkpKS4gKi8KIFNDTV9ERUZJTkUgKHNjbV9zb3J0ZWRfcCwgInNvcnRlZD8iLCAyLCAwLCAwLAog ICAgICAgICAgICAgKFNDTSBpdGVtcywgU0NNIGxlc3MpLAotCSAgICAiUmV0dXJuIEBjb2RleyN0 fSBpZmYgQHZhcntpdGVtc30gaXMgYSBsaXN0IG9yIGEgdmVjdG9yIHN1Y2ggdGhhdFxuIgotCSAg ICAiZm9yIGFsbCAxIDw9IGkgPD0gbSwgdGhlIHByZWRpY2F0ZSBAdmFye2xlc3N9IHJldHVybnMg dHJ1ZSB3aGVuXG4iCi0JICAgICJhcHBsaWVkIHRvIGFsbCBlbGVtZW50cyBpIC0gMSBhbmQgaSIp CisJICAgICJSZXR1cm4gQGNvZGV7I3R9IGlmZiBAdmFye2l0ZW1zfSBpcyAgYSBsaXN0IG9yIGEg dmVjdG9yIHN1Y2hcbiIKKwkgICAgInRoYXQgZm9yIGFsbCAgMSA8PSBpIDw9IG0sICB0aGUgcHJl ZGljYXRlIEB2YXJ7bGVzc30gcmV0dXJuc1xuIgorCSAgICAiQGNvZGV7I2Z9IHdoZW4gY29tcGFy aW5nIGVsZW1lbnQgaSB0byB0aGUgcHJlY2VlZGluZyBlbGVtZW50XG4iCisJICAgICJpIC0gMS4i KQogI2RlZmluZSBGVU5DX05BTUUgc19zY21fc29ydGVkX3AKIHsKICAgbG9uZyBsZW4sIGo7CQkJ LyogbGlzdC92ZWN0b3IgbGVuZ3RoLCB0ZW1wIGogKi8KLS0gCjEuNS42LjUKCg== --f46d0407152b4ae75e04be19a3c5-- From debbugs-submit-bounces@debbugs.gnu.org Sat Apr 21 19:39:10 2012 Received: (at 11262) by debbugs.gnu.org; 21 Apr 2012 23:39:10 +0000 Received: from localhost ([127.0.0.1]:46160 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SLjtW-0005oD-KH for submit@debbugs.gnu.org; Sat, 21 Apr 2012 19:39:10 -0400 Received: from xanadu.aquilenet.fr ([88.191.123.111]:49058) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SLjtU-0005o6-FP for 11262@debbugs.gnu.org; Sat, 21 Apr 2012 19:39:09 -0400 Received: from localhost (xanadu.aquilenet.fr [127.0.0.1]) by xanadu.aquilenet.fr (Postfix) with ESMTP id 1603911578; Sun, 22 Apr 2012 01:38:35 +0200 (CEST) Received: from xanadu.aquilenet.fr ([127.0.0.1]) by localhost (xanadu.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id xV2v6bySIZDe; Sun, 22 Apr 2012 01:38:35 +0200 (CEST) Received: from pluto (reverse-83.fdn.fr [80.67.176.83]) by xanadu.aquilenet.fr (Postfix) with ESMTPSA id 5B73E11576; Sun, 22 Apr 2012 01:38:34 +0200 (CEST) From: ludo@gnu.org (Ludovic =?iso-8859-1?Q?Court=E8s?=) To: Alexei Matveev Subject: Re: bug#11262: help text fro sorted? predicate is wrong/misleading. References: Date: Sun, 22 Apr 2012 01:38:33 +0200 In-Reply-To: (Alexei Matveev's message of "Fri, 20 Apr 2012 12:20:29 +0200") Message-ID: <87r4vgveo6.fsf@gnu.org> User-Agent: Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.93 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -1.2 (-) X-Debbugs-Envelope-To: 11262 Cc: Noah Lavine , 11262@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.2 (-) Hi Alexei, (Removing Cc: guile-devel.) Thanks for the patch! Alexei Matveev skribis: > --- a/libguile/sort.c > +++ b/libguile/sort.c > @@ -101,9 +101,10 @@ SCM_DEFINE (scm_restricted_vector_sort_x, "restricte= d-vector-sort!", 4, 0, 0, > * (not (less? (list-ref list i) (list-ref list (- i 1)))). */ > SCM_DEFINE (scm_sorted_p, "sorted?", 2, 0, 0, > (SCM items, SCM less), > - "Return @code{#t} iff @var{items} is a list or a vector such that\n" > - "for all 1 <=3D i <=3D m, the predicate @var{less} returns true whe= n\n" > - "applied to all elements i - 1 and i") > + "Return @code{#t} iff @var{items} is a list or a vector such\n" > + "that for all 1 <=3D i <=3D m, the predicate @var{less} returns\n" > + "@code{#f} when comparing element i to the preceeding element\n" > + "i - 1.") How about this: Return @code{#t} iff @var{items} is a list or vector such that, for each element @var{x} and the next element @var{y} of @var{items}, @code{(@var{less} @var{x} @var{y})} returns @code{#f}. This avoids use of =E2=80=98m=E2=80=99, which would need to be defined, and= makes it clear what =E2=80=9Ccomparing element i to the preceeding element=E2=80=9D = means. What do you think? Thanks, Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Sun Apr 22 06:30:30 2012 Received: (at submit) by debbugs.gnu.org; 22 Apr 2012 10:30:30 +0000 Received: from localhost ([127.0.0.1]:46499 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SLu3q-0004Nd-7X for submit@debbugs.gnu.org; Sun, 22 Apr 2012 06:30:30 -0400 Received: from eggs.gnu.org ([208.118.235.92]:58428) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SLu3n-0004NQ-Kf for submit@debbugs.gnu.org; Sun, 22 Apr 2012 06:30:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SLu37-0002Ta-LI for submit@debbugs.gnu.org; Sun, 22 Apr 2012 06:29:46 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:52481) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SLu37-0002T7-I3 for submit@debbugs.gnu.org; Sun, 22 Apr 2012 06:29:45 -0400 Received: from eggs.gnu.org ([208.118.235.92]:48303) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SLu35-00048W-Qa for bug-guile@gnu.org; Sun, 22 Apr 2012 06:29:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SLu33-0002MF-J2 for bug-guile@gnu.org; Sun, 22 Apr 2012 06:29:43 -0400 Received: from plane.gmane.org ([80.91.229.3]:41435) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SLu33-0002Jm-CJ for bug-guile@gnu.org; Sun, 22 Apr 2012 06:29:41 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1SLu2x-0001zn-Fq for bug-guile@gnu.org; Sun, 22 Apr 2012 12:29:35 +0200 Received: from cpc13-rdng21-2-0-cust334.15-3.cable.virginmedia.com ([82.12.149.79]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 22 Apr 2012 12:29:35 +0200 Received: from ian by cpc13-rdng21-2-0-cust334.15-3.cable.virginmedia.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 22 Apr 2012 12:29:35 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: bug-guile@gnu.org From: Ian Hulin Subject: Re: bug#11262: help text fro sorted? predicate is wrong/misleading. Date: Sun, 22 Apr 2012 11:29:23 +0100 Lines: 53 Message-ID: <4F93DD83.3070504@hulin.org.uk> References: <87r4vgveo6.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: cpc13-rdng21-2-0-cust334.15-3.cable.virginmedia.com User-Agent: Mozilla/5.0 (X11; Linux i686; rv:11.0) Gecko/20120329 Thunderbird/11.0.1 In-Reply-To: <87r4vgveo6.fsf@gnu.org> X-Enigmail-Version: 1.4.1 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 208.118.235.17 X-Spam-Score: -6.9 (------) X-Debbugs-Envelope-To: submit Cc: 11262@debbugs.gnu.org, Alexei Matveev X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.9 (------) Hi Ludo, Alexei, Please avoid C-speak in documentation if possible. (See below) On 22/04/12 00:38, Ludovic Courtès wrote: > Hi Alexei, > > (Removing Cc: guile-devel.) > > Thanks for the patch! > > Alexei Matveev skribis: > >> --- a/libguile/sort.c +++ b/libguile/sort.c @@ -101,9 +101,10 @@ >> SCM_DEFINE (scm_restricted_vector_sort_x, >> "restricted-vector-sort!", 4, 0, 0, * (not (less? (list-ref list >> i) (list-ref list (- i 1)))). */ SCM_DEFINE (scm_sorted_p, >> "sorted?", 2, 0, 0, (SCM items, SCM less), - "Return >> @code{#t} iff @var{items} is a list or a vector such that\n" - >> "for all 1 <= i <= m, the predicate @var{less} returns true >> when\n" - "applied to all elements i - 1 and i") + >> "Return @code{#t} iff @var{items} is a list or a vector such\n" >> + "that for all 1 <= i <= m, the predicate @var{less} >> returns\n" + "@code{#f} when comparing element i to the >> preceeding element\n" + "i - 1.") > > How about this: > > Return @code{#t} iff @var{items} is a list or vector such that, for > each element @var{x} and the next element @var{y} of @var{items}, > @code{(@var{less} @var{x} @var{y})} returns @code{#f}. > > This avoids use of ‘m’, which would need to be defined, and makes > it clear what “comparing element i to the preceeding element” > means. > > What do you think? > Please spell out iff, which I presume means "if-and-only-if". The reason is that on first reading it looks ambiguous to old dinosaurs like me who may have experience of programming languages using iff as a token for "if-false" back in the Jurassic period. Or maybe say: Return @code{#t} when @var{items} is a list or vector such that, for each element @var{x} and the next element @var{y} of @var{items}, @code{(@var{less} @var{x} @var{y})} returns @code{#f}. Cheers, Ian Hulin From debbugs-submit-bounces@debbugs.gnu.org Sun Apr 22 06:37:26 2012 Received: (at 11262) by debbugs.gnu.org; 22 Apr 2012 10:37:26 +0000 Received: from localhost ([127.0.0.1]:46519 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SLuAY-0004XS-5d for submit@debbugs.gnu.org; Sun, 22 Apr 2012 06:37:26 -0400 Received: from xanadu.aquilenet.fr ([88.191.123.111]:56286) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SLuAW-0004XL-OE for 11262@debbugs.gnu.org; Sun, 22 Apr 2012 06:37:25 -0400 Received: from localhost (xanadu.aquilenet.fr [127.0.0.1]) by xanadu.aquilenet.fr (Postfix) with ESMTP id B19BB12225; Sun, 22 Apr 2012 12:36:48 +0200 (CEST) Received: from xanadu.aquilenet.fr ([127.0.0.1]) by localhost (xanadu.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id G3qw6FVEgjba; Sun, 22 Apr 2012 12:36:48 +0200 (CEST) Received: from pluto (reverse-83.fdn.fr [80.67.176.83]) by xanadu.aquilenet.fr (Postfix) with ESMTPSA id F12827AF8; Sun, 22 Apr 2012 12:36:47 +0200 (CEST) From: ludo@gnu.org (Ludovic =?iso-8859-1?Q?Court=E8s?=) To: Ian Hulin Subject: Re: bug#11262: help text fro sorted? predicate is wrong/misleading. References: <87r4vgveo6.fsf@gnu.org> <4F93DD83.3070504@hulin.org.uk> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 4 =?iso-8859-1?Q?Flor=E9al?= an 220 de la =?iso-8859-1?Q?R=E9volution?= X-PGP-Key-ID: 0xEA52ECF4 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 83C4 F8E5 10A3 3B4C 5BEA D15D 77DD 95E2 EA52 ECF4 X-OS: x86_64-unknown-linux-gnu Date: Sun, 22 Apr 2012 12:36:47 +0200 In-Reply-To: <4F93DD83.3070504@hulin.org.uk> (Ian Hulin's message of "Sun, 22 Apr 2012 11:29:23 +0100") Message-ID: <871ungrr28.fsf@gnu.org> User-Agent: Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.93 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -1.2 (-) X-Debbugs-Envelope-To: 11262 Cc: 11262@debbugs.gnu.org, Alexei Matveev X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.2 (-) Hi, Ian Hulin skribis: > Please spell out iff, which I presume means "if-and-only-if". I think it=E2=80=99s fine: it=E2=80=99s used consistently in the manual, an= d it=E2=80=99s documented (info "(guile) Typographical Conventions"). Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Sun Apr 22 06:53:53 2012 Received: (at 11262) by debbugs.gnu.org; 22 Apr 2012 10:53:53 +0000 Received: from localhost ([127.0.0.1]:46525 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SLuQT-0004vG-J2 for submit@debbugs.gnu.org; Sun, 22 Apr 2012 06:53:53 -0400 Received: from mail-iy0-f172.google.com ([209.85.210.172]:57408) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SLuQR-0004v4-FD for 11262@debbugs.gnu.org; Sun, 22 Apr 2012 06:53:52 -0400 Received: by iazz13 with SMTP id z13so14470341iaz.3 for <11262@debbugs.gnu.org>; Sun, 22 Apr 2012 03:53:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=gitRlEAfhrBJIFp62YbI+tuRO3YQfZIsoh1HC1yQ9ds=; b=UDdpHDLbMPZQzVoKXEPHO4mbGzbflVwYOA7wkqVv2o6faVIRnczGFskRWmmqETDTow 0NXfy/qAlnuO31PypsTdMCF73rsoDOs5J3roZAzXcUbRs/IPD1835e/w3HOXuXObRM4P bsGeG0pavUmzvMKOt/BwvTE20a60zlbsKEiZ2g/KEM/UUt+Gkbprdjjc1LitxnLrw/aA X6tUw78Z/16C7vCyi0pXWapP8JjJxl6vhzUxHQmV6hkL5GyKk52xGnm0XijxbODasJBD xJt8zIUBXyF3K1JzSZIJrgZmfdZpj9+LUXqEe0OuuYAg5fR+UW6KsSfXc3FUehHsxE5J uAmQ== MIME-Version: 1.0 Received: by 10.50.47.232 with SMTP id g8mr1630806ign.18.1335091990321; Sun, 22 Apr 2012 03:53:10 -0700 (PDT) Received: by 10.231.136.74 with HTTP; Sun, 22 Apr 2012 03:53:10 -0700 (PDT) In-Reply-To: <4F93DD83.3070504@hulin.org.uk> References: <87r4vgveo6.fsf@gnu.org> <4F93DD83.3070504@hulin.org.uk> Date: Sun, 22 Apr 2012 12:53:10 +0200 Message-ID: Subject: Re: bug#11262: help text fro sorted? predicate is wrong/misleading. From: Alexei Matveev To: =?ISO-8859-1?Q?Ludovic_Court=E8s?= Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.6 (--) X-Debbugs-Envelope-To: 11262 Cc: Ian Hulin , Noah Lavine , 11262@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) >> How about this: >> >> Return @code{#t} iff @var{items} is a list or vector such that, for >> each element @var{x} and the next element @var{y} of @var{items}, >> @code{(@var{less} @var{x} @var{y})} returns @code{#f}. >> >> This avoids use of =91m=92, which would need to be defined, and makes >> it clear what =93comparing element i to the preceeding element=94 >> means. Yes, "m" should not be mentioned. But I think you got it backwards again: Return @code{#t} iff @var{items} is a list or vector such that, for each element @var{x} and the next element @var{y} of @var{items}, @code{(@var{less} @var{y} @var{x})} returns @code{#f}. Note the order of x and y in (less? y x) in the last line. Alexei From debbugs-submit-bounces@debbugs.gnu.org Sun Apr 22 08:54:40 2012 Received: (at 11262-done) by debbugs.gnu.org; 22 Apr 2012 12:54:41 +0000 Received: from localhost ([127.0.0.1]:46574 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SLwJM-0008OE-Nj for submit@debbugs.gnu.org; Sun, 22 Apr 2012 08:54:40 -0400 Received: from xanadu.aquilenet.fr ([88.191.123.111]:60880) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SLwJJ-0008O3-61 for 11262-done@debbugs.gnu.org; Sun, 22 Apr 2012 08:54:38 -0400 Received: from localhost (xanadu.aquilenet.fr [127.0.0.1]) by xanadu.aquilenet.fr (Postfix) with ESMTP id A1D627D91; Sun, 22 Apr 2012 14:53:58 +0200 (CEST) Received: from xanadu.aquilenet.fr ([127.0.0.1]) by localhost (xanadu.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id rBGX0PB2SZHz; Sun, 22 Apr 2012 14:53:58 +0200 (CEST) Received: from pluto (reverse-83.fdn.fr [80.67.176.83]) by xanadu.aquilenet.fr (Postfix) with ESMTPSA id B56F27D33; Sun, 22 Apr 2012 14:53:57 +0200 (CEST) From: ludo@gnu.org (Ludovic =?iso-8859-1?Q?Court=E8s?=) To: Alexei Matveev Subject: Re: bug#11262: help text fro sorted? predicate is wrong/misleading. References: <87r4vgveo6.fsf@gnu.org> <4F93DD83.3070504@hulin.org.uk> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 4 =?iso-8859-1?Q?Flor=E9al?= an 220 de la =?iso-8859-1?Q?R=E9volution?= X-PGP-Key-ID: 0xEA52ECF4 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 83C4 F8E5 10A3 3B4C 5BEA D15D 77DD 95E2 EA52 ECF4 X-OS: x86_64-unknown-linux-gnu Date: Sun, 22 Apr 2012 14:53:56 +0200 In-Reply-To: (Alexei Matveev's message of "Sun, 22 Apr 2012 12:53:10 +0200") Message-ID: <87k418q657.fsf@gnu.org> User-Agent: Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.93 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -1.2 (-) X-Debbugs-Envelope-To: 11262-done Cc: Ian Hulin , Noah Lavine , 11262-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.2 (-) Hi Alexei, Alexei Matveev skribis: >>> How about this: >>> >>> Return @code{#t} iff @var{items} is a list or vector such that, for >>> each element @var{x} and the next element @var{y} of @var{items}, >>> @code{(@var{less} @var{x} @var{y})} returns @code{#f}. >>> >>> This avoids use of =E2=80=98m=E2=80=99, which would need to be defined,= and makes >>> it clear what =E2=80=9Ccomparing element i to the preceeding element=E2= =80=9D >>> means. > > Yes, "m" should not be mentioned. But I think you got it backwards again: > > Return @code{#t} iff @var{items} is a list or vector such that, for > each element @var{x} and the next element @var{y} of @var{items}, > @code{(@var{less} @var{y} @var{x})} returns @code{#f}. > > Note the order of x and y in (less? y x) in the last line. Oops, indeed. Pushed in commit fd07759b7d4c9d631090b04855ab81b6a2109e9e. Thanks for the report, patch, and review! Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Thu Apr 26 03:25:21 2012 Received: (at 11262) by debbugs.gnu.org; 26 Apr 2012 07:25:22 +0000 Received: from localhost ([127.0.0.1]:53424 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SNJ4r-0002ZX-1y for submit@debbugs.gnu.org; Thu, 26 Apr 2012 03:25:21 -0400 Received: from smtp.gentoo.org ([140.211.166.183]:33696 ident=user36932) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SNJ4n-0002ZN-4M for 11262@debbugs.gnu.org; Thu, 26 Apr 2012 03:25:19 -0400 Received: from [10.128.2.64] (unknown [79.170.210.172]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: hkbst) by smtp.gentoo.org (Postfix) with ESMTPSA id F0F3A1B4027; Thu, 26 Apr 2012 07:24:15 +0000 (UTC) Message-ID: <4F98F9BD.5080007@gentoo.org> Date: Thu, 26 Apr 2012 09:31:09 +0200 From: Marijn User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:11.0) Gecko/20120410 Thunderbird/11.0.1 MIME-Version: 1.0 To: 11262@debbugs.gnu.org, ludo@gnu.org Subject: Re: bug#11262: help text fro sorted? predicate is wrong/misleading. References: <87r4vgveo6.fsf@gnu.org> <4F93DD83.3070504@hulin.org.uk> <87k418q657.fsf@gnu.org> In-Reply-To: <87k418q657.fsf@gnu.org> X-Enigmail-Version: 1.4 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -6.9 (------) X-Debbugs-Envelope-To: 11262 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.9 (------) -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 22-04-12 14:53, Ludovic Court=C3=A8s wrote: > Hi Alexei, >=20 > Alexei Matveev skribis: >=20 >>>> How about this: >>>>=20 >>>> Return @code{#t} iff @var{items} is a list or vector such >>>> that, for each element @var{x} and the next element @var{y} >>>> of @var{items}, @code{(@var{less} @var{x} @var{y})} returns >>>> @code{#f}. >>>>=20 >>>> This avoids use of =E2=80=98m=E2=80=99, which would need to be defin= ed, and >>>> makes it clear what =E2=80=9Ccomparing element i to the preceeding >>>> element=E2=80=9D means. >>=20 >> Yes, "m" should not be mentioned. But I think you got it >> backwards again: >>=20 >> Return @code{#t} iff @var{items} is a list or vector such that, >> for each element @var{x} and the next element @var{y} of >> @var{items}, @code{(@var{less} @var{y} @var{x})} returns >> @code{#f}. >>=20 >> Note the order of x and y in (less? y x) in the last line. >=20 > Oops, indeed. >=20 > Pushed in commit fd07759b7d4c9d631090b04855ab81b6a2109e9e. >=20 > Thanks for the report, patch, and review! So it seems the rewording was about whether a list like '(2 2) is sorted or not. IIUC the rewording makes it a sorted list according to <, because (not (< 2 2)) is #f. Is that really what is wanted? Marijn -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk+Y+b0ACgkQp/VmCx0OL2zB1wCfZ9Zp5JpJw4frqfpXOnCp2xvM 75kAnjJi/CpmNvh7M9sqQTbFzj7pTniN =3D6xtZ -----END PGP SIGNATURE----- From debbugs-submit-bounces@debbugs.gnu.org Thu Apr 26 22:35:31 2012 Received: (at 11262) by debbugs.gnu.org; 27 Apr 2012 02:35:32 +0000 Received: from localhost ([127.0.0.1]:54870 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SNb1v-00069q-Jw for submit@debbugs.gnu.org; Thu, 26 Apr 2012 22:35:31 -0400 Received: from mail-iy0-f172.google.com ([209.85.210.172]:58454) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SNb1t-00069e-5b for 11262@debbugs.gnu.org; Thu, 26 Apr 2012 22:35:30 -0400 Received: by iazz13 with SMTP id z13so395510iaz.3 for <11262@debbugs.gnu.org>; Thu, 26 Apr 2012 19:34:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=Yd9Qom9gBQTNKhqTf64rE+8hsxzWG1P4W07wYEz0UfQ=; b=OHqSCx4es1V2S91c03FQn1q0pRcih6R5mPPjM6XH/PpgE6PkwT5U+u2A4ViWjBhijH u6od08DKmxklBbFbKR2+orr2nJFkLgdq3ax5ALSVwIgSRT8rfj+tHTumxL2fDpxppwSv RzLaBGQOfU9T0r74Rc54CF9vG+eFl0sw1eYIP5/I10xOaU919YqW8okbcyn5IU+jTGmZ eWXfIdsdZc9UjCl3y2CBjUx2uvLPAEnuTDGC3kSJYnUdZutWnP1y5ryxqQBgoebIFotQ 7ok4rYuV6cgZBPJ6jNLvWe+U+NnIDUn0WPbyU1AK4+Kffei0/jXKXI36ipsB20p5bMKp xDKg== MIME-Version: 1.0 Received: by 10.50.154.169 with SMTP id vp9mr355492igb.71.1335494061596; Thu, 26 Apr 2012 19:34:21 -0700 (PDT) Received: by 10.42.29.200 with HTTP; Thu, 26 Apr 2012 19:34:21 -0700 (PDT) In-Reply-To: <4F98F9BD.5080007@gentoo.org> References: <87r4vgveo6.fsf@gnu.org> <4F93DD83.3070504@hulin.org.uk> <87k418q657.fsf@gnu.org> <4F98F9BD.5080007@gentoo.org> Date: Thu, 26 Apr 2012 22:34:21 -0400 X-Google-Sender-Auth: 11Vd_4U_BP5zfELcdOxhBtNobg8 Message-ID: Subject: Re: bug#11262: help text fro sorted? predicate is wrong/misleading. From: Noah Lavine To: Marijn Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 11262 Cc: ludo@gnu.org, 11262@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.3 (--) Well, I wanted to reply to you by seeing how sorted? was used. But looking at the Guile source code, it appears that there are no uses of sorted? at all! However, I think it needs to stay like it is, because other code may depend on it. Noah On Thu, Apr 26, 2012 at 3:31 AM, Marijn wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > On 22-04-12 14:53, Ludovic Court=E8s wrote: >> Hi Alexei, >> >> Alexei Matveev skribis: >> >>>>> How about this: >>>>> >>>>> Return @code{#t} iff @var{items} is a list or vector such >>>>> that, for each element @var{x} and the next element @var{y} >>>>> of @var{items}, @code{(@var{less} @var{x} @var{y})} returns >>>>> @code{#f}. >>>>> >>>>> This avoids use of =91m=92, which would need to be defined, and >>>>> makes it clear what =93comparing element i to the preceeding >>>>> element=94 means. >>> >>> Yes, "m" should not be mentioned. But I think you got it >>> backwards again: >>> >>> Return @code{#t} iff @var{items} is a list or vector such that, >>> for each element @var{x} and the next element @var{y} of >>> @var{items}, @code{(@var{less} @var{y} @var{x})} returns >>> @code{#f}. >>> >>> Note the order of x and y in (less? y x) in the last line. >> >> Oops, indeed. >> >> Pushed in commit fd07759b7d4c9d631090b04855ab81b6a2109e9e. >> >> Thanks for the report, patch, and review! > > So it seems the rewording was about whether a list like '(2 2) is > sorted or not. IIUC the rewording makes it a sorted list according to > <, because (not (< 2 2)) is #f. > > Is that really what is wanted? > > Marijn > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v2.0.19 (GNU/Linux) > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ > > iEYEARECAAYFAk+Y+b0ACgkQp/VmCx0OL2zB1wCfZ9Zp5JpJw4frqfpXOnCp2xvM > 75kAnjJi/CpmNvh7M9sqQTbFzj7pTniN > =3D6xtZ > -----END PGP SIGNATURE----- > > > From unknown Sat Aug 09 15:19:09 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Fri, 25 May 2012 11:24:03 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator From debbugs-submit-bounces@debbugs.gnu.org Wed Jul 04 15:55:02 2012 Received: (at control) by debbugs.gnu.org; 4 Jul 2012 19:55:02 +0000 Received: from localhost ([127.0.0.1]:48493 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SmVfB-0004cB-KS for submit@debbugs.gnu.org; Wed, 04 Jul 2012 15:55:02 -0400 Received: from a-pb-sasl-sd.pobox.com ([74.115.168.62]:39193 helo=sasl.smtp.pobox.com) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SmVf9-0004c0-9G for control@debbugs.gnu.org; Wed, 04 Jul 2012 15:54:59 -0400 Received: from sasl.smtp.pobox.com (unknown [127.0.0.1]) by b-pb-sasl-sd.pobox.com (Postfix) with ESMTP id 692C7CA20 for ; Wed, 4 Jul 2012 15:50:10 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=from:to :subject:date:message-id:mime-version:content-type; s=sasl; bh=v XQdfg5W8RMHSx9YP1X0WxJsp7g=; b=D4pmp5P5Ca/XFpfko16/P3bwzEFIGkoad 4ZuSl6Za+sM1/jLml394CFQLXk4Zop0z58lCIHZ8ZyrMU/tqXrZJaDH/p0uJQbmt XF5YTkjD0eYFcV8JBRGRAxOgvFRHqraZ/9F0MeaNnfcrtyvnsEgBw925mlns1IeY ronc7GR1CA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=pobox.com; h=from:to:subject :date:message-id:mime-version:content-type; q=dns; s=sasl; b=RKv iCxQI2jtWZehexvAJZOrbkLkuUFATxgdelRwZn0sANzvcR0OJItvNbGoJnDMnC9U dBFVwfug5c/Hm6psNMs8aQVlJwVI5+Qk8s1wwijxEoh2/9huH3ISWzv3bKUcMnUO 82jDYRHrt/Hfv3hO0QkWWuE+ovlt1Fx2XKFG3hrw= Received: from b-pb-sasl-sd. (unknown [127.0.0.1]) by b-pb-sasl-sd.pobox.com (Postfix) with ESMTP id 61249CA1F for ; Wed, 4 Jul 2012 15:50:10 -0400 (EDT) Received: from badger (unknown [89.131.176.233]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by b-pb-sasl-sd.pobox.com (Postfix) with ESMTPSA id CAA0ECA1E for ; Wed, 4 Jul 2012 15:50:09 -0400 (EDT) From: Andy Wingo To: control Subject: unarchive 11262 Date: Wed, 04 Jul 2012 21:50:07 +0200 Message-ID: <87txxn71cg.fsf@pobox.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Pobox-Relay-ID: 7653E630-C611-11E1-B33F-FA6787E41631-02397024!b-pb-sasl-sd.pobox.com X-Spam-Score: -1.9 (-) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) unarchive 11262 -- http://wingolog.org/ From unknown Sat Aug 09 15:19:09 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Thu, 02 Aug 2012 11:24:03 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator