From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: documentation of integers, fixnums and bignums Date: Sun, 09 Sep 2018 20:09:13 -0400 Message-ID: References: <0f632217-27ad-4f54-8ce0-480301fa2a86@cs.ucla.edu> <83pnxorm37.fsf@gnu.org> <92915cae-21d5-c365-89f2-3a15fc9114c4@cs.ucla.edu> <7f7411eb-32c8-9ea6-8ead-2aaf603d3901@cs.ucla.edu> <83tvmzqld8.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1536538966 25469 195.159.176.226 (10 Sep 2018 00:22:46 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 10 Sep 2018 00:22:46 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Sep 10 02:22:42 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 1fz9yT-0006Y8-QU for ged-emacs-devel@m.gmane.org; Mon, 10 Sep 2018 02:22:41 +0200 Original-Received: from localhost ([::1]:49147 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fzA0a-0007fp-BQ for ged-emacs-devel@m.gmane.org; Sun, 09 Sep 2018 20:24:52 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:47248) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fz9yX-0005PK-JG for emacs-devel@gnu.org; Sun, 09 Sep 2018 20:22:47 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fz9lc-00080l-DC for emacs-devel@gnu.org; Sun, 09 Sep 2018 20:09:27 -0400 Original-Received: from [195.159.176.226] (port=51739 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fz9lc-0007zf-5v for emacs-devel@gnu.org; Sun, 09 Sep 2018 20:09:24 -0400 Original-Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1fz9jR-0008NA-Gb for emacs-devel@gnu.org; Mon, 10 Sep 2018 02:07:09 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 15 Original-X-Complaints-To: usenet@blaine.gmane.org Cancel-Lock: sha1:32BX/sD1suPe/wg1qXfQHvCcOFU= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 195.159.176.226 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:229582 Archived-At: > And indeed, etc/charsets/gb108304.map clearly shows codepoints like > 0x81308130, which will overflow the 32-bit most-positive-fixnum. > (These codepoints are just a concatenation of the 4 bytes of the GB > 10830 encoding, see https://en.wikipedia.org/wiki/GB_18030). Aha! Thanks. This deserves a comment in the code. According to Wikipedia, GB-10830 has a max of ~1.5M codepoints (of the 4 bytes, the first and third are >128 and the second and fourth span [30..39]), so we could fit them all into our fixnums just fine, but we'd need to change the way we turn the 4byte sequence into a codepoint in order to do that (I doubt the benefit would be worth the trouble). Stefan