From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Kastrup Newsgroups: gmane.emacs.devel Subject: Re: Making --with-wide-int the default Date: Fri, 16 Oct 2015 18:01:04 +0200 Message-ID: <87a8risszj.fsf@fencepost.gnu.org> References: <83h9unukbg.fsf@gnu.org> <54E0DEF8.7020901@dancol> <83egpruiyp.fsf@gnu.org> <54E0FF93.2000104@dancol.org> <5610ED13.1010406@dancol.org> <56117F37.9060808@dancol.org> <83oag087gs.fsf@gnu.org> <83oafz70im.fsf@gnu.org> <5620AF43.4050401@cs.ucla.edu> <8737xbusz1.fsf@fencepost.gnu.org> <22049.7567.599998.682681@turnbull.sk.tsukuba.ac.jp> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1445011291 6656 80.91.229.3 (16 Oct 2015 16:01:31 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 16 Oct 2015 16:01:31 +0000 (UTC) Cc: emacs-devel@gnu.org To: "Stephen J. Turnbull" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Oct 16 18:01:30 2015 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 1Zn7Ri-0007p9-1S for ged-emacs-devel@m.gmane.org; Fri, 16 Oct 2015 18:01:30 +0200 Original-Received: from localhost ([::1]:54704 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zn7Rh-0001F6-94 for ged-emacs-devel@m.gmane.org; Fri, 16 Oct 2015 12:01:29 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34247) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zn7RP-0000wD-Jv for emacs-devel@gnu.org; Fri, 16 Oct 2015 12:01:15 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zn7RJ-0002jD-Lf for emacs-devel@gnu.org; Fri, 16 Oct 2015 12:01:11 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:58824) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zn7RJ-0002j4-JB; Fri, 16 Oct 2015 12:01:05 -0400 Original-Received: from localhost ([127.0.0.1]:44409 helo=lola) by fencepost.gnu.org with esmtp (Exim 4.82) (envelope-from ) id 1Zn7RI-0005x8-TW; Fri, 16 Oct 2015 12:01:05 -0400 Original-Received: by lola (Postfix, from userid 1000) id 4C1EBEBEAB; Fri, 16 Oct 2015 18:01:04 +0200 (CEST) In-Reply-To: <22049.7567.599998.682681@turnbull.sk.tsukuba.ac.jp> (Stephen J. Turnbull's message of "Sat, 17 Oct 2015 00:53:51 +0900") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::e 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:191772 Archived-At: "Stephen J. Turnbull" writes: > David Kastrup writes: > > > Instead of going to 64-bit unilaterally it would seem to make more > > sense to me to degrade gracefully into gmp. GUILE does that, I > > think that XEmacs or SXEmacs can do it, > > XEmacs can't handle greater than 1 GB buffers on a 32-bit machine. > Yes, when bignums are enabled Lisp arithmetic will automatically > overflow to bignums (and bigfloats), but internal accounting for text > objects uses EMACS_INTs, not Lisp integers. At one time there were > several users who preferred XEmacs to Emacs because they were > routinely manipulating 512MB+ buffers and files. > > If you just want big Lisp integers, yes, bignums are nice. > > To be honest, I don't think it's a good idea to use bignums for > internal indexes into text objects. 1 exabyte buffers should be > enough to keep even the full archives of emacs-devel with room to > spare for a while. If a particular application warrants a particular C integral type, you can always use the appropriate conversion routine for extracting it and it will throw an error when the result does not fit the type. That's the way one works with GUILE, and it's perfectly usable. When stuff blows up, it does so with an error message and at the limits of the values that the C code can deal with rather than something like a 30-bit integer. -- David Kastrup