🦋 Welcome to the MAIN() IRC channel of the Raku Programming Language (raku.org). This channel is logged for the purpose of keeping a history about its development | evalbot usage: 'm: say 3;' or /msg camelia m: ... | Log inspection is getting closer to beta. If you're a beginner, you can also check out the #raku-beginner channel!
Set by lizmat on 25 August 2021.
00:02 reportable6 left 00:06 colemanx joined
Od1n method col:sym<quoted> ($/) { make S:g/'""'/'"'/ with ~$/ } 00:12
hello people. 00:13
i just copied docs.raku.org/language/regexes#ind...bstitution
and adapted it for what i think will make my <quoted> by replacing "" by "
"Cannot assign to a readonly variable or a value" 00:14
i don't get it: wasn't ~$/ a new string that is made from $/ ?
Nemokosch what did you copy actually? 00:20
it doesn't scroll there
Od1n say S/o .+ d/new/ with 'old string'; 00:29
evalable6 new string
Od1n I just adapted it, I guess
Nemokosch 😂 00:32
and what exactly went wrong?
oh 00:33
now I see it
00:34 ajr left
Od1n: did it not complain about using $/ as the parameter? 00:35
Od1n well. raku don't want to assign a readonly
00:35 Colt joined
Od1n i guess not: i copied it in another variable explicitly. still doesn't work 00:35
Nemokosch I don't know this sym thing but assuming it's basically still a method, this seems like a bad idea 00:36
I mean using a magic variable as your parameter
Od1n <sym> is an alternative for a term in a grammar
when you declare a action class, you have to keep the same name for the rule and the method 00:37
i just want to transform ""hello"" in "hello" 00:40
00:42 patrickb left 00:43 patrickz joined
Od1n i'll write the question on the mailing list 00:48
00:54 squashable6 left
Nemokosch If you aren't sure about using $/ as a parameter, I'd say don't 00:58
Od1n this also is a copy-paste from the grammar documentation 00:59
01:01 squashable6 joined
Od1n docs.raku.org/language/grammars#in...ry-Actions 01:01
Nemokosch well that's an oof 01:02
Od1n oof ? 01:03
www.urbandictionary.com/define.php?term=oof ? 01:06
Nemokosch xdd 01:07
Od1n (as xml declarative description ?) 01:09
thanks for helping. i'm going to sleep now 01:10
bye everyone
Nemokosch you are funny 01:15
good night
01:41 patrickz left 01:55 frost joined 02:06 reportable6 joined 02:18 chronon left 02:20 chronon joined 02:41 colemanx left 02:42 colemanx joined 03:42 squashable6 left, linkable6 left, reportable6 left, benchable6 left, quotable6 left, greppable6 left, evalable6 left, nativecallable6 left, sourceable6 left, statisfiable6 left, committable6 left, notable6 left, bloatable6 left, bisectable6 left, unicodable6 left, shareable6 left, tellable6 left, coverable6 left, releasable6 left 03:43 linkable6 joined, tellable6 joined, reportable6 joined, benchable6 joined 03:44 unicodable6 joined, notable6 joined, statisfiable6 joined, bisectable6 joined, greppable6 joined, shareable6 joined 03:45 coverable6 joined, bloatable6 joined 04:43 squashable6 joined 04:44 committable6 joined 04:45 evalable6 joined, releasable6 joined, nativecallable6 joined 05:43 quotable6 joined 05:44 sourceable6 joined 06:02 reportable6 left 06:03 reportable6 joined 07:03 unicodable6 left, nativecallable6 left, linkable6 left, bisectable6 left, reportable6 left, coverable6 left, bloatable6 left, releasable6 left, committable6 left, sourceable6 left, evalable6 left, benchable6 left, shareable6 left, greppable6 left, statisfiable6 left, squashable6 left, tellable6 left, notable6 left, quotable6 left 07:04 tellable6 joined, linkable6 joined, bisectable6 joined, greppable6 joined 07:05 coverable6 joined, unicodable6 joined, benchable6 joined, evalable6 joined, shareable6 joined 07:06 quotable6 joined 07:30 seednode left 07:31 seednode joined 07:41 Sgeo left 07:52 Xliff joined 08:05 statisfiable6 joined, nativecallable6 joined 08:06 releasable6 joined, reportable6 joined 08:07 frost left 08:20 frost joined 08:46 jess left, jess joined 08:49 abraxxa joined 08:58 abraxxa left 08:59 abraxxa joined 09:01 kylese joined 09:03 bloatable6 joined 09:11 squashable6 joined 09:16 abraxxa-home joined 09:17 linkable6 left
frost hello all. 09:58
when i install a module using zef, i got an error "Type check failed for return value; expected IO::Path but got Any (Any)" 09:59
what does that mean? 10:00
10:04 sourceable6 joined
elcaro It sounds like the module you're trying to install is failing one of it's test 10:12
You can tell zef to skip tests, but there's a risk the module won't work properly. 10:13
zef should tell you which module it's testing before the failure occurs
10:20 synthmeat left
frost Hey, @elcaro, it stops with that error message even not starting to install:( 10:20
10:20 linkable6 joined
El_Che elcaro: what version of raku/zef are you running? I remember zef breakage with a raku change some time ago 10:38
elcaro El_Che: It's not me having the issue, it's frost (or frost#6297 via the discord bot) 10:44
frost: What OS are you on?
and yeah, as El_Che asked... what version of Raku (and zef) are you using? 10:45
tbrowder .tell ugexe zef is noticeably faster now, nice! 10:54
tellable6 tbrowder, I'll pass your message to ugexe
frost El_Che i'm running it on manjaro with linux 5.14 and the zef is from the 2021.10 bin release of linux 10:59
10:59 KotH left
El_Che that's recent, then 11:00
frost It may also be a specific module problem, since I can install other modules successfully 11:01
I'm not going to try any more now, thanks elcaro El_Che 11:02
11:05 committable6 joined
El_Che np 11:08
11:29 synthmeat joined
tbrowder frost: it might be helpful if the module author knew about your problem 11:56
12:02 reportable6 left 12:05 reportable6 joined 12:21 slu joined 12:22 patrickb joined 12:25 abraxxa left
frost @tbr 12:29
tbrowder thanks, i know why it fails, since there is no META6.json, now I try to add one 12:31
tbrowder frost: you should investigate using App::Mi6 for module creation and maintenance--saves a lot of work 12:32
RaycatWhoDat When making a grammar, what is the correct way to look for delimited block if the delimiters are on separate lines? 12:33
tbrowder lizmat uses it, and i too, and many others
frost tbrowder thank you, but i haven't learn how to make a module, i‘ll try later 12:34
tbrowder okey dokey 12:36
12:56 tejr left 12:57 tejr joined
El_Che okey donkey? 13:05
13:06 notable6 joined
patrickb Do people consider the following a WAT? 13:50
m: try run("nonexisting")
camelia The spawned command 'nonexisting' exited unsuccessfully (exit code: 1, signal: 0)
in block <unit> at <tmp> line 1
patrickb In contrast to:
m: run("nonexisting").so
camelia ( no output )
tbrowder El_Che: okey dokey, kind of country or southern friendly slang for "okay" 13:54
13:59 frost left
tbrowder patrickb: pls remind me what does WAT mean 13:59
m: say run("nonexisting").so 14:03
camelia False
tbrowder that's my choice
patrickb WAT means an unexpected behavior that negatively surprises the programmer: "WAT?! That's how it behaves?!?" 14:06
14:07 samcv left, samcv joined 14:13 Colt left
nine Everyone: please reset your local rakudo master branches to the current origin/master. We had a confusion in the repository that required a force push. Sorry for the inconvenience! 14:14
14:16 KotH joined 14:32 synthmeat left 14:44 Sgeo joined
CIAvash patrickb: github.com/rakudo/rakudo/issues/1590 14:59
patrickb CIAvash: That's not optimal. But my point was not about the program not existing, but the `try` being uneffective. 15:01
ugexe the process errors when it gets sunk 15:09
tellable6 2021-11-19T10:54:07Z #raku <tbrowder> ugexe zef is noticeably faster now, nice!
ugexe if you avoid sinking it it wont error 15:10
m: my $a = try run("nonexisting"); say $a.exitcode 15:11
camelia 1
patrickb but then I can leave the try off just as well 15:13
is this an error vs exception thing?
ugexe yep, you'd `try` around whatever would sink it
tbrowder patrickb: thnx for the reminder. i assume it’s WAT instead of WHAT due to raku mop and it’s also comedic and phonetic!
patrickb Ah, so the error (aka a contact bomb) passes through the try untouched as it's not a live exception and then gets sunk which triggers it? 15:14
ugexe yea, although it might be a failure not an exception (i forget) 15:15
patrickb thanks for explaining! 15:16
tbrowder: I guess so.
15:44 linkable6 left, evalable6 left 15:46 linkable6 joined 15:47 evalable6 joined
El_Che tbrowder: don't destruy my silly puns :P 15:51
15:57 lizmat_ joined 15:58 Geth left 15:59 TempIRCLogger left, sm1 joined, RakuIRCLogger left, lizmat left, dextercd joined 16:00 slu left
tbrowder El_Che: sorry, i forgot you're the SNL wannabe :-D 16:11
16:39 sm1 left 16:52 xinming__ left 16:53 xinming__ joined 16:58 xinming__ left 17:00 xinming__ joined 17:13 lizmat_ left, lizmat joined 17:14 Geth joined, RakuIRCLogger joined 17:15 A26F64 joined
japhb WAT is from a talk on JavaScript foibles that got rapidly adopted by other programming language communities. 17:22
17:25 abraxxa-home left
[Coke] thouoght it was related to knowyourmeme.com/memes/wat 17:48
18:03 reportable6 left
[Coke] does Audrey have a minister-blog? 18:06
tonyo are you people on windows using the WSL to run raku or compiling directly? 18:10
[Coke] i''m compiing directly 18:17
japhb [Coke]: I'd forgotten, it's JavaScript *and* Ruby: www.destroyallsoftware.com/talks/wat 18:20
18:42 a3r0 left 19:04 reportable6 joined 19:43 Skarsnik joined
Xliff_ Waht determines order of INIT blocks? 19:47
[Coke] m: INIT {say 2}; INIT { say 1}; 19:48
camelia 2
[Coke] Guessing it's source order.
(my sample is unhelpful, sorry. ;) 19:51
Xliff_ [Coke]: Kinda hard to determine that when you are using multiple compunits. ;) 19:53
Skarsnik Any idea why raku can't find my module in ./ ? I have a SNES-SLANG.rakumod and when I do raku -I ./ -M SNES-SLANG -e 'some code' it can't find the module :( 19:54
copying it to another dir and doing -I dir work x) 19:57
tbrowder ref WAT: i think [Coke] is on to the truth...
19:58 Colt joined 19:59 Xliff_ left
ugexe is there a META6.json in ./ ? 20:00
if so then that module would needed to be listed in it 20:01
Skarsnik hoo 20:02
Since when META6.json is used by something else than zef xD
ugexe rakudo has used it for 5+ years 20:03
its used it in this specific way for ~3 years
Skarsnik maybe should clarify the error message? 20:05
ugexe im pretty sure it tells you exactly what the issue is 20:06
"Please note that a 'META6.json' file was found in '.', of which the 'provides' section was used to determine if a dependency is available or not. Perhaps you need to add 'AdADL' in the <provides> section of that file? Or need to specify a directory that does *not* have a 'META6.json' file?
at -e:1"
20:07 TempIRCLogger joined
ugexe did you read the whole error message? 20:07
Skarsnik skarsnik@DESKTOP-UIA12T1:/mnt/f/Project/QUsb2snes/tests/usb2snes-tests/raku-tests$ raku -v 20:08
This is Rakudo version 2020.08.2 built on MoarVM version 2020.08
This is probably why?
ugexe probably, the newer error message is newish but i thought it was older than that. guess not 20:09
Skarsnik Doing a SLANG is tricky, it's hard to tell if your grammar is called or not :( 20:11
[Coke] Always reminds me of meeting Raku folks in Germany.... got a case of shrinkwrapped stroopwafel today. (nowhere near as good as the fresh stuff) 20:17
Skarsnik I am not sure what is wrong with my slang. gist.github.com/Skarsnik/b6ada1e52...373d8f1e8c using with like raku -M SNES-SLANG -e 'SNES lda $42:sta $69:rtl:;' does not work 20:22
I realise the say "export" does not happen 20:27
[Coke] here it hangs.
Skarsnik let update raku x) 20:29
[Coke] I'm on 2021.10 here 20:32
Skarsnik the first token is probably missing something to not mess up with raku grammar? 20:33
github is sloowww today 20:36
20:47 colemanx left 20:51 Xliff_ joined 20:58 [Coke] left 20:59 colemanx joined
Skarsnik the say in my export sub does not run, I just get a compile error x) 21:04
21:07 gcd left 21:15 [Coke] joined 21:17 colemanx left
patrickb m: sub s(List :@l, Str :$a) { }; s(:a(1)); 21:31
camelia Type check failed in binding to parameter '@l'; expected Positional[List] but got Array ([])
in sub s at <tmp> line 1
in block <unit> at <tmp> line 1
patrickb Is this a rakudobug?
japhb patrickb: Are you wanting to say "a Positional that contains a bunch of Lists"? 21:35
(Er, because that's what you are currently saying)
patrickb Actually I think the signature is bogus and should be corrected. But the error is about an optional param I'm not passing...
wait 21:36
japhb The '@' sigil indicates that a type `does Positional`
[Coke] first has a : so not a positional, I think.
patrickb ah you are refering to the variable, not the signature
japhb [Coke]: It's a named argument whose value is a Positional containing Lists 21:37
patrickb agreed
That is bogus, I agree, but the error it throws is wrong, right? 21:38
japhb I'm guessing the problem is that the default value for an optional Positional is an empty Array
patrickb It should complain that $a is not a string, but instead complains about an optional I didn't pass.
japhb Are you asking if the default should change to be Array[List]?
First argument caused a binding failure, so had already errored. 21:39
patrickb If I turn the `1` into a `"1"` the error goes away.
japhb m: sub s(Str :$a, List :@l) { }; s(:a(1));
camelia Type check failed in binding to parameter '$a'; expected Str but got Int (1)
in sub s at <tmp> line 1
in block <unit> at <tmp> line 1
patrickb m: sub s(List :@l, Str :$a) { }; s(:a("1"));
camelia ( no output )
japhb I think the fact that it complains about the @l binding when the *other* argument doesn't match, but not when it does, is goofy. 21:40
So yeah, there's a bug there I think.
patrickb I'm not convinced that it should be possible to get type missmatch errors for optionals I didn't pass.
japhb patrickb: Since you didn't supply a default for @l, either Raku should intuit the type for the "default default", or it should error. I think you're arguing for the former. 21:41
Er ... am I understanding you correctly? 21:42
patrickb I think you understand correctly.
m: my List @l; dd @l; 21:43
camelia Array[List] @l = Array[List].new()
patrickb default working fine, or is this something different?
japhb m: sub s(List @l?, Str :$a) { }; s(:a("1")); 21:44
camelia ( no output )
japhb m: sub s(List @l?, Str :$a) { dd @l }; s(:a("1"));
camelia Array[List] element = Array[Mu].new()
patrickb m: sub s(List @l?, Str :$a) { }; s(:a(1));
camelia Type check failed in binding to parameter '@l'; expected Positional[List] but got Array ([])
in sub s at <tmp> line 1
in block <unit> at <tmp> line 1
japhb Yeah, I think that's a bug
patrickb rakudobugs
m: sub s(Str :@l, Str :$a) { }; s(:a(1)); 21:54
camelia Type check failed in binding to parameter '@l'; expected Positional[Str] but got Array ([])
in sub s at <tmp> line 1
in block <unit> at <tmp> line 1
patrickb Does it even for the more common Str list.
22:05 A26F64 left
Kaiepi i can get the correct error to throw locally by modifying &handle_optional in the signature binder to consider the type parameters of @/%s 22:55
let's see what roast thinks...
m: sub s(Str @l?, Str :$a) { }; s(:a(1)) 22:57
camelia Type check failed in binding to parameter '@l'; expected Positional[Str] but got Array ([])
in sub s at <tmp> line 1
in block <unit> at <tmp> line 1
Kaiepi m: sub s(Str %h?, Str :$a) { }; s(:a(1))
camelia Type check failed in binding to parameter '%h'; expected Associative[Str] but got Hash ({})
in sub s at <tmp> line 1
in block <unit> at <tmp> line 1
Kaiepi m: sub s(Str :%h, Str :$a) { }; s(:a(1))
camelia Type check failed in binding to parameter '%h'; expected Associative[Str] but got Hash ({})
in sub s at <tmp> line 1
in block <unit> at <tmp> line 1
23:05 evalable6 left, linkable6 left 23:08 evalable6 joined 23:14 Xliff left 23:19 ProperN[out] joined, ProperNoun left 23:48 djerius left, djerius joined 23:51 dextercd left 23:52 dextercd left
Kaiepi ok so far 23:54
ok so far 23:56
23:56 kylese left 23:59 kylese left