From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Akib Azmain Turja Newsgroups: gmane.emacs.devel Subject: Re: Why tree-sitter instead of Semantic? (was Re: CC Mode with font-lock-maximum-decoration 2) Date: Fri, 12 Aug 2022 22:00:43 +0600 Message-ID: <87wnbde9jo.fsf@disroot.org> References: <83o7wuva9o.fsf@gnu.org> <83mtceupbx.fsf@gnu.org> <83lerxvfnu.fsf@gnu.org> <838rnxvdcq.fsf@gnu.org> <83r11ptksn.fsf@gnu.org> <83a68dti6w.fsf@gnu.org> <874jykzvx9.fsf@yahoo.com> <83fsi4sttn.fsf@gnu.org> <838rnws5c7.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="26236"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Eli Zaretskii , luangruo@yahoo.com, acm@muc.de, emacs-devel@gnu.org, monnier@iro.umontreal.ca, Yuan Fu To: Lynn Winebarger Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Aug 12 18:27:32 2022 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oMXVT-0006cj-PH for ged-emacs-devel@m.gmane-mx.org; Fri, 12 Aug 2022 18:27:31 +0200 Original-Received: from localhost ([::1]:45062 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oMXVS-0006CX-PR for ged-emacs-devel@m.gmane-mx.org; Fri, 12 Aug 2022 12:27:30 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:60534) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oMX8l-0000a9-84 for emacs-devel@gnu.org; Fri, 12 Aug 2022 12:04:06 -0400 Original-Received: from knopi.disroot.org ([178.21.23.139]:46236) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oMX8j-0004Xw-2Y; Fri, 12 Aug 2022 12:04:02 -0400 Original-Received: from localhost (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id 9D47A45BBC; Fri, 12 Aug 2022 18:03:59 +0200 (CEST) X-Virus-Scanned: SPAM Filter at disroot.org Original-Received: from knopi.disroot.org ([127.0.0.1]) by localhost (disroot.org [127.0.0.1]) (amavisd-new, port 10024) with UTF8SMTP id 9MR_HkEMdufY; Fri, 12 Aug 2022 18:03:58 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1660320182; bh=99u8+kjZ9xGUA3KAuyED1hTzceQMf3b/T1k0PG/T5P0=; h=From:To:Cc:Subject:In-Reply-To:References:Date; b=i5cQfnjcIL5/rZaRkOnpBujdlfWYGWc2oIJu0MxQC39aVn+wJdblAGf5qOINQnPmL p8q2do34G5gxPd5RNrO3NUhkslK6Di0tOFD7CUUIrJt3+RrkhlgxVHgX444Tycj5Fn 8Qp6MjSt747sXRnKuM8NNwvVs5IfSnlTYOT8geMLurRsMkN0ridi1+/hTaoEsEp5HO I7p4KAggqxp50ubTufEG1CUqw9ubvbsMSOA+7UYF/ivPCR/QSBkXNriod07qGu4RjK 3HxLMOL+rnfFaAJKBz5sbVJ8SRrygWZ+lTdTBKbCS0+X4uX9y5SyZc75O6kVFdHl3s 4znHEjUvpgrvQ== In-Reply-To: (Lynn Winebarger's message of "Fri, 12 Aug 2022 08:37:25 -0400") Received-SPF: pass client-ip=178.21.23.139; envelope-from=akib@disroot.org; helo=knopi.disroot.org X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 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-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:293389 Archived-At: --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Lynn Winebarger writes: > On Wed, Aug 10, 2022 at 7:31 AM Eli Zaretskii wrote: >> >> I don't have this information. Maybe someone else does. But in >> general, it is a very small wonder that a parser written in optimized >> C is much faster than anything written in Emacs Lisp, given that Lisp >> is an interpreted language that has no special support for writing >> parsers. > > That can be cured over time, now that the bulk of the core of emacs > uses lexical scoping. With proper tail recursion, ELisp should be > able to produce lexers and parsers roughly as efficient as C code, if > not more efficient (depending on if you allow use of "computed goto" > in the C code for the lexers and parsers). That does require changes > to the byte code VM, but it's doable. It's hard for any compiled language to beat C code, and I believe it's *impossible* for any interpreted language to do that. And if it somehow does that, I would believe that the result is *hard-coded* in it. By the way, is native compiled Emacs Lisp faster than the code produced by Guile's JIT? If so, we can write the parser and the lexer in Scheme and use the result in Emacs. (Triggering a heated discussion again...) Or maybe we can link Guile to Emacs so that people can extend Emacs with the "GNU=E2=80=99s Ubiquitous Intelligent Language for Extensions". =2D-=20 Akib Azmain Turja Find me on Mastodon at @akib@hostux.social. This message is signed by me with my GnuPG key. Its fingerprint is: 7001 8CE5 819F 17A3 BBA6 66AF E74F 0EFA 922A E7F5 --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEyVTKmrtL6kNBe3FRVTX89U2IYWsFAmL2eSwACgkQVTX89U2I YWt97g/9HrRRKCW7ZcHUNBRr9TWou3XXUz+vhzBYdK+eWTdEAP9rN58F5fY9J5ep 20lFFFoFlwWQZ1z2oJPswmSKrxxuhmcK4J0F2GMtZg6N4M0nPGZz42NHkC+mij0J ZBwNTJdoQ9jCvQa9DEqg6kiDP1LCaYDTCK2YSIjaxjgIEjsid9xg1JAkTIW+q3iL m5Y/sBxRAvwm7c6uMURuo784a4liXzwXKExst564nCVYSw8CEXx9XvsCCKQ3eEqT 6Wdky+R396t+2fQ8dql5MiIfEAdBrK8875PdgvegQL7tbH4IRqI8teWsK/MjGqlv /J0KPx5kfIFWjo2h5E4VuD+uc5DBdKfrx9XWb+XCqowRXWV1fb7iILYKprydIABU 8QrAQc0agjabDUvxEriqzC6YWa4IdS6t1JYAfks/A085vC7VXrsV1LOsHqX+jI0+ jiQbk77GgIghYRislajOk4BoJ3LkZMdV5kcYhigIGyYDpRRxMuyDEAuQW1AqGSuv FHBDr0HaSoBji6Eu7Mg+ABBWocY0T8qKgDQ3vXU6364ar3X8Ftf6KhXAvhIqWNL6 HDqlvYtIxtlSi5xFrIedBOISW1tl/kPfOMW/KENwvHC6vTGX26YA9apdUhOFq0E0 yf2FNlezXkMLbtDnOfeb1gRUuq6VbQqOum31soMsit47mxLCF4A= =qMSb -----END PGP SIGNATURE----- --=-=-=--