From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Andy Moreton Newsgroups: gmane.emacs.bugs Subject: bug#32252: [PATCH] %o and %x now format signed numbers Date: Wed, 25 Jul 2018 11:08:06 +0100 Message-ID: <86zhyfljax.fsf@gmail.com> References: <83o9ewv68u.fsf@gnu.org> <88033810-6f82-8fab-e64e-7ae948b723e7@cs.ucla.edu> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1532513228 2569 195.159.176.226 (25 Jul 2018 10:07:08 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 25 Jul 2018 10:07:08 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (windows-nt) To: 32252@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Jul 25 12:07:04 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fiGhD-0000Xc-Q1 for geb-bug-gnu-emacs@m.gmane.org; Wed, 25 Jul 2018 12:07:04 +0200 Original-Received: from localhost ([::1]:47528 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fiGjK-0000pF-MT for geb-bug-gnu-emacs@m.gmane.org; Wed, 25 Jul 2018 06:09:14 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:40253) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fiGjB-0000mV-Mv for bug-gnu-emacs@gnu.org; Wed, 25 Jul 2018 06:09:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fiGj8-0007So-Mk for bug-gnu-emacs@gnu.org; Wed, 25 Jul 2018 06:09:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:51182) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fiGj8-0007SR-J8 for bug-gnu-emacs@gnu.org; Wed, 25 Jul 2018 06:09:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1fiGj8-00067d-Df for bug-gnu-emacs@gnu.org; Wed, 25 Jul 2018 06:09:02 -0400 X-Loop: help-debbugs@gnu.org In-Reply-To: <20180723191250.19182-1-eggert@cs.ucla.edu> Resent-From: Andy Moreton Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 25 Jul 2018 10:09:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 32252 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.153251332223506 (code B ref -1); Wed, 25 Jul 2018 10:09:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 25 Jul 2018 10:08:42 +0000 Original-Received: from localhost ([127.0.0.1]:56200 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fiGin-000674-Vf for submit@debbugs.gnu.org; Wed, 25 Jul 2018 06:08:42 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:49211) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fiGim-00066p-0q for submit@debbugs.gnu.org; Wed, 25 Jul 2018 06:08:40 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fiGid-0006WB-Ob for submit@debbugs.gnu.org; Wed, 25 Jul 2018 06:08:34 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:53005) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fiGid-0006Ve-LD for submit@debbugs.gnu.org; Wed, 25 Jul 2018 06:08:31 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:40181) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fiGia-0000ch-EV for bug-gnu-emacs@gnu.org; Wed, 25 Jul 2018 06:08:31 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fiGiX-0006Js-AP for bug-gnu-emacs@gnu.org; Wed, 25 Jul 2018 06:08:28 -0400 Original-Received: from [195.159.176.226] (port=47661 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fiGiX-0006E1-2a for bug-gnu-emacs@gnu.org; Wed, 25 Jul 2018 06:08:25 -0400 Original-Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1fiGgK-00082R-47 for bug-gnu-emacs@gnu.org; Wed, 25 Jul 2018 12:06:08 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 35 Original-X-Complaints-To: usenet@blaine.gmane.org Cancel-Lock: sha1:2F6OLMp6uT8lQt2qnM5PKw+E3pY= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Spam-Score: -4.5 (----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: -5.5 (-----) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:148918 Archived-At: On Tue 24 Jul 2018, Paul Eggert wrote: > Eli Zaretskii wrote: > >> Do we really need to have identical or consistent behavior for fixnums >> and bignums? They are different beasts, so the behavior could be >> different, provided that it makes sense for each of the varieties. > > I don't know what inconsistent behavior would make sense here. There's a > longstanding tradition in Lisp that integer arithmetic just works, and I don't > see why Emacs would want to fight against that tradition here. Although there > may be some low-level functions that distinguish between fixnums and bignums > for efficiency reasons, the vast majority of Lisp functions should not > distinguish them, and 'format' should be one of those functions. >> Maybe we should merge the branch first, let the dust settle and let >> people use the new functionality, then revisit this stuff with more >> experience on our hands. > > This particular patch is not primarily about bignums. It's more about (read > (printf "#x%x" N)) returning N, which is basic functionality that should work > even if we never add bignums. The fact that the patch also will make bignums > easier is just icing on the cake. It makes things more consistent at a cost of incomatibility with long standing behaviour, and of making (format "%x") output useless for humans to read. That is far too high a price for consistency. > Although I understand the concern about the patch, the concern doesn't seem to > be warranted, and any compatibility issues can easily be addressed by setting > binary-as-signed. No. The default value for this option should preserve backward compatible behaviour. AndyM