From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Ken Raeburn Newsgroups: gmane.emacs.devel Subject: Re: Making 'eq' == 'eql' in bignum branch Date: Tue, 28 Aug 2018 03:34:35 -0400 Message-ID: <0F8F6E54-176C-48EE-9E7C-7CAC424D0D55@raeburn.org> 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 (Mac OS X Mail 11.5 \(3445.9.1\)) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1535441577 1657 195.159.176.226 (28 Aug 2018 07:32:57 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 28 Aug 2018 07:32:57 +0000 (UTC) Cc: larsi@gnus.org, cpitclaudel@gmail.com, emacs-devel@gnu.org To: Pip Cet Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Aug 28 09:32: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 1fuYUd-0000EJ-Lk for ged-emacs-devel@m.gmane.org; Tue, 28 Aug 2018 09:32:51 +0200 Original-Received: from localhost ([::1]:36752 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fuYWk-00084g-2q for ged-emacs-devel@m.gmane.org; Tue, 28 Aug 2018 03:35:02 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:45557) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fuYWS-00081Z-La for emacs-devel@gnu.org; Tue, 28 Aug 2018 03:34:48 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fuYWO-0001AJ-2K for emacs-devel@gnu.org; Tue, 28 Aug 2018 03:34:44 -0400 Original-Received: from mail-yw1-xc43.google.com ([2607:f8b0:4864:20::c43]:37759) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fuYWN-0001A3-Ql for emacs-devel@gnu.org; Tue, 28 Aug 2018 03:34:39 -0400 Original-Received: by mail-yw1-xc43.google.com with SMTP id x83-v6so230596ywd.4 for ; Tue, 28 Aug 2018 00:34:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raeburn-org.20150623.gappssmtp.com; s=20150623; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=MYjHYpWbqbi6bzNdd9gIZW9x+5ZQJxNbceLBhjCjqNI=; b=Lo348xnlid3l4jl0hRaAZUyAqRRdhjX0bVCeQsqylIoVHF2okOksMmmPP8ebTORs87 //cfaaoWMDVelhyeFfRXEu5rqoOU7klImXi5VBnWnFYmPniOE8wbn79/HLj+b9KLe226 CRksIHYorj+ybpZPGZDPkaQl8MX8cnZuHzmtdOsA6O2Vn6VVsZZLn8FqXIIHEXUpmYeY q+Y8Ai4NYVdb5Voly8aXpOWuvy3IpqIdg/DiGbOO5GKqCro5tOJFb0cpuXEMUGJaAQSU DTG5xuFH1Drdo4osL6FCxUfYcjTzbuZ2GttTNBdBVFGISubkAMXgV/Ogxfa8OUr3NOH+ SOnQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=MYjHYpWbqbi6bzNdd9gIZW9x+5ZQJxNbceLBhjCjqNI=; b=t1K8IpWwrvJrsEptAX828aJJsONNM3ZYQqn/trW9Tg3BJT8TbIFs7PDaLSXZVs4Y5N Ix3oiZ+VAjwhoaLf15LKX9lDE8S2LACPyzlRX9IV0Zv/NGQUrsKU8hqS5vpHY/VDQtF4 hbYKYU8sHp7QDTd/yfeBNqfpQTHKA9nW/JNxyGQ1MLxINMqE9X2Y67eHyunuQCs4X4NI ku9QxkcONpvW0LDbMkr+sX/vmN8+B/GBRrRluqjm8CE9WcM1sQkXjhuyTTYNN7VomBeo B9jqJ5+vhR2upl+fnvh9mpaxmAVqE6VTo6x+Kr2DuYFN1aEL4avDsLBcN/IdqpiB/SEy Hw1w== X-Gm-Message-State: APzg51BWcGiKFtNofSkM7yHQTYlRE3eUaCoTtUR96f+L52vpfnCzcNpY L0mc8KovpJtBqrl7d/ZtQYZ9CA== X-Google-Smtp-Source: ANB0VdbGIj2kEY54UmstXdzO097n/haLxzJQBYi3s43uYjBPLRaMwj2WKQuKCerMIM1hSThT1hXcRQ== X-Received: by 2002:a81:5957:: with SMTP id n84-v6mr147253ywb.354.1535441678729; Tue, 28 Aug 2018 00:34:38 -0700 (PDT) Original-Received: from [192.168.23.135] (c-73-253-167-23.hsd1.ma.comcast.net. [73.253.167.23]) by smtp.gmail.com with ESMTPSA id f82-v6sm141890ywf.58.2018.08.28.00.34.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 28 Aug 2018 00:34:37 -0700 (PDT) In-Reply-To: X-Mailer: Apple Mail (2.3445.9.1) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::c43 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:229002 Archived-At: On Aug 27, 2018, at 22:25, Pip Cet wrote: >=20 > On Tue, Aug 28, 2018 at 1:50 AM Lars Ingebrigtsen = wrote: >> 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. >=20 > How about making (min) =3D 1.0e+INF and (max) =3D -1.0e+INF? That = would be > easier to type, and it's mathematically correct. We could even > optimize it in the bytecode compiler. That=E2=80=99s great if you=E2=80=99re applying max or min to a = possibly-empty collection of values. But if you=E2=80=99ve got a loop = where you=E2=80=99re tracking a minimum/maximum value along with doing = other stuff (possibly including computing the values you=E2=80=99re = looking for the minimum of), this may not help much. If =E2=80=9C1.0e+INF=E2=80=9D is hard to remember, how about defining = symbols =E2=80=9C+inifinity=E2=80=9D and =E2=80=9C-inifinity=E2=80=9D = (and if you want to get fancy with the Unicode, +=E2=88=9E and -=E2=88=9E)= with the appropriate numeric values? I kind of like the nil idea too. There=E2=80=99s no reason we couldn=E2=80=99t do some or all of the = above. Only question is, should =E2=80=9C(min nil)=E2=80=9D return nil = or infinity? Ken=