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: integer overflow Date: Sun, 07 Mar 2010 18:42:45 +0100 Organization: Organization?!? Message-ID: <87tyssxc2y.fsf@lola.goethe.zz> References: <4B8147A9.7030504@gmail.com> <87ljemdzxo.fsf@stupidchicken.com> <4B83682D.5010804@gnu.org> <87vddmpw4s.fsf@stupidchicken.com> <87hbp2fwoi.fsf@gnu.org> <87wrxrr4md.fsf@gnu.org> <3vsk8ecg6a.fsf@fencepost.gnu.org> <873a0euot4.fsf@stupidchicken.com> <873a0cyv3r.fsf@lola.goethe.zz> <87d3zgt5hj.fsf@uwakimon.sk.tsukuba.ac.jp> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1267983941 16745 80.91.229.12 (7 Mar 2010 17:45:41 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 7 Mar 2010 17:45:41 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Mar 07 18:45:36 2010 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1NoKXc-0007CL-45 for ged-emacs-devel@m.gmane.org; Sun, 07 Mar 2010 18:45:24 +0100 Original-Received: from localhost ([127.0.0.1]:37129 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NoKXa-0007Ju-Pu for ged-emacs-devel@m.gmane.org; Sun, 07 Mar 2010 12:45:22 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NoKX9-0007Cg-9w for emacs-devel@gnu.org; Sun, 07 Mar 2010 12:44:55 -0500 Original-Received: from [140.186.70.92] (port=39879 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NoKX8-0007C2-56 for emacs-devel@gnu.org; Sun, 07 Mar 2010 12:44:54 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1NoKX5-0004Gc-9o for emacs-devel@gnu.org; Sun, 07 Mar 2010 12:44:52 -0500 Original-Received: from lo.gmane.org ([80.91.229.12]:60929) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NoKX4-0004GS-Vx for emacs-devel@gnu.org; Sun, 07 Mar 2010 12:44:51 -0500 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1NoKVt-0004S4-Mw for emacs-devel@gnu.org; Sun, 07 Mar 2010 18:43:37 +0100 Original-Received: from p5b2c2a52.dip.t-dialin.net ([91.44.42.82]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 07 Mar 2010 18:43:37 +0100 Original-Received: from dak by p5b2c2a52.dip.t-dialin.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 07 Mar 2010 18:43:37 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 51 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: p5b2c2a52.dip.t-dialin.net X-Face: 2FEFf>]>q>2iw=B6, xrUubRI>pR&Ml9=ao@P@i)L:\urd*t9M~y1^:+Y]'C0~{mAl`oQuAl \!3KEIp?*w`|bL5qr,H)LFO6Q=qx~iH4DN; i"; /yuIsqbLLCh/!U#X[S~(5eZ41to5f%E@'ELIi$t^ Vc\LWP@J5p^rst0+('>Er0=^1{]M9!p?&:\z]|;&=NP3AhB!B_bi^]Pfkw User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.92 (gnu/linux) Cancel-Lock: sha1:50T4ghZbE0YssmthUxbUFJk9gvw= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:121708 Archived-At: "Stephen J. Turnbull" writes: > David Kastrup writes: > > Richard Stallman writes: > > > > > I have heard that Guile now supports Emacs Lisp. And it has bignums. > > > So if we make Emacs use Guile, that will automatically provide > > > bignums. > > > > My first reaction to that would be "Whoa, whoa, whoa!". > > > > The second that "librep" might be an easier starting point for migrating > > the Lisp engine. > > For bignums, XEmacs or SXEmacs might be easier yet. But the "Whoa" factor is lost. > The work of integrating bignums (GNU MP and BSD MP are both supported > as compile-time options) was done by Jerry James. He is probably > *not* available any time soon (his day job just turned into a > day-and-night job) but the pedigree of the code is easily established > and he and other contributors probably would be willing to sign > papers. [...] > However, this is all kind of irrelevant. Using bignums as pure > numbers is relatively easy. The hard part is introducing them as > numerical components of internal Emacs structures (buffer size and > positions, markers, overlays, text properties), and integrating them > with niceties like (system-dependent) large file support, etc. This > is in no way an automatic consequence of language support for bignums. IIRC, this has not been done in the bignum integration of XEmacs and its ilk. So there is not much code worth the taking. Transparent bignums should indeed be easy to do: just check the overflow of integer arithmetic operations and behave accordingly. Arithmetic now catering for float and integer would have to cater for bignums as well. Anyway, I guess that Richard's point more or less was that Emacs' Lisp engine was worth substituting, and that such a radical move might solve unrelated problems as well. bignum support alone indeed should be reasonably straightforward. It should certainly speed up Emacs calc once Emacs calc is cleaned up to use it. -- David Kastrup