From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stephan Mueller Newsgroups: gmane.emacs.devel Subject: RE: master 71783e9: Add the string-numeric-lessp function Date: Sun, 21 Feb 2016 06:15:59 +0000 Message-ID: References: <20160221043348.25201.81719@vcs.savannah.gnu.org> <87twl2fzaw.fsf@gnus.org> <87oabafwv5.fsf@gnus.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1456037365 32713 80.91.229.3 (21 Feb 2016 06:49:25 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 21 Feb 2016 06:49:25 +0000 (UTC) To: Lars Ingebrigtsen , "emacs-devel@gnu.org" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Feb 21 07:49:16 2016 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1aXNpT-0007wr-If for ged-emacs-devel@m.gmane.org; Sun, 21 Feb 2016 07:49:15 +0100 Original-Received: from localhost ([::1]:38638 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aXNpS-0003Kr-OA for ged-emacs-devel@m.gmane.org; Sun, 21 Feb 2016 01:49:14 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57940) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aXNpM-0003H2-4k for emacs-devel@gnu.org; Sun, 21 Feb 2016 01:49:12 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aXNpH-0000Ki-Vf for emacs-devel@gnu.org; Sun, 21 Feb 2016 01:49:08 -0500 Original-Received: from mail-bl2on0146.outbound.protection.outlook.com ([65.55.169.146]:14560 helo=na01-bl2-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aXNpH-0000Kd-Kq for emacs-devel@gnu.org; Sun, 21 Feb 2016 01:49:03 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector1; h=From:To:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=muN7uXs+yRUQq+offC0lml3gCKXlSDacqdhNN3Zce9s=; b=d7TxQE0S68+bXU/i1XjryhX9zUA8II0ohw2cWOkLz5ApEFebBuDU6rKOtM47izwMbGzVPjzT5+TmOxBFH8VfxSZEA6jYEDNA/+hPL2Iol46J5NYSxa9ZYa38zdCXrfyWIIXvc30aYJi8oYs0/P22D9z5LhwGnESxae8fchLuncY= Original-Received: from CY1PR0301MB1659.namprd03.prod.outlook.com (10.162.166.145) by CY1PR0301MB1660.namprd03.prod.outlook.com (10.162.166.146) with Microsoft SMTP Server (TLS) id 15.1.409.15; Sun, 21 Feb 2016 06:16:00 +0000 Original-Received: from CY1PR0301MB1659.namprd03.prod.outlook.com ([10.162.166.145]) by CY1PR0301MB1659.namprd03.prod.outlook.com ([10.162.166.145]) with mapi id 15.01.0409.022; Sun, 21 Feb 2016 06:16:00 +0000 Thread-Topic: master 71783e9: Add the string-numeric-lessp function Thread-Index: AQHRbGKirjPZc2zfEk2MC/xkINGh/581+zG3gAAJCGA= Deferred-Delivery: Sun, 21 Feb 2016 06:16:00 +0000 In-Reply-To: <87oabafwv5.fsf@gnus.org> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: gnus.org; dkim=none (message not signed) header.d=none; gnus.org; dmarc=none action=none header.from=microsoft.com; x-originating-ip: [222.153.84.15] x-ms-office365-filtering-correlation-id: 557287c8-433c-44ab-80ce-08d33a867853 x-microsoft-exchange-diagnostics: 1; CY1PR0301MB1660; 5:4BUcblhaKJ2inHV5rRIginbHSu6upji9xWw1iz1An6t16DItJ5vBItCTNd1lhF5ftGTJm7G20RVhyuqzPX68pDDad/Yc0BBnvwFbZSwORL8jbnZCZErh3TrMN1+1dEOJAYtPhFA1bnrS24bRVnjzwQ==; 24:Lr1JRtrm39EmUkjdayNtrAt3kvgBbrp1kDhhT15aSWrmNwpiBcRxcN1C0bhoejryUm2s+zTunncQhe0xk1+dyCEmdc14/T8h8rKC7O3EOww= x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:CY1PR0301MB1660; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(61425038)(601004)(2401047)(5005006)(8121501046)(3002001)(10201501046)(61426038)(61427038); SRVR:CY1PR0301MB1660; BCL:0; PCL:0; RULEID:; SRVR:CY1PR0301MB1660; x-forefront-prvs: 085956473E x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(6009001)(52314003)(51444003)(5004730100002)(50986999)(54356999)(76176999)(86362001)(74316001)(86612001)(92566002)(106116001)(5003600100002)(87936001)(2501003)(586003)(10090500001)(3280700002)(2900100001)(2950100001)(230783001)(2906002)(76576001)(5008740100001)(93886004)(5002640100001)(189998001)(3660700001)(5001770100001)(11100500001)(99286002)(8990500004)(1096002)(1220700001)(3846002)(122556002)(19580405001)(19580395003)(40100003)(33656002)(77096005)(5005710100001)(10400500002)(107886002)(102836003)(66066001)(6116002)(5001960100002)(10290500002); DIR:OUT; SFP:1102; SCL:1; SRVR:CY1PR0301MB1660; H:CY1PR0301MB1659.namprd03.prod.outlook.com; FPR:; SPF:None; MLV:sfv; LANG:en; spamdiagnosticoutput: 1:23 spamdiagnosticmetadata: NSPM X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-originalarrivaltime: 21 Feb 2016 06:16:00.5638 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR0301MB1660 X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 X-Received-From: 65.55.169.146 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:200363 Archived-At: Lars Ingebrigtsen writes: " The code almost got simpler, even. `string-numeric-lessp' now reverts " to calling `string-lessp' if any of the embedded numbers overflow " size_t. I think that should be OK for any real world usages... I mean, " even that could be fixed if we want to be really picky, but I'm not sure " it's worth it. " (The fix would be: If the numerical stretches are of unequal length, " then obviously the shorter one is smaller than the longer. If they're " of equal length, then we can just compare the numerical stretches " lexicographically. So we don't really really need to convert anything " to numbers, anyway...) Given you're in the code anyway, and have the fix worked out, I'd be inclined to make the fix. But the fix might need a fix: what if the longer one starts with zeros? stephan();