From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Ergus Newsgroups: gmane.emacs.devel Subject: Re: [SPAM UNSURE] Maybe we're taking a wrong approach towards tree-sitter Date: Wed, 28 Jul 2021 14:36:12 +0200 Message-ID: <20210728123612.pr2ddrf6vmynknxn@Ergus> References: <8735rzyzbz.fsf@163.com> <86v94v3xh9.fsf@stephe-leake.org> <87o8amy88o.fsf@163.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="8208"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Stephen Leake , emacs-devel@gnu.org To: Andrei Kuznetsov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Jul 28 14:37:23 2021 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 1m8ioM-0001tO-Kx for ged-emacs-devel@m.gmane-mx.org; Wed, 28 Jul 2021 14:37:22 +0200 Original-Received: from localhost ([::1]:36668 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m8ioL-0001U8-BG for ged-emacs-devel@m.gmane-mx.org; Wed, 28 Jul 2021 08:37:21 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:37712) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m8inf-0000n8-BD for emacs-devel@gnu.org; Wed, 28 Jul 2021 08:36:39 -0400 Original-Received: from sonic307-1.consmr.mail.bf2.yahoo.com ([74.6.134.40]:44087) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m8inc-0003rL-P6 for emacs-devel@gnu.org; Wed, 28 Jul 2021 08:36:38 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aol.com; s=a2048; t=1627475793; bh=YHceypaefWEIAzkZBww9WUffqsp+rllL/CSkK3dXPsQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From:Subject:Reply-To; b=LVEnXpYzrfqZfosUs5G8UYTyS2xRY5ItPdJIlFD9BpJIAvsz34ZP5ZmQlmkUcvcTV4jwZAGqoRzAR3gntkXv4UawOI7qDqN1s6Aj1rv5ju//dBq1km4MFoJT3IBa2QvjuY88UVxx1zOas2MRCcQvvH9/ZbF7Mx3dD0TctG+FoFd8+Bqrt6yduTcb3LWYBeoqF3/L1pm11cCqYXhih1D0GpfXB+RDcOKBQGnjnnzFEHdCQ1RUuU3TxgTIUibKFZ+ESbAkIpY58uWLjkdpiZncfJXfGV51k6k1WQ4XHtX/xgMa9JOZjekUPux9ir9izFBIhRhjHbcyGJesCrpw1CwYiQ== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1627475793; bh=8Ug8HYOjXp2XTg6QBOJbt+QflLuPUnRteeRQJQQbozn=; h=X-Sonic-MF:Date:From:To:Subject:From:Subject; b=TmczWMtzYq2VaSZ2qR9Y/Y1WTksEWn7CWKZ7DxVKySqTpzkYb38HKOGmzHhcRCpbb5bRu6owqTAwKn8f8nMtSXgQp8M2vwMtl0gqqxleGyPnavEdzVPmgo+aSsr5LpgzPtIdA8bYBVhumR+g6HjcAyDuOZPCOYSz6FAyjNETBpkVwKYntJlS1SgMNMUl5+InoGkujT+pWpt4i26FO60AhyGLFNNHpmXVrsdO90DXrbI41DwXfB/2DN4e/Y+EbTzsEyupRzHZhqn36VJPwEFBeSC4suSOUf7boX5mTdSr9Iu0X3qslkMhQXJ7NN9tuIBEv7V2iKV1HH7ZfBCsIYCLUg== X-YMail-OSG: y3RGwf8VM1kGDQ5v1SCi2nTr7vgH8bEtGDoHR4W71lJuU4AyGFm9gZ_Sjte0Pbl m9gzPsE1OYVd5ZAJM1e_O7oO442d3WZMVlQmVsywBLvDD43ypabO4pZlgeWp60WNe24j.Vk4QRD4 ihu1nmUH8iM7bkYKZXK_1pWleGC_CLsnT1wbUemqAaEz7FhyFaDuxKrleFNtB2fsw.4dBsZiSapO DZF_JSkJoLSTi_Ra7bjFUugyn.PAvAbH4_hk3bP0IBZWzUKngpCJ.HX28f1rVJqJIvi.d94CcGHG dzidYq1YZMUN2kYtDEOBVkPlyQunRRkltHI20ONrpSuXfpTf8yBmaYneRZEy1PiduyQiLN4EN6mg OEFfhnzxbcM1eV6PyVmLbuKDA60M3MnJRrmLq9deVroy9NueUsWKTycYOSk7UreC1lYOqWPJiJnN 5QvvOqF2rNwVgQScn3KpZ_Oe2VmQftw90Ks0SBX2vMoPOKm2Ox0LD8qrfZ73VJly0vaD0iOOZI_P MfAyhhJXq1o_WTs0QNsblUEFLcFQUkn1JszknZPGwDjCk52QCJSh9oS.gyv7TZYMTUKeIUyeLXj. .QAS8ooQ5b3lTwuBjQLUbyu8eCiLn.2IOW6wzgr3I6S7bkqmf49qdH9z6bW3_VhV1xS20ceLcpjR Kor0gwcLunv4q69ITjRfpGfYsjDkjezFtkd1E_cZS6yOA5VOBn76HM9ZH9K1vUE.Nuz5N3iI7lS3 OXQpnSnRk1Qkk2E9yY6hOhFERYfEx9.v2aO_9gA2HmSS6XfxkZWLD8lBIhL5AXJLEfnXD2lwHZpc 0JHYBeuGpXi1GiOC_250IYJjDz6bTs41_Ur51zL_VQ X-Sonic-MF: Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic307.consmr.mail.bf2.yahoo.com with HTTP; Wed, 28 Jul 2021 12:36:33 +0000 Original-Received: by kubenode521.mail-prod1.omega.ir2.yahoo.com (VZM Hermes SMTP Server) with ESMTPA ID e3c99c43e9b34f0bd6ca82627e59e8d1; Wed, 28 Jul 2021 12:36:30 +0000 (UTC) Content-Disposition: inline In-Reply-To: <87o8amy88o.fsf@163.com> X-Mailer: WebService/1.1.18749 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.aol Received-SPF: pass client-ip=74.6.134.40; envelope-from=spacibba@aol.com; helo=sonic307-1.consmr.mail.bf2.yahoo.com 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 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:271731 Archived-At: On Wed, Jul 28, 2021 at 07:43:03PM +0800, Andrei Kuznetsov wrote: >Stephen Leake writes: > >> The tree-sitter runtime, that Emacs would link with, it implemented in >> C, partly for this reason. It would be compiled with whatever Emacs is >> compiled with, or the system compiler. > >Interesting. I was not aware of that. > >> Some of the tree-sitter development tools are implemented in Rust; you >> only need Rust if you are developing/fixing a grammar for a language. > >If I understand this correctly, it means one would require the Rust >toolchain to support new languages in tree-sitter, or to improve >existing support. Would that really fit Emacs? I think many people >might not be comfortable learning such a large language and toolchain to >develop editing tools for Emacs. > >Furthermore, is there any concrete reason this could not be done in >Lisp? > I will say: 1) Performance (discussed in the previous thread): 2) Not reinvent the wheel. Tree-sitter is very well maintained, optimized and with very specialized algorithms; and we lack manpower to duplicate all that effort; and implementing it in lisp won't really worth the efforts and may be unmaintainable and slow. Tree-sitter hopefully won't get abandoned in the future because many editors use it right now (including neovim) and the community is very dynamic. Another advantage is that with tree-sitter as a back-end we could officially (almost for free) support many languages that are currently unsupported officially and may require a lot of effort to support them in a minimal way (or currently supported in some inconsistent way, with incoherent bindings/colors/indentations. Ex: Typescripts, Rust, Julia) >Note: Somehow I sent a reply earlier, and not a follow-up. I apologize >for the duplicate. > >