Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2016-07-29

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:06 BenGoldberg joined #perl6
00:10 skids joined #perl6
00:19 _sri left #perl6
00:21 adu joined #perl6
00:22 ARM9 joined #perl6
00:24 hwcomcn joined #perl6
00:26 gblade joined #perl6
00:29 ARM9 joined #perl6
00:31 gblade m: (1,'A').grep(1)
00:31 camelia rakudo-moar aa5e49: OUTPUT«Cannot convert string to number: base-10 number must begin with valid digits or '.' in '3⏏5A' (indicated by ⏏)␤  in block <unit> at <tmp> line 1␤␤Actually thrown at:␤  in block <unit> at <tmp> line 1␤␤»
00:31 gblade 'A'.ACCEPTS(1)
00:31 gblade m: 'A'.ACCEPTS(1)
00:31 camelia rakudo-moar aa5e49: ( no output )
00:32 gblade m: 1.ACCEPTS('A')
00:32 camelia rakudo-moar aa5e49: OUTPUT«Cannot convert string to number: base-10 number must begin with valid digits or '.' in '3⏏5A' (indicated by ⏏)␤  in block <unit> at <tmp> line 1␤␤Actually thrown at:␤  in block <unit> at <tmp> line 1␤␤»
00:33 gblade m: 'A' ~~ 1
00:33 camelia rakudo-moar aa5e49: OUTPUT«Cannot convert string to number: base-10 number must begin with valid digits or '.' in '3⏏5A' (indicated by ⏏)␤  in block <unit> at <tmp> line 1␤␤Actually thrown at:␤  in block <unit> at <tmp> line 1␤␤»
00:33 gblade I'm guessing that this is a bug?
00:33 gfldex no
00:33 gfldex the error message is LTA tho
00:34 gblade So how do you grep within dissimilar things?
00:34 gfldex you use the right matcher. If you are looking for a mix of numbers and chars use a regexp
00:35 gfldex or you use MMD or given/when
00:35 mcmillhj joined #perl6
00:37 BenGoldberg m: "Just another Perl hacker,".subst( /\w/, { ~$/ ~^ '𝒑' }, :g ).say;
00:37 camelia rakudo-moar aa5e49: OUTPUT«𝓛𝓤𝓢𝓥 𝓰𝓿𝓾𝓥𝓹𝓴𝓣 𝓁𝓴𝓣𝓽 𝓹𝓰𝓲𝓺𝓴𝓣,␤»
00:38 BenGoldberg m: "Just another Perl hacker,".subst( /\w/, { ~$/ ~^ '𝒑' }, :g ).say;
00:38 camelia rakudo-moar aa5e49: OUTPUT«𝓛𝓤𝓢𝓥 𝓰𝓿𝓾𝓥𝓹𝓴𝓣 𝓁𝓴𝓣𝓽 𝓹𝓰𝓲𝓺𝓴𝓣,␤»
00:38 gblade Is there a built-in matcher which is True iff the types match and the value is equivalent?
00:38 * BenGoldberg can't type today....
00:39 gblade m: 1 eqv 'A'
00:39 camelia rakudo-moar aa5e49: OUTPUT«WARNINGS for <tmp>:␤Useless use of "eqv" in expression "1 eqv 'A'" in sink context (line 1)␤»
00:39 gblade m: say 1 eqv 'A'
00:39 camelia rakudo-moar aa5e49: OUTPUT«False␤»
00:39 gblade m: say 'A' eqv 1
00:39 camelia rakudo-moar aa5e49: OUTPUT«False␤»
00:40 gfldex m: dd (1,'A').grep(* eqv 1)
00:40 camelia rakudo-moar aa5e49: OUTPUT«(1,).Seq␤»
00:40 gblade thanks
00:42 BenGoldberg m: "Just another Perl hacker,".trans( [ flat "A".."Z", "a".."z"] => [ flat "𝓐".."𝓩", "𝓪".."𝔃" ] ).say; # maybe this?
00:42 camelia rakudo-moar aa5e49: OUTPUT«𝓙𝓾𝓼𝓽 𝓪𝓷𝓸𝓽𝓱𝓮𝓻 𝓟𝓮𝓻𝓵 𝓱𝓪𝓬𝓴𝓮𝓻,␤»
00:42 BenGoldberg :)
00:43 * gfldex steals this nice example
00:43 timotimo what are those? i only get questionmark diamonds for that
00:43 BenGoldberg Now all I have to do is figure out which font google chrome is using to display it, and tell my irc client to use it as a fallback
00:44 BenGoldberg timotimo, Try looking at the irc log for the channel... there's a moderate chance your browser can display it even if your irc client can't
00:44 timotimo ah, of course
00:45 gfldex timotimo: http://imgur.com/a/ePZuG
00:45 timotimo works in the browser, indeed
00:46 gfldex timotimo: that's the font i use http://www.fontspace.com/gnu-freefont/freemono
00:50 * gfldex .oO( The recommended font for this irc channel is: ... )
00:50 ShimmerFairy m: say "𝓙".uniname
00:50 camelia rakudo-moar aa5e49: OUTPUT«MATHEMATICAL BOLD SCRIPT CAPITAL J␤»
00:52 japhb joined #perl6
00:52 holyghost joined #perl6
00:53 AlexDaniel debian users might want to try this: apt install fonts-freefont-ttf ttf-unifont
00:55 gblade I'm still stuck on 'A' ~~ 1. Seems like it should at least emit a Failure rather than dying.
00:57 stmuk_ joined #perl6
00:58 gfldex m: try { 'A' ~~ 1; CATCH { when X::Str::Numeric { say .^name } } }; say 'alive';
00:58 camelia rakudo-moar aa5e49: OUTPUT«X::Str::Numeric␤alive␤»
00:58 gfldex gblade: ^^^
01:01 gblade How would you use the try/CATCH within a given/when trying to match 1 or 'A'?
01:01 timotimo just give the given a CATCH block
01:02 timotimo you don't need to have a try to be able to use CATCH
01:04 ShimmerFairy m: given 'A' { when 1 { say "yay" }; CATCH { default { say "aw" } } }  # like so, the default {...} block lets us "take" the error successfully
01:04 camelia rakudo-moar aa5e49: OUTPUT«aw␤»
01:04 gblade ah so the default goes within the CATCH
01:05 mcmillhj joined #perl6
01:07 sufrostico joined #perl6
01:09 ShimmerFairy gblade: no, sorry for confusing it there. That's different from the "given" use of default.
01:10 geekosaur CATCH kinda acts like its own given/when, operating on the exception that triggered it
01:11 ShimmerFairy gblade: CATCH is a phaser, like BEGIN or INIT, which runs at exception time. While in CATCH, the exception being handled is in $_, which lets you use when/default to determine what kind of error it is.
01:12 gfldex there is also CONTROL that runs at control exception time
01:13 cdg_ joined #perl6
01:13 BenGoldberg IIRC, things such as 'return' and 'next' and 'redo' are implemented by throwing control exceptions.
01:13 gfldex return, fail, redo, next, last, take, warn, proceed and succeed.
01:14 gfldex m: CX::.keys.say
01:14 camelia rakudo-moar aa5e49: OUTPUT«(Return Last Warn Succeed Proceed Redo Next Take)␤»
01:15 gfldex m: X::.keys.say
01:15 camelia rakudo-moar aa5e49: OUTPUT«(Method NoSuchSymbol NotEnoughDimensions OS InvalidType Pairup NYI PseudoPackage EXPORTHOW IO Set Package Declaration Inheritance Redeclaration StubCode UnitScope PoisonedAlias Placeholder IllegalOnFixedDimensionArray Temporal Proc InvalidTypeSmiley Numeri…»
01:15 gfldex m: X::.keys.elems
01:15 camelia rakudo-moar aa5e49: ( no output )
01:15 gfldex m: X::.keys.elems.say
01:15 camelia rakudo-moar aa5e49: OUTPUT«95␤»
01:16 gfldex there is a lot that can go wrong :)
01:16 BenGoldberg Theoretically, at least... I expect that the optimizer, at some point in time, will create some code which asks our exception handler stack whether it contains any CONTROL blocks, and if not, uses an optimized version of your code which assumes normal non-strange handling of those exceptions.
01:16 bob777 joined #perl6
01:19 ShimmerFairy gfldex: that doesn't even count subcategories! :P
01:19 gfldex it's exceptions all the way down!
01:20 BenGoldberg m: sub foo { 42 }; sub bar { 'xyzzy' }; { say foo(); say bar(); CONTROL { .perl.say; (++ $).say; .resume }; 'after'.say;
01:20 camelia rakudo-moar aa5e49: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Missing block␤at <tmp>:1␤------> 3say; (++ $).say; .resume }; 'after'.say;7⏏5<EOL>␤»
01:21 BenGoldberg m: sub foo { 42 }; sub bar { 'xyzzy' }; { say foo(); say bar(); CONTROL { .perl.say; (++ $).say; .resume } }; 'after'.say;
01:21 camelia rakudo-moar aa5e49: OUTPUT«42␤xyzzy␤after␤»
01:22 gfldex m: for X::.values { my $name = .^name; X::($name)::.keys.say }
01:22 camelia rakudo-moar aa5e49: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Combination of indirect name lookup and call not supported␤at <tmp>:1␤------> 3values { my $name = .^name; X::($name)::7⏏5.keys.say }␤    expecting any of:␤        argument list␤»
01:22 BenGoldberg m: sub foo { CONTROL { 'bar'.say; .resume }; 42 };
01:22 camelia rakudo-moar aa5e49: ( no output )
01:22 BenGoldberg m: sub foo { CONTROL { 'bar'.say; .resume }; 42 }; say foo();
01:22 camelia rakudo-moar aa5e49: OUTPUT«42␤»
01:23 BenGoldberg m: sub foo { CONTROL { default { 'bar'.say; .resume } }; 42 }; say foo();
01:23 camelia rakudo-moar aa5e49: OUTPUT«42␤»
01:24 mcmillhj joined #perl6
01:30 gfldex m: for X::.values { ::($_.^name)::.keys.say }
01:30 camelia rakudo-moar aa5e49: OUTPUT«()␤()␤()␤()␤()␤()␤()␤()␤()␤()␤()␤(​)␤()␤()␤()␤()␤()␤()␤()␤()␤()␤()␤()␤()␤()␤​()␤()␤()␤()␤()␤()␤()␤()␤()␤()␤()␤()␤()␤()​␤()␤()␤()␤()␤()␤()␤()␤()␤()␤()␤()␤()␤(…»
01:31 gfldex m: for X::.values { dd ::($_.^name) }
01:31 camelia rakudo-moar aa5e49: OUTPUT«X::Method␤X::NoSuchSymbol␤X::NotEnoughDi​mensions␤X::OS␤X::InvalidType␤X::Pairup␤X::NYI␤​X::PseudoPackage␤X::EXPORTHOW␤X::IO␤X::Set␤X::P​ackage␤X::Declaration␤X::Inheritance␤X::Redecla​ration␤X::StubCode␤X::UnitScope␤X::Poison…»
01:31 gfldex exceptions are exceptionally hard to count :(
01:36 mcmillhj joined #perl6
01:48 benvejknrertbrrt joined #perl6
01:56 mcmillhj joined #perl6
02:05 cibs joined #perl6
02:09 parabolize joined #perl6
02:11 mcmillhj joined #perl6
02:17 Actualeyes joined #perl6
02:20 bob777 joined #perl6
02:31 mcmillhj joined #perl6
02:37 noganex joined #perl6
02:44 mcmillhj joined #perl6
02:54 s34n_ joined #perl6
02:55 s34n_ I'm looking for documentation of **@ and +@
02:58 dainis joined #perl6
02:58 Juerd s34n_: You're looking for **, +, and @
02:59 Juerd s34n_: Can you paste the line of code so I can verify this?
03:00 s34n_ yes. ** and + as prefix operators on a list (I think)
03:00 Juerd In a signature?
03:00 s34n_ yes
03:00 mcmillhj joined #perl6
03:01 Juerd ** in a signature is documented at https://docs.perl6.org/type/Signature#index​-entry-parameter_%2A%40-parameter_%2A%2525_​slurpy_argument_%28Signature%29-Slurpy_%28A.K.A._Variadic%29_Parameters
03:01 Juerd There's not much about it.
03:01 Juerd + is at https://docs.perl6.org/type/Signa​ture#Single_Argument_Rule_Slurpy
03:03 dainis joined #perl6
03:03 Juerd Note that these things added to parameters in signatures usually aren't called operators. This page calls them sigils, but I haven't seen them called that elsewhere as far as I can remember.
03:05 s34n_ Juerd: thanks
03:05 Juerd You're welcome :)
03:05 kaare__ joined #perl6
03:06 [Coke] "sigil" for "+@" is almost certainly a bad name.
03:07 [Coke] @ is the sigil. + is more of a marker. Not sure if it has an official name.
03:07 [Coke] same with *@a
03:13 Juerd In the source they're called quantifiers
03:14 mcmillhj joined #perl6
03:14 Juerd Or actually, 'quant'
03:15 Juerd Quant \Quant\, n.
03:15 Juerd A punting pole with a broad flange near the end to prevent it
03:15 Juerd from sinking into the mud; a setting pole.
03:15 Juerd [1913 Webster]
03:15 Juerd Hehe.
03:16 mengwong joined #perl6
03:23 BenGoldberg The proper term is "thingies."
03:23 Juerd [citation needed]
03:24 maybekoo2 joined #perl6
03:24 BenGoldberg Informally, you can also use the term, "wossnames"
03:28 mcmillhj joined #perl6
03:45 mcmillhj joined #perl6
03:50 parabolize joined #perl6
03:55 mcmillhj joined #perl6
04:05 andrzejku joined #perl6
04:06 andrzejku hi
04:11 johndau joined #perl6
04:13 mcmillhj joined #perl6
04:16 s34n_ *%slurp is copy    <- is that valid in a signature?
04:24 s34n_ would that make all remaining named params 'is copy'?
04:26 canopus_ joined #perl6
04:28 mcmillhj joined #perl6
04:36 skids s34n_: it's a valid sig but only affects %slurp itself, not the contents, I think.
04:36 skids m: sub f (*%g) { %g<a> = 8; dd %g }; f(:a,:b);
04:36 camelia rakudo-moar aa5e49: OUTPUT«Cannot modify an immutable Bool␤  in sub f at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
04:36 skids m: sub f (*%g s copy) { %g<a> = 8; dd %g }; f(:a,:b);
04:36 camelia rakudo-moar aa5e49: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Malformed parameter␤at <tmp>:1␤------> 3sub f (*%g7⏏5 s copy) { %g<a> = 8; dd %g }; f(:a,:b);␤    expecting any of:␤        constraint␤»
04:36 skids m: sub f (*%g is copy) { %g<a> = 8; dd %g }; f(:a,:b);
04:36 camelia rakudo-moar aa5e49: OUTPUT«{:a(8), :b}␤»
04:43 mcmillhj joined #perl6
04:46 Cabanossi joined #perl6
04:47 kurahaupo joined #perl6
05:01 TimToady m: sub f (*%g is copy) { %g<a> = 8; }; my %a = :a, :b; f(|%a); dd %a
05:01 camelia rakudo-moar aa5e49: OUTPUT«Hash %a = {:a, :b}␤»
05:05 s34n_ if Array.reduce does a left fold, is there a built-in for right folds?
05:11 mcmillhj joined #perl6
05:16 canopus joined #perl6
05:18 freeside joined #perl6
05:22 mcmillhj joined #perl6
05:30 baest joined #perl6
05:41 ab6tract joined #perl6
05:43 mantovani joined #perl6
05:49 skids reduce folds the way the op does, no?
05:49 skids (per operator associativity)
05:50 skids So, reverse the op e.g. "R-"
05:52 Khisanth joined #perl6
05:52 andrzejku joined #perl6
05:55 rangerprice joined #perl6
05:55 rangerprice left #perl6
05:56 skids Hrm.  -EDOCSWRONG
05:57 labster joined #perl6
05:57 skids or synopses obselete.
06:04 mantovani joined #perl6
06:06 freeside joined #perl6
06:10 skids m: [1,2,3,4].reduce(&infix:<R->).say; say 1 - (2 - (3 - 4)); say ((1 - 2) - 3) - 4; say ((1 R- 2) R- 3) R- 4; say 1 R- (2 R- (3 R- 4)) # I'm too tired to deal.  Going to sleep.
06:10 camelia rakudo-moar aa5e49: OUTPUT«2␤-2␤-8␤2␤-2␤»
06:22 domidumont joined #perl6
06:22 domidumont joined #perl6
06:30 mcmillhj joined #perl6
06:31 mantovani joined #perl6
06:35 abraxxa joined #perl6
06:36 firstdayonthejob joined #perl6
06:39 canopus joined #perl6
06:51 CIAvash joined #perl6
06:53 mantovani joined #perl6
06:59 mcmillhj joined #perl6
07:01 ab6tract joined #perl6
07:02 canopus_ joined #perl6
07:02 ab6tract good *, #perl6
07:08 mantovani joined #perl6
07:14 darutoko joined #perl6
07:19 domidumont joined #perl6
07:21 canopus joined #perl6
07:21 domidumont joined #perl6
07:23 mcmillhj joined #perl6
07:31 wamba joined #perl6
07:34 RabidGravy joined #perl6
07:34 sno joined #perl6
07:38 canopus joined #perl6
07:41 abraxxa1 joined #perl6
07:49 canopus joined #perl6
07:51 abraxxa joined #perl6
07:51 freeside joined #perl6
07:52 dsp- joined #perl6
07:55 johndau joined #perl6
08:10 sjn good *, #perl6 :)
08:11 sjn I have a crazy question. Are there any ways to *modify* a method/function signature?
08:14 sjn Meaning, someone else supplies some code containing a subroutine, and I'd like to write module that adds another parameter to it.
08:15 sjn E.g. script A has a MAIN sub, and when module B is loaded, this MAIN sub gets another argument
08:17 mcmillhj joined #perl6
08:19 psch well, .wrap can't do that i just learned
08:19 psch sjn: why wouldn't adding a multi candidate for MAIN work in that case?
08:20 sjn yeah, I was thinking a little about that just now
08:20 sjn just testing it
08:20 pmqs joined #perl6
08:22 DrForr Starting to work on the top-level parser code - At the moment it just handles 'my $a', but not for long.
08:44 cpage_ joined #perl6
08:44 cpage_ joined #perl6
08:47 sjn psch: allright, not entirely sure on how to do that..
08:48 sjn I have a file with a "multi MAIN (Int $c) { ... }" defined
08:48 sjn and module Modify.pm, with another multi MAIN
08:49 sjn I assumed running "perl6 -MMulti file.pl6" would be enough
08:49 psch sjn: well, you do need 'use' or some other importing mechanism
08:49 psch m: module Foo { multi MAIN($, $) is export { } }; import Foo; multi MAIN($) { };
08:49 camelia rakudo-moar aa5e49: OUTPUT«Usage:␤  <tmp> <Any> <Any> ␤  <tmp> <Any> ␤»
08:50 psch well, and 'is export' :)
08:50 sjn psch: isn't -M equivalent to a "use"?
08:50 psch i'm not sure it is for a script, honestly
08:51 psch i mean, i only ever use -M for -e
08:51 mcmillhj joined #perl6
08:52 sjn oh, interesting
08:52 sjn I get an error here
08:52 psch star-m: module Foo { multi MAIN($, $) is export { } }; import Foo; multi MAIN($) { };
08:52 camelia star-m 2016.04: OUTPUT«Usage:␤  <tmp> <Any> <Any> ␤  <tmp> <Any> ␤»
08:52 psch bisect: module Foo { multi MAIN($, $) is export { } }; import Foo; multi MAIN($) { };
08:52 sjn A symbol '&MAIN' has already been exported
08:52 bisectable psch: On both starting points the exit code is 2 and the output is identical as well
08:52 bisectable psch: Output on both points: Usage:␤  /tmp/tM9TaWqehe <Any> <Any> ␤  /tmp/tM9TaWqehe <Any>
08:53 psch bisect: good=HEAD bad=2016.01 module Foo { multi MAIN($, $) is export { } }; import Foo; multi MAIN($) { };
08:53 bisectable psch: No build for 'bad' revision
08:53 sjn I have two different multi MAIN defined in that file
08:53 sjn both are exported
08:53 psch i think you need an explicit proto and to export that then
08:53 sjn ah, ok
08:53 psch m: module Foo { multi foo($) is export {}; multi foo($,$) is export {} }; import Foo
08:53 camelia rakudo-moar aa5e49: ( no output )
08:54 psch hm... well
08:54 psch maybe not - i guess pasted it? :)
08:54 psch -d
08:58 sjn ah, ok
08:58 sjn hm
08:59 sjn "Too late for unit-scoped sub definition; Please use the block form."
09:00 sammers hello from Japan
09:01 holyghost hola Japan
09:02 sjn m: module Foo { proto foo; multi foo (Bool $yes) { ... }; multi foo (Bool $no) { ... }; }
09:02 camelia rakudo-moar aa5e49: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤A unit-scoped sub definition is not allowed except on a MAIN sub;␤Please use the block form.␤at <tmp>:1␤------> 3module Foo { proto foo;7⏏5 multi foo (Bool $yes) { ... }; multi fo␤»
09:03 sjn block form?
09:03 sjn Am I not using that there?
09:03 sjn sammers: hello from the Europes
09:03 sammers Hi sjn
09:04 sammers Hi holyghost
09:04 konobi 今日はご機嫌いかがですか?
09:04 sammers is there any way to redirect Proc::Async stdout?
09:04 konobi oh yay... utf8 actually works for mew now
09:05 jnthn sjn: It's talking about the proto. The error indicator is even right on the ; pointing at where it wants the block :)
09:06 sammers hi konobi, doing good. you?
09:07 mcmillhj joined #perl6
09:07 sammers I have a processe that I spawn using Proc::Async, but it is a little noisy, so I want to filter it a bit.
09:09 ssqq joined #perl6
09:09 sjn jnthn: ah, cool. so the proto was incomplete
09:10 sjn maybe a little LTA error message, that
09:10 sjn a little confusing too, since the sub defenition was *not* unit-scoped
09:10 sjn (I don't think so, at least)
09:11 psch m: sub MAIN; say "hi"
09:11 camelia rakudo-moar aa5e49: OUTPUT«hi␤»
09:11 psch sjn: the blockless form of a sub definition *is* the unit-scoped definition
09:12 jnthn This is true, however even I was surprised that you could actually use the blockless form without writing the word "unit" before it :)
09:12 sjn ok I see, and the error here is that I try to do a unit-scoped defenition inside a smaller scope
09:12 jnthn (I didn't realize it was that liberal up until a couple of weeks ago :))
09:13 psch sjn: no, the error is that only MAIN allows a unit-scoped definition
09:13 sjn eh, I'm more confused now
09:13 jnthn So it may be good to not assume that somebody writing sub foo; intended it to be unit scoped in the error, but also to point out - if the unit keyword was missing - that you can't just stub things that way also :)
09:13 sjn hm. @colleagues are calling me to go to lunch. brb
09:14 jnthn Lunch at...11:13am?!
09:14 psch boo GMT +2 normativity
09:14 jnthn Heh, I suspect sjn is in the same timezone as me :)
09:15 jnthn There are places in Europe that have lunch strangely early :)
09:15 psch m: module Foo;
09:15 camelia rakudo-moar aa5e49: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Semicolon form of 'module' without 'unit' is illegal.  You probably want to use 'unit module'␤at <tmp>:1␤------> 3module Foo;7⏏5<EOL>␤»
09:16 jnthn psch: Yeah, that's why I was surprised sub MAIN; is allowed rather than needing to be "unit sub MAIN;"
09:16 psch anyway, i'm not sure about requiring 'unit sub MAIN', but the error probably does need adjustment
09:17 psch although "if you wanted a unit-scoped declaration, [only MAIN allows that||it's too late for that].  if you wanted to stub please use the block form" is kind of unwieldy
09:31 xinming joined #perl6
09:32 rindolf joined #perl6
09:39 literal silly question...where do I find installed modules? "panda --installed list" shows I have some installed, but I don't see them anywhere under Rakudo Star's install/ directory
09:42 stmuk_ literal: its not like perl 5 - the modules are compiled into bytecode .. the source is present but the directory tree flattened and all filenames are SHA1 hashes
09:42 literal I see, I guess they all correspond to the share/perl6/site/precomp/$whatever blobs
09:42 mcmillhj joined #perl6
09:47 jnthn I'm pretty sure I've seen somebody show a way of querying the mapping also, but I don't remember it
09:50 cpage_ joined #perl6
09:56 llfourn m: say ($_ with "Foo") # I think this is a new bug
09:56 camelia rakudo-moar aa5e49: OUTPUT«WARNINGS for <tmp>:␤Useless use of $_ in sink context (line 1)␤Foo␤»
09:58 * llfourn wonders if our bisect thing can look for when a warning started
09:58 psch bisectable: say ($_ with "Foo")
09:58 bisectable psch: Exit code is 0 on both starting points, bisecting by using the output
09:58 bisectable psch: bisect log: https://gist.github.com/51a3​b382dfecdad999b21db34ec1d26b
09:58 bisectable psch: (2016-07-26) https://github.com/rakudo/rakudo/commit/5334cb7
10:00 llfourn ah the gist shows some clues psch++
10:00 freeside joined #perl6
10:01 * DrForr peers curiously at freeside. :)
10:01 llfourn oh it even got the commit that changed the output sweet
10:01 psch llfourn: huh?  bisectable uses output when exit code is inconclusive, and it did point at... right :)
10:01 llfourn bisectable++ psch++
10:01 bisectable llfourn: Exit code is 1 on both starting points, bisecting by using the output
10:01 bisectable llfourn: bisect log: https://gist.github.com/97ae​e6fe2637b8b4e3d39506588dc57d
10:01 bisectable llfourn: (2015-12-27) https://github.com/rakudo/rakudo/commit/373adc0
10:01 llfourn --bisectable
10:02 dalek doc: c6e699d | (Steve Mynott)++ | doc/Language/faq.pod6:
10:02 dalek doc: remove extra full stop
10:02 dalek doc: review: https://github.com/perl6/doc/commit/c6e699d1ae
10:02 dalek doc: 690d83d | (Steve Mynott)++ | doc/Language/faq.pod6:
10:02 dalek doc: mention 6.d as next release
10:02 dalek doc: review: https://github.com/perl6/doc/commit/690d83d0f1
10:02 psch ...and that's why everybody wants the colon ;)
10:02 DrForr "Good, bad, I've got the colon."
10:03 DrForr Would modules be an appropriate way to collect a bunch of classes into a single file? (I'd of course prefer separate files, but that incurs performance penalties and means I have to oen file after file to make a simple change.)
10:04 DrForr Looks that way according to the docs, /me fiddles.
10:10 llfourn .tell TimToady RT #128770 is relevant to your interests :)
10:10 synopsebot6 Link:  https://rt.perl.org/rt3//Publ​ic/Bug/Display.html?id=128770
10:10 yoleaux llfourn: I'll pass your message to TimToady.
10:15 tx0h_ joined #perl6
10:16 mcmillhj joined #perl6
10:20 sjn <- back
10:20 sjn jnthn: yeah, early lunch (brunch?)
10:21 ssqq joined #perl6
10:23 sjn is there a way to introspect wether or not a function has been defined as a method or as a multi-method?
10:26 sjn (alternatively, where do I look for docs/code on that?)
10:27 literal so how does "panda --installed list" find out which modules are installed? I expected there would be a manifest of some sort listing them, but I did not find one: https://gist.github.com/hinrik/3​7ddc4cd773495d91e67e1ca36c0f001
10:29 dalek doc: bc611e2 | (Steve Mynott)++ | doc/Language/faq.pod6:
10:29 dalek doc: b2gills++ doc test for at least 6.c
10:29 dalek doc: review: https://github.com/perl6/doc/commit/bc611e214d
10:29 dalek doc: 0ea7b20 | (Steve Mynott)++ | doc/Language/faq.pod6:
10:29 dalek doc: improve beginner install instructions
10:29 dalek doc: review: https://github.com/perl6/doc/commit/0ea7b20a11
10:29 psch m: class A { method foo { }; multi method bar($) { }; multi method bar { } }; A.^can('foo')[0].is_dispatcher.say; A.^can('bar')[0].is_dispatcher.say
10:29 camelia rakudo-moar aa5e49: OUTPUT«False␤True␤»
10:29 psch sjn: ^^^
10:29 mcmillhj joined #perl6
10:30 psch m: class A { method foo { }; multi method bar { } }; A.^can('foo')[0].is_dispatcher.say; A.^can('bar')[0].is_dispatcher.say
10:30 camelia rakudo-moar aa5e49: OUTPUT«False␤True␤»
10:30 psch sjn: doesn't even have to have more than one candidate
10:30 sjn ah, cool
10:30 sjn thanks! ^^
10:31 stmuk_ literal: I think there is a JSON file somewhere .. strace the command to look for the open
10:32 literal stmuk_: I checked all the interesting files returned by strace (see the gist), the only JSON file was one that contains metadata about Panda itself, not any other modules
10:35 dalek doc: 718e058 | (Steve Mynott)++ | doc/Language/faq.pod6:
10:35 dalek doc: mention p5 and ruby nutshell pages
10:35 dalek doc: review: https://github.com/perl6/doc/commit/718e0584f5
10:40 sjn psch: how would you do the A.^can('foo')[0].is_dispatcher.say on methods in the main:: namespace?
10:40 psch m: say &say.is_dispatcher;
10:40 camelia rakudo-moar aa5e49: OUTPUT«True␤»
10:40 sjn I get an "Undeclared subroutine"
10:42 sjn ok, no way to do that via ^can()?
10:42 * sjn wants to do some other introspection too
10:43 psch sjn: .^can is a method on the class meta object, to check if a given class has a method named as the argument
10:43 sjn ok
10:43 psch m: say &say.^methods
10:43 camelia rakudo-moar aa5e49: OUTPUT«(<anon> <anon> <anon> soft <anon> <anon> yada perl <anon> onlystar candidates unwrap wrap <anon> <anon> package leave <anon> <anon> cando <anon> <anon> <anon> <anon> multi <anon> <anon> add_phaser has-phaser phasers assuming WHY set_why perl of <anon> retu…»
10:43 psch sjn: so what .^can returns is almost the same as what &say represents - a Routine
10:44 sjn quite a lot of anons there
10:44 psch m: say &say.^methods.map(*.name)
10:44 camelia rakudo-moar aa5e49: OUTPUT«(<anon> <anon> <anon> soft <anon> <anon> yada perl <anon> onlystar candidates unwrap wrap <anon> <anon> package leave <anon> <anon> cando <anon> <anon> <anon> <anon> multi <anon> <anon> add_phaser has-phaser phasers assuming WHY set_why perl of <anon> retu…»
10:44 psch ...we probably should name all of them at least
10:44 psch the fact they exist as <anon> is because of bootstrapping
10:44 sjn psch: no, I want to distinguish different multis in order to look at their signatures
10:45 sjn (and some other stuff)
10:45 psch m: say &say.candidates
10:45 camelia rakudo-moar aa5e49: OUTPUT«(sub say () { #`(Sub|59652856) ... } sub say (Str:D \x) { #`(Sub|59653008) ... } sub say (\x) { #`(Sub|59653160) ... } sub say (**@args is raw) { #`(Sub|59653312) ... })␤»
10:45 stmuk_ literal: share/perl6/site/panda/state although accessing it probably isn't an approved API
10:46 stmuk_ literal: there is also API violating code in p6doc but don't let nine catch you using it :)
10:47 pRiVi joined #perl6
10:48 literal I see
10:48 mcmillhj joined #perl6
10:49 Zoffix joined #perl6
10:49 Zoffix m: class Foo { has @.foo  }; Foo.new: :foo(42)
10:49 camelia rakudo-moar aa5e49: ( no output )
10:49 Zoffix m: class Foo { has @.foo; submethod BUILD (:@!foo) {}  }; Foo.new: :foo(42)
10:49 camelia rakudo-moar aa5e49: OUTPUT«Type check failed in binding to @!foo; expected Positional but got Int (42)␤  in submethod BUILD at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
10:49 Zoffix that's LTA :(
10:50 psch m: class Foo { has @.foo; submethod BUILD (:@!foo) {}  }; Foo.new: :foo[42]
10:50 camelia rakudo-moar aa5e49: ( no output )
10:50 stmuk_ the p6doc stuff at least works with zef and panda ... I don't think official APIs exist yet but there was recent talk of writing them .. ugexe knows about this
10:50 Zoffix Yes, I know of that, but that requires changing existing code that relies on my class
10:50 Zoffix (and a 5,000+ word article :))
10:53 Zoffix I guess this is a better example:
10:53 Zoffix m: class Foo { has @.foo; submethod BUILD (:@!foo) {}  }; Foo.new: :foo<42 45>
10:53 camelia rakudo-moar aa5e49: ( no output )
10:53 Zoffix m: class Foo { has @.foo; submethod BUILD (:@!foo) {}  }; Foo.new: :foo<42>
10:53 camelia rakudo-moar aa5e49: OUTPUT«Type check failed in binding to @!foo; expected Positional but got IntStr (IntStr.new(42, "42"))␤  in submethod BUILD at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
10:53 psch m: class Foo { has @.foo; submethod BUILD (:@!foo) {}  }; Foo.new: :foo<42, >
10:53 camelia rakudo-moar aa5e49: OUTPUT«Type check failed in binding to @!foo; expected Positional but got Str ("42,")␤  in submethod BUILD at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
10:53 psch m: class Foo { has @.foo; submethod BUILD (:@!foo) {}  }; Foo.new: :foo(42, )
10:53 camelia rakudo-moar aa5e49: ( no output )
10:57 matt_ joined #perl6
10:59 Zoffix This one's even more messed up:
10:59 Zoffix m: class Foo { has %.foo; method bar { dd %.foo }  }; Foo.new(:foo(:42meow)).bar # all good
10:59 camelia rakudo-moar aa5e49: OUTPUT«Hash %!foo = {:meow(42)}␤»
10:59 Zoffix m: class Foo { has %.foo; submethod BUILD (:%!foo) {}; method bar { dd %.foo }  }; Foo.new(:foo(:42meow)).bar # still good
10:59 camelia rakudo-moar aa5e49: OUTPUT«Hash %!foo = {:meow(42)}␤»
11:00 Zoffix m: class Foo { has %.foo; submethod BUILD (:%!foo) {}; method bar { dd %.foo }  }; Foo.new(:foo(:42meow, :72ber)).bar # ooopsie
11:00 camelia rakudo-moar aa5e49: OUTPUT«Type check failed in binding to %!foo; expected Associative but got List ($(:meow(42), :ber(72)))␤  in submethod BUILD at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
11:00 Zoffix m: class Foo { has %.foo; method bar { dd %.foo }  }; Foo.new(:foo(:42meow, :72ber)).bar # works again
11:00 camelia rakudo-moar aa5e49: OUTPUT«Hash %!foo = {:ber(72), :meow(42)}␤»
11:00 wamba joined #perl6
11:02 mcmillhj joined #perl6
11:02 * Zoffix eyes a good article.
11:02 Zoffix Bad publicity is good publicity, amirite?
11:08 cpage_ joined #perl6
11:14 mcmillhj joined #perl6
11:15 rindolf joined #perl6
11:21 jkramer is there a global flag or something I can use to make all fails/dies print a stack trace?
11:21 moritz that's, like,, the default
11:21 jkramer Hmm
11:22 jkramer There's a module I use that exits with an error message "Unhandled exception: cannot close a closed socket" and I'd like to find out where that's from
11:23 psch jkramer: that's moarvm guts, apparently
11:23 jkramer Nevermind, I think I found it https://github.com/tony-o/perl6-http-server-as​ync/blob/master/lib/HTTP/Server/Async.pm6#L37
11:24 psch ah, right, "where do we hit the thing that throws", not "which part of the rakudo stack throws it" :)
11:24 psch fwiw, it probably should get its own typed exceptions, but i don't have any idea how we do that on moar
11:24 psch -s
11:25 parabolize joined #perl6
11:26 jnthn Zoffix: A thing with an @ in a signature wants you to pass something that does Positional, and a thing with % wants you to pass something that does Associative. Types in Perl 6 are constraints, not coercions (except coercion types, of course, and even those pull apart into a constraint followed by a coercion).
11:26 mcmillhj joined #perl6
11:27 jnthn Zoffix: :foo{...} and :bar[...] exist for conveniently passing the right kind of thing with a pair.
11:30 llfourn m: say :foo{one => "two",three => "four"}
11:30 camelia rakudo-moar aa5e49: OUTPUT«Unexpected named parameter 'foo' passed␤  in block <unit> at <tmp> line 1␤␤»
11:30 llfourn m: (:foo{one => "two",three => "four"}).say
11:30 camelia rakudo-moar aa5e49: OUTPUT«foo => {one => two, three => four}␤»
11:30 * llfourn didn't know about that
11:30 ZoffixMobile joined #perl6
11:31 moritz I recommend reading the section on colonpairs in S04
11:31 jgrabber joined #perl6
11:31 moritz it's quite extensive :-)
11:31 ZoffixMobile jnthn, sure, but then why does it work fine with attributes, when no BUILD is involved? It's inconsistency here that is the biggest ossue.
11:31 * llfourn knows what he's reading this weekend
11:32 jnthn ZoffixMobile: There's no constraints going on there, just a plain assignment.
11:33 ZoffixMobile The working attributes delude you into thinking :foo<bar> is a fine way to pass args to a positional attribute. So you document it and distribute your inteface, and then the second you add BUILD your interface explodes
11:33 ZoffixMobile That's what actually happened to me, sans the distributing part because I've not published the article yet :(
11:35 llfourn m: sub goof(:%foo) { }; goof(:foo(:bar,:baz))
11:35 camelia rakudo-moar 1751f1: OUTPUT«Type check failed in binding to %foo; expected Associative but got List ($(:bar, :baz))␤  in sub goof at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
11:35 jnthn m: class A { has @.foo; submethod BUILD(:$foo) { @!foo = @$foo; } }; A.new(:foo<1>).foo.say
11:35 camelia rakudo-moar 1751f1: OUTPUT«[1]␤»
11:35 jnthn You can preserve behavior that way
11:36 ZoffixMobile I'm gonna try when I get to a computer. IIRC, I had issues with that approach with the %.attr and passing as :foo(:42foo, :72bar)
11:36 llfourn m: class A { has %.foo; submethod BUILD(:$foo) { %!foo = %$foo; } }; A.new(:foo(:bar,:baz)).foo.say # hashified
11:36 camelia rakudo-moar 1751f1: OUTPUT«{bar => True, baz => True}␤»
11:37 ZoffixMobile thanks.
11:37 jnthn Yeah, that's another case of a binding/assignment difference.
11:38 mcmillhj joined #perl6
11:38 jnthn I guess it's one of those cases where you can't have all the consistencies...
11:39 jnthn And @!foo parameters have two different competing ideas of consistent behavior.
11:40 * ZoffixMobile nods
11:44 killbill joined #perl6
11:49 jkramer Eeek, I made perl6 segfault o_O
11:49 arnsholt Congrats! =)
11:49 jkramer I have a 400M core dump. Anyone interested? :D
11:50 arnsholt Possibly not. But a minimal example triggering the bug is generally appreciated =)
11:50 mcmillhj joined #perl6
11:50 moritz we tend to like instruction for reproduction better... what arnsholt++ said
11:51 arnsholt Oh, and if you're using NativeCall, it might just be a bug in your program and not a Moar bug =)
11:52 molaf joined #perl6
11:52 jkramer Minimal example is gonna be tricky, but I'll try. Also no NativeCall that I know if, unless it's in some module I use
11:53 arnsholt Then chances are good you can join the illustrious segfault-triggering-club =)
11:53 arnsholt Does the segfault happen consistently, or only intermittently?
11:53 jkramer Will I get an achievement badge or something? :)
11:53 jkramer It only happened once, trying to reproduce with a smaller example now
11:54 arnsholt It's not infrequently a first step on the path to doing guts-level hacking, to be honest =)
11:55 moritz jkramer: you will get karma here :-)
11:56 jkramer That's good enough for me :)
11:57 jkramer Yup, reproduced it :) Let me try one more time to be sure
11:58 arnsholt jkramer: Speaking of, if you're feeling adventurous and are familiar with doing this kind of stuff, you could try attaching gdb to the core dump you got and put the backtrace in a gist
11:59 jkramer Is perl6 built with debug information by default or do I need to recompile? Because I actually should do some actual work ;)
12:00 arnsholt Without -g by default, IIRC
12:00 arnsholt But you should get function names, even if you don't get line numbers
12:01 jkramer Actually I think I have an educated guess about what the problem is. It takes a couple of requests to make it crash, and they get slower and slower all the time until it crashes, so might be memory leak and it crashes when it runs out
12:01 arnsholt Sounds possible
12:03 mcmillhj joined #perl6
12:03 jkramer http://dpaste.com/0GJBMNC - here's the sample code. Run it and in parallel do `while true; curl localhost:8118`, it crashes after ~80 requests on my machine.
12:03 jkramer "This is Rakudo version 2016.04 built on MoarVM version 2016.04" BTW
12:04 arnsholt Ah, might be an async bug too
12:05 arnsholt jnthn's working on some of those these days I think
12:05 hwcomcn joined #perl6
12:06 lizmat jnthn: perhaps it's an idea to bump MoarVM / nqp ?
12:06 lizmat jnthn: or is that too soon ?
12:07 jnthn lizmat: Should be fine, I just ran out of time/energy on Wed, and was too busy yesterday to get to it
12:07 freeside joined #perl6
12:07 literal in the "make install" step of Rakudo Star, 16 of the 32 modules cause it to try downloading projects.json, which causes it to skip installing those modules if the server doesn't have a network connection, even though the sources for all those modules are already there
12:07 Ven joined #perl6
12:07 hwcomcn joined #perl6
12:07 jnthn Well, I was going to write a test also while bumping to cover the improvement :)
12:07 lizmat jnthn: ok, then I will bump in a few minutes after I push a rather exciting optimisation  :-)
12:07 jnthn But feel free to do the bump and I'll get to the test :)
12:08 lizmat ok
12:08 jnthn Please do a local spectest with the dump just in case. OSX can turn up intresting things sometimes ;)
12:08 jkramer Not sure if this is what you meant with backtrace but maybe it helps: http://dpaste.com/0KPHK2P
12:08 lizmat jnthn: will do
12:09 unmatched} jkramer: you should upgrade your Perl 6. 2016.04 is ancient
12:10 jkramer Oh, indeed. Didn't see 07 was out already
12:10 hwcomcn joined #perl6
12:10 literal so how can I install Rakudo Star properly without a network connection?
12:10 unmatched} It's a lot faster too.
12:10 lizmat jkramer: there's one every month  :-)
12:11 unmatched} Well, to clarify: there's one Rakudo release every month. Star releases happen less frequently.
12:11 jkramer lizmat: I used the package from here http://rakudo.org/how-to-get-rakudo/ and before 2016.07 2016.04 was the latest for ~3 months :)
12:11 lizmat jkramer: ah, you used Rakudo Star
12:12 unmatched} literal: it should be the case by default. What OS?
12:12 lizmat ok, then you're right, 2016.04 was the previous one  :-)
12:12 hwcomcn joined #perl6
12:12 literal unmatched}: CentOS
12:12 literal unmatched}: see the difference between the modules that install properly versus the ones that insist on a network connection: https://gist.github.com/hinrik/5​14cb479071da58fe5c607053412fb86
12:13 literal it says it's going to install DBIish from the local dir but doesn't
12:13 jkramer I was using rakudobrew some time ago but it stopped working somehow and I couldn't be bothered to look into it :)
12:13 jkramer Building 07 now, I'll report back if I can still reproduce the segfault then (or not)
12:13 hwcomcn joined #perl6
12:13 unmatched} jkramer: works fine for me. Maybe some nukage is in order? I have this alias setup: update-perl6 is aliased to `rm -fr ~/.zef; rm -fr ~/.perl6; rm -fr ~/.rakudobrew/; git clone https://github.com/tadzik/rakudobrew ~/.rakudobrew; rakudobrew build moar; rakudobrew build zef;'
12:13 lizmat jkramer: ok
12:14 unmatched} literal: it may be worth reporting that issue. My understanding Star should not attempt to install modules from a network connection. https://github.com/rakudo/star/issues/new
12:15 jkramer unmatched}: I think I tried cleaning ~/.rakudobrew and starting over, but not the other directories. Will try sometime
12:17 unmatched} m: class A { has @.foo; submethod BUILD(:$foo) { @!foo = @$foo; } }; dd A.new().foo
12:17 camelia rakudo-moar 1751f1: OUTPUT«Array @!foo = [Any]␤»
12:17 unmatched} tsk tsk
12:18 mcmillhj joined #perl6
12:19 ZoffixW joined #perl6
12:19 ZoffixW left #perl6
12:20 lizmat m: sub a(:$foo) { dd $foo }; a   # unmatched} : I think that's correct
12:20 camelia rakudo-moar 1751f1: OUTPUT«Any $foo = Any␤»
12:20 lizmat m: sub a(:$foo) { dd @$foo }; a   # unmatched} : I think that's correct
12:20 camelia rakudo-moar 1751f1: OUTPUT«(Any,)␤»
12:20 lizmat m: sub a(:$foo = Empty) { dd $foo }; a   # unmatched} : perhaps better ?
12:20 camelia rakudo-moar 1751f1: OUTPUT«Slip $foo = slip$()␤»
12:20 lizmat m: sub a(:$foo = ()) { dd $foo }; a   # unmatched} : perhaps better ?
12:20 camelia rakudo-moar 1751f1: OUTPUT«List $foo = $()␤»
12:21 lizmat m: sub a(:$foo = ()) { dd @$foo }; a   # unmatched}
12:21 camelia rakudo-moar 1751f1: OUTPUT«()␤»
12:21 unmatched} It's correct in the sense that there's no bug. I was more referring to the previous conversation about the inconsistencies between plain has @.foo; and version with BUILD and @!foo = @$foo; offered as a work around, which should actually be @!foo = @$foo if $foo; to avoid this edge case where no value is passed
12:21 unmatched} lizmat++ default is better yeah
12:30 kid51 joined #perl6
12:30 lizmat jnthn: still 2 spectest to fix for my nice optimisation, so I'm checking into bumping MoarVM now first
12:34 prammer joined #perl6
12:38 vcv unmatched}: thanks for the alias.  i always had trouble getting Perl 6 updated for some reason, but that worked flawlessly
12:38 unmatched} \o/
12:50 prammer joined #perl6
12:50 McDogfood joined #perl6
12:54 wamba joined #perl6
12:56 mcmillhj joined #perl6
12:58 literal unmatched}: https://github.com/rakudo/star/pull/75
13:00 unmatched} literal: are you sure that installed modules continue to work? It's telling panda not to install dependencies so they need to be manually included during the install process (that may already be the case, I don't know)
13:01 dalek joined #perl6
13:05 harmil_wk joined #perl6
13:10 sufrostico joined #perl6
13:12 luis joined #perl6
13:13 unmatched} Does anyone want to help me debug my huge and complex code? :) For some reason, if I have this line like this, giving it a Match object, my code fails: https://github.com/zoffixznet/perl6-bu​ggable/blob/master/bin/buggable.p6#L17 In the output it actually does print "◀▬▬ local QUIT :Leaving" where `local` is the value of $<server>, but the server doesn't quit. "
13:14 unmatched} The call starts off over here: https://github.com/zoffixznet/perl6-IRC-C​lient/blob/master/lib/IRC/Client.pm6#L85 and ends up over here: https://github.com/zoffixznet/perl6-IRC-C​lient/blob/master/lib/IRC/Client.pm6#L328 where it sends data to the socket. The last debug output dd ['ssay', $server, ~$server]; does have "local" for the ~$server so I'm confused about why it doesn't work
13:14 unmatched} And if I change :$<server> to server => ~$server in the original call, everything starts to work fine: the data is shipped to the socket and I the server disconnects me.
13:15 psch m: "foo" ~~ /$<foo>=.+/; say $<foo>.WHAT
13:16 camelia rakudo-moar 02b2e3: OUTPUT«(Match)␤»
13:16 psch m: "foo" ~~ /$<foo>=.+/; say (:$<foo>).key.WHAT
13:16 camelia rakudo-moar 02b2e3: OUTPUT«(Str)␤»
13:16 psch m: "foo" ~~ /$<foo>=.+/; say (:$<foo>).value.WHAT
13:16 camelia rakudo-moar 02b2e3: OUTPUT«(Match)␤»
13:16 unmatched} m: sub foo (:$server) { put $server; my %h = $server => "bar"; put %h; put %h{$server} }; "foo" ~~ /$<server>=.+/; put $<server>; foo :$<server>
13:16 camelia rakudo-moar 02b2e3: OUTPUT«foo␤foo␤foo  bar␤bar␤»
13:17 Fleurety joined #perl6
13:18 psch m: sub foo (:$server) { put $server.^name; my %h = $server => "bar"; put %h.keys; put %h{$server} }; "foo" ~~ /$<server>=.+/; put $<server>; foo :$<server>
13:18 camelia rakudo-moar 02b2e3: OUTPUT«foo␤Match␤foo␤bar␤»
13:18 psch m: sub foo (:$server) { put $server.^name; my %h = $server => "bar"; put %h.keys[0].WHAT; put %h{$server} }; "foo" ~~ /$<server>=.+/; put $<server>; foo :$<server>
13:18 camelia rakudo-moar 02b2e3: OUTPUT«foo␤Match␤Use of uninitialized value of type Str in string context␤Any of .^name, .perl, .gist, or .say can stringify undefined things, if needed.  in sub foo at <tmp> line 1␤␤bar␤»
13:18 unmatched} And if I use '*' for server (which triggers the quit on all servers), it seems to sorta work.
13:19 psch m: sub foo (Str() :$server) { put $server.^name; my %h = $server => "bar"; put %h.keys[0].WHAT; put %h{$server} }; "foo" ~~ /$<server>=.+/; put $<server>; foo :$<server>
13:19 camelia rakudo-moar 02b2e3: OUTPUT«foo␤Str␤Use of uninitialized value of type Str in string context␤Any of .^name, .perl, .gist, or .say can stringify undefined things, if needed.  in sub foo at <tmp> line 1␤␤bar␤»
13:19 psch m: sub foo (Str() :$server) { put $server.^name; my %h = $server => "bar"; put %h{$server} }; "foo" ~~ /$<server>=.+/; put $<server>; foo :$<server> # minus the uninit
13:19 camelia rakudo-moar 02b2e3: OUTPUT«foo␤Str␤bar␤»
13:22 harmil_wk Is there a good example out there of a way to define an operator that, itself, takes parameters? Is that even a thing? What I really want is the numbered arrow notation (e.g.  ↑4) but I can't figure out how that would work. I could define the op ↑4↑ but that's too static.
13:22 jkramer So with 2016.07 the example doesn't segfault anymore, but it's super-slow (up to ~3-5 seconds per request) and eats ~400M RAM and 100% CPU
13:23 unmatched} m: sub prefix:<↑> ($what) { say "You gave me $what" }; ↑4
13:23 camelia rakudo-moar 02b2e3: OUTPUT«You gave me 4␤»
13:23 harmil_wk Right, that's the normal arrow notation that I just defined in that module I linked yesterday, but the numbered arrow notation is another level deeper
13:23 harmil_wk e.g. 3 ↑4 3 is equivalent to 3 ↑↑↑↑ 3
13:24 unmatched} psch++ adding a Str() coercer to :$server here solved the issue, but I don't understand why. $server is just used as a key in a hash and my eval above indicates a Match as a key does Str coersion: https://github.com/zoffixznet/perl6-IRC-C​lient/blob/master/lib/IRC/Client.pm6#L328
13:25 lizmat harmil_wk: is the 4 in your example just an example, or is there an actual range of allowable values there ?
13:27 harmil_wk n ↑x m is n ↑ (n ↑ ... m) with x ↑s is how my example should be read. It's sometimes written with superscript notation on the ↑
13:27 unmatched} m: class Foo { has %.servers; method do-things (:$server) { %!servers{ ~$server } = 42; dd %!servers{ $server }; } }; "foo" ~~ /$<server>=.+/; Foo.new.do-things: :$<server>
13:27 camelia rakudo-moar 02b2e3: OUTPUT«Int %!servers = 42␤»
13:29 psch harmil_wk: i think that's macro territory
13:29 psch harmil_wk: your ↑ is a prefix that functions as an infix
13:29 psch or, well, maybe the other way around
13:30 harmil_wk psch: Sadly, I think you're right. It's "is parsed" kind of mummery
13:30 unmatched} Found the issue
13:31 unmatched} m: "foo" ~~ /$<server>=.+/; dd [ |$<server> ]
13:31 camelia rakudo-moar 61725d: OUTPUT«[]␤»
13:31 unmatched} I have a slip there, so the match was being slipped into nothing
13:31 psch m: "foo" ~~ /$<server>=.+/; dd [ |:$<server> ]
13:31 camelia rakudo-moar 61725d: OUTPUT«[:server(Match.new(ast => Any, list => (), hash => Map.new(()), orig => "foo", to => 3, from => 0))]␤»
13:31 psch unmatched}: you didn't have the named marker?
13:31 unmatched} No, it was after it was unpacked from a pair. On this line, when it's given to for(): https://github.com/zoffixznet/perl6-IRC-C​lient/blob/master/lib/IRC/Client.pm6#L333
13:32 psch unmatched}: ah, okay
13:32 unmatched} psch++ helping :)
13:32 harmil_wk Also my example was very wrong, but only mathematically, not in terms of syntax.
13:33 harmil_wk n ↑x m is x arrows between n and m which expands out geometrically in terms of the number of groups of x-1 arrows and so on.
13:34 harmil_wk https://en.wikipedia.org/wiki​/Knuth%27s_up-arrow_notation
13:34 DrForr Geometrically is a bit of an understatement.
13:34 harmil_wk Well, it's a geometric progression of the number of x-1 arrows. That only gives you a sense of how absurd it gets as you recurse.
13:35 DrForr IIRC 3↑↑3 is around 7 trillion, and 3↑↑↑3 won't fit in the known universe.
13:35 psch m: sub uparrow($a, $b, :$times = 1) { my $r = $a; for $times { $r **= $a for $b }; $r }; my &infix:<↑2> = &uparrow.assuming(*,*,:2times); say 2 ↑2 2 # this is syntactically how i'd do it
13:35 camelia rakudo-moar 61725d: OUTPUT«4␤»
13:35 psch the math seems wrong though :)
13:35 harmil_wk DrForr: from my tests is 3↑↑3, 7625597484987, "Two arrow power tower";
13:36 harmil_wk see https://github.com/ajs/perl6-Math-Arrow
13:36 harmil_wk "There's a module for that"
13:37 psch you can even stuff the declaration of ↑2 (and following ones) in a BEGIN for 2..$max-allowed { ... }
13:37 harmil_wk Yeah, I might do that for now
13:37 harmil_wk it's a fair stopgap
13:37 DrForr ~7.6 trillion, good memory :)
13:38 mst oh, wow, we have a module for 3^^3 ?
13:38 psch m: sub infix:<↑>($a, $b, :$times) { ($a + $b) * $times }; say 2 ↑ 3 :2times # alternatively this, maybe
13:38 camelia rakudo-moar 61725d: OUTPUT«10␤»
13:38 mst now I'm wondering if I need to include a torture versus dust specks joke in my ::EU talk
13:39 psch that removes you quite a bit from the classical math notation, but has the advantage that it doesn't declare lots of infix ops, and thus keeps compilation faster
13:39 psch although, if you have it in a module that's probably not a lot of an argument :)
13:39 DrForr The only use I know of for that is computing Graham's number.
13:39 harmil_wk Power towers are used in lots of other places.
13:39 harmil_wk Mostly in statistics and group theory and the like.
13:39 psch m: sub infix:<↑>($a, $b, :$times) { ($a + $b) * $times }; say 2 ↑ :2times 3 # i wonder...
13:39 camelia rakudo-moar 61725d: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Two terms in a row␤at <tmp>:1␤------> 3 { ($a + $b) * $times }; say 2 ↑ :2times7⏏5 3 # i wonder...␤    expecting any of:␤        infix␤        infix stopper␤        postfix␤        stat…»
13:40 mst DrForr: there's a famous-to-rationalists use in the sequences
13:40 psch yeah, that eats the pair as term for the infix
13:40 mst "is one person being tortured for a year better or worse than 3^^3 people getting dust specks in their eyes? ok, now how about 3^^^3?"
13:41 DrForr True, I can see combinatorics.
13:42 pmurias joined #perl6
13:46 Ven joined #perl6
13:46 DrForr It's just amusing because G(64) (which is a vastly mind-bogglingly huge impossible-to-understand number) is an upper limit to a complex problem involving high-dimensional hypercubes.
13:46 DrForr The actual solution is most likely 6.
13:47 psch "The lower bound of 6 was later improved to 11 by Geoff Exoo in 2003,[3]"
13:47 psch oh, wait, wrong line
13:48 psch 2 ↑3 6 is the best upper bound
13:48 psch https://en.wikipedia.org/wiki/Graham's_number
13:48 psch wikipedia, because i don't actually know math :)
13:49 psch i just remembered reading about it like half a year ago there, and that there was newer known bounds
13:51 DrForr Neat. The last I heard of it was a mention on a QI program where Alan Davies actually guessed the correct lower bound (at the time, 6) to the utter astonishment of ... well, most everyone involved.
13:52 mcmillhj joined #perl6
13:53 Actualeyes joined #perl6
13:54 lizmat .oO( now we finally now why it's Perl 6)
13:56 DrForr It *would* be interesting to figure out how to enumerate red-blue graphs over the N-hypercube, but ... must finish current project.
14:05 kurahaupo joined #perl6
14:05 hoelzro [Coke]: sorry, I missed your question yesterday; what do you mean?
14:09 lizmat afk&
14:11 avar p6doc-index says "run me with build to build index"
14:12 avar "p6doc-index build" yields: "Too many positionals passed; expected 1 argument but got 2"
14:14 unmatched} m: @*ARGS = 'build'; multi sub MAIN('build') { say "yo" }
14:14 camelia rakudo-moar 61725d: OUTPUT«yo␤»
14:14 unmatched} weird
14:14 unmatched} avar: what's the full error message?
14:15 unmatched} Also, what's your Perl 6's version and how did you get p6doc-index? (I can't reproduce in a repo clone)
14:16 avar Too many positionals passed; expected 1 argument but got 2
14:16 avar in sub MAIN at ...site/lib/auto/Six/Rakudo/share/perl6/site/res​ources/EE4609FA487A07A36F49F1143C10A166727B2069 line 55
14:16 avar in block <unit> at ...site/lib/auto/Six/Rakudo/share/perl6/site/res​ources/EE4609FA487A07A36F49F1143C10A166727B2069 line 73
14:16 avar It's Rakudo 2016.07
14:16 robertle joined #perl6
14:17 avar You get p6doc-index when you build rakudo star and "make install" it along with p6doc
14:18 robertle hi folks, I am having some issues with a grammar. I make a change to the grammar that seems legit, and now .parse() never returns. interestingly, it starts working again if i use Grammar::Tracer. are there known problems in that area? does this need reporting? how can I learn more?
14:19 unmatched} robertle: are you sure it's not just taking forever? Does it actually return when you use Grammar::Tracer?
14:19 psch robertle: https://github.com/jnthn/g​rammar-debugger/issues/13 exists, so there is precendence
14:19 timotimo you mean precedent?
14:19 psch ...yes
14:19 timotimo :)
14:19 robertle yes, it returns when i use teh tracer, quite quickly as well. it's a small grammar and a small input...
14:20 DrForr Putting up a gist would help.
14:20 sufrostico joined #perl6
14:21 pdcawley joined #perl6
14:21 ptolemarch joined #perl6
14:23 bob777 joined #perl6
14:25 mohae joined #perl6
14:25 robertle https://gist.github.com/anonymous​/132e16cdfca581533647990438495906
14:25 rindolf joined #perl6
14:28 skids joined #perl6
14:37 ugexe which install-dist.pl6
14:37 user9 joined #perl6
14:37 cibs joined #perl6
14:39 Actualeyes joined #perl6
14:42 bdmatatu joined #perl6
14:43 skids m: &infix:<->.WHAT.say; &infix:<R->.WHAT.say # that explains why .reduce was confusing me last night.
14:43 camelia rakudo-moar 61725d: OUTPUT«(Sub+{<anon|69393488​>}+{Precedence})␤(Block)␤»
14:43 skids m: &infix:<**>.prec.say; [2,3,4].reduce(&infix:<**>).base(16).say; (2**(3**4)).base(16).say
14:43 camelia rakudo-moar 61725d: OUTPUT«{assoc => right, prec => w=}␤200000000000000000000␤200000000000000000000␤»
14:44 unmatched} avar: just built the 2016.07 Rakudo Star on a debian box and can't reproduce. I've tested with just running `p6doc-index build`, not with Inline::Perl6 or anything like that. FWIW, the p6doc-index's repo is this: https://github.com/perl6/doc
14:44 skids So, synopsis are right anf docs need some work.
14:49 bdmatatu p6: my @x := (1 ... Inf).grep(* < 10);
14:49 camelia rakudo-moar 61725d: OUTPUT«(timeout)»
14:50 bdmatatu Shouldn't the above be lazy?
14:50 psch m: say (1...Inf).grep(* < 10).is-lazy
14:50 camelia rakudo-moar 61725d: OUTPUT«False␤»
14:51 bdmatatu p6: say (1 ... Inf).map(* + 1).is-lazy
14:51 camelia rakudo-moar 61725d: OUTPUT«True␤»
14:52 unmatched} m: my $x = (1...Inf).grep(* < 10)
14:52 camelia rakudo-moar 61725d: ( no output )
14:52 unmatched} m: my @x = lazy (1...Inf).grep(* < 10)
14:52 camelia rakudo-moar 61725d: ( no output )
14:52 bdmatatu So map is lazy but grep is not
14:53 timotimo once you hit 10, you're going to have a problem anyway
14:54 timotimo because then grep will go up to infinity to try to get you another value
14:54 user9 joined #perl6
14:54 bdmatatu p6: say (1 ... Inf).grep(*.is-prime).is-lazy;
14:54 camelia rakudo-moar 61725d: OUTPUT«False␤»
14:54 unmatched} m: (1 ... Inf).grep(*.is-prime)[0..10].say
14:54 camelia rakudo-moar 61725d: OUTPUT«(2 3 5 7 11 13 17 19 23 29 31)␤»
14:55 unmatched} I've no idea why .is-lazy returns False.
14:55 bdmatatu p6: my @x := (1 ... Inf).grep(*.is-prime);
14:55 unmatched} I don't think that works. This reminds me of an old code example
14:55 camelia rakudo-moar 61725d: OUTPUT«(timeout)»
14:55 unmatched} m: my $x = (1 ... Inf).grep(*.is-prime); say $x[0..10]
14:55 camelia rakudo-moar 61725d: OUTPUT«(2 3 5 7 11 13 17 19 23 29 31)␤»
14:56 unmatched} m: my @x = lazy (1 ... Inf).grep(*.is-prime); say @x[0..10]
14:56 camelia rakudo-moar 61725d: OUTPUT«(2 3 5 7 11 13 17 19 23 29 31)␤»
14:58 bdmatatu Okay, interesting...thanks
15:00 khw joined #perl6
15:04 dalek doc: 830c485 | (Steve Mynott)++ | doc/Language/faq.pod6:
15:04 dalek doc: compiler version to language version jnthn++
15:04 dalek doc: review: https://github.com/perl6/doc/commit/830c485ec2
15:05 user9 joined #perl6
15:07 mantovani joined #perl6
15:16 pdcawley joined #perl6
15:22 sena_kun joined #perl6
15:25 parabolize joined #perl6
15:34 mantovani joined #perl6
15:35 domidumont joined #perl6
15:35 cibs joined #perl6
15:38 Possum joined #perl6
15:45 mcmillhj joined #perl6
15:45 cdg joined #perl6
15:47 s34n_ joined #perl6
15:54 canopus joined #perl6
15:55 pdcawley joined #perl6
15:55 Possum joined #perl6
15:58 dalek doc: 8170492 | skids++ | doc/Type/List.pod6:
15:58 dalek doc: Streamline docs on .reduce(), and note it can be a "right fold" too.
15:58 dalek doc:
15:58 dalek doc:   Not crazy about that "Practical example", but left it.
15:58 dalek doc:   Also using &[op] when introducing [op] is still kinda suboptimal
15:58 dalek doc: review: https://github.com/perl6/doc/commit/8170492ee7
16:12 trnh joined #perl6
16:12 trnh joined #perl6
16:15 FROGGS joined #perl6
16:20 canopus joined #perl6
16:23 domidumont joined #perl6
16:36 AlexDaniel joined #perl6
16:36 canopus joined #perl6
16:38 _4d47 joined #perl6
16:38 NEveD joined #perl6
16:38 mantovani joined #perl6
16:43 _4d47 p6: constant A := Metamodel::ClassHOW.new_type( name => 'A' );
16:43 camelia rakudo-moar 61725d: ( no output )
16:44 timotimo oh, how do you build a 47-sided die?
16:48 _4d47 I have Method 'WHERE' not found for invocant of class 'A' in 2016.07.1 but not 2016.04
16:48 psch bisectable: constant A := Metamodel::ClassHOW.new_type( name => 'A' );
16:48 bisectable psch: On both starting points the exit code is 0 and the output is identical as well
16:48 bisectable psch: Output on both points:
16:48 timotimo oh, that's interesting. shouldn't everything have a method WHERE?
16:49 psch WHERE should get deftrap'd in methodop for everything, yeah
16:49 psch ...i hope bisectable is ok :|
16:50 timotimo of course if you try to .^find_method('WHERE'), that's probably going to give that kind of error?
16:50 psch m: Int.^can('WHERE')
16:50 camelia rakudo-moar 61725d: ( no output )
16:50 psch m: Int.^can('WHERE').say
16:50 camelia rakudo-moar 61725d: OUTPUT«(WHERE)␤»
16:50 canopus joined #perl6
16:50 psch huh, i'm pretty sure WHERE is in deftrap
16:50 timotimo i thought i saw some WHERE implementations in some places
16:50 psch ah, no it's not
16:50 psch it's in Mu, my mistake
16:51 timotimo so that means everything has it, except mabye things taken over from nqp? which ClassHOW might be?
16:51 psch well, it's *also* in deftrap
16:51 timotimo i ... don't actually know what deftrap means
16:52 psch my %deftrap := nqp::hash(
16:52 psch in Perl6/Grammar.nqp
16:52 timotimo right ... but what is its effect?
16:53 psch lines 3274 to 3301 are where %deftrap is checked
16:53 psch it throws e.g. Syntax::Confused when something is wrong
16:53 timotimo oh
16:53 kurahaupo joined #perl6
16:53 skids syntactically defined pseudo-methods, I would imagine.
16:54 psch m: say
16:54 camelia rakudo-moar 61725d: OUTPUT«5===SORRY!5===␤Argument to "say" seems to be malformed␤at <tmp>:1␤------> 3say7⏏5<EOL>␤Other potential difficulties:␤    Unsupported use of bare "say"; in Perl 6 please use .say if you meant $_, or use an explicit invocant or argument, …»
16:55 psch that's one of the error via %deftrap
16:55 psch +s
16:55 timotimo ah, neat
16:55 psch m: say[ ] # another
16:55 camelia rakudo-moar 61725d: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Use of non-subscript brackets after "say" where postfix is expected; please use whitespace before any arguments␤at <tmp>:1␤------> 3say7⏏5[ ] # another␤    expecting any of:␤        argument li…»
16:56 psch m: WHERE # and the last kind
16:56 camelia rakudo-moar 61725d: OUTPUT«5===SORRY!5===␤Argument to "WHERE" seems to be malformed␤at <tmp>:1␤------> 3WHERE7⏏5 # and the last kind␤Undeclared name:␤    WHERE used at line 1␤␤Other potential difficulties:␤    Function "WHERE" may not be called without argu…»
16:56 psch the "may not be called without argu...", not the "undeclared name"
16:57 psch the "malformed" bit is deftrap too
17:02 mcmillhj joined #perl6
17:04 canopus joined #perl6
17:11 jgrabber joined #perl6
17:13 jgrabber Hello! Is there some documentation on CompUnit::Repository::Installation.files($file, :$name!, :$auth, :$ver)? I cannot seem to find any and would like to know if it can be used here: https://github.com/perl6/gtk-simple/blob​/master/lib/GTK/Simple/NativeLib.pm6#L93
17:13 firstdayonthejob joined #perl6
17:15 canopus joined #perl6
17:15 unmatched} jgrabber: there are no docs I'm aware of, but it should be fine to use the public interface.
17:16 timotimo jgrabber: you should probably look at %*RESOURCES instead
17:16 timotimo or what it's called
17:20 TimToady unmatched}: if .grep can't propagate .is-lazy, it's just a bug
17:20 yoleaux 10:10Z <llfourn> TimToady: RT #128770 is relevant to your interests :)
17:20 synopsebot6 Link:  https://rt.perl.org/rt3//Publ​ic/Bug/Display.html?id=128770
17:20 unmatched} TimToady: I suspected so
17:21 jgrabber timotimo: Really sorry, but I haven't heard of %*RESOURCES and it's not listed here: https://docs.perl6.org/language/variables
17:21 jgrabber timotimo: and my google-fu is too weak to find any further docs on %*RESOURCES as well
17:22 AlexDaniel commit releases constant A := Metamodel::ClassHOW.new_type( name => 'A' );
17:22 committable AlexDaniel: ¦«2015.10,2015.11,2015.12,2016.02,2016.0​3,2016.04,2016.05,2016.06,2016.07,HEAD»:
17:22 unmatched} Ticket created: https://rt.perl.org/Ticket/Display.html?id=128773
17:22 TimToady m: say [\*](1 ... *).is-lazy;
17:22 camelia rakudo-moar 61725d: OUTPUT«True␤»
17:22 timotimo someone else in here ought to be able to point it out
17:22 timotimo it definitely does exist
17:22 timotimo under ... some name
17:23 TimToady we have the mechanism for propagating laziness, it's just .grep is failing to use it
17:23 unmatched} Yes, it's %*RESOURCES: https://docs.perl6.org/language/var​iables.html#Compile-time_variables
17:24 jgrabber timotimo: It's under compile-time variables, hidden in plain sight. Sorry
17:24 timotimo OK :)
17:24 timotimo well, compile-time usually has %? instead of %*
17:24 unmatched} The docs are sparse. IIRC, you place files in resource/ (or resources/) directory of your distro and you can get filehandles for them by using %?RESOURCES<some-dir-inside-resource><the-file>
17:24 unmatched} Yeah, it's %?RESOURCES sorry.
17:25 unmatched} jgrabber: basically something like that ^
17:25 timotimo for the gtk thing it's a bit interesting because we ought to download the dlls (if need be) while building, otherwise it won't get registered after-the-fact for %?RESOURCES, right?
17:25 unmatched} Hmm
17:25 unmatched} m: %?RESOURCES<foo><bar><ber>.say
17:25 camelia rakudo-moar 61725d: OUTPUT«Nil␤»
17:26 unmatched} No idea.
17:32 jgrabber timotimo: I really don't know if there's a way to download the dll's before rakudo populates %?RESOURCES - but using $*REPOS to construct IO::Path objects and work with them seems rather ugly to me
17:32 timotimo well, there's Build.pm
17:32 timotimo i think it ought to be able to work for this case
17:35 canopus joined #perl6
17:37 unmatched} m: https://gist.github.com/zoffixznet​/efa0438a67893ce4293bc2bc969b2611
17:37 camelia rakudo-moar 61725d: OUTPUT«Current nick is n1␤Current nick is n2␤Current nick is n3␤Current nick is n1␤Current nick is n2␤Current nick is n3␤Current nick is n1␤Current nick is n2␤Current nick is n3␤»
17:37 * unmatched} wonders what the golfed version of that code would look like.
17:37 unmatched} Rotate a variable through values in an array, sleeping for 3 seconds when restarting the rotation.
17:38 unmatched} (can't change the array)
17:38 mantovani joined #perl6
17:38 timotimo personally, i'd build a hash of "next"s
17:38 timotimo or is taht not allowed?
17:39 timotimo well, then you could just store the $idx, which you opted not to do i suppose?
17:39 * timotimo BBL
17:39 jmiven left #perl6
17:40 unmatched} Yeah, any extra state would require extra class attributes and I kinda want to avoid that.
17:40 unmatched} I guess it's not too bad as it is. I'm just wonder if there's some awesome Perl 6 method to greatly simplify things :)
17:41 s34n_ How do you use a reserved word as a method name? (ignoring the wisdom)
17:41 unmatched} s34n_: you just do and it should work.
17:42 unmatched} m: class Foo { method join { "blah" }; } say Foo.new.join
17:42 camelia rakudo-moar 61725d: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Strange text after block (missing semicolon or comma?)␤at <tmp>:1␤------> 3class Foo { method join { "blah" }; }7⏏5 say Foo.new.join␤    expecting any of:␤        infix␤        infix stopper…»
17:42 unmatched} m: class Foo { method join { "blah" }; }; say Foo.new.join
17:42 camelia rakudo-moar 61725d: OUTPUT«blah␤»
17:43 dvinciguerra joined #perl6
17:45 canopus joined #perl6
17:47 TimToady Perl 6 doesn't exactly have reserved words, at least not in the sense that they're reserved in every grammatical slot
17:48 mohae_ joined #perl6
17:48 TimToady m: xx 42
17:48 camelia rakudo-moar 61725d: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Undeclared routine:␤    xx used at line 1␤␤»
17:49 TimToady we slice and dice our syntactic namespaces so that doesn't occur, which is one of the reasons p6 is more extensible than most languages
18:02 setty1 joined #perl6
18:06 NEveD Hi there, I'm having trouble understanding this behavior:
18:06 NEveD > my FatRat $a = 0.1111111111111111111111111111111111111111.FatRat
18:06 NEveD 0.1111111111111111077357107952555149148649
18:06 NEveD Shouldn't be number preserved?
18:06 labster joined #perl6
18:07 unmatched} m: (0.111111111111111111111111​1111111111111111).WHAT.say
18:07 camelia rakudo-moar 61725d: OUTPUT«(Rat)␤»
18:07 unmatched} m: (0.1111111111111111111111111111111111111111).say
18:07 camelia rakudo-moar 61725d: OUTPUT«0.11111111111111109​38409751724975649267435␤»
18:08 * unmatched} doesn't know
18:08 canopus joined #perl6
18:08 timotimo hum, we don't properly turn that literal into a FatRat?
18:09 timotimo m: my FatRat $foo .= new(0, 9); say $foo
18:09 camelia rakudo-moar 61725d: OUTPUT«0␤»
18:09 timotimo m: my FatRat $foo .= new(1, 9); say $foo
18:09 camelia rakudo-moar 61725d: OUTPUT«0.111111␤»
18:09 timotimo m: my FatRat $foo .= new(1, 9); say $foo.perl
18:09 camelia rakudo-moar 61725d: OUTPUT«FatRat.new(1, 9)␤»
18:09 timotimo ...
18:09 timotimo i think that's how you get 0.1111111111111111111111111... ?
18:11 unmatched} How come I'm getting error "Cannot call private method 'send-cmd' on package IRC::Client because it does not trust IRC::Client::Message::Ping" I've added the trust here: https://github.com/zoffixznet/perl6-IRC-​Client/blob/master/lib/IRC/Client.pm6#L8
18:11 unmatched} And this is where the error is pointing to: https://github.com/zoffixznet/perl6-IRC-Clien​t/blob/master/lib/IRC/Client/Message.pm6#L31
18:11 cognominal joined #perl6
18:11 NEveD I discussed with coleague of mine Rat in Perl6 and that silly example came out... Since then I searched for an answer. I understand that for Rat it makes sense, but FatRat should be "arbitrary precision".
18:13 timotimo m: say FatRat.perl
18:13 camelia rakudo-moar 7ba6db: OUTPUT«FatRat␤»
18:13 mcmillhj joined #perl6
18:13 timotimo m: say FatRat.^roles.perl
18:13 camelia rakudo-moar 7ba6db: OUTPUT«(Rational[Int,Int], Real, Numeric)␤»
18:14 sufrostico joined #perl6
18:14 unmatched} NEveD: from what I can see, you get a Rat from that literal, before it ever gets to the .FatRat
18:14 timotimo m: FatRat.new(7910457091843570918277061509852748973​5908477814598170438905710987437091874327509817, 198023427859018425709871438975981024325798714​3570143890751043890760198374098714356897).say
18:14 camelia rakudo-moar 7ba6db: OUTPUT«0.0399470768553475031329763200729337237226​2079619695066518393344295200499293154109049358␤»
18:15 unmatched} Though, I'm unsure why it doesn't just get converted
18:15 unmatched} m: (0.1111111111111111111111111​111111111111111.FatRat).WHAT
18:15 camelia rakudo-moar 7ba6db: ( no output )
18:15 unmatched} m: (0.111111111111111111111111111​1111111111111.FatRat).WHAT.say
18:15 camelia rakudo-moar 7ba6db: OUTPUT«(FatRat)␤»
18:15 unmatched} m: (0.111111111111111111111111111​1111111111111.FatRat).nude.say
18:15 camelia rakudo-moar 7ba6db: OUTPUT«(101010101010101010101010101010101010101 909090909090909118526002584273060626432)␤»
18:15 unmatched} m: (0.111111111111111111111111​1111111111111111).nude.say
18:15 camelia rakudo-moar 7ba6db: OUTPUT«(101010101010101010101010101010101010101 909090909090909118526002584273060626432)␤»
18:15 unmatched} Oh.
18:16 unmatched} So yeah, basically you get an unpresice Rat from your literal and when you convert to to FatRat, you get the unpresice FatRat
18:17 unmatched} m: my FatRat $foo .= new(1, 9); say ($foo*3).nude
18:17 camelia rakudo-moar 7ba6db: OUTPUT«(1 3)␤»
18:17 unmatched} m: my FatRat $foo .= new(1, 9); say ($foo*3)
18:17 camelia rakudo-moar 7ba6db: OUTPUT«0.333333␤»
18:17 Tonik joined #perl6
18:19 unmatched} m: class Bar { ... }; class Foo { trusts Bar; method !bar { say "weeeee" } }; class Bar { method meow { my $o = Foo.new; $o!Foo::bar } }.new.meow;
18:19 camelia rakudo-moar 7ba6db: OUTPUT«weeeee␤»
18:19 unmatched} I wonder if it has to do with the modules being in separate files :/
18:20 unmatched} Screw it. I ain't got time for this... Public method it is.
18:20 TimToady this is related to Zef's .999999999999999999 bug
18:20 masak today's autopun spotting: https://twitter.com/qntm/status/758819780325289984
18:21 TimToady m: (<0.111111111111111111111111111​1111111111111>.FatRat).nude.say
18:21 camelia rakudo-moar 7ba6db: OUTPUT«(1111111111111111111111111111111111111111 10000000000000000000000000000000000000000)␤»
18:22 canopus joined #perl6
18:23 TimToady m: <0.111111111111111111111111​1111111111111111>.WHAT.say
18:23 camelia rakudo-moar 7ba6db: OUTPUT«(RatStr)␤»
18:23 TimToady arguably should be a NumStr instead, if the fraction overflows 64-bit denom
18:24 TimToady m: say .99999999999999999999999 > 1
18:24 camelia rakudo-moar 7ba6db: OUTPUT«True␤»
18:24 Guest71985 joined #perl6
18:24 TimToady m: say <.99999999999999999999999> > 1
18:24 camelia rakudo-moar 7ba6db: OUTPUT«False␤»
18:25 NEveD TimToady: I see... thank you for explanation. ;)
18:25 TimToady m: say <.99999999999999999999999>.Rat.WHAT
18:25 camelia rakudo-moar 7ba6db: OUTPUT«(Rat)␤»
18:25 TimToady and arguably that should return a Num
18:26 unmatched} m: say <.99999999999999999999999> == 1
18:26 camelia rakudo-moar 7ba6db: OUTPUT«False␤»
18:26 unmatched} m: say <.99999999999999999999999>.nude
18:26 camelia rakudo-moar 7ba6db: OUTPUT«(99999999999999999999999 100000000000000000000000)␤»
18:27 unmatched} Why a Num?
18:27 TimToady because that's what Rats degrade to as soon as their denominator is > 64bits
18:27 unmatched} m: say 2**63 > 100000000000000000000000
18:27 camelia rakudo-moar 7ba6db: OUTPUT«False␤»
18:28 unmatched} Ah
18:28 TimToady that's the compromise that prevents exponential slowdown that FatRat can give
18:28 TimToady and why we never just willy-nilly upgrade you to FatRat
18:29 TimToady we assume most reasonable arithmetic that needs exact rationals will have denominators of, say 100 or 1000 or so
18:29 TimToady (64 bits should be enough for anyone!)
18:30 mst ah, so if you don't want to go floating point, you need to ask for a FatRat up front?
18:30 ely-se joined #perl6
18:33 TimToady correct
18:34 TimToady but FatRat is "sticky" like Complex, so you really only need to inject one FatRat to taint the whole calculation :)
18:34 Guest71985 Is there an operation on FatRat that would be something like 'give me the closest FatRat that is less than X and denominator less than Y'?
18:34 TimToady wouldn't that be a round?
18:35 jonadab It would.
18:35 cpage_ joined #perl6
18:35 TimToady m: say &round.signature
18:35 camelia rakudo-moar 7ba6db: OUTPUT«($, $?)␤»
18:35 jonadab Though it's a special case because you don't necessarily know what you're rounding to the nearest of.
18:35 TimToady m: round 1,2,3
18:35 camelia rakudo-moar 7ba6db: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Calling round(Int, Int, Int) will never work with proto signature ($, $?)␤at <tmp>:1␤------> 3<BOL>7⏏5round 1,2,3␤»
18:35 TimToady would be nice to see the multi sigs there...
18:37 Guest71985 I haven't thought enough about rounding a Rat to say... If there's a smaller denominator than 'Y' that gives a smaller error, then it would be nice to get that instead.
18:39 jonadab You'd almost have to iterate over the possible denominators and calculate the closest match (i.e., round) and the resulting error for each.
18:39 TimToady m: (<0.1111111111111111111111111111111111111111>.​FatRat.round(0.0000000000000000001)).nude.say
18:39 camelia rakudo-moar 7ba6db: OUTPUT«(1111111111111111111 10000000000000000000)␤»
18:40 TimToady m: (<0.11111111111111111111111111111111111​11111>.FatRat.round(1/(2**63)).nude.say
18:40 camelia rakudo-moar 7ba6db: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Unable to parse expression in parenthesized expression; couldn't find final ')' ␤at <tmp>:1␤------> 111111>.FatRat.round(1/(2**63)).nude.say7⏏5<EOL>␤    expecting any of:␤        statement en…»
18:40 TimToady m: (<0.111111111111111111111111111111111111​1111>.FatRat.round(1/(2**63))).nude.say
18:40 camelia rakudo-moar 7ba6db: OUTPUT«(1024819115206086201 9223372036854775808)␤»
18:41 TimToady m: (<0.111111111111111111111111111111111111​1111>.FatRat.round(1/(2**64))).nude.say
18:41 camelia rakudo-moar 7ba6db: OUTPUT«Method 'nude' not found for invocant of class 'Num'␤  in block <unit> at <tmp> line 1␤␤»
18:41 TimToady m: (<0.1111111111111111111111111111111111111111>​.FatRat.round(FatRat.new(1,2**64))).nude.say
18:41 camelia rakudo-moar 7ba6db: OUTPUT«(1024819115206086201 9223372036854775808)␤»
18:42 TimToady m: (<0.1111111111111111111111111111111111111111>.F​atRat.round(FatRat.new(1,2**64))).nude.WHAT.say
18:42 camelia rakudo-moar 7ba6db: OUTPUT«(List)␤»
18:42 TimToady m: (<0.1111111111111111111111111111111111111111>​.FatRat.round(FatRat.new(1,2**64))).WHAT.say
18:42 camelia rakudo-moar 7ba6db: OUTPUT«(FatRat)␤»
18:42 TimToady m: (<0.1111111111111111111111111111111111111111​>.FatRat.round(FatRat.new(1,2**64))).Rat.say
18:42 camelia rakudo-moar 7ba6db: OUTPUT«0.11111111111111111112␤»
18:43 Guest71985 janadab: Maybe. There's probably some optimizations you could do with factorizing the denom, but if your denom is already a biggish/primish number then we might have a hard problem.
18:43 canopus joined #perl6
18:44 Guest71985 Oh, right. I came in here to ask some (possibly dumb) questions about using the NCurses package on OS X.
18:44 Guest71985 First question: where does "panda" install packages to?
18:46 mst disk
18:46 TimToady :P
18:46 TimToady probably install/share/perl6/
18:46 TimToady wherever p6's install is
18:46 Guest71985 Ha! Trick question: Macs are all SSD all the time!!!
18:47 TimToady how do you know the ssd chip isn't disk shaped?
18:47 japhb Guest71985: ISTR there is an algorithm for finding the smallest-denominator rational that approximates a real value to some precision.  In fact I think mjd blogged about it at some point
18:47 Guest71985 I installed with homebrew, so "which perl6" => "/usr/local/bin/perl6"
18:48 Guest71985 Oh, good point. I guess I'm just assuming it's square because chip manufacturers are cheap bastards.
18:50 dvinciguerra joined #perl6
18:50 timotimo i'd like an SSD in the shape of a cat
18:51 gfldex timotimo: be careful what you wish for. It may knock your data over and pee in your folders.
18:51 FROGGS heh
18:51 yoleaux 25 Jul 2016 03:04Z <Xliff> FROGGS: Finished with 07dtd in XML::LibXML, but this one was ugly. I will be going over some of the issues this week, and hope to get a PR to you around the start of Aug.
18:51 timotimo ohai FROGGS
18:51 FROGGS Xliff++
18:52 Guest71985 It would just end up sleeping on top of your laptop because it's warm..
18:54 girafe joined #perl6
18:55 Guest71985 Alright, time for the questions to get dumber. If "use NCurses;" works but fails with unable to load the .so file, does that mean that somewhere I should have a "NCurses.pm6" file? I can't 'find' one in either $HOME or /usr/local
18:55 canopus joined #perl6
18:56 gfldex Guest71985: module names are replaced by sha1s
18:57 unmatched} Guest71985: not necessarily. A module installation precomiles the module and it gets stored in a filename named with a hash
18:57 japhb Guest71985: Found the references.  You represent a number as a continued fraction (https://en.wikipedia.org/wiki/Continued_fraction), and each successive stage of the continued fraction can be converted back to a simple rational and represents the "best" approximation of the original number, in that no smaller denominator fraction is closer to the original number.
18:57 wamba joined #perl6
19:01 TimToady Guest71985: silly question, but do you have ncurses.so installed on your system?
19:01 geekosaur os x, so .dylib.
19:02 ARM9 it probably means you don't have the library installed, sudo apt install libncurses5-dev
19:02 FROGGS sometimes you even need the -dev-package, because that one will install an unversioned lib
19:02 Guest71985 Sort of? "panda install NCurses" passed its tests, and "locate ncurses" gives me "/usr/lib/libncurses.5.dylib" among other thigns.
19:02 geekosaur and /usr/lib/libncurses.dylib is in the OS base
19:04 Guest71985 In the NCurses source, it's loading "libncursesw.so.5", though, so that might be the problem.
19:09 timotimo ah, right. "wide" characters
19:10 Guest71985 The NCurses in GitHub has a fancy little "constant LIB = %*ENV<PERL6_NCURSES_LIB> || 'libncursesw.so.5';" mechanism, but setting that environment variable doesn't do anything so I'm not really sure what's up with that.
19:10 timotimo installing with panda will always grab the source from github
19:11 timotimo unless of course you're installing from a folder, like "panda install ."
19:11 geekosaur OS X supplies an ncurses that doesn't need a wide variant (this separate lib was made unnecessary in ncurses 5 although linux still ships a loader command file for backward compatibility)
19:11 Guest71985 No, I'm just doing "panda instal NCurses".
19:12 canopus joined #perl6
19:12 sno joined #perl6
19:15 mantovani joined #perl6
19:16 Guest71985 geekosaur: that's wonderfully arcane. So specifying both the wide variant and the version 5 is somewhat redundant?
19:17 geekosaur wide variant is unneeded on OS X, and on some rare linux distributions that discontinued the wide variant when upstream ncurses did instead of supplying a backward compatibility loader command file.
19:17 geekosaur the .5 *should* really be there but p6 folks love to assume that linux dev files always refer to the version they expect :/
19:17 cognominal joined #perl6
19:18 jameslenz joined #perl6
19:19 geekosaur in any case it should probably be checking the platform's shared object extension and trying both the -w and base versions in that order (and ideally testing the latter to see if it actually was built with unicode support)
19:20 Guest71985 I've downloaded the .pm6 file into ./lib. Is there an incantation that will make it load that one first?
19:20 ufobat joined #perl6
19:21 ufobat re
19:22 Guest71985 geekosaur: I'd like to make this more robust. Admittedly I'm writing perl6 as though it is perl5 with added gibberish: is there a better way to do that than having a list of variants and just doing a sort of calling ldopen on each one until it works?
19:27 sjoshi joined #perl6
19:28 geekosaur rrrh. there;s a dynamic var thst has in it somewhere what the shared object suffix is supposed to be... not finding
19:29 itaipu joined #perl6
19:31 canopus joined #perl6
19:35 unmatched} m: say $*VM.platform-library-name: "foo".IO
19:35 camelia rakudo-moar fc28b6: OUTPUT«"libfoo.so".IO␤»
19:39 Guest71985 Okay, syntactically what am I looking at here? That looks like a variable, but acts like a function?
19:40 moritz bascially everything is an object on which you can invoke methods
19:41 unmatched} Guest71985: no $*VM is a dynamic variable that has the VM object and you call the .platform-library-name method on it
19:41 unmatched} Can be written like this too: $*VM.platform-library-name("foo".IO)
19:41 unmatched} And .IO on "foo" is also a method call to convert a Str to IO::Path
19:43 Guest71985 Okay, knowing that $*VM is an object helps. The "blah: blah" as an alternate method call syntax seems Smalltalky. Maybe that's the idea?
19:43 moritz we got our ideas from everywhere :-)
19:43 spider-mario joined #perl6
19:44 unmatched} :D
19:44 Actualeyes left #perl6
19:44 Guest71985 The secret key to literacy is good plagarism.
19:48 arnsholt See also: Tom Lehrer
19:49 prammer joined #perl6
19:49 tbrowder emacs users: I just added new indices to my fork of perl6-mode. not perfect but it shows var names with sigil, classes, and subs (all types including proto); feature requests accepted (syohex is helping with good criticism); my additions are in my forks's branch "my-branch"
19:55 rightfold joined #perl6
19:55 Guest71985 Interestingly, the test in NCurses just tests that the package compiles. The library loading is deferred until the first call, which never happens in the "test". :(
19:55 yqt joined #perl6
19:56 rightfold left #perl6
19:57 canopus joined #perl6
20:01 TimToady actually, the "indirect object" syntax is mostly from English, give $dog: $bone
20:03 b2gills m: say (1,2,3).reduce: sub ($a,$b) is assoc<right> {"<$a $b>"} # right fold
20:03 camelia rakudo-moar fc28b6: OUTPUT«Use of uninitialized value % of type Any in string context␤Any of .^name, .perl, .gist, or .say can stringify undefined things, if needed.  in block <unit> at <tmp> line 1␤<1 <2 3>>␤»
20:06 [Coke] ok, does anything see something dumb here? I'm getting what I think are false positives on this test: https://gist.github.com/coke/e1​397d29717011ea078bfc3a4a48e060
20:09 AndyBotwin joined #perl6
20:11 * [Coke] rips out a bunch of the initial boilerplate...
20:11 canopus joined #perl6
20:11 hoelzro [Coke]: it looks pretty good to me
20:11 [Coke] (oh, right, I needed the len for the plan)
20:11 hoelzro I think you can simply the population of @files with my @files = qx<git ls-files doc>.lines, but that isn't a fix
20:11 hoelzro *simplify
20:11 [Coke] oh, I wonder if <ws> is killing me.
20:12 [Coke] yah, that's better, danke.
20:12 hoelzro have you checked to make sure that match is matching?
20:12 hoelzro <ws> only comes in for rules, doesn't it?
20:12 mantovani joined #perl6
20:14 [Coke] ahahahahha, I'm an idiot.
20:14 hoelzro did you figure it out?
20:14 [Coke] there's a third Perl 5 in that file I missed.
20:14 [Coke] I fixed two, but the file still failed. :)
20:15 hoelzro ahhh
20:16 [Coke] https://github.com/perl6/doc/blob/m​aster/doc/Type/X/Syntax/P5.pod6#L18 - I'm assuming we shouldn't be forcing a nbsp there;
20:16 [Coke] I am tempted to skip any indented lines.
20:18 TEttinger joined #perl6
20:19 pmqs joined #perl6
20:20 dvinciguerra joined #perl6
20:23 Anop joined #perl6
20:23 rmmm joined #perl6
20:24 Anop joined #perl6
20:25 Anop join
20:25 Anop help
20:25 Anop HELP
20:25 timotimo hello anop
20:25 timotimo please be a little more patient
20:25 AlexDaniel joined #perl6
20:25 timotimo before we can help you, we need to know what you need help with
20:26 masak Anop: is there anything we can do for you?
20:26 gfldex my guess would be he needs help with finding / on his keyboarrd/phone :->
20:26 Anop I know perl5 but can i jump to perl6
20:27 Anop i am bioinformatics programmer
20:28 Anop so perl6 would better option or not ?
20:28 Anop for me
20:28 AlexDaniel Anop: it depends
20:28 gfldex Anop: it will be at some point
20:29 ARM9 what would make it not a better option in your opinion?
20:29 TimToady there is less support so far in the ecosystem, but you can get at the Perl 5 CPAN modules from Perl 6 if you need them
20:29 go|dfish joined #perl6
20:29 TimToady it's also possible to get at python modules
20:30 TimToady Perl 6 will be more expressive than Perl 5, but will likely run slower until our optimizer gets better
20:31 * masak .oO( how can we get faster quicker )
20:32 arnsholt How can we get more of our code paths to run through BLAS and LAPACK?
20:32 arnsholt Which seems to be the general theme when optimizing stuff =)
20:35 timotimo get faster faster!
20:36 masak while we're at it, we should try to get slower slower
20:36 masak preferably not at all
20:37 arnsholt Possibly even negatively?
20:38 * masak .oO( we have no idea how Perl 6 got so fast -- we just know that we applied the opposite of a lot of common performance mistakes )
20:38 jnthn So get faster faster, we just need an optimizer optimizer. :)
20:39 Anop exit
20:39 masak Anop: \o
20:39 Anop \o
20:39 jnthn *To
20:39 * jnthn apparently needs strongly typed typing too..
20:40 masak jnthn: maybe if we use tachyons somehow, we can use a future version of the optimizer to make the current version faster
20:41 * masak .oO( <TheDamian> ...will have been *being* optimized... )
20:44 ribasushi joined #perl6
20:47 harmil_wk Okay, I feel dumb. I was calling the parenthetical meta-ops (e.g. "(-)") the "texas" operators. I didn't know that we used that name for the ascii equivs of unicode ops in general!
20:47 harmil_wk Boy did I misread that doc!
20:48 masak harmil_wk: yes, the "Texas" operators refer to all ASCII equivalents of Unicode ops.
20:49 masak ("Texas" because... they're generally bigger, just like everything is in Texas)
20:49 masak 'night, #perl6
20:50 harmil_wk masak: thanks, night!
20:50 harmil_wk So the Unicode versions are the Monaco operators?
20:50 sufrostico joined #perl6
20:52 dalek doc: eeb2f7c | coke++ | t/perl-nbsp.t:
20:52 dalek doc: Add a failing xtest to verify no break spaces.
20:52 dalek doc: review: https://github.com/perl6/doc/commit/eeb2f7c95e
20:56 andrewb joined #perl6
21:00 AlexDaniel [Coke]++
21:00 canopus joined #perl6
21:00 jgrabber joined #perl6
21:03 [Coke] I was going to start making it pass, but am not in a position to make sure it renders right.
21:03 [Coke] btw, in vim, Control-K <space> <space> gives you a nbsp.
21:03 [Coke] - offline
21:07 sena_kun joined #perl6
21:41 pmqs joined #perl6
21:55 cpage_ joined #perl6
21:58 trnh joined #perl6
22:00 Sgeo joined #perl6
22:13 MahBot joined #perl6
22:23 b2gills harmil_wk: generally we refer to Unicode version of the operators as being French
22:25 canopus joined #perl6
22:27 TEttinger b2gills: like portion sizes at french restaurants compared to at texas restaurants?
22:28 b2gills Mostly because both are seen as fancy, by Americans at least
22:28 TEttinger "a sliver of the finest steak tartare" "this steak is the size of a toddler and it tastes comparable to their smell"
22:48 dainis joined #perl6
22:53 dalek ecosystem: eb7ff47 | (Aaron Sherman)++ | META.list:
22:53 dalek ecosystem: Add Math::Arrow to ecosystem
22:53 dalek ecosystem:
22:53 dalek ecosystem: See https://github.com/ajs/perl6-Math-Arrow
22:53 dalek ecosystem: review: https://github.com/perl6/e​cosystem/commit/eb7ff4722b
22:53 dalek ecosystem: 384871b | (Zoffix Znet)++ | META.list:
22:53 dalek ecosystem: Merge pull request #232 from ajs/master
22:53 dalek ecosystem:
22:53 dalek ecosystem: Add Math::Arrow to ecosystem
22:53 dalek ecosystem: review: https://github.com/perl6/e​cosystem/commit/384871bc36
23:23 Zoffix .tell AlexDaniel IRC::Client's rewrite is done. http://perl6.party/post/IRC-Clien​t-Perl-6-Multi-Server-IRC-Module
23:23 yoleaux Zoffix: I'll pass your message to AlexDaniel.
23:24 Zoffix .tell moritz I recall you being interested in a P6 IRC Client. IRC::Client should do the trick. It's poorly tested yet, but the API has been finalized: https://github.com/zoffixzne​t/perl6-IRC-Client#synopsis
23:24 yoleaux Zoffix: I'll pass your message to moritz.
23:25 Zoffix 🎺🎺🎺 New blog post "IRC::Client: Perl 6 Multi-Server IRC (or Awesome Async Interfaces with Perl 6)": http://perl6.party/post/IRC-Clien​t-Perl-6-Multi-Server-IRC-Module
23:31 timotimo sounds like i want to port synopsebot to this?
23:33 Zoffix use IRC::Client; .run with IRC::Client.new: :nick<synopsebot> :host<irc.freenode.net> :channels<#perl6 #perl6-dev> :debug :plugins(class { method irc-privmsg-channel ($ where /<< 'RT#' $<id>=\d+ >>/) { "https://rt.perl.org/Ticket/Display.html?id=$<id>" } })
23:33 Zoffix Ported :P
23:38 timotimo that's not all it does, though
23:38 timotimo S99:LTA
23:38 synopsebot6 Link: http://design.perl6.org/S99.html#LTA
23:38 Zoffix S99:blargdsasdas
23:38 synopsebot6 Link: http://design.perl6.org/S99.html#blargdsasdas
23:39 Zoffix use IRC::Client; .run with IRC::Client.new: :nick<synopsebot> :host<irc.freenode.net> :channels<#perl6 #perl6-dev> :debug :plugins(class { multi method irc-privmsg-channel ($ where /<< 'RT#' $<id>=\d+ >>/) { "https://rt.perl.org/Ticket/Display.html?id=$<id>" }; multi method irc-privmsg-channel ($ where /<< 'S99:' $<term>=\S+ >>/) { "Link: http://design.perl6.org/S99.html#$<term>" } })
23:39 Zoffix Ported :P
23:39 Zoffix (well, you get the idea :P)
23:40 timotimo does the irc client exit when it loses connectivity to a server, as identified by not getting a ping in a given time period?
23:42 Zoffix Um, the RFC doesn't say anything about clients waiting for pings. If the server doesn't get anything from the client within X amount of time, it pings it and drops it if it doesn't get a response.
23:43 Zoffix But if the connection drops, IRC::Client will reconnect: https://github.com/zoffixznet/perl6-IRC-Client​/blob/master/docs/04-big-picture-behaviour.md
23:43 timotimo right. but synopsebot sometimes drops off the 'net without exiting the process so it can be re-started
23:43 Zoffix ¯\_(ツ)_/¯ if I notice any problems with IRC::Client on that area, I'll make it drop and reconnect, I guess.
23:44 timotimo how do you mean?
23:45 Zoffix I mean that it's not part of the protocol and I've not had such issues. If I will, I'll think about how to fix it, but right now there's nothing to fix, regardless of whether synopsebot hangs or whatever it does.
23:45 timotimo hm
23:46 timotimo well, in theory, the socket should be closed anyway, and that should exit the program
23:46 timotimo i'm not entirely sure why the current implementation didn't do that
23:46 Zoffix ¯\_(ツ)_/¯
23:46 timotimo i'm willing to guess your current implementation probably handles that
23:47 Zoffix Yeah, when the socket closes, it automatically reconnects after a short delay, unless `.quit` has been called on that server.
23:49 timotimo ah, neat.
23:49 TEttinger ¯¯\\__((ツツ))__//¯¯
23:50 Zoffix :)
23:50 TEttinger ¯¯¯\\\___(((ツツツ)))___///¯¯¯
23:51 TEttinger D:
23:51 geekosaur certain server failures (likely the ones that show up as lots of grouped ping timeouts instead of the ones that show as netsplits) can leave you with a socket that appears open but the other end has disappeared
23:51 timotimo wouldn't the OS at some point close the socket for you?
23:52 geekosaur tcp keepalives are terrible at this, mainly because they're mostly terrible. suggest you find some dummy operation you can use to ping the server periodically and discon/recon if it's missed
23:53 geekosaur if there's pending data to transmit, tcp will detect an endpoint going away. if not, there's nothing to check except keepalives, which are often disabled because they trigger only over *hours*
23:53 timotimo ah, right
23:53 geekosaur (multiple retries w/backoff)
23:54 geekosaur which is why ssh implemented its own keepalives in its protocol, and why various other long lived connections likewise have some way to do keepalives instead of relying on the tcp stack
23:54 timotimo right
23:55 timotimo IRC servers also do ping/pong

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

Perl 6 | Reference Documentation | Rakudo