🦋 Welcome to Raku! raku.org/ | evalbot usage: 'p6: say 3;' or /msg camelia p6: ... | irclog: colabti.org/irclogger/irclogger_log/raku
Set by ChanServ on 14 October 2019.
melezhik vrurg finally I got your example working - rakudist.raku.org/sparky/report/RakuPlay-1/8889 00:49
I had to change owner for a file with code to execute, as your code write to this file )))
abit rare case ... 00:50
I had to change owner for a file with code to execute, as your code write to this file )))
.tell vrurg finally I got your example working - rakudist.raku.org/sparky/report/RakuPlay-1/8889 00:51
tellable6 melezhik, I'll pass your message to vrurg
thowe If rakudobrew says it is up to date, am I good to go? Or should I somehow de-install it and install rakubrew fresh? 06:01
patrickb tbowe: rakudobrew still works, but its been renamed to rakubrew. All development happens under the new name. So if you want to be up to date, you need to update. (In short: Remove the rakudobrew hook, then install rakubrew as advertised. If you want to keep your installed versions, you can copy them over from ~/.rakudobrew/versions to ~/.rakubrew/versions. The ~/.rakudobrew folder is then unused and can be removed.) 07:45
tbowe: Should you encounter any errors in the process, please do speak up / create an issue. 07:46
Have to leave. o/ 07:47
Geth doc: 1b7a16a365 | (JJ Merelo)++ | doc/Type/IO/Handle.pod6
Adds indexing, and also makes small changes

Mainly after this question in SO stackoverflow.com/questions/654837...ng-in-raku
08:13
linkable6 Link: docs.raku.org/type/IO::Handle
Geth doc: 536ec1518d | alanrocker++ (committed by Juan Julián Merelo Guervós) | doc/Language/syntax.pod6
Update syntax.pod6

Clarify rules about whitespace and bounding characters of multi-line comments.
08:17
linkable6 Link: docs.raku.org/language/syntax
Geth doc: 7f8b1f6fc5 | (JJ Merelo)++ | doc/Language/syntax.pod6
Minor grammar adjustments and reflow

Also add indexing for Embedded comments.
08:22
linkable6 Link: docs.raku.org/language/syntax
lizmat clickbaits the last one of 2020: rakudoweekly.blog/2020/12/28/2020-...evolution/ 10:52
Geth ¦ old-issue-tracker: JJ self-assigned "Variadic" or "slurpy"? github.com/Raku/old-issue-tracker/issues/6451 11:13
tib Hello, 11:38
zef (and raku) can handle the installation of multiples version of a same module simultanously ?
tadzik it should, yes 11:39
tib ok :) 11:40
Geth doc: b06f280118 | (JJ Merelo)++ | doc/Type/Signature.pod6
Correcting heading and rephrasing

Refs #3755, Raku/old-issue-tracker#6451
11:42
doc: ad7558e1df | (JJ Merelo)++ | 3 files
Redirecting anchors and clarifying terms

