From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Helmut Eller Newsgroups: gmane.emacs.devel Subject: Re: rosie/libpexl library for regex pattern composition Date: Mon, 29 Jul 2024 21:33:53 +0200 Message-ID: <875xsof0wu.fsf@gmail.com> References: <8734nudmeh.fsf@gmail.com> <864j8a0xa2.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="1197"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Eli Zaretskii , emacs-devel@gnu.org To: Danny McClanahan Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Jul 29 21:35:11 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 1sYW9G-0000Dk-VD for ged-emacs-devel@m.gmane-mx.org; Mon, 29 Jul 2024 21:35:10 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sYW88-0004LJ-IK; Mon, 29 Jul 2024 15:34:00 -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 1sYW86-0004Kx-Ug for emacs-devel@gnu.org; Mon, 29 Jul 2024 15:33:59 -0400 Original-Received: from mail-lf1-x129.google.com ([2a00:1450:4864:20::129]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sYW85-0002Aq-Bx; Mon, 29 Jul 2024 15:33:58 -0400 Original-Received: by mail-lf1-x129.google.com with SMTP id 2adb3069b0e04-52f0277daa5so6020128e87.0; Mon, 29 Jul 2024 12:33:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1722281635; x=1722886435; darn=gnu.org; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=2iNUCdR6iB6wmy8Jffvn8vSiPUCvEXbAkydtYRIzC+o=; b=KI1L+nUemb0yoocSm2oI5RiGvAcuKqVVTWUPBE7p5Aj0TerzVQfeh3hybLaxJ3uz1E WJLpgVz/1NNpX/08dB+NmTkZuS/hz/PvBO7gQDm/THgXulzIr6QWiVmeVL21Q9/IRd0t YWJy3rVQooWmw8wUcP9HPZPT4epdToUCyBU84KqZygvLXMyvy+F5oXr38Hv2IJS6ibSZ w8dV7Vq3IReGcNC6ZOxUSnMe+NOnj+xYVtbNVW8lTnCZFRl1R0HEf2NhVKABKgagqzzo Hp+Ga6m6DWbkWEyT5KQXYsiRp1bQ7H+nefYZVpFd45ZfzpfRkc0NxwFzzjXldJ/D5lKC chiQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722281635; x=1722886435; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=2iNUCdR6iB6wmy8Jffvn8vSiPUCvEXbAkydtYRIzC+o=; b=qU6A0OBNzOyOoRw7vlpwqnY4z1tCwEpn6i9bxU9PkLJY8XyShcUuTvrMiO7UlPZ12r xBjWdhX+VKrlqTirPn5nom5B0SEUt+GsaVIY/lug5Eh0dD3wcsr/Rre5T0lVaUnGsg3v aAQAzea0ezTPiMFB5MHATdGkZaY4G/T6Vwblm0k+fwj/pwKII1u2quHM41Rcv3LIAVtC GZUITZEdu9Uk+r6CkJpptyPMd4a64tPyMywwSAFqdJRX0XVSmynQhusqsp8VDJcIkFWe iZR+dYgiB0bPnnwmuKr0FE9gaE+KRIIB6XDMl4XhYuTYDAu7MZS51+oDddDaCjwhh4im y9mw== X-Forwarded-Encrypted: i=1; AJvYcCXMGqqVJOVATRmSiH+4ERF3qa2LC0u5/7c1A+TSARwa6nGq1SiVvVYEcCiclqUQf74Qlg7AraSl59fmoXJI+JaEYXwK X-Gm-Message-State: AOJu0YzwQ8im4ME7bBril/Xbi1yxr3f3uRPKvtMEPUaF5XcbAr/8OhD/ +ShURKLTwJV9elucDo8y3damN3V9VsXlnf6gYoxemcpG3bghRS0Jqclylg== X-Google-Smtp-Source: AGHT+IFYgCjcMuUY5Wg7KtemWEIxv5kc4YXr8Agbtm62HKylWgh0OWCy51Ty7PQ3BJOwB0AF+3mBDQ== X-Received: by 2002:a05:6512:200b:b0:52e:96d7:2f35 with SMTP id 2adb3069b0e04-5309b27a371mr6469299e87.24.1722281634587; Mon, 29 Jul 2024 12:33:54 -0700 (PDT) Original-Received: from caladan (dialin-234199.rol.raiffeisen.net. [195.254.234.199]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a7acab28235sm544549466b.43.2024.07.29.12.33.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Jul 2024 12:33:54 -0700 (PDT) In-Reply-To: (Danny McClanahan's message of "Mon, 29 Jul 2024 13:58:13 +0000") Received-SPF: pass client-ip=2a00:1450:4864:20::129; envelope-from=eller.helmut@gmail.com; helo=mail-lf1-x129.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.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:322199 Archived-At: On Mon, Jul 29 2024, Danny McClanahan wrote: [...] > I had not considered the possibility of exposing a module API for > extensible parsing engines as opposed to building it directly into > Emacs like the current regex-emacs engine, but I definitely appreciate > the idea of decoupling from a specific framework, especially with an > eye to reducing the maintenance burden. From my current understanding, > the benefits of building Rosie/PEXL directly into Emacs would be: > (1) could take advantage of e.g. SIMD search by directly accessing the > gap buffer memory, It depends on how the module API exposes the buffer text. E.g. I would imagine that a Rust function that receives the text as two &[u8], i.e. two byte array slices borrowed read-only for the duration of a call, could have similar efficiency as something built directly into Emacs. > (2) since it would be reliably available to all Emacs users, could > form a composeable elisp search API. I think Rosie/PEXL would stay an optional feature for a long time. [...] > Does that correctly outline the goals/desires for lisp-level matcher > construction? I don't know. This sounds like an new API would be needed and the difficulty, beside designing the API, would be to make it popular; usually the most difficult part. The old API would still be used for a long time. I think the Emacs community is mostly a do-ocracy, i.e., people work on things they are interested in or know how to do; in contrast to work on goals/ideas that somebody else defined. That's quite ok as long as the boring tasks get done eventually. And I would suggest the same here: do what you think is useful and that you know how to do.