[L] Change in code/re2[main]: README.md: convert README to Markdown, expand

2 views
Skip to first unread message

Russ Cox (Gerrit)

unread,
Jul 30, 2025, 11:28:19 AMJul 30
to Alan Donovan, re2...@googlegroups.com
Attention needed from Alan Donovan

Russ Cox has uploaded the change for review

Russ Cox would like Alan Donovan to review this change.

Commit message

README.md: convert README to Markdown, expand

The README is essentially unchanged since 2009. Update it:

* Convert to Markdown.
* Paste in a few wiki pages, which will change to redirect to the README.md:
- https://github.com/google/re2/wiki/WhyRE2
- https://github.com/google/re2/wiki/CplusplusAPI
- https://github.com/google/re2/wiki/Install

Also document recipes for using CMake and Bazel,
neither of which was obvious to me.
Change-Id: I37603555d831bd4051b88b46542bfdd0f344776d

Change information

Files:
  • D README
  • A README.md
Change size: L
Delta: 2 files changed, 252 insertions(+), 47 deletions(-)
Open in Gerrit

Related details

Attention is currently required from:
  • Alan Donovan
Submit Requirements:
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: newchange
Gerrit-Project: re2
Gerrit-Branch: main
Gerrit-Change-Id: I37603555d831bd4051b88b46542bfdd0f344776d
Gerrit-Change-Number: 63775
Gerrit-PatchSet: 1
Gerrit-Owner: Russ Cox <r...@swtch.com>
Gerrit-Reviewer: Alan Donovan <adon...@google.com>
Gerrit-Attention: Alan Donovan <adon...@google.com>
unsatisfied_requirement
open
diffy

Alan Donovan (Gerrit)

unread,
Jul 30, 2025, 12:10:25 PMJul 30
to Russ Cox, re2...@googlegroups.com
Attention needed from Russ Cox

Alan Donovan voted and added 7 comments

Votes added by Alan Donovan

Code-Review+2

7 comments

File README.md
Line 7, Patchset 1:_**Safety is RE2's raison d'être.**_
Alan Donovan . unresolved

"primary goal"?

(r always urged me to use only English.)

Line 14, Patchset 1:by working within a configurable budget – failing gracefully when exhausted –
Alan Donovan . unresolved

No spaces around em dashes.

Line 18, Patchset 1:Although RE2 guarantees linear-time performance, the linear-time constant
varies depending on the overhead entailed by safe handling of the regular expression.
Alan Donovan . unresolved

awkward?

Perhaps:

Although RE2 guarantees a running time that is asymptotically linear in the length of the input, more complex expressions may incur larger constant factors.

(Though this does raise the question whether DoS is possible by making the expression sufficiently complex.)

Line 20, Patchset 1:In a sense, RE2 behaves pessimistically whereas backtracking engines behave optimistically,
so it can be outperformed in various situations.
Alan Donovan . unresolved

Perhaps elaborate to something like:

In a sense, RE2 is pessimistic where a backtracking engine is optimistic:
A backtracking engine tests each alternative sequentially, making it fast when the first alternative is common. By contrast RE2 evaluates all alternatives in parallel, avoiding the performance penalty for the last alternative, at the cost of some overhead. This pessimism is what makes RE2 secure.

Line 120, Patchset 1:For example, the predefined `Quiet` options silence error
message printing when a regular expression fails to parse:
Alan Donovan . unresolved

6 nouns? Hard to parse.

Line 221, Patchset 1:RE2's native language is C++.
Alan Donovan . unresolved

implementation

or "is implemented in"

Line 244, Patchset 1:
Alan Donovan . unresolved

The heading promises ports but then lists only wrappers.

Mention:

?

Open in Gerrit

Related details

Attention is currently required from:
  • Russ Cox
Submit Requirements:
  • requirement satisfiedCode-Review
  • requirement satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: re2
Gerrit-Branch: main
Gerrit-Change-Id: I37603555d831bd4051b88b46542bfdd0f344776d
Gerrit-Change-Number: 63775
Gerrit-PatchSet: 1
Gerrit-Owner: Russ Cox <r...@swtch.com>
Gerrit-Reviewer: Alan Donovan <adon...@google.com>
Gerrit-Attention: Russ Cox <r...@swtch.com>
Gerrit-Comment-Date: Wed, 30 Jul 2025 16:10:18 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
satisfied_requirement
open
diffy

Russ Cox (Gerrit)

unread,
Jul 30, 2025, 12:29:58 PMJul 30
to re2...@googlegroups.com
Attention needed from Alan Donovan and Russ Cox

Russ Cox uploaded new patchset

Russ Cox uploaded patch set #3 to this change.
Following approvals got outdated and were removed:
  • Code-Review: +2 by Alan Donovan
Open in Gerrit

Related details

Attention is currently required from:
  • Alan Donovan
  • Russ Cox
