Skip to content

Conversation

@eduardbme
Copy link
Contributor

@eduardbme eduardbme commented Nov 1, 2022

For #40329

@gopherbot
Copy link
Contributor

This PR (HEAD: 3e09043) has been imported to Gerrit for code review.

Please visit https://go-review.googlesource.com/c/go/+/446836 to see it.

Tip: You can toggle comments from me using the comments slash command (e.g. /comments off)
See the Wiki page for more info

@ZekeLu
Copy link
Contributor

ZekeLu commented Nov 1, 2022

See https://github.com/golang/go/wiki/CommitMessage.

@eduardbme eduardbme changed the title regexp: improve ReplaceAllString documentation related to Expand part doc: improve re.ReplaceAllString documentation related to Expand part Nov 1, 2022
@eduardbme eduardbme force-pushed the doc-regexp-replace-all-string-expand branch from 3e09043 to 8e3ce98 Compare November 1, 2022 12:23
@gopherbot
Copy link
Contributor

This PR (HEAD: 8e3ce98) has been imported to Gerrit for code review.

Please visit https://go-review.googlesource.com/c/go/+/446836 to see it.

Tip: You can toggle comments from me using the comments slash command (e.g. /comments off)
See the Wiki page for more info

@eduardbme eduardbme force-pushed the doc-regexp-replace-all-string-expand branch from 8e3ce98 to b844347 Compare July 26, 2023 16:55
@gopherbot
Copy link
Contributor

This PR (HEAD: b844347) has been imported to Gerrit for code review.

Please visit Gerrit at https://go-review.googlesource.com/c/go/+/446836.

Important tips:

  • Don't comment on this PR. All discussion takes place in Gerrit.
  • You need a Gmail or other Google account to register for Gerrit.
  • To change your code in response to feedback:
    • Push a new commit to the branch used by your GitHub PR.
    • A new "patch set" will then appear in Gerrit.
    • Respond to each comment by marking as Done in Gerrit if implemented as suggested. You can alternatively write a reply.
    • Critical: you must click the blue Reply button near the top to publish your Gerrit responses.
    • Multiple commits in the PR will be squashed by GerritBot.
  • The title and description of the GitHub PR are used to construct the final commit message.
    • Edit these as needed via the GitHub web interface (not via Gerrit or git).
    • You should word wrap the PR description at ~76 characters unless you need longer lines (e.g., for tables or URLs).
  • See the Sending a change via GitHub and Reviews sections of the Contribution Guide as well as the FAQ for details.

@eduardbme eduardbme changed the title doc: improve re.ReplaceAllString documentation related to Expand part regexp: improve Regexp.ReplaceAllString documentation related to Expand part Jul 26, 2023
@gopherbot
Copy link
Contributor

Message from Ian Lance Taylor:

Patch Set 4:

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/446836.
After addressing review feedback, remember to publish your drafts!

@eduardbme eduardbme force-pushed the doc-regexp-replace-all-string-expand branch from b844347 to 57837ab Compare July 28, 2023 16:26
@gopherbot
Copy link
Contributor

This PR (HEAD: 57837ab) has been imported to Gerrit for code review.

Please visit Gerrit at https://go-review.googlesource.com/c/go/+/446836.

Important tips:

  • Don't comment on this PR. All discussion takes place in Gerrit.
  • You need a Gmail or other Google account to register for Gerrit.
  • To change your code in response to feedback:
    • Push a new commit to the branch used by your GitHub PR.
    • A new "patch set" will then appear in Gerrit.
    • Respond to each comment by marking as Done in Gerrit if implemented as suggested. You can alternatively write a reply.
    • Critical: you must click the blue Reply button near the top to publish your Gerrit responses.
    • Multiple commits in the PR will be squashed by GerritBot.
  • The title and description of the GitHub PR are used to construct the final commit message.
    • Edit these as needed via the GitHub web interface (not via Gerrit or git).
    • You should word wrap the PR description at ~76 characters unless you need longer lines (e.g., for tables or URLs).
  • See the Sending a change via GitHub and Reviews sections of the Contribution Guide as well as the FAQ for details.

