Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2016-02-16

Perl 6 | Reference Documentation | Rakudo

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

All times shown according to UTC.

Time Nick Message
00:01 shicheng joined #perl6
00:31 Juerd What does "control exception without handler" mean?
00:37 skids Some sort of control construct like 'take' or 'return' happened where it should not have.
00:37 skids Often this happens inside map code.
00:38 Juerd I had a simple "redo FOO"
00:38 Juerd Rewrote it to repeat...while
00:38 Juerd Haven't been able to golf it
00:38 skids m: FOO: (0..1).map({ redo FOO })
00:38 camelia rakudo-moar 4cd287: OUTPUT«control exception without handler␤  in block <unit> at /tmp/QqECWKS7Ow line 1␤␤»
00:39 Juerd I had a very simple FOO: { ...; redo FOO if condition; }
00:40 skids Redo requires a loop, probably.
00:42 skids m: FOO: for 1 { 42.say; redo FOO unless $++; }
00:42 camelia rakudo-moar 4cd287: OUTPUT«42␤42␤»
00:45 ugexe &?BLOCK();
00:49 TreyHarris joined #perl6
00:50 bowtie joined #perl6
00:55 Juerd m: { say "a"; redo unless $++ > 4; }
00:55 camelia rakudo-moar 4cd287: OUTPUT«a␤redo without loop construct␤  in block <unit> at /tmp/29_r5YkKG3 line 1␤␤»
00:56 Juerd Is http://doc.perl6.org/language/control#redo wrong then?
00:57 skids Yeah, needs a loop.
00:57 skids m: do { say "a"; redo unless $++ > 4; }
00:57 camelia rakudo-moar 4cd287: OUTPUT«a␤redo without loop construct␤  in block <unit> at /tmp/713FhEuA1L line 1␤␤»
00:58 skids hrm I guess "do" isn't a do-once loop.
00:58 Juerd m: once { say "a"; redo unless $++ > 4; }
00:58 camelia rakudo-moar 4cd287: OUTPUT«a␤redo without loop construct␤  in block <unit> at /tmp/5ipNevSwI6 line 1␤␤»
00:58 Juerd Apparently 'once' is neither.
00:58 Juerd Apparently 'once' isn't either
00:59 skids No once is entirely another animal.
01:01 skids Hrm, desin docs say "do" is a loop.
01:01 * skids looks for an RT.
01:02 Juerd Ah, I finally understand the bug I was originally trying to fix.
01:02 Juerd I had the 'redo', and it redid an outer loop, somewhere 5 sub calls higher up.
01:04 Juerd Guessing that { } might turn into a do-once loop if it had a label, I added a label, and that's when I got the weird error
01:04 Juerd But repeat-while works great. (I always avoided that construct (well, do-while) in P5 because it's misleading to the reader)
01:05 skids Ah, there are fudged tests for the loopiness of "do".  And the autogenned RTS near 124576 for them.
01:07 Juerd I won't count on a fix soon then :)
01:08 telex joined #perl6
01:08 Ben_Goldberg joined #perl6
01:12 adu joined #perl6
01:13 sortiz Blob.new(0 xx 10000) vs Blob.new(:initial-elems(10000)) -> 200.2908/s  vs 38052.1614/s
01:15 skids I wonder if a special-case optmization for the 0 xx thing could be made to call that instead.
01:16 abaugher joined #perl6
01:18 sortiz skids, the problem is that the "fast route" in .new(@values) imply a push for every element and the pull-one call for the iterator.
01:20 skids Right the question is if the HLL-level optimizer can specifically detect Blob.new(int xx int) and substitute in a call to Blob.new(:initial-elems).
01:22 sortiz Yes, but that kind of optimizations are, today, far away. :)
01:26 sortiz I'm working in a module for speed up Blob <-> CArray conversions, and discover that trick, so I prefer it in core.
01:26 sortiz *discovered
01:27 skids sortiz: I dunno, reading src/Perl6/Optimizer.nqp it miht not be that hard.
01:29 sortiz skids, I need to learn QAST manipulations. :)
01:32 adu joined #perl6
01:32 timotimo .u soft
01:32 yoleaux U+00AD SOFT HYPHEN [Cf] (<control>)
01:32 yoleaux U+042C CYRILLIC CAPITAL LETTER SOFT SIGN [Lu] (Ь)
01:32 yoleaux U+044C CYRILLIC SMALL LETTER SOFT SIGN [Ll] (ь)
01:33 flussence huh, that Test::Util::ServerPort looks interesting...
01:33 timotimo it's quite unlikely that i can type a soft hyphen into my browser so that it becomes part of a tweet, right?
01:33 dalek doc: d0f97d9 | gotoexit++ | doc/Type/Channel.pod:
01:33 dalek doc: Clarify behavior of Channel.Supply.
01:33 dalek doc:
01:33 dalek doc: Thanks to jnthn for clarification.
01:33 dalek doc: review: https://github.com/perl6/doc/commit/d0f97d9ba6
01:33 dalek doc: d15c255 | (Zoffix Znet)++ | doc/Type/Channel.pod:
01:33 dalek doc: Merge pull request #397 from gotoexit/master
01:33 dalek doc:
01:33 dalek doc: Clarify behavior of Channel.Supply.
01:33 dalek doc: review: https://github.com/perl6/doc/commit/d15c25528c
01:35 flussence m: my $a = IO::Socket::INET.new(:host<127.0.0.1>, :port(0), :listen); say $a.port;    # bind(2) says this should auto-assign a port though, and lsof confirms it, but IO::Socket doesn't know how to read that information back. If this worked that module wouldn't be needed at all!
01:35 camelia rakudo-moar 4cd287: OUTPUT«IO::Socket::INET is disallowed in restricted setting␤  in sub restricted at src/RESTRICTED.setting line 1␤  in method new at src/RESTRICTED.setting line 32␤  in block <unit> at /tmp/uA9Gsk7D7P line 1␤␤»
01:42 skids flussence: Also there's no gurantee nothing else uses the port in the interval between finding a free number and the call to listen, which is one of the reasons for bind(2) doing that.
01:43 * skids wonders if windows haas a sane implementation of that.
01:44 timotimo Room    AvailLostPartialUnknown#Talks
01:44 timotimo h2214    10  0  4  16  31
01:44 timotimo ^- 10 talks from the perl dev room available on fosdem
01:45 timotimo https://video.fosdem.org/2016/h2214/
01:45 timotimo except ... none of the videos up right now are about perl?
01:45 timotimo ah, ok
01:46 timotimo https://video.fosdem.org/2016/h2214/STATUS.TXT
01:46 timotimo indeed all of the videos i'm looking forward to are "UNKNOWN" still
01:47 flussence 0 lost is a good number, how's the sound quality on the ones they've done? That's traditionally the part conferences get wrong
01:47 adu joined #perl6
01:47 timotimo you have to calculate the "unknown" into avail/lost/partial
01:51 timotimo don't forget that we also have recordings of perl-related talks from two additional cameras
01:52 gtbjj joined #perl6
01:52 timotimo so that'd be a fallback in any case
01:59 llfourn anyway to get panda to build from your own repo?
01:59 llfourn rakudobrew* that is
02:00 timotimo oof
02:01 timotimo i don't think so. but building rakudo manually is super easy anyway
02:01 llfourn yeah it doesn't look like it :)
02:01 squach1 joined #perl6
02:01 BenGoldberg_ joined #perl6
02:01 skids well, you can patch your stuff into the tree in git_reference/rakudo, then git commit, then build triple with the commit ID.
02:02 llfourn you mean put a branch into official repo?
02:02 skids No, just locally in the git_reference clone
02:03 llfourn ah I see. Clever.
02:03 skids Of course you have to get your stuff back out of that later before you delete it.
02:03 llfourn yeah might as well build manually :P
02:04 avenj joined #perl6
02:04 avenj joined #perl6
02:04 vendethiel joined #perl6
02:07 Actualeyes joined #perl6
02:14 shicheng joined #perl6
02:14 Ben_Goldberg joined #perl6
02:19 adhoc joined #perl6
02:20 Ben_Goldberg joined #perl6
02:21 adu joined #perl6
02:22 molaf_ joined #perl6
02:22 dalek rakudo-star-daily: ec27301 | coke++ | log/ (9 files):
02:22 dalek rakudo-star-daily: today (automated commit)
02:22 dalek rakudo-star-daily: review: https://github.com/coke/rakudo​-star-daily/commit/ec27301fe3
02:47 ilbot3 joined #perl6
02:47 Topic for #perl6 is now »ö« Welcome to Perl 6! | https://perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:,  or /msg camelia p6: ... | irclog: http://irc.perl6.org or http://colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend!
02:52 Herby_ joined #perl6
02:52 Herby_ Evening, everyone!
02:52 Herby_ \o
02:55 FROGGS_ joined #perl6
03:04 shicheng joined #perl6
03:05 noganex_ joined #perl6
03:18 Herby_ m: my $word = "test"; my $word-split = split('', $word); say $word-split;
03:18 camelia rakudo-moar 4cd287: OUTPUT«( t e s t )␤»
03:19 Herby_ m: my $word = "test"; my @word-split = split('', $word); say @word-split;
03:19 camelia rakudo-moar 4cd287: OUTPUT«[ t e s t ]␤»
03:19 Herby_ m: my $word = "test"; my @word-split = split('', $word); say @word-split; my $word-join = join('', @word-split); say $word-join;
03:19 camelia rakudo-moar 4cd287: OUTPUT«[ t e s t ]␤test␤»
03:19 remmie hey guys, i came in with a cygwin-related problem recently
03:19 Herby_ how do I remove spaces when I join the elements of a list?
03:27 dalek doc: 4da1827 | (Wenzel P. P. Peppmeyer)++ | doc/Type/Signature.pod:
03:27 dalek doc: better wording, add missing full stop
03:27 dalek doc: review: https://github.com/perl6/doc/commit/4da1827819
03:31 apiw joined #perl6
03:34 sortiz m: my $w = "Hola"; my @b = split('', $w); say join('',@b); # What spaces Herby_ ?
03:34 camelia rakudo-moar 4cd287: OUTPUT«Hola␤»
03:35 Herby_ hmm
03:35 remmie basically, the unix version doesn't compile properly, and the windows bat freezes the bash shell
03:36 Herby_ thanks, sortiz
03:37 sortiz m: my $w = "Hola"; my $b = split('', $w); say join('',$b); # Those spaces when using a $ sigiled variable for your list?
03:37 camelia rakudo-moar 4cd287: OUTPUT« H o l a ␤»
03:38 Herby_ yeah, saw that I was using a $ instead of the needed @
03:38 [Tux] joined #perl6
03:39 sortiz m: my $w = "Hola"; my $b = split('', $w); say join('',@$b); # An scalar can hold a list, but beware
03:39 camelia rakudo-moar 4cd287: OUTPUT«Hola␤»
03:43 Herby_ thanks, been tripped up by that a few times
03:48 sortiz Only remember that different sigils implies different semantics. YW
03:48 Herby_ m: "test".split('').say;
03:48 camelia rakudo-moar 4cd287: OUTPUT«( t e s t )␤»
03:49 Herby_ Trying to think of a creative way to solve this using Perl 6: https://www.reddit.com/r/dailyprogrammer/comments/​45w6ad/20160216_challenge_254_easy_atbash_cipher/
03:50 Herby_ no perl solutions yet
03:58 Juerd perl6 -e'.say for lines>>.trans("a".."z" Z=> reverse "a".."z")'
03:58 sortiz That's a typical problem for Hotkeys :)
03:58 Juerd Not quite the hardest challenge :)
03:59 Herby_ hah the easy one for the week
03:59 Juerd perl6 -e'.trans("a".."z" Z=> reverse "a".."z").say for lines'  # bit nicer
03:59 Juerd And OMG perl6 is slow :)
03:59 Juerd (.trans is really slow)
04:01 Herby_ just tested it, works like a champ :)
04:01 Herby_ i knew Perl6 would have a slick way to handle it
04:02 Juerd Now, preserving case is a bit harder.
04:04 Herby_ a couple of solutions down the list, someone posts a pretty slick Bash solution that preserves case too
04:04 Herby_ don't quite understand how it works
04:07 Juerd $ perl6 -e'my %tr = "a".."z" Z=> reverse "a".."z"; for lines() -> $line is copy { $line ~~ s:g:ii/<[a..z]>/{ %tr{$/.lc} }/; say $line; }'  # case preserving
04:08 Juerd Also, *much* faster than .trans
04:09 gfldex m: dd flat(('a'..'z' Z=> reverse 'a'..'z'), ('A'..'Z' Z=> reverse 'A'..'Z'))
04:09 camelia rakudo-moar 4cd287: OUTPUT«(:a("z"), :b("y"), :c("x"), :d("w"), :e("v"), :f("u"), :g("t"), :h("s"), :i("r"), :j("q"), :k("p"), :l("o"), :m("n"), :n("m"), :o("l"), :p("k"), :q("j"), :r("i"), :s("h"), :t("g"), :u("f"), :v("e"), :w("d"), :x("c"), :y("b"), :z("a"), :A("Z"), :B("Y"), :C(…»
04:10 gfldex m: my @a = <Hello World>; .trans(flat(('a'..'z' Z=> reverse 'a'..'z'), ('A'..'Z' Z=> reverse 'A'..'Z'))).say for @a;
04:10 camelia rakudo-moar 4cd287: OUTPUT«Svool␤Dliow␤»
04:11 gfldex m: my @a = <Hello World>; .trans(|('a'..'z' Z=> reverse 'a'..'z'), |('A'..'Z' Z=> reverse 'A'..'Z')).say for @a;
04:11 camelia rakudo-moar 4cd287: OUTPUT«Svool␤Dliow␤»
04:13 Herby_ what does the '|' do in "    .trans(|('a'....
04:14 gfldex it creates a Slip
04:15 gfldex http://doc.perl6.org/type/Slip
04:16 Juerd I've posted my solutions
04:18 gfldex Juerd: you may want to update your 2nd example with: .trans(|('a'..'z' Z=> reverse 'a'..'z'), |('A'..'Z' Z=> reverse 'A'..'Z')).say
04:19 Juerd That's very ugly though
04:19 Juerd Might do the right thing, but it's an eyesore with the parens and |
04:21 gfldex i totally agree that we need slippy meta operators :)
04:22 Herby_ Juerd: great!
04:22 Herby_ The dailyprogrammer challenges are a good way to get exposure for Perl 6
04:22 Juerd Now, let's all go to fiverr and buy upvotes ;)
04:22 Herby_ to shows off its strengths and such
04:23 Herby_ I'll be upvoting it :)
04:24 Juerd Updated from s/<[a..z]>/.../ to s/@alphabet/.../
04:24 Juerd Another eyesore gone
04:28 apiw joined #perl6
04:28 adu joined #perl6
04:32 TimToady joined #perl6
04:43 gfldex m: my %alphabet = flat('a'..'z' Z 'A'..'Z') Z=> reverse flat('A'..'Z' Z 'a'..'z'); dd %alphabet{<a A y Y>};
04:43 camelia rakudo-moar 4cd287: OUTPUT«("z", "Z", "b", "B")␤»
04:45 gfldex Juerd: is this easier on your eyes? ^^^
04:51 AlexDaniel joined #perl6
05:01 Juerd gfldex: A bit
05:03 Juerd gfldex: In contrived stuff like this, where the definition of an alphabet is limited to simple ASCII ranges, the Z operator is by itself visually unpleasant right next to those single-letter strings.
05:03 Juerd s/visually/aesthetically/
05:03 skids m: say (|(97,122,65,90 Z+ $_,-$_,$_,-$_).chrs.comb for 0..25).pairup
05:03 camelia rakudo-moar 4cd287: OUTPUT«(a => z A => Z b => y B => Y c => x C => X d => w D => W e => v E => V f => u F => U g => t G => T h => s H => S i => r I => R j => q J => Q k => p K => P l => o L => O m => n M => N n => m N => M o => l O => L p => k P => K q => j Q => J r => i R => I s =…»
05:03 Juerd ...and there are the codepoints.
05:04 Juerd It was inevitable
05:06 Juerd skids: Wow, it really took me a few minutes to understand your solution :)
05:06 skids m: say (|("azAZ".ords Z+ $_,-$_,$_,-$_).chrs.comb for 0..25).pairup
05:06 camelia rakudo-moar 4cd287: OUTPUT«(a => z A => Z b => y B => Y c => x C => X d => w D => W e => v E => V f => u F => U g => t G => T h => s H => S i => r I => R j => q J => Q k => p K => P l => o L => O m => n M => N n => m N => M o => l O => L p => k P => K q => j Q => J r => i R => I s =…»
05:07 Juerd .ords is much better than literal codepoints!
05:09 AlexDaniel what are you guys doing… :)
05:10 Juerd AlexDaniel: https://www.reddit.com/r/dailyprogrammer/comments/​45w6ad/20160216_challenge_254_easy_atbash_cipher/
05:10 Juerd Though I'm going to bed now. 6:10 AM...
05:11 skids Oh, one could use S:: instead of is copy/s::
05:12 * skids should hit the hay as well.
05:12 AlexDaniel m: say ‘wizard’.trans(‘a’..‘z’ Z=> (‘z’…‘a’))
05:12 camelia rakudo-moar 4cd287: OUTPUT«draziw␤»
05:12 * AlexDaniel didn't get it
05:13 Juerd Oh, wow, z..a works?
05:13 AlexDaniel with … yes
05:13 Juerd That's nice :)
05:14 Juerd Even with ..
05:14 TimToady not with ..
05:14 skids Yeah that fixes that.
05:14 Juerd m: ("z".."a")[3]
05:14 camelia rakudo-moar 4cd287: ( no output )
05:14 Juerd m: ("z".."a")[3].say
05:14 camelia rakudo-moar 4cd287: OUTPUT«Nil␤»
05:14 Juerd Oh, the output from the REPL doesn't mean it *works* :)
05:14 TimToady only ... can produce decreasing ranges
05:14 Juerd > 'z'..'a'
05:14 Juerd "z".."a"
05:14 Juerd That made me think it'd work. But indeed it doesn't.
05:17 AlexDaniel m: say ‘GSRH rh zm vcznkov lu gsv zgyzhs xrksvi’.trans((flat ‘a’..‘z’,‘A’..‘Z’) Z=> (flat ‘z’…‘a’,‘Z’…‘A’))
05:17 camelia rakudo-moar 4cd287: OUTPUT«THIS is an example of the atbash cipher␤»
05:17 AlexDaniel not much harder to preserve the case…
05:17 Juerd Agreed. I just don't like parens :)
05:17 Juerd But feel free to add a reply at the site :)
05:18 AlexDaniel you already did that. Almost
05:18 Juerd z &
05:20 AlexDaniel m: say ‘GSRH rh zm vcznkov lu gsv zgyzhs xrksvi’.trans: zip with => &infix:« => », flat(‘a’..‘z’,‘A’..‘Z’), flat ‘z’…‘a’,‘Z’…‘A’
05:20 camelia rakudo-moar 4cd287: OUTPUT«THIS is an example of the atbash cipher␤»
05:20 AlexDaniel Juerd: only one pair of parens :)
05:21 dalek ecosystem: aedd33f | (Salvador Ortiz)++ | META.list:
05:21 dalek ecosystem: Add NativeHelpers::Blob to ecosystem
05:21 dalek ecosystem:
05:21 dalek ecosystem: Utilities for fast and easy Blob/Buf manipulation for NativeCall
05:21 dalek ecosystem: review: https://github.com/perl6/e​cosystem/commit/aedd33f2ef
05:23 AlexDaniel Java 8 Solution – holy shit!
05:23 AlexDaniel I really liked java at some point
05:25 skids I actually think Juerd's is pretty clear comparative to a golf and shows off a lot of neat features.  Though "say S:g:ii//" would maybe improve it.
05:25 Fleurety joined #perl6
05:25 AlexDaniel :ii is actually the right tool, yes
05:31 Sgeo joined #perl6
05:33 Sgeo_ joined #perl6
05:36 AlexDaniel m: my $x = ‘gsrh rh zm vcznkov lu gsv zgyzhs xrksvi’; say [~] $x.comb».&{/<[a..z]>/??chr -1*.ord+219!!$_}
05:36 camelia rakudo-moar 4cd287: OUTPUT«this is an example of the atbash cipher␤»
05:36 AlexDaniel xD
05:37 AlexDaniel m: my $x = ‘gsrh rh zm vcznkov lu gsv zgyzhs xrksvi’; say [~] $x.comb».&{/<[a..z]>/??chr -.ord+219!!$_}
05:37 camelia rakudo-moar 4cd287: OUTPUT«this is an example of the atbash cipher␤»
05:44 Cabanossi joined #perl6
05:45 Fleurety joined #perl6
05:54 xinming joined #perl6
06:11 HoloIRCUser3 joined #perl6
06:19 apiw joined #perl6
06:24 Hotkeys just curious if atbash is what I think it is
06:24 Hotkeys ?p6> my &f=*.trans(/\w/=>{chr $/.ord+4+^31}); say f("GSRH rh zm vcznkov lu gsv zgyzhs xrksvi")
06:25 Hotkeys sorry
06:25 Hotkeys m: my &f=*.trans(/\w/=>{chr $/.ord+4+^31}); say f("GSRH rh zm vcznkov lu gsv zgyzhs xrksvi")
06:25 camelia rakudo-moar 4cd287: OUTPUT«THIS is an example of the atbash cipher␤»
06:25 Hotkeys AlexDaniel: :p
06:25 AlexDaniel Hotkeys: you win
06:25 Hotkeys actually no I don't
06:26 Hotkeys courtesy of b2gills
06:26 Hotkeys m: my &f = {S:g/\w/{chr $/.ord+4+^31}/}
06:26 Hotkeys ; say f("GSRH rh zm vcznkov lu gsv zgyzhs xrksvi")
06:26 camelia rakudo-moar 4cd287: ( no output )
06:26 Hotkeys hmm
06:26 Hotkeys oh
06:26 Hotkeys m: my &f = {S:g/\w/{chr $/.ord+4+^31}/}; say f("GSRH rh zm vcznkov lu gsv zgyzhs xrksvi")
06:26 camelia rakudo-moar 4cd287: OUTPUT«THIS is an example of the atbash cipher␤»
06:26 Hotkeys AlexDaniel:
06:26 Hotkeys http://codegolf.stackexchange.com/​questions/68504/swap-the-alphabet
06:28 AlexDaniel Hotkeys: does not look like this will ever be shorter :D
06:28 Hotkeys nope
06:29 AlexDaniel m: my &f = {S:g/\w/{chr $/.ord+4+^31}/}; say f("ä") # it is not completely right though
06:29 camelia rakudo-moar 4cd287: OUTPUT«÷␤»
06:31 Hotkeys well it was right within the golf
06:31 Hotkeys maybe not full atbash
06:32 AlexDaniel m: my &f = {S:g/\w/{chr $/.ord+4+^31}/}; say f("“wizard”") # it is not completely right though
06:32 camelia rakudo-moar 4cd287: OUTPUT«“draziw”␤»
06:32 AlexDaniel right, “” are not affected
06:33 AlexDaniel m: my &f = {S:g/\w/{chr $/.ord+4+^31}/}; say f("“ẅįzäṙđ”") # it is not completely right though
06:33 camelia rakudo-moar 4cd287: OUTPUT«“ẖĬa÷ṂĊ”␤»
06:33 AlexDaniel m: my &f = {S:g/\w/{chr $/.ord+4+^31}/}; say f("“ẖĬa÷ṂĊ”") # it is not completely right though
06:33 camelia rakudo-moar 4cd287: OUTPUT«“ẅįz÷ṙđ”␤»
06:33 AlexDaniel ya
06:34 Hotkeys also
06:34 Hotkeys the dailyprogrammer challenge specified a-z
06:36 Hotkeys oh I see
06:36 Hotkeys if not part of the alphabet blah blah
06:40 ka joined #perl6
06:42 araujo_ joined #perl6
06:42 apiw joined #perl6
06:49 quester joined #perl6
07:16 Todd__ joined #perl6
07:16 Todd__ Hi, do we still have -> in Perl 6?  Just out of curiousity, what is the official name of "->" in Perl?  Pointer?
07:19 CIAvash joined #perl6
07:19 AlexDaniel Todd__: which -> ? :)
07:19 _mg_ joined #perl6
07:19 AlexDaniel Todd__: -> {} is a pointy block
07:20 rurban joined #perl6
07:20 AlexDaniel m: for ^5 -> $n { say $n }
07:20 camelia rakudo-moar 4cd287: OUTPUT«0␤1␤2␤3␤4␤»
07:21 AlexDaniel m: sub foo (--> 42) {}; say foo
07:21 camelia rakudo-moar 4cd287: OUTPUT«42␤»
07:22 AlexDaniel I don't really remember any other uses of arrow-like things
07:22 AlexDaniel m: my %h = 42 => 62; say %h.perl
07:22 camelia rakudo-moar 4cd287: OUTPUT«{"42" => 62}␤»
07:24 AlexDaniel Todd__: or do you mean like $object->method ?
07:24 AlexDaniel Todd__: no, use . for that in Perl 6
07:25 kd`_ joined #perl6
07:26 kd`_ so how does the perl6 built in datetime stuff deal with leap seconds?
07:29 MilkmanDan joined #perl6
07:29 _dolmen_ joined #perl6
07:30 AlexDaniel kd`_: try it and see how it performs? :)
07:30 AlexDaniel kd`_: that's a good question because currently docs do not mention a thing about it
07:31 Todd__ In Perl 5 I use $$ and -> for references.  I was wondering if that changed in P6
07:32 Todd__ so "->{}" is a pointy block.  What is "->" by itself called?
07:32 [Tux] joined #perl6
07:33 AlexDaniel kd`_: perhaps this is appropriate reading: https://perl6advent.wordpress.com​/2010/12/16/day-16-time-in-perl6/
07:33 sortiz Todd__, Perl6 change a lot of things, for example -> becomes . (a single dot) for method calls.
07:33 AlexDaniel Todd__: a pointy? xDD
07:34 AlexDaniel Todd__: but yeah, it is used for completely different purposes
07:35 Todd__ the term "pointer" seems to annoy the Perl 5 crowd.  I wonder if "pointy" will also annoy them?
07:35 AlexDaniel I think that “dot” is just fine.
07:36 Todd__ dot as in ...
07:36 TimToady -> is really a lambda, in FP jargon
07:36 AlexDaniel dot as in:
07:36 AlexDaniel m: class A { has $.foo = 42 }; say A.new.foo
07:36 camelia rakudo-moar 4cd287: OUTPUT«42␤»
07:37 AlexDaniel m: class A { has $.foo = 42 }; say A.new.#`{← Here!}foo
07:37 camelia rakudo-moar 4cd287: OUTPUT«42␤»
07:37 Todd__ whtat is "FP"
07:37 AlexDaniel m: class A { has $.foo = 42 }; say A.new#`{Here! →}.#`{← Here!}foo
07:37 camelia rakudo-moar 4cd287: OUTPUT«42␤»
07:37 AlexDaniel functional programming
07:37 FROGGS joined #perl6
07:38 Todd__ found lambda on wikipedia.  Thank you!
07:39 Todd__ In perl 5 I have had to pass complex structures as "references" (fancy pointers).  Am I right that that all goes away in Perl 6?
07:39 Todd__ as to subs
07:40 Todd__ pass to subs
07:40 AlexDaniel Todd__: everything is an object so you don't really have to worry about that most of the time
07:40 FROGGS in short, everythng is a fancy pointer :o)
07:41 AlexDaniel and so most of the time when you need a pointer you already have it
07:41 FROGGS (except native types perhaps)
07:42 AlexDaniel Todd__: perhaps you should just try it :)
07:42 firstdayonthejob joined #perl6
07:43 kd`_ AlexDaniel: thanks, in a perl6 talk at a perl mongers meeting, that looks like good reading for the way home
07:44 Praise joined #perl6
07:44 Praise joined #perl6
07:44 AlexDaniel kd`_: though I highly recommend you to play around with it. Who knows, maybe you'll find some interesting edge case where Perl 6 does not perform as nicely as you expect :)
07:45 sno joined #perl6
07:45 gypsydave5 joined #perl6
07:47 Kitt3n joined #perl6
07:47 Timbus joined #perl6
07:54 kd`_ AlexDaniel: unfortunately for me I think the built in REPL could be better :)
07:54 kd`_ let's see what happens ...
07:56 AlexDaniel kd`_: yeah! There are some improvements happening to the REPL, like: http://hoelz.ro/blog/state-of-multi-line-input
07:56 AlexDaniel kd`_: but you are right, it could be better
07:57 AlexDaniel kd`_: this multi-line thing is like, er, 2 days old :)
07:57 Zero_Dogg joined #perl6
07:57 AlexDaniel “I merged this branch on Friday” oh no, a bit older
07:59 kd`_ oh I was thinking about tab autocompletion and things like that
08:00 kd`_ some sort of interface such that you tab on a *thing and you get some sort of useful suggestion
08:00 AlexDaniel kd`_: right. Yeah, that'd be great
08:00 AlexDaniel kd`_: contributions are welcome :)
08:01 kd`_ yeah I know ... it would give me a surface to mess around with perl6 on anyway
08:02 kd`_ assuming it's implementable in perl6 that is
08:02 kd`_ is there a perl6 equivalentn to perl -d + $DB::single=1; ?
08:03 * kd`_ answers own question https://perl6advent.wordpress.co​m/2012/12/05/a-perl-6-debugger/
08:04 [Tux] test            25.151
08:04 [Tux] test-t          12.905
08:04 [Tux] csv-parser      52.535
08:04 [Tux] that is sloow
08:05 FROGGS m: class DB { my $.single = 0; }; say DB.single; my $db = DB.new; DB.single = 1; say DB.single; say $db.single # kd`
08:05 camelia rakudo-moar 4cd287: OUTPUT«0␤1␤1␤»
08:08 sjoshi joined #perl6
08:12 Laurent_R joined #perl6
08:12 CIAvash llfourn: ping
08:13 darutoko joined #perl6
08:14 ocbtec joined #perl6
08:19 nine .tell hoelzro if only we could resume those X::Syntax::Missing exceptions...
08:19 yoleaux nine: I'll pass your message to hoelzro.
08:21 adu yoleaux!
08:21 yoleaux adu!
08:22 stmuk FROGGS: does that set a debugger breakpoint?
08:22 FROGGS umm, no
08:23 FROGGS I probably misunderstood the question
08:23 stmuk $DB::single=1 sets a breakpoint within code, not sure how to do that in the current p6 debugger
08:24 AlexDaniel FROGGS: I thought that it was a joke :D
08:24 FROGGS *g*
08:25 FROGGS (I did not spot the -d)
08:29 ely-se joined #perl6
08:31 uruwi joined #perl6
08:33 pdcawley joined #perl6
08:39 zakharyas joined #perl6
08:50 Possum joined #perl6
08:52 abraxxa joined #perl6
08:52 vendethiel joined #perl6
08:56 uruwi_ joined #perl6
09:01 kurahaupo joined #perl6
09:05 dakkar_ joined #perl6
09:09 DrForr o/
09:11 DrForr Anyone around yet this fine morning?
09:12 * AlexDaniel
09:15 * lizmat just had breakfast
09:15 lizmat and plugs the new P6W again: https://p6weekly.wordpress.com/20​16/02/15/2016-7-more-versioning/
09:16 DrForr Yay, reading soonish.
09:16 * sortiz Reading DBIish code.
09:17 lizmat [Tux]: tried to pinpoint the commit causing the slowdown, but it is all in noise levels
09:17 DrForr Got a question. I have a function with a signature '$x = sub( Int $i, Str $s ) { }' to which I'd like to pass a list of typed arguments '@x = ( 32, "foo" );'.
09:17 lizmat :-(
09:17 kurahaupo_ joined #perl6
09:18 zakharyas joined #perl6
09:18 DrForr $x(@x) doesn't match the signature, so it fails at runtime. I probably could do this with an EVAL somehow, but if there's a cleaner way I'm all ears.
09:20 DrForr One alternative is to have the users declare their method as destructuring, so $x = sub([ Int $i, ... ]) {} but I'd rather not have to do that.
09:23 sortiz m: my $x =  -> Int $i, Str $s { say $i, $s }; my @a = (32, "foo"); $x(|@a) # |@a does the trick
09:23 camelia rakudo-moar 4cd287: OUTPUT«32foo␤»
09:23 DrForr Pretty sure I tried that, but I'll try again when I get home.
09:24 DrForr I did see that in the docs, maybe it's misaapplied in my case.
09:26 wamba joined #perl6
09:28 rvchangue joined #perl6
09:29 RabidGravy joined #perl6
09:31 Skarsnik joined #perl6
09:33 ka joined #perl6
09:34 Skarsnik Helo
09:36 Skarsnik hey jnthn how is your work on the valgrind stuff? :)
09:43 quester left #perl6
09:50 araujo joined #perl6
09:52 jnthn Skarsnik: Good; NQP's test suite is mostly clean, just a few tests, and FROGGS++ did a patch overnight that I didn't factor in yet :)
09:53 jnthn Then will move on to achieving similar with Rakudo :)
09:54 Skarsnik maybe I will be able to track my leak without racking my brain to find how to golf it x)
09:57 Skarsnik hm enum value can't overlap?
09:58 eyck joined #perl6
09:58 Skarsnik I mean like enum Foo (TYPE1 => 1,  TYPE2 => 2)
09:59 Skarsnik TYPE2 => 1
09:59 eyck joined #perl6
10:00 brrt joined #perl6
10:05 sjoshi joined #perl6
10:15 Skarsnik hm, someone has an idea on how to pass a null callback to a native sub?
10:18 sortiz Skarsnik, I can't tested callbacks yet, but in NC a type imply Null, so try with Callable
10:18 moritz or Code
10:19 Skarsnik Ok, it's just the C lib take 0 for a default callback x)
10:19 Skarsnik *a C lib
10:20 kd` llfourn: hi, you made me /join
10:21 kd` llfourn: actually I had a perl 6 repl up during your talk and I was trying out stuff you mentioned.  Later I had a perl6 repl up, and a perl -d -E0 repl in a different window
10:22 * sortiz As my first DBIish are failing, return to my code to tests callbacks :)
10:23 Skarsnik first DBIish are failing?
10:25 sortiz Skarsnik, first DBIish *tests*, sorry: # Failed test 'Install driver', Actually thrown at: in any  at gen/moar/m-Metamodel.nqp line 3041 !
10:26 Skarsnik duh
10:26 rindolf joined #perl6
10:26 Skarsnik weird
10:26 sortiz Indeed!
10:28 Skarsnik Did you change some code on one the drivers?
10:29 sortiz nope, a clean clone.
10:30 vendethiel joined #perl6
10:30 sortiz btw, this is with pg, wanted to see the array problems :(
10:32 Skarsnik wich test fail btw?
10:33 Skarsnik I don't remember if it work well when is can't access the Pg server
10:33 sortiz t/35-pg-common.t
10:35 Skarsnik let me try localy.
10:35 sortiz Don't worry about, tomorrow I will try again.
10:36 araujo joined #perl6
10:36 Skarsnik it's just skip for me
10:37 RabidGravy sortiz, is this a brand new rakudo build?
10:37 RabidGravy (or very recent?)
10:37 araujo joined #perl6
10:38 sortiz Yes: This is Rakudo version 2015.12-350-g585619f built on MoarVM version 2016.01-28-g2136293
10:38 Skarsnik the issue with Pg Array is that I did not manage to build correct Array value when returning a hash. I get an Array of Array instead
10:38 Skarsnik not tagger 2016.1 ?
10:38 Skarsnik *tagged
10:38 RabidGravy I've seen this in a couple of modules that previously worked fine, it's associated with doing ::($something) in some circumstances in my case
10:39 Skarsnik seem likely
10:39 Skarsnik Install driver do require ::($Driver)
10:41 sortiz Not tagged, but 585619f is from yesterday.
10:41 sortiz In another matter, I think that my new module can be of your interest: https://github.com/salortiz/NativeHelpers-Blob
10:44 Skarsnik Should be 'easy' to allow then in struct
10:45 Skarsnik but size should be pointer size?
10:46 sortiz My MoarVM fu isn't ready yet. :)
10:46 Skarsnik This code is probably on NC.pm
10:47 Skarsnik if it work in function
10:48 sortiz Nop, The marshaling and unmarshaling lives at the MoarMV level.
10:48 Skarsnik Did you try removing/adapting this check? https://github.com/rakudo/rakudo/​blob/nom/lib/NativeCall.pm6#L407
10:49 Skarsnik nvm it's for HAS
10:50 dalek doc: f693ca4 | (Wenzel P. P. Peppmeyer)++ | doc/Language/list.pod:
10:50 dalek doc: unhide how to work with Array elements
10:50 dalek doc: review: https://github.com/perl6/doc/commit/f693ca4071
10:53 sortiz See, for example: https://github.com/MoarVM/MoarVM/blob/​master/src/6model/reprs/CStruct.c#L110 , the REPR for the MVMArray case is missing.
10:54 gfldex after reading http://stackoverflow.com/questions/35423037/how-to​-determine-if-an-element-exists-in-a-perl-6-array i found we could do with an updated version of http://glyphic.s3.amazonaws.com/ozone​/mark/periodic/Periodic%20Table%20of%​20the%20Operators%20A4%20300dpi.jpg
10:57 sortiz The checks in NC.pm are only to avoid the low level "else" in L237 :)
10:57 Skarsnik sortiz, hm https://github.com/MoarVM/MoarVM/blob/​master/src/6model/reprs/CStruct.c#L189 ?
10:58 sortiz That's the case for CArray, not Blob's MVMArray
11:02 sortiz Skarsnik, Believe me, I spent last week understanding that part, so I take the NativeHelpers::Blob approach.
11:03 Skarsnik this lib (mxml) make me mad x) ,Pointer[PtrFunc]              $cb # F:Typedef(mxml_type_t)->|mxml_type_e| ( Typedef(mxml_node_t)->|mxml_node_s|*)* ; x)
11:04 Skarsnik something cool will be to have shaped Array in cstruct x)
11:05 Skarsnik probably need to add something to set the size in the CArray type
11:06 cschwenz joined #perl6
11:09 sortiz Most arrays at the C level are flat, and that case use N*M elements. btw, MVMArray handles shaped arrays, only NYI at the Rakudo level (as far as I can see).
11:11 Skarsnik well size of Array in a C struct probably does not change even when the size is fixed?
11:12 jnthn MVMArray doesn't handle shaped
11:12 jnthn That's what MultiDimArray does
11:12 jnthn VMArray is resizable
11:12 jnthn And one-dimensioned
11:13 pmurias joined #perl6
11:13 sortiz Ah, thanks jnthn, I was confused.
11:14 pmurias do we have any nqp ops that will transfer control to the debugger? (like the JavaScript debugger statement)?
11:14 jnthn pmurias: No
11:16 IhabHussein joined #perl6
11:18 apiw joined #perl6
11:18 cschwenz https://github.com/perl6/DBIish/issues/50  :-(
11:20 Skarsnik look like a rakudo bug
11:24 sortiz jnthn, So a shaped Array will use MultiDimArray?
11:24 cschwenz Rakudo, or MoarVM?  (as the first non-DBIish line called out is "in any  at gen/moar/m-Metamodel.nqp line 3041")
11:24 jnthn sortiz: Yes
11:24 jnthn m: my int @a[3;3]; say @a.REPR
11:24 camelia rakudo-moar 4cd287: OUTPUT«MultiDimArray␤»
11:27 sortiz 6model is amazing.
11:28 * DrForr almost RTA G"odel.
11:29 jnthn cschwenz: Very likely Rakudo; the moar mention in there is because the build process puts generated things into folders by backend, for when you're building Moar/JVM at the same time.
11:29 jnthn If it's a regression in driver loading, it could be the recent require changes that went in.
11:30 cschwenz hmm, thanks jnthn
11:30 jnthn But that's only a guess, and I didn't read the patches so don't know exactly what they contain
11:30 sortiz jnthn, A last question: Will be possible to create/add new REPRs from the Perl6 level?
11:30 Amendil joined #perl6
11:30 IhabHussein left #perl6
11:32 sortiz cschwenz, I see the same problem a few hours ago.
11:32 jnthn sortiz: REPRs were intended as taking care of VM-level issues, so they are by design not portable things
11:32 jnthn sortiz: They're heavily tied up with a particular VM's allocation, memory handling, GC, etc.
11:33 jnthn sortiz: You *might* some day before able to write, say, a MoarVM extension in Perl 6 that adds a new REPR, but it'll be VM-specific code.
11:33 jnthn s/before//
11:33 jnthn uh, s/before/be/ :)
11:34 jnthn That's one of the key reasons 6model does its split of meta-object and representation.
11:34 jnthn Things like classes, roles, method dispatch, and type aren't anything the VM need know about. But memory layout/access is always tightly coupled to the underlying runtime.
11:36 jnthn (Yes, type does tend to matter for optimization, but only so far as establishing identity goes.)
11:37 jnthn And things like method dispatch and multi dispatch are also understood somewhat by the VM, but the mechanism isn't, only the results placed into caches.
11:39 sortiz I understand that, I was thinking in the future possibility to ldloading an extension that add a new REPR to a running MoarVM.
11:40 sortiz (And then the associated HLL code)
11:40 jnthn Probably possible.
11:42 sortiz jnthn, Thank you again, no more questions today. :)
11:43 * jnthn wanders back off to today's design task at $dayjob :)
11:44 cbk joined #perl6
11:44 dalek rakudo/nom: ad63cd0 | lizmat++ | src/core/PseudoStash.pm:
11:44 dalek rakudo/nom: Speed up pseudostash lookup slightly
11:44 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/ad63cd04fb
11:47 brrt joined #perl6
11:53 vendethiel joined #perl6
11:56 espadrine_ joined #perl6
11:58 Peter_WR Are promises considered stable / safe to use in star 2016.1?
11:59 RabidGravy Yes
12:00 RabidGravy well in the sense that there's a lot of software using them already so they want to be
12:00 jnthn They're fairly well covered in the specification tests also.
12:00 apiw joined #perl6
12:03 RabidGravy I'm going to RT the "Missing serialize REPR function for REPR VMException" should be caught earlier so it can be more informative
12:03 Peter_WR Ah right, I'm probably doing something wrong then
12:04 RabidGravy it's doing my nut, I can locate it to a module but don't know *what* is causing it
12:04 Peter_WR I have an issue where my program seems to deadlock if you go above a sufficience number of promises relative to threadpool size
12:04 RabidGravy Peter_WR, show us
12:04 Peter_WR RabidGravy, not go the code with me right now I'm afraid but will post when I get home from work
12:05 RabidGravy that scenario is possible though
12:06 Peter_WR The interesting thing is, iirc the issue still happens if I set the threadpool size to 1
12:06 Peter_WR Or maybe not interesting
12:06 Peter_WR :P
12:07 lizmat Peter_WR: are you using await ?
12:07 Peter_WR yeah
12:08 jnthn lunch &
12:08 lizmat in his grant proposal, jnthn mentioned he would work on making await non-blocking
12:08 lizmat as currently it blocks the thread it is in
12:09 lizmat so with sufficient promises being awaited, a deadlock situation is possible
12:09 Peter_WR Blocks it totally, so it doesn't go off and fulfill another promise that can execute?
12:09 lizmat that's the current implementation, indeed
12:09 Peter_WR Ah yes, that will do it
12:09 lizmat patches welcome  :-)
12:09 * jnthn suspects he knows where the patches will come from... :P
12:09 lizmat so it's a known issue
12:10 lizmat perhaps this can be solved with a react block though, jnthn ?
12:10 Peter_WR Thanks, lizmat. I thougth I recalled reading something about this a while back
12:10 jnthn But yeah, for now you need to have a sufficiently big thread pool
12:10 jnthn Or structure things differently
12:10 Peter_WR I got a seg fault when setting threadpool much over 250 too
12:10 ka joined #perl6
12:10 kurahaupo joined #perl6
12:10 Peter_WR Is that expected?
12:10 jnthn lizmat: Sadly not, 'cus those are implemented in terms of react
12:11 jnthn really going for lunch, or I'll be in bother :) &
12:16 apiw joined #perl6
12:16 tonye joined #perl6
12:29 dalek rakudo/nom: 204a03c | lizmat++ | src/core/Str.pm:
12:29 dalek rakudo/nom: Speed up Str.trans a bit
12:29 dalek rakudo/nom:
12:29 dalek rakudo/nom: Don't use the flexible, expensive CALLERS:: PseudoStash, but the
12:29 dalek rakudo/nom: straight nqp equivalent (which is about 50x faster)
12:29 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/204a03c0ef
12:32 Begi joined #perl6
12:34 sortiz Now in my own code: Actually thrown at: in any  at gen/moar/m-Metamodel.nqp line 3041 !!!
12:39 vendethiel joined #perl6
12:43 dalek rakudo/nom: d94ae35 | lizmat++ | src/core/Str.pm:
12:43 dalek rakudo/nom: Remove superfluous line
12:43 dalek rakudo/nom:
12:43 dalek rakudo/nom: $/ is not being used in this method.
12:43 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/d94ae35a44
12:46 sortiz So, not DBIish related, nor the recent rakudo commit, 'cus can reproduce with "This is Rakudo version 2016.01-RC1 built on MoarVM version 2016.01"
12:47 Skarsnik m: sub foo($a, $b --> Int) { return 42 }; say foo(1,2);
12:47 camelia rakudo-moar ad63cd: OUTPUT«42␤»
12:47 Skarsnik wait?
12:47 Skarsnik it that the version distribued in Rakudo Star?
12:48 sortiz Yes, double checking...
12:48 ilmari star: sub foo($a, $b --> Int) { return 42 }; say foo(1,2);
12:48 camelia star-m 2015.09: OUTPUT«42␤»
12:48 Skarsnik because that mean DBIish probably does not work on R* x)
12:50 rurban joined #perl6
12:50 dalek rakudo/nom: bff360e | lizmat++ | src/core/Str.pm:
12:50 dalek rakudo/nom: Make an obviously private method private
12:50 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/bff360e880
12:50 sortiz No the version shipped with R*, is a previous RC1, and the error is somewhat different, need to dig deeper...
12:54 Skarsnik m: sub foo(&(Int)) {*};
12:54 camelia rakudo-moar d94ae3: OUTPUT«5===SORRY!5=== Error while compiling /tmp/XUK_LAzrjm␤Shape declaration with () is reserved;␤  please use whitespace if you meant a subsignature for unpacking,␤  or use the :() form if you meant to add signature info to the function's type␤at /t…»
13:02 apiw joined #perl6
13:06 sufrostico joined #perl6
13:18 rudi_s_ Hi. Is it guaranteed that start() runs in a separate thread? I want to spawn multiple external programs in parallel and collect the results.
13:18 rudi_s_ (Btw. is there a way to specificy a timeout to await which kills the spawned promisses.)
13:19 jnthn Proc::Async is better suited than using start and syncronous process spawning.
13:20 rudi_s_ The release notes mention that Async I/O is not supported yet. Does this already work?
13:20 Peter_WR jnthn, without that I'm guessing you could reach deadlock until an external process finsihes?
13:21 jnthn rudi_s_: Yeah, Proc::Async has been around for a while. IO::Socket::Async also. It's mostly async file I/O that's missing by now.
13:21 jnthn Peter_WR: You'd end up blocking an OS thread from the thread pool, and if you do that to the whole pool then yeah, you can deadlock
13:22 rudi_s_ jnthn: Ah, nice. - Could you point me to an example/docs which spawns multiple processes? - Can I wait with a timeout?
13:22 vytas joined #perl6
13:22 dalek nqp: 2dd1099 | (Pawel Murias)++ | t/nqp/37-slurpy.t:
13:22 dalek nqp: Test empty slurpy parameters work correctly.
13:22 dalek nqp: review: https://github.com/perl6/nqp/commit/2dd1099c5a
13:22 dalek nqp: 1a8567e | (Pawel Murias)++ | src/vm/js/ (3 files):
13:22 dalek nqp: [js] Support passing null as the named arguments when there are none.
13:22 dalek nqp: review: https://github.com/perl6/nqp/commit/1a8567e660
13:22 dalek nqp: 56f5d83 | (Pawel Murias)++ | src/vm/js/ (2 files):
13:22 dalek nqp: [js] Use null for empty named arguments in regexes and immediate block calls.
13:22 dalek nqp: review: https://github.com/perl6/nqp/commit/56f5d83dac
13:23 jnthn rudi_s_: Well, Proc::Async itself is documented at http://doc.perl6.org/type/Proc::Async
13:23 jnthn You get a Promise from each process, so you'd just start them off and then await the bunch of them
13:24 jnthn On timeout - use Promise.in($seconds) in a Promise.any combinator
13:24 jnthn uh, anyof
13:24 rudi_s_ Hm. One more thing. I don't want to just run an external program asynchronously. Actually I want to run the same sub (which spawns external background processes) with multiple parameters in parallel.
13:24 jnthn Promise.anyof($the-process-exists, Promise.in(10)) # a Promise that completes when the process exists, or 10 seconds have elapsed, whichever is sooner
13:25 rudi_s_ That's why I though of start { .. } because I thought I can run arbitrary perl code in parallel that way.
13:25 jnthn Ah, yes, you can
13:26 jnthn But I think you'll still find it a bit easier to manage timeouts and stuff with Proc::Async
13:26 moritz also I don't think a Proc will be killed if its start block runs into a timeout
13:27 rudi_s_ Hm. Basically I have sub { ...; run 'program', 'arg1', 'arg2'; ... ; run 'program2', 'arg1', 'arg2', ..; ... } and I want to call that sub many times in parallel.
13:27 rudi_s_ *and collect the result.
13:28 rudi_s_ Each sub run is independent from the other and doesn't need to share any data.
13:32 perlpilot joined #perl6
13:47 apiw joined #perl6
13:52 mattn_jp joined #perl6
13:52 pmurias anyone here had any luck with profiling node.js apps?
13:53 mspo pmurias: you mean like http://www.brendangregg.com/blog/2014-​09-17/node-flame-graphs-on-linux.html ?
13:56 pmurias mspo: will try that
13:57 pmurias I'm trying to figure why nqp-js is really slow for some things despite being fast for others
13:57 * [Coke] hopes lizmat loved Deadpool
13:57 pmurias for some silly benchmarks it's 10x faster then nqp-js for others it's 10x slower
14:00 jnthn pmurias: Um, faster/slower than itself? :)
14:02 apiw joined #perl6
14:03 sortiz Somebody can explain me why the constructor of Pointer in https://github.com/rakudo/rakudo/bl​ob/nom/lib/NativeCall/Types.pm6#L23 boxes to ::?CLASS and not to a created self?
14:03 mattn_jp joined #perl6
14:06 cdg joined #perl6
14:07 pmurias jnthn: than nqp-m ;)
14:09 FROGGS m: use NativeCall; class Foo is repr<CStruct> { has CArray[int32] $.bar[32] }; # jnthn: how much effort would it be to make that work?
14:09 camelia rakudo-moar bff360: OUTPUT«5===SORRY!5=== Error while compiling /tmp/uzdNedBoIM␤The [] shape syntax with the $ sigil is reserved␤at /tmp/uzdNedBoIM:1␤------> 3pr<CStruct> { has CArray[int32] $.bar[327⏏5] }; # jnthn: how much effort would it b␤    expecting any of:…»
14:10 pmurias it's 10x faster for recursively calculating fibonacii numbers and >5x slower for parsing json
14:10 jnthn m: use NativeCall; class Foo is repr<CStruct> { has int32 @.bar[32] is CArray; }
14:10 camelia rakudo-moar bff360: ( no output )
14:10 pmurias jnthn: parsing json is generally more useful so I'm trying to optimize things a bit ;)
14:10 jnthn FROGGS: Let's make that one work :)
14:11 FROGGS ohh
14:11 FROGGS m: use NativeCall; class Foo is repr<CStruct> { has int32 @.bar[32] is CArray; } say Foo.new.bar
14:11 camelia rakudo-moar bff360: OUTPUT«5===SORRY!5=== Error while compiling /tmp/AVdTk_y1Op␤Strange text after block (missing semicolon or comma?)␤at /tmp/AVdTk_y1Op:1␤------> 3ruct> { has int32 @.bar[32] is CArray; }7⏏5 say Foo.new.bar␤    expecting any of:␤        infix␤…»
14:11 FROGGS m: use NativeCall; class Foo is repr<CStruct> { has int32 @.bar[32] is CArray; }; say Foo.new.bar
14:11 camelia rakudo-moar bff360: OUTPUT«NativeCall::Types::CArray[int32].new␤»
14:11 FROGGS m: use NativeCall; class Foo is repr<CStruct> { has int32 @.bar[32] is CArray; }; say nativesizeof(Foo.new)
14:11 camelia rakudo-moar bff360: OUTPUT«8␤»
14:12 jnthn HAS if you wanted it inlined?
14:12 FROGGS true
14:12 FROGGS m: use NativeCall; class Foo is repr<CStruct> { HAS int32 @.bar[32] is CArray; }; say nativesizeof(Foo.new)
14:12 camelia rakudo-moar bff360: OUTPUT«8␤»
14:12 jnthn But I don't think it actually pays any attention to the shape yet
14:12 jnthn That is, CArray's constructor needs to learn the shape parameter
14:12 FROGGS jnthn: I should start looking at the repr compose protocol?
14:13 jnthn More at how native shaped arrays work
14:13 jnthn Oh, but...hmm...if you want to inline it, then you kinda need to know the size more "statically" I guess
14:14 Perleone left #perl6
14:18 RabidGravy joined #perl6
14:18 sortiz Forget my question, I understand now. :)
14:19 vendethiel joined #perl6
14:22 Skarsnik can we build a Pointer with just the address?
14:23 kaare_ joined #perl6
14:23 sortiz Skarsnik, yes.
14:24 skids joined #perl6
14:27 Skarsnik Good, I have a dumb xml lib that use weird stuff to allow to explore the tree, but I want to use the the child and last child pointer in the node struct, because I am pretty sure it's just an array starting at child and ending at last child x)
14:27 sortiz Be careful ;)
14:32 Skarsnik at least the binding is generated x)
14:42 FROGGS m: my @foo[42] # jnthn does that "postfix" boil down to a trait call?
14:42 camelia rakudo-moar bff360: ( no output )
14:44 FROGGS probably not, hmmm....
14:44 Begi joined #perl6
14:48 flussence this is interesting... if I open a repl and `lsof` it, it has *six* filehandles open to /dev/tty.
14:48 lizmat [Coke]: yeah, felt a bit like X-Men meets Hancock meets Pulp Fiction
14:50 apiw joined #perl6
14:51 flussence in fact, every other program uses /dev/pts/* for stdio, not /dev/tty...
14:52 FROGGS ahh, it is actually a shape definition... looking at in in the grammar
14:56 Skarsnik m: enum Foo (LOL => 0, BAR => 0, BAZ => Int)
14:56 camelia rakudo-moar bff360: OUTPUT«===SORRY!===␤Cannot change the type of a type object␤»
14:56 Skarsnik Interesting
14:57 Skarsnik Can't have an undef value for an enum key I guess
14:58 lizmat hmmm... interesting, feels to me you should be able to do that
14:59 Begi please, i do not understand my error : i'm using bailador for a little application : http://pastebin.com/bqVPyXUx
14:59 Skarsnik Begi, what is line 44?
15:00 Begi line 11 in the pastebin
15:00 shicheng joined #perl6
15:00 FROGGS Begi: typo in like 14
15:00 FROGGS Begi: should be >=, not =
15:00 FROGGS err, =>
15:00 Begi Oh, I'm so stupid...
15:00 FROGGS no :o)
15:00 Begi Thanks !
15:00 geekosaur LTA
15:01 FROGGS geekosaur: why?
15:01 Skarsnik FROGGS, callback in cstruct does not work for now?
15:01 FROGGS Skarsnik: in an attribute slot?
15:01 Skarsnik Yes
15:01 FROGGS Skarsnik: not yet
15:01 Skarsnik Ok, so I should not generate them
15:01 FROGGS Skarsnik: but I'd love to implement it, together with somebody
15:02 Skarsnik I work on gptrixie x)
15:03 geekosaur just seems to me like if it's seen a list of Pair-s and then a = where a => would be expected, it could at least warn about it
15:03 RabidGravy Ah finally ridded the "Missing serialize REPR function for REPR VMException" from H::UA - it was the "try require IO::Socket::SSL" in the mainline of the class
15:03 M-eternaleye joined #perl6
15:03 RabidGravy move it into the get-connection() method and it's all good
15:03 geekosaur possibly disabled by default and you can turn it on when you get an unexpected runtime error like that
15:03 FROGGS RabidGravy: ohh wow
15:05 RabidGravy FROGGS, strangely it was you who put it there in the first place :)  a year and a half ago
15:05 FROGGS RabidGravy: I know :o)
15:05 FROGGS and it worked for a long time
15:05 rindolf joined #perl6
15:07 RabidGravy yeah it's odd, somehow it's leaking the Failure on pre-compilation
15:08 FROGGS probably because require got fixed to expose $!?
15:08 RabidGravy aye
15:09 dalek rakudo/nom: 73114b5 | ugexe++ | src/core/CompUnit/Repository/Installation.pm:
15:09 dalek rakudo/nom: Fix uninstall
15:09 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/73114b51f2
15:09 dalek rakudo/nom: 8798a2e | niner++ | src/core/CompUnit/Repository/Installation.pm:
15:09 dalek rakudo/nom: Merge pull request #713 from ugexe/patch-2
15:09 dalek rakudo/nom:
15:09 dalek rakudo/nom: Fix uninstall
15:09 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/8798a2e808
15:12 RabidGravy It had been bugging me for a while but in the last couple of days it was actually causing an install fail in any module that used it
15:12 M-matthew joined #perl6
15:12 M-Illandan joined #perl6
15:14 lizmat so, should we revert the require patch?  or do we have some other way around it ?
15:15 Skarsnik Oh that not fun
15:16 Skarsnik class Foo is repr<CStruct> { has Pointer[Foo] $stuff;} does not work
15:16 moritz Skarsnik: are you aware that "has Foo $stuff" would already one level of pointering?
15:16 Skarsnik that does not work
15:16 Skarsnik when I try it
15:16 moritz structs aren't inlined, unless you use HAS instead of has
15:16 xenu joined #perl6
15:17 Skarsnik I try using that once, but it did not work
15:17 moritz this sounds all rather fluffy
15:18 Skarsnik but even. this should probably work x)
15:18 * RabidGravy re-tests all of his modules
15:18 rurban left #perl6
15:20 sortiz Skarsnik, in that case (the **foo) try with  ".. is repr<CStruct> is Any { ..."
15:21 Skarsnik this cause https://github.com/rakudo/rakudo/bl​ob/nom/lib/NativeCall/Types.pm6#L56 to fail Cannot call infix:<===>(MiniXML::Raw::mxml_node_t, Str); none of these signatures match:
15:21 rudi_s_ I'll try it again. Basically I have sub { ...; run 'program', 'arg1', 'arg2'; ... ; run 'program2', 'arg1', 'arg2', ..; ... } and I want to call that sub many times in parallel with timeout and ctrl-c should terminate the running programs. The subs are independent from each other. Any idea how to do that?
15:21 FROGGS class Foo is repr<CStruct> { has Foo $stuff; } really should already work
15:21 Skarsnik sortiz, it's not a **foo, it's just a *foo
15:21 sortiz So, try as FROGGS said
15:22 moritz rudi_s_: use Proc::Async; for each one you start, you set a timeout
15:22 kurahaupo joined #perl6
15:22 moritz rudi_s_: and then you can have SIGINT handler that kills all the processes and exits
15:23 Skarsnik I am generating NC stuff. not really using it btw x)
15:24 FROGGS bbl
15:24 sortiz 8-)
15:27 p6newbee joined #perl6
15:27 Skarsnik hm, it worked this time
15:28 Skarsnik still it should be possible to parameterize a Pointer with the type he is inside
15:28 Skarsnik It probably fail because at compile time the type is imcomplete
15:30 Woodi hi #perl6 :)
15:30 Kitt3n joined #perl6
15:31 Woodi pmurias: had problems installing nqp-js: pm http 404 https://registry.npmjs.org/nqp-runtime-node
15:32 ar_ joined #perl6
15:32 sortiz Skarsnik, it works, see for example my own code: https://github.com/salortiz/p6-LM​DB/blob/master/lib/LMDB.pm6#L307
15:32 sortiz But note the "is Any" in the class declaration.
15:33 rudi_s_ moritz: But I want a timeout for the sub, not each run in the sub.
15:33 Skarsnik I am not sure if just doing has Foo is better than Pointer[Foo]. You lost the possibility to play with the address
15:33 Skarsnik In my context
15:33 dalek rakudo/nom: 907e8ff | lizmat++ | src/core/Str.pm:
15:33 dalek rakudo/nom: Some more LSM optimizations
15:33 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/907e8ffb6d
15:34 timotimo Juerd: how do you feel about adding :m (:samemark) to the atbash cipher solution and drop some additional jaws
15:35 sortiz In my bindings I need both, but that depends of the API!
15:35 moritz timotimo: isn't :m ignoremark and :mm samemark?
15:35 Skarsnik my context is generating NC code from the header
15:36 Skarsnik I try to go for the most generic solution
15:37 squach joined #perl6
15:39 Skarsnik lol the is Any fix the error
15:39 Juerd timotimo: I tried :mm but things went weird and I really needed to get some sleep.
15:40 ribasushi joined #perl6
15:41 squach1 joined #perl6
15:41 sortiz Skarsnik, I already went through there... :)
15:42 Skarsnik this *** annoy me when I added the sanity check for native sub signature
15:43 brrt joined #perl6
15:47 lostinfog joined #perl6
15:47 Juerd timotimo: I can't look into it now either, but IIRC adding :mm made :ii only work on the first match.
15:47 wamba joined #perl6
15:50 timotimo lizmat: when you changed CALLERS:: to nqp::getlexcaller, could it be that causes trouble, as CALLERS goes through all callers in the call chain and uses the first one it finds?
15:51 lizmat well, as far as I can see, all methods take their $/ from their immediate caller
15:51 brrt fwiw i was wrong about Match ~~ Stringu
15:51 lizmat timotimo: even the proto does that for one method
15:51 lizmat so, I don't see why the heavy handed CALLERS:: was needed
15:52 lizmat fwiw, no spectests failed
15:52 lizmat timotimo: so no, I don't think this causes trouble
15:53 lizmat timotimo: do you have counterindications ?
15:54 rudi_s_ moritz: Any idea?
15:57 timotimo lizmat: no idea
15:57 dalek rakudo/nom: ba22b31 | lizmat++ | src/Perl6/Actions.nqp:
15:57 dalek rakudo/nom: Make enum fail with a NYI error
15:57 dalek rakudo/nom:
15:57 dalek rakudo/nom: The enum handling tries to rebless the value to the enum.  Clearly,
15:57 dalek rakudo/nom: one cannot rebless a type object into something else.  Now, whether
15:57 dalek rakudo/nom: it should be possible to have a type object as the value of an enum
15:57 dalek rakudo/nom: I'm letting open for now by making it a NYI error.
15:57 dalek rakudo/nom:
15:57 dalek rakudo/nom: Skarsnik++ for spotting
15:57 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/ba22b318bb
15:58 timotimo Juerd: that sounds like a nice bugreport waiting to happen :)
15:59 RabidGravy trying to work out how to fix Panda::Builder
15:59 timotimo lizmat: sounds good to me, then :)
16:01 Skarsnik Oh I can't write constant FOO is export = &hello;
16:02 Skarsnik I think it try to put the is export on the right
16:03 apiw joined #perl6
16:05 Skarsnik m: sub foo() {say "hello"}; constant FOO is export = &foo;
16:05 camelia rakudo-moar 907e8f: OUTPUT«5===SORRY!5=== Error while compiling /tmp/oDz6Ev99DF␤Can't use unknown trait 'is export' in a sub declaration.␤at /tmp/oDz6Ev99DF:1␤    expecting any of:␤        rw raw hidden-from-backtrace hidden-from-USAGE␤        pure default DEPRECATED i…»
16:08 timotimo lizmat, [Coke], i'm also going to see Deadpool tonight :)
16:09 Skarsnik it's a nice movie :)
16:09 Skarsnik not very familly friendly x)
16:09 timotimo of course not
16:09 timotimo you aren't to expect that from a deadpoolmovie
16:09 timotimo case in point: #touchyourselftonight
16:14 M-eternaleye joined #perl6
16:21 khw joined #perl6
16:23 kid51 joined #perl6
16:26 RabidGravy right, that panda 'Build.pm' infelicity doesn't happen with --notests
16:31 M-eternaleye joined #perl6
16:34 pmurias joined #perl6
16:34 pmurias Woodi: what is your node version?
16:34 vendethiel joined #perl6
16:35 pmurias Woodi: what are you installing?
16:35 tony-o_ is anyone taking over XML::Query or working on anything like it?
16:35 pmurias Woodi: nqp-runtie-node was a part of very old nqp-js
16:39 CIAvash joined #perl6
16:40 M-matthew joined #perl6
16:40 M-Illandan joined #perl6
16:42 RabidGravy tony-o_, I got as far as making a repository for an XML::XPath ;-)
16:48 nemo btw.. in the topic... what does »ö«  do?
16:48 nemo besides looking like a tie fighter
16:48 nemo hm. I guess |o|  is a better tie fighter
16:49 perlpilot nemo: nothing. it's a unicode-y version of Camelia
16:49 timotimo »ö« is camelia
16:49 timotimo yeah
16:49 RabidGravy It's a unicode art camelia
16:49 * nemo searches for camelia
16:49 nemo ohh
16:49 perlpilot nemo: got to perl6.org
16:49 nemo duh
16:49 timotimo perl6.org has camelia on the front page
16:49 perlpilot s/got/go/
16:49 nemo heh. I didn't know her name
16:50 ilmari ooh, Unicode 9.0 will have a butterfly emoji
16:50 ilmari http://unicode.org/emoji/chart​s/emoji-candidates.html#1f98b
16:51 nemo indeedy
16:51 nemo ilmari: I don't have it in my Symbola set tho
16:52 ilmari well, unicode 9.0 isn't final yet
16:53 * jnthn wonders how hard upgrading to Unicode 9 will be...
16:53 ilmari symbola (the version in debian unstable) only covers up to 7.0
16:53 nemo ilmari: now you guys have to convince a few common FOSS fonts to make the that codepoint look a little like your mascot ☺
16:53 jnthn 7 -> 8 was dead easy
16:53 nemo ilmari: perhaps submit a patch w/ the vector all ready for inclusion
16:53 timotimo camelia is trademarked, though
16:53 nemo timotimo: a little like!
16:53 timotimo not sure we want it to just be in a FOSS font?
16:53 nemo not exactly
16:53 timotimo worst case we'd have to sue or we'll lose the trademark
16:53 nemo could maybe drop the top of the 6
16:54 nemo Ƹ̵̡Ӝ̵̨̄Ʒ
16:55 nemo some butterfly someone else made
16:55 timotimo not bad
16:55 TimToady pity the wings are on upside-down
16:56 nemo maybe the butterfly is flying downwards
16:56 perlpilot then its eyes are in the wrong place
16:58 apiw joined #perl6
17:02 hoelzro nine: can we?
17:02 yoleaux 08:19Z <nine> hoelzro: if only we could resume those X::Syntax::Missing exceptions...
17:02 gensym joined #perl6
17:02 hoelzro I'm not sure if that's a suggestion, or a nice-to-have
17:02 hoelzro because that would be great
17:03 gensym joined #perl6
17:04 vendethiel joined #perl6
17:05 FROGGS joined #perl6
17:05 zakharyas joined #perl6
17:06 jnthn In theory, though you'd have to put something *after* them in the grammar that to say what to do on resumption.
17:06 jnthn And I'm not sure how robust it'll be
17:06 sortiz hoelzro, Was of any use my idea about the die in FAILGOAL?
17:07 hoelzro sortiz: I haven't done anything with it yet, sorry
17:07 hoelzro jnthn: I would think that at the very least you would need to have parse() understand how to get more input; otherwise, it would just parse the same string, right?
17:08 sortiz hoelzro, Don't worry.
17:08 jnthn hoelzro: That also
17:09 nemo hm. just to keep up w/ the »ö« digression.  someone should invent an operator to go along w/ »+« just for that.  ummm if »+« is elementwise add then »ö« could be. um..
17:10 nemo er. run set A members as callbacks against set B members as operators? I dunno ☺
17:10 xenu back in the days, undefined behaviour in gcc would result in launching nethack
17:10 xenu this operator could do something similar ;)
17:10 nemo serious? that's awesome
17:11 nemo xenu: funny tho. got into an argument w/ rust folks after stating we had every intention of using undefined behaviour in an unsafe if we ported our game to rust
17:11 tony-o_ RabidGravy: that's further than I've gotten
17:11 nemo xenu: would be not cool if rust launched a new game inside our game just 'cause of our AI code
17:11 xenu nemo: http://feross.org/gcc-ownage/
17:12 geekosaur just #pragma, iirc
17:12 nemo that's hilarious
17:12 RabidGravy :)
17:13 geekosaur (which was't very, er, pragmatic of them...)
17:13 xenu it wouldn't fly today
17:13 xenu too many people would be pissed off
17:14 nemo geekosaur: hehe.  and. yeah. I'm counting on the rust folks not being malicious and actually firing off nasal demons just 'cause we choose to access an array between threads w/o locking
17:18 sufrostico joined #perl6
17:21 SCHAAP137 joined #perl6
17:22 ZoffixW joined #perl6
17:23 dalek doc: dacf38f | (David Brunton)++ | doc/Type/Supply.pod:
17:23 dalek doc: Wait for it...
17:23 dalek doc:
17:23 dalek doc: Supply.wait blocks until Supplier is done.
17:23 dalek doc: review: https://github.com/perl6/doc/commit/dacf38f9fb
17:23 dalek doc: 976fa40 | (Zoffix Znet)++ | doc/Type/Supply.pod:
17:23 dalek doc: Merge pull request #398 from dbrunton/patch-10
17:23 dalek doc:
17:23 dalek doc: Wait for it...
17:23 dalek doc: review: https://github.com/perl6/doc/commit/976fa401fd
17:24 ZoffixW May I suggest to the powers that be to add dbrunton to the perl6 GitHub organization so they could push commits directly without having to create a PR each time? They've submitted quite a bit of quality changes: https://github.com/perl6/doc/commits/master
17:28 moritz ZoffixW: sure, willdo
17:29 ZoffixW Thanks!
17:29 moritz actually, I sent an invitation already
17:29 moritz they just need to accept :-)
17:29 vendethiel joined #perl6
17:32 rudi_s_ moritz: Any idea how to get a timeout for the complete sub?
17:34 moritz rudi_s_: Promise.anyof(start yourcall, Promise.in(5)) # 5s timeout
17:34 rudi_s_ moritz: Will that kill the process running with Proc::Async in the sub?
17:34 rudi_s_ (If the timeout triggers.)
17:34 moritz rudi_s_: I don't think so
17:34 jnthn No
17:34 rudi_s_ How can I do that?
17:35 moritz rudi_s_: by doing the timeout inside the sub
17:35 jnthn That or by passing the sub a cancellation Promise that it can poll, and keeping that Promise if you want to cancel.
17:35 moritz rudi_s_: Promise.in(5).then({ $proc.kill })
17:37 rudi_s_ moritz: But the 5 is still local to process. I'd like a global time for the whole sub.
17:37 rudi_s_ jnthn: How could I do that combined with killing the process?
17:37 moritz rudi_s_: you can start that promise as the first thing you do in the sub, and kill all the processes you might start in there
17:39 rudi_s_ moritz: I'm sorry, I don't understand how that would work. - Could you give me an example? I know my questions sound a little stupid, but I've no idea how to combine the places into a working solution.
17:39 rudi_s_ s/places/peaces/
17:40 * jnthn is a bit tied up with $dayjob and a headache to write something up for it right now...
17:40 moritz rudi_s_: I can try to come up with something basic
17:40 jnthn rudi_s_: Is the problem basically that you want to launch a bunch of processes in a sub, and have the whole lot time out?
17:40 jnthn Do you launch them one at a time, or all together?
17:40 Woodi pmurias: damn :)  something from default Mint distro, maybe "stable". need to learn it a bit
17:41 rhr joined #perl6
17:41 rudi_s_ jnthn: Yeah. One after another. I have to do some stuff between.
17:41 rudi_s_ Don't worry, thanks for your help.
17:42 RabidGravy I'm really struggling with the "require" changes
17:43 RabidGravy It's broken half a dozen of my modules
17:43 rudi_s_ (Oh, and I'd like to support Ctrl-C to kill everthing too. But I think that's easy when I have a promise which is somehow used to kill the processes.)
17:45 moritz rudi_s_: I thought something along of these lines: http://perlpunks.de/paste/show/56c36015.18c1.db
17:47 TreyHarris joined #perl6
17:48 edehont joined #perl6
17:49 yqt joined #perl6
17:51 lizmat rudi_s_: signals are exposed as a Supply
17:53 rudi_s_ moritz: Hm. How do I start the programs? I added :w to grep, and tried $second-proc.stdout.tap(-> $v { say $v }); and await $first-proc.start, $second-proc.start; but that doesn't work and just waits for 5 seconds.
17:54 moritz rudi_s_: if you have something that reads from STDIN, you need to call .close-stdin
17:55 moritz and grep does that in the example
17:55 rudi_s_ moritz: How do I do that? How do I know that all input was passed to grep?
17:55 rudi_s_ Shouldn't the cat propagate that?
17:56 moritz rudi_s_: well, when the cat's .start promise is fulfilled, you know that it won't produce any more output
17:56 RabidGravy This https://github.com/jonathanstowe/Oy​atul/blob/master/lib/Oyatul.pm#L608 is broken by the "require" changes - changing that to do the require in an EVAL fixes
17:56 RabidGravy but why
17:56 rudi_s_ But anyway, my problem is not passing data between processes. I just want to run process A, wait for it to terminate, then do something in between, then start process B, then wait. And all that with a complete timeout.
17:57 moritz rudi_s_: but that's what the Promise.in($timeout).then gives you
17:58 rudi_s_ moritz: How? I tried it like this: https://pbot.rmdir.de/PTIKbArCH_MCyiGG03C1Nw
17:59 rudi_s_ Ah, that seems to work.
17:59 rudi_s_ Sorry. I thought it took longer.
17:59 iH2O joined #perl6
17:59 rudi_s_ Nice. That seems to work.
17:59 Skarsnik RabidGravy, look bad if you need to put in EVAL x)
18:00 iH2O I installed rakudo star 2016.01 and it works fine, except for the man page that didn't install. I cannot locate it
18:00 rudi_s_ moritz: Can I combine that with an external promise which is triggered by sigint? Would Promise.anyof($from_signal, Promise.in(...)) work?
18:00 moritz rudi_s_: sure
18:00 iH2O on linux
18:02 RabidGravy Skarsnik, it is bad but I can't work out what has changed in require so I can fix it properly
18:02 Skarsnik iH2O, I don't think we install any man page x)
18:02 firstdayonthejob joined #perl6
18:03 moritz we should, though
18:03 moritz we had a pod2man for docs/running.pod in Makefile
18:05 * [Coke] tries to get to the bottom of the hanging daily rakudo or nqp tests.
18:09 iH2O Skarsnik: but when I type perl6 --help the compiler tells me to check the manual page for details. so i suppose the details are in a synopsis
18:09 iH2O and I should look there
18:09 iH2O maybe then the compiler should tell me to check the synopsis instead of the man page
18:10 rudi_s_ moritz: Thanks. - My original problem was to run that sub multiple times in parallel while still supporting ctrl-c/timeout. How could I start this function in parallel? Would just using start { .. } and then await for all the subs work?
18:10 moritz no, it just installt that darned man page
18:10 iH2O cant find it
18:10 moritz rudi_s_: yes
18:10 moritz iH2O: I mean, it should. It's a bug that it doesn't
18:11 moritz iH2O: it should be generated from doc/running.pod or something similar in the rakudo repo
18:11 Psyche^ joined #perl6
18:11 iH2O I got no error message
18:14 musiKk joined #perl6
18:14 jnthn rudi_s_: https://gist.github.com/jnthn/e1f8e086dd4d6387cce3
18:14 moritz iH2O: I didn't say you should
18:14 jnthn The "can I close the calculator twice in 5 seconds" challenge :)
18:15 iH2O I'd feel better with an error message
18:15 iH2O :)
18:17 [BNC]WizJin joined #perl6
18:24 ely-se joined #perl6
18:24 jnthn dinner &
18:24 isBEKaml joined #perl6
18:29 shicheng joined #perl6
18:35 rudi_s_ moritz: Hm. That doesn't work. I tried this minimal example: https://pbot.rmdir.de/uzlWzTUPBGtZiWu-HDQBTw <- it doesn't terminate and doesn't spawn more than a few sleep 3s.
18:35 rudi_s_ What am I doing wrong?
18:36 sufrostico joined #perl6
18:36 colomon joined #perl6
18:40 vendethiel joined #perl6
18:41 spider-mario joined #perl6
18:41 [Tux] joined #perl6
18:47 rudi_s_ jnthn: Thanks, that seems to work (haven't tested it when I want to run it more than once, see above). But that feels really ugly. I want to pass data between the calls and now I have to press that into the structure of @tasks, when normally I could just write the code like in any other program.
18:49 FROGGS[mobile] joined #perl6
18:51 mohae joined #perl6
18:51 dalek doc: 438f3f5 | (David Brunton)++ | doc/Type/Supply.pod:
18:51 dalek doc: replace Supply.new in grep and map
18:51 dalek doc:
18:51 dalek doc: Also, emit() is called on a Supplier rather than Supply.
18:51 dalek doc: review: https://github.com/perl6/doc/commit/438f3f5772
18:51 dalek doc: aa656c6 | RabidGravy++ | doc/Type/Supply.pod:
18:51 dalek doc: Merge pull request #399 from dbrunton/patch-11
18:51 dalek doc:
18:51 dalek doc: replace Supply.new in grep and map
18:51 dalek doc: review: https://github.com/perl6/doc/commit/aa656c6a89
18:57 FROGGS[mobile] joined #perl6
18:58 FROGGS[mobile]2 joined #perl6
18:59 FROGGS[mobile]2 o/
18:59 firstdayonthejob joined #perl6
19:01 sufrostico joined #perl6
19:02 El_Che it was a good day: perl6 app packaged in docker
19:08 roguelazer joined #perl6
19:11 yqt joined #perl6
19:12 [Coke] daily test run seems to be hanging on S32-io/IO-Socket-Async.t
19:12 [Coke] on the non-jit version of moar, going against roast/master
19:14 dalek rakudo/nom: 6c44df4 | (Stefan Seifert)++ | src/core/CompUnit/Repository/Installation.pm:
19:14 dalek rakudo/nom: Correctly uninstall short name lookup entries
19:14 dalek rakudo/nom:
19:14 dalek rakudo/nom: The files in a repository's short/ directory contain the ids of distributions
19:14 dalek rakudo/nom: that provide a given short-name. When uninstalling a distribution we may not
19:14 dalek rakudo/nom: simply delete those files as other distributions may provide the same names.
19:14 dalek rakudo/nom: Instead filter the lists.
19:14 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/6c44df46f1
19:16 patrickz joined #perl6
19:17 patrickz Hi everyone!
19:17 FROGGS hi patrickz
19:18 patrickz Is there a reason for having 6.c and 6.b tags in the rakudo repository?
19:19 patrickz They are tempting when using rakudobrew because they show up at the bottom and installing 6.c isn't bad, right?
19:19 patrickz But one gets a rather unstable rakudo from around christmas when installing 6.c
19:23 FROGGS well, these tags probably just refer to the first release targeting 6.c
19:23 FROGGS dunno if it was wise tagging it that way at all
19:25 [Coke] it was not wise, and removing those tags is on the table.
19:25 patrickz *thumbs up*
19:25 [Coke] they do indicate the first release that supported that spec version.
19:25 [Coke] I leave it to jnthn to determine if removing an already pushed tag is too evil to consider. :)
19:26 buharin joined #perl6
19:29 FROGGS [Coke]: well, removing should be okay, re-pushing is problematic
19:30 patrickz How can I create a new Hash from two existing ones (merging them) in p6? (Also would it be a good idea to post/flood stackoverflow with this type of questions for publicity/FAQ building purposes?)
19:30 buharin hello
19:30 buharin I admit some connection between sort programmers
19:31 buharin C programmers want to know Perl
19:31 buharin but C++ won't
19:31 buharin why?
19:31 mspo the same reason golang didn't attract the C++ people at google, but *did* attract all of the python people
19:32 FROGGS m: my %a = a => 1; my %b = b => 2; say { |%a, |%b }
19:32 camelia rakudo-moar 6c44df: OUTPUT«-> ;; $_? is raw { #`(Block|66959728) ... }␤»
19:32 FROGGS m: my %a = a => 1; my %b = b => 2; say (|%a, |%b)
19:32 camelia rakudo-moar 6c44df: OUTPUT«(a => 1 b => 2)␤»
19:32 FROGGS m: my %a = a => 1; my %b = b => 2; say (|%a, |%b).WHAT
19:32 camelia rakudo-moar 6c44df: OUTPUT«(List)␤»
19:32 FROGGS hmmm
19:32 FROGGS m: my %a = a => 1; my %b = b => 2; say my %c = |%a, |%b
19:32 mspo buharin: rob pike has some analysis on it but, basically, if you've committed to something as big as C++, you're not going to give it up easily
19:32 camelia rakudo-moar 6c44df: OUTPUT«a => 1, b => 2␤»
19:33 FROGGS patrickz: ^^
19:33 MadcapJake m: my %a = a => 1, b => 2, c => 3; my %b = d => 4, e => 5, f => 6; my %c = %a.push: %b; say %c
19:33 camelia rakudo-moar 6c44df: OUTPUT«a => 1, b => 2, c => 3, d => 4, e => 5, f => 6␤»
19:33 mspo buharin: whereas C is a smaller language and perl 1) is easier for whipping things together and 2) has a lot of functions named the same/doing the same
19:34 buharin mspo, sure
19:34 patrickz Hey thanks for that!
19:35 buharin mspo, but anyway why C ppl hates C++
19:35 * patrickz has now also learned about tactical use of WHAT
19:36 FROGGS buharin: it is just a matter of taste... when you like how clean C is, then C++ must feel ugly
19:39 rurban joined #perl6
19:39 Skarsnik C++ make you think on a bad way IMO (you nearly always though compiler when writing c++) and it's quite the oposite of Perl 6 Moto, make it cool for the user even if it's a nightmare for the compiler
19:41 patrickz m: say %( |%a, |%b )
19:41 camelia rakudo-moar 6c44df: OUTPUT«5===SORRY!5=== Error while compiling /tmp/CLTe8DZXRl␤Variable '%a' is not declared␤at /tmp/CLTe8DZXRl:1␤------> 3say %( |7⏏5%a, |%b )␤»
19:41 shicheng joined #perl6
19:41 patrickz m: my %a = a=>1; my %b=b=>1; say %( |%a, |%b )
19:41 camelia rakudo-moar 6c44df: OUTPUT«a => 1, b => 1␤»
19:41 mspo buharin: because C is "small"
19:42 Skarsnik and the stl is no very friendly at first glance x)
19:47 perlpilot Skarsnik: at what glance does the STL seem friendly?  ;)
19:47 Skarsnik for people liking it? xD
19:48 Skarsnik Actually no idea. everything I have to use the stl I am "I don't care about how the hell it work behind, I want to simply add something to my hash"
19:48 Skarsnik *everytime
19:48 Skarsnik that why all my C++ dev is with Qt x)
19:50 buharin Skarsnik, did you try Java?
19:51 wamba joined #perl6
19:52 Skarsnik Java does not fit the "work on os X/Win32/Unix" when I do this type of dev
19:53 hankache joined #perl6
19:53 geekosaur "write once, debug everywhere"
19:53 buharin Skarsnik, what about D?
19:53 patrickz Wasn't that the Qt slogan?
19:53 hankache hola #perl6
19:54 Skarsnik It's more about Qt, than C++ actually.
19:55 buharin hankache, we currently talking about perl6 in face of another programming languages
19:56 hankache aha ok
19:56 hankache buharin i was just saying hi :)
19:57 hello joined #perl6
19:59 rurban joined #perl6
20:05 TEttinger joined #perl6
20:11 ELBeavers_ joined #perl6
20:11 _dolmen_ joined #perl6
20:24 dalek doc: dbee887 | (Wenzel P. P. Peppmeyer)++ | doc/Language/list.pod:
20:24 dalek doc: better heading, fix link, move to a better place
20:24 dalek doc: review: https://github.com/perl6/doc/commit/dbee887f27
20:27 musiKk joined #perl6
20:29 eyck joined #perl6
20:33 remmie joined #perl6
20:38 MadcapJake how could i implement the class/static attribute pattern?
20:40 jnthn MadcapJake: Just with lexicals inside the class; if you want to give them accessors then `my $.foo` works
20:40 MadcapJake oh the dot works, eh? didn't think it would work outside of `has`
20:41 jnthn [Coke]: +1 to removing the misleading tags
20:41 jnthn (And I agree, it's moving existing tags to new commits that is the bad practice)
20:42 MadcapJake jnthn, is there any way to prevent it from propagating into instances of the class?
20:42 timotimo sadly, deadpool was sold out and we didn't get any ticket ;(
20:43 jnthn MadcapJake: Not short of writing the accessors yourself and constraining them with :U on the invocant
20:43 jnthn timotimo: aww
20:43 timotimo oh well
20:45 MadcapJake hmm, not sure that propagating will be a problem actually, only difficult in testing :P
20:46 jnthn Just make two instances and check modifying it "affects" both :)
20:51 kurahaupo joined #perl6
21:02 _ramix_ joined #perl6
21:04 [Sno] joined #perl6
21:04 revhippie joined #perl6
21:15 cdg joined #perl6
21:28 colomon joined #perl6
21:29 timotimo hurm.
21:30 timotimo i deleted the .rrd files from /var/lib/collectd, and they are now no longer working in the web interface ... but for some reason the link to the plugin that contains the images is still there
21:31 timotimo will that update itself at some point, i wonder?
21:32 timotimo there's not really a daemon that runs for collectd-web, it's just some CGI stuff :|
21:32 timotimo collectd-web ... "use CGI" ;_;
21:35 timotimo where does it get the data from? i haven't a clue :|
21:35 moritz run strace on it?
21:36 espadrine joined #perl6
21:36 moritz you can call CGI scripts on the command line (usually)
21:37 atweiden joined #perl6
21:37 timotimo oh hey it no longer shows two brken img tags
21:41 timotimo it's gone now!
21:41 timotimo obviously time heals all wounds
21:48 moritz even digital ones; good to know
21:55 espadrine joined #perl6
21:56 timotimo well, that was a collossal waste of time :)
22:01 sno joined #perl6
22:04 MadcapJake how could i figure out if a method is being called from a class or an instance?
22:05 timotimo check if self is defined or not
22:05 moritz MadcapJake: if self.defined { }
22:06 moritz or you could have two multi candiates, one with :D and one with :U on the invocant
22:06 moritz m: class A { multi method x(A:D:) { 'instance' }; multi method x(A:U:) { 'class' }; say A.x; say A.new.x
22:06 camelia rakudo-moar 6c44df: OUTPUT«5===SORRY!5=== Error while compiling /tmp/Qq9uhGhgJ_␤Missing block␤at /tmp/Qq9uhGhgJ_:1␤------> 3(A:U:) { 'class' }; say A.x; say A.new.x7⏏5<EOL>␤    expecting any of:␤        postfix␤        statement end␤        statement modifier…»
22:07 moritz m: class A { multi method x(A:D:) { 'instance' }; multi method x(A:U:) { 'class' }}; say A.x; say A.new.x
22:07 camelia rakudo-moar 6c44df: OUTPUT«class␤instance␤»
22:07 MadcapJake that's slick
22:11 perlpilot .oO( that's Perl 6 )
22:13 Begi joined #perl6
22:14 Ulti 2015-04-14 on JIT moarvm my tests took 10s to complete today now I've refactored my code to fit christmas so very little code change and no algorithmic change 3.5s
22:15 Ulti everyone++
22:15 Ulti 2014-08-22 they took 35 seconds
22:16 Ulti so thats an order of magnitude improvement since the profiler was released >:D
22:19 jnthn Guess now we should try for 1 more order... :)
22:19 apiw joined #perl6
22:20 TEttinger nice! I'm hopeful that perl6 can speed up more
22:24 Ulti jnthn that would win, yes >:3
22:24 Ulti though really I need to just tweak my code a bit to be less awful too
22:24 Ulti but I've just been wanting to not change this for a while to just have this mini benchmark of things I need
22:25 Ulti if my crummy code runs fast enough then my good code will be fine
22:26 El_Che Ulti: http://news.perlfoundation.org/2016/0​2/grant-proposal-perl-6-performa.html <= A RFC for a perl6 speedup grant
22:26 Ulti yeah I'm the second person who commented :)
22:27 El_Che Mine school girl giggling is still in the approve queue :)
22:27 El_Che my
22:28 Ulti put it this way the company I work for invest in FPGA to hardware accelerate the core algorithms we use... so orders of magnitude matter for the real nitty gritty of what we do but for anything else it just has to be fast enough to be sensible
22:29 MadcapJake moritz, does this seem like a good usage of class/instance multis https://gist.github.com/Madc​apJake/c74615bdad979fe4dd3a
22:29 Ulti but if I have to use a week of CPU for something thats an hour just by changing language to say even Perl 5 then its very hard to justify the choice of Perl 6 at work even if its awesome at home
22:30 Ulti yay BioInfo is back to green on Travis :) the final thing was a single place I needed append not push
22:40 vendethiel joined #perl6
22:40 * Ulti wonders if his slang JustWorks(tm) with the new REPL
22:40 Ulti because that will be utterly awesome if it does
22:41 * flussence doesn't miss the days when pod2html took an hour or two to run on a 90KB S26
22:42 Ulti well before the 35 seconds for my tests it was like >10 minutes back in the good old days of parrot :S
22:44 * lizmat would like the hours back spent watching the 5th wave
22:44 Ulti aha so my slang hijacks quoting which is something not handled in the multiline REPL yet
22:45 hoelzro Ulti: would you mind sending me a gist of the code that's not working?
22:45 hoelzro I still have more work to do on the multi line REPL it seems; not to be unexpected =)
22:45 Ulti yeah the multi line at the level of blocks is awesome though hoelzro thanks
22:46 Ulti the code was just "sfgdgdf with a return for the next line
22:47 hoelzro Ulti: which slang?
22:47 Ulti hoelzro: https://gist.github.com/Mat​tOates/95167bef3f50a5e60d5b
22:48 hoelzro so quotes break without slangs? I think sortiz pointed that out to me
22:48 Ulti hoelzro: oh the one in BioInfo it uses `` as a quoted thing to construct an object from the string https://github.com/MattOates/Bio​Info/blob/master/lib/BioInfo.pm6
22:48 Ulti yeah its just quotes in general
22:48 hoelzro ah ha
22:49 hoelzro that's definitely something people are more likely to run into than compile-time issues
22:49 Ulti all I do is create an extra type of quotes which compile to something other than a Str
22:50 Ulti annoyingly I called it a Seq which I'll have to change ;____;
22:50 Ulti I was totes there first though
22:53 pyrimidine Ulti: we both were :)
22:53 Guest1856 is there a plan to create a tk module? And can you foresee, when such a module is avaible?
22:54 pyrimidine Though I suppose mine was Bio::Seq...
22:57 RabidGravy Guest1856, I'm sure if someone feels sufficiently motivated it will happen
23:02 timotimo before i can truly deploy synopsebot, i think i have to give its code a tiny bit of love
23:03 timotimo among other things it wants to restart itself when there's no more PING messages coming in
23:04 Guest1856 thanks RabidGravy. Hopefully it will be soon. Perl6 is missing a easy to learn gui tool...
23:05 timotimo agreed, we have only GTK::Simple or Electron
23:06 timotimo and Inline::Python gives us PyQt and PySide
23:06 jnthn Not sure GTK::Simple is hard to learn? :)
23:06 jnthn If it's as simple as it claims.. ;)
23:07 timotimo it is rather simple, but it's not very advanced
23:07 jnthn True :)
23:07 cpage_ joined #perl6
23:11 Skarsnik Someone should write an fake OO generator with gptrixie x)
23:13 Skarsnik but I think someone mentionned that gtk3 as a non C Api adapted to be used with other language?
23:14 jnthn sleepy time &
23:14 Skarsnik Good night jnthn and #perl6
23:14 timotimo well, those changes don't belong in synopsebot, they belong in net::irc::bot
23:17 lizmat good night, jnthn
23:20 Guest1856 jnthn, I didn't find a goot tutorial or doc for GTK::Simple. So for me it is difficult to find an entry to this gui tool. But I am a very beginner and for other people it is not so hard
23:20 vendethiel joined #perl6
23:21 timotimo Guest1856: did you see the examples in the gtk simple repository?
23:23 MadcapJake I wish we had a simple GTK experience like pygobject.  I'd be willing to help write p6gobject with someone, but I'd need help deciphering how to do GObject Introspection :P
23:24 Guest1856 timotimo: yes, i have overseen them shortly. Perhaps I have to study them more in-depth... For me as beginner it is very difficult to learn only from examples without instruction.  Moreover I like tk very much because it is so easy
23:25 atweiden my code is raising X::Multi::NoMatch exception from this line: `$root := $root[@steps[$i]];`
23:25 atweiden any ideas as to how that might be happening?
23:27 timotimo have you printed the exception message?
23:27 timotimo it should say what method it's failing to match, i think
23:27 dalek rakudo/nom: 5d7f651 | lizmat++ | src/core/Str.pm:
23:27 dalek rakudo/nom: Another round of .trans optimizations
23:27 dalek rakudo/nom:
23:27 dalek rakudo/nom: - use natives wherever possible
23:27 dalek rakudo/nom: - inline triage_substitution since it was only called in one place
23:27 dalek rakudo/nom: - return the result from a method in LSM
23:27 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/5d7f651d5b
23:27 atweiden timotimo: X::Multi::NoMatch exception produced no message
23:27 timotimo o_O
23:27 atweiden it has to do with @a[*-0]
23:28 timotimo ah, so no postcircumfix:<[ ]> for a code object?
23:29 [particle] joined #perl6
23:29 lizmat good night, #perl6!
23:29 atweiden here `$root` is the container (`is rw`) yielded from @a[*-0] a step before
23:30 Spot___ joined #perl6
23:30 timotimo gnite lizmat!
23:30 atweiden basically @a[*-0][0] = 'x'
23:30 chansen__ joined #perl6
23:30 timotimo X::Multi::NoMatch really should be able to give a message
23:31 timotimo it potentially blew up in the .message method
23:31 timotimo could you try .message on the exception?
23:31 mindos_ joined #perl6
23:31 atweiden i tried `dd`ing it but it complained about `.perl` not being implemented
23:31 atweiden $_ is all i could do
23:31 clkao_ joined #perl6
23:31 integral_ joined #perl6
23:31 ilmari_ joined #perl6
23:31 integral_ joined #perl6
23:32 caasih_ joined #perl6
23:32 [Coke]_ joined #perl6
23:32 Woodi_ joined #perl6
23:32 mkz_ joined #perl6
23:32 apejens_ joined #perl6
23:32 Brock joined #perl6
23:33 jsimonet1 joined #perl6
23:35 nightfro` joined #perl6
23:35 sjohnsen- joined #perl6
23:35 LGD_ joined #perl6
23:36 Kitt3n joined #perl6
23:39 khagan joined #perl6
23:41 eddie2pc joined #perl6
23:41 TimToady joined #perl6
23:42 olinkl joined #perl6
23:43 vytas joined #perl6
23:43 Grauwolf joined #perl6
23:43 felher joined #perl6
23:43 mprelude_ joined #perl6
23:43 mrsolo joined #perl6
23:45 * lizmat couldn't sleep yet and benchmarked Juerd's solution to yesterday's atbash question
23:45 autarch joined #perl6
23:45 lizmat turns out .trans for the solution that Juerd gave, is now 4.5x as fast
23:45 revhippie joined #perl6
23:46 Juerd lizmat: Wow :)
23:46 advwp joined #perl6
23:47 hippie joined #perl6
23:47 BuildTheRobots joined #perl6
23:47 robinsmidsrod joined #perl6
23:47 BuildTheRobots joined #perl6
23:48 robinsmidsrod joined #perl6
23:48 avenj joined #perl6
23:48 BuildTheRobots joined #perl6
23:50 synopsebot6 joined #perl6
23:51 timotimo S99:bot
23:51 synopsebot6 Link: http://design.perl6.org/S99.html#bot
23:52 skids joined #perl6
23:54 timotimo testing testing
23:57 lizmat real sleep&
23:57 timotimo for some reason, synopsebot has 12 threads running; i didn't even know it does anything with start at all
23:58 sufrostico joined #perl6

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

Perl 6 | Reference Documentation | Rakudo