zsh-workers
 help / color / mirror / code / Atom feed
From: Phil Pennock <zsh-workers+phil.pennock@spodhuis.org>
To: Oliver Kiddle <opk@zsh.org>
Cc: Zsh workers <zsh-workers@zsh.org>
Subject: Re: PATCH: migrate pcre module to pcre2
Date: Fri, 12 May 2023 19:12:55 -0400	[thread overview]
Message-ID: <ZF7H9wmSFQ1l19xG@fullerene.field.pennock-tech.net> (raw)
In-Reply-To: <81584-1683329746.147485@6Tk5.mCsC.BbNC>

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


  parent reply	other threads:[~2023-05-12 23:13 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-05 23:35 Oliver Kiddle
2023-05-06  4:44 ` named capture groups with PCRE matching (Was: PATCH: migrate pcre module to pcre2) Stephane Chazelas
2023-05-06 18:56   ` Bart Schaefer
2023-05-06 23:06     ` Oliver Kiddle
2023-05-10 23:26 ` PATCH: migrate pcre module to pcre2 Oliver Kiddle
2023-05-12 23:12 ` Phil Pennock [this message]
2023-05-24 18:11   ` Oliver Kiddle
2023-06-13  7:35 ` Jun T
2023-06-19  8:20   ` Jun T

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZF7H9wmSFQ1l19xG@fullerene.field.pennock-tech.net \
    --to=zsh-workers+phil.pennock@spodhuis.org \
    --cc=opk@zsh.org \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).