»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or /msg camelia p6: ... | irclog: irc.perl6.org or colabti.org/irclogger/irclogger_log/perl6 | UTF-8 is our friend! 🦋
Set by Zoffix on 25 July 2018.
regreg hello 00:08
is there any way i can distribute perl6 rakudo with my windows application?
i want to distribute a script as a standalone application
an .exe or even an obfuscated perl6 source file
if obfuscation is not possible then plain text is an option (albeit less desirable) 00:09
MasterDuke regreg: modules.perl6.org/dist/App::Instal...ment.se%3E 00:11
regreg MasterDuke, What you'll need 00:12
The Visual C++ build tools, and nmake/cl/link on path. Note that this does not imply installing Visual Studio; it is possible to freely download the standalone compiler. (It's probably possible, without too much trouble, to patch this tool to use other compilers.) 00:13
isn't this unreasonable?
MasterDuke regreg: dunno, i've never needed/tried to package a script before, so i don't have any experience to compare with. however, there have been some recent changes in rakudo that may make that stuff not needed 00:16
regreg ok
i'll give it a try
if nothing works then i'll just port the app to perl5 :)
MasterDuke but you would probably need to patch the module to take advantage of them
MasterDuke other people have wanted to do the same thing, but now is usually a slow time for the channel. might try posting on stackoverflow 00:17
regreg ok 00:18
the other variant would be tcl
tcl has good packaging options
but i rather like perl6
guifa p6: role A { token x { <y> }; token y { 'Y' } }; role B { token y { 'Z' } }; grammar C does A does B { token TOP { <x> } }; say C.parse("y") 01:18
evalable6 (exit code 1) 04===SORRY!04=== Error while compiling /tmp/yW6FKtGY1y
Method 'y' must be resolved by class C because it exists in multiple roles (B, A)
at /tmp/yW6FKtGY1y:1
guifa C can’t specify <y>, though, because it’s being called by A. But <y> called from inside role A should be resolvable, no? A doesn’t do B 01:20
I’ll just go the all caps route to avoid potential clashes 01:24
Geth doc: 05888b56d6 | Coke++ | doc/Type/Metamodel/CurriedRoleHOW.pod6
fix typo
02:17
synopsebot Link: doc.perl6.org/type/Metamodel::CurriedRoleHOW
doc: d863794434 | Coke++ | xt/words.pws
learn new words
tyil weekly: www.reddit.com/r/ProgrammingLangua...e/ektxe1w/ 05:50
notable6 tyil, Noted!
atroxaper Hi, #perl6 ! 06:36
p6: sub o() {CATCH{default {say 'outer'}}; sub get-list() { CATCH{default {say 'inner'}}; return (1,3).map({die "$_"}).List}; get-list[0]}; o;
evalable6 outer
atroxaper As I see, `map` executes lazy. Why? And how can I prevent it? 06:37
timotimo put .eager before .List, that should do it
otherwise you can also "do for" instead of map 06:38
actually, i'm not entirely sure if that'll also force eagerness
atroxaper timotimo: oh, I see. Did not know about .eager. Thanks! 06:39
discord6 <Tyler (Aearnus)> also, welcome atroxaper! 06:46
atroxaper Is discord6 a bot? :) 06:48
timotimo it is 06:49
atroxaper About what?
discord6 <Tyler (Aearnus)> it's a bridge to the discord server
<Tyler (Aearnus)> this is what I see from my end: cdn.discordapp.com/attachments/538...nknown.png 06:50
atroxaper aeruder: oh. Hello))
jmerelo ls 06:52
Elronnd is there a way to react whenever a file changes? 06:58
moritz Elronnd: docs.perl6.org/type/IO::Notification 06:59
Elronnd thanks!
jmerelo notable6: there's going to be a Perl devroom in the "Spanish" FOSDEM: github.com/antoniogamiz/devroom-perl-eslibre 07:03
notable6 jmerelo, I cannot recognize this command. See wiki for some examples: github.com/perl6/whateverable/wiki/Notable
jmerelo weekly: there's going to be a Perl devroom in the "Spanish" FOSDEM: github.com/antoniogamiz/devroom-perl-eslibre
notable6 jmerelo, Noted!
Elronnd is it legal to say something like this? react { for @watched-paths { react whenever IO::Notification.watch-path($_) { ... } } } ? 07:07
jmerelo Elronnd: it's illegal in 23 states. You're good if you don't go to Oklahoma
timotimo that will probably not do what you want 07:08
Elronnd jmerelo: I'll just stay in the eu, out of the way of those pesky software patents
timotimo since react blocks until everything in it is finished and i don't think a watch-path supply will ever end on its own
Elronnd timotimo: how do I do what I want, then?
jmerelo Elronnd: other than that, it's a react inside a react. So it's going to tap the supply while it's tapping the supply, creating a supply black hole.
timotimo just leave out the inner "react"
Elronnd err, yeah
typo'd that
ok
jmerelo Elronnd: :-)
Elronnd thanks! 07:09
timotimo and if there's other stuff your application is supposed to do, maybe have it be a "start react"
Elronnd it's inside of a IRC::Client plugin and it says to put it like that; I assume it handles the starting? 07:10
timotimo don't know about that, but you'll probably find out :) 07:11
Elronnd alright! 07:12
atroxaper Elronnd: I try IO::Notification on my mac. Many file editors rename (move) files, change it and rename back. In such cases IO::Notification will lose a file. Vim, mac TextEditor do so. echo and nano didn't. Just FYI :) 07:33
Elronnd atroxaper: thanks! 07:37
fortunately, that doesn't affect my use-case -- I just have to deal with logfiles that get appended to 07:38
timotimo ha, that's its own can of worms, i read something about how "tail -f" can lose data in some circumstances 07:40
Elronnd --oh 07:41
how??
timotimo can't find it any more 07:43
it's just a race condition, though
ok, i think it was about when a file is truncated (by logrotate or something?) then tail can miss something that was written just before the truncation happened 07:46
Elronnd ahh 07:47
these files are small enough they never get truncated
so not an issue then, probably
s/truncated/rotated 07:48
is there something like zip that puts it arguments into a hash where the elements of the first array are keyed to the elements of the second? 07:56
timotimo Z=> ought to do that 07:57
Elronnd hooray! Thanks
discord6 <Tyler (Aearnus)> > ... tail can miss something that was written just before the truncation happened in which the Unix philosophy breaks down 08:00
timotimo clearly what we actually need is tail.ko 08:02
cpan-p6 New module released to CPAN! Random::Choice (0.0.6) by 03TITSUKI 08:11
jmerelo releasable6: status 08:17
releasable6 jmerelo, Next release in ≈6 days and ≈10 hours. 12 blockers. 0 out of 202 commits logged
jmerelo, Details: gist.github.com/c5f93faf47a905b5c8...25118974aa
Geth doc: 180ffdaf47 | (JJ Merelo)++ | doc/Type/Metamodel/ParametricRoleHOW.pod6
Adds ParametricRoleHOW refs #1306
08:30
synopsebot Link: doc.perl6.org/type/Metamodel::ParametricRoleHOW
doc: 2401b58c64 | (JJ Merelo)++ | doc/Type/Metamodel/ParametricRoleGroupHOW.pod6
Adds ParametricRoleGroupHOW

