Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2016-01-25

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 vendethiel joined #perl6
00:01 skids sortiz: I would chalk that up to pre-GLRisms.
00:05 kalkin- joined #perl6
00:05 kalkin- hi
00:05 kalkin- is there a way to create an executable in perl6?
00:06 kalkin- i heard it was possible to pack the moarvm and the perl6 bytecode together in one executable file, but i can not find a source for that anymore
00:09 sortiz skids, In that case I will try to make a PR with a case.
00:10 skids sortiz++
00:17 Ben_Goldberg joined #perl6
00:23 abaugher joined #perl6
00:24 adu joined #perl6
00:30 abaugher_ joined #perl6
00:30 araujo__ joined #perl6
00:33 yurivish_ joined #perl6
00:34 gfldex the offending commit for doc is https://github.com/perl6/doc/commit/a606c27cb5748f21f340bd9a44bb48b548593411
00:35 gfldex however, the entire file look fine. It seams to be a problem with the pod-parser.
00:35 Ulti kalkin- I dont think there is anything that does it for you atm its "possible" but not implemented AFAIK, the JVM version of Rakudo can produce a JAR file though which might be portable
00:39 kalkin- Ulti: Ic, Thanks.
00:41 Ulti kalkin-: if you have the JVM backend you need a --target=jar
00:47 orbus what's the status on the jvm backend though?  seems like it was failing some tests last time I tried?
00:48 orbus not sure if I tried on 2015.12 though
00:50 Actualeyes joined #perl6
00:51 * orbus is building now to see
00:54 orbus or maybe it was just that it was a lot slower
00:54 vendethiel joined #perl6
00:54 orbus will know soon
01:05 Ulti *shrug*
01:05 Ulti I havent used it in a long time since it was slow when moarvm was getting faster
01:06 yeahnoob joined #perl6
01:08 leont AFAIK it's very slow to start, but not slow to run
01:09 leont It is way less complete than rakudo-on-moar though
01:09 skids pmurias has been making quite a lot of commits to catch up nqp-js's features.
01:10 skids but I don't see much work going into the java backend.
01:37 jameslenz joined #perl6
01:49 ribasushi joined #perl6
01:53 kaare_ joined #perl6
01:57 vendethiel joined #perl6
02:00 avgn5 joined #perl6
02:02 avgn5 left #perl6
02:11 Fleurety joined #perl6
02:11 xpen joined #perl6
02:16 xpen joined #perl6
02:18 laz78 joined #perl6
02:20 ZoffixWin *sigh* why do I keep ending up reading Reddit comments... They have no value and only piss me off -_-
02:20 xpen_ joined #perl6
02:22 Fleurety joined #perl6
02:23 diakopter ZoffixWin: I think you can remove "Reddit" from that sentence, probably "comments" also
02:25 ZoffixWin Yeah, that's a good point.
02:30 TEttinger youtube comments however are an invaluable resource for planning, y'know, doomsday machines
02:31 TEttinger "let's leave the planet to the raccoons. they've practically got opposable thumbs already, maybe they won't use them to kill each othr"
02:32 * TimToady is not reassured
02:33 Hotkeys o/ all
02:33 * TimToady is keeping down the ginger ale, which is rather more reassuring...
02:36 ZoffixWin YouTube comments are usually so stupid they provide a good source of entertainment.
02:39 Fleurety joined #perl6
02:40 colomon ginger ale++
02:41 TimToady Protip: the community grill probably has meat juices on the control knobs.
02:42 diakopter also, propane
02:45 TimToady great way to pick up a case of salmonella
02:45 TEttinger oh geez...
02:45 Fleurety joined #perl6
02:45 TimToady especially on an island with a more than adequate supply of free-range chickens
02:45 TEttinger get that salmon out soon, TimToady!
02:45 TEttinger kauai or what?
02:45 TimToady got it in one
02:45 TEttinger my brother went to kauai not long ago. sent lots of chicken pictures
02:45 alpha123 joined #perl6
02:46 TEttinger only hawaiian island with no introduced mongooses (mongeese?)
02:46 TEttinger so chickens can have lots of adorable baby chickens
02:47 TEttinger apparently they filmed part of the first Jurassic Park movie in kauai when they needed that "untamed wilderness" look and still be near civilization
02:47 TimToady yes, especially the waterfall at the beginning is on the south side of kauai
02:48 TEttinger near the botanical garden I think
02:48 Fleurety joined #perl6
02:48 TimToady there's two, but yeah
02:48 TimToady there's one on the north side too
02:48 TimToady grandkids are a little too young for those though
02:49 TEttinger there's the waterfall that IIRC the road stops at, I can't remember the circumstances but there's that coastal road that goes mostly around the island except... is it waimea canyon that prevents it from continuing>
02:49 TEttinger ?
02:49 TimToady no, it's Na Pali
02:49 TimToady cliffs on the northwest side
02:49 TEttinger ah ok
02:49 TEttinger it's hard to have a nicer place to be sick if you have to be sick though
02:50 TEttinger east coast is having snowmageddon
02:50 ZoffixWin m: (1..*).grep(/2233/).grep(*.is-prime).pick: 5
02:50 TimToady well, last time I was on Kauai I came down with stomach cancer, so salmonella is an improvement
02:50 camelia rakudo-moar d67cb0: OUTPUT«(timeout)»
02:51 TEttinger oh wow. did they catch it early?
02:51 ZoffixWin m: (1..*).grep(/2233/).grep(*.is-prime)[0..5]
02:51 TimToady well, early enough that removing half my stomach fixed it
02:51 camelia rakudo-moar d67cb0: ( no output )
02:51 ZoffixWin Hm. So .grep can't produce a lazy list or am I doin' it wrong?
02:51 TEttinger "and the lap-band was free"
02:51 TimToady not a recommended way to lose weight :)
02:51 laz78 joined #perl6
02:51 TEttinger indeed
02:53 TimToady ZoffixWin: you forgot to say it
02:53 TEttinger my dad survived cancer, skin cancer on the bottom of his foot, of all places. never got any sunburn there either. thankfully his dermatologist knew that it was possible to get skin cancer there
02:53 ZoffixWin m: (1..*).grep(/2233/).grep(*.is-prime)[0..5].put
02:53 camelia rakudo-moar d67cb0: OUTPUT«32233 62233 92233 102233 132233 182233␤»
02:53 ZoffixWin :D
02:53 ZoffixWin Amazing.
02:54 * ZoffixWin gonna use this to Wow people at the next Perl 6 talk
02:54 TEttinger it's kinda crazy that the best cure for cancer these days is "see doctor often, hope doctor finds it early, remove offending body part"
02:54 kalkin-_ joined #perl6
02:55 TEttinger how much money has been spent on finding a cure and we're just inches down the road it seems
02:55 leont That's not quite true
02:56 TEttinger there are those new treatments like the proton beam thing for brain tumors
02:56 leont but sleep &
02:56 diakopter m: (1..*).grep(/4$/)>>.grep(*.is-prime)[0].put
02:57 camelia rakudo-moar d67cb0: OUTPUT«(timeout)»
02:57 TimToady hypers are not lazy, even if there were such a beast
02:58 ZoffixWin m: say (^10 .hyper).WHAT
02:58 camelia rakudo-moar d67cb0: OUTPUT«(HyperSeq)␤»
02:58 TEttinger m: (1..*).grep(/1$/).grep(*.is-prime)[99].put
02:58 camelia rakudo-moar d67cb0: OUTPUT«2801␤»
02:58 edehont joined #perl6
02:58 ZoffixWin m: (1..*).grep(/1$/).hyper.grep(*.is-prime)[99].put
02:59 camelia rakudo-moar d67cb0: OUTPUT«(timeout)»
02:59 diakopter I'm curious to see a slang that makes all number literals act as if they're hex... Acme::HexIWinTailsYouLose
03:01 geekosaur you've been hexed!
03:01 sevvie it is a hexy idea.
03:02 ZoffixWin Doesn't sound hard at all :)
03:02 ZoffixWin Probably can take Slang::Roman as base
03:02 Herby_ joined #perl6
03:02 Herby_ Good evening, everyone!
03:02 Herby_ o/
03:02 ZoffixWin \o
03:04 ZoffixWin m: (1..*).grep(/1337/).grep(*.is-prime)[0].put
03:04 camelia rakudo-moar d67cb0: OUTPUT«31337␤»
03:04 ZoffixWin ROFL
03:04 ZoffixWin I never realized that number was prime :D
03:04 ZoffixWin m: (1..*).grep(/1337/).grep(*.is-prime)[0..5].put
03:04 jdv79 ditto
03:04 camelia rakudo-moar d67cb0: OUTPUT«31337 111337 113371 133709 133711 133717␤»
03:05 Herby_ you could say its pretty... leet.
03:05 ZoffixWin :)
03:09 ZoffixWin m: (1..*).grep(*.is-prime).grep({.base(16) ~~ /DEADBEEF/}).[0].put
03:09 camelia rakudo-moar d67cb0: OUTPUT«(timeout)»
03:10 ZoffixWin All hope is not lost! :D
03:10 * ZoffixWin runs it locally
03:11 ZoffixWin oh
03:11 ZoffixWin m: (1..*).grep(*.is-prime).grep({.base(16) ~~ /DEADBEEF/})[0].put
03:11 camelia rakudo-moar d67cb0: OUTPUT«(timeout)»
03:11 sevvie aww.
03:12 ZoffixWin m: ^10 .[0].say
03:12 camelia rakudo-moar d67cb0: OUTPUT«5===SORRY!5=== Error while compiling /tmp/SNeaXtgma7␤Malformed postfix call (only alphabetic methods may be detached)␤at /tmp/SNeaXtgma7:1␤------> 3^10 .7⏏5[0].say␤»
03:12 ZoffixWin m: (1..10).[0].say
03:12 camelia rakudo-moar d67cb0: OUTPUT«1␤»
03:12 ZoffixWin weird that that works
03:13 diakopter m: (1..*).grep({.base(16) ~~ /DEADBEEF/})[0].put
03:13 diakopter that's clearly the bottleneck
03:13 camelia rakudo-moar d67cb0: OUTPUT«(timeout)»
03:13 ZoffixWin m: say 16::('AA')
03:13 camelia rakudo-moar d67cb0: OUTPUT«5===SORRY!5=== Error while compiling /tmp/fDZmV6Bopv␤Confused␤at /tmp/fDZmV6Bopv:1␤------> 3say 16:7⏏5:('AA')␤    expecting any of:␤        colon pair␤»
03:14 ZoffixWin I can never remember the way to convert a hex into dec
03:14 diakopter :16(
03:14 ZoffixWin m: say :16('AA')
03:14 camelia rakudo-moar d67cb0: OUTPUT«170␤»
03:14 ZoffixWin Thanks.
03:14 ZoffixWin m: say :16('DEADBEEF')
03:14 camelia rakudo-moar d67cb0: OUTPUT«3735928559␤»
03:14 ZoffixWin weird that your example above timed out
03:14 diakopter m: say :16('DEADBEEEEEEEEEEEEEEEEEEEEEEF')
03:14 camelia rakudo-moar d67cb0: OUTPUT«4516460495130180453338428073766639␤»
03:15 diakopter m: say :16('DEADBEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEF')
03:15 camelia rakudo-moar d67cb0: OUTPUT«393439198051279736664876386351182450865125420077347962657012085426995785455␤»
03:15 vendethiel joined #perl6
03:15 diakopter m: (1..*).grep({.base(16) ~~ /DEADBE*F/})[0].put
03:15 camelia rakudo-moar d67cb0: OUTPUT«(timeout)»
03:16 sevvie such a beautiful language.
03:16 ZoffixWin m: my $x; $x = .base: 16 for 1..1000; say now - INIT now
03:16 camelia rakudo-moar d67cb0: OUTPUT«0.0080499␤»
03:16 ZoffixWin m: my $x; $x = .base: 16 for 1..3735928559; say now - INIT now
03:16 camelia rakudo-moar d67cb0: OUTPUT«(timeout)»
03:17 ZoffixWin m: say 3735928559 * 0.0080499 / 1000
03:17 camelia rakudo-moar d67cb0: OUTPUT«30073.8513070941␤»
03:17 ZoffixWin m: say 3735928559 * 0.0080499 / 1000 / 60
03:17 camelia rakudo-moar d67cb0: OUTPUT«501.230855118235␤»
03:17 ZoffixWin yikes
03:17 ZoffixWin m: say 3735928559 * 0.0080499 / 1000 / 60 / 60
03:17 camelia rakudo-moar d67cb0: OUTPUT«8.353847585303917␤»
03:17 ZoffixWin So it'll take about 8 hours :S
03:19 ZoffixWin m: my $x; $x = .base: 16 for (1..4000).race; say now - INIT now
03:19 camelia rakudo-moar d67cb0: OUTPUT«0.1382821␤»
03:19 ZoffixWin :S
03:19 ZoffixWin m: my $x; $x = .base: 16 for (1..1000).race; say now - INIT now
03:19 camelia rakudo-moar d67cb0: OUTPUT«0.12550475␤»
03:19 ZoffixWin using 4 threads instead of 1 is ~160% slower/
03:20 ZoffixWin m: my $x; $x = .base: 16 for (1..1000).hyper; say now - INIT now
03:20 camelia rakudo-moar d67cb0: OUTPUT«0.0755752␤»
03:20 ZoffixWin :S
03:20 ZoffixWin m: my $x; $x = .base: 16 for (1..4000).hyper; say now - INIT now
03:20 camelia rakudo-moar d67cb0: OUTPUT«0.1492982␤»
03:21 laz78 joined #perl6
03:23 ZoffixWin This is interesting:
03:23 ZoffixWin m: my $x; .base: 16 for (1..40000); say now - INIT now
03:23 camelia rakudo-moar d67cb0: OUTPUT«0.21781926␤»
03:23 ZoffixWin m: my $x; .base: 16 for (1..40000).hyper; say now - INIT now
03:23 camelia rakudo-moar d67cb0: OUTPUT«0.028326␤»
03:23 ZoffixWin And now:
03:24 ZoffixWin m: my $x; .base: 16 for (1..40000).hyper: :2batch; say now - INIT now
03:24 TimToady 101.2℉, surely I can do better than that...
03:24 camelia rakudo-moar d67cb0: OUTPUT«(signal XCPU)»
03:26 TimToady just have to run a few more CPUs...
03:27 ZoffixWin m: my $x; .base: 16 for (1..400).hyper; say now - INIT now
03:27 camelia rakudo-moar d67cb0: OUTPUT«0.01025795␤»
03:28 ZoffixWin does the code without .hyper use more than one thread?
03:28 ZoffixWin ah
03:29 ZoffixWin m: my $x; .base: 16 for (1..40000).hyper: :20000batch; say now - INIT now
03:29 camelia rakudo-moar d67cb0: OUTPUT«0.4602917␤»
03:30 * ZoffixWin has no idea wtf "degree of parallelism" in the docs for hyper means
03:33 bitmap joined #perl6
03:34 ZoffixWin I mean, I can surmise it means how many cores to use, but I'm not 100% sure, which is not very friendly for docs aimed for programmer beginners
03:34 Herby_ *raises hand*
03:35 TimToady I suspect it's worker threads, which might or might map to cores, depending
03:35 ZoffixWin I wouldn't mind editing the doc with clarification, if anyone has a certain answer :D
03:37 DoverMo joined #perl6
03:39 skids ZoffixWin: http://jnthn.net/papers/2015-yapcasia-concurrency.pdf
03:39 laz78 joined #perl6
03:39 skids page 37
03:40 adu joined #perl6
03:42 skids I imagine the definition of "parallel worker" is implementation-dependent
03:42 noganex_ joined #perl6
03:45 jme` joined #perl6
03:46 llfourn how do adverbs work? can you define your own?
03:49 skids on the callee side they are just named parameters
03:49 skids Are you talking about adverbs on ops?
03:50 jernster joined #perl6
03:50 llfourn m: my %h = ( a => "b"); say %h<a>:exists; say %h{'a',:exists};
03:50 camelia rakudo-moar d67cb0: OUTPUT«True␤(b (Any))␤»
03:50 llfourn skids: not really just in general, what is an adverb on an 'op'?
03:51 llfourn also what did I do wrong there...
03:52 dalek doc: 5ecee77 | (Zoffix Znet)++ | doc/Type/Iterable.pod:
03:52 dalek doc: expound degree of parallelism
03:52 dalek doc: review: https://github.com/perl6/doc/commit/5ecee77290
03:52 llfourn also I thought exists returned True...
03:52 ZoffixWin it did
03:53 llfourn ah yeah you're right.
03:54 llfourn is the above behaviour just a special feature of postcircumfix? :foo turns into a positional?
03:54 llfourn so you have adverbs to get around that...
03:54 skids m: perl6 -e 'multi sub infix:<°> ($a, $b, :$say) { $say.say; $a + $b }; say (42 ° 1 :say("the answer is"))'
03:54 camelia rakudo-moar d67cb0: OUTPUT«5===SORRY!5=== Error while compiling /tmp/2v_ga1TDil␤Two terms in a row␤at /tmp/2v_ga1TDil:1␤------> 3perl6 -e7⏏5 'multi sub infix:<°> ($a, $b, :$say) { ␤    expecting any of:␤        infix␤        infix stopper␤        postfix␤ …»
03:54 skids m: multi sub infix:<°> ($a, $b, :$say) { $say.say; $a + $b }; say (42 ° 1 :say("the answer is"))
03:54 camelia rakudo-moar d67cb0: OUTPUT«the answer is␤43␤»
03:55 skids That's an adverb on an op.
03:55 llfourn skids: ok thanks.
03:55 Herby_ is there a json reader that comes with Task::Star?
03:55 Herby_ I can't seem to find info on what is included
03:55 ZoffixWin Herby_, it's just a module: http://modules.perl6.org/repo/Task::Star
03:56 ZoffixWin Herby_, IIRC JSON module included with it isn't one I like to use. I prefer JSON::Fast
03:56 skids llfourn: It is defined basically the same for postfix:<{ }>, but then there is some crazy code for optimizing combinations of adverbs so it may be trickier there.
03:57 skids erm, postcircumfix:<{ }>
03:57 Herby_ ZoffixWin, thanks I'll give it a whirl
03:57 ZoffixWin m: my %h = ( a => "b"); say %h<a>:exists; say %h{'a'} :exists;
03:57 camelia rakudo-moar d67cb0: OUTPUT«True␤True␤»
03:57 vendethiel joined #perl6
03:58 llfourn skids: but the general idea is that passing { :foo } is not the same as somesub(:foo) so you have adverb syntax to be able to pass named in these cases?
03:58 ZoffixWin llfourn, I don't really see how you infer that :foo would be *inside* the curlies in that case
03:59 skids llfourn: Yes, the subscript operations do not take named params inside the subscripts, and that is a rule on the syntax level.
03:59 ZoffixWin m: multi sub postcircumfix:<{ }> ($a, $b, :$mumbo) { "mumbo{$a, $b}".say; 'jumbo' }; my %h = :foo<bar>; say %h<foo>:mumbo
03:59 llfourn ok gotcha thanks!
03:59 camelia rakudo-moar d67cb0: OUTPUT«mumbofoo     bar foo␤jumbo␤»
04:00 ZoffixWin m: multi sub postcircumfix:<{ }> ($a, $b, :$mumbo) { "mumbo\{$a, $b\}".say; 'jumbo' }; my %h = :foo<bar>; say %h<foo>:mumbo
04:00 camelia rakudo-moar d67cb0: OUTPUT«mumbo{foo    bar, foo}␤jumbo␤»
04:00 ZoffixWin m: multi sub postcircumfix:<{ }> ($a, $b, :$mumbo) { "mumbo{$a.WHAT}".say; 'jumbo' }; my %h = :foo<bar>; say %h<foo>:mumbo
04:00 camelia rakudo-moar d67cb0: OUTPUT«Use of uninitialized value of type Hash in string context␤Any of .^name, .perl, .gist, or .say can stringify undefined things, if needed.  in sub postcircumfix:<{ }> at /tmp/dC67Cop43g line 1␤mumbo␤jumbo␤»
04:00 ZoffixWin ah
04:00 * ZoffixWin was confused for a sec there
04:01 skids m: multi sub infix:<+> (Int $a, Int $b, :$say!) { $say.say; $a + $b }; say (42 + 1 :say("the answer is")) # wonder what keeps this one from working
04:01 camelia rakudo-moar d67cb0: OUTPUT«Unexpected named parameter 'say' passed␤  in block <unit> at /tmp/oTWdNZtAYX line 1␤␤»
04:02 ZoffixWin m: multi sub postcircumfix:<{ }> ($a, $b, :$really-there) { $a{$b}:exists ?? "Yes, <$b> is REALLY there" !! 'Nah, I was just screwing with you' }; my %h = :foo<bar>; say %h<foo>:really-there; say %h<bar>:really-there
04:02 camelia rakudo-moar d67cb0: OUTPUT«Yes, <foo> is REALLY there␤Nah, I was just screwing with you␤»
04:02 ZoffixWin :D This is pretty neat
04:02 ZoffixWin skids, :say is being passed to &say
04:03 ZoffixWin m: multi sub infix:<+> (Int $a, Int $b, :$say!) { $say.say; $a + $b }; say ((42 + 1 :say("the answer is"))) # wonder what keeps this one from working
04:03 camelia rakudo-moar d67cb0: OUTPUT«Unexpected named parameter 'say' passed␤  in block <unit> at /tmp/bnaLXVZS0n line 1␤␤»
04:03 ZoffixWin :(
04:03 ZoffixWin m: multi sub infix:<+> (Int $a, Int $b, :$say!) { $say.say; $a + $b }; say (+(42 + 1 :say("the answer is"))) # wonder what keeps this one from working
04:03 camelia rakudo-moar d67cb0: OUTPUT«Unexpected named parameter 'say' passed␤  in block <unit> at /tmp/ajdiYegGa7 line 1␤␤»
04:03 ZoffixWin m: multi sub infix:<+> (Int $a, Int $b, :$say!) { $say.say; $a + $b }; my $x = 42 + 1 :say("the answer is"); say $x # wonder what keeps this one from working
04:03 camelia rakudo-moar d67cb0: OUTPUT«Unexpected named parameter 'say' passed␤  in block <unit> at /tmp/0wP6Bh_qhV line 1␤␤»
04:03 ZoffixWin never mind :)
04:03 llfourn shouldn't it need a ',' to pass it to say
04:03 travis-ci joined #perl6
04:03 travis-ci Doc build failed. Zoffix Znet 'expound degree of parallelism'
04:03 travis-ci https://travis-ci.org/perl6/doc/builds/104547697 https://github.com/perl6/doc/compare/ed6cb28964a0...5ecee7729033
04:03 travis-ci left #perl6
04:04 llfourn lol your explanation broke the build >.<
04:05 ZoffixWin m: sub foo { say "$^a $:bar $:ber" }; foo "don't" :bar<think> :ber<so>
04:05 camelia rakudo-moar d67cb0: OUTPUT«5===SORRY!5=== Error while compiling /tmp/___Dzw3A3S␤You can't adverb "don't"␤at /tmp/___Dzw3A3S:1␤------> 3 $:bar $:ber" }; foo "don't" :bar<think>7⏏5 :ber<so>␤»
04:05 ZoffixWin m: sub foo { say "$^a $:bar $:ber" }; foo "don't", :bar<think> :ber<so>
04:05 camelia rakudo-moar d67cb0: OUTPUT«Required named parameter 'ber' not passed␤  in sub foo at /tmp/QX1StJe8jI line 1␤  in block <unit> at /tmp/QX1StJe8jI line 1␤␤»
04:06 ZoffixWin orly :S
04:06 llfourn ZoffixWin: $:bar is autoviv named?
04:06 ZoffixWin m: sub foo { say "$:foo $:bar $:ber" }; foo :foo<"don't"> :bar<think> :ber<so>
04:06 camelia rakudo-moar d67cb0: OUTPUT«"don't" think so␤»
04:06 ZoffixWin The comma-less thing strikes me again! I wish it weren't so addictive to use
04:07 ZoffixWin llfourn, it's named parameter counterpart of $^a: http://docs.perl6.org/language/variables#The_%3A_Twigil
04:08 llfourn cool thanks.
04:09 skids (another useful feature I totally didn't know about until people started actually using it this last month)
04:09 skids Arguably better than $^ with it's treacherous sort-order.
04:10 ZoffixWin I think I figured it out
04:10 ZoffixWin m: multi sub infix:<+> (Int:D $a, Int:D $b, :$say!) { $say.say; $a + $b }; say (42 + 1 :say("the answer is")) # wonder what keeps this one from working
04:10 camelia rakudo-moar d67cb0: OUTPUT«Unexpected named parameter 'say' passed␤  in block <unit> at /tmp/_8FZ7_OjhC line 1␤␤»
04:10 ZoffixWin or not -_-
04:11 ZoffixWin m: multi sub infix:<+> (Int:D $a, Int:D $b, :$foo) {say "meow"}; say 42 + 1;
04:11 camelia rakudo-moar d67cb0: OUTPUT«meow␤True␤»
04:11 skids You'd tink the req'd name would push it up in the candidates list.
04:11 ZoffixWin m: multi sub infix:<+> (Int:D $a, Int:D $b, :$say!) { $say.say; $a + $b }; say ((42 + 1) :say("the answer is")) # wonder what keeps this one from working
04:11 camelia rakudo-moar d67cb0: OUTPUT«5===SORRY!5=== Error while compiling /tmp/eWTI_xLAIv␤You can't adverb (42 + 1)␤at /tmp/eWTI_xLAIv:1␤------> 3b }; say ((42 + 1) :say("the answer is")7⏏5) # wonder what keeps this one from work␤»
04:11 ZoffixWin Yeah, weird.
04:11 * ZoffixWin rakudobugs this just in case
04:13 llfourn ZoffixWin++
04:13 ZoffixWin Actually, it's not a multi-resolution issue.
04:13 ZoffixWin Observe here:
04:13 ZoffixWin m: multi sub infix:<+> (Int:D $a, Int:D $b, :$foo) {say "meow"}; say say 42 + 1, :foo<42>;
04:13 camelia rakudo-moar d67cb0: OUTPUT«meow␤Unexpected named parameter 'foo' passed␤  in block <unit> at /tmp/q7Yr2rG0gN line 1␤␤»
04:13 ZoffixWin "meow" is still printed
04:13 ZoffixWin m: multi sub infix:<+> (Int:D $a, Int:D $b, :$foo) {say "meow <$foo>"}; say say 42 + 1, :foo<42>;
04:13 camelia rakudo-moar d67cb0: OUTPUT«Use of uninitialized value $foo of type Any in string context␤Any of .^name, .perl, .gist, or .say can stringify undefined things, if needed.  in sub infix:<+> at /tmp/OT3Cjm5qF9 line 1␤meow <>␤Unexpected named parameter 'foo' passed␤  in block <un…»
04:13 ZoffixWin m: multi sub infix:<+> (Int:D $a, Int:D $b, :$foo) {say "meow <$foo>"}; say 42 + 1 :foo<42>;
04:13 camelia rakudo-moar d67cb0: OUTPUT«Unexpected named parameter 'foo' passed␤  in block <unit> at /tmp/0eAa6uTt5N line 1␤␤»
04:13 ZoffixWin huh
04:13 llfourn (??)
04:13 geekosaur hm, is () syntax in the parser or is it a circumfix operator?
04:14 llfourn in the parser I think
04:14 llfourn which isn't to say there isn't an operator too
04:14 geekosaur and you know what, tat error should say what the parameter was passed *to*
04:14 llfourn m: say &circumfix:<( )>
04:14 camelia rakudo-moar d67cb0: OUTPUT«5===SORRY!5=== Error while compiling /tmp/Dp_gpIzwKe␤Undeclared routine:␤    circumfix:<( )> used at line 1. Did you mean 'circumfix:<{ }>', 'circumfix:<:{ }>', 'circumfix:<[ ]>'?␤␤»
04:14 llfourn or not
04:15 ZoffixWin m: ::('&circumfix:<( )>').candidates.say
04:15 camelia rakudo-moar d67cb0: OUTPUT«No such symbol '&circumfix:<( )>'␤  in block <unit> at /tmp/5ty8PWRBzf line 1␤␤Actually thrown at:␤  in any  at gen/moar/m-Metamodel.nqp line 3041␤  in block <unit> at /tmp/5ty8PWRBzf line 1␤␤»
04:15 ZoffixWin m: ::('&postcircumfix:<{ }>').candidates.say
04:15 camelia rakudo-moar d67cb0: OUTPUT«(sub postcircumfix:<{ }> (\SELF, \key) { #`(Sub|66424424) ... } sub postcircumfix:<{ }> (\SELF, \key, Mu \ASSIGN) { #`(Sub|66420016) ... } sub postcircumfix:<{ }> (\SELF, \key, Mu :$BIND! is raw) { #`(Sub|66423208) ... } sub postcircumfix:<{ }> (\SELF, \ke…»
04:15 skids m: sub foo (|c) { |c.perl.say }; foo(:a) :b; # () does nameds both inside and out
04:15 camelia rakudo-moar d67cb0: OUTPUT«\(:a, :b)␤»
04:16 llfourn ( you don't need the ::() fyi )
04:16 ZoffixWin m: &postcircumfix:<{ }>.candidates.say
04:16 camelia rakudo-moar d67cb0: OUTPUT«(sub postcircumfix:<{ }> (\SELF, \key) { #`(Sub|57048600) ... } sub postcircumfix:<{ }> (\SELF, \key, Mu \ASSIGN) { #`(Sub|57044192) ... } sub postcircumfix:<{ }> (\SELF, \key, Mu :$BIND! is raw) { #`(Sub|57047384) ... } sub postcircumfix:<{ }> (\SELF, \ke…»
04:16 ZoffixWin cool
04:20 ZoffixWin RT for the weird named arg thing: https://rt.perl.org/Ticket/Display.html?id=127359
04:21 llfourn skids: hmmm not sure if like
04:23 skids ZoffixWin++
04:32 TimToady well, 102.1℉ is a bit more impressive
04:33 TimToady maybe it
04:33 TimToady maybe it's just norovirus
04:35 ZoffixWin get better :)
04:40 laz78 joined #perl6
04:47 laz78 joined #perl6
04:50 DoverMo i wanna suck whale barnacles
04:51 ZoffixWin Man.. I broke camelia again
04:51 ZoffixWin m: say 42
04:51 camelia rakudo-moar d67cb0: OUTPUT«42␤»
04:51 ZoffixWin oh
04:51 ZoffixWin I just found a way to make her not talk
04:51 DoverMo woops... wrong chat
04:52 ZoffixWin DoverMo, there's no right chat for that :)
04:52 llfourn m: role Temperature { }; sub postfix:<℉>(Real:D $t) { $t does Temperature }; say 102.1℉ # :D
04:52 camelia rakudo-moar d67cb0: OUTPUT«102.1␤»
04:52 DoverMo lol
04:54 DoverMo that was a legit accident
04:55 ZoffixWin m: role Temperature { method gist { ((self - 32) * 5/9) ~ 'C' } }; sub postfix:<℉>(Real:D $t) { $t does Temperature }; say 102.1℉
04:55 camelia rakudo-moar d67cb0: OUTPUT«38.944444C␤»
04:55 vendethiel joined #perl6
04:56 llfourn perhaps ℉ should just do the conversion. Role is a tad too clever.
04:57 llfourn .u ℉
04:57 yoleaux U+2109 DEGREE FAHRENHEIT [So] (℉)
04:58 geekosaur I think I'd only use a role there if mixing the role in let me make multiple kinds of temperature conversions, instead of hardcoding one like there
04:58 llfourn geekosaur: right.
04:58 skids Why convert to C instead of K? :-)
04:58 revhippie left #perl6
04:59 llfourn skids: right!
04:59 * skids thinks the last Farenheit holdout countries should start using K and then tell everyone else they are behind the times.
05:00 ZoffixWin m: role Temperature { method gist { ((self - 32) * 5/9).fmt: '%.1f℃' };  }; multi infix:<+> (Temperature $t, Str $what) { when $what ~~ 'water boiling' { (212+$t) does Temperature };}; sub postfix:<℉>(Real:D $t) { $t does Temperature }; say 102.1℉ + 'water boiling';
05:00 camelia rakudo-moar d67cb0: OUTPUT«156.7℃␤»
05:01 ZoffixWin weird
05:01 diakopter gist assumes F
05:02 ZoffixWin And I'm giving it F
05:02 DoverMo Can you make it so I can roll random temperatures?
05:03 ZoffixWin 100C => 212F; 101.2F => 38.4C; but (212+101.2)F != (100+38.4)C
05:03 ZoffixWin weird
05:06 ZoffixWin Ahh
05:06 ZoffixWin I made the assumption that 0-100C == 0-212F
05:06 ZoffixWin Indicative it's time for me to sleep... 12:06AM and I gotta get up at 6 >_<
05:09 DoverMo 0C is like... 30 F ?
05:09 DoverMo 32F?
05:10 skids 32 yes
05:11 ZoffixWin Actually, no, I still don't get it.
05:11 ZoffixWin Why 212F => 100C; 101.2F => 38.4C; but (212+101.2)F != (100+38.4)C
05:13 Hotkeys because fahrenheit is bad
05:13 Hotkeys that's wh
05:13 skids You'd need a gradient type like Date has Interval, no?
05:14 ZoffixWin ah, seems to be so... 0F is just -17C
05:14 Hotkeys it's like how 2² = 4 and 3² = 9 but 2² + 3² != 4 + 9
05:14 ZoffixWin http://nuclear-imaging.info/site_content/wp-content/uploads/2012/03/fahrenheit_to_celcius.png
05:14 geekosaur yes, you;re effectively scaling the 32 degree offset
05:14 ZoffixWin k
05:15 ZoffixWin Hotkeys, yes, they are
05:15 ZoffixWin m: say so (2² + 3² == 4 + 9)
05:15 camelia rakudo-moar d67cb0: OUTPUT«True␤»
05:15 Hotkeys er
05:15 Hotkeys wait
05:15 Hotkeys sorry
05:15 ZoffixWin :D
05:16 Hotkeys it's like how 2² = 4 and 3² = 9 but (2 + 3)² != 4 + 9
05:16 Hotkeys :p
05:16 DoverMo i like it better if 0C = 30f
05:16 ZoffixWin right
05:16 ZoffixWin I like it better if F is not used :P
05:16 Hotkeys So does most of the world
05:17 Hotkeys should just internally store them as kelvin
05:17 DoverMo if it's 32F, then it's already cold asF
05:17 Hotkeys and then convert when the user wants
05:18 geekosaur pretty much, yes
05:18 ZoffixWin This actually should be a fun module to make.
05:18 ZoffixWin .u Kelvin
05:18 yoleaux U+212A KELVIN SIGN [Lu] (K)
05:19 Hotkeys lol
05:19 ZoffixWin The unicode chars are all there for the ops
05:19 * ZoffixWin adds it to the TODO list
05:19 Hotkeys But why
05:19 geekosaur .u Reaumur
05:19 yoleaux No characters found
05:19 geekosaur nope :p
05:19 Hotkeys .u Rankine
05:19 yoleaux No characters found
05:19 ZoffixWin Hotkeys, why what?
05:19 ZoffixWin Hotkeys, it'd be pretty useful for science work. Just write your temp in units you got
05:19 Hotkeys Isn't the kelvin sign just K anyway
05:20 Hotkeys is what I was whying
05:20 ZoffixWin Ah
05:20 ZoffixWin KKk
05:20 Hotkeys make sure to include rankine
05:20 Hotkeys the kelvin of fahrenheit
05:20 ZoffixWin Looks larger than regular ks
05:20 ZoffixWin on this funt
05:20 ZoffixWin I'll try to remember that :D
05:20 geekosaur in my font they look identical except the bottom leg is slightly longer
05:21 Hotkeys [°R] = [°F] + 459.67
05:21 Hotkeys :p
05:21 ZoffixWin heh
05:21 Hotkeys [°R] = [K] × 9⁄5
05:21 Hotkeys that fraction doesn't look nice on my font
05:21 Hotkeys 9/5
05:22 ZoffixWin This is what the K looks on my monitor like: http://i.imgur.com/4io6TrP.png
05:23 Hotkeys such resolution
05:23 ZoffixWin 1440p
05:23 geekosaur oh, heh, not identical after all. the bottom leg comes out of the top leg for K, both come out of the stem at the same place for K
05:24 ZoffixWin And no, "The Moaning of..." not pr0n loaded in my VLC :) http://i.imgur.com/S1jEkML.jpg
05:24 Hotkeys lol
05:24 regreg joined #perl6
05:26 laz78 joined #perl6
05:34 diakopter heh
05:50 Cabanossi joined #perl6
05:50 vendethiel joined #perl6
05:50 Zero_Dogg joined #perl6
05:50 Zero_Dogg joined #perl6
06:03 _Gustaf_ joined #perl6
06:04 _Gustaf_ Mornin
06:15 vendethiel joined #perl6
06:19 sjoshi joined #perl6
06:45 DoverMoo joined #perl6
06:49 vendethiel joined #perl6
06:58 CIAvash joined #perl6
07:00 _mg_ joined #perl6
07:20 vendethiel joined #perl6
07:29 domidumont joined #perl6
07:32 FROGGS joined #perl6
07:36 domidumont joined #perl6
07:36 firstdayonthejob joined #perl6
07:40 Fleurety joined #perl6
07:59 vendethiel joined #perl6
08:00 moritz \o
08:01 yeahnoob joined #perl6
08:07 ChoHag joined #perl6
08:07 zakharyas joined #perl6
08:09 darutoko joined #perl6
08:11 salva joined #perl6
08:22 jdrab joined #perl6
08:26 bioexpress joined #perl6
08:28 ely-se joined #perl6
08:29 bioexpress Hello! What could be the reason, that I get the message "Use of uninitialized value $pod of type Any in string context Any of .^name, .perl, .gist, or .say can stringify undefined things, if needed.  in sub pod2markdown at /home/mm/.rakudobrew/moar-2015.12/install/share/perl6/site/sources/8105D070BA923D95822D6E3F57B1B70CBD35800B line 198" when I run "mi6 build" ?
08:33 ely-se m: class User { has $.name; has $.email-address; }; say User.new(|('rightfold;rightfold@gmail.com' ~~ /^$<name>=[.*?]';'$<email-address>=[.*]$/).hash)
08:33 camelia rakudo-moar d67cb0: OUTPUT«User.new(name => Match.new(ast => Any, list => (), hash => Map.new(()), orig => "rightfold;rightfold\@gmail.com", to => 9, from => 0), email-address => Match.new(ast => Any, list => (), hash => Map.new(()), orig => "rightfold;rightfold\@gmail.com", to => 2…»
08:33 ely-se :(
08:34 konobi bioexpress: `mi6 new Foo::Bar; cd Foo-Bar; mi6 build` ?
08:34 bioexpress Yes, I did `mi6 new Foo::Bar; cd Foo-Bar;` before.
08:36 konobi uptodate mi6?
08:36 bioexpress Could it be an pod-error?
08:38 eone joined #perl6
08:39 bioexpress Does `panda update` update all modules?
08:43 bioexpress I think I've found the reason: ascii-drawings in the pod.
08:51 moritz bioexpress: I think "panda udpate" updates meta data (that is, list of modules and their dependencies)
08:53 travis-ci joined #perl6
08:53 travis-ci Doc build failed. sylvarant 'Merge pull request #8 from perl6/master
08:53 travis-ci https://travis-ci.org/sylvarant/doc/builds/104575831 https://github.com/sylvarant/doc/compare/fc3e8eb6c533...08064cdee8fb
08:53 travis-ci left #perl6
08:59 dakkar_ joined #perl6
09:00 abraxxa joined #perl6
09:02 maslan joined #perl6
09:05 bioexpress I was not the ascii-drawing, that caused the error but `=item`s followed by no name in the same line.
09:14 bioexpress moritz: how could I update a module?
09:19 moritz bioexpress: by installing it again
09:20 cibs joined #perl6
09:22 DrForr Grr, got to stop switching between Perls 5 and 6...
09:24 moritz DrForr: if you don't stop, you'll get used to it
09:25 moritz took me only a few years :-)
09:26 [Tux] m: (open "xx.txt",:w).say("A+B+C+D+");.say for (open "xx.txt",:r,nl-in=>"+").lines
09:26 camelia rakudo-moar d67cb0: OUTPUT«open is disallowed in restricted setting␤  in sub restricted at src/RESTRICTED.setting line 1␤  in sub open at src/RESTRICTED.setting line 9␤  in block <unit> at /tmp/02qf8sctW_ line 1␤␤»
09:26 [Tux] OK, try that on a local machine. It works as expected.
09:27 [Tux] I expect the same output for «perl6 -e'$*IN.nl-in="+";.say for lines()' xx.txt
09:27 [Tux] but that returns "A+B+C+D+"
09:28 RabidGravy joined #perl6
09:28 DrForr By the by, I was writing some code at hone and found myself distracted by not having a convenient $fh.get-line equivalent. Was I just not looking hard enough?
09:28 DrForr *home
09:28 bioexpress When I try to install it again I get an error message "App::Mi6:ver<*>:auth<>:api<> already installed...". Does this mean, the module is up to date.
09:28 moritz [Tux]: lines() doesn't work on $*IN
09:29 [Tux] $*ARGV then?
09:29 moritz [Tux]: it defaults to $*ARGFILES
09:29 moritz bioexpress: you might need to 'panda --force install <themodule>'
09:29 MARTIMM joined #perl6
09:29 moritz bioexpress: it's because the modules don't have versions yet, but the compiler does honor module versions
09:30 [Tux] moritz++ (test-script fixed)
09:31 vendethiel joined #perl6
09:33 rindolf joined #perl6
09:33 bioexpress Thx!
09:37 timotimo o/
09:37 sortiz \o
09:39 [Tux] csv-ip5xs       17.883
09:39 [Tux] test            22.580
09:39 [Tux] test-t          12.325
09:39 [Tux] csv-parser      49.920
09:41 espadrine joined #perl6
09:41 araujo joined #perl6
09:41 stmuk anyone know if the main days for the GPW are Mar 8 and 9?
09:42 araujo joined #perl6
09:43 moritz stmuk: Mar 9 to 11, Hackathon on Mar 12th
09:43 moritz http://act.yapc.eu/gpw2016/
09:43 g4 joined #perl6
09:43 g4 joined #perl6
09:44 stmuk 3 days of talks?
09:44 stmuk thats like a YAPC!
09:44 stmuk I know German is a more verbose language than some of its forks :)
09:44 tadzik :P
09:45 araujo joined #perl6
09:46 moritz stmuk: though not as many tracks (1 on the first day, and either one or two days two and three, depending on how many submissions we get)
09:46 moritz speaking of: tadzik, stmuk: please submit talks! Preferably Perl 6 talks!
09:47 araujo joined #perl6
09:47 stmuk moritz: OK I shall consider and get back to you shortly
09:48 ely-se .oO(a2p6)
09:48 brrt joined #perl6
09:53 * sortiz Was expecting that an "is repr(...)" was applied a little early  :(
09:54 sortiz m: use NativeCall; class Foo is repr('CStruct') { has Pointer[Foo] $!f }; # Is this fixable?
09:54 camelia rakudo-moar d67cb0: OUTPUT«5===SORRY!5=== Error while compiling /tmp/IKgLJ3LoS1␤An exception occurred while parameterizing Pointer␤at /tmp/IKgLJ3LoS1:1␤Exception details:␤  Cannot call infix:<===>(Foo, Str); none of these signatures match:␤      ($?)␤      ($a, $b)…»
10:01 arnsholt Possibly. But is your struct struct foo { foo *f } or struct foo { foo **f }?
10:03 RabidGravy what I though would work (that is predeclaring Foo) doesn't work
10:04 sortiz arnsholt, **f
10:04 arnsholt sortiz: Right, so you actually do want the Pointer[Foo]. Have you tried making it a CArray[Foo]?
10:05 jnthn m: use NativeCall; class Foo is repr('CStruct') is Any { has Pointer[Foo] $!f }; # workaround
10:05 arnsholt It gives you more annoying code, I know, but it looks like the error comes from the parametrisation code
10:05 camelia rakudo-moar d67cb0: ( no output )
10:05 arnsholt Huh
10:06 sortiz jnthn, Thanks!
10:08 sortiz arnsholt, Yes, seems that the REPR of Foo isn't settled on time
10:10 xpen joined #perl6
10:10 araujo joined #perl6
10:12 arnsholt sortiz: Don't think it's the REPR. Given that adding the explicit is Any works, looks more like it's the supertype
10:13 moritz the problem is using a constraint type before the type is composed, no?
10:13 arnsholt jnthn: Presumably the implicit inheritance from Any is added only on the closing brace if no inheritance is specified?
10:13 araujo joined #perl6
10:13 arnsholt Yeah, I figured it was that
10:13 arnsholt But I don't think composition ever happens before the closing brace, I'm guessing it's something else
10:13 DrForr jnthn or moritz - The IO object doesn't seem to support extracting a single line from a file, just the .lines method which fills an array.
10:14 moritz DrForr: .get
10:14 DrForr Ah, thanks.
10:14 jnthn Also, .lines is lazy.
10:14 DrForr Any reason that wasn't named '.line'?
10:14 DrForr And yes, lazy, I was reading the description.
10:14 moritz DrForr: yes. It's not always strictly a line, depending on the .in-nl setting
10:15 DrForr True, but neither is .lines in that case :)
10:15 moritz we didn't find something better for lines()
10:15 DrForr Ot wasm
10:16 DrForr It wasn't mentioned in the I/O page so I went off, grumbled and wrote a loop.
10:16 DrForr I'll do a PR tonight with better docs.
10:16 sortiz jnthn, Your workaround solved all my problems, mine was ugly: Pointer[Pointer] followed by nativecast :)
10:19 timotimo on the 13th of march, voting happens in my area
10:21 moritz timotimo: you can vote by snail mail
10:21 timotimo aye, i'm likely to do that
10:21 sortiz For the curious that was the real case: https://github.com/salortiz/p6-LMDB/blob/master/lib/LMDB.pm6#L113
10:26 adu joined #perl6
10:29 RabidGravy timotimo, was it you who *ages* ago was making an EventSource server thingy?
10:30 ely-se joined #perl6
10:31 timotimo yeah
10:31 timotimo but since EventSource is so trivial, it isn't actually much code :)
10:31 timotimo just had to figure out where exactly it goes in HTTP::Server::Async
10:32 zakharyas joined #perl6
10:33 cpage_ joined #perl6
10:37 virtualsue joined #perl6
10:39 RabidGravy I made a really noddy implementation for CouchDB change feed (client) last night and am deeply dis-satisfied with it
10:40 RabidGravy so, switching now to longpoll pending making a proper EventSource client
10:42 timotimo my EventSource code doesn't handle resuming or IDs or whatever
10:42 timotimo so it's really just a fancy print statement :)
10:52 g4 joined #perl6
10:56 vendethiel joined #perl6
11:01 Yabba joined #perl6
11:06 sno joined #perl6
11:16 dalek doc: 7dc2201 | (Wenzel P. P. Peppmeyer)++ | doc/Language/regexes.pod:
11:16 dalek doc: fix runaway C<>
11:16 dalek doc: review: https://github.com/perl6/doc/commit/7dc2201e5a
11:17 hahainternet so, another abstract question that i should probably google
11:17 hahainternet can i specify multiple return values / types / containers? ie can i statically specify "Returns a tuple of Records and RecCount" or whatever?
11:20 gfldex m: sub foo(--> Array of Int){};
11:20 camelia rakudo-moar d67cb0: ( no output )
11:20 hahainternet gfldex: it's the two different types inside the same list or similar that i'm interested in specifying, fwiw :)
11:20 gfldex hahainternet: note that this is just a type check. It wont check any containers inside the array
11:21 hahainternet oh really? I thought you could do something like Array[Int] to specify, i'm not too up on static typing in p6
11:21 gfldex there is no static typing in Perl 6
11:21 hahainternet that is a purely semantic argument
11:22 gregf_ joined #perl6
11:22 gfldex static typing happens at compile time, dynamic typing happens at runtime
11:22 gfldex i can't see where you see semantics in that
11:23 moritz Perl 6 does typing at compile time
11:23 moritz m: sub f(Int) { }; f 'sadf'
11:23 camelia rakudo-moar d67cb0: OUTPUT«5===SORRY!5=== Error while compiling /tmp/EFl8fD4vuq␤Calling f(Str) will never work with declared signature (Int)␤at /tmp/EFl8fD4vuq:1␤------> 3sub f(Int) { }; 7⏏5f 'sadf'␤»
11:23 moritz this is compile time, for example
11:23 hahainternet 'static typing' typically refers to the ability to restrict the type of a container specifically too
11:23 hahainternet not the 'time' at which the restriction is applied
11:23 moritz also, role composition and the associated checks happen at compile time
11:23 hahainternet even if what moritz showed only worked at runtime, that's still much closer to static typing than dynamic
11:24 vendethiel joined #perl6
11:24 lizmat $ perl6 -c -e 'sub f(Int) { }; f "sadf"'
11:24 lizmat Syntax OK
11:24 lizmat technically, that's not at compile time, but it is before INIT time  :-)
11:25 kaare_ joined #perl6
11:25 hahainternet hello and welcome to #semantic-central :D
11:25 hahainternet anyhow if you can specify tuple types please let me know, i have nothing that requires it
11:25 hahainternet i'm just going through various fp resources
11:25 lizmat moritz: which leads me to wonder whether the optimizing step should be part of -c
11:25 hahainternet as i'm confident Perl6 thoroughly outpaces Python/Ruby
11:26 moritz lizmat: should, maybe
11:27 gfldex having the constant folder fold constants with -c sounds nice
11:29 travis-ci joined #perl6
11:29 travis-ci Doc build failed. Wenzel P. P. Peppmeyer 'fix runaway C<>'
11:29 travis-ci https://travis-ci.org/perl6/doc/builds/104605479 https://github.com/perl6/doc/compare/5ecee7729033...7dc2201e5af2
11:29 travis-ci left #perl6
11:31 gfldex m: subset Either of Any where * ~~ Int|Str; sub f(--> Either){ rand < 0.5 ?? 1 !! "str" }; f().say for 1..10;
11:31 camelia rakudo-moar d67cb0: OUTPUT«1␤str␤str␤1␤1␤1␤1␤1␤str␤str␤»
11:31 gfldex hahainternet: ^^^
11:32 gfldex travis is no unhappy for a different reason btw
11:33 moritz I'll be offline a few minutes for VM migration
11:41 ilbot3 joined #perl6
11:41 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!
11:41 timotimo TYVM, lizmat
11:41 hahainternet oh, so perl6 doesn't have 'tuples' lol
11:41 hahainternet just lists and the like
11:42 lizmat so far, I have covered all blog posts and ecosystem updates, FOSDEM, IRC channel additions
11:42 timotimo yeah, but lists are already read-only (unless you bind scalars in)
11:42 hahainternet timotimo: it's more the ability to specify that element 0 is type X and 1 is type Y i was interested in
11:43 moritz joined #perl6
11:44 timotimo oh
11:44 timotimo fair enough
11:44 lizmat moritz++   # irclog.perlgeek.de is back
11:44 hahainternet i believe you can restrict the containers, but i'm not aware of the underlying mechanisms, so all i know of is the usual Array of Whatever type stuff
11:44 moritz ... and started automatically through a systemd service file
11:44 gfldex m: subset Either of List where *[0] ~~ Int; sub f(--> Either){ 1,"str" }; f().say for 1..10;
11:44 camelia rakudo-moar d67cb0: OUTPUT«Type check failed for return value; expected Either but got List␤  in sub f at /tmp/GMW293UpdF line 1␤  in block <unit> at /tmp/GMW293UpdF line 1␤␤»
11:44 moritz as opposed to manual start after the last reboot :/
11:45 hahainternet gfldex: there's also the problem of that being checked at runtime, but i'm not trying to complain :)
11:46 gfldex m: subset Either of List where { $^a[0] ~~ Int && $^a[1] ~~ Str }; sub f(--> Either){ 1,"str" }; f().say for 1..10;
11:46 camelia rakudo-moar d67cb0: OUTPUT«(1 str)␤(1 str)␤(1 str)␤(1 str)␤(1 str)␤(1 str)␤(1 str)␤(1 str)␤(1 str)␤(1 str)␤»
11:46 gfldex m: subset Either of List where { $^a[0] ~~ Int && $^a[1] ~~ Str }; sub f(--> Either){ "str",1 }; f().say for 1..10;
11:46 camelia rakudo-moar d67cb0: OUTPUT«Type check failed for return value; expected Either but got List␤  in sub f at /tmp/R4KZkKVLuu line 1␤  in block <unit> at /tmp/R4KZkKVLuu line 1␤␤»
11:46 gfldex that doesn't check for excess elements tho
11:47 hahainternet indeed, where clauses are certainly sufficient
11:47 hahainternet it's not a problem i'm facing in any real code
11:48 hahainternet it just came after some discussion about code in haskell with a friend
11:49 gfldex return type checks do not contribute to MMD, where in heskell they do. In Perl 6 return type checks can keep errors local and that's pretty much it.
11:51 hahainternet well i don't expect perl6 to be as strict as haskell :)
11:57 RabidGravy well I *think* my longpoll version of changes feed is better than the previous hack
11:59 leont joined #perl6
12:00 _Vi joined #perl6
12:01 vendethiel joined #perl6
12:07 lucs Can I get a list of the possible signatures a method has in some class?
12:09 flussence gfldex: your last doc commit deleted half of a =head2 (I'm not at a computer where I can fix it myself or else I would've :)
12:09 gfldex flussence: i'm on it
12:09 moritz m: 42.^can('sqrt')>>.candidates>>.signature # for lucs
12:09 camelia rakudo-moar d67cb0: ( no output )
12:09 moritz m: say 42.^can('sqrt')>>.candidates>>.signature
12:09 camelia rakudo-moar d67cb0: OUTPUT«(((Int:D $: *%_)) ((Cool $: *%_)))␤»
12:09 lucs Thanks moritz
12:10 lucs The return types don't happen to show up there, eh ...
12:13 RabidGravy you can always hit .returns
12:13 lucs Oh, okay.
12:13 RabidGravy it's possible that the return type isn't actually specified in the code
12:14 lucs Yep, I see.
12:24 AlexDaniel joined #perl6
12:31 Skarsnik joined #perl6
12:31 Skarsnik Hello
12:31 _mg_ joined #perl6
12:33 RabidGravy erp
12:35 kid51 joined #perl6
12:37 nanis joined #perl6
12:39 nanis When I clone from rakudo/rakudo, and run perl Configure.pl --gen-moar ..., what determines which MoarVM and nqp snapshots I am going to get? What do I need to do if I just want the tip?
12:40 Skarsnik the tip?
12:41 RabidGravy HEAD
12:41 nanis Yes, I meant HEAD.
12:41 nanis It's still early for me.
12:42 nanis Is specifying --gen-moar=master the right thing?
12:42 RabidGravy I think that it gets at *least* the version specified
12:43 Skarsnik --build-moar=master probably
12:43 moritz if you leave out the version, it takes the NQP version from tools/bulid/NQP_REVISION
12:43 moritz and the NQP repo then has a similar file that specifies the default MoarVM version
12:43 moritz so if you just perl Configure.pl --gen-moar, you get the recommended versions
12:44 nanis moritz: Thanks for the explanation.
12:50 Skarsnik is there something to display number in a nice way? like with 52463 -> 52.463 ?
12:50 AlexDaniel Skarsnik: /1000 ?
12:51 AlexDaniel Skarsnik: and printf
12:51 DrForr '.' isn't necessarily a decimal separator, I think that's what Skarsnik is after.
12:51 AlexDaniel oh
12:51 nanis AlexDaniel: What to do with 1000000?
12:52 AlexDaniel right, ok
12:52 DrForr (living in a country where the decimal separator is ', ' or "'", and months are in Roman numerals sensitizes you to such things :)
12:53 AlexDaniel DrForr: roman numerals are fine. At least it's not some random made up names that don't make any sense
12:53 AlexDaniel Skarsnik: it sounds like a great idea for a module
12:54 AlexDaniel Skarsnik: or perhaps you can manage to get that into printf, hmm…
12:54 DrForr Like names of dead Roman gods make any more sense.
12:54 DrForr That requires LC_ALL &c.
12:54 |Tux| DrForr, as if there are still Roman Gods alive :)
12:54 ely-se Roman numerals are great and they are the reason I love INTERCAL.
12:54 Skarsnik hm, not sure printf can do that
12:54 DrForr ely-se: Slang::Roman :)
12:55 DrForr It took a great deal of restraint *not* to use Ir for the prefix.
12:56 AlexDaniel why slang?
12:56 AlexDaniel m: say Ⅷ
12:56 camelia rakudo-moar d67cb0: OUTPUT«8␤»
12:57 AlexDaniel well ok it wont work with more than one character
12:57 DrForr say XVII;
12:57 ely-se lol
12:57 DrForr m: say XVII;
12:57 camelia rakudo-moar d67cb0: OUTPUT«5===SORRY!5=== Error while compiling /tmp/UYwm7eWLsC␤Undeclared name:␤    XVII used at line 1␤␤»
12:58 RabidGravy Locale specific representations of stuff is probably something that should be in the ecosystem
12:58 ely-se DrForr: http://unicode.org/cldr/utility/character.jsp?a=2167
12:58 AlexDaniel m: say Ⅹ + Ⅶ
12:58 camelia rakudo-moar d67cb0: OUTPUT«17␤»
12:58 DrForr If I have the tuits I'll use the combining overbar so you can represent numbers in the millions.
12:58 Skarsnik hm, to split a string in chuck of a X lenght, what should I use?
12:59 DrForr ely-se: It supports Unicode and the full range of Roman numbers.
12:59 DrForr Including ↂ
13:00 AlexDaniel m: say ↂ
13:00 camelia rakudo-moar d67cb0: OUTPUT«10000␤»
13:00 DrForr Incidentally  ↀ
13:00 DrForr (grr.)
13:00 AlexDaniel m: say join ‘’, (0..0x1FFFF ==> grep { .uniname ~~ m/‘ROMAN’/ })».chr
13:00 camelia rakudo-moar d67cb0: OUTPUT«ⅠⅡⅢⅣⅤⅥⅦⅧⅨⅩⅪⅫⅬⅭⅮⅯⅰⅱⅲⅳⅴⅵⅶⅷⅸⅹⅺⅻⅼⅽⅾⅿↀↁↂↃↅↆↇↈ𐆐𐆑𐆒𐆓𐆔𐆕𐆖𐆗𐆘𐆙𐆚𐆛𛱍𛱖␤»
13:00 DrForr is used on some buildings in Amsterdam.
13:00 ely-se Roman numerals are used on lots of buildings.
13:01 AlexDaniel .u ↆ
13:01 yoleaux U+2186 ROMAN NUMERAL FIFTY EARLY FORM [Nl] (ↆ)
13:01 AlexDaniel m: say ↆ
13:01 camelia rakudo-moar d67cb0: OUTPUT«50␤»
13:01 AlexDaniel what
13:01 AlexDaniel ok
13:01 DrForr The CD glyph above is what I meant.
13:01 AlexDaniel .u 𛱍𛱖
13:01 yoleaux No characters found
13:02 AlexDaniel m: say ‘𛱍’.uniname; say ‘𛱖’.uniname
13:02 camelia rakudo-moar d67cb0: OUTPUT«DUPLOYAN LETTER ROMANIAN I␤DUPLOYAN LETTER ROMANIAN U␤»
13:02 DrForr This module supports 0rXVII + 3 * 0rIX # though.
13:02 DrForr . o ( Duployan letter... /me looks out of curiosity.)
13:02 nanis I am getting literally no output from several tests under t\04-nativecall. Is this expected or should I investigate further?
13:03 Skarsnik that weird
13:03 Skarsnik what test?
13:04 nanis 06-struct.t, 09-nativecast.t, 11-cpp.t, 12-sizeof.t, 13-union.t, 14-rw-attrs.t, Wstat: 10240, Non-zero exit status: 40
13:04 nanis On Windows 10, cl 19.00.23506
13:05 Skarsnik what limit does on split? x)
13:05 Skarsnik hm, that's weird
13:05 AlexDaniel m: say ‘helloworldthisisatest’.comb(/.**3/)
13:05 camelia rakudo-moar d67cb0: OUTPUT«(hel low orl dth isi sat est)␤»
13:05 Skarsnik try running one of them without the harness
13:05 AlexDaniel Skarsnik: ↑
13:05 ely-se-VI m: vⅥ.c.say
13:05 camelia rakudo-moar d67cb0: OUTPUT«5===SORRY!5=== Error while compiling /tmp/ci8CWup2f7␤Bogus postfix␤at /tmp/ci8CWup2f7:1␤------> 3v7⏏5Ⅵ.c.say␤    expecting any of:␤        infix␤        infix stopper␤        statement end␤        statement modifier␤        st…»
13:06 Skarsnik m: say "Helloworl".split('', 2)
13:06 camelia rakudo-moar d67cb0: OUTPUT«( Helloworl)␤»
13:06 Skarsnik hm
13:06 AlexDaniel m: say ‘foofoofoofoofoofoo’.split(‘oo’, 2)
13:06 camelia rakudo-moar d67cb0: OUTPUT«(f foofoofoofoofoo)␤»
13:07 AlexDaniel m: say ‘foofoofoofoofoofoo’.split(‘oo’, 4)
13:07 camelia rakudo-moar d67cb0: OUTPUT«(f f f foofoofoo)␤»
13:07 nanis Skarsnik: Did that. That's when I thought I would check here first. perl6 t\04-nativecall\14-rw-attrs.t ... literally no output.
13:07 Skarsnik Oo
13:07 AlexDaniel Skarsnik: limit means that you want to get exactly N pieces
13:08 AlexDaniel and comb is what you actually want :)
13:08 nanis perl6 --stagestats t\04-nativecall\14-rw-attrs.t
13:08 nanis Stage start      :   0.000
13:08 nanis Stage parse      :  13.219
13:08 nanis Stage syntaxcheck:   0.000
13:08 nanis Stage ast        :   0.000
13:08 nanis Stage optimize   :
13:08 nanis end of run
13:09 Skarsnik maybe it don't manage to create a lib?
13:09 Skarsnik try running 17 or 18
13:09 Skarsnik they don't create file
13:11 Skarsnik AlexDaniel, the issue it only capture grp of size 3. it's **1-3 for a range?
13:11 ely-se my @xs = 1, 2, 3, 4; say map(* %% 2, ^@xs.elems)
13:11 nanis 18-routine-sig-sanity.t runs fine, 17-libnames.t gives ok i - # SKIP <unknown> for i = 1, ..., 7
13:11 ely-se m: my @xs = 1, 2, 3, 4; say map(* %% 2, ^@xs.elems)
13:11 camelia rakudo-moar d67cb0: OUTPUT«(True False True False)␤»
13:11 ely-se m: my @xs = 1, 2, 3, 4; say @xs[map(* %% 2, ^@xs.elems)] # is there a shorter way of doing this?
13:11 camelia rakudo-moar d67cb0: OUTPUT«(2 1 2 1)␤»
13:11 ely-se wait, I'm so confused
13:11 AlexDaniel m: helloworldthisisatesta’.comb(/.**1..3/)
13:11 camelia rakudo-moar d67cb0: OUTPUT«5===SORRY!5=== Error while compiling /tmp/Ypzujid8U4␤Bogus postfix␤at /tmp/Ypzujid8U4:1␤------> 3helloworldthisisatesta7⏏5’.comb(/.**1..3/)␤    expecting any of:␤        infix␤        infix stopper␤        statement end␤        …»
13:11 ely-se m: my @xs = 1, 2, 3, 4; say @xs[grep(* %% 2, ^@xs.elems)] # is there a shorter way of doing this?
13:11 camelia rakudo-moar d67cb0: OUTPUT«(1 3)␤»
13:11 AlexDaniel m: say ‘helloworldthisisatesta’.comb(/.**1..3/)
13:11 camelia rakudo-moar d67cb0: OUTPUT«(hel low orl dth isi sat est a)␤»
13:11 AlexDaniel Skarsnik: ↑
13:12 Skarsnik nanis, hm, maybe it fail to create the lib file
13:12 Skarsnik for the other test
13:12 sufrostico joined #perl6
13:12 nanis Skarsnik: How can I begin to diagnose this? Is there any verbosity level etc I can set to see what's going on?
13:13 Skarsnik No idea. edit one test file? or try to run on the tests dir?
13:13 Skarsnik maybe it does not find the compiler
13:13 * RabidGravy had forgotten that there was a vestigial .procmailrc on the computer
13:13 AlexDaniel m: my @xs = 1..4; say @xs.grep: * !%% 2
13:13 camelia rakudo-moar d67cb0: OUTPUT«(1 3)␤»
13:13 AlexDaniel ely-se: ↑ ?
13:15 nanis Skarsnik: I'll work on CompileTestLib.pm in that directory.
13:16 ely-se AlexDaniel: hmm
13:16 Skarsnik m: say "12345".reverse.comb(/.**1..3/).join('.').reverse
13:16 camelia rakudo-moar d67cb0: OUTPUT«(123.45)␤»
13:16 Skarsnik hm
13:17 ely-se AlexDaniel: that filters the elements by themselves, not by their indices
13:17 Skarsnik m: say "12345".comb(/.**1..3/).join('.').reverse
13:17 camelia rakudo-moar d67cb0: OUTPUT«(123.45)␤»
13:17 AlexDaniel Skarsnik: ah I don't think you want to work with strings like that
13:19 Skarsnik Ooh it's flip for string x)
13:20 moritz m: say ('a'..'z')[0, 2 ... *]
13:20 camelia rakudo-moar d67cb0: OUTPUT«(a c e g i k m o q s u w y)␤»
13:20 moritz ely-se: ^^
13:20 Skarsnik my issue was to display size (ram)
13:20 ely-se moritz: yes! great! thanks!
13:21 AlexDaniel m: ‘123’ ~~ m/^ (\d+) (\d**2) $/; say “$0.$1”
13:21 camelia rakudo-moar d67cb0: OUTPUT«1.23␤»
13:21 AlexDaniel Skarsnik: ↑ you want something like this
13:21 moritz m: say (123 / 100).fmt('%.2f')
13:21 camelia rakudo-moar d67cb0: OUTPUT«1.23␤»
13:21 AlexDaniel moritz: what if you want another delimiter
13:22 AlexDaniel s/‘.’/‘,’/ ? :D
13:22 moritz m: say (123 / 100).fmt('%.2f').trans('.' => ',')
13:22 camelia rakudo-moar d67cb0: OUTPUT«1,23␤»
13:22 Skarsnik 4-5 Mb leaked at each iteration of my loop x)
13:22 Skarsnik not fun lol
13:23 AlexDaniel m: ‘123’ ~~ m/^ (\d*?) (\d**0..2) $/; say "$0,$1"
13:23 camelia rakudo-moar d67cb0: OUTPUT«1,23␤»
13:23 moritz Skarsnik: #LolNotLol
13:24 jnthn ZoffixWin: In https://rt.perl.org/Ticket/Display.html?id=127359 I think you got the wrong syntax for adverbs. Should be `41 + 1 :foo<42>`.
13:24 Skarsnik hm, let see if I can get the stack size
13:24 vendethiel joined #perl6
13:25 AlexDaniel Skarsnik: but anyway, if you don't want to postprocess fmt then perhaps it is a good idea to parse the number yourself with a regex
13:26 Skarsnik I am fine with get-statm<data>.flip.comb(/.**1..3/).join('.').flip for now x)
13:27 DrForr If this is for localization, the number of digits between places needs to be configurable too, India uses 1.00.00.000.000 for instance.
13:27 Skarsnik It just displaying 1564454 445556 make it hard for me to see
13:29 ely-se my favourite line of code of the day: https://gist.github.com/rightfold/82ebf246caef97410fe4#file-pm6-L4
13:31 brrt joined #perl6
13:32 Skarsnik I don't remember what is the heap already for a process?
13:32 brrt the heap is where the memory allocator works
13:33 Skarsnik it the basic memory? stuff you get with malloc?
13:34 brrt exactly that yes :-)
13:34 brrt its the data structure applied to the pages that the process gets from the memory
13:35 Skarsnik I am trying to track down why the elements (a search method) in XML leak
13:36 Skarsnik It's pure perl6
13:36 Skarsnik I lost 5mb for each request on the tree. it's not fun
13:36 brrt hmmm
13:36 brrt no, that shouldn't happen
13:36 brrt sure you're not leaking memory in perl6 space?
13:37 brrt creating a reference from a live variable to a temporary  one?
13:37 Skarsnik https://gist.github.com/Skarsnik/5dfb0dce3b517f13d767 based of test. the for loop (I added stuff to show the memory usage)
13:38 RabidGravy anyone know a website that *always*  returns compress/gzip data?
13:39 Skarsnik a link to a .zip ?
13:39 RabidGravy that is with a Content-Encoding of compress/gzip
13:39 RabidGravy not an actual zip file
13:40 RabidGravy ah, good old httpbin
13:40 RabidGravy http://httpbin.org/gzip
13:41 Skarsnik https://github.com/Skarsnik/fimstuff/archive/master.zip ?
13:41 Skarsnik or it probably generate a zip and give a zip file
13:41 Skarsnik I don't know x)
13:45 anthk_ what's the syntax to shift bytes to the left in Perl6?
13:45 Skarsnik +<< ?
13:45 awwaiid Was there another programming language from which p6 Adverbs was adopted? Or is it an original concept? (obviously there is nothing new under the sun, so let's say... relatively-original)
13:47 jnthn m: say 8 +< 2
13:47 camelia rakudo-moar d67cb0: OUTPUT«32␤»
13:47 ZoffixW joined #perl6
13:48 ZoffixW m: multi postcircumfix:<{ }> ($h, $k, :$foo, :$bar) {say "[$foo $bar]" }; my %h = :42foo; say %h<foo>, :foo<meow>, :bar<moo>;
13:48 camelia rakudo-moar d67cb0: OUTPUT«Use of uninitialized value $foo of type Any in string context␤Any of .^name, .perl, .gist, or .say can stringify undefined things, if needed.  in sub postcircumfix:<{ }> at /tmp/Jau4HTHwtb line 1␤Use of uninitialized value $bar of type Any in string co…»
13:48 yoleaux 15 Jan 2016 18:37Z <AlexDaniel> ZoffixW: “roundrobin is very similar to zip. The difference is that roundrobin will not stop on lists that run out of elements but simply skip any undefined value:” (Hotkeys++)
13:48 ZoffixW m: multi postcircumfix:<{ }> ($h, $k, :$foo, :$bar) {say "[$foo $bar]" }; my %h = :42foo; say %h<foo> :foo<meow> :bar<moo>;
13:48 camelia rakudo-moar d67cb0: OUTPUT«[meow moo]␤True␤»
13:49 ZoffixW jnthn, I see. So then the second example that uses the adverb correct doesn't work simply because named parameters are not considered by multi dispatch?
13:49 ZoffixW m: multi sub infix:<+> (Int:D $a, Int:D $b, :$foo) {say "meow <$foo>"}; say 42 + 1 :foo<42>;
13:49 camelia rakudo-moar d67cb0: OUTPUT«Unexpected named parameter 'foo' passed␤  in block <unit> at /tmp/Y6ROYpbLVs line 1␤␤»
13:50 ZoffixW And if that's the case, then I'd argue there's an inconsitency: my sub gets called if I don't use the named param, but native sub gets called if I do.
13:51 ZoffixW m: multi sub infix:<+> (Int:D $a, Int:D $b, :$foo) {say "meow <$foo>"}; say 42 + 1;
13:51 camelia rakudo-moar d67cb0: OUTPUT«Use of uninitialized value $foo of type Any in string context␤Any of .^name, .perl, .gist, or .say can stringify undefined things, if needed.  in sub infix:<+> at /tmp/Pme9w9wueT line 1␤meow <>␤True␤»
13:51 ZoffixW m: multi sub infix:<+> (Int:D $a, Int:D $b) {say "meow <$foo>"}; say 42 + 1;
13:51 camelia rakudo-moar d67cb0: OUTPUT«5===SORRY!5=== Error while compiling /tmp/tCeuK_SjJ6␤Variable '$foo' is not declared␤at /tmp/tCeuK_SjJ6:1␤------> 3ix:<+> (Int:D $a, Int:D $b) {say "meow <7⏏5$foo>"}; say 42 + 1;␤»
13:52 ZoffixW m: multi sub infix:<+> (Int:D $a, Int:D $b) {say "meow <foo>"}; say 42 + 1;
13:52 camelia rakudo-moar d67cb0: OUTPUT«Ambiguous call to 'infix:<+>'; these signatures all match:␤:(Int:D \a, Int:D \b --> Int:D)␤:(Int:D $a, Int:D $b)␤  in block <unit> at /tmp/sMv0YnZHKj line 1␤␤»
13:52 ZoffixW ^ and clearly it's doing *something* with the named params
13:55 moritz it uses them for tie breaking
13:55 Skarsnik brrt, there is no way to query the gc?
13:56 brrt no.... unfortunately
13:57 jnthn ZoffixW: Named paramters only act as constraints
13:57 jnthn ZoffixW: And an optional parameter isn't constraining in any way
13:58 jnthn ZoffixW: So you'd need to make it a required named
13:58 ZoffixW jnthn, but it'd still call the wrong sub
13:58 ZoffixW m: multi sub infix:<+> (Int:D $a, Int:D $b, :$foo is required) {say "meow <$foo>"}; say 42 + 1 :foo<42>;
13:58 camelia rakudo-moar d67cb0: OUTPUT«Unexpected named parameter 'foo' passed␤  in block <unit> at /tmp/nKg8tx0O0O line 1␤␤»
13:58 ZoffixW I'm not sure what it's constraining there...
13:58 jnthn m: multi sub infix:<+> (Int:D $a, Int:D $b, :$foo is required) {say "meow <$foo>"}; say (42 + 1 :foo<42>);
13:58 camelia rakudo-moar d67cb0: OUTPUT«Unexpected named parameter 'foo' passed␤  in block <unit> at /tmp/50RI62n624 line 1␤␤»
13:58 jnthn hmm
14:00 jnthn Skarsnik, brrt: --profile will record some GC stats and you can find them in the report. There's enough to know if you're promoting objects to the old generation a lot or not.
14:00 Skarsnik --profile is not usable on big stuff
14:00 brrt i had no idea :-) thanks
14:01 ZoffixW And it actually works on postcircumfix:
14:01 ZoffixW m: multi postcircumfix:<{ }> ($h, $k, :$foo, :$bar) {say "[$foo $bar]" }; my %h = :42foo; say %h<foo> :foo<meow> :bar<moo>;
14:01 camelia rakudo-moar d67cb0: OUTPUT«[meow moo]␤True␤»
14:01 Skarsnik it will be more useful if we could start/stop the profiling x)
14:02 ZoffixW m: multi sub postfix:<**> (Int:D $a, :$foo is required) {say "meow <$foo>"}; say 42**2;
14:02 camelia rakudo-moar d67cb0: OUTPUT«5===SORRY!5=== Error while compiling /tmp/Gv0X1fY4Ze␤Two terms in a row␤at /tmp/Gv0X1fY4Ze:1␤------> 3 required) {say "meow <$foo>"}; say 42**7⏏2;␤    expecting any of:␤        infix␤        infix stopper␤        postfix␤       …»
14:03 ZoffixW Weird to get that error :S
14:03 brrt that's not a bad idea. i have no idea whether or not it is difficult to do, although providing an nqp-level op to do so should be the way to go
14:03 ZoffixW Ohhh. brainfart on my part
14:03 brrt also, i'm not doing it :-P
14:03 molaf joined #perl6
14:04 ely-se > A computer without COBOL and Fortran is like a piece of chocolate cake without ketchup and mustard.
14:05 jnthn I suspect I'll build a sampling profiler later on in the year, which will also give some line-level info. Then we'll probably make that the default, and leave the current instrumenting profiler there for minute analysis of microbenchmarks - which is what it was really designed for anyway.
14:05 ZoffixW ely-se, hah
14:05 Skarsnik my guess is the object holding the xmltree get copied in a weird way on method call? basicly xml elements code is : see if the element match stuff, if not, call element on on the childs...
14:13 cdg joined #perl6
14:14 Skarsnik jnthn, what should I look in the output the profiler give me?
14:16 jnthn Skarsnik: Look at the GC tab
14:16 jnthn Skarsnik: And see if it's promoting bytes every time
14:16 jnthn I forget which color promoted is :)
14:17 Skarsnik stuff get promoted and retained x)
14:17 jnthn retained is normal. Promoted - how much? Significant amounts every time? Also, is there ever a collection marked as a full one?
14:18 jnthn Promoted means "objects survived two garbage collection runs"
14:19 Skarsnik I don't know how to read that. there 15 'runs' on 70 that get promoted stuff
14:19 jnthn There's a column titled Full Collection or so
14:19 jnthn And it has a star in if it was a full collection, or empty if not
14:19 Skarsnik 170Kb each time, and Full is emtpy
14:20 jnthn Ah
14:20 jnthn That's interesting.
14:20 Skarsnik want a screenshot?
14:20 jnthn Does memory grow forever, or does it just get larger to a point, then drop off again?
14:20 Skarsnik the file is quite huge
14:20 jnthn Can do, though I think I understand what you're seeing.
14:20 Skarsnik I keep growing at the same rate until my ram is full/swap
14:21 jnthn Urgh, OK
14:21 Skarsnik well not in this run
14:21 Skarsnik but in other run
14:21 vendethiel joined #perl6
14:21 Skarsnik I can stream too maybe, it's more useful
14:22 jnthn It may well be a genuine leak, though it may also be the "unmanaged memory doesn't count" issue.
14:23 Skarsnik http://imgur.com/Fga4ZQU
14:23 jnthn In short: if objects that reference large native data structures are promoted into the long-life pool, then the amount of memory the GC sees as being promoted is relatively small, but they may be holding onto large amounts of native memory.
14:23 Skarsnik gah I cut the first ><
14:24 jnthn Wow, lot of green. :)
14:24 Skarsnik 285KB / 177KB / 3635KB
14:24 jnthn But yeah, if you're getting unlucky and it's the XML native objects getting promoted, it could be the issue I described.
14:25 Skarsnik Well I let the loop run 2 time. the process take 90Mb before the loop
14:25 xpen joined #perl6
14:27 Skarsnik Well it's a big deal for me. I have a bot that fetch a html page every 2 min and I take 1Gb of memory after 24h already xD
14:27 jnthn Skarsnik: I'm tied up with $dayjob stuff at the moment, but you might try a build/install of MoarVM with this patch applied: https://gist.github.com/jnthn/4fa3dc78457f65240f3b
14:27 jnthn Yeah, that sounds like a real leak
14:27 jnthn Rather than the unmanaged sawtooth
14:28 jnthn Since with the issue I described things do get reclaimed eventually
14:28 AlexDaniel DrForr: what about Slang::CountingRods ? :)
14:29 AlexDaniel m: say 𝍫 + 𝍢
14:29 camelia rakudo-moar d67cb0: OUTPUT«33␤»
14:30 DHAD05 joined #perl6
14:30 brrt jnth: what's the green bits
14:30 brrt jnthn
14:31 AlexDaniel m: say 〇
14:31 camelia rakudo-moar d67cb0: OUTPUT«0␤»
14:31 DHAD05 Hello
14:31 mspo that seems wrong?
14:31 jnthn brrt: It's available memory in tospace after a collection
14:32 AlexDaniel DHAD05: hi!
14:32 jnthn brrt: Which is equivalent to nursery size - (reclaimed nursery objects + promoted objects)
14:32 jnthn brrt: Generally, the more of it the better :)
14:33 Skarsnik gah rakudo make that does not redo moar make x)
14:33 brrt ah, i see
14:33 brrt nice :-)
14:34 jnthn Skarsnik: If you just do make install in your Moar build directory you'll be fine
14:34 jnthn Skarsnik: Re-installing moar doesn't need a rebuild of NQP/Rakudo
14:35 anthk_ how can I seek a file handle?
14:36 jnthn anthk_: .seek method, see http://doc.perl6.org/routine/seek
14:36 nanis joined #perl6
14:36 Skarsnik ah damn, perl6 modules are tie to the perl6 running
14:36 AlexDaniel m: my \u = ‘ABCD’; my \l = ‘abcd’; say [~] u.comb Z~ l.comb
14:36 camelia rakudo-moar d67cb0: OUTPUT«AaBbCcDd␤»
14:36 AlexDaniel ZoffixWin: ↑ what about this?
14:37 AlexDaniel ZoffixWin: I really dislike the 「join ‘’」 part
14:38 AlexDaniel ZoffixWin: and the parens…
14:38 nanis Happy to report that the problems I was having earlier with native call tests were being caused by an errant -Gy "separate functions for linker" in %CFLAGS% in my environment. With that removed, all native call tests pass.
14:41 anthk_ jnthn: $fh.seek() ?
14:41 anthk_ being $sh a file handle
14:41 jnthn anthk_: yes
14:42 AlexDaniel ZoffixWin: ah dammit! That's what the first comment says!
14:43 anthk_ Cannot call seek(IO::Handle: Int, Int); none of these signatures match:
14:43 anthk_
14:43 ely-se does NativeCall support volatile?
14:44 jnthn anthk_: Yes, I gave you a link to the docs showing how you have to call it above
14:44 go|dfish joined #perl6
14:45 ely-se It seems not. :/ In that case how can I distribute C code with a Perl 6 module?
14:45 Skarsnik nanis, nice
14:46 Skarsnik volatile?
14:46 RabidGravy ely-se see LibraryMake in the first instance
14:46 Skarsnik is that not a c++ stuff?
14:46 RabidGravy there are a few examples of modules that do it in the ecosystem
14:46 jnthn ely-se: A volatile what, ooc?
14:47 ely-se jnthn: equivalent of extern int volatile *p; *p = 0;
14:47 jnthn Ah, on a global
14:48 jnthn I don't think our optimizer is smart enough to not make every read an actual read yet anyway on those :)
14:48 Skarsnik why would you want to use volatite?
14:49 ely-se jnthn: ok :p
14:49 leont There are very few cases where volatile is something you want or need
14:49 leont In general, it does something different from what many people assume
14:50 jnthn Not to mention it does different things in different languages. :)
14:50 dalek doc: f2972d8 | (Wenzel P. P. Peppmeyer)++ | doc/Type/Callable.pod:
14:50 dalek doc: more build fixing
14:50 dalek doc: review: https://github.com/perl6/doc/commit/f2972d87da
14:50 leont That too
14:50 jnthn iirc, it's really not strongly defined in C
14:50 ely-se jnthn: and in different compilers for the same language
14:50 regreg joined #perl6
14:50 leont C++11 pretty much deprecated it in favor of atomic loads/saves with explicit memory ordering
14:51 ely-se MSVC guarantees reads and writes from and to volatiles are atomic (lol)
14:51 ely-se leont: what? no. volatile never had anything to do with atomic loads and stores, and C++ never deprecated it
14:51 leont I know, it's the explicit memory ordering that's replacing the volatile
14:51 jnthn The C# definition is acquire/release semantics, and so prevents certain re-orderings.
14:52 jnthn Which is kinda useful.
14:52 leont http://en.cppreference.com/w/cpp/atomic/memory_order
14:52 leont It's just that you can't really do any sensible memory ordering without it being atomic
14:52 ely-se I want to use volatile and clearing to make it less likely passwords end up in crash dumps, and mlock to make them not go to swap
14:54 skids joined #perl6
14:55 Skarsnik jnthn, it leaks/grow  a bit more now xD
14:56 sena_kun joined #perl6
14:56 anthk_ odd, I use $fh.seek(1, 0) to read a byte at a time and it doesn't work
14:57 Skarsnik http://imgur.com/9Gu1Flh
14:57 leont ely-se: why would volatile help there?
14:58 anthk_ it's inside a for loop, I don't know, if I open the file, I understand it would beggin to seek from the byte 0 by default
14:58 ely-se leont: the compiler may otherwise optimise out the assignments
14:59 RabidGravy m:  $*IN.seek(1,0)
14:59 camelia rakudo-moar d67cb0: OUTPUT«Cannot call seek(IO::Handle: Int, Int); none of these signatures match:␤    (IO::Handle:D $: Int:D $offset, SeekType:D $whence = { ... }, *%_)␤  in block <unit> at /tmp/ek8MKJ_W2Y line 1␤␤»
15:00 Skarsnik camelia has empty IO::Handle I think?
15:00 jnthn Skarsnik: Well, you note it does full collects
15:00 jnthn *you'll
15:00 RabidGravy anthk_, why don't you just use .read(1)
15:00 jnthn But if it's still leaking with those then yeah, it's a real leak, not the GC sawtooth thing
15:00 RabidGravy having first opened the file with :bin
15:01 anthk_ RabidGravy: because I am mapping a file to an array byte per byte(as a ROM)
15:01 Skarsnik jnthn, http://pastebin.com/r9QE1sbZ (I read the memory from /proc/pid/statm)
15:02 RabidGravy anthk_, right, why don't you just use .read(1)
15:03 RabidGravy while not $fh.eof { @array[$i++] = $fh.read(1) }
15:03 anthk_ RabidGravy:  that could work?
15:04 moritz don't we have a .recv method or so that provides the data in batches as they come in?
15:05 anthk_ the problem is that I have to load the ROM file in the 512th byte, by default from the program counter
15:05 moritz reading byte by byte sounds a bit slow :-)
15:05 Skarsnik sound like snes rom? x)
15:05 anthk_ Skarsnik:  chip8 :|
15:05 anthk_ loading fonts into the RAM array was straightforward
15:06 RabidGravy should do, infact you should just be able to do "@array = $fh.slurp-rest(:bin).list"
15:06 RabidGravy or something like that
15:09 vendethiel joined #perl6
15:09 sena_kun hi guys
15:09 _Vi joined #perl6
15:13 Technaton joined #perl6
15:14 gfldex m: say 'hi sena_kun!';
15:14 camelia rakudo-moar d67cb0: OUTPUT«hi sena_kun!␤»
15:14 ely-se joined #perl6
15:15 sena_kun I have about a week of totally free time(and much of time after), some programming skills and wish to learn perl6 deeper. What can I write(from 'Most wanted' or no) useful for community and interesting enough(where perl6 will be the best choice)? Except for rakudo itself and writing docs. Contributing to already started project is also an option.
15:16 RabidGravy does anyone know of a list of media types that can safely be considered "text" for the purposes of decoding?  e.g. "application/xml" , "application/javascript" etc
15:17 Skarsnik hm, use xdg ref?
15:17 Skarsnik or whatever the 'desktop' standard is
15:18 DrForr Pull something off the "most wanted" list and go for it? Pretty much everything there is fair game.
15:18 lizmat and a new Perl 6 Weekly hits the Net: https://p6weekly.wordpress.com/2016/01/25/2016-123-what-are-we-waiting-4/
15:18 Skarsnik Oohhh
15:18 lizmat for some reason, some "f"'s are not rendering, although they *are* in the source
15:18 Skarsnik finally. the monthly weekly !
15:18 ugexe m: my $s; $s.?Supply.tap({.say}) # is this a bug or just a `don't do that`
15:18 camelia rakudo-moar d67cb0: OUTPUT«(Any)␤»
15:18 DrForr Are they too skinny? :)
15:18 travis-ci joined #perl6
15:18 travis-ci Doc build passed. Wenzel P. P. Peppmeyer 'more build fixing'
15:18 travis-ci https://travis-ci.org/perl6/doc/builds/104651352 https://github.com/perl6/doc/compare/7dc2201e5af2...f2972d87daaf
15:18 travis-ci left #perl6
15:18 lizmat I blame wordpress JS madness
15:18 AlexDaniel just discovered this: http://strangelyconsistent.org/blog/how-perl-6-just-sells-itself
15:19 anthk_` joined #perl6
15:19 moritz sena_kun: another option is to go to modules.perl6.org, find a module you like, and extend it; many of the modules are rather minimal
15:19 AlexDaniel lizmat: hi! Nice to see you here :)
15:19 lizmat commute to AmsterdamX.pm meeting &
15:19 lizmat .oO( and gone again  :-)
15:20 AlexDaniel “reason i ask is because the Perl fans seem to live in caves / don't post their thoughts on the debate” – haha
15:20 AlexDaniel well, who knows. Perhaps they're busy getting things done :)
15:20 [Coke] my wife borrowed a book from a coworker on friday, starts reading it. Chapter one is about... Larry Wall. small world.
15:20 DrForr Still a bitch to paint it.
15:21 ilmari [Coke]: which book?
15:21 moritz [Coke]: do you have any tasks for the 2016.01 with which I could help?
15:21 RabidGravy wow, lizmat++ such summarisation :)
15:21 moritz [Coke]: I've started to fill out docs/ChangeLog
15:22 sena_kun DrForr, hmm, I'll look at it it nobody has something more interesting to advice. Also, this lists need update.
15:22 [Coke] moritz: you working on the branch?
15:23 RabidGravy sena_kun, I think the modules list also has the number of issues on the modules, pick something that looks useful with a bunch of issues and fix some
15:23 jnthn ugexe: I think there's a Supply coercer that turns any value into a one-emit on-demand Supply, much like .list makes any item a one-element list.
15:23 moritz [Coke]: yes
15:23 DrForr sena_kun: Well, if it neds updating, there's something right *there* to work on :)
15:23 jnthn ugexe: And it's defined in Any I expect, so everything has it
15:23 RabidGravy (checking first that they're not being fixed already)
15:23 [Coke] moritz: that's an excellent help, thank you
15:23 moritz lizmat++ # blog
15:23 AlexDaniel “any time frame for an official Larry Wall release?” – haha, yeah. I wonder when we will release Larry Wall
15:24 RabidGravy RELEASE THE BATS!
15:24 * DrForr ignores the muffled banging from downstairs.
15:24 [Coke] (book) NeuroTribes, I think.
15:25 [Coke] My wife has never met larry, but apparently i mentioned him a few times or something. :)
15:25 moritz [Coke]: somehow that sounds familiar :-)
15:26 sena_kun DrForr, I'll send a PR with changes then. Also, is there any point when module stops to be "WIP" and excluded from 'most wanted' list?
15:27 moritz sena_kun: nothing well-defined. When somebody feels it's ready.
15:27 sena_kun moritz, thanks.
15:28 [Coke] moritz, niner, jnthn: if we are happy with the point release so far (I have done no review yet!), I am happy to test it out tonight and see if I can cut a release tonight.
15:29 [Coke] moritz: also, see #perl6-release
15:31 jnthn [Coke]: There's just the matter of those patches from R*
15:36 FROGGS jnthn: I'll take care about that tonight
15:36 [Coke] someone broke the doc build.
15:36 [Coke] ... and someone else already fixed it. whee.
15:37 jnthn FROGGS++
15:38 [Coke] https://rt.perl.org/Ticket/Display.html?id=127363 should be easy to fix...
15:40 AlexDaniel How can I write unicode symbols by using hex codes?
15:41 ilmari m: say "\c[U+666]"
15:41 camelia rakudo-moar d67cb0: OUTPUT«5===SORRY!5=== Error while compiling /tmp/m7mzutzkHN␤Unrecognized character name U+666␤at /tmp/m7mzutzkHN:1␤------> 3say "\c[U+6667⏏5]"␤»
15:41 ilmari m: say "\c[0x0666]"
15:41 camelia rakudo-moar d67cb0: OUTPUT«٦␤»
15:41 ilmari m: say "\c[0x666]".uniname
15:41 camelia rakudo-moar d67cb0: OUTPUT«ARABIC-INDIC DIGIT SIX␤»
15:41 moritz m: say unival("\c[0x666]")
15:41 camelia rakudo-moar d67cb0: OUTPUT«6␤»
15:42 jnthn \x666
15:42 ilmari m: say "\x666"
15:42 camelia rakudo-moar d67cb0: OUTPUT«٦␤»
15:42 AlexDaniel m: say “\c[U+1F926]”
15:42 camelia rakudo-moar d67cb0: OUTPUT«5===SORRY!5=== Error while compiling /tmp/qGcWOOm5nh␤Unrecognized character name U+1F926␤at /tmp/qGcWOOm5nh:1␤------> 3say “\c[U+1F9267⏏5]”␤»
15:42 khw joined #perl6
15:42 moritz m: say unival("\c[666]")
15:42 camelia rakudo-moar d67cb0: OUTPUT«NaN␤»
15:43 moritz m: say unival("\x[666]")
15:43 PerlJam m: say "\c[COMET]";  # too
15:43 camelia rakudo-moar d67cb0: OUTPUT«6␤»
15:43 camelia rakudo-moar d67cb0: OUTPUT«☄␤»
15:43 moritz \x[...] for hexadecimal input
15:43 moritz \c is for de*c*imal, usually
15:43 * ilmari thought it stood for "character"
15:44 AlexDaniel I'm confused, so how do I write U+1F926 ?
15:44 jnthn ilmari: Me too :)
15:44 Juerd ilmari: It originally did :)
15:44 Juerd Specifically, like in C's 'char'
15:44 moritz AlexDaniel: by removing the leading U+
15:45 Juerd I recall having read that, but references to it seem to have been carefully cleaned up. Or maybe I dreamt it.
15:45 Skarsnik is a fork routine planned? or what I can I do as a workaround for my leak issue? x)
15:45 AlexDaniel moritz: like?
15:45 mspo someone probably needs to start a POSIX
15:45 Peter_R joined #perl6
15:46 geekosaur > say unival("\x[1f926]")
15:46 DrForr Not it :)
15:46 PerlJam mspo: I thought someone already had.
15:46 lokien_ joined #perl6
15:46 anthk_` m: say (0x02 +< 8 || 0x0c +< 4).fmt("%04x");
15:46 camelia rakudo-moar d67cb0: OUTPUT«0200␤»
15:46 geekosaur beh
15:46 geekosaur too tired
15:46 moritz m: say "\x[1F926]"
15:46 camelia rakudo-moar d67cb0: OUTPUT«🤦␤»
15:46 moritz m: say "\x[1F926]".uniname
15:46 camelia rakudo-moar d67cb0: OUTPUT«<reserved>␤»
15:46 AlexDaniel oh with \x
15:46 moritz AlexDaniel: ^^
15:46 AlexDaniel okay, thanks
15:46 moritz you're welcome
15:47 PerlJam mspo: https://github.com/cspencer/perl6-posix
15:47 mspo https://github.com/cspencer/perl6-posix
15:47 mspo but it doesn't seem to have fork
15:47 moritz pull request to add it?
15:48 Skarsnik Well I tried using fork with NC, but it did not end well
15:48 diakopter m: "\x[99999999]"
15:48 camelia rakudo-moar d67cb0: OUTPUT«===SORRY!===␤chr codepoint cannot be negative␤»
15:48 Skarsnik it block some other NC code
15:48 AlexDaniel diakopter: yeaaaaah……
15:48 raiph joined #perl6
15:49 diakopter AlexDaniel: ?
15:49 AlexDaniel diakopter: another overflow :)
15:51 * AlexDaniel silently hates RT. Searching for 99999 opens a ticket with id 99999
15:51 diakopter #125817
15:51 DrForr I'd just like to be able to *view* a bug that I submitted...
15:52 AlexDaniel m: say chr 99999999
15:52 camelia rakudo-moar d67cb0: OUTPUT«(signal SEGV)»
15:52 AlexDaniel segmentation fault!
15:52 AlexDaniel hooray!
15:52 AlexDaniel “closable with tests” right?
15:52 diakopter well it was previously
15:53 diakopter now it needs tests AND another fix
15:55 MadcapJake does List.map set the topic variable?
15:56 MadcapJake yeah looks like it does
15:56 moritz MadcapJake: it just invokes the callable you pass to it
15:56 AlexDaniel m: say chr 9999999999
15:56 camelia rakudo-moar d67cb0: OUTPUT«(signal SEGV)»
15:56 AlexDaniel m: say chr 999999999999
15:56 camelia rakudo-moar d67cb0: OUTPUT«chr codepoint cannot be negative␤  in block <unit> at /tmp/jicTmB4rt5 line 1␤␤»
15:56 moritz MadcapJake: and if that callable is a block without explicit signature, then -> $_? is rw {} is the default signature (or similar)
15:57 MadcapJake moritz: cool, thanks for the explanation!
15:57 moritz m: say ({$_}).signature.perl
15:57 camelia rakudo-moar d67cb0: OUTPUT«:(;; $_? is raw)␤»
15:57 moritz ok, is raw, not rw
15:57 AlexDaniel m: say chr 999999999999999999999999999
15:57 camelia rakudo-moar d67cb0: OUTPUT«Cannot unbox 90 bit wide bigint into native integer␤  in block <unit> at /tmp/UhwBhUHUEP line 1␤␤»
15:57 MadcapJake what's the raw trait mean?
15:57 hoelzro o/ #perl6
15:57 moritz MadcapJake: "bind rw if possible, but fall back to ro"
15:57 moritz MadcapJake: whereas rw dies if it can't bind to a writable container
15:58 MadcapJake interesting!
16:01 * [Coke] tries to respond to ki51's latest ticket... diplomatically.
16:01 [Coke] *kid51
16:02 geekosaur heh
16:02 geekosaur actually getting git and curl from macports/homebrew/whatever plus whatever is provided to get updated certs (since it uses the OS certs by default and those are almost certainly too old/expired) might be eough
16:03 [Coke] m: say chr 999999999999
16:03 camelia rakudo-moar d67cb0: OUTPUT«chr codepoint cannot be negative␤  in block <unit> at /tmp/_Cw6TPM0xC line 1␤␤»
16:03 [Coke] m: say chr 99999999
16:03 camelia rakudo-moar d67cb0: OUTPUT«(signal SEGV)»
16:03 [Coke] huh. nifty.
16:03 geekosaur we go through this with macports too "why don't you support <x> on 10.5/ppc?" "we don't *have* 10.5/ppc. if you do, become maintainer for <x>"
16:04 geekosaur can't build ppc on buildbots, etc.
16:06 jernster joined #perl6
16:16 _Vi left #perl6
16:18 ugexe should it be best practice to declare/request dists with `-` instead of `::`? then you can differentiate between the two
16:19 psy_ joined #perl6
16:19 ugexe differentiate dists and modules that is
16:20 ugexe so meta6 would be `Foo-Bar` and in your provides you might have your "Foo::Bar" (or maybe not if the dist doesnt provide such a module)
16:22 ParsonsNose joined #perl6
16:25 zakharyas joined #perl6
16:28 chacewells joined #perl6
16:28 chacewells hi all. i'm trying to figure out the idiomatic way to pipe print and say statements to an external command
16:28 dalek doc: 133f3e7 | (Wenzel P. P. Peppmeyer)++ | doc/Language/regexes.pod:
16:28 dalek doc: fix heading
16:28 dalek doc: review: https://github.com/perl6/doc/commit/133f3e7d25
16:32 mohae joined #perl6
16:33 virtualsue joined #perl6
16:35 pmurias joined #perl6
16:35 pmurias fork is not built in?
16:36 Skarsnik I think run has stuff for it?
16:36 geekosaur fork isn't portable :(
16:37 geekosaur you should see the horrible hacks cygwin uses to fake it
16:37 alpha123 joined #perl6
16:37 geekosaur (and of course perl 5 ithreads staretd out as a workaround for no fork() on Windows)
16:37 [Coke] run returns a Proc. see http://docs.perl6.org/type/Proc
16:37 chacewells yeah. i'm trying to figure it out. in perl5, i'm pretty sure you would just go "open my $cmd, '-|', 'uniq'"
16:38 chacewells oh cool. thanks
16:38 [Coke] chacewells: don't thank me yet, the docs might not help.:)
16:40 pmurias fork doesn't seem to be supported on the jvm even on linux, so keeping it in a module might make sense
16:40 chacewells haha that's been my experience
16:41 chacewells it's almost like there's *too* much documentation
16:41 mspo yes, go to the lowest common denominator ;)
16:45 sena_kun joined #perl6
16:46 leont joined #perl6
16:47 AlexDaniel chacewells: just use run
16:48 Calibellus joined #perl6
16:48 AlexDaniel chacewells: run(‘cmd’, ‘arg1’, :in(…))
16:48 AlexDaniel chacewells: what has to go into :in() is a good question though!
16:48 AlexDaniel hmm
16:48 AlexDaniel perhaps it's just :in and then you can print into .in
16:49 Fleurety joined #perl6
16:50 MARTIMM joined #perl6
16:50 chacewells AlexDaniel: that seems to make sense. 6's IO model def takes some getting used to
16:51 chacewells i think it would be $*IN
16:51 AlexDaniel chacewells: my $r = run(‘cat’, :in); $r.in.say(‘hello world’);
16:52 AlexDaniel chacewells: sure enough you have to .in.close; it afterwards
16:52 AlexDaniel chacewells: is that what you want?
16:52 alpha123 that's dope actually
16:52 chacewells ooooh
16:53 * alpha123 proceeds to steal the idea of Proc#in for his toy little language
16:53 chacewells so :in is basically saying "yes, this gets an input stream"
16:53 AlexDaniel chacewells: yes
16:53 AlexDaniel chacewells: and you can specify what it gets
16:54 chacewells that's friggin awesome. i'm so excited about 6!
16:55 xinming joined #perl6
16:55 AlexDaniel chacewells: for example, you can try this:
16:55 AlexDaniel chacewells: my $r1 = run(‘echo’, ‘hello world’, :out); my $r2 = run(‘cat’, :in($r1.out));
16:56 chacewells ic
16:56 AlexDaniel chacewells: also note that this way we are not working with shell, so all shell problems are gone
16:56 AlexDaniel chacewells: that being said you can still change 「run」 to 「shell」 and it will work too
16:57 AlexDaniel though you obviously can't pass separate args this way to shell, so you just smash it into one vulnerable string :)
16:57 AlexDaniel e.g. shell(‘echo hello world’)
16:57 AlexDaniel but :out and :in should work exactly the same way
16:58 chacewells so great. OO, yet concise
16:59 AlexDaniel chacewells: one thing that is not so concise is when you want to slurp everything into a variable. In that case it is 「my $x = run(…, :out).out.slurp-rest;」
17:00 AlexDaniel chacewells: so you specify that you want the output. then you get it and then you slurp everything from it. Sure enough it makes sense, but it is a bit painful to type :)
17:01 AlexDaniel chacewells: as for the docs, see this: http://doc.perl6.org/type/Proc
17:02 AlexDaniel which actually mentions everything that I've said earlier :)
17:04 Technaton Hello, everybody! :) I'm a long-time perl5/ruby user who wants to try Perl6. The first task I've set for myself is "read a long string from stdin and decode it as JSON", but I'm already stuck --- is there a way to slurp STDIN?
17:04 AlexDaniel alpha123: I'd say that this is actually not good enough. So feel free to make piping even easier in your own toy language :)
17:05 AlexDaniel alpha123: because people still get back to shell for some reason
17:05 AlexDaniel alpha123: e.g. they want args to be separated automatically and they want piping to be easy
17:06 * alpha123 supposes he could overload the pipe (|>) operator for procs
17:06 hoelzro Technaton: $*IN.slurp-rest should do it
17:06 AlexDaniel no
17:06 AlexDaniel it is actually easier
17:07 AlexDaniel m: my $x = slurp;
17:07 camelia rakudo-moar d67cb0: ( no output )
17:07 AlexDaniel m: my $x = slurp; say $x
17:07 camelia rakudo-moar d67cb0: OUTPUT«Céad slán ag sléibhte maorga Chontae Dhún na nGall␤Agus dhá chéad slán ag an Eireagal ard ina stua os cionn caor is coll;␤Nuair a ghluais mise thart le Loch Dhún Lúich’ go ciúin sa ghleann ina luí␤I mo dhiaidh bhí gleanntáin ghlas’ G…»
17:07 hoelzro oh, good point AlexDaniel
17:08 Technaton Hah, yes, that works. I actually tried $*IN.slurp-rest, but my script just died on me. I now know why --- JSON::Tiny eats up all the memory. And I though I'd so something wrong and it waits for EOF endlessly...
17:09 Technaton Thanks!
17:09 laz78 joined #perl6
17:09 AlexDaniel Technaton: so the answer to your task is: say from-json slurp
17:10 AlexDaniel m: say from-json slurp
17:10 camelia rakudo-moar d67cb0: OUTPUT«Invalid JSON: Céad slán ag sléibhte maorga Chontae Dhún na nGall␤Agus dhá chéad slán ag an Eireagal ard ina stua os cionn caor is coll;␤Nuair a ghluais mise thart le Loch Dhún Lúich’ go ciúin sa ghleann ina luí␤I mo dhiaidh bhí gleannt…»
17:11 AlexDaniel fair enough!
17:11 Technaton AlexDaniel: Thanks! Yes, I see that now. :) Now lets just try to find a replacement for JSON::Tiny that doesn't eat my 16G RAM in order to parse a 82MB JSON file.
17:11 Technaton :)
17:11 AlexDaniel m: say from-json “\{ "data": "{slurp}" \}”
17:11 camelia rakudo-moar d67cb0: OUTPUT«Invalid JSON: { "data": "Céad slán ag sléibhte maorga Chontae Dhún na nGall␤Agus dhá chéad slán ag an Eireagal ard ina stua os cionn caor is coll;␤Nuair a ghluais mise thart le Loch Dhún Lúich’ go ciúin sa ghleann ina luí␤I mo dhiaidh bh…»
17:12 MARTIMM camelia: Just a moment and you get perl6 to sing it
17:12 awwaiid Technaton: If you are feeling particularly experimental, you could try: use Inline::Ruby; ruby_require 'json', :import<JSON>; my $data = JSON.parse("yourdata.json"); ...
17:12 alpha123 lol
17:13 Technaton awwaiid: Actually Ruby would be my go-to solution at the moment for any type of "parse this JSON and extract some data from it"-20-lines script.
17:13 AlexDaniel Technaton: what about this? http://modules.perl6.org/#q=json%20fast
17:13 Technaton I just thought I'd give Perl6 a shot today, because... why not?
17:13 AlexDaniel Technaton: it says that it is a drop-in replacement
17:14 sufrostico joined #perl6
17:14 AlexDaniel “Currently it seems to be about 5x faster and uses up about a fourth of the RAM.” – perhaps it is not good enough, but try it
17:14 Technaton AlexDaniel: Switched over a minute ago. Currently uses 2G without any output (on moarVM). "kill -TERM" it is... :/
17:15 AlexDaniel Technaton: Doh!
17:15 Technaton The JSON doesn't contain any loops or similar, I created the program that outputs it. (And reads it back in, actually.)
17:16 AlexDaniel m: say from-json “\{ "data": "{slurp.trim}" \}”
17:16 camelia rakudo-moar d67cb0: OUTPUT«Invalid JSON: { "data": "Céad slán ag sléibhte maorga Chontae Dhún na nGall␤Agus dhá chéad slán ag an Eireagal ard ina stua os cionn caor is coll;␤Nuair a ghluais mise thart le Loch Dhún Lúich’ go ciúin sa ghleann ina luí␤I mo dhiaidh bh…»
17:16 AlexDaniel m: say from-json “\{ "data": "{slurp.tr(“\n”, ‘’)}" \}”
17:16 camelia rakudo-moar d67cb0: OUTPUT«Method 'tr' not found for invocant of class 'Str'␤  in block <unit> at /tmp/vGifUlahkn line 1␤␤»
17:16 colomon joined #perl6
17:17 AlexDaniel m: say from-json “\{ "data": "{slurp.trans(“\n” => ‘’)}" \}”
17:17 camelia rakudo-moar d67cb0: OUTPUT«data => Céad slán ag sléibhte maorga Chontae Dhún na nGallAgus dhá chéad slán ag an Eireagal ard ina stua os cionn caor is coll;Nuair a ghluais mise thart le Loch Dhún Lúich’ go ciúin sa ghleann ina luíI mo dhiaidh bhí gleanntáin ghlas’ Gh…»
17:17 AlexDaniel yeaaaaaah!
17:17 alpha123 why is that #trans and not #tr
17:18 AlexDaniel #askadesigner
17:18 dalek doc: abe314f | (Zoffix Znet)++ | doc/Type/IO.pod:
17:18 dalek doc: Fix broken link
17:18 dalek doc: review: https://github.com/perl6/doc/commit/abe314f28e
17:25 autarch m: my @foo = < x 1 y 7 >; my %bar = @foo; say %bar.perl
17:25 camelia rakudo-moar d67cb0: OUTPUT«{:x(IntStr.new(1, "1")), :y(IntStr.new(7, "7"))}␤»
17:27 AlexDaniel m: say IntStr.new(42, ‘69’).perl
17:27 camelia rakudo-moar d67cb0: OUTPUT«IntStr.new(42, "69")␤»
17:27 AlexDaniel hmmmmmm
17:27 maslan joined #perl6
17:29 Technaton Okay, neither JSON::Tiny nor JSON::Fast can actually parse the 82M JSON dump. :( Argh, and I though that calculating the eucledean distance of a number of vectors would be a nice opportunity to try Perl6… Well, something else will come up. :)
17:31 AlexDaniel Technaton: what about Inline::Ruby solution above?
17:31 AlexDaniel if something works faster somewhere else, just steal it :)
17:31 Technaton That feels awfully like cheating.  ;-)
17:31 AlexDaniel but you can still be comfortably using Perl 6 as a glue
17:32 moritz Technaton: cheating is technique
17:32 alpha123 Technaton: I prefer "borrowing existing implementations"
17:32 ilmari alpha123: "leveraging"
17:33 alpha123 ah yes, that's the word i was looking for
17:33 alpha123 good artists reimplement, great artists leverage existing solutions
17:34 Technaton Uuuuh. Okay, marketing did its job wonderfully, I'll try using Ruby's parser.
17:34 jdv79 Technaton: maybe someday that will work;  hopefully
17:34 yqt joined #perl6
17:34 alpha123 Technaton: Rakudo is not particularly fast at the moment. Sorry :(((
17:35 autarch when I write "my %foo = @bar" what is actually happening under the hood? is this a coercion? how does p6 know how to coerce an array to a hash?
17:35 AlexDaniel Technaton: well, actually it is not so much about cheating, it is more about glueing
17:35 Technaton alpha123: I don't expect miracles, no worries. And I want to try a new language that has just seen its Christmas release, so... Who am I to complain?
17:35 AlexDaniel Technaton: NativeCall and Inline::* are very useful tools :)
17:36 Technaton I'll keep that in mind, thanks.
17:36 alpha123 autarch: well %foo is a hash and @bar is an array so it does what you tell it to....
17:36 Technaton I was just worried about the RAM consumption. I left Rakudo with JSON::Tiny to work on my JSON file and went to eat something, and when I came back, the OOM killer had terminated it. So I naturally thought I did something very, very wrong.
17:37 jnthn autarch: It calls %foo.STORE(@bar). STORE iterates @bar. If it sees a Pair object it uses its key/value properties. Otherwise, it just uses things as keys and values in turn
17:37 pi4 joined #perl6
17:37 alpha123 Technaton: that doesn't seem quite right
17:37 autarch jnthn: thanks
17:38 pmurias creating Perl 6 hashes in NativeCall'ed C code is not supported by design?
17:39 * pmurias thinks how possible it would be to create a JSON parser that works fully in C code
17:39 Technaton AlexDaniel, alpha123: FYI, using Ruby's JSON parser worked like a charm. Thanks!
17:40 jdv79 i think there are plenty to link up with pmurias:)
17:41 AlexDaniel OK on the similar topic: is there anything that will do the job of HTML::Parser::XML but faster?
17:41 AlexDaniel it doesn't eat 16 gigs of ram but it takes about 15 seconds to parse a page – not good enough in my particular task
17:41 jdv79 I::P5 + those modules (HTML::Builder, TokeParser, etc...) ?
17:41 AlexDaniel any recommendations? Some perl or ruby module?
17:42 pmurias jdv79: the hard part would be to minimalize the NativeCall overhead
17:43 AlexDaniel I don't have to generate HTML, just parse it
17:43 jdv79 isn't it just "here's a json text.  give me back a p6 structure"?  how does that have high NC overhead?
17:44 jdv79 AlexDaniel: #perl sayd Mojo::DOM is what the cool kids use.
17:45 AlexDaniel jdv79: interesting
17:46 jdv79 back in the day i used the HTML::Tree dist
17:48 jdv79 i think an interesting way forward may be libxml bindings but i think froggs was doing that a while ago
17:49 dalek perl6-most-wanted: d5598cf | Altai-man++ | most-wanted/bindings.md:
17:49 dalek perl6-most-wanted: Update.
17:49 dalek perl6-most-wanted: review: https://github.com/perl6/perl6-most-wanted/commit/d5598cf6b5
17:49 dalek perl6-most-wanted: 3a9b294 | (Zoffix Znet)++ | most-wanted/bindings.md:
17:49 dalek perl6-most-wanted: Merge pull request #15 from Altai-man/master
17:49 dalek perl6-most-wanted:
17:49 dalek perl6-most-wanted: Update
17:49 dalek perl6-most-wanted: review: https://github.com/perl6/perl6-most-wanted/commit/3a9b294c1d
17:52 ely-se joined #perl6
17:53 ely-se joined #perl6
17:56 ely-se is there a shorter form of @l.map({$o.m($_)})?
17:56 ely-se i.e. pass argument to method in map
17:56 ely-se in python you can do map(o.m, l)
17:56 gfldex @l>>.m
17:57 ely-se no, that calls .m on the elements of l
17:57 ely-se I want to call m on $o passing the elements of l as argument
17:57 AlexDaniel ely-se: @l.map($o.m: *)
17:57 AlexDaniel ely-se: isn't it short enough?
17:57 ely-se m: my @xs = 1, 2, 3; @xs.map($*OUT.print: *)
17:57 camelia rakudo-moar d67cb0: OUTPUT«*Cannot call map(Array: Bool); none of these signatures match:␤    ($: Hash \h, *%_)␤    (\SELF: &block;; :$label, :$item, *%_)␤    (HyperIterable:D $: &block;; :$label, *%_)␤  in block <unit> at /tmp/62uybjhMne line 1␤␤»
17:58 ely-se m: my @xs = 1, 2, 3; @xs.map(* ==> $*OUT.print)
17:58 camelia rakudo-moar d67cb0: OUTPUT«5===SORRY!5=== Error while compiling /tmp/LdHcH6SJ76␤Unable to parse expression in argument list; couldn't find final ')' ␤at /tmp/LdHcH6SJ76:1␤------> 3my @xs = 1, 2, 3; @xs.map(*7⏏5 ==> $*OUT.print)␤    expecting any of:␤        infix…»
17:58 ely-se m: my @xs = 1, 2, 3; @xs.map(* ==> $*OUT.print())
17:58 camelia rakudo-moar d67cb0: OUTPUT«5===SORRY!5=== Error while compiling /tmp/YNdTyEswZ5␤Unable to parse expression in argument list; couldn't find final ')' ␤at /tmp/YNdTyEswZ5:1␤------> 3my @xs = 1, 2, 3; @xs.map(*7⏏5 ==> $*OUT.print())␤    expecting any of:␤        inf…»
17:58 ely-se m: my @xs = 1, 2, 3; @xs.map(* ===> $*OUT.print)
17:58 camelia rakudo-moar d67cb0: OUTPUT«5===SORRY!5=== Error while compiling /tmp/2HRhsTET1F␤Preceding context expects a term, but found infix > instead␤at /tmp/2HRhsTET1F:1␤------> 3my @xs = 1, 2, 3; @xs.map(* ===>7⏏5 $*OUT.print)␤»
17:58 ely-se I forgot that syntax :P
17:58 ely-se whatever :P
17:59 SCHAAP137 joined #perl6
17:59 AlexDaniel right
18:00 _mg_ joined #perl6
18:01 AlexDaniel m: my @xs = 1, 2, 3; @xs.map: { $*OUT.print: $_ }
18:01 camelia rakudo-moar d67cb0: OUTPUT«123»
18:01 AlexDaniel yeah it feels like it is the easiest way
18:01 AlexDaniel hmmm
18:02 ely-se ok :)
18:02 ilmari huh, why doesn't  $x.y(*) return WhateverCode?
18:02 AlexDaniel ely-se: why do you even use map in this case?
18:03 AlexDaniel m: my @xs = 1, 2, 3; $*OUT.print($_) for @xs
18:03 camelia rakudo-moar d67cb0: OUTPUT«123»
18:03 ely-se AlexDaniel: I need the results of the function calls
18:03 ely-se like "return @data.map({$parser.def($_)});"
18:04 TimToady ilmari: only operators can autocurry arguments
18:05 AlexDaniel m my @xs = 1, 2, 3; my @data = [$*OUT.print($_) for @xs]; say @data
18:05 AlexDaniel m: my @xs = 1, 2, 3; my @data = [$*OUT.print($_) for @xs]; say @data
18:05 camelia rakudo-moar d67cb0: OUTPUT«123[True True True]␤»
18:05 AlexDaniel ely-se: what about this? ↑
18:05 ely-se and only _some_ operators can as we saw yesterday :)
18:05 ely-se AlexDaniel: hey cool I didn't know that
18:05 TimToady all but a few exceptions, to be more precise
18:06 AlexDaniel m: my @xs = 1, 2, 3; my @data = gather take $*OUT.print($_) for @xs; say @data
18:06 camelia rakudo-moar d67cb0: OUTPUT«123[True True True]␤»
18:07 AlexDaniel it is funny to see 「gather take」 being written like this
18:08 TimToady m: my @xs = 1, 2, 3; my @data = ($*OUT.print($_) for @xs); say @data
18:08 camelia rakudo-moar d67cb0: OUTPUT«123[True True True]␤»
18:09 AlexDaniel TimToady: any difference between () and [] in this case?
18:09 TimToady () doesn't make an Array
18:09 jnthn (and so will be cheaper, though semantically they'll do the same)
18:09 ely-se m: [1, 2, 3].WHAT.say; (1, 2, 3).WHAT.say;
18:09 camelia rakudo-moar d67cb0: OUTPUT«(Array)␤(List)␤»
18:10 addison joined #perl6
18:11 AlexDaniel m: my @xs = 1, 2, 3; my @data := ($*OUT.print($_) for @xs); say @data
18:11 camelia rakudo-moar d67cb0: OUTPUT«123(True True True)␤»
18:11 AlexDaniel m: my @xs = 1, 2, 3; my @data := [$*OUT.print($_) for @xs]; say @data
18:11 camelia rakudo-moar d67cb0: OUTPUT«123[True True True]␤»
18:11 AlexDaniel what about these?
18:11 gfldex m: my &f = &print.assuming($*OUT); f(1);
18:11 camelia rakudo-moar d67cb0: OUTPUT«This type cannot unbox to a native string␤  in sub __PRIMED_ANON at EVAL_2 line 4␤  in sub __PRIMED_ANON at EVAL_2 line 1␤  in block <unit> at /tmp/XG9Xorlcdk line 1␤␤»
18:11 FROGGS joined #perl6
18:13 FROGGS o/
18:15 FROGGS jnthn: hi, I tried to tackle https://rt.perl.org/Ticket/Display.html?id=127306
18:15 FROGGS jnthn: do you know why https://gist.github.com/FROGGS/2dca7df3cb040da864a3 is not enough?
18:15 FROGGS jnthn: is it because the returns trait runs outside of the routine?
18:17 jnthn No, it's a static/dynamic confusion
18:17 jnthn You're trying to do the generic instantiation at compile time
18:17 jnthn Whereas it actually needs instantiating at runtime, just before the check.
18:17 FROGGS hmmm, I was thinking about that too...
18:17 jnthn The archetypes check is right, but we need to generate code that does a lexical lookup of the name
18:18 jnthn And checks against that
18:18 FROGGS okay, thank you :o)
18:18 jnthn I'd probably do it in the Actions
18:18 FROGGS yeah
18:18 jnthn Or at least, that'd be where I'd think to look first.
18:18 ely-se m: @xs = 1, 2; "@xs[0]".say
18:18 camelia rakudo-moar d67cb0: OUTPUT«5===SORRY!5=== Error while compiling /tmp/IryEZX6aGO␤Variable '@xs' is not declared␤at /tmp/IryEZX6aGO:1␤------> 3<BOL>7⏏5@xs = 1, 2; "@xs[0]".say␤»
18:18 ely-se m: my @xs = 1, 2; "@xs[0]".say
18:18 camelia rakudo-moar d67cb0: OUTPUT«1␤»
18:18 ely-se interesting
18:19 FROGGS ely-se: and correct
18:19 ZoffixW joined #perl6
18:19 ZoffixW This looks buggered:
18:20 ZoffixW m: multi infix:<+> (Int $a, Int $b) { $a - $b }; say 10 + 5
18:20 camelia rakudo-moar d67cb0: OUTPUT«Ambiguous call to 'infix:<+>'; these signatures all match:␤:(Int:D \a, Int:D \b --> Int:D)␤:(Int $a, Int $b)␤  in block <unit> at /tmp/7bIu5QJLzG line 1␤␤»
18:20 ZoffixW m: multi infix:<+> (Int:D a, Int:D b --> Int:D) { a - b }; say 10 + 5
18:20 camelia rakudo-moar d67cb0: OUTPUT«5===SORRY!5=== Error while compiling /tmp/iz2L7Zqtc7␤Malformed parameter␤at /tmp/iz2L7Zqtc7:1␤------> 3multi infix:<+> (Int:D7⏏5 a, Int:D b --> Int:D) { a - b }; say 10␤    expecting any of:␤        constraint␤        formal parameter␤»
18:20 ZoffixW oh
18:20 AlexDaniel ely-se: why is it interesting?
18:20 ZoffixW I'm not getting that locally. I'm getting "ambiguous call"
18:21 AlexDaniel ely-se: is it a surprise that double quotes interpolate vars?
18:21 ZoffixW Oh right... Of course I'll be getting it
18:21 ZoffixW multi infix:<+> (Int:D \a, Int:D \b --> Int:D) { a - b }; say 10 + 5
18:21 ZoffixW m: multi infix:<+> (Int:D \a, Int:D \b --> Int:D) { a - b }; say 10 + 5
18:21 camelia rakudo-moar d67cb0: OUTPUT«Ambiguous call to 'infix:<+>'; these signatures all match:␤:(Int:D \a, Int:D \b --> Int:D)␤:(Int:D \a, Int:D \b --> Int:D)␤  in block <unit> at /tmp/vuyBkjFa3N line 1␤␤»
18:22 Skarsnik AlexDaniel, Gumbo to parse HTML with real speed
18:22 ilmari should it let you declare a multi that exactly matches an existing one?
18:22 AlexDaniel m: say “{my @xs = 1, 2; @xs[1]}” # this is slightly more interesting though
18:22 camelia rakudo-moar d67cb0: OUTPUT«2␤»
18:23 ZoffixW m: multi infix:<+>  (Int:D \a, Int:D \b --> Int:D) is tighter( &infix:<+> ) { a - b }; say 10 + 5
18:23 camelia rakudo-moar d67cb0: OUTPUT«Ambiguous call to 'infix:<+>'; these signatures all match:␤:(Int:D \a, Int:D \b --> Int:D)␤:(Int:D \a, Int:D \b --> Int:D)␤  in block <unit> at /tmp/zbAxMwWhyH line 1␤␤»
18:23 AlexDaniel Skarsnik: interesting. Thanks
18:23 ZoffixW Is there a way to make addition behave like subtraction is my question, I guess :)
18:24 Skarsnik AlexDaniel, if you want a comparaison, h:p:x take
18:24 AlexDaniel Skarsnik: h:p:x what?
18:24 Skarsnik 36 sec to parse the 250kB file I need vs 0.02 sec for the C parse of gumbo
18:24 Skarsnik html:parse:xml
18:25 AlexDaniel hmmm
18:28 ZoffixW m: my int32 $x = 42; say $x + 10e0;
18:28 camelia rakudo-moar d67cb0: OUTPUT«52␤»
18:28 ZoffixW How does this work? The candidates for + do not have int32 at all, or even int + Num
18:29 ZoffixW Ah, but there is ($a, $b) and (\a, \b).... never mind me
18:29 AlexDaniel m: my int32 $x = 42; $x += 2⁶⁴; say $x
18:29 camelia rakudo-moar d67cb0: OUTPUT«Cannot unbox 65 bit wide bigint into native integer␤  in block <unit> at /tmp/2hMx91X50o line 1␤␤»
18:30 AlexDaniel m: my int32 $x = 42; $x += 2⁴⁰; say $x
18:30 camelia rakudo-moar d67cb0: OUTPUT«42␤»
18:30 AlexDaniel ??
18:30 ZoffixW m: my int32 $x = 42; $x++ for 2⁶⁴; say $x
18:30 camelia rakudo-moar d67cb0: OUTPUT«43␤»
18:31 ZoffixW AlexDaniel, weird :S
18:31 AlexDaniel m: my int32 $x = 42; $x++ for 2⁶³; say $x
18:31 camelia rakudo-moar d67cb0: OUTPUT«43␤»
18:31 ZoffixW :S
18:31 AlexDaniel :/
18:31 ZoffixW Ah
18:31 ZoffixW Right
18:31 ZoffixW m: my int32 $x = 42; $x++ for ^2⁶⁴; say $x
18:31 AlexDaniel haha yeah
18:32 camelia rakudo-moar d67cb0: OUTPUT«(timeout)»
18:32 AlexDaniel nah it's not gonna make it
18:32 ZoffixW It's weird that it takes 2^40 but not 2&64
18:32 AlexDaniel m: my int32 $x = 42; $x += 2²⁰; say $x
18:32 camelia rakudo-moar d67cb0: OUTPUT«1048618␤»
18:32 AlexDaniel m: my int32 $x = 42; $x += 2³⁰; say $x
18:32 camelia rakudo-moar d67cb0: OUTPUT«1073741866␤»
18:33 AlexDaniel m: my int32 $x = 42; $x += 2³⁵; say $x
18:33 camelia rakudo-moar d67cb0: OUTPUT«42␤»
18:33 AlexDaniel :S
18:33 ilmari because moarvm native ints are 64bit
18:33 ZoffixW m: my int32 $x = 42; $x += 2⁶³;  say $x
18:33 camelia rakudo-moar d67cb0: OUTPUT«42␤»
18:33 AlexDaniel ilmari: on 64-bit system or everywhere?
18:33 ilmari AlexDaniel: everywhere
18:36 ilmari well, registers have slots of every signedness and size, but the native int ops use the i64 slot
18:36 konobi joined #perl6
18:38 AlexDaniel Skarsnik: and why you didn't mention that you've already made a Gumbo module for perl6?
18:39 AlexDaniel :)
18:39 AlexDaniel awesome
18:39 AlexDaniel Skarsnik: thank you very much
18:39 masak greetings, #perl6
18:40 ZoffixW \o
18:40 ely-se given "multi method m(T:D $xs) { }", is it possible to get an error "Type check failed in binding $xs"? as opposed to "none of these signatures match"
18:40 ely-se if so, how?
18:40 AlexDaniel ilmari: so it is a bug or not?
18:40 AlexDaniel ilmari: I don't see any exception thrown
18:41 dalek rakudo-star-daily: 2952a92 | coke++ | log/ (6 files):
18:41 dalek rakudo-star-daily: today (automated commit)
18:41 dalek rakudo-star-daily: review: https://github.com/coke/rakudo-star-daily/commit/2952a92527
18:43 AlexDaniel Skarsnik: oh, and it also returns XML::Document! Almost a drop-in replacement for HTML::Parser::XML !! This is so awesome
18:44 spider-mario joined #perl6
18:44 ely-se because I did get that error and I have no idea how it could happen
18:45 masak ely-se: you could provide a fall-back multi that matches when nothing else does.
18:45 masak ely-se: that's what I tend to do.
18:45 AlexDaniel Skarsnik: yeah, it is around 10 times faster indeed. Thank you
18:45 ely-se masak: yeah, but why the weird error?
18:46 masak ely-se: because multis can look in so many ways, and there's not a guarantee that there's a $xs in all signatures
18:46 masak s/look in so many ways/be extremely heterogenous/
18:46 AlexDaniel huggable: parse html :is: https://github.com/Skarsnik/perl6-gumbo
18:46 huggable AlexDaniel, Added parse html as https://github.com/Skarsnik/perl6-gumbo
18:47 maslan joined #perl6
18:47 ely-se masak: I expected the error "none of these signatures match" but I got "Type check failed in binding"
18:47 domidumont joined #perl6
18:48 * [Coke] gives up on backscroll for the weekend, ah well.
18:48 ZoffixW :D
18:48 Skarsnik AlexDaniel, the idea is when supercedes exists you can replace h:p:x with gumbo::parser xD
18:48 masak ely-se: oh!
18:48 masak ely-se: that... surprises me too o.O
18:49 ely-se I can't seem to figure out a smaller test case though
18:50 jdv79 [Coke]: i gave up a few weeks ago
18:50 jdv79 and am now kinda lost
18:51 jdv79 maybe text-to-speeching it while i sleep and i'll just wake up in sync
18:51 masak induce a trance-like state, and put the backlog on repeat
18:51 jdv79 probably have too many nightmares that way though so maybe not
18:51 * [Coke] blogs (unusual!) at http://blogs.perl.org/users/coke/2016/01/perl-6c-christmas-rakudo-star-coming-soon.html
18:51 ZoffixW I'm thinking of ideas for my Perl 6 talk. It's titled "Wow, Perl 6!" and it'll be just a 1-hour overview of all things cool in Perl 6. Here are the topics I jotted down so far. Do you see if missed something cool? Something that'd make the audience go "Wow" when I show it? https://gist.github.com/zoffixznet/5d28d64190c6a64c6711
18:51 ely-se masak: oh wait, it is the case that the methods are in a role that is added to a class with .^add_role
18:52 ely-se maybe I forgot to do something silly
18:52 [Coke] ZoffixW: I'd make grammars a top level thing, but otherwise, looks like at least an hours worth of time.
18:53 firstdayonthejob joined #perl6
18:53 masak m: class T {}; role R { multi method m(T:D $x) {} }; class C does R {}; C.new.m(42)
18:53 camelia rakudo-moar d67cb0: OUTPUT«Cannot call m(C: Int); none of these signatures match:␤    (C $: T:D $x, *%_)␤  in block <unit> at /tmp/e5ZhehVonQ line 1␤␤»
18:53 masak ely-se: how do you mean 'with .^add_role' ?
18:53 ugexe joined #perl6
18:54 ZoffixW Cool. Thanks.
18:54 masak ely-se: could you adapt the above one-liner to show what you mean?
18:55 ely-se masak: ah I got it
18:56 ely-se this reproduces it: https://gist.github.com/rightfold/f536f9be6d4729ec8377
18:57 * masak looks
18:58 ely-se the last line causes the error
18:59 ely-se it doesn't seem to happen if R is a class and the whole Metamodel::ClassHOW/.^ business is absent
18:59 ely-se oh wait, it does :D
18:59 domidumont1 joined #perl6
19:00 masak yes, just noticed
19:00 masak left a comment
19:00 masak I will keep minimizing
19:00 ely-se the interesting thing is that Any:D is a catchall
19:01 masak ely-se: if I remove the first (successful) call to .f, the second one starts working!
19:01 ely-se well, almost (as it requires definedness)
19:01 ely-se masak: lol
19:01 masak ely-se: feels like a screwing-up of method caches...
19:01 ely-se eek caches
19:01 masak aye
19:02 ely-se this multimethod mechanism is integral to my _extensible compiler_ design, so I hope I can work around it for now
19:02 DrForr I .. think I can get Inline::Guile working. I just corectly got the response from (+ 1 2) from an eval.
19:02 DrForr *correctly
19:02 ely-se is it possible to disable method caches?
19:02 masak ely-se: inlining T as a `where` in the siggie also makes things work properly
19:03 masak ely-se: (so one way to work around it would be to inline the subtype)
19:05 masak ely-se: as far as I can see, it fails because we first match T correctly, but in the second invocation we match List but not T.
19:05 * masak submits rakudobug
19:05 ely-se masak: I reported a bug, you may want to add that as a comment
19:06 ely-se #127367
19:07 masak m: subset T of List where { .[0] == 1 }; .f([1, 2]) && .f([2, 2]) given class C { multi method f(T:D $) { self.f(42) }; multi method f(Any:D $xs) { say $xs } }
19:07 camelia rakudo-moar d67cb0: OUTPUT«42␤Type check failed in binding <anon>; expected T but got Array␤  in method f at /tmp/2og_5AYXa7 line 1␤  in block <unit> at /tmp/2og_5AYXa7 line 1␤␤»
19:08 * RabidGravy fixes some undetected bit-rot in HTTP::UserAgent
19:08 masak m: subset T of List where { .[0] == 1 }; .f([1, 2]), .f([2, 2]) given class C { multi method f(T:D $) { self.f(42) }; multi method f(Any:D $xs) { say $xs } }
19:08 camelia rakudo-moar d67cb0: OUTPUT«42␤Type check failed in binding <anon>; expected T but got Array␤  in method f at /tmp/6QOzj4w8mL line 1␤  in block <unit> at /tmp/6QOzj4w8mL line 1␤␤»
19:09 masak ely-se: great
19:09 * masak adds the relevant conversation to that ticket
19:10 ely-se yay I inlined the constraints and now my tests pass :)
19:10 Skarsnik RabidGravy, if you want to fix more, http::cookie clear expired sucks xD
19:10 masak m: subset T of List where { .[0] == 1 }; .f([1, 2]) && .f([2, 2]) given class C { multi method f(T:D $) { self.f(42) }; multi method f(Any $xs) { say $xs } }
19:10 camelia rakudo-moar d67cb0: OUTPUT«42␤Type check failed in binding <anon>; expected T but got Array␤  in method f at /tmp/cMyjkxekX6 line 1␤  in block <unit> at /tmp/cMyjkxekX6 line 1␤␤»
19:10 masak getting golfier by the minute
19:11 RabidGravy no, I don;t want to fix more, I want to fix things that break the tests :)
19:11 * masak .oO( only the golfiest bacon you've ever seen )
19:11 Skarsnik Well I fix it to pass test, but it should not accept legit expire date I think
19:12 masak m: subset N of Int where * == 5; .f(5), .f(7) given class C { multi method f(N:D $) { self.f("OH HAI") }; multi method f($x) { say $x } }
19:12 camelia rakudo-moar d67cb0: OUTPUT«OH HAI␤Type check failed in binding <anon>; expected N but got Int␤  in method f at /tmp/q_VI1BMJ_Z line 1␤  in block <unit> at /tmp/q_VI1BMJ_Z line 1␤␤»
19:12 masak ely-se: it's not just Lists
19:14 masak m: subset T of List where { .[0] == 1 }; .f([1, 2]) && .f([2, 2]) given class C { multi method f(T:D $) { self.f(42) }; multi method f($xs) { say $xs } }
19:14 camelia rakudo-moar d67cb0: OUTPUT«42␤Type check failed in binding <anon>; expected T but got Array␤  in method f at /tmp/tlPcEFvwR1 line 1␤  in block <unit> at /tmp/tlPcEFvwR1 line 1␤␤»
19:18 zakharyas joined #perl6
19:19 ely-se also, it seems "List:D $xs" is prefferred over "List:D $xs where *[0] eqv symbol('do')" when the input is [symbol('do')]
19:19 vendethiel joined #perl6
19:20 ely-se or at least sometimes
19:20 masak that one might just come down to ordering, though. try reversing the order :)
19:21 ely-se nope
19:21 masak m: class C { multi method f(42) { say "one" }; multi method f(42) { say "two" } }; C.f(42)
19:21 camelia rakudo-moar d67cb0: OUTPUT«one␤»
19:22 masak ely-se: hm. the one with the `where` clause *should* be (epsilon) narrower
19:22 DrForr Does NativeCall handle variadic arguments yet?
19:24 Skarsnik there is code for it
19:24 Skarsnik maybe there are tests for it?
19:24 ely-se masak: might be related to caches too
19:25 DrForr Actually I don't quite need that yet...
19:26 ZoffixW joined #perl6
19:26 autarch I'm giving a short talk on p6 tomorrow night at my local Perl Mongers - I'd appreciate some feedback on my presentation
19:27 autarch if you check out https://github.com/autarch/presentations and then go into perl6-for-mpm you can see it
19:27 ely-se masak: seems to be a problem with recursive multis
19:27 autarch you can just open the index.html in your browser and it should work - if you wanted to also see the speaker notes you'd need to run "grunt serve" and then hit "s" in the browser when it opens the presentation
19:28 ZoffixW That's a lot of talks you got there :D
19:28 autarch I'm mostly interested in feedback about whether things are actually correct, not adding more content, since the goal is 20-30 minutes and I'm sure there will be lots of questions
19:28 masak ely-se: do you have a (golfed) example?
19:28 masak errand &
19:28 autarch ZoffixW - yeah, I really need to split them up into separate repos, I think
19:28 ZoffixW m: my @things = ^1000_000; say sum @things.map.({ $_ * 2 });  say now - INIT now
19:28 camelia rakudo-moar d67cb0: OUTPUT«Cannot call map(Array: ); none of these signatures match:␤    ($: Hash \h, *%_)␤    (\SELF: &block;; :$label, :$item, *%_)␤    (HyperIterable:D $: &block;; :$label, *%_)␤  in block <unit> at /tmp/8YdN2D5PyN line 1␤␤»
19:28 ZoffixW m: my @things = ^1000_000; say sum @things.map({ $_ * 2 });  say now - INIT now
19:28 camelia rakudo-moar d67cb0: OUTPUT«999999000000␤4.998560␤»
19:28 ZoffixW m: my @things = ^1000_000; say sum @things».&({ $_ * 2 });  say now - INIT now
19:29 camelia rakudo-moar d67cb0: OUTPUT«999999000000␤8.34724397␤»
19:29 ZoffixW ^ weird results. 2 times SLOWER than non-threaded
19:30 awwaiid splitting and joining more expensinve than *2 maybe?
19:30 ZoffixW hm?
19:30 awwaiid does >>.& actually thread?
19:30 ZoffixW It should, but I don't think that's implemented yet.
19:30 gfldex no
19:30 jnthn autarch: $output.IO.open(:w) - correct, though I tend to just say open($output, :w) :)
19:31 autarch I'm trying to emphasize the underlying OO-ness
19:31 ZoffixW m: my @things = ^300_000; @things = @things.map: *.uc;  say now - INIT now
19:31 camelia rakudo-moar d67cb0: OUTPUT«1.8095831␤»
19:31 ZoffixW m: my @things = ^300_000; @things = @things».uc;  say now - INIT now
19:31 camelia rakudo-moar d67cb0: OUTPUT«1.51040915␤»
19:31 ZoffixW hm, maybe it's just that particular example
19:31 awwaiid autarch: can you .open:w without the parens?
19:32 [Coke] autarch: how is one supposed to "play" the presentation?
19:32 autarch arrow keys
19:32 [Coke] those don't seem to work.
19:33 ZoffixW I get a "ReferenceError: Reveal is not defined" when I open the presentation
19:33 [Coke] looks like none of the css or js loaded.
19:33 awwaiid broken symlinks :)
19:33 [Coke] Do I need to put this behind a web server?
19:34 awwaiid ../reveal.js is empty
19:34 [Coke] ah
19:34 jnthn autarch: Yes, but making things OO that don't need to be may also put some people off. :-)
19:35 autarch [Coke]: git submodule update in the top level dir, I suspect
19:35 jnthn $input.IO.open(:r).slurp-rest # leaks a file handle
19:35 autarch or update --init
19:35 jnthn slurp($input) is shorter and doesn't :)
19:35 ZoffixW "leaks a filehandle"? What doe sthat mean?
19:35 jnthn Or $input.IO.slurp
19:35 jnthn ZoffixW: The handle that was opened is never closed
19:35 ZoffixW ah
19:36 jnthn Technically it will at some unknown future point when things are GC'd.
19:36 [Coke] autarch: no effect. reveal.js is still empty. So, no feedback from me, sorry.
19:36 awwaiid autarch: git submodule update --init worked
19:36 [Coke] ah, init did it. reading...
19:38 jnthn method open ($class: Str:D $filename) { # this is done to use $class later, though you don't need it and can use self.new(...) later
19:38 ZoffixW autarch, third slide: "Perl 6 is defined its test suite" should be "Perl 6 is defined ***by*** its test suite
19:40 awwaiid autarch: I confirmed that `$outfile.IO.open :w` (with a space before the :w) works as well :)
19:41 ZoffixW "$file.IO.words" works too, without explicit .open  (slide 7)
19:41 rindolf joined #perl6
19:45 AlexDaniel autarch: what's the easiest way to render that thing
19:45 AlexDaniel autarch: ?
19:45 autarch AlexDaniel: if you check out the repo, then "git submodule update --init", then open the index.html, it should be visible
19:45 ZoffixW AlexDaniel, git submodule update --init; then just open it with your browser
19:45 AlexDaniel autarch: it seems like it requires reveal.js but there's no…
19:45 AlexDaniel oh ok
19:45 ZoffixW autarch++ read it all. Looks good to me :)
19:46 AlexDaniel autarch: so it requires your public key in order to do that…
19:46 AlexDaniel I mean, not just the public key
19:46 autarch doh, let me fix that
19:47 AlexDaniel because it is trying to clone from git@github.com:autarch/reveal.js.git
19:47 AlexDaniel hmm interesting… why would that be a problem?
19:47 ZoffixW You know what would be cool? A way to say "await" for all promises in the current scope.
19:48 autarch AlexDaniel: fixed
19:48 jnthn ZoffixW: await gather { ... take all the promises } :-)
19:49 * ZoffixW still needs to learn what gather/take are all about
19:49 AlexDaniel ZoffixW: interestingly I've asked that question about a year ago
19:49 AlexDaniel or maybe more
19:50 AlexDaniel autarch: thanks, it works now
19:50 PerlJam ZoffixW: without the gather/take syntax it sounds like you just asked for action-at-a-distance
19:51 [Coke] autarch++
19:51 AlexDaniel autarch: why build 2015.12 ?
19:51 AlexDaniel autarch: instead of the latest
19:51 ZoffixW PerlJam, not too much distance. Say, running a bunch of fire-and-forget code, and just waiting for them to complete at the end of the block
19:53 ely-se Is it possible to disable caching of multidispatch resolution?
19:54 ZoffixW m: sub do-things { Promise.in(2).then: { say "42"} }; do-things; say "meow"
19:54 camelia rakudo-moar d67cb0: OUTPUT«meow␤»
19:54 ZoffixW PerlJam, like this ^, for example
19:54 musiKk joined #perl6
19:55 AlexDaniel autarch: about “counting words” example, is it supposed to be 1 to 1 port?
19:55 AlexDaniel autarch: because there are ways to make it much shorter in perl 6
19:55 jnthn ely-se: No, though why would you wish to?
19:55 ZoffixW m: sub do-things { await gather { take Promise.in(2).then: { say "42"} } }; say "meow";
19:55 camelia rakudo-moar d67cb0: OUTPUT«meow␤»
19:55 jnthn ely-se: It only caches based on type, never on constraints.
19:56 autarch AlexDaniel: I copied the build instructions from perl6.org
19:56 autarch AlexDaniel: not really supposed to be 1-to-1 port, though if the shorter version is more like a golf version I don't think I'd want to use that - what were you thinking of specifically?
19:56 jnthn (And of course "no" as in "there's no API for it 'cus it's purely an optimization" - if you're willing to null out the thingy where the cache is stored then you can...
19:57 jnthn ...excpet the VM will have inlined based on the cache too perhaps.)
19:57 ely-se jnthn: for debugging
19:58 ely-se there seems to be a problem with recursive multis
20:01 jnthn Well, you can set MVM_SPESH_DISABLE=1 to rule out the VM's own opts
20:01 jnthn (rule them out if it makes no difference, that is)
20:02 ely-se jup, problem persists
20:03 ely-se the program crashes 100ms faster with that environment variable, though :)
20:03 Skarsnik huhu
20:04 AlexDaniel autarch: First thing was that I thought List.unique was able to produce a hash with counts (exactly what is required). But it doesn't, such a pity.
20:04 AlexDaniel autarch: then, the first loop can be written with 「for」 on right hand side
20:04 autarch jnthn: btw, did you see the slide about the perl6 stack? I wasn't sure if I described that correctly - it's slide 16
20:04 AlexDaniel autarch: otherwise it is kinda weird, why write the second one in such fashion but not the first one? it is other way round :)
20:05 AlexDaniel autarch: because I find the second one a bit hard to read because of that. But that's just a style question, so whatever.
20:05 autarch AlexDaniel: what is first & second in this sentence?
20:05 AlexDaniel autarch: for loops
20:05 AlexDaniel autarch: in “counting words” example
20:05 autarch oh, I see postfix vs prefix
20:06 AlexDaniel autarch: in perl 5 version it was required because it had 「chomp」
20:06 autarch right
20:06 autarch yeah, in that case I was just copying the program structure between 5 & 6
20:07 AlexDaniel but indeed it's such a pity that List.unique can't give you the count right away
20:08 AlexDaniel unique even has :as(&lc) trick which is required in this example
20:12 AlexDaniel autarch: sort(&[<=>]) or sort(* <=> *) is perhaps more readable than sort({ $^a <=> $^b })
20:13 AlexDaniel autarch: but again, it's not an issue. Great presentation
20:13 timotimo oh, a presentation?
20:13 timotimo ah, there it is
20:13 ZoffixW autarch, if you want some pedantism: lc is not a good thing to use for caseless comparison. Perl 6 has .fc method and Perl 5 has fc function for that.
20:14 timotimo hm. what should i do to watch this?
20:14 AlexDaniel timotimo: git clone it
20:14 Skarsnik fc?
20:15 ZoffixW timotimo, git submodule update --init; then just open it with your browser
20:15 ZoffixW Skarsnik, "fold case"
20:15 ZoffixW huggable, Str
20:15 huggable ZoffixW, class Str [String of characters]: http://doc.perl6.org/type/Str
20:15 AlexDaniel autarch: also, as a Perl 5 programmer I'd probably like to see 「.say for $foo.values;」 instead of 「say $_ for $foo.values;」
20:15 timotimo yeah, wow those people!
20:16 ZoffixW autarch, I have a shorter version for your thing.
20:16 ZoffixW m: my $s = Bag.new: <foo bar foo ber>; say $s
20:16 camelia rakudo-moar d67cb0: OUTPUT«bag(ber, foo(2), bar)␤»
20:16 ZoffixW autarch, ^ use a Bag instead of the hash (or checkout other Bag/Set types)
20:17 ZoffixW Then your first loop just becomes my $words = Bag.new: $file.IO.open.words;
20:17 ZoffixW (i.e. no loop needed)
20:17 AlexDaniel oh!! Bag!!
20:17 AlexDaniel there it is! Yes!
20:17 jnthn autarch: I didn't see anything in there that concerned me.
20:17 jnthn (about the stack)
20:18 AlexDaniel ZoffixW++ for remembering Bag!
20:18 ZoffixW In the Bag, I also see classify-list and categorize-list methods that sounds interesting, but aren't documented :D
20:18 ZoffixW I wonder if they can be used in lue of the sorting loop
20:19 ZoffixW Bag.new: $file.IO.words; # .open  is not needed
20:19 AlexDaniel ZoffixW: yeah, I didn't like that open too
20:20 AlexDaniel autarch: we're being overly pedantic, please don't mind that :)
20:20 ely-se jnthn: just to be absolutely sure, this is _not_ desired behaviour, right? https://gist.github.com/rightfold/a4bdccd99dae16ba8ad7
20:21 ZoffixW Yeah, the talk is fine the way it is... We're just thinking aloud here :)
20:21 jnthn ely-se: That won't dispatch to either since you're not passing a List?
20:22 ely-se refresh :P
20:22 musiKk can anybody offer a mnemonic for rule vs. token? I always forget which one has sigspace.
20:23 AlexDaniel ZoffixW: it seems like .categorize-list just eats a list into existing Bag
20:23 roguelazer joined #perl6
20:23 ZoffixW ely-se, that code doesn't produce any output for me, suggesting the first multi is run
20:23 jnthn ely-se: That one always dispatches to the first candidate.
20:24 jnthn (Trying it locally, anyway)
20:24 ZoffixW musiKk, rule => raw (i.e. you get whitespace and all)
20:24 ely-se musiKk: pad with spaces both "rule" and "token" until 5 characters :P
20:24 AlexDaniel ZoffixW: and classify-list does something similar
20:24 ely-se jnthn: ok
20:24 jnthn ely-se: multi term-expr(List:D $datum where *[0] eqv 'do') { say 'correct' } # it always runs this one for me
20:24 AlexDaniel ZoffixW: https://github.com/rakudo/rakudo/blob/nom/src/core/Baggy.pm#L517
20:24 ely-se jnthn: yeah my code is a little more contrived but thanks for confirming
20:25 ely-se it's hard to make a reproducable example for this
20:26 jnthn musiKk: Tokenizing is traditionally about breaking things up into tokens, that is the "atoms"
20:26 jnthn musiKk: But I guess that only works for those of us with enough of a compiler-y background :)
20:26 ZoffixW musiKk, tokens make me think of subway tokens... no sig space around them :)
20:27 jnthn Maybe the rules rule over the little tokens :)
20:27 skids .oO(every grammar should have a token token)
20:29 ruoso joined #perl6
20:31 musiKk hm...
20:33 flussence rule is huffmanized slightly more, which is in line with not manually typing out where whitespace goes
20:33 ZoffixW m: (-Inf..Inf).grep(/1337/)[0].say
20:33 camelia rakudo-moar d67cb0: OUTPUT«(timeout)»
20:35 timotimo hah, yeah, good luck with that
20:36 musiKk OK. Token creates a single token. I'll go with that. I'm sure I'll forget it until the next time I need it. Somehow it works both ways in my brain.
20:36 jnthn bah, Perl 6 is so slow, it can't even count up from negative infinity to zero in finite time! :P
20:36 ZoffixW :P
20:36 ZoffixW m: (1..Inf).grep(/1337/).grep(*.is-prime).map("This number is prime " ~ *)[0..2].say
20:36 * ZoffixW can't get enough of this stuff
20:36 camelia rakudo-moar d67cb0: OUTPUT«(This number is prime 31337 This number is prime 111337 This number is prime 113371)␤»
20:37 ely-se I can't make a reproducable example :(
20:37 timotimo m: (1, -1, -> $a, $b { $a - 1, $b + 1 } ... * > 100_000).grep(/1337/).map(*.say)
20:37 ZoffixW Hopefully will make for a fun bit in my talk: "Let's start with an infinite list...." :D
20:37 camelia rakudo-moar d67cb0: OUTPUT«(timeout)»
20:37 timotimo oh, nothing said, eh?
20:37 timotimo m: (1, -1, -> $a, $b { $a - 1, $b + 1 } ... * > 100_000).grep(/1337/)[^100].map(*.say)
20:38 camelia rakudo-moar d67cb0: OUTPUT«(timeout)»
20:38 timotimo ah, i know what's wrong
20:38 ZoffixW What?
20:39 ZoffixW The * > 1000 bit?
20:39 timotimo m: (1, -> $a { $a < 0 ?? -$a !! $a + 1 } ... * > 10).say
20:39 camelia rakudo-moar d67cb0: OUTPUT«(1 2 3 4 5 6 7 8 9 10 11)␤»
20:39 timotimo hm, or maybe not
20:39 ZoffixW That seems one elaborate way to write 1..11 :D
20:39 timotimo m: (1, -> $a { $a > 0 ?? -$a !! $a + 1 } ... * > 10).say
20:39 camelia rakudo-moar d67cb0: OUTPUT«(1 -1 0 1 -1 0 1 -1 0 1 -1 0 1 -1 0 1 -1 0 1 -1 0 1 -1 0 1 -1 0 1 -1 0 1 -1 0 1 -1 0 1 -1 0 1 -1 0 1 -1 0 1 -1 0 1 -1 0 1 -1 0 1 -1 0 1 -1 0 1 -1 0 1 -1 0 1 -1 0 1 -1 0 1 -1 0 1 -1 0 1 -1 0 1 -1 0 1 -1 0 1 -1 0 1 -1 0 1 -1 0 1 -1 0 1 ...)␤»
20:39 ZoffixW m: say ^10 + 1
20:39 camelia rakudo-moar d67cb0: OUTPUT«1..^11␤»
20:39 timotimo m: (1, -> $a { $a > 0 ?? -$a !! $a - 1 } ... * > 10).say
20:39 camelia rakudo-moar d67cb0: OUTPUT«(1 -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 -48 -49 -50 -51 -52 -53 -54 -55 -56 -57 -58 -59 -60 -61 -62 -63 -64 -65 -6…»
20:40 timotimo m: (1, -> $a { $a > 0 ?? -$a !! -$a - 1 } ... * > 10).say
20:40 camelia rakudo-moar d67cb0: OUTPUT«(1 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 ...)␤»
20:40 timotimo god damn it :)
20:40 AlexDaniel why not … Inf ?
20:40 timotimo initially so that it may terminate faster
20:41 timotimo i'll just do this instead:
20:41 timotimo m: (^20).map({$_, -$_}).say
20:41 camelia rakudo-moar d67cb0: OUTPUT«((0 0) (1 -1) (2 -2) (3 -3) (4 -4) (5 -5) (6 -6) (7 -7) (8 -8) (9 -9) (10 -10) (11 -11) (12 -12) (13 -13) (14 -14) (15 -15) (16 -16) (17 -17) (18 -18) (19 -19))␤»
20:41 timotimo m: (^20).map({slip $_, -$_}).say
20:41 camelia rakudo-moar d67cb0: OUTPUT«(0 0 1 -1 2 -2 3 -3 4 -4 5 -5 6 -6 7 -7 8 -8 9 -9 10 -10 11 -11 12 -12 13 -13 14 -14 15 -15 16 -16 17 -17 18 -18 19 -19)␤»
20:47 ChoHag joined #perl6
20:50 ely-se jnthn: it seems to be a weird interplay of multi resolution and lazy lists
20:50 ely-se holdon
20:50 ely-se sprinkling .eager here and there "fixes" the problem
20:50 dalek rakudo/nom: cf7706f | FROGGS++ | src/core/CompUnit/Repository/ (2 files):
20:50 dalek rakudo/nom: make CUR.bindir overridable
20:50 dalek rakudo/nom:
20:50 dalek rakudo/nom: This is useful when several CURs share a single bin directory on disk.
20:50 dalek rakudo/nom: Also when we have repositories that keep the distribution data on a non-local
20:50 dalek rakudo/nom: storage, we need to keep the wrapper scripts in a local bindir, so that these
20:50 dalek rakudo/nom: can be in PATH.
20:50 dalek rakudo/nom: Rakudo Star will be the first user of this funtionality.
20:50 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/cf7706f0f8
20:51 AlexDaniel m: for ^10 { state $x = 42 if $_ == 0; say $x }
20:51 camelia rakudo-moar d67cb0: OUTPUT«42␤42␤42␤42␤42␤42␤42␤42␤42␤42␤»
20:51 AlexDaniel m: for ^10 { state $x = 42 if $_ == 3; say $x }
20:51 camelia rakudo-moar d67cb0: OUTPUT«(Any)␤(Any)␤(Any)␤(Any)␤(Any)␤(Any)␤(Any)␤(Any)␤(Any)␤(Any)␤»
20:52 moritz FROGGS: does this commit need to go into 2016.01?
20:52 FROGGS moritz: yes
20:52 nine FROGGS: note that this is an extension oof the 6.c API
20:52 moritz FROGGS: then you should cherry-pick it into the 2016.01-preparation branch
20:53 FROGGS nine: yes, but without this ther won't be a star
20:53 FROGGS moritz: will do after patching panda
20:53 nine Is there really no other way?
20:53 nine symlinks or something?
20:54 timotimo AlexDaniel: state variables are always initialized on first entry; the if in there doesn't help that much
20:54 FROGGS nine: that would imply not using panda in star
20:54 FROGGS nine: and would probably also mean to not use CURI
20:57 * moritz prefers to extend the API in a backwards compatible way instead of piling up workarounds
20:58 revhippie joined #perl6
20:59 cdg joined #perl6
20:59 lokien_ joined #perl6
21:00 cpage__ joined #perl6
21:02 cpage_ joined #perl6
21:04 pi4 joined #perl6
21:08 ajr_ joined #perl6
21:11 Skarsnik Using gptrixie to write a small libmxl2 based xml parser to use it to parse xml file in gptrixie is fun xD
21:12 ajr_ I'm using the sub MAIN to validate command line arguments, but it appears to be running after all the code. Can it be made to run first, so the program will have validated arguments?
21:12 moritz ajr_: don't write code in the mainline; write it inside your MAIN subroutine!
21:13 jnthn Or in subroutines called from MAIN :)
21:13 jnthn The reason the mainline comes first is to allow manipulation of @*ARGS before it's used to dispatch to MAIN
21:13 ajr_ Is there an example of the proper way to do that in the documentation?
21:13 El_Che_ or in a class loaded by MAIN (to be mister-echo)
21:14 moritz ajr_: it's just a sub; you can write code inside it.
21:14 zhmylove joined #perl6
21:16 DrForr Inline::Scheme now on Github.
21:16 mst ajr_: surely that means you meant to put the code inside MAIN rather than at top-level?
21:16 * alpha123 waits for Inline::Whitespace
21:16 Skarsnik x)
21:16 mst DrForr: oooh. which one?
21:16 DrForr Guile.
21:16 mst and so the cycle continues
21:16 mohae joined #perl6
21:16 mst (you saw my LPW talk, right? :)
21:16 Skarsnik I should write perl6 binding for libmoar
21:17 DrForr mst: Gotta accelerate it somehow.
21:17 Skarsnik not sure of the use, but why not
21:17 DrForr And yes, of course.
21:17 alpha123 Skarsnik: for Inline::Perl6, obviously
21:17 mst surprised you didn't either (a) call it Inline::Guile (b) do an Inline::Racket instead
21:17 mst oooh, an Inline::Scheme with pluggable backends onto multiple r5rs interps would be ace
21:18 DrForr Guile was the first one I ran across that seemed reasonably commonplace.
21:18 mst racket is, to my mind, more so (used to be drscheme)
21:19 moritz oh, I learned some scheme with drscheme
21:19 mst and in fact I stopped even pretending to plan to maintain perl5's Guile bindings when I realised audrey had written mzscheme mindings
21:19 DrForr Ah, I've worked with that when it ws drscheme.
21:19 mst guile's not a bad choice, but mzscheme/racket is IMO a better scheme
21:19 moritz we had an optional CS course in $schooll that was worth its name, learned a bit of scheme there. That was fun
21:19 mst of course, my exact memories on this are buried in the mists of years ago
21:20 awwaiid Cool DrForr. I'm hoping that we can extract some comonalities between these Inline:: langs (and rename the namespace while we're at it); I'll take a look at Inline::Scheme to see what overlap we have
21:20 autarch https://doc.perl6.org/ and http://doc.perl6.org/ appear to have different styles
21:20 nine awwaiid: go go go :)
21:21 awwaiid nine: I got Inline::Ruby broken out into some separate files and bashed travis-ci into submission finally
21:21 * PerlJam wonders when we'll get Inline::COBOL and Inline::Fortran   ;-)
21:21 awwaiid nine: sometime I'll see if I can get Inline::Perl5 on travis
21:21 DrForr awwaiid: It's pretty simplistic at this stage, it'll be more complex/useful once I figure out how to portably crack an SCM type object open.
21:21 awwaiid in theory I'm at $work right now though
21:22 revhippie autarch: woah, strange.
21:22 autarch yep
21:23 alpha123 Inline::Fortran would be pretty useful
21:23 autarch aha, chrome is blocking the load of one of the sheets because it has an explicit http:// url
21:23 autarch probably best to make all sites canonize to https or http
21:23 awwaiid it's actually the ecosystems that I want to get ahold of more than the langs :)
21:24 Psyche^_ joined #perl6
21:24 moritz autarch: or just link to protocol-relative URLs
21:24 ugexe to test Inline::Perl5 on travis just use `perl: '5.20-shrplib'`
21:24 autarch no point in serving the site from both http & https, is there?
21:24 moritz yes: choice
21:24 moritz also, I'm pretty new to the whole running-as-https thiing
21:25 flussence lazy fix would be to throw a "Content-Security-Policy: upgrade-insecure-requests" header in there and let the browser figure it out :)
21:25 awwaiid ugexe: yes. and to test ruby I just added 'rvm install ruby-2.3'. But... subtle issues esp around linking haunted me. I hope it'll be that easy.
21:25 moritz autarch: what's the offending resource?
21:25 alpha123 autarch: //url.com works uses http: or https: depending on the current url, so you don't need to bother canonicalizing them
21:25 autarch moritz: http://design.perl6.org/perl.css
21:26 ugexe i've installed Inline::Perl5 on travis and test it. there were no issues luckily
21:26 autarch alpha123: yes, I'm quite familiar
21:26 * alpha123 whoops
21:26 nowan joined #perl6
21:29 awwaiid ugexe: awesome!
21:29 dalek star/release: 1225071 | FROGGS++ | tools/build/Makefile.in:
21:29 dalek star/release: fix thinko when invoking panda
21:29 dalek star/release:
21:29 dalek star/release: Running "perl6 panda-m.bat" certainly wont work on windows. Though
21:29 dalek star/release: "perl6 panda-m" will.
21:29 dalek star/release: review: https://github.com/rakudo/star/commit/1225071475
21:29 moritz off topic: does anybody know some tool to help fat-package a perl binary and all perl dependencies into a Debian package?
21:29 geraud joined #perl6
21:30 Skarsnik dh_make?
21:30 Skarsnik Oh a fat package
21:30 jpoehls_ joined #perl6
21:30 Skarsnik I don't know
21:30 moritz Skarsnik: I was thinking more magical, like dh-virtualenv for python
21:32 FROGGS moritz: I just know about staticperl, which packs all the things into a binary
21:32 mst moritz: build local::lib. tar up results. feed tarball into fpm?
21:33 ajr_ mst: In almost all shell scripts, I validate the command line arguments, (#, types, and values) first, then start the actual operations. MAIN looked as though it would do some of that automatically and provide a place to do the rest of the validation, but it feels wrong to put the rest of the code in there. but
21:33 yurivish_ joined #perl6
21:33 mst ajr_: well, if you're using MAIN, that's where the code belongs
21:34 mst that's like the whole point of it
21:34 mst provide an entrypoint for the main code of the script
21:34 mst that can do argument validation etc. for you
21:34 mst if you define MAIN, it's basically equivalent to having
21:34 moritz ajr_: Perl 6 isn't shell scripting. Get over it :-)
21:34 abaugher_ joined #perl6
21:34 mst run_arg_parser_and_call(MAIN);
21:34 mst at the bottom of the script
21:34 mst ajr_: and I'm sure you've seen shell scripts that end 'main;'
21:35 mst moritz: yes, that's a much kinder and constructive thing to say to a confused newbie than my explanation :P
21:35 jnthn YOu can also do `unit sub MAIN($a, $b);`
21:35 jnthn Which will make the rest of the program body be considered the implementation of that sub.
21:35 jnthn Which shaves a level of indentation
21:36 jnthn Uh, saves
21:36 jnthn Though I guess shaves works too :)
21:36 mst When indenting / command line scripts / always remember / unit shaves
21:36 autarch joined #perl6
21:37 dalek star/release: 0ff0e63 | FROGGS++ | modules/panda:
21:37 dalek star/release: update panda revision, to include --bin-prefix support
21:37 dalek star/release: review: https://github.com/rakudo/star/commit/0ff0e634c0
21:37 dalek star/release: 8d69d3c | FROGGS++ | / (2 files):
21:37 dalek star/release: remove WIP patch files
21:37 dalek star/release: review: https://github.com/rakudo/star/commit/8d69d3c03a
21:39 * RabidGravy hacks deflate/gzip handling into H::UA
21:40 Skarsnik hm, how?
21:40 RabidGravy using Compress::Zlib, works really nicely
21:40 ajr_ mst: (16:34) Can't say that I have, but I haven't read many others, except for the system stuff.
21:40 Hotkeys used on its own what is the difference between given and with
21:41 jnthn with only runs the code if the value is defined
21:41 mst ajr_: well, it's pretty common tbh
21:41 Hotkeys ah
21:41 jnthn There's a without for the other case
21:41 mst ajr_: but, yeah, as jnthn said, if you don't want the indenting
21:41 Skarsnik RabidGravy, is not perl6 native?
21:41 mst unit sub MAIN (...);
21:41 mst <now inside MAIN until eof>
21:41 mst is totally supported
21:42 RabidGravy Skarsnik, que?
21:42 mst and if you find it more comfortable, go ahead and use it
21:42 Skarsnik C:Z is written in perl6 or it's NC code? x)
21:42 ajr_ Running an entire program inside a subroutine just feels wrong.
21:42 RabidGravy Oh native call
21:42 mst ajr_: everything is always doing that
21:42 mst ajr_: it's just some things provide an implicit magical top-level subroutine for the file
21:42 mst ajr_: really
21:43 dalek rakudo/2016.01-preparation: 74dd4e2 | FROGGS++ | src/core/CompUnit/Repository/ (2 files):
21:43 dalek rakudo/2016.01-preparation: make CUR.bindir overridable
21:43 dalek rakudo/2016.01-preparation:
21:43 dalek rakudo/2016.01-preparation: This is useful when several CURs share a single bin directory on disk.
21:43 dalek rakudo/2016.01-preparation: Also when we have repositories that keep the distribution data on a non-local
21:43 dalek rakudo/2016.01-preparation: storage, we need to keep the wrapper scripts in a local bindir, so that these
21:43 dalek rakudo/2016.01-preparation: can be in PATH.
21:43 dalek rakudo/2016.01-preparation: Rakudo Star will be the first user of this funtionality.
21:43 dalek rakudo/2016.01-preparation: review: https://github.com/rakudo/rakudo/commit/74dd4e29f5
21:43 mst ajr_: and because shell does it taht way, you don't see the main subroutine
21:43 sevvie joined #perl6
21:43 RabidGravy but I've made it optional. It just craps out if it isn't installed and the body needs inflating
21:43 mst ajr_: but conceptually it's totally there
21:43 moritz ajr_: on the contrary, it's best practice; makes testing easier for example
21:43 mspo isn't pretty mucb every lanaguage structured like that?
21:43 moritz python folks do it all the time
21:43 dotness joined #perl6
21:44 mst mspo: um. no. C uses main(), java uses main(), lots of things use main()
21:44 mst perl6 lets you use MAIN if you want to, and not if you don't
21:44 mst but if you decide to avoid MAIN, you don't get the features of MAIN
21:44 mspo so lower level languages have you explicitly type it
21:45 RabidGravy I think it's a nice compromise
21:45 moritz https://travis-ci.org/perl6/Pod-To-HTML/builds/104747418 can anybody make sense of this?
21:45 mst ajr_: so, yeah, it only feels weird because you've missed all the other languages that do do it that way, and it's ok :)
21:45 mst also it makes it way easier to write tests for things
21:46 mst if the 'body' of the script isn't in an implicit top level sub
21:46 mst you can load it and poke it with a stick
21:46 moritz ah, do we have to add /home/travis/.rakudobrew/moar-nom/install/share/perl6/site/bin to $PATH in the travis.yml?
21:46 mst so basically all my shell scripts and perl5 scripts have a main anyway
21:46 mst it's a pretty standard convention for anybody writing production scripting stuff
21:46 mst (common in Tcl as well, and in python)
21:47 Skarsnik RabidGravy, a nice thing will be a full perl6 zip support x)
21:47 RabidGravy and if you want to do something different you can make it easier (by inserting a MAIN or otherwise capturing control at that point)
21:47 ajr_ I'm familiar with C's main, but I think it's the "subroutine" part that's causing the cognitive dissonanance.
21:48 RabidGravy Skarsnik, carry on I won't be stopping you :)
21:48 Skarsnik x)
21:48 Skarsnik I am surprise it did not exist
21:48 moritz ajr_: you can still call other routines, making MAIN only a *SUB*set of all the routines in there
21:48 Skarsnik *suprised
21:48 dfcarpenterak joined #perl6
21:48 mspo C's main is a subroutine?
21:48 RabidGravy well a function
21:48 RabidGravy in C parlance
21:48 moritz it's just nomenclature
21:48 alpha123 perl subroutine == c function
21:49 mspo they're all just objects ot C, right? :)
21:49 Skarsnik main is just a symbol
21:49 Skarsnik int main; is a valid C program x)
21:49 ajr_ This discussion may have cleared up a question about the Test modules. It was clear how they worked for subroutines and modules, but testing whole programs seemed to need another step up.
21:49 mspo is 'main' special in asm?
21:50 alpha123 mspo: that's up to your assembler
21:50 Skarsnik Na, but the kernel search for a main symbol
21:50 moritz ajr_: a nice trick is to a a multi sub MAIN('test') { use Test; test code here; }
21:50 masak hm, I wonder how close a JS-like "transpiler" approach might be able to push Perl 5 towards Perl 6...
21:51 masak maybe that won't actually be much more powerful than what can already be done with source filters and parser hooks
21:51 DrForr Solved the core of the typing issue, will do an improved version tomorrow with any luck.
21:51 moritz masak: afaict there are two approaches; one generates readable but often wrong code, and the other generates unreadable code with lots of supporting libs
21:52 DrForr Most assuredly my ToPerl6 converter does the former :)
21:52 DrForr G'nite.
21:52 masak moritz: are you talking about compile-to-JS languages in particular? because IMO TypeScript generates readable *and* correct code most of the time
21:52 RabidGravy toodles
21:53 moritz masak: no, about 5-to-6 or 6-to-5 transpilers
21:53 RabidGravy but aren't TypeScript, CoffeeScript et al *designed* to be "transpiled" to Javascript?
21:54 RabidGravy don't have that luxury with 5-to-6
21:54 diakopter I think the word transpile is meant to imply 'readably compile'
21:54 konobi coffeescript is a shitshow
21:54 arnsholt My suspicion for P5 on P6 is that the P5 lexer and parser stages need to be compiled to Perl 6 code (custom flex and yacc compilers, possibly? But what about the action code, in C, which is the meat of it?) and then the rest of the runtime can be implemented on top of that
21:54 masak note that I wasn't saying "compiler Perl 6 to Perl 5"
21:55 masak I was saying "try to push Perl 5 closer to Perl 6 by compiling a language to it"
21:55 diakopter how does that push...
21:56 konobi probably better as a tool to inspect the AST and suggest changes
21:56 masak I dunno. all I know is that TypeScript pushes JavaScript closer to being a static language.
21:56 konobi yeah, with some side effects
21:57 arnsholt Oh, right. Now I see what you mean, masak. Never mind my gibberings
21:58 arnsholt I'm not sure what it would look like, but it does sound like an intriguing idea
21:59 skids joined #perl6
22:02 maslan joined #perl6
22:02 jdv79 is the cur stuff still in flux?
22:03 moritz not so much
22:03 jdv79 i have a rakudo from a few hours ago and a panda from a few minutes ago and bootstrap failed
22:03 virtualsue joined #perl6
22:03 moritz if you had panda installed before compiling the new rakudo version, you don't even have to bootstrap
22:04 jdv79 that's already over my head.  i thought bootstrap installed panda under the rakudo dir
22:04 nine FROGGS just pushed commits to both. Maybe related?
22:04 jdv79 or i'm misunderstanding
22:05 jdv79 i rm -rf'ed my preview rakudo checkout and cloned fresh and built
22:05 nine jdv79: you're correct. What moritz meant is that if you have installed panda on a previous version of rakudo, you keep it despite upgrading
22:05 Technaton Good night, sleep tight, ... and don't let the bedbugs bite...!
22:05 jdv79 ok
22:05 jdv79 i'll update my rakudo then
22:05 nine Oh, rm -rf is the exception of course :)
22:11 jdv79 do panda and zef get along together?
22:17 colomon joined #perl6
22:38 gtodd joined #perl6
22:39 gtodd https://perl6advent.wordpress.com/2010/12/04/the-sequence-operator/ could there be a comment or edit on this post to explain why the approach no longer works with perl6 xmas release?  (GLR stuff I guess)
22:41 gtodd camelia: r: my @odd-numbers   := 1, 3 ... *; say @odd-numbers ;
22:41 camelia gtodd: rakudo-jvm 6c0f93: OUTPUT«Type check failed in binding; expected Positional but got Seq␤  in block <unit> at /tmp/tmpfile:1␤␤»
22:41 camelia ..rakudo-moar cf7706: OUTPUT«Type check failed in binding; expected Positional but got Seq␤  in block <unit> at /tmp/tmpfile line 1␤␤»
22:41 gtodd etc.
22:46 dalek doc: f16bdf2 | (David Brunton)++ | doc/Language/terms.pod:
22:46 dalek doc: To, too.
22:46 dalek doc: review: https://github.com/perl6/doc/commit/f16bdf2921
22:46 dalek doc: d78c5ef | RabidGravy++ | doc/Language/terms.pod:
22:46 dalek doc: Merge pull request #368 from dbrunton/patch-4
22:46 dalek doc:
22:46 dalek doc: To, too.
22:46 dalek doc: review: https://github.com/perl6/doc/commit/d78c5efb02
22:46 masak 'night, #perl6
22:47 RabidGravy toodles
22:49 gfldex gtodd: post fixed
22:52 leont joined #perl6
22:52 travis-ci joined #perl6
22:52 travis-ci Doc build errored. Jonathan Stowe 'Merge pull request #368 from dbrunton/patch-4
22:52 travis-ci https://travis-ci.org/perl6/doc/builds/104767020 https://github.com/perl6/doc/compare/abe314f28ec7...d78c5efb024b
22:52 travis-ci left #perl6
22:52 awwaiid gfldex: that post mentions "@Fibonacci[30]" but is using binding to $Fibonacci throughout
22:54 gfldex awwaiid: that should be fixed too
22:55 awwaiid gfldex: also, any reason it isn't using @x = ... instead of $x := ...?
22:55 awwaiid (every time I see := I am suspicious)
22:55 gfldex i just prefer binding for lazy lists. Makes it a little clearer what's going on
22:56 gtodd gfldex: wheee!
22:56 TEttinger joined #perl6
22:57 awwaiid gfldex: I guess I don't know why $x = 1,2,...* doesn't work
22:57 gtodd gfldex: there's tons of non working code examples out there since GLR but the advent calendar is almost "official" documentation :)
22:58 awwaiid gfldex: oh... hmm. $x = (1,2,3...*) does work
22:58 awwaiid yeah. I don't get it :)
22:59 maslan joined #perl6
23:02 gtodd gfldex: oh I thought the "fix" was   my @fib = ( 1, 1, * + * ... * );   #List context feeds into array
23:03 gtodd gfldex: @fib[1..9]
23:03 sortiz joined #perl6
23:03 gtodd or something
23:03 gtodd sigh
23:03 sortiz \o #perl6
23:05 gtodd but I like your explanation  ... if there was a perl6style or PBP maybe something that is a lazy lists should bind to something that is not an Array ...
23:06 gtodd would be part of it ... errm P6BP ...
23:17 laz78 joined #perl6
23:19 AlexDaniel joined #perl6
23:25 autarch thanks to everyone who reviewed my slides earlier - I made a bunch of changes based on your feedback
23:25 skids joined #perl6
23:35 yurivish_ joined #perl6
23:35 ajr_ If rakudo* is installed, is panda supposed to work "out of the box", or is there a further install required? I see it, but in a directory way down from anything on $PATH.
23:35 virtualsue joined #perl6
23:43 drrho joined #perl6
23:45 AlexDaniel autarch: nice!
23:46 AlexDaniel autarch: hmm did you miss Bag thing or did you find it inappropriate for that example?
23:46 addison_ joined #perl6
23:47 AlexDaniel m: m: my $s = Bag.new: <foo bar foo ber>; say $s
23:47 camelia rakudo-moar cf7706: OUTPUT«bag(ber, foo(2), bar)␤»
23:51 drrho joined #perl6
23:52 adu joined #perl6

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

Perl 6 | Reference Documentation | Rakudo