Skip to content

Instantly share code, notes, and snippets.

@Whateverable
Created March 23, 2020 20:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Whateverable/1971a5eb895e96ee7849051c73c1c3c6 to your computer and use it in GitHub Desktop.
Save Whateverable/1971a5eb895e96ee7849051c73c1c3c6 to your computer and use it in GitHub Desktop.
bisectable6
say ‘foo’.contains(/f./)
Bisecting: 5774 revisions left to test after this (roughly 13 steps)
[f8edb8295773acd41432e4f85424f5eb7245dbd7] Document test helpers
»»»»» Testing f8edb8295773acd41432e4f85424f5eb7245dbd7
»»»»» Script output:
Cannot resolve caller contains(Str: Regex); none of these signatures match:
(Str:D $: Cool:D $needle, *%_)
(Str:D $: Str:D $needle, *%_)
(Str:D $: Cool:D $needle, Cool:D $pos, *%_)
(Str:D $: Str:D $needle, Int:D $pos, *%_)
in block <unit> at /tmp/oSEmJ16Ma9 line 1
»»»»» Script exit code: 1
»»»»» Bisecting by exit code
»»»»» Current exit code is 1, exit code on “old” revision is 1
»»»»» Note that on “old” revision exit code is normally 0, you are probably trying to find when something was fixed
»»»»» If exit code is not the same as on “old” revision, this revision will be marked as “new”
»»»»» Therefore, marking this revision as “old”
»»»»» -------------------------------------------------------------------------
»»»»» Testing b84b0902c29c0bcda369b4e51fd9f82d20dcdc90
»»»»» Script output:
Cannot resolve caller contains(Str: Regex); none of these signatures match:
(Str:D: Cool:D $needle, *%_)
(Str:D: Str:D $needle, *%_)
(Str:D: Cool:D $needle, Cool:D $pos, *%_)
(Str:D: Str:D $needle, Int:D $pos, *%_)
in block <unit> at /tmp/oSEmJ16Ma9 line 1
»»»»» Script exit code: 1
»»»»» Bisecting by exit code
»»»»» Current exit code is 1, exit code on “old” revision is 1
»»»»» Note that on “old” revision exit code is normally 0, you are probably trying to find when something was fixed
»»»»» If exit code is not the same as on “old” revision, this revision will be marked as “new”
»»»»» Therefore, marking this revision as “old”
»»»»» -------------------------------------------------------------------------
»»»»» Testing 0365662eb026f5675ea157ace2e855321a765971
»»»»» Script output:
Cannot resolve caller contains(Str:D: Regex:D); none of these signatures match:
(Str:D: Cool:D $needle, *%_ --> Bool)
(Str:D: Str:D $needle, *%_ --> Bool)
(Str:D: Cool:D $needle, Int(Cool:D) $pos, *%_ --> Bool)
(Str:D: Str:D $needle, Int:D $pos, *%_ --> Bool)
in block <unit> at /tmp/oSEmJ16Ma9 line 1
»»»»» Script exit code: 1
»»»»» Bisecting by exit code
»»»»» Current exit code is 1, exit code on “old” revision is 1
»»»»» Note that on “old” revision exit code is normally 0, you are probably trying to find when something was fixed
»»»»» If exit code is not the same as on “old” revision, this revision will be marked as “new”
»»»»» Therefore, marking this revision as “old”
»»»»» -------------------------------------------------------------------------
»»»»» Testing 6bd0dd513fab4ba1ecc51b55546635103c86b771
»»»»» Script output:
Cannot resolve caller contains(Str:D: Regex:D); none of these signatures match:
(Cool:D: Cool:D $needle, *%_ --> Bool)
(Cool:D: Str:D $needle, *%_ --> Bool)
(Cool:D: Cool:D $needle, Int:D $pos, *%_ --> Bool)
(Cool:D: Str:D $needle, Int:D $pos, *%_ --> Bool)
(Cool:D: Cool:D $needle, Cool:D $pos, *%_ --> Bool)
(Cool:D: Str:D $needle, Cool:D $pos, *%_ --> Bool)
(Str:D: Cool:D $needle, *%_ --> Bool)
(Str:D: Str:D $needle, *%_ --> Bool)
(Str:D: Cool:D $needle, Int:D $pos, *%_ --> Bool)
(Str:D: Str:D $needle, Int:D $pos, *%_ --> Bool)
(Str:D: Cool:D $needle, Cool:D $pos, *%_ --> Bool)
(Str:D: Str:D $needle, Cool:D $pos, *%_ --> Bool)
in block <unit> at /tmp/oSEmJ16Ma9 line 1
»»»»» Script exit code: 1
»»»»» Bisecting by exit code
»»»»» Current exit code is 1, exit code on “old” revision is 1
»»»»» Note that on “old” revision exit code is normally 0, you are probably trying to find when something was fixed
»»»»» If exit code is not the same as on “old” revision, this revision will be marked as “new”
»»»»» Therefore, marking this revision as “old”
»»»»» -------------------------------------------------------------------------
»»»»» Testing 49aaa6ff3683e4cc849d9c6c0b740787ff59ae84
»»»»» Script output:
True
»»»»» Script exit code: 0
»»»»» Bisecting by exit code
»»»»» Current exit code is 0, exit code on “old” revision is 1
»»»»» Note that on “old” revision exit code is normally 0, you are probably trying to find when something was fixed
»»»»» If exit code is not the same as on “old” revision, this revision will be marked as “new”
»»»»» Therefore, marking this revision as “new”
»»»»» -------------------------------------------------------------------------
»»»»» Testing 19b820d8fe6166a00f71a10baebaea370b03dc02
»»»»» Script output:
Cannot resolve caller contains(Str:D: Regex:D); none of these signatures match:
(Cool:D: Cool:D $needle, *%_ --> Bool)
(Cool:D: Str:D $needle, *%_ --> Bool)
(Cool:D: Cool:D $needle, Int:D $pos, *%_ --> Bool)
(Cool:D: Str:D $needle, Int:D $pos, *%_ --> Bool)
(Cool:D: Cool:D $needle, Cool:D $pos, *%_ --> Bool)
(Cool:D: Str:D $needle, Cool:D $pos, *%_ --> Bool)
(Str:D: Cool:D $needle, *%_ --> Bool)
(Str:D: Str:D $needle, *%_ --> Bool)
(Str:D: Cool:D $needle, Int:D $pos, *%_ --> Bool)
(Str:D: Str:D $needle, Int:D $pos, *%_ --> Bool)
(Str:D: Cool:D $needle, Cool:D $pos, *%_ --> Bool)
(Str:D: Str:D $needle, Cool:D $pos, *%_ --> Bool)
in block <unit> at /tmp/oSEmJ16Ma9 line 1
»»»»» Script exit code: 1
»»»»» Bisecting by exit code
»»»»» Current exit code is 1, exit code on “old” revision is 1
»»»»» Note that on “old” revision exit code is normally 0, you are probably trying to find when something was fixed
»»»»» If exit code is not the same as on “old” revision, this revision will be marked as “new”
»»»»» Therefore, marking this revision as “old”
»»»»» -------------------------------------------------------------------------
»»»»» Testing 21b809745d6925949b20e93e51cf152027c600e2
»»»»» Script output:
Cannot resolve caller contains(Str:D: Regex:D); none of these signatures match:
(List:D: Str:D \needle, *%_)
(Cool:D: Cool:D $needle, *%_ --> Bool)
(Cool:D: Str:D $needle, *%_ --> Bool)
(Cool:D: Cool:D $needle, Int:D $pos, *%_ --> Bool)
(Cool:D: Str:D $needle, Int:D $pos, *%_ --> Bool)
(Cool:D: Cool:D $needle, Cool:D $pos, *%_ --> Bool)
(Cool:D: Str:D $needle, Cool:D $pos, *%_ --> Bool)
(Str:D: Cool:D $needle, *%_ --> Bool)
(Str:D: Str:D $needle, *%_ --> Bool)
(Str:D: Cool:D $needle, Int:D $pos, *%_ --> Bool)
(Str:D: Str:D $needle, Int:D $pos, *%_ --> Bool)
(Str:D: Cool:D $needle, Cool:D $pos, *%_ --> Bool)
(Str:D: Str:D $needle, Cool:D $pos, *%_ --> Bool)
in block <unit> at /tmp/oSEmJ16Ma9 line 1
»»»»» Script exit code: 1
»»»»» Bisecting by exit code
»»»»» Current exit code is 1, exit code on “old” revision is 1
»»»»» Note that on “old” revision exit code is normally 0, you are probably trying to find when something was fixed
»»»»» If exit code is not the same as on “old” revision, this revision will be marked as “new”
»»»»» Therefore, marking this revision as “old”
»»»»» -------------------------------------------------------------------------
»»»»» Testing e2a66ff61ce5921185789bc6bd087e275902c1ae
»»»»» Script output:
True
»»»»» Script exit code: 0
»»»»» Bisecting by exit code
»»»»» Current exit code is 0, exit code on “old” revision is 1
»»»»» Note that on “old” revision exit code is normally 0, you are probably trying to find when something was fixed
»»»»» If exit code is not the same as on “old” revision, this revision will be marked as “new”
»»»»» Therefore, marking this revision as “new”
»»»»» -------------------------------------------------------------------------
»»»»» Testing 5eb113b1c8e050aea1f07103183ca97c9c36f668
»»»»» Script output:
Cannot resolve caller contains(Str:D: Regex:D); none of these signatures match:
(List:D: Str:D \needle, *%_)
(Cool:D: Cool:D $needle, *%_ --> Bool)
(Cool:D: Str:D $needle, *%_ --> Bool)
(Cool:D: Cool:D $needle, Int:D $pos, *%_ --> Bool)
(Cool:D: Str:D $needle, Int:D $pos, *%_ --> Bool)
(Cool:D: Cool:D $needle, Cool:D $pos, *%_ --> Bool)
(Cool:D: Str:D $needle, Cool:D $pos, *%_ --> Bool)
(Str:D: Cool:D $needle, *%_ --> Bool)
(Str:D: Str:D $needle, *%_ --> Bool)
(Str:D: Cool:D $needle, Int:D $pos, *%_ --> Bool)
(Str:D: Str:D $needle, Int:D $pos, *%_ --> Bool)
(Str:D: Cool:D $needle, Cool:D $pos, *%_ --> Bool)
(Str:D: Str:D $needle, Cool:D $pos, *%_ --> Bool)
in block <unit> at /tmp/oSEmJ16Ma9 line 1
»»»»» Script exit code: 1
»»»»» Bisecting by exit code
»»»»» Current exit code is 1, exit code on “old” revision is 1
»»»»» Note that on “old” revision exit code is normally 0, you are probably trying to find when something was fixed
»»»»» If exit code is not the same as on “old” revision, this revision will be marked as “new”
»»»»» Therefore, marking this revision as “old”
»»»»» -------------------------------------------------------------------------
»»»»» Testing 076ef98bdb91903c004000f2aac4080f53a960bd
»»»»» Script output:
True
»»»»» Script exit code: 0
»»»»» Bisecting by exit code
»»»»» Current exit code is 0, exit code on “old” revision is 1
»»»»» Note that on “old” revision exit code is normally 0, you are probably trying to find when something was fixed
»»»»» If exit code is not the same as on “old” revision, this revision will be marked as “new”
»»»»» Therefore, marking this revision as “new”
»»»»» -------------------------------------------------------------------------
»»»»» Testing 89203438639bc60daf9eced0c69d66dbc5a61ae5
»»»»» Script output:
Cannot resolve caller contains(Str:D: Regex:D); none of these signatures match:
(List:D: Str:D \needle, *%_)
(Cool:D: Cool:D $needle, *%_ --> Bool)
(Cool:D: Str:D $needle, *%_ --> Bool)
(Cool:D: Cool:D $needle, Int:D $pos, *%_ --> Bool)
(Cool:D: Str:D $needle, Int:D $pos, *%_ --> Bool)
(Cool:D: Cool:D $needle, Cool:D $pos, *%_ --> Bool)
(Cool:D: Str:D $needle, Cool:D $pos, *%_ --> Bool)
(Str:D: Cool:D $needle, *%_ --> Bool)
(Str:D: Str:D $needle, *%_ --> Bool)
(Str:D: Cool:D $needle, Int:D $pos, *%_ --> Bool)
(Str:D: Str:D $needle, Int:D $pos, *%_ --> Bool)
(Str:D: Cool:D $needle, Cool:D $pos, *%_ --> Bool)
(Str:D: Str:D $needle, Cool:D $pos, *%_ --> Bool)
in block <unit> at /tmp/oSEmJ16Ma9 line 1
»»»»» Script exit code: 1
»»»»» Bisecting by exit code
»»»»» Current exit code is 1, exit code on “old” revision is 1
»»»»» Note that on “old” revision exit code is normally 0, you are probably trying to find when something was fixed
»»»»» If exit code is not the same as on “old” revision, this revision will be marked as “new”
»»»»» Therefore, marking this revision as “old”
»»»»» -------------------------------------------------------------------------
»»»»» Testing d75a703fda4a10bd8fdb25a00a806549823fdbd8
»»»»» Script output:
Cannot resolve caller contains(Str:D: Regex:D); none of these signatures match:
(List:D: Str:D \needle, *%_)
(Cool:D: Cool:D $needle, *%_ --> Bool)
(Cool:D: Str:D $needle, *%_ --> Bool)
(Cool:D: Cool:D $needle, Int:D $pos, *%_ --> Bool)
(Cool:D: Str:D $needle, Int:D $pos, *%_ --> Bool)
(Cool:D: Cool:D $needle, Cool:D $pos, *%_ --> Bool)
(Cool:D: Str:D $needle, Cool:D $pos, *%_ --> Bool)
(Str:D: Cool:D $needle, *%_ --> Bool)
(Str:D: Str:D $needle, *%_ --> Bool)
(Str:D: Cool:D $needle, Int:D $pos, *%_ --> Bool)
(Str:D: Str:D $needle, Int:D $pos, *%_ --> Bool)
(Str:D: Cool:D $needle, Cool:D $pos, *%_ --> Bool)
(Str:D: Str:D $needle, Cool:D $pos, *%_ --> Bool)
in block <unit> at /tmp/oSEmJ16Ma9 line 1
»»»»» Script exit code: 1
»»»»» Bisecting by exit code
»»»»» Current exit code is 1, exit code on “old” revision is 1
»»»»» Note that on “old” revision exit code is normally 0, you are probably trying to find when something was fixed
»»»»» If exit code is not the same as on “old” revision, this revision will be marked as “new”
»»»»» Therefore, marking this revision as “old”
»»»»» -------------------------------------------------------------------------
»»»»» Testing 495ddcc1ffcb9d652e555608cb60b2cc166a916e
»»»»» Script output:
True
»»»»» Script exit code: 0
»»»»» Bisecting by exit code
»»»»» Current exit code is 0, exit code on “old” revision is 1
»»»»» Note that on “old” revision exit code is normally 0, you are probably trying to find when something was fixed
»»»»» If exit code is not the same as on “old” revision, this revision will be marked as “new”
»»»»» Therefore, marking this revision as “new”
»»»»» -------------------------------------------------------------------------
»»»»» Testing c3c5dae1230dda41fca5e3ecce5616f2367ba17c
»»»»» Script output:
True
»»»»» Script exit code: 0
»»»»» Bisecting by exit code
»»»»» Current exit code is 0, exit code on “old” revision is 1
»»»»» Note that on “old” revision exit code is normally 0, you are probably trying to find when something was fixed
»»»»» If exit code is not the same as on “old” revision, this revision will be marked as “new”
»»»»» Therefore, marking this revision as “new”
c3c5dae1230dda41fca5e3ecce5616f2367ba17c is the first new commit
commit c3c5dae1230dda41fca5e3ecce5616f2367ba17c
Author: Elizabeth Mattijsen <liz@wenzperl.nl>
Date: Thu Feb 6 19:54:28 2020 +0100
Add support for Str.contains(Regex)
- quickly return whether a Regex will match a string at least once
- does not create any Match objects, so relatively fast
- had to move some initializations up to the top of the file
:040000 040000 3eed32d7593e836917a1244830514c7546bff733 c4f62dbfad871931ab4cb2abbc69244c6645b08f M src
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment