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: Intervals crash Date: Mon, 27 Sep 2010 08:55:25 +0200 Organization: Organization?!? Message-ID: <87fwwvd6aq.fsf@lola.goethe.zz> References: <87aan82uar.fsf@stupidchicken.com> <83bp7ouw2u.fsf@gnu.org> <87bp7n3c19.fsf@uwakimon.sk.tsukuba.ac.jp> <83iq1vtv3y.fsf@gnu.org> <87wrqb1q2b.fsf@uwakimon.sk.tsukuba.ac.jp> <83fwwztq4e.fsf@gnu.org> <87sk0x28pr.fsf@uwakimon.sk.tsukuba.ac.jp> <83y6aprehh.fsf@gnu.org> <87hbhd1wn4.fsf@uwakimon.sk.tsukuba.ac.jp> <83vd5tqxyp.fsf@gnu.org> <87eicg1wl5.fsf@uwakimon.sk.tsukuba.ac.jp> <878w2o1fa3.fsf@catnip.gol.com> <87y6aneqhs.fsf@uwakimon.sk.tsukuba.ac.jp> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1285570565 2482 80.91.229.12 (27 Sep 2010 06:56:05 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 27 Sep 2010 06:56:05 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Sep 27 08:56:04 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 1P07d5-0006Z3-IV for ged-emacs-devel@m.gmane.org; Mon, 27 Sep 2010 08:56:03 +0200 Original-Received: from localhost ([127.0.0.1]:49652 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P07d4-0006tL-Tu for ged-emacs-devel@m.gmane.org; Mon, 27 Sep 2010 02:56:02 -0400 Original-Received: from [140.186.70.92] (port=36630 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P07cn-0006ms-Jx for emacs-devel@gnu.org; Mon, 27 Sep 2010 02:55:46 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1P07cl-0002q6-Rs for emacs-devel@gnu.org; Mon, 27 Sep 2010 02:55:45 -0400 Original-Received: from lo.gmane.org ([80.91.229.12]:58275) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1P07cl-0002pz-Fl for emacs-devel@gnu.org; Mon, 27 Sep 2010 02:55:43 -0400 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1P07cg-0006ST-Nj for emacs-devel@gnu.org; Mon, 27 Sep 2010 08:55:38 +0200 Original-Received: from p508eb907.dip.t-dialin.net ([80.142.185.7]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 27 Sep 2010 08:55:38 +0200 Original-Received: from dak by p508eb907.dip.t-dialin.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 27 Sep 2010 08:55:38 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 50 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: p508eb907.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/24.0.50 (gnu/linux) Cancel-Lock: sha1:P5MH6YM6ssWcyFkklT+ecl1nmUE= 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:130971 Archived-At: "Stephen J. Turnbull" writes: > Miles Bader writes: > > > "unsigned good or evil" is such a hoary old religious issue that > > any unasked-for advocacy is likely to get you lumped in with the > > freaks, simply out of habit on the part of the listener... > > OK. Nevertheless, I find it strange that the *bare fact* that > removing unsigned thoroughly has saved XEmacs users many crashes can > pass without comment (as it has, four times now). Since few people except yourself here have experience with XEmacs, there is not much to comment on. That does not mean that your report went unnoticed. What kind of reply would you want? "That's not relevant since Emacs programmers are smarter than XEmacs programmers" and then you try countering that? A bit hard to pull off given that this thread is about problems with EMACS_UINT in Emacs. Personally, I was surprised that we have EMACS_UINT at all since Emacs integers are, after all, signed, and I would not have much confidence in applications that tried squeezing that bit out for unsigned operations. When programming in assembly language, you have the respective operations and status bits and conditions to pull mixed signedness operations reasonably well. In C, and operations have a fixed sign interpretation for both operands and you don't get access to the combination of carry and overflow status bits that are needed as transitory extra precision for sorting out the ugly cases. When you don't desperately need that extra bit of unsignedness, it is rarely worth getting. It's been somewhat sobering to when first programming with the 68000 (the C compilers started out with 16bit ints) that using _unsigned_ array index variables bloated the code and slowed it down. The indexed addressing modes only knew how to deal with signed offsets. In fact, basically any modern CPU can deal better with sign extension (in particular in addressing modes) than with, uh, unsign extension. So unless you definitely need that extra bit, unsigned is not worth the trouble. For EMACS_UINT, we can safely say we don't need that extra bit since Emacs integers are signed (and smaller in total size) to begin with. Now that's not at all a comment on your practical experiences (like you desired and will not likely get). This is just another theoretic rambling. -- David Kastrup