Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2015-10-16

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:01 dalek perl6.org: 3a61f30 | (Zoffix Znet)++ | source/about/index.html:
00:01 dalek perl6.org: Add Zoffix Znet as contributor
00:01 dalek perl6.org:
00:01 dalek perl6.org: Going off this remark: http://irclog.perlgeek.de/perl6/2015-10-15#i_11382403 If anyone minds, please submit corrections
00:01 dalek perl6.org: review: https://github.com/perl6/perl6.org/commit/3a61f30277
00:08 dg joined #perl6
00:08 lestrrat joined #perl6
00:08 salva joined #perl6
00:08 simcop2387 joined #perl6
00:08 bitmap joined #perl6
00:08 felher joined #perl6
00:08 AW3i joined #perl6
00:08 sQuEE` joined #perl6
00:08 gonz_ joined #perl6
00:08 Zoffix joined #perl6
00:08 mprelude joined #perl6
00:08 apotheon joined #perl6
00:08 jercos joined #perl6
00:08 hahainternet joined #perl6
00:08 garu joined #perl6
00:08 Guest72901 joined #perl6
00:08 aindilis joined #perl6
00:08 mantovani joined #perl6
00:08 gugod joined #perl6
00:08 xxx joined #perl6
00:08 moritz joined #perl6
00:08 pink_mist joined #perl6
00:08 oka_ joined #perl6
00:08 sjn joined #perl6
00:08 tm joined #perl6
00:08 sitaram joined #perl6
00:08 maddingue joined #perl6
00:08 bakedb joined #perl6
00:08 shmibs joined #perl6
00:08 tinita joined #perl6
00:08 huf joined #perl6
00:08 cibs joined #perl6
00:08 MilkmanDan joined #perl6
00:08 stmuk joined #perl6
00:08 Sgeo__ joined #perl6
00:08 Timbus joined #perl6
00:08 rhr joined #perl6
00:08 labster joined #perl6
00:08 pRiVi_ joined #perl6
00:08 btyler joined #perl6
00:08 mrf joined #perl6
00:08 freeze joined #perl6
00:08 Grrrr joined #perl6
00:08 ggoebel joined #perl6
00:08 [particle]1 joined #perl6
00:08 advwp joined #perl6
00:08 cognominal joined #perl6
00:08 TimToady joined #perl6
00:08 grondilu joined #perl6
00:08 ilbelkyr joined #perl6
00:08 agentzh joined #perl6
00:08 |Tux| joined #perl6
00:08 sjohnson joined #perl6
00:08 Humbedooh joined #perl6
00:08 wtw joined #perl6
00:08 confuseAcat joined #perl6
00:08 literal joined #perl6
00:08 crux joined #perl6
00:08 softmoth joined #perl6
00:08 Hor|zon joined #perl6
00:08 yoleaux joined #perl6
00:08 dpk joined #perl6
00:08 jordman_ joined #perl6
00:08 ribasushi joined #perl6
00:08 avar joined #perl6
00:08 dustinm` joined #perl6
00:08 Juerd joined #perl6
00:08 kid51 joined #perl6
00:08 ofzyh__ joined #perl6
00:08 SHODAN joined #perl6
00:08 kfo joined #perl6
00:08 Jonis joined #perl6
00:08 burnersk joined #perl6
00:08 hohoho joined #perl6
00:08 ssflying joined #perl6
00:08 Util joined #perl6
00:08 noganex joined #perl6
00:08 [Sno] joined #perl6
00:08 Exodist joined #perl6
00:08 dwarring joined #perl6
00:08 xvcds joined #perl6
00:08 telex joined #perl6
00:08 woodruffw joined #perl6
00:08 sergot_ joined #perl6
00:08 CurtisOvidPoe joined #perl6
00:08 spacebat joined #perl6
00:08 krakan joined #perl6
00:08 sftp joined #perl6
00:08 Upasaka_ joined #perl6
00:08 ShimmerFairy joined #perl6
00:08 vytas joined #perl6
00:08 pochi_ joined #perl6
00:08 mrsolo joined #perl6
00:08 japhb joined #perl6
00:08 quuxman joined #perl6
00:08 ben joined #perl6
00:08 clkao joined #perl6
00:08 Bucciarati joined #perl6
00:08 Khisanth joined #perl6
00:08 mathw joined #perl6
00:08 zostay joined #perl6
00:08 integral joined #perl6
00:08 jnthn joined #perl6
00:08 JimmyZ joined #perl6
00:08 El_Che joined #perl6
00:08 ilmari joined #perl6
00:08 skaji joined #perl6
00:08 mls joined #perl6
00:08 raydiak joined #perl6
00:08 solarbunny joined #perl6
00:08 pnu joined #perl6
00:10 avar joined #perl6
00:10 cgfbee joined #perl6
00:10 adhoc joined #perl6
00:10 araujo joined #perl6
00:10 yeltzooo joined #perl6
00:10 boggard joined #perl6
00:10 matt_ joined #perl6
00:10 risou joined #perl6
00:10 ilogger2 joined #perl6
00:10 gensym joined #perl6
00:10 saaki joined #perl6
00:10 vike joined #perl6
00:10 shamu joined #perl6
00:12 Kogurr joined #perl6
00:13 Psyche^ joined #perl6
00:13 xinming joined #perl6
00:13 PerlJam joined #perl6
00:13 lea joined #perl6
00:13 ambs joined #perl6
00:13 obra joined #perl6
00:13 xnrand joined #perl6
00:13 lizmat joined #perl6
00:13 rjbs joined #perl6
00:13 flussence joined #perl6
00:13 [ptc] joined #perl6
00:13 jsimonet joined #perl6
00:13 frew joined #perl6
00:13 mtj_ joined #perl6
00:14 leedo joined #perl6
00:14 zoosha joined #perl6
00:14 tony-o joined #perl6
00:14 jevin joined #perl6
00:14 murre joined #perl6
00:14 pyrimidi_ joined #perl6
00:14 Celelibi joined #perl6
00:14 colomon joined #perl6
00:14 jantore joined #perl6
00:14 f3ew joined #perl6
00:14 intrigue joined #perl6
00:14 tadzik joined #perl6
00:14 oahong joined #perl6
00:14 avalenn joined #perl6
00:14 geekosaur joined #perl6
00:14 rudi_s_ joined #perl6
00:14 BinGOs joined #perl6
00:14 cxreg2 joined #perl6
00:14 chenryn joined #perl6
00:14 jonadab joined #perl6
00:14 bhm joined #perl6
00:14 roguelazer joined #perl6
00:14 mattp__ joined #perl6
00:14 stux|RC-only joined #perl6
00:14 broquaint joined #perl6
00:14 [Coke] joined #perl6
00:14 ab5tract_ joined #perl6
00:14 renormalist joined #perl6
00:14 esh joined #perl6
00:14 ggherdov joined #perl6
00:14 daxim joined #perl6
00:14 Gothmog_ joined #perl6
00:14 danstone1 joined #perl6
00:14 retupmoca joined #perl6
00:14 gtodd joined #perl6
00:14 DrForr joined #perl6
00:14 domm joined #perl6
00:14 go|dfish joined #perl6
00:14 doublec joined #perl6
00:14 sivoais joined #perl6
00:14 nowan joined #perl6
00:14 KotH joined #perl6
00:14 b2gills joined #perl6
00:14 samb1 joined #perl6
00:14 robinsmidsrod joined #perl6
00:14 slobo joined #perl6
00:14 yuppie joined #perl6
00:14 sunnavy joined #perl6
00:14 _sri joined #perl6
00:14 n_i_c_k_ joined #perl6
00:14 arnsholt joined #perl6
00:14 apejens joined #perl6
00:14 smash joined #perl6
00:14 rvchangue joined #perl6
00:14 bartolin joined #perl6
00:14 eiro joined #perl6
00:14 pierrot joined #perl6
00:14 raiph joined #perl6
00:14 sufrostico joined #perl6
00:14 lucs joined #perl6
00:14 bpmedley joined #perl6
00:14 iv joined #perl6
00:14 olinkl joined #perl6
00:14 jferrero joined #perl6
00:14 takadonet joined #perl6
00:14 jrm joined #perl6
00:14 moznion joined #perl6
00:14 gfldex joined #perl6
00:14 ponbiki joined #perl6
00:14 charsbar joined #perl6
00:14 diego_k joined #perl6
00:14 chansen_ joined #perl6
00:14 mephinet joined #perl6
00:14 timotimo joined #perl6
00:14 silug joined #perl6
00:14 BooK joined #perl6
00:14 xdbr joined #perl6
00:14 Ulti joined #perl6
00:14 cfloare joined #perl6
00:14 nine joined #perl6
00:16 WizJin joined #perl6
00:16 Fleurety joined #perl6
00:18 PsuzeannePsy joined #perl6
00:18 mst joined #perl6
00:18 awwaiid joined #perl6
00:18 inokenty joined #perl6
00:18 emdashcomma joined #perl6
00:18 Praise joined #perl6
00:18 carlin joined #perl6
00:18 Possum joined #perl6
00:18 petercommand joined #perl6
00:18 nebuchadnezzar joined #perl6
00:18 xiaomiao joined #perl6
00:18 dalek rakudo/nom: 039069e | hoelzro++ | src/Perl6/Compiler.nqp:
00:18 dalek rakudo/nom: Eagerly evaluate CORE::.keys for REPL completions
00:18 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/039069e60c
00:18 dalek rakudo/nom: d1c42ea | hoelzro++ | src/Perl6/Compiler.nqp:
00:18 dalek rakudo/nom: Treat failure to set up completions differently from failure to load Linenoise
00:18 dalek rakudo/nom:
00:18 dalek rakudo/nom: For the former, we should deliver a little bit of information to help
00:18 dalek rakudo/nom: developers fix the issue.  For the latter, it's usually just that
00:18 dalek rakudo/nom: Linenoise isn't installed, so it's not a big deal
00:18 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/d1c42ea28a
00:18 dalek rakudo/nom: a32c30f | hoelzro++ | src/Perl6/Compiler.nqp:
00:18 dalek rakudo/nom: Refactor generating completion list into helper method
00:18 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/a32c30fbe2
00:19 avar joined #perl6
00:19 ingy joined #perl6
00:19 revdiablo joined #perl6
00:19 breinbaa1 joined #perl6
00:19 baest_ joined #perl6
00:19 khw joined #perl6
00:19 FireFly joined #perl6
00:19 FROGGS joined #perl6
00:19 TEttinger joined #perl6
00:19 atta joined #perl6
00:19 Hotkeys joined #perl6
00:19 jojotus joined #perl6
00:19 captain-adequate joined #perl6
00:19 lsm-desktop joined #perl6
00:19 zemmihates joined #perl6
00:19 kipd joined #perl6
00:19 SmokeMachine_ joined #perl6
00:19 erdic joined #perl6
00:19 Fluor joined #perl6
00:19 xenu joined #perl6
00:19 avuserow1 joined #perl6
00:19 Debolaz joined #perl6
00:19 [Tux] joined #perl6
00:19 ugexe joined #perl6
00:19 riatre joined #perl6
00:19 PotatoGim joined #perl6
00:19 nightfrog joined #perl6
00:19 Spot__ joined #perl6
00:19 dylanwh_ joined #perl6
00:19 camelia joined #perl6
00:19 ashleyde1 joined #perl6
00:19 psch joined #perl6
00:19 Gardner joined #perl6
00:19 masak joined #perl6
00:19 hobbs joined #perl6
00:19 kst joined #perl6
00:22 jkva joined #perl6
00:23 sivoais_ joined #perl6
00:23 burnersk joined #perl6
00:26 avar joined #perl6
00:26 dpk joined #perl6
00:28 Util joined #perl6
00:29 confuseAcat joined #perl6
00:29 aborazmeh joined #perl6
00:31 aborazmeh joined #perl6
00:35 jonadab joined #perl6
00:36 avar joined #perl6
00:36 avar joined #perl6
00:42 uruwi joined #perl6
00:42 avar joined #perl6
00:42 avar joined #perl6
00:45 n0tjack joined #perl6
00:50 uruwi I noticed that holding a key down gives a delay before it fires repeatedly. Is the method to remove that delay specific to the terminal emulator being used, or can I change it with a command line setting?
00:50 TimToady do you really want random letters repeating while you type normally?
00:51 uruwi Normally I'd say no
00:51 uruwi But here I'll have to say yes
00:54 pink_mist pretty sure that depends on either your OS or your terminal
00:56 llfourn joined #perl6
00:57 uruwi Probably should be using a graphical interface instead by now, considering terminals can't properly handle simultaneous keypresses
00:59 uruwi I like the feel of playing stuff on a terminal I guess.
01:01 rabato joined #perl6
01:01 SuzieQueue joined #perl6
01:02 rabato hi, rakudo. Is this ordered? .say for 'abcd'.comb>>.succ;
01:03 uruwi m: .say for 'abcd'.comb>>.succ
01:03 camelia rakudo-moar 271e84: OUTPUT«b␤c␤d␤e␤»
01:03 uruwi Seems so
01:04 rabato 'abcd'.comb>>.succ.say
01:04 rabato but it not ordered
01:08 ugexe because say is a side effect
01:09 uruwi m: 'abcd'.comb>>.succ.say
01:09 camelia rakudo-moar 271e84: OUTPUT«(b c d e)␤»
01:09 rabato ugexe: so! .say for 'abcd'.comb>>.succ; is ordered?
01:13 rabato uruwi:  I think the output is ordered, but ">>" behaver is not ordered
01:13 ugexe m: my @x = 'abcd'.comb>>.succ; say @x
01:13 camelia rakudo-moar 271e84: OUTPUT«[b c d e]␤»
01:13 ugexe in your example, .say gets called out-of-order, but the result from *that* (True) will come back ordered
01:13 timotimo yeah, the order of the results is preserved, but things get executed not-in-order
01:14 timotimo to be fair, the say in >>.succ.say will get executed "in-order", as the say isn't hypered
01:16 rabato timotimo: maybe something changed, i read  before. thay say it is not ordered.
01:16 timotimo there's hyper sequences that'd do that, but i don't think those get created with >>.
01:17 rabato timotimo: why say is not hypered?
01:18 ugexe m: 'abcd'.comb>>.succ>>.say
01:18 camelia rakudo-moar 271e84: OUTPUT«b␤c␤d␤e␤»
01:18 ugexe i would think that would be out of order
01:20 timotimo m: "1234567".comb>>.say
01:20 camelia rakudo-moar 271e84: OUTPUT«1␤2␤3␤4␤5␤6␤7␤»
01:20 rabato ugexe: i think i will be ordered.
01:20 timotimo huh, we don't do that any more?
01:22 rabato timotimo: give me an answer? please? ".say for 'abcd'.comb>>.succ;"
01:22 ugexe star: 'abcd'.comb>>.succ>>.say # looks like it disappeared a little while ago
01:22 camelia star-m 2015.09: OUTPUT«b␤c␤d␤e␤»
01:23 timotimo i did not know that!
01:23 timotimo i know nothing!
01:23 pierrot joined #perl6
01:23 rabato timotimo: anyway, thanks.
01:23 ugexe rabato: that will say them in order, even if >> was unordering them
01:24 rabato ugexe: thanks!
01:29 sivoais joined #perl6
01:32 timotimo sorry rabato
01:33 rabato timotimo: it's ok.
01:34 PsuzeannePsy joined #perl6
01:39 sufrostico joined #perl6
01:44 adu joined #perl6
01:46 Suzeanne joined #perl6
01:51 pyrimidine joined #perl6
01:53 tokuhiro_ joined #perl6
01:54 preyalone joined #perl6
02:00 rurban joined #perl6
02:17 noganex_ joined #perl6
02:22 jkva joined #perl6
02:33 SuzieQueue joined #perl6
02:35 chenryn_ joined #perl6
02:40 chenryn_ joined #perl6
02:44 hohoho m: require ::($_) for <NativeCall>
02:44 camelia rakudo-moar 271e84: OUTPUT«===SORRY!===␤Cannot invoke this object␤»
02:44 hohoho hmm
02:44 hohoho m: for <NativeCall> { require ::($_) }
02:44 camelia rakudo-moar 271e84: ( no output )
02:44 hohoho what's difference?
02:45 hohoho i seem normal 'for' stmt and postfix 'for' have same meanings
02:45 timotimo m: { require ::($_) for <NativeCall> }
02:45 camelia rakudo-moar 271e84: OUTPUT«===SORRY!===␤Cannot invoke this object␤»
02:46 timotimo it's not a bug about being inside { } or not at least
02:46 timotimo i don't think you'd need to runtime-require NativeCall, as it comes with rakudo nowadays
02:46 geekosaur m: { require ::($_) } for <NativeCall>
02:46 camelia rakudo-moar 271e84: ( no output )
02:46 timotimo geekosaur: are you sure that gets executed?
02:46 geekosaur no, actually
02:46 timotimo m: { say "hello" } for <NativeCall>
02:46 camelia rakudo-moar 271e84: OUTPUT«hello␤»
02:46 timotimo ah
02:47 geekosaur well.
02:49 hohoho NativeCall is just a example.
02:54 geekosaur m: $_.^name.say for <NativeCall>
02:54 camelia rakudo-moar 271e84: OUTPUT«Str␤»
02:54 geekosaur m: { $_.^name.say } for <NativeCall>
02:54 camelia rakudo-moar 271e84: OUTPUT«Str␤»
02:56 n0tjack joined #perl6
02:58 llfourn joined #perl6
03:00 skids joined #perl6
03:05 PotatoGim joined #perl6
03:11 PsuzeannePsy joined #perl6
03:17 somoto joined #perl6
03:17 somoto could you me tell how
03:17 somoto a) create an emtpy hash
03:17 somoto b) check if a hash is emtpy
03:17 somoto c) check if an argument is a method is null (or rather, passed to it at all)?
03:18 somoto c) check if an argument passed in a method is null (or rather, passed to it at all)?
03:18 BenGoldberg joined #perl6
03:18 timotimo m: my %foo; say %foo.perl
03:18 camelia rakudo-moar 271e84: OUTPUT«{}␤»
03:18 timotimo is that acceptable for a)  ?
03:18 TimToady or {} as a literal
03:18 timotimo m: say {}.WHAT
03:18 camelia rakudo-moar 271e84: OUTPUT«(Hash)␤»
03:19 timotimo m: say {}.elems
03:19 camelia rakudo-moar 271e84: OUTPUT«0␤»
03:19 timotimo m: say {food => "good"}.elems
03:19 camelia rakudo-moar 271e84: OUTPUT«1␤»
03:19 TimToady m: say so {}
03:19 camelia rakudo-moar 271e84: OUTPUT«False␤»
03:19 TimToady m: say so { :any<thing> }
03:19 camelia rakudo-moar 271e84: OUTPUT«True␤»
03:20 somoto and "c" please?
03:21 timotimo i'd go with $that_argument.defined, but it's also possible to pass an undefined value for that argument and it'll trigger that check, too
03:21 timotimo m: sub test($foo?) { say $foo.defined }; test(123); test(); test(Int);
03:21 camelia rakudo-moar 271e84: OUTPUT«True␤False␤False␤»
03:22 TimToady m: sub foo ($a = "No value passed") { say $a }; foo("value"); foo()
03:22 camelia rakudo-moar 271e84: OUTPUT«value␤No value passed␤»
03:22 Ben_Goldberg joined #perl6
03:22 somoto > say $fdsfd.defined;
03:22 somoto ===SORRY!=== Error while compiling <unknown file>
03:22 somoto Variable '$fdsfd' is not declared
03:22 somoto > say $fdsfd.defined;
03:22 somoto ===SORRY!=== Error while compiling <unknown file>
03:22 somoto Variable '$fdsfd' is not declared
03:22 somoto > say $fdsfd.defined;
03:22 somoto ===SORRY!=== Error while compiling <unknown file>
03:22 somoto Variable '$fdsfd' is not declared
03:22 somoto > say $fdsfd.defined;
03:22 somoto ===SORRY!=== Error while compiling <unknown file>
03:22 somoto Variable '$fdsfd' is not declared
03:22 somoto > say $fdsfd.defined;
03:22 somoto ===SORRY!=== Error while compiling <unknown file>
03:22 somoto is there any way to safely check if it's defined or not?
03:23 TimToady there's no way to check that it's *declared*, which is different from defined
03:23 skids Well, other than to use EVAL.
03:23 TimToady if it's not declared, it's a compile error
03:24 somoto Ok. I just want to check if an optional argument is passed to my method inside the method, what's the best way to do that?
03:24 skids Use a default like TimToady showed above.
03:25 somoto thanks
03:26 AlexDaniel joined #perl6
03:27 AlexDaniel “I think using \r\n is non-sense in 2015. We can use \n instead of \r\n.” – I wish there was a way to go for it without making everyone suffer
03:27 AlexDaniel on the other hand, lots of software on windows actually understand \n quite nicely
03:28 AlexDaniel .oO( another potentially good idea is throw away support for some operating systems altogether, bhaha )
03:29 skids There will always be the task of processing archived data created with old saoftware, that'll probably never go away.
03:38 uruwi Yep
03:38 uruwi Screw \r\n
03:38 uruwi Screw notepad
03:51 Gardner joined #perl6
03:51 captain-adequate joined #perl6
03:54 tokuhiro_ joined #perl6
03:59 n0tjack joined #perl6
04:00 llfourn joined #perl6
04:05 SuzieQueue joined #perl6
04:13 tomoko44 joined #perl6
04:13 tomoko44 I'm trying to check if arguments are emtpy (or passed at all) or not:
04:13 tomoko44 method method1($var1?, $var2?) {
04:13 tomoko44 my %my-hash;
04:13 tomoko44 if $var1 {
04:13 tomoko44 say "if var1 is True";
04:13 tomoko44 %my-hash{'var1'} = $var1;
04:13 tomoko44 }
04:13 tomoko44 if $var2 {
04:13 tomoko44 say "if var2 is True";
04:13 tomoko44 %my-hash{'var2'} = $var2;
04:13 tomoko44 }
04:13 tomoko44 }
04:13 tomoko44 method1(var1 = "fdsomfdsfds");
04:13 tomoko44 But the code in the blocks "if $var1 { ... }" and "if $var2 { ... }" never executes. Why?
04:13 tomoko44 formatted:
04:13 tomoko44 I'm trying to check if arguments are emtpy (or passed at all) or not:
04:13 tomoko44 method method1($var1?, $var2?) {
04:13 tomoko44 my %my-hash;
04:13 tomoko44 if $var1 {
04:13 tomoko44 say "if var1 is True";
04:13 tomoko44 %my-hash{'var1'} = $var1;
04:13 tomoko44 }
04:14 tomoko44 if $var2 {
04:14 tomoko44 say "if var2 is True";
04:14 tomoko44 %my-hash{'var2'} = $var2;
04:14 tomoko44 }
04:14 tomoko44 }
04:14 tomoko44 method1(var1 = "fdsomfdsfds");
04:14 tomoko44 But the code in the blocks "if $var1 { ... }" and "if $var2 { ... }" never executes. Why?
04:14 tomoko44 is there any better way to accomplish the same thing?
04:15 skids tomoko44: for future reference, you can make a github gist and feed it to the evalbot.
04:15 tomoko44 ok
04:17 TimToady first, change 'method' to 'sub', if you're going to call it as a subroutine, not as a method
04:17 TimToady seocond, you don't need var1 = there, just pass the string, since you declared a positional argument
04:17 skids m: class A { method foo ($v1?, $v2) { if $v1 { say "if var1 is true" }; if $v2 { say "if var2 is true" } }; A.new.foo(1,2);
04:17 camelia rakudo-moar 271e84: OUTPUT«5===SORRY!5=== Error while compiling /tmp/4qKoNP5WnF␤Cannot put required parameter $v2 after optional parameters␤at /tmp/4qKoNP5WnF:1␤------> 3class A { method foo ($v1?, $v27⏏5) { if $v1 { say "if var1 is true" }; if␤    expecting any of…»
04:17 TimToady if you wanted named parameters, then declare them :$var1, :$var2
04:18 skids m: class A { method foo ($v1?, $v2?) { if $v1 { say "if var1 is true" }; if $v2 { say "if var2 is true" } }; A.new.foo(1,2);
04:18 camelia rakudo-moar 271e84: OUTPUT«5===SORRY!5=== Error while compiling /tmp/VCiXLi8k24␤Missing block␤at /tmp/VCiXLi8k24:1␤------> 3y "if var2 is true" } }; A.new.foo(1,2);7⏏5<EOL>␤»
04:18 TimToady and pass var1 => 'string'
04:18 TimToady (not = char, this isn't python)
04:19 tomoko44 yeah, I meant named parameters, that is :$var1, :$var2
04:20 tomoko44 ok, thx.
04:20 skids m: class A { method foo ($v1?, $v2?) { if $v1 { say "if var1 is true" }; if $v2 { say "if var2 is true" } } }; A.new.foo(1,2);
04:20 camelia rakudo-moar 271e84: OUTPUT«if var1 is true␤if var2 is true␤»
04:22 skids m: class A { method foo (:$v1, :$v2) { if $v1 { say "if var1 is true" }; if $v2 { say "if var2 is true" } } }; A.new.foo(:v1,:v2(3));
04:22 camelia rakudo-moar 271e84: OUTPUT«if var1 is true␤if var2 is true␤»
04:28 mayuresh joined #perl6
04:29 mayuresh hello :)
04:30 mayuresh is anyone awake?
04:30 PsuzeannePsy joined #perl6
04:31 mayuresh i guess not! :)
04:31 mayuresh see you all after 12 hours, that's when i'd be headed off to bed though. :)
04:32 skids o/
04:32 skids oh.
04:42 WizJin joined #perl6
04:42 konobi joined #perl6
04:43 konobi howdy! are there any examples of folks using grammars to do DSL style stuff?
04:52 llfourn konobi: this is an example of DSL as a slang: https://github.com/tony-o/perl6-slang-sql
04:55 Suzeanne joined #perl6
05:05 chenryn_ joined #perl6
05:09 ShimmerFairy joined #perl6
05:16 n0tjack joined #perl6
05:24 jkva joined #perl6
05:28 konobi llfourn: "slang" ?
05:32 raiph konobi: S99:slang
05:32 synbot6 Link: http://design.perl6.org/S99.html#slang
05:35 konobi ta
05:36 llfourn konobi: A slang is like a grammar but the difference is that you are modifying the existing Perl 6 grammar to incoroporate your DSL into the Perl 6 language itself
05:36 llfourn konobi: In terms of straight Grammar DSLs the only things I can think of are various templating languages
05:37 llfourn konobi: https://github.com/softmoth/p6-Template-Mustache/
05:39 konobi ah, kk... i was thinking more in terms of something like Ansible... but with sensible parsing, not just YAML loading
05:40 llfourn I actually happen to be doing something like that in Perl 6 as well but have not yet put it on GH
05:41 llfourn but yes -- you could do that with a normal grammar -- and use the "actions" to translate it to whatever structure you need
05:45 SuzieQueue joined #perl6
05:46 hohoho joined #perl6
05:50 PsuzeannePsy joined #perl6
05:56 tokuhiro_ joined #perl6
06:04 konobi llfourn: yeah, getting my head around it now =0)
06:08 diana_olhovik joined #perl6
06:10 hohoho joined #perl6
06:10 hohoho joined #perl6
06:13 Woodi joined #perl6
06:16 [Tux] test             50000    39.166    39.048
06:16 [Tux] test-t           50000    39.600    39.483
06:21 bjz joined #perl6
06:26 Alina-malina joined #perl6
06:26 bjz_ joined #perl6
06:26 SuzieQueue joined #perl6
06:27 firstdayonthejob joined #perl6
06:29 hartenfels joined #perl6
06:31 |Tux| joined #perl6
06:32 Ven joined #perl6
06:33 hartenfels joined #perl6
06:41 |Tux| joined #perl6
06:44 jkva joined #perl6
06:45 vike joined #perl6
06:46 bjz joined #perl6
06:46 |Tux| joined #perl6
06:51 bjz_ joined #perl6
06:52 FROGGS joined #perl6
06:56 |Tux| joined #perl6
06:59 RabidGravy joined #perl6
07:05 bjz joined #perl6
07:10 abraxxa joined #perl6
07:15 Alina-malina joined #perl6
07:16 jkva_ joined #perl6
07:16 lea joined #perl6
07:19 boegel joined #perl6
07:24 RabidGravy morning!
07:24 ely-se joined #perl6
07:36 dalek rakudo/nom: 2324810 | TimToady++ | src/core/metaops.pm:
07:36 dalek rakudo/nom: allow ».[1;1] to pass single array arg
07:36 dalek rakudo/nom:
07:36 dalek rakudo/nom: Fixes RT #126370
07:36 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/23248109c9
07:36 synbot6 Link:  https://rt.perl.org/rt3/Public/Bug/Display.html?id=126370
07:37 dalek roast: f8c0844 | TimToady++ | S03-metaops/hyper.t:
07:37 dalek roast: hyper multidim now works (RT #126370)
07:37 dalek roast: review: https://github.com/perl6/roast/commit/f8c0844fbf
07:37 synbot6 Link:  https://rt.perl.org/rt3/Public/Bug/Display.html?id=126370
07:37 KDr2 joined #perl6
07:39 Ven joined #perl6
07:42 lea joined #perl6
07:43 konobi RabidGravy: yo
07:43 RabidGravy hey!
07:43 RabidGravy you good?
07:43 konobi aye, not too shabby
07:44 RabidGravy fabulous!
07:44 konobi getting back into the swing of job-hunting/contract-seeking
07:44 n0tjack joined #perl6
07:44 RabidGravy :)
07:45 konobi and attempting to re-learn patience in awaiting clients
07:45 konobi ^_^
07:46 tokuhiro_ joined #perl6
07:47 konobi RabidGravy: how bout you mate?
07:48 RabidGravy All fabulous, having a big slack/personal hack time at the moment - may have to start looking for a new gig at some point ;-)
07:49 RabidGravy tokuhiro_, are you the tokuhirom who submitted https://github.com/sergot/http-useragent/issues/92 ?
07:50 RabidGravy oh, I'll just carry on writing the reply then
07:50 mrsolo joined #perl6
07:50 zakharyas joined #perl6
08:00 RabidGravy anyone here with an IPV6 connection to the internet care to chime in on https://github.com/sergot/http-useragent/issues/92 ?
08:07 Ven joined #perl6
08:15 Coldkeys joined #perl6
08:15 Coldkeys left #perl6
08:15 darutoko joined #perl6
08:18 Ven joined #perl6
08:24 Ven joined #perl6
08:26 bjz joined #perl6
08:31 espadrine joined #perl6
08:31 Ven_ joined #perl6
08:35 moritz m: say Int:D ~~ Int:D
08:35 camelia rakudo-moar 271e84: OUTPUT«False␤»
08:40 chenryn_ joined #perl6
08:40 n0tjack joined #perl6
08:48 xfix joined #perl6
08:51 ][Sno][ joined #perl6
08:51 tokuhiro_ joined #perl6
08:54 margeas joined #perl6
08:56 mprelude_ joined #perl6
09:01 FireFly joined #perl6
09:01 Ven_ are "is nodal" and "is raw" formally documented somewhere?
09:01 [ptc] is it possible to submit smoke/test reports to testers.p6c.org?
09:01 RabidGravy right, off out - play nicely.
09:05 FROGGS [ptc]: sure
09:05 [ptc] FROGGS: tried to find how on the website, but couldn't find it.  How do I submit reports?
09:05 FROGGS [ptc]: PANDA_SUBMIT_TESTREPORTS=1 panda smoke - or - PANDA_SUBMIT_TESTREPORTS=1 panda install Foo
09:06 [ptc] ah, ok
09:06 [ptc] FROGGS: is that mentioned on the testers site?
09:06 [ptc] FROGGS: ... and I just happened to miss it?
09:07 Ven_ .tell TimToady http://irclog.perlgeek.de/perl6/2015-10-15#i_11381191 putting "Foo_" or "Foo-" would mean I'm reinventing namespacing for no reason. I want `::` to be about packages. the name is inside the package, the value is dynamically scoped
09:07 yoleaux Ven_: I'll pass your message to TimToady.
09:08 [ptc] FROGGS: is it possible to submit a test report for a module without installing it as well?
09:08 FROGGS [ptc]: I fear it is not mentioned :S
09:08 FROGGS [ptc]: not atm
09:08 [ptc] FROGGS: that's ok, that gives me the opportunity to submit a PR for testers.p6c.org :-)
09:10 FROGGS \o/
09:10 FROGGS [ptc]++
09:10 FROGGS [ptc]: a welcome page that explains things would be awesome
09:12 [ptc] FROGGS: maybe it's best for me to open a ticket; then at least it's written down somewhere...
09:12 andreoss joined #perl6
09:13 FROGGS aye
09:16 duncan_dmg joined #perl6
09:19 c0rt042 joined #perl6
09:20 telex joined #perl6
09:21 g4 joined #perl6
09:22 Ven joined #perl6
09:24 jnthn morning, #perl6
09:24 duncan_dmg joined #perl6
09:24 Ven o/, jnthn
09:24 vytas how is nqp interactive shell different from perl6's ? they both use HLL/Compiler.nqp, don't they ?
09:26 Ven jnthn: "Looking further into call vs. coercion and coercion API as part of RT #114026; post a proposal for discussion" you didn't add a link to that :P
09:26 synbot6 Link:  https://rt.perl.org/rt3/Public/Bug/Display.html?id=114026
09:26 brrt joined #perl6
09:26 vytas I am looking at commit 74875ba93cde72aed295a071ab1ec6a392154f6f, and I don't think it is working as per commit message - my guess is due to \n\n
09:27 konobi what ever happened to the idea of nqp on llvm?
09:29 jnthn Ven: https://gist.github.com/anonymous/8efdab238ead35b1d4fa
09:29 Ven konobi: nobody did it? :P
09:29 brrt konobi: well volunteered :-P
09:29 Psyche^_ joined #perl6
09:30 jnthn Ven: Linked it from the post now too :)
09:30 Ven jnthn++
09:31 azawawi joined #perl6
09:31 azawawi morning
09:32 brrt morning azawawi
09:32 azawawi https://github.com/azawawi/perl6-selenium-webdriver/blob/master/examples/ex01.p6  # more automated website ui testing is now working :)
09:32 espadrine joined #perl6
09:35 azawawi any update on panda supporting module versions?
09:36 azawawi e.g. panda install Selenium::WebDriver@0.15
09:36 konobi Ven: there was talk of it quite a few years back... just wondering if someone took a look again, now that llvm is a bit better organized
09:37 Ven konobi: do you still have it?
09:37 konobi and vmkit working for jvm and clr
09:39 konobi some of the llvm tooling could make for some interesting ways to analyse the code
09:42 brrt konobi: i'm going speculate here, and suggest that the things lLVM is good at is only in a small respect overlapping with the things that are difficult in perl6
09:42 jkva joined #perl6
09:42 brrt i'm all for more backends, more power to whoever wants to do it
09:43 brrt but i honestly would expect better results from pmurias++'s efforts of nqp-js than on llvm
09:44 vytas is it ok to log bugs for perl6 repl in nqp github issues page?
09:44 brrt vytas: i think we use RT here, not sure exactly how it works
09:45 brrt nobody will mind you putting bugs into the github issues page, it's just not the primary tracker :-)
09:46 ShimmerFairy if it's a rakudobug, you really shouldn't use the issues page, since rakudo uses RT. (Maybe the perl6 organization should disable it, if that's an option)
09:47 ShimmerFairy oh, it is already :P
09:47 vytas ShimmerFairy, it's enabled
09:48 vytas according to https://github.com/rakudo/rakudo/ bugs related to nqp or moarvm should go through github issue tracker, rakudo/perl6 via rakudobug@perl.org
09:48 ShimmerFairy vytas: not for rakudo/rakudo I mean
09:49 edehont joined #perl6
09:53 virtualsue joined #perl6
09:54 ely-se joined #perl6
09:58 vytas If I go  to http://rakudo.org/rt/open-all ( linked from http://rakudo.org/tickets/ )  I get possible cross-site request forgery
09:59 bjz joined #perl6
10:02 rindolf joined #perl6
10:02 vytas e-mailed to perlbug-admin at perl.org
10:02 rurban joined #perl6
10:03 brrt that may not come to the right place
10:03 brrt seems like that may be for perl5 mostly?
10:03 vytas rt.perl.org is used for both
10:03 jnthn Indeed
10:06 vytas would bugs like RT #112634 be welcomed to fix in core? I mean my personal opinion is that Linenoise should be implemented in core too..
10:06 synbot6 Link:  https://rt.perl.org/rt3/Public/Bug/Display.html?id=112634
10:08 breinbaas joined #perl6
10:09 jnthn vytas: I'm pretty sure some folks did spend a good bit of time on RT #112634; I'm not sure what came of it.
10:09 synbot6 Link:  https://rt.perl.org/rt3/Public/Bug/Display.html?id=112634
10:10 jnthn vytas: We actually used to have linenoise integrated at the VM level, and had to maintain a separate thing for JVM too, and then it didn't provide good access to most of the functionality for doing anything non-trivial, so it was better pushed out to a Perl 6 module.
10:12 Ven joined #perl6
10:12 Ven brrt: clearly, we should use llvm to then compile it to js! :P
10:12 brrt lol
10:12 brrt why not
10:12 brrt that's what emscriptem does isn't it?
10:13 ShimmerFairy jnthn: I'm personally of the opinion that rakudo requiring externally-hosted modules for some of its features is a poor idea. I'd like if a Linenoise-ish module, and a basic module for perl6-debug, would be provided like Pod::To::Text
10:14 vytas I am with ShimmerFairy, having advanced REPL in nqp makes little sense, but it must be installed with perl6
10:15 FROGGS ShimmerFairy: then use Rakudo Star
10:15 brrt i'm not. perl5 doesn't have a functional repl and we deal with that just fine
10:15 FROGGS that what distributions are for
10:15 FROGGS or is Linenoise not included in Star?
10:15 Alina-malina joined #perl6
10:16 brrt (shockingly, my fedora installation apparantly doens't have Test::More :-O)
10:16 jnthn FROGGS: Not sure, but that's where it should go if it ain't already.
10:16 brrt Test::More is a p5 standard module, isn't it?
10:16 ShimmerFairy FROGGS: disagree. If the rakudo source code has a dependency on a module it doesn't provide, then that's a mistake. When you go to get the rakudo compiler, you should not be getting an incomplete compiler.
10:17 jnthn ShimmerFairy: You seem to have a strangely broad definition of compiler.
10:17 ShimmerFairy (besides, I always use the latest from the repositories, so 'just use R*' is not an acceptable solution)
10:17 ShimmerFairy jnthn: well, if the compiler needs it (e.g. the default UI for perl6-debug), that sounds to me like a case of something that should be a part of the compiler :)
10:18 brrt hmm
10:18 brrt that's a reasonable point i guess
10:19 FROGGS ShimmerFairy: rakudobrew build moar && rakudobrew build panda (or how it is called exactly) is no solution? really?
10:19 FROGGS err, install Task::Star*
10:19 FROGGS (one can see that I'm not using it)
10:20 ShimmerFairy FROGGS: I don't use rakudobrew. I install straight from the repos (not even using the --gen options), and I've been a bit pissed about the fact that this doesn't give me a complete compiler, when wanting to use `perl6-debug` or the most basic of REPL line-editing functions.
10:20 vytas Task::Star fails to build at the moment, last time i tried it - it was not there. and no i don't like that ( even if my vote does not count )
10:21 ShimmerFairy And I will not change where I get my rakudo from simply because the repository refuses to be complete :)
10:22 FROGGS still, a compiler is a compiler is a compiler
10:22 FROGGS fancy repl stuff really belongs to module space
10:22 FROGGS also to allow alternatives
10:23 vytas in my opinion - python got interactive shell very right
10:23 vytas and they got iPython
10:24 FROGGS yes, though Pythons vision is that there shall only be one (obvious) way to do things
10:24 FROGGS which is not quite perlish
10:25 jnthn ShimmerFairy: Well, once we get the slang stuff solidified for 6.d, there'll be a stable API to do what perl6-debug does with the AST and it too can be booted back out to the ecosystem, the way I originally wanted things anyway. :)
10:25 konobi node's repl works pretty decently
10:25 ShimmerFairy FROGGS: if you insist that a default Linenoise and such shouldn't be in the repo, then what are NativeCall, Pod::To::Text, Test, or lib doing in there? Why is a Linenoise-ish module different from those?
10:25 FROGGS so we already had linenoise included in the compiler and we recognized this as a failure... just dont let us do it again
10:26 margeas joined #perl6
10:26 FROGGS ShimmerFairy: that's quite simple... lib and Test are used to run the spectests, and NativeCall is tied to the VM version
10:26 bjz joined #perl6
10:27 ShimmerFairy Could there really not even be a basic  REPL::Basics  , which just makes sure you can press the left and right arrows keys and have them do the right thing?
10:27 FROGGS if we can do this ultra portably, sure
10:27 FROGGS which is what the problem was
10:27 vytas ShimmerFairy++ and fix bugs like #121117
10:27 synbot6 Link:  https://rt.perl.org/rt3/Public/Bug/Display.html?id=121117
10:27 jnthn On Windows, without anything extra installed, the arrow keys (and up/down) already work perfectly well without needing modules, fwiw. :)
10:28 vytas so as i understand issue is with Linenoise not that it would not be welcomed?
10:28 FROGGS vytas: this is not about fancy REPL stuff, this is about how the REPL (shipped with "the compiler") works
10:29 FROGGS vytas: so even with Linenoise, you get this repl bug
10:29 ShimmerFairy FROGGS: I suppose my problem is that rakudo's REPL is laughably ridiculous unless you magically know that your compiler needs a couple more batteries it didn't come with (honestly, you might as well not have it and leave that to something like  perl6 repl.p6  , the way it is)
10:29 vytas I am talking about basic REPL, fancy would be fancy :)
10:30 FROGGS ShimmerFairy: why do you think a fancy REPL belongs to the very core compiler package?
10:30 apotheon joined #perl6
10:30 FROGGS vytas: we ship a very basic repl
10:30 FROGGS (with  rakudo)
10:31 dalecooper joined #perl6
10:31 vytas Ok i only started playing with perl6 yesterday, so maybe i am missing something. but the one that comes up after i type in "perl6" is not functioning.
10:31 vytas prompt comes as "> " i click enter it changes to "* "
10:31 FROGGS vytas: not functioning in what way?
10:32 vytas sounds like there is more than one prompt. - sorry for a bad joke
10:32 ShimmerFairy FROGGS: not overly-fancy, but the fact that    perl6 -e 'loop { say EVAL(prompt("> ")) }'    almost perfectly replicates the basic REPL is ridiculous.
10:33 FROGGS I dunno what the star is about but when you enter a statement it interprets and runs it...
10:33 jnthn FROGGS: I think the * was what the multi-line input was using?
10:33 vytas i see commits like "allow \ for multiple lines" - I try it - and it doesn't work
10:33 lizmat .botasnack
10:33 lizmat .botsnack   # not awake yet
10:33 yoleaux :D
10:33 synbot6 om nom nom
10:34 FROGGS jnthn: yes, though when I do: "<enter> say 42" it does nothing
10:34 jnthn FROGGS: Yeah. :/
10:35 FROGGS ShimmerFairy: so what do you want to have extra which would be portable?
10:35 konobi tried with a semi-colon at the end?
10:35 FROGGS no luck there
10:36 FROGGS vytas: the backslash does not seem to be handled... it will already evaluate the current line
10:36 ShimmerFairy FROGGS: I can see why you wouldn't want a REPL that gives you every bell and whistle, but I don't think you can avoid the fact that other compilers with a REPL are far more user friendly.
10:37 konobi huh... libuv in moarvm... interesting
10:37 vytas FROGGS, list is simple for me: "my @a = 1..3;" - should not print as i didn't ask it to. "{" should allow me to enter on next line. arrow back should work etc. :)
10:37 ShimmerFairy FROGGS: I think the REPL could use an introductory message, perhaps a nicer/more informative prompt than '>' (dunno what info it might provide), and as for features, at the very least the left and right keys should let me in-place edit, instead of print ^[[D and ^[[C
10:38 vytas python prints version, and that keyword "help" is available for more help
10:39 FROGGS ShimmerFairy: is see it this way: users will install either a package (rakudo+linenoise+other basic stuff) or use rakudobrew... installing the compiler only from the repo is like building gcc on your own... you know what you are doing and you know that you will have extra work
10:40 FROGGS ShimmerFairy: about the left/right cursor movements... is that portable to cmd.exe and powershell without needing to depend on external libraries?
10:40 jnthn FROGGS: YOu get it *for free* in cmd.exe!
10:40 FROGGS \o/
10:40 FROGGS jnthn: so everybody should use it :P
10:40 * jnthn wonders what the OSX situation is
10:40 konobi well, the debugger is just another repl really
10:41 jnthn Well yes, it's a bit surprising to me that the much maligned cmd.exe manages to provide a much better experience out of the box :P
10:41 FROGGS ShimmerFairy: please open an RT ticket about the core features the rakudo repl should provide... including a help mechanism and a greeting msg or so
10:42 ShimmerFairy FROGGS: ok, I'll ponder what useful basic features there should be and open a ticket. :)
10:43 konobi tput should work in most places
10:43 ely-se joined #perl6
10:44 ShimmerFairy FROGGS: btw, another concern of mine is that "image" thing: it just doesn't look good that rakudo's REPL isn't much better than a looping EVAL'd prompt. And despite how many people will use rakudobrew and such, there will be people who go more along my method and find themselves with a crappy REPL :)
10:44 FROGGS ShimmerFairy: aye, and then well will talk about what of these features will be implementable without loading a dll/so/dylib
10:45 ShimmerFairy FROGGS: agreed, my mind is gearing towards things that wouldn't be too stressful for nqp to implement itself.
10:46 konobi there's an npm library called "blessed" that does native terminal stuff directly using the "tput" methodology... no external dependencies needed.
10:46 vytas *from user point of view* i don't care where it comes from - i want "apt-get install perl6" to include working repl. :)
10:46 FROGGS konobi: that's unixish thinking though
10:46 FROGGS vytas: exactly
10:47 konobi iirc it works on windows too
10:47 FROGGS konobi: there is no tput on my windows box :o)
10:50 konobi it's a method
10:51 vytas FROGGS, at the moment https://packages.debian.org/source/sid/rakudo does not depend on Task::Star, should it ?
10:53 tokuhiro_ joined #perl6
10:53 moritz uhm, no
10:53 konobi yup... on windows you can do the same thing, just need to have a copy of the windows-ansi terminfo available.
10:53 moritz the other way 'round, maybe
10:54 vytas moritz, silly question, but same logic - one button to have repl not more :)
10:55 moritz vytas: well, Task::Star needs rakudo, so rakudo can't need Task::Star
10:55 moritz vytas: the typical solution is to recommend the installation of a meta package, like 'perl6-all' or so that depends on all of them
11:05 karol_ joined #perl6
11:14 * jdv79 will probably never understand why a REPL is an important feature
11:14 jdv79 moritz: can we up the max files limit on hack?
11:15 jdv79 elasticsearch gets very hungry it seems
11:24 moritz jdv79: I already did
11:24 jdv79 oh, thanks
11:28 jdv79 hmm, /proc says 100k but ulimit still says 2k and denies up'ing.  is that right?
11:30 ilmari check /etc/security/limits.conf?
11:30 Ven joined #perl6
11:32 kid51 joined #perl6
11:33 jdv79 moritz: https://gist.github.com/anonymous/950bf286dcc617e4d616
11:33 duncan_dmg joined #perl6
11:33 moritz jdv79: did you log in anew?
11:33 jdv79 yes, fresh shell
11:34 moritz jdv79: there's no line with 'nofile' in /etc/security/limits.conf
11:34 jdv79 does that one liner work for you?
11:35 moritz jdv79: nope
11:36 WizJin joined #perl6
11:36 moritz jdv79: now it does
11:36 moritz seems the absence of a limit doesn't mean it's unlimited :(
11:37 jdv79 took me a bit to fix it on my box here
11:39 jkva joined #perl6
11:42 vytas perl6 --doc=NonExisting shows shell rather than warning/error
11:45 Ven joined #perl6
11:47 Ven joined #perl6
11:49 Ven joined #perl6
11:56 chenryn_ joined #perl6
12:01 Ven joined #perl6
12:04 mayuresh joined #perl6
12:12 ely-se joined #perl6
12:13 rindolf joined #perl6
12:15 moritz vytas: please report bugs at https://github.com/perl6/doc/issues/
12:16 dalek rakudo-star-daily: a66e8d9 | coke++ | log/ (8 files):
12:16 dalek rakudo-star-daily: today (automated commit)
12:16 dalek rakudo-star-daily: review: https://github.com/coke/rakudo-star-daily/commit/a66e8d9dc5
12:20 dalek doc: 99228f0 | (Lloyd Fournier)++ | doc/Type/Routine.pod:
12:20 dalek doc: typo in routine signature
12:20 dalek doc: review: https://github.com/perl6/doc/commit/99228f0af3
12:24 grondilu Error while compiling, type X::Syntax::ConditionalOperator::PrecedenceTooLoose
12:24 grondilu operator: =>
12:24 grondilu at line 29755, near "?? $contro"
12:24 grondilu at gen/moar/stage2/NQPHLL.nqp:519
12:28 apotheon joined #perl6
12:28 bjz joined #perl6
12:29 Ven joined #perl6
12:29 sufrostico joined #perl6
12:31 vytas moritz, ok thanks
12:32 pb_ joined #perl6
12:34 cognominal joined #perl6
12:39 hohoho joined #perl6
12:44 Ven joined #perl6
12:47 ely-se joined #perl6
12:54 tokuhiro_ joined #perl6
12:56 apotheon joined #perl6
13:02 Ven joined #perl6
13:04 adu joined #perl6
13:05 ely-se joined #perl6
13:10 PsuzeannePsy joined #perl6
13:10 lichtkind joined #perl6
13:12 rarara_ joined #perl6
13:12 rarara_ m: constant \c :=12; c=11; say c;
13:12 camelia rakudo-moar 271e84: OUTPUT«Cannot modify an immutable Int␤  in block <unit> at /tmp/QAlx9VUVhJ:1␤␤»
13:12 rarara_ m: my \c :=12; c=11; say c;
13:12 camelia rakudo-moar 271e84: OUTPUT«Cannot modify an immutable Int␤  in block <unit> at /tmp/_j0HXk8FSx:1␤␤»
13:12 rarara_ are those exactly the same?
13:12 jnthn No
13:12 jnthn constant evaluates the RHS at compile time
13:13 vytas got randomly segfault http://pastebin.com/raw.php?i=hvCqJqx6
13:13 jnthn m: for ^5 { constant \c = do { say 'here'; 5 }; say c; }
13:13 camelia rakudo-moar 271e84: OUTPUT«here␤5␤5␤5␤5␤5␤»
13:13 jnthn m: for ^5 { my \c = do { say 'here'; 5 }; say c; }
13:13 camelia rakudo-moar 271e84: OUTPUT«here␤5␤here␤5␤here␤5␤here␤5␤here␤5␤»
13:14 jnthn rarara_: ^^ there's the difference
13:15 SuzieQueue joined #perl6
13:15 jnthn vytas: Reproducable?
13:15 rarara_ OK :)
13:16 vytas jnthn, trying now, it was very random because i clicked enter on yesterday's opened perl6 repl with empty prompt
13:16 jnthn vytas: Did you rebuild your Perl 6 since then?
13:17 vytas agh yes
13:17 jnthn Ah
13:17 vytas stupid me sorry
13:17 jnthn np...interesting failure mode
13:22 apotheon joined #perl6
13:26 cognominal joined #perl6
13:29 FROGGS joined #perl6
13:33 FROGGS m: my $foo = "foo foo"; say $foo ~~ s:2x{fo+}=q{bar}; say $foo
13:33 camelia rakudo-moar 271e84: OUTPUT«「foo」␤bar bar␤»
13:37 bjz_ joined #perl6
13:38 FROGGS $_ = "foo foo"; say s:2x{fo+} = q{bar};
13:38 FROGGS m: $_ = "foo foo"; say s:2x{fo+} = q{bar};
13:38 camelia rakudo-moar 271e84: OUTPUT«「foo」␤»
13:39 Woodi hallo today :)
13:40 FROGGS hi Woodi
13:40 Woodi m: say say "11" ~| "00"
13:40 camelia rakudo-moar 271e84: OUTPUT«11␤True␤»
13:41 Woodi also:  http://perldoc.perl.org/perlop.html#Bitwise-String-Operators   &&  Scheme/C#/PHP/... have such thing
13:44 FROGGS m: say "11" +| "00"
13:44 camelia rakudo-moar 271e84: OUTPUT«11␤»
13:45 FROGGS Woodi: why would we need an ~| op here?
13:45 ShimmerFairy Woodi: however, Perl 5 (and the other languages) operate on what we call a buffer (e.g. Blob, Buf, the utf8 type, etc.), and not so much on what we call a string
13:46 FROGGS aye
13:46 ShimmerFairy "The behavior of these operators is problematic (and subject to change) if either or both of the strings are encoded in UTF-8"  gives it away in the linked perldoc :)
13:49 FROGGS m: say "foo foo".match(m:2x/fo+/)
13:49 camelia rakudo-moar 271e84: OUTPUT«Method 'match' not found for invocant of class 'Any'␤  in block <unit> at /tmp/grVoL_tlzf:1␤␤»
13:49 FROGGS eww
13:50 FROGGS m: say "foo foo".match(/fo+/, :2x)
13:50 camelia rakudo-moar 271e84: OUTPUT«(「foo」 「foo」)␤»
13:50 jnthn FROGGS: That'd need to be rx: I think
13:50 FROGGS ahh
13:50 FROGGS m: say "foo foo".match(rx:2x/fo+/)
13:50 camelia rakudo-moar 271e84: OUTPUT«5===SORRY!5=== Error while compiling /tmp/gVZj_oiDXl␤Adverb x not allowed on rx␤at /tmp/gVZj_oiDXl:1␤------> 3say "foo foo".match(rx:2x/fo+/7⏏5)␤»
13:50 jnthn Heh :)
13:50 FROGGS :o)
13:50 jnthn OK, it hsas to be what you wrote
13:50 jnthn But m is "do it right now"
13:50 FROGGS *nod*
13:52 Ven joined #perl6
13:52 retupmoca joined #perl6
13:55 tokuhiro_ joined #perl6
13:56 vytas m: say [1,[2]].flat
13:56 camelia rakudo-moar 271e84: OUTPUT«(1 [2])␤»
13:57 vytas m: say ~[1,[2]]
13:57 camelia rakudo-moar 271e84: OUTPUT«1 2␤»
13:57 vytas does flat work only on top level ?
13:58 jnthn It works until it encounters a Scalar container, and an Array is a collection of Scalar containers.
13:58 jnthn But another way, and array is already flat by definition.
13:58 jnthn *an
13:58 jnthn *Put
13:58 jnthn gah, Friday typing
13:59 pmurias joined #perl6
14:00 [Coke] I think you mean typoing.
14:03 Ven joined #perl6
14:04 margeas joined #perl6
14:05 Ulti "/usr/share/dict/words".IO.words.classify(*.lc.comb.sort.join).sort({$^b.value.elems <=> $^a.value.elems})[0].say is a fun one liner and a little simpler than the equivalent from 2010 on RosettaCode http://rosettacode.org/wiki/Anagrams#Perl_6 :3
14:07 Ven Ulti: also, we can remove the \ from there!
14:08 * Ven never understood the diff. between classify and categorize
14:09 softmoth joined #perl6
14:10 Ven "+@($_)" <- is the @() really useful here?
14:10 Ven m: my $a = $[1, 2, 3]; say +$a
14:10 camelia rakudo-moar 271e84: OUTPUT«3␤»
14:11 [Coke] Ulti: if you're calling the same function on each sort item, you only need to specify it once. (I just tripped over this last week)
14:11 CurtisOvidPoe Where can I find documentation for things like Str:D (I don’t know what the :D is and I’d rather read all about that than just have someone tell me) :)
14:12 CurtisOvidPoe Though if you tell me, I promise not to be too upset.
14:12 FROGGS_ joined #perl6
14:13 Ven CurtisOvidPoe: it's a smiley. :D
14:13 CurtisOvidPoe Happy args are happy. But they’re also strange to me :)
14:13 Ven CurtisOvidPoe: https://perl6advent.wordpress.com/2013/12/02/day-02-the-humble-type-object/
14:13 CurtisOvidPoe Cheers!
14:13 RabidGravy joined #perl6
14:15 vytas how do i flatten something like @a = 1..9, a..z; ?
14:15 TimToady CurtisOvidPoe: S12:Abstract_vs_Concrete_types
14:15 synbot6 Link: http://design.perl6.org/S12.html#Abstract_vs_Concrete_types
14:15 yoleaux 09:07Z <Ven_> TimToady: http://irclog.perlgeek.de/perl6/2015-10-15#i_11381191 putting "Foo_" or "Foo-" would mean I'm reinventing namespacing for no reason. I want `::` to be about packages. the name is inside the package, the value is dynamically scoped
14:15 Woodi my $t = "This is "; my $s = "        SPARTA!"; my $p = "        Perl6"; say $t ~| $p;
14:15 Ven vytas: flat
14:15 Woodi m: my $t = "This is "; my $s = "        SPARTA!"; my $p = "        Perl6"; say $t ~| $p;
14:15 camelia rakudo-moar 271e84: OUTPUT«this is Perl6␤»
14:15 Ven m: my @a = flat 1..9, 'a'..'z'; say @a.perl;
14:15 camelia rakudo-moar 271e84: OUTPUT«[1, 2, 3, 4, 5, 6, 7, 8, 9, "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z"]␤»
14:17 vytas thanks
14:19 vytas my @a = 1..9, 'a'..'z'; my @b = flat @a; say @b.perl;
14:19 vytas m: my @a = 1..9, 'a'..'z'; my @b = flat @a; say @b.perl;
14:19 camelia rakudo-moar 271e84: OUTPUT«[1..9, "a".."z"]␤»
14:21 grondilu am I the only one who thinks there are two many quotes in 'a'..'z'?  Couldn't we have somthing like say <a..z>?
14:21 Ven please no
14:22 grondilu m: say <a..z>.perl # not sure what it is right now
14:22 camelia rakudo-moar 271e84: OUTPUT«"a..z"␤»
14:22 grondilu oh, just a string. ok.
14:23 ilmari <...> is just '...'.split(/\s+/)
14:23 [Sno] joined #perl6
14:23 Ulti [Coke]: would that get me the list sorted from highest to lowest though?
14:23 pink_mist <a .. z>?
14:23 Ulti or is there a :reverse adverb or something
14:24 grondilu m: say <a .. z>.perl
14:24 camelia rakudo-moar 271e84: OUTPUT«("a", "..", "z")␤»
14:24 pink_mist d'oh
14:24 jnthn m: say <a>..<z>
14:24 camelia rakudo-moar 271e84: OUTPUT«"a".."z"␤»
14:24 jnthn No quotes! ;)
14:25 ilmari m: say <a b>..<c d>
14:25 camelia rakudo-moar 271e84: OUTPUT«2..2␤»
14:25 FROGGS_ m: say <a b>...<c d>
14:25 camelia rakudo-moar 271e84: OUTPUT«(a b c d)␤»
14:25 FROGGS_ m: say <a c>...<x z>
14:25 camelia rakudo-moar 271e84: OUTPUT«(a c d e f g h i j k l m n o p q r s t u v w x z)␤»
14:25 FROGGS_ m: say <a c>...'z'
14:25 camelia rakudo-moar 271e84: OUTPUT«(a c d e f g h i j k l m n o p q r s t u v w x y z)␤»
14:26 TimToady Ulti: just use .sort({-*.value.elems)
14:26 TimToady er, s/\{//
14:28 TimToady m: say <1>..<9>
14:28 camelia rakudo-moar 271e84: OUTPUT«IntStr.new(1, "1")..IntStr.new(9, "9")␤»
14:28 TimToady hmm...
14:28 TimToady m: say list <1>..<9>
14:28 camelia rakudo-moar 271e84: OUTPUT«(1 2 3 4 5 6 7 8 9)␤»
14:28 Ulti TimToady aha thanks
14:28 Ulti also -*.value might be enough since it will default to the length in numeric context right?
14:29 TimToady probably
14:29 khw joined #perl6
14:30 Ven m: say [...] <a b>; # grondilu? :P
14:30 camelia rakudo-moar 271e84: OUTPUT«(a b)␤»
14:30 Ven aw.
14:30 Ven m: say [...] <a z>; # errr >.>
14:30 camelia rakudo-moar 271e84: OUTPUT«(a b c d e f g h i j k l m n o p q r s t u v w x y z)␤»
14:30 grondilu m: say [..] |<a z>
14:30 camelia rakudo-moar 271e84: OUTPUT«5===SORRY!5=== Error while compiling /tmp/wVy7nAJEfB␤Cannot reduce with .. because structural infix operators are diffy and not chaining␤at /tmp/wVy7nAJEfB:1␤------> 3say [7⏏5..] |<a z>␤    expecting any of:␤        argument list␤    …»
14:31 grondilu oh yeah
14:32 ely-se joined #perl6
14:32 grondilu m: say &[..](|<a z>)
14:32 camelia rakudo-moar 271e84: OUTPUT«"a".."z"␤»
14:32 Ven m: say [..]<a z>
14:32 camelia rakudo-moar 271e84: OUTPUT«5===SORRY!5=== Error while compiling /tmp/8iSbjP2Bsb␤Cannot reduce with .. because structural infix operators are diffy and not chaining␤at /tmp/8iSbjP2Bsb:1␤------> 3say [7⏏5..]<a z>␤    expecting any of:␤        argument list␤      …»
14:32 Ven m: say [..](<a z>)
14:32 camelia rakudo-moar 271e84: OUTPUT«5===SORRY!5=== Error while compiling /tmp/J47p9Ms0f2␤Cannot reduce with .. because structural infix operators are diffy and not chaining␤at /tmp/J47p9Ms0f2:1␤------> 3say [7⏏5..](<a z>)␤    expecting any of:␤        argument list␤    …»
14:32 grondilu m: say <a z>.&[..]
14:32 camelia rakudo-moar 271e84: OUTPUT«Too few positionals passed; expected 2 arguments but got 1␤  in block <unit> at /tmp/H2tEa3a4YK:1␤␤»
14:33 nine .tell psch I don't know what reposession is exactly, but what you describe sounds very much like it could be the cause for my strange bug in the bool_enum branch. Attribute and Bool both have strange objectids and both have a BEGIN .^compose
14:33 yoleaux nine: I'll pass your message to psch.
14:33 grondilu m: say &[..] |<a z>
14:33 camelia rakudo-moar 271e84: OUTPUT«any(sub infix:<..> ($min, $max) { #`(Sub+{<anon|80798352>}+{Precedence}|44790688) ... }, (a z))␤»
14:33 Ulti probably yes :) "/usr/share/dict/words".IO.words.classify(*.lc.comb.sort.join).sort(-*.value)[0].say   perhaps a bit too terse but kind of logical if you follow left to right
14:33 nine jnthn: do you think we're onto something here regarding my message to psch++?
14:34 s_kilk joined #perl6
14:35 jnthn nine: Maybe, though type objects aren't really meant to be subject to being repossessed 'cus they have no state
14:35 jkva joined #perl6
14:35 nine What exactly does reposession mean anyway?
14:38 moritz an object is defined in the setting
14:38 moritz so it's in the setting's serialization context
14:38 moritz now a precompiled module changes that object
14:38 moritz so it must be in the precompiled module's serialization context
14:39 moritz so it must somehow declare that it is now responsible for that object, and the setting should yield control over it
14:39 moritz that's called repossession
14:39 jnthn Right. Also I wrote some stuff up on it in the nqp internals course, but moritz++'s example nails it pretty well
14:40 [Coke] Ulti's one liner is wicked slow here. :|
14:40 Ulti yup
14:40 jnthn The more interesting case for Bool is that it's created in BOOTSTRAP, but it's meta-object and STable are changed while compiling CORE.setting, so I'd expect those two to be repossessed.
14:40 [Coke] Ulti: not that it matters much given that our dictionary is mostly ascii, but probably want .fc instead of .lc
14:41 Ulti well since a few days ago I do :P
14:41 Ulti jnthn++
14:42 TimToady Ven: what purpose is served by putting a name into a package if the value cannot be accessed through the package?  and it cannot, unless by dynamic scoping you mean "temporizing" rather than what Perl 6 means by dynamic scoping
14:42 Alina-malina joined #perl6
14:42 Ven TimToady: the value can (and has to) be accessed through the value
14:43 zakharyas1 joined #perl6
14:43 psch jnthn: so scwb{dis,en}able around Attribute.^compose would be the appropriate solution?
14:43 yoleaux 14:33Z <nine> psch: I don't know what reposession is exactly, but what you describe sounds very much like it could be the cause for my strange bug in the bool_enum branch. Attribute and Bool both have strange objectids and both have a BEGIN .^compose
14:43 Ven "the value is dynamic, the container isn't" – or something in sp6k
14:43 Ven TimToady: I'm not sure what temporizing means, maybe that's what I mean.
14:43 psch jnthn: in that context still can't help but wonder why moar doesn't exhibit the jvm SC problem...
14:43 ely-se Ven: you mean "through the name"
14:43 jnthn psch: Surely that'd mean we lose the changes?
14:43 Ven ely-se: yes, I do. thanks
14:43 jnthn psch: And Attribute comes out busted still?
14:43 TimToady temporizing means you're actually using global containers, which is not thread-safe
14:44 Ven ely-se: maybe you can describe it to TimToady++ better than I do ;-)
14:44 psch jnthn:  i don't know if we lose the changes on moar, but the SC stays BOOTSTRAP
14:44 psch *on jvm
14:44 ely-se dynamic variables that require declarations and those declarations must be either qualified or lexically in scope
14:44 jnthn psch: The SC of what exactly?
14:44 ely-se but yeah, in P6 I think you can just use regular lexically-scope variables, and use temp
14:45 Ven TimToady: scheme/racket/clojure-style `(parameterize ([param value]) (call...))` doesn't seem to require a global container to me?
14:45 jnthn psch: If you're seeing type objects themselves getting repossessed, that may well be a bug
14:45 psch jnthn: Attribute.  the problem on jvm is that the classHandle for Attribute gets repossessed to CORE.setting
14:45 ely-se although preferably thread-local
14:45 jnthn OK. I don't think type objects should ever get repossessed. Because...they don't have any state..
14:45 ely-se is the modification done by temp thread-local?
14:46 psch jnthn: so the problem is that composition somehow repossesses even though it shouldn't..?
14:46 TimToady ely-se: only if the lexical is declared inside the thread
14:47 jnthn psch: Sounds like. I can try to find out if we ever repossess a type object on Moar I guess
14:47 ely-se :(
14:48 psch jnthn: that could be a hint, thanks
14:48 TimToady temp is not our preferred dynamic scoping mechanism
14:48 Ven my is :P
14:49 ugexe curious, what does `trace` do that turns the $x from a Hash into a Block?
14:49 TimToady indeed, but my has nothing to do with packages
14:49 ely-se It's trivial to implement Clojure-like dynamic variables though
14:49 ugexe m: my $x = { :ok(1) }; say $x.WHAT
14:49 camelia rakudo-moar 271e84: OUTPUT«(Hash)␤»
14:49 jnthn psch: You may want to try and work out what causes that to happen on JVM too
14:49 ugexe m: use trace; my $x = { :ok(1) }; say $x.WHAT
14:49 camelia rakudo-moar 271e84: OUTPUT«2 (/tmp/BJv0oLmAfY:1)␤my $x = { :ok(1) }␤7 (/tmp/BJv0oLmAfY:1)␤say $x.WHAT␤(Block)␤»
14:49 rindolf joined #perl6
14:49 ely-se all you need is thread-local variables and try/finally
14:50 Ven TimToady: indeed, it'd be around `our` and `temp`
14:50 TimToady and those are globals
14:50 Ven m: module A { our $*a = 5; }; say $A::*a;
14:50 camelia rakudo-moar 271e84: OUTPUT«5===SORRY!5=== Error while compiling /tmp/BUbKwFPbN5␤Variable '$A' is not declared␤at /tmp/BUbKwFPbN5:1␤------> 3module A { our $*a = 5; }; say 7⏏5$A::*a;␤»
14:50 psch jnthn: yeah, i think i have an idea or two for what i could look for
14:52 Ulti [Coke]: http://mattoates.co.uk/files/perl6/anagram_profile.html  looke liks classify-list is taking up about the same time as the function its calling, assuming I read the call graph right
14:53 Ulti also the profiler output is way nicer than the last time I looked at it!
14:55 TimToady Ven: we are not going to let people confuse temp variable notation with dynamic variable notation in Perl 6
14:55 TimToady if you want temp vars, you don't need the *
14:59 TimToady and I believe that our lexically-based dynamic variables address the need for thread-local storage adequately without multiplying entities that will lead to user confusion
15:00 TimToady We're feebly trying to keep Perl 6 a language that mere mortals can use...
15:03 n0tjack joined #perl6
15:04 n0tjack is there a Twitter module for p6?
15:06 ely-se How about immortals like me?
15:06 TimToady you can write modules :)
15:07 ely-se mortules
15:07 n0tjack TimToady: I "could" yodel, too. Just don't feel like learning how ;)
15:08 n0tjack I figure my next little self-assignment to learn p6 would be a OEIS twitter bot. You @tweet it a series of integers, and it uses the OEIS API to suggest potential functions to generate that series.
15:09 weihan joined #perl6
15:09 n0tjack To date, all my projects have been functional, which is where I'm comfortable. I figured I'd try something stateful, with more moving parts.
15:10 TimToady I don't see where state comes into this problem
15:10 n0tjack connection to twitter
15:10 TimToady I guess
15:10 n0tjack and I'd figured I'd put in a little memoization/caching
15:11 n0tjack I don't want to hammer the OEIS if I can help it
15:12 TimToady I'd just load OEIS into a trie or some such
15:12 mrf Is there a characted class for 'Is a Control char'. Or better is a 'Non Whitespace Control char'?
15:13 TimToady m: say uniprop(3)
15:13 camelia rakudo-moar 271e84: OUTPUT«Cc␤»
15:13 * mrf is learning grammers by generating the RFC-2822 spec
15:13 jnthn I think the <control> rule in a regex will doit
15:13 geekosaur m: say uniprop(160)
15:13 camelia rakudo-moar 271e84: OUTPUT«Zs␤»
15:14 mrf TimToady: is that not the physicall CTRL key?
15:15 TimToady wha?
15:15 * TimToady is not even sure that rises to the level of category error...
15:15 pink_mist keyboard scancodes don't have unicode properties 0_o
15:15 Ven TimToady: I don't think mortals will use many dynamic variables. And maybe they'd be grateful they're not getting their dynamic values overriden by some other module
15:16 * mrf is clearly being misleading here.
15:16 ugexe token obs-NO-WS-CTL { <[\c[1]..\c[8]\c[11,12]\c[14]..\c[31]\c[127]]> }
15:16 mrf I am looking for something that will match all ASCII control characters excluding \s matchs
15:16 ugexe you can use this as a reference mrf: https://github.com/ugexe/Perl6-Grammar--HTTP/blob/master/lib/Grammar/HTTP/RFC5322.pm6
15:16 mrf ugexe: That looks good
15:18 hoelzro o/ #perl6
15:19 mrf ugexe++ Thank you that looks perfect
15:19 * jnthn missed why <control> doesn't cut it... :)
15:19 mrf ugexe: Also indicates that serveral of the shared rules/tokens between MIME headers and HTTP could form some sort of parent class.
15:20 mrf jnthn: Can I do <-[\s]> & <control>?
15:20 ugexe mrf: yep. they share tokens
15:20 mrf s/class/grammer
15:20 jnthn mrf: yes
15:20 jnthn Well
15:20 jnthn <control-[\s]>
15:20 tony-o m: use trace; my $x = { :ok(1); }; $x<ok>.say;
15:20 camelia rakudo-moar 271e84: OUTPUT«2 (/tmp/cvO2oQ62_u:1)␤my $x = { :ok(1); }␤7 (/tmp/cvO2oQ62_u:1)␤$x<ok>.say␤Type Block does not support associative indexing.␤  in block <unit> at /tmp/cvO2oQ62_u:1␤␤Actually thrown at:␤  in block <unit> at /tmp/cvO2oQ62_u:1␤␤»
15:20 tony-o m: my $x = { :ok(1); }; $x<ok>.say;
15:20 camelia rakudo-moar 271e84: OUTPUT«1␤»
15:20 muraiki joined #perl6
15:21 ugexe mrf: if you break your tokens into 'roles' then you can share them between each other
15:22 mrf jnthn: is that literally 'The Control names group without \s'? Its not a syntax I have seen (All the perl6 regex is very new)
15:22 ugexe grammar HTTP::Grammar does (RFC1, RFC2) { }
15:22 jnthn mrf: Yes
15:23 ugexe im not sure how well the perl6 tokens for things like \n, \s, etc map up with the RFC definitions though
15:23 mrf jnthn: thats cool.
15:24 konobi well, there's the rfc standard for "Message" which is the same for http, email, nntp, etc.
15:24 mrf ugexe: for most of the 2822 spec it uses Folded whitespace which seems to be \s*
15:26 mrf ugexe: OOI why do all the named groups have a preceeding period. e.g <.FWS> ?
15:26 mrf ugexe: ^ In Grammer::HTTP::RFC5322
15:26 ugexe because capturing those slow it down immensely, and those captures are not used
15:27 mrf ugexe: so <> is a named version of ()?
15:27 ugexe m: say "\n" ~~ /\s/
15:27 camelia rakudo-moar 271e84: OUTPUT«「␤」␤»
15:27 mrf and <.> is like []
15:28 ugexe thats why you cant just use the default perl tokens for everything
15:29 ugexe for the most part
15:29 ugexe i dont understand the comparison to [] though
15:30 mrf [] is a non capturing group no?
15:31 mrf ugexe: IIRC WSP is \h and \t only and FWS includes \v, \n and \r so becomes \s
15:31 konobi that'd be (?:)
15:32 ugexe [] is a group yes. <.token-name> is the same as <token-name>, except there will be no token-name => SomeValue in the match object
15:33 mrf ugexe: I am not sure how that is different from 'non-capturing named group' but I may be missing things
15:33 mrf konobi: I was under the impression that (?:) had been replaced by []
15:33 ugexe if you wanted to repaste your entire grouping in between [ and ], it would be no different
15:34 jnthn Well, not quite
15:34 jnthn [...] is just a group
15:34 psch jnthn: i didn't see any repossession of SMOs with isconcrete == 0 (fwiu, that's equivalent to "is a TypeObject")
15:34 jnthn If you capture inside of the group it's still a capture
15:34 jnthn psch: Yes, isconcrete == 0 is exactly equivalent
15:35 psch jnthn: but considering type objects never get repossessed, isn't a comparison that checks the SC when looking for an attribute on an object bound to eventually fail?
15:35 psch jnthn: i mean, that's the bandaid, right.  "ignore SC when looking for the hintMap"
15:36 jnthn I'm not sure why we'd look at SC there; on Moar we just look at the type object to match, I *think*
15:37 psch https://github.com/perl6/nqp/blob/master/src/vm/jvm/runtime/org/perl6/nqp/sixmodel/reprs/P6OpaqueBaseInstance.java#L17 # this line used to not have the ".st" on both sides of ==
15:37 timo joined #perl6
15:37 psch i'm just not sure that's a sufficient fix, which is why i keep revisiting it... :)
15:38 jnthn It's odd that it'd need that
15:38 jnthn Comparing the two type objects should just work out
15:38 jnthn So yeah, I agree something deeper is going wrong
15:38 psch maybe we need an .equals..?
15:39 jnthn No, they really should be exactly the same objects
15:39 jnthn Reference equality should be enough
15:39 psch well, the LHS is an Attribute object from CORE, the RHS is the Attribute type object from BOOTSTRAP
15:39 psch and the classHandle is both cases references the SC
15:39 psch *in
15:40 jnthn Yeah, that's what shouldn't be happening. Hmm.
15:40 psch the classHandle shouldn't know the SC?
15:41 jnthn No
15:42 jnthn The Attribute type ocject from cORE should be the one from BOOTSTRAP
15:42 jnthn There shouldn't be two of them
15:42 jnthn I don't see how that's happening
15:42 nine That's exactly what I see with Bool
15:43 jnthn But curiously not with Attribute on Moar, it seems.
15:43 nine As far as I remember that was my first question for this bug: if type objects created in BOOTSTRAP are copied somewhere
15:44 jnthn nine: Well, apparently this one is being, but "should it be"...well, no.
15:44 blackcat joined #perl6
15:44 jnthn https://github.com/MoarVM/MoarVM/blob/master/src/6model/reprs/P6opaque.c#L24 gets by on pointer equiv, not STable equiv, just to verify
15:51 loren I write a simple ftp client module, Net::Ftp will be a valid name? https://github.com/araraloren/Net-Ftp
15:52 avar Net::FTP would be better :)
15:54 loren Hm, thank u, avar
15:55 uruwi joined #perl6
15:55 s_kilk joined #perl6
15:57 llfourn joined #perl6
15:57 tokuhiro_ joined #perl6
15:59 jdv79 looks like the tests for a module of mine are faster since maybe 6 months ago
16:00 jdv79 now only 1 order of mag behind p5 instead of 2 i think they were
16:00 jdv79 profile still dominated with listy stuff though:(
16:01 jnthn jdv79: In exclusive time or inclusive?
16:01 jnthn It'll often rank high in inclusive
16:01 jdv79 exclusive
16:02 jdv79 though to a lesser degree than before iirc
16:02 jnthn Yeah
16:02 jnthn There's still some hotspots, though they tend to be more isolated and smaller pieces of code than before at least
16:07 Ven joined #perl6
16:08 dalek rakudo/nom: 9a78309 | ugexe++ | src/core/Supply.pm:
16:08 dalek rakudo/nom: Fix precedence for Supply status
16:08 dalek rakudo/nom:
16:08 dalek rakudo/nom: Fixes JVM build
16:08 dalek rakudo/nom: https://travis-ci.org/rakudo/rakudo/jobs/85681162#L330
16:08 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/9a7830929a
16:08 dalek rakudo/nom: c60e687 | lizmat++ | src/core/Supply.pm:
16:08 dalek rakudo/nom: Merge pull request #553 from ugexe/patch-5
16:08 dalek rakudo/nom:
16:08 dalek rakudo/nom: Fix precedence for Supply status
16:08 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/c60e6870bd
16:09 mayuresh joined #perl6
16:09 mayuresh hello :)
16:10 dalek rakudo/p6for_op: ba14084 | (Stefan Seifert)++ | src/Perl6/Actions.nqp:
16:10 dalek rakudo/p6for_op: Work in progress: p6for desugar op
16:10 dalek rakudo/p6for_op:
16:10 dalek rakudo/p6for_op: Move some <for> logic into a desugar op for easier handling by the optimizer.
16:10 dalek rakudo/p6for_op: Label handling still broken in this commit.
16:10 dalek rakudo/p6for_op: review: https://github.com/rakudo/rakudo/commit/ba140845ed
16:11 mayuresh i just realized that perl6 is such a beast!
16:11 mayuresh i might as well base my 'pxn' project around the ideas of smalltalk execution environment.
16:11 ugexe a beast with wings
16:12 mayuresh pxn == Perl6 eXecution eNvironment. :)
16:13 mayuresh ugexe, yeah, a beast with wings, quite like the mythical pegasus
16:13 mayuresh ;)
16:14 ^elyse^ joined #perl6
16:15 pmurias mayuresh: what is pxn supposed to be?
16:15 rindolf joined #perl6
16:16 [Coke] pmurias: IIRC, a new backend that doesn't separate the compiler from the vm.
16:16 mayuresh pmurias, a combined compiler + virtual machine.
16:17 pmurias combined in what way?
16:17 mayuresh one should be able to "run" perl6 code the way people presently run perl5 code.
16:18 mayuresh no need to first compile it, and then separately execute it on a 'vm'.
16:18 flussence so basically PHP?
16:18 [Coke] mayuresh: you know you don't have to do that with rakudo,r ight?
16:18 mayuresh flussence, yeah somewhat! :)
16:18 [Coke] you can run it without generating moarvm bytecode files.
16:19 mayuresh [coke], i had no idea about that.
16:19 [Coke] pmurias: I just saw your blog post about nqp-js! that's great news!
16:19 [Coke] mayuresh: ./perl6 -e '3.say' - that doesn't generate a moarvm bytecode file on disk.
16:19 mayuresh nqp-js! does that mean p6 will be compiled for node.js?
16:19 mayuresh [coke], what about an entire program written in a file?
16:20 [Coke] same.
16:20 mayuresh cool.
16:20 pmurias mayuresh: commpiled to js, to be run either on node.js or in the browser
16:20 [Coke] you only get moarvm bytecode output if you ask for it with --target
16:20 mayuresh pmurias, you worked on that! cool man.
16:20 mayuresh [coke], then why go for all that 'vm' stuff in the first place?
16:21 pmurias [Coke]: node nqp-bootstrapped.js runs 8 nqp tests, working on bug fixes and missing small things to pass the other ones
16:21 [Coke] pmurias: still need to config with moarvm & js in the backend?
16:21 [Coke] mayuresh: it's still running in the vm.
16:22 mayuresh which 'vm'? if not moar, then there's a 'vm' inside of rakudo?
16:22 pmurias [Coke]: yes
16:22 [Coke] mayuresh: no, moar.
16:22 mayuresh dang, now i am confused.
16:22 [Coke] mayuresh: it's running in the moar vm. there's just no external moarvm bytecode files generated.
16:22 mayuresh so if my system has just rakudo, and no moarvm, will i be able to "run" p6 code?
16:23 [Coke] no
16:23 flussence unless it's nqp-jvm
16:23 mayuresh :)
16:23 pmurias [Coke]: nqp-js running on top of moarvm can compile nqp-js, nqp-js running on top node of can't compile itself yet
16:23 [Coke] pmurias: ok.
16:23 mayuresh [coke], does that mean, p6 "has" to rely on those two separate components? a compiler (rakudo) and a 'vm' (moarvm)?
16:24 mayuresh don't you think it would be better to have a slimmer and more focused all-in-one execution system for p6?
16:24 jnthn mayuresh: Problem not *has* to, but it's the practical way to implement it.
16:25 mayuresh i have just been intrigued by process managers embedded in interpreters.
16:25 jnthn mayuresh: Something somewhere needs to do the gutsy stuff (garbage collection, I/O, abstracting away OS differences in various other places).
16:25 [Coke] mayuresh: I might slightly prefer it, but what jnthn said. it took us a long time to get -here-. it would have taken even longer to get there without going here first.
16:25 mayuresh ture.
16:25 mayuresh true
16:25 mayuresh i agree
16:25 [Coke] so, I wish you well on your journey, but I'm staying focused on rakudo.
16:25 jnthn mayuresh: At the same time, you really need to write most of a Perl 6 compiler in Perl 6
16:25 mayuresh and i don't look down on your work at all.
16:25 mayuresh [coke] please do, and thanks for the wishes.
16:26 jnthn mayuresh: For example, you'll really struggle to implement Perl 6 if you don't parse it using a Perl 6 grammar.
16:26 mayuresh jnthn, okay.
16:27 mayuresh i think it would be better if i do work on the 'pxn', i really want to learn about how to do what i intend to do. :)
16:27 [Coke] pmurias: sadly, the build died. presumably my old not-quite-the-right-node issues. :|
16:27 jnthn Learning about compilers/interpreters/language impl is always worth it :)
16:27 pmurias [Coke]: please paste the error log
16:28 mayuresh [coke] why not use io.js?
16:28 mayuresh jnthn, it is very intriguing, the way those systems work. :)
16:28 konobi io.js doesn't exist anymore =0P
16:28 jnthn mayuresh: Very. It's a fun area. :-)
16:28 timotimo i think they merged back together with node.js
16:28 konobi yup
16:29 pmurias didn't node.js merge back into io.js?
16:29 konobi io.js -> node.js
16:29 s_kilk io.js essentially became node.js 4.0
16:29 [Coke] pmurias: : https://gist.github.com/coke/1b4ce850129de526dd58
16:30 mayuresh s_kilk, coolness. :)
16:30 pmurias mayuresh: re better to have it all-in-one, not really
16:30 konobi though node is now v4.2.1
16:31 mayuresh pmurias, may i know why? to understand why i am thinking weirdly.
16:32 flussence even perl5 has separate parser and opcode vm stages
16:33 [Coke] mayuresh: what problem are you trying to solve?
16:33 pmurias mayuresh: moarvm and rakudo are kept seperate mostly to keep order in the repos and to allow different backends
16:33 pmurias mayuresh: having the code just tangled together doesn't really give us anything
16:33 pmurias [Coke]: you are building things from inside the nqp-js directory
16:34 pmurias [Coke]: it seems the modules built correctly but touch node_modules/npm_installed failed
16:34 mayuresh [coke], not solving a specific problem, especially when none exists in a big way.
16:34 mayuresh [coke], just learning, and going in a different direction than what exists at the moment.
16:34 jnthn mayuresh: There's probably lots of interesting answers, but for me it's an exercise in complexity management - that is, keeping different things apart, so they can be understood in relative isolation - because having to understand it all at once is too much for anyone.
16:35 konobi pmurias: oh... nqp-js is atop node?
16:35 mayuresh jnthn, okay, is that high level of complexity there because p6 is such a beast of a language?
16:36 mayuresh jnthn, btw, if i understood it right, live object systems like smalltalk, java, dart, all do need a 'vm' like approach, right?
16:36 mayuresh jnthn, is that why p6 too is going with a 'vm'?
16:37 [Coke] is node_modules supposed to be a directory under nqp build dir?
16:37 pmurias yes
16:37 flussence any non-trivial language (basically, anything more useful than VB/PHP) uses a vm, whether or not it makes it visible
16:37 mayuresh by live objects, i imply the opposite of dead objects, like in c++ and ada.
16:37 [Coke] didn't get built.
16:38 jnthn mayuresh: It's a factor to some degree, but if you look at most language implementations that are used in the wild, they're all pretty involved in their own ways, and the folks building them have found typically found ways to cope with that by breaking it into manageable parts.
16:38 [Coke] I just did a config, then 'make js-all' - maybe a mis-ordered dep? i see it in there under one of the build targets.
16:39 pmurias did stuff get installed into /Users/williamcoleda/node_modules/nqp-runtime/?
16:39 [Coke] yes
16:39 ^elyse^ joined #perl6
16:40 pmurias konobi: the browsers are the real target I'm interested in, I'm just using node.js because it always to easily run stuff on the command line
16:40 mayuresh jnthn, true, but, i am so impressed with smalltalk, it's a zang crazily well designed system of live objects.
16:40 mayuresh the only thing that's better would be "self".
16:40 jnthn Yes, Smalltalk is neat :-)
16:40 jnthn We borrowed ideas from there and from CLOS for the Perl 6 MOP.
16:40 pmurias [Coke]: seems strange
16:40 * jnthn needs to go and make dinner :-)
16:40 jnthn bbl o/
16:40 Ven .oO( we added only a few operators )
16:41 mayuresh jnthn, you guys went all the way of 'clos'!! that's rather neat.
16:41 pmurias [Coke]: where did you get your node.js from?
16:41 mayuresh jnthn, have a good meal. :)
16:43 weihan joined #perl6
16:43 konobi pmurias: mkay... well, if you have node/npm specific questions, lemme know
16:45 mayuresh just a bit off-topic; are any of you guys on twitter too?
16:46 dalek nqp: 0c4bb9a | (Pawel Murias)++ | src/vm/js/ (4 files):
16:46 dalek nqp: [js] Make nqp::unshift work on captures.
16:46 dalek nqp:
16:46 dalek nqp: Pass tests 06 and 08.
16:46 dalek nqp: review: https://github.com/perl6/nqp/commit/0c4bb9a89d
16:46 dalek nqp: 6fe7900 | (Pawel Murias)++ | tools/build/ (2 files):
16:46 dalek nqp: [js] fix a build issue when there is a node_module in a ancestor directory.
16:46 dalek nqp: review: https://github.com/perl6/nqp/commit/6fe7900bae
16:46 ab6tract joined #perl6
16:47 ab6tract o/ #perl6
16:47 pmurias [Coke]: it seemed there was a build issue if you had a node_modules already in your homedirectory
16:47 pmurias [Coke]: thanks for finding the bug
16:47 mayuresh hi ab6tract. :)
16:48 ab6tract hi mayuresh :)
16:48 ab6tract can someone in the know tell me what this doc should look like in light of multi-dem ASSIGN-POS? http://doc.perl6.org/routine/ASSIGN-POS
16:48 weihan joined #perl6
16:48 konobi pmurias: to avoid npm from doing silly things like using node_modules in a homedir, make sure that there's a package.json in the folder above node_modules
16:48 ab6tract is it even supported outside of core?
16:49 ab6tract sorry to keep harping on this, but it's a blocker on the async Terminal::Print :)
16:50 [Coke] pmurias: macports
16:51 psch m: say Any.^can('ASSIGN-POS')[0].candidates[*-1].signature
16:51 camelia rakudo-moar 271e84: OUTPUT«($: **@indices, *%_)␤»
16:51 psch interestingly that doesn't have a defined invocant in CORE...
16:52 ab6tract ooof... what does $: mean in that signature?
16:52 psch ab6tract: it's an anonymous invocant
16:52 ab6tract psch: m: class A { has @!a; method ASSIGN-POS(**@b) { my $v = @b.pop; @!a[ @b[0],@b[1] ] = $v }; method AT-POS(**@b) { @!a[ @b[0], @b[1] ] } }; my $t = A.new; $t[6;7] = "fooo"; dd $t[6;7]
16:53 ab6tract erm
16:53 ab6tract m: m: class A { has @!a; method ASSIGN-POS(**@b) { my $v = @b.pop; @!a[ @b[0],@b[1] ] = $v }; method AT-POS(**@b) { @!a[ @b[0], @b[1] ] } }; my $t = A.new; $t[6;7] = "fooo"; dd $t[6;7]
16:53 camelia rakudo-moar 271e84: OUTPUT«("fooo", Any)␤»
16:53 ab6tract psch: ^^
16:53 ab6tract m: m: class A { has @!a; method ASSIGN-POS(**@b) { my $v = @b.pop; $v.WHAT.say @!a[ @b[0],@b[1] ] = $v }; method AT-POS(**@b) { @!a[ @b[0], @b[1] ] } }; my $t = A.new; $t[6;7] = "fooo"; dd $t[6;7]
16:53 camelia rakudo-moar 271e84: OUTPUT«5===SORRY!5=== Error while compiling /tmp/FV6_5Rbx67␤Two terms in a row␤at /tmp/FV6_5Rbx67:1␤------> 3-POS(**@b) { my $v = @b.pop; $v.WHAT.say7⏏5 @!a[ @b[0],@b[1] ] = $v }; method AT-PO␤    expecting any of:␤        infix␤        infi…»
16:53 ab6tract m: m: class A { has @!a; method ASSIGN-POS(**@b) { my $v = @b.pop; $v.WHAT.say; @!a[ @b[0],@b[1] ] = $v }; method AT-POS(**@b) { @!a[ @b[0], @b[1] ] } }; my $t = A.new; $t[6;7] = "fooo"; dd $t[6;7]
16:53 camelia rakudo-moar 271e84: OUTPUT«("fooo", Any)␤»
16:54 psch ab6tract: CORE adds the last element seperately
16:54 psch or assigns, rather
16:55 ab6tract psch: ^^ that's following what I found in src/core/Array.pm
16:55 konobi pmurias: seems like that build structure is kinda wonky for npm
16:55 psch ab6tract: oh, i was looking at Any
16:56 dalek perl6-examples: 4b3170e | moritz++ | categories/games/blackjack.p6:
16:56 dalek perl6-examples: Fix blackjack.p6
16:56 dalek perl6-examples:
16:56 dalek perl6-examples: closes #35
16:56 dalek perl6-examples: review: https://github.com/perl6/perl6-examples/commit/4b3170e38b
16:56 ab6tract ' self.AT-POS(@indices) = value' ... curious
16:57 ab6tract psch: a bit surprised not to be finding this stuff in Positional
16:57 ab6tract I'll look into Any.pm
16:57 nine ab6tract: array_slice.pm
16:58 ab6tract thanks nine! nice to read you btw
16:58 mayuresh alrighty, time for me to hit bed.
16:58 pmurias konobi: what would be the sane way of doing the build?
16:59 mayuresh thanks for the healthy discussion people.
16:59 pmurias konobi: or is just having package.json enough?
16:59 mayuresh it has been a pleasure chatting with you all. :)
16:59 TimToady sleep well
16:59 mayuresh mr. wall!!
16:59 mayuresh cool.
16:59 konobi pmurias: lemme see if I can build this locally
16:59 mayuresh sure, yes, will. :)
17:00 TimToady you should try to avoid excitement at bedtime :)
17:00 mayuresh :D
17:00 mayuresh it's unavoidable. ;)
17:00 mayuresh bye. :)
17:00 nine ab6tract: likewise :)
17:01 ab6tract nine: so am I to read this as: the answer is BIND-POS ? ;P
17:02 dalek rakudo/nom: 82d4eac | lizmat++ | src/core/ (2 files):
17:02 dalek rakudo/nom: Make X::Adverb::Slice more general as X::Adverb
17:02 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/82d4eac2f4
17:02 dalek perl6-examples: 62bfdc9 | moritz++ | categories/games/tictactoe.p6:
17:02 dalek perl6-examples: GLR-Fixes for tictactoe.p6, closes #34
17:02 dalek perl6-examples: review: https://github.com/perl6/perl6-examples/commit/62bfdc97f1
17:02 konobi pmurias: any nqp-js specific args to Configure.pl?
17:03 dalek roast: a367d98 | lizmat++ | S (3 files):
17:03 dalek roast: Handle X::Adverb::Slice -> X::Adverb conversion
17:03 dalek roast: review: https://github.com/perl6/roast/commit/a367d98861
17:03 pmurias --backends=moar,js
17:03 konobi ta
17:03 ab6tract pmurias: you are awesome :)
17:04 pmurias konobi: ta?
17:05 konobi pmurias: "thanks"
17:05 pmurias ok :)
17:05 dalek perl6-examples: 6bbe840 | moritz++ | categories/games/wizard.pl:
17:05 dalek perl6-examples: Avoid a warning in wizard.pl
17:05 dalek perl6-examples:
17:05 dalek perl6-examples: no fix the the actual problems yet
17:05 dalek perl6-examples: review: https://github.com/perl6/perl6-examples/commit/6bbe840858
17:06 moritz uhm, did wizard.pl ever work?
17:07 nine ab6tract: sorry, network is laggy as hell. Am not really sure what you're trying to do, but array_slice.pm contains an important part of the code dealing with...well array slices ;)
17:09 konobi pmurias: the "sleep" module probably wants to be updated to use "bindings"
17:10 pmurias it doesn't build?
17:10 ab6tract nine: I'm trying to write a multi-dim ASSIGN-POS for a class. I can't just use a 'handles' trait because I want to use the ASSIGN-POS sub to send them into a supply
17:10 konobi it does... but you'll never get a debug build that way
17:11 dalek perl6-examples: 5296582 | moritz++ | categories/games/wizard.pl:
17:11 dalek perl6-examples: Partial fix for wizward.pl
17:11 dalek perl6-examples:
17:11 dalek perl6-examples: this cannot have worked for a looong time. There were type constraints
17:11 dalek perl6-examples: that had no chance of ever working, so it must be from a type before
17:11 dalek perl6-examples: we enforced attribute type checks.
17:11 dalek perl6-examples: review: https://github.com/perl6/perl6-examples/commit/5296582a49
17:11 nine ab6tract: I guess you'll need to implement a couple other methods like EXISTS-POS
17:11 konobi pmurias: so basicially "node_modules" is the build output for the js backend?
17:11 ab6tract nine: ok, I've got AT-POS already
17:11 pmurias yes
17:12 pmurias konobi: the sleep module is just something I found on npm
17:13 dalek rakudo/p6for_op: ee8b0cb | (Stefan Seifert)++ | src/Perl6/Actions.nqp:
17:13 dalek rakudo/p6for_op: Work in progress: p6for desugar op
17:13 dalek rakudo/p6for_op:
17:13 dalek rakudo/p6for_op: Move some <for> logic into a desugar op for easier handling by the optimizer.
17:13 dalek rakudo/p6for_op: S04-statements/for.rakudo.moar fails
17:13 dalek rakudo/p6for_op: Need to do the same for statement modifier <for>, too.
17:13 dalek rakudo/p6for_op: review: https://github.com/rakudo/rakudo/commit/ee8b0cb550
17:13 ab6tract nine: from a class composition standpoint, though, the absolute most ideal situation would be to be able to define something like: method ASSIGN-POS($x,$y,$val)
17:14 konobi pmurias: mkay... i'd suggest an nqp-js directory with node_modules inside it... then you can add package.json in there, specify required dependencies (including elsewhere on the filesystem)
17:14 ab6tract if I only want to provide two-dimensional interaction with my object
17:15 nine ab6tract: sure. As long as we keep the hot paths fast :) Array interaction is kind of important in Perl ;)
17:15 nine Have to leave now... cya
17:16 konobi pmurias: (even running `npm init nqp-js` should give a reasonable layout)
17:17 ab6tract nine: still getting the same ol' error. "Cannot assign to a readonly variable or a value". AT-POS works fine though
17:18 pmurias konobi: that nqp-js directory should then be used as the build output?
17:19 konobi pmurias: yup... and I'd have a lib directory and put the generated JS files in there
17:19 ab6tract nine: even stranger, ASSIGN-POS works fine during subemethod BUILD
17:20 ab6tract nine: https://gist.github.com/ab5tract/bb20ff79dddf965febe4
17:20 ab6tract in case it piques your interest
17:21 pmurias konobi: is npm expected to rebuild all my dependencies everytime I run npm install src/vm/js/nqp-runtime?
17:21 ab6tract ... doh
17:21 konobi not all of them
17:23 ab6tract nope, nevermind. Not a 'doh' after all. Storying a container in the @!grid during BUILD doesn't change anything
17:23 konobi pmurias: if you declare nqp-runtime as a local fs dependency... then `npm install .` will rebuild all
17:24 pmurias konobi: it rebuilds things such as sleep
17:24 duncan_dmg left #perl6
17:29 konobi pmurias: yeah, sorta the nature of the npm beast
17:31 n0tjack joined #perl6
17:31 pfhork joined #perl6
17:31 pfhork is there a similar perl5 channel?
17:31 konobi pmurias: though you could use npm link to avoid that
17:34 pmurias pfhork: there is a #perl channel for Perl 5 questions
17:34 konobi but that's on irc.perl.org
17:35 [Coke] konobi: there's a #Perl on freenode, also.
17:35 konobi oh right
17:36 pfhork thanks; I didn't know my way around the irc commands and listing channels and such (links to ref/docs accepted). ttyl
17:37 pmurias konobi: #perl on freenode is the one where you want to ask questions on
17:37 dalek perl6-roast-data: 43e9e89 | coke++ | / (9 files):
17:37 dalek perl6-roast-data: today (automated commit)
17:37 dalek perl6-roast-data: review: https://github.com/coke/perl6-roast-data/commit/43e9e89f5f
17:38 Kogurr joined #perl6
17:38 konobi pmurias: yeah... just depends if you're looking for p5porters style channel
17:38 [Coke] pmurias: one failure in nqp-js on the last run:
17:38 dalek rakudo/nom: 80112e1 | lizmat++ | src/core/Any-iterable-methods.pm:
17:38 dalek rakudo/nom: Introduce :k/v/kv/p adverbs for List.grep
17:38 dalek rakudo/nom:
17:38 dalek rakudo/nom: :k is equivalent to current grep-index
17:38 dalek rakudo/nom:    in fact, grep-index just now calls grep(:k)
17:38 dalek rakudo/nom: :kv generates a list for use in for @a.grep(:kv) -> \k, \v {}
17:38 dalek rakudo/nom: :p  generates a list for use in for @a.grep(:p) -> \pair {}
17:38 dalek rakudo/nom: :v  is just a synonym for no adverb at all
17:38 dalek rakudo/nom:
17:38 dalek rakudo/nom: The :k, :kv and :p adverbs can also be negated: it will just act as if
17:38 dalek rakudo/nom: no adverb was specified (handy for variable :k($force-key) case)
17:38 dalek rakudo/nom:
17:38 dalek rakudo/nom: A negated :v will cause a failure, as well as any combination of :k, :kv,
17:38 dalek rakudo/nom: :p or :v, or any unrecognized adverb.
17:38 dalek rakudo/nom:
17:38 dalek rakudo/nom: grep-index is now also between 1.5 and 2x faster.
17:38 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/80112e1fa1
17:38 [Coke] https://github.com/coke/perl6-roast-data/blob/master/log/nqp.js_summary.out#L143
17:38 n0tjack joined #perl6
17:38 AlexDaniel joined #perl6
17:38 [Coke] rakudo-jvm horribly borked.
17:39 konobi tap would be a devDependency
17:39 [Coke] rakudo-moar and moar-jit failing differently on require tests.
17:39 konobi (from npm that is)
17:39 [Coke] still getting random failures on S17 tests. :(
17:40 pmurias [Coke]: thanks, I forgot to add a dependency
17:40 konobi yay for tap
17:42 lizmat [Coke]: in parallel testing, or also just by themselves ?
17:43 [Coke] the daily runs don't do parallel.
17:43 [Coke] even in ||, our S17 tests shouldn't be failing.
17:43 [Coke] (like, it's worse if they only fail then!)
17:43 [Coke] oh, wait, moar jit is working, moar-nonjit is dead.
17:44 [Coke] doing a local build to see if I can duplicate the issue.
17:44 llfourn joined #perl6
17:45 hohoho joined #perl6
17:45 spider-mario joined #perl6
17:47 kmel joined #perl6
17:49 dalek rakudo/nom: 8a8bf63 | lizmat++ | src/core/Any-iterable-methods.pm:
17:49 dalek rakudo/nom: Make sub grep() and sub grep-index() also work
17:49 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/8a8bf63db7
17:50 dalek specs: eb42709 | TimToady++ | S (11 files):
17:50 dalek specs: remove mentions of Parcel/parcel
17:50 dalek specs: review: https://github.com/perl6/specs/commit/eb42709e8c
17:51 uruwi joined #perl6
17:58 [Coke] looks like it died on Error while constructing error object:Could not locate compile-time value for symbol X::Syntax::ConditionalOperator::PrecedenceTooLoose
17:58 [Coke] but I cannot duplicate it locally right now.
17:58 tokuhiro_ joined #perl6
18:06 [Coke] down to 61 test files in roast that aren't part of spec or stress test.
18:07 [Coke] is t/spec/S05-grammar/std.t reasonable?
18:08 kmel hello
18:09 [Coke] kmel: hio
18:09 vendethiel joined #perl6
18:10 kmel hi [Coke]
18:10 kmel I was wondering what editors do you use for Perl 6?
18:11 PerlJam kmel: vi(m)
18:12 boggard notepad
18:12 lizmat m:dd  <a b c>.grep(Str,:k)
18:12 lizmat m: dd  <a b c>.grep(Str,:k)
18:12 camelia rakudo-moar 82d4ea: OUTPUT«("a", "b", "c").Seq␤»
18:13 [Coke] m: END: { say "end"}; say "mid" ; BEGIN: { say "beg"; exit}
18:13 camelia rakudo-moar 82d4ea: OUTPUT«end␤mid␤beg␤»
18:13 uruwi Atom
18:13 lizmat PerlJam: should soon say 1,2,3
18:13 kmel vim!! I am jealous. i never learned how to use it.
18:13 [Coke] ^^ should that print mid?
18:13 PerlJam lizmat++
18:13 [Coke] m: END { say "end"}; say "mid" ; BEGIN { say "beg"; exit}
18:13 camelia rakudo-moar 82d4ea: OUTPUT«beg␤»
18:13 kmel uruwi : i am using atom too
18:13 [Coke] er, I meant that, because there's a test where the END doesn't seem to run.
18:13 uruwi Prefer it to Notepad++ now
18:14 [Coke] t/spec/S04-phasers/exit-in-begin.t
18:14 uruwi Only thing keeping me from using it all the time is Danmakufu :P
18:14 lizmat [Coke]: so what was the difference ?
18:14 kmel Danmakufu?
18:14 lizmat END: as a label ?
18:14 [Coke] no, that was a typo on my part.
18:14 [Coke] trying to golf it now.
18:15 kmel i use n++ when i am on windows
18:15 uruwi kmel http://dmf.shrinemaiden.org/
18:16 [Coke] m: END {say 2}; BEGIN {exit};
18:16 camelia rakudo-moar 82d4ea: ( no output )
18:16 [Coke] ^^ there, that's the golf.
18:16 [Coke] test assumes exit in BEGIN still allows END's to run.
18:17 lizmat [Coke]: well, not running would make sense if the exit was in the *first* BEGIN block seen
18:17 ab6tract joined #perl6
18:18 lizmat otherwise, other BEGIN blocks may have set things up that are expected to be handled by END blocks also already set up
18:18 [Coke] m: END {say 2}; BEGIN {""}; BEGIN {exit};
18:18 camelia rakudo-moar 82d4ea: ( no output )
18:18 [Coke] I wouldn't expect the order of begin blocks to impact if any end blocks were run
18:19 lizmat well, BEGIN blocks *are* executed in order seen, no ?
18:19 lizmat I mean, they're executed immediately
18:19 PerlJam aye
18:19 [Coke] Sure, but why should that impact END blocks?
18:19 uruwi But why doesn't the same thing happen when you put the colons in?
18:20 [Coke] either an exit stops processing immediately, or END blocks are still run.
18:20 lizmat uruwi: because then they're just labels
18:20 uruwi Ah
18:20 [Coke] uruwi: yah, that was a typo on my part, apologies.
18:20 lizmat exit is supposed to run ENC blocks, afaik
18:20 uruwi Suggest not allowing BEGIN and END as label names.
18:21 [Coke] ok. Will ticket it, fudge the test file, and add it to the spectest run.
18:21 n0tjack joined #perl6
18:21 uruwi Also does anyone else think tau should be a built-in constant?
18:21 [Coke] nope.
18:21 uruwi I know there's a module for it, but I don't feel like saying "use Math::Tau" just to use it
18:21 [Coke] we've already had that discussion. and it's dead simple to add it in your code.
18:22 PerlJam uruwi: constant tau = 2 * pi;  # done  :)
18:22 uruwi :P
18:23 [Coke] ... I am surprised to find that someone put a module for that out there.
18:24 n0tjack m: constant τ = 2*pi; say τ;
18:24 camelia rakudo-moar 8a8bf6: OUTPUT«6.28318530717959␤»
18:24 n0tjack m: constant τ = 2*π; say τ;
18:24 camelia rakudo-moar 8a8bf6: OUTPUT«6.28318530717959␤»
18:24 n0tjack heh, of course π is predefined
18:25 [Coke] uruwi: http://irclog.perlgeek.de/perl6/2014-04-29#i_8653594
18:25 TimToady m: constant τ = 2 * π; say τ;
18:25 camelia rakudo-moar 8a8bf6: OUTPUT«6.28318530717959␤»
18:25 [Coke] m: say e**(i*π);
18:25 camelia rakudo-moar 8a8bf6: OUTPUT«-1+1.22464679914735e-16i␤»
18:25 TimToady oh, you did that already :)
18:26 uruwi m: import Math::Tau; say tau;
18:26 camelia rakudo-moar 8a8bf6: OUTPUT«5===SORRY!5=== Error while compiling /tmp/OeP5t4D3tk␤Could not find module Math::Tau to import symbols from␤at /tmp/OeP5t4D3tk:1␤------> 3import Math::Tau7⏏5; say tau;␤»
18:27 uruwi m: use Math::Tau; say tau;
18:27 camelia rakudo-moar 8a8bf6: OUTPUT«===SORRY!===␤Could not find Math::Tau in any of:␤  file#/home/camelia/.perl6/2015.09-393-g8a8bf63/lib␤  inst#/home/camelia/.perl6/2015.09-393-g8a8bf63␤  file#/home/camelia/rakudo-inst-2/share/perl6/lib␤  file#/home/camelia/rakudo-inst-2/share/per…»
18:27 [Coke] uruwi: m has no modules to speak of. star: has some, but not that one.
18:27 TimToady m: say e**π\i;
18:27 camelia rakudo-moar 8a8bf6: OUTPUT«-1+1.22464679914735e-16i␤»
18:27 TimToady star: use Math::Tau; say tau;
18:27 camelia star-m 2015.09: OUTPUT«===SORRY!===␤Could not find Math::Tau in any of:␤  file#/home/camelia/.perl6/2015.09/lib␤  inst#/home/camelia/.perl6/2015.09␤  file#/home/camelia/star-2015.09/share/perl6/lib␤  file#/home/camelia/star-2015.09/share/perl6/vendor/lib␤  file#/home/cam…»
18:27 uruwi Since when did Perl6 have a backslash operator?
18:28 PerlJam uruwi: you can probably guess that I would not mind it if tau were built-in, but I also have no strong feeling on the matter.
18:28 [Coke] I was going to show my kid how to find an approximate fraction for pi using perl6 last night, but she ran away.
18:28 TimToady it's not an operator, it's just a degenerate unspace
18:28 [Coke] m: \s\a\y 3; #should fail
18:28 camelia rakudo-moar 8a8bf6: OUTPUT«5===SORRY!5=== Error while compiling /tmp/zxQJL9ptee␤Malformed replacement part; couldn't find final \␤at /tmp/zxQJL9ptee:1␤------> 3\s\a\y 3; #should fail7⏏5<EOL>␤    expecting any of:␤        infix stopper␤»
18:28 uruwi m: say e**πi
18:28 camelia rakudo-moar 8a8bf6: OUTPUT«5===SORRY!5=== Error while compiling /tmp/lFz7BgNVs_␤Undeclared routine:␤    πi used at line 1␤␤»
18:28 TimToady m: say e**(π)i;
18:28 camelia rakudo-moar 8a8bf6: OUTPUT«-1+1.22464679914735e-16i␤»
18:28 uruwi m: say 2 π
18:28 camelia rakudo-moar 8a8bf6: OUTPUT«5===SORRY!5=== Error while compiling /tmp/QFHNSz2zf9␤Two terms in a row␤at /tmp/QFHNSz2zf9:1␤------> 3say 27⏏5 π␤    expecting any of:␤        infix␤        infix stopper␤        postfix␤        statement end␤        statement …»
18:28 TimToady parens work too, but are twice as long
18:29 uruwi m: say 2(π)
18:29 camelia rakudo-moar 8a8bf6: OUTPUT«Cannot find method 'CALL-ME'␤  in block <unit> at /tmp/WBGsTNnC1u:1␤␤»
18:29 uruwi m: say (2)π
18:29 camelia rakudo-moar 8a8bf6: OUTPUT«5===SORRY!5=== Error while compiling /tmp/hxW79JqLrW␤Two terms in a row␤at /tmp/hxW79JqLrW:1␤------> 3say (2)7⏏5π␤    expecting any of:␤        infix␤        infix stopper␤        postfix␤        statement end␤        statement…»
18:29 TimToady it's i that's the operator here
18:29 uruwi Aaaah
18:29 TimToady it's just you don't need the \ when you say 42i
18:33 TimToady m: sub postfix:<π>($n) { $n * π }; say 2π
18:33 camelia rakudo-moar 8a8bf6: OUTPUT«6.28318530717959␤»
18:33 TimToady so one could do the same trick with π
18:34 TimToady m: sub postfix:<π>($n) { $n * π }; say i\π R** e
18:34 camelia rakudo-moar 8a8bf6: OUTPUT«-1+1.22464679914735e-16i␤»
18:35 TimToady but that way lies madness :)
18:35 Hor|zon joined #perl6
18:35 TimToady or at least irrationality :)
18:36 PerlJam Math::Tau seems fairly ridiculous as far as modules go, but perhaps a More::Math module that had a bunch of useful mathematical constants and operators and such would be nice.
18:37 ab6tract interesting.. gist does not support directories, and AFAICT use lib does not support '.' with 'Foo::Bar::Nest' in a single file called Foo-Bar-Nest.pm6
18:38 kmel anyone tried head numbers in pod?
18:38 kmel i can't make it work
18:39 kmel i tried http://design.perl6.org/S26.html#Numbered_headings but no luck
18:39 * PerlJam doubts that any such configuration works yet
18:41 * vendethiel explained TimToady++'s RosettaCode/Mad Libs
18:41 ab6tract ah ha! use lib './'
18:41 ab6tract :)
18:41 vendethiel three times today. that was fun :P.
18:42 uruwi joined #perl6
18:42 edehont joined #perl6
18:43 n0tjack in J, the easiest way to get a harmonic series is - reduce (1,2,3,4) , because that translates to 1-2-3-4 in J, which executes RTL, thus 1-(2-(3-(4))). I can't seem to find a succinct way to do the same in P6.  None of [-], [-] reverse, [R-], or [R-] reverse does what I want.
18:43 n0tjack I even tried map *+-*, (1,2,3,4), no joy
18:44 n0tjack sorry, not harmonic, I forget the term for a+b-c+d-e+f
18:45 psch that's harmonic iff a > b > c > d > e > f
18:45 psch (with abs() around every letter)
18:45 uruwi m: [-] (1, 2, 3, 4)
18:45 camelia rakudo-moar 8a8bf6: ( no output )
18:45 n0tjack yeah, but I think there's a specific term for alternating sum and difference, but it escapes me
18:45 uruwi m: say [-] (1, 2, 3, 4)
18:45 camelia rakudo-moar 8a8bf6: OUTPUT«-8␤»
18:46 n0tjack that should be -2
18:46 uruwi m: say [R-] (1, 2, 3, 4)
18:46 camelia rakudo-moar 8a8bf6: OUTPUT«-2␤»
18:46 uruwi m: say [-] reverse (1, 2, 3, 4)
18:46 camelia rakudo-moar 8a8bf6: OUTPUT«-2␤»
18:46 uruwi What's the problem?
18:46 n0tjack huh, I really thought I tried [R-]
18:46 PerlJam n0tjack: um ... I think it's just called an alternating series.
18:46 ab6tract self contained multi dim ASSIGN-POS question: https://gist.github.com/ab5tract/bb20ff79dddf965febe4
18:47 AlexDaniel what does that R mean?
18:47 uruwi Reverse I suppose
18:47 PerlJam AlexDaniel: "reverse the operands"
18:47 [Coke] reverse.
18:47 AlexDaniel hm, are there any other features like R?
18:48 uruwi ab6tract, is that example from Terminal::Print?
18:48 uruwi apparently my first instinct in typing Terminal::Print is to spell Terminal with 2 L's
18:48 n0tjack m: say [R-] 1 2 3 4 5 6;
18:48 camelia rakudo-moar 8a8bf6: OUTPUT«5===SORRY!5=== Error while compiling /tmp/lN_PwATU75␤Two terms in a row␤at /tmp/lN_PwATU75:1␤------> 3say [R-] 17⏏5 2 3 4 5 6;␤    expecting any of:␤        infix␤        infix stopper␤        postfix␤        statement end␤     …»
18:48 PerlJam AlexDaniel: they're called meta-ops and there are several
18:48 n0tjack m: say [R-] (1,2, 3, 4, 5, 6);
18:48 camelia rakudo-moar 8a8bf6: OUTPUT«-9␤»
18:48 psch m: my @s = -1/1, 1/1, -(1/(1 + (*.denominator))) ... *; say @s[^10]
18:48 camelia rakudo-moar 8a8bf6: OUTPUT«(-1 1 -0.5 -0.333333 -0.25 -0.2 -0.166667 -0.142857 -0.125 -0.111111)␤»
18:48 n0tjack m: say (1 - 2 + 3 - 4 + 5 - 6);
18:48 camelia rakudo-moar 8a8bf6: OUTPUT«-3␤»
18:49 psch m: my @s = -1/1, 1/1, -(1/(1 + (*.denominator))) ... *; .Rat.say for @s[^10]
18:49 camelia rakudo-moar 8a8bf6: OUTPUT«-1␤1␤-0.5␤-0.333333␤-0.25␤-0.2␤-0.166667␤-0.142857␤-0.125␤-0.111111␤»
18:50 psch m: my @s = -1/1, 1/1, -(1/(1 + (*.denominator))) ... *; .perl.say for @s[^10] # still not pretty :/
18:50 camelia rakudo-moar 8a8bf6: OUTPUT«-1.0␤1.0␤-0.5␤<-1/3>␤-0.25␤-0.2␤<-1/6>␤<-1/7>␤-0.125␤<-1/9>␤»
18:50 PerlJam AlexDaniel: See S03:4127
18:50 synbot6 Link: http://design.perl6.org/S03.html#line_4127
18:50 psch eh, and sign-confusion
18:50 n0tjack uruwi: ^^ that's the problem. I need the rightmost op to always be - . With [R-] and even-parity series, it's + .
18:51 n0tjack m: say [R-] (1,2, 3, 4, 5, 6,0);
18:51 camelia rakudo-moar 8a8bf6: OUTPUT«-21␤»
18:51 uruwi Simply create a list of signs
18:51 AlexDaniel PerlJam:
18:51 AlexDaniel oops
18:52 n0tjack uruwi: at that point, I'd be better off just writing a loop
18:52 n0tjack uruwi: I was hoping for somethign succinct, like [-] or [R-] or even [R-] reverse, etc.
18:52 AlexDaniel PerlJam: now I see that I'm actually familiar with the rest, it's just that I've never seen R
18:52 n0tjack AlexDaniel: There's others, like Z.  For example, (100,10,1) Z* (1,2,3)
18:53 AlexDaniel n0tjack: yeah :)
18:53 n0tjack oops, sorry, see you said that already :)
18:53 PerlJam AlexDaniel: weird ... we're always doing stuff with X, Z, and R.   S is usually the one that surprises people
18:54 AlexDaniel PerlJam: Well, I'm not sure if there are many times you might want to use S in user code
18:54 AlexDaniel I might be wrong though
18:54 AlexDaniel PerlJam: yet R seems to be very useful
18:55 ab6tract uruwi: it's from my async branch, ues
18:55 ab6tract *yes
18:56 uruwi Terminal::Print just deals with printing, doesn't it?
18:56 AlexDaniel and of course, I just could not resist to do this
18:56 ab6tract if this works out right, the only functional difference in the API will be that you use [ ; ] instead of [ ][ ]
18:56 AlexDaniel m: say [RRRRRRRRRRRRRRRRRRRRRRR-] [1, 2, 3, 4];
18:56 camelia rakudo-moar 8a8bf6: OUTPUT«-2␤»
18:56 AlexDaniel rrr!
18:56 ab6tract it should be *much* faster
18:56 ab6tract especially the creation of new grids
18:56 uruwi And the new syntax for grid access is much cleaner too!
18:57 uruwi But what about fullwidth characters?
18:57 uruwi Wait, you're just dealing with character-by-character output.
18:57 ^elyse^ joined #perl6
18:58 n0tjack m: infix:</>(1,*)>>(1,2,3); # How do I do reciprocal?
18:58 camelia rakudo-moar 8a8bf6: OUTPUT«Cannot call METAOP_HYPER_POSTFIX(Num, Int, Int, Int, Int); none of these signatures match:␤    (\obj, \op)␤    (\obj, @args, \op)␤    (\obj, \args, \op)␤  in block <unit> at /tmp/NkKwdBIc4W:1␤␤»
18:59 uruwi m: say 1/>>(1, 2, 3);
18:59 camelia rakudo-moar 8a8bf6: OUTPUT«5===SORRY!5=== Error while compiling /tmp/sdx1CueAwu␤Missing infix inside HYPER␤at /tmp/sdx1CueAwu:1␤------> 3say 1/>>7⏏5(1, 2, 3);␤    expecting any of:␤        infix␤        infix stopper␤»
19:00 uruwi m: say 1>>/>>(1, 2, 3);
19:00 camelia rakudo-moar 8a8bf6: OUTPUT«5===SORRY!5=== Error while compiling /tmp/qrms93_00O␤Malformed postfix␤at /tmp/qrms93_00O:1␤------> 3say 1>>7⏏5/>>(1, 2, 3);␤    expecting any of:␤        postfix␤»
19:00 uruwi m: say 1 >>/>> (1, 2, 3);
19:00 camelia rakudo-moar 8a8bf6: OUTPUT«Lists on either side of non-dwimmy hyperop of infix:</> are not of the same length␤left: 1 elements, right: 3 elements␤  in block <unit> at /tmp/g1Xw82_NnM:1␤␤»
19:00 uruwi m: say 1 <</<< (1, 2, 3);
19:00 camelia rakudo-moar 8a8bf6: OUTPUT«(1 0.5 0.333333)␤»
19:00 psch m: sub postfix:['⁻'] { 1 / $^a }; say 5⁻
19:00 camelia rakudo-moar 8a8bf6: OUTPUT«0.2␤»
19:00 uruwi ta-da
19:01 PerlJam you can remember which of >> or << to use by always putting the fat end to the listy thing and the pointy end to the single-valued thing.
19:01 skids joined #perl6
19:02 AlexDaniel m: [SR-]
19:02 camelia rakudo-moar 8a8bf6: OUTPUT«===SORRY!===␤Unknown QAST node type NQPMu␤»
19:02 uruwi Or spear one side to make it DWIM.
19:02 PsuzeannePsy joined #perl6
19:02 FROGGS_ AlexDaniel: that one is rakudobuggable
19:03 AlexDaniel FROGGS_: as LTA, right?
19:03 FROGGS_ it leeks internal stuff without telling what's wrong, yes
19:03 psch m: say 5 S- 5
19:03 camelia rakudo-moar 8a8bf6: OUTPUT«Cannot find method 'CALL-ME'␤  in block <unit> at /tmp/0v5aaysYOc:1␤␤»
19:03 PerlJam I don't think S is fully implemented either
19:03 psch is meta S even implemented?
19:03 psch ... :)
19:04 PerlJam m: [S-]
19:04 camelia rakudo-moar 8a8bf6: OUTPUT«Method 'count' not found for invocant of class 'Int'␤  in block <unit> at /tmp/iOpHdjInm7:1␤␤»
19:04 n0tjack uruwi: ah, never thought of <</<<
19:05 n0tjack PerlJam: That's a helpful tip. Thank you.
19:06 apotheon joined #perl6
19:07 skids joined #perl6
19:07 AlexDaniel oh great, just misspelled "leaks"
19:08 AlexDaniel psch: well, if not, then perhaps it should show NYI warning?
19:09 psch AlexDaniel: i'm not saying having an RT is a bad idea
19:09 AlexDaniel psch: :)
19:17 diana_olhovik_ joined #perl6
19:17 kmel excluding rendering it to html using pod::to::html. How can one view the pod files?
19:18 mattprelude joined #perl6
19:18 [Coke] theoretically, perl6/doc's p6doc (though it's dying for me here trying to use it)
19:19 [Coke] perl6 --doc path/to/file.pm works
19:21 kmel i can't install p6doc
19:21 kmel [Coke] thanks perl6 --doc works
19:22 TimToady the easiest way to remember which way to put the >> is to use X instead
19:23 TimToady then you can drop the parens too
19:23 TimToady m: say 1 X/ 1,2,3
19:23 camelia rakudo-moar 8a8bf6: OUTPUT«(1 0.5 0.333333)␤»
19:23 ab6tract joined #perl6
19:24 TimToady but for some reason people never think of the degenerate X case with a scalar on one side
19:25 vendethiel m: say 1 Z/ 1, 2, 3
19:25 camelia rakudo-moar 8a8bf6: OUTPUT«(1)␤»
19:25 vendethiel hah, yeah
19:25 ab6tract uruwi: we can support wide character's as well. not sure what the best way will be but it shouldn't be too hard to wire up
19:25 TimToady ab6tract: when I was playing with forest fire, I found [$i;$j] is considerable slower than [$i][$j] so far
19:25 TimToady presumably it'll get optimized though
19:26 uruwi ab6tract is there any reason you have to use [$i;$j]?
19:26 ab6tract re: "just about printing", it's designed to allow the construction of higher level 'text ui' libraries. so it should also be able to handle input in the way you want as well
19:26 [Coke] TimToady: I use the degenerate X all the time when trying to solve ken ken puzzles! :)
19:27 ab6tract TimToady: interesting.. in my case I would construct Column objects which would construct Cell objects.. it was all a bit over designed
19:27 ab6tract creating a new grid object could take a second or more
19:27 ab6tract uruwi: well, we could still create columns as individual classes, I guess
19:28 ab6tract it's also that I want to document the multi dim ASSIGN-POS as well :)
19:28 ab6tract and to shake it down for robustness in ecosystem code
19:28 jkva joined #perl6
19:30 ab6tract uruwi: the [ $x][$y] form existed because grid had *-POS to columns which had *-POS to cells. do you prefer the [][] syntax? I guess we could keep it without too much trouble whatsoever
19:30 weihan joined #perl6
19:30 uruwi Well, TimToady says that the [;] syntax is slower.
19:30 ab6tract to that end, are you finding the library useful in your rogue quest?
19:30 uruwi I haven't tried it yet
19:30 ab6tract fair enough :)
19:31 ab6tract it will definitely take care of the 'keys echo characters' case
19:31 FROGGS_ jnthn++ # blog
19:34 ab6tract but there is currently no API for registering input key stokes. that is a relatively complex story in it's own right, but I think it could be added pretty easily with supplies.
19:35 uruwi I think I solved the problem https://github.com/bluebear94/messing-around-with-perl6/blob/master/kbd.pl6
19:36 n0tjack m: say 1,-2,3,-4 ... 10; # :(
19:36 camelia rakudo-moar 8a8bf6: OUTPUT«===SORRY!===␤Unable to deduce arithmetic or geometric sequence from -2,3,-4 (or did you really mean '..'?)␤»
19:40 [Coke] m: (1..10).map({state $a = -1; $a *= -1; $a*$_}).say
19:40 camelia rakudo-moar 8a8bf6: OUTPUT«(1 -2 3 -4 5 -6 7 -8 9 -10)␤»
19:41 [Coke] seems like we should be able to golf that to a $ instead of a state $a
19:41 n0tjack m:  map {$_ * (-1) ** (+$_%2)}, (1..10);
19:41 camelia rakudo-moar 8a8bf6: ( no output )
19:41 n0tjack m:  say map {$_ * (-1) ** (+$_%2)}, (1..10);
19:41 camelia rakudo-moar 8a8bf6: OUTPUT«(-1 2 -3 4 -5 6 -7 8 -9 10)␤»
19:42 psch %%
19:42 psch m:  say map {$_ * (-1) ** (+$_%%2)}, (1..10);
19:42 camelia rakudo-moar 8a8bf6: OUTPUT«(1 -2 3 -4 5 -6 7 -8 9 -10)␤»
19:42 n0tjack I didn't need that +
19:42 [Coke] %% works, but only on the original sequence.
19:42 psch well, or not, depending on whether you want -1 or not
19:42 n0tjack I think of $_%2 as a Bool, but obviously it isn't
19:43 n0tjack psch: For mod 2, %% is overkill
19:43 [Coke] m: (1..10).map({state$a=-1;$a*=-1;$_*$a}).say # look at all the whitespace I can skip.
19:43 camelia rakudo-moar 8a8bf6: OUTPUT«(1 -2 3 -4 5 -6 7 -8 9 -10)␤»
19:43 n0tjack psch: It would be helpful for mod 3+
19:44 * psch shrugs
19:44 n0tjack m:  say map{$_*(-1)**(+$_%2)},(1..10);
19:44 llfourn joined #perl6
19:44 camelia rakudo-moar 8a8bf6: OUTPUT«5===SORRY!5=== Error while compiling /tmp/amSq_F4cwy␤Calling map() will never work with any of these multi signatures:␤    (&code, + is raw)␤at /tmp/amSq_F4cwy:1␤------> 3say 7⏏5map{$_*(-1)**(+$_%2)},(1..10);␤»
19:44 n0tjack heh
19:44 TimToady m: say (1,-1,1) Z* 1..*
19:44 camelia rakudo-moar 8a8bf6: OUTPUT«(1 -2 3)␤»
19:44 TimToady m: say (1,-1,1...* Z* 1..*
19:44 camelia rakudo-moar 8a8bf6: OUTPUT«5===SORRY!5=== Error while compiling /tmp/nnvkUzdYA4␤Operators '...' and 'Z*' are non-associative and require parentheses␤at /tmp/nnvkUzdYA4:1␤------> 3say (1,-1,1...* Z7⏏5* 1..*␤    expecting any of:␤        infix␤        infix stopp…»
19:44 TimToady m: say (1,-1,1...*) Z* 1..*
19:44 camelia rakudo-moar 8a8bf6: OUTPUT«(...)␤»
19:45 TimToady m: .say for (1,-1,1...*) Z* 1..*
19:45 n0tjack don't you want 1 xx * ?
19:45 camelia rakudo-moar 8a8bf6: OUTPUT«(timeout)1␤-2␤3␤-4␤5␤-6␤7␤-8␤9␤-10␤11␤-12␤13␤-14␤15␤-16␤17␤-18␤19␤-20␤21␤-22␤23␤-24␤25␤-26␤27␤-28␤29␤-30␤31␤-32␤33␤-34␤35␤-36␤37␤-38␤39␤-40␤41␤-42␤43␤-44␤45␤-46␤47…»
19:46 TimToady Z* 1 xx * is a no-op
19:46 n0tjack I would have thought (blah) Z* 1 xx *; would turn the whatever into "as many elems as (blah)"
19:47 TimToady it does, but multiplying everything by 1 does nothing
19:47 skids joined #perl6
19:48 TimToady m: .say for |(1,-1) xx * Z* 1..20
19:48 camelia rakudo-moar 8a8bf6: OUTPUT«1␤-2␤3␤-4␤5␤-6␤7␤-8␤9␤-10␤11␤-12␤13␤-14␤15␤-16␤17␤-18␤19␤-20␤»
19:48 n0tjack oh, I see, 1..* isn't 1,1,1,1,1, it's 1,2,3,4
19:48 n0tjack don't know why I thought otherwise
19:50 n0tjack m: say 4 * [+] map *+-*, (1 X/ (1,3,5,7 ... 25e3));
19:50 camelia rakudo-moar 8a8bf6: OUTPUT«3.14151265358992␤»
19:51 Hor|zon joined #perl6
19:51 n0tjack m: say 4 * [+] (1,-1,1 ... *) Z* (1 X/ (1,3,5,7 ... 25e3));
19:51 camelia rakudo-moar 8a8bf6: OUTPUT«3.1415126535899␤»
19:51 n0tjack Whatever code is cute.
19:51 TimToady that one doesn't converge very fast...
19:52 n0tjack no, but it's short
19:53 TimToady testing against a floater is kind of a steep price to pay for saving one char over 25000
19:54 zakharyas joined #perl6
19:54 n0tjack where is the test?
19:55 TimToady 1,3,5,7 ... 25e3
19:55 ab6tract uruwi: nice!
19:55 n0tjack there's a test in there?
19:55 FROGGS_ the endpoint
19:55 TimToady how do you suppose it stops?
19:55 ab6tract I think you should wrap that in a module and ship it :)
19:55 uruwi ab6stact I'm mainly waiting for Terminal::Print to be documented, though
19:55 n0tjack TimToady: fair point, hadn't occured to me.
19:56 n0tjack TimToady: Though I suppose if you impute the function, you could try to invert it.
19:56 TimToady there's another function hiding in there as well, since it intuits a *+2 for you
19:56 telex joined #perl6
19:56 Peter_R joined #perl6
19:57 ab6tract fair enough.
19:57 TimToady n0tjack: this is the first time that's come up, so I think the demand is too low to make it a DWI
19:57 TimToady *M
19:57 n0tjack I wouldn't implement function inversion just to make ... more efficient.
19:57 n0tjack But it's really useful in functional programming for broader purposes
19:58 ab6tract how to pass 'self' to the constructor of another another object?
19:59 zakharyas joined #perl6
20:00 tokuhiro_ joined #perl6
20:01 ab6tract uruwi: your work could easily go into another module entirely.. Terminal::Input, perhaps?
20:02 TimToady nap &
20:02 uruwi I'm kind of reluctant since it works only if stty is installed
20:02 dbron joined #perl6
20:02 uruwi Also a lot of things are hardcoded in the demo
20:03 n0tjack_ joined #perl6
20:03 ^elyse^ joined #perl6
20:03 margeas joined #perl6
20:03 n0tjack_ how are identity functions declared?
20:04 n0tjack_ for example, p6 knows +'s identity is 0, and *'s is 1.
20:04 n0tjack_ can I declare my own identity value for a function?
20:04 grondilu m: say 4 * [+] (1,-1,1 ... *) Z/ (1,3,5,7 ... 25e3);
20:04 camelia rakudo-moar 8a8bf6: OUTPUT«3.1415126535899␤»
20:04 n0tjack_ grondilu: even better!
20:04 ab6tract \o/ got it!
20:04 grondilu m: say 4 * [+] (1,-1,1 ... *) Z/ (1,3 ... 25e3);
20:05 camelia rakudo-moar 8a8bf6: OUTPUT«3.1415126535899␤»
20:05 grondilu I'm a bit surprised this stops, considering 25e3 is even
20:05 psch n0tjack_: for infix:<+> there's "multi sub infix:<+>($x = 0)      { $x.Numeric }" as one candidate
20:05 grondilu m: say (1,3 ... 25e3).elems
20:05 camelia rakudo-moar 8a8bf6: OUTPUT«12500␤»
20:06 grondilu m: say (1,3 ... 25e3)[*-5]
20:06 camelia rakudo-moar 8a8bf6: OUTPUT«24991␤»
20:06 psch m: say 1, 2, 4 ... 9
20:06 camelia rakudo-moar 8a8bf6: OUTPUT«(1 2 4 8)␤»
20:06 grondilu m: say (1,3 ... 25e3)[*-5..*]
20:06 camelia rakudo-moar 8a8bf6: OUTPUT«(24991 24993 24995 24997 24999)␤»
20:06 grondilu m: say (1,3...10)
20:06 camelia rakudo-moar 8a8bf6: OUTPUT«(1 3 5 7 9)␤»
20:07 n0tjack_ psch: I see, so reduction doesn't apply any fancy logic, each infix can just return the non-identity argument
20:07 FROGGS_ aye
20:07 n0tjack_ psch: the reason I was asking was I thought there might be a "has identity" or something trait; I was hoping to extent that idea to "has inverse"
20:08 ab6tract uruwi: what do you use stty for?
20:09 uruwi to disable stdin buffering, so keystrokes can go through without pressing Enter
20:09 kmel joined #perl6
20:09 necrophcodr joined #perl6
20:09 n0tjack_ what I would like to do is say something like multi sub:infix<log> {$x, $y} has inverse(&infix<exp>) {...} .
20:10 necrophcodr is rakudo p5 build.pm broken, or is something missing with the 2015.09 rakudo star distribution?
20:11 psch n0tjack: not sure how you'd use that
20:11 [Coke] necrophcodr: as far as I know the 2015.09 star distro was fine.
20:11 necrophcodr after installing rakudo star 2015.09 and running `panda install v5` it only gets to "Generating build order", and then doesn't go any further. i've had it running for hours.
20:11 psch n0tjack: as in, you'd need some syntax to invert a function first
20:11 [Coke] don't use v5.
20:11 FROGGS joined #perl6
20:11 [Coke] use Inline::Perl5
20:11 necrophcodr [Coke]: how does that help running v5 scripts?
20:12 [Coke] well, I should phrase that: "are you sure you want v5 and not Inline::Perl5?"
20:12 n0tjack psch: I'd want to use it to write a meta-op, call it "under", something like sub under(&foo, *@) { &foo.inverse foo @* };
20:12 necrophcodr i am attempting to use perl6 as a perl5 drop in replacement (i am well aware that it isn't)
20:12 lizmat necrophcodr: it is my understanding that v5 is a project in hibernation
20:12 n0tjack what that would let me do is express things like (silly example) + under log, which is of course *
20:13 [Coke] I don't see any commits on v5 that aren't cleanup since maybe january.
20:13 [Coke] So, it could just be that v5's build is borked. Pretty sure the panda that shipped with the last star was ok.
20:14 necrophcodr i haven't had any bad experience with the star 2015.09 distribution either, i just wanted to make sure.
20:14 necrophcodr lizmat: that could be it. thanks for the help, it is very valuable!
20:15 [Coke] I just tried to run the 00 sanity test in v5, and it dies.
20:15 [Coke] ah. they used src, not lib.
20:15 [Coke] m: say EnumMap
20:15 camelia rakudo-moar 8a8bf6: OUTPUT«5===SORRY!5=== Error while compiling /tmp/9gOKbQcUrZ␤Undeclared name:␤    EnumMap used at line 1␤␤»
20:15 necrophcodr i'll have to stick to using only perl5 for now then. i hope that in the future a proper v5 will be out there, in a couple of years. would make my maintainence a lot easier.
20:15 [Coke] ^^ v5 still has that.
20:16 [Coke] there is no current plan for making v5 work, at least on this channel, that I'm aware of.
20:16 [Coke] I think everyone would love it if it -did- work, mind.
20:16 necrophcodr yeah, moving entire codebases isn't always feasible.
20:17 n0tjack necrophcodr: I honestly think of p5 and p6 as separate languages.
20:17 [Coke] necrophcodr: right. the plan isn't to have people migrate from 5 to 6.
20:17 [Coke] it was a plan, probably over a decade ago, but that's not the current plan.
20:18 psch m: my &infix:<+> = CORE::('&infix:<+>') but role { method inverse { &infix:<-> } }; sub under(&f where &f.inverse.defined, *@a) { &f.inverse( f( @a ) )  };
20:18 camelia rakudo-moar 8a8bf6: ( no output )
20:18 [Coke] I opened https://github.com/rakudo-p5/v5/issues/12 to mention the EnumMap issue.
20:18 n0tjack psch: !!!!
20:18 psch n0tjack: not sure if that does anything useful though...
20:18 n0tjack even that it can be approached is awesome
20:19 necrophcodr [Coke]: i think it may still happen though, through time. although there are certain valuable uses even today, for perl5. with that, i mean mostly the amazing compatability with older perl5 installations.
20:19 necrophcodr not implying that modern perl5 isn't in itself useful. it is indeed.
20:19 Suzeanne joined #perl6
20:19 psch n0tjack: it's probably kinda expensive with the role mixin, and i think the parameters of under might be wrong-ish too
20:20 lucastheisen joined #perl6
20:20 psch n0tjack: like, if it should work as "+ under log @a" (or, without macros more like "&infix:<+> under &log, @a") you clearly need two callable parameters
20:20 n0tjack psch: To really support it, it'd have to be implemented in the core. Inversion has its merits, but I'm not going to try to argue it should be a near-term priority.
20:21 psch n0tjack: i don't know, i think it could work well enough in a module, but probably wants macro support to give closer-to-meta-op syntax
20:23 n0tjack psch: yeah, the more I play with the lang, the more excited I get for macros
20:23 apotheon joined #perl6
20:26 lizmat m: sub a($a) {}; a IterationEnd   #hmmmm
20:26 colomon joined #perl6
20:26 camelia rakudo-moar 8a8bf6: OUTPUT«X::TypeCheck::Binding exception produced no message␤  in sub a at /tmp/wW0MmuULW7:1␤  in block <unit> at /tmp/wW0MmuULW7:1␤␤»
20:27 lizmat hmmm... this hangs for me...
20:27 lizmat locally
20:29 colomon joined #perl6
20:30 Hotkeys is there a reason http://doc.perl6.org/language/regexes doesn't talk about lazy matching (eg. /.+/ vs /.+?/)
20:31 Hotkeys or does it and I just don't see it
20:31 grondilu not sure "lazy matching" is the correct expression
20:31 Hotkeys I don't know the right term
20:32 grondilu rather "eager matching" as opposed to "minimal matching"
20:32 grondilu ·   To force the preceding atom to do frugal backtracking (also sometimes known as "eager matching" or "minimal matching"), append a ":?" or "?" to the atom.  If the preceding token is a quantifier, the ":" may be omitted, so "*?" works just as in Perl 5.
20:32 Hotkeys ah
20:32 grondilu ^in S05
20:33 Hotkeys okay thanks
20:33 Hotkeys I've seen it talked about as greedy and lazy before
20:33 n0tjack Hotkeys: I have too.
20:33 grondilu r u sure you don't confuse with list evaluation?
20:34 ab6tract joined #perl6
20:34 FROGGS it is usually called greedy and non-greedy matching
20:34 FROGGS lazy is about (potentially infinite) lists
20:34 * n0tjack just tried [max] 1..*; and got exactly what he deserved
20:34 FROGGS :P
20:34 Hotkeys lol
20:35 grondilu m: say [+] 1 .. 10**100;
20:35 Hotkeys do you need the square brackets there? (assuming a not-infinite list)
20:35 Hotkeys m: say max 1 .. 10
20:35 camelia rakudo-moar 8a8bf6: OUTPUT«(timeout)»
20:35 camelia rakudo-moar 8a8bf6: OUTPUT«10␤»
20:35 psch m: say + 1..10
20:35 camelia rakudo-moar 8a8bf6: OUTPUT«1..10␤»
20:36 psch m: say [+] 1..10
20:36 camelia rakudo-moar 8a8bf6: OUTPUT«55␤»
20:36 Hotkeys you do for +
20:36 n0tjack you do for any dyad
20:36 n0tjack s/dyad/infix/
20:36 Hotkeys right
20:36 Hotkeys bc [] does reduction
20:36 psch m: say &infix:<max>
20:36 camelia rakudo-moar 8a8bf6: OUTPUT«sub infix:<max> (| is raw) { #`(Sub+{<anon|68770224>}+{Precedence}|62511920) ... }␤»
20:36 Hotkeys but max doesn't need reduction
20:36 psch m: say &max
20:36 camelia rakudo-moar 8a8bf6: OUTPUT«sub max (+ is raw, :&by = { ... }) { #`(Sub|72590472) ... }␤»
20:36 psch Hotkeys: max is just also a sub that takes a list
20:36 grondilu m: sub prefix:<[+]>(Range $r) { $r.min*($r.max+1)/2 }; say [+] ^10;
20:36 camelia rakudo-moar 8a8bf6: OUTPUT«0␤»
20:37 Hotkeys ah
20:37 Hotkeys does it secretly do [max] behind the scenes
20:37 n0tjack I find it weird we have &infix:<max> and &prefix:<max> but no &infix:<log> etc.
20:38 psch m: say &prefix:<max>
20:38 camelia rakudo-moar 8a8bf6: OUTPUT«5===SORRY!5=== Error while compiling /tmp/9eihiU5CHd␤Undeclared routine:␤    &prefix:<max> used at line 1. Did you mean '&prefix:<~>', '&prefix:<temp>', '&prefix:<->', '&prefix:<so>', '&prefix:<+>'?␤␤»
20:38 FROGGS m: say &max
20:38 camelia rakudo-moar 8a8bf6: OUTPUT«sub max (+ is raw, :&by = { ... }) { #`(Sub|66163848) ... }␤»
20:38 n0tjack m: say max 10, 100; say 10 max 100; say log 100, 10; say 10 log 100;
20:38 camelia rakudo-moar 8a8bf6: OUTPUT«5===SORRY!5=== Error while compiling /tmp/cVyOaKX5PN␤Two terms in a row␤at /tmp/cVyOaKX5PN:1␤------> 3 say 10 max 100; say log 100, 10; say 107⏏5 log 100;␤    expecting any of:␤        infix␤        infix stopper␤        postfix␤ …»
20:38 n0tjack well, you get what I mean.
20:39 FROGGS m: say &infix:<max>
20:39 camelia rakudo-moar 8a8bf6: OUTPUT«sub infix:<max> (| is raw) { #`(Sub+{<anon|68770224>}+{Precedence}|53111600) ... }␤»
20:39 FROGGS so you're missing the infix log
20:39 n0tjack yeah
20:39 FROGGS is that how you use log often?
20:39 n0tjack in general, all fundamental 2-adic math primitives should be offered as prefix and infix
20:40 n0tjack I write most of my functional code linearly
20:41 FROGGS hmmm, I've got no opinion on &infix:<log>
20:41 n0tjack so I'd want to say [max] 2 log 3,7,22,108 to find the bit-widest number
20:41 n0tjack (as a contrived example)
20:42 n0tjack the problem with a bunch of prefix function is you (end (up, with, (lispitis(of (the, code)))))))))))))))))))
20:43 n0tjack or you have to break simple things into multiple lines.
20:43 FROGGS true
20:44 n0tjack I suppose there could be some kinda hyper, say F, which turned  $a F log $b into log $a,$b
20:44 n0tjack all the birds, with one stone
20:46 psch m: say [max] 2 [&log] 3, 7, 22, 108
20:46 camelia rakudo-moar 8a8bf6: OUTPUT«108␤»
20:46 psch :P
20:47 n0tjack m: say 2 [&log] 0b1, 0b10, 0b11, 0b100, 0b111, 0b1000
20:47 camelia rakudo-moar 8a8bf6: OUTPUT«Attempt to divide 0.693147180559945 by zero using /␤  in block <unit> at /tmp/Wc_6YRYmBv:1␤␤Actually thrown at:␤  in block <unit> at /tmp/Wc_6YRYmBv:1␤␤»
20:47 n0tjack m: say 2 [&log] (0b1, 0b10, 0b11, 0b100, 0b111, 0b1000)
20:47 camelia rakudo-moar 8a8bf6: OUTPUT«0.386852807234542␤»
20:47 n0tjack yeah, no
20:48 Hotkeys m: [max] map *.log(2), 3,7,22,108
20:48 camelia rakudo-moar 8a8bf6: ( no output )
20:48 Hotkeys wow
20:48 Hotkeys worked for me in my shell
20:48 n0tjack say "say"
20:48 Hotkeys oh right
20:48 Hotkeys m: say [max] map *.log(2), 3,7,22,108
20:48 camelia rakudo-moar 8a8bf6: OUTPUT«6.75488750216347␤»
20:49 n0tjack yeah, whatever-code is sick
20:49 Hotkeys tru
20:49 psch m: say log 2, 0b1
20:49 camelia rakudo-moar 8a8bf6: OUTPUT«Attempt to divide 0.693147180559945 by zero using /␤  in block <unit> at /tmp/k0UAGQiTpO:1␤␤Actually thrown at:␤  in block <unit> at /tmp/k0UAGQiTpO:1␤␤»
20:50 n0tjack m: say log(2,0b1);
20:50 camelia rakudo-moar 8a8bf6: OUTPUT«Attempt to divide 0.693147180559945 by zero using /␤  in block <unit> at /tmp/Qmw1ACetbB:1␤␤Actually thrown at:␤  in block <unit> at /tmp/Qmw1ACetbB:1␤␤»
20:50 n0tjack m: say 0b1;
20:50 camelia rakudo-moar 8a8bf6: OUTPUT«1␤»
20:50 psch m: say log 2, 1
20:50 camelia rakudo-moar 8a8bf6: OUTPUT«Attempt to divide 0.693147180559945 by zero using /␤  in block <unit> at /tmp/RGM64g4f9f:1␤␤Actually thrown at:␤  in block <unit> at /tmp/RGM64g4f9f:1␤␤»
20:50 Hotkeys second number is base
20:50 n0tjack wait, wait
20:50 n0tjack m: say log 1,2;
20:50 camelia rakudo-moar 8a8bf6: OUTPUT«0␤»
20:50 n0tjack m: say log 100, 10;
20:50 camelia rakudo-moar 8a8bf6: OUTPUT«2␤»
20:51 n0tjack the radix comes 2nd
20:51 psch m: say max (0b1, 0b10, 0b101, 0b1100) >>[&log]>> 2
20:51 camelia rakudo-moar 8a8bf6: OUTPUT«3.58496250072116␤»
20:51 * psch shrugs
20:51 psch not that i really understand what that snippet was about
20:51 n0tjack also, log *,1 should return Inf
20:51 sufrostico joined #perl6
20:51 psch m: say log Inf, 1
20:51 camelia rakudo-moar 8a8bf6: OUTPUT«Attempt to divide Inf by zero using /␤  in block <unit> at /tmp/Nqer4p1xW7:1␤␤Actually thrown at:␤  in block <unit> at /tmp/Nqer4p1xW7:1␤␤»
20:51 psch m: say log *, 1
20:51 camelia rakudo-moar 8a8bf6: OUTPUT«Cannot call log(Whatever, Int); none of these signatures match:␤    (Numeric $x)␤    (Numeric $x, Numeric $base)␤    (Cool $x)␤    (Cool $x, Cool $base)␤    (num $x)␤  in block <unit> at /tmp/gjWLfSxl3u:1␤␤»
20:51 n0tjack or Nan
20:52 n0tjack it shouldn't just croak
20:52 Hor|zon joined #perl6
20:52 psch oh, the * wasn't a Whatever but a glob
20:52 psch (or maybe a whatever, not a Whatever..?)
20:52 Hotkeys it should be a divide by zero error
20:52 Hotkeys just like
20:52 Hotkeys m: say 3/0
20:52 camelia rakudo-moar 8a8bf6: OUTPUT«Attempt to divide 3 by zero using div␤  in block <unit> at /tmp/lI0MtYM7I1:1␤␤Actually thrown at:␤  in block <unit> at /tmp/lI0MtYM7I1:1␤␤»
20:52 Hotkeys or NaN
20:52 Hotkeys NaN works
20:53 n0tjack I think 3/0 should be NaN too
20:53 n0tjack or at least a pragma to switch "loud failures" vs "NaN failures"
20:53 n0tjack the ugly part about NaN is it's a data virus. Once it gets in, it spreads.
20:53 margeas joined #perl6
20:54 * FROGGS .oO( $data.grep: NaN )
20:55 n0tjack m: grep {$_ !== NaN}, (1,NaN,2,NaN,3,4);
20:55 camelia rakudo-moar 8a8bf6: ( no output )
20:55 n0tjack m: say grep {$_ !== NaN}, (1,NaN,2,NaN,3,4);
20:55 camelia rakudo-moar 8a8bf6: OUTPUT«(1 NaN 2 NaN 3 4)␤»
20:55 FROGGS ahh, nvm, NaN smartmatches itself :o)
20:55 n0tjack NaN == NaN :)
20:56 vendethiel it bugs me that it bugs me that NaN equals NaN... :P
20:57 FROGGS m: say NaN == NaN
20:57 camelia rakudo-moar 8a8bf6: OUTPUT«False␤»
20:57 psch m: say NaN === NaN
20:57 camelia rakudo-moar 8a8bf6: OUTPUT«True␤»
20:57 n0tjack FROGGS: I meant !==
20:57 n0tjack it's an important feature, like the smell they add to propane
20:58 FROGGS *g*
20:58 n0tjack you *want* to be forced to remember and deal with NaNs
20:58 psch m: say NaN eq NaN
20:58 camelia rakudo-moar 8a8bf6: OUTPUT«True␤»
20:58 psch m: say grep {$_ ne NaN}, (1,NaN,2,NaN,3,4);
20:58 camelia rakudo-moar 8a8bf6: OUTPUT«(1 2 3 4)␤»
20:58 psch ship it
20:58 Hotkeys lol
20:58 n0tjack if they worked "reasonably" sometimes (e.g. ==), then you'd forget about them, until they failed catastrophically
21:00 sufrosti1o joined #perl6
21:01 FROGGS m: say Inf/Inf x 10, <Batman>
21:01 camelia rakudo-moar 8a8bf6: OUTPUT«NaNNaNNaNNaNNaNNaNNaNNaNNaNNaNBatman␤»
21:01 FROGGS gnight
21:01 n0tjack hahaha.
21:01 lizmat gnight FROGGS
21:01 n0tjack g'night FROGGS
21:03 [Coke] http://ww2.kqed.org/mindshift/2013/10/08/can-learning-to-knit-help-learning-to-code/
21:03 Hotkeys m: say sqrt(-1)
21:03 camelia rakudo-moar 8a8bf6: OUTPUT«NaN␤»
21:03 Hotkeys m: say sqrt(-1.Complex)
21:03 camelia rakudo-moar 8a8bf6: OUTPUT«6.12323399573677e-17-1i␤»
21:03 Hotkeys that's a fun number
21:04 n0tjack m: e**pi*i;
21:04 camelia rakudo-moar 8a8bf6: OUTPUT«WARNINGS:␤Useless use of "*" in expression "**pi*i" in sink context (line 1)␤»
21:04 n0tjack m: say e** pi*i ;
21:04 camelia rakudo-moar 8a8bf6: OUTPUT«0+23.1406926327793i␤»
21:04 Hotkeys should it be 0+1i ?
21:04 Hotkeys or am i bad at the notation
21:04 [Coke] n0tjack: m: say e**(pi*i)
21:04 n0tjack Hotkeys: it is 0+1i, notice the e-17
21:04 Hotkeys I see that
21:04 [Coke] m: say e**(pi*i)
21:04 camelia rakudo-moar 8a8bf6: OUTPUT«-1+1.22464679914735e-16i␤»
21:04 Hotkeys I thought perl 6 was magical at rounding
21:05 [Coke] precedence.
21:05 ollej joined #perl6
21:05 [Coke] we use rationals until we can't. the use of pi makes it numeric, not rational.
21:05 n0tjack [Coke]: Yeah, specifically the non-precedence of ** always gets me
21:05 Hotkeys ah
21:05 n0tjack Is there some way to ask for the numerator/denominator expression of a Rat?
21:06 Hotkeys m: say .3.perl
21:06 camelia rakudo-moar 8a8bf6: OUTPUT«0.3␤»
21:06 n0tjack m: Rat.new(22,7); # I wanna see 22/7.
21:06 camelia rakudo-moar 8a8bf6: ( no output )
21:06 Hotkeys er
21:06 [Coke] m: say pi.Rat(1e-10).nudes;
21:06 camelia rakudo-moar 8a8bf6: OUTPUT«Method 'nudes' not found for invocant of class 'Rat'␤  in block <unit> at /tmp/8O2U0GHPGQ:1␤␤»
21:06 [Coke] m: say pi.Rat(1e-10).nude;
21:06 n0tjack m: say Rat.new(22,7); # I wanna see 22/7.
21:06 camelia rakudo-moar 8a8bf6: OUTPUT«(312689 99532)␤»
21:06 camelia rakudo-moar 8a8bf6: OUTPUT«3.142857␤»
21:06 Hotkeys right
21:06 Hotkeys that
21:06 n0tjack hahah nude
21:06 [Coke] *nu*merator*de*nominator
21:06 n0tjack of course.
21:06 psch that's why the s is funny :)
21:07 n0tjack m: say Pi.Rat(1e-10).scantily-clad;
21:07 camelia rakudo-moar 8a8bf6: OUTPUT«5===SORRY!5=== Error while compiling /tmp/KlslqObmUh␤Undeclared name:␤    Pi used at line 1␤␤»
21:07 Hotkeys lol
21:07 n0tjack boy, no middle ground.
21:09 psch m: (1/2).perl.say; (22/7).perl.say # this confuses me, tbh
21:09 camelia rakudo-moar 8a8bf6: OUTPUT«0.5␤<22/7>␤»
21:09 * [Coke] accidentally killed his full copy of perl6-doc html that he built as a reference and has to rebuild the whole thing . zzzz.
21:10 psch why does 1/2 turn into decimal notation but 22/7 doesn't?
21:10 n0tjack 0.5 is pretty clean
21:10 [Coke] psch: yah, that's not going to be fun to explain.
21:10 n0tjack 22/7 is 3.14286
21:10 uruwi 0.5 terminates but 22/7 doesn't
21:10 [Coke] m: (1/4).perl.say
21:10 camelia rakudo-moar 8a8bf6: OUTPUT«0.25␤»
21:10 uruwi m: say pi.Rat(1e-10).scantily-clad;
21:10 [Coke] m: (1234/5678).perl.say
21:10 camelia rakudo-moar 8a8bf6: OUTPUT«Method 'scantily-clad' not found for invocant of class 'Rat'␤  in block <unit> at /tmp/sxbhv4P7dL:1␤␤»
21:10 camelia rakudo-moar 8a8bf6: OUTPUT«<617/2839>␤»
21:11 n0tjack hahaha
21:11 kmel m: say (4/2).perl.say;
21:11 camelia rakudo-moar 8a8bf6: OUTPUT«2.0␤True␤»
21:11 n0tjack I think we need an excuse to add a .mole function, so we could have Rat.nude.mole # naked mole rats
21:12 n0tjack m: (1/3).perl.say;
21:12 camelia rakudo-moar 8a8bf6: OUTPUT«<1/3>␤»
21:12 Hotkeys m: my @test = 1/2, 1/4, 1/8 ... 0; say [+] @test;
21:12 camelia rakudo-moar 8a8bf6: OUTPUT«1␤»
21:12 n0tjack now that's cute.
21:12 Hotkeys it's actually a finite series
21:12 Hotkeys v sad
21:13 [Coke] m: my @test = 1/2, 1/4, 1/8 ... 0; my $a = [+] @test; say $a.WHAT;
21:13 camelia rakudo-moar 8a8bf6: OUTPUT«(Num)␤»
21:13 psch m: say (1..* Z/ 2..15)>>.perl
21:13 camelia rakudo-moar 8a8bf6: OUTPUT«(0.5 <2/3> 0.75 0.8 <5/6> <6/7> 0.875 <8/9> 0.9 <10/11> <11/12> <12/13> <13/14> <14/15>)␤»
21:13 psch vOv
21:13 psch not quite what i was going for
21:13 Hotkeys lol
21:14 Hotkeys m: say (1, 1 ...* Z/ 2..15)>>.perl
21:14 camelia rakudo-moar 8a8bf6: OUTPUT«5===SORRY!5=== Error while compiling /tmp/v2_zonOvB1␤Operators '...' and 'Z/' are non-associative and require parentheses␤at /tmp/v2_zonOvB1:1␤------> 3say (1, 1 ...* Z7⏏5/ 2..15)>>.perl␤    expecting any of:␤        infix␤        inf…»
21:14 Hotkeys m: say ((1, 1 ... *) Z/ 2..15)>>.perl
21:14 camelia rakudo-moar 8a8bf6: OUTPUT«(0.5 <1/3> 0.25 0.2 <1/6> <1/7> 0.125 <1/9> 0.1 <1/11> <1/12> <1/13> <1/14> <1/15>)␤»
21:14 psch m: say (1 X/ 1..15)>>.perl
21:14 camelia rakudo-moar 8a8bf6: OUTPUT«(1.0 0.5 <1/3> 0.25 0.2 <1/6> <1/7> 0.125 <1/9> 0.1 <1/11> <1/12> <1/13> <1/14> <1/15>)␤»
21:15 psch m: say (1 X/ 1..25)>>.perl
21:15 camelia rakudo-moar 8a8bf6: OUTPUT«(1.0 0.5 <1/3> 0.25 0.2 <1/6> <1/7> 0.125 <1/9> 0.1 <1/11> <1/12> <1/13> <1/14> <1/15> 0.0625 <1/17> <1/18> <1/19> 0.05 <1/21> <1/22> <1/23> <1/24> 0.04)␤»
21:15 Hotkeys I guess that works
21:15 psch m: say 1/11
21:15 camelia rakudo-moar 8a8bf6: OUTPUT«0.090909␤»
21:15 psch is it "less than 5 digits after the radix?"
21:15 psch looks like that's the rule, to me at least :P
21:15 psch although 1/11 should probably keep going..?
21:17 psch m: say (1/32).perl
21:17 camelia rakudo-moar 8a8bf6: OUTPUT«0.03125␤»
21:17 Hotkeys looks like it stops at 6
21:17 psch m: say (1/64).perl
21:17 camelia rakudo-moar 8a8bf6: OUTPUT«0.015625␤»
21:17 psch m: say (1/128).perl
21:17 camelia rakudo-moar 8a8bf6: OUTPUT«0.0078125␤»
21:17 psch m: say (1/256).perl
21:17 camelia rakudo-moar 8a8bf6: OUTPUT«0.00390625␤»
21:17 psch m: say (1/512).perl
21:17 camelia rakudo-moar 8a8bf6: OUTPUT«0.001953125␤»
21:17 psch m: say (1/1024).perl
21:17 camelia rakudo-moar 8a8bf6: OUTPUT«0.0009765625␤»
21:17 psch welll...
21:18 psch m: say (1/1022).perl
21:18 camelia rakudo-moar 8a8bf6: OUTPUT«<1/1022>␤»
21:18 Hotkeys magic
21:19 Hotkeys m: say (1 Z/ (2, 4, 8 ... 100000000))
21:19 camelia rakudo-moar 8a8bf6: OUTPUT«(0.5)␤»
21:19 Hotkeys ...
21:19 Hotkeys m: say (1 X/ (2, 4, 8 ... 100000000))
21:19 camelia rakudo-moar 8a8bf6: OUTPUT«(0.5 0.25 0.125 0.0625 0.03125 0.015625 0.007813 0.003906 0.001953 0.000977 0.000488 0.000244 0.000122 0.000061 0.000031 0.000015 0.0000076 0.0000038 0.0000019 0.00000095 0.00000048 0.00000024 0.00000012 0.000000060 0.000000030 0.000000015)␤»
21:19 psch m: say 1 X/ 5, 10, 15 ... 1000
21:19 camelia rakudo-moar 8a8bf6: OUTPUT«5===SORRY!5=== Error while compiling /tmp/H6RDtiFjcw␤Operators 'X/' and '...' are non-associative and require parentheses␤at /tmp/H6RDtiFjcw:1␤------> 3say 1 X/ 5, 10, 157⏏5 ... 1000␤    expecting any of:␤        infix␤        infix s…»
21:19 psch m: say 1 X/ (5, 10, 15 ... 1000)
21:19 camelia rakudo-moar 8a8bf6: OUTPUT«(0.2 0.1 0.066667 0.05 0.04 0.033333 0.028571 0.025 0.022222 0.02 0.018182 0.016667 0.015385 0.014286 0.013333 0.0125 0.011765 0.011111 0.010526 0.01 0.009524 0.009091 0.008696 0.008333 0.008 0.007692 0.007407 0.007143 0.006897 0.006667 0.006452 0.00625 0.…»
21:19 Hotkeys m: say ((1 X/ (2, 4, 8 ... 100000000)).perl)
21:19 camelia rakudo-moar 8a8bf6: OUTPUT«(0.5, 0.25, 0.125, 0.0625, 0.03125, 0.015625, 0.0078125, 0.00390625, 0.001953125, 0.0009765625, 0.00048828125, 0.000244140625, 0.0001220703125, 0.00006103515625, 0.000030517578125, 0.0000152587890625, 0.00000762939453125, 0.000003814697265625, 0.0000019073…»
21:19 Hotkeys that's neat
21:19 psch 2 and 5 are what we internally reduce by
21:20 psch for Rat.perl
21:20 lizmat m: class A { multi method a(Mu $t,:$last!,*%a) { say "last" }; multi method a(Callable:D $t) { say "call" } }; A.a( * %% 2, :last )  # expect to this to say "last"
21:20 camelia rakudo-moar 8a8bf6: OUTPUT«call␤»
21:20 lizmat am I missing sometihng ???
21:21 psch m: say (* %% 2) ~~ Callable
21:21 camelia rakudo-moar 8a8bf6: OUTPUT«True␤»
21:21 lizmat I guess the Callable:D is narrower than the Mu, so there's no tie-breaking involved ?
21:21 psch lizmat: i think so, yeah
21:21 psch additionally :last fits into the Callable candidate
21:22 psch and i think there's a bug about required nameds not being narrower than implicit nameds
21:22 lizmat yeah, they're done in order
21:22 lizmat the first one that tie-breaks, gets it
21:23 psch ah, the bug i had in mind was about subs
21:23 psch so probably not quite applicable
21:24 n0tjack g'night all
21:28 kmel anyone having problems with pod?
21:30 kmel numbered headings are not working: http://design.perl6.org/S26.html#Numbered_headings
21:31 lizmat kmel: could you provide a gist that describes the problem ?
21:33 kmel lizmat : yup just give me 2 sec
21:39 kmel lizmat what link should i send you?
21:40 kmel sorry i am new to github :)
21:40 kmel just made an account
21:40 RabidGravy the gist url
21:40 kmel https://gist.github.com/kmel88/fb1c48b71b7f634e6323
21:40 kmel this one ^ ?
21:41 RabidGravy yep
21:41 RabidGravy m: https://gist.github.com/kmel88/fb1c48b71b7f634e6323
21:41 camelia rakudo-moar 8a8bf6: ( no output )
21:41 lizmat I guess it's a case of NYI ?
21:41 RabidGravy well it oaeses :)
21:42 psch hm, i don't S06:1083
21:42 synbot6 Link: http://design.perl6.org/S06.html#line_1083
21:42 psch +get
21:42 kmel what is NYI = Not yet implemented ?
21:42 lizmat S99:NYI
21:42 synbot6 Link: http://design.perl6.org/S99.html#NYI
21:42 PerlJam S99:NYI
21:42 synbot6 Link: http://design.perl6.org/S99.html#NYI
21:42 PerlJam heh
21:43 lizmat not in there
21:43 lizmat kmel: but yeah, Not Yet Implemented
21:43 lizmat sometimes I wonder whether we shouldn't move S99 to doc
21:44 psch m: sub f($, :$!) { "ok" }; say f 1 # still one of my favorite WATs in that context
21:44 camelia rakudo-moar 8a8bf6: OUTPUT«ok␤»
21:44 psch a required anonymous named parameter doesn't have to be passed vOv
21:45 lizmat yeah, not going to change for xmas...
21:45 psch i'm really not sure what it even means
21:45 hohoho joined #perl6
21:45 psch but i suspect it somewhat relates to RT #119929
21:45 synbot6 Link:  https://rt.perl.org/rt3/Public/Bug/Display.html?id=119929
21:46 lizmat yeah  :-)
21:46 rurban joined #perl6
21:47 llfourn joined #perl6
21:50 kmel quit
21:52 firstdayonthejob joined #perl6
21:53 Hor|zon joined #perl6
21:57 apotheon joined #perl6
22:02 tokuhiro_ joined #perl6
22:02 thaljef joined #perl6
22:08 kid51 joined #perl6
22:19 Ch0c0late joined #perl6
22:19 kmel joined #perl6
22:25 uruwi Is it currently possible to sandbox Perl 6 code?
22:26 uruwi m: shell("ls");
22:26 camelia rakudo-moar 8a8bf6: OUTPUT«shell is disallowed in restricted setting␤  in sub restricted at src/RESTRICTED.setting:1␤  in sub shell at src/RESTRICTED.setting:15␤  in block <unit> at /tmp/2eRoTeDwwf:1␤␤»
22:32 dalek rakudo/nom: 44a7ffa | lizmat++ | src/core/Any-iterable-methods.pm:
22:32 dalek rakudo/nom: Add :end,:k,:v,:p adverbs to List.first
22:32 dalek rakudo/nom:
22:32 dalek rakudo/nom: :end  indicates you want searching from the end of the list (like last-index)
22:32 dalek rakudo/nom: :k    return the ordinal number, instead of the value
22:32 dalek rakudo/nom: :v    return the value (default)
22:32 dalek rakudo/nom: :p    return a pair of ordinal number => value
22:32 dalek rakudo/nom:
22:32 dalek rakudo/nom: This effectively makes first-index and last-index obsolete.  Perhaps we
22:32 dalek rakudo/nom: should deprecate them.
22:32 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/44a7ffac76
22:33 lizmat PerlJam: ^^^
22:33 lizmat uruwi: depends on what you want to sandbox, perhaps look at how the RESTRICTED.setting is made  :-)
22:34 leont joined #perl6
22:35 lizmat good niight, #perl6!
22:36 uruwi is there any example?
22:36 RabidGravy toodlepip
22:36 lizmat uruwi: look at src/RESTRICTED.setting
22:37 uruwi where?
22:37 RabidGravy in the source of rakudo
22:38 lizmat https://github.com/rakudo/rakudo/blob/nom/src/RESTRICTED.setting
22:38 lizmat really sleep&
22:38 hes joined #perl6
22:39 uruwi And the only way to change it is to compile rakudo from source?
22:41 RabidGravy as it currently stands yes
22:54 Hor|zon joined #perl6
22:55 samb1 joined #perl6
22:57 zacts joined #perl6
23:00 skids joined #perl6
23:16 hohoho joined #perl6
23:35 TEttinger joined #perl6
23:40 timotimo lizmat: didn't we introduce first-index and last-index because we felt "adding adverbs" was a design smell?
23:40 timotimo what has changed?
23:43 thundergnat joined #perl6
23:50 llfourn joined #perl6
23:55 Hor|zon joined #perl6

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

Perl 6 | Reference Documentation | Rakudo