Skip to content

Instantly share code, notes, and snippets.

@Whateverable
Created July 7, 2022 10:29
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/1882c62cd9c3393763a6ced32852ee82 to your computer and use it in GitHub Desktop.
Save Whateverable/1882c62cd9c3393763a6ced32852ee82 to your computer and use it in GitHub Desktop.
bisectable6
old=2020.01 my Str(Int) $a := 42; dd $a.^name
Bisecting: 1727 revisions left to test after this (roughly 11 steps)
[00ecefb85e8c580ee99f2dd5a607c91a6bf5dc7a] Merge pull request #4166 from patrickbkr/proc-arg0
»»»»» Testing 00ecefb85e8c580ee99f2dd5a607c91a6bf5dc7a
»»»»» Script output:
"Int"
»»»»» 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 8b94d8d27985c604c87c9730735c14ca565646e7
»»»»» Script output:
===SORRY!=== Error while compiling /tmp/AazgIQd8fi
Coercion Str(Int) is insufficiently type-like to qualify a variable
at /tmp/AazgIQd8fi:1
------> my Str(Int) $a⏏ := 42; dd $a.^name
expecting any of:
constraint
»»»»» 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 93503c24b45c7d50827d060a0c11ed01fb114308
»»»»» Script output:
===SORRY!=== Error while compiling /tmp/AazgIQd8fi
Coercion 'Str(Int)' is insufficiently type-like to qualify a variable.
Did you mean 'class'?
at /tmp/AazgIQd8fi:1
------> my Str(Int) $a⏏ := 42; dd $a.^name
expecting any of:
constraint
»»»»» 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 ce45754dca7bead43fb705020f817eded990a5ef
»»»»» Script output:
"Int"
»»»»» 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 5cbe14e8c8c11dc840c9bcea4e91b5e800b13ad0
»»»»» Script output:
===SORRY!=== Error while compiling /tmp/AazgIQd8fi
Coercion 'Str(Int)' is insufficiently type-like to qualify a variable.
Did you mean 'class'?
at /tmp/AazgIQd8fi:1
------> my Str(Int) $a⏏ := 42; dd $a.^name
expecting any of:
constraint
»»»»» 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 e074f3c5629541f12ab2882b6550fd6d35e5b298
»»»»» Script output:
"Int"
»»»»» 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 1dd99ef1d28a362339aaf75065993ee154fa4268
»»»»» Script output:
"Int"
»»»»» 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 ea2fdd2f039889db81f94f2c243b50e1b30317c0
»»»»» Script output:
"Int"
»»»»» 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 2a5dd9e6ec55bb7f28341af2a9d399564e1b23ee
»»»»» Script output:
===SORRY!=== Error while compiling /tmp/AazgIQd8fi
Coercion 'Str(Int)' is insufficiently type-like to qualify a variable.
Did you mean 'class'?
at /tmp/AazgIQd8fi:1
------> my Str(Int) $a⏏ := 42; dd $a.^name
expecting any of:
constraint
»»»»» 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 81f3334a6e38517641b1765bd7b635c6d0857e79
»»»»» Script output:
CoercionHOW.compose(Str(Int)|94253767537776) Str Int
"Int"
»»»»» 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 2675813fd2c63f65938a9940ad1734d47fa6a940
»»»»» Script output:
CoercionHOW.compose(Str(Int)|94093394895072) Str Int
"Int"
»»»»» 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 f2d73287f95ad6fa9eba8856ad15f3e8f9076d6e
»»»»» Script output:
CoercionHOW.compose(Str(Int)|94796716790528) Str Int
"Int"
»»»»» 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”
f2d73287f95ad6fa9eba8856ad15f3e8f9076d6e is the first new commit
commit f2d73287f95ad6fa9eba8856ad15f3e8f9076d6e
Author: Vadim Belman <vrurg@lflat.org>
Date: Fri Aug 28 22:11:02 2020 -0400
The first draft of new coercion semantics
This is a research work inspired by rakudo/rakudo#1285. The following
changes are included:
- Coerions are made first-class type objects. It's now possible to pass
a coercion around normally. Non-instantiable though akin to definites
and subsets.
- A parameter is now marked as `coercive` if its type is a coerce.
- Coercions redelegate method calls to their target type.
- Coercions type checks almost as they should. This is a temporary
situation. Yet, `Str ~~ Int(Str)` is `True`, and 'Rat ~~ Int(Str)` is
`False`.
- Coercions are nominalizable. Nominalize into the target type.
Aside of these, coercion protocol is introduced. If `coerce` method of
`Metamodel::CoercionHOW` is used for `Foo(Bar)` then the following
methods are tried in the order of mentioning:
- the current standard of `Bar.Foo`
- `Bar.COERCE-INTO(Foo)`
- `Foo.COERCE-FROM(Bar)`
Considering the discussion in Raku/problem-solving#137, the last one is
the fallback of despair because, as was mentioned in the ticket, `Foo`
might not have full information about `Bar` state and thus may not
result in proper coercion. But the approach is safe to use for coercing
from simple type objects. And in any case I think it is better to have
something than have nothing and be forced to use augmentation.
In either case, the use of `COERCE-*` methods allows to handle types
with compound names without the risk of name clashes if short names of
two or more type objects match.
:040000 040000 d719b03ef59653662aafd8dc78976bded46dce15 cd2cc70f15fe1f818d16ca952172fc4541c13d12 M src
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment