From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Rusi Newsgroups: gmane.emacs.help Subject: Re: [OFFTOPIC] Re: Invoking a function from a list of functions Date: Wed, 28 Nov 2018 21:37:15 -0800 (PST) Message-ID: <22fbcbc1-66ea-44a7-8948-871d3c3ad3eb@googlegroups.com> References: <67c4a534-d41c-4736-8839-c2dbbdf7f9c2@googlegroups.com> <2da7504a-8bbf-41b9-993e-a7bacd6c97b2@googlegroups.com> <20181116114002.3ba6bcc8dc1e699ba58e08b8@speakeasy.net> <20181119172358.802ce30c54f2fd20f8c300c4@speakeasy.net> <82781d42-afa5-4cb8-9cbd-b20eb73b26d0@googlegroups.com> <83wooxduzz.fsf@gnu.org> <83muptdo7l.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1543469907 2999 195.159.176.226 (29 Nov 2018 05:38:27 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 29 Nov 2018 05:38:27 +0000 (UTC) Injection-Date: Thu, 29 Nov 2018 05:37:16 +0000 User-Agent: G2/1.0 To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Nov 29 06:38:23 2018 Return-path: Envelope-to: geh-help-gnu-emacs@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 1gSF1r-0000hu-MR for geh-help-gnu-emacs@m.gmane.org; Thu, 29 Nov 2018 06:38:23 +0100 Original-Received: from localhost ([::1]:52381 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gSF3x-0001kn-U8 for geh-help-gnu-emacs@m.gmane.org; Thu, 29 Nov 2018 00:40:33 -0500 X-Received: by 2002:a0c:8709:: with SMTP id 9mr100530qvh.6.1543469836484; Wed, 28 Nov 2018 21:37:16 -0800 (PST) X-Received: by 2002:a0c:9ad7:: with SMTP id k23mr2779qvf.2.1543469836270; Wed, 28 Nov 2018 21:37:16 -0800 (PST) Original-Path: usenet.stanford.edu!v55no3024493qtk.0!news-out.google.com!h3ni1164qtk.1!nntp.google.com!v55no3024482qtk.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help In-Reply-To: Complaints-To: groups-abuse@google.com Original-Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=117.195.52.43; posting-account=mBpa7woAAAAGLEWUUKpmbxm-Quu5D8ui Original-NNTP-Posting-Host: 117.195.52.43 Original-Xref: usenet.stanford.edu gnu.emacs.help:224673 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:118802 Archived-At: On Thursday, November 29, 2018 at 12:38:49 AM UTC+5:30, Yuri Khan wrote: > (I was recently informed that web browsers allow the use of > compatibility characters in domain names, and compatibility-decompose > them before resolving, so U+338F =E2=80=9Ckilogram=E2=80=9D becomes Kyrgy= zstan and > milliliter maps to Mali. I am being troublesome but (hopefully!) not malicious Add some good ol badness as hot peppers to the cake https://en.wikipedia.org/wiki/IDN_homograph_attack > That *is* madness.) Precisely my point On Thursday, November 29, 2018 at 12:27:46 AM UTC+5:30, Eli Zaretskii wrote= : > > From: Yuri Khan=20 > >=20 > > > That's debatable: the Unicode Standard says to act according to > > > canonical equivalence only in text, whereas the above are symbol > > > names. We do display them the same (if the font supports that), but > > > we aren't under any obligation to map them to the same symbols, IMO. > >=20 > > Standard Annex 31 deals with identifiers in programming languages, and > > recommends considering identifiers equivalent if they are the same > > under Normalization Form C for case-sensitive languages (such as > > Python and Elisp). >=20 > "Implementations that take normalization and case into account have > two choices: to treat variants as equivalent, or to disallow > variants." >=20 > So there's a choice. And if you ask me, disallow is the reasonable default Earlier I compared python3 and elisp =E2=80=94 a nuanced comparison A more basic comparison would be between python 2 and 3=20 $ cat simple.py=20 A =3D 1 A =3D 2 print("A, A, A=3D=3DA : %s, %s, %s\n" % (A,A,A=3D=3DA)) $ cat homoglyph.py=20 A =3D 1 =D0=90 =3D 2 print("A, =D0=90, A=3D=3D=D0=90 : %s, %s, %s\n" % (A,=D0=90,A=3D=3D=D0=90)) $ python2 simple.py=20 A, A, A=3D=3DA : 2, 2, True $ python3 simple.py=20 A, A, A=3D=3DA : 2, 2, True $ python3 homoglyph.py=20 A, =D0=90, A=3D=3D=D0=90 : 1, 2, False $ python2 homoglyph.py=20 File "homoglyph.py", line 2 SyntaxError: Non-ASCII character '\xd0' in file homoglyph.py on line 2, but= no encoding declared; see http://python.org/dev/peps/pep-0263/ for details IMHO python 2 is doing the right thing not python3=20 As I am sure elisp would be doing if we could get a 25 year old version We could sharpen the error if we liked: $ cat homoglyphE.py=20 # -*- coding: utf-8 -*- A =3D 1 =D0=90 =3D 2 print("A, =D0=90, A=3D=3D=D0=90 : %s, %s, %s\n" % (A,=D0=90,A=3D=3D=D0=90)) $ python2 homoglyphE.py=20 File "homoglyphE.py", line 3 =D0=90 =3D 2 ^ SyntaxError: invalid syntax