From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: rosie/libpexl library for regex pattern composition Date: Sun, 28 Jul 2024 10:51:33 +0300 Message-ID: <864j8a0xa2.fsf@gnu.org> References: <8734nudmeh.fsf@gmail.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="29265"; mail-complaints-to="usenet@ciao.gmane.io" Cc: dmcc2@hypnicjerk.ai, emacs-devel@gnu.org To: Helmut Eller Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Jul 28 09:52:37 2024 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 1sXyho-0007TA-VA for ged-emacs-devel@m.gmane-mx.org; Sun, 28 Jul 2024 09:52:37 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sXygv-0008HI-0J; Sun, 28 Jul 2024 03:51:41 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sXygr-0008Gm-Kr for emacs-devel@gnu.org; Sun, 28 Jul 2024 03:51:38 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sXygp-0008Bf-1u; Sun, 28 Jul 2024 03:51:36 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=sslFgjj6NXVKvom3HpfpN0nWecv3UuGqTkema0Qt7XI=; b=VPSApDuerNXb P8ngjnH6/SpiF4IGH/bDWuTybuEE89dkGlvaZgYsBPkRQusYSL/LR2oCw63hhI4qS03yj1qmbD6Fv C0GqXtv/sEirZSvknWZoFvO+pg1/agus7+fewJ8ptj7JTuInu6ID/+73l+O4KwAO7J4B15CVfi+cQ xLG88DXGUB9/zapZjcgEj8LoBVRVo/+N0k7jc+r01MT3NxwlYny5/LMnKV+SQmg5jOwzKwM2qzH7m FJOhmnx5+sT72j1BhOGWBaW+K6xiJ7FgYr+s14RVnwihp935mw4g7ze7Jk+Pw7S21dhSI8zqFhTeS Sc4rN6fPPbhL7kYZOeFcvA==; In-Reply-To: <8734nudmeh.fsf@gmail.com> (message from Helmut Eller on Sun, 28 Jul 2024 09:08:06 +0200) 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-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:322155 Archived-At: > From: Helmut Eller > Cc: "emacs-devel@gnu.org" > Date: Sun, 28 Jul 2024 09:08:06 +0200 > > It seems that tree-sitter only needs a single function: > treesit_read_buffer. If it works for tree-sitter, then maybe it's also > good enough for Rosie. Tree-sitter accesses buffer text one character at a time, for which an API is very simple, and we already have such an API modules could use: char-after. But I very much doubt that libraries like Rosie could do well with such APIs for its needs. The alternative is to give modules direct access to the entire buffer text, which IMO is unthinkable.