🦋 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.
01:20 bisectable6 left, committable6 left 01:21 committable6 joined 01:23 bisectable6 joined 02:23 committable6 left, bisectable6 left 02:24 bisectable6 joined, committable6 joined 03:24 committable6 left, bisectable6 left 03:26 bisectable6 joined 03:27 committable6 joined 05:28 bisectable6 left, committable6 left 05:29 bisectable6 joined 05:31 committable6 joined
Geth rakudo/main: 708858838c | (Elizabeth Mattijsen)++ | src/core.c/RakuAST/Deparse.rakumod
RakuAST: fix issue with deparsing elsif|orwith / else
08:11
rakudo/main: 21720d907a | (Elizabeth Mattijsen)++ | src/Raku/ast/name.rakumod
RakuAST: add ::Name.simple-identifier method

Returns the identifier if there is a single element identifier, or returns the empty string. Can be used to either just check if the object is a simple identifier, or also when the actual identifier is needed.
08:14
08:21 sena_kun joined 09:07 timo joined
Geth rakudo/main: f261b1eab9 | (Elizabeth Mattijsen)++ | 2 files
RakuAST: put in L10N hooks for subs/methods

This in itself doesn't change anything, but with the right role mixed in as a slang, would allow:
   zeg "foo";
... (5 more lines)
09:07
lizmat for the curious: this is currently possible in the NL slang: gist.github.com/lizmat/9852a6fb05f...ea7c200823 09:12
sadly, anything declaratative doesn't work yet: some weird issue with actions not getting called in a slangified grammar 09:14
possibly related to github.com/rakudo/rakudo/issues/5387 09:15
09:30 sena_kun left
japhb That's a pretty cool demo, lizmat :-) 14:35
lizmat isn't it? some people might even make a Texan slang if they want to :-) 14:36
japhb About 25 years ago I worked with someone who was Swiss German Texan. Now *that* was a cool accent. 14:43
lizmat yeah, we once drove through "Little Switzerland" on the way from Houston to Austin, if I remember correctly 14:44
or maybe on the way from Austin to San Antonio 14:51
japhb Huh, didn't know there was a whole community there -- I assumed it was just him. :-) 14:52
15:33 jgaz joined
Geth rakudo/main: 4 commits pushed by (Elizabeth Mattijsen)++ 15:33
lizmat m: Q|use L10N::NL; zeg "foo".als-getallen|.AST.EVAL 15:43
camelia ===SORRY!===
Could not find L10N::NL in:
/home/camelia/.raku
/home/camelia/rakudo-m-inst-1/share/perl6/site
/home/camelia/rakudo-m-inst-1/share/perl6/vendor
/home/camelia/rakudo-m-inst-1/share/perl6/core
CompUnit::Repos
lizmat guess I' too impatient :-)
m: Q|use L10N::NL; zeg "foo".als-getallen|.AST.EVAL 15:54
camelia (102 111 111)
lizmat whee!
m: say Q|use L10N::NL; zeg "foo".als-getallen|.AST 15:55
camelia RakuAST::StatementList.new(
RakuAST::Statement::Use.new(
module-name => RakuAST::Name.from-identifier-parts("L10N","NL")
),
RakuAST::Statement::Expression.new(
expression => RakuAST::Call::Name.new(
name => RakuAST::Nam
lizmat m: say Q|use L10N::NL; zeg "foo".als-getallen|.AST.statements.skip.head
camelia RakuAST::Statement::Expression.new(
expression => RakuAST::Call::Name.new(
name => RakuAST::Name.from-identifier("say"),
args => RakuAST::ArgList.new(
RakuAST::ApplyPostfix.new(
operand => RakuAST::QuotedString.new(…
lizmat m: say Q|use L10N::NL; zeg "foo".als-getallen|.AST.statements.skip.head.expression
camelia RakuAST::Call::Name.new(
name => RakuAST::Name.from-identifier("say"),
args => RakuAST::ArgList.new(
RakuAST::ApplyPostfix.new(
operand => RakuAST::QuotedString.new(
segments => (
RakuAST::StrLiteral.new("…
17:26 [Tux] left 17:30 [Tux] joined 17:42 sena_kun joined 18:12 melezhik joined 18:19 melezhik left 18:26 melezhik joined 18:28 melezhik left
Geth rakudo: ab5tract++ created pull request #5399:
RakuAST: Finalize `WhateverCode` offering
18:55
19:01 melezhik joined
ab5tract lizmat: ^^ curious to hear what you think of 🔆 :) 19:01
19:19 melezhik left
ab5tract nemokosch: regarding `* && say "foo"`. it works here locally just by changing the curry rating of `&&` to 1 19:22
nemokosch what do values of "curry rating" signify? 19:23
ab5tract running spectest now to see if anything complains.
0 = none, 1 = whatever only, 2 = whatevercode only, 3 = whatever + whatevercode (default) 19:24
(sorry, should've been more descriptive than '1', in retrospect)
nemokosch oh nice. So it is currently deliberately on "none"? 19:25
ab5tract yes that's correct.
not sure what the original reasoning for that is. 19:27
nemokosch yes well, that's where I'm coming from 19:28
I thought it had some obvious technical reason
ab5tract well, maybe it did. I didn't turn it on in the old compiler :)
nemokosch fair enough haha 19:29
ab5tract now you've got me curious about that too 19:30
weird enough, no tests fail as a result of this change :) 19:31
ah, I don't see such a simple switch for the bas frontend compiler 19:33
*base
so yeah, maybe there was something complicated going on. 19:34
nine, lizmat: any thoughts on why `&&` doesn't curry? 19:36
20:25 jgaz left 20:26 jgaz joined
ab5tract I wonder if it has something to do with short-circuiting.. 20:26
not sure why that would apply though 20:27
design.raku.org/S02.html#The_Whatever_Object doesn't mention anything about `&&` currying 20:35
nemokosch I think it does have something to do with "short-circuiting", or more broadly thunking 20:37
but that seems to be contradicted by the fact that smartmatch does curry, even though that also thunks its right handside 20:38
but it's almost like smartmatching is the odd-one-out that it works 20:39
ff for example also doesn't work
I think smartmatching actually works wrong, lol 20:40
ugexe i would think its currying 20:41
nemokosch it works without the thunking
ugexe my $partial = False &&;
nemokosch m: 1 ~~ $_ * 1 andthen .say
Raku eval True
nemokosch it has to be True, because $_ on the RHS is the value from LHS 20:42
okay, let's push it harder 20:43
m: $_ = 'godzilla'; 1 ~~ $_ * 1 andthen .say
Raku eval True
nemokosch so yeah, $_ is 1 at that point
ugexe if $partial resolves immediately to False, then we've kind of defeated the purpose of currying because it's not waiting for the next operand
nemokosch m: $_ = 'godzilla'; (* ~~ $_ * 1)(1) andthen .say
ugexe if $partial waits for another operand, then we're introducing inefficiency by not short-circuiting, because it's waiting for an operand that won't affect the outcome
Raku eval Exit code: 1 Cannot convert string to number: base-10 number must begin with valid digits or '.' in '⏏godzilla' (indicated by ⏏) in block <unit> at main.raku line 1
nemokosch if the whatever-currying were done right, this last snippet should have also said True 20:44
but it ignored the fact that ~~ is thunky 20:45
it just evaluated the RHS right away
ugexe: I don't get what this has to do with the Whatever-currying 20:48
by the way, this is just a big wish for Santa but actually I'd like to see thunky operators in the language as first-class citizens, much rather than a grammar hack 20:50
m: infix:<&&>(1, say('and what the hell are you doing here exactly')) andthen .&dd 20:51
Raku eval and what the hell are you doing here exactly Bool::True
nemokosch it doesn't short-circuit, it cannot short-circuit
to be frank, arguably, a sub call interface to thunky stuff would be really painful to achieve, possibly even painful to use 20:53
but there could be some interface, at least
ugexe m: sub test($cond) { return $cond && * }; say test(True); say test(False) 20:59
camelia *
False
nemokosch CI journey: I took over File::Temp, set the same workflow basically, and okay, Windows failed. Since it mentioned TAP stuff, I changed the run and test step to zef install . --debug --/tap-harness as suggested. Perhaps this was stupid in the first place because it still mentions TAP stuff regardless.
The interesting thing is that with --/tap-harness set, the Mac workflow suddenly gets cancelled 21:00
it passed without the flag
ugexe weird, link me to it
nemokosch github.com/2colours/raku-File-Temp...6411072439 so this was the initial run 21:02
github.com/2colours/raku-File-Temp...6411143128 this was when I accidentally set --tap-harness rather than the negation, works also
ab5tract ugexe: but that could arguably just return a WhateverCode, imo 21:03
nemokosch github.com/2colours/raku-File-Temp...6411184240 this was when i set it off
+1 for that
ugexe it looks like your macos ones failed because they were canceled for whatever reason 21:04
i'd probably just rerun those ones
nemokosch yes, I reran them once, same thing happened 21:05
ugexe I don't see anything mentioning the raku TAP harness, and everything seems to be using prove (so perl TAP harness)
ab5tract it would still "short-circuit" in the sense that the RHS wouldn't be evaluated if $cond were false
ugexe they died the exact same way same output?
or is it still possible the jobs were canceled automatically i.e. because the windows build failed
nemokosch I set "debug log" or whatever it is called, the second time 21:06
"enable debug logging"
it seemed to do okay stuff when it got cancelled
this was the interesting line: > ##[debug]Re-evaluate condition on job cancellation for step: 'Run tests and Install'. 21:07
ugexe again, is it possible it is getting canceled once the windows build fails?
nemokosch during the "updating fez mirror" phase
then it could run for a while and it even made it to testing when it was suddenly announced that it got cancelled
ugexe i hoenstly dont remember if gh actions will stop the other jobs when one fails, but it seems familiar
nemokosch mmm, that could make sense, assuming that the timing of individual jobs is somewhat random 21:08
ugexe there is probably some flag to disable that fail fast behavior if its the case 21:09
strategy: fail-fast: false 21:11
nemokosch ohh
I was about to read this github.com/orgs/community/discussions/27192
thanks, let's see 21:12
ugexe m: my $false-whatever = { False } & *; if $false-whatever { say 42 } 21:24
camelia 42
ugexe ab5tract: wouldn't false whenever make that type of check confusing?
i dunno if thats even a False whatever to be fair though lol 21:25
i guess its not
but i'm wondering if a false-whatever would be considered True or not
nemokosch yep, much better with fail-fast: false 21:28
this is with a junction though, isn't it 21:29
for "false whatever"
22:00 sena_kun left
ab5tract I'm a bit lost. How would you get a False whatever here, though? You'd end up with a WhateverCode that happens to have a False LHS 22:35
but whether that can guarantee short-circuiting depends on how expressions are bound into parameters when the operator application actually happens 22:37
so, if it can't (yet) guarantee short-circuiting, I think it makes sense to turn the currying off.
(when I say "you would get", I mean if && curried *) 22:40
m: Q| $_ = 'godzilla'; (* ~~ $_ * 1)(1) andthen .say | .AST.EVAL 22:48
camelia True
ab5tract nemokosch: ^^
nemokosch nice 💯 22:50
ab5tract feels good. there are some other test cases in whatever.t that were marked todo that seem to be passing as well
nemokosch I think RakuAST already worked with something like 12 ~~ $_ that could be shadowed previously (unlike $_ * 1) 22:51
ab5tract ah, so maybe my patch isn't involved after all. still cool to see RakuAST getting it right 22:55
Geth DateTime-Format/main: 7ef6b13031 | (Márton Polgár)++ (committed using GitHub Web editor) | .github/workflows/main.yml
Delete broken github action workflpw
22:59
DateTime-Format/main: a7e504e922 | (Márton Polgár)++ (committed using GitHub Web editor) | .github/workflows/test.yml
Update workflow to something more practical
23:00
nemokosch yes, this seems to work on HEAD already, at least 23:05
thunkiness of the smartmatch in whatevercode, that is 23:06
oh right, doesn't even have to be HEAD, it worked for 2023.04 as well