From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Daniel Colascione Newsgroups: gmane.emacs.devel Subject: Re: Using the GNU GMP Library for Bignums in Emacs Date: Sun, 22 Apr 2018 11:04:38 -0700 Message-ID: <2bd157c4-3fba-c8cb-824c-f091e8d0382d@dancol.org> References: <29f933ac-a6bf-8742-66a7-0a9d6d3e5a88@disroot.org> <83bmecy6fx.fsf@gnu.org> <0d3175d8-d996-651e-b221-71978bde3a65@cs.ucla.edu> <51e619e0-ee38-eb97-6c1d-0925b675290a@disroot.org> <11e32649-6fd3-4f6e-8594-70d418202823@cs.ucla.edu> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: blaine.gmane.org 1524420209 18125 195.159.176.226 (22 Apr 2018 18:03:29 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 22 Apr 2018 18:03:29 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 Cc: eliz@gnu.org, rms@gnu.org, emacs-devel@gnu.org To: Paul Eggert , Philipp Stephani Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Apr 22 20:03:24 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 1fAJKd-0004b8-49 for ged-emacs-devel@m.gmane.org; Sun, 22 Apr 2018 20:03:23 +0200 Original-Received: from localhost ([::1]:48619 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fAJMj-00007U-Tt for ged-emacs-devel@m.gmane.org; Sun, 22 Apr 2018 14:05:33 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51456) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fAJM2-00006j-1D for emacs-devel@gnu.org; Sun, 22 Apr 2018 14:04:50 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fAJLy-00031H-2f for emacs-devel@gnu.org; Sun, 22 Apr 2018 14:04:50 -0400 Original-Received: from dancol.org ([2600:3c01::f03c:91ff:fedf:adf3]:39580) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fAJLx-000308-OA; Sun, 22 Apr 2018 14:04:45 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=dancol.org; s=x; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:MIME-Version:Date:Message-ID:From:References:Cc:To:Subject; bh=6TYKOhwwuVDAF68jbp3s1JFpXsJ2NwHl/Xp/LMpzkMI=; b=Sq9nZ1lCEMqhnR6x4Uj8W4Nfq/lbl3XQuSSWVmDiz/yJZ/eyWstJ+ij6ZxC722OjBzdnPe9XURb7/4leAilT09bJgrCIMfK7K0sFCNuudIwKfM8IltLrpWoQTJv2NCWC7on4YGt5qoeBmtKyLobRu78xVOHYx2vgQr5KKRm/KpA7UExX/ezqK2k4iPtUSg0te2k20AyNFGM6Hlfy8MCbOePdfIShBPnWXrj+wg7arj0diVbbePAgmR5NiS2gHSLoIAG+6QYrwX7SR9qHxn9t3iPoFlRPdb0MIIDaf7V41iht8EPPk3dwBSvYBxd9CIEh7BXiIlENO7f7BM4c1jyFDg==; Original-Received: from [172.92.145.124] (helo=[192.168.86.27]) by dancol.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1fAJLw-0002PI-08; Sun, 22 Apr 2018 11:04:44 -0700 In-Reply-To: <11e32649-6fd3-4f6e-8594-70d418202823@cs.ucla.edu> Content-Language: en-US X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2600:3c01::f03c:91ff:fedf:adf3 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:224790 Archived-At: On 04/22/2018 10:43 AM, Paul Eggert wrote: > Philipp Stephani wrote: >> integers are currently documented to use modular arithmetic ( > > We'll need to change the documentation for modular arithmetic, since > integers will no longer overflow. Bugs will inevitably arise. One possibility is just dealing with them; another might be to predicate bignum support on a lexical-binding-like flag. >> and they are documented to be pure value types, i.e. same-valued integers >> are the same objects. Especially the second property is widely used. > > This property is used only for fixnums now (since bignums do not exist > yet), and we can keep this property for fixnums. We could also keep it > for bignums, by hashing all bignums, though I doubt whether it's worth > the expense. That's a good idea, IMHO. It preserves identity without complicating eq itself.