This part becomes a bit more complete, and allows us to understand the inner workings (in fact, the *high-order-work* of Perl 6). Although they are not (so much) intended for final user, they have been used, for instance, in github.com/vrurg/Perl6-OO-Plugin
This closes #1306. Although there might be a few other metamodel classes that have not been documented, they are probably deeper down in the implementation and will never be seen by the user. There's no request to use them, anyway.
synopsebot Link: doc.perl6.org/type/Metamodel::Para...leGroupHOW
jmerelo We need (more) people for the perl6 documentation project. Here's a cry for help: twitter.com/jjmerelo/status/1117348255128608768 08:46
lizmat weekly: twitter.com/jjmerelo/status/1117348255128608768 08:48
notable6 lizmat, Noted!
jmerelo Thanks, lizmat!
lizmat jmerelo: you're welcome :-) 08:49
jmerelo lizmat: lately it's been only Coke and cfa mainly. The level of contributions has gone down like 3 years or so... I intend to request Google Season of Docs, coming up in a few days.
lizmat sounds like a great plan! 08:50
jmerelo lizmat: but we still need a sustainable set of people giving a hand... So let's see what happens...
lizmat jmerelo++ 08:51
tyil weekly: www.tyil.nl/post/2019/04/11/perl6-...er-images/ 08:58
notable6 tyil, Noted!
lizmat wonders whether this is up masak's ally: blog.wesleyac.com/posts/language-todos 10:38
news.ycombinator.com/item?id=19656666 # HN comments
*alley 10:39
El_Che ahaha
I was looking at masak's masterplan
jmerelo lizmat: last week I was at a functional language event. Idris was mentioned several times. I was wondering if we can do something like type-dependence with perl6. 10:57
lizmat is unsure of the exact meaning of type-dependence in this context 10:58
jmerelo lizmat: "where" constraints come close, but they are not enforced in compile time.
lizmat: dependent types are types that depend on values defined in compile time.
lizmat isn't that what subsets are? 10:59
jmerelo lizmat: for instance, let's say you have this-length = 5 and then define foo( array-length(5) $bar)
lizmat: subsets are defined in runtime. It's close, but not exactly the same. 11:00
lizmat perhaps create an issue?
jmerelo lizmat: if some value does not meet the subset constraint, an error is thrown in run time; it's not a type error in compile time 11:01
lizmat: I think it's more at a fundamental language design level. Maybe an issue in problem-solving. Unless you say this is not a real problem and can be done on the current infrastructure.
lizmat well, if it *can* be determined at compile time, then maybe the static optimizer stage needs to be taught this 11:02
jmerelo lizmat: that's basically the key. Idris runs a lot of stuff in compile time. Most stuff, as a matter of fact, that does not include system interaction. 11:03
lizmat to an extent, that's also true in Perl 6, consider e.g. constant folding 11:04
jmerelo lizmat: all this modulo what I understood of the talk, of course.
lizmat m: say 42 + 666 # compiled as "say 708"
evalable6 708
jmerelo lizmat: incidentally, I did a presentation on functional programming using Perl 6. One of the speakers mentioned that he thought Scala was a difficult language until they met perl 6
discord6 <Tyler (Aearnus)> lizmat: my comments on that blog post www.reddit.com/r/programming/comme...e/eku49h5/ 11:05
jmerelo lizmat: that would basically be it, but taken all the way to subsets and maybe where constraints.
lizmat if you have a square peg mind, it's hard to fit a round language in it
jmerelo lizmat: also, subsets should be actual types...
lizmat Tyler++ 11:06
discord6 <Tyler (Aearnus)> also fwiw I don't believe it's possible to run anywhere near a negligible subset of where clauses without fundamentally changing how they work 11:08
<Tyler (Aearnus)> er, at compile time, i meant 11:09
jmerelo Tyler that is probably true...
discord6 <Tyler (Aearnus)> that is, unless they were restricted to things that could be statically determined about the values that they constrain but to be able to determine anything useful statically, you'd need a method of passing around proofs of those properties (and that's another bucket of worms entirely) 11:11
jmerelo Tyler if you change "statically" to "compile time" I basically agree with you. 11:12
discord6 <Tyler (Aearnus)> yeah, I guess that's an important distinction to make this would hypothetically take place after macro expansion and the first (few?) phasers and the like 11:13
<Tyler (Aearnus)> there's a bit that i'n left wanting with regards to the p6 type system tbh 11:14
<Tyler (Aearnus)> **a lot that i'm left wanting
MasterDuke as i understand it, some amount of what perl 6 now does at run-time could be done at compile-time. the hope/plan is to slowly make more things compile-time
jmerelo Tyler: well, the fact that we might even talk about this shows how flexible it is. There's nothing fundamentally non-perl6y about doing that, as MasterDuke says. 11:15
MasterDuke jmerelo: in my case, i've made fewer doc commits recently because the docs haven't as obviously needed help. i used to be able to go to almost any random page and find something to do, but that isn't the case now 11:18
discord6 <Tyler (Aearnus)> definitely. p6 is still leagues ahead of everything comparable as far as the type system goes
jmerelo MasterDuke: the problem is mainly the pages that are missing... And sections that are missing on already existing pages. 11:19
discord6 <Tyler (Aearnus)> while we're on this topic, I might as well throw this out there: I'd love if you could destructure on the signatures of callables like you can on positionals, so you could write functions like this: sub apply(::A $v, &f (::A --> ::B)) { f($v) } or something like that 11:20
MasterDuke jmerelo: those are harder problems to make small contributions to. it's always easier to edit something existing than create something from scratch
jmerelo MasterDuke: you are right. But I have no idea how to fix that.
MasterDuke Aearnus: i thought there was a way to do something similar?
docs.perl6.org/type/Signature#Cons..._Callables 11:21
jmerelo MasterDuke: you are right that, say one year ago, you could just go to one page and fix stuff. Now you have to choose one issue and research a bit (although there are easy issues too)
discord6 <Tyler (Aearnus)> MasterDuke: oh, sweet! that's pretty much what I wanted 11:22
jmerelo MasterDuke: still, it needs to be done. Any suggestion is welcome.
MasterDuke jmerelo: i don't have any ideas yet about how to encourage creating missing pages, but as for contributions in general, a good list of easy issues is the first step 11:25
MasterDuke jmerelo: maybe we need to make those even more obvious than sorting/filtering the list? 11:27
create another pinned issue that just contains a list of the easy ones?
jmerelo: maybe extend the docs squashathon to include some of perl6.org? examples.perl6.org/ perhaps 11:30
jmerelo MasterDuke: no problem about that. 11:31
MasterDuke: but examples is an unexplored territory...
MasterDuke: we would need to use something like Test::Script::Output to check if they work as expected. Some of them might be obsolete. 11:32
MasterDuke: there are a couple of tags in the repo that indicate they are easy. We could also pin them, but you can only pin one (and I'd rather have the biggie 6.d issue pinned there (that one has some of them that are easy enough)) 11:33
MasterDuke ah, didn't know you could only pin one 11:39
jmerelo: maybe once code examples are made runnable/editable (by integrating glot.io or whatever) there might be a bunch of easy new issues around that 11:41
jmerelo MasterDuke: there's no problem with issues. There are quite a bunch of them. Code in example works, so I don't think there's a lot of stuff to be done creating issues for non-working pieces of code. 11:55
MasterDuke: and if something does not work, I'm afraid it's not going to be easy to fix it. It's probably due to obsolescence, or new 6.d (which is mostly not documented), so fixing code might fall into something as hard as writing new docs. 11:57
guifa .tell timotimo hot on the heals of yesterday’s grammar discussion, I’ve already got localized numbers (mostly) ready as a role+token. Just have to make it more lenient (accept +⁺₊➕﬩﹢+ for plus, etc)and handle prefix/suffixes for languages that use them but it’s already in GH to play with 14:35
yoleaux guifa: I'll pass your message to timotimo.
masak "on the heals of" a discussion is a nice Freudian slip, if it was a hurtful discussion ;) 15:18
timotimo ouch.
yoleaux 14:35Z <guifa> timotimo: hot on the heals of yesterday’s grammar discussion, I’ve already got localized numbers (mostly) ready as a role+token. Just have to make it more lenient (accept +⁺₊➕﬩﹢+ for plus, etc)and handle prefix/suffixes for languages that use them but it’s already in GH to play with
El_Che masak: pbs.twimg.com/media/D4EfE-VX4AAhnDD.jpg
masak El_Che: that's a nice autopun. I've heard it somewhere or mother before. 15:21
El_Che :)
Geth perl6.org: lukasvalle++ created pull request #125:
Stack Overflow question and answers
15:50
perl6.org: 1ca7313bcc | lukasvalle++ | source/community/index.html
Stack Overflow question and answers
15:51
perl6.org: af53e7e98e | (Juan Julián Merelo Guervós)++ (committed using GitHub Web editor) | source/community/index.html
Merge pull request #125 from lukasvalle/master

