IRCloggy #perl6 2018-06-21

Logs Search ←Prev date Next date→ Channels Documentation

Provider of IRC logs since 2005.
WARNING: As Freenode became unjoinable and lost all warnings in topics, we cannot log channels on Freenode anymore.

2018-06-21

Zoffix This is the bench I used that showed normal lookup 5x faster: https://gist.github.com/zoffixznet/c46533e1a54ba6eb242ed9b12c72f71300:00
And this is the diff of the changes: https://gist.github.com/zoffixznet/7e45adca9cb04d5aec3b7a711b509abf00:01
MasterDuke left00:02
timotimo did you happen to look at how often DYNAMIC gets invoked with and without your change?00:02
jnthn nqp::ctx forces the frame to the heap so we can reference it (those these days MoarVM also keeps stats on which frames nearly always end up getting promoted there, and then just allocates them there in the first place to save the copy).00:03
nqp::ctx also is not possible to inline00:03
(Because there's no frame for it to refer to if the frame is inlined)00:03
Zoffix ahh00:03
timotimo should we introduce a variant of getlexdyn that starts in the current frame rather than the caller's?00:04
jnthn Hm, I'd forgotten that even did start at the caller :)00:04
Zoffix tries with nqp::getlexdyn to see if that boosts the `print` stuff00:04
timotimo wait, what about getlexreldyn?00:04
oh, that's what you had00:05
jnthn I figured if you're in the current scope, though, then you can just emit a lexical lookup00:05
timotimo is that proper? doesn't that perhaps give outers too high a priority, so to speak?00:05
jnthn I meant strictly declared the current scope :)00:06
That is, it's in the .symbol hash of $*W.cur_lexpad00:06
timotimo ah, that'd be a compile-time decision, even00:06
jnthn *decalred in00:06
Yes, exactly00:07
timotimo which would make dynamic variables inside the scope they're declared in cheaper00:07
well, it wouldn't have to look far in the dynamic lookup either, but still00:07
jnthn Right, which is useful because one usually touches them at least once there to initialize them.00:07
timotimo aye00:07
jnthn Sure, but it still has to do that lookup by name00:07
timotimo oh, true00:07
jnthn Whereas a lexical compiles into an array indexing operation00:07
And so can JIT into just an instruction or two00:08
Zoffix well, even with getlexdyn it's slower. By less, but slower. 0m3.301s on HEAD vs 0m3.547s with my changes00:09
Damn, I made ZofBot get ready the medal for nothing :)00:09
At least I learned a bunch of stuff from this.00:10
timotimo will you try the lexical lookup thing before you scrap the idea?00:11
Zoffix timotimo: what do you mean?00:11
what lexical lookup thing?00:11
timotimo when compiling the DYNAMIC call, first check if the current $!symbols has the $*FOO as a lexical00:12
and if it does, just use QAST::Var.new with '$*FOO'00:12
otherwise emit the same code you have now00:12
lizmat joined00:12
timotimo that way you don't need to do the nqp::ctx00:12
because now you don't have to do dynamic lookup in the current frame, the caller's is an acceptable starting point00:12
Kaiepi m: role Foo { proto method gist(| --> Str) { "SB {*} SE" }; multi method gist(--> Str) { callwith("NAWS") } }; Foo.new.gist00:13
camelia rakudo-moar a167e6cca: ( no output )00:13
Kaiepi m: role Foo { proto method gist(| --> Str) { "SB {*} SE" }; multi method gist(--> Str) { callwith("NAWS") } }; say Foo.new.gist00:13
camelia rakudo-moar a167e6cca: OUTPUT: «SB * SE␤»00:13
Zoffix timotimo: so the QAST::Var would be just the only thing there for $*OUT?00:13
Kaiepi is there a way to get it to output "SB NAWS SE"?00:13
Zoffix like when would it be lexical?00:13
timotimo that's right00:13
Kaiepi: {{*}} probably00:14
maybe { {*} }00:14
Zoffix m: role Foo { proto method gist(| --> Str) { "SB { {*} } SE" }; multi method gist(--> Str) { callwith("NAWS") } }; say Foo.new.gist00:15
camelia rakudo-moar a167e6cca: OUTPUT: «Use of Nil in string context␤SB SE␤ in method gist at <tmp> line 1␤»00:15
timotimo aaw00:15
Zoffix m: role Foo { proto method gist(| --> Str) { "SB $({*}) SE" }; multi method gist(--> Str) { callwith("NAWS") } }; say Foo.new.gist00:15
camelia rakudo-moar a167e6cca: OUTPUT: «Use of Nil in string context␤SB SE␤ in method gist at <tmp> line 1␤»00:15
timotimo m: role Foo { proto method gist(| --> Str) { "SB " ~ {*} ~ SE" }; multi method gist(--> Str) { callwith("NAWS") } }; say Foo.new.gist00:15
camelia rakudo-moar a167e6cca: OUTPUT: «=== SORRY!=== Error while compiling <tmp>␤Two terms in a row␤at <tmp>:1␤------> thod gist(| --> Str) { "SB " ~ {*} ~ SE " }; multi method gist(--> Str) { callwi ␤ expecting any of:␤ infix␤ infix stopper␤ …»00:15
timotimo m: role Foo { proto method gist(| --> Str) { "SB " ~ {*} ~ " SE" }; multi method gist(--> Str) { callwith("NAWS") } }; say Foo.new.gist00:15
camelia rakudo-moar a167e6cca: OUTPUT: «Use of Nil in string context␤SB SE␤ in method gist at <tmp> line 1␤»00:15
timotimo oh00:16
i don't think you can callwith the "original" gist like that, as you've actually overridden the proto00:16
Kaiepi m: role Foo { proto method gist(|$ --> Str) { "SB " ~ {$} ~ " SE" }; multi method gist(--> Str) { callwith("NAWS") } }; say Foo.new.gist00:16
camelia rakudo-moar a167e6cca: OUTPUT: «=== SORRY!=== Error while compiling <tmp>␤Obsolete use of | or \ with sigil on param $␤at <tmp>:1␤------> role Foo { proto method gist(|$ --> Str) { "SB " ~ {$} ~ " SE" }; multi ␤ expecting any of:␤ formal parameter…»00:16
timotimo the candidate from Any isn't available to that particular dispatcher any more00:16
m: role Foo { proto method gist(| --> Str) { "SB " ~ {*} ~ " SE" }; multi method gist(--> Str) { self::Any.gist("NAWS") } }; say Foo.new.gist00:16
camelia rakudo-moar a167e6cca: OUTPUT: «Could not find symbol '&Any'␤ in method gist at <tmp> line 1␤ in method gist at <tmp> line 1␤ in block <unit> at <tmp> line 1␤␤»00:16
Kaiepi m: role Foo { proto method gist(|$a --> Str) { "SB " ~ {$a} ~ " SE" }; multi method gist(--> Str) { callwith("NAWS") } }; say Foo.new.gist00:17
camelia rakudo-moar a167e6cca: OUTPUT: «=== SORRY!=== Error while compiling <tmp>␤Obsolete use of | or \ with sigil on param $a␤at <tmp>:1␤------> role Foo { proto method gist(|$a --> Str) { "SB " ~ {$a} ~ " SE" }; mult ␤ expecting any of:␤ shape declaratio…»00:17
Zoffix It's in Mu, but it don't take any args00:17
timotimo oh00:17
jnthn Zoffix: Dynamic variables are stored in the lexpad of the block that declares them.00:17
Kaiepi m: role Foo { proto method gist(|a --> Str) { "SB " ~ {a} ~ " SE" }; multi method gist(--> Str) { callwith("NAWS") } }; say Foo.new.gist00:17
camelia rakudo-moar a167e6cca: OUTPUT: «Block object coerced to string (please use .gist or .perl to do that)␤SB SE␤ in method gist at <tmp> line 1␤»00:17
Kaiepi m: role Foo { proto method gist($a --> Str) { "SB " ~ {$a} ~ " SE" }; multi method gist(--> Str) { callwith("NAWS") } }; say Foo.new.gist00:17
camelia rakudo-moar a167e6cca: OUTPUT: «Too few positionals passed; expected 2 arguments but got 1␤ in method gist at <tmp> line 1␤ in block <unit> at <tmp> line 1␤␤»00:17
Kaiepi m: role Foo { proto method gist($a --> Str) { "SB " ~ {$a} ~ " SE" }; multi method gist(--> Str) { callwith(self, "NAWS") } }; say Foo.new.gist00:17
camelia rakudo-moar a167e6cca: OUTPUT: «Too few positionals passed; expected 2 arguments but got 1␤ in method gist at <tmp> line 1␤ in block <unit> at <tmp> line 1␤␤»00:17
jnthn Zoffix: So if you're in the declaring scope then a lexical lookup and a dynamic lookup are equivalent, since there's no searching to do.00:17
Zoffix OK, I'll give that a go. Thanks.00:18
Kaiepi m: role Foo { proto method gist(*@a --> Str) { "SB " ~ {@a[1]} ~ " SE" }; multi method gist(--> Str) { callwith(self, "NAWS") } }; say Foo.new.gist00:18
camelia rakudo-moar a167e6cca: OUTPUT: «Block object coerced to string (please use .gist or .perl to do that)␤SB SE␤ in method gist at <tmp> line 1␤»00:18
jnthn Kaiepi: callwith has no candidates to call, because you only declared one (and the proto hides all inherited ones)00:18
Kaiepi oh00:18
m: role Foo { proto method gist(--> Str) {*}; multi method gist(--> Str) { "SE {nextsame} SE" }; multi method gist(--> Str) { "NAWS" } }; say Foo.new.gist00:19
camelia rakudo-moar a167e6cca: OUTPUT: «Nil␤»00:19
Kaiepi m: role Foo { proto method gist(--> Str) {*}; multi method gist(--> Str) { "SE {callsame} SE" }; multi method gist(--> Str) { "NAWS" } }; say Foo.new.gist00:19
camelia rakudo-moar a167e6cca: OUTPUT: «Use of Nil in string context␤SE SE␤ in method gist at <tmp> line 1␤»00:19
jnthn nextsame is walking the exact same dispatch list00:19
Zoffix m: role Foo { proto method gist(| --> Str) { "SB " ~ {*} ~ " SE" }; multi method gist(\s) { s }; multi method gist(--> Str) { samewith "NAWS" } }; say Foo.new.gist00:19
camelia rakudo-moar a167e6cca: OUTPUT: «SB SB NAWS SE SE␤»00:19
timotimo why did my self::Any.gist not work?00:19
i thought that's how you call a method from a parent class on yourself00:20
jnthn timotimo: Because the syntax is self.Any::gist :)00:20
Zoffix timotimo: it's in Mu00:20
oh00:20
timotimo ah!00:20
Zoffix m: 42.Any::gist00:20
camelia rakudo-moar a167e6cca: ( no output )00:20
Zoffix TIL00:20
timotimo a haven't had a use for this yet i believe?00:20
jnthn And Any is just the starting point of the lookup00:20
So it'll find the Mu one also :)00:20
Zoffix Cool00:20
I thought it had to be exact00:20
timotimo no, Any.00:20
:P00:21
Zoffix m: class Foo {}; class Bar is Foo {}; dd Bar.Foo::gist00:21
camelia rakudo-moar a167e6cca: OUTPUT: «"(Bar)"␤»00:21
Zoffix awesome00:21
jnthn Also, this form of call got about 12x faster recently. :-)00:21
Zoffix m: role Foo { proto method gist(|c --> Str) { c ?? "SB " ~ {*} ~ " SE" !! {*} }; multi method gist(\s) { s }; multi method gist(--> Str) { samewith "NAWS" } }; say Foo.new.gist00:21
camelia rakudo-moar a167e6cca: OUTPUT: «SB NAWS SE␤»00:21
Zoffix \o/00:21
jnthn++00:21
markoong left00:22
Zoffix hm, I think lexical thing for dynvars won't work, would it00:23
m: my $*FOO = 42; sub bar { say $*FOO }; { my $*FOO = 100; bar }00:23
camelia rakudo-moar a167e6cca: OUTPUT: «100␤»00:23
Zoffix like, wouldn't this start giving 42?00:23
timotimo we have to be careful to only look in the exact lexpad of the current sub00:24
not in any of the outers00:24
jnthn Zoffix: Yes, this only works in the case where the symbol is declared precisely in this scope00:24
Zoffix aw :( that would help only a tiny amount of cases then00:24
jnthn Zoffix: I think if you can check by something like $*W.cur_lexpad.symbol('$*FOO') truthy00:24
Yes, but every little helps :)00:25
Zoffix Yeah, I s'pose00:25
timotimo it helps exactly in those cases where getlexdyn would miss it because it starts at the caller rather than the current frame00:25
jnthn Right, which I thought was the aim :)00:25
Zoffix timotimo: no, but the caller is the caller of &DYNAMIC00:25
timotimo that's my idea of it anyway00:25
Zoffix which is the current scope of where $*FOO is defined00:25
timotimo yeah, but don't you generate the lookup op directly in the caller of DYNAMIC now?00:26
Zoffix Right00:26
japhb As timotimo says, isn't the point that checking for this one case and separating it out allows you to use a better opt for many other cases?00:26
Zoffix But getlexdyn wouldn't miss it00:26
timotimo sorry, getdynlex00:26
the one that doesn't have nqp::ctx in it00:26
because nqp::ctx is the one that kills your performance00:27
jnthn m: use nqp; sub foo() { my $*foo = 42; say nqp::getdynlex('$*foo') }; foo00:27
camelia rakudo-moar a167e6cca: OUTPUT: «===SORRY!===␤No registered operation handler for 'getdynlex'␤»00:27
Zoffix timotimo: no, but I already tried the one without nqp::ctx in it, it's still slow00:27
it's getlexdyn00:27
jnthn m: use nqp; sub foo() { my $*foo = 42; say nqp::getlexdyn('$*foo') }; foo00:27
camelia rakudo-moar a167e6cca: OUTPUT: «(Mu)␤»00:27
jnthn Notice how it fails to find $*foo due to what timotimo said00:27
Hm, I'm surprised it's as slow as taking the nqp::ctx00:28
ooc, how were you deciding whether to fall back to calling DYNAMIC?00:28
timotimo i expect with ifnull00:28
jnthn Yeah, that'd be the best way, I think. Was checking in case it was another way :)00:28
Zoffix It's not as slow, the diff with getlexreldyn(ctx) was ~.8s and with getlexreldyn was ~.4s00:28
slower00:28
gabiruh left00:29
jnthn That surprises me00:29
Zoffix jnthn: this is what I'm genning: https://gist.github.com/zoffixznet/7e45adca9cb04d5aec3b7a711b509abf#file-diff-diff-L18-L21 and I tried changing that getlexreldyn(ctx) to just getlexdyn and (it failed to install modules, since it can't find current-scoped vars anymore), that was still slow00:30
jnthn Not saying you're measuring wrong, just that it doesn't mesh with what I know about how those two work.00:30
Zoffix I hope I'm measuring wrong or doign something wrong :D00:30
was measuring with time perl6 -e '(print ".") xx 1_000_000' > /dev/null00:31
timotimo hopefully there's some hidden factor we can smoke out00:31
Zoffix jnthn: what timotimo proposed is that getting nqp::ifnull(getlexdyn,callstatic &DYNAMIC) instead of just callstatic &DYNAMIC was making something else important to get too large to get inlined00:32
s:1st/getting/genning/;00:32
zachk left00:33
timotimo jnthn is also about to do another round of tuning for "what should the inline limit be"00:33
jnthn One possible hypothesis: we can't JIT one of these ops yet, and so including it prevents us from JITting the enclosing code, which also blocks JIT of anything it's inlined in to00:35
Another one: we can't JIT something that's in DYNAMIC, but we brought it below the inlining limit, so now it's inlined and also blocks JIT of whatever it's inlined in to00:36
MVM_JIT_LOG=jit_log perl6 -e '...'00:36
grep BAIL jit_log00:36
Will potentially be informative00:36
timotimo my cmdline is usually grep "Constructing\|BAIL\|Entering"00:37
so you'll see what exact frame is getting the bail00:37
Zoffix BAIL: op <atkey_u>00:37
jnthn ah, cute :)00:37
Zoffix BAIL: op <getlexreldyn>00:37
jnthn aha...that second one would be the guilty party :)00:37
Zoffix Don't think it's my getlexreldyn, 'cause my code's using getlexdyn00:38
jnthn It's used in DYNAMIC though, I think00:38
MasterDuke joined00:38
Zoffix $ ./perl6 -e 'my $*x; say $*x'00:38
raschipi left00:38
timotimo getlexdyn isn't actually an op that exists in moar00:38
Zoffix Dynamic variable $*x not found00:38
timotimo there's a naming confusion somewhere in there00:38
in the mapping between ops and nqp::ops00:38
Zoffix but I don't think we're calling &DYNAMIC now, like with my code now00:38
jnthn timotimo: Yeah, there is. D'oh00:39
lookatme what's the difference between `my $x is dynamic` and twigil `my $*x` ?00:39
Zoffix with these changes that don't quite compile right: https://gist.github.com/zoffixznet/725ea622bf0bebfce25c54e0364d5deb00:39
(modules fail to install)00:39
timotimo getlexdyn in nqp:: is getdynlex in moar00:39
or the other way around00:39
but getlexreldyn corresponds to the same name00:39
jnthn lookatme: You can only access the former via CALLERS::<$x> or similar00:39
lookatme oh00:39
Zoffix ../nqp/gen/moar/stage1/QAST.nqp:4325:QAST::MASTOperations.add_core_moarop_mapping('getlexdyn', 'getdynlex');00:40
jnthn .oO( dynlexic )00:40
timotimo oh, what does a Var with scope :contextual compile to?00:40
jnthn timotimo: Not sure, but perhaps the "is it in this scope" and "if not use getlexdyn"00:41
In which case it's perfect :)00:41
Though I'd check it doesn't do some odd NQP-ism00:41
Zoffix |45d see if &DYNAMIC stuff can be made better: http://colabti.org/irclogger/irclogger_log/perl6?date=2018-06-21#l200:42
ZofBot Zoffix, Will remind you on 2018-08-04T20:42:12.623304-04:00 about see if &DYNAMIC stuff can be made better: http://colabti.org/irclogger/irclogger_log/perl6?date=2018-06-21#l200:42
Zoffix calls it a day00:42
Zoffix left00:42
timotimo that compiles to getdynlex00:42
but yeah, if it's in the same frame already, it does do a regular lexical lookup00:42
jnthn Sleep time for me also, I think :)00:44
'night o/00:44
timotimo i think i'll go to sleep as well00:45
lizmat left00:45
perlpilot joined00:46
timotimo gnite00:51
ryn1x .00:52
sacomo joined00:56
Kaiepi left01:01
Kaiepi joined01:01
Kaiepi m: constant IAC = 0xFF.chr; grammar A { token TOP { <a> <.b {~$<a>}> }; proto token a {*}; token a:sym(IAC) { <sym> }; method b($a) { if $a eq IAC { 0xFB.chr } } }; say A.parse("{IAC}\xFB")01:04
camelia rakudo-moar a167e6cca: OUTPUT: «P6opaque: no such attribute '$!pos' on type Match in a Slip when trying to get a value␤ in regex TOP at <tmp> line 1␤ in block <unit> at <tmp> line 1␤␤»01:04
Kaiepi how do i pass the match of a token to another token/method?01:05
would i need to use a global variable or something?01:05
actually i think i should ask this on stackoverflow01:12
i can't be the only one that needs to be able to do this01:12
molaf left01:20
Kaiepi never mind, all i needed to do was move a token from one token to another to do what i want01:21
gabiruh joined01:29
molaf joined01:33
ChoHag left01:37
ChoHag joined01:38
Kaiepi m: grammar Foo { token TOP { <a> <b <{$<a>}> }; token a { foo }; token b($a) { <{~$a}> } }; say Foo.parse('foofoo')01:48
camelia rakudo-moar a167e6cca: OUTPUT: «=== SORRY!=== Error while compiling <tmp>␤Unable to parse expression in metachar:sym<assert>; couldn't find final '>' (corresponding starter was at line 1)␤at <tmp>:1␤------> ammar Foo { token TOP { <a> <b <{$<a>}> }; token a { foo…» 01:48
Kaiepi m: grammar Foo { token TOP { <a> <b <{$<a>}>> }; token a { foo }; token b($a) { <{~$a}> } }; say Foo.parse('foofoo')01:49
camelia rakudo-moar a167e6cca: OUTPUT: «No such method 'anon' for invocant of type 'Foo'. Did you mean any of these?␤ acos␤ any␤ asin␤ atan␤␤ in regex at EVAL_0 line 1␤ in regex b at <tmp> line 1␤ in regex TOP at <tmp> line 1␤ in block <unit> at <tmp> line…»01:49
Kaiepi m: grammar Foo { token TOP { <a> <b $<a>> }; token a { foo }; token b($a) { <{~$a}> } }; say Foo.parse('foofoo')01:49
camelia rakudo-moar a167e6cca: OUTPUT: «No such method 'anon' for invocant of type 'Foo'. Did you mean any of these?␤ acos␤ any␤ asin␤ atan␤␤ in regex at EVAL_0 line 1␤ in regex b at <tmp> line 1␤ in regex TOP at <tmp> line 1␤ in block <unit> at <tmp> line…»01:49
Kaiepi m: grammar Foo { token TOP { <a> <b $<a>> }; token a { foo }; token b($a) { {~$a} } }; say Foo.parse('foofoo')01:49
camelia rakudo-moar a167e6cca: OUTPUT: «Nil␤»01:49
Kaiepi m: grammar Foo { token TOP { <a> <b $<a>> }; token a { foo }; token b($a) { <{{$a}}> } }; say Foo.parse('foofoo')01:50
camelia rakudo-moar a167e6cca: OUTPUT: «No such method 'anon' for invocant of type 'Foo'. Did you mean any of these?␤ acos␤ any␤ asin␤ atan␤␤ in regex at EVAL_0 line 1␤ in regex b at <tmp> line 1␤ in regex TOP at <tmp> line 1␤ in block <unit> at <tmp> line…»01:50
perlpilot left01:51
tony-o_ what are you trying to do with the match value Kaiepi ?01:53
Kaiepi tony-o_, i'm writing a grammar to parse telnet's protocol02:02
for IAC DO/DONT/WILL/WONT <option>, i'm required to keep the state for both sides of the connection for each type of telnet option02:03
tony-o_ ah02:03
Kaiepi the token looks like <{IAC}> <type=sym> <negotiation>, but i need to be able to pass type to negotiation02:04
kjk joined02:04
Kaiepi and set state accordingly depending on the value of <type>02:04
kjk p6: for CORE::.kv -> $k, $v { put $k }02:04
camelia rakudo-moar a167e6cca: OUTPUT: «&ord␤Too few positionals passed; expected 2 arguments but got 1␤ in block <unit> at <tmp> line 1␤␤&infix:<⊈>␤&infix:«(<)»␤&samemark␤&prefix:<?>␤&infix:<%%>␤&sprintf␤SocketType␤&infix:<⊖>␤&METAOP_TEST_ASSIGN:<andthen>␤&…»02:04
kjk I wonder why I can't iterate what's in CORE directly like that02:05
tony-o_ should that not be happening in the actions?02:05
kjk p6: for CORE::.keys -> $k { put $k }02:07
camelia rakudo-moar a167e6cca: OUTPUT: «e␤&tan␤&infix:<⊃>␤&infix:«+<»␤&infix:<×>␤NQPMatchRole␤StrPosRef␤Range␤Collation␤&substr-rw␤&infix:«=>»␤SIGTERM␤&infix:<before>␤&infix:<∉>␤&duckmap␤&infix:«<=»␤PositionalBindFailover␤ThreadPoolScheduler␤Na…»02:07
tony-o_ m: my $*ACTION; grammar F { token TOP { <a> <b> }; regex a { \w { $*ACTION=$/; } }; regex b { { $*ACTION.say; } \w+ }; }; F.parse("helloh");02:07
camelia rakudo-moar a167e6cca: OUTPUT: «「h」␤»02:07
kjk p6: for CORE::.values -> $v { put $v }02:07
camelia rakudo-moar a167e6cca: OUTPUT: «Sub object coerced to string (please use .gist or .perl to do that)␤uniprops␤trait_mod:<returns>␤0␤flat␤infix:<…^>␤␤set␤infix:<∌>␤cotan␤␤leave␤prefix:<!>␤prepend␤split␤␤prefix:<^>␤spurt␤ in block at <tmp> line…»02:07
tony-o_ m: my $*ACTION; grammar F { token TOP { <a> <b> }; regex a { \w { $*ACTION=$/; } }; regex b { { $*ACTION.say; } \w+ }; }; F.parse("helloh"); # Kaiepi02:07
camelia rakudo-moar a167e6cca: OUTPUT: «「h」␤»02:07
kjk p6: for CORE::.values -> $v { put $v .^name }02:08
camelia rakudo-moar a167e6cca: OUTPUT: «=== SORRY!=== Error while compiling <tmp>␤Malformed postfix call (only alphabetic methods may be detached)␤at <tmp>:1␤------> for CORE::.values -> $v { put $v . ^name } ␤»02:08
tony-o_ there are other ways to abuse the matching too02:08
kjk p6: for CORE::.values -> $v { put $v.^name }02:08
camelia rakudo-moar a167e6cca: OUTPUT: «Signal␤Sub+{is-pure}␤Signature␤Sub+{Precedence}␤Sub+{Precedence}␤Sub␤Sub␤Sub␤NFKC␤Sub␤Sub␤Sub␤Sub+{is-pure}␤Sub+{is-pure}+{Precedence}␤Sub␤Sub+{is-nodal}+{Precedence}+{is-nodal}␤Sub␤Systemic␤Sub+{is-pure}␤Sub+{is-…»02:08
kjk so iterating through CORE::.keys and CORE::.values work, but not CORE::.kv, something the CORE module is triping up the for loop?02:09
geekosaur m: dd CORE::.kv02:12
camelia rakudo-moar a167e6cca: OUTPUT: «No such method 'perl' for invocant of type 'NQPMatchRole'␤ in block <unit> at <tmp> line 1␤␤»02:12
geekosaur guess there's your answer: it's not a perl 6 thing, it's more primitive02:12
which might be an oversight, and might be worth a rakudobug02:13
m: say CORE::.kv.^name02:13
camelia rakudo-moar a167e6cca: OUTPUT: «Seq␤»02:13
geekosaur huh02:13
m: say CORE::.kv[0].^name02:13
camelia rakudo-moar a167e6cca: OUTPUT: «Str␤»02:13
kjk but I was only printing the key02:13
geekosaur m: say CORE::.kv[1].^name02:13
camelia rakudo-moar a167e6cca: OUTPUT: «Sub␤»02:13
geekosaur ok, think it's handling that. it's .kv itself that may be strange.02:14
m: say CORE::.kv.WHAT02:14
camelia rakudo-moar a167e6cca: OUTPUT: «(Seq)␤»02:14
kjk if you assign the .kv result to an array and then iterate through that, it works02:14
geekosaur oh, hm, that earlier error may have been something in it02:14
yes, I'm saying it's not quite a perl 6 value, it's somethoing else that only behaves as you expect part of the time02:15
underneath perl 6 is nqp, and sometimes nqp values leak through and do unexpected things02:15
kjk should I open a bug report?02:16
geekosaur I think .kv should work for it like it works for anything else. although CORE:: is a PseudoStash, maybe it's known to do something different02:16
iirc02:16
m: say CORE::.^name02:17
camelia rakudo-moar a167e6cca: OUTPUT: «PseudoStash␤»02:17
geekosaur might see if other PseudoStash-es (UNIT::, GLOBAL::, etc.) do the same thing, and include that in bug report02:18
it looks like it should work02:18
lizmat joined02:25
kjk does'nt seem to be because it's a PseudoStash. I suspect it might be some value in CORE:: that caused the problem.02:26
lizmat left02:27
kjk p6: say PROCESS::.^name; for PROCESS::.kv -> $k, $v { put $k }02:28
camelia rakudo-moar a167e6cca: OUTPUT: «Stash␤$AWAITER␤$IN␤$SPEC␤$ERR␤&chdir␤$PID␤$OUT␤$SCHEDULER␤%ENV␤»02:28
geekosaur actually, I bet it;s the same thing that tripped my earlier check, then02:29
where dd tripped over an NQPMatchRole02:29
kjk but isn't that because dd calls .perl on NQPMatchRole? my for loop didn't call .perl on the values at all02:30
geekosaur but it's missing more things than just .perl02:31
nqp values are missing most things you expect02:31
lizmat joined02:33
Kaiepi can i subclass a grammar with a class and use it both to parse data and handle socket connections?02:37
there's a lot of state that both the grammar and the client class need to know02:37
geekosaur I'm wondering if you should be looking at action classes at this point02:39
xinming joined02:40
Kaiepi i've been trying to avoid action classes because i honestly have no clue how to write them even after looking at the documentation02:40
xinming left02:40
xinming joined02:41
kjk I wonder if it has something to do with IterationEnd in CORE02:41
Kaiepi i'll post the code i have so far in a sec and see if i can figure out how to use action classes for what i'm doing02:42
kjk p6: my %h = CORE::.kv02:42
camelia rakudo-moar a167e6cca: OUTPUT: «Odd number of elements found where hash initializer expected:␤Found 189 (implicit) elements:␤Last element seen: "IterationEnd"␤ in block <unit> at <tmp> line 1␤␤»02:42
MasterDuke i think Slip might also be causing problems02:44
kjk p6: my %h = CORE::.kv02:44
camelia rakudo-moar a167e6cca: OUTPUT: «Odd number of elements found where hash initializer expected:␤Found 119 (implicit) elements:␤Last element seen: "IterationEnd"␤ in block <unit> at <tmp> line 1␤␤»02:44
kjk p6: my %h = CORE::.kv02:44
camelia rakudo-moar a167e6cca: OUTPUT: «Odd number of elements found where hash initializer expected:␤Found 1339 (implicit) elements:␤Last element seen: "IterationEnd"␤ in block <unit> at <tmp> line 1␤␤»02:44
MasterDuke m: my @a; for CORE::.kv -> $k, $v { @a.push: $v }02:44
camelia rakudo-moar a167e6cca: OUTPUT: «Invocant of method 'iterator' must be an object instance of type 'List', not a type object of type 'Slip'. Did you forget a '.new'?␤ in block <unit> at <tmp> line 1␤␤»02:44
geekosaur o.O02:45
Util timotimo: timotimo: "The enemy is a Nazi ghost tank?" is one of three "Easter Eggs",02:48
kjk p6: my @a = CORE::.kv; for @a -> $k, $v { put $k }02:48
camelia rakudo-moar a167e6cca: OUTPUT: «buf32␤num64␤Dateish␤&METAOP_CROSS␤&univals␤MultiDispatcher␤&undefine␤SIGSTKFLT␤NFD␤&log␤&minmax␤uint32␤&combinations␤&infix:<⊍>␤&atomic-assign␤&infix:<×>␤&awaiterator␤SIGUSR1␤SIGINFO␤&infix:<//>␤&item␤&infi…»02:48
Util to tempt people into Googling the phrases, which lead to online stories they might enjoy.02:48
tony-o_ it definitely sounds like you need to be using actions Kaiepi02:50
https://docs.perl6.org/language/grammars#Action_Objects02:50
are you going to run the grammar against every response from the server?02:51
Kaiepi yes02:56
the grammar's a bit tricky since there can be multiple actions in one message received from the server, and the actions can be either raw text or commands with subnegotiations that are unique to each command02:57
this is the code i have so far https://pastebin.com/9Yc8m1e202:58
i need to move $*SUPPRESS-GO-AHEAD and $*ACTION to the actions class since rfc1143 forces me to deal with DO/DONT/WILL/WONT in a certain way03:00
buggable New CPAN upload: IP-Random-0.0.3.tar.gz by JMASLAK http://modules.perl6.org/dist/IP::Random:cpan:JMASLAK03:05
Kaiepi what confuses me about actions is what make/made/ast are doing03:05
and when methods are called03:06
Actualeyes left03:17
[Coke] zoffix++ # mtime docs03:20
Kaiepi left03:36
Kaiepi joined03:36
Schepeers left03:59
Schepeers joined04:10
Kaiepi left04:23
Kaiepi joined04:23
Geth ¦ doc/pod-cache: e9a057962d | (Will "Coke" Coleda)++ | 6 files04:29
¦ doc/pod-cache: Add Pod::Cache 04:29
¦ doc/pod-cache:04:29
¦ doc/pod-cache: Instead of generating pod files each time for each test that needs04:29
¦ doc/pod-cache: it, generate a cache as we go, that uses the timestamp to insure04:29
¦ doc/pod-cache: we don't regen them if not needed.04:30
¦ doc/pod-cache:04:30
¦ doc/pod-cache: This temporarily removes the concurrency from some files.04:30
¦ doc/pod-cache:04:30
¦ doc/pod-cache: Related to #195204:30
¦ doc/pod-cache: review: https://github.com/perl6/doc/commit/e9a057962d04:30
lizmat [Coke]: wouldn't a sha1 be handier ?04:31
[Coke] handier in what way?04:32
(i'd have to store the sha1 somewhere at that point as well)04:33
lizmat sometimes people touch files inadvertently without changes04:33
[Coke] but I'm definitely open to a better algorithm.04:33
lizmat well, you're storing the mtime somewhere ?04:33
[Coke] it's in the cached copy of the pod.04:33
if someone touches the file, regen'ing the pod isn't that slow.04:33
it's just that we were regening it 5 times.04:33
(and tossing it every single time)04:34
lizmat oki... I guess I was just thinking about the precomp logic04:34
[Coke] so, this is better, but not perfect.04:34
buggable New CPAN upload: Acme-Dont-0.0.1.tar.gz by ELIZABETH https://cpan.metacpan.org/authors/id/E/EL/ELIZABETH/Perl6/Acme-Dont-0.0.1.tar.gz04:45
lizmat yeah, couldn't resist :-)04:46
dabella12 joined04:47
curan joined04:47
lizmat left04:51
lizmat joined05:02
Actualeyes joined05:06
xinming left05:07
Kaiepi i think i'm starting to work out how to use action classees05:17
is there a difference between .ast and .made?05:17
sauvin joined05:20
sauvin left05:20
xtreak joined05:24
geekosaur nope, they're aliases05:25
https://docs.perl6.org/routine/ast05:25
kjk left05:27
masak enjoyed https://arp242.net/weblog/yaml_probably_not_so_great_after_all.html05:46
masak I mean, I like YAML. but it _is_ a very complicated format.05:47
the article goes into some of the WATs05:47
also, TIL about StrictYAML05:50
HaraldJoerg joined05:51
moritz yaml also has this mis-feature where 15:30 can be parsed either as a string or into the integer 15*60 + 3005:52
masak the article points to the practice of explicitly quoting strings everywhere to avoid a lot of unexpected behavior05:53
(which throws into stark relief the JSON practice of requiring this for object keys)05:53
sno left05:56
sauvin joined05:57
domidumont joined06:05
masak I find that, in general, people don't appreciate the distinction between "parameters" and "arguments"06:05
even accounting for different terms being used in different cultures, it seems to me that most of the time, people just conflate the two06:05
unless they're language designers :)06:06
damnlie left06:07
damnlie joined06:08
dabella12 left06:09
domidumont left06:11
domidumont joined06:12
benji__ joined06:13
ufobat_ joined06:15
benjikun2 left06:17
tadzik hm, I'm quite surprise at the first point of that article; is that a python-specific thing though, or does every yaml parser actually do this?06:20
darutoko joined06:21
geekosaur didn;t it address that? they pointed to load vs. load_safe. and that you need to change php's ini file to get safe loading06:21
tadzik it seems like YAML.pm has this as an opt-in06:21
right, but I expected a criticism of YAML, not its stupid default library in that language or the other06:22
geekosaur it addressed that one too06:22
tadzik "yaml is bad becuase its default python library is awful" is a weak point imho06:22
geekosaur yaml is bad because its API encourages that bad defauklt06:22
and worse defaults like php's06:22
Kaiepi is there a token like <:ascii> that exists for <[ 0x[00] .. 0x[FF] ]>?06:23
i tried <:latin> but apparently it's not latin-106:23
masak I think most language have both a load and a loadSafe method -- the load method is probably the first one and the loadSafe method was added after the security implications became clearer06:23
domidumont left06:23
masak Kaiepi: I got a mental image of you trying <:latin> and the error message being "HAEC FORMA NON VALET"06:24
Kaiepi lol06:25
tadzik I still feel a bit like it's saying "memory is OSes is bad because we have strcpy() and not everyone uses strncpy()" :) But eh06:26
geekosaur API design's a valid complaint. and I would --- and many security types have --- made exactly that argument re libc06:27
metracom joined06:28
masak tadzik: I disagree. I think if you have a library that loads a data file, and that library has a default Load method which can have arbitrary side effects decided by the one who authored the data file, then that's a problem and a security risk and bad design.06:28
tadzik oh, I fully agree with that! But I think it's a failure of that library, not the data format06:29
masak it's something about expectations. loading a data format counts as "pure" in people's minds, so it doesn't register as a security risk.06:29
geekosaur YAML is more than just a data format; it is an API for processing that data format06:29
masak tadzik: to a large extent it falls on the libraries, yes. but the spec is what suggests having the side effects in the first place.06:29
tadzik just like the strcpy argumemt is against libc :)06:29
benji__ left06:30
metracom Slurp mode06:30
tadzik right. I guess it could be a failure of the spec that it doesn't make it clear enough that YAML does a lot of things06:31
or it failed in its marketing, and we all know how hard it is to fix that :P06:31
masak I think the spec is culpable to the extent that things should be secure by default. just having loadSafe on the side doesn't feel like enough -- somewhat backed up by the usage statistics.06:32
tadzik . o O ( mysql_real_escape_string )06:32
masak I mean, I'd much rather see a safe-by-default load method, along with a side-effecty loadDangerously06:32
tadzik absolutely06:32
HaraldJoerg1 joined06:32
tadzik or don't call it load, but rather something more obvious: eval? :)06:33
metracom loadandpray06:33
masak I recall we had similar-ish discussions about Pod back in 2006 or something06:33
tadzik you could even make it uppercase EVAL for it to stand out more...06:33
masak don't really know how those resolved themselves06:33
tadzik: heh06:34
tadzik "The reason for this is because you can’t use a list as a dict key in Python" -- ...so use a tuple? %)06:34
not sure if you can have such a workaround in ruby or php though06:35
masak the point about portability still stands, though06:35
the same input data works in some languages but not in others06:35
tadzik I guess YAML's strongest point, ultimately, is "it's less PITA to write by hand than other things"06:35
yep, agreed06:35
masak I think the stated goal of YAML is noble06:36
HaraldJoerg left06:36
masak it's also worth remembering (as HN points out) that YAML got started about the same time as JSON06:36
tadzik all in all, it's was a good read and a pretty convincing one too :)06:40
and TOML certainly looks sensible06:41
masak https://news.ycombinator.com/item?id=17362178 -- this reminded me of Perl 6 on a good day06:45
skids left06:49
stmuk_ joined06:54
tadzik indeed :) I did chime in07:00
masak tadzik++07:01
m: constant foo = [ sub { say "OH HAI" } ]; foo[0]()07:09
camelia rakudo-moar a167e6cca: OUTPUT: «OH HAI␤»07:09
masak ...I'm new here. is there a tool to check how long ago something started working in Rakudo?07:10
bisectable6: help07:10
bisectable6 masak, Like this: bisectable6: old=2015.12 new=HEAD exit 1 if (^∞).grep({ last })[5] // 0 == 4 # See wiki for more examples: https://github.com/perl6/whateverable/wiki/Bisectable07:10
robertle joined07:10
masak bisectable6: old=2017.01 new=HEAD constant foo = [ sub { say "OH HAI" } ]; foo[0]()07:11
bisectable6 masak, On both starting points (old=2017.01 new=a167e6c) the exit code is 0 and the output is identical as well07:11
masak, Output on both points: «OH HAI␤»07:11
masak hm.07:11
there was something with bounded serialization and subs in constants that didn't work a while ago07:11
sno joined07:12
moritz try going back further?07:13
or maybe the problem is only in precompiled code?07:13
wamba joined07:14
masak yes, I suspect so.07:15
https://rt.perl.org/Public/Bug/Display.html?id=131840 seems related07:16
lizmat left07:18
timotimo left07:21
masak m: my %h1; %h1<foo> = 1; my %h2 := %h1.clone; %h2<bar> = 2; say %h107:24
camelia rakudo-moar a167e6cca: OUTPUT: «{foo => 1}␤»07:24
masak I see RT #127704 has been resolved too long ago. nice.07:24
synopsebot_ RT#127704 [resolved] : https://rt.perl.org/Ticket/Display.html?id=127704 [BUG] Hash.clone differs from hash assignment; the hash and its clone are spookily entangled 07:24
kurahaupo left07:25
kurahaupo joined07:25
HaraldJoerg1HaraldJoerg07:27
dakkar joined07:28
zakharyas joined07:43
lizmat joined08:00
xtreak left08:03
zakharyas left08:07
zakharyas joined08:08
jmerelo joined08:11
jmerelo Hi08:11
masak aloha, jmerelo08:12
domidumont joined08:15
jmerelo masak: :-) So everyone is sleeping and getting ready for the next TPC session in SLC, I guess...08:16
Somehow, I expected to see, if not a wave, at least a trickle of new Perl6 users. Maybe it's not so immediate...08:17
xtreak joined08:29
[Sno] joined08:37
sno left08:38
Kaiepi why do the actions for <action> return Nil, while the ones for <data> work fine? https://hastebin.com/razayevezu.xml08:38
Geth ¦ doc/pod-cache: 56086e010a | (JJ Merelo)++ | 2 files08:44
¦ doc/pod-cache: Expands filehandle explanation closes #2111 08:44
¦ doc/pod-cache: review: https://github.com/perl6/doc/commit/56086e010a08:44
jmerelo Hum, wrong branch...08:47
Geth ¦ doc: 5db6e0e006 | (JJ Merelo)++ | doc/Type/IO.pod608:49
¦ doc: Improves run docs by adding filehandle argument, closes #2111 08:49
¦ doc: review: https://github.com/perl6/doc/commit/5db6e0e00608:49
synopsebot_ Link: https://doc.perl6.org/type/IO08:49
masak Kaiepi: because the methods in the action class need to be named action:sym etc, not action08:49
masak finds that one of the big problems with the grammar/actions boundary is that it's far too loosely typed08:50
masak the other day I got an error message to the effect of "Got 2 arguments but expected 1", but the underlying problem was "You forgot to give your action method a $/ parameter!"08:51
Kaiepi ohhh08:52
masak if you want a single method in the actions class, then consider not using a proto token in the first place :)08:54
protoregexes in the end are a convenient form of "implicit alternatives", with the dispatch happening somewhere inside the regex engine08:55
moritz you can always have a single action method upstream08:56
though the separate action methods are what makes proto regexes so composable08:57
masak I had a situation yesterday where I was doing `[<foo> | <bar> | <baz>]` in the token, and then `$<foo>.ast || $<bar>.ast || $<baz>.ast` in the action method (except I forgot the final $<baz>.ast in the heat of battle). and I was thinking "there's gotta be a better way"08:59
and that better way was protoregexes :)08:59
moritz you can also do $/.hash.values[0].ast09:00
zakharyas left09:05
gregf_ joined09:10
masak I'm simultaneously informed by this, and disgusted :)09:12
hm, there's a place in 007 where I might have use of this trick09:12
moritz++09:13
moritz you can reduce the scope of this madness by putting the alternative into a capture09:16
so if you have token flurb { <foo> (<bar>|<baz>|<quox>) }09:17
you can say $0.hash.values[0].ast09:17
wamba left09:21
masak ooh09:22
wamba joined09:22
masak sir, I will credit you in the commit message09:22
zakharyas joined09:26
ChoHag left09:27
[Sno] left09:40
[Sno] joined09:47
pmurias joined09:57
pmurias tadzik: YAML being vastly more complex then people using it casually expect is something you could consider a failure of the design09:58
kurahaupoopuaharuk09:58
pmurias left09:58
zakharyas left10:04
[Sno] left10:05
scimon joined10:06
zakharyas joined10:07
masak interestingly, that complexity seems to stem from (a) wanting to be a readable format, and (b) targeting many dynamic languages10:11
sno joined10:31
Actualeyes left10:40
moritz and (c) too much creativity :)10:46
masak at first I thought you were doing an ASCII copyright symbol ;)10:48
jnthn "too much creativity" would be a cute company name :)10:53
Though I'm not sure what for :P10:54
jmerelo jnthn: A cupcake company10:54
jnthn ooh, yes, that'd work :)10:54
Until you end up eating the brussel sprout puree with shrimp paste cupcake, anyway...10:55
masak Cannot invoke this object (REPR: Null; VMNull)10:57
awwww10:57
seems I can't stick the 007 builtins in a BEGIN block just yet10:57
I looked around in RT for this ticket, but didn't find it on a first attempt10:58
I might have to log in so I can do an Advanced Search10:58
zakharyas left11:03
telex left11:05
timo joined11:07
zakharyas joined11:07
telex joined11:07
rindolf joined11:08
masak ah! found the ticket about anonymous subs being broken across module/precomp lines: https://rt.perl.org/Public/Bug/Display.html?id=12708911:09
(maybe there are more tickets in RT about it, though)11:10
sno left11:12
sno joined11:13
tinita tadzik: the "YAML is insecure by default" is nonsense11:13
YAML does not do anything, it's just a serialization language11:14
there's just the fact that some of the processors load generic objects by default11:14
this will be fixed in the next version of PyYAML11:14
and now that YAML::{Syck,XS,.pm} all have $LoadBlessed, I would like to change the default to 0 at some point11:15
there's a pyyaml release planned11:15
zakharyas left11:16
tinita YAML::PP is safe by default anyway11:16
(if you don't count cyclic references as unsafe, they can be turned off optionally)11:17
masak tinita: I take your meaning, but somewhere (I think you'll admit) a lot of implementations ended up implementing the spec in such a way that (by default) generic objects could be loaded. the fact that they're correcting this *now* is... good, but detracting from the main point that the insecure way was put in there in the first place.11:18
tinita about the "The reason for this is because you can’t use a list as a dict key in Python:" I made a pull request to fix that actally11:19
masak \o/11:19
tinita masak: yeah, agreed that the current state is bad11:19
masak I think "YAML does not do anything, it's just a serialization language" loses sight of the fact that several implementations ended up doing the insecure thing by default11:20
it's kind of like saying "the law does not do anything, it's just a book"11:20
n1ge left11:20
tinita still, I think writing that in an article is misleading11:21
n1ge joined11:21
zak-l joined11:21
tinita moritz: the 15:30 thing is not read as a number in YAML 1.2 anymore11:21
masak aye, getting the spec/implementation distinction across is hard, as we in the Rakudo Perl 6 world know ;)11:21
tinita just that not too many libraries picked up 1.2 :-/11:21
HaraldJoerg1 joined11:21
HaraldJoerg left11:21
tinita YAML::PP will be able to do both soon11:22
zak-l left11:25
n1ge left11:25
tinita the thing about large YAML files and losing track of indendation: I'm using vim folding if necessary =)11:25
n1ge joined11:25
timo "if a yaml structure gets too big, it gets unwieldy. if code gets too big i split it into different functions" - so why not split the yaml structure up with references?11:27
timotimotimo11:27
timotimo that should work fine, right?11:27
yoleaux 02:40Z <MasterDuke> timotimo: can you think of a reason a profile just wouldn't get written? i'm attempting to --profile-compile the rakudo build and it takes a long time (~16m) and finishes without any sort of error, but it never even starts the 'Writing profiler output...' stage11:27
tinita timotimo: I'm planning to implement an !include thing, but there's no such thing in the specification11:28
so yes, splitting the file up is often better11:28
timotimo in the example they give, the "post:" part could have been replaced with a reference and then the post: subtree could have lived at 0 indentation?11:29
tinita hm, maybe I read the wrong article11:30
timotimo the "Can be hard to edit, especially for large files" section11:30
raynold left11:31
tinita I see. I think that depends on which framework you use. in openapi you can use something like $ref, and maybe in rails, too, but I don't know it. so that's not a "builtin" YAML thing11:31
sena_kun joined11:32
timotimo i thought about using & and *11:32
tinita I see11:32
timotimo but now i realize that would mean the node would also have to show up in some other place; anchors and aliases are probably not able to go between documents in the same file?11:32
tinita exactly11:33
it would work if your structure allows something like: x-definitions: # define some &anchors here11:34
sno left11:34
pmurias joined11:37
timotimo also, i just realized that something like json pointers would be difficult in yaml, since json doesn't have to handle complex keys at all11:38
so while json pointers can be a simple format of their own, yaml pointers would have to include at least one way of writing yaml objects, most probably the one that doesn't need any newlines11:39
tinita with json pointers you mean /foo/bar?11:41
timotimo yes11:41
tinita I think a couple of people started ypath, but it never was completed :-/11:41
https://github.com/peterkmurphy/YPath-Specification11:42
Kaiepi why does parsing "{IAC}{SB}{NAWS}0x[00]0x[80]0x[00]0x[80]{IAC}{SE}" work ok with the grammar itself, but parsing it with these actions gives me Nil instead? https://hastebin.com/uyumetilab.sm11:43
pmurias left11:46
timotimo hm, regexes are allowed in ypath? that could allow user-provided ypaths to DOS using catastrophic backtracking, couldn't it?11:52
rindolf left11:53
pmurias joined11:54
rindolf joined11:56
tinita timotimo: probably, I never looked at ypath closely =)11:56
timotimo [Coke]: i think on the Proc::Async slide you're potentially resizing the %output hash when output comes from one of the processes, which can lead to a crash if two processes make their first output sufficiently close together11:56
even in a later version of moarvm that can do concurrent hash resizes without crashing, i think that'll still give data loss11:57
masak timotimo: is there a pattern for how to handle that?11:58
timotimo concurrent resizes you mean?11:58
masak I mean, what if a hash is what I actually want here?11:58
timotimo have it in a supply or react block, where execution is guaranteed to only be active in one thread at a time11:58
masak should I have an array and make a hash later?11:58
oh, supply or react. that makes sense.11:59
timotimo if you know the keys up front, just initialize all of them up front, that works too11:59
masak right11:59
right, 'cus it's the resizing that's the problem11:59
timotimo yeah11:59
masak initializing keys up front sounds like a generally good idea, concurrency or no11:59
timotimo assigning to the same scalar from two threads at the same time just races and whoever wins gets to install their value11:59
though of course you can use CAS if you want for that purpose12:00
y'all remember the "soft" cat? she woke up my computer from suspend last night by putting her foot down somewhere on my keyboard12:04
telex left12:05
committable6 left12:10
committable6 joined12:10
Pheix joined12:12
raschipi joined12:15
jmerelo timotimo: she learns pretty fast. You'll have her getting out of vim pretty soon.12:24
You probably know, but another batch of TPC talks has been accepted.12:25
timotimo i wish this wouldn't lead to all the loose cat hair accumulating all over the keyboard, because that makes it hard to take pretty pictures12:25
also, it's a little icky just in general12:25
jmerelo timotimo: get an old computer and put some herrings in the screen _and_ over the keyboard. That will keep her busy for a while.12:26
timotimo red herrings?12:26
jmerelo timotimo: that would be doubly effective. Even more so if she's investigating some crime in the feline world.12:27
jmerelo: also, LOL :-)12:27
pmurias jmerelo: TPC::EU?12:36
stmuk_ timotimo: a trained cat on the keyboard is good for crypto entropy12:37
timotimo she's far too lazy for that :)12:37
masak .oO( lovingly paw-crafted entropy )12:48
timotimo well, for now the *other* cat is relaxing between my keyboard and monitor12:52
telex joined12:53
aborazmeh joined12:56
aborazmeh left12:56
aborazmeh joined12:56
xtreak left12:58
telex left12:58
jmerelo left13:02
zakharyas joined13:03
Khisanth left13:09
Khisanth joined13:22
sno joined13:23
AlexDani` joined13:25
AlexDaniel left13:27
scimon left13:36
scimon joined13:36
AlexDani`AlexDaniel13:38
raschipi left13:39
aborazmeh left13:41
tbrowder_ jmerelo: not a cat comment, but how are non-breaking spaces working now? any problems noticed?13:47
ingy if I enter `sub x {}; x < 1` in the p6 repl and hit enter it goes it a mode I don't understand13:54
and can't seem to get out of13:54
sno left13:54
ingy can someone explain that?13:55
e: sub x {}; x < 113:55
evalable6 ingy, rakudo-moar a167e6cca: OUTPUT: «(exit code 1) === SORRY!=== Error while compiling /tmp/YBnZ35wPEx␤Unable …»13:55
ingy, Sorry kid, that's not my department.13:55
evalable6 left13:55
evalable6 joined13:55
AlexDaniel e: sub x {}; x < 113:55
evalable6 AlexDaniel, rakudo-moar a167e6cca: OUTPUT: «(exit code 1) === SORRY!=== Error while compiling /tmp/k6ZUj7oWwJ␤Unable …»13:55
AlexDaniel, Full output: https://gist.github.com/54f38a3a9446b9dec31c8dce91e88a7713:55
moritz m: sub x {}; x < 113:55
camelia rakudo-moar a167e6cca: OUTPUT: «=== SORRY!=== Error while compiling <tmp>␤Unable to parse expression in quote words; couldn't find final '>' (corresponding starter was at line 1)␤at <tmp>:1␤------> sub x {}; x < 1 <EOL> ␤ expecting any of:␤ argument …»13:55
moritz ingy: it's a quote-word expression <...>13:55
that you didn't finish13:55
need x() < 113:56
ingy I was playing with qw vs lt13:56
actually13:56
moritz the repl somehow recognizes that there's an unfinished quote, and asks you for more input13:57
ingy moritz: but how do I tell the repl to give up but not exit?13:57
ctl-c kills the repl13:57
moritz besides closing the quote? no idea :(13:57
ingy as does ctl-d13:57
BAD REPL! BAD REPL!13:58
:)13:58
moritz patches welcome :)13:58
ingy ctl-c should probably kill the context, not the repl (unless top context (and only after prompt))13:59
sno joined14:00
ingy $ coffee14:00
coffee>14:00
(To exit, press ^C again or type .exit)14:00
good example14:00
moritz +114:00
ingy e: sub x {}; sub y { x < 0 }14:05
evalable6 ingy, rakudo-moar cf10780da: OUTPUT: «(exit code 1) === SORRY!=== Error while compiling /tmp/OZEjh76AEZ␤Unable …»14:05
ingy, Full output: https://gist.github.com/d1cdd30d2a2a790a865ef7e5b3e3798014:05
ingy moritz: doesn't that seem like an ambiguity?14:06
Kaiepi i worked out what i was doing wrong with my grammar14:06
now i have a basic telnet parser! \o/14:06
raschipi joined14:06
ingy Kaiepi++14:07
robertle isn't telnet a surprisingly complicated protocol? I remember looking at the spec once and benig shocked by the sheer size of it...14:07
moritz ingy: no, the parser always knows whether it expects a term or an operator14:07
ingy moritz: in that case y should have returned a Bool14:08
Kaiepi it's a simple protocol but really annoying to parse, if it makes sense14:08
moritz ingy: x is a listop, so it expects a term after that14:09
robertle hmm, i remember the autonegotiation on connection establishment as rather long-winded...14:09
Luneburg joined14:09
moritz x < 0 is the same as x( < 0 )14:09
Luneburg m: False and $number > 0;14:09
camelia rakudo-moar a167e6cca: OUTPUT: «=== SORRY!=== Error while compiling <tmp>␤Variable '$number' is not declared␤at <tmp>:1␤------> False and $number > 0; ␤»14:09
ingy e: sub x {}; sub y { x }14:11
evalable6 ingy, rakudo-moar cf10780da: OUTPUT: «»14:11
ingy e: sub x {}; sub y { x() < 0 }14:11
evalable6 ingy, rakudo-moar cf10780da: OUTPUT: «»14:11
HaraldJoerg1 left14:11
Luneburg Interesting, in the ThinkPerl6 book it says that "False and $number > 0;"expression should short-circuit after the first Boolean is read, and it shouldn't check whether $number has even been declared?14:11
ingy just seems a little fragile to me14:11
HaraldJoerg joined14:12
moritz Luneburg: the declaration check happens at compile time14:12
Luneburg: before the short-circuiting at run time14:12
Luneburg moritz: Got it, thanks :D14:12
ingy bbl14:12
sno left14:19
Luneburg left14:19
raschipi left14:20
sno joined14:21
curan left14:27
diakopter joined14:27
MasterDuke left14:27
molaf left14:29
molaf joined14:29
markoong joined14:34
ChoHag joined14:37
xtreak joined14:43
domidumont left14:45
Luneburg joined14:48
Luneburg I have a value from 0 to 100(decimals included). Every time the value passes a whole integer (1,2,3,4,5), I want to concatenate a dot to an array. How can I do this without using given statements?14:50
timotimo an important question is: does the number hit a whole integer exactly? or are you using floating point?14:51
or are you just looking for "was the value before a given integer before and is now after that given integer?"14:52
Luneburg timotimo: The number will hit all the whole integers14:52
timotimo OK14:52
m: for 0, 0.1 ... 10 { if $_ %% 1 { print "." } }14:52
camelia rakudo-moar cf10780da: OUTPUT: «...........»14:52
timotimo m: for 0, 0.1 ... 10 { if $_ %% 1 { print "." } else { print " " } }14:52
camelia rakudo-moar cf10780da: OUTPUT: «. . . . . . . . . . .»14:52
Luneburg timotimo: Doesn't that just print a "." if the number $_ is divisible by 1?14:55
timotimo yes14:55
i might be misunderstanding your question14:55
Luneburg timotimo: Ah, for one of the project euler problems I decided to make a progress bar thing. Currently, I have it display a percentage towards completion (i.e. "search 0.125% complete)14:57
But every time it passes a 1, I want it to add a "." to a progress bar, if that makes sense?14:57
And display the progress bar instead14:57
timotimo OK, i don't quite understand why just checking for percentages that are divisible by 1 isn't good enough14:58
ilmari https://github.com/sergot/Term--ProgressBar?14:58
AlexDaniel timotimo: because it can jump over some numbers?14:58
timotimo that's why i asked if it hits integers exactly14:59
and Luneburg said "will hit all the whole integers"14:59
Luneburg timotimo: Yup14:59
timotimo: I'm just thinking, aren't all the percentages... divisible by 1 though?14:59
timotimo 100 of the ones between 0 and 100 are15:00
Luneburg *facepalm* I forgot that "divisible" means without decimal points15:01
timotimo: Thanks :D15:01
timotimo hah15:01
it'd be kind of useless otherwise :D15:01
AlexDaniel m: my $progress = 2.3; my $last = 0; sub dots() { put ‘.’ x ($progress.floor - $last.floor); $last = $progress; }; dots; $progress = 5.2; dots15:01
camelia rakudo-moar cf10780da: OUTPUT: «..␤...␤»15:01
AlexDaniel something like this maybe?15:01
I'm not sure if it is correct15:01
timotimo AlexDaniel: i'm sure something with a supply could be pretty15:01
AlexDaniel m: my $progress = 2.3; my $last = 0; my &dots = { put ‘.’ x ($progress.floor - $last.floor); $last = $progress; }; dots; $progress = 5.2; dots15:02
camelia rakudo-moar cf10780da: OUTPUT: «..␤...␤»15:02
timotimo m: my $numbers = Supply.from-list(0.1, 1.1 ... 20.1); $numbers.rotor(2 => 1).tap({ .say if .[0].ceil == .[1].floor });15:03
camelia rakudo-moar cf10780da: ( no output )15:03
timotimo m: my $numbers = Supply.from-list(0.1, 1.1 ... 20.1); $numbers.rotor(2 => 1).tap({ say .[0].ceil, .[1].floor });15:03
camelia rakudo-moar cf10780da: ( no output )15:03
AlexDaniel maybe https://modules.perl6.org/search/?q=ncurses ?15:03
timotimo m: my $numbers = Supplier::Preserving.new; $numbers.rotor(2 => 1).tap({ say .[0].ceil, .[1].floor }); $numbers.emit($_) for 1.1, 2.1 ... 10.1;15:04
camelia rakudo-moar cf10780da: OUTPUT: «No such method 'tap' for invocant of type 'Seq'. Did you mean any of these?␤ Map␤ map␤ tan␤␤ in block <unit> at <tmp> line 1␤␤»15:04
timotimo m: my $numbers = Supplier::Preserving.new; $numbers.Supply.rotor(2 => 1).tap({ say .[0].ceil, .[1].floor }); $numbers.emit($_) for 1.1, 2.1 ... 10.1;15:04
camelia rakudo-moar cf10780da: OUTPUT: «No such method 'ceil' for invocant of type 'Rat'. Did you mean any of these?␤ Real␤ cis␤ perl␤ tail␤␤ in block <unit> at <tmp> line 1␤␤»15:04
timotimo m: my $numbers = Supplier::Preserving.new; $numbers.Supply.rotor(2 => 1).tap({ say .[0].ceiling, .[1].floor }); $numbers.emit($_) for 1.1, 2.1 ... 10.1;15:04
camelia rakudo-moar cf10780da: OUTPUT: «22␤55␤88␤»15:04
zakharyas left15:04
timotimo m: my $numbers = Supplier::Preserving.new; $numbers.Supply.rotor(2 => 1).tap({ .say if .[0].ceiling == .[1].floor }); $numbers.emit($_) for 1.1, 2.1 ... 10.1;15:05
camelia rakudo-moar cf10780da: OUTPUT: «[1.1 2.1]␤[4.1 5.1]␤[7.1 8.1]␤»15:05
timotimo m: my $numbers = Supplier::Preserving.new; $numbers.Supply.rotor(2 => -1).tap({ .say if .[0].ceiling == .[1].floor }); $numbers.emit($_) for 1.1, 2.1 ... 10.1;15:05
camelia rakudo-moar cf10780da: OUTPUT: «[1.1 2.1]␤[2.1 3.1]␤[3.1 4.1]␤[4.1 5.1]␤[5.1 6.1]␤[6.1 7.1]␤[7.1 8.1]␤[8.1 9.1]␤[9.1 10.1]␤»15:05
timotimo m: my $numbers = Supplier::Preserving.new; $numbers.Supply.rotor(2 => -1).tap({ .say if .[0].ceiling == .[1].floor }); $numbers.emit($_) for 1.1, 1.2 ... 10.1;15:05
camelia rakudo-moar cf10780da: OUTPUT: «[1.9 2]␤[2 2.1]␤[2.9 3]␤[3 3.1]␤[3.9 4]␤[4 4.1]␤[4.9 5]␤[5 5.1]␤[5.9 6]␤[6 6.1]␤[6.9 7]␤[7 7.1]␤[7.9 8]␤[8 8.1]␤[8.9 9]␤[9 9.1]␤[9.9 10]␤[10 10.1]␤»15:05
timotimo damn, that fires just a bit too often15:05
ah15:05
m: my $numbers = Supplier::Preserving.new; $numbers.Supply.rotor(2 => -1).tap({ .say if .[0].truncate != .[1].truncate }); $numbers.emit($_) for 1.1, 1.2 ... 10.1;15:06
camelia rakudo-moar cf10780da: OUTPUT: «[1.9 2]␤[2.9 3]␤[3.9 4]␤[4.9 5]␤[5.9 6]␤[6.9 7]␤[7.9 8]␤[8.9 9]␤[9.9 10]␤»15:06
timotimo perfect15:06
this can handle the case when integers aren't hit exactly, too15:06
m: my $numbers = Supplier::Preserving.new; $numbers.Supply.rotor(2 => -1).tap({ .say if .[0].truncate != .[1].truncate }); $numbers.emit($_) for 1.1, 1.3 ... 10.1;15:06
camelia rakudo-moar cf10780da: OUTPUT: «[1.9 2.1]␤[2.9 3.1]␤[3.9 4.1]␤[4.9 5.1]␤[5.9 6.1]␤[6.9 7.1]␤[7.9 8.1]␤[8.9 9.1]␤[9.9 10.1]␤»15:06
zakharyas joined15:08
robertle left15:10
sena_kun left15:15
diakopter left15:18
xtreak left15:34
lizmat left15:35
Pheix left15:40
Pheix joined15:41
Luneburg left15:41
Pheix left15:42
sno left15:42
robertle joined15:46
lichtkind joined15:54
wamba left15:54
lichtkind left16:02
zakharyas left16:04
lizmat joined16:14
lizmat_ joined16:15
lizmat left16:19
zakharyas joined16:21
wamba joined16:28
dakkar left16:28
scimon left16:28
lizmat_lizmat16:34
buggable New CPAN upload: Acme-Dont-0.0.2.tar.gz by ELIZABETH https://cpan.metacpan.org/authors/id/E/EL/ELIZABETH/Perl6/Acme-Dont-0.0.2.tar.gz16:35
perlpilot joined16:39
[Coke] timotimo: (hash resize) oops!16:40
timotimo [Coke]: i like your talks, your presentation style is pleasant16:40
[Coke] Recipe: Stress out for weeks, do all the work the night before!16:43
. o O (Don't actualy do that)16:43
timotimo i tend to do it in an even worse way, but then i'm also rather nervous and don't speak very clearly and all that16:45
zakharyas left16:45
fou joined16:46
perlpilot timotimo, there are several people who have pleasant presentation styles. I wish I could relax in front of people like that. (or at least look like it! :-)16:46
fou hey, I'm porting Peter Norvig's lis.py tutorial to perl6, but it crashes - could I get some help here? I'm desperated :(16:46
timotimo fou: i'd say you've come to the right place16:47
fou timotimo: what a relief16:47
timotimo what's the nature of the crash? just exceptions, or an actual segfault?16:48
fou timotimo: seems like a logic bug. which is weird, because my code is 1:1 translation16:48
can I post a gist here?16:48
timotimo yes, you can. if you put a m: in front it'll even run the code and put the output on irc, too16:49
fou one second16:49
timotimo: https://gist.github.com/fou/a70ecd989c47c75dcf421b15d5d5ee0e16:50
read-from-tokens always dies with 'unexpected EOF'16:50
norvig.com/lispy.html <- python version16:51
timotimo do you have example input? does it get deep into recursion at all?16:51
oh, heh.16:51
you're using ~ in the if/elsif in read-from-tokens16:51
you'll want "eq" there instead16:51
and i'd probably replace the !~~ with ne as well16:52
fou oh ^^ thank you!16:52
I have to go now, will join later though. thanks for help :)16:52
timotimo you're welcome16:52
fou left16:52
mahafyi joined16:55
grumble joined16:59
|oLa| left17:17
Geth ¦ doc: e9a057962d | (Will "Coke" Coleda)++ | 6 files17:27
¦ doc: Add Pod::Cache 17:27
¦ doc:17:27
¦ doc: Instead of generating pod files each time for each test that needs17:27
¦ doc: it, generate a cache as we go, that uses the timestamp to insure17:27
¦ doc: we don't regen them if not needed.17:27
¦ doc:17:27
¦ doc: This temporarily removes the concurrency from some files.17:27
¦ doc:17:27
¦ doc: Related to #195217:27
¦ doc: review: https://github.com/perl6/doc/commit/e9a057962d17:28
¦ doc: 56086e010a | (JJ Merelo)++ | 2 files17:28
¦ doc: Expands filehandle explanation closes #2111 17:28
¦ doc: review: https://github.com/perl6/doc/commit/56086e010a17:28
¦ doc: 6e4c16e3a1 | (Will "Coke" Coleda)++ | 8 files17:28
¦ doc: Merge branch 'pod-cache' 17:28
¦ doc: review: https://github.com/perl6/doc/commit/6e4c16e3a117:28
dha joined17:38
dha left17:58
dha joined18:00
Grauwolf left18:07
Grauwolf joined18:15
Grauwolf left18:15
Grauwolf joined18:15
zachk joined18:25
Xliff_ left18:25
Xliff joined18:25
zachk left18:26
zachk joined18:26
sauvin left18:26
fou joined18:28
fou timotimo: it works! but the array is flattened for some reason18:28
espadrine joined18:30
lembark joined18:30
perlpilot fou: flattened? you mean @l in your program? If so, perhaps you wanted @l.push instead of @l.append18:31
fou perlpilot: ah, right :) I've changed it to .append and wanted to switch back but I forgot18:31
lembark Q: If I want to get the same effect as P5's "use lib...", how would I manage $*REPOS in order to add new lib's?18:31
Liz doesn't know where this is documented -- her one attempt left her emotionally scarred enought that she has attempted to blot it from her memory :-)18:32
moritz lembark: why not just "use lib 'path';"?18:32
works in Perl 6, afaict :-)18:33
lembark If that works, fine.18:33
moritz worked last I tried it :-)18:33
lembark i.e., "use lib @prefix_these_libs;" works in Perl6 as it does in Perl5?18:33
perlpilot It's that "manage $*REPOS" part you should probably stay away from :)18:33
lembark Fine with me.18:33
I've got a working version of FindBin (much simpler in P6), wanted to implement FindBin::libs.18:34
fou left18:36
lembark Q: Given a list of paths in @pathz what is the correct syntax for calling P6 "lib" at runtime to make use of the values in @pathz?18:37
Thanks.18:37
moritz m: my $r = CompUnit::RepositoryRegistry; $r.use-repository($r.repository-for-spec("some/path"));18:46
camelia rakudo-moar cf10780da: ( no output )18:46
Xliff left18:46
moritz lembark: ^^ should work something like that (which you have to repeate for every element in @pathz18:47
Xliff joined18:53
tbrowder_ .ask jmerelo how are pod non-breaking spaces working now? any problems noticed?19:00
yoleaux tbrowder_: I'll pass your message to jmerelo.19:00
dha left19:08
jmerelo joined19:10
jmerelo So very soon there will be a Perl 6 .gitignore in GitHub https://github.com/github/gitignore/pull/2153#event-1693842140 thanks to bdfoy19:12
yoleaux 19:00Z <tbrowder_> jmerelo: how are pod non-breaking spaces working now? any problems noticed?19:12
jmerelo tbrowder_: Has it been included in the new release? I'll check. Thanks!19:13
Is there a new release?19:13
releasable6: status19:13
releasable6 jmerelo, Next release will happen when it's ready. 0 blockers. 88 out of 123 commits logged19:13
jmerelo, Details: https://gist.github.com/ec61a4a60c235504fa6ef1d492fd6dcc19:13
jmerelo Not yet, I guess...19:13
tbrowder_ oh, you’re right, i can’t keep up with the release process :(19:14
opuaharukkurahaupo19:15
AlexDaniel release will happen in a few hours19:16
nothing is blocking, I just need to get my hands on it19:16
jmerelo tbrowder_: thanks for warning, anyway. I'm still travelling but will try to do something as soon as it's availab.e19:17
AlexDaniel++19:17
El_Che release depends on Argentina playing better19:17
:)19:17
jmerelo El_Che: Well, that goal was terrible...19:17
I mean, really.19:18
Kick it into the hands of the Croatian forward.19:18
El_Che It's on onto the hand of god, that's sure19:18
not19:18
geekosaur another team that barely qualified on the way out :p19:19
jmerelo Or boots, rather19:19
Also, 4 days without Perl6 questions in StackOverflow. We're missing Brian D. Foy there...19:19
El_Che jmerelo: it's because your new doc is too clear19:21
jmerelo El_Che: :-) 155 issues say otherwise...19:23
AlexDaniel o-o-o my PR to FastCGI was merged19:23
jmerelo AlexDaniel: congrats!19:24
El_Che AlexDaniel: you da man19:24
lucs jmerelo: bdf's book is now in t19:24
meh19:24
jmerelo Beer|Soft drink|water for everyone. Next round is on AlexDaniel.19:24
lucs jmerelo: bdf's book is now in the hands of his editors, so that probably explains his absence.19:24
AlexDaniel .oO(beer water for everyone!)19:25
jmerelo lucs: that's probably the case. But there's no one else taking up the slack...19:25
lucs jmerelo: Write a book! ;)19:25
El_Che is the code on the draft ideomatic?19:26
there was some critique on the blog posts19:26
jmerelo lucs: Hey, I _did_ write a book! https://amzn.to/2JVX2MF19:26
lucs Could be tricky -- one person's idiom is another one's golf example.19:27
Geth ¦ doc: ronaldxs++ created pull request #2112: Update regexes.pod6 fix reversed suppress capture operators ".&" 19:27
¦ doc: review: https://github.com/perl6/doc/pull/211219:27
lucs jmerelo: Oh, cool :)19:27
jmerelo El_Che: there's no such thing as "idiomatic" perl619:27
AlexDaniel why not19:28
El_Che there pis perl6 with a stong perl 5 accent19:28
jmerelo We barely have a word for it: p6y...19:28
AlexDaniel: Well, there's maybe such a thing "in the abstract". But it's a matter of opinions.19:28
Not that, actually. Rather of what you want to optimize. Speed, "functional", thread-safe...19:29
El_Che I prefer slow, non-functioning and locking code, myself19:30
n1ge left19:34
jmerelo El_Che: If it non-works optimally, great :-)19:34
Geth ¦ doc: 33a4b40ddb | (Jan-Olof Hendig)++ | xt/examples-compilation.t19:35
¦ doc: Added a couple of missing close statements 19:35
¦ doc:19:35
¦ doc: Could cause problems on systems where the number of open fh's per process19:35
¦ doc: was set too low, e.g. 102419:35
¦ doc: review: https://github.com/perl6/doc/commit/33a4b40ddb19:35
El_Che jmerelo: it looks like the Argentinian selection will have some time soon to ask question on SO19:39
n1ge joined19:39
jmerelo El_Che: :-) a lot of time indeed.19:41
Geth ¦ doc: 81f5da0ccf | (JJ Merelo)++ | doc/Type/IO.pod619:45
¦ doc: Minor reflow 19:45
¦ doc: review: https://github.com/perl6/doc/commit/81f5da0ccf19:45
¦ doc: c678f271bd | (JJ Merelo)++ | 9 files19:45
¦ doc: Fixes conflict 19:45
synopsebot_ Link: https://doc.perl6.org/type/IO19:45
Geth ¦ doc: review: https://github.com/perl6/doc/commit/c678f271bd19:45
¦ doc: 23578bb4e0 | (Ronald Schmidt)++ | doc/Language/regexes.pod619:46
synopsebot_ Link: https://doc.perl6.org/language/regexes19:46
Geth ¦ doc: Update regexes.pod6 fix reversed suppress capture operators ".&" 19:46
¦ doc: review: https://github.com/perl6/doc/commit/23578bb4e019:46
¦ doc: a3753c01a3 | (Juan Julián Merelo Guervós)++ (committed using GitHub Web editor) | doc/Language/regexes.pod619:46
¦ doc: Merge pull request #2112 from ronaldxs/reverse-suppress-capture 19:46
¦ doc:19:46
¦ doc: Update regexes.pod6 fix reversed suppress capture operators ".&"19:46
¦ doc: Thanks a lot!19:46
¦ doc: review: https://github.com/perl6/doc/commit/a3753c01a319:46
darutoko left19:47
El_Che jmerelo: heh, indeed :)19:49
Kaiepi left19:49
Kaiepi joined19:49
geekosaur one could argue they have time right now19:49
not sure what they're doing out there, ight as well be on SO19:50
jmerelo geekosaur: yep, they are not doing much...19:50
I'm pretty sure that if they ask "How to win a match with a second-tier European team having the (arguably) best player in the world" will be voted down as "too broad"19:51
El_Che opiniated19:51
jmerelo Finished19:51
El_Che The Promise was broken19:53
gabiruh left20:20
drforr joined20:21
perlpilot left20:23
drforr You'd think there was a convention going on or something.20:23
yoleaux 16 Apr 2018 13:31Z <Zoffix> drforr: you done a bunch of Perl 6 workshops. Do you got any advice to offer for what should be included in our Perl 6 Starter Kit? https://github.com/perl6/marketing/issues/1420:23
16 Jun 2018 18:38Z <Zoffix> drforr: a long shot, but is there a version of your ML talk with working sound by any chance? https://www.youtube.com/watch?v=GI9DmIbNXrM20:23
raschipi joined20:23
MasterDuke joined20:24
ChoHag left20:24
drforr .tell Zoffix I'll give it some thought tonight.20:25
yoleaux drforr: I'll pass your message to Zoffix.20:25
gabiruh joined20:26
ChoHag joined20:27
drforr .tell Zoffix I know of no other version of20:28
yoleaux drforr: I'll pass your message to Zoffix.20:28
drforr .tell Zoffix ... of the talk.20:29
yoleaux drforr: I'll pass your message to Zoffix.20:29
ryn1x left20:30
jmerelo drforr: you've done a talk on machine learning?20:31
rindolf left20:32
rindolf joined20:36
drforr left20:38
ufobat_ left20:41
jmerelo left20:42
pmurias left20:43
pmurias joined20:54
perlpilot joined20:56
ryn1x joined21:08
raschipi left21:08
masak why is EXPR upper-cased in the Perl 6 grammar?21:17
jast joined21:18
sno joined21:20
Geth ¦ perl6-most-wanted: c9b3fbbb5b | (Will Coleda)++ (committed using GitHub Web editor) | most-wanted/modules.md21:27
¦ perl6-most-wanted: Update modules.md 21:27
¦ perl6-most-wanted: review: https://github.com/perl6/perl6-most-wanted/commit/c9b3fbbb5b21:27
¦ perl6-most-wanted: c08f7c4cf9 | (Will Coleda)++ (committed using GitHub Web editor) | most-wanted/modules.md21:28
¦ perl6-most-wanted: Update modules.md 21:28
¦ perl6-most-wanted:21:28
¦ perl6-most-wanted: App::Uni was done ages ago: https://github.com/coke/p6-uni21:28
¦ perl6-most-wanted: review: https://github.com/perl6/perl6-most-wanted/commit/c08f7c4cf921:28
pmurias left21:28
pmurias joined21:29
Xliff m: my $a = 1; my $b := $a; say $b.^name;21:30
camelia rakudo-moar cf10780da: OUTPUT: «Int␤»21:30
[Coke] is https://docs.perl6.org/language/modules#Upload_your_Module_to_CPAN up to date?21:30
Xliff m: my $a = 1; my $b := $a; say $b.VAR.^name;21:30
camelia rakudo-moar cf10780da: OUTPUT: «Scalar␤»21:30
Xliff m: my $a = 1; my $b := $a; say $b.VAR.gist.say;21:32
camelia rakudo-moar cf10780da: OUTPUT: «1␤True␤»21:32
Xliff How can you get the name assigned to a variable?21:36
And is there a way to determine if that variable has been bound to another?21:36
timotimo you can compare with :=:21:36
Xliff (The second one isn't as important)21:36
timotimo er21:36
=:=21:36
Xliff m: my $a = 1; my $b := $a; say ($b =:= $a)21:37
camelia rakudo-moar cf10780da: OUTPUT: «True␤»21:37
Xliff m: my $a = 1; my $b := $a; my $c = 2; say ($b =:= $c)21:37
camelia rakudo-moar cf10780da: OUTPUT: «False␤»21:37
MasterDuke m: my $a = 1; my $b := $a; say $b.VAR.name;21:37
camelia rakudo-moar cf10780da: OUTPUT: «$a␤»21:37
masak I'd say this, if you need to check whether a variable has been bound to another, you might want to step back and re-examine the premises of your program design :P21:38
[Coke] lizmat: you've probably uploaded more cpan modules than anyone, let me borrow you for 30s when you get a chance.21:38
telex joined21:43
Xliff m: my $a = 1; my $b := $a; say $b.VAR.name;21:44
camelia rakudo-moar cf10780da: OUTPUT: «$a␤»21:44
Xliff ^^ Is there a way to get that to say "b"?21:44
m: my $a = 1; my $b := $a; my $c = 2; say $c.VAR.name21:45
camelia rakudo-moar cf10780da: OUTPUT: «$c␤»21:45
timotimo you're overwriting the very existence of $b, at that point, no b exists any more21:45
Xliff That's what I was afraid of.21:45
OK, thanks!21:45
timotimo it could potentially be possible, if perl6 didn't decont when assigning21:45
ingy why is https://modules.perl6.org/t/SLANG so empty?21:50
I am thinking to make a Slang::Destructure to implement https://coffeescript.org/#destructuring in p621:51
I thought there would be more slang modules21:51
hmm there are actually 9 slang modules. people just suck at tagging21:52
raynold joined21:53
Kaiepi there's no destructuring for stuff like hashes?21:54
m: my %a = a => 1, b => 2; my ($a, $b) = %a; say $a, $b21:55
camelia rakudo-moar cf10780da: OUTPUT: «a => 1b => 2␤»21:55
Kaiepi m: my %a = a => 1, b => 2; my ($a, $b) = %a; say $a21:55
camelia rakudo-moar cf10780da: OUTPUT: «a => 1␤»21:55
timotimo m: my %a = :1a, :2b; my (:$a, :$b) = %a; dd $a, $b;21:57
camelia rakudo-moar cf10780da: OUTPUT: «Pair $a = :b(2)␤Pair $b = :a(1)␤»21:57
timotimo m: my %a = :1a, :2b; my (:$a, :$b) = %a; say $a.perl; say $b.perl21:57
camelia rakudo-moar cf10780da: OUTPUT: «:b(2)␤:a(1)␤»21:57
timotimo huh21:57
m: my %a = :1a, :2b; my \(:$a, :$b) := %a; say $a.perl; say $b.perl21:57
camelia rakudo-moar cf10780da: OUTPUT: «=== SORRY!=== Error while compiling <tmp>␤Malformed my␤at <tmp>:1␤------> my %a = :1a, :2b; my \(:$a, :$b) := %a; say $a.perl; say $b. ␤»21:57
timotimo m: my %a = :1a, :2b; my (:$a, :$b) := %a; say $a.perl; say $b.perl21:57
camelia rakudo-moar cf10780da: OUTPUT: «1␤2␤»21:57
timotimo that's how21:57
Kaiepi what would be cool is an equivalent to something like "let foo = {a: 1}; let bar = {b: 2, ...a}" like in javascript21:58
timotimo m: my %foo = :1a; my %bar = :2b, %foo; say %bar.perl21:59
Kaiepi wait21:59
camelia rakudo-moar cf10780da: OUTPUT: «{:a(1), :b(2)}␤»21:59
Kaiepi m: my %a = a => 1; my %b = b => 2, |%a; dd %b21:59
camelia rakudo-moar cf10780da: OUTPUT: «Hash %b = {:a(1), :b(2)}␤»21:59
timotimo no need for the | actually22:00
Kaiepi oh nice22:00
rindolf left22:04
diakopter joined22:05
perlpilot left22:06
sno left22:07
sno joined22:07
pmurias left22:11
sno left22:14
sno joined22:15
labster joined22:31
Kaiepi left22:35
HaraldJoerg left22:42
Kaiepi joined22:53
robertle left22:57
cpage joined23:03
buggable New CPAN upload: IP-Random-0.0.4.tar.gz by JMASLAK http://modules.perl6.org/dist/IP::Random:cpan:JMASLAK23:05
kurahaupo_ joined23:06
kurahaupo left23:08
perlpilot joined23:10
espadrine left23:32
greppable6 left23:33
greppable6 joined23:34
ChanServ set mode: +v23:34
kurahaupo_kurahaupo23:34
molaf left23:35
lembark left23:36
Kaiepi left23:43
raschipi joined23:46
Kaiepi joined23:48
Xliff Can someone point me to docs for caller()?23:48
I need to get the call chain from within a method or sub.23:48
geekosaur if it's implemented yet, it's a wrapper for https://docs.perl6.org/routine/callframe23:50
perlpilot Xliff, there's https://docs.perl6.org/routine/callframe23:50
I think there might be a module (from lizmat?) that does caller()23:50
molaf joined23:52
perlpilot oh, I'm thinking of https://modules.perl6.org/dist/P5caller:cpan:ELIZABETH23:53
lizmat left23:57
jnthn Xliff: Depending why you want it, the Backtrace class may also be sueful23:57
*useful23:57
Kaypie joined23:58
quotable6 left23:58
Kaiepi left23:58
quotable6 joined23:58
lizmat joined23:59

Logs Search ←Prev date Next date→ Channels Documentation