From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: idn.el and confusables.txt Date: Sat, 14 May 2011 23:59:22 +0300 Message-ID: <83y629dmmt.fsf@gnu.org> References: <87y635dll9.fsf@lifelogs.com> <87r58vbj7o.fsf@lifelogs.com> <87fwpba03q.fsf@lifelogs.com> <874o5rqr5z.fsf@lifelogs.com> <87mxjjpal4.fsf@lifelogs.com> <87vcy6nzan.fsf@lifelogs.com> <87tydl4sjj.fsf_-_@lifelogs.com> <87r58pghh7.fsf_-_@lifelogs.com> <83iptdg0yr.fsf@gnu.org> <87y629ien3.fsf@lifelogs.com> <83aaepfiuk.fsf@gnu.org> <87aaepi9k2.fsf@lifelogs.com> <834o4xfd34.fsf@gnu.org> <8739khi54z.fsf@lifelogs.com> Reply-To: Eli Zaretskii NNTP-Posting-Host: lo.gmane.org X-Trace: dough.gmane.org 1305406786 29971 80.91.229.12 (14 May 2011 20:59:46 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 14 May 2011 20:59:46 +0000 (UTC) Cc: emacs-devel@gnu.org To: Ted Zlatanov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat May 14 22:59:39 2011 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1QLLw0-0000Rj-BY for ged-emacs-devel@m.gmane.org; Sat, 14 May 2011 22:59:36 +0200 Original-Received: from localhost ([::1]:52588 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QLLvz-0000Ql-La for ged-emacs-devel@m.gmane.org; Sat, 14 May 2011 16:59:35 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:59321) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QLLvw-0000Qf-E8 for emacs-devel@gnu.org; Sat, 14 May 2011 16:59:33 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QLLvv-00065I-7c for emacs-devel@gnu.org; Sat, 14 May 2011 16:59:32 -0400 Original-Received: from mtaout21.012.net.il ([80.179.55.169]:48760) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QLLvv-00065C-02 for emacs-devel@gnu.org; Sat, 14 May 2011 16:59:31 -0400 Original-Received: from conversion-daemon.a-mtaout21.012.net.il by a-mtaout21.012.net.il (HyperSendmail v2007.08) id <0LL700I00E63OS00@a-mtaout21.012.net.il> for emacs-devel@gnu.org; Sat, 14 May 2011 23:59:30 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([77.124.10.122]) by a-mtaout21.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0LL700IS1EB2ON10@a-mtaout21.012.net.il>; Sat, 14 May 2011 23:59:27 +0300 (IDT) In-reply-to: <8739khi54z.fsf@lifelogs.com> X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: Solaris 10 (beta) X-Received-From: 80.179.55.169 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:139406 Archived-At: > From: Ted Zlatanov > Date: Sat, 14 May 2011 12:06:04 -0500 > > On Sat, 14 May 2011 19:42:39 +0300 Eli Zaretskii wrote: > > EZ> Isn't it better to design the table for efficient use to begin with? > > Yes, and I ask you and the other experts on char-tables to help with > that design. I am far from an expert on that topic. I don't think char-table expertise will help here. The main issue is what uses of this data we envision. > >> But I don't know if markchars.el needs to be terribly fast. > > EZ> I hope we are not introducing another character property for a > EZ> single use. Some use, some day might need to do it fast. > > This is premature optimization. I call it foresight ;-) > I only have a single use in hand. > Let's make sure markchars.el is fast and we can optimize for other uses > when they are needed. No, let's think what uses we envision, and make the data structure convenient for those uses. > Let's say C1, C2, and C3 are confusables mapped to C1. Then the mapping > is C1 -> (C2, C3); C2 -> C1; and C3 -> C1. > > The algorithm is "if a character maps to an atom it's confusable with > it, if it maps to a list the whole lisp is confusable to this > character." Should it be a list or a string? How would you use this mapping? > So to find all the confusables mapped to a character you > need at most two lookups. The RHS of a mapping can be several characters, in which case there's no reverse mapping and no "confusables mapped to a character", I think. > In addition to the character mapping we also need a confusable data > type, which can be SL/SA (single-script) or ML/MA (mixed-script). What would be a possible use of that?