Stack Overflow question and answers
lizmat weekly: thenewstack.io/a-conversation-with...-and-perl/ 19:19
notable6 lizmat, Noted!
masak tfw you're wondering if your refactor went wrong, or if you just found a subtle closure-related but in Rakudo... :) 20:38
bug* 20:39
Xliff \o 21:17
Xliff Does anyone know the best way to debug this? 22:39
"Circularity detected in multi sub types for &new"
I almost want to say this is a bug. 22:40
Xliff Method called is (Str(), Class(), Int()) and the class I am trying to dispatch via samewith is (Str(), Class(), Int(), @) 22:41
Yet it's saying that is circular. How?
SmokeMachine is there any way no `mi6 build` do not use ONLY the main module of a distribution to create the README.md? 22:42
timotimo the mi6 file lets you turn off the readme generation, that's one thing you can do 22:43
then you can make it however you want to
Xliff How would I wrap all candidates of a multi? 22:44
timotimo wrap the proto or for-loop over the candidates i guess? 22:45
Xliff m: 1.^lookup('STORE').candidates.say
evalable6 (exit code 1) No such method 'candidates' for invocant of type 'Mu'
in block <unit> at /tmp/8ESrpFd7m0 line 1
Xliff m: my $a = 1; $a.^lookup('STORE').candidates.say
evalable6 (exit code 1) No such method 'candidates' for invocant of type 'Mu'
in block <unit> at /tmp/NbBtS7dxEp line 1
Xliff m: my $a = 1; $a.^lookup('STORE').say
evalable6 (Mu) 22:46
timotimo m: 1.^find_method('STORE').say
Xliff m: my $a = 1; Int.^lookup('STORE').say
evalable6 (Mu)
(Mu)
timotimo oh
Xliff O_o
timotimo m: my $foo = 1; $foo.VAR.^find_method('STORE').say
evalable6 (Mu)
timotimo m: my $foo = 1; Scalar.^lookup('STORE').say
evalable6 (Mu)
timotimo too close to bedtime to figure this out maybe 22:47
Xliff :(
Thanks for trying.
timotimo m: my $foo = 1; Scalar.^methods>>.name.say
evalable6 (<anon> <anon> new name of default dynamic WHICH BUILDALL)
timotimo m: my $foo = 1; Scalar.^methods(:all)>>.name.say
evalable6 (<anon> <anon> new name of default dynamic WHICH BUILDALL serial skip ASSIGN-KEY invert cl…
timotimo, Full output: gist.github.com/6cd9544afab11660ea...7e45440588
Xliff m: Array.^find_method('map').say
evalable6 Method+{is-nodal}.new
timotimo it simply doesn't have a STORE
in its method list at least
Xliff Would that be in HOW? 22:48
timotimo it could be deeper in the 6model, actually 22:49
Xliff m: Positional.^find_method('STORE').say
evalable6 (Mu)
Xliff m: Positional.^lookup('STORE').say 22:50
evalable6 (Mu)
timotimo after all, we do oftentimes lower scalar assignment to literal pointer deref and storing
rather than go through a method
SmokeMachine timotimo: but if I want it to regenerate the README.md but just want it thread from more files?
Xliff Well.... so much for getting WHEN in as a module! :P
timotimo you could put a STORE method in that you can use to put stuff in there, but it won't make assigning to a scalar cause the method to be called if it's overriden or wrapped
have you had a look at the Tie:: namespace on modules.perl6.org? and also P5tie? all modules liz made 22:51
perhaps they can be an inspiration to whatever you want to do
Xliff Hmmm... Thanks for the suggestion!
SmokeMachine I mean: I want to use `#| blablabla` to document my traits and operators, but those ar not defined on my main module, but its used by them... 22:52
timotimo SmokeMachine: no idea, sorry :(
SmokeMachine timotimo: thanks.. 22:53
timotimo i don't even see where generating the readme happens? 22:54
oh
SmokeMachine: modules.perl6.org/dist/App::Mi6:cp...6.pm6#L131 22:55
check it out
the DOC phaser could be of service here
SmokeMachine timotimo: modules.perl6.org/dist/App::Mi6:cp...6.pm6#L131 22:56
yes... that... sorry!
timotimo you can at the very least set a filename to use for the readme generator
also, it looks like mi6 uses the lib folder as its PERL6LIB, so you can have a module in there that isn't in the provides section of the META6.json 22:57
Xliff timotimo: Before you go, who is the best person to talk to regarding "Circularity detected in multi sub types for &new"
timotimo and that could be responsible only for readme regeneration
Xliff Because I can't figure out how a 3-arg method new doing samewith to a 4-arg multi is circular.
timotimo Xliff: all i can say is "search the git log for that" and that gives this commit: 22:58
commit 993c01e33f45e3785e56cb63da638829c4d0d305
Date: Sat Aug 16 12:45:23 2008 +0000
SmokeMachine this just uses the first file... `perl6 --doc=Markdown lib/Red.pm6 lib/Red/Traits.pm6` :(
Xliff timotimo: LOL! Thanks.
MasterDuke Xliff: you don't want nextwith? 22:59
Xliff MasterDuke: Tried with both. Same result.
timotimo most of the mentions of "circularity" in the git log of rakudo are about making things work with bootstrapping, i.e. "core setting is written in perl6 and wants to use some perl6 stuff in itself" 23:00
MasterDuke hm. but samewith is for calling the same candidate. so it couldn't go from a 3-arg to a 4-arg
Xliff MasterDuke: Here's the code github.com/Xliff/p6-GtkPlus/blob/m...er.pm6#L80
MasterDuke: My understanding is that it would re-start the dispatch with different parameters.
So yes, that would go from 3 to 4.
I could be mistaken, but I would expect a lot more things to be breaking if that wasn't the case. 23:01
Funny. I search for "Circularity" and get d2999d738b1216664b647ae5135adb09eb349cde
MasterDuke Xliff: i think samewith is definitely the wrong thing. what about just calling self.new with the new args explicitly? 23:02
Xliff MasterDuke: OK. 23:03
timotimo: Uhh... that looks like code from Parrot! =) 23:04
timotimo Xliff: i forgot how to search for commits with text in the description, so i actually searched for commits that had changes in the files themselves including "Circularity"
MasterDuke (take my advice with a grain of salt, also currently negotiating with a sick toddler)
timotimo so perhaps try $?ROUTINE(...) 23:05
is that a thing that can help?
Xliff OK. Same error.
timotimo or is the problem actually at compile time and only about the canditates and their signatures?
Xliff No. This is runtime.
git log --grep="<term>" 23:06
timotimo: Is that $?ROUTINE or &?ROUTINE? 23:07
timotimo should be &
Xliff m: sub a say { &?ROUTINE.name.say }; a
evalable6 (exit code 1) 04===SORRY!04=== Error while compiling /tmp/hDJOPa7PW3
Missing…
Xliff, Full output: gist.github.com/b5f631326875b6a527...5fd344e290
Xliff m: sub a { &?ROUTINE.name.say }; a
evalable6 a
Xliff Thanks
timotimo SmokeMachine: of course, it's exactly like a regular invocation of the file
SmokeMachine: that's why i suggest putting something special into a DOC phaser
Xliff This is starting to look like a bug. 23:09
I replaced call with call(1), and am still getting the same error.
So it looks like a run-time computation of something that happens at compile time. I don't get to ANY of the multi methods.
timotimo SmokeMachine: like putting DOC { say "this will show up in the readme!" } in that module
Xliff: anything helpful in the --ll-exception? 23:10
Xliff Will look.
Damn. No. This is in a callback, so --ll-exception doesn't apply. 23:11
Let me see if I can call it directly.
Same result with a direct call. --ll-exception doesn't add anything new. 23:13
SmokeMachine timotimo: great idea! Thanks!
MasterDuke m: proto foo(|) {*}; multi foo($a) { say "1 $a"; samewith($a, 9) }; multi foo($a, $b) { say "2 $a $b" }; foo(3) # hmm, i seem to be wrong 23:18
evalable6 1 3
2 3 9
MasterDuke Xliff: mea culpa ^^^ 23:23
choiboi I've been messing around with the 'grammar' structure and I was wondering if there is any way to make `token TOP` to accept several numbers like `token TOP { <numbers> <expr> };`
Xliff MasterDuke: LOL!
MasterDuke: Thanks for checking. However my code is littered with such references. I would have known if samewith was going down the wrong path a while ago. 23:24
Still. Beggars can't be choosers. I'm always willing to take suggestions. Now working in isolation.
OK. That link is good for an example. 23:30
If I try to call GTK::Dialog::FileChooser with ANY set of arguments, I get that error.
Think I should rakudobug?
I will start pulling multis, now. 23:31
MasterDuke Xliff: what if you just add a multi with a constant, will that get called? e.g., multi new("foo"); new("foo") 23:33
oh, you have a new with just a capture, it should pick up anything les 23:34
*else
Xliff Yep! And that was the problem. 23:36
Taking that out nixed the circularity. But why was that even getting called?
Capture should have been the last multi attempted! 23:37
MasterDuke m: proto foo(|) {*}; multi foo($a) { say "1 $a"; samewith($a, ("_OK" => 2, "_Cancel" => 3)) }; multi foo($a, @b) { say "2 $a @b[]" }; multi foo(|c) { say "c " ~ c }; foo(4) 23:55
evalable6 1 4
2 4 _OK␉2 _Cancel␉3