Submit Requirements:
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: newpatchset
    Gerrit-Project: re2
    Gerrit-Branch: main
    Gerrit-Change-Id: I37603555d831bd4051b88b46542bfdd0f344776d
    Gerrit-Change-Number: 63775
    Gerrit-PatchSet: 3
    Gerrit-Owner: Russ Cox <r...@swtch.com>
    Gerrit-Reviewer: Alan Donovan <adon...@google.com>
    Gerrit-Attention: Alan Donovan <adon...@google.com>
    Gerrit-Attention: Russ Cox <r...@swtch.com>
    unsatisfied_requirement
    open
    diffy

    Russ Cox (Gerrit)

    unread,
    Jul 30, 2025, 12:32:24 PMJul 30
    to Alan Donovan, re2...@googlegroups.com
    Attention needed from Alan Donovan

    Russ Cox added 8 comments

    Patchset-level comments
    File-level comment, Patchset 3 (Latest):
    Russ Cox . resolved

    Thanks for the careful review. I was not as careful copying the text off the wiki.

    File README.md
    Line 7, Patchset 1:_**Safety is RE2's raison d'être.**_
    Alan Donovan . resolved

    "primary goal"?

    (r always urged me to use only English.)

    Russ Cox

    Done

    Line 14, Patchset 1:by working within a configurable budget – failing gracefully when exhausted –
    Alan Donovan . resolved

    No spaces around em dashes.

    Russ Cox

    Done

    Line 18, Patchset 1:Although RE2 guarantees linear-time performance, the linear-time constant
    varies depending on the overhead entailed by safe handling of the regular expression.
    Alan Donovan . resolved

    awkward?

    Perhaps:

    Although RE2 guarantees a running time that is asymptotically linear in the length of the input, more complex expressions may incur larger constant factors.

    (Though this does raise the question whether DoS is possible by making the expression sufficiently complex.)

    Russ Cox

    Done

    Line 20, Patchset 1:In a sense, RE2 behaves pessimistically whereas backtracking engines behave optimistically,
    so it can be outperformed in various situations.
    Alan Donovan . resolved

    Perhaps elaborate to something like:

    In a sense, RE2 is pessimistic where a backtracking engine is optimistic:
    A backtracking engine tests each alternative sequentially, making it fast when the first alternative is common. By contrast RE2 evaluates all alternatives in parallel, avoiding the performance penalty for the last alternative, at the cost of some overhead. This pessimism is what makes RE2 secure.

    Russ Cox

    Done

    Line 120, Patchset 1:For example, the predefined `Quiet` options silence error
    message printing when a regular expression fails to parse:
    Alan Donovan . resolved

    6 nouns? Hard to parse.

    Russ Cox

    Done

    Line 221, Patchset 1:RE2's native language is C++.
    Alan Donovan . resolved

    implementation

    or "is implemented in"

    Russ Cox

    Done

    Line 244, Patchset 1:
    Alan Donovan . resolved

    The heading promises ports but then lists only wrappers.

    Mention:

    ?

    Russ Cox

    Done

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Alan Donovan
    Submit Requirements:
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: re2
    Gerrit-Branch: main
    Gerrit-Change-Id: I37603555d831bd4051b88b46542bfdd0f344776d
    Gerrit-Change-Number: 63775
    Gerrit-PatchSet: 3
    Gerrit-Owner: Russ Cox <r...@swtch.com>
    Gerrit-Reviewer: Alan Donovan <adon...@google.com>
    Gerrit-Attention: Alan Donovan <adon...@google.com>
    Gerrit-Comment-Date: Wed, 30 Jul 2025 16:32:20 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Alan Donovan <adon...@google.com>
    unsatisfied_requirement
    open
    diffy

    Alan Donovan (Gerrit)

    unread,
    Jul 30, 2025, 12:52:10 PMJul 30
    to Russ Cox, re2...@googlegroups.com
    Attention needed from Russ Cox

    Alan Donovan voted and added 1 comment

    Votes added by Alan Donovan

    Code-Review+2

    1 comment

    File README.md
    Line 123, Patchset 3 (Latest):For example, `RE2::Quiet` silences the error message that are
    Alan Donovan . unresolved

    messages (plural)

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Russ Cox
    Submit Requirements:
    • requirement satisfiedCode-Review
    • requirement satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: re2
    Gerrit-Branch: main
    Gerrit-Change-Id: I37603555d831bd4051b88b46542bfdd0f344776d
    Gerrit-Change-Number: 63775
    Gerrit-PatchSet: 3
    Gerrit-Owner: Russ Cox <r...@swtch.com>
    Gerrit-Reviewer: Alan Donovan <adon...@google.com>
    Gerrit-Attention: Russ Cox <r...@swtch.com>
    Gerrit-Comment-Date: Wed, 30 Jul 2025 16:52:06 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    satisfied_requirement
    open
    diffy

    Russ Cox (Gerrit)

    unread,
    Jul 30, 2025, 1:09:31 PMJul 30
    to re2...@googlegroups.com
    Attention needed from Alan Donovan and Russ Cox

    Russ Cox uploaded new patchset

    Russ Cox uploaded patch set #4 to this change.
    Following approvals got outdated and were removed:
    • Code-Review: +2 by Alan Donovan
    Open in Gerrit

    Related details

    Attention is currently required from:
    • Alan Donovan
    • Russ Cox
    Submit Requirements:
      • requirement is not satisfiedCode-Review
      • requirement is not satisfiedReview-Enforcement
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: newpatchset
      Gerrit-Project: re2
      Gerrit-Branch: main
      Gerrit-Change-Id: I37603555d831bd4051b88b46542bfdd0f344776d
      Gerrit-Change-Number: 63775
      Gerrit-PatchSet: 4
      Gerrit-Owner: Russ Cox <r...@swtch.com>
      Gerrit-Reviewer: Alan Donovan <adon...@google.com>
      Gerrit-Attention: Alan Donovan <adon...@google.com>
      Gerrit-Attention: Russ Cox <r...@swtch.com>
      unsatisfied_requirement
      open
      diffy

      Russ Cox (Gerrit)

      unread,
      Jul 30, 2025, 1:11:31 PMJul 30
      to Alan Donovan, re2...@googlegroups.com
      Attention needed from Alan Donovan

      Russ Cox added 1 comment

      File README.md
      Line 123, Patchset 3:For example, `RE2::Quiet` silences the error message that are
      Alan Donovan . resolved

      messages (plural)

      Russ Cox

      Done but now you have to +2 again. Sorry.

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Alan Donovan
      Submit Requirements:
      • requirement is not satisfiedCode-Review
      • requirement is not satisfiedReview-Enforcement
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: comment
      Gerrit-Project: re2
      Gerrit-Branch: main
      Gerrit-Change-Id: I37603555d831bd4051b88b46542bfdd0f344776d
      Gerrit-Change-Number: 63775
      Gerrit-PatchSet: 3
      Gerrit-Owner: Russ Cox <r...@swtch.com>
      Gerrit-Reviewer: Alan Donovan <adon...@google.com>
      Gerrit-Attention: Alan Donovan <adon...@google.com>
      Gerrit-Comment-Date: Wed, 30 Jul 2025 17:11:29 +0000
      unsatisfied_requirement
      open
      diffy

      Alan Donovan (Gerrit)

      unread,
      Jul 30, 2025, 2:02:32 PMJul 30
      to Russ Cox, re2...@googlegroups.com
      Attention needed from Russ Cox

      Alan Donovan voted Code-Review+2

      Code-Review+2
      Open in Gerrit

      Related details

      Attention is currently required from:
      • Russ Cox
      Submit Requirements:
      • requirement satisfiedCode-Review
      • requirement satisfiedReview-Enforcement
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: comment
      Gerrit-Project: re2
      Gerrit-Branch: main
      Gerrit-Change-Id: I37603555d831bd4051b88b46542bfdd0f344776d
      Gerrit-Change-Number: 63775
      Gerrit-PatchSet: 4
      Gerrit-Owner: Russ Cox <r...@swtch.com>
      Gerrit-Reviewer: Alan Donovan <adon...@google.com>
      Gerrit-Attention: Russ Cox <r...@swtch.com>
      Gerrit-Comment-Date: Wed, 30 Jul 2025 18:02:28 +0000
      Gerrit-HasComments: No
      Gerrit-Has-Labels: Yes
      satisfied_requirement
      open
      diffy

      Russ Cox (Gerrit)

      unread,
      Jul 30, 2025, 2:31:54 PMJul 30
      to Alan Donovan, re2...@googlegroups.com

      Russ Cox submitted the change

      Change information

      Commit message:
      README.md: convert README to Markdown, expand

      The README is essentially unchanged since 2009. Update it:

      * Convert to Markdown.
      * Paste in a few wiki pages, which will change to redirect to the README.md:
      - https://github.com/google/re2/wiki/WhyRE2
      - https://github.com/google/re2/wiki/CplusplusAPI
      - https://github.com/google/re2/wiki/Install

      Also document recipes for using CMake and Bazel,
      neither of which was obvious to me.
      Change-Id: I37603555d831bd4051b88b46542bfdd0f344776d
      Files:
      • D README
      • A README.md
      Change size: L
      Delta: 2 files changed, 258 insertions(+), 47 deletions(-)
      Branch: refs/heads/main
      Submit Requirements:
      • requirement satisfiedCode-Review: +2 by Alan Donovan
      Open in Gerrit
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: merged
      Gerrit-Project: re2
      Gerrit-Branch: main
      Gerrit-Change-Id: I37603555d831bd4051b88b46542bfdd0f344776d
      Gerrit-Change-Number: 63775
      Gerrit-PatchSet: 5
      Gerrit-Owner: Russ Cox <r...@swtch.com>
      Gerrit-Reviewer: Alan Donovan <adon...@google.com>
      Gerrit-Reviewer: Russ Cox <r...@swtch.com>
      open
      diffy
      satisfied_requirement
      Reply all
      Reply to author
      Forward
      0 new messages