@eduardbme eduardbme changed the title regexp: improve Regexp.ReplaceAllString documentation related to Expand part regexp: improve Regexp.ReplaceAll documentation and tests related to Expand part Jul 28, 2023
@gopherbot
Copy link
Contributor

Message from Eduard Bondarenko:

Patch Set 6:

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/446836.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Ian Lance Taylor:

Patch Set 6:

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/446836.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Eduard Bondarenko:

Patch Set 6:

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/446836.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Ian Lance Taylor:

Patch Set 6:

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/446836.
After addressing review feedback, remember to publish your drafts!

@eduardbme eduardbme force-pushed the doc-regexp-replace-all-string-expand branch from 57837ab to c017d4c Compare August 1, 2023 14:45
@gopherbot
Copy link
Contributor

This PR (HEAD: c017d4c) has been imported to Gerrit for code review.

Please visit Gerrit at https://go-review.googlesource.com/c/go/+/446836.

Important tips:

  • Don't comment on this PR. All discussion takes place in Gerrit.
  • You need a Gmail or other Google account to register for Gerrit.
  • To change your code in response to feedback:
    • Push a new commit to the branch used by your GitHub PR.
    • A new "patch set" will then appear in Gerrit.
    • Respond to each comment by marking as Done in Gerrit if implemented as suggested. You can alternatively write a reply.
    • Critical: you must click the blue Reply button near the top to publish your Gerrit responses.
    • Multiple commits in the PR will be squashed by GerritBot.
  • The title and description of the GitHub PR are used to construct the final commit message.
    • Edit these as needed via the GitHub web interface (not via Gerrit or git).
    • You should word wrap the PR description at ~76 characters unless you need longer lines (e.g., for tables or URLs).
  • See the Sending a change via GitHub and Reviews sections of the Contribution Guide as well as the FAQ for details.

@gopherbot
Copy link
Contributor

Message from Eduard Bondarenko:

Patch Set 6:

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/446836.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Ian Lance Taylor:

Patch Set 7: Run-TryBot+1


Please don’t reply on this GitHub thread. Visit golang.org/cl/446836.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Gopher Robot:

Patch Set 7:

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/446836.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Gopher Robot:

Patch Set 7: TryBot-Result+1

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/446836.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Eduard Bondarenko:

Patch Set 7:

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/446836.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Ian Lance Taylor:

Patch Set 7:

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/446836.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Ian Lance Taylor:

Patch Set 7: Auto-Submit+1 Code-Review+2 Run-TryBot+1


Please don’t reply on this GitHub thread. Visit golang.org/cl/446836.
After addressing review feedback, remember to publish your drafts!

@gopherbot
Copy link
Contributor

Message from Eduard Bondarenko:

Patch Set 7:

(1 comment)


Please don’t reply on this GitHub thread. Visit golang.org/cl/446836.
After addressing review feedback, remember to publish your drafts!

gopherbot pushed a commit that referenced this pull request Aug 7, 2023
…Expand part

For #40329

Change-Id: Ie0cb337545ce39cd169129227c45f7d2eaebc898
GitHub-Last-Rev: c017d4c
GitHub-Pull-Request: #56507
Reviewed-on: https://go-review.googlesource.com/c/go/+/446836
Reviewed-by: Michael Knyszek <mknyszek@google.com>
Run-TryBot: Ian Lance Taylor <iant@google.com>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
@gopherbot
Copy link
Contributor

This PR is being closed because golang.org/cl/446836 has been merged.

@gopherbot gopherbot closed this Aug 7, 2023
gopherbot pushed a commit to golang/oscar that referenced this pull request Oct 6, 2025
text-embedding-004 is deprecated and will stop working in January 2026,
so switch to gemini-embedding-001.

The results are better in some ways and worse in others.
They should work about the same for the related issues feature,
although we may want to adjust the thresholds after a few days
of seeing how the new embeddings do for real usage.

Before:

> regexp issue about adding iterators
^D

 0.67100 golang/go#61902 # proposal: regexp: add iterator forms of matching methods
 0.67000 golang/go#351 # Regexp can't handle lazy quantifiers
 0.66900 golang/go#43332 # regexp: Repeated capture groups only capturing final captured match.
 0.66300 golang/go#64108 # regexp: Documentation doesn't mention that (?<name>...) capturing group syntax isn't currently supported
 0.65500 golang/go#56507 # regexp: improve Regexp.ReplaceAll documentation and tests related to Expand part

