Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2013-10-04

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 TimToady r: say 1 + +
00:00 camelia rakudo 61580f: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/qlPxFjHzNiâ�¤Two terms in a rowâ�¤at /tmp/qlPxFjHzNi:1â�¤------> [32msay 1 + +[33mâ��[31m<EOL>[0mâ�¤    expecting any of:â�¤        postfixâ�¤        infix stopperâ�¤        infix or meta-infixâ�¤        prefix or ter…»
00:00 TimToady I guess it figures if there's a prefix, there must be a term there that it can't see :)
00:00 TimToady r: say 1 +
00:00 camelia rakudo 61580f: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/9fEbUlQIUZâ�¤Two terms in a rowâ�¤at /tmp/9fEbUlQIUZ:1â�¤------> [32msay 1 +[33mâ��[31m<EOL>[0mâ�¤    expecting any of:â�¤        postfixâ�¤        infix stopperâ�¤        infix or meta-infixâ�¤Â»
00:00 TimToady doesn't even need the prefix
00:01 * TimToady seems to recall this was recently rakudobugged already
00:12 Psyche^_ joined #perl6
00:26 raiph joined #perl6
00:49 japhb__ r: class X::Attribute::Required is Exception { has $.attribute; has $.class; method message() { "{$.class.^name} requires a value for attribute '{$.attribute.name.substr(2)}'" } }; multi trait_mod:<is>(Attribute:D $a, :$required!) { $a.set_build(method (|) { die X::Attribute::Required.new(:attribute($a), :class(self)) }) }; class Foo { has $.foo is required; }; Foo.new()
00:49 camelia rakudo 61580f: OUTPUT«Foo requires a value for attribute 'foo'␤  in method <anon> at /tmp/nrsmeFCfpn:1␤  in block  at src/gen/CORE.setting:871␤  in method BUILDALL at src/gen/CORE.setting:826␤  in method bless at src/gen/CORE.setting:815␤  in method new at src/gen/CORE.setting:800␤ …»
00:50 TimToady nr: $_ = 'cooper'; $_ [R~]= 'mini'; .say
00:50 camelia niecza v24-95-ga6d4c5f: OUTPUT«minicooper␤»
00:50 camelia ..rakudo 61580f: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/siLWaxuTN_�Preceding context expects a term, but found infix = instead�at /tmp/siLWaxuTN_:1�------> [32m$_ = 'cooper'; $_ [R~]=[33m�[31m 'mini'; .say[0m�»
00:50 TimToady rakudobug
00:50 japhb__ TimToady: Were you serious about wanting a trait name other than 'is required', or would that be good enough for now?
00:50 TimToady I would make a trait that long if I wanted to discourage its use :)
00:51 japhb__ I think the only serious suggestion people had that was shorter was 'is needed'
00:52 japhb__ Of course, our collective lack of imagination doesn't mean there isn't a better word out ther.
00:52 japhb__ *there
00:53 japhb__ r: class X::Attribute::Needed is Exception { has $.attribute; has $.class; method message() { "{$.class.^name} needs a value for attribute '{$.attribute.name.substr(2)}'" } }; multi trait_mod:<is>(Attribute:D $a, :$needed!) { $a.set_build(method (|) { die X::Attribute::Needed.new(:attribute($a), :class(self)) }) }; class Foo { has $.foo is needed; }; Foo.new()
00:53 camelia rakudo 61580f: OUTPUT«Foo needs a value for attribute 'foo'␤  in method <anon> at /tmp/do0tff_7YN:1␤  in block  at src/gen/CORE.setting:871␤  in method BUILDALL at src/gen/CORE.setting:826␤  in method bless at src/gen/CORE.setting:815␤  in method new at src/gen/CORE.setting:800␤  in…»
00:53 japhb__ Shortens the error message, even ...
00:54 japhb__ Although perhaps X::Attribute::Value::Needed, hmmm
00:55 japhb__ 'is needed' feels so ... wimpy?
00:55 japhb__ But it is accurate.
00:55 diakopter is want
00:55 diakopter is DOIT
00:56 japhb__ my $chocolate is want;
00:56 japhb__ is used
00:57 japhb__ is undefaulted  # Uh ... no.
00:57 diakopter is lack;
00:59 japhb__ It's too bad we can't just say 'has $.foo!'
00:59 japhb__ Because really, that has consistency with params quite nicely.
01:00 BenGoldberg r: my $foo!;
01:00 camelia rakudo 61580f: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/7fOC0Wq13_â�¤Negation metaoperator not followed by valid infixâ�¤at /tmp/7fOC0Wq13_:1â�¤------> [32mmy $foo![33mâ��[31m;[0mâ�¤    expecting any of:â�¤        scoped declaratorâ�¤        constraintâ�¤        postfixâ�¤â€¦Â»
01:01 japhb__ TimToady: Actually, why didn't you want 'has $.foo!' ?
01:01 japhb__ Too confusing in the 'has $!foo!' case?
01:01 japhb__ Because that seems not a terribly strong issue, since new() wouldn't expose that attribute.
01:02 japhb__ *default new()
01:03 diakopter or instead of has...
01:03 diakopter needs
01:04 diakopter that's kinda cutesy
01:05 diakopter requires?
01:05 diakopter demands?
01:05 diakopter lacks?
01:05 diakopter hasnt?
01:05 diakopter that's it.
01:06 diakopter hasn't Int $!foo;
01:07 japhb__ .oO( Oh, it hasn't, hasn't it? )
01:12 geekosaur "hasn't" sounds like a candidate for perl6tercal
01:19 TimToady nr: .oO(rename 'Perl 6', 'OUTERCAL')
01:19 camelia niecza v24-95-ga6d4c5f: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤â�¤Undeclared routine:â�¤     'rename' used at line 1â�¤â�¤Unhandled exception: Check failedâ�¤â�¤  at /home/p6eval/niecza/boot/lib/CORE.setting line 1502 (die @ 5) â�¤  at /home/p6eval/niecza/src/STD.pm6 line 1147 (P6.comp_unit @ 36) â�¤  a…»
01:19 camelia ..rakudo 61580f: OUTPUT«rename is disallowed in restricted setting␤  in sub restricted at src/RESTRICTED.setting:2␤  in sub rename at src/RESTRICTED.setting:12␤  in block  at /tmp/JkOENPpZWu:1␤␤»
01:19 diakopter INTRACAL
01:20 TimToady EXTERCAL
01:20 TimToady INTERSTANFORD
01:20 diakopter EXTRACAL
01:20 japhb__ CALSTANFORD
01:21 TimToady nr: $_ = 'fortnight'; s[^] = 'micro'; .say;
01:21 japhb__ Comes with a free axe head
01:21 camelia niecza v24-95-ga6d4c5f: OUTPUT«fortnight␤»
01:21 camelia ..rakudo 61580f: OUTPUT«microfortnight␤»
01:21 TimToady nieczabug
01:22 TimToady nr: $_ = 'fortnight'; s/^/micro/; .say;
01:22 camelia niecza v24-95-ga6d4c5f: OUTPUT«fortnight␤»
01:22 camelia ..rakudo 61580f: OUTPUT«microfortnight␤»
01:22 TimToady interesting
01:22 diakopter n: $_ = 'fortnight'; s[^] .= 'micro'(); .say;
01:22 camelia niecza v24-95-ga6d4c5f: OUTPUT«Potential difficulties:â�¤  Useless use of quotes at /tmp/ngAksri_b6 line 1:â�¤------> [32m$_ = 'fortnight'; s[^] .= 'micro'[33mâ��[31m(); .say;[0mâ�¤â�¤fortnightâ�¤Â»
01:23 TimToady hah
01:23 diakopter n: $_ = 'fortnight'; $_ = s[^] = 'micro'; .say;
01:23 camelia niecza v24-95-ga6d4c5f: OUTPUT«False␤»
01:23 TimToady n: $_ = 'fortnight'; $_ ~~ s[^] = 'micro'; .say;
01:23 camelia niecza v24-95-ga6d4c5f: OUTPUT«fortnight␤»
01:23 diakopter n: $_ = 'fortnight'; $_ = s[^] = '$0micro'; .say;
01:23 camelia niecza v24-95-ga6d4c5f: OUTPUT«False␤»
01:23 diakopter n: $_ = 'fortnight'; s[^] = '$0micro'; .say;
01:23 camelia niecza v24-95-ga6d4c5f: OUTPUT«fortnight␤»
01:24 TimToady n: $_ = 'fortnight'; .=subst(/^/,'micro'); .say;
01:24 camelia niecza v24-95-ga6d4c5f: OUTPUT«fortnight␤»
01:24 TimToady r: $_ = 'fortnight'; .=subst(/^/,'micro'); .say;
01:24 camelia rakudo 61580f: OUTPUT«microfortnight␤»
01:24 diakopter n: $_ = 'fortnight'; s/^/micro/; .say;
01:24 camelia niecza v24-95-ga6d4c5f: OUTPUT«fortnight␤»
01:24 TimToady r: $_ = 'fortnight'; .=subst(/^..../,'micro'); .say;
01:24 diakopter n: $_ = 'fortnight'; $_ =~ s/^/micro/; .say;
01:24 camelia rakudo 61580f: OUTPUT«micronight␤»
01:24 camelia niecza v24-95-ga6d4c5f: OUTPUT«[31m===[0mSORRY![3​1m===[0mâ�¤â�¤Unsupported use of =~ to do pattern matching; in Perl 6 please use ~~ at /tmp/A0VDhzM5Hz line 1:â�¤------> [32m$_ = 'fortnight'; $_ =~[33mâ��[31m s/^/micro/; .say;[0mâ�¤â�¤Parse failedâ�¤â�¤Â»
01:24 diakopter *facepalm*
01:24 TimToady it just fails on 0 width
01:25 diakopter n: $_ = 'fortnight'; $_ +~ s/^/micro/; .say;
01:25 camelia niecza v24-95-ga6d4c5f: OUTPUT«Unhandled exception: Cannot parse number: fortnight␤  at /home/p6eval/niecza/lib/CORE.setting line 1536 (die @ 5) ␤  at /home/p6eval/niecza/lib/CORE.setting line 3745 (ANON @ 10) ␤  at /home/p6eval/niecza/lib/CORE.setting line 3747 (NumSyntax.str2num @…»
01:25 TimToady must be testing the width as success
01:25 diakopter n: $_ = 'fortnight'; $_ ~~ s/^/micro/; .say;
01:25 camelia niecza v24-95-ga6d4c5f: OUTPUT«fortnight␤»
01:25 diakopter n: $_ = 'fortnight'; $_ ~~ s/^.*/micro/; .say;
01:25 camelia niecza v24-95-ga6d4c5f: OUTPUT«micro␤»
01:25 diakopter n: $_ = 'fortnight'; $_ ~~ s/^(.*)/$0micro/; .say;
01:25 camelia niecza v24-95-ga6d4c5f: OUTPUT«fortnightmicro␤»
01:25 TimToady r: $_ = 'fortnight'; .=subst(/^<?before ....>/,'micro'); .say;
01:25 camelia rakudo 61580f: OUTPUT«microfortnight␤»
01:25 TimToady duh
01:26 diakopter n: $_ = 'fortnight'; $_ ~~ s/^(.*)/micro$0/; .say;
01:26 camelia niecza v24-95-ga6d4c5f: OUTPUT«microfortnight␤»
01:26 TimToady n: $_ = 'fortnight'; .=subst(/^<?before ....>/,'micro'); .say;
01:26 camelia niecza v24-95-ga6d4c5f: OUTPUT«fortnight␤»
01:26 diakopter n: $_ = 'fortnight'; $_ ~~ s/^./micro$0/; .say;
01:26 camelia niecza v24-95-ga6d4c5f: OUTPUT«Use of uninitialized value in string context␤  at /home/p6eval/niecza/lib/CORE.setting line 1389 (warn @ 5) ␤  at /home/p6eval/niecza/lib/CORE.setting line 269 (Mu.Str @ 15) ␤  at <unknown> line 0 (ExitRunloop @ 0) ␤  at /tmp/IC8Hi0hxZ9 line 0 (ANON @ …»
01:26 diakopter n: $_ = 'fortnight'; s/^./micro$0/; .say;
01:26 camelia niecza v24-95-ga6d4c5f: OUTPUT«Use of uninitialized value in string context␤  at /home/p6eval/niecza/lib/CORE.setting line 1389 (warn @ 5) ␤  at /home/p6eval/niecza/lib/CORE.setting line 269 (Mu.Str @ 15) ␤  at <unknown> line 0 (ExitRunloop @ 0) ␤  at /tmp/3yeiSuMQp8 line 0 (ANON @ …»
01:26 diakopter n: $_ = 'fortnight'; s/^.*/micro$0/; .say;
01:26 camelia niecza v24-95-ga6d4c5f: OUTPUT«Use of uninitialized value in string context␤  at /home/p6eval/niecza/lib/CORE.setting line 1389 (warn @ 5) ␤  at /home/p6eval/niecza/lib/CORE.setting line 269 (Mu.Str @ 15) ␤  at <unknown> line 0 (ExitRunloop @ 0) ␤  at /tmp/v_GYeqkiLz line 0 (ANON @ …»
01:27 diakopter n: $_ = 'fortnight'; s/^(.*)/micro$0/; .say;
01:27 camelia niecza v24-95-ga6d4c5f: OUTPUT«microfortnight␤»
01:27 diakopter n: $_ = 'fortnight'; s/^(.*)/micro$0/.say;
01:27 TimToady </spam>
01:27 camelia niecza v24-95-ga6d4c5f: OUTPUT«True␤»
01:30 diakopter hey, I'm learning. again.
01:31 diakopter http://irclog.perlgeek.de/perl6/2007-08-06#i_76100
01:31 diakopter TimToady: ^
01:32 diakopter my first fuzz attempt
01:32 diakopter erm.
01:34 diakopter http://irclog.perlgeek.de/​perl6/2006-08-11#i_-188291
01:34 diakopter ^ me joining #perl6 first time I think
01:35 fridim_ joined #perl6
01:36 diakopter no, it was the day before
01:36 diakopter no
01:38 diakopter this appears to have been my first utterance http://irclog.perlgeek.de/​perl6/2006-08-08#i_-193391
01:39 TimToady wow, it's the red-letter edition...
01:39 diakopter LOLOLOLOL http://irclog.perlgeek.de/​perl6/2006-08-08#i_-193245
01:39 diakopter (and TreyHarris' reply)
01:40 diakopter and thus the pseudo-mock-trolling began..
01:41 diakopter 7 years flies by.. or something.
01:42 TimToady how fun flies when you're having time
01:44 FROGGS_ joined #perl6
01:44 diakopter I want a very wide graph showing the arcs of every nick's presence and vocalizations on the channel over the years
01:45 TimToady maybe you should implement a computer language that would be good at that :P
01:46 diakopter nothing's super-awesome at mysql db processing except mysql
01:46 diakopter er, maybe he moved it to pg
01:47 diakopter wow, I actually have vague memories of backlogging this... at the time.
01:47 TimToady hmm, JVM compile blew up, trying a reconfig
01:47 diakopter ot of memory?
01:48 diakopter *ut
01:48 diakopter *out
01:49 japhb__ r: say True !?^ False
01:49 camelia rakudo 61580f: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/MZ5LBLRXVw�Cannot negate ?^ because it is not iffy enough�at /tmp/MZ5LBLRXVw:1�------> [32msay True !?^[33m�[31m False[0m�»
01:49 japhb__ Say what?
01:50 diakopter yeah that error is pretty iffy
01:51 diakopter because it is not THIRTY_THIRD_DEGREE_GNOSTIC_FREEMAS​ON_INNER_CIRCLE_INITIATION_CODEWORD enough
01:52 diakopter Perl 6, where even the errors coin you
01:52 TimToady gnostic-in, gnostic out
01:55 grondilu joined #perl6
01:57 grondilu r: constant fact = 1, [\*] 1 .. *; say fact[4]
01:57 camelia rakudo 61580f: OUTPUT«24␤»
01:57 japhb__ I can see where iffy is used in Grammar.nqp and in precedence.pm.  But why is ?^ not iffy?
01:57 grondilu TimToady: constant fact = 1, [\*] 1 .. *; say fact[4] # is probably simpler for http://rosettacode.org/wiki/Factorial#via_Sequence
01:58 avuserow r: $_ = "abacab"; s:g[(.)] = ord($/[0]); .say;
01:58 camelia rakudo 61580f: OUTPUT«979897999798␤»
01:58 avuserow how could I write the above with, say, $a?
01:58 diakopter japhb__: if I had to guess [again], I'd conjecture iffiness has something to do with boolifiability
01:59 japhb__ My assumption is that 'iffy' roughly means 'produces a boolean result', in which case, just about any ? op should be iffy, neh?
02:01 japhb__ r: $a = "abacab"; $a .=subst(/(.)/, ord($0)); $a.say;
02:01 camelia rakudo 61580f: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/oqdeeAGkGdâ�¤Variable '$a' is not declaredâ�¤at /tmp/oqdeeAGkGd:1â�¤------> [32m$a[33mâ��[31m = "abacab"; $a .=subst(/(.)/, ord($0));[0mâ�¤    expecting any of:â�¤        postfixâ�¤Â»
02:01 avuserow r: my $a = "abacab"; $a ~~ s:g/(.)/{ord $0}/;
02:01 camelia rakudo 61580f: ( no output )
02:01 avuserow r: my $a = "abacab"; $a ~~ s:g/(.)/{ord $0}/; $a.say
02:01 camelia rakudo 61580f: OUTPUT«979897999798␤»
02:01 japhb__ r: my $a = "abacab"; $a .=subst(/(.)/, {ord($0)}, :g); $a.say;
02:01 camelia rakudo 61580f: OUTPUT«Nominal type check failed for parameter '$s'; expected Cool but got Any instead␤  in sub ord at src/gen/CORE.setting:3438␤  in block  at /tmp/DeNoQrtafk:1␤␤»
02:02 japhb__ r: my $a = "abacab"; $a .=subst(/(.)/, *.ord, :g); $a.say;
02:02 camelia rakudo 61580f: OUTPUT«979897999798␤»
02:02 avuserow r: my $a = "abacab"; say $a.comb(/./).map: ord
02:02 camelia rakudo 61580f: OUTPUT«===SORRY!===␤CHECK FAILED:␤Calling 'ord' will never work with no arguments (lines 1, 1)␤    Expected: :(Cool $s)␤»
02:02 avuserow r: my $a = "abacab"; say $a.comb(/./).map:. ord
02:02 camelia rakudo 61580f: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/wHY5q93qeuâ�¤Two terms in a rowâ�¤at /tmp/wHY5q93qeu:1â�¤------> [32mmy $a = "abacab"; say $a.comb(/./).map[33mâ��[31m:. ord[0mâ�¤    expecting any of:â�¤        method argumentsâ�¤        postfixâ�¤        infix st…»
02:02 avuserow r: my $a = "abacab"; say $a.comb(/./).map: .ord
02:02 camelia rakudo 61580f: OUTPUT«No such method 'count' for invocant of type 'Int'␤  in method reify at src/gen/CORE.setting:7104␤  in method reify at src/gen/CORE.setting:7021␤  in method reify at src/gen/CORE.setting:7021␤  in method reify at src/gen/CORE.setting:7021␤  in method reify at sr…»
02:02 japhb__ avuserow: *.ord
02:02 avuserow okay, </spam> for me. :)
02:02 avuserow ohh
02:02 avuserow thanks japhb__++ :)
02:03 japhb__ np
02:03 japhb__ So ... I'm still confused by iffy.  diakopter and I seem to be thinking along the same lines, but Rakudo disagrees.  Hmmm, what about std ...
02:03 avuserow comb is awesome :)
02:04 japhb__ std: say True !?^ False
02:04 camelia std 4cde04e: OUTPUT«[31m===[0mSORRY![31m===[0m�Cannot negate ?^ because additive operators are not iffy enough at /tmp/3gFX66L7_k line 1:�------> [32msay True !?^[33m�[31m False[0m�Parse failed�FAILED 00:00 42m�»
02:04 japhb__ OK, at least Rakudo and STD agree.  But I'm still confused.
02:04 japhb__ avuserow: that it is.  :-)
02:04 lue [backlog] I was thinking of a has-like keyword for required attributes too. (something like needs $.this; or wants $.attr;) I still have a sneaking suspicion that "this is a required attribute!" enters the realm of non-default constructors.
02:06 japhb__ lue: needs and wants sound like role/interface requirements
02:06 avuserow though I still don't see how (or if it is possible) to do s[foo] = "bar" on something other than $_
02:06 japhb__ lue: it just seems really common to want to know that (some subset of) your attributes are guaranteed initialized.
02:06 japhb__ (By the caller, not by a default value)
02:07 lue yeah. If only english had a verb meaning "in possession of something on which additional information is needed by the possessor."
02:07 japhb__ r: my $a = "foo"; $a ~~ s[foo] = "bar"; say $a;
02:07 camelia rakudo 61580f: OUTPUT«bar␤»
02:07 japhb__ avuserow: like that ^^
02:07 avuserow huh. thought I tried that.
02:07 lue japhb__: the "it's a common desire" is why I'm middle-of-the-road on its necessity. On the one hand, people need it often. OTOH, is it really that much harder to write your own constructor :) ?
02:08 TimToady huh, parse went back up from 85 seconds to 91
02:08 japhb__ lue: Not hard, no.  Just boilerplate.  That's why we have a default new(), after all, to git rid of pointless boilerplate.
02:08 diakopter TimToady: we got 7% more features?
02:08 japhb__ diakopter: \o/
02:09 colomon \o/
02:09 lue but I do like the consistency of C<has $.attr!> for this feature.
02:09 diakopter ..just play along....
02:09 japhb__ lue: Yeah, I'm still thinking that's the best idea yet.
02:09 japhb__ (And it wasn't mine, someone else came up with it long ago.)
02:09 lue (and I think has $!attr! is the same as marking $a as read-write after using ::=. That is to say, pointless and wrong.)
02:10 japhb__ yeah.
02:10 lue After all, you can't set private attrs by default in the first place, so any concern with $!attr! is a non-issue, from where I stand.
02:10 japhb__ Hmmm, 'has $.foo!' implies you can Nil it either ...
02:10 japhb__ lue: right
02:11 japhb__ er, *can't Nil it
02:11 japhb__ I kinda like that.
02:13 TimToady grondilu++
02:14 lue I take it grondilu invented $.attr! ?
02:16 dalek std: a0bcfb1 | larry++ | STD.pm6:
02:16 dalek std: ?^ should be marked iffy
02:16 dalek std: review: https://github.com/perl6/std/commit/a0bcfb190a
02:17 lue If we go with has $.foo! , we should definitely allow has $.foo? too.
02:17 japhb__ \o/ # ?^ officially iffy
02:32 chano left #perl6
02:35 odoacre joined #perl6
02:41 benabik joined #perl6
02:58 odoacre joined #perl6
03:00 xinming joined #perl6
03:14 xinming joined #perl6
03:21 raiph joined #perl6
03:22 skids joined #perl6
03:24 xinming joined #perl6
03:27 TimToady lue: I was ++ing grondilu for [\*] 1..* to get factorial
03:33 BenGoldberg r: say [\*] 1..25;
03:33 camelia rakudo 61580f: OUTPUT«1 2 6 24 120 720 5040 40320 362880 3628800 39916800 479001600 6227020800 87178291200 1307674368000 20922789888000 355687428096000 6402373705728000 121645100408832000 2432902008176640000 51090942171709440000 1124000727777607680000 25852016738884976640000 6204484…»
03:33 BenGoldberg :)
03:35 BenGoldberg So I've got a silly question: Why are the Set infix operators defined using names such as "\x2208", instead of "\c[element of]"
03:36 geekosaur because \c[] is only available with icu?
03:36 geekosaur which is an optional dependency?
03:36 BenGoldberg Oh, ok.
03:39 TimToady icu is not really a dependency we want to keep
03:41 TimToady we've got to have our own unicode definitions anyway for portability to various platforms, so we might as well use that everywhere
03:42 TimToady plus ours will be optmized for NFG
03:43 TimToady std: say True !?^ False
03:43 camelia std a0bcfb1: OUTPUT«ok 00:00 42m␤»
03:43 TimToady afk &
03:49 gattscha1do joined #perl6
03:58 prevost joined #perl6
03:58 eternaleye joined #perl6
04:02 preflex joined #perl6
04:02 btyler joined #perl6
04:07 SamuraiJack__ joined #perl6
05:02 lue BenGoldberg: the \x form may be more cryptic, but it takes less characters to type.
05:02 lue :)
05:03 japhb_ joined #perl6
05:39 xinming_ joined #perl6
05:59 FROGGS[mobile] joined #perl6
06:09 darutoko joined #perl6
06:27 * [Coke] yawns
06:30 japhb_ joined #perl6
06:32 dalek perl6-roast-data: 090c37b | coke++ | / (5 files):
06:32 dalek perl6-roast-data: today (automated commit)
06:32 dalek perl6-roast-data: review: https://github.com/coke/perl6​-roast-data/commit/090c37be52
06:33 denis_boyun_ joined #perl6
06:34 [Coke] niecza back up to 844 fails
06:45 dmol joined #perl6
06:47 rindolf joined #perl6
06:48 GlitchMr joined #perl6
06:49 denis_boyun__ joined #perl6
06:50 kaleem joined #perl6
06:53 japhb_ joined #perl6
07:08 iSlug joined #perl6
07:11 sciurius joined #perl6
07:12 rindolf joined #perl6
07:14 zakharyas joined #perl6
07:36 camelia joined #perl6
07:36 moritz r: say 42
07:36 camelia rakudo 61580f: OUTPUT«42␤»
07:37 diakopter r: "i'm slow".say
07:37 camelia rakudo 61580f: OUTPUT«i'm slow␤»
07:37 diakopter n: "i'm fast".say
07:37 moritz diakopter: the first execution with camelia is *always* slow
07:37 camelia niecza v24-98-g473bd20: OUTPUT«i'm fast␤»
07:37 moritz diakopter: I have no idea why
07:37 diakopter me neither :)
07:41 dalek evalbot/host07: cb218d7 | moritz++ | evalbot.pl:
07:41 dalek evalbot/host07: nqp-moarvm
07:41 dalek evalbot/host07: review: https://github.com/perl6/evalbot/commit/cb218d7fb9
07:42 FROGGS[mobile] uhh
07:42 diakopter hee hee
07:42 FROGGS[mobile] moritz++
07:42 dalek evalbot/host07: e9922ec | moritz++ | evalbot.pl:
07:42 dalek evalbot/host07: missing comma
07:42 dalek evalbot/host07: review: https://github.com/perl6/evalbot/commit/e9922ecf4b
07:42 diakopter moritz++ indeed
07:42 camelia joined #perl6
07:42 diakopter moritz: did you see my note about pugs path
07:43 diakopter tadzik: ping
07:43 moritz diakopter: yes. There's also a ~p6eval/.cabal/bin/pugs
07:43 diakopter oh
07:43 moritz diakopter: which I kinda prefer, because it means we can make /root/ permissions more restrictive again
07:43 moritz nqp-moarvm: say(42)
07:43 camelia nqp-moarvm: OUTPUT«42␤»
07:43 moritz rnp: print 42
07:44 camelia rakudo 61580f, niecza v24-98-g473bd20: OUTPUT«42»
07:44 camelia ..pugs: OUTPUT«perl: warning: Setting locale failed.␤perl: warning: Please check that your locale settings:␤      LANGUAGE = "en_US:en",␤ LC_ALL = "en_US.ISO-8859-1",␤   LANG = "en_US.UTF-8"␤    are supported and installed on your system.␤perl: warning: Falling back to the standa…»
07:44 diakopter nqp-m: my $a := 1000000; while $a-- { }
07:44 camelia nqp-moarvm: ( no output )
07:44 diakopter nqp-m: my $t := nqp::now; my $a := 1000000; while $a-- { }; say(nqp::now - $t);
07:44 camelia nqp-moarvm: OUTPUT«No registered operation handler for 'now'␤compile_op»
07:44 diakopter nqp-m: my $t := nqp::time_i; my $a := 1000000; while $a-- { }; say(nqp::time_i - $t);
07:44 camelia nqp-moarvm: OUTPUT«0␤»
07:44 diakopter whaa
07:45 diakopter nqp-m: my $t := nqp::time_i; my $a := 10000000; while $a-- { }; say(nqp::time_i - $t);
07:45 camelia nqp-moarvm: OUTPUT«5␤»
07:45 JimmyZ nqp-m: my $t := nqp::time_i; my $a := 1000000; while $a-- { }; say(nqp::time_n - $t);
07:45 camelia nqp-moarvm: OUTPUT«1.059592␤»
07:45 moritz nqp-m: my $t := nqp::time_n; my $a := 1000000; while $a-- { }; say(nqp::time_n - $t);
07:45 camelia nqp-moarvm: OUTPUT«0.728743␤»
07:45 diakopter ok
07:46 moritz p: 42
07:46 camelia pugs: OUTPUT«perl: warning: Setting locale failed.␤perl: warning: Please check that your locale settings:␤      LANGUAGE = "en_US:en",␤ LC_ALL = "en_US.ISO-8859-1",␤   LANG = "en_US.UTF-8"␤    are supported and installed on your system.␤perl: warning: Falling back to the standa…»
07:46 camelia joined #perl6
07:46 JimmyZ MoarVM's not built with --optimize
07:46 JimmyZ I think
07:47 diakopter actually that machine's cpu isn't amazingly fast
07:47 diakopter but yes, it should be built with optimize :)
07:47 diakopter (if it's not)
07:48 diakopter yay; we can decrement integers...
07:48 diakopter nqp-j: my $t := nqp::time_n; my $a := 1000000; while $a-- { }; say(nqp::time_n - $t);
07:49 diakopter nqp-jvm: my $t := nqp::time_n; my $a := 1000000; while $a-- { }; say(nqp::time_n - $t);
07:49 camelia nqp-jvm: OUTPUT«0.09299993515014648␤»
07:49 diakopter heh.
07:49 moritz p: say 42
07:49 camelia pugs: OUTPUT«perl: warning: Setting locale failed.␤perl: warning: Please check that your locale settings:␤      LANGUAGE = "en_US:en",␤ LC_ALL = "en_US.ISO-8859-1",␤   LANG = "en_US.UTF-8"␤    are supported and installed on your system.␤perl: warning: Falling back to the standa…»
07:49 moritz grml
07:49 diakopter moritz: I remember fixing this on feather3 or wherever
07:49 fhelmberger joined #perl6
07:50 diakopter nqp-m: my $t := nqp::time_n; my int $a := 1000000; while $a-- { }; say(nqp::time_n - $t);
07:51 camelia nqp-moarvm: OUTPUT«0.739564␤»
07:51 diakopter nqp-jvm: my $t := nqp::time_n; my int $a := 1000000; while $a-- { }; say(nqp::time_n - $t);
07:51 camelia nqp-jvm: OUTPUT«0.0709998607635498␤»
07:51 diakopter meh
07:51 diakopter nqp: my $t := nqp::time_n; my int $a := 1000000; while $a-- { }; say(nqp::time_n - $t);
07:51 FROGGS[mobile] can we have a nqp-* command?
07:51 camelia nqp: OUTPUT«0.53498911857605␤»
07:52 moritz I can cope with the Debian locale system, but Ubuntu's freaks me out
07:52 diakopter they're that different?
07:52 moritz yes
07:52 JimmyZ the best one should be perl Configure.pl && make CGOTO=1
07:52 diakopter JimmyZ: well we need to tell it clang too
07:52 moritz FROGGS[mobile]: if somebody patches it in, yes
07:53 * diakopter looks at the rebuild scdript on host07
07:53 JimmyZ I meant perl Configure.pl --optimize
07:53 moritz p: say 42
07:53 camelia pugs: OUTPUT«42␤»
07:53 moritz \o/
07:54 diakopter moritz++
07:54 diakopter p: say /3/
07:54 moritz ftr: added line "en_US.ISO-8859-1 ISO-8859-1" to /var/lib/locales/supported.d/local  and then dpkg-reconfigure locales
07:54 camelia pugs: OUTPUT«<Regex>␤»
07:54 diakopter p: say 3~~/3/
07:54 camelia pugs: OUTPUT«Error eval perl5: "if (!$INC{'Pugs/Runtime/Match/HsBridge.pm'}) {␤    unshift @INC, '/home/p6eval/.cabal/share/Pugs-6.2.​13.20120717/blib6/pugs/perl5/lib';␤    eval q[require 'Pugs/Runtime/Match/HsBridge.pm'] or die $@;␤}␤'Pugs::Runtime::Match::HsBridge'␤"␤**…»
07:54 diakopter poo
07:55 diakopter moritz: that one might be solvable
07:55 diakopter moritz: I don't see a rebuild-moarvm.pl do you want me to make one?
07:55 moritz rakudo-jvm: say 42
07:55 moritz diakopter: yes please
07:56 camelia rakudo-jvm: OUTPUT«(signal XCPU)»
07:56 diakopter whee
07:56 diakopter *giggle*
07:56 ribasushi joined #perl6
07:56 moritz yes, needs evalserver
08:00 xinming joined #perl6
08:06 diakopter r: ;
08:06 camelia rakudo 61580f: ( no output )
08:07 diakopter JimmyZ: does clang take a very long time to do CGOTO=1 on interp.c?
08:08 diakopter apparently so...
08:10 JimmyZ I thought clang supports CGOTO well enought...
08:15 diakopter nqp-m: my $t := nqp::time_n; my int $a := 1000000; while $a-- { }; say(nqp::time_n - $t);
08:15 camelia nqp-moarvm: OUTPUT«0.452568␤»
08:15 diakopter better, anyway
08:15 diakopter still 5x slower than jvm :)
08:15 diakopter jnthn: ^
08:16 jnthn Well, of course.
08:16 JimmyZ diakopter: with CGOTO and --optimize?
08:16 moritz nqp-jvm: my $t := nqp::time_n; my int $a := 1000000; while $a-- { }; say(nqp::time_n - $t);
08:16 camelia nqp-jvm: OUTPUT«0.06500005722045898␤»
08:16 diakopter JimmyZ: yes, and clang
08:16 jnthn That's exactly the sort of thing a JIT makes a hot job of.
08:16 diakopter I'll try with gcc
08:17 Timbus|Away joined #perl6
08:18 diakopter nqp-m: my $t := nqp::time_n; my int $a := 1000000; while $a-- { }; say(nqp::time_n - $t);
08:18 camelia nqp-moarvm: OUTPUT«0.232732␤»
08:18 diakopter ^ with gcc
08:18 JimmyZ gcc is better than clang?
08:18 diakopter apparently at that benchmark ;)
08:19 diakopter micromicromicromicromicrobenchmark
08:20 jnthn nqp: my $t := nqp::time_n; my int $a := 1000000; while $a-- { }; say(nqp::time_n - $t);
08:20 camelia nqp: OUTPUT«0.495544195175171␤»
08:20 diakopter well, that's something
08:21 jnthn yeah, but it's all op dispatch overhead here.
08:21 diakopter yeah, but that's still something
08:22 jnthn aye; apparently Moar dispatches ops faster :)
08:23 * diakopter wonders how the jvm would do if we disabled its JIT entirely.... ;)
08:24 jnthn Probably "ok" given the bytecode was designed to be interpretable...
08:24 nwc10 presumably that is acutally possible with an open source JVM. Does Sun's let you do it?
08:24 diakopter nwc10: we're using Sun's on that box
08:25 jnthn I think tehe's sa flag
08:25 diakopter p6eval@host07:~/MoarVM$ java -version
08:25 diakopter java version "1.7.0_40"
08:25 diakopter Java(TM) SE Runtime Environment (build 1.7.0_40-b43)
08:25 diakopter Java HotSpot(TM) 64-Bit Server VM (build 24.0-b56, mixed mode)
08:25 jnthn *there's, a
08:25 nwc10 bytecode *has* to be interpretable, else it would be stupid, because it would be slower than regular ahead-of-time compiling
08:26 diakopter yep, things run berry berry slowly
08:26 odoacre_ joined #perl6
08:28 diakopter but startup time is hella fasta!
08:28 jnthn diakopter: really? hm
08:55 iSlug joined #perl6
09:02 mathw Good morning o/
09:03 moritz good morning mathw
09:03 mathw hey moritz
09:04 jnthn o/
09:14 daniel-s joined #perl6
09:21 FROGGS[mobile] joined #perl6
09:21 mathw jnthn!
09:23 mathw I wrote a little Perl 6 at the weekend
09:23 mathw it was... nice
09:24 mathw hyphens in variable names
09:24 mathw so good. That's one of the things I like about Lisps as well
09:25 jnthn yeah, it looks kinda nice
09:25 jnthn I guess reading AMOP was the first time I'd read any significant amount of Lisp... :)
09:27 gfldex joined #perl6
09:28 moritz uh, rakudo-parrot spectest looks quite dirty
09:29 moritz lots of fallout in set/bag tests, but also S32-io/note.t and S02-types/declare.t
09:29 moritz and one in S05-metasyntax/delimiters.t
09:29 jnthn The note one aside, I'm guessing fallout from the set/bag renaming stuff
09:30 moritz ah, my t/spec got stuck :/
09:30 moritz never mind then
09:31 daniel-s joined #perl6
09:34 moritz but my desktop froze during the spectest run for a while, so I guess there's still something wrong
09:45 tadzik diakopter: pong
10:02 moritz t/spec/S02-types/array.t uses excessive amounts of memory after test 81
10:02 moritz I set a ulimit to 2GB, and it runs into that limit
10:03 moritz ah, it's dies_ok { Mu.[0] }, 'but Mu has no .[]';
10:03 moritz .to lizmat it seems that Mu.[0] causes infinite recursion; maybe related to the postcircumfix rework?
10:03 yoleaux moritz: I'll pass your message to lizmat.
10:06 rjbs joined #perl6
10:10 daxim joined #perl6
10:11 moritz r: Mu.[0]
10:11 camelia rakudo 61580f: OUTPUT«Cannot call 'postcircumfix:<[ ]>'; none of these signatures match:␤:(\SELF, int $pos)␤:(\SELF, int $pos, Mu \$BIND)␤:(\SELF, int $pos, :delete(:$delete)!, *%other)␤:(\SELF, int $pos, :exists(:$exists)!, *%other)␤:(\SELF, int $pos, :kv(:$kv)!, *%other)…»
10:12 * moritz hopes the resource limits work on the new box
10:12 moritz huh.
10:14 * moritz gets spam with "dispose of that old mop", and thinks "what's wrong with our MOP?"
10:15 jnthn oh, I'm getting loads of mop spam too
10:16 jnthn Apparently MOPs can spread bacteria too
10:16 jnthn .oO( Who on earth is going to buy a new mop 'cus they get spam about it???! )
10:16 kivutar joined #perl6
10:17 moritz who on earth is going to buy anything because they get spam about it?
10:18 tadzik enough people so it makes sense to send spam
10:19 moritz and that's really the heart of the problem
10:20 jnthn I know, it's just the choice of mops as a thing to spam about... :)
10:24 mathw yeah maybe the market for genital enlargement products has peaked
10:26 moritz .oO( peak oil was yesterday. Today it's peak ... )
10:27 rindolf joined #perl6
10:30 denis_boyun joined #perl6
10:31 dmol joined #perl6
10:34 denisboyun joined #perl6
10:34 gfldex joined #perl6
10:47 * JimmyZ saw jnthn++'s comments to AMOP in google book
10:51 camelia joined #perl6
10:56 moritz ok, camelia now runs inside a tmux session on host07.perl6.com
10:57 moritz you can get to it as user p6eval with tmux attach -t 2
10:57 nwc10 how do I ask camelia which backends she has?
10:57 moritz camelia: help
10:57 camelia moritz: Usage: <(rakudo-jvm|nqp-jvm|star|pugs|nqp|std|niecza|rak​udo|b|nqp-moarvm|nom|r|nqp-m|nqp-mvm|pnr|p6|nr|n|​npr|perl6|prn|rn|r-j|r-jvm|p|rnp|nrp|rpn)(?^::\s) $perl6_program>
10:57 moritz nwc10: it also lists all aliases, which is why it's a bit messy :-)
10:58 jnthn r-j: say('hi from jvm')
10:59 camelia rakudo-jvm: OUTPUT«(signal XCPU)»
10:59 jnthn aww
10:59 moritz I didn't say they all *work* :-)
10:59 kivutar joined #perl6
10:59 nwc10 moritz: feature request - could they all work please? :-)
10:59 jnthn :P
10:59 moritz jnthn: just decrease startup time of rakudo-jvm enough to be usable with the existing CPU limits, and then that wouldn't happen anymore :-)
10:59 nwc10 nice answer
11:00 moritz though in the short term we'll likely use an evalserver
11:00 moritz does the evalserver mix with --setting=RESTRICTED?
11:00 jnthn I think so
11:02 colomon woah
11:02 colomon stage parse went from 108 two nights ago to 135 last night.  :(
11:03 daxim joined #perl6
11:03 jnthn huh
11:04 jnthn We merged stuff yesterday that got rid of almost a million Cursor allocations and it was generally reported as a win. What changed since then?
11:05 colomon hmm…. oh, it's possible I had a $work test running to slow things down?
11:05 jnthn Dunno
11:05 colomon oh, that's looking like a real possibility.
11:05 jnthn I know if I build multiple things at once then they get slower, though :)
11:06 colomon give me a moment.
11:06 jnthn k
11:06 moritz some of those modern CPUs have dynamic overclocking, which only works if just a single core is active (due to thermal restraints)
11:07 colomon My $work tests generally run on four cores at once
11:08 colomon (nothing fancy, I just have 4 instances of the test going.)
11:08 jnthn I suspect that the real bottleneck ends up being not cores, but memory access
11:11 colomon will have another number for you in a moment
11:17 nwc10 jnthn: is this a bug in the JVM, or just running out of memory?
11:17 nwc10 java.lang.ArrayStoreException: <unknown> in finish_code_object (src/Perl6/World.nqp:1070)
11:17 nwc10 (etc)
11:19 jnthn nwc10: That's a "huh wtf"
11:20 nwc10 OK, quite possibly a JVM bug
11:20 jnthn http://docs.oracle.com/javase/7/docs/a​pi/java/lang/ArrayStoreException.html # docs for it
11:20 nwc10 that's the first run in a while that didn't coredump the JVM and issue an "if you want to report a bug" report
11:21 jnthn JVM bugs aside, it's a little hard to imagine a scenario where that arises on one machine but not another...
11:30 moritz ok, I have now twice reverse-engineered how the JVM evalserver works
11:30 moritz (in the past)
11:31 moritz I swear that if I do it a third time (for camelia), I'll actually document it
11:35 colomon parse time on this trial 97 seconds, so that's a 10% shaved off since two days ago.  jnthn++
11:49 timotimo so, are we going to reduce the initial size of ListIter's internal counter thingie down from 100_000?
11:50 timotimo i'm still in favor of giving qrpa a very big factor for downsizing; something like "reduce to 1/2 the size if less than 1/16 of the slots are in use"
11:51 timotimo cool, my rakudo-parrot parse time is down to 106 seconds from about 120s
11:52 * timotimo should pull in the newest changes as well
11:52 iSlug joined #perl6
11:53 moritz ListIter stores a list of slots?
11:53 moritz either that sounds confused, or I am confused
11:53 timotimo it has a $rpa that stores things
11:53 timotimo if $eager is true, it gets pre-sized to 100_000
11:55 timotimo donaldh found out yesterday evening, that even before the first line in the evalserver is run, 15 of those 100_000 element big arrays get allocated (and not yet freed)
11:58 lizmat good *, #perl6!
11:58 yoleaux 10:03Z <moritz> lizmat: it seems that Mu.[0] causes infinite recursion; maybe related to the postcircumfix rework?
11:58 lizmat moritz: All tests successful.
11:58 lizmat Files=1, Tests=99,  8 wallclock secs ( 0.03 usr  0.01 sys +  7.17 cusr  1.21 csys =  8.42 CPU)
11:58 lizmat this is on parakudo, are you using jakudo?
11:59 moritz lizmat: parakudo
11:59 lizmat weird, lemme check
11:59 jnthn r: Mu.[0]
11:59 camelia rakudo 61580f: OUTPUT«Cannot call 'postcircumfix:<[ ]>'; none of these signatures match:␤:(\SELF, int $pos)␤:(\SELF, int $pos, Mu \$BIND)␤:(\SELF, int $pos, :delete(:$delete)!, *%other)␤:(\SELF, int $pos, :exists(:$exists)!, *%other)␤:(\SELF, int $pos, :kv(:$kv)!, *%other)…»
11:59 moritz Files=1, Tests=99   that's not a full spectest run, no?
12:00 lizmat nope, just that file
12:01 moritz oh
12:01 moritz hm, weird
12:01 moritz I also did a 'git clean -xdf' in all the repos involved
12:02 lizmat it *does* take about 3 seconds to fail
12:02 moritz lizmat: locally start a shell with a ulimit -v 1048576
12:02 lizmat and all CPU, so maybe you're just seeing it more
12:02 moritz lizmat: and then try ./perl6 -e 'Mu.[0]'
12:03 lizmat it seems to grow about 250 MB for that
12:03 moritz so there's something wrong with that
12:03 lizmat $ ulimit -v 1048576
12:03 lizmat $ perl6 -e 'Mu.[0]'
12:03 lizmat Cannot call 'postcircumfix:<[ ]>'; none of these signatures match:
12:04 lizmat and a long list of signatures
12:04 * moritz doesn't understand this at all
12:05 lizmat ICU related maybe ?
12:05 moritz dunno, would surprise me
12:05 moritz given that it's not related to string handling at all, afaict
12:05 lizmat maybe ulimit doesn't work on OS X
12:05 * moritz wipes clean everything, and rebuilds
12:05 lizmat $ ulimit -v 1048576
12:05 lizmat $ ulimit
12:05 lizmat unlimited
12:06 timotimo that's correct, you'd need to ulimit -a to see the actual limit
12:07 moritz or ulimit -v
12:07 lizmat max memory size         (kbytes, -m) 1048576  # so it did work
12:10 lizmat errands&
12:17 iSlug joined #perl6
12:38 grondilu joined #perl6
12:44 masak good afternoon, #perl6
12:44 rindolf joined #perl6
12:44 moritz \o masak
12:54 ribasushi joined #perl6
12:55 ajr joined #perl6
13:07 mtk joined #perl6
13:10 PacoAir joined #perl6
13:17 moritz after removing everything and rebuilding from scratch, I still get that error from S02-types/array.t :/
13:18 moritz and Any.[0] takes 0.4s (including startup time), Mu.[0] takes 2.2s
13:18 moritz I don't think that it takes 2s to list all the candidates in that error message
13:18 denis_boyun joined #perl6
13:19 kay joined #perl6
13:19 moritz /usr/bin/time ./perl6 -e 'try Mu.[0]'
13:19 moritz 1.02user 0.34system 0:01.38elapsed 99%CPU (0avgtext+0avgdata 1499688maxresident)k
13:19 moritz 0inputs+0outputs (0major+379426minor)pagefaults 0swaps
13:19 moritz /usr/bin/time ./perl6 -e 'try Any.[0]'
13:19 moritz 0.33user 0.08system 0:00.42elapsed 97%CPU (0avgtext+0avgdata 300788maxresident)k
13:19 moritz 0inputs+0outputs (0major+79697minor)pagefaults 0swaps
13:19 * masak .oO( slow as the bellow of a cow )
13:19 timotimo wow, so much more memory used
13:20 moritz aye
13:20 timotimo r: 1499688 / 300788
13:20 camelia rakudo 61580f: ( no output )
13:20 timotimo r: say 1499688 / 300788
13:20 camelia rakudo 61580f: OUTPUT«4.985864␤»
13:20 moritz so I'm pretty sure there's something seriously wrong here, but I don't know what it could be, because everything I could think of would fatally die on all setups, not just mine
13:23 bbkr_ joined #perl6
13:23 masak moritz: maybe submit a rakudobug?
13:24 masak the problem sounds palpable enough to be an observable.
13:24 bbkr_ hi, how can I do quotemeta() in P6?
13:24 moritz bbkr_: it's the default for regex interpolation
13:24 moritz r: my $str = '$str'; say '$str' ~~ /$str/
13:24 camelia rakudo 61580f: OUTPUT«「$str」␤␤»
13:25 moritz which is why there's no special method or sub for it
13:26 kbaker joined #perl6
13:29 bbkr_ I need it for qx{}. to pass password param from MAIN safely to system command
13:30 bbkr_ qx:s{something --password=$pass } does not quote meta characters by default
13:31 moritz right. But for that you don't need quotemeta, but shellquote (don't think that exists either, but it's not the same)
13:31 * geekosaur shudders at passing passwords on command line
13:32 bbkr_ thanks
13:32 GlitchMr run "command", "something", "-password=$pass";
13:32 GlitchMr But I don't think it's good idea to pass passwords on command line.
13:33 moritz GlitchMr: but that doesn't capture standard output
13:33 moritz which qx does
13:33 GlitchMr oh, right
13:34 GlitchMr Escaping is possible, but probably error prone, and OS specific.
13:34 GlitchMr Replace ' with '\'', and put everything in single quotes.
13:34 timotimo quoting is simply ugly :(
13:34 GlitchMr Still, Perl 6 needs something like IPC::Run.
13:35 bbkr_ indeed, perl6 -e 'run "echo", "a b\"c"' works as expected. I do not need to capture output and password is not sensitive at all in my case so this solution solves my question. thanks again
13:36 moritz GlitchMr: agreed
13:38 GlitchMr Also, it would be fun if code like run("echo", "something") ==> run("some", "other", "command") would just work (the command doesn't have to be run).
13:38 bbkr_ does run set any status variable like $! in P5?
13:38 GlitchMr Run gives status as return code.
13:38 ribasushi joined #perl6
13:39 GlitchMr When used as boolean, it's true when return code is 0. When used as number, it returns return code.
13:39 skids joined #perl6
13:39 timotimo .o(still b0rked in loops, i believe)
13:40 timotimo cannot show it in the evalbot, though
13:40 bbkr_ GlitchMr: works, thanks
13:40 timotimo r: for ^1000 { 1 but False }
13:40 camelia rakudo 61580f: ( no output )
13:40 timotimo r: for ^1000 { my $i = 1 but False; 1 }
13:40 camelia rakudo 61580f: OUTPUT«(signal ABRT)»
13:40 timotimo there we go
13:42 masak lovely.
13:42 timotimo p6bench is hit by that :(
13:42 GlitchMr I still have no idea why run() likes to fail.
13:43 GlitchMr Something is broken with "but Boolean", but I've no idea why.
13:43 masak GlitchMr: um... it's not &run that fails, as evidenced by the above?
13:43 GlitchMr Yeah, I know.
13:43 timotimo r: class ProcessResult is Int is Bool { has $.rval; method Bool { not $.rval }; method Int { $.rval } }; given ProcessResult.new(:rval(1)) { say +$_; say so $_ }
13:43 camelia rakudo 61580f: OUTPUT«===SORRY!===␤Duplicate box_target for native int␤»
13:43 GlitchMr I know the problem is with "but Boolean", but, I don't know why it fails.
13:43 timotimo whoops?
13:43 GlitchMr Something about double free(), but...
13:46 GlitchMr https://gist.github.com/GlitchMr/6826186
13:46 GlitchMr Not really useful
13:47 btyler joined #perl6
13:47 GlitchMr "Address 0x8 is not stack'd, malloc'd or (recently) free'd"
13:47 GlitchMr huh?
13:47 GlitchMr 0x8 doesn't look like an address.
13:48 moritz it looks like a NULL-Pointer that's been incremented by 64 bit
13:48 GlitchMr hm, makes sense.
13:49 timotimo so trying to access a null pointer with an offset of 1 int
13:49 timotimo somewhere in the bigint ops
13:49 GlitchMr What does bigint have with "but"?
13:50 moritz GlitchMr: maybe it's not the "but", but the boolification protocol
13:50 GlitchMr That would make sense.
13:51 GlitchMr I don't know much about Perl 6 internals.
13:51 GlitchMr I wonder how JVM reacts to that.
13:53 GlitchMr Nothing, no crashes, no anything.
13:53 GlitchMr But that makes sense, it's JVM, not Parrot. Entire lowlevel codebase is different.
13:54 GlitchMr (I was hoping JVM version of NQP would throw an exception)
13:57 jnap joined #perl6
14:06 bruges joined #perl6
14:10 xenoterracide joined #perl6
14:10 SmokeMachine joined #perl6
14:10 kivutar joined #perl6
14:12 bruges joined #perl6
14:13 bluescreen10 joined #perl6
14:33 lizmat joined #perl6
14:48 fhelmberger joined #perl6
14:49 benabik joined #perl6
14:52 hummeleB1 joined #perl6
14:56 ajr joined #perl6
15:10 raiph joined #perl6
15:16 rindolf joined #perl6
15:29 dalek Perlito: ed1912f | (Flavio S. Glock)++ | misc/pretty_print.pl:
15:29 dalek Perlito: Perlito5 - pretty-printer stub
15:29 dalek Perlito: review: https://github.com/fglock/​Perlito/commit/ed1912f5e3
15:33 moritz abstrusegoose++ # "Big data just means increasing the font size"
15:39 daxim joined #perl6
15:41 donaldh joined #perl6
15:43 donaldh moritz: is it a coincidence that this http://xkcd.com/ mouseover is the converse?
15:44 donaldh I should say http://xkcd.com/1273/ for future proofing
15:47 donaldh If nobody else gets to 100_000 eager ListIter before the end of UTC day, I'll take a look.
15:48 * timotimo is currently in "use keyboard as little as possible to get out of RSI mode ASAP" mode
15:48 donaldh FWIW, it looks like MapIter is doing it righter.
15:51 * TimToady wonders if this is a result of trying to say "well, if if a list of unknown finity has 100_000 elements, maybe we'd better think of it as infinite anyway"
15:52 TimToady *finitude, I guess
15:53 TimToady but even if we make such a guess and stop evaluating a mostly-eager list, that doesn't mean we should allocate 100_000 right off the bat
15:53 timotimo agreed, 100_000 seems really excessive
15:53 bbkr__ joined #perl6
15:54 TimToady unless we plan to always copy it to something shorter when we find the end
15:54 donaldh Well MapIter just maxxes out at 100_000 for the $rpa
15:55 donaldh So if it is infinite, we don't need infinite memory.
15:55 japhb__ "maxes out"?
15:55 donaldh $count = 100_000 if $count > 100_000
15:56 donaldh won't allocate an array bigger than 100_000 when eager.
15:56 timotimo so ... will only the first 100_000 elements ever be stored?
15:56 donaldh dunno about that.
15:57 moritz fwiw the 100_000 is how many elements are reified *at once*
15:57 moritz not how many are reified at all
15:57 timotimo ah, ok
15:57 donaldh what moritz said
15:57 donaldh That seems like more sane logic for ListIter too right ?
15:58 TimToady how does ListIter differ?
16:00 donaldh When eager, it presizes its $rpa to 100_000 regardless
16:00 donaldh Not reify up to 100_000 *at once*
16:03 TimToady yeah, I see that
16:04 TimToady to me that seems unlikely to be the right balance point for an initial guess
16:05 TimToady the 'r' stands for "resizeable" doesn't it?
16:07 * donaldh hadn't got around to asking what rpa stands for
16:08 geekosaur resizable parrot-m(something)-code array?
16:08 geekosaur originally at least
16:09 TimToady but that's only for reify(*), so maybe it's the fault of the callers
16:10 TimToady (partly)
16:11 arnsholt geekosaur: ResizablePMCArray, where PMC is what Parrot calls an object
16:11 TimToady $!listiter.reify(*) appears to be called only from MapIter
16:12 geekosaur yeh, I was trying to expand PMC at the same time
16:12 arnsholt Parrot Magic Cookie initially, later retconned to PolyMorphic Container, IIRC
16:12 [Coke] let me know if you fix the pugs issue on camelia, as that is making the daily runs about 20x as painful as they need to be.
16:12 geekosaur since replacing one indigestible initialism with another is less than helpful
16:14 dmol joined #perl6
16:17 TimToady MapIter calls ListIter.reify(*) if count is *, so it's also allocating 100_000 in that case
16:18 TimToady 1000 might be much saner
16:19 * donaldh will experiment with it later.
16:19 TimToady 4 might be even saner than that--see Perl 5
16:19 donaldh decommute&
16:20 [Coke] nqp: nqp:say(1,2,3);
16:20 camelia nqp: OUTPUT«Confused at line 2, near "nqp:say(1,"␤current instr.: 'panic' pc 14748 (src/stage2/gen/NQPHLL.pir:5229) (src/stage2/gen/NQPHLL.nqp:279)␤»
16:20 TimToady of course, Perl 5 was partly assuming a powers-of-two allocator, so growing the array by 5/4 each time only copies when crossing 2**n boundaries
16:20 [Coke] nqp: nqp:deb(1,"hi");
16:20 camelia nqp: OUTPUT«Confused at line 2, near "nqp:deb(1,"␤current instr.: 'panic' pc 14748 (src/stage2/gen/NQPHLL.pir:5229) (src/stage2/gen/NQPHLL.nqp:279)␤»
16:21 [Coke] nqp: nqp::deb(1,"hi"); #whoops
16:21 camelia nqp: OUTPUT«Error while compiling block : Error while compiling op deb (source text: "nqp::deb(1,\"hi\")"): No registered operation handler for 'deb'␤current instr.: '' pc 55082 (src/stage2/QAST.pir:20123) (src/stage2/QAST.nqp:3316)␤»
16:21 [Coke] shame, there was a lot of documentation for that opcode in the old doc file.
16:22 japhb__ TimToady: if Perl 5 was assuming a powers-of-two allocator would be used anyway, why bother to only grow the array by 5/4?  Why not always grow by 2?
16:22 moritz list vs. hash?
16:23 TimToady hashes always grow by 2
16:23 TimToady (in p5)
16:23 moritz it's much more costly to rehash a hash than to to grow a list
16:23 TimToady though p5 does tricks to make that fairly cheap too
16:23 TimToady it's obvious from the masked hash value which entries to copy and which to leave
16:24 TimToady since doubling the hash table merely means you're paying attention to one more already-existing bit
16:24 japhb__ No, my point is, what does it actually *gain* to use 5/4 as the array growth ratio?  I can see that 5 is relatively prime to 2, but what magical property does that bring?
16:24 TimToady we don't actually ever "rehash"
16:24 TimToady it guarantees growth if you start at 4 :)
16:25 TimToady and is still quite parsimonious with memory on systems where you're rather copy than overallocate
16:25 japhb__ Okay ... but why not 2 as the growth ratio, if that's the allocation ratio?
16:25 TimToady it doesn't try to guess which malloc is in use
16:25 japhb__ Were the small-object pools not power-of-two?
16:25 japhb__ Ah!
16:26 TimToady I think it was powers of two up to some value
16:26 TimToady then it was ad hoc
16:26 japhb__ gotcha.
16:26 TimToady well, the BSD allocator I stole :)
16:26 TimToady SysV malloc was stingier
16:26 japhb__ The great thing about BSD is how very hard it is to steal from them.  :-)
16:27 TimToady people on SysV with sufficient memory tended to pick Perl's malloc over the system malloc anyway
16:29 TimToady but the other reason p5 could be relatively stingy and biased towards copying was that it did a lot more to remember what happened last time
16:29 TimToady calling the same subroutine would tend to reuse the storage from last time
16:30 TimToady at least, calling the same subroutine at the same recursion level would
16:31 TimToady that was another reason to bias in favor of assuming small initial sizes
16:32 TimToady one would not really have to keep around the actual data structure like p5 did, just remember how big it got last time in similar situations
16:32 TimToady though keeping it around does save the cost of reallocating
16:33 TimToady might not be practical with the way frames are handled now though
16:34 TimToady though if we made frames by cloning a protoframe, the protoframe could probably be tweaked with that info
16:37 slava does perl6 have 'thunks' ?
16:37 TimToady not as first class items yet
16:37 TimToady we use thunks all the time though
16:38 TimToady $a || $b   <- RHS is a thunk
16:38 TimToady has $.foo = stuff;   # stuff is a thunk
16:38 dalek nqp: c659ef3 | coke++ | docs/nqp-opcode.txt:
16:38 dalek nqp: Remove old nqp op list.
16:38 dalek nqp:
16:38 dalek nqp: We now have a test (t/docs/*) that provides a list of codes from the
16:38 dalek nqp: vms. Other comments in here are design considerations that are now
16:38 dalek nqp: resolved, and docs for an obsolete opcode.
16:38 dalek nqp:
16:38 dalek nqp: See docs/ops.markdown going forward.
16:38 dalek nqp: review: https://github.com/perl6/nqp/commit/c659ef3c22
16:38 dalek nqp: 18f113a | coke++ | docs/ops.markdown:
16:38 dalek nqp: document most exceptional ops
16:38 dalek nqp: review: https://github.com/perl6/nqp/commit/18f113a7b9
16:39 TimToady thunks are mentioned in S's 3, 4, 5, and 6
16:41 [Coke] 3 ops now that are in the docs, but don't exist in parrot: writefh, isfilelink, openasync
16:41 TimToady arguments to macros are thunks, more or less
16:42 TimToady except you can't call ASTs as code directly, afaik
16:49 TimToady r: macro runlater ($a) { macro runnow { $a }; runnow }; runlater(say hi)
16:49 camelia rakudo 61580f: OUTPUT«===SORRY!===␤too few positional arguments: 2 passed, 3 (or more) expected␤»
16:50 colomon joined #perl6
16:50 TimToady r: macro runlater ($a) { macro runnow() { $a }; runnow() }; runlater(say hi)
16:50 camelia rakudo 61580f: OUTPUT«===SORRY!===␤too few positional arguments: 2 passed, 3 (or more) expected␤»
16:50 TimToady hmm
16:51 stevan_ joined #perl6
16:55 TimToady r: macro runlater ($a) { $a }; runlater(say 'hi')
16:55 camelia rakudo 61580f: OUTPUT«hi␤»
16:55 slava what about my $a := somecode();
16:55 slava not a thunk?
16:56 TimToady that's just calling somecode and binding the results
16:57 TimToady the question is, how do you get something called 'somecode' that isn't a block or routine
16:58 slava TimToady: I am not smart enough to answer that :P
16:58 moritz eval!
17:00 * TimToady wonders if adding more exclamation marks will make it more sensical...
17:01 TimToady how does the compiler turn an AST into a thunk, for || and such?
17:02 TimToady and should we spec that?
17:02 TimToady or provide a first-class API to thunks?
17:02 slava TimToady: I hope those questions are not intended for me ...
17:02 TimToady no, they're aimed more at everyone :)
17:03 diakopter nqp-m: my int $i := 200_000_000; while --$i { nqp::iscclass(pir::const::CCLASS_ALPHABETIC, "«", 0); }
17:03 camelia nqp-moarvm: OUTPUT«To compile on the MoarVM backend, QAST::VM must have an alternative 'moar' or 'moarop'␤as_mast»
17:03 slava ahh, good, then I will just stay quiet and read. :)
17:03 moritz TimToady: I guess I just missed some context
17:03 moritz TimToady: and IMHO it would be helpful to have some API to turn an AST into a code object
17:04 * TimToady hands moritz some more excalamation marks
17:04 TimToady *excl
17:04 moritz preferably with a mechanism to provide the context in which it is compiled
17:04 moritz r: !!!
17:04 camelia rakudo 61580f: OUTPUT«Stub code executed␤  in block  at /tmp/Q7QcyE5TCo:1␤␤»
17:05 TimToady well, a macro is the natural place to gather that info, if we can type the argument to Thunk as well as AST
17:05 TimToady we'll probably end up with mixed macros that can return any of AST, Thunk, or already-evaluted data
17:06 TimToady (for each parameter)
17:14 TimToady alternately, always supply ASTs, but make it obvious and easy how to compile and/or run bits of AST
17:14 diakopter nqp-m: sub A($k, $x1, $x2, $x3, $x4, $x5) { if ($k <= 0) { return $x4() + $x5() }; my $B := sub () { $k:=$k-1; A($k, $B, $x1, $x2, $x3, $x4) }; $B() }; sub K($n) { sub () { $n } }; say(A(18, K(1), K(-1), K(-1), K(1), K(0) ))
17:14 [Coke] can someone explain why pow_I needs 2 types? (what do each of them do?) looks like the first one is result type...
17:14 camelia nqp-moarvm: OUTPUT«-35602␤»
17:14 diakopter jnthn: ^ that result is wrong O_O
17:15 moritz [Coke]: pow_I with negative power boxes into a Num
17:18 moritz [Coke]: and with a postive power returns Int
17:18 moritz but since nqp doesn't know anything about Int and Num, we have provide those type objects so that nqp knows what to return
17:19 [Coke] moritz: danke.
17:21 timotimo diakopter: how come you can just --$i on nqp on moar?
17:22 timotimo oh. was that not working a limitation of rakudo only?
17:26 dalek nqp: e0bc2b7 | coke++ | docs/ops.markdown:
17:26 dalek nqp: Fixup docs for some _I ops
17:26 dalek nqp:
17:26 dalek nqp: moritz++
17:26 dalek nqp: review: https://github.com/perl6/nqp/commit/e0bc2b765d
17:26 [Coke] .to pmurias - fixed the existing _I opcodes i the docs.
17:26 yoleaux [Coke]: I'll pass your message to pmurias.
17:36 FROGGS[mobile] joined #perl6
17:38 nine joined #perl6
17:42 diakopter timotimo: someone (jnthn?) added it to all the NQPs a few months ago
17:43 nine joined #perl6
17:44 ajr joined #perl6
17:54 timotimo oh nice
18:01 diakopter nqp-m: sub A($k, $x1, $x2, $x3, $x4, $x5) { return $x4() + $x5() if $k <= 0; my $B := sub () { --$k; return A($k, $B, $x1, $x2, $x3, $x4) }; return $B() }; sub K($n) { sub () { $n } }; say(A(18, K(1), K(-1), K(-1), K(1), K(0) ));
18:02 camelia nqp-moarvm: OUTPUT«-35600␤»
18:02 diakopter jnthn: !!!!! another wrong (and different) result...
18:02 diakopter nqp-m: sub A($k, $x1, $x2, $x3, $x4, $x5) { return $x4() + $x5() if $k <= 0; my $B := sub () { $k := $k - 1; return A($k, $B, $x1, $x2, $x3, $x4) }; return $B() }; sub K($n) { sub () { $n } }; say(A(18, K(1), K(-1), K(-1), K(1), K(0) ));
18:02 camelia nqp-moarvm: OUTPUT«-35601␤»
18:03 diakopter *sigh*
18:03 arnsholt That's the man or boy test, isn't it?
18:03 diakopter timotimo: well there you go, problem with the --
18:03 diakopter yep
18:03 diakopter -35,601 is the correct answer
18:04 diakopter jnthn: bug: $k-- doesn't do the same thing as $k := $k - 1
18:04 diakopter er, --$k
18:05 diakopter if I had to guess, it does decrement the local, but not the lexical or something
18:13 timotimo .o( my lexical to local optimisation hasn't hit master, right? )
18:13 timotimo .o( of course it hasn't! )
18:17 ajr_ If you have a little spare time, and/or care about Unicode, you might wander over to The Register for a look at this: http://www.theregister.co.uk/2​013/10/04/verity_stob_unicode/ For all the levity, there's some meat there and in the comments.
18:23 diakopter ajr_: yeah, but Perl 6 has dynamic per-string and/or per-interpreter codepages, with mappings to hopefully fit entirely in 8-bits
18:24 ajr_ Maybe that's a marketing slogan, for some definitions of "market"? :-)*
18:27 diakopter ... fsdo "has"
18:27 diakopter bbl
18:27 timotimo hehe.
18:32 arnsholt ajr_: Whee! That was a fun rant =D
18:32 ajr_ Verity is usually good for that.
18:34 * geekosaur tempted to say right but for the wrong reasons
18:35 geekosaur utf16/ucs2 is kinda the worst of both worlds
18:35 geekosaur since if you're doing significant CJK you will probably find yourself wishing for UTF32, and if not you probably prefer UTF8 :)
18:36 dalek rakudo/nom: 01c2e2a | (Elizabeth Mattijsen)++ | src/core/ (6 files):
18:36 dalek rakudo/nom: Initial implementation of .grab for Set/Bag/Mix
18:36 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/01c2e2a92c
18:37 * geekosaur thinks about a string representation that can use utf32 or utf8 as appropriate
18:37 lue hello world o/
18:37 timotimo grab is for when you want to change a random element out of the bag?
18:37 lue geekosaur: utf16 would be so much better if it worked like utf8
18:38 timotimo er, "a bunch of random elements" rather
18:38 geekosaur indeed
18:38 lizmat timotimo: yes
18:38 timotimo mhm, interesting
18:38 lizmat well, not change,
18:38 lizmat remove from
18:38 timotimo there's a "BIND" involved... so i thought it's for changing stuff
18:38 timotimo but okay
18:38 timotimo ah, i see how it works
18:39 lizmat well, I just called it BIND because .pick and .grab are *very* similar
18:39 lue .oO(We would also get characters past 0x10_FFFF)
18:44 timotimo did the fixes to make the classfile/jast writing faster hit yet? are they in some branch i could try out?
18:44 timotimo currently takes 22s for the jast stage and 5.8s for the classfile stage
18:48 slava is there any prediction on when moarvm will be distributed with rakudo star?
18:50 grondilu slava: hopefully next month, IIRC
18:50 PerlJam slava: I predict that the 2014-06 release of R* will have moarvm.   :-)
18:50 * PerlJam makes an upper bound, but not a least upper-bound
18:51 lue Where is MoarVM right now? Can NQP self-compile on it yet?
18:51 grondilu not yet
18:52 lizmat but pretty damn near, is my impression
18:52 grondilu nqp runs on moarvm and passed all nqp tests.  Now the team is working on bootstraping
18:52 grondilu (that is compiling itself, not with the cross-compiler)
18:54 dalek rakudo/nom: 0a2efdb | (Elizabeth Mattijsen)++ | src/core/Baggy.pm:
18:54 dalek rakudo/nom: For some reason, one must specify $_ here?  Otherwise:
18:54 dalek rakudo/nom:
18:54 dalek rakudo/nom: No such method 'key' for invocant of type 'Nil'
18:54 dalek rakudo/nom:   in method pick at src/gen/CORE.setting:15268
18:54 dalek rakudo/nom:   in block  at t/spec/S02-types/bag.rakudo.parrot:281
18:54 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/0a2efdbf46
18:54 * lue can't wait to replace the norewegian blue with MoarVM for his rakudo-ing
18:54 * lizmat too
18:55 bluescreen10 joined #perl6
18:56 grondilu there hasn't been any commit on MoarVM lately.  What's up?
18:56 lue s/nore/nor/
18:57 grondilu 'norwegian blue' ?
18:57 * grondilu doesn't get the reference
18:57 timotimo lizmat: seems like it would be parsed as a hash rather than a code block if you don't use $_
18:57 timotimo r: { .key => .value }.WHAT.say
18:57 camelia rakudo 61580f: OUTPUT«No such method 'key' for invocant of type 'Nil'␤  in block  at /tmp/e67ZvmRSKz:1␤␤»
18:57 PerlJam grondilu: I thought it was a parrot.
18:57 timotimo r: $_ = (a=>1); { .key => .value }.WHAT.say
18:57 camelia rakudo 61580f: OUTPUT«(Hash)␤»
18:57 timotimo r: $_ = (a=>1); { $_.key => $_.value }.WHAT.say
18:58 btyler monty python joke: https://en.wikipedia.org/wiki/Dead_Parrot_sketch
18:58 camelia rakudo 61580f: OUTPUT«(Block)␤»
18:58 lizmat they stun easily
18:58 lizmat timotimo: ah, indeed, timotimo++
19:01 lue grondilu: see btyler's message a couple lines up.
19:03 btyler (although, really, reading the wiki article about it is a sure way to kill the joke...it's on youtube and worth the few minutes :)
19:05 * lue thinks he's using the phrase "norwegian blue" similar to how people use "the scottish play". For some reason he has the silly notion saying "Parrot" is likely to cause trouble.
19:05 lesshaste joined #perl6
19:05 lesshaste hi
19:05 lesshaste what's the main aim of perl 6 ?
19:06 grondilu lue: btyler: yup got it
19:07 grondilu lesshaste: the same as perl 5, only in a more modern way.  As I understand it, anyway.
19:08 lesshaste grondilu, in what way modern ? :)
19:08 lesshaste I think you just moved my question to the word modern :)
19:08 grondilu rather "postmodern", as once explained by TimToady
19:08 PerlJam lesshaste: have you seen perl6.org yet?
19:08 lesshaste yes
19:08 lesshaste it is short on the "why?"
19:09 slava lesshaste: because perl6 is better
19:09 PerlJam lesshaste: Perl5 had some warts;  Perl6 was a way to fix them in a backwards incompatible way.
19:09 grondilu http://wall.org/~larry/pm.html
19:10 SamuraiJack__ joined #perl6
19:10 PerlJam lesshaste: for instance, Perl 6 has pervasive laziness.  You can't get that in Perl 5 without some deep changes to the language.
19:10 PerlJam lesshaste: same thing for the re-imagining of regular expressions as "grammars"
19:10 lesshaste oh dear
19:10 PerlJam lesshaste: same thing for the object model.
19:10 lesshaste that makes the author look insane
19:11 PerlJam (though p5-mop is an excellent start at giving p5 a real, built-in object model)
19:11 timotimo lesshaste: where have i seen your nickname before? o_O
19:12 lesshaste moresped?
19:13 lesshaste left #perl6
19:13 timotimo o_O
19:16 geekosaur they were just asking about timing in #haskell earlier today
19:17 FROGGS joined #perl6
19:18 geekosaur also that last exchange... "less haste more speed" which I think I first encountered in LOtR (the innkeeper at Bree, I think)
19:32 dalek rakudo/nom: 4fd3721 | (Elizabeth Mattijsen)++ | src/core/Setty.pm:
19:32 dalek rakudo/nom: We need Set.grab to return a List, rather than a Parcel
19:32 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/4fd3721e28
19:32 kaare_ joined #perl6
19:36 tipdbmp How can I pretty print something (array, hash, etc.), what's Perl 6's Data::Dumper or even better Data::Printer?
19:37 PerlJam tipdbmp: $thingy.perl
19:37 PerlJam r: my @a = <foo bar baz>;  say @a.perl;
19:37 camelia rakudo 0a2efd: OUTPUT«Array.new("foo", "bar", "baz")␤»
19:37 tipdbmp Yes, I knew that but I wouldn't call that pretty.
19:37 PerlJam r: my @a = <foo bar baz>;  say @a.gist;
19:37 camelia rakudo 0a2efd: OUTPUT«foo bar baz␤»
19:37 PerlJam better?
19:37 * PerlJam doesn't know what sort of "pretty" you're looking for.
19:38 PerlJam or ... I wouldn't call Data::Dumper pretty either
19:39 FROGGS o/
19:40 tipdbmp PerlJam, maybe in indent mode 2 or 3, but what I mean by pretty is to have \n and ' ' indentation, .perl is a single line?
19:40 lizmat TimToady: just wondering, since we have an .Array coercer, shouldn't .list also be .List ?
19:41 PerlJam tipdbmp: I think you'll have to write a module to get that version of "pretty"
19:43 tipdbmp Hm, okay =).
19:45 jnap joined #perl6
19:57 benabik Hm.  Does { .foo } not imply a $_ in the block?  Should it?
19:57 not_gerd joined #perl6
19:58 japhb_ joined #perl6
19:58 timotimo well, how do you do { .key => .value } if you actually want the outer $_'s .key and the outer $_'s value?
19:58 TimToady S04:1637
19:58 synopsebot Link: http://perlcabal.org/syn/S04.html#line_1637
19:58 TimToady you use a temporary in that case
19:59 benabik So judging from 0a2efdb, it's a Rakudobug?
19:59 timotimo huh?
19:59 TimToady I believe it's been reported, but I could be wrong...
19:59 not_gerd tipdbmp: see https://gist.github.com/gerdr/6831810 for some code that indents .perl output
20:01 dalek roast: adcc1c7 | (Elizabeth Mattijsen)++ | S02-types/ (4 files):
20:01 dalek roast: Add Set/Bag tests for .grab and .total
20:01 dalek roast: review: https://github.com/perl6/roast/commit/adcc1c74f1
20:01 dalek roast: 57a3771 | (Elizabeth Mattijsen)++ | S02-types/ (4 files):
20:01 dalek roast: Fudging for niecza / pugs for .total and .grab tests
20:01 dalek roast: review: https://github.com/perl6/roast/commit/57a3771e7f
20:02 TimToady lizmat: you really don't want me to make design decisions while I have a migraine...
20:02 TimToady even if it's the relatively painless sort
20:03 * lizmat hopes the migraine will soon go away, not just because of design decisions
20:03 lizmat :-)
20:04 timotimo not_gerd: your code doesn't handle smileys in quoted text well, it seems to me
20:05 not_gerd timotimo: what's your input data
20:08 raiph joined #perl6
20:09 timotimo sorry, i was just running the code in my head ;)
20:15 tipdbmp not_gerd, thanks, it's something.
20:19 TimToady lizmat: but I'd say offhand that .list only requires that it return something that can act like a list, not necessarily a List
20:19 woolfy We got a devroom at Fosdem 2014, Saturday, February 1, in Brussels: https://fosdem.org/2014/news/​2013-10-02-accepted-devrooms/  (see also http://wendyga.wordpress.com/2013/09/23/fosd​em-1-2-feb-2014-brussels-call-for-speakers/ )
20:20 diakopter woolfy: hi!
20:20 woolfy I hope some people here want to come to Brussels and speak about Perl 6 in our Perl-devroom.  I really hope Perl 6 will be represented.
20:20 woolfy We got a devroom!!!
20:20 woolfy diakopter: hi!
20:20 diakopter okay, so no particular group got more than 1 day
20:21 TimToady .oO(why would we want to de-vroom?)
20:22 woolfy diakopter: indeed.  Well, they have a limited number of rooms.  They might add some more later on.  But I am happy as it is that we got a devroom.
20:22 lue .oO(I thought we were talking about d eVroom)
20:22 woolfy TimToady: because we have too much Vroom
20:22 woolfy Vroom Vroom Vrooooooooom.....
20:22 diakopter woolfy: are you still accepting talk proposals for the Perl broom?
20:22 woolfy And since Perl is the solution to everything, Perl will also assist in this difficult matter.
20:23 woolfy diakopter: ehm, I just asked for proposals...  :-)
20:23 woolfy "(10:19:55 PM) woolfy: I hope some people here want to come to Brussels and speak about Perl 6 in our Perl-devroom.  I really hope Perl 6 will be represented."
20:23 diakopter oh, it says it was published 9/23
20:23 lizmat TimToady: ok, whereas .Array would be a true coercer
20:24 diakopter oh, I issed hat essage
20:24 woolfy Oh, my blog...  well, yes, that blog was both about the main room (for which the deadline is passed) and our devroom (for which the deadline lays far into the future).
20:24 TimToady plus lists are sort of an honorary built-in native type, though not so much as in Perl 5...
20:26 TimToady and lists are more about data flow, not data structure, in Perl
20:26 lizmat on that note: is there a reason why {} and [] slices return a Parcel, rather than a list ?
20:26 TimToady because they're generally more like tuplies of known arity
20:26 TimToady *tuples
20:27 lizmat so shouldn't .pick / .roll / .grab not return Parcels as well ?
20:28 TimToady now you're asking for design again :)
20:28 TimToady there should be a smiley for "half my head feels like it's missing"
20:28 TimToady .)
20:29 lue .oO( \c[RIGHT PARENTHESIS BOTTOM HALF] )
20:32 lizmat TimToady: sorry  :-(   I know I'm a pain in any normal kind of situation already   :-)
20:36 TimToady on camelia aliases, I suspect at some point we should retire pugs to not have a p alias, and instead have p, j, and m aliases for parrot, jvm, and moar, with r racing all three against each other
20:38 moritz eventually, yes
20:38 TimToady maybe with capitals for nqp
20:39 TimToady or a modifier that just applies across the board
20:40 TimToady just ideas from my right brane, which is happy it's not the side that makes decisions .)
20:40 dalek rakudo/nom: c962e51 | (Elizabeth Mattijsen)++ | src/core/ (3 files):
20:40 dalek rakudo/nom: Make .total constant attribute for Set/Bag/Mix
20:40 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/c962e51d00
20:42 TimToady does it even need to be an attribute?
20:42 TimToady if the total method just closes over the role parameter?
20:43 TimToady well, or over something calculated by the role, if not a parameter
20:43 * lizmat is stupid, a state var will do the trick nicely and be cheaper if not used
20:43 TimToady I suppose there's not much harm in storing one number with the rest of the data
20:44 TimToady partly why I was thinking the immutable form was a different role than the mutable
20:45 BenGoldberg joined #perl6
20:46 konundra joined #perl6
20:48 lizmat submethod total { state $total = [+] self.values }  # would also do the trick, and be without burden to the object if not used
20:55 lizmat hmmm… perhaps not
20:57 moritz nah, state isn't scoped per instance
20:57 moritz but rather per closure clone
20:58 lizmat indeed  :-(
21:04 lizmat ok leaving that idea for future optimizers  :-)
21:08 donaldh joined #perl6
21:10 dalek rakudo/nom: 9f6f443 | (Elizabeth Mattijsen)++ | src/core/ (2 files):
21:10 dalek rakudo/nom: Burdening all Set/Bag objects with .total calculation, doesn't make sense
21:10 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/9f6f443d94
21:12 ssutch joined #perl6
21:25 donaldh jnthn: does eliminating priorInvocation on JVM require jnthn-fu ?
21:25 Mouq joined #perl6
21:25 Mouq #perl6++
21:27 diakopter donaldh: O
21:27 diakopter donaldh: I'd guess if you studied the relevant commits in moarvm, you could figure it out
21:28 donaldh diakopter: yes, I'm thinking the same.
21:29 diakopter they're pretty small/few iirc
21:29 donaldh Oh, it was just at the weekend.
21:31 Mouq nqp-m: nqp::say('hi') # :D
21:31 camelia nqp-moarvm: OUTPUT«hi␤»
21:32 dalek Perlito: a204083 | (Flavio S. Glock)++ | misc/pretty_print.pl:
21:32 dalek Perlito: Perlito5 - pretty-printer AST
21:32 dalek Perlito: review: https://github.com/fglock/​Perlito/commit/a204083365
21:32 dalek Perlito: 913bc28 | (Flavio S. Glock)++ | misc/pretty_print.pl:
21:32 dalek Perlito: Perlito5 - pretty-printer precedence
21:32 dalek Perlito: review: https://github.com/fglock/​Perlito/commit/913bc28ec9
21:32 dalek Perlito: e1b541e | (Flavio S. Glock)++ | misc/pretty_print.pl:
21:32 dalek Perlito: Perlito5 - pretty-printer precedence, special cases
21:32 dalek Perlito: review: https://github.com/fglock/​Perlito/commit/e1b541e4c2
21:36 donaldh Okay, so closure changes in nqp then codegen changes required to make use of it in backend.
21:43 bruges joined #perl6
21:52 Ben_Goldberg joined #perl6
21:58 dalek rakudo/nom: be96b97 | (Elizabeth Mattijsen)++ | src/core/Mixy.pm:
21:58 dalek rakudo/nom: Make sure that Mixy allows for negative values when building
21:58 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/be96b97389
22:02 dalek rakudo/nom: 560b416 | (Elizabeth Mattijsen)++ | src/core/Baggy.pm:
22:02 dalek rakudo/nom: Make sure we coerce multiplication factors to Int for Baggy
22:02 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/560b416bdd
22:12 dalek rakudo/nom: 4b41c01 | (Elizabeth Mattijsen)++ | src/core/ (4 files):
22:12 dalek rakudo/nom: Make sure Mixy / Baggy coerce correctly to each other
22:12 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/4b41c01939
22:21 skids joined #perl6
22:31 TimToady we should probably add an optional key type to those roles at some point
22:33 lizmat hmmm… why not now ?
22:33 TimToady now is a point...oh wait, now it's in the past :)
22:34 lizmat well, maybe not today, trying to finish up Mix/MixHash tests before sleep
22:35 * diakopter reads MixMaster
22:36 lizmat r: my $m=MixHash.new; $m<d>--; say $m  # should we allow decrementing on non-existent elements in a MixHash ?
22:36 camelia rakudo 560b41: OUTPUT«MixHash.new(d(-1))␤»
22:37 lizmat I guess it makes sense since we allow negative values
22:37 lizmat only 0 makes elements disappear
22:37 TimToady make sense to me
22:37 TimToady (design brane is starting to wake up a little)
22:37 diakopter nqp: sub A($k, $x1, $x2, $x3, $x4, $x5) { return $x4() + $x5() if $k <= 0; my $B := sub () { $k := $k - 1; return A($k, $B, $x1, $x2, $x3, $x4) }; return $B() }; sub K($n) { sub () { $n } }; say(A(18, K(1), K(-1), K(-1), K(1), K(0) ));
22:37 camelia nqp: OUTPUT«maximum recursion depth exceeded␤current instr.: '' pc 262 ((file unknown):60546898) (/tmp/5Sshcl1doW:1)␤»
22:38 diakopter mwahaha
22:38 diakopter nqp-jvm: sub A($k, $x1, $x2, $x3, $x4, $x5) { return $x4() + $x5() if $k <= 0; my $B := sub () { $k := $k - 1; return A($k, $B, $x1, $x2, $x3, $x4) }; return $B() }; sub K($n) { sub () { $n } }; say(A(18, K(1), K(-1), K(-1), K(1), K(0) ));
22:38 REPLeffect joined #perl6
22:38 camelia nqp-jvm: OUTPUT«Unhandled exception: java.lang.StackOverflowError␤  in ␤  in ␤  in A␤  in ␤  in A␤  in ␤  in A␤  in ␤  in A␤  in ␤  in A␤  in ␤  in A␤  in ␤  in A␤  in ␤  in A␤  in ␤  in A␤  in ␤  in A␤  in ␤  in A␤  in ␤  in A␤  i…»
22:38 diakopter mwahaha
22:38 diakopter there's the benefit of moarvm
22:38 diakopter well, one of them
22:38 diakopter (yes, I know you can turn off the recursion limit on parrot)
22:39 diakopter (but that's not how its distributed) ;)
22:39 diakopter *it's
22:39 donaldh and increase the stack on JVM
22:39 diakopter true.
22:41 dalek nqp: bb33397 | (Donald Hunter)++ | src/vm/jvm/runtime/org/perl6/nq​p/runtime/CompilationUnit.java:
22:41 dalek nqp: Avoid allocating zero length arrays in CodeRef.
22:41 dalek nqp: review: https://github.com/perl6/nqp/commit/bb33397d5e
22:41 dalek nqp: 5ef6bcc | (Donald Hunter)++ | src/vm/jvm/runtime/org/perl6/nq​p/sixmodel/reprs/VMArray.java:
22:41 dalek nqp: Presize arrays when deserializing.
22:41 dalek nqp: review: https://github.com/perl6/nqp/commit/5ef6bccb72
22:41 dalek nqp: 5cab6ef | (Donald Hunter)++ | src/vm/jvm/runtime/org/perl6/nqp/si​xmodel/reprs/VMArrayInstance.java:
22:41 dalek nqp: Allow min size of VMArrayInstance to be 4 elems.
22:41 dalek nqp: review: https://github.com/perl6/nqp/commit/5cab6ef5e8
22:42 diakopter nqp-jvm: sub A($k, $x1, $x2, $x3, $x4, $x5) { return $x4() + $x5() if $k <= 0; my $B := sub () { $k := $k - 1; return A($k, $B, $x1, $x2, $x3, $x4) }; return $B() }; sub K($n) { sub () { $n } }; say(A(12, K(1), K(-1), K(-1), K(1), K(0) ));
22:42 camelia nqp-jvm: OUTPUT«Unhandled exception: java.lang.StackOverflowError␤  in ␤  in ␤  in A␤  in ␤  in A␤  in ␤  in A␤  in ␤  in A␤  in ␤  in A␤  in ␤  in A␤  in ␤  in A␤  in ␤  in A␤  in ␤  in A␤  in ␤  in A␤  in ␤  in A␤  in ␤  in A␤  i…»
22:43 diakopter nqp-jvm: sub A($k, $x1, $x2, $x3, $x4, $x5) { return $x4() + $x5() if $k <= 0; my $B := sub () { $k := $k - 1; return A($k, $B, $x1, $x2, $x3, $x4) }; return $B() }; sub K($n) { sub () { $n } }; say(A(8, K(1), K(-1), K(-1), K(1), K(0) ));
22:43 camelia nqp-jvm: OUTPUT«0␤»
22:43 diakopter wrong; the correct answer is -10
22:43 diakopter nqp-m: sub A($k, $x1, $x2, $x3, $x4, $x5) { return $x4() + $x5() if $k <= 0; my $B := sub () { $k := $k - 1; return A($k, $B, $x1, $x2, $x3, $x4) }; return $B() }; sub K($n) { sub () { $n } }; say(A(8, K(1), K(-1), K(-1), K(1), K(0) ));
22:43 camelia nqp-moarvm: OUTPUT«-10␤»
22:43 diakopter whoa that was fast
22:43 diakopter nqp-m: sub A($k, $x1, $x2, $x3, $x4, $x5) { return $x4() + $x5() if $k <= 0; my $B := sub () { $k := $k - 1; return A($k, $B, $x1, $x2, $x3, $x4) }; return $B() }; sub K($n) { sub () { $n } }; say(A(8, K(1), K(-1), K(-1), K(1), K(0) ));
22:43 camelia nqp-moarvm: OUTPUT«-10␤»
22:43 diakopter nqp-m: sub A($k, $x1, $x2, $x3, $x4, $x5) { return $x4() + $x5() if $k <= 0; my $B := sub () { $k := $k - 1; return A($k, $B, $x1, $x2, $x3, $x4) }; return $B() }; sub K($n) { sub () { $n } }; say(A(8, K(1), K(-1), K(-1), K(1), K(0) ));
22:43 camelia nqp-moarvm: OUTPUT«-10␤»
22:43 diakopter bleh
22:44 diakopter well ok
22:44 diakopter nqp: sub A($k, $x1, $x2, $x3, $x4, $x5) { return $x4() + $x5() if $k <= 0; my $B := sub () { $k := $k - 1; return A($k, $B, $x1, $x2, $x3, $x4) }; return $B() }; sub K($n) { sub () { $n } }; say(A(8, K(1), K(-1), K(-1), K(1), K(0) ));
22:44 camelia nqp: OUTPUT«0␤»
22:44 diakopter ha; nqp on rakudo gets it wrong too
22:44 diakopter er.
22:44 diakopter nqp on parrot.
22:44 donaldh :)
22:45 diakopter .oO( you know someone is performance obsessed when the regression suite of the vm included the man-or-boy benchmark from the earliest days... )
22:46 jnthn diakopter: Oh, I was mostly happy to see it from the point of view of testing closure semantics.
22:46 jnthn donaldh: You can probably make quite some headway from the moar patches
22:46 diakopter jnthn: see nqp on parrot and jvm get the answer wrong
22:46 dalek roast: a33884d | (Elizabeth Mattijsen)++ | S02-types/ (4 files):
22:46 dalek roast: Added tests for Mix/MixHash and fixed some Bag/BagHash tests
22:46 dalek roast: review: https://github.com/perl6/roast/commit/a33884d022
22:46 donaldh jnthn: yeah, needs more time to grok the moar patches than I have this weekend.
22:47 jnthn donaldh: OK, no hurry :)
22:47 lizmat that's 300+ more tests
22:47 * diakopter hopes that leads donaldh to start contributing to moar..
22:47 * donaldh is happy in jvm land for now.
22:47 diakopter lizmat: whoa
22:48 lizmat mostly cat-licensing
22:48 diakopter say "We do get here, right?";
22:48 jnthn lizmat: Nice! Glad we're adding test coverage :)
22:51 ingy sorear: pings
22:51 donaldh can I push directly from the same git branch to master more than once?
22:52 ingy sorear: could you drop by freenode #yaml
22:52 donaldh i.e. using git push origin mybranch:master ?
22:54 dalek nqp: 464b5d4 | (Donald Hunter)++ | src/vm/jvm/runtime/org/perl6/nq​p/runtime/StaticCodeInfo.java:
22:54 dalek nqp: Avoid allocating HashMaps when lexical vars are null.
22:54 dalek nqp: review: https://github.com/perl6/nqp/commit/464b5d4979
22:55 * donaldh realised it was a kinda silly question
22:57 donaldh goodnight o/
22:58 dalek rakudo/nom: 93c6271 | (Elizabeth Mattijsen)++ | t/spectest.data:
22:58 dalek rakudo/nom: Make sure we run the Mix/MixHash tests as well
22:58 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/93c627164e
22:59 lizmat and on that thought, I wish everybody a good *
22:59 lizmat and get some shuteye&
22:59 jnthn 'night, lizmat++
23:06 bbkr__ joined #perl6
23:11 raiph joined #perl6
23:11 dalek Perlito: 24620a5 | (Flavio S. Glock)++ | / (6 files):
23:11 dalek Perlito: Perlito5 - perl5 - new pretty-printer backend
23:11 dalek Perlito: review: https://github.com/fglock/​Perlito/commit/24620a5486
23:31 ingy anyone here use Mono?
23:34 TimToady n: say "Hi, Ingy, from mono."
23:34 camelia niecza v24-98-g473bd20: OUTPUT«Hi, Ingy, from mono.␤»
23:35 ingy TimToady++
23:36 ingy I am trying to figure out how to run csharp 1liners from commandline
23:36 ingy it has a repl
23:37 TimToady csharp would be more jnthn++'s bailiwick
23:37 ingy well I think it's more mono than c#
23:38 ingy thus my pining for sorear
23:38 jnthn Hm, wasn't aware of a repl, but I'm almost always using the MS toolchain rather than Mono.
23:39 TimToady sorear++ has been kinda heads down at his job lately
23:39 ingy echo 'Console.WriteLine ("hello");' | csharp
23:39 ingy # FTW!
23:39 jnthn That works? :)
23:39 ingy :D
23:39 jnthn Nice :)
23:40 ingy it was just a guess but it works
23:40 jnthn afaik, csc always wants the boring boilerplate... :)
23:41 ingy I made this: https://gist.github.com/ingydotnet/6833981
23:41 ingy script for multi-loading yaml
23:41 * ingy has climbed back into the helm of the yaml ship this week
23:42 ingy and pushing forward with YAML2
23:42 ingy one thought is to write a reference y2 implementation in p6
23:43 diakopter jnthn: any ideas why that man-or-boy one-liner fails in nqp parrot & jvm?
23:43 ingy there are a few reasons why I want to do that
23:43 jnthn diakopter: no
23:44 jnthn diakopter: No idea if it's closure related or not
23:44 jnthn diakopter: If it is, JVM is having changes there soon anyway
23:44 jnthn diakopter: So can revisit it then.
23:47 jnthn time for some rest...'night o/
23:56 [Coke] nqp-moar: say(3); # where is this coming from?
23:56 [Coke] nqp-moarvm: say(3); # where is this coming from?
23:56 camelia nqp-moarvm: OUTPUT«3␤»
23:57 [Coke] it's not in nqp yet...

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

Perl 6 | Reference Documentation | Rakudo