git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: grep: fix multibyte regex handling under macOS (1819ad327b7a1f19540a819813b70a0e8a7f798f)

From
Jeff King <peff@peff.net>
Date
Feb 7, 2023, 18:19 UTC
Message-ID
<Y+KWFyjTa8t5d5Q8@coredump.intra.peff.net>
In-Reply-To
<CANgJU+UJ-p54MDmQWYTEsdh_ss-q8TUEcqHFm568Lpfsy2dU+w@mail.gmail.com>
On Sat, Feb 04, 2023 at 12:32:09PM +0100, demerphq wrote:
Show 12 quoted lines
> > I think this is a perennial question for portable software: is it better
> > to be consistent across platforms (by shipping our own regex engine), or
> > consistent with other programs on the same platform (by using the system
> > regex).
> 
> Personally I think that while this seems to be an impartial reading of
> the question at hand I think it frames the debate in a way that has
> the potential to bias[1] the discussion in favour of a particular
> policy outcome[2]. It implies that all other things are equal between
> the two options presented, and frames the question as something that
> comes down to personal preference between one form of consistency and
> another.

Sorry, I didn't mean to imply one side or the other, or even that they were equal. I more just meant: you can make arguments either way.

_I_ don't have a strong opinion there, but you have made many of those arguments in your email. And everything you said was pretty sensible.

I did want to mention one thing, though:
> It also assumes that being consistent with other programs on
> the same platform is inherently beneficial, when that doesn't seem to
> be clearly established[2].

This isn't consistency per se, but one problem that arises when a portable program ships its own implementation is that its implementation sucks more than the system one. And that was the case with 1819ad327; our compat/regex was worse than the system with respect to multi-byte characters.

But yes, if your point is: "well, don't ship a crappy implementation", then I agree that is a way to mitigate that problem. ;)

-Peff
Previous: D. Ben KnobleNext: D. Ben Knoble
Message 19 of 22 in “RE: grep: fix multibyte regex handling under macOS (1819ad327b7a1f19540a819813b70a0e8a7f798f)”
  1. D. Ben KnobleFeb 1, 2023
  2. demerphqFeb 1, 2023
  3. D. Ben KnobleFeb 1, 2023
  4. demerphqFeb 1, 2023
  5. Junio C HamanoFeb 1, 2023
  6. D. Ben KnobleFeb 1, 2023
  7. D. Ben KnobleFeb 1, 2023
  8. Junio C HamanoFeb 1, 2023
  9. Jeff KingFeb 1, 2023
  10. demerphqFeb 2, 2023
  11. D. Ben KnobleFeb 2, 2023
  12. Jeff KingFeb 3, 2023
  13. Ævar Arnfjörð BjarmasonFeb 3, 2023
  14. Jeff KingFeb 4, 2023
  15. demerphqFeb 4, 2023
  16. D. Ben KnobleFeb 5, 2023
  17. Jeff KingFeb 7, 2023
  18. D. Ben KnobleFeb 7, 2023
  19. Jeff KingFeb 7, 2023
  20. D. Ben KnobleFeb 2, 2023
  21. Jeff KingFeb 3, 2023
  22. D. Ben KnobleFeb 3, 2023

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.