From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, T_SCC_BODY_TEXT_LINE,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 27288 invoked from network); 12 May 2023 23:13:18 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 12 May 2023 23:13:18 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1683933198; b=qXj6F7MU6nwXJk22Dl04gnRvRn9Kft2EdpAEot5R1mj83nTnUGAD4u8+u4A4jvpWxnErY6O05d sEyWzOZwWPfR5rTUIhUGOrYhzZUiT6JSIn4/LJGxYgJHFH4Kq7+RALcRfs3blU+XjSu2kpzkZa ezvLMxUJZ039KluCSUL78W3I1Jd1GO/oXMC61aelXRkoLryxuu/P/z7UfxjkO5L29ePqDHRIas B6HA5ro8yxz0qwt1SE4UXlteqNVASuzfqX/yT6m81mX0aF4ujYazEnf+nedgE29gRwrdXIL2LX IdNPP/ndLx2b2RleWHTWbAnIK70s2ge0gGNdFHwVdE3M7A==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mx.spodhuis.org) smtp.remote-ip=94.142.241.89; dkim=pass header.d=spodhuis.org header.s=d202302e2 header.a=ed25519-sha256; dkim=pass header.d=spodhuis.org header.s=d202302 header.a=rsa-sha256; dmarc=pass header.from=spodhuis.org; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1683933198; bh=978uxvJ6MZLLqDLJsXufx13zGU2PVzdHl4itijEDltM=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:In-Reply-To:Content-Type:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:DKIM-Signature:DKIM-Signature:DKIM-Signature; b=BdiiKNLAudPkTtbLaPn/GVycD7Nz4Qb1Qak8uBoWkAE7soL6YuseOwz0zkxPcNLTvnj4HCX042 uE2Up/iI8PQ3A7JxSsP8Pr8Pd58ImwmzVS7F+kX1Obbns8mL43jRkpVyJuSPUpq5XzqUt2nep8 QZHu05yDfEfyvtWpN2/RADZeeOJvuNbO1YURANZFo19bgbnjh3TwrT1/oQgrJtZ9CaWX6PQtq1 nke8xM49kVTtLQyhoRjNp+rFQfs2scQXv7hq9R2Wf/nMn1QzywVCkrrJuUuMlKuPMPwFFeiAIZ eCg/3Hv+4gZJ89ngtHd6j2WNsg05UBEjK+wnP4JHPpG40g==; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20210803; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=RgukgEdoITLfOPhu1jgBYVL+GckuiVB3te/qO5zHgnI=; b=J3NKaU2K8XicsPdhL/H3xB3y7O OhNEhZv9wqu81TdrpYYhVPButUJr7TVTURF7aCC9aN4GI8LP6Vdd2yAB8L0rFS3yrHvnpYCeCF73O IaxEV56TV8fluZntPs0kxkmzf8h4OBN5x9I8xnFmOlaOcbtMYpqWNGie6CsO4Z1dgEHFfy5i/7vwy x6amuutudmCgCQ8GNmcdMERPm2oqGjtsXfvyp0strZIeE/sN2qGOblKVlymNFCigfOIBZ8Au5IRho MLrHHtec1nMdXDGMkMbmYl44BAMbtIiq4U2MUpFKg7MflBv5uGriixLQ55Q5LJvX8RgVuVhb9h6ak jFHX9tbA==; Received: by zero.zsh.org with local id 1pxbwq-0006CQ-PK; Fri, 12 May 2023 23:13:16 +0000 Authentication-Results: zsh.org; iprev=pass (mx.spodhuis.org) smtp.remote-ip=94.142.241.89; dkim=pass header.d=spodhuis.org header.s=d202302e2 header.a=ed25519-sha256; dkim=pass header.d=spodhuis.org header.s=d202302 header.a=rsa-sha256; dmarc=pass header.from=spodhuis.org; arc=none Received: from mx.spodhuis.org ([94.142.241.89]:59996) (DNSSEC AD) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_256_GCM_SHA384:256) id 1pxbwZ-0005t9-4T; Fri, 12 May 2023 23:12:59 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=spodhuis.org; s=d202302; h=OpenPGP:In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:From:Reply-To:Subject:Date:To: Cc:Content-Transfer-Encoding:Content-ID:Content-Description:OpenPGP: Organization:Auto-Submitted; bh=RgukgEdoITLfOPhu1jgBYVL+GckuiVB3te/qO5zHgnI=; t=1683933178; x=1685142778; b=VS68NlpwGwCvRZphGkOZiXfch/6NPDfO8hBEvJb71yzIqGH TFpzzZXmgWoD/PH6aKaNZgWvgfrUH2rl1B9u/vZJ/9irHQRg9pXic6UZIiXiOrDO0djCWHavJr2yj 5NlbgTRLDhKG+ESDGbBV6bD3dOWeqkdQkYsMtVIF25t9uqjALoyl8W+J8iYD5X8xpyA4an6KwnS8i o+VUanatGGIZOQbGVsDuZXd4AlhLBVUPTKB5uJ/AMRQqfnPPAvkzRnh7LqhmsJ7M6xUe55d+bFmQK oJVxFeRTZ+6FHAIXQ9Nrar39auc5+wCdyFo+ceR7oX6RSSX3qCXnoh8CUtUwnkjQ==; DKIM-Signature: v=1; a=ed25519-sha256; q=dns/txt; c=relaxed/relaxed; d=spodhuis.org; s=d202302e2; h=OpenPGP:In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:From:Reply-To:Subject:Date:To: Cc:Content-Transfer-Encoding:Content-ID:Content-Description:OpenPGP: Organization:Auto-Submitted; bh=RgukgEdoITLfOPhu1jgBYVL+GckuiVB3te/qO5zHgnI=; t=1683933178; x=1685142778; b=zlq7j/uefW2I0qqBndsqFhCLcEEqxy8zBJfPoKtoETdi6aS K1oDAgycKjPluc51MQQ5QOpHn1Q4wOT7ZsorHCQ==; Received: from authenticated user by smtp.spodhuis.org with esmtpsa (TLS1.3:TLS_AES_256_GCM_SHA384:256) id 1pxbwX-0005t3-J8; Fri, 12 May 2023 23:12:57 +0000 Date: Fri, 12 May 2023 19:12:55 -0400 From: Phil Pennock To: Oliver Kiddle Cc: Zsh workers Subject: Re: PATCH: migrate pcre module to pcre2 Message-ID: Mail-Followup-To: Oliver Kiddle , Zsh workers References: <81584-1683329746.147485@6Tk5.mCsC.BbNC> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <81584-1683329746.147485@6Tk5.mCsC.BbNC> OpenPGP: url=https://www.security.spodhuis.org/PGP/keys/keys-2013rsa-2020cv25519.asc X-Seq: 51741 Archived-At: X-Loop: zsh-workers@zsh.org Errors-To: zsh-workers-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-workers-request@zsh.org X-no-archive: yes List-Id: List-Help: , List-Subscribe: , List-Unsubscribe: , List-Post: List-Owner: List-Archive: On 2023-05-06 at 01:35 +0200, Oliver Kiddle wrote: > The old PCRE library that zsh uses is considered "end of life, and is no > longer being actively maintained". The newer PCRE2 has a slighty > different interface. It has been around since 2015 so this is not new. > Actual version numbers are 8.x and 10.x rather than 1 and 2. Migrating > seems to be the sensible way forward rather than, for example, adding a > separate zsh/pcre2 module. That way, zsh users don't need to be > concerned with the change. Before anything else, this is great to see, thank you. > Would it perhaps be useful to add support for PCRE2's alternative DFA > algorithm? This might meet the needs Phil was considering with the re2 > based module he once posted but never committed. What form might that > take? I handed in my commit bit a while back because I used it so rarely and it felt better for commit to be only the people more actively involved. Shells and their provenance matter. So I can't commit. My main motivation with RE2 was to get to something which all vendors will actually include when distributing. The reason can't be licensing, since the PCRE lib is BSD licensed. I'd seen RE2 pick up quite a bit of steam and wanted to explore to see how feasible it was. Ideally, we'd have a contact within Apple who can tell us what they might or might not consider, so that we can have working regexps with semantics younger than POSIX.2 (1992) and some more actual utility. I'm tired of dealing with regexps being so sub-par 30 years later. Trying to write tools which work both for people using macOS and people using Linux today pretty much means "write a client in Go". Which is fine, but sometimes a scripted solution is desirable. I wrote the zsh/regex module because folks felt that we needed to match Bash's semantics and use ERE by default when I added the =~ syntactic sugar. I still see the benefit of that, but wonder if not doing so would have led to a better net outcome, as distributors would have had to enable a modern RE engine to get =~ working ... or would it have just left =~ not working on random platforms. -Phil