Closes #3755, closes Raku/old-issue-tracker#6451
linkable6 Link: docs.raku.org/type/Signature
linkable6 DOC#3755 [closed]: github.com/Raku/doc/issues/3755 [docs] "Variadic" includes "Slurpy", but it's not the same
notagoodidea Can we set a where clause on a optional argument in the signature of a function? 11:56
timotimo yes, but you need to make sure it lets the default value through as well 11:57
notagoodidea So a default is mandatory :/ 11:58
notagoodidea m: "as foobar" ~~ /:i 'as'\s\w / 12:12
camelia ( no output )
notagoodidea m: say "as foobar" ~~ /:i 'as'\s\w /
camelia 「as f」
notagoodidea m: say "as foobar" ~~ /:i 'as'\s\w+ /
camelia 「as foobar」
notagoodidea Does MAIN may accept optional positional argument with a guard clause and a default? It works without the where guard. 12:44
ie : multi sub MAIN ('foo', Str $bar, Str $baz? where /:i 'as:'\w+ / = "lala") {*} 12:46
timotimo here baz isn't a positional, and the default value lso doen't match the where clause 12:54
notagoodidea mmh, ok I can get that the default value must match the where clause but why bar is not positional? I had the impression that if it is not an option (:$foo), the parameters are positional. 12:58
baz not bar sorry. 13:03
timotimo d'oh 13:05
seems like i'm too tired to understand words
notagoodidea Better you tired than me misunderstanding everything I read last night :D 13:10
But the where clause matching the default solved a part of my problem. 13:11
notagoodidea When trying to add a slurpy array ( pastebin.com/8Sff5a5G ), it won't work without the optional parameters. 13:43
I am a bit lost for that as default are provided and with parameters it works as intended.
cli.raku foo lala as:foo in:foo tag1 tag2 works but not when as:foo and/or in:foo are omitted. 13:44
timotimo i think it can't differentiate between "the second positional was omitted and then the slurpy started" based on a where clause failing 13:45
notagoodidea timotimo: Ok, I will stop fighting the argument parsing for now :D 14:03
timotimo i think you may have already seen them, but there's more argument parsing libs in the ecosystem, some of them surely very powerful 14:05
notagoodidea Yep, I have seen Getopt::Long and SuperMain (or sounding similar). It was more by curiosity to see how default one worked and its limits. I know that I could get what I want by multiplying multi for each case but it seemed too contrived. 14:07
guifa2 o/ 15:15
tib Can we specify "notest" for a specific module in a META6.json ? 15:56
leont Why would you want that? 16:08
tib I want to add a github action on a repository but there is a module that have failing tests 16:14
(not yours, you fixed it too fast :P) 16:15
tib I'm currently trying to go with a --force-test but I think it is a bit overkill since it will also ignore all other modules tests 16:17
leont Ah, you mean a no-test on a dependency, not on the module itself 16:23
tib yes 16:29
tony-o why not do a step to install with --no-test prior to building your module 17:24
.tell patrickb winpass branch was merged - i need a little more time to look at the user-config stuff 17:30
tellable6 tony-o, I'll pass your message to patrickb 17:31
tib yup I have done "zef install . --force-test" finally 17:33
tony-o why force the test if you know it's going to fail? 17:34
tib --force-test seems installing anyway, not forcing test, I know it is weird 17:35
tib tony-o since I catch you there :) my workaround is related to Data::Dump failure 17:38
tony-o ah 17:39
sorry, i have so many github alerts i miss them - i will take a look in about an hour
tib reported here github.com/tony-o/perl6-data-dump/issues/36 and probably here also github.com/tony-o/perl6-data-dump/issues/35 17:40
great, you don't have to be sorry ;)
I have to go, thank you a lot 👍 17:41
moritz m: say &1 19:09
camelia Nil
tony-o tib: need to massage d:d a little bit - gist changed the way it outputs 19:29
melezhik Hi! Does `main` supports shell expansion? - github.com/melezhik/sparky/issues/...-752182896 19:48
Voldenet I don't think it does 20:12
littlebenlittle Is there a way to access the line number of match in a grammar? For example `<bad-match> { die "bad match at $*line" }` 21:02
lizmat hmmm... grammars *are* code, so maybe you could do some introspection with callframe and then .file / .line on the Code object ? 21:04
littlebenlittle I vaguely remember there being a somewhat canonical way to access it like $/.line, but maybe I dreamed it 21:05
guifa2 littlebenlittle: maybe something like $/.prematch.split("\n").elems ? 21:15
or actually even just $/prematch.lines.elems 21:16
littlebenlittle guifa2: That looks like a good way to get the info. Or .lines.elems 21:17
MasterDuke m: say "abc\n123\ndef" ~~ / \d+ { use nqp; nqp::getcomp("Raku").lineof($/.orig(), $/.from()).say; } / # littlebenlittle 21:32
camelia 2
「123」
notagoodidea I tried to replicate the yes-or-no-p function from Common Lisp and reached : pastebin.com/96RNDMS7 . I am looking to improve it (less repetition, better regex) 21:40
guifa2 notagoodidea: that reminds me, I finally have things ready to do that in a localized manner with my update to CLDR :D 21:44
notagoodidea CLDR? Adding localization to it is neat! How have you done that? 21:45
guifa2 CLDR - Unicode's Common Language Data Repository. One of the data points is a posix y/n. 21:46
MasterDuke notagoodidea: well, trivial changes, but your final line could be just `so $answer ~~ /:i 'yes'|'y' /`
guifa2 use Intl::CLDR; say cldr<en>.posix.messages.nostr; say cldr<en>.posix.messages.yesstr; # no:n, yes:y 21:47
notagoodidea MasterDuke: totally forgot about `so` ! (And the small operators that coerce types in general tend sto evade my memory) 21:48
MasterDuke and your regexes could be something like `/:i y[es]? | n[o]? /` and then `/:i y[es]?/`
guifa2 say cldr<ar>.posix.messages<nostr yesstr>; # (لا:ل نعم:ن) 21:49
MasterDuke but you also aren't really constraining the rest of the contents of the answer, so the logic as written could be just `$answer.lc.contains('y' | 'n')` 21:51
notagoodidea MasterDuke: hum, to constraint it, it will be /:i ^(y[es]?|n[o]?)$ / ? 22:02
MasterDuke yeah 22:03
TIMTOWTDI of course, `$answer.lc eq 'yes' | 'y' | 'no' | 'n'` 22:04
guifa2 or even 22:08
`$answer.lc eq any <yes y no n> 22:09
notagoodidea If you want to import some functions from another files, you have to use .rakumod and declare it as a module or can you act as a butcher like in python with import? 22:22
guifa2 I'm not familiar with python, but if you just want to drop in the symbols, you just don't declare your .rakumod as a module 22:29
see: docs.raku.org/language/module-pack...it_module? 22:30
notagoodidea thanks! 22:34
thundergnat m: my $ans; repeat { $ans = prompt('Y[es] or N[o]') } until $ans ~~ /:i ^ y[es]? | n[o]? $/; 23:10
camelia Y[es] or N[o]Y[es] or N[o]Y[es] or N[o]Y[es] or N[o]Y[es] or N[o]Y[es] or N[o]Y[es] or N[o]Y[es] or N[o]Y[es] or N[o]Y[es] or N[o]Y[es] or N[o]Y[es] or N[o]Y[es] or N[o]Y[es] or N[o]Y[es] or N[o]Y[es] or N[o]Y[es] or N[o]Y[es] or N[o]Y[es] or N[o]Y[es…
thundergnat oops. should have thought about that 23:11
notagoodidea Héhé, yes, I tried that when playing around with repeat and until :D 23:16
thundergnat It works fine locally, but camelia doesn't do a prompt() 23:34
Well, fakes it actually