From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.devel Subject: Re: Making 'eq' == 'eql' in bignum branch Date: Tue, 28 Aug 2018 03:33:24 +0200 Message-ID: References: <29f933ac-a6bf-8742-66a7-0a9d6d3e5a88@disroot.org> <87lgaio7xd.fsf@tromey.com> <877em1cb0i.fsf@tromey.com> <765767b2-d2e5-a9a6-f724-d58ecf4847bb@cs.ucla.edu> <76081b5d-8c10-0a37-2c97-d4864c0faa80@cs.ucla.edu> <09153aed-361d-4f82-d9ac-b502314769ae@cs.ucla.edu> <83lg91dqd4.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1535420877 21874 195.159.176.226 (28 Aug 2018 01:47:57 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 28 Aug 2018 01:47:57 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: emacs-devel@gnu.org To: =?utf-8?Q?Cl=C3=A9ment?= Pit-Claudel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Aug 28 03:47:52 2018 Return-path: Envelope-to: ged-emacs-devel@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 1fuT6k-0005Xr-Ei for ged-emacs-devel@m.gmane.org; Tue, 28 Aug 2018 03:47:50 +0200 Original-Received: from localhost ([::1]:35842 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fuT8q-0001ig-O7 for ged-emacs-devel@m.gmane.org; Mon, 27 Aug 2018 21:50:00 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46084) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fuT6j-0000bS-6k for emacs-devel@gnu.org; Mon, 27 Aug 2018 21:47:54 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fuSsy-0005GQ-0P for emacs-devel@gnu.org; Mon, 27 Aug 2018 21:33:39 -0400 Original-Received: from hermes.netfonds.no ([80.91.224.195]:36584) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fuSsx-0005Dz-Pn for emacs-devel@gnu.org; Mon, 27 Aug 2018 21:33:35 -0400 Original-Received: from cm-84.212.221.165.getinternet.no ([84.212.221.165] helo=stories) by hermes.netfonds.no with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1fuSsm-0007es-9a; Tue, 28 Aug 2018 03:33:26 +0200 Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAHlBMVEX17/AaExn89/ptfn1T NTwTCA8KAgb++/6ourpnVVgrr8a/AAACNklEQVQ4jZWSQWvcQAyFh1DoXkXsQm5hL0tvpTLEc1wy hc7RB+cX1D4vaWHSm6kLUW5tbGj0b/s0u+tmk1Mf7IL16UkazTh30Nkl/taLbo/x9Yk26QDOnkdv EU+L41QppaXSZpPW6aBddlyuUSidaJcda4DNfwHn3qYX2lmUa7l/YUhfR65d5PrHSweAuIKrx1dA 4OBRXjtERsezfsQe0E2cyMo5dF4ZmLxONkASXT3Jr3T3nllEKnddzdeR/VV6UHkaHtPdm5pHZnZF CJH54Y85ZLhK3ysRFPGu73uaVK/SwKvh6T59m0RC25CBAuCDcwMGGOTBM1dt2xi46fvmnGsUlpp/ fkL0H/gSPWO6wUtl0W4BPWGIMGsI2747ATddWbZli2x8wEQL6Lub1tTkX7MAJPfPAGVg37kHOhD1 fZcBEb2z5hQU8/qw7bIrO4gu9DdRMTE80QfaGkAfKhtCDaJtrLEnFLTmSER2Q1G3SJ8Y8WD9zGHZ 5zUWFlV1Dnu5klqrcoGYRiMYYc6gNNBk4PHD1sUbsPpUthdoivyJcc3jAVCJM2RZJbX+RQZtgdvP 0QPwk905HNdiAOE452L5mTjs6bNILYwmSLKj+MneFVqc63GBGLAICjBaqSLOdsT9uSLOoXhnitfO 9WhDmhDcn0aDY2sgtvCY++6l6hCtQtivAhqPyMm+RkVZdpN5Yu8Wc8BicM0gBtTpQcE21naNjYc3 rbaStqUTYVOYKh/seIpgY1hhr38BXwFlATJIMYkAAAAASUVORK5CYII= In-Reply-To: (=?utf-8?Q?=22Cl=C3=A9ment?= Pit-Claudel"'s message of "Sun, 26 Aug 2018 18:10:13 -0400") X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 80.91.224.195 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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" Xref: news.gmane.org gmane.emacs.devel:228993 Archived-At: Cl=C3=A9ment Pit-Claudel writes: > I usually use 1.0e+INF and -1.0e+INF when I need a neutral element for > min and max respectively, rather than most-positive-fixnum.=20 Hey, nice tip. I hadn't even considered those (well, I didn't know they had a read syntax -- is that new?). And I've already started using them where I would previously have used most-positive-fixnum, like in this code I just found myself typing: (cl-sort films '< :key (lambda (e) (or (getf e :year) 1.0e+INF))) This sorts a list of films by year, and sorts the ones with unknown (nil) years to the end. This would obviously previously have been a problem in the year 2305843009213693951 CE on legacy 64-bit machines, but my code is now future proof. But anyway, as Richard implies, it's a read syntax that's strangely difficult to remember. Would it make sense to have a variable like `positive-infinity' (etc) or `math-positive-infinity'? Or perhaps we'll all start remembering it after seeing it sprinkled throughout the source code after a while. Hm... Probably the latter. --=20 (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no