Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2017-06-08

Perl 6 | Reference Documentation | Rakudo

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
00:23 mcmillhj joined #perl6
00:28 mcmillhj joined #perl6
00:31 lookatme joined #perl6
00:33 mcmillhj_ joined #perl6
00:42 mcmillhj joined #perl6
00:44 mcmillhj joined #perl6
00:44 mcmillhj joined #perl6
00:45 mcmillhj_ joined #perl6
00:54 samcv yay RT 128875 fixed :-) https://rt.perl.org/Ticket/Display.html?id=128875
00:54 samcv m: say "All hell is breaking loose" ~~ m:i:m/"All is fine, I am sure of it"/
00:54 camelia rakudo-moar 1ac799: OUTPUT: «False␤»
00:55 bioduds ops, sorry, I went away for a while
00:55 bioduds is something missing?
00:57 raschipi bioduds, now go back to https://github.com/perl6/ecosystem and click the "New Pull Request" button
00:57 raschipi Then the link "compare across forks" at the top. Find your own copy in the box in the left.
00:57 bioduds doing it
00:57 raschipi The second box is the patch-1 branch github created for you
00:57 bioduds ok, then?
00:58 bioduds bioduds:patch-1 is up to date with all commits from perl6:master. Try switching the base for your comparison.
00:59 raschipi Click the scwitching the base link
00:59 bioduds Update META.list with EC-Grammars-DIG #1
01:00 bioduds i need to accept the checkboxes?
01:00 raschipi Read them, they are important.
01:00 bioduds I did
01:00 bioduds I have a license, GNU
01:00 bioduds I agree with meta
01:01 bioduds what next?
01:01 bioduds make a comment?
01:01 bioduds Reopen pull request?
01:02 Geth ¦ ecosystem: rafaelschipiura++ created pull request #346: Update META.list with EC-Grammars-DIG
01:02 Geth ¦ ecosystem: review: https://github.com/perl6/ecosystem/pull/346
01:03 raschipi I clicked the gree button and it worked.
01:03 bioduds ops, Geth I'm not being able to agree on this one
01:04 raschipi Geth is a bot that tells us what happens in the repos
01:04 bioduds oh
01:04 raschipi I'm rafaelschipiura
01:04 bioduds great, so what should I do now?
01:04 raschipi Did you click the green button?
01:05 bioduds the comment button?
01:05 bioduds oh
01:05 bioduds it showed now
01:05 bioduds Merge pull request
01:05 bioduds right? should I click on it?
01:05 raschipi I think git got confused, it was my fault, sorry.
01:06 raschipi No, now you wait.
01:06 bioduds ok, standing by
01:06 raschipi Someone has to accept it.
01:07 bioduds so I don't click on Merge pull request?
01:08 bioduds wouldn't it finish the process?
01:08 raschipi No idea.
01:08 bioduds check now, please
01:08 bioduds I agreed to all
01:09 bioduds Pull request successfully merged and closed
01:09 raschipi It's this one: https://github.com/perl6/ecosystem/pull/346
01:09 raschipi Please agree with the boxes in a comment please.
01:10 Geth ¦ ecosystem: 49c6daa53e | rafaelschipiura++ (committed by Zoffix Znet) | META.list
01:10 Geth ¦ ecosystem: Update META.list with EC-Grammars-DIG (#346)
01:10 Geth ¦ ecosystem:
01:10 Geth ¦ ecosystem: "A Grammar to parse dig results.":
01:10 Geth ¦ ecosystem: https://github.com/bioduds/EC-Grammars-DIG
01:10 Geth ¦ ecosystem: review: https://github.com/perl6/ecosystem/commit/49c6daa53e
01:10 bioduds yep
01:10 raschipi There it goes, Zoffix did it.
01:10 bioduds excellent
01:11 bioduds does it automatically gets listed in modules.perl6.org?
01:11 raschipi Sorry for the confusion. We learned togheter how to do it.
01:12 bioduds lol, no need to apologize. Thank you
01:12 bioduds I'm glad people work for each other here :D
01:12 bioduds me for you and you for me :D
01:12 bioduds now I guess it will get listed eventually, right?
01:13 bioduds thank you guys. Cheers.
01:14 bioduds Here's the post for interested parties https://steemit.com/blockchain/@bitworkers/perl6-hon-decentralized-justice-deep-study-of-blockchain-code-this-effort-resulted-in-this-module
01:15 atta joined #perl6
01:16 aborazmeh joined #perl6
01:16 aborazmeh joined #perl6
01:20 raschipi bioduds: It's already listed.
01:21 raschipi bioduds: Boa sorte com o projeto!
01:30 thundergnat bioduds: For what it is worth, it is easier for automated tools if you use an SPDX string for the license in your META6 file. See https://spdx.org/licenses/
01:42 mspo joined #perl6
01:46 mspo https://github.com/metakirby5/codi.vim
01:46 atta joined #perl6
01:46 Xliff samcv++ # Nice catch!
01:46 raschipi_ joined #perl6
01:47 ilbot3 joined #perl6
01:47 Topic for #perl6 is now »ö« Welcome to Perl 6! | https://perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:,  or /msg camelia p6: ... | irclog: http://irc.perl6.org or http://colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend!
01:48 bioduds checking it thundergnat
01:48 lookatme morning .o/
01:49 raschipi_ bioduds: I already sent a PR with the change thundergnat suggested.
01:49 raschipi_ oi lookatme
01:50 bioduds ok, very easy, thanks thundergnat. But it does correctly enforce it, right? I saw a Richard Stallman lecture recently and I'm a big fan, he suggested we putted in all files directly always
01:50 lookatme :)
01:50 bioduds excellent. thanks a lot raschipi_
01:51 atta joined #perl6
01:52 lookatme _(:3 」∠)_
01:56 raschipi_ bioduds: the META6.json file can't even be put under copyleft, because the ecosystem manipulates it so people can browse and get the modules. That field indicates the license the rest of the software is under.
01:56 atta joined #perl6
01:57 raschipi_ That's what those checkboxes were. Well it can be under copyleft, but then it couldn't be distributed.
01:58 raschipi_ The SPDX identifier will also be made mandatory at some point.
02:09 aborazmeh joined #perl6
02:09 aborazmeh joined #perl6
02:15 Cabanossi joined #perl6
02:27 Unavowed_ joined #perl6
02:30 ugexe mandatory for what?
02:31 ugexe the only mandatory things should be those required to get a distribution installed
02:34 ugexe you can enforce at some ecosystem level, but i dont see cpan doing so
02:42 noganex joined #perl6
03:26 sivoais joined #perl6
03:30 Cabanossi joined #perl6
03:52 aborazmeh joined #perl6
03:52 aborazmeh joined #perl6
03:59 Cabanossi joined #perl6
04:03 aindilis joined #perl6
04:05 stmuk joined #perl6
04:17 xtreak joined #perl6
04:23 cgfbee joined #perl6
04:29 MilkmanDan joined #perl6
04:41 curan joined #perl6
04:44 Cabanossi joined #perl6
05:01 TeamBlast joined #perl6
05:19 xtreak joined #perl6
05:26 xtreak joined #perl6
05:29 Cabanossi joined #perl6
05:29 xtreak joined #perl6
05:40 SmokeMachine hi there! is some one near San Jose (California)?
05:40 SmokeMachine Im here for WWDC...
05:44 zengargoyle_ bioduds++
05:50 domidumont joined #perl6
05:56 domidumont joined #perl6
06:02 xtreak joined #perl6
06:10 wamba joined #perl6
06:33 moritz what do we call & in regexes?
06:33 moritz intersection? AND?
06:37 moritz m: say 'a' ~~ /a && ./
06:37 camelia rakudo-moar 1ac799: OUTPUT: «「a」␤»
06:44 lookatme m: say 'a && b' ~~ /a && ./
06:44 camelia rakudo-moar 1ac799: OUTPUT: «「a」␤»
06:45 lookatme m: say 'a && b' ~~ /a \&\& ./
06:45 camelia rakudo-moar 1ac799: OUTPUT: «Nil␤»
06:45 lookatme m: say 'a && b' ~~ m:s/a && ./
06:45 camelia rakudo-moar 1ac799: OUTPUT: «False␤»
06:45 lookatme m: say 'a && b' ~~ m:s/a \&\& ./
06:45 camelia rakudo-moar 1ac799: OUTPUT: «「a && b」␤»
06:45 lookatme m: say 'a && b' ~~ m:s/a && b/
06:45 camelia rakudo-moar 1ac799: OUTPUT: «False␤»
06:45 lookatme m: say 'a && b' ~~ m/a && b/
06:45 camelia rakudo-moar 1ac799: OUTPUT: «False␤»
06:45 masak moritz: "conjunction", it seems
06:46 masak it's strangely-consistent-ly trying to sell the idea that the `|` and `&` operators in regexes are *junctions*
06:46 lookatme m: say 'a && b' ~~ m/a || b/
06:46 camelia rakudo-moar 1ac799: OUTPUT: «「a」␤»
06:46 masak ("it" being S05)
06:47 masak `&` is the "declarative conjunction"
06:47 moritz masak: then | is a disjunction?
06:47 masak yep
06:47 moritz wow, TIL
06:48 masak though it's possible to argue for "civilian" names for both of these
06:48 masak I'd go with something like "alternative" for `|`
06:48 masak and "overlap" for `&`
06:49 masak now I will stop talking before I say something about category theory
06:51 pecastro joined #perl6
06:57 TeamBlast joined #perl6
06:59 rindolf joined #perl6
07:06 pecastro joined #perl6
07:27 astj joined #perl6
07:39 dakkar joined #perl6
07:47 * lizmat clickbaits https://6guts.wordpress.com/2017/06/08/sorting-out-synchronous-io/
07:48 moritz lizmat++
08:02 xtreak joined #perl6
08:09 dct joined #perl6
08:13 nadim joined #perl6
08:15 parv joined #perl6
08:29 Cabanossi joined #perl6
08:29 esh joined #perl6
08:36 jargan joined #perl6
08:37 avar joined #perl6
08:37 avar joined #perl6
08:39 Actualeyes joined #perl6
08:42 rightfold m: ('1. Install Perl 6', '2. Write Perl 6' ... '4. Profit!").List.say
08:42 camelia rakudo-moar 1ac799: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Unable to parse expression in single quotes; couldn't find final "'" ␤at <tmp>:1␤------> 3Write Perl 6' ... '4. Profit!").List.say7⏏5<EOL>␤    expecting any of:␤        single quotes␤      …»
08:42 rightfold 10:42 <rightfold> m: ('1. Install Perl 6', '2. Write Perl 6' ... '4. Profit!').List.say
08:45 domidumont joined #perl6
08:46 parv m: ('1. Install Perl 6', '2. Write Perl 6' ... '4. Profit!').List.say
08:46 camelia rakudo-moar 1ac799: OUTPUT: «(1. Install Perl 6 2. Write Perl 6)␤»
08:47 parv no profit for you, rightfold.
08:47 parv that, or perl 6 does not believe in profit.
08:47 rightfold >:(
08:48 parv hunh, that -- >:( -- works on both sides.
08:49 rightfold XD
08:49 rightfold Angry guy or sad hat guy
08:51 parv m: '2. write'++
08:51 camelia rakudo-moar 1ac799: OUTPUT: «Cannot resolve caller postfix:<++>(Str); the following candidates␤match the type but require mutable arguments:␤    (Mu:D $a is rw)␤␤The following do not match for other reasons:␤    (Bool:D $a is rw)␤    (Bool:U $a is rw --> Bool::False)␤ …»
08:51 parv m: $x = '2. write'; $x++; $x.say
08:51 camelia rakudo-moar 1ac799: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Variable '$x' is not declared␤at <tmp>:1␤------> 3<BOL>7⏏5$x = '2. write'; $x++; $x.say␤»
08:51 moritz woah, that's quite an awesome error message, if you ask me
08:51 moritz (the "require mutable arguments")
08:51 parv what do i win, moritz?!
08:52 parv what is "$a" in the error message?
08:56 rightfold Parameter name
08:59 Cabanossi joined #perl6
08:59 astj_ joined #perl6
08:59 parv how does one reverse a string? can't find a way in https://docs.perl6.org/routine/reverse short of breaking word into characters and then reversing that list.
09:00 rightfold m: "hola señorita".reverse.say
09:00 camelia rakudo-moar 1ac799: OUTPUT: «(hola señorita)␤»
09:00 rightfold Bleh treating items as lists
09:01 rightfold m: "hola señorita".flip.say
09:01 camelia rakudo-moar 1ac799: OUTPUT: «atiroñes aloh␤»
09:01 rightfold parv: ^
09:01 lookatme lizmat++
09:01 parv flipping flip! seriously? thanks rightfold++
09:03 rightfold Yeah :S
09:03 lookatme m: "hola señorita".comb.reverse.say
09:03 camelia rakudo-moar 1ac799: OUTPUT: «(a t i r o ñ e s   a l o h)␤»
09:04 lookatme m: "hola señorita".comb.reverse.join.say
09:04 camelia rakudo-moar 1ac799: OUTPUT: «atiroñes aloh␤»
09:04 lookatme m: "hola señorita".flip.say
09:04 camelia rakudo-moar 1ac799: OUTPUT: «atiroñes aloh␤»
09:04 zakharyas joined #perl6
09:04 * parv makes a note about comb to decompose a string
09:05 jnthn You can also all .NFC and .NFD to get a Uni, if you want a particular decomposition, fwiw :)
09:05 rightfold m: "진주 육".flip.say
09:05 camelia rakudo-moar 1ac799: OUTPUT: «육 주진␤»
09:05 rightfold Nice
09:06 lookatme (•̀ᴗ•́)و ̑̑
09:06 jnthn .reverse vs. .flip is just part of Perl 6 not overloading two distinct semantics onto one operation depending on its type. It's pretty consistently done (== vs eq, x vs xx, etc.)
09:07 rightfold m: (•̀ᴗ•́)و ̑̑
09:07 camelia rakudo-moar 1ac799: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Bogus statement␤at <tmp>:1␤------> 3(7⏏5•̀ᴗ•́)و ̑̑␤    expecting any of:␤        prefix␤        term␤»
09:07 lookatme m: ' (•̀ᴗ•́)و ̑̑'.flip.say
09:07 camelia rakudo-moar 1ac799: OUTPUT: « ̑̑و)•́ᴗ•̀( ␤»
09:07 rightfold Looks so happy now
09:07 lookatme Haha
09:08 wamba joined #perl6
09:08 rightfold m: "κος".flip.say
09:08 camelia rakudo-moar 1ac799: OUTPUT: «ςοκ␤»
09:08 rightfold Not the right sigma >:(
09:09 rightfold m: '????‍❤️‍????‍????'.flip.say
09:09 camelia rakudo-moar 1ac799: OUTPUT: «????‍❤️‍????‍????␤»
09:11 lowbro joined #perl6
09:11 lowbro joined #perl6
09:13 masak jnthn++ # https://6guts.wordpress.com/2017/06/08/sorting-out-synchronous-io/
09:18 parv is it possible to find signature, or better doc, of a random (at least) public method/function?
09:21 moritz parv: your best shot is the search box on docs.perl6.org
09:27 parv moritz: thing is one has to have itsy bitsy, tiny idea about where to look into. i took a semi-wild guess from the drop down list for "method"
09:28 parv ... and arrived at https://docs.perl6.org/type/Metamodel::ClassHOW
09:35 parv m: Str.^lookup( 'NFC' ).perl
09:35 camelia rakudo-moar 1ac799: ( no output )
09:35 parv m: my $x = ''; $x.^lookup( 'NFC' ).perl
09:35 camelia rakudo-moar 1ac799: ( no output )
09:35 parv m: my $x = ''; $x.^lookup( 'NFC' ).perl.say
09:35 camelia rakudo-moar 1ac799: OUTPUT: «method NFC (Str $: *%_) { #`(Method|37752208) ... }␤»
09:37 * parv forgot that he was using perl6 REPL.
09:44 Cabanossi joined #perl6
09:46 parv ok, &<name>.signature (https://docs.perl6.org/type/Signature) works for flip (&flip.signature), but not for NFC.
09:46 parv m: say &NFC.signature
09:46 camelia rakudo-moar 1ac799: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Illegally post-declared type:␤    NFC used at line 1␤␤»
09:49 jnthn that's 'cus there is no NFC sub, only a method on Str
09:49 jnthn Or Uni
09:51 parv sometimes i am amazed that guess of perl5 syntax works: &{Str.NFC}.signature
09:51 parv thanks jnthn.
09:53 rightfold Is there a shorter form of {o.m($^a, $^b)}?
09:57 rightfold Is there a way to work around the special casing that *@xs does when you don't know whether your number of arguments will be 1?
09:58 rightfold For example, in: reduce &f, $x, |@xs;
09:58 rightfold I suppose I should make it so that I always avoid passing multiple arguments in such case.
09:58 rightfold Then I won't run into that issue ever.
09:59 jnthn *@xs flattens, but **@xs doesn't
09:59 rightfold *@xs does it depending on how many arguments there are and if the first one is iterable
10:03 rightfold I really don't understand all this special casing wrt lists
10:06 rightfold Ok, so I have to write reduce &f, ($x, |@xs) if @xs may be empty and $x may be an empty list
10:24 kurahaupo joined #perl6
10:37 pecastro joined #perl6
10:40 pmurias joined #perl6
10:45 vetmaster joined #perl6
10:56 domidumont joined #perl6
11:03 Actualeyes joined #perl6
11:07 wamba joined #perl6
11:26 trnh joined #perl6
11:33 astj joined #perl6
11:38 astj joined #perl6
11:39 astj joined #perl6
11:42 gregf_ joined #perl6
11:45 Cabanossi joined #perl6
11:47 Cabanossi joined #perl6
11:49 AlexDaniel joined #perl6
11:52 itaipu joined #perl6
12:03 aborazmeh joined #perl6
12:03 aborazmeh joined #perl6
12:07 cdg joined #perl6
12:08 itaipu joined #perl6
12:10 eveo joined #perl6
12:14 Actualeyes joined #perl6
12:14 eveo .tell parv that's entirely incorrect tho, which is why it's best not to guess. &{Str.NFC}.signature gives you a block that calls Str.NFC and you're calling signature on that block. You could stick anything into that block and still get the same signature. The correct way is Str.^lookup('NFC').candidates».signature. You should use .candidates bit for subs too, otherwise you only get the sig of the proto
12:14 yoleaux eveo: I'll pass your message to parv.
12:15 eveo left #perl6
12:21 eliasr joined #perl6
12:27 araraloren joined #perl6
12:27 araraloren evening .
12:29 cdg_ joined #perl6
12:37 tbrowder just to clarify my understaning the issue of file handles: do run and shell always require closing stderr and stdout, even if :err and :out are not explicitly used? thanks.
12:38 moritz tbrowder: no
12:39 tbrowder ok, thanks.
12:39 mcmillhj joined #perl6
12:39 rightfold m: say <| =>[$i == 0], $_; for (1, 2, 3, 4).kv;
12:39 camelia rakudo-moar ccfa5e: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Variable '$i' is not declared␤at <tmp>:1␤------> 3say <| =>[7⏏5$i == 0], $_; for (1, 2, 3, 4).kv;␤»
12:40 rightfold m: for (1, 2, 3, 4).kv -> $i, $n -> { say <| =>[$i == 0], $n }
12:40 camelia rakudo-moar ccfa5e: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Malformed parameter␤at <tmp>:1␤------> 3for (1, 2, 3, 4).kv -> $i, $n7⏏5 -> { say <| =>[$i == 0], $n }␤    expecting any of:␤        constraint␤»
12:40 rightfold m: for (1, 2, 3, 4).kv -> $i, $n { say <| =>[$i == 0], $n }
12:40 camelia rakudo-moar ccfa5e: OUTPUT: «=1␤|2␤|3␤|4␤»
12:40 rightfold ah cool
12:41 Unavowed say (3, -4, 7, -1, 2, 0).sort({.abs}) # works
12:41 evalable6 Unavowed, rakudo-moar ccfa5e51a: OUTPUT: «(0 -1 2 3 -4 7)»
12:41 Unavowed say (3, -4, 7, -1, 2, 0).sort(by => {.abs}) # does not work
12:41 evalable6 Unavowed, rakudo-moar ccfa5e51a: OUTPUT: «(-4 -1 0 2 3 7)»
12:46 eveo joined #perl6
12:46 eveo Unavowed: well, .sort doesn't take a named :by argument, so it's not surprising that it doesn't work.
12:47 moritz m: say (3, -4, 7, -1, 2, 0).sort({.abs})
12:47 camelia rakudo-moar ccfa5e: OUTPUT: «(0 -1 2 3 -4 7)␤»
12:47 eveo Unavowed: are you following some tutorial that mentions it? The docs don't mention it.
12:47 perlpilot I think people expect sort to have a :by arg.
12:47 perlpilot I know I've thought that on occasion myself anyway
12:48 eveo Why?
12:48 perlpilot because it reads well I guess.
12:49 moritz back in the days, we allowed calling positional arguments by name
12:49 moritz during these bad old days, calling it with by => ... would have worked
12:50 * eveo shudders
12:50 perlpilot Maybe that's why I sometimes think of it.
12:50 wamba joined #perl6
12:52 rightfold Does it matter whether you use my vs temp for dynamic variables that already exist?
12:53 Unavowed eveo: a "by" argument is mentioned in the perl6 docs: https://docs.perl6.org/routine/sort
12:53 araraloren No, it's a `&by`
12:53 Unavowed although perhaps i'm misreading it as a keyword argument
12:53 araraloren not :&by
12:54 araraloren There is no named parameter version .
12:54 eveo Unavowed: that's a positional argument. If it were named, it would be listed as `:&by`
12:55 raschipi joined #perl6
12:55 eveo left #perl6
12:56 perlpilot rightfold: It makes a small difference ...
12:56 rightfold :O
12:56 Unavowed fair point.  though still a bit surprising that sort() seems to accept arbitrary named arguments and silently ignores them
12:56 perlpilot m: my $*x = 42; { my $*x; say $*x; }
12:56 camelia rakudo-moar ccfa5e: OUTPUT: «(Any)␤»
12:56 perlpilot m: my $*x = 42; { temp $*x; say $*x; }
12:56 camelia rakudo-moar ccfa5e: OUTPUT: «42␤»
12:57 rightfold :D
12:57 perlpilot Unavowed: that's not unique to sort
12:58 astj joined #perl6
12:58 mr-fooba_ joined #perl6
12:58 araraloren Unavowed, I think they dont' check named argument when pass them
12:59 rightfold Thanks perlpilot
13:00 araraloren Unavowed, There some other parameter cause this, I think such as
13:00 araraloren m: sun f(*%args) { say %args; }; f(a => b, c => d); # You don't know what user passed
13:00 camelia rakudo-moar ccfa5e: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Unexpected block in infix position (missing statement control word before the expression?)␤at <tmp>:1␤------> 3sun f(*%args)7⏏5 { say %args; }; f(a => b, c => d); # Yo␤    expecting any of:␤ …»
13:00 araraloren m: sub f(*%args) { say %args; }; f(a => b, c => d); # You don't know what user passed
13:00 camelia rakudo-moar ccfa5e: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Undeclared routines:␤    b used at line 1␤    d used at line 1␤␤»
13:01 araraloren m: sub f(*%args) { say %args; }; f(a => 2, c => 1); # You don't know what user passed
13:01 camelia rakudo-moar ccfa5e: OUTPUT: «{a => 2, c => 1}␤»
13:02 perlpilot Unavowed, araraloren: See https://design.perl6.org/S12.html#Interface_Consistency
13:02 perlpilot (I thought that was also in docs.perl6.org somewhere, but I didn't see it)
13:03 araraloren perlpilot, thanks. That's make sense
13:04 Unavowed does this mean that the behaviour is different for subs and methods?
13:04 Unavowed m: sort((), :asdf)
13:04 camelia rakudo-moar ccfa5e: OUTPUT: «Unexpected named argument 'asdf' passed␤  in block <unit> at <tmp> line 1␤␤»
13:05 Unavowed m: ().sort(:asdf)
13:05 camelia rakudo-moar ccfa5e: ( no output )
13:05 perlpilot ding!  :-)
13:05 timotimo yup, the default signature differs between subs and methods
13:05 timotimo methods also have the invocant argument, which subs don't usually have
13:05 araraloren m: sub f() { say %_; }; f(a => 2, c => 1);
13:05 camelia rakudo-moar ccfa5e: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Placeholder variable '%_' cannot override existing signature␤at <tmp>:1␤------> 3sub7⏏5 f() { say %_; }; f(a => 2, c => 1);␤»
13:05 timotimo araraloren: have to drop the () after f
13:06 araraloren Er..
13:06 Unavowed ah, that explains it then.  thanks for the link, perlpilot
13:06 timotimo the f() says "there's a signature. it's empty", then you use %_ and it's like "that doesn't fit the signature you declared!"
13:06 araraloren I thought it was work with signature..
13:07 aborazmeh joined #perl6
13:07 aborazmeh joined #perl6
13:07 MilkmanDan joined #perl6
13:07 raschipi One thing I was bothered about, don't remember who was complaining the other day about it, is that the .& syntax for calling a subroutine as a method puts the object in the invocant, but a sub expects data to be manipulated in the rightmost positional argument.
13:09 perlpilot why bothered?   That makes sense for how methods should be called.
13:09 araraloren It pass parameter you provided as last parameter
13:09 araraloren .&
13:09 araraloren m: sub f($a, $b) { say $a, $b;}; "123".&f("465")
13:09 camelia rakudo-moar ccfa5e: OUTPUT: «123465␤»
13:10 araraloren em, seems like ...
13:11 araraloren I have to read document again
13:13 raschipi m: "a,c,b".&split(/','/)
13:13 camelia rakudo-moar ccfa5e: OUTPUT: «Type check failed in binding to parameter '$target'; expected Cool but got Regex (/','/)␤  in block <unit> at <tmp> line 1␤␤»
13:14 raschipi m: /','/.&split("a,c,b")
13:14 camelia rakudo-moar ccfa5e: ( no output )
13:14 raschipi m: /','/.&split("a,c,b").say
13:14 camelia rakudo-moar ccfa5e: OUTPUT: «(a c b)␤»
13:17 raschipi Should work like the feed operator, I think.
13:17 raschipi m: split(/','/) <== "a,c,b"
13:17 camelia rakudo-moar ccfa5e: ( no output )
13:17 araraloren Oh, ==> and <==  is last parameter
13:18 stmuk_ joined #perl6
13:18 raschipi m: say() <==split(/','/) <== "a,c,b"
13:18 camelia rakudo-moar ccfa5e: OUTPUT: «(a c b)␤»
13:19 astj joined #perl6
13:19 araraloren m: say "a b c" ==> split(/\s/)
13:19 camelia rakudo-moar ccfa5e: OUTPUT: «a b c␤»
13:19 timotimo don't forget split also takes strings, which is a billion times faster than a regex containing only the single string.
13:19 araraloren That's looks comfortable ~~
13:19 timotimo it also takes lists of strings, which is also a whole lot faster than a regex with only the strings inside | or ||
13:19 araraloren m: say "a b c" ==> split(' ')
13:19 camelia rakudo-moar ccfa5e: OUTPUT: «a b c␤»
13:19 timotimo much less to type, too :)
13:19 raschipi Yes, I just wanted to make it visually distinct in this case.
13:20 timotimo well, only if you put quotation marks into the regex, too
13:20 skids joined #perl6
13:20 araraloren m: say "a b c," ==> split(' ' || ',') # ??
13:20 camelia rakudo-moar ccfa5e: OUTPUT: «a b c,␤»
13:21 araraloren m: say "a b c," ==> split([' ', ',']);
13:21 camelia rakudo-moar ccfa5e: OUTPUT: «a b c,␤»
13:22 araraloren m: say "a b c,d" ==> split(' ' || ',') # ??
13:22 camelia rakudo-moar ccfa5e: OUTPUT: «a b c,d␤»
13:22 araraloren m: .say for "a b c,d e" ==> split([' ', ',']);
13:22 camelia rakudo-moar ccfa5e: OUTPUT: «a␤b␤c␤d␤e␤»
13:22 raschipi m: (' ' || ',').^name
13:22 camelia rakudo-moar ccfa5e: ( no output )
13:22 raschipi m: (' ' || ',').^name.say
13:22 camelia rakudo-moar ccfa5e: OUTPUT: «Str␤»
13:23 araraloren m: say (' ' || ',')
13:23 camelia rakudo-moar ccfa5e: OUTPUT: « ␤»
13:23 timotimo m: say ("hello" || "goodbye")
13:23 camelia rakudo-moar ccfa5e: OUTPUT: «hello␤»
13:24 timotimo || returns the first thing that's true
13:24 araraloren What's different between || and // ?
13:24 raschipi M: say so 'hello'
13:24 raschipi m: say so 'hello'
13:24 camelia rakudo-moar ccfa5e: OUTPUT: «True␤»
13:24 tadzik m: say False // 7
13:24 camelia rakudo-moar ccfa5e: OUTPUT: «False␤»
13:24 araraloren m: say ("hello" // "goodbye")
13:24 camelia rakudo-moar ccfa5e: OUTPUT: «hello␤»
13:24 raschipi araraloren: //returs the first thing that is defined
13:24 tadzik (which may be false)
13:25 araraloren Oh, clear
13:25 raschipi Can something be undefined and true?
13:25 ctilmes joined #perl6
13:25 tadzik I don't think so
13:26 tadzik well, hm
13:26 perlpilot maybe with a mixin
13:26 tadzik m: my $a = Any but True; say defined $a; say so $a
13:26 camelia rakudo-moar ccfa5e: OUTPUT: «False␤True␤»
13:26 * tadzik giggles
13:27 raschipi m: my $a = 'hello' but False; say $a; say so $a
13:27 camelia rakudo-moar ccfa5e: OUTPUT: «hello␤False␤»
13:28 raschipi TimToady++
13:29 astj joined #perl6
13:29 nadim joined #perl6
13:32 ChoHag joined #perl6
13:36 Geth ¦ doc: bd426da343 | (Zoffix Znet)++ (committed using GitHub Web editor) | doc/Language/traps.pod6
13:36 Geth ¦ doc: Move IO::Path stringification into own I/O section
13:36 Geth ¦ doc: review: https://github.com/perl6/doc/commit/bd426da343
13:36 robertle joined #perl6
13:42 raschipi jnthn: Do the changes you made to synchronous I/O put the standard file descriptors in the standard numbering (fd 1= $*IN, fd 2 = $*OUT, fd 3 = $*ERR)?
13:45 jnthn raschipi: I didn't check, but it wouldn't surprise me
13:45 jnthn Though I think they're 0/1/2?
13:45 Geth ¦ doc: cec82fc515 | (Zoffix Znet)++ (committed using GitHub Web editor) | doc/Language/traps.pod6
13:45 Geth ¦ doc: Document IO handle closure in traps
13:45 Geth ¦ doc:
13:45 Geth ¦ doc: Closes #1365
13:45 Geth ¦ doc: review: https://github.com/perl6/doc/commit/cec82fc515
13:45 jnthn m: say $*OUT.native-descriptor
13:45 camelia rakudo-moar ccfa5e: OUTPUT: «1␤»
13:45 jnthn :)
13:46 raschipi Oh yes, 0,1,2
13:47 Geth ¦ doc: 01bc71d319 | (Zoffix Znet)++ (committed using GitHub Web editor) | doc/Type/IO/Handle.pod6
13:47 Geth ¦ doc: Mention :close arg in caveat section of .close docs
13:47 Geth ¦ doc: review: https://github.com/perl6/doc/commit/01bc71d319
13:47 raschipi People were having problems using NativeCall because things weren't in the expected places.
13:48 jnthn I'm not entirely sure that was the problem so much as the handles had been put in non-blocking mode also :)
13:49 jnthn Which certainly woulda been an issue
13:49 jnthn That no longer happens now either :)
13:49 raschipi jnthn++
13:50 raschipi Was it using asynchronous I/O for everything?
13:50 jnthn Yeah, it was previously layer sync atop of async
13:50 jnthn See my recent blog post
13:50 jnthn For details on the changes
13:50 jnthn https://6guts.wordpress.com/2017/06/08/sorting-out-synchronous-io/
13:50 raschipi I'm reading it, togheter with the article about AIO in lwn.net
13:51 raschipi https://lwn.net/Articles/723752/#724198
13:52 astj joined #perl6
13:52 raschipi It says there's no point on using AIO on Linux for anything except for direct (unbuffered) file access. It blocks anyway for other I/O.
13:53 jnthn I have no idea if that's the actual API that libuv uses
13:53 raschipi Or does libuv creates worker threads?
13:53 jnthn It may do for file stuff
13:54 jnthn This seems to be just about file I/O, though?
13:54 raschipi by "This" you mean the article or libuv?
13:54 jnthn The article
13:55 jnthn Most of the useful places to do async I/O are sockets and processes.
13:55 jnthn We don't even *have* async file I/O support in Perl 6
13:57 raschipi Well, libuv was the one dealing with the standard handles, which are actually file I/O. /dev/std*
13:58 jnthn raschipi: Yeah, but we were only doing file I/O or standard handle I/O with libuv in order to use its platform abstractions, not because we actually wanted to not block :)
13:58 jnthn Goes without saying that we're better off not doing that :)
13:58 raschipi Or a pseuterminal, which is also a file.
13:59 raschipi OK, thanks, that's solves my confusion.
14:00 raschipi Now it's using what for the abstraction?
14:00 mspo unix socket files?
14:02 raschipi "Once again, synchronous file I/O looks similar enough everywhere to not need all that much in the way of an abstraction layer." I see now. No need for an abstraction.
14:02 lizmat joined #perl6
14:02 jnthn Yeah, close enough :)
14:02 jnthn Like, you need a tiny bit, but it ain't much
14:06 raschipi MS windows had a complete POSIX subsystem in the past, but they abandoined it at some point.
14:08 Geth ¦ doc: 057c651378 | (Jan-Olof Hendig)++ | doc/Type/CallFrame.pod6
14:08 Geth ¦ doc: Fixed broken link.
14:08 Geth ¦ doc:
14:08 Geth ¦ doc: Closes #1348
14:08 Geth ¦ doc: review: https://github.com/perl6/doc/commit/057c651378
14:09 El_Che raschipi: there is nowadays WSL for the rest of us :)
14:09 raschipi Oh yes, they brought it back, but maintained by Canonical instead.
14:11 raschipi Soon it will be shipping by default with Wayland enabled and people will have to develop just one version for linux that will work on both.
14:11 itaipu joined #perl6
14:11 El_Che don't hold your breath
14:13 raschipi It works on Cygwin already, doesn't it?
14:14 domidumont joined #perl6
14:18 lucasb joined #perl6
14:20 raschipi joined #perl6
14:25 rindolf joined #perl6
14:26 [Coke] jnthn++ eveo++ lizmat++
14:26 travis-ci joined #perl6
14:26 travis-ci Doc build errored. Zoffix Znet 'Move IO::Path stringification into own I/O section'
14:26 travis-ci https://travis-ci.org/perl6/doc/builds/240792154 https://github.com/perl6/doc/compare/de19b020b882...bd426da3439f
14:26 travis-ci left #perl6
14:33 moritz is there a table of precedence of regex elements somewhere?
14:35 travis-ci joined #perl6
14:35 travis-ci Doc build errored. Zoffix Znet 'Document IO handle closure in traps
14:35 travis-ci https://travis-ci.org/perl6/doc/builds/240795650 https://github.com/perl6/doc/compare/bd426da3439f...cec82fc5159e
14:35 travis-ci left #perl6
14:36 Geth ¦ doc: 457be16090 | (Zoffix Znet)++ (committed using GitHub Web editor) | doc/Type/Failure.pod6
14:36 Geth ¦ doc: Document Failure.self
14:36 Geth ¦ doc:
14:36 Geth ¦ doc: Rakudo impl: https://github.com/rakudo/rakudo/commit/0a100825dd
14:36 Geth ¦ doc: Tests: https://github.com/perl6/roast/commit/5bdb393ea9
14:36 Geth ¦ doc: review: https://github.com/perl6/doc/commit/457be16090
14:43 zakharyas joined #perl6
14:50 itaylor57 joined #perl6
14:52 lucasb m: my @a = (Failure.new,).map({ $_ })
14:52 camelia rakudo-moar 6805f5: ( no output )
14:53 lucasb m: my @a = (Failure.new,).map({ $_.self })
14:53 camelia rakudo-moar 6805f5: OUTPUT: «Failed␤␤Actually thrown at:␤  in block <unit> at <tmp> line 1␤␤»
14:53 lucasb so, this overloads the .self method with a new meaning for Failures
14:54 lucasb I wonder if overloading this specific/important method is a wise thing to do
14:58 colomon joined #perl6
14:58 lucasb I like the feature, which is (IIUC), to eagerly throw a Failure, right?
14:59 bwisti joined #perl6
14:59 lucasb I'm just worried about borrowing the name ".self" for this
15:00 timotimo i didn't even know we had a .self method in the firstplace
15:11 lizmat joined #perl6
15:22 rightfold m: my @xs = 1 .. *
15:22 camelia rakudo-moar 6805f5: ( no output )
15:23 rightfold m: my @xs = 1 .. *; say @xs.WHAT
15:23 camelia rakudo-moar 6805f5: OUTPUT: «(Array)␤»
15:24 rightfold m: my @xs = 1 .. *; say @xs.elems
15:24 camelia rakudo-moar 6805f5: OUTPUT: «Cannot .elems a lazy list␤  in block <unit> at <tmp> line 1␤␤»
15:24 rightfold So arrays can be lazy too
15:25 wamba joined #perl6
15:29 daxim hey, can I get some help trying out 6blog?  I want a custom location so I can nuke it easily.  I first installed zef with --install-to=/tmp/perl6 and that worked after creating the directory, but running /tmp/perl6/bin/zef says "No candidate found for 'zef'."
15:29 cdg joined #perl6
15:32 eveo joined #perl6
15:34 brabo joined #perl6
15:36 eveo lucasb: only unhandled Failures explode via .self and I can argue that the "added" Failure.self candidate merely makes Failure.self work as expected. Just as Failure.Num explodes for unhandled failures or returns a NaN, so does Failure.self explodes for unhandled failures or returns self
15:39 rightfold m: 42.VAR.say
15:39 camelia rakudo-moar 58c01c: OUTPUT: «42␤»
15:39 astj joined #perl6
15:42 rightfold m: my @xs; say @xs.VAR.WHAT
15:42 camelia rakudo-moar 58c01c: OUTPUT: «(Array)␤»
15:43 lucasb eveo: ok, from that point of view, agreed, it makes sense
15:44 Geth ¦ doc: 0befd8cc27 | (Zoffix Znet)++ (committed using GitHub Web editor) | doc/Language/5to6-perlfunc.pod6
15:44 Geth ¦ doc: Fix link/symlink desc in 5to6; dogbert17++
15:44 Geth ¦ doc: review: https://github.com/perl6/doc/commit/0befd8cc27
15:47 eveo daxim: that command gives "Need a valid installation target to continue" because location is missing '#inst' part. What exactly are you running and trying to accomplish?
15:47 eveo daxim: just a custom module location or entire custom perl6 location?
15:48 daxim you forgot to create the directory.  it's a bug in zef that the maintainer doesn't rush to fix
15:48 eveo daxim: this appears to work for me without issues:   zef --install-to=inst#/tmp/perl6 install zef; /tmp/perl6/bin/zef info Testo
15:49 * eveo tries
15:49 lucasb but, from another angle, one usually expects $obj.self to have *no* side-effects. In contrast with the ".Bool" method, which is well learned that Failures get "de-activated" in boolean contexts
15:50 eveo lucasb: handled. Yes, both .Bool and .defined methods handle Failures.
15:51 rightfold m: my $xs = [1, 2]; my @xs = $xs; @xs.perl.say
15:51 camelia rakudo-moar f0c3bf: OUTPUT: «[[1, 2],]␤»
15:55 eveo lucasb: almost all methods called on unhandled Failures throw, so it doesn't feel all that shocking that calling .self would do the same. And the new additions solves a real problem; the alternative is using a contraption like has $.foo = ($_ :="foo".IO.mkdir) ~~ Failure ?? .throw !! $_; which with new way is written as simply: has $.foo = "foo".IO.mkdir.self;  IMO the Needs of The Real Usecase outweigh the
15:55 eveo needs of some hypothetical and unlikely usecase.
15:55 eveo daxim: tried it with the created directory too. No issues.
15:56 tony-o DB::ORM::Quicky is getting some updates
15:56 eveo daxim: what bug is the maintainer doesn't rush to fix. What's the Issue number?
15:56 daxim https://github.com/ugexe/zef/issues/162
15:57 tony-o daxim: try 'perl6 /tmp/perl6/bin/zef <arguments for zef>'
15:57 eveo daxim: you forgot to add the 'inst#' part your path there as well
15:58 daxim tony-o, makes no difference
15:58 eveo daxim: it's perl6 -Ilib bin/zef install . --install-to=inst#/tmp/stuff
16:00 daxim eveo, I cleaned up, added inst# as you show, but the result when running the installed zef is the same
16:00 eveo daxim: what's the exact output?
16:00 eveo daxim: also, what's your perl6 version? (perl6 -v)
16:01 tony-o daxim: it looks like ugexe did address your issue in the link you provided above.  'least surprise' would be doing nothing and stating that, there's more than one way to handle skinning that cat and you can't expect everyone to want it to create an CURI or CURF to *your* preference
16:02 daxim eveo, exact output: http://paste.scsys.co.uk/564399
16:02 eveo tony-o: the least surprise would be to create the directory. Which zef does do.
16:02 eveo daxim: and the perl6 version?
16:02 daxim 2017.05
16:03 nowan joined #perl6
16:03 Geth ¦ doc: a037abf45d | (Jan-Olof Hendig)++ | doc/Language/5to6-perlop.pod6
16:03 Geth ¦ doc: Formatting fixes
16:03 Geth ¦ doc: review: https://github.com/perl6/doc/commit/a037abf45d
16:03 tony-o eveo: does it create a CURI or CURF?
16:04 Juerd https://docs.perl6.org/syntax/redo uses redo without an explicit loop construct; using redo like this is valid in Perl 5, but this example does not work (in Perl 6) because "Control flow commands not allowed in toplevel"
16:04 Juerd Is that a doc bug, a spec bug, or a rakudo bug? :)
16:04 eveo tony-o: I've no idea. Looks like a CURI. Here's the stuff there: https://gist.github.com/zoffixznet/126bb143a1fd22438e158ce9fcfd8074
16:05 eveo Juerd: doc bug
16:06 Juerd Okay, in that case: how do I do the same thing in Perl 6? I thought of until $++ { ... }, but that's kinda obscure.
16:07 tony-o i'm mostly just being grumpy eveo.  my point was that creating either is going to not be 'least surprise' to *someone*.
16:07 eveo Juerd: loop { my $x = prompt("Enter a number"); last if $x ~~ /\d+/ }
16:07 moritz and yes, doc bug
16:07 moritz code samples from the docs should work :-)
16:08 eveo daxim: building 2017.05 now to try out on it. How did you get your Perl 6? From deb packages?
16:08 dogbert17 moritz: there's somthing odd going on with that code snippet
16:08 daxim rpm
16:09 eveo daxim: What's in in /tmp/perl6/bin/zef ?
16:09 Juerd eveo: But in my use case it doesn't make sense to label something as a loop. I only want to redo (retry).
16:09 eveo cat /tmp/perl6/bin/zef
16:09 Juerd eveo: I'm basically having a "goto 10", but the normal flow of the program is to run only once.
16:09 eveo Juerd: sure it does: you want to loop until you have successful output :)
16:10 daxim http://paste.scsys.co.uk/564400
16:10 Juerd eveo: Yes, but I really love that in Perl 5 I can document that it's not the regular path.
16:10 eveo m: { say my $x = rand; &?BLOCK;() unless $x ≥ ½ }
16:10 camelia rakudo-moar f0c3bf: OUTPUT: «WARNINGS for <tmp>:␤Useless use of () in sink context (line 1)␤0.647493994566058␤»
16:10 dogbert17 moritz: (cont) if I run   perl6 -e 'my $x = prompt("Enter a number")'  I get Enter a numberCannot flush handle: Failed to flush filehandle: Invalid argument
16:10 eveo m: { say my $x = rand; &?BLOCK() unless $x ≥ ½ }
16:10 camelia rakudo-moar f0c3bf: OUTPUT: «0.651230594635619␤»
16:10 dogbert17 in block <unit> at -e line 1
16:10 eveo m: { say my $x = rand; &?BLOCK() unless $x ≥ ½ }
16:10 camelia rakudo-moar f0c3bf: OUTPUT: «0.655491563361575␤»
16:10 eveo m: { say my $x = rand; &?BLOCK() unless $x ≥ ½ }
16:10 camelia rakudo-moar f0c3bf: OUTPUT: «0.00607174217832942␤0.145133622646804␤0.96059049051011␤»
16:10 Juerd Hmm
16:11 Juerd Not as clear as a simple INPUT: { my $i = prompt ...; redo INPUT unless $i ~~ /.../; ... }
16:12 jnthn loop { my $i = prompt ...; redo unless $i ~~ /.../; ... }
16:12 araraloren night
16:12 Juerd jnthn: The issue I have is that "loop" suggests that repeating is the usual, intended, operation.
16:13 Juerd jnthn: I've always used, in Perl 5, for (;;) or while (1) to indicate a repeated thing (like a repl, shell, etc) and a bare block to indicate that it was a single thing and only redo'ne in case of input errors...
16:13 eveo m: my $x = ({say "making"; rand} ... * ≥ ½).tail; say $x
16:13 camelia rakudo-moar f0c3bf: OUTPUT: «making␤0.501652528265508␤»
16:13 eveo m: my $x = ({say "making"; rand} ... * ≥ ½).tail; say $x
16:13 camelia rakudo-moar f0c3bf: OUTPUT: «making␤making␤0.754727272526417␤»
16:14 eveo use a Seq :)
16:14 eveo Dunno. Feels like a "I used to do it this way, ergo it's the most clear way and everything else pales in comparison" :)
16:14 jnthn Juerd: Hmm, that's an interesting way to distinguish it :)
16:15 Juerd eveo: I'm not insisting on doing it exactly the same way, but I'd like to keep a way to distinguish between two use-cases. If I want to be able to maintain my own code, I need flags to signal intentions for the future reader of my code, i.e. me.
16:16 Juerd Typically I shape my code along the intended flow for regular execution
16:16 daxim I gotta go afk. if you know how to make this work, just tell in the channel, I can catch up later
16:17 Juerd For example, I wouldn't have an if (error) { error handling } else { rest of the program }, but a guard statement to quit the current block early.
16:17 eveo mhm
16:17 Juerd That's another thing I'm missing in Perl 6: I can't "last" a bare block, and "leave" is NIY. Of course I can just write subs and "return" instead.
16:18 troys joined #perl6
16:18 Juerd It turns out I tend to use loop control on bare blocks in Perl 5 much more often than I expected :)
16:19 Juerd Maybe it's because my first programming language was BASIC, and I just want to jump to beginnings (redo) and ends (last) of blocks... :)
16:20 eveo m: my $x; repeat { $x = rand } until $x ≥ ½; say $x
16:20 Juerd Remember "goto fail;"? It's the same thing, but in C. It doesn't have nice flow control statements, so people use goto.
16:20 camelia rakudo-moar f0c3bf: OUTPUT: «0.857719865627536␤»
16:20 Juerd eveo: That scopes $x outside the block.
16:20 eveo You're a hard person to please! :)
16:20 * eveo gives up :)
16:21 itaylor57 joined #perl6
16:22 eveo daxim: reproed your problem. It occurs when I do not have normal zef installed. So it feels like an issue with the bin wrappers. I'm not sure why OP zef issue is talking about uncreated directories.
16:22 eveo daxim: well, the "no candidate" thing.
16:23 Juerd eveo: I can think of numerous other ways to do what I want, but I haven't found any that's as elegant as the thing I'm used to.
16:23 Juerd eveo: I'm not looking for a solution; I have solutions. I'm looking for an elegant solution :)
16:23 eveo Juerd: make a slang :)
16:23 Juerd And yes, that can be hard.
16:24 Juerd eveo: Since loop control is dynamic, a simple function probably suffices.
16:24 eveo m: { CONTROL {} }.phasers.say
16:24 camelia rakudo-moar f0c3bf: OUTPUT: «Too few positionals passed; expected 2 arguments but got 1␤  in block <unit> at <tmp> line 1␤␤»
16:25 eveo m: { CONTROL {} }.phasers("CONTROL").say
16:25 camelia rakudo-moar f0c3bf: OUTPUT: «()␤»
16:25 Juerd sub doe(&x) { until $++ { &x() } }
16:25 Juerd "do" was taken :P
16:26 moritz call it "doit" :-)
16:26 Juerd d'oh :)
16:29 eveo left #perl6
16:32 Juerd docbug reported at https://github.com/perl6/doc/issues/1370
16:33 moritz Juerd++
16:34 khw joined #perl6
16:35 Juerd Heh, my example is a bad one. It would only work the first time :)
16:35 travis-ci joined #perl6
16:35 travis-ci Doc build errored. Zoffix Znet 'Fix link/symlink desc in 5to6; dogbert17++'
16:35 travis-ci https://travis-ci.org/perl6/doc/builds/240842577 https://github.com/perl6/doc/compare/457be16090d8...0befd8cc27ff
16:35 travis-ci left #perl6
16:36 Juerd Updated it to use a lexical instead of a state variable
16:43 pilne joined #perl6
16:46 moritz lol I blug: https://perlgeek.de/blog-en/perl-6/2017-016-books-landscape.html
16:46 moritz afk&
16:49 Geth ¦ perl6.org: 7d0994dd21 | (Zoffix Znet)++ (committed using GitHub Web editor) | source/style.css
16:49 Geth ¦ perl6.org: Restyle comments in vim code blocks
16:49 Geth ¦ perl6.org: review: https://github.com/perl6/perl6.org/commit/7d0994dd21
16:49 Geth ¦ perl6.org: 0df032b3e5 | (Zoffix Znet)++ (committed using GitHub Web editor) | source/style.scss
16:49 Geth ¦ perl6.org: Restyle comments in vim code blocks
16:49 Geth ¦ perl6.org: review: https://github.com/perl6/perl6.org/commit/0df032b3e5
16:50 travis-ci joined #perl6
16:50 travis-ci Doc build passed. Jan-Olof Hendig 'Formatting fixes'
16:50 travis-ci https://travis-ci.org/perl6/doc/builds/240851292 https://github.com/perl6/doc/compare/0befd8cc27ff...a037abf45db6
16:50 travis-ci left #perl6
16:56 petercommand joined #perl6
16:59 rahogaboom joined #perl6
17:02 devmikey joined #perl6
17:12 bioduds hello, friends, how does my module gets green in the modules.perl6.org ?
17:12 bioduds saying passing, I mean?
17:14 bioduds btw I'm trying to install it with zef install EC::Grammars::DIG and it asks for my github credentials?
17:14 bioduds I'm confused
17:18 setty1 joined #perl6
17:19 TreyHarris joined #perl6
17:20 itaipu joined #perl6
17:22 timotimo that's when you give it an https:// url to clone from
17:22 timotimo it'll ask you for credentials before it realizes you don't need 'em
17:24 raschipi bioduds: Did you read the guide linked in  the gray "not set up" box?
17:27 Geth ¦ perl6.org: 7dabcfe04a | (Zoffix Znet)++ (committed using GitHub Web editor) | source/index.html
17:27 Geth ¦ perl6.org: Showcase better features on home page
17:27 Geth ¦ perl6.org:
17:27 Geth ¦ perl6.org: - No one cares about custom ops
17:27 Geth ¦ perl6.org: - Move file example into laziness tab
17:27 Geth ¦ perl6.org: - Lead with grammars
17:27 Geth ¦ perl6.org: - List async and rats, followed by lazy features
17:27 Geth ¦ perl6.org: - Could do with some "easy Unicode" tab, but it doesn't
17:27 Geth ¦ perl6.org:     fit in one row, with current styling
17:27 Geth ¦ perl6.org: review: https://github.com/perl6/perl6.org/commit/7dabcfe04a
17:28 timotimo that's hard to read in the diff :|
17:28 * timotimo waits for perl6.org to catch up
17:31 Geth ¦ perl6.org: ee3f5eae5b | (Zoffix Znet)++ (committed using GitHub Web editor) | source/index.html
17:31 Geth ¦ perl6.org: Remove stray 'T' in example output
17:31 Geth ¦ perl6.org: review: https://github.com/perl6/perl6.org/commit/ee3f5eae5b
17:31 timotimo maybe a supply block would be cool to show off
17:31 timotimo i can't read the code very well, but there's a Supply.from-list where it could be a supply { emit 1; emit 2; ... } if that is interesting at all
17:32 timotimo there it is!
17:33 timotimo looks good, though
17:37 Geth ¦ perl6.org: 5566eb4a81 | (Zoffix Znet)++ (committed using GitHub Web editor) | source/index.html
17:37 Geth ¦ perl6.org: Remove extraneous lead spacing in example
17:37 Geth ¦ perl6.org: review: https://github.com/perl6/perl6.org/commit/5566eb4a81
17:39 geekosaur joined #perl6
17:44 bioduds sorry, rashipi I didn't read it
17:45 bioduds so that is normal timotimo?
17:49 wamba joined #perl6
17:50 lichtkind joined #perl6
17:52 zakharyas joined #perl6
17:57 bioduds Am I having a bug here? https://gist.github.com/bioduds/18f12cfd064d063d1c555f4d33a37f24
17:57 bioduds this simple piece of code is not working
18:03 lucasb sorry, didn't run. what happens? :)
18:03 lucasb maybe... try renaming grammar VERSION and token VERSION to different names (?)
18:03 bioduds let me
18:04 Juerd bioduds: You used 'rule' instead of 'token', and that means whitespace becomes significant (:sigspace)
18:05 Juerd bioduds: Given that, you probably shouldn't end 'Hello I am ' in whitespace like you're doing...
18:05 Juerd bioduds: Likewise, don't begin and end ' and my version is ' with whitespace
18:05 bioduds oh, sure
18:05 bioduds ops, sorry
18:05 bioduds thanks Juerd
18:05 Juerd Or use 'token' instead of 'rule' if you wish to only match whitespace that you explicitly put there
18:06 Juerd And have a look at https://perl6advent.wordpress.com/2011/12/02/grammartracer-and-grammardebugger/
18:07 bioduds tx man
18:12 robertle joined #perl6
18:22 timotimo watch out, though: token means "no backtracking"
18:29 Cabanossi joined #perl6
18:31 bioduds what is geth?
18:33 lucasb Geth: help
18:33 Geth lucasb, Source at https://github.com/perl6/geth To add repo, add an 'application/json' webhook on GitHub pointing it to https://geth.perl6.party/?chan=#perl6 and choose 'Send me everything' for events to send | use `ver URL to commit` to fetch version bump changes
18:34 lucasb bioduds: ^^
18:37 bioduds oh, interesting :)
18:40 Juerd timotimo: Documentation says "The only difference between the token and rule declarators is that the rule declarator causes :sigspace to go into effect for the Regex"
18:41 Juerd timotimo: So they already didn't have backtracking :)
18:48 timotimo ah
18:48 timotimo that's probably then why it broke
18:48 timotimo since the sigspace between the foo and ' foo' will have already stolen the space in front of foo
18:48 TeamBlast joined #perl6
18:49 timotimo and since it's not allowed to backtrack, it fails immediately
19:00 AlexDaniel joined #perl6
19:02 lucs :ba
19:02 lucs ww
19:03 mr-foobar joined #perl6
19:12 ingy I just came up with a cool idea (I think) when implementing an expression parser. The unary not can be treated as any other binary operation if you just search for <nothing-followed-by-not> as an operand token.
19:13 ingy It worked out perfectly to extend my binary-ops-only grammar.
19:13 ingy I just assigned it the correct precendence level and presto.
19:16 domidumont joined #perl6
19:37 mattp_ joined #perl6
19:38 committable6 joined #perl6
19:44 st_elmo joined #perl6
19:58 masak ingy: intriguing.
19:59 masak ingy: but does that mean you have to preemptively parse "nothing" all over the place?
20:01 raschipi ingy: Does it preclude having two operands that look like each other but one is unary and the other infix?
20:02 rindolf lucs: hi, sup? Long time
20:02 raschipi Like unary + for numeric casting and infix + for addition?
20:03 itaipu joined #perl6
20:26 ingy raschipi: not in my case
20:31 ingy masak: not at all. my expression grammar is basically:
20:31 ingy expression: operand (operator operand)*
20:31 ingy operand: (paren-expr | token)
20:31 dj_goku_ joined #perl6
20:32 ingy token: ( string | number | variable )
20:32 petercom1and joined #perl6
20:32 ingy and I changed it to
20:32 ingy token: ( string | number | not-token | variable )
20:32 Celelibi_ joined #perl6
20:33 ingy not-token: '' (lookahead)not-operator
20:34 ingy it was a tiny grammar change and the unary became just more binary
20:35 ingy it might not be best for complex syntaxen
20:36 ingy raschipi: in my case it precludes having 'not' as a variable :)
20:36 diegok joined #perl6
20:37 ingy I'm effectively writing a TT2 grammar (and it seems that TT2 doesn't allow not as var :)
20:46 rightfold Can I have a word with a space in it when I use <a b c>?
20:46 ilmari m: dd <a "b c" d>
20:46 camelia rakudo-moar f0c3bf: OUTPUT: «("a", "\"b", "c\"", "d")␤»
20:46 lucasb <<foo "a b c" bar>>
20:46 ilmari m: dd «a "b c" d»
20:46 camelia rakudo-moar f0c3bf: OUTPUT: «("a", "b c", "d")␤»
20:47 rightfold ah thanks
21:02 mr-foobar joined #perl6
21:10 TEttinger joined #perl6
21:25 colomon_ joined #perl6
21:37 synopsebot6 joined #perl6
21:59 pmurias joined #perl6
22:03 mr-foobar joined #perl6
22:03 Rawriful joined #perl6
22:08 nadim joined #perl6
22:14 Cabanossi joined #perl6
22:18 cpage joined #perl6
22:25 Exodist joined #perl6
22:36 itaipu joined #perl6
22:39 pecastro joined #perl6
22:42 colomon joined #perl6
22:54 lizmat joined #perl6
22:59 ugexe eveo: i assume that issue is because the new installation target has not been set in PERL6LIB (or being set with -I...)
23:01 mr-foobar joined #perl6
23:02 ugexe installed bin scripts has no direct dependencies, so they are able to attempt to `run $real-bin-script`
23:08 Juerd Is there something like Perl5's FindBin?
23:16 ugexe $?FILE.parent, $*PROGRAM.parent, etc
23:16 Juerd Heh, just found that too :). $Bin becomes $*PROGRAM-NAME.IO.parent and $RealBin becomes $*PROGRAM-NAME.IO.resolve.parent
23:17 Juerd Oh, $*PROGRAM, you say. Is that short for $*PROGRAM-NAME.IO?
23:17 Juerd Seems to be
23:17 ugexe probably just remembering wrong heh
23:17 timotimo that could totally go into the perl5-to-6 document
23:17 timotimo somewhere
23:17 timotimo if there's any part where common modules are covered
23:20 Juerd use lib "$*PROGRAM.resolve.parent()/lib";  # yay, works
23:20 timotimo string concat for paths? :(
23:21 timotimo hm, have we got a sibling method?
23:21 Juerd I really see nothing wrong with simple string concatenation for paths at the end
23:22 Juerd In practice it works just about anywhere.
23:22 Juerd Especially if you don't care about win32 at all :D
23:22 timotimo https://docs.perl6.org/routine/sibling
23:23 Juerd I'll use that if it makes you happy :D
23:24 timotimo m: say ".parent()/lib".chars; say ".sibling('lib')".chars.say
23:24 camelia rakudo-moar f0c3bf: OUTPUT: «13␤15␤True␤»
23:24 Juerd Oh, meh, have to stringify it myself now :(
23:24 timotimo it's only two more chars to Do The Right Thing
23:24 timotimo oh? we should fix the lib pragma, then
23:24 timotimo to accept IO::Path, too
23:24 Juerd Type check failed in binding to parameter '$spec'; expected Str but got IO::Path
23:24 Juerd Or Str() it
23:24 timotimo that'd be a possible fix
23:29 timotimo a bug report would probably be a good idea
23:29 Juerd Although this common use case might even warrant a "use lib :findbin;"
23:29 Juerd Or something like it. "./lib" and "../lib" are extremely common
23:30 Juerd I'll report the bug
23:31 skids joined #perl6
23:39 ugexe lib pragma just uses a CUR, and which one it uses depends on if the file path is relative or not, if there is a meta6.json file, etc
23:39 Juerd What is a CUR?
23:39 timotimo CompUnit Repo
23:40 ugexe and because lib/ doesn't mapped to the installation structure its not really a good practice to be putting `use lib "lib"` in your code
23:40 timotimo if you have a script inside a bin/ it'll get the lib set correctly anyway, right?
23:42 [Coke] committable6: 2017.01 my \foo = Callable but role :: { };
23:42 committable6 [Coke], ¦2017.01: «No such method 'mixin' for invocant of type 'Perl6::Metamodel::ParametricRoleGroupHOW'␤  in block <unit> at /tmp/hYc6hABV7m line 1␤ «exit code = 1»»
23:42 Juerd ugexe: "use lib 'lib';" is in example code at https://docs.perl6.org/language/modules
23:42 [Coke] committable6: 2017.05 my \foo = Callable but role :: { };
23:42 committable6 [Coke], ¦2017.05: «No such method 'mixin' for invocant of type 'Perl6::Metamodel::ParametricRoleGroupHOW'␤  in block <unit> at /tmp/2usM18Vu7J line 1␤ «exit code = 1»»
23:42 [Coke] m: my \foo = Callable but role :: { };
23:42 camelia rakudo-moar f0c3bf: OUTPUT: «No such method 'mixin' for invocant of type 'Perl6::Metamodel::ParametricRoleGroupHOW'. Did you mean 'min'?␤  in block <unit> at <tmp> line 1␤␤»
23:42 ugexe if you are using the typical CURFS/perl5-ish structure yes
23:42 Juerd ugexe: If that's a bad practice, could you open a ticket explaining it? I can't explain it because this is new to me.
23:43 [Coke] committable6: ef9872 my \foo = Callable but role :: { };
23:43 committable6 [Coke], ¦ef9872: «X::Method::NotFound exception produced no message␤  in block <unit> at /tmp/djXVvvjcMC line 1␤ «exit code = 1»»
23:44 ugexe Juerd: because if you install a script (in bin/) with `use lib 'lib';`, where does that point once its installed and the file structure no longer even has a lib/ folder?
23:45 Juerd ugexe: I'm not familiar with anything but linux, where $*PROGRAM.resolve.parent.sibling('lib') would hold true: /usr/lib for things in /usr/bin, /usr/local/lib for things in /usr/local/bin, etc.
23:45 ugexe again there is no lib/ for installed items
23:45 Juerd Although come to think of it, Perl modules don't follow that structure :(
23:45 Juerd ugexe: What do you mean by "there is no lib/"?
23:46 Juerd Also, most of what I write never gets "installed".
23:46 timotimo well, perl6 (at least rakudo) is installing modules in a way where their checksum becomes part of the filename
23:46 Juerd It runs from wherever the git repository is cloned to.
23:47 Juerd timotimo: That seems important for CPAN and distributed modules, not for tightly coupled "libraries" that are basically not even libraries, but just parts of my program spread over separate files.
23:47 timotimo mhm
23:47 ugexe why not then invoke them with -Iwhatever or PERL6LIB="..."
23:48 Juerd ugexe: Because that's ugly, and because I want other users of my program to be able to run it without getting to hate Perl 6 for being hard to use... :)
23:48 ugexe im not sure that you get precomp with use lib either
23:48 Juerd I'm already requesting that they install Perl 6; that's about as far as I dare to go.
23:50 Juerd ugexe: Yes, you do. There's now an incredibly ugly .precomp in my lib/, but I suppose I'll have to get used to that.
23:50 ugexe the program not running unless they cd to a specific directory first is just as bad
23:50 Juerd ugexe: Yes. That's why I'm not using "use lib 'lib';", but instead "use lib ~$*PROGRAM.resolve.sibling('lib');"
23:50 ugexe just because there is a precomp folder there does not mean everything got precompiled, so im not so sure
23:51 Juerd I'm adding 'resolve' because the typical way of 'installing' things like this is to symlink them to /usr/bin :)
23:52 Juerd ugexe: It's not slow enough to not be precomped.
23:52 ugexe well, precompiling is pretty slow
23:54 Juerd It's very slow the first run, but subsequent runs are only a little slow.
23:59 Cabanossi joined #perl6
23:59 ugexe it would be nice if CURs could be smart enough to handle this

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

Perl 6 | Reference Documentation | Rakudo