🦋 Welcome to the IRC channel of the core developers of the Raku Programming Language (raku.org #rakulang). This channel is logged for the purpose of history keeping about its development | evalbot usage: 'm: say 3;' or /msg camelia m: ... | Logs available at irclogs.raku.org/raku-dev/live.html | For MoarVM see #moarvm Set by lizmat on 8 June 2022. |
|||
00:00
reportable6 left
00:01
reportable6 joined
01:42
raschip joined
|
|||
jdv | i ran blin yday. took 4h and had 20 or so possible issues... | 02:15 | |
might need to defer release but i havent gotten to digging yet so who knows. | 02:16 | ||
02:42
evalable6 left,
linkable6 left
02:44
evalable6 joined
02:45
linkable6 joined
02:51
raschip left
03:52
MasterDuke joined
06:00
reportable6 left
06:02
reportable6 joined
06:49
dogbert17 joined
06:52
dogbert11 left
|
|||
Geth | rakudo/main: 6f1b0fe7d1 | (Stefan Seifert)++ | 3 files RakuAST: Fix SETTING:: in v6.e still finding CORE.d 6.e has a replacement PseudoStash class that also needed adjusting for finding the setting frame from a RakuAST compiled comp unit. Because the implementation differs, replace the previous solution with a more reliable one, i.e. add another marker to the unit frame's lexpad. This marker can be removed once we switch to RakuAST completely (with support for the old frontend then removed from PseudoStash) |
08:37 | |
nine | And this brings us to 127 make test files passing :) | ||
Only 12 failing files remaining. 2 because we don't support subsets yet, 2 because of react being NYI. 2 because POD variables (i.e. $=pod) aren't implemented yet. | 08:43 | ||
09:40
NemokoschKiwi joined
09:46
NemokoschKiwi left
10:08
sena_kun joined
|
|||
releasable6 | Next release in ≈3 days and ≈7 hours. There are no known blockers. Please log your changes in the ChangeLog: github.com/rakudo/rakudo/wiki/ChangeLog-Draft | 11:00 | |
11:06
raschip joined
|
|||
Geth | rakudo/main: 7a6c3095ed | MasterDuke17++ (committed using GitHub Web editor) | src/core.c/Rakudo/QuantHash.pm6 Micro-optimize ADD-PAIRS-TO-BAG|MIX Benchmark (say "big.txt".IO.slurp.lc.words.Bag.elems, where "big.txt" has 75,161 words and is 6.2mb) drops from ~0.97s to ~0.92s and from ~7.5b instructions to ~7.2b instructions. |
11:41 | |
lizmat | nine: is it correct I see breakage in the use of SETTING:: in non-RAKUDO_RAKUAST context? | 11:46 | |
"ctxlexpad needs an MVMContext" | |||
nine | Oh, apparently I forgot to run a non-RakuAST spectest :/ and test didn't catch this... | 11:52 | |
12:00
reportable6 left,
reportable6 joined
|
|||
Geth | rakudo/main: b21cd61c04 | (Stefan Seifert)++ | src/core.c/PseudoStash.pm6 Fix "ctxlexpad needs an MVMContext" regression in SETTING:: Apparently the context can be null |
12:02 | |
rakudo/main: 500508664f | (Elizabeth Mattijsen)++ | 3 files Introduce $*EXIT / $*EXCEPTION dynamic vars Basically the implementation of github.com/rakudo/rakudo/pull/5014 without a commit with a lot of noise. |
12:27 | ||
Nemokosch | hah, I build a triple every second day to keep up with the changes 😄 | 12:55 | |
Geth | rakudo/main: b81103d99a | (Elizabeth Mattijsen)++ | tools/templates/NQP_REVISION Bump NQP to get JVM fixes |
13:09 | |
lizmat | notable6: weekly | 14:14 | |
notable6 | lizmat, 1 note: 2023-01-30T20:25:08Z <raschip>: new fez release | ||
lizmat | notable6: weekly reset | ||
notable6 | lizmat, Moved existing notes to “weekly_2023-01-31T14:14:36Z” | ||
14:49
linkable6 left,
evalable6 left
14:51
evalable6 joined,
linkable6 joined
14:59
ab5tract joined
|
|||
lizmat | and yet another Rakudo Weekly News hits the Net: rakudoweekly.blog/2023/01/31/2023-...b-awarded/ | 15:12 | |
15:40
dogbert11 joined
15:42
dogbert12 joined,
dogbert17 left
15:45
dogbert11 left
15:51
dogbert17 joined
15:52
dogbert11 joined,
dogbert12 left
15:56
dogbert17 left
16:12
dogbert17 joined
16:13
dogbert11 left
16:16
dogbert17 left
18:00
reportable6 left
18:01
sena_kun left
18:03
reportable6 joined
18:04
sena_kun joined
18:30
raschip left
19:09
NemokoschKiwi joined
|
|||
gfldex | m: sub foo(str $s) { say $s.WHAT }; multi sub bar(str $s) { say $s.WHAT }; foo("abc"); bar("abc"); | 19:16 | |
camelia | (Str) Cannot resolve caller bar(Str:D); none of these signatures matches: (str $s) in block <unit> at <tmp> line 1 |
||
gfldex | only one of them can be right, right? | ||
nine | Multis are pickier. Or rather with only subs we try harder to shove the args into the signature. | 19:18 | |
lizmat | nope, they're both right :-) | ||
because you can dispatch on str and Str differently | |||
whereas the only sub with the str signature *will* accept Str as well | 19:19 | ||
because it can | |||
gfldex | Because it's a compile time decision. | ||
lizmat | no, runtime ? | 19:23 | |
m: multi a(str $a) { dd }; multi a(Str $a) { dd }; a "foo" | 19:24 | ||
camelia | sub a(Str $a) | ||
gfldex | Well, then I'm confused. | ||
lizmat | m: multi a(str $a) { dd }; multi a(Str $a) { dd }; a my str $ = "foo" | ||
camelia | sub a(str $a) | ||
lizmat | note that it dispatched differently on "foo" (Str:D) and a native str "foo" | 19:25 | |
gfldex | I'm not surprised that happens. I didn't expect the inconsitency between single and multi dispatch. | 19:26 | |
Nemokosch | same | 19:30 | |
why "can" it accept Str as well? | 19:31 | ||
oops, wrong question | |||
nevermind | |||
lizmat | if the "inconsistency" wouldn't exist, you wouldn't be able to dispatch on str *and* Str in the same multi | 19:32 | |
*or* you wouldn't be able to call a block with a literal string if the parameter was a native string | 19:33 | ||
Nemokosch | m: multi f(str $s) { "ok" }; say f "yes"; | ||
lizmat | and vice-versa | ||
Raku eval | ok | ||
Nemokosch | ^this I find interesting, though | ||
here, it looks like it could dispatch straight to str | 19:34 | ||
for only vs multi sub, let's say, that seems pragmatic | 19:35 | ||
but why does the multi match when there's only one argument? | |||
oh, this is the same thing that we already discovered today... | 19:37 | ||
$s itself is the failure, I guess | |||
hm, this seems trickier though | 19:38 | ||
m: 'multi sub bar(str $s) { $s.^name.say }; bar("abc") | 19:39 | ||
Raku eval | Exit code: 1 ===SORRY!=== Error while compiling /home/glot/main.raku Unable to parse expression in single quotes; couldn't find final "'" (corresponding starter was at line 1) at /home/glot/main.raku:1 ------> bar(str $s) { $s.^name.say }; bar("abc")⏏<EOL> expecting any of: single quotes statement list term | ||
Nemokosch | yuck | ||
m: multi sub bar(str $s) { $s.^name.say }; bar("abc") | |||
Raku eval | Str | ||
Nemokosch | m: multi sub bar(str $s) { $s.Str.say }; bar("abc") | ||
Raku eval | abc | ||
Nemokosch | okay, this is kinda crazy | 19:40 | |
so it referred to itself as an Str | 19:41 | ||
m: multi sub bar(str $s) { $s.say }; bar("abc") | |||
Raku eval | abc | ||
Nemokosch | this is where one would stop, it's a normal string, period | ||
m: multi sub bar(str $s) { say $s}; bar("abc") | |||
Raku eval | Exit code: 1 Cannot resolve caller bar(Str:D); none of these signatures matches: (str $s) in block <unit> at main.raku line 1 | ||
Nemokosch | WAT | ||
gfldex | m: say 'abc' ~~ str; | 19:42 | |
camelia | False | ||
Nemokosch | how does it explode with say $s, claiming failed dispatch, but succeeds with $s.say just perfectly? | ||
lizmat | native strings are just bytes in memory. .WHAT on it will upgrade | 19:46 | |
they're not objects, they pretend to be objects by automatically upgrading when necessary | |||
like having .WHAT called on them | |||
Nemokosch | ... or .say called on them | ||
okay, gotcha. It's way less than awesome though, that it retrospectively lies that it was the dispatch that failed? | 19:47 | ||
Xliff | m: multi sub bar (Str $s) { say $s}; bar("abc") | ||
camelia | abc | ||
Nemokosch | kindof a heisen-error | ||
Xliff | str !=:= Str | ||
str !=:= Str | 19:48 | ||
lizmat | but there's a str inside of a Str :-) | ||
Xliff | Exactly! :) | ||
Nemokosch | the dispatch did not fail; the code did start executing | ||
maybe it should have failed but one thing it certainly shouldn't have done is start to execute the code, and then lie that there was no candidate to choose | 19:49 | ||
to be honest, dispatch checks seem kind of fragile, like Int() $foo will be perfectly fine until the second you actually perform some operation on it, at which point you get the Failure it holds for you | 19:52 | ||
but this is an extreme; here, even the error message is wrong | 19:53 | ||
lizmat | m: sub a(Int() $a) { say "entered"; dd $a }; a "foo" # this feels like a bug to me | 19:55 | |
camelia | entered Failure.new(exception => X::Str::Numeric.new(source => "foo", pos => 0, reason => "base-10 number must begin with valid digits or '.'"), backtrace => Backtrace.new) |
||
lizmat | otoh, the accepting signature *is* Any | 19:56 | |
Nemokosch | the same way, I suppose Int(Str) could be argued for | 19:57 | |
lizmat | m: sub a(Int(Str) $a) { say "entered"; dd $a }; a "foo" # this feels like a bug to me | ||
camelia | entered Failure.new(exception => X::Str::Numeric.new(source => "foo", pos => 0, reason => "base-10 number must begin with valid digits or '.'"), backtrace => Backtrace.new) |
||
Nemokosch | then there seems to be nothing left with the current concept of coercions than to do a where clause check? | ||
20:23
dogbert17 joined
20:27
dogbert17 left
|
|||
Geth | nqp/cfa-doc-main: 2093cb6144 | cfa++ (committed using GitHub Web editor) | README.pod Update branch references in README.pod Replace references to `master` with `main`. dev.azure.com links left unchanged for now, as apparently `main` isn't currently being built there. |
20:34 | |
nqp: cfa++ created pull request #796: Update branch references in README.pod |
|||
Xliff | m: sub a(Int(Str) $a) { say "entered"; dd $a }; a "10" # this feels like a bug to me | 20:47 | |
camelia | entered 10 |
||
Xliff | m: sub a(Int(Str) $a) { say "entered"; dd $a }; a "1f" # this feels like a bug to me | ||
camelia | entered Failure.new(exception => X::Str::Numeric.new(source => "1f", pos => 1, reason => "trailing characters after number"), backtrace => Backtrace.new) |
||
Xliff | lizmat: ? | ||
lizmat | it's not, as the constraint is Str, and the result of the coercion to Int is bound to $a | 20:48 | |
Nemokosch | m: multi sub bar (str $s) { say $s}; bar("abc") | 20:50 | |
Raku eval | Exit code: 1 Cannot resolve caller bar(Str:D); none of these signatures matches: (str $s) in block <unit> at main.raku line 1 | ||
Nemokosch | this is still a different level of wrong though | ||
lizmat | why is it wrong? If you want to accept both Str and str as argument, you would have specified Str $s | 20:51 | |
m: multi sub bar (str $s) { say $s}; bar(my str $ = "abc") | |||
camelia | abc | ||
lizmat | m: multi sub bar (Str $s) { say $s}; bar(my str $ = "abc") | ||
camelia | abc | ||
Nemokosch | because the dispatch didn't actually fail | 20:55 | |
m: multi sub bar (str $s) { $s.say }; bar("abc") | 20:56 | ||
Raku eval | abc | ||
Nemokosch | at least not when you do ^this | ||
it's possible that the former is right and this one is wrong but they really cannot be right at the same time | |||
tried to disable spesh, didn't help, still wrong | 20:58 | ||
lizmat | nothing to do with spesh, this was a design decision | 21:00 | |
also: | |||
m: dd str.^mro | |||
camelia | (str, Str, Cool, Any, Mu) | ||
Nemokosch | that the dispatch will succeed if it looks into the code block and sees certain things? | ||
lizmat | so Str accepts str, but str does not accept Str | 21:01 | |
Nemokosch | it really feels like you just don't get what I'm desperately trying to point at | ||
like we are not talking about the same thing | |||
lizmat | apparently I'm not, but then again, I'm trying to do 4 things at the same time | 21:02 | |
Nemokosch | I'll try to recompile it in the opposite order | ||
m: multi sub bar (str $s) { ... }; bar("abc") | 21:03 | ||
Raku eval | Exit code: 1 Cannot resolve caller bar(Str:D); none of these signatures matches: (str $s) in block <unit> at main.raku line 1 | ||
Nemokosch | Okay, so far so good - am I right? | ||
21:03
Xliff left
|
|||
lizmat | yes, because the dispatch fails because str is not a Str and "abc" is a Str | 21:05 | |
Nemokosch | perfect | 21:06 | |
now let me change one thing in the function body | 21:07 | ||
and nothing else | |||
m: multi sub bar (str $s) { $s.say }; bar("abc") | |||
Raku eval | abc | ||
Nemokosch | I suppose the function body shouldn't have an influence on the dispatch? | 21:08 | |
lizmat | aah... I think I understand what's happening | ||
{ ... } is a special case of stub: I don't think stubs actually take part in multi-dispatch | 21:09 | ||
Nemokosch | do function bodies in general take part in multi-dispatch? | ||
because I can produce differing cases without the use of ... | 21:10 | ||
lizmat | hmmmm... ok, I will need to mull about that | 21:11 | |
Nemokosch | actually, I can produce two differing cases without using the argument at all | ||
lizmat | and I also need to afk for an hour or so | ||
please make an issue for it :-) | |||
afk& | |||
Nemokosch | okay, sure 👍 | ||
21:28
NemokoschKiwi left
|
|||
github.com/rakudo/rakudo/issues/5176 feel free to rename this one | 22:04 | ||
22:12
NemokoschKiwi joined
22:16
NemokoschKiwi left
|
|||
Geth | XML/main: 9d7a91d3d0 | (Polgár Márton)++ | 3 files Introducing rakudoc-generated README |
22:26 | |
22:27
ab5tract left
22:36
NemokoschKiwi joined,
NemokoschKiwi left
22:56
sena_kun left
|