From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Oliver Scholz Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] Unicode Lisp reader escapes Date: Fri, 05 May 2006 14:31:56 +0200 Message-ID: References: <17491.34779.959316.484740@parhasard.net> <87odyfnqcj.fsf-monnier+emacs@gnu.org> <87psiuj8at.fsf-monnier+emacs@gnu.org> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: sea.gmane.org 1146832416 12499 80.91.229.2 (5 May 2006 12:33:36 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 5 May 2006 12:33:36 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri May 05 14:33:36 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1FbzUx-0006Tr-NZ for ged-emacs-devel@m.gmane.org; Fri, 05 May 2006 14:33:32 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FbzUx-00042R-50 for ged-emacs-devel@m.gmane.org; Fri, 05 May 2006 08:33:31 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FbzUg-000408-Kz for emacs-devel@gnu.org; Fri, 05 May 2006 08:33:14 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FbzUf-0003zY-He for emacs-devel@gnu.org; Fri, 05 May 2006 08:33:14 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FbzUf-0003zP-DK for emacs-devel@gnu.org; Fri, 05 May 2006 08:33:13 -0400 Original-Received: from [80.91.229.2] (helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1FbzUo-0000X9-RA for emacs-devel@gnu.org; Fri, 05 May 2006 08:33:23 -0400 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1FbzUW-0006Pf-6c for emacs-devel@gnu.org; Fri, 05 May 2006 14:33:04 +0200 Original-Received: from dslb-084-058-122-176.pools.arcor-ip.net ([84.58.122.176]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 05 May 2006 14:33:04 +0200 Original-Received: from alkibiades by dslb-084-058-122-176.pools.arcor-ip.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 05 May 2006 14:33:04 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-To: emacs-devel@gnu.org Original-Lines: 64 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: dslb-084-058-122-176.pools.arcor-ip.net User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) 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:53945 Archived-At: Eli Zaretskii writes: >> Cc: storm@cua.dk, emacs-devel@gnu.org, alkibiades@gmx.de >> From: Stefan Monnier >> Date: Thu, 04 May 2006 17:40:28 -0400 >> >> >> After all, it's there, it works, and as mentioned: there's no >> >> evidence that the decoding time of \u escapes it ever going to need >> >> to be fast. >> >> > ??? inside the Lisp reader, everything needs to be fast, IMO. >> >> Why? > > Because the Lisp reader is the backbone of the Lisp interpreter. > >> IMO the only things that need to be fast are those things whose >> performance has a visible impact. I see no evidence that there'll ever be >> a case where the speed with which we can read \u escapes will matter. > > You don't need to see an evidence of a collapsing bridge to know that > it must be several times stronger than any imaginable load that could > ever be put on it. > > In other words, not everything is empirical; there's a thing called > ``good engineering practice.'' > > Sorry for being overly didactic, I'm sure you know all that. I'm just > amazed that such a fundamental issue needs evidence. For the sake of peace: my opinion doesn't probably matter much, but personally I believe that the changes necessary for a C implementation of `decode-char' are local enough to be safe. I wouldn't like to change anything in mule.el or utf-8.el---not even a defvar---, but maybe I just could make the necessary symbols available to C in syms_of_lread: Qutf_translate_cjk_mode = intern ("utf-translate-cjk-mode"); staticpro (&Qutf_translate_cjk_mode); [...] Qutf_subst_table_for_decode = intern ("utf-subst-table-for-decode"); staticpro (&Qutf_subst_table_for_decode); Qtranslation_hash_table = intern ("translation-hash-table"); staticpro (&Qutf_subst_table_for_decode); And then access them from my port of `decode-char's core functionality like this: SYMBOL_VALUE (Qutf_translate_cjk_mode) [...] Fget (Qutf_subst_table_for_decode, Qtranslation_hash_table) [Well, in fact I already did in my copy of Emacs.] Oliver -- 16 Floréal an 214 de la Révolution Liberté, Egalité, Fraternité!