> proposal: regexp: add iterator forms of matching methods
^D

 0.75600 golang/go#61902 # proposal: regexp: add iterator forms of matching methods
 0.67000 golang/go#21463 # proposal: regexp: Optimize fixed-length patterns
 0.66700 golang/go#54047 # proposal: Go 2: add a new iterator syntax, package, interfaces
 0.66100 golang/go#43557 # proposal: Go 2: function values as iterators
 0.65500 golang/go#65742 # proposal: Go 2: range-over-function + range over types implementing iterator interface

> We propose to add methods to regexp that allow iterating over matches instead of having to accumulate all the matches into a slice.

This is one of a collection of proposals updating the standard library for the new 'range over function' feature (#61405). It would only be accepted if that proposal is accepted. See golang/oscar#61897 for a list of related proposals.

Regexp has a lot of methods that return slices of all matches (the “FindAll*” methods). Each should have an iterator equivalent that doesn’t build the slice. They can be named by removing the “Find” prefix. The docs would change as follows. (Plain text is unchanged; strikethrough is removed, bold is added):
^D

 0.86400 golang/go#61902 # proposal: regexp: add iterator forms of matching methods
 0.71700 https://go.dev/wiki/RangefuncExperiment#can-you-provide-more-motivation-for-range-over-functions # Go Wiki: Rangefunc Experiment > Can you provide more motivation for range over functions?
 0.69100 golang/go#61901 # bytes, strings: add iterator forms of existing functions
 0.68800 golang/go#61899 # slices: add iterator-related functions
 0.68200 https://go.dev/pkg/regexp/?m=old#Regexp.FindAll # Package regexp > type Regexp > func (*Regexp) FindAll

After:

> regexp issue about adding iterators
^D

 0.76400 golang/go#50650 # regexp: add the missing is
 0.71900 golang/go#17146 # How about add MatchStrings() in regexp meet match string more than one?
 0.71200 golang/go#56973 # regexp: add comment in example test describing tricky behavior
 0.69700 golang/go#61902 # proposal: regexp: add iterator forms of matching methods
 0.69500 golang/go#63350 # regexp/syntax: use min func

> proposal: regexp: add iterator forms of matching methods
^D

 0.87400 golang/go#61902 # proposal: regexp: add iterator forms of matching methods
 0.77400 golang/go#61901 # bytes, strings: add iterator forms of existing functions
 0.76400 golang/go#24208 # proposal: regexp: Add functions to the Regexp type to ease accessing named capture groups
 0.76300 golang/go#32881 # regexp: Named captures should appear in a hashmap
 0.76000 golang/go#66631 # proposal: reflect: Add Type.Fields() iter.Seq[StructField] and Type.Methods() iter.Seq[Method]

> We propose to add methods to regexp that allow iterating over matches instead of having to accumulate all the matches into a slice.

This is one of a collection of proposals updating the standard library for the new 'range over function' feature (#61405). It would only be accepted if that proposal is accepted. See golang/oscar#61897 for a list of related proposals.

Regexp has a lot of methods that return slices of all matches (the “FindAll*” methods). Each should have an iterator equivalent that doesn’t build the slice. They can be named by removing the “Find” prefix. The docs would change as follows. (Plain text is unchanged; strikethrough is removed, bold is added):
^D

 0.94900 golang/go#61902 # proposal: regexp: add iterator forms of matching methods
 0.86200 golang/go#61901 # bytes, strings: add iterator forms of existing functions
 0.83600 golang/go#61899 # slices: add iterator-related functions
 0.83100 golang/go#61897 # iter: new package for iterators
 0.81100 golang/go#62113 # proposal: x/net/html: add Node.All(), Node.ChildNodes(), Nodes.Parents() iterators

Change-Id: Ic6ce353588b62ba7bae12562378b012d18e5feb2
Reviewed-on: https://go-review.googlesource.com/c/oscar/+/708880
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Tatiana Bradley <tatianabradley@google.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants