»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, or /msg camelia p6: ... | irclog: irc.perl6.org or colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend!
Set by moritz on 22 December 2015.
00:03 andrei left 00:23 mcmillhj joined 00:27 mcmillhj left 00:28 mcmillhj joined 00:31 lookatme joined 00:33 mcmillhj_ joined 00:37 mcmillhj_ left 00:42 mcmillhj left, mcmillhj joined, mcmillhj left 00:44 mcmillhj joined, mcmillhj left, mcmillhj joined 00:45 mcmillhj_ joined 00:50 mcmillhj left, mcmillhj_ left 00:52 kyan left
samcv yay RT 128875 fixed :-) rt.perl.org/Ticket/Display.html?id=128875 00:54
m: say "All hell is breaking loose" ~~ m:i:m/"All is fine, I am sure of it"/
camelia False
bioduds ops, sorry, I went away for a while 00:55
is something missing?
raschipi bioduds, now go back to github.com/perl6/ecosystem and click the "New Pull Request" button 00:57
Then the link "compare across forks" at the top. Find your own copy in the box in the left.
bioduds doing it
raschipi The second box is the patch-1 branch github created for you
bioduds ok, then?
bioduds:patch-1 is up to date with all commits from perl6:master. Try switching the base for your comparison. 00:58
raschipi Click the scwitching the base link 00:59
bioduds Update META.list with EC-Grammars-DIG #1
i need to accept the checkboxes? 01:00
raschipi Read them, they are important.
bioduds I did
I have a license, GNU
I agree with meta
what next? 01:01
make a comment?
Reopen pull request?
Geth ecosystem: rafaelschipiura++ created pull request #346:
Update META.list with EC-Grammars-DIG
01:02
raschipi I clicked the gree button and it worked. 01:03
bioduds ops, Geth I'm not being able to agree on this one
raschipi Geth is a bot that tells us what happens in the repos 01:04
bioduds oh
raschipi I'm rafaelschipiura
bioduds great, so what should I do now?
raschipi Did you click the green button?
bioduds the comment button? 01:05
oh
it showed now
Merge pull request
right? should I click on it?
raschipi I think git got confused, it was my fault, sorry.
No, now you wait. 01:06
bioduds ok, standing by
raschipi Someone has to accept it.
bioduds so I don't click on Merge pull request? 01:07
wouldn't it finish the process? 01:08
01:08 atta left
raschipi No idea. 01:08
bioduds check now, please
I agreed to all
Pull request successfully merged and closed 01:09
raschipi It's this one: github.com/perl6/ecosystem/pull/346
Please agree with the boxes in a comment please.
Geth ecosystem: 49c6daa53e | rafaelschipiura++ (committed by Zoffix Znet) | META.list
Update META.list with EC-Grammars-DIG (#346)

  "A Grammar to parse dig results.":
  github.com/bioduds/EC-Grammars-DIG
01:10
bioduds yep
raschipi There it goes, Zoffix did it.
bioduds excellent
does it automatically gets listed in modules.perl6.org? 01:11
raschipi Sorry for the confusion. We learned togheter how to do it.
bioduds lol, no need to apologize. Thank you 01:12
I'm glad people work for each other here :D
me for you and you for me :D
now I guess it will get listed eventually, right? 01:13
thank you guys. Cheers.
Here's the post for interested parties steemit.com/blockchain/@bitworkers...his-module 01:14
01:15 atta joined 01:17 aborazmeh joined, aborazmeh left, aborazmeh joined
raschipi bioduds: It's already listed. 01:20
bioduds: Boa sorte com o projeto! 01:21
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 spdx.org/licenses/ 01:30
01:30 atta left 01:42 mspo joined
mspo github.com/metakirby5/codi.vim 01:42
01:43 atta joined
Xliff samcv++ # Nice catch! 01:44
01:45 raschipi left, raschipi_ joined 01:46 ilbot3 left
bioduds rashipi: MUITO OBRIGADO!!! ;-) 01:47
01:48 ilbot3 joined, ChanServ sets mode: +v ilbot3
bioduds checking it thundergnat 01:48
lookatme morning .o/
raschipi_ bioduds: I already sent a PR with the change thundergnat suggested. 01:49
oi lookatme
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 :)
bioduds excellent. thanks a lot raschipi_
01:51 atta left, atta joined
lookatme _(:3 」∠)_ 01:52
01:56 atta left
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
01:56 atta joined
raschipi_ That's what those checkboxes were. Well it can be under copyleft, but then it couldn't be distributed. 01:58
The SPDX identifier will also be made mandatory at some point.
02:04 aborazmeh left 02:08 pilne left 02:09 aborazmeh joined, aborazmeh left, aborazmeh joined 02:13 Cabanossi left 02:15 Cabanossi joined 02:17 cbk left 02:19 raschipi_ left 02:27 Unavowed_ joined
ugexe mandatory for what? 02:30
02:30 Unavowed left
ugexe the only mandatory things should be those required to get a distribution installed 02:31
you can enforce at some ecosystem level, but i dont see cpan doing so 02:34
02:36 aborazmeh left 02:42 noganex joined 02:45 noganex_ left 03:08 bwisti left 03:25 sivoais left 03:26 sivoais joined 03:28 Cabanossi left 03:30 Cabanossi joined 03:52 aborazmeh joined, aborazmeh left, aborazmeh joined 03:57 Cabanossi left 03:58 khw left 03:59 Cabanossi joined 04:03 aindilis joined 04:05 stmuk joined 04:08 stmuk_ left 04:17 xtreak joined 04:18 cgfbee left 04:23 cgfbee joined 04:27 MilkmanDan left 04:29 MilkmanDan joined, BenGoldberg left 04:34 skids left 04:41 curan joined, Cabanossi left 04:44 Cabanossi joined 04:48 AlexDaniel left 04:58 TeamBlast left 05:01 TeamBlast joined 05:13 xtreak left 05:19 xtreak joined 05:26 xtreak left, aborazmeh left, xtreak joined 05:27 Cabanossi left 05:29 xtreak left, Cabanossi joined, xtreak joined
SmokeMachine hi there! is some one near San Jose (California)? 05:40
Im here for WWDC...
zengargoyle_ bioduds++ 05:44
05:44 zengargoyle_ is now known as zengargoyle 05:50 domidumont joined 05:51 TeamBlast left 05:55 domidumont left 05:56 domidumont joined 06:02 xtreak left, xtreak joined 06:10 wamba joined 06:11 xtreak left
moritz what do we call & in regexes? 06:33
intersection? AND?
m: say 'a' ~~ /a && ./ 06:37
camelia 「a」
06:40 pecastro left
lookatme m: say 'a && b' ~~ /a && ./ 06:44
camelia 「a」
lookatme m: say 'a && b' ~~ /a \&\& ./ 06:45
camelia Nil
lookatme m: say 'a && b' ~~ m:s/a && ./
camelia False
lookatme m: say 'a && b' ~~ m:s/a \&\& ./
camelia 「a && b」
lookatme m: say 'a && b' ~~ m:s/a && b/
camelia False
lookatme m: say 'a && b' ~~ m/a && b/
camelia False
masak moritz: "conjunction", it seems
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/
camelia 「a」
masak ("it" being S05)
`&` is the "declarative conjunction" 06:47
moritz masak: then | is a disjunction?
masak yep
moritz wow, TIL
masak though it's possible to argue for "civilian" names for both of these 06:48
I'd go with something like "alternative" for `|`
and "overlap" for `&`
now I will stop talking before I say something about category theory 06:49
06:51 pecastro joined 06:57 TeamBlast joined 06:59 rindolf joined 07:00 pecastro left 07:06 pecastro joined 07:26 astj left 07:27 astj joined 07:39 dakkar joined
lizmat clickbaits 6guts.wordpress.com/2017/06/08/sor...ronous-io/ 07:47
moritz lizmat++ 07:48
08:01 wamba left 08:02 xtreak joined 08:09 dct joined 08:12 xtreak left 08:13 nadim joined 08:15 parv joined 08:17 TEttinger left 08:26 Actualeyes left 08:27 kurahaupo left, Cabanossi left 08:28 esh left 08:29 Cabanossi joined, esh joined 08:36 domidumont left, jargan joined 08:37 avar left, avar joined, avar left, avar joined 08:38 jast left 08:39 Actualeyes joined
rightfold m: ('1. Install Perl 6', '2. Write Perl 6' ... '4. Profit!").List.say 08:42
camelia 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
rightfold 10:42 <rightfold> m: ('1. Install Perl 6', '2. Write Perl 6' ... '4. Profit!').List.say
08:45 domidumont joined
parv m: ('1. Install Perl 6', '2. Write Perl 6' ... '4. Profit!').List.say 08:46
camelia (1. Install Perl 6 2. Write Perl 6)
parv no profit for you, rightfold. 08:47
that, or perl 6 does not believe in profit.
rightfold >:(
parv hunh, that -- >:( -- works on both sides. 08:49
rightfold XD
Angry guy or sad hat guy
parv m: '2. write'++ 08:51
camelia 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)
parv m: $x = '2. write'; $x++; $x.say
camelia 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
moritz woah, that's quite an awesome error message, if you ask me
(the "require mutable arguments")
parv what do i win, moritz?!
what is "$a" in the error message? 08:52
08:56 jargan is now known as jast
rightfold Parameter name 08:56
08:57 Cabanossi left 08:59 Cabanossi joined, astj left, astj_ joined
parv how does one reverse a string? can't find a way in docs.perl6.org/routine/reverse short of breaking word into characters and then reversing that list. 08:59
rightfold m: "hola señorita".reverse.say 09:00
camelia (hola señorita)
rightfold Bleh treating items as lists
m: "hola señorita".flip.say 09:01
camelia atiroñes aloh
rightfold parv: ^
lookatme lizmat++
parv flipping flip! seriously? thanks rightfold++
rightfold Yeah :S 09:03
lookatme m: "hola señorita".comb.reverse.say 09:04
camelia (a t i r o ñ e s a l o h)
lookatme m: "hola señorita".comb.reverse.join.say
camelia atiroñes aloh
lookatme m: "hola señorita".flip.say
camelia atiroñes aloh
09:04 zakharyas joined
parv makes a note about comb to decompose a string 09:04
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
camelia 육 주진
rightfold Nice
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.)
rightfold m: (•̀ᴗ•́)و ̑̑ 09:07
camelia 5===SORRY!5=== Error while compiling <tmp>
Bogus statement
at <tmp>:1
------> 3(7⏏5•̀ᴗ•́)و ̑̑
expecting any of:
prefix
term
lookatme m: ' (•̀ᴗ•́)و ̑̑'.flip.say
camelia ̑̑و)•́ᴗ•̀(
rightfold Looks so happy now
lookatme Haha
09:08 wamba joined
rightfold m: "κος".flip.say 09:08
camelia ςοκ
rightfold Not the right sigma >:(
m: '👩‍❤️‍💋‍👩'.flip.say 09:09
camelia 👩‍❤️‍💋‍👩
09:11 lowbro joined, lowbro left, lowbro joined
masak jnthn++ # 6guts.wordpress.com/2017/06/08/sor...ronous-io/ 09:13
parv is it possible to find signature, or better doc, of a random (at least) public method/function? 09:18
moritz parv: your best shot is the search box on docs.perl6.org 09:21
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:27
... and arrived at docs.perl6.org/type/Metamodel::ClassHOW 09:28
m: Str.^lookup( 'NFC' ).perl 09:35
camelia ( no output )
parv m: my $x = ''; $x.^lookup( 'NFC' ).perl
camelia ( no output )
parv m: my $x = ''; $x.^lookup( 'NFC' ).perl.say
camelia method NFC (Str $: *%_) { #`(Method|37752208) ... }
parv forgot that he was using perl6 REPL. 09:37
09:38 pecastro left 09:40 lookatme left 09:42 Cabanossi left 09:44 Cabanossi joined
parv ok, &<name>.signature (docs.perl6.org/type/Signature) works for flip (&flip.signature), but not for NFC. 09:46
m: say &NFC.signature
camelia 5===SORRY!5=== Error while compiling <tmp>
Illegally post-declared type:
NFC used at line 1
09:47 wamba left
jnthn that's 'cus there is no NFC sub, only a method on Str 09:49
Or Uni
parv sometimes i am amazed that guess of perl5 syntax works: &{Str.NFC}.signature 09:51
thanks jnthn.
rightfold Is there a shorter form of {o.m($^a, $^b)}? 09:53
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:57
For example, in: reduce &f, $x, |@xs; 09:58
I suppose I should make it so that I always avoid passing multiple arguments in such case.
Then I won't run into that issue ever.
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
I really don't understand all this special casing wrt lists 10:03
10:04 domidumont left
rightfold Ok, so I have to write reduce &f, ($x, |@xs) if @xs may be empty and $x may be an empty list 10:06
10:24 kurahaupo joined 10:28 parv left 10:37 pecastro joined 10:40 pmurias joined, ChoHag left 10:45 vetmaster joined 10:46 Actualeyes left 10:48 vetmaster left 10:56 domidumont joined 11:03 Actualeyes joined 11:07 wamba joined 11:26 trnh joined 11:27 trnh left 11:33 astj_ left, astj joined 11:38 astj left, astj joined 11:39 astj left, astj joined 11:42 gregf_ joined, Cabanossi left 11:45 Cabanossi joined 11:46 Cabanossi left 11:47 Cabanossi joined 11:49 zakharyas left, AlexDaniel joined 11:52 itaipu joined 11:57 astj left 12:03 aborazmeh joined, aborazmeh left, aborazmeh joined 12:05 itaipu left 12:07 aborazmeh left 12:08 cdg joined, itaipu joined, rindolf left 12:10 eveo joined 12:11 Actualeyes left 12:14 Actualeyes joined
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 12:21 eliasr joined 12:27 araraloren joined
araraloren evening . 12:27
12:29 cdg_ joined 12:32 cdg left
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:37
moritz tbrowder: no 12:38
tbrowder ok, thanks. 12:39
12:39 mcmillhj joined
rightfold m: say <| =>[$i == 0], $_; for (1, 2, 3, 4).kv; 12:40
camelia 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;
rightfold m: for (1, 2, 3, 4).kv -> $i, $n -> { say <| =>[$i == 0], $n }
camelia 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
rightfold m: for (1, 2, 3, 4).kv -> $i, $n { say <| =>[$i == 0], $n }
camelia =1
|2
|3
|4
rightfold ah cool
12:40 wamba left 12:41 Unavowed_ is now known as Unavowed
Unavowed say (3, -4, 7, -1, 2, 0).sort({.abs}) # works 12:41
evalable6 (0 -1 2 3 -4 7)
Unavowed say (3, -4, 7, -1, 2, 0).sort(by => {.abs}) # does not work
evalable6 (-4 -1 0 2 3 7)
12:46 eveo joined
eveo Unavowed: well, .sort doesn't take a named :by argument, so it's not surprising that it doesn't work. 12:46
moritz m: say (3, -4, 7, -1, 2, 0).sort({.abs}) 12:47
camelia (0 -1 2 3 -4 7)
eveo Unavowed: are you following some tutorial that mentions it? The docs don't mention it.
perlpilot I think people expect sort to have a :by arg.
I know I've thought that on occasion myself anyway
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
during these bad old days, calling it with by => ... would have worked 12:50
eveo shudders
perlpilot Maybe that's why I sometimes think of it.
12:50 wamba joined
rightfold Does it matter whether you use my vs temp for dynamic variables that already exist? 12:52
12:52 nadim left
Unavowed eveo: a "by" argument is mentioned in the perl6 docs: docs.perl6.org/routine/sort 12:53
araraloren No, it's a `&by`
Unavowed although perhaps i'm misreading it as a keyword argument
araraloren not :&by
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, eveo left
perlpilot rightfold: It makes a small difference ... 12:56
rightfold :O
Unavowed fair point. though still a bit surprising that sort() seems to accept arbitrary named arguments and silently ignores them
perlpilot m: my $*x = 42; { my $*x; say $*x; }
camelia (Any)
perlpilot m: my $*x = 42; { temp $*x; say $*x; }
camelia 42
rightfold :D 12:57
perlpilot Unavowed: that's not unique to sort
12:58 astj joined, mr-fooba_ joined
araraloren Unavowed, I think they dont' check named argument when pass them 12:58
rightfold Thanks perlpilot 12:59
araraloren Unavowed, There some other parameter cause this, I think such as 13:00
13:00 mr-foobar left
araraloren m: sun f(*%args) { say %args; }; f(a => b, c => d); # You don't know what user passed 13:00
camelia 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:
araraloren m: sub f(*%args) { say %args; }; f(a => b, c => d); # You don't know what user passed
camelia 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
camelia {a => 2, c => 1}
perlpilot Unavowed, araraloren: See design.perl6.org/S12.html#Interface_Consistency 13:02
(I thought that was also in docs.perl6.org somewhere, but I didn't see it)
araraloren perlpilot, thanks. That's make sense 13:03
Unavowed does this mean that the behaviour is different for subs and methods? 13:04
m: sort((), :asdf)
camelia Unexpected named argument 'asdf' passed
in block <unit> at <tmp> line 1
Unavowed m: ().sort(:asdf) 13:05
camelia ( no output )
perlpilot ding! :-)
timotimo yup, the default signature differs between subs and methods
methods also have the invocant argument, which subs don't usually have
araraloren m: sub f() { say %_; }; f(a => 2, c => 1);
camelia 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);
timotimo araraloren: have to drop the () after f
araraloren Er.. 13:06
Unavowed ah, that explains it then. thanks for the link, perlpilot
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!"
araraloren I thought it was work with signature..
13:07 MilkmanDan left, aborazmeh joined, aborazmeh left, aborazmeh joined, MilkmanDan joined
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:08
perlpilot why bothered? That makes sense for how methods should be called. 13:09
araraloren It pass parameter you provided as last parameter
.&
m: sub f($a, $b) { say $a, $b;}; "123".&f("465")
camelia 123465
araraloren em, seems like ... 13:10
I have to read document again 13:11
raschipi m: "a,c,b".&split(/','/) 13:13
camelia Type check failed in binding to parameter '$target'; expected Cool but got Regex (/','/)
in block <unit> at <tmp> line 1
raschipi m: /','/.&split("a,c,b") 13:14
camelia ( no output )
raschipi m: /','/.&split("a,c,b").say
camelia (a c b)
raschipi Should work like the feed operator, I think. 13:17
m: split(/','/) <== "a,c,b"
camelia ( no output )
araraloren Oh, ==> and <== is last parameter
13:18 stmuk_ joined, astj left
raschipi m: say() <==split(/','/) <== "a,c,b" 13:18
camelia (a c b)
13:19 astj joined
araraloren m: say "a b c" ==> split(/\s/) 13:19
camelia a b c
timotimo don't forget split also takes strings, which is a billion times faster than a regex containing only the single string.
araraloren That's looks comfortable ~~
timotimo it also takes lists of strings, which is also a whole lot faster than a regex with only the strings inside | or ||
araraloren m: say "a b c" ==> split(' ')
camelia a b c
timotimo much less to type, too :)
raschipi Yes, I just wanted to make it visually distinct in this case.
timotimo well, only if you put quotation marks into the regex, too 13:20
13:20 skids joined
araraloren m: say "a b c," ==> split(' ' || ',') # ?? 13:20
camelia a b c,
13:20 stmuk left
araraloren m: say "a b c," ==> split([' ', ',']); 13:21
camelia a b c,
araraloren m: say "a b c,d" ==> split(' ' || ',') # ?? 13:22
camelia a b c,d
araraloren m: .say for "a b c,d e" ==> split([' ', ',']);
camelia a
b
c
d
e
raschipi m: (' ' || ',').^name
camelia ( no output )
raschipi m: (' ' || ',').^name.say
camelia Str
araraloren m: say (' ' || ',') 13:23
camelia
13:23 astj left
timotimo m: say ("hello" || "goodbye") 13:23
camelia hello
timotimo || returns the first thing that's true 13:24
araraloren What's different between || and // ?
raschipi M: say so 'hello'
m: say so 'hello'
camelia True
tadzik m: say False // 7
camelia False
araraloren m: say ("hello" // "goodbye")
camelia hello
raschipi araraloren: //returs the first thing that is defined
tadzik (which may be false) 13:25
araraloren Oh, clear
raschipi Can something be undefined and true?
13:25 ctilmes joined
tadzik I don't think so 13:25
well, hm 13:26
perlpilot maybe with a mixin
tadzik m: my $a = Any but True; say defined $a; say so $a
camelia False
True
tadzik giggles
raschipi m: my $a = 'hello' but False; say $a; say so $a 13:27
camelia hello
False
raschipi TimToady++ 13:28
13:29 astj joined, nadim joined 13:32 ChoHag joined 13:33 lizmat left
Geth doc: bd426da343 | (Zoffix Znet)++ (committed using GitHub Web editor) | doc/Language/traps.pod6
Move IO::Path stringification into own I/O section
13:36
13:36 robertle joined, curan left 13:37 AlexDaniel left
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:42
jnthn raschipi: I didn't check, but it wouldn't surprise me 13:45
Though I think they're 0/1/2?
Geth doc: cec82fc515 | (Zoffix Znet)++ (committed using GitHub Web editor) | doc/Language/traps.pod6
Document IO handle closure in traps

Closes #1365
jnthn m: say $*OUT.native-descriptor
camelia 1
13:45 cdg_ left
jnthn :) 13:45
raschipi Oh yes, 0,1,2 13:46
Geth doc: 01bc71d319 | (Zoffix Znet)++ (committed using GitHub Web editor) | doc/Type/IO/Handle.pod6
Mention :close arg in caveat section of .close docs
13:47
raschipi People were having problems using NativeCall because things weren't in the expected places.
jnthn I'm not entirely sure that was the problem so much as the handles had been put in non-blocking mode also :) 13:48
Which certainly woulda been an issue 13:49
That no longer happens now either :)
raschipi jnthn++
Was it using asynchronous I/O for everything? 13:50
jnthn Yeah, it was previously layer sync atop of async
13:50 astj left
jnthn See my recent blog post 13:50
For details on the changes
6guts.wordpress.com/2017/06/08/sor...ronous-io/
raschipi I'm reading it, togheter with the article about AIO in lwn.net
lwn.net/Articles/723752/#724198 13:51
13:52 astj joined
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:52
jnthn I have no idea if that's the actual API that libuv uses 13:53
raschipi Or does libuv creates worker threads?
jnthn It may do for file stuff 13:54
This seems to be just about file I/O, though?
raschipi by "This" you mean the article or libuv?
jnthn The article
Most of the useful places to do async I/O are sockets and processes. 13:55
We don't even *have* async file I/O support in Perl 6
13:56 astj left
raschipi Well, libuv was the one dealing with the standard handles, which are actually file I/O. /dev/std* 13:57
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
Goes without saying that we're better off not doing that :)
raschipi Or a pseuterminal, which is also a file.
OK, thanks, that's solves my confusion. 13:59
Now it's using what for the abstraction? 14:00
mspo unix socket files?
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
14:02 lizmat joined
jnthn Yeah, close enough :) 14:02
Like, you need a tiny bit, but it ain't much 14:03
raschipi MS windows had a complete POSIX subsystem in the past, but they abandoined it at some point. 14:06
Geth doc: 057c651378 | (Jan-Olof Hendig)++ | doc/Type/CallFrame.pod6
Fixed broken link.

Closes #1348
14:09
El_Che raschipi: there is nowadays WSL for the rest of us :)
raschipi Oh yes, they brought it back, but maintained by Canonical instead.
14:11 itaipu left
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
14:11 lucs_ is now known as lucs, itaipu joined
El_Che don't hold your breath 14:11
raschipi It works on Cygwin already, doesn't it? 14:13
14:13 domidumont left 14:14 domidumont joined 14:18 raschipi left, lucasb joined 14:20 raschipi joined 14:25 rindolf joined
[Coke] jnthn++ eveo++ lizmat++ 14:26
14:26 travis-ci joined
travis-ci Doc build errored. Zoffix Znet 'Move IO::Path stringification into own I/O section' 14:26
travis-ci.org/perl6/doc/builds/240792154 github.com/perl6/doc/compare/de19b...426da3439f
14:26 travis-ci left 14:27 pmurias left
moritz is there a table of precedence of regex elements somewhere? 14:33
14:35 travis-ci joined
travis-ci Doc build errored. Zoffix Znet 'Document IO handle closure in traps 14:35
travis-ci.org/perl6/doc/builds/240795650 github.com/perl6/doc/compare/bd426...c82fc5159e
14:35 travis-ci left
Geth doc: 457be16090 | (Zoffix Znet)++ (committed using GitHub Web editor) | doc/Type/Failure.pod6
Document Failure.self

