Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2016-08-03

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:00 kid51 joined #perl6
00:02 k-man joined #perl6
00:16 pierre joined #perl6
00:17 b2gills m: given 'file.txt'.IO -> $io {say $io."$_"().perl for <path abspath absolute>} #  https://stackoverflow.com/q/38731550
00:17 camelia rakudo-moar cc3932: OUTPUT«"file.txt"␤"/home/camelia/file.txt"␤"/home/camelia/file.txt"␤»
00:19 ds joined #perl6
00:24 gfldex b2gills: there is a multi candidate for .abolute that accepts a prefix, see https://github.com/rakudo/rakudo/blob/nom/src/core/IO/Path.pm#L124
00:25 gfldex m: dd 'file.txt'.IO.absolute('home');
00:25 camelia rakudo-moar cc3932: OUTPUT«"/home/camelia/home/file.txt"␤»
00:25 gfldex m: dd 'file.txt'.IO.absolute('foo');
00:25 camelia rakudo-moar cc3932: OUTPUT«"/home/camelia/foo/file.txt"␤»
00:33 Zoffix joined #perl6
00:38 cpage_ joined #perl6
00:39 dainis joined #perl6
00:41 dalek whateverable: c792504 | (Daniel Green)++ | .gitignore:
00:41 dalek whateverable: Ignore .precomp since we're now running Perl 6 code
00:41 dalek whateverable: review: https://github.com/perl6/whateverable/commit/c7925043dc
00:42 awwaiid how do I put a role in a signature? like if I have: role Foo { ... } ; sub gotfoo(Foo $n) { ... }
00:44 gfldex m: role R {}; class C does R {}; sub f(R $r){ dd $r }; f(C.new);
00:44 camelia rakudo-moar cc3932: OUTPUT«C.new␤»
00:45 dalek whateverable: 66262ba | (Daniel Green)++ | bisectable.pl:
00:45 dalek whateverable: Don't need a duplicate
00:45 dalek whateverable: review: https://github.com/perl6/whateverable/commit/66262ba08f
00:45 gfldex m: role R {}; class C does R {}; sub f(R $r){ dd $r }; f(C.new); class B {}; my $b = B.new but R; f($b);
00:45 camelia rakudo-moar cc3932: OUTPUT«C.new␤B+{R}.new␤»
00:45 gfldex awwaiid: ^^^
00:46 aries_liuxueyang joined #perl6
00:46 gfldex m: role R {}; class C does R {}; sub f(R $r){ my R $r2 = $r; dd $r2 }; f(C.new); class B {}; my $b = B.new but R; f($b);
00:46 camelia rakudo-moar cc3932: OUTPUT«C $r2 = C.new␤B+{R} $r2 = B+{R}.new␤»
00:47 gfldex m: role R {}; class C does R {}; sub f(R $r){ my C $r2 = $r; dd $r2 }; f(C.new); class B {}; my $b = B.new but R; f($b);
00:47 camelia rakudo-moar cc3932: OUTPUT«C $r2 = C.new␤Type check failed in assignment to $r2; expected C but got B+{R} (B+{R}.new)␤  in sub f at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
00:49 El_Che joined #perl6
00:50 zacts joined #perl6
01:01 MasterDuke .seen hoelzro
01:01 yoleaux I saw hoelzro 2 Aug 2016 20:30Z in #perl6: <hoelzro> we could even keep a ring buffer of sorts of one week of nightlies should we desire
01:03 lambd0x joined #perl6
01:04 MasterDuke .tell hoelzro with vim-perl syntax highlighting, is there a way to highlight strings delimited by curly quotes (e.g., <“ ” ‘ ’>)?
01:04 yoleaux MasterDuke: I'll pass your message to hoelzro.
01:04 lambd0x Hi guys!
01:09 BenGoldberg joined #perl6
01:15 dalek whateverable: 1c58482 | (Daniel Green)++ | Committable.p6:
01:15 dalek whateverable: Rename some variables so we can use the more idiomatic :$variable syntax
01:15 dalek whateverable: review: https://github.com/perl6/whateverable/commit/1c584821bd
01:20 grondilu joined #perl6
01:25 adu joined #perl6
01:26 ShimmerFairy joined #perl6
01:32 zacts joined #perl6
01:33 Actualeyes joined #perl6
01:47 ilbot3 joined #perl6
01:47 Topic for #perl6 is now »ö« Welcome to Perl 6! | https://perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:,  or /msg camelia p6: ... | irclog: http://irc.perl6.org or http://colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend!
01:50 BenGoldberg m: say join('', map {"foobar"}, (^2));
01:50 camelia rakudo-moar 6183a5: OUTPUT«foobarfoobar␤»
01:50 BenGoldberg m: say join('', map {"foobar"}, (^2).race);
01:50 camelia rakudo-moar 6183a5: OUTPUT«␤»
01:51 BenGoldberg Is that a bug?
01:51 gfldex m: dd (^2).race
01:51 camelia rakudo-moar 6183a5: OUTPUT«HyperSeq.new␤»
01:51 timotimo that's a bug, but a known one
01:52 gfldex m: dd (^2).race.map({$_})
01:52 camelia rakudo-moar 6183a5: OUTPUT«HyperSeq.new␤»
01:52 timotimo hyper and race seqs are known to lose all of their output sometimes
01:52 adu timotimo!
01:52 timotimo adu!
01:53 adu timotimo: how are you?
01:53 timotimo i'm all right
01:53 timotimo brushing my teeth right now so i can go to bed :)
01:53 adu timotimo: that's good!
01:53 timotimo how about you?
01:53 adu timotimo: I took some Melatonin, and if it works, then I'll go to bed soon too
01:53 timotimo cool, good luck with that
01:54 awwaiid gfldex: hm. thanks. that works... exactly like I thought it should. So debugging continues elsewhere!
01:55 BenGoldberg m: say join('', await map {start {"z"}}, ^33);
01:55 camelia rakudo-moar 6183a5: OUTPUT«Memory allocation failed; could not allocate 216 bytes␤»
01:55 BenGoldberg m: say join('', await map {start {"z"}}, ^33);
01:55 camelia rakudo-moar 6183a5: OUTPUT«zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz␤»
01:55 BenGoldberg m: say join('', await map {start {"z"}}, ^33);
01:55 camelia rakudo-moar 6183a5: OUTPUT«zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz␤»
01:55 BenGoldberg m: say join('', await map {start {"z"}}, ^34);
01:55 camelia rakudo-moar 6183a5: OUTPUT«Memory allocation failed; could not allocate 4 bytes␤»
01:57 timotimo adu: better be close to your bed, i hear melatonin kicks like a horse
01:58 BenGoldberg start sure gobbles up a lot of memory.
01:58 adu timotimo: it kicks in at around 15mg, but I usually take 3mg
01:58 timotimo oh, ok
01:58 jackson joined #perl6
01:58 adu timotimo: so I might be up for a while
01:58 timotimo it sounded like you just started trying that stuff
01:58 timotimo i haven't tried it so far
01:59 jackson I'm extremely new to perl6
01:59 Guest77700 could anyone help me with grammars?
01:59 timotimo you've come to the right place
01:59 adu timotimo: on the contrary, I've been taking 3mg of Melatonin for 10 years now, I'm kind of addicted
01:59 timotimo oh
01:59 timotimo i suppose the body gets used to the stuff being supplied externally?
01:59 Guest77700 I take up to 8mg of melatonin every night lmao
01:59 adu timotimo: I'm not sure if I know if my brain can produce Melatonin on its own anymore...
01:59 timotimo i suppose i'll not try it, then :)
02:01 timotimo anyway, i'm off
02:01 timotimo see ya!
02:01 adu timotimo: good night
02:01 TEttinger melatonin was interesting for me
02:01 TEttinger I slept super deeply, but I woke up feeling unrested because my dreams were so intense and lifelike
02:02 TEttinger it was like i had just spent 8 hours dodging north korean spies and ghostbusting giant mi-go, which was my dream last night
02:03 Guest77700 So I have a file full of lines that are formatted like so: '<number>:<time>:<ipsrc>-><ipdst>:<protocol>:<size>:<srcport>:<dstport>', and example of a line being '1:0.000000:192.168.1.104->216.18.166.136:TCP:74:49859:80'
02:03 Guest77700 How would I write a grammar to parse each line and pull out values I need?
02:04 Guest77700 I've written something I thought would work, but it didn't end up working
02:04 hoelzro MasterDuke: there *is*, but it's kind of tricky
02:04 yoleaux 01:04Z <MasterDuke> hoelzro: with vim-perl syntax highlighting, is there a way to highlight strings delimited by curly quotes (e.g., <“ ” ‘ ’>)?
02:05 hoelzro since we can't rely on Unicode properties, we basically need a syntax rule for every possible pair - and there are a *lot* of them
02:05 gfldex m: dd '1:0.000000:192.168.1.104->216.18.166.136:TCP:74:49859:80'.split('<-')>>.split(':')
02:05 camelia rakudo-moar 6183a5: OUTPUT«(("1", "0.000000", "192.168.1.104->216.18.166.136", "TCP", "74", "49859", "80"),)␤»
02:05 gfldex Guest77700: ^^^ a grammar is overkill (and slow) for your usecase
02:06 gfldex m: dd '1:0.000000:192.168.1.104->216.18.166.136:TCP:74:49859:80'.split('->')>>.split(':')
02:06 camelia rakudo-moar 6183a5: OUTPUT«(("1", "0.000000", "192.168.1.104"), ("216.18.166.136", "TCP", "74", "49859", "80"))␤»
02:06 MasterDuke hoelzro: i'm guessing it's not turned on by default?
02:06 hoelzro MasterDuke: what isn't turned on?
02:06 MasterDuke the highlighting for unicode quotes
02:07 hoelzro well, it's not present
02:07 hoelzro we only accept some of the more common pairings
02:07 hoelzro like "...", q{...}, etc
02:09 MasterDuke i see you saw my github issue. is that likely to get implemented? or should i try to just add it to my local perl6.vim?
02:10 hoelzro MasterDuke: if I can figure out a good way to implement all quotes, I will happily do it
02:10 hoelzro but it's tricky, because the more rules we add to perl6.vim, the slower it gets
02:11 MasterDuke i have noticed it's not the fastest syntax highlighting
02:11 hoelzro yeah =/
02:12 Guest77700 ty gldex
02:12 Guest77700 I appreciate it
02:23 webstrand joined #perl6
02:25 cuonglm joined #perl6
02:26 AlexDaniel \o/ https://github.com/perl6/doc/issues/561
02:29 pierre joined #perl6
02:31 noganex_ joined #perl6
02:44 kaare_ joined #perl6
02:56 pierre joined #perl6
02:58 adu joined #perl6
03:00 wamba joined #perl6
03:04 pierre joined #perl6
03:09 autarch joined #perl6
03:16 ecallen joined #perl6
03:21 adu joined #perl6
03:22 dj_goku joined #perl6
03:24 benjikins joined #perl6
03:24 benjikins If I have a loop embedded in another loop, how would I continue the parent loop from inside the smaller loop
03:24 benjikins lol
03:24 benjikins like skip that iteration
03:25 jdv79 next?
03:25 jdv79 not sure what you mean.  could you show code?
03:26 gfldex m: MARK: for 1..10 -> $a { for 11..20 -> $b { next MARK if Bool.pick; put $a, $b } }
03:26 camelia rakudo-moar 6183a5: OUTPUT«311␤411␤412␤511␤811␤»
03:26 gfldex benjikins: ^^^ (i'm guessing what you mean)
03:27 gfldex see: https://docs.perl6.org/language/control#LABELs
03:28 benjikins so if next is inside of the child loop, it would skip the iteration for the parent loop?
03:28 gfldex please not the MARK
03:28 gfldex +e
03:31 benjikins alright, i think i got it now
03:31 benjikins thank you
03:34 beatdown joined #perl6
03:37 pierre joined #perl6
04:01 benjikins How do I define a constant hash?
04:01 jdv79 i'm not sure that's possible right now.
04:02 jdv79 container ro'ness seems undefined at the moment
04:02 pierre joined #perl6
04:02 benjikins dang
04:04 AlexDaniel hoelzro: “a *lot* of them” – well, just 11, that's not too much. Although I probably need to dig into the grammar to see if I missed some
04:05 AlexDaniel hoelzro: that being said, supporting just 「」 ‘’ and “” is probably a good start :)
04:11 llfourn benjikins: you can make an immutable hash with Map.new
04:11 AlexDaniel Yeah, that's it. (if anybody is interested: https://github.com/rakudo/rakudo/blob/nom/src/Perl6/Grammar.nqp#L3541)
04:11 llfourn m: contant %map := Map.new: a => "b",c => "d"; say %map
04:11 camelia rakudo-moar 6183a5: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Variable '%map' is not declared. Did you mean any of these?␤    &map␤    Map␤␤at <tmp>:1␤------> 3contant 7⏏5%map := Map.new: a => "b",c => "d"; say ␤»
04:12 llfourn m: constant %map := Map.new: (a => "b",c => "d"); say %map
04:12 camelia rakudo-moar 6183a5: OUTPUT«Map.new((:a("b"),:c("d")))␤»
04:12 llfourn m: constant %map := Map.new: (a => "b",c => "d"); %map<e> = "f"
04:12 camelia rakudo-moar 6183a5: OUTPUT«Cannot modify an immutable Nil␤  in block <unit> at <tmp> line 1␤␤»
04:13 llfourn you ofc don't need the constant there which just makes it initialize at compile time
04:16 benjikins ah, I see
04:16 benjikins alright thanks
04:17 cpage_ joined #perl6
04:17 cbk joined #perl6
04:23 cbk Anybody know if mod_perl works with the current Perl6?
04:27 llfourn cbk: it won't
04:28 cbk llfourn, so is there any way i can just write a simple Perl6 cgi script?
04:29 llfourn well you can use one of the p6 HTTP servers
04:30 llfourn but I don't think there is any rakudo integration with anything that would make it like cgi
04:30 llfourn https://github.com/ufobat/Bailador # I think ppl use this
04:31 cbk OK I'll look. really just wanted to have a simple cgi script though.
04:32 cbk llfourn, Thanks.
04:33 llfourn cbk: it looks like some people have attempted to do some cgi like things: http://modules.perl6.org/#q=cgi&amp;sort-col=4&amp;sort-dir=d
04:33 llfourn YMMV
04:34 llfourn though tbh for me developing with app servers is simpler than cgi
04:37 cbk llfourn, I already have Apache running, I just want a Form that will pass data to an Perl6 cgi script. super simple nothing more then that.
04:37 hoelzro AlexDaniel: did you look at src/HLL/Grammar.nqp as well?
04:37 hoelzro my last count was 196 pairs
04:38 hoelzro (by this I mean Unicode bracketing characters, any of which may be used as a string delimiter with q and friends)
04:38 llfourn cbk: unfortunetly I don't think we have apache integration :(
04:39 _28_ria joined #perl6
04:39 cbk llfourn, Yes I saw that, and tried those but they do not work
04:39 cbk Hope it gets added to the TODO list.
04:40 Cabanossi joined #perl6
04:40 gfldex cbk: implementing CGI by hand isn't that hard.
04:40 benjikins Does anyone know how it would be possible to convert parsed data from a pcap file (individual packets) to something like .flow files (netflow)
04:41 * llfourn knows nothing about implementing cgi
04:41 cbk gfldex, I think I'm having problems with Apache and not really Perl6.
04:42 gfldex cbk: cgi should not be activated by default, IIRC all you need to do is to set the cgi dir
04:44 llfourn but woulnd't you need to make mod_rakudo or something for apache?
04:44 cbk gfldex, That was done, Perl 5 cgi scripts work just fine.  As soon as I change a working perl5 script to use perl6 it stops working, and I get an internal error.
04:45 llfourn cbk: right because it's using mod_perl which embeds a p5 interpreter inside apache
04:45 gfldex cbk: may be a missing PATH or some other ENV vars
04:45 llfourn (as far as my understanding goes?)
04:46 gfldex the error log should tell you more
04:46 cbk I have #!/home/user/.rakudobrew/bin/perl6 as the shebang line
04:47 cbk gfldex, You maybe right, I think my install of perl6 is messed up. only setup for my user account.
04:48 gfldex cbk: the user apache is running with may not have access to those files (if it does, shame on you :)
04:53 cbk gfldex, I have not changed any of the default file permissions for apache nor Perl6. So I don't expect that It would have access in that way. (hope not)
04:54 quester joined #perl6
04:54 cbk Should I install Perl6 globally for all users on my system?
04:57 leedo joined #perl6
05:01 samgwise joined #perl6
05:02 samgwise Hi :)
05:02 cbk hello samgwise
05:02 samgwise I'm trying to work out some stuff to do with exporting subroutines from modules
05:03 samgwise currently is export trait works like a charm for exporting from one module into the useing module but I'm wondering how to export up another level
05:04 samgwise for example if I export subroutine foo from module A and then import it into module B how do I export A::foo to any module which use module B
05:09 pierre joined #perl6
05:13 Actualeyes1 joined #perl6
05:18 pierre joined #perl6
05:23 llfourn samgwise: "re-exporting" is NYI
05:24 samgwise OK, good to know :)
05:24 samgwise thanks.
05:24 llfourn samgwise: https://github.com/LLFourn/p6-CompUnit-Util#re-exporting
05:24 llfourn I was desperate to do this at one point so I made that module
05:26 samgwise Thanks I'll give it a go!
05:36 pierre joined #perl6
05:50 jersni joined #perl6
05:52 NEveD joined #perl6
05:54 benjikins How do I remove duplicates in an array quickly
05:55 pierre_ joined #perl6
05:56 cuonglm benjikins: Use unique
05:56 cuonglm https://docs.perl6.org/routine/unique
05:57 benjikins ah, thanks, all I could find was the older uniq
06:13 pierre_ joined #perl6
06:18 pierre_ joined #perl6
06:26 firstdayonthejob joined #perl6
06:33 movl joined #perl6
06:40 darutoko joined #perl6
06:54 bjz joined #perl6
06:54 CIAvash joined #perl6
06:56 woodruffw joined #perl6
06:57 woodruffw joined #perl6
06:57 woodruffw joined #perl6
06:58 quester left #perl6
06:58 woodruffw joined #perl6
06:58 woodruffw joined #perl6
06:59 woodruffw joined #perl6
06:59 woodruffw joined #perl6
07:15 eone joined #perl6
07:25 rindolf joined #perl6
07:29 AlexDaniel hoelzro: ah. Well, that's a separate issue
07:53 damnlie joined #perl6
07:56 damnlie joined #perl6
08:00 jonas2 joined #perl6
08:04 dakkar joined #perl6
08:04 bob777 joined #perl6
08:07 xtreak joined #perl6
08:08 xtreak p6: sub say-hello($name where { .chars >= 20 or warn "MyStr should have at least 20 characters" }) {     return "Hello " ~ $name; } ; say-hello("Ram").say;
08:08 camelia rakudo-moar 6183a5: OUTPUT«MyStr should have at least 20 characters  in block  at <tmp> line 1␤MyStr should have at least 20 characters  in block  at <tmp> line 1␤Constraint type check failed for parameter '$name'␤  in sub say-hello at <tmp> line 1␤  in block <unit> at <tmp>…»
08:08 trnh joined #perl6
08:09 xtreak The condition warning is executed twice. Is there a reason for this?
08:13 RabidGravy joined #perl6
08:19 AlexDaniel m: sub foo($x where { False or warn "Counter: {$++}" }) { }; foo(42)
08:19 camelia rakudo-moar 6183a5: OUTPUT«Counter: 0  in block  at <tmp> line 1␤Counter: 1  in block  at <tmp> line 1␤Constraint type check failed for parameter '$x'␤  in sub foo at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
08:19 AlexDaniel committable: releases sub foo($x where { False or warn "Counter: {$++}" }) { }; foo(42)
08:19 committable AlexDaniel: https://gist.github.com/83c9c7f81ad113e16e3567ab649d0f78
08:30 xtreak p6: subset MyLongStr of Str where { .chars >= 2 or fail "MyLongStr should have at least 2 characters" }
08:30 camelia rakudo-moar 6183a5: ( no output )
08:30 xtreak p6: subset MyLongCapsStr of MyLongStr where { .uc ~~ .Str or fail "MyLongCapsStr should have at least 2 characters and capital letters" }
08:30 camelia rakudo-moar 6183a5: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Invalid typename 'MyLongStr'␤at <tmp>:1␤------> 3subset MyLongCapsStr of MyLongStr7⏏5 where { .uc ~~ .Str or fail "MyLongCaps␤»
08:31 xtreak :p6 subset MyLongStr of Str where { .chars >= 2 or fail "MyLongStr should have at least 2 characters" }; subset MyLongCapsStr of MyLongStr where { .uc ~~ .Str or fail "MyLongCapsStr should have at least 2 characters and capital letters" }subset MyLongStr of Str where { .chars >= 2 or fail "MyLongStr should have at least 2 characters" }
08:32 xtreak p6: subset MyLongStr of Str where { .chars >= 2 or fail "MyLongStr should have at least 2 characters" }; subset MyLongCapsStr of MyLongStr where { .uc ~~ .Str or fail "MyLongCapsStr should have at least 2 characters and capital letters" }
08:32 camelia rakudo-moar 6183a5: ( no output )
08:34 xtreak Sorry for the syntax errors. Is it possible to subtype a subset? I tried to apply the constraint of MyLongCapsStr and it fails for "r" with MyLongStr message and passes for "ram"
08:35 psch xtreak: that seems correct from where.  you do have .chars >= 2 in MyLongStr
08:35 psch s/where/here/
08:37 rindolf joined #perl6
08:37 xtreak I tried to apply MyLongCapsStr which I thought should inherit .chars >=2 and also add the new condition .uc ~~ .Str . I thought MyLongCapsStr will be .chars >= 2 and .uc ~~ .Str
08:38 psch m: subset A of Int where * > 0; subset B of A where * < 10; say 5 ~~ B; say 10 ~~ B
08:38 camelia rakudo-moar 6183a5: OUTPUT«True␤False␤»
08:38 psch m: subset A of Int where * > 0; subset B of A where * < 10; say 0 ~~ B; say 10 ~~ B
08:38 camelia rakudo-moar 6183a5: OUTPUT«False␤False␤»
08:38 CIAvash joined #perl6
08:38 psch xtreak: looks like that's exactly what's happening? :)
08:41 xtreak p6: subset MyLongStr of Str where { .chars >= 2 or fail "MyLongStr should have at least 2 characters" }; subset MyLongCapsStr of MyLongStr where { .uc ~~ .Str or fail "MyLongCapsStr should have at least 2 characters and capital letters" }; say "ram".uc ~~ "ram".Str; say "ram" ~~ MyLongCapsStr;
08:41 camelia rakudo-moar 6183a5: OUTPUT«False␤True␤»
08:41 psch m: say "foo" ~~ .Str
08:41 camelia rakudo-moar 6183a5: OUTPUT«True␤»
08:41 psch ^^^ that's your actual issue
08:41 psch xtreak: the RHS of smartmatch always gets the LHS as topic
08:42 psch m: with "foo" { $_ ~~ .say }
08:42 camelia rakudo-moar 6183a5: OUTPUT«foo␤»
08:42 psch m: with "foo" { "bar" ~~ .say }
08:42 camelia rakudo-moar 6183a5: OUTPUT«bar␤»
08:42 psch m: with "foo" { .say; "bar" ~~ .say } # probably the clearest
08:42 camelia rakudo-moar 6183a5: OUTPUT«foo␤bar␤»
08:42 xtreak subset MyLongStr of Str where { .chars >= 2 or fail "MyLongStr should have at least 2 characters" }; subset MyLongCapsStr of MyLongStr where {  *.uc ~~ *.Str or fail "MyLongCapsStr should have at least 2 characters and capital letters" }; say "ram".uc ~~ "ram".Str; say "ram"
08:43 psch that's two different whatevers
08:43 xtreak p6: subset MyLongStr of Str where { .chars >= 2 or fail "MyLongStr should have at least 2 characters" }; subset MyLongCapsStr of MyLongStr where {  *.uc ~~ *.Str or fail "MyLongCapsStr should have at least 2 characters and capital letters" }; say "ram".uc ~~ "ram".Str; say "ram"
08:43 camelia rakudo-moar 6183a5: OUTPUT«False␤ram␤»
08:43 psch ...i thought.  apparently where blocks only curry with one param
08:43 xtreak p6: subset MyLongStr of Str where { .chars >= 2 or fail "MyLongStr should have at least 2 characters" }; subset MyLongCapsStr of MyLongStr where {  *.uc ~~ *.Str or fail "MyLongCapsStr should have at least 2 characters and capital letters" }; say "ram".uc ~~ "ram".Str; say "ram" ~~ MyLongCapsStr;
08:43 camelia rakudo-moar 6183a5: OUTPUT«False␤WhateverCode object coerced to string (please use .gist or .perl to do that)  in whatevercode  at <tmp> line 1␤MyLongCapsStr should have at least 2 characters and capital letters␤  in any  at /home/camelia/rakudo-m-inst-2/share/perl6/runtime/CO…»
08:43 psch ah, no, i was right
08:44 xtreak I forgot the * inside the where clause for MyLongCapsStr I hope was the issue
08:44 psch m: subset LStr of Str where { .chars >= 2 }; subset LCStr of LStr where { $^a.uc eq $^a }; say "ram" ~~ LCStr
08:44 camelia rakudo-moar 6183a5: OUTPUT«False␤»
08:46 xtreak Thanks a lot got it :)
08:52 zakharyas joined #perl6
08:59 [Sno] joined #perl6
08:59 sno joined #perl6
09:36 bob778 joined #perl6
09:38 margeas joined #perl6
09:38 Woodi joined #perl6
09:40 mindos joined #perl6
09:59 mcmillhj joined #perl6
10:06 telex joined #perl6
10:12 mcmillhj joined #perl6
10:14 PotatoGim joined #perl6
10:19 stigo joined #perl6
10:19 domm joined #perl6
10:28 dalek joined #perl6
10:40 bjz_ joined #perl6
10:41 mcmillhj joined #perl6
10:47 pierre_ joined #perl6
10:51 canopus joined #perl6
10:57 mcmillhj joined #perl6
10:59 pistacchio joined #perl6
11:00 pistacchio hi
11:00 pistacchio perl6: ([1,2], [2, 2], [3, 3]).map({.sum});
11:00 camelia rakudo-moar 02ee79, rakudo-jvm cd19db: ( no output )
11:00 pistacchio perl6: say ([1,2], [2, 2], [3, 3]).map({.sum});
11:00 camelia rakudo-moar 02ee79, rakudo-jvm cd19db: OUTPUT«(3 4 6)␤»
11:00 psch perl6: ([1,2], [2, 2], [3, 3]).map({.sum}).say
11:00 camelia rakudo-moar 02ee79, rakudo-jvm cd19db: OUTPUT«(3 4 6)␤»
11:00 pistacchio perl6: say ([1,2], [2, 2], [3, 3])».sum
11:01 camelia rakudo-moar 02ee79, rakudo-jvm cd19db: OUTPUT«([1 2] [2 2] [3 3])␤»
11:01 pistacchio why don't they return the same result?
11:02 pierre_ joined #perl6
11:02 moritz pistacchio: because >> potentially descends recursively into data structures
11:02 woodruffw joined #perl6
11:03 woodruffw joined #perl6
11:08 neuraload joined #perl6
11:28 cpage_ joined #perl6
11:33 masak m: my @a; @a.splice(0, 0, 42); say @a
11:33 camelia rakudo-moar 942a69: OUTPUT«[42]␤»
11:33 masak \o/
11:33 masak lizmat++ # https://rt.perl.org/Ticket/Display.html?id=128736
11:33 holyghost joined #perl6
11:34 kid51 joined #perl6
11:52 dalek doc: c7d59aa | (Tom Browder)++ | doc/Language/pragmas.pod6:
11:52 dalek doc: try to make pragmas searchable
11:52 dalek doc: review: https://github.com/perl6/doc/commit/c7d59aa434
11:52 dalek doc: 0230453 | (Tom Browder)++ | doc/Language/pragmas.pod6:
11:52 dalek doc: Merge pull request #790 from tbrowder/pragma2
11:52 dalek doc:
11:52 dalek doc: try to make pragmas searchable
11:52 dalek doc: review: https://github.com/perl6/doc/commit/023045383d
11:55 Actualeyes joined #perl6
12:00 gregf_ m: say [[1,2,3]]
12:00 camelia rakudo-moar 942a69: OUTPUT«[1 2 3]␤»
12:00 gregf_ why does this get flattened automatically? :/
12:01 gregf_ m: say [[1,2,3],[4,5]]
12:01 camelia rakudo-moar 942a69: OUTPUT«[[1 2 3] [4 5]]␤»
12:01 gregf_ m: my @a = [[1,2,3]]; say @a
12:01 camelia rakudo-moar 942a69: OUTPUT«[1 2 3]␤»
12:02 jnthn m: my @a = [[1,2,3],]; say @a
12:02 camelia rakudo-moar 942a69: OUTPUT«[[1 2 3]]␤»
12:03 jnthn Because of the single arg rule
12:03 jnthn Same reason [1..10] gives you an array of ten itels
12:03 jnthn *items
12:04 gregf_ oh - ok. so using a ',' would make it override the single arg rule?
12:04 jnthn Well, it means that your single arg is now a list
12:04 jnthn m: say ([1,2,3]).perl; say ([1,2,3],).perl;
12:04 camelia rakudo-moar 942a69: OUTPUT«[1, 2, 3]␤([1, 2, 3],)␤»
12:05 jnthn Note that it's , that constructs lists, not parens
12:06 gregf_ ah - i see
12:07 gregf_ jnthn: thanks for clarifying!
12:09 pmurias joined #perl6
12:11 adu joined #perl6
12:18 tbrowder can someone say how often p6 docs website is updated?
12:19 moritz tbrowder: the cron job for updating it is started every 5 minutes, but only if there isn't an instance of it running yet
12:20 tbrowder thanks, moritz
12:21 moritz tbrowder: ... and when changes are available in git, the logs are afterwards sync'ed to https://docs.perl6.org/build-log/
12:21 moritz you're welcome
12:23 tbrowder hm, I see the page i just updated (pragmas) is on view, but i don't see that, say, monkey, is searchable. what have i missed?
12:26 moritz the search isn't a fulltext search
12:27 moritz it only makes sub/method/operator defintions available, and things specificially marked with X<...>, iirc
12:27 tbrowder BTW, it would very cool to have the build log dir either: split to show latest and all others in a subdir or a listing in reverse time order (latest first), or, better, both.
12:28 pierre_ joined #perl6
12:28 tbrowder but the update i made have the X<> enclosing the pragma names
12:30 tbrowder hm, maybe the pipe part is mandatory--i'll try that
12:31 wamba joined #perl6
12:33 itaipu joined #perl6
12:33 tbrowder i just looked at the current pragma page source and the names are marked with the index* attribute. does the search engine need a tweak??
12:34 tbrowder that's beyond my pay grade at the moment
12:36 moritz tbrowder: you can sort the directory index by clicking on the table headers
12:37 adu joined #perl6
12:41 masak m: https://gist.github.com/masak/57a50e1f4eae4f09b365e9c5f3c92a1f
12:41 camelia rakudo-moar 942a69: OUTPUT«Player 1 chooses Scissors␤Player 2 chooses Scissors␤It's a tie!␤»
12:42 masak a modern take on "rock, paper, scissors" :)
12:42 masak comments welcome. I'm happy about every line except line 14
12:43 ufobat joined #perl6
12:43 unmatched} m: https://gist.github.com/masak/57a50e1f4eae4f09b365e9c5f3c92a1f
12:43 camelia rakudo-moar 942a69: OUTPUT«Player 1 chooses Paper␤Player 2 chooses Scissors␤Player 2 wins!␤»
12:44 lichtkind_ joined #perl6
12:44 unmatched} :D awesome use of a custom op
12:45 unmatched} m: https://gist.github.com/zoffixznet/92acd167899328850ff2ba50fec83950
12:45 camelia rakudo-moar 942a69: OUTPUT«Player 1 chooses Scissors␤Player 2 chooses Paper␤Player 1 wins!␤»
12:45 masak ooh
12:46 masak why didn't I think of that? :P
12:46 masak unmatched}++
12:46 moritz masak: because your {} are matched :-)
12:46 masak :P
12:47 masak let this be a less to you, kids: you can *say* "given and when are orthogonal constructs and can be used independently" -- but it's a whole 'nother thing to internalize it and make use of it naturally
12:47 peteretep Couldn't you do it as a sort?
12:48 masak peteretep: show how you mean with code :)
12:48 masak peteretep: it doesn't feel like rock-paper-scissors is a total order, or even a partial one, since the `beats` relation is cyclical
12:49 masak but since we're only "sorting" two elements, that may not really become a problem
12:49 moritz .oO( but we *can* partially beat you )
12:49 masak heh
12:49 masak I'll never live this down, will I?
12:49 * masak .oO( hey, remember the time masak wrote `given *` for no good reason whatsoever? )
12:50 * peteretep thinks
12:50 moritz masak: oh, you will. Just pile up other blunders that make us forget about this one :-)
12:50 masak sounds like a plan
12:51 * masak tries to think of worse things
12:52 jast hey, remember the time masak wrote `given *` for no good reason whatsoever? it was a whole ten minutes ago, I think
12:52 moritz masak: copy&pasting confidential emails from your employer on IRC is a "standard" worse thing :-)
12:53 lvr joined #perl6
12:54 unmatched} default {} isn't really needed there either
12:54 unmatched} m: https://gist.github.com/zoffixznet/c5583f24c268818dccffd5a756b7706c
12:54 camelia rakudo-moar 942a69: OUTPUT«Player 1 chooses Paper␤Player 2 chooses Scissors␤Player 2 wins!␤»
12:54 DrForr Unless you're a White House intern, in which case 'worse' doesn't really describe it :)
12:54 nine Speaking of custom ops: what do you guys think of using a custom op to communicate to Inline::Perl5 that it should call a Perl 5 method/function in scalar context?
12:58 unmatched} All I'm reminded of is the startup penalty with custom ops.
13:01 perlpilot nine: $= $p5-obj.method;   #  :-)
13:02 mcmillhj joined #perl6
13:04 [Coke] nine: like prefix:<scalar> ?
13:05 nine [Coke]: that would certainly be the most intuitive. I'm not sure however if that would even be possible as surely the op's arguments are evaluated first and this op would need to change the way the argument's evaluated
13:08 masak unmatched}: yes, I had the thought about `default` not being needed when I wrote it. still, it adds some clarity, IMHO.
13:09 prammer joined #perl6
13:09 pmurias nine: it would need to be a slang
13:09 rba_ joined #perl6
13:11 pmurias nine: what happens to named arguments passed to a Perl 5 sub/method?
13:11 lvr left #perl6
13:13 sufrostico joined #perl6
13:14 nine pmurias: ok the issue is definitely not worth creating a slang.
13:14 nine pmurias: named arguments are turned into key/value pairs
13:15 lizmat masak unmatched} sometimes I wish we had a "ternary" syntax for handling -1,0,1
13:16 pmurias nine: so p5sub(:abc(123)) is turned into p5sub('abc', 123)?
13:16 lizmat cause the "beats" is a lot like "cmp"
13:16 DrForr Balanced ternary is a common numbering system.
13:16 * unmatched} nods
13:16 nine pmurias: yes
13:16 DrForr :3b(+0-)
13:18 pmurias nine: scalar($obj).foo(123, ...) would be possible
13:18 nine So far I've found 3 different ways to implement scalar/list context for method/function calls: 1. have a custom call operator for scalar calls (maybe -> for old times sake? ;), 2. encode the context into the method name: $foo.do_something-s(...), 3. use a sentinel value as first argument: $foo.do_something(P5Scalar)
13:21 pmurias nine: options ones seems really ugly
13:21 pmurias * option one
13:21 psch do the insane, almost-timetravel one!  clone the p5 interpreter in memory, call both contexts, and then create a Perl 6 object wrapper that returns the needed one and deletes the wrong clone
13:21 unmatched} option three as well
13:22 masak lizmat: that should be possible with `is parsed` macros
13:22 masak lizmat: I just sketched up this one for 007: https://github.com/masak/007/issues/163
13:23 pmurias nine: method chaining also would be possible: $obj.scalar.foo(123, ...)
13:25 nine I've thought the method name one is the perfect solution because in Perl 5 function names cannot contain hyphens anyway. But then https://github.com/niner/Inline-Perl5/issues/67 came along and I found out that it's actually possible to call a function with a hyphen in its name in Perl 5
13:26 masak nine: betting against Perl 5 being able to do a thing (somehow, no matter how unsavorily) is a dangerous game :P
13:26 skids joined #perl6
13:27 mst what about minting a reserved package 'scalar'
13:27 unmatched} TIL you can "react" with more than one reaction on Github
13:27 mst and using $obj.scalar::foo
13:27 mst ala the way Object::Remote uses $obj->start::method to indicate a non-blocking call
13:28 moritz unmatched}: expressiveness for split personalities! One can thumbs-up, the other can thumbs-down, all within a single github account!
13:28 jkramer joined #perl6
13:28 jkramer Hello
13:28 tbrowder moritz: i don't see anything clickable on my ipad. BTW, now the pragmas page shows the index attribute on the page--yikes, maybe the pipe part is needed--i'll try to fix that...
13:28 unmatched} I'm gonna do that all the time now :P
13:28 moritz hello jkramer
13:29 jkramer How do I start the perl6 shell with 2016.07.1? I upgraded recently and when I start perl6 without any arguments now I don't get the prompt anymore.
13:29 unmatched} jkramer: that still should be the way. What OS?
13:30 jkramer FreeBSD
13:30 nine mst: looks like something very much worth investigating!
13:30 mst nine: and the :: in perl5 makes for dispatch via that package
13:30 jkramer Both the 2016.04 and 2016.07 were built from rakudo star, if that changes anything. But with 04 I got the REPL shell
13:30 mst nine: see also http://p3rl.org/curry
13:31 nine mst: I wonder if the same trick works in Perl 6
13:31 unmatched} tbrowder: I recall in the past the indexer having issues with tags inside of it, so X<B<foo>> would have to be written as X<B<foo>|foo>
13:32 unmatched} tbrowder: and another one is issues with X<> not working when used in =head.... not sure if the same is the case for =item
13:32 jkramer Actually when I start perl6 without arguments there's a moar process that used 200M (growing) and 50% CPU while doing nothing (visibly)
13:32 unmatched} jkramer: what happens? Does it just exit or is there output?
13:32 unmatched} or does it hang
13:33 jkramer unmatched}: See last line
13:33 unmatched} jkramer: would you, please, report it as a bug?
13:33 jkramer Oh now I got a shell after forever
13:33 unmatched} :o
13:33 tbrowder zoffix: thanks for the hint--trying that...
13:33 jkramer And now it starts much faster. No idea what it did before, maybe compile some REPL modules or whatever :)
13:34 unmatched} Mabby
13:34 moritz precompile the setting? :/
13:34 jkramer zostay: Thanks for the super-quick channel password feature BTW :)
13:34 jkramer I'll now built lots of bots and annoy people
13:35 unmatched} :)
13:35 grondilu m: sub (:param($x)) {}
13:35 camelia rakudo-moar 942a69: ( no output )
13:35 grondilu m: sub (:param(\x)) {}
13:35 camelia rakudo-moar 942a69: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Missing block␤at <tmp>:1␤------> 3sub (:param(7⏏5\x)) {}␤»
13:35 grondilu ^can I make sigilless named parameters?
13:37 timotimo maybe "is raw" will do what you want?
13:37 zostay jkramer: ?
13:38 unmatched} zostay: wrong nick; meant to go to zoffix
13:38 jkramer Zoffix
13:38 jkramer Yeah sorry, autocomplete :)
13:38 lizmat m: sub a(:$foo is raw) { $foo = 42 }; my $foo = 666; a :$foo; say $foo   # grondilu
13:38 camelia rakudo-moar 942a69: OUTPUT«42␤»
13:38 jkramer I blame the high amount of people in this channel and the lack of unique letters in the alphabet
13:40 lizmat m: sub a(:$foo! is rw) { $foo = 42 }; my $foo = 666; a :$foo; say $foo   # grondilu: probably better
13:40 camelia rakudo-moar 942a69: OUTPUT«42␤»
13:41 dalek doc: 0c0a266 | (Tom Browder)++ | doc/Language/pragmas.pod6:
13:41 dalek doc: try index method per zoffix's hint
13:41 dalek doc: review: https://github.com/perl6/doc/commit/0c0a2666b4
13:41 dalek doc: d82fb78 | (Tom Browder)++ | doc/Language/pragmas.pod6:
13:41 dalek doc: Merge pull request #793 from tbrowder/pragma3
13:41 dalek doc:
13:41 dalek doc: try index method per zoffix's hint
13:41 dalek doc: review: https://github.com/perl6/doc/commit/d82fb78d88
13:42 ptolemarch joined #perl6
13:42 Actualeyes joined #perl6
13:45 grondilu what I wanted to do was more:  sub f(:long-name-for-param(\short-name) { do-stuff-with short-name }
13:46 mr-foobar joined #perl6
13:46 grondilu forgot to close a paren though
13:46 grondilu neither rw nor raw traits are related anyway
13:47 psch well, 'is raw' is functionally what sigilless parameters are
13:47 avenj joined #perl6
13:47 avenj joined #perl6
13:47 psch or semantically i guess
13:47 psch m: sub f(\a) { }; say &f.signature.params[0].raw
13:47 camelia rakudo-moar 942a69: OUTPUT«True␤»
13:48 grondilu ok but I was only interested in the syntactic aspect
13:49 grondilu I wanted to use Greek letters for params but I hate to use them with sigils.
13:50 sena_kun joined #perl6
13:52 grondilu ("hate" is strong a word though, on second thought)
13:54 moritz rage against the sigil!
13:54 psch well, you can still do *%_ and look for the symbols you want...
13:55 psch i don't know how sensible sigilless nameds are, but maybe we can have them too
14:07 jkramer How can I do this: irc-addressed($ where /freitag/) case-insensitive? Using m:i/freitag/ gives me a weird error from inside the module I'm using (IRC::Client)
14:08 jkramer Is there something wrong with the regex or the object which comes in as the first parameter?
14:08 moritz jkramer: where rx:i/freitag/
14:08 jkramer Ah, I see. Thanks!
14:08 moritz jkramer: m// is an immediate match, but what you want there is a regex as an object
14:09 moritz (which the type-checker uses in a regex match)
14:09 jkramer That makes sense :)
14:15 unmatched} jkramer: $ where /:i freitag/
14:17 unmatched} m: sub foo ($ where m:i/bar/) { say "Got a bar" }; foo 'BAR'
14:17 camelia rakudo-moar 942a69: OUTPUT«Got a bar␤»
14:17 unmatched} m: sub foo ($ where /:i bar/) { say "Got a bar" }; foo 'BAR'
14:17 camelia rakudo-moar 942a69: OUTPUT«Got a bar␤»
14:17 unmatched} m: sub foo ($ where rx:i/bar/) { say "Got a bar" }; foo 'BAR'
14:17 camelia rakudo-moar 942a69: OUTPUT«Got a bar␤»
14:17 unmatched} Not sure what weird error you had with m:i//
14:18 jkramer unmatched}: I think that $ is not a string but some object that overrides ~~ so it matches against $_.text
14:19 jkramer Method 'match' not found for invocant of class 'IRC::Client::Message::Privmsg::Channel'  in block
14:19 unmatched} ah
14:20 tbrowder zoffix: excellent! pragmas and their names are now searchable. yr hint to use "X<B<foo>|foo>
14:20 tbrowder did the trick!!  thnks, ++zoffix
14:20 * lizmat has taken her own advice: http://act.yapc.eu/alpineperl2016/talk/6868
14:21 unmatched} \o/ lizmat++
14:23 jkramer Is there something like Module::Refresh for perl6?
14:25 moritz I'm not aware of anything
14:25 unmatched} Don't think so
14:27 canopus joined #perl6
14:27 AndyBotwin joined #perl6
14:29 Rawriful joined #perl6
14:30 * lizmat hopes other people will take her advice as well: http://act.yapc.eu/alpineperl2016/call_for_papers.html
14:31 unmatched} jkramer: that bug has been fixed. Latest and greatest IRC::Client will take an m:i// too
14:33 unmatched} lizmat: so what was the advice? :)
14:35 lizmat "There is still time to submit a Perl 6 talk!"
14:35 unmatched} Ah
14:36 unmatched} m: class Foo { method Str { "meow" } }; say Foo ~~ /meow/
14:36 camelia rakudo-moar 942a69: OUTPUT«「meow」␤»
14:36 unmatched} m: class Foo { method Str { "meow" } }; say Foo ~~ m/meow/
14:36 camelia rakudo-moar 942a69: OUTPUT«Method 'match' not found for invocant of class 'Foo'␤  in block <unit> at <tmp> line 1␤␤»
14:36 unmatched} m: class Foo { method Str { "meow" } }; say Foo ~~ rx/meow/
14:36 camelia rakudo-moar 942a69: OUTPUT«「meow」␤»
14:36 * unmatched} shrugs
14:39 jkramer unmatched}: Awesome, thanks :)
14:42 rurban joined #perl6
14:42 rurban left #perl6
14:42 Rawriful joined #perl6
14:43 unmatched} star: use Pod::To::HTML; say Pod::To::HTML.^ver
14:43 camelia star-m 2016.04: OUTPUT«(Mu)␤»
14:43 unmatched} How do we find out versions of modules installed?
14:44 unmatched} m: say class Foo:ver<42> {}.^ver # but how to go about a module?
14:44 camelia rakudo-moar 942a69: OUTPUT«v42␤»
14:45 khw joined #perl6
14:47 psch m: module Foo:ver<42> { }; Foo.^ver.say
14:47 camelia rakudo-moar 942a69: OUTPUT«v42␤»
14:48 unmatched} Hm, Pod::To::HTML doesn't have a :ver<>. So I guess only a package manager would know?
14:49 timotimo the compunit repo should know, i think
14:49 timotimo because it nommed the meta.info?
14:49 [Coke] perl6/doc - perl6 htmlify.p6 --parallel # generates a ton of Use of uninitialized value $file of type Any in string context
14:50 unmatched} star: say $*REPO.need(CompUnit::DependencySpecification.new(:short-name("Pod::To::HTML"))).version
14:50 camelia star-m 2016.04: OUTPUT«v*␤»
14:50 timotimo :\
14:50 unmatched} Too verbose for quick one liners, but at least it works :)
14:51 timotimo except PTH doesn't have the version set properly :)
14:51 sufrosti1o joined #perl6
14:51 unmatched} It does now. But I guess it was at * in 2016.04 star
14:51 timotimo OK
14:52 sena_kun [Coke], with latest docs? At what place exactly?
14:52 unmatched} .oO( s/DependencySpecification/DepSpec/ .... )
14:55 [Coke] sena_kun: it begins emitting them immediately. just did a git pull
14:55 ecallen joined #perl6
14:56 [Coke] Any of .^name, .perl, .gist, or .say can stringify undefined things, if needed.  in any load_module at src/Perl6/World.nqp line 1193
14:56 sena_kun [Coke], what rakudo do you using? I had a bit similar issue witt about a two week old rakudo release.
14:56 [Coke] using rakudo 2016.07.1
14:57 sena_kun [Coke], it's strange. I use 2016.07.1-57-g0419194 built on MoarVM version 2016.07-3-g and cannot reproduce.
14:57 mcmillhj joined #perl6
15:00 dalek doc: fd54601 | (Zoffix Znet)++ | Makefile:
15:00 dalek doc: Add missing items to make help
15:00 dalek doc: review: https://github.com/perl6/doc/commit/fd54601667
15:01 dalek doc: 086db7f | (Tom Browder)++ | doc/Language/about.pod6:
15:01 dalek doc: Add some details and examples to show fine points.
15:01 dalek doc:
15:01 dalek doc: Distinguish between the source code and how it's rendered.  Emphasize the searchable format coding and its nuances.
15:01 dalek doc: review: https://github.com/perl6/doc/commit/086db7fd09
15:05 dalek doc: b6b3952 | (Zoffix Znet)++ | .gitignore:
15:05 dalek doc: Ignore generated html/links.txt
15:05 dalek doc: review: https://github.com/perl6/doc/commit/b6b3952338
15:05 dalek doc: f0b31f1 | (Zoffix Znet)++ | Makefile:
15:05 dalek doc: Add make webdev-build
15:05 dalek doc:
15:05 dalek doc: Builds with --sparse=200; useful for testing website related changes
15:06 dalek doc: where only a few generated files are needed.
15:06 dalek doc: review: https://github.com/perl6/doc/commit/f0b31f113d
15:07 unmatched} m: https://gist.github.com/zoffixznet/ae6d37d1c45e0207c6884adec847ceb6
15:07 camelia rakudo-moar d97e09: OUTPUT«Player 1 chooses Rock␤Player 2 chooses Paper␤Player 2 wins!␤»
15:08 unmatched} masak: ^ per suggestion on Twitter :) https://twitter.com/notcalledjack/status/760841358294691840
15:08 unmatched} m: "????".uninames.say
15:08 camelia rakudo-moar d97e09: OUTPUT«(FISTED HAND SIGN)␤»
15:13 unmatched} I'm not getting any 'Any of ...' with --parallel on Rakudo version 2016.06-151-gc843682 built on MoarVM version 2016.06-9-g8fc21d5
15:16 dalek doc: 385aa21 | (Tom Browder)++ | doc/Language/about.pod6:
15:16 dalek doc: Another tweak.
15:16 dalek doc: review: https://github.com/perl6/doc/commit/385aa21e14
15:16 harmil_wk joined #perl6
15:17 unmatched} I'm not getting any 'Any of ...' with --parallel on RRakudo version 2016.07.1-91-g373634e built on MoarVM version 2016.07-11-g11e02fe either
15:18 unmatched} [Coke]: perhaps your Pod::To::HTML/Pod::To::BigPage need an update?
15:18 timotimo Rrrrrrakudo
15:19 unmatched} What's 91 in 2016.07.1-91-g373634e
15:19 unmatched} ?
15:19 jkramer When I accept an argument with ($ where ...), is there still a way to access that $ thing inside the method? Just wondering.
15:19 jkramer Or does it need a name
15:19 unmatched} jkramer: no, $ is anonymous. You need to name it
15:19 jkramer Ok, thanks
15:20 unmatched} ($_ where ...) { .text.uc } # or name it as the topic var
15:21 psch m: sub f($ where * < 10) { }; f 10
15:21 camelia rakudo-moar d97e09: OUTPUT«Constraint type check failed for parameter '<anon>'␤  in sub f at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
15:22 dalek doc: 87cc875 | (Tom Browder)++ | doc/Language/about.pod6:
15:22 dalek doc: more tweaks
15:22 dalek doc: review: https://github.com/perl6/doc/commit/87cc875128
15:22 avenj joined #perl6
15:22 avenj joined #perl6
15:24 aindilis joined #perl6
15:30 titsuki joined #perl6
15:37 mwal_atikon joined #perl6
15:39 canopus joined #perl6
15:44 tbrowder hm, more tweaks will be needed...
15:46 mwal_atikon joined #perl6
15:48 araujo joined #perl6
15:48 dalek doc: 2899fc5 | (Tom Browder)++ | doc/Language/about.pod6:
15:48 dalek doc: use the verbatim code to see the actual formatting codes
15:48 dalek doc: review: https://github.com/perl6/doc/commit/2899fc5cf5
15:49 araujo joined #perl6
15:51 AndChat|176409 joined #perl6
15:51 mcmillhj joined #perl6
15:52 araujo joined #perl6
15:52 araujo joined #perl6
15:54 araujo joined #perl6
15:56 araujo joined #perl6
15:56 araujo joined #perl6
15:58 moritz anyone up for a bit of a linguist discussion? :-)
15:58 n0tjack joined #perl6
15:59 moritz what is the difference between a stepback and a rollback?
15:59 araujo joined #perl6
15:59 dalek doc: 795e2f7 | (Tom Browder)++ | doc/Language/pragmas.pod6:
15:59 dalek doc: tweaks
15:59 dalek doc:
15:59 dalek doc: Remove colon (":") separators between item and following text, put abbreviations NYI and TBD in square brackets.
15:59 dalek doc: review: https://github.com/perl6/doc/commit/795e2f7f13
16:00 n0tjack I'm trying to fiddle Zoffix's neat rock-paper-scissors script by substituting cutesy emojis where he has words, but p6 doesn't seem to like them.
16:00 n0tjack https://gist.github.com/anonymous/89082d2552de428f8386d9f8ac336a10
16:00 n0tjack Is there any way to get p6 to accept those emojis as enums and function names?
16:01 jast moritz: the only meaning of 'stepback' that I've seen so far relates to furniture
16:01 moritz n0tjack: only characters that are identifiers can serve as enum values or constants
16:02 moritz jast: ok, then I might have picked up some unidiomatic English there
16:02 n0tjack I can't hack my way around with something like "\xFFFF" or whatever the unicode code points are?
16:02 jast the phrase 'step back' is more common
16:02 jast someone may have nominalized it
16:02 psch m: enum Hand <???? ✋ ✌>; say Hand.enums
16:02 camelia rakudo-moar 051339: OUTPUT«Map.new(("✋" => 1,"✌" => 2,"????" => 0))␤»
16:02 psch well the enum decl works
16:03 dalek doc: 276d799 | (Tom Browder)++ | doc/Language/about.pod6:
16:03 dalek doc: fix an error in the rendered code section
16:03 dalek doc: review: https://github.com/perl6/doc/commit/276d799b9f
16:03 moritz m: enum Hand <  ✌>; say Hand::('✌')
16:03 camelia rakudo-moar 051339: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Combination of indirect name lookup and call not supported␤at <tmp>:1␤------> 3enum Hand <  ✌>; say Hand::('✌')7⏏5<EOL>␤    expecting any of:␤        argument list␤»
16:03 moritz m: enum Hand <  ✌>; say ::Hand::('✌')
16:03 camelia rakudo-moar 051339: OUTPUT«✌␤»
16:04 gregf_ stepback is for humans , rollback for db's? :|
16:04 n0tjack @moritz, psch: on my system, p6 isn't carping about the enum, but the function
16:04 mcmillhj joined #perl6
16:04 n0tjack ===SORRY!=== Error while compiling /Users/dbron/Dropbox/perl6/./rochambeau.p6 Missing block at /Users/dbron/Dropbox/perl6/./rochambeau.p6:5 ------> multi infix:<✊>(⏏✋, ????) { True }
16:05 TimToady a stepback is something you do yourself, a rollback is something you do to other people and/or things
16:06 unmatched} m: https://gist.github.com/zoffixznet/31bddde0a0eb4227f7b194dcfe8104ab
16:06 camelia rakudo-moar 051339: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Missing block␤at <tmp>:7␤------> 3multi infix:<✊>(7⏏5✋, ????) { True }␤»
16:06 unmatched} Looks like terms can't be in sigs :(
16:07 unmatched} m: sub term:<????> { 'Rock' }.name.say
16:07 camelia rakudo-moar 051339: OUTPUT«term:<????>␤»
16:07 unmatched} hm
16:08 n0tjack Ah well, it's probably truer to the logic to make a triangular boolean matrix anyway. That way I can add "shotgun" or "spock" more easily.
16:08 n0tjack Thanks guys.
16:08 unmatched} :)
16:10 unmatched} m: https://gist.github.com/zoffixznet/cc38622703091d026be0bb1fa4fd20a2
16:10 camelia rakudo-moar 051339: OUTPUT«Player 1 chooses: ✋␤Player 2 chooses: ✋␤It's a tie!␤»
16:10 unmatched} n0tjack: ^
16:10 unmatched} Not the same as original, but you get cutesy emoji :)
16:10 n0tjack unmatched}: Nice.  Well done. Though of course the golfing purist in me wants to avoid quotation :)
16:11 timotimo make it a macro :P
16:11 n0tjack I'm psyched macros are now a thing. That was a hurdle for some project I made a go at last year.
16:12 n0tjack Also stoked to see docs in the default install.
16:12 n0tjack Hmm, I just realized I don't need a matrix. Just an ordered tuple and a custom comparitor that knows how to "wrap around".
16:13 timotimo tbh, macros aren't much more of a thing than they were a year ago
16:14 timotimo masak has been doing some good research over at 007, though
16:14 n0tjack what's 007?
16:15 Tonik joined #perl6
16:16 timotimo very good
16:16 acrussell joined #perl6
16:16 timotimo https://github.com/masak/007/blob/master/README.md
16:17 dalek doc: 312f7e4 | (Tom Browder)++ | doc/Language/about.pod6:
16:17 dalek doc: more errors fixed (fingers crossed)
16:17 dalek doc:
16:17 dalek doc: the C<C<>> construct doesn't render properly, use C<B<>> instead.
16:17 dalek doc: review: https://github.com/perl6/doc/commit/312f7e4e35
16:20 gregf_ is the do {} construct nowhere near to the Perl5 construct?
16:20 gregf_ like so, i can do : do { ##} if/unless ( <cond> )
16:21 n0tjack m: do {say "Sure"} if (3>4);
16:21 camelia rakudo-moar 051339: ( no output )
16:21 n0tjack m: do {say "Sure"} if (5>4);
16:21 camelia rakudo-moar 051339: OUTPUT«Sure␤»
16:21 unmatched} m: do { say "hi" } if 42
16:21 camelia rakudo-moar 051339: OUTPUT«hi␤»
16:21 gregf_ o_O
16:22 unmatched} gregf_: you can't do {} while; tho; use repeat {} until
16:22 timotimo i think the do + if/unless is nothing to do with do
16:23 TimToady do {} is just a term
16:23 gregf_ oh - yes
16:23 TimToady m: do { 42 } while 43;
16:23 camelia rakudo-moar 051339: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Unsupported use of do...while; in Perl 6 please use repeat...while or repeat...until␤at <tmp>:1␤------> 3do { 42 } while 437⏏5;␤»
16:23 gregf_ these spaces after ' {' or after an if/while/for can melt ones brain :|
16:23 TimToady we do catch this braino though
16:24 zakharyas joined #perl6
16:24 gregf_ sub reversematch($val){  my @data = $val.split(""); my ($i, $flag) = (0, True); while ( $i < @data.Int/2){ do { $flag = False;last;  } if ( @data[$i] ne @data[@data.Int - 1 - $i] ); $i++; }; return $flag;}; say reversematch("pete"); #was trying this and the error was misleading :/
16:25 unmatched} gregf_: what's the error?
16:25 dalek doc: 05c9ba6 | (Tom Browder)++ | doc/Language/about.pod6:
16:25 dalek doc: more teaks, and more info
16:25 dalek doc: review: https://github.com/perl6/doc/commit/05c9ba65c8
16:25 unmatched} gregf_: you don't need () on if expressions in Perl 6
16:25 gregf_ unmatched}: i just had to comment bits out :/ till i figured out where the problem was :/
16:26 BrassLantern joined #perl6
16:26 gregf_ expecting any of: block or pointy block
16:26 unmatched} gregf_: and @data[@data.Int - 1 - $i] can be written as @data[*-1-$i]
16:26 gregf_ *silly message imho*
16:27 gregf_ unmatched}: yeah, sure. thats the refactoring bit ;)
16:28 jkramer left #perl6
16:30 gregf_ ta all!
16:30 unmatched} gregf_: in the future, it's helpful to report such "silly message" errors
16:30 unmatched} m: while (0){}
16:30 camelia rakudo-moar 051339: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Missing block␤at <tmp>:1␤------> 3while (0){}7⏏5<EOL>␤    expecting any of:␤        block or pointy block␤»
16:30 unmatched} m: while (0) {}
16:30 camelia rakudo-moar 051339: ( no output )
16:31 gregf_ yeah, that can be quite annoying :|
16:31 unmatched} Well, we do have access to source code to make it better :)
16:31 TimToady {} is a perfectly value postfix on a (), so "Missing block" is pretty accurate
16:31 TimToady *valid
16:31 unmatched} m: while 0 {}
16:31 camelia rakudo-moar 051339: ( no output )
16:32 TimToady we do bother to catch the error if a listop eats the brackets
16:32 TimToady m: while say {}
16:32 camelia rakudo-moar 051339: OUTPUT«5===SORRY!5===␤Function 'say' needs parens to avoid gobbling block␤at <tmp>:1␤------> 3while say {}7⏏5<EOL>␤Missing block (apparently claimed by 'say')␤at <tmp>:1␤------> 3while say {}7⏏5<EOL>␤␤»
16:32 TimToady we might be able to swing something similar for (){}
16:33 travis-ci joined #perl6
16:33 travis-ci Doc build failed. Tom Browder 'more teaks, and more info'
16:33 travis-ci https://travis-ci.org/perl6/doc/builds/149521307 https://github.com/perl6/doc/compare/312f7e4e35cb...05c9ba65c879
16:33 travis-ci left #perl6
16:33 unmatched} m: (:42foo, :72bar){'foo'}.say
16:33 camelia rakudo-moar 051339: OUTPUT«Type List does not support associative indexing.␤  in block <unit> at <tmp> line 1␤␤Actually thrown at:␤  in block <unit> at <tmp> line 1␤␤»
16:33 unmatched} m: ({:42foo, :72bar}){'foo'}.say
16:33 camelia rakudo-moar 051339: OUTPUT«42␤»
16:34 TimToady we would presumably only issue the diagnostic if the block actually turned out to be missing
16:34 unmatched} I think going for (){} may be too wide. just detect if the ( is preceded by a while or something
16:34 unmatched} Oh, sure.
16:34 TimToady m: while say {} {}
16:35 TimToady like that parses fine
16:35 camelia rakudo-moar 051339: OUTPUT«(timeout){}␤{}␤{}␤{}␤{}␤{}␤{}␤{}␤{}␤{}␤{}␤{}␤{}␤{}␤{}␤{}␤{}␤{}␤{}␤{}␤{}␤{}␤{}␤{}␤{}␤{}␤{}␤{}␤{}␤{}␤{}␤{}␤{}␤{}␤{}␤{}␤{}␤{}␤{}␤{}␤{}␤{}␤{}␤{}␤{}␤{}␤{}␤{}␤{}␤{}…»
16:35 lambd0x joined #perl6
16:35 lambd0x Hi there!
16:35 unmatched} \o
16:37 lambd0x Does anyone of you know how internally works an array in Perl6? I mean how does its memory management is done and how each basic operation that rakudo performs is done...
16:37 lambd0x unmatched}: o/
16:37 pierre_ joined #perl6
16:37 unmatched} Considering there are developers in the channel who wrote that code, sure someone knows :) What's the actual question?
16:38 timotimo easy to find out
16:38 timotimo just check out the moarvm source and look into src/6model/reprs/, where you'll find the VMArray.h and VMArray.c files
16:38 lambd0x memory management performed by rakudo for array type
16:39 lambd0x timotimo: that helps :)
16:41 labster joined #perl6
16:43 jnthn Also src/core/Array.pm and src/core/List.pm (Array inherits a bunch from List) are relevant
16:44 lambd0x thanks. Want to know because I plan to use this language in a algorithm complexity course in my university..
16:45 timotimo it's good to point out that our VMArray uses "realloc", which apparently has some implementations that have their own heuristics when it comes to growing memory regions
16:46 timotimo i.e. they sometimes grow more than requested and will then do future growth requests without doing copies
16:46 timotimo i forgot who told us about that
16:47 ilmari glibc has malloc_usable_size() which tells you how much was actually allocated
16:47 timotimo oh that's helpful
16:48 hoelzro TIL
16:48 hoelzro ilmari++
16:48 hoelzro I only knew about mallinfo
16:48 ilmari OSX has malloc_size() and malloc_good_size()
16:48 lambd0x hm... but its use of realloc is subjected to internal fragmentation?
16:49 lambd0x hoelzro
16:49 lambd0x hoelzro++
16:49 ilmari hoelzro: is that for when you decide memory management is hard and go shopping?
16:50 timotimo what is "good size" for?
16:51 hoelzro ilmari: haha
16:51 lambd0x timotimo: My install directory of perl6 is kinda different btw :P
16:53 ilmari timotimo: the supplied size rounded up to not have any padding
16:55 mcmillhj joined #perl6
16:58 lambd0x is there a prevision of rakudo's support for jagged arrays? e.g. my @array[*;*] ?
16:59 [Coke] prevision?
17:03 mcmillhj joined #perl6
17:04 lambd0x [Coke]: sorry, prediction :)
17:04 lambd0x typo there...
17:04 gfldex at some point in the future
17:04 lambd0x so?
17:05 sufrostico joined #perl6
17:05 sufrosti1o joined #perl6
17:05 lambd0x ah nice, yesterday I've learned a lot about how to work with arrays is general and also tried to have a jagged which failed.
17:05 gfldex if you asked about the future expect to get what you deserve :)
17:06 lambd0x gfldex: hahaah
17:06 lambd0x gfldex: the fact there shall be such a feature is enough for my curiosity... :)
17:07 lambd0x thanks
17:07 gfldex it is in the specs
17:09 prammer joined #perl6
17:10 lambd0x indeed it is.
17:10 dalek doc: dc0e321 | (Tom Browder)++ | doc/Language/about.pod6:
17:10 dalek doc: last tweak failed, possibly D<> construct not recognized at least in an =item
17:10 dalek doc:
17:10 dalek doc: Changed from D<> to B<>
17:10 dalek doc: review: https://github.com/perl6/doc/commit/dc0e321af6
17:10 lambd0x thanks everyone!
17:16 dalek doc: 826d978 | (Zoffix Znet)++ | template/search_template.js:
17:16 dalek doc: Display 5to6 items in search results last
17:16 dalek doc:
17:16 dalek doc: Fixes #792
17:16 dalek doc: review: https://github.com/perl6/doc/commit/826d9787b0
17:17 setty1 joined #perl6
17:18 avenj joined #perl6
17:25 firstdayonthejob joined #perl6
17:30 dalek doc: 961d204 | (Wenzel P. P. Peppmeyer)++ | doc/Type/Cool.pod6:
17:30 dalek doc: make example stand out
17:30 dalek doc: review: https://github.com/perl6/doc/commit/961d204a67
17:30 travis-ci joined #perl6
17:30 travis-ci Doc build passed. Tom Browder 'last tweak failed, possibly D<> construct not recognized at least in an =item
17:30 travis-ci https://travis-ci.org/perl6/doc/builds/149531767 https://github.com/perl6/doc/compare/05c9ba65c879...dc0e321af6f0
17:30 travis-ci left #perl6
17:37 travis-ci joined #perl6
17:37 travis-ci Doc build passed. Zoffix Znet 'Display 5to6 items in search results last
17:37 travis-ci https://travis-ci.org/perl6/doc/builds/149533481 https://github.com/perl6/doc/compare/dc0e321af6f0...826d9787b0f5
17:37 travis-ci left #perl6
17:39 tbrowder Okay, p6 folks, the doc "Language/About the Docs" page is now much more correct and informative (given the current pod rendering situation).
17:39 tbrowder tweaks welcome
17:42 unmatched} tbrowder: the 'Generating this documentation requires' is missing Pod::To::BigPage from required modules
17:45 tbrowder Hm, wasn't that in the top chunk?  I didn't intentionally touch that--I'll fix, though...
17:45 unmatched} And a big-picture thought is that `About the Docs` page just duplicates the CONTRIBUTING.md and doesn't even need to be on docs.perl6.org/Language https://github.com/perl6/doc/blob/master/CONTRIBUTING.md
17:45 mcmillhj joined #perl6
17:46 prammer joined #perl6
17:48 dalek perl6.org: c2366d9 | (Zoffix Znet)++ | README.md:
17:48 dalek perl6.org: Mention Edge in browser support
17:48 dalek perl6.org: review: https://github.com/perl6/perl6.org/commit/c2366d944f
17:49 dalek modules.perl6.org: 8fe1075 | (Zoffix Znet)++ | README.md:
17:49 dalek modules.perl6.org: Mention Edge in browser support
17:49 dalek modules.perl6.org: review: https://github.com/perl6/modules.perl6.org/commit/8fe10750db
17:49 tbrowder zoffix:  I don't see that module mentioned in the file before I touched it today.
17:50 travis-ci joined #perl6
17:50 travis-ci Doc build passed. Wenzel P. P. Peppmeyer 'make example stand out'
17:50 travis-ci https://travis-ci.org/perl6/doc/builds/149536314 https://github.com/perl6/doc/compare/826d9787b0f5...961d204a6761
17:50 travis-ci left #perl6
17:50 dalek doc: 4676aff | (Zoffix Znet)++ | CONTRIBUTING.md:
17:50 dalek doc: Document required browser support
17:50 dalek doc: review: https://github.com/perl6/doc/commit/4676aff94a
17:51 wamba joined #perl6
17:52 dalek doc: 710fb7c | (Zoffix Znet)++ | doc/Language/about.pod6:
17:52 dalek doc: List Pod::To::BigPage as needed module
17:52 dalek doc: review: https://github.com/perl6/doc/commit/710fb7cb00
17:52 firstdayonthejob joined #perl6
17:53 dalek doc: 0d037cf | (Zoffix Znet)++ | CONTRIBUTING.md:
17:53 dalek doc: Add TOC for easier navigation
17:53 dalek doc: review: https://github.com/perl6/doc/commit/0d037cfd0e
17:55 sena_kun gfldex, hi. I see you're working on making the docs examples compile. What parts do you plan to take? I'd want to help here, most likely, with Types/ directory. Do you plan to take Language/ entries?
17:55 dalek doc: 1fb61d4 | (Zoffix Znet)++ | CONTRIBUTING.md:
17:55 dalek doc: Add Pod::To::BigPage to module install instructions
17:55 dalek doc: review: https://github.com/perl6/doc/commit/1fb61d4a65
17:56 gfldex sena_kun: i'm doing /Language/* ordered by find examples/ -type f -ls | sort -n -k 7
17:57 spider-mario joined #perl6
17:58 travis-ci joined #perl6
17:58 travis-ci Doc build errored. Zoffix Znet 'Document required browser support'
17:58 travis-ci https://travis-ci.org/perl6/doc/builds/149541173 https://github.com/perl6/doc/compare/961d204a6761...4676aff94a2d
17:58 travis-ci left #perl6
17:59 sena_kun gfldex, okay, I'll take all(in best case) Type/* then. Can I ask you for an advice about this task in the future, if something I'm not sure about pops out?
18:01 tbrowder zoffix: I agree bout the redundancy.  We can either delete the page (not my call), or reference it on the About page, and make it clear that the About page is merely an overview.  On difference between the two pages (I think--haven't kept up with yr speedy changes) is any mention of the detailed indexing cross-reference aspects of the pod source.
18:02 gfldex sena_kun: i try to :skip-test as least as possible but will not be religious about it. Anything that throws an exception is skipped but I first try to include an exception handler first. If the example gets convoluted skipping is better as clarity for the reader is more important then our ability to sleep soundly.
18:03 tbrowder When I said "delete the page" I was referring to the "About the Docs Page."
18:05 FROGGS joined #perl6
18:06 sena_kun gfldex, I use :skip-test when I have some fake call(like Pair.fmt, see https://github.com/perl6/doc/issues/794). I also skip endless code(like say 1 .. *, etc) and catch all exceptions with a proper output(by your example).
18:07 dalek doc: 08e2e86 | Altai-man++ | doc/Type/ (6 files):
18:07 dalek doc: Make Bool/Label/Mix/Numeric/RatStr/Setty documentation files compile
18:07 dalek doc: review: https://github.com/perl6/doc/commit/08e2e86c4b
18:07 prammer joined #perl6
18:13 mcmillhj joined #perl6
18:15 autarch joined #perl6
18:15 TEttinger joined #perl6
18:22 dwarring joined #perl6
18:24 iH2O joined #perl6
18:24 iH2O great room, great contribution to mankind
18:25 gfldex now we only need to find out a way to let mankind know :->
18:26 iH2O ok, i understand perl6 is lost among 1000 other programming languages
18:27 iH2O that are less good
18:27 prammer joined #perl6
18:28 unmatched} iH2O: "lost"? Lost what?
18:28 iH2O explain them that perl6 is better. its like a classical music concert you have to tell the audience when to applaud
18:29 iH2O lol
18:29 skids :D
18:30 * skids decides not to pan classical music.  To each his own.
18:30 unmatched} Most of classical music sucks.
18:31 unmatched} But at least it's not country music.
18:31 * unmatched} hides
18:31 mst most of most genres sucks
18:32 unmatched} heh, that's also true.
18:32 perlpilot most of most anything sucks ;)
18:33 iH2O statistically speaking given 7M humans, there should be a few Mozarts around
18:33 iH2O *7B
18:33 stmuk_ Sturgeon's law
18:33 iH2O there was only 1B humans in his time
18:36 geekosaur provided they have opportunity...
18:36 setty1 joined #perl6
18:37 El_Che TimToady's and DrForr's talks at this year OSCON are now on the O'Reilly Safari bookshelf for those with a subscription
18:37 perlpilot The population of the planet today is double what it was when I was born ... ETOOMANYHUMANS
18:37 iH2O 10B humans in 2050, twice the planet's capacity
18:37 iH2O :(
18:38 perlpilot iH2O: how do you figure capacity?
18:38 iH2O it was just comfortable when there was 5B in the 1980s
18:38 El_Che iH2O: at the current eco-footprint?
18:38 iH2O the env is doomed!!
18:40 El_Che oh, and they call it the "Perl6 Track"
18:40 unmatched} iH2O: but we also put out crap in 80s, like CFCs. The more humans there is the more we can progress and fix the issues
18:41 iH2O wat
18:41 iH2O sounds like a circular twisted argument
18:41 iH2O :)
18:41 El_Che https://www.safaribooksonline.com/library/view/the-perl-6/9781491968321/video248952.html?autoStart=True
18:42 El_Che "The Perl 6 Fundamentals Video Collection"
18:43 unmatched} iH2O: not really. Your argument says we do X—which is bad— and the fewer of us there is the fewer times we'll do X, while my argument says the more of us there is the more likely we'll figure out how to avoid doing X.
18:44 iH2O i give up, your logic is too advanced for my course of Critical Thinking 101
18:45 unmatched} ¯\_(ツ)_/¯
18:46 * TimToady wonders if Gaia ever puts forth presidential candidates intended to kill off half of humanity...
18:47 unmatched} Just half? :)
18:48 gfldex TimToady: not presidents but Reichskanzlers
18:48 dalek doc: 8236877 | coke++ | doc/Type/Mu.pod6:
18:48 dalek doc: Fix broken link
18:48 dalek doc: review: https://github.com/perl6/doc/commit/823687787f
18:48 dalek doc: 093f18f | coke++ | doc/Language/about.pod6:
18:48 dalek doc: fix whitespace
18:48 dalek doc: review: https://github.com/perl6/doc/commit/093f18f6c6
18:49 gfldex but then, the spanish flu was actually better at killing off humans then both WWI and WWII combined
18:49 sena_kun We don't really need to kill. Just reduce birth rate and all will be cool after some time. But we don't have a time for rational methods!
18:50 [Coke] what is the naming convention in docs for routine vs. method?
18:50 gfldex for some time i believed that the problem of humanoverflow will solve it self because we will run out of food. But the i realised that humans can and did eat humans.
18:50 El_Che the bubonic plague was nice as well
18:50 vcv Any recommendations on Perl 6 web application frameworks? I don't need anything fancy like django in python, just something simple.
18:50 El_Che and not to be forgotten: smallpox
18:50 [Coke] we have, e.g. https://docs.perl6.org/type/Mu#routine_defined - but several things are linking to https://docs.perl6.org/type/Mu#method_defined
18:51 gfldex [Coke]: use routine if you talk about something that can be either method or sub
18:51 [Coke] vcv: Bailador is very simple, functional.
18:51 [Coke] gfldex: ok
18:51 TimToady I expect feeding antibiotics to cattle will have the appropriate population control effect downstream
18:51 vcv supports mustache? Sold. Thanks [Coke]
18:51 unmatched} I wouldn't really call it functional.
18:52 vcv Well I'll try it at least
18:52 unmatched} Well, I guess it depends on what your app does. But there's no way to make it non-blocking.
18:52 gfldex TimToady: Death by Kindness? o.O
18:52 [Coke] looks like the link to https://docs.perl6.org/type/Mu#method_defined is not explicitly listed in the source.
18:52 vcv that's ok, it will be a light use internal web app
18:52 unmatched} Cool.
18:53 [Coke] ah, I'm misreading the bug report.
18:53 vcv Just need an excuse to write some Perl 6 at work
18:53 harmil_wk Man, I wish there were a more descriptive way to say where a builtin was defined than just "line 9212 of m-CORE.setting" :-)
18:53 harmil_wk m: for Int.^methods {say "{.file}:{.line}: {.name}"}
18:53 camelia rakudo-moar 08e39e: OUTPUT«gen/moar/m-CORE.setting:9368: Int␤gen/moar/m-CORE.setting:9374: Num␤gen/moar/m-CORE.setting:9378: Rat␤gen/moar/m-CORE.setting:9381: FatRat␤gen/moar/m-CORE.setting:9385: abs␤gen/moar/m-CORE.setting:9389: Bridge␤gen/moar/m-CORE.setting:9393: chr…»
18:54 unmatched} harmil_wk: what would be more descriptive than the actual line number of where it's defined?
18:55 harmil_wk setting is generated, right? In C-land, generated files generally have preprocessor sugar that tells the compiler where they were generated from.
18:55 TimToady yes, we need some file/line setting sugar
18:56 TimToady m: constant $?LINE = 42; die
18:56 camelia rakudo-moar 08e39e: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Constants with a '?' twigil not yet implemented. Sorry. ␤at <tmp>:1␤------> 3constant $?LINE = 427⏏5; die␤»
18:56 TimToady m: BEGIN $?LINE = 42; die
18:56 camelia rakudo-moar 08e39e: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤An exception occurred while evaluating a BEGIN␤at <tmp>:1␤Exception details:␤  Cannot modify an immutable Int␤    in code  at <tmp> line 1␤␤»
18:57 TimToady we could just make that work
18:57 TimToady well, and $?FILE
18:57 harmil_wk Yeah, that seems the sane way to go about it.
18:58 TimToady there might be some assumptions inside the compiler about monotonically increasing line numbers though
18:58 jnthn Can't think of one.
18:59 TimToady but yeah, something we've wanted for quite some years now, but ENOTUITS
18:59 unmatched} Well, I think I can make a small script that can translate the setting line number to file/linenumber
18:59 * unmatched} tries
19:05 * skids read that as ENOTNUTS
19:06 Begi joined #perl6
19:10 * unmatched} succeeds
19:10 canopus joined #perl6
19:10 TimToady m: while ($_){ say "hi" }
19:10 camelia rakudo-moar 08e39e: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Missing block␤at <tmp>:1␤------> 3while ($_){ say "hi" }7⏏5<EOL>␤    expecting any of:␤        block or pointy block␤»
19:10 unmatched} harmil_wk: it won't work in camelia (restricted) but works fine on non-restricted: https://gist.github.com/zoffixznet/23a9c85af59e775c2e020b296e5114c0
19:10 unmatched} m: https://gist.github.com/zoffixznet/23a9c85af59e775c2e020b296e5114c0
19:10 camelia rakudo-moar 08e39e: OUTPUT«Failed to open file /home/camelia/gen/moar/m-CORE.setting: no such file or directory␤  in any  at /home/camelia/rakudo-m-inst-2/share/perl6/runtime/CORE.setting.moarvm line 1␤  in sub where at <tmp> line 6␤  in block  at <tmp> line 16␤  in block <u…»
19:10 unmatched} hmmm
19:10 TimToady m: while ($_){ say "hi" }
19:11 camelia rakudo-moar 7ec824: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Missing block (whitespace needed before curlies taken as a hash subscript?)␤at <tmp>:1␤------> 3while ($_){ say "hi" }7⏏5<EOL>␤    expecting any of:␤        block or pointy block␤»
19:11 iH2O left #perl6
19:11 unmatched} It may need tweaking, I guess. Works fine for my rakudobrewed perl 6
19:11 unmatched} hmmm
19:11 TimToady gregf_: ^^^
19:12 unmatched} m: Int.^can("say")[0].file.IO.absolute.say
19:12 camelia rakudo-moar 7ec824: OUTPUT«/home/camelia/gen/moar/m-CORE.setting␤»
19:12 unmatched} aha
19:12 trnh joined #perl6
19:12 trnh joined #perl6
19:13 unmatched} Ah, that won't work.
19:14 unmatched} So yeah, you gotta tweak the script so it can find the setting file and then it'll work :)
19:14 * unmatched} pats self on the back
19:20 unmatched} Well... I murdered huggable. She needs a rewrite to IRC::Client 3.0 :(
19:20 andrzejku joined #perl6
19:21 cooper joined #perl6
19:21 cooper joined #perl6
19:22 espadrine joined #perl6
19:33 unmatched} m: &say.file.say
19:33 camelia rakudo-moar 7ec824: OUTPUT«gen/moar/m-CORE.setting␤»
19:33 unmatched} Is there any way to get the full path to that file?
19:37 perlpilot m: &say.file.IO.abspath.say
19:37 camelia rakudo-moar 7ec824: OUTPUT«/home/camelia/gen/moar/m-CORE.setting␤»
19:38 unmatched} That's not it though. .file returns a Str and .abspath just plops CWD to it
19:40 perlpilot Sorry, that's as far as my brain got  :)
19:41 unmatched} :)
19:49 mcmillhj_ joined #perl6
20:12 s34n joined #perl6
20:27 canopus joined #perl6
20:29 AlexDaniel joined #perl6
20:31 sno joined #perl6
20:32 ufobat joined #perl6
20:35 ufobat how do i "add" 2 Buf or Blobs?
20:35 ufobat there is no method add() or append()
20:36 tbrowder left #perl6
20:42 lizmat ~
20:42 lizmat m: dd Blob.new(1,2,3) ~ Blob.new(4,5,6)
20:42 camelia rakudo-moar 7ec824: OUTPUT«Blob.new(1,2,3,4,5,6)␤»
20:42 * masak .oO( Bufs and Blobs have both string nature and list nature )
20:42 pmurias joined #perl6
20:42 lizmat m: dd Buf.new(1,2,3).push(Blob.new(4,5,6))
20:42 camelia rakudo-moar 7ec824: OUTPUT«Failure.new(exception => X::TypeCheck.new(operation => "push to Buf", got => Blob.new(4,5,6), expected => uint8), backtrace => Backtrace.new)␤»
20:43 lizmat hmmmm
20:45 lizmat m: dd Buf.new(1,2,3).push(Buf.new(4,5,6))
20:45 camelia rakudo-moar 7ec824: OUTPUT«Buf.new(1,2,3,4,5,6)␤»
20:45 lizmat hmmm... apparently we cannot push a Blob onto a Buf (yet)
20:45 moritz wouldn't that be .append anyway?
20:45 lizmat for Blob/Buf there is no difference between .append and .push anyway
20:45 lizmat m: dd Buf.new(1,2,3).append(Buf.new(4,5,6))
20:45 camelia rakudo-moar 7ec824: OUTPUT«Buf.new(1,2,3,4,5,6)␤»
20:47 lizmat ufobat: ^^^
20:49 zakharyas joined #perl6
20:49 domidumont joined #perl6
20:50 ufobat mmmm
20:51 xnrand joined #perl6
20:53 ufobat but
20:53 ufobat m: my Blob $b; my Blob $a = Blob.new(1,2,3); $b = $b ~ $a;
20:53 camelia rakudo-moar 7ec824: OUTPUT«Use of uninitialized value $b of type Blob in string context␤Any of .^name, .perl, .gist, or .say can stringify undefined things, if needed.  in block <unit> at <tmp> line 1␤Cannot use a Buf as a string, but you called the Stringy method on it␤  in b…»
20:54 ufobat m: my Blob $b; my Blob $a = Blob.new(1,2,3); $b ~= $a;
20:54 camelia rakudo-moar 7ec824: OUTPUT«Cannot use a Buf as a string, but you called the Stringy method on it␤  in block <unit> at <tmp> line 1␤␤»
20:54 ufobat why is there a difference?
20:55 lizmat ah, good point
20:55 ufobat i was confused bacause my $b was not defined :( now it's fine
20:55 masak TimToady: did I hear you heckling in response to your name in https://www.youtube.com/watch?v=a5Q7td6t-iw ? :P
20:56 ufobat if $b is actually Buf:D  or Blob:D it is working
20:56 lizmat m: my Buf $a; $a.push(Buf.new(1,2,3,4)
20:56 camelia rakudo-moar 7ec824: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Unable to parse expression in argument list; couldn't find final ')' ␤at <tmp>:1␤------> 3my Buf $a; $a.push(Buf.new(1,2,3,4)7⏏5<EOL>␤»
20:56 lizmat m: my Buf $a; $a.push(Buf.new(1,2,3,4))
20:56 camelia rakudo-moar 7ec824: OUTPUT«Cannot modify an immutable Buf␤  in any  at gen/moar/m-Metamodel.nqp line 1736␤  in block <unit> at <tmp> line 1␤␤»
20:56 lizmat ok, that needs to be fixed
20:57 ufobat thanks for the help!
20:58 lizmat m: my Buf $a .= new; $a.push(Buf.new(1,2,3,4))  # workaround
20:58 camelia rakudo-moar 7ec824: ( no output )
20:58 masak TimToady: oh, and "Perl wants to be Haskell" was definitely you :D
20:59 margeas joined #perl6
21:15 AndChat|176409 joined #perl6
21:17 s34n joined #perl6
21:31 e163 joined #perl6
21:33 dj_goku so if I wanted to hack on the perl6 REPL this is what I want right: rakudo/src/core/REPL.pm
21:34 hoelzro dj_goku: yup
21:35 dj_goku hoelzro: sweet. I have a few functions I want to add. Not sure how easy it'll be.
21:36 hoelzro dj_goku: what kind of functions?
21:36 dj_goku ls/pwd(this would probably just call another function)
21:36 dj_goku nothing really special
21:36 dj_goku make chdir
21:36 hoelzro hmm
21:37 dj_goku most REPLs have that and is really helpful.
21:37 hoelzro would ls call run 'ls', or would it list the symbols in the current scope?
21:37 dj_goku run ls
21:38 hoelzro is it too much to do run 'ls' or do dir '.'?
21:39 hoelzro I dunno - I (personally) tend not to like it when REPLs contaminate their environments with functions that are shell-like
21:39 hoelzro it would be nice, imo, if we allowed an RC file of sorts for the REPL, so users could stick whatever functions/etc they want in there
21:39 dj_goku ahh I live there, maybe that isn't the best way to figure things out.
21:41 dj_goku hoelzro: so in python I use ipython and it is great. I just started checking out the elixir REPL. THey both have LS, but ipython has a lot of shell-like. Where elixir only has ls/pwd
21:41 arnsholt The neat thing would be to have a module where you can sort of 'use Shell::Commands qw/ls rm/' and it generates ls(*@args) and rm(*@args) for you, that call the right programs with the args
21:42 hoelzro see, I don't mind if someone wants to build a fancier REPL ala iPython
21:42 hoelzro I just don't know if that kind of functionality belongs in Rakudo itself
21:42 dj_goku ahh. well I have no idea of hacking a new REPL so I just wanted it in the rakudo repl. :D
21:43 arnsholt There's always the Perl 6 ipython kernel
21:43 arnsholt I'd be happy to hand out commitbits =)
21:44 dj_goku arnsholt: I think I remember being told about that. so Perl6 <==> ipython kernel?
21:51 arnsholt dj_goku: Yup
22:11 wbill joined #perl6
22:15 vcv if my module depends on a module from Perl 5 using use Module::Name:from<Perl5>;  Can i define that as a dependency in META6.json?
22:16 margeas joined #perl6
22:17 [Coke] tcl's interactive mode would just automatically convert any unknown command to a shell invocation.
22:18 gfldex vcv: you can list it but don't I doubt any Perl 6 module installer will take it.
22:19 vcv I tried listing it with and without :from<Perl5> and panda install . chokes. Ok, thought maybe I was just missing something. Thanks
22:26 skids joined #perl6
22:27 Zoffix left #perl6
22:28 vcv I am amazed how well imported Perl 5 modules works.  Props to anyone who worked on that.
22:31 kid51 joined #perl6
22:32 timotimo moaty nine did that
22:32 timotimo mostly
22:42 cpage_ joined #perl6
22:55 Sgeo__ joined #perl6
22:55 ufobat joined #perl6
22:55 avenj joined #perl6
23:05 mcmillhj joined #perl6
23:10 kurahaupo joined #perl6
23:17 ufobat joined #perl6
23:26 labster joined #perl6
23:35 bjz joined #perl6

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

Perl 6 | Reference Documentation | Rakudo