From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lf1-x129.google.com (mail-lf1-x129.google.com [IPv6:2a00:1450:4864:20::129]) by sourceware.org (Postfix) with ESMTPS id 469A1385701E for ; Thu, 4 Feb 2021 23:41:53 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 469A1385701E Received: by mail-lf1-x129.google.com with SMTP id f1so7249845lfu.3 for ; Thu, 04 Feb 2021 15:41:53 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=LBhTDV1R7bSRS3DLtuTais40W/7o2Y91z8F4hFQv//o=; b=Yi16MnBwzFnmzmiXaFWfGhbGPI7/p5N324xC5XH/npjgYseY2Euv99powh3CLGDfcb ze0RjGbsqtO2CffXTKgrtlOwAQs8X7/BmwgvEx7s2mRf8TyJx8BCiv7XKHlDhRn9O9io gbUQuHM+jiAuEUNQDwE+cj2wZtzO+ztVQSJCpGaPyH/zWnUwGGJFnCEiZLuMjQiMelZj 4SGMovObX+fUBQ+0L19TRzRSrDyvtui4hCnjFmLomzjRYlloglbgd21rK0peW91zd+8l xhLhyAyprXd1L/1UWlAgmR97ZNrKa1R4WS61LDDRqXVETi+o1vvxPNG439s/hUJwEIQZ A0hw== X-Gm-Message-State: AOAM532liL35O40nxIomcybkXk1AfcwaKgmSZ2GeLfEfchLQMAN+LIz9 19dWaT8X9GBfKQvuXWqJQgPi/mOxa9hluYfjIlBNXPuteKI= X-Google-Smtp-Source: ABdhPJy23pRb9GUW7fLqwDvbta0SQJWrx8E5QsqPuKtwRa4uBPtRdq0a3TZfUhOUH/kYmTVbWITpLKmDiEw4uXcijdE= X-Received: by 2002:a05:6512:21c1:: with SMTP id d1mr1019068lft.130.1612482111988; Thu, 04 Feb 2021 15:41:51 -0800 (PST) MIME-Version: 1.0 References: <16367.1612474498@localhost> In-Reply-To: <16367.1612474498@localhost> From: Charles Date: Thu, 4 Feb 2021 23:41:36 +0000 Message-ID: Subject: Re: Q about format's behavior with ~R directive To: Sudarshan S Chawathe Cc: Kawa mailing list X-Spam-Status: No, score=-2.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, HTML_MESSAGE, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: kawa@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Kawa mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Feb 2021 23:41:54 -0000 Hi, On Thu, Feb 4, 2021 at 10:33 PM Sudarshan S Chawathe wrote: > With the code > > (format #t "~R~%" 100) > > I get > > hundred > > but with the Common Lisp equivalent (I think) > > (format t "~R~%" 100) > > in SBCL I get instead > > one hundred > > I am unsure of how tightly specified any of this is, but to me the SBCL > output makes more sense. Is this expected, allowed, by design, a > bug, or something else? There isn't a specification to my knowledge on the specific language used to count the numbers, although in this case Kawa is an oddity. I attached a patch to fix that. The testsuite errors for me from a fresh git clone and it's been a while since I've contributed, so I don't know if it breaks in other areas aside from the obvious formatting cases. > > > A related question: Is it correct that Kawa uses SLIB's test file for > format (formatst.scm in testsuite) but not SLIB's implementation of > format? > > I don't know, but I would guess it's another under specified area, for the the english number formatting in particular, // Inspired by the Slib version, which is inspired // by Bruno Haible's CLisp function format-small-cardinal. -- Kind regards, Charles.