Rakudo impl: github.com/rakudo/rakudo/commit/0a100825dd Tests: github.com/perl6/roast/commit/5bdb393ea9
14:36
14:43 zakharyas joined 14:49 itaylor57 left 14:50 itaylor57 joined
lucasb m: my @a = (Failure.new,).map({ $_ }) 14:52
camelia ( no output )
lucasb m: my @a = (Failure.new,).map({ $_.self }) 14:53
camelia Failed

Actually thrown at:
in block <unit> at <tmp> line 1
lucasb so, this overloads the .self method with a new meaning for Failures
I wonder if overloading this specific/important method is a wise thing to do 14:54
14:55 aborazmeh left 14:58 colomon joined
lucasb I like the feature, which is (IIUC), to eagerly throw a Failure, right? 14:58
14:59 lizmat left, bwisti joined
lucasb I'm just worried about borrowing the name ".self" for this 14:59
timotimo i didn't even know we had a .self method in the firstplace 15:00
15:03 jonas2 left 15:11 lizmat joined 15:12 zakharyas left 15:15 brabo left 15:17 wamba left
rightfold m: my @xs = 1 .. * 15:22
camelia ( no output )
15:23 domidumont left
rightfold m: my @xs = 1 .. *; say @xs.WHAT 15:23
camelia (Array)
rightfold m: my @xs = 1 .. *; say @xs.elems 15:24
camelia Cannot .elems a lazy list
in block <unit> at <tmp> line 1
rightfold So arrays can be lazy too
15:25 wamba joined
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
15:29 cdg joined 15:32 eveo joined 15:34 brabo joined
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:36
15:37 lizmat left
rightfold m: 42.VAR.say 15:39
camelia 42
15:39 astj joined
rightfold m: my @xs; say @xs.VAR.WHAT 15:42
camelia (Array)
lucasb eveo: ok, from that point of view, agreed, it makes sense 15:43
Geth doc: 0befd8cc27 | (Zoffix Znet)++ (committed using GitHub Web editor) | doc/Language/5to6-perlfunc.pod6
Fix link/symlink desc in 5to6; dogbert17++
15:44
15:46 lowbro left
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
daxim: just a custom module location or entire custom perl6 location?
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
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
eveo lucasb: handled. Yes, both .Bool and .defined methods handle Failures. 15:50
rightfold m: my $xs = [1, 2]; my @xs = $xs; @xs.perl.say 15:51
camelia [[1, 2],]
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
needs of some hypothetical and unlikely usecase.
daxim: tried it with the created directory too. No issues.
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?
daxim github.com/ugexe/zef/issues/162
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
daxim tony-o, makes no difference 15:58
eveo daxim: it's perl6 -Ilib bin/zef install . --install-to=inst#/tmp/stuff
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 nowan left
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
daxim eveo, exact output: paste.scsys.co.uk/564399 16:02
eveo tony-o: the least surprise would be to create the directory. Which zef does do.
daxim: and the perl6 version?
daxim 2017.05
16:03 nowan joined
Geth doc: a037abf45d | (Jan-Olof Hendig)++ | doc/Language/5to6-perlop.pod6
Formatting fixes
16:03
tony-o eveo: does it create a CURI or CURF?
Juerd 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
Is that a doc bug, a spec bug, or a rakudo bug? :)
eveo tony-o: I've no idea. Looks like a CURI. Here's the stuff there: gist.github.com/zoffixznet/126bb14...e9fcfd8074
Juerd: doc bug 16:05
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:06
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+/ }
moritz and yes, doc bug
code samples from the docs should work :-)
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
daxim rpm
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).
eveo cat /tmp/perl6/bin/zef
Juerd eveo: I'm basically having a "goto 10", but the normal flow of the program is to run only once.
eveo Juerd: sure it does: you want to loop until you have successful output :)
daxim 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.
eveo m: { say my $x = rand; &?BLOCK;() unless $x ≥ ½ }
camelia WARNINGS for <tmp>:
Useless use of () in sink context (line 1)
0.647493994566058
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
eveo m: { say my $x = rand; &?BLOCK() unless $x ≥ ½ }
camelia 0.651230594635619
dogbert17 in block <unit> at -e line 1
eveo m: { say my $x = rand; &?BLOCK() unless $x ≥ ½ }
camelia 0.655491563361575
eveo m: { say my $x = rand; &?BLOCK() unless $x ≥ ½ }
camelia 0.00607174217832942
0.145133622646804
0.96059049051011
Juerd Hmm
Not as clear as a simple INPUT: { my $i = prompt ...; redo INPUT unless $i ~~ /.../; ... } 16:11
jnthn loop { my $i = prompt ...; redo unless $i ~~ /.../; ... } 16:12
araraloren night
16:12 araraloren left
Juerd jnthn: The issue I have is that "loop" suggests that repeating is the usual, intended, operation. 16:12
16:13 robertle left
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
camelia making
0.501652528265508
eveo m: my $x = ({say "making"; rand} ... * ≥ ½).tail; say $x
camelia making
making
0.754727272526417
eveo use a Seq :) 16:14
Dunno. Feels like a "I used to do it this way, ergo it's the most clear way and everything else pales in comparison" :)
jnthn Juerd: Hmm, that's an interesting way to distinguish it :)
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:15
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
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
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, itaylor57 left
Juerd It turns out I tend to use loop control on bare blocks in Perl 5 much more often than I expected :) 16:18
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:19
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.
camelia 0.857719865627536
Juerd eveo: That scopes $x outside the block.
eveo You're a hard person to please! :)
eveo gives up :)
16:22 itaylor57 joined
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
daxim: well, the "no candidate" thing.
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
eveo: I'm not looking for a solution; I have solutions. I'm looking for an elegant solution :)
eveo Juerd: make a slang :)
Juerd And yes, that can be hard.
eveo: Since loop control is dynamic, a simple function probably suffices. 16:24
eveo m: { CONTROL {} }.phasers.say
camelia Too few positionals passed; expected 2 arguments but got 1
in block <unit> at <tmp> line 1
eveo m: { CONTROL {} }.phasers("CONTROL").say 16:25
camelia ()
Juerd sub doe(&x) { until $++ { &x() } }
"do" was taken :P
moritz call it "doit" :-) 16:26
Juerd d'oh :)
16:29 eveo left, dakkar left
Juerd docbug reported at github.com/perl6/doc/issues/1370 16:32
moritz Juerd++ 16:33
16:34 khw joined
Juerd Heh, my example is a bad one. It would only work the first time :) 16:35
16:35 travis-ci joined
travis-ci Doc build errored. Zoffix Znet 'Fix link/symlink desc in 5to6; dogbert17++' 16:35
travis-ci.org/perl6/doc/builds/240842577 github.com/perl6/doc/compare/457be...efd8cc27ff
16:35 travis-ci left
Juerd Updated it to use a lexical instead of a state variable 16:36
16:43 pilne joined
moritz lol I blug: perlgeek.de/blog-en/perl-6/2017-01...scape.html 16:46
afk&
Geth perl6.org: 7d0994dd21 | (Zoffix Znet)++ (committed using GitHub Web editor) | source/style.css
Restyle comments in vim code blocks
16:49
perl6.org: 0df032b3e5 | (Zoffix Znet)++ (committed using GitHub Web editor) | source/style.scss
Restyle comments in vim code blocks
16:50 travis-ci joined
travis-ci Doc build passed. Jan-Olof Hendig 'Formatting fixes' 16:50
travis-ci.org/perl6/doc/builds/240851292 github.com/perl6/doc/compare/0befd...37abf45db6
16:50 travis-ci left 16:52 rouking left 16:54 itaipu left 16:56 petercom1and is now known as petercommand, petercommand left, petercommand joined 16:59 rahogaboom joined 17:02 devmikey joined 17:06 wamba left
bioduds hello, friends, how does my module gets green in the modules.perl6.org ? 17:12
saying passing, I mean?
btw I'm trying to install it with zef install EC::Grammars::DIG and it asks for my github credentials? 17:14
I'm confused
17:16 TreyHarris left, rahogaboom left 17:18 cpage left, setty1 joined 17:19 TreyHarris joined 17:20 itaipu joined 17:22 devmikey left
timotimo that's when you give it an https:// url to clone from 17:22
it'll ask you for credentials before it realizes you don't need 'em
raschipi bioduds: Did you read the guide linked in the gray "not set up" box? 17:24
Geth perl6.org: 7dabcfe04a | (Zoffix Znet)++ (committed using GitHub Web editor) | source/index.html
Showcase better features on home page

  - No one cares about custom ops
  - Move file example into laziness tab
  - Lead with grammars
  - List async and rats, followed by lazy features
  - Could do with some "easy Unicode" tab, but it doesn't
   fit in one row, with current styling
