From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stephen Leake Newsgroups: gmane.emacs.devel Subject: Re: How to add pseudo vector types Date: Sun, 25 Jul 2021 09:16:55 -0700 Message-ID: <86a6ma8j2g.fsf@stephe-leake.org> References: <83h7gw6pyj.fsf@gnu.org> <45EBF16A-C953-42C7-97D1-3A2BFEF7DD01@gmail.com> <83y2a764oy.fsf@gnu.org> <83v95b60fn.fsf@gnu.org> <00DD5BFE-D14E-449A-9319-E7B725DEBFB3@gmail.com> <83r1fz5xr9.fsf@gnu.org> <86mtqh54wo.fsf@stephe-leake.org> <83czrd53z2.fsf@gnu.org> <86wnpj4qh0.fsf@stephe-leake.org> <83lf5z4fwq.fsf@gnu.org> <86fsw4a2tv.fsf@stephe-leake.org> <835yx019yd.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="12787"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (windows-nt) Cc: casouri@gmail.com, monnier@iro.umontreal.ca, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Jul 25 18:17:35 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 1m7goo-00033x-Ph for ged-emacs-devel@m.gmane-mx.org; Sun, 25 Jul 2021 18:17:34 +0200 Original-Received: from localhost ([::1]:42796 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m7gon-0002hY-Og for ged-emacs-devel@m.gmane-mx.org; Sun, 25 Jul 2021 12:17:33 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:52852) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m7goG-0001yu-KF for emacs-devel@gnu.org; Sun, 25 Jul 2021 12:17:00 -0400 Original-Received: from gateway21.websitewelcome.com ([192.185.45.228]:25399) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m7goE-0007ZV-FD for emacs-devel@gnu.org; Sun, 25 Jul 2021 12:17:00 -0400 Original-Received: from cm14.websitewelcome.com (cm14.websitewelcome.com [100.42.49.7]) by gateway21.websitewelcome.com (Postfix) with ESMTP id 6C1E1400CA1DB for ; Sun, 25 Jul 2021 11:16:57 -0500 (CDT) Original-Received: from host2007.hostmonster.com ([67.20.76.71]) by cmsmtp with SMTP id 7goDm3sb37sOi7goDmoUrn; Sun, 25 Jul 2021 11:16:57 -0500 X-Authority-Reason: nr=8 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=stephe-leake.org; s=default; h=Content-Type:MIME-Version:Message-ID: In-Reply-To:Date:References:Subject:Cc:To:From:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=qNuKtRTWxEF6zrLuBvpVvrEtSRUTgnLc+dRWIBMhhwk=; b=btjzs2v+KNktu4Gb70dVqngsf0 fjetW96K1I4KUdkWvBVAo/jcZIZIAv/VnLZ3HTEjcgJqNghUg8cZ1Z1js0zYx2LdL9/5rqPcFIXBE n4Qh8pXXHLa2IRJkE7htVaM/G+nz3SAcXkvsztPqX5SxwGa7TCUpR3U2ITYhZXsaS+18G0P1+FnT4 MzSHSBX2EWXNVcul7yYv5DeMyIrYVmPNyNK8UrQpELX1V8XhqEXy7QvK4atAbL3yJ7sZlo0NR2oVw mRFK8IUbuJJ7N7ziLfC8i4GRKtzFZWd4kKNUzauO71CValG2pMv+rCGwOrQc7BQIKZrUP0Qs0U/tl 40F7ZGVQ==; Original-Received: from [76.77.182.20] (port=57005 helo=Takver4) by host2007.hostmonster.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1m7goC-003IA4-Nc; Sun, 25 Jul 2021 10:16:56 -0600 In-Reply-To: <835yx019yd.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 24 Jul 2021 09:51:06 +0300") X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - host2007.hostmonster.com X-AntiAbuse: Original Domain - gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - stephe-leake.org X-BWhitelist: no X-Source-IP: 76.77.182.20 X-Source-L: No X-Exim-ID: 1m7goC-003IA4-Nc X-Source-Sender: (Takver4) [76.77.182.20]:57005 X-Source-Auth: stephen_leake@stephe-leake.org X-Email-Count: 7 X-Source-Cap: c3RlcGhlbGU7c3RlcGhlbGU7aG9zdDIwMDcuaG9zdG1vbnN0ZXIuY29t X-Local-Domain: yes Received-SPF: permerror client-ip=192.185.45.228; envelope-from=stephen_leake@stephe-leake.org; helo=gateway21.websitewelcome.com X-Spam_score_int: -8 X-Spam_score: -0.9 X-Spam_bar: / X-Spam_report: (-0.9 / 5.0 requ) BAYES_00=-1.9, DKIM_INVALID=0.1, DKIM_SIGNED=0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_PASS=-0.001, SPF_NEUTRAL=0.779 autolearn=no 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:271614 Archived-At: Eli Zaretskii writes: >> From: Stephen Leake >> Cc: casouri@gmail.com, monnier@iro.umontreal.ca, emacs-devel@gnu.org >> Date: Fri, 23 Jul 2021 19:00:12 -0700 >> >> Eli Zaretskii writes: >> >> >> > I fail to see the significance of the difference. Surely, you could >> >> > hand it a block of text with changes to mean that this block replaces >> >> > the previous version of that block. It might take the parser more >> >> > work to update the parse tree in this case, but if it's fast enough, >> >> > that won't be the problem. Right? >> >> >> >> tree-sitter doesn't store the previous text, so there's nothing to >> >> compare it to. >> > >> > There was nothing about comparison in my text. You tell TS that >> > editing replaced a block of text between A and B with block between A >> > and C, without revealing the fine-grained changes inside that block. >> > This must work, because editing could indeed do just that. >> >> I see; treat the whole block as one change. Yes, that would work, but it >> would probably be less optimal than sending a list of smaller changes; >> depends on the details. > > Since TS is very fast, I think this sub-optimality will not cause any > tangible performance issues in Emacs. And from our POV it is a good > optimization because it will minimize (and to some extent optimize) > the traffic between Emacs and TS. "optimal" refers to more than speed; error recovery is also important. The more of the previous tree you keep, the better the error recovery. After we get some good metrics/benchmarks for actual Emacs use (ie, how good is the indentation?), we can explore this. -- -- Stephe