From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Yuan Fu Newsgroups: gmane.emacs.devel Subject: Re: How to add pseudo vector types Date: Thu, 15 Jul 2021 11:17:02 -0400 Message-ID: References: <83h7gw6pyj.fsf@gnu.org> <45EBF16A-C953-42C7-97D1-3A2BFEF7DD01@gmail.com> <83y2a764oy.fsf@gnu.org> Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.60.0.2.21\)) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="4432"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Stefan Monnier , emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Jul 15 17:18:33 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 1m438D-0000x3-Tk for ged-emacs-devel@m.gmane-mx.org; Thu, 15 Jul 2021 17:18:33 +0200 Original-Received: from localhost ([::1]:33814 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m438C-0000xz-Lk for ged-emacs-devel@m.gmane-mx.org; Thu, 15 Jul 2021 11:18:32 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:35800) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m436o-0000Fx-DY for emacs-devel@gnu.org; Thu, 15 Jul 2021 11:17:07 -0400 Original-Received: from mail-qv1-xf29.google.com ([2607:f8b0:4864:20::f29]:35691) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m436n-0003tZ-0x; Thu, 15 Jul 2021 11:17:06 -0400 Original-Received: by mail-qv1-xf29.google.com with SMTP id f3so3003068qvm.2; Thu, 15 Jul 2021 08:17:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=dI9C6amYFRnR+CLVWj4nYW2bneiDSi5wKNuT/NDRLkA=; b=NKhUN66ThVqjHueaxHyzDhD/QHx384eko5k+pjrmci0GFI8MXD8v0xEOrSz4JOB8sT 6wYYpCoPWawuuNA6qihTcPRUXgRQbRfoyT5cPPx/rosEHKmo/hjAH6CYrCtjtqXEjOHD qVXW2h0iPFM/k2G5aZYoTV6bsq7Ku1NYgEVCVIWYyCZPSgwi6RVFWkXMbKhQbaYiC/Ew 0OZlS0pvhAZKa5c085oh7wrMV74jbxNW3xllD8abXGSjpMZi9oLnVHYsIyqVLsmOb2fn oBKtENKyU4X52RLAdfWiEnIsv9xbYf6cmp5puDv3ydeLTyKnmkDp9PyeQ9XlCR0Ip8PE E3rw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=dI9C6amYFRnR+CLVWj4nYW2bneiDSi5wKNuT/NDRLkA=; b=iYcoXBrYaOJiNCQbEzWCU19YeQGKJTWoD3FPgdqzl3+/3puw4hprhp6hACDma5sLLi RID1JMdZcfpc/1OYUGyUt35Uw54KvFP3+6uP8vvZ6XhXgH7yFVQnUEzJ3rIwpmDECQVw oRhSsMzu9Tf0S49d3mblY8ElCen13zx82nVv9K2LhC2PCdMbQYC7NNHFn44MOh48qF53 +kJ7rs5elaeK1WcJMWjK+s4AbpkvsbO2dd7nJx4esaAbmcycOYeygIHImBnXCI1/UQ2c rP5N6wJUxDifirXrqTrJY285JJ2129YjDB6C9GVaJ9/EzjsD600SWmBHCsgYWSyKPtLd N8Cw== X-Gm-Message-State: AOAM533cA5F9nDdoWTDbFz0Kv9HCTcawoDYATzh7tkWddaKvNdT/BDad 352idN631I81GOAdNA9lIPNRQDxW0pbxPw== X-Google-Smtp-Source: ABdhPJwE12oAvg8LO9FGz4c68vsL7YXW94ks1B84nGTiVYWFht1WoTJs7eHIuvLALSGxW8tV0BYYhA== X-Received: by 2002:ad4:456d:: with SMTP id o13mr4961393qvu.48.1626362223534; Thu, 15 Jul 2021 08:17:03 -0700 (PDT) Original-Received: from ?IPv6:2601:98a:4200:9210:b02d:e0d8:dab6:21b? ([2601:98a:4200:9210:b02d:e0d8:dab6:21b]) by smtp.gmail.com with ESMTPSA id o18sm2728665qko.63.2021.07.15.08.17.03 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 15 Jul 2021 08:17:03 -0700 (PDT) In-Reply-To: <83y2a764oy.fsf@gnu.org> X-Mailer: Apple Mail (2.3654.60.0.2.21) Received-SPF: pass client-ip=2607:f8b0:4864:20::f29; envelope-from=casouri@gmail.com; helo=mail-qv1-xf29.google.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, 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:271252 Archived-At: > On Jul 15, 2021, at 10:18 AM, Eli Zaretskii wrote: >=20 >> From: Fu Yuan >> Date: Thu, 15 Jul 2021 09:37:27 -0400 >> Cc: monnier@iro.umontreal.ca, emacs-devel@gnu.org >>=20 >>> Thanks, but why does it parse only strings, not buffer text? >>=20 >> I haven=E2=80=99t written it yet. I want to make sure the pseudo = vector definition and configure files are right before going further. = IIRC the contribution guide recommends sending small patches and update = along the way. >=20 > Great, then please try also to liberate the implementation from using > JSON, it's a major slowdown factor. JSON? I didn=E2=80=99t write anything involving JSON.=20 While you are looking at the patch, here are some questions for = integrating tree-sitter with out buffer implementation. What I = envisioned is for each buffer to have a `parser-list=E2=80=99, and on = buffer change, we update each parser=E2=80=99s tree. I think modifying = signal_after_change is enough to cover al the cases? And, for = tree-sitter to take the buffer=E2=80=99s content directly, we need to = tell it to skip the gap. I only need to modify gap_left, gap_right, = make_gap_smaller and make_gap_larger, right? Yuan=