17:27
timotimo that's hard to read in the diff :| 17:28
timotimo waits for perl6.org to catch up
17:30 dct left
Geth perl6.org: ee3f5eae5b | (Zoffix Znet)++ (committed using GitHub Web editor) | source/index.html
Remove stray 'T' in example output
17:31
timotimo maybe a supply block would be cool to show off
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
there it is! 17:32
looks good, though 17:33
Geth perl6.org: 5566eb4a81 | (Zoffix Znet)++ (committed using GitHub Web editor) | source/index.html
Remove extraneous lead spacing in example
17:37
17:39 geekosaur left, geekosaur joined
bioduds sorry, rashipi I didn't read it 17:44
so that is normal timotimo? 17:45
17:49 wamba joined 17:50 lichtkind joined 17:52 zakharyas joined
bioduds Am I having a bug here? gist.github.com/bioduds/18f12cfd06...4d33a37f24 17:57
this simple piece of code is not working
lucasb sorry, didn't run. what happens? :) 18:03
maybe... try renaming grammar VERSION and token VERSION to different names (?)
bioduds let me
Juerd bioduds: You used 'rule' instead of 'token', and that means whitespace becomes significant (:sigspace) 18:04
bioduds: Given that, you probably shouldn't end 'Hello I am ' in whitespace like you're doing... 18:05
bioduds: Likewise, don't begin and end ' and my version is ' with whitespace
bioduds oh, sure
ops, sorry
thanks Juerd
Juerd Or use 'token' instead of 'rule' if you wish to only match whitespace that you explicitly put there
And have a look at perl6advent.wordpress.com/2011/12/...rdebugger/ 18:06
bioduds tx man 18:07
18:09 eliasr left 18:12 robertle joined
timotimo watch out, though: token means "no backtracking" 18:22
18:27 Cabanossi left 18:29 Cabanossi joined
bioduds what is geth? 18:31
lucasb Geth: help 18:33
Geth lucasb, Source at github.com/perl6/geth To add repo, add an 'application/json' webhook on GitHub pointing it to geth.perl6.party/?chan=#perl6 and choose 'Send me everything' for events to send | use `ver URL to commit` to fetch version bump changes
lucasb bioduds: ^^ 18:34
bioduds oh, interesting :) 18:37
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:40
timotimo: So they already didn't have backtracking :) 18:41
18:47 TeamBlast left
timotimo ah 18:48
that's probably then why it broke
since the sigspace between the foo and ' foo' will have already stolen the space in front of foo
18:48 TeamBlast joined
timotimo and since it's not allowed to backtrack, it fails immediately 18:49
19:00 AlexDaniel joined 19:01 mr-fooba_ left, troys is now known as troys_
lucs :ba 19:02
ww
19:03 mr-foobar joined
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:12
19:12 skids left
ingy It worked out perfectly to extend my binary-ops-only grammar. 19:13
I just assigned it the correct precendence level and presto.
19:16 domidumont joined 19:30 domidumont left 19:35 committable6 left 19:36 mattp_ left 19:37 mattp_ joined, raiph left 19:38 committable6 joined, ChanServ sets mode: +v committable6 19:44 st_elmo joined 19:55 bwisti left 19:56 itaipu left
masak ingy: intriguing. 19:58
ingy: but does that mean you have to preemptively parse "nothing" all over the place? 19:59
raschipi ingy: Does it preclude having two operands that look like each other but one is unary and the other infix? 20:02
20:02 zakharyas left
rindolf lucs: hi, sup? Long time 20:02
raschipi Like unary + for numeric casting and infix + for addition?
20:03 itaipu joined
ingy raschipi: not in my case 20:26
20:29 troys_ is now known as troys
ingy masak: not at all. my expression grammar is basically: 20:31
expression: operand (operator operand)*
operand: (paren-expr | token)
20:32 dj_goku_ joined
ingy token: ( string | number | variable ) 20:32
20:32 petercom1and joined
ingy and I changed it to 20:32
token: ( string | number | not-token | variable )
20:32 Celelibi_ joined, Celelibi left 20:33 dj_goku left, petercommand left
ingy not-token: '' (lookahead)not-operator 20:33
it was a tiny grammar change and the unary became just more binary 20:34
it might not be best for complex syntaxen 20:35
20:35 Celelibi_ is now known as Celelibi, diegok left
ingy raschipi: in my case it precludes having 'not' as a variable :) 20:36
20:36 diegok joined
ingy I'm effectively writing a TT2 grammar (and it seems that TT2 doesn't allow not as var :) 20:37
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>
camelia ("a", "\"b", "c\"", "d")
lucasb <<foo "a b c" bar>>
ilmari m: dd «a "b c" d»
camelia ("a", "b c", "d")
rightfold ah thanks 20:47
20:53 setty1 left 20:59 mr-foobar left 21:00 st_elmo left 21:02 mr-foobar joined, raschipi left 21:10 TEttinger joined 21:21 espadrine_ left 21:24 rindolf left 21:25 colomon_ joined, colomon left, colomon_ is now known as colomon 21:37 synopsebot6 joined, ChanServ sets mode: +v synopsebot6 21:38 mcmillhj left 21:48 robertle left 21:54 nadim left 21:56 itaipu left, Actualeyes left 21:59 pmurias joined 22:01 mr-foobar left 22:03 mr-foobar joined, Rawriful joined 22:08 nadim joined 22:12 Cabanossi left 22:13 colomon left 22:14 Cabanossi joined 22:18 cpage joined 22:21 AlexDaniel left 22:24 Exodist left 22:25 Exodist joined 22:36 wamba left, itaipu joined 22:39 pecastro left, pecastro joined 22:41 pmurias left 22:42 colomon joined 22:45 lucasb left 22:54 lizmat joined
ugexe eveo: i assume that issue is because the new installation target has not been set in PERL6LIB (or being set with -I...) 22:59
22:59 nadim left 23:00 mr-foobar left 23:01 Rawriful left, mr-foobar joined
ugexe installed bin scripts has no direct dependencies, so they are able to attempt to `run $real-bin-script` 23:02
Juerd Is there something like Perl5's FindBin? 23:08
23:09 itaipu left
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
Oh, $*PROGRAM, you say. Is that short for $*PROGRAM-NAME.IO? 23:17
Seems to be
ugexe probably just remembering wrong heh
timotimo that could totally go into the perl5-to-6 document
somewhere
if there's any part where common modules are covered
Juerd use lib "$*PROGRAM.resolve.parent()/lib"; # yay, works 23:20
timotimo string concat for paths? :(
hm, have we got a sibling method? 23:21
Juerd I really see nothing wrong with simple string concatenation for paths at the end
In practice it works just about anywhere. 23:22
Especially if you don't care about win32 at all :D
timotimo docs.perl6.org/routine/sibling
Juerd I'll use that if it makes you happy :D 23:23
timotimo m: say ".parent()/lib".chars; say ".sibling('lib')".chars.say 23:24
camelia 13
15
True
Juerd Oh, meh, have to stringify it myself now :(
timotimo it's only two more chars to Do The Right Thing
oh? we should fix the lib pragma, then
to accept IO::Path, too
Juerd Type check failed in binding to parameter '$spec'; expected Str but got IO::Path
Or Str() it
timotimo that'd be a possible fix
23:28 MasterDuke left
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;"
Or something like it. "./lib" and "../lib" are extremely common
I'll report the bug 23:30
23:31 skids joined
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?
timotimo CompUnit Repo
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?
[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»»
Juerd ugexe: "use lib 'lib';" is in example code at docs.perl6.org/language/modules
[Coke] committable6: 2017.05 my \foo = Callable but role :: { };
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»»
[Coke] m: my \foo = Callable but role :: { };
camelia No such method 'mixin' for invocant of type 'Perl6::Metamodel::ParametricRoleGroupHOW'. Did you mean 'min'?
in block <unit> at <tmp> line 1
ugexe if you are using the typical CURFS/perl5-ish structure yes
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.
[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»»
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:44
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
Juerd Although come to think of it, Perl modules don't follow that structure :(
ugexe: What do you mean by "there is no lib/"?
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
Juerd It runs from wherever the git repository is cloned to.
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
ugexe why not then invoke them with -Iwhatever or PERL6LIB="..."
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
Juerd I'm already requesting that they install Perl 6; that's about as far as I dare to go.
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
Juerd ugexe: Yes. That's why I'm not using "use lib 'lib';", but instead "use lib ~$*PROGRAM.resolve.sibling('lib');"
ugexe just because there is a precomp folder there does not mean everything got precompiled, so im not so sure
Juerd I'm adding 'resolve' because the typical way of 'installing' things like this is to symlink them to /usr/bin :) 23:51
ugexe: It's not slow enough to not be precomped. 23:52
ugexe well, precompiling is pretty slow
Juerd It's very slow the first run, but subsequent runs are only a little slow. 23:54
23:56 Cabanossi left 23:59 Cabanossi joined
ugexe it would be nice if CURs could be smart enough to handle this 23:59