Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2014-07-31

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:05 nbrown joined #perl6
00:10 cooper_ joined #perl6
00:14 nbrown joined #perl6
00:15 dayangkun joined #perl6
00:21 timotimo m: my @a = [1, 5, 10], [5, 5, 5], [99, 1, 1]; say [>>+<<] @a;
00:21 camelia rakudo-moar ae2ffe: OUTPUT«105 11 16␤»
00:21 timotimo i'm amazed that this works.
00:22 timotimo well, not amazed. not that surprised. but very pleased indeed.
00:25 BenGoldberg joined #perl6
00:27 cooper_ joined #perl6
00:29 jnthn grmbl...can't figure out why my regex opt thingy is spookily buggy...
00:29 jnthn ah well, sleep...can look more tomorrow :)
00:29 jnthn 'night, #perl6
00:32 timotimo oooh regex opts :3
00:33 timotimo m: my @a = $(1, 5, 10); say [>>+<<] @a;
00:33 camelia rakudo-moar ae2ffe: OUTPUT«Not enough positional parameters passed; got 1 but expected 2␤  in block  at src/gen/m-CORE.setting:17599␤  in sub  at src/gen/m-CORE.setting:17490␤  in block  at /tmp/bP888xBvME:1␤␤»
00:33 timotimo m: my @a = $(1, 5, 10; say [>>+<<] @a;
00:33 camelia rakudo-moar ae2ffe: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/NVIT9ozF95â�¤Unable to parse expression in contextualizer; couldn't find final ')' â�¤at /tmp/NVIT9ozF95:1â�¤------> [32mmy @a = $(1, 5, 10; say [>>+<<] @a;[33mâ��[31m<EOL>[0mâ�¤    expecting an…»
00:33 timotimo m: my @a = [1, 5, 10]; say [>>+<<] @a;
00:33 camelia rakudo-moar ae2ffe: OUTPUT«Not enough positional parameters passed; got 1 but expected 2␤  in block  at src/gen/m-CORE.setting:17599␤  in sub  at src/gen/m-CORE.setting:17490␤  in block  at /tmp/9QNKe2NPy2:1␤␤»
00:34 timotimo m: my @a = [1, 5, 10], [2, 2, 2]; say [>>+<<] @a;
00:34 camelia rakudo-moar ae2ffe: OUTPUT«3 7 12␤»
00:34 timotimo oh.
00:35 TimToady odd, usually it just returns the single argument if there's only one
00:36 timotimo apparently >>+<< isn't satisfied with a single argument in this case
00:39 ingy greets! I'm at one of those times when I need to install a recent perl6
00:39 ingy on ubuntu 12.04
00:39 ingy ideas?
00:40 ingy of course I need it to help me make a new language
00:40 timotimo i usually recommend getting rakudobrew from github.com/tadzik/rakudobrew and letting it do all the magic for you
00:40 ingy but that's what perl6 is best for :)
00:40 ingy timotimo: thx! will try it
00:44 ingy timotimo: seems to be doing stuff :)
00:44 timotimo good :)
00:44 timotimo it'll install stuff in your home, you'll have to add something to your path
00:44 timotimo you'll most probably want to get it to build a rakudo-moar for you
00:45 timotimo but you probably already know that ;)
00:45 ingy $ rakudobrew build moar # is what I ran
00:45 timotimo yup
00:46 timotimo when that finishes, you can ask it to install panda for you, too
00:46 ingy yeah
00:46 ingy maybe I'll update my old p6 modules
00:47 * ingy saw this in s02: todo(:parrøt<0.42>, :dötnet<1.2>));
00:48 ingy funny
00:48 ingy p6 is a good language to steal ideas from
00:48 timotimo i remember you stumbling upon that :)
00:48 ingy thanks all!
00:48 ingy last night, yeah
00:49 ingy I let the synopses put me to sleepzzz
00:49 timotimo gnite! :)
00:50 ingy timotimo: no that was last night
00:50 ingy I'm in full swing now
00:51 timotimo OK :)
00:51 ingy TimToady: how's UR <ö> doin'?
00:52 TimToady 'bout ½ gas, ½ water
00:52 TimToady very sloshy
00:52 ribasushi joined #perl6
00:52 ingy Keep UR head down!
00:52 TimToady right, though I'm allowed to sleep on one side or the other :)
00:53 TimToady pretty much impossible to sleep on my face
00:53 ingy you meed a massage table
00:54 TimToady that's not the main issue(s)
00:54 ingy with a face toilet seat
00:54 TimToady neither my GERD nor my vertigo cooperate
00:55 * ingy wonders what is more complicated, P6 or TimToady's constitution…
00:55 TimToady BPPV, I suppose
00:56 thou joined #perl6
01:04 nbrown joined #perl6
01:12 colomon joined #perl6
01:19 SevenWolf joined #perl6
01:35 kst joined #perl6
01:39 iarna joined #perl6
01:43 klapperl joined #perl6
01:50 FROGGS_ joined #perl6
01:56 awwaiid joined #perl6
02:15 rurban joined #perl6
02:16 noganex_ joined #perl6
02:16 iarna joined #perl6
02:18 lustlife joined #perl6
02:33 hoelzro say(try { 1 CATCH {} })
02:33 hoelzro oops
02:33 hoelzro m: say(try { 1 CATCH {} })
02:33 camelia rakudo-moar ae2ffe: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/GCfgCMg2CAâ�¤Two terms in a rowâ�¤at /tmp/GCfgCMg2CA:1â�¤------> [32msay(try { 1 [33mâ��[31mCATCH {} })[0mâ�¤    expecting any of:â�¤        postfixâ�¤        infix stopperâ�¤        infix or me…»
02:33 hoelzro hmm
02:33 hoelzro m: sub f { try { 1 CATCH {} } } say(f())
02:33 camelia rakudo-moar ae2ffe: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/mKpnHlXCEKâ�¤Two terms in a rowâ�¤at /tmp/mKpnHlXCEK:1â�¤------> [32msub f { try { 1 [33mâ��[31mCATCH {} } } say(f())[0mâ�¤    expecting any of:â�¤        postfixâ�¤        infix stopperâ�¤     …»
02:33 hoelzro one more time...
02:33 hoelzro m: sub f { try { 1 CATCH {} } } ; say(f())
02:33 camelia rakudo-moar ae2ffe: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/JdEE0oVcgsâ�¤Two terms in a rowâ�¤at /tmp/JdEE0oVcgs:1â�¤------> [32msub f { try { 1 [33mâ��[31mCATCH {} } } ; say(f())[0mâ�¤    expecting any of:â�¤        postfixâ�¤        infix stopperâ�¤   …»
02:34 hoelzro oh, I see it now
02:34 hoelzro m: sub f { try { 1; CATCH {} } } ; say(f())
02:34 camelia rakudo-moar ae2ffe: OUTPUT«Nil␤»
02:34 hoelzro so I expected f to return 1
02:34 hoelzro it that unreasonable?
02:36 TimToady I would expect it to return 1 as well
02:36 hoelzro n: sub f { try { 1; CATCH {} } } ; say(f())
02:36 camelia niecza v24-109-g48a8de3: OUTPUT«Nil␤»
02:37 hoelzro m: sub f { try { CATCH {} ; 1 } } ; say(f())
02:37 camelia rakudo-moar ae2ffe: OUTPUT«1␤»
02:37 TimToady interesting
02:39 PerlJam good evening #perl6
02:39 hoelzro ahoy PerlJam
02:43 PerlJam hoelzro: so ... any LHF on S26 ?  Something to ease me in? : )
02:43 PerlJam er, :)
02:43 hoelzro hmm
02:43 hoelzro let's have a look
02:43 hoelzro well, tests are easy =)
02:43 TimToady we could potentially spec that phasers that do not return a value are spliced out of the sequence of statements
02:44 hoelzro I started on checking $=pod in the leading comment test; that needs to be more thorough
02:44 hoelzro TimToady: that makes sense to me
02:44 PerlJam TimToady: +1
02:44 hoelzro PerlJam: I don't think there are tests for certain decls, ex. regexes and grammars.  So we need tests for all decl types
02:44 hoelzro even documenting which ones are missing would be helpful!
02:45 TimToady well, I could argue it the other way too, where it could lead people to expect that an expression is in sink context when it isn't really
02:45 PerlJam hoelzro: okay, I'll poke around and see what I find.
02:45 TimToady also, arguably, it's a list of exceptions to memorize, at least until it's obvious why some phasers can return values and others can't
02:46 TimToady I'm a little surprised we don't have a warning for a literal in sink context
02:46 TimToady m: sub f { try { 1 + 1; CATCH {} } } ; say(f())
02:46 camelia rakudo-moar ae2ffe: OUTPUT«Nil␤»
02:46 TimToady m: sub f { try { 1 + 1; 42; CATCH {} } } ; say(f())
02:46 camelia rakudo-moar ae2ffe: OUTPUT«Nil␤»
02:47 TimToady 1+1; 42
02:47 TimToady m: 1+1; 42
02:47 camelia rakudo-moar ae2ffe: OUTPUT«WARNINGS:␤Useless use of "+" in expression "1+1" in sink context (line 1)␤»
02:47 hoelzro PerlJam: oh, and trailing space isn't tested very thoroughly either
02:47 hoelzro now that I'm looking at my notes...
02:47 hoelzro TimToady: do you think it would make sense to be able to do #| comment \n our $var;?
02:47 hoelzro or, for that matter, my $var
02:48 TimToady m: sub f { 1+1; try { 42; CATCH {} } } ; say(f())
02:48 camelia rakudo-moar ae2ffe: OUTPUT«Nil␤»
02:48 TimToady m: sub f { 1+1; 42; } ; say(f())
02:48 camelia rakudo-moar ae2ffe: OUTPUT«42␤»
02:48 TimToady why you no warn me?
02:48 TimToady hoelzro: why not?
02:49 * hoelzro shrugs
02:49 hoelzro because it's not currently in the spec? =)
02:49 TimToady especially if there's a really large initializer...
02:49 TimToady I don't see any reason to differentiate declarations by type that way
02:50 hoelzro alright
02:50 TimToady yeah, it's kind of hard to put #= on a sub, but not impossible
02:50 TimToady sub foo #= \n ($a,$b) {...}
02:51 hoelzro makes sense
02:51 TimToady and again, why make people memorize a list?
02:51 hoelzro indeed
02:51 TimToady masak: ^^ a missing warning bug
02:52 TimToady which would have at least tipped us off to what was going on in { 1; CATCH {} }
02:52 hoelzro indeed
02:53 TimToady m: 42; 43;
02:53 camelia rakudo-moar ae2ffe: OUTPUT«WARNINGS:␤Useless use of constant integer 42 in sink context (line 1)␤»
02:53 TimToady m: { 42; 43; }
02:53 camelia rakudo-moar ae2ffe: ( no output )
02:53 hoelzro how odd
02:53 TimToady seems silly to only do it in the mainline
02:56 dalek specs: 1839cd7 | TimToady++ | S04-control.pod:
02:56 dalek specs: start returns a value (a promise)
02:56 dalek specs: review: https://github.com/perl6/specs/commit/1839cd7945
03:00 raiph joined #perl6
03:02 chenryn joined #perl6
03:07 kaare_ joined #perl6
03:23 hoelzro in method Str(Mu \v:), is it possible to access the variable name of the the invocant, since v is a container here?
03:28 yoleaux joined #perl6
03:32 yoleaux joined #perl6
03:39 raiph m: class A { method Str (Mu \v:) { say v.name } }; my $f = A.new; $f.Str
03:39 camelia rakudo-moar ae2ffe: OUTPUT«No such method 'name' for invocant of type 'A'␤  in method Str at /tmp/jNnHWNj0kY:1␤  in block  at /tmp/jNnHWNj0kY:1␤␤»
03:40 raiph m: class A { method Str (Mu \v:) { say v.VAR.name } }; my $f = A.new; $f.Str
03:40 camelia rakudo-moar ae2ffe: OUTPUT«$f␤»
03:40 raiph hoelzro ^^ ?
03:43 hoelzro raiph: hmm...I thought I'd tried the latter
03:43 * hoelzro tries again
03:44 ventica joined #perl6
03:48 hoelzro hmm
03:48 hoelzro that doesn't work for interpolation
03:48 hoelzro m: class A { method Str (Mu \v:) { say v.VAR.name } }; my $f = A.new; "$f"
03:48 camelia rakudo-moar ae2ffe: OUTPUT«No such method 'name' for invocant of type 'A'␤  in method Str at /tmp/R_MUl7bjNf:1␤  in method Stringy at src/gen/m-CORE.setting:1018␤  in block  at /tmp/R_MUl7bjNf:1␤␤»
03:55 SamuraiJack joined #perl6
04:06 iarna joined #perl6
04:09 rindolf joined #perl6
04:22 gtodd m: my @weights=[57..66].say
04:22 camelia rakudo-moar ae2ffe: OUTPUT«57 58 59 60 61 62 63 64 65 66␤»
04:26 gtodd m: my @weights=[57..66] ; my $elems="LaCePrNd,Sm,,Tb,Dy ; $elems~~ /. ** 2/
04:26 camelia rakudo-moar ae2ffe: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/VZnAsZb6DNâ�¤Unable to parse expression in double quotes; couldn't find final '"' â�¤at /tmp/VZnAsZb6DN:1â�¤------> [32m="LaCePrNd,Sm,,Tb,Dy ; $elems~~ /. ** 2/[33mâ��[31m<EOL>[0mâ�¤    expectin…»
04:27 gtodd m: my @weights=[57..66] ; my $elems="LaCePrNd,Sm,,Tb,Dy"; $elems~~ /. ** 2/
04:27 camelia rakudo-moar ae2ffe: ( no output )
04:27 gtodd m: my @weights=[57..66] ; my $elems="LaCePrNd,Sm,,Tb,Dy"; $elems~~ /. ** 2/.SAY
04:27 camelia rakudo-moar ae2ffe: OUTPUT«No such method 'SAY' for invocant of type 'Regex'␤  in block  at /tmp/lDjpbi43h0:1␤␤»
04:28 gtodd OOPS
04:28 gtodd /MSG CAMELIA
04:37 gfldex joined #perl6
04:41 kaare_ joined #perl6
04:43 chenryn joined #perl6
05:13 masak morning, #perl6
05:14 dayangkun joined #perl6
05:14 masak m: my @weights=[57..66].say; say @weights
05:14 camelia rakudo-moar ae2ffe: OUTPUT«57 58 59 60 61 62 63 64 65 66␤True␤»
05:14 masak gtodd: observe the "True" at the end. that's what you end up storing in @weights.
05:15 masak gtodd: (because that's what .say returns)
05:30 gtodd1 joined #perl6
05:33 btyler is there a way to re-bless an object into a child class? this might be a "solve this problem some other way" situation, but I've got a generic constructor that I'd like to return a more specific object once part of the constructor has completed. specifically, libjansson returns a generic JSON object, which I'd like to specify into a JSON::Array or JSON::Object without re-running the inherited constructor
05:33 btyler I tried making JSON::Object/Array roles and mixing them into the JSON object in the constructor, but since this is NativeCall the repr can't be modified like that
05:37 btyler basically I want to let jansson initialize a generic thing, then query it for the type of the JSON document in question and change the perl6-level label/methods associated at that point
05:38 [Sno] joined #perl6
05:41 SamuraiJack joined #perl6
05:47 btyler hmm, found nqp::rebless, but foiled by the repr again "this repr cannot change type"
05:59 denis_boyun joined #perl6
06:00 zengargoyle joined #perl6
06:22 Woodi joined #perl6
06:38 sergot hi o/
06:39 tadzik hey hey
06:41 kaleem joined #perl6
06:44 sergot tadzik: have you installed the HTTP::UserAgent successfully?
06:46 sergot tadzik: carlin had probably the same problem
06:46 sergot and I can't reproduce it, could you help me solving it?
06:48 brrt joined #perl6
06:49 virtualsue joined #perl6
06:55 masak btyler: reading S12, I have the sense that the best you can hope for is a custom 'clone into subclass' method.
06:55 masak though I may be wrong.
06:57 masak btyler: it may or may not be enough to `but` in a subclass.
06:58 masak m: class A {}; class B is A {}; class C is B { has $.foo = 'OH HAI' }; my $a = A.new; my $ac = $a but role :: is C {}; say $ac.foo
06:58 camelia rakudo-moar ae2ffe: OUTPUT«Could not build C3 linearization: ambiguous hierarchy␤  in any c3_merge at src/gen/m-Metamodel.nqp:874␤  in any compute_mro at src/gen/m-Metamodel.nqp:797␤  in any compose at src/gen/m-Metamodel.nqp:2492␤  in any mixin at src/gen/m-Metamodel.nqp:10…»
06:59 masak ah, interesting.
06:59 masak so that's one of the C3 limitations one can run up against :)
07:00 masak it... surprises me a little bit, because it feels like in a sense, I'm not doing anything different here than multiple inheritance.
07:02 zakharyas joined #perl6
07:14 btyler masak: thanks. the complicating factor here is NativeCall -- essentially I want to steal the CPointer and retype it into the child class
07:15 btyler which is why something like "but" is no go - the CPointer repr doesn't allow modification like that
07:15 btyler anyways, no big deal, just moved back to having a single class with methods that decide how to behave by checking on the type of the json data
07:15 masak sounds sensible.
07:15 btyler rather than different types for different json array/object, etc
07:19 masak *nod*
07:21 btyler hmm, occurs to me that this is exactly what nativecast is for
07:32 tadzik sergot: I don't think I retried, frankly :/
07:32 tadzik let's see if it magically started working
07:35 Akagi201 joined #perl6
07:38 avuserow joined #perl6
07:39 rurban joined #perl6
07:40 dmol joined #perl6
07:41 Akagi201 joined #perl6
07:48 sergot ok :)
07:52 darutoko joined #perl6
08:01 Ven joined #perl6
08:09 nwc10 pugs: say 6.8598e+01 / 7.1820e+01
08:09 camelia pugs: OUTPUT«0.95513784461152882​20551378446115288220551␤»
08:09 nwc10 pugs: say 4.736e+02 /  6.8598e+01 # 7.1820e+01
08:09 camelia pugs: OUTPUT«6.90399137001078748​65156418554476806903991␤»
08:10 nwc10 no, that's the one I wanted. Moar now 6.9 times faster than parrot at compiling the setting
08:13 Woodi hi today #perl6
08:13 Ven oh, looks like PHP is getting a specification.
08:13 nwc10 do you have a link?
08:14 Woodi btyler: is your code using nativecalls available to look at somewhere ?
08:16 Woodi PHP specification ? why ? someone want to write his own interpreter ? :)
08:18 Woodi btw. IMO PHP near killed Perl becouse mod_perl is mainly used for scripting httpd.conf... which is not first thing page writer wants...
08:19 FROGGS joined #perl6
08:24 ponbiki joined #perl6
08:28 Ven nwc10: https://github.com/php/php-langspec
08:29 nwc10 Ven: thanks
08:29 Ven Woodi: php *did* kill perl, not near ...
08:30 nwc10 https://github.com/php/php-l​angspec/blob/master/LICENSE -- Facebook has dedicated all copyright to this specification ...
08:30 sergot m: use v9;
08:30 camelia rakudo-moar ae2ffe: ( no output )
08:30 sergot m: use v1-;
08:30 camelia rakudo-moar ae2ffe: OUTPUT«===SORRY!===␤Could not find v1 in any of: /home/p6eval/rakudo-inst-1/languages/perl6/lib, /home/p6eval/rakudo-inst-1/languages/perl6␤»
08:30 sergot m: use v10;
08:30 camelia rakudo-moar ae2ffe: OUTPUT«===SORRY!===␤Could not find v10 in any of: /home/p6eval/rakudo-inst-1/languages/perl6/lib, /home/p6eval/rakudo-inst-1/languages/perl6␤»
08:30 nwc10 that doesn't surprise me, as I assume that HHVM is the driver for this
08:30 sergot what is v9?
08:31 FROGGS sergot: a version literal
08:31 sergot m: say v9;
08:31 camelia rakudo-moar ae2ffe: OUTPUT«v9␤»
08:32 FROGGS m: say v9.WHAT;
08:32 camelia rakudo-moar ae2ffe: OUTPUT«(Version)␤»
08:32 FROGGS m: say v9.perl
08:32 camelia rakudo-moar ae2ffe: OUTPUT«Version.new('9')␤»
08:32 sergot m: say v9.9.perl;
08:32 camelia rakudo-moar ae2ffe: OUTPUT«Version.new('9.9')␤»
08:32 sergot ok :)
08:32 sergot thanks
08:32 Ven .oO( Is Perl 9 basically NuPRL? )
08:33 nwc10 http://news.php.net/php.standards/19 -- Everything this group discusses or does should be measured against that single agenda of "common coding standards"
08:33 nwc10 doesn't seem to be the spec that I thought it was. But does seem to be a useful thing
08:33 sergot FROGGS: why does v10 doesnt work thne?
08:33 sergot then8
08:34 sergot wait..
08:34 Ven m: use v8; # this one is scala
08:34 camelia rakudo-moar ae2ffe: ( no output )
08:34 sergot why does it not work
08:36 dakkar joined #perl6
08:36 nwc10 oh, it *is*. That list seems to be different, despite being linked from the github repo
08:36 kurahaupo_ joined #perl6
08:39 FROGGS sergot: `use VERSION` is a noop right now except for `use v5`
08:39 FROGGS though I have no idea why v10 does not work
08:39 sergot ok :)
08:42 nwc10 ... eing
08:42 nwc10 oops
08:42 rurban joined #perl6
08:42 nwc10 ... Despite the use of the term refcount, conforming implementations are not required to use a reference counting-based implementation for automatic memory management.
08:42 nwc10 that might get to be fun
08:44 Ven nwc10: well, some functions *use* the refcount :|
08:44 nwc10 I was thinking "fun" in that it means you're relying on implementation defined behaviour if you want to use a RAII style
08:45 nwc10 so, to some degree, it forks the language into imlementations that can do RAII, and those that can't
08:46 nwc10 and code that relies on RAII may well subtly break
08:46 Ven nwc10: I don't think there's code that does, though.
08:46 dayangkun joined #perl6
08:47 nwc10 also "A VStore's refcount is defined as the number of unreclaimed VSlots that point to the VStore."
08:47 Ven pretty obvious
08:47 nwc10 if non-refcounting implementations are actually required to be able to calculate that number accurately (instead of always saying "1" or "2") then it's going to be a lot of makework
08:48 SamuraiJack joined #perl6
08:48 nwc10 I agree that it's a valid definition. I'm thinking that it's a pain to calcuate accurately if you aren't reference counting
08:57 kivutar joined #perl6
09:06 kivutar joined #perl6
09:06 SamuraiJack joined #perl6
09:06 nwc10 jnthn: rakudo master still builds for me on parrot
09:08 Ven nwc10: are you on windows, tho ?
09:08 nwc10 no, this is on x86_64 linux
09:09 tadzik sergot: I get the same bug as before, and also t/03-cookies.t .... 16/23 # Looks like you planned 23 tests, but ran 24
09:09 Ven which explains why :)
09:09 nwc10 an overnight commit message from jnthn IIRC was roughly "should work on parrot, but can't test it locally"
09:09 Ven nwc10: then a little bit later "probably because I'm on windows"
09:10 virtualsue joined #perl6
09:21 sergot tadzik: oh, yeah, I forgot to change the plan
09:22 sergot tadzik: fixed
09:22 sergot I mean, the cookies.t error
09:24 brrt left #perl6
09:35 spider-mario joined #perl6
09:43 rurban joined #perl6
09:51 aoseki joined #perl6
09:56 xfix joined #perl6
09:56 xfix joined #perl6
09:59 kaare_ joined #perl6
10:07 xfix joined #perl6
10:07 xfix joined #perl6
10:13 pmurias joined #perl6
10:14 xfix joined #perl6
10:14 xfix joined #perl6
10:14 pmurias do we standardize on the exception nqp-js should from with a invalid arguments to nqp::seekfh?
10:16 FROGGS I don't think so
10:17 dalek nqp-js: dee603a | (Pawel Murias)++ | src/vm/js/nqp-runtime-node/ops/fs.js:
10:17 dalek nqp-js: Implement nqp::link, nqp::symlink, nqp::seekfh.
10:17 dalek nqp-js:
10:17 dalek nqp-js: Pass the updated version of test 19.
10:17 dalek nqp-js: review: https://github.com/pmurias​/nqp-js/commit/dee603afbd
10:24 xfix joined #perl6
10:24 xfix joined #perl6
10:36 pmurias jnthn: typevar's are just normal lexicals that just don't change the type?
10:38 jnthn pmurias: They're normal lexicals that are invariant wrt the invocant of the enclosing routine.
10:39 akaseki joined #perl6
10:42 xfix joined #perl6
10:42 xragnar_ joined #perl6
10:43 pmurias isn't $?CLASS immutable?
10:44 jnthn Not in a role
10:44 jnthn But you can compile it to a completely normal lexical lookup
10:45 jnthn It compiles to something a tiny bit different on Moar that gives a hint to the type specializer.
10:45 jnthn Which enables it to strip away a bunch of virtual calling.
10:46 jnthn But the pre-specialized code is just a normal lexical lookup
10:55 rurban joined #perl6
10:56 colomon joined #perl6
10:59 aoseki joined #perl6
11:01 pmurias jnthn: what does a set_compile_time_value do on a QAST::Var?
11:02 lizmat latest and greatest gives 2 spectest errors:
11:02 lizmat t/spec/S03-operators/short-circuit.t, 53
11:03 lizmat t/spec/S06-routine-modifiers/lvalue-subroutines.t, 10,11
11:03 jnthn pmurias: Hm, I'm curious where that happens. But it inherits something from QAST::Node that mixes in.
11:03 pmurias it happens when $?CLASS is seen?
11:03 pmurias s/\?//
11:04 jnthn Oh, interesting. :)
11:04 jnthn In NQP, or Rakudo?
11:04 pmurias NQP/Actions.nqp:526
11:04 pmurias in nqp
11:04 fhelmberger joined #perl6
11:04 lizmat r: (0 ^^ ^7).WHAT.say  # test expects Range, gets Nil
11:05 jnthn uhhh
11:05 camelia rakudo-jvm ae2ffe: OUTPUT«(timeout)»
11:05 camelia ..rakudo-parrot ae2ffe: OUTPUT«(Range)␤»
11:05 camelia ..rakudo-moar ae2ffe: OUTPUT«Nil␤»
11:05 jnthn I'm fairly sure that set_compile_time_value calls wants to be in the else branch.
11:05 lizmat seems moar only
11:06 jnthn oh, no...
11:06 jnthn The other branch is a WVal which doesn't need it.
11:06 jnthn Hmmmm
11:06 jnthn I think it's probably just wrong.
11:06 jnthn ^ is for pmurias btw :)
11:07 lizmat yeah, I got that
11:07 akaseki joined #perl6
11:07 jnthn Not sure about your one, lizmat. The last spectest run I did yesterday didn't fail those...
11:08 jnthn And I *thought* it was against latest committed things.
11:08 lizmat it's repeatable for me
11:08 lizmat the other one seems to be related to using an lvalue sub in a proxy FETCH/STORE
11:09 jnthn oh...
11:09 jnthn FROGGS is looking at an issue related to FETCH/STORE
11:10 xfix joined #perl6
11:10 xfix joined #perl6
11:10 FROGGS when I am not totally off the compunit itself made in Perl6::Actions line 406 is it
11:11 pmurias jnthn: so typevar is just a hint when accessing a variable, which may be declared as static for example?
11:11 FROGGS ahh no, I talking crap
11:13 FROGGS hmm no, that seems to be correct
11:14 timotimo pmurias: yes, just a hint
11:14 denis_boyun joined #perl6
11:14 timotimo but i believe it'd also be declared as typevar
11:14 pmurias not in nqp
11:15 jnthn I think it's installed as a normal lexical
11:15 jnthn It's a little stronger than a hint.
11:15 timotimo ah, ok
11:15 kivutar joined #perl6
11:15 jnthn 'cus the optimizer can rely on it
11:15 timotimo so not a static one.
11:15 pmurias a guaranteed hint
11:16 xfix_ joined #perl6
11:17 dalek nqp-js: 2a414f1 | (Pawel Murias)++ | src/vm/js/QAST/Compiler.nqp:
11:17 dalek nqp-js: Add comment.
11:17 dalek nqp-js: review: https://github.com/pmurias​/nqp-js/commit/2a414f115a
11:17 dalek nqp-js: 52b8fbb | (Pawel Murias)++ | src/vm/js/QAST/Compiler.nqp:
11:17 dalek nqp-js: Fix typo.
11:17 dalek nqp-js: review: https://github.com/pmurias​/nqp-js/commit/52b8fbbecb
11:17 dalek nqp-js: 3f3f4cf | (Pawel Murias)++ | src/vm/js/QAST/Compiler.nqp:
11:17 dalek nqp-js: Fix typevar handling, that fixes the failing tests in t/nqp.
11:17 dalek nqp-js: review: https://github.com/pmurias​/nqp-js/commit/3f3f4cf3f5
11:20 Ven joined #perl6
11:20 xfix_ joined #perl6
11:21 dalek nqp-js: b6e4ec8 | (Pawel Murias)++ | TODO:
11:21 dalek nqp-js: Add a port nqp-js to cross-compile on top of the faster MoarVM TODO item.
11:21 dalek nqp-js: review: https://github.com/pmurias​/nqp-js/commit/b6e4ec8e0a
11:22 dalek nqp-js: 315c795 | (Pawel Murias)++ | TODO:
11:22 dalek nqp-js: Add a port to windows TODO item.
11:22 dalek nqp-js: review: https://github.com/pmurias​/nqp-js/commit/315c7954f5
11:23 Ven ah, I could try it under windows
11:27 pmurias Ven: I don't really use windows but I'll try to help as much as I can with porting things over
11:27 pmurias (which should really be porting stuff in the Makefile)
11:28 Ven I think my make works okay
11:29 pmurias you mean your make binary or 'make test' in nqp-js?
11:30 Ven my make binary.
11:30 nwc10 jnthn: was 4.736e+02 now 2.0379e+02
11:30 timotimo i remember when i got excited about rakudo-parrot doing stage parse in under 100 seconds
11:30 timotimo ... look at us now ...
11:30 nwc10 pugs: say 2.0379e+02/ 4.736e+02
11:30 camelia pugs: OUTPUT«0.43029983108108108​10810810810810810810811␤»
11:31 jnthn nwc10: What are we comparing here? :)
11:31 nwc10 jnthn: you seem to have reduced the *parrot* setting compilation time by 57%
11:31 jnthn Wow.
11:31 FROGGS WAT?
11:31 nwc10 yes, that's what I thought
11:31 nwc10 fewer GC runs, maybe?
11:31 jnthn It must be insanely slow at doing something Moar was just a little slow at...
11:32 nwc10 yes, it has to be something like that. I have no idea what
11:32 nwc10 and no great desire to go figure it out
11:32 * jnthn wonders if JVM got a bunch faster at it too
11:32 timotimo is that for stage pir?
11:32 dalek nqp-js: 9e63c27 | (Pawel Murias)++ | tools/build/ (2 files):
11:32 dalek nqp-js: Replace 'mkdir -p' with $(MKPATH) which seems more portable.
11:32 dalek nqp-js: review: https://github.com/pmurias​/nqp-js/commit/9e63c27a3d
11:32 nwc10 r:  2.0379e+02/ 6.8598e+01
11:33 camelia rakudo-{parrot,jvm,moar} ae2ffe: ( no output )
11:33 nwc10 r: say 2.0379e+02/ 6.8598e+01
11:33 camelia rakudo-{parrot,moar} ae2ffe: OUTPUT«2.97078632030088␤»
11:33 camelia ..rakudo-jvm ae2ffe: OUTPUT«2.9707863203008835␤»
11:33 nwc10 OK, MoarVM now only 3 times slower
11:33 nwc10 it was this:
11:33 nwc10 dumbbench -- ./perl6-p --setting=NULL --optimize=3 --target=pir --stagestats --output=src/gen/p-CORE.setting.pir gen/parrot/CORE.setting
11:33 jnthn MoarVM is 3 times slower?
11:33 jnthn Or 3 times faster?
11:33 nwc10 er, faster
11:33 nwc10 PEBKAC
11:33 jnthn Important difference :P
11:33 nwc10 wonly a fac
11:34 nwc10 er PEBKAC
11:34 nwc10 what's almost a factor of 10, between friends? :-)
11:34 jnthn Anyway, faster build on Parrot = faster turnaround for those building stuff on multiple backends. :)
11:34 jnthn I imagine we got a bit faster on JVM too.
11:35 timotimo we could develop so much faster on parrot if we cross-compiled pbc from moar :P
11:36 FROGGS when I compare the last three days of the build log of rakudo-star-daily I see that stage parse-p went up to 81s from 68s and then down again to 68s
11:36 telex joined #perl6
11:36 hoelzro morning #perl6
11:36 FROGGS my local stage parse is 116s, and I though it was not that much slower is the past
11:37 FROGGS hi hoelzro
11:37 masak morn'n, hoelzro
11:37 jnthn shopping &
11:39 * Ven pulls, reconfigures and tries
11:39 Ven I need to reconfigure if the backends changed stuff, rite ?
11:39 Ven or, actually, I need --gen-foo if foo changed
11:43 pmurias yes
11:44 pmurias perl Configure.pl --backends=parrot,js
11:44 Ven parse, 38.7
11:45 Ven pmurias: sorry, not in my windows here. I'll do it at home :)
11:45 pmurias np
11:45 pmurias I didn't read the context before answering ;)
11:46 hoelzro module MyModule:ver<0.0.1> # <- that should set the version for the module, right?
11:46 Ven hoelzro: NYI, afaik
11:46 hoelzro such that is MyModule.^ver, '0.0.1'
11:47 hoelzro ok, just confirming =)
11:47 Ven "basic module versioning" is red in the matrix, if I remember correctly
11:48 xfix_ joined #perl6
11:49 spider-mario php developers appear to call us a failure
11:49 spider-mario https://wiki.php.net/rfc/php6#strong_reasons_o​f_why_we_actually_should_skip_version_6_into_7
11:49 spider-mario “Version 6 is generally associated with failure in the world of dynamic languages. PHP 6 was a failure.”
11:49 spider-mario oops
11:49 spider-mario “Version 6 is generally associated with failure in the world of dynamic languages. PHP 6 was a failure; Perl 6 was a failure.”
11:49 spider-mario (the first one was my “fixed” quote)
11:50 Juerd Worse things have been said about Perl 6
11:50 Ven :P
11:50 Ven spider-mario: I'm fine with being called "a failure" by PHP guys :P
11:50 Ven they should call it 6.5, really
11:50 pmurias Worse things have been said about PHP by Perl developers ;)
11:50 Juerd They suggest that the failure is in the version number, and I may even agree with that :)
11:51 Juerd pmurias: My favourite PHP/Perl quote: http://juerd.nl/site.plp/perl_php
11:51 Ven pmurias: "PHP is a failure, no specific version" ? :P
11:51 Juerd Ven: http://phpsadness.com/ :D
11:52 Ven Juerd: and phpwtf. Don't worry, I've done my fair share of PHP already.
11:52 carlin "training wheels without the bike" is my favourite description of PHP
11:53 Juerd carlin: I made a poster out of that one
11:53 Ven "As a special non serious bonus, 7 is perceived as a lucky number" <- uh, yea, but you still could attain php 7 some years later ._.
11:53 Ven I don't really care, though, I'm the one laughing with my Perl 6 :D.
11:53 Juerd Unfortunately, I no longer have the high res photo I need for a reprint
11:54 Juerd So I may actually have to buy training wheels and make a new one
11:54 Juerd http://tnx.nl/php.jpg
11:55 cognominal__ Name and numbers have the power to change the reality they denote. If one is a God, one can do better and create the reality with the word.
11:56 lizmat r: (0 ^^ ^7).WHAT.say # should I create a rakudobug for this one?
11:56 camelia rakudo-{parrot,jvm} ae2ffe: OUTPUT«(Range)␤»
11:56 camelia ..rakudo-moar ae2ffe: OUTPUT«Nil␤»
11:56 masak lizmat: yes, please.
11:57 lizmat r: (^7 ^^ 0).WHAT.say # this appears to work
11:57 camelia rakudo-{parrot,jvm,moar} ae2ffe: OUTPUT«(Range)␤»
12:00 dalek roast: c57d4ff | (Elizabeth Mattijsen)++ | S03-operators/short-circuit.t:
12:00 dalek roast: Fudge for #122448
12:00 dalek roast: review: https://github.com/perl6/roast/commit/c57d4ffdeb
12:00 synopsebot Link: https://rt.perl.org/rt3//Publ​ic/Bug/Display.html?id=122448
12:08 hoelzro PerlJam: ping
12:09 FROGGS p: say (0 ^^ ^7)
12:09 camelia rakudo-parrot ae2ffe: OUTPUT«0..^7␤»
12:10 xfix joined #perl6
12:10 xfix joined #perl6
12:13 lizmat I've golfed down the problem in t/spec/S06-routine-modifiers/lvalue-subroutines.t to https://gist.github.com/li​zmat/8d04b65573200ec70f08
12:13 lizmat if you take out the "die", it works
12:13 lizmat with MVM_SPESH_DISABLE=1, I get the same problem
12:14 lizmat the die probably fails because $passwd is Mu
12:14 Ven .oO( Let's start a php backend for p6, everything will be fine then )
12:19 xfix joined #perl6
12:19 xfix joined #perl6
12:19 jnthn lizmat: What about with perl6-m --optimize=off or so?
12:19 pmurias Ven: what would be the use of a php backend?
12:19 Ven pmurias: having it run Everywhere(TM).
12:20 lizmat works ok with --optimize=off
12:20 jnthn Ah, ok
12:20 lizmat so it appears to be an optimizer bug
12:20 jnthn --optimize=1 ?
12:22 lizmat actually, both spectest failures go away with --optimize < 2
12:22 lizmat so the #122448 is also an optimizer issue
12:22 synopsebot Link: https://rt.perl.org/rt3//Publ​ic/Bug/Display.html?id=122448
12:24 jnthn ah, ok
12:24 pmurias Ven: Everywhere(TM) = cheap hostings?
12:24 Ven pmurias: nooo! Everyyyyyyywheeeeere.
12:24 jnthn lizmat: So possibly even related
12:24 brother joined #perl6
12:25 lizmat yes, that would not be unlikely
12:26 lizmat I wouldn't be surprised that the parameter to the outer rw sub
12:27 lizmat is optimized away because it doesn't see that is used inside the STORE block
12:27 lizmat It comes out Mu inside the STORE block
12:27 lizmat (the $passwd in my gist)
12:29 xragnar joined #perl6
12:30 lizmat jnthn: I think it's related to a398910b4a6a1bdd42cd5a3cc33d8dfad0e3501f
12:31 lizmat as when I put a "my $a = " before the call to checklastval()
12:31 lizmat the problem goes away
12:32 lizmat so it's related to some sink context optimization
12:33 pmurias nqp integers are 64bit?
12:40 jnthn lizmat: OK; will take a look this evening
12:40 jnthn pmurias: Always on Moar and JVM; by CPU on Parrot, iirc.
12:41 pmurias javascript seems to only have integers up to 2**53 :(
12:42 kurahaupo_ pmurias: that sounds like the mantissa of a floating point number
12:42 Ven try 0.4 + .2 in JS, and get suprised :)
12:43 Ven sur*, even
12:43 pmurias kurahaupo_: yes, the language itself has only doubles :(
12:43 kurahaupo_ or maybe they're using the other bits for type-tagging?
12:48 pmurias jnthn: so I have three choices:
12:48 Ven nqp-js-jvm that runs on rhino :D
12:49 pmurias 1. emulate the 64bit integers slowly, 2. make the nqp integers proper 32bit, 3. make them sort of crazy 53bit integers that misbehave after the 2*53 limit is breached
12:50 pmurias jnthn: with misbehave meaning $big+1 == $big
12:51 jnthn pmurias: 1 and 2 are both slow, I guess?
12:51 pmurias 2 should be fast
12:51 jnthn Ah, it's just a bit mask?
12:51 pmurias yes
12:51 jnthn That could be least surprising...
12:52 pmurias and I think it's optimized really heavily on chrome as it's part of asm.js
12:52 hoelzro is there a P6 equivalent to Python's enumerate? ex. for index, value in enumerate(['foo', 'bar']): # yields (0, 'foo'), (1, 'bar')
12:53 Ven hoelzro: .kv ?
12:53 hoelzro thanks Ven
12:53 hoelzro that's perfect!
12:53 * Ven notes he should tell that in this tutorial
12:54 pmurias jnthn: option 3 seems like it could cause extreme frustration to someone
12:55 Ven pmurias: related http://www.scala-js.org/doc/semantics.html
12:57 pmurias jnthn: according to the spec the Perl 6 'int' type is the largest that runs at full speed
12:57 pmurias so it should be 32bit
12:58 pmurias jnthn: the big question is does nqp/rakudo depend on int being 64bit somewhere?
12:59 jnthn pmurias: I highly doubt it, given it runs on Parrot where that can't be promised.
13:00 nwc10 I honestly forget if it tests cleanly on a 32 bit parrot
13:00 pmurias so option 2 seems resonable?
13:00 hoelzro I'm surprised that scala.js thing doesn't mention threading at all
13:00 pmurias it should fail on 32bit
13:00 nwc10 (at such times as all the tests were passing cleanly on a 64 bit parrot)
13:00 jnthn pmurias: Seems reasonable to me and probably most sane
13:00 nwc10 "JS threading" is an Xemacs release codename?
13:01 jnthn pmurias: The 53-bit weird thing could cause some extremely hard to understand bugs. But programemrs are good at spotting power-of-2 boundaries :)
13:02 Ven hoelzro: well, it doesn't compile. not a semantic diff :P
13:02 hoelzro heh
13:03 pmurias currently the performance penalty of emulating 64bit wouldn't matter match, but once the code gen stops being extremely stupid it could
13:04 Ven You're just producing JS strings, right ?
13:04 pmurias yes
13:04 Ven that means no source mapping then
13:04 takesako joined #perl6
13:06 pmurias that would need to be changed for source maps
13:08 pmurias Ven: but to get source maps just producing (JS string + Perl6 source position) should be enough
13:14 darutoko- joined #perl6
13:14 carlin_ joined #perl6
13:14 lizmat_ joined #perl6
13:14 pmurias Ven: it could make sense to add source map support soon
13:14 Ven pmurias: I've looked at the JS generated, and it's probably gonna be hard to maintain like that :B
13:15 Ven well, if you have to read it, I mean. Opal (ruby to js) generates terrible code ...
13:15 tadzik joined #perl6
13:15 cooper_ joined #perl6
13:15 Psyche^ joined #perl6
13:15 jlaire joined #perl6
13:15 kst joined #perl6
13:15 revdiablo joined #perl6
13:16 TimToady joined #perl6
13:16 anocelot joined #perl6
13:16 sunnavy joined #perl6
13:16 xiaomiao joined #perl6
13:16 takesako joined #perl6
13:17 pmurias Ven: the generated could will likely be improved, but it don't think it will ever be good enough to use for debugging your nqp/rakudo program
13:18 dmol joined #perl6
13:18 Ven pmurias: yeah, it's really hard with semantics being so different
13:18 hoelzro why can't source maps be achieved?
13:19 * hoelzro wonders if there would be a benefit to generating asm.js
13:19 pmurias hoelzro: they can
13:19 pmurias hoelzro: very little
13:20 pmurias hoelzro: asm.js has basically the semantics of an assembler
13:20 PerlJam hoelzro: pong
13:20 pmurias so when generating asm.js we would also need a moarvm
13:21 pmurias hoelzro: maybe for small numeric low level parts
13:21 kivutar joined #perl6
13:21 timotimo how well is that going to work out %)
13:22 hoelzro PerlJam: just wanted to let you know that I'm working on cleaning up the TODO file
13:22 pmurias timotimo: ?
13:23 PerlJam hoelzro: cool.   I didn't get a chance to look at much last night as just as soon as I started, my kids needed some attention.
13:23 hoelzro fair enough =)
13:23 hoelzro pmurias: I was thinking about using it for "native" numeric types
13:24 timotimo pmurias: generating very good code for "small numeric low level parts" doesn't seem to give us huge wins except in microbenchmarks
13:24 timotimo in general, it seems like getting rid of too many containers is worth much more, etc
13:24 timotimo so i'm looking at the range, xor, Nil thingie
13:24 silug joined #perl6
13:25 timotimo the optimizer is actually for some reason appending a Nil as the third argument to xor
13:25 timotimo oh, actually, that's also in the non-optimized ast
13:26 pmurias timotimo: it seems important when doing number crunching, which admittedly is not something we are focusing at the moment
13:27 timotimo just saying, our rakudo is doing so much different stuff before you even get to the mainline program, that it may not be worth it yet
13:33 pmurias timotimo: that for sure, generating "asm.js" isn't even in my long term plans
13:33 iarna joined #perl6
13:33 timotimo :)
13:34 FROGGS[mobile] joined #perl6
13:37 ChoHag Why am I getting Internal error: inconsistent bind result?
13:38 ChoHag Non-deterministicly.
13:39 PotatoGim joined #perl6
13:39 raiph joined #perl6
13:39 timotimo non-deterministicly sounds like spesh is stumbling
13:40 timotimo can you try with MVM_SPESH_DISABLE=1 in your environment?
13:40 ChoHag What's spesh?
13:40 ChoHag Sounds Special.
13:40 timotimo bytecode specialization framework
13:41 ChoHag Ooh that's a fun one:
13:41 ChoHag Type check failed in binding <anon>; expected 'Str' but got 'Str'
13:41 ChoHag (With MVM_*)
13:42 ChoHag Could be related. The inconsistent bind error seems to come from the same function (which stringifies and returns some attributes+methods).
13:43 ChoHag Still randomness though. What does that environment variable cause to be disabled?
13:43 timotimo moarvm will not try to generate better bytecode for functions called often-ish
13:43 dalek nqp-js: 680e4da | (Pawel Murias)++ | src/vm/js/nqp-runtime-core/runtime.js:
13:43 dalek nqp-js: Turn some of integer operations into 32bit ones, convert stuff to 32bit when converting to an integer.
13:43 dalek nqp-js:
13:43 dalek nqp-js: Skip t/serialization/01-basic.t as we don't support 64bit integers.
13:43 dalek nqp-js: review: https://github.com/pmurias​/nqp-js/commit/680e4daf7d
13:44 moritz the bytecode specializer/optimizer
13:44 ChoHag Ah. Yes that one would definitely fall under the category of often.
13:44 hoelzro hmm
13:44 hoelzro why is it $=pod and not @=pod?
13:48 Ven pmurias: you sure that |0 actually optimizes ?
13:48 Ven it probably does under chrome (who did not want to follow asm.js), but for firefox and ie ?
13:48 PerlJam hoelzro: isn't it because $=pod is an object (That happens to stringify to the text)
13:48 hoelzro but it's always an Array
13:49 hoelzro isn't it?
13:49 pmurias Ven: currently the optimalization doesn't really matter
13:49 pmurias Ven: as the rest of the code gen is so bad
13:49 hoelzro Ven: if you're using 'use "asm"', that should optimize
13:49 hoelzro under Fx, and now Chrome
13:49 hoelzro but asm.js is definitely more of a long term thing, I agree
13:49 PerlJam hoelzro: I thought it was some Pod::Whatever thingy.  Pod::Document maybe?
13:49 Ven hoelzro: "if you"
13:50 hoelzro PerlJam: it's an Array of Pod::Blocks
13:50 hoelzro Ven: ?
13:50 Ven hoelzro: asm.js is not targeted.
13:50 hoelzro Ven: right
13:51 Ven so I'm talking about what |0 deoes outside asm.js
13:51 pmurias Ven: I'm using |0 to convert to 32bit
13:51 timotimo can't you also access $=pod<typeofblock>?
13:51 hoelzro oh, ok
13:51 * hoelzro hushes
13:51 hoelzro timotimo: hmm...I don't know
13:52 ChoHag I wish this code would either work or not.
13:53 timotimo ChoHag: i understand your frustration :(
13:53 timotimo can you golf it down perhaps? it sounds like you really hit a nasty bug we definitely should look at more closely
13:54 ChoHag With some difficulty.
13:55 timotimo your description, "stringifies and returns some attributes+methods", doesn't tell me much, unfortunately
13:55 timotimo can you get at the explody line number with say statements perhaps?
13:55 ChoHag Apparently I have done before.
13:55 rurban joined #perl6
13:56 ChoHag There's the function, and the function commented out with say statements between every part which does 'something'.
13:56 PerlJam hoelzro: In my head, $=pod is the Pod DOM equivalent to document in the HTML DOM.  I don't know that's reality or how it should be, but that's how I've thought of it.
13:56 hoelzro oh, that's a good analogy
13:56 kaare_ joined #perl6
13:56 ChoHag method id { $.noun ~ (self.^attributes.grep({$_.name ~~ "\$!name"}) ?? "[$.name]" !! "" ) }
13:57 ChoHag $.name is a very likely candidate as it's a wrapped or created-from-whole-cloth accessor function, which has too much Magic.
13:57 pmurias hmm, what should be the next thing to work on for nqp-js? emitting better code, cross compiling on moar, in browser repl demo... something else?
13:58 pmurias code cleanup, document internals...
13:58 moritz pmurias: rakudo-js
13:58 timotimo ChoHag: do you know of the "can" method on the metaobject?
13:58 ChoHag No.
13:58 timotimo it might be more elegant than self.^attributes.grep
13:59 ChoHag I'm writing an application which makes heavy use of threads and digs into the object meta model, while learning both of these things, while they (or at least threads) are being developed.
13:59 ChoHag I'm not expecting much by way of sanity.
13:59 timotimo also, have a look at this:
13:59 timotimo m: say ("foobar".?undefinedmethod).perl
13:59 camelia rakudo-moar ae2ffe: OUTPUT«Nil␤»
13:59 timotimo so if you self.?name // "", you'll get either the result of name or ""
14:00 ChoHag But I want the result of "[" ~ name ~ "]", or ""
14:00 timotimo oh
14:00 ChoHag But yeah I knew the grep was wrong as I wrote it, but it and the naem thing went under the category of 'look at later when they're interesting'
14:01 dalek roast/S26-WHY: ae257cb | (Rob Hoelz)++ | S26-documentation/why-leading.t:
14:01 dalek roast/S26-WHY: Check $=pod throughly in why-leading
14:01 dalek roast/S26-WHY: review: https://github.com/perl6/roast/commit/ae257cb76b
14:01 dalek roast/S26-WHY: d93eeb3 | (Rob Hoelz)++ | S26-TODO:
14:01 dalek roast/S26-WHY: Mention more things todo for S26
14:01 dalek roast/S26-WHY: review: https://github.com/perl6/roast/commit/d93eeb3282
14:01 dalek roast/S26-WHY: 1f5510d | (Rob Hoelz)++ | S26-TODO:
14:01 dalek roast/S26-WHY: Elaborate on S26-TODO
14:01 dalek roast/S26-WHY: review: https://github.com/perl6/roast/commit/1f5510d58b
14:01 moritz self.^can($name) ?? "[$name]" !! '';
14:01 timotimo m: for Nil, "hello" { say ($_ // "" andthen "[$_]") }
14:01 camelia rakudo-moar ae2ffe: OUTPUT«[hello]␤»
14:01 timotimo m: $_ = Nil; say ($_ // "" andthen "[$_]")
14:01 camelia rakudo-moar ae2ffe: OUTPUT«[]␤»
14:01 dalek roast/S26-WHY: 3b47fd0 | (Rob Hoelz)++ | S26-TODO (2 files):
14:01 dalek roast/S26-WHY: Make my TODO a markdown file
14:01 dalek roast/S26-WHY: review: https://github.com/perl6/roast/commit/3b47fd08f0
14:01 timotimo d'oh
14:01 timotimo m: $_ = Nil; say ($_ andthen "[$_]") // ""
14:01 camelia rakudo-moar ae2ffe: OUTPUT«␤»
14:01 ChoHag Learning a language while it keeps breaking underneath you is a lot of fun.
14:02 timotimo m: $_ = "hello"; say ($_ andthen "[$_]") // ""
14:02 camelia rakudo-moar ae2ffe: OUTPUT«[hello]␤»
14:02 PerlJam the "can"ned solution will work for things that are not attributes though.  (I dunno if that's desired or not)
14:02 hoelzro if anyone's curious about my ideas for S26 (including PerlJam), I've elaborated on them here: https://github.com/perl6/roa​st/blob/S26-WHY/S26-TODO.md
14:02 ChoHag PerlJam: There's that to consider.
14:02 ChoHag PerlJam: Also, badum tish.
14:03 PerlJam :-)
14:03 ChoHag God damn it it keeps working fine.
14:03 ChoHag Why won't software break when you want it to?
14:03 PerlJam ChoHag: are you *complaining* that P6 Just Works?!?
14:03 timotimo PerlJam: ChoHag is calling $.name anyway, so might as well rely on the public accessor at that point, too.
14:04 PerlJam Someone should quote *That* and post to reddit ;)
14:04 timotimo PerlJam: i'd consider that borderline feeding the trolls
14:04 ChoHag Just Works with threads, no less.
14:04 timotimo i'd prefer a blog post by chohag about all the quirky things that you'd expect to break perl6 but don't, and then some things that you'd expect to break that do
14:05 PerlJam timotimo++ good idea!
14:05 ChoHag It's somewhat frustrating, in a pervertedly wrong way.
14:05 ChoHag Now I need to go and pretend to do some paid work though.
14:05 timotimo that's fine :)
14:05 thou joined #perl6
14:05 ChoHag And then get the train, and then deal with a daughter, so that's about it for programming today.
14:15 carlin there is a lot of broken links on http://doc.perl6.org/language/operators
14:15 carlin such as infix % and prefix ?
14:16 carlin because the URLs aren't encoded
14:16 carlin eg. http://doc.perl6.org/routine/% needs to be http://doc.perl6.org/routine/%25
14:17 moritz .tell Mouq about broken links on doc.perl6.org, see http://irclog.perlgeek.de/​perl6/2014-07-31#i_9113080
14:17 yoleaux moritz: I'll pass your message to Mouq.
14:29 iarna joined #perl6
14:37 kaare__ joined #perl6
14:38 virtualsue joined #perl6
14:39 timotimo gtodd1: would you be interested to first make a interface-compatible json thingie as a drop-in replacement for JSON::Tiny?
14:39 timotimo even if only the parsing part; i'd like that :)
14:40 molaf joined #perl6
14:40 gtodd1 carlin: moritz: ++ the more I explore p6 the more easy access to the basic docs helps avoid frustration and fears of mental breakdown :-D ...
14:40 gtodd timotimo: would take weeks ... :-D
14:40 timotimo docs is certainly something we're lacking a lot of ;(
14:40 timotimo OK, maybe i can make it work
14:41 jnthn timotimo: ooc, have you tried a benchmark run on latest Rakudo since the various parsing improvements?
14:41 timotimo all i need to do is iterate over the lists and objects, right?
14:41 timotimo jnthn: nope; i'll do one today :)
14:41 jnthn timotimo: parse-json may be faster
14:41 jnthn Also the sink context improvements may show up
14:41 timotimo rakudo only, or nqp as well?
14:41 btyler timotimo: on that note, I'm working out the API for the jansson bindings. do you think it ought to just dump the parsed JSON into a p6 hash (or something) immediately, or present a hash/array interface that uses the library methods underneath (without loading the data into p6 land)?
14:41 jnthn Well, if there's NQP version of the arsping benchmark...
14:41 jnthn uh, parsing.
14:41 timotimo yes
14:41 jnthn ...how on earth did the p move so far...
14:42 gtodd timotimo: I am trying to think how potential frustration with docs can improve docs  ... that is definitely an area I can help
14:42 timotimo couldn't be arsed ...
14:42 timotimo gtodd: aye, if a perl6-pro looks at the docs, it's very hard for them to see what's missing where :(
14:42 timotimo afk for a bit
14:44 gtodd timotimo: need a few people who will be as dumb and yet as half way intelligent as myself and have the same compulsive need to constantly ask/answer questions  :)
14:45 treehug88 joined #perl6
14:45 virtualsue joined #perl6
14:45 kaare__ joined #perl6
14:46 iarna joined #perl6
14:47 ChoHag Nobody ever understands ssl :(
14:47 gtodd e.g. I see a pattern where a lot of methods like e.g.   "string of foo".subst(/foo/, "baz", :g)  have "in place" calls like  my $str="string of foo"; $str ~~ s:g/foo/baz replaces/.say  .... but thes are not documented everywhere they could or should be ....
14:48 * Ven is building pugs for some reason
14:48 gtodd so I started documenting them as notes to to $self :-)
14:49 kaleem joined #perl6
14:49 moritz gtodd: add them to perl6/doc
14:50 gtodd there's some quality of the perl5 docs (built up over time obviously where things refer to each other in self reinforcing ways ... perldoc drives perl thinking into your brain ... there's even jokes :)
14:50 gtodd moritz: ok
14:51 gtodd when I get back from vacation this will be a way I contribute to the perl6 project !
14:51 moritz \o/
14:51 moritz ++gtodd
14:52 PerlJam If P5's s/// suffered from an end-weight problem that P6's s/// solves by allowing use to say s:g///, why do people all write .subst(/foo/, "bar", :g)  instead of .subst(:g, /foo/, "bar")   ?
14:52 PerlJam s/use/us/
14:53 btyler if anyone has some nativecall chops: https://gist.github.com/kanatohode​ts/494fb6d4537d8b764c4c#file-janss​on-with-specified-objects-pm6-L68 I'm trying to sort out how to use nativecast to convert a parent object into a child, but that seems to be against the rules
14:53 btyler the code is p6 bindings for libjansson, a JSON library
14:53 gtodd moritz: just so I understand things though: when I look up "subst" (e.g. and "lookup" here mostly means google .. there's no perl6 vim macro <--> perldoc equivalent in my world yet) ... I get say something like this:  http://doc.perl6.org/routine/subst#class_Str  ...
14:54 pmurias are there any nqp benchmarks?
14:54 gtodd moritz: http://doc.perl6.org/routine/subst#class_Str is excellent and clear and at least partly autogenerated from the source, correct?
14:59 dalek rakudo/nom: ccda7d9 | duff++ | tools/build/ (4 files):
14:59 dalek rakudo/nom: convert gen-cat.pl to nqp and use it
14:59 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/ccda7d915f
15:01 moritz gtodd: it's generated from types/Str.pod in the perl6/doc repo
15:02 gtodd cool ... the organization of the docs themselves - with "subst" appearing in class_Str as method subst - imparts a lot of information about how perl6 works and one would not want to pollute any docs generated from source code with verboseness ... but e.g. it that doc *mentions* the s/// form but it's not really documented there ... should it be?
15:02 moritz IMHO s/// belongs in the syntax description (perlsyn in perl 5)
15:03 btyler in lieu of the (imo) structurally nicer approach in the first listed file, I have it working with both array/object methods mashed into one class, and it just decides what to use whenever a method is called based on the type
15:05 cognome joined #perl6
15:09 gtodd or should there be an autogenerated mention of the in place forms and then a reference to the perl6 equivalent of p5's "perl<whatever>" docs ?
15:11 moritz gtodd: I don't think it can meaningfullly be autogenerated
15:11 chenryn joined #perl6
15:11 moritz gtodd: but yes, I expect there to be  language/syntax document into which one can reference
15:12 timotimo PerlJam++ # dogfooding
15:12 gtodd ok good .... for now http://doc.perl6.org/routine-sub.html  seemed like a doc that could be referred to more often from other spots (seems to be equivalent sort of to p5's perlfunc)
15:13 timotimo gtodd: you may have to give JSON::Array and JSON::Object "is repr('CPointer') as well?
15:13 timotimo though i'd almost suggest you make those regular classes that have "has JSON $!jansson_obj" or something
15:14 btyler timotimo: gtodd might be confused :P but yes, I tried making them repr cpointer, same deal
15:14 btyler delegating might work, yeah
15:14 timotimo er ...
15:14 timotimo damnit, did i confuse you two?
15:14 btyler both working on JSON-ish things
15:15 timotimo indeed >_>
15:15 timotimo so what is gtodd working on? :S
15:15 timotimo .o( but then who was phone ?!?! )
15:15 [particle] joined #perl6
15:15 carlin and they have nicks of single initial + name :p
15:18 FROGGS PerlJam: s:g/// is broken I think
15:18 FROGGS the method form works though
15:18 FROGGS m: say "abc" ~~ m:g/\w/
15:18 camelia rakudo-moar ae2ffe: OUTPUT«False␤»
15:19 gtodd moritz: but I guess for now routine-sub.html is autogenerated as well and so contains the same bits as the referring docs :-) (though some routines seem to be missing from the index).  Anyway, just trying to get a sense of any plan for how the docs are going to evolve ... in time for the massive influx of perl6  users !! :-) ... so thanks
15:19 gtodd timotimo: not much ... you would not want to confuse me further :-)
15:19 timotimo d'aaw :)
15:19 gtodd heh
15:19 timotimo you're still contributing valuable insights
15:19 btyler anyways, I'll take a crack at restructuring things to delegate to a jansson pointer
15:19 moritz gtodd: I'm having trouble with your notion of "autogenerated"
15:20 moritz gtodd: the docs are written manually, though some sections can (automatically) appear in multiple places
15:20 gtodd timotimo:  but then again I'm sort of a newbie guinea pig volunteering to be confused
15:20 btyler the ultimate goal is to be able to have JSON::Array and JSON::Object fulfil positional and associative, respectively, so you can treat them much like regular hashes/arrays
15:20 gtodd moritz: ok
15:21 gtodd moritz: "autogenerated" is the wrong usage ... :-)
15:22 PerlJam gtodd: auto-assembled  :)
15:23 * PerlJam wants composable docs.
15:23 gtodd :-)
15:25 PerlJam I continue to find it annoying that when I read the docs for SomeDerivedClass, it tells me "derived from BaseClass" and I have to hunt for methods in multiple docs.  When I'm looking at the docs for SomeDerivedClass, I want them to list all of the inherited bits too without me having to go look at some other doc.
15:25 moritz uhm
15:25 moritz the last version of docs.perl6.org fixed that
15:26 PerlJam The problem is much worse when there's a multi-level hierarchy or when a class is composed of many roles
15:26 PerlJam moritz: I'm just venting in general, not specifically about docs.perl6.org :)
15:26 moritz oh :-)
15:26 gtodd heh
15:26 moritz http://doc.perl6.org/type/Str has "Methods supplied by class Any" and "Methods supplied by class Mu"
15:27 PerlJam moritz++ docs.perl6.org++  :-)
15:27 gtodd humans can haz witerly qualities
15:27 gtodd ++ docs.perl6.org++
15:27 moritz Mouq++ # for making it pretty
15:27 gtodd true
15:27 huf "witerly"?
15:27 huf i like this word, what does it mean?
15:27 dalek doc: 9cb4baa | moritz++ | lib/Type/Str.pod:
15:27 dalek doc: fix small formatting inconsistency
15:27 dalek doc: review: https://github.com/perl6/doc/commit/9cb4baa793
15:28 gtodd and google very often points to docs.perl6.org now .... this  must mean something
15:28 moritz it's SEO-optimized :-)
15:28 gtodd huf: I guess it is a sort of general quality of being an expressive writer
15:29 moritz (SE-optimized, akshually)
15:29 huf gtodd: quite the upperclass word :)
15:31 gtodd PerlJam: glad I notice that you noticed that s/// thing  :
15:31 gtodd m: my $str="string of foo"; $str ~~ s:g/foo/baz/.say
15:31 camelia rakudo-moar ccda7d: OUTPUT«string of baz␤»
15:31 gtodd m: "string of foo" ~~ s:g/foo/baz/.say
15:31 camelia rakudo-moar ccda7d: OUTPUT«Cannot modify an immutable Str␤  in sub infix:<=> at src/gen/m-CORE.setting:17048␤  in block  at /tmp/gL0Hw5I140:1␤␤»
15:32 gtodd m: say "string of foo" ~~ s:g/foo/baz/
15:32 camelia rakudo-moar ccda7d: OUTPUT«Cannot modify an immutable Str␤  in sub infix:<=> at src/gen/m-CORE.setting:17048␤  in block  at /tmp/Znl7_1HT4t:1␤␤»
15:32 gtodd are those last two supposed to work?
15:32 FROGGS don't think so
15:32 jnthn No
15:32 FROGGS you need to put it in a variable
15:32 jnthn Use .subst on immutable values
15:32 gtodd ok good
15:33 gtodd phew ... I had figured it out and was afraid it was broken or unimplemented :-)
15:34 gtodd after what PerlJam said
15:37 gtodd m: my $str="string of foo    "; $str ~~ ss/foo/baz/.say
15:37 camelia rakudo-moar ccda7d: OUTPUT«string of baz    ␤»
15:40 iarna joined #perl6
15:41 gtodd is ss/foo/baz/    a sugary form of s:s ?
15:43 dalek rakudo-star-daily: ed2e474 | coke++ | log/ (14 files):
15:43 dalek rakudo-star-daily: today (automated commit)
15:43 dalek rakudo-star-daily: review: https://github.com/coke/rakudo​-star-daily/commit/ed2e474522
15:43 dalek perl6-roast-data: 70cd1e6 | coke++ | / (5 files):
15:43 dalek perl6-roast-data: today (automated commit)
15:43 dalek perl6-roast-data: review: https://github.com/coke/perl6​-roast-data/commit/70cd1e6624
15:46 * gtodd answers  $self ... why yes it is:  "ss turns into s:s"  but these are "compounds" ? e.g. they seem to be more than sugar
15:47 PerlJam more than sugar?
15:47 gtodd it seems that perl6 you don't just get a little sugar ... you get a factory for making sugar
15:47 carlin and in Java you get a SugarFactoryFactory
15:48 gtodd heh
15:49 gtodd maybe it's more accurate to say you don't need to add sugar (unless you want) ... since p6 is vitamin rich and tasty
15:52 anaeem1 joined #perl6
15:53 timotimo jnthn: i'll commute now; in about an hour i'll probably be ready to run the benchmarks
15:54 timotimo well, actually ... why not let my computer work while i'm gone
15:55 timotimo is anybody else getting test failures in nativecall?
15:55 timotimo planned n tests, but ran m (with m < n)
15:56 Alula_ joined #perl6
15:57 carlin t/04-pointers.c:17:13: warning: implicitly declaring library function 'strcmp' with type 'int (const char *, const char *)' int x = strcmp("Got passed back the pointer I returned", ptr) == 0;
15:57 carlin 06-struct.t .......... 1/30 # Looks like you planned 30 tests, but ran 19
15:57 carlin yeah, something definitely wrong
15:58 jnthn hm, how does it cope with the fact that C code emits some of the oks, iirc?
16:00 Rotwang joined #perl6
16:01 jnthn If the behavior has just changed, though, then soemthing is wrong...
16:04 autark joined #perl6
16:10 denis_boyun joined #perl6
16:15 [Coke] spectest failures: n: 1385; j: 21; m: 3; p: 1798
16:20 matija left #perl6
16:22 carlin it looks like those planned test warnings where always there, but because NativeCall used to give out a heap of deprecation warnings they were probably missed in the noise
16:22 carlin that pointers warning is new though
16:30 carlin nope, they weren't always there. Doing the tests with rakudo 32e8b4ae92372d8c7 (June 2) gives no warnings
16:30 gfldex joined #perl6
16:33 carlin (that's with zavolaj 265e5046408e795acb)
16:34 takesako joined #perl6
16:37 ventica joined #perl6
16:41 dalek roast/S26-WHY: 2dc957c | duff++ | S26-TODO.md:
16:41 dalek roast/S26-WHY: Update S26-TODO.md
16:41 dalek roast/S26-WHY: review: https://github.com/perl6/roast/commit/2dc957c815
16:45 timotimo the benchmarks are already running, but i'm apparently stuck on the very first rakudo-moar at the moment
16:46 timotimo but it is not stuck
16:46 timotimo i think i want to put timestamps in front of the outputs of perl6-bench
16:48 carlin what changed that broke the JSON::Tiny test?
16:48 carlin #      got: [1.3, 2.8, 32323423.4, 4]
16:48 carlin # expected: [1.3, 2.8, 32323423.4, 4.0]
16:48 FROGGS carlin: do you see offhand why the nativecall tests abort?
16:48 timotimo that's expected
16:48 timotimo it should be marked todo
16:48 FROGGS timotimo: but what changed it?
16:49 timotimo it changed?
16:49 FROGGS yes
16:49 carlin it wasn't happening with older rakudo
16:49 FROGGS I did not update that module but when I rebootstrap my old panda checkout that test fails
16:49 FROGGS though it says that all were successful and it continues
16:54 carlin I see it, it was rakudo d812b71ac959349 that makes the NativeCall warnings show, which really just changed how the warnings are printed, they were always there just not visible
17:03 gtodd is tacking the .hash  method on the end of an expression the same as assigning the value of that expression to a hash?
17:04 gtodd it looks like it is so I guess I mean does one *use* ".hash" like that or ...
17:07 Alula_ joined #perl6
17:10 FROGGS gtodd: no, it there is a difference
17:11 FROGGS .hash flattens an itemized hash ("hashref") to a hash, and then you can assign it to a var with a % sigil
17:12 FROGGS that an itemized hash can be assigned to a % variable is an accident, and already is deprecated and will fail in near future
17:12 FROGGS because you assign then a single item to a hash that expects key/value pairs
17:13 gtodd ah ok I think I recall that ... so far I just use it for inspecting a %hash data-structure ...
17:14 Ven joined #perl6
17:16 gtodd was trying to assign match output to a hash but now I see I've got look more deeply at how to do that  instead of trying   .magic
17:16 gtodd FROGGS thanks
17:30 ChoHag Eugh. Travel.
17:31 denis_boyun joined #perl6
17:31 ChoHag What would be the most appropriate answer to the vague question 'how complete is threading in moar'?
17:32 Ven "nested signatures / object unpacking in signatures" <- what's the diff between those ?
17:32 Ven oh, :() for a sub signature ?
17:42 FROGGS ChoHag: jnthn and lizmat can probably answer best
17:42 lizmat I would say: pretty complete feature wise, not battletested under stress yet
17:42 lizmat some features may still change
17:43 lizmat e.g. I'm still not happy about winner { }
17:43 ChoHag Well good I don't use that one.
17:44 lizmat all things related to Supplies will probably remain unchanged
17:45 ChoHag I think I'm hitting bugs, but I have no way of telling whether they're exclusively in my code or if my bugs are integrating with perl's bugs.
17:45 Ven Erm, can I reuse the "ascii graph" from s05 to explain captures and such ?
17:45 carlin rakudo 1b25025ccd4110cda t/04-roundtrip.t .. ok
17:45 Ven graphs, even.
17:45 carlin rakudo d812b71ac959349ba t/04-roundtrip.t .. 1/17 # got: [1.3, 2.8, 32323423.4, 4] # expected: [1.3, 2.8, 32323423.4, 4.0]
17:45 lizmat Ven: it's open source, afaik
17:45 Ven gonna use it then, they're cool :).
17:46 lizmat ChoHag: I can't help you much with such a description of the problem
17:46 Ven I feel like regexps are gonna be half of my learnxiny hahaha.
17:46 FROGGS carlin++
17:46 ChoHag I need to try and trim the problem down before I can make sense of it, so there's no chance of transmitting that sense on irc.
17:47 FROGGS carlin: but how can that patch mess it up?
17:47 carlin FROGGS: exactly :/
17:48 carlin I think it's the same as with zavolaj, it was always wrong but the error was being hidden
17:48 FROGGS or can you run t/04-roundtrip.t @ 1b25025ccd4110cda directly? so we see the test output?
17:48 FROGGS I know that I ran the zavolaj tests verbose a month ago, and all single tests passed
17:49 Ven erm, are regexy-stuff operators ? like [] and ()
17:50 FROGGS Ven: err what?
17:50 Ven FROGGS: what do I call [] and () in regexps ?
17:50 FROGGS [] is a non-capturing group
17:50 FROGGS and () is a capturing group
17:52 carlin ugh, https://gist.github.com/ca​rbin/7f2b0ab6c3c317e0c803
17:53 FROGGS ahh, that explains it
17:53 FROGGS carlin: that is a never (bad) version?
17:53 carlin that's rakudo 1b25025ccd4110cda25a
17:53 gtodd are %hash{'$0'}{'$1'} and  %hash<$0><$1> intended to be equivalent?
17:53 FROGGS gtodd: yes
17:54 gtodd tried to assign "combed" values to a hash like this:  my %hash{'$0'}{'$1'}=$str.comb(/(\d**2)(\D**2)+/)  (which kind of did what I wanted but still learning so whatever)  but when I did used %hash<$0><$1>=$str.comb(/(\d**2)(\D**2)+/) I got an error about shaped variables declaration ...
17:54 FROGGS gtodd: both do not interpolate
17:54 gtodd FROGGS oh
17:54 FROGGS strip the quotes
17:54 carlin running panda-test that version just gives
17:54 carlin t/04-roundtrip.t .. ok
17:55 FROGGS carlin: it should be okay when it is a TODO test...
17:55 carlin but the next rakudo version up shows the error
17:55 FROGGS I guess we have to look closer at how prove wants to have its TAP
17:57 eiro ls
17:57 rindolf joined #perl6
17:57 eiro oops sorry
17:58 gtodd argh I thought quotes were required in 6 ...
17:58 Ven FROGGS: yes, i know they are {non-,}capturing, I mean what are they called
17:59 nwc10 http://blog.circleci.com/criti​quing-facebooks-new-php-spec/ -- This is interesting because they’re changing the definition of the language through a sort of back-channel. They’re allowing breaking changes by effectively deciding that other implementation choices are equally valid.
17:59 FROGGS Ven: they are called that way
17:59 Ven I must be explaining myself poorly
18:00 FROGGS gtodd: you need quotes when you want them to be literal keys.... but if you want the variables to interpolate you can also use double quotes
18:00 gtodd ah ok
18:00 gtodd sorry thanks ... :)
18:00 FROGGS np :o)
18:01 gtodd m: my %hash<$0><$1>="34abcd42xxyy​zz".comb(/(\d**2)(\D**2)+/)
18:01 camelia rakudo-moar ccda7d: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/kojn2tywCmâ�¤Shaped variable declarations not yet implemented. Sorry. â�¤at /tmp/kojn2tywCm:1â�¤------> [32mmy %hash<$0>[33mâ��[31m<$1>="34abcd42​xxyyzz".comb(/(\d**2)(\D**[0mâ�¤Â»
18:01 TimToady you have to say (my %hash)<$0><$1> =
18:02 TimToady otherwise the my eats the <> or {} as part of the declaration
18:02 ChoHag I thought <> was a string a la ''?
18:02 TimToady and your expression makes no sense
18:02 TimToady it is, when it's a subscript
18:03 gtodd ...  argh :-)  ok thanks ... but I stumbled onto another cool thing "Shaped variable declarations"
18:03 TimToady but the subscript syntax is reserved in declarations for declaring shapes
18:03 TimToady you can't distribute $0 and $1 like that
18:04 TimToady well, maybe you can get away with it in this case, since there's only one match, but then why are you using .comb?
18:04 gtodd TimToady: oopsie
18:05 TimToady m: "34abcd42xxyyzz".comb(/(\d**2)(\D**2)+/); say "$0 $1"
18:05 camelia rakudo-moar ccda7d: OUTPUT« ␤»
18:05 gtodd TimToady: it's shiny :)  ... try
18:05 TimToady or not
18:05 TimToady it only sets $0 and $1 down in the comb method
18:05 TimToady which ignores it
18:06 TimToady oh wait, that one matches twice
18:06 TimToady misread \D as \d
18:07 TimToady also $str ~~ s/foo/bar/.say will not work once s/// is fixed
18:07 TimToady and in some sense it's not working now, because ~~ is returning False
18:08 TimToady well, or maybe True in this case
18:09 TimToady anyway, .say will get the Match object in the future, not the resulting string
18:09 gtodd TimToady: no matter I'm still doing it wrong :-)  ...
18:10 TimToady so it would say 「foo」
18:11 gtodd I'm just trying too hard to be tricky ... instead I should be patiently translating the little lines of perl5 that work
18:12 cognome joined #perl6
18:12 cognominal joined #perl6
18:12 [Sno] joined #perl6
18:14 gtodd into their perl6 equivalents ... even if I don't get to use .comb :)
18:22 treehug88 joined #perl6
18:23 TimToady m: "34abcd42xxyyzz".comb(/(\d​**2)(\D**2)+/)[0].WHAT.say
18:23 camelia rakudo-moar ccda7d: OUTPUT«(Str)␤»
18:23 TimToady in any case, .comb just returns a list of strings
18:34 Alula_ joined #perl6
18:34 pecastro joined #perl6
18:35 Ven joined #perl6
18:41 dwarring joined #perl6
18:48 aoseki joined #perl6
19:15 cxreg so after several years of some node.js development, I've been tinkering with the concurrency primitives in rakudo/moar
19:15 cxreg my god, it's made of actual unicorns
19:16 cxreg makes me wonder a bit when it will choose to make threads since that seems to be heuristic, and that makes me a tiny bit twitchy
19:17 sjn cxreg: thanks for sharing, but if you have praise, blog about it; if you have something to improve, this is the place for it :)
19:18 * jnthn tries to figure out if being made of actual unicorns is good
19:18 sjn with that said, I agree completely about Perl 6's unicornity :)
19:18 cxreg I'm not ready to tell the world yet, but I will.  in the meantime, I'm talking about it here so that I understand it better
19:18 jnthn Don't want to fall afoul of the International Society for the Protection of Unicorns :)
19:18 * lue would prefer a multihorned animal...
19:19 cxreg it automatically makes as many horns as is necessary
19:19 TimToady how 'bout antennae?
19:20 jnthn As for the scheduler: it's currently not very smart, but will learn to be smarter over time.
19:20 cxreg is the answer now and forever "trust it to do the right thing, and report a bug if you think it didn't" ?
19:20 jnthn In general - for most people - "trust the heuristics the scheduler applies until they don't work for you" is a good way to go.
19:20 cxreg ok.  that's fair, just requires some learning and trusting.  but thanks
19:21 jnthn But $*SCHEDULER is contextual because a good default won't suit *everyone*.
19:21 cxreg jnthn++ thanks, I'll try to read up on how it works
19:21 jnthn In general, I've found that developers are (a) reluctant to trust, and then (b) go and make choices that don't work too well
19:21 jnthn Where (b) applies in around 90% of cases
19:22 jnthn Stuff like "I picked 4 threads 'cus my dev machine is quad core" without realizing production can look quite different (in either direction)
19:22 integral_ joined #perl6
19:22 integral_ joined #perl6
19:22 jnthn The *really* scary one is the .Net scheduler.
19:23 jnthn Which actually measures throughput and then smooths it using DSP techniques.
19:23 jnthn And uses that to decide to add/remove threads.
19:23 jnthn Which sounds crazy but I'm so far failed to get it to do something insane.
19:23 jnthn Maybe I'm not creative enough :)
19:31 Ven Intelligent Thread Pool
19:31 Ven :D
19:36 timotimo the benchmarks are still running ...
19:36 jnthn What did you benchmark? :)
19:36 timotimo all three backends ;)
19:36 jnthn ah
19:36 jnthn JVM :)
19:36 timotimo yes ;)
19:37 jnthn Must be taking its time, enjoying the summer pastures... :)
19:40 timotimo not only all three backends, but also all two frontends ;)
19:40 jnthn cool
19:40 jnthn bbiab
19:41 * TimToady imagines a beast with three backends and two frontends...
19:43 TimToady if it's made out of unicorns, we might need to find some of those extra virgins they make olive oil out of
19:43 nwc10 :-)
19:43 FROGGS *g*
19:43 SevenWolf joined #perl6
19:43 geekosaur sounds more like everyone's favorite puppy, kerberos...
19:44 geekosaur (or cerberus if you must)
19:45 TimToady not to be confused with aardvarks
19:47 * Ven clones nqp-js on windows
19:47 cooper_ joined #perl6
19:49 akaseki joined #perl6
19:49 Ven joined #perl6
19:50 vendethiel pmurias: oh, you're using nmake ?
19:50 dalek roast: d2e7215 | (David Warring david.warring@gmail.com)++ | S03-operators/relational.t:
19:50 dalek roast: Added test cases for RT121987
19:50 dalek roast:
19:50 dalek roast: Negated relational operators not chaining correctly.
19:50 dalek roast: review: https://github.com/perl6/roast/commit/d2e7215fd4
19:54 timotimo .tell japhb i really ought to pay close attention to the flags for the test runner when i do jvm benchmarks ... i should let it do fewer tests in a row or something ... or could we perhaps have an option that allows us to scale two steps at a time?
19:54 yoleaux timotimo: I'll pass your message to japhb.
20:26 anaeem1 joined #perl6
20:28 cxreg i think "extra virgin" is rather like "extra marital"
20:28 SevenWolf joined #perl6
20:32 pmurias vendethiel: I supposed nmake is used on windows
20:33 vendethiel erm, but I don't have nmake, I have make :(
20:36 Ven joined #perl6
20:38 FROGGS vendethiel: get nmake
20:38 FROGGS really
20:40 vendethiel I probably do, I have VS for C# stuff
20:40 vendethiel might not be in my path
20:57 araujo joined #perl6
21:00 cooper_ joined #perl6
21:05 pmurias are vendethiel and Ven the same person?
21:05 Ven pmurias: not sure
21:05 vendethiel are they ?
21:05 Ven you actually managed to
21:05 vendethiel get both my pc ding'ing at the same time
21:09 dalek rakudo/nom: 89c8e4a | (Tobias Leich)++ | docs/ROADMAP:
21:09 dalek rakudo/nom: fix roadmap entry about label handling
21:09 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/89c8e4ae46
21:10 vendethiel "1 ***   basic Perl 5 interop (use, eval, etc.) (diakopter)" <- diakopter ?
21:11 vendethiel FROGGS: can't tr/// be removed from that list :-) ?
21:13 FROGGS vendethiel: I'm not sure about tr, didn't follow the discussions/changes
21:13 Ven fair enough :). it's good to update it anyway
21:13 FROGGS I dunno about the interop... others should judge
21:13 Ven 2014 really flew by ...
21:13 FROGGS true
21:14 PerlJam only about half of 2014 is in the past, the rest is still in the future
21:14 FROGGS but when I compare the rakudo of today to the one I know from oktober 2012... man, that thing has improved in all possible ways :o)
21:20 dalek roast: 1e3997c | (David Warring david.warring@gmail.com)++ | S03-operators/relational.t:
21:20 dalek roast: typo
21:20 dalek roast: review: https://github.com/perl6/roast/commit/1e3997ce84
21:31 masak 'night, #perl6
21:31 hoelzro night masak
21:31 PerlJam gutennacht masak
21:38 pmurias what's the state of the rakudo-perl5 interop?
21:42 psch m: $_ = "foO"; tr:i/o/u/ # re: "can tr/// be taken off the ROADMAP"
21:42 camelia rakudo-moar ccda7d: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/f7qapJ9flD�tr/// adverbs not yet implemented. Sorry. �at /tmp/f7qapJ9flD:1�------> [32m$_ = "foO"; tr:i/o/u/[33m�[31m # re: "can tr/// be taken off the ROADM[0m�»
21:43 psch afaiu, :i and maybe :ii might be the only adverbs that even make sense for tr///
21:45 psch (i also recently realized that my PR for "s/// to spec" relies on .match creating a "multi-match", which it doesn't)
21:45 psch (for :g, that is)
21:51 lue don't forget :m and :mm :)
21:53 psch oh, obviously i did.  those probably should go in there as well, yes.
21:55 lue psch: for a "multi-match" (which I assume means multiple possible matches), :ex and :ov should do that for you, but I think they're NYI.
21:56 rurban joined #perl6
21:59 psch lue: no, not multiple possible matches.  :g can match one pattern multiple times, and the returned Match has to contain all those matches, which it currently doesn't.  compare S05:4646
21:59 synopsebot Link: http://perlcabal.org/syn/S05.html#line_4646
22:00 psch lue: afaiu, all of the matches from :g are actual matches, and they get replaced
22:00 psch m: $_ = "abc"; s:g/./z/; .say
22:00 camelia rakudo-moar ccda7d: OUTPUT«zzz␤»
22:00 psch m: $_ = "abc"; s:g/./z/; #`[[ but!: ]] say $/
22:00 camelia rakudo-moar ccda7d: OUTPUT«「c」␤␤»
22:01 psch m: $_ = "abc"; s:g/.{ say $/ }/z/;
22:01 camelia rakudo-moar ccda7d: OUTPUT«「a」␤␤「b」␤␤「c」␤␤»
22:02 lue huh, S05 doesn't actually explain what :g does (I think of it as being for subst only, with m// getting :ex and :ov for clarity's sake). Another instance of the spec requiring P5 knowledge I suppose :/
22:07 psch my understanding is that :g is :ex without :ov
22:08 TimToady :ex is all possible; :ov allows overlap but not multiple matches at the same location; :g forbids overlap
22:08 lue yeah, that sounds about right, though (again) the spec doesn't say for sure, and my view on :g makes it a poor choice for exhaustive, non-overlapping. (In my head, it's just the "replace more than the first" modifier, not the "match multiple times" modifier)
22:10 TimToady but "exhaustive" does not simply mean "keep trying"; all three of these mean that
22:12 TimToady it's more of a singular/plural distinction; with three different sorts of plural semantics
22:16 lue I feel like you could associate :g/:ov/:ex with regex/token/rule, though really the only commonality is "three levels, each building on the next"
22:26 TimToady well, only :g makes sense on s///, unless you defined :ov or :ex to continue on the new string instead of the old one--but down that path lies great pain and suffering
22:28 TimToady not to mention stress on the GC
22:28 lue TimToady: obviously s:ov/// and s:ex/// wouldn't match everything and then replace, they'd have to make a match, replace a match, make a match, replace a match... :P
22:29 TimToady that's what I just said
22:29 lue oh, I misread what you said there.
22:31 Psyche^_ joined #perl6
22:32 lue I should think the sanest option would be to disallow overlapping substitutions outright, and telling complainers that they should be more confident in the content of their replacement strings :)
22:34 TimToady m: s:ov/foo/bar/
22:34 camelia rakudo-moar 89c8e4: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/JkXwm6EJkx�Adverb ov not allowed on substitution�at /tmp/JkXwm6EJkx:1�------> [32ms:ov/foo/bar/[33m�[31m<EOL>[0m�»
22:37 virtualsue joined #perl6
22:42 TimToady m: $_ = 'fooooooooooooood'; my $pos = 0; $pos = $/.from + 5 * rand while s:c($pos)/ooo/foo/; .say
22:42 camelia rakudo-moar 89c8e4: OUTPUT«(timeout)use of uninitialized value of type Nil in numeric context  in block  at /tmp/C1oL1P_Ei8:1␤␤use of uninitialized value of type Nil in numeric context  in block  at /tmp/C1oL1P_Ei8:1␤␤use of uninitialized value of type Nil in numeric context…»
22:42 TimToady oh, right s/// doesn't return the right thing yet
22:43 TimToady m: $_ = 'fooooooooooooood'; my $pos = 0; $pos = $/.from + 5 * rand while s:c($pos)/ooo/foo/ and $/; .say
22:43 camelia rakudo-moar 89c8e4: OUTPUT«ffoofooofffooood␤»
22:43 TimToady m: $_ = 'fooooooooooooood'; my $pos = 0; $pos = $/.from + 5 * rand while s:c($pos)/ooo/foo/ and $/; .say
22:43 camelia rakudo-moar 89c8e4: OUTPUT«ffoooffoofoooood␤»
22:44 TimToady m: $_ = 'fooooooooooooood'; my $pos = 0; $pos = $/.from + 5 * rand while s:c($pos)/ooo/foo/ and $/; .say
22:44 camelia rakudo-moar 89c8e4: OUTPUT«ffffooofffofoood␤»
22:44 TimToady that really needs and exclamation mark
22:45 TimToady m: $_ = 'fooooooooooooood!'; my $pos = 0; $pos = $/.from + 5 * rand while s:c($pos)/ooo/foo/ and $/; .say
22:45 camelia rakudo-moar 89c8e4: OUTPUT«ffoooffooofooood!␤»
23:03 fling joined #perl6
23:04 iarna joined #perl6
23:08 dalek nqp: 72e0753 | jnthn++ | src/ (2 files):
23:08 dalek nqp: Optimize NQP code blocks inside regexes.
23:08 dalek nqp:
23:08 dalek nqp: Before, we just did away with various kinds of optimization if we
23:08 dalek nqp: saw this. Now we can flatten various blocks away and apply other
23:08 dalek nqp: kinds of lowering optimizations.
23:08 dalek nqp: review: https://github.com/perl6/nqp/commit/72e07535cb
23:09 DarthGandalf joined #perl6
23:26 anaeem1 joined #perl6
23:31 ivanshmakov joined #perl6
23:41 rurban joined #perl6
23:54 chenryn joined #perl6
23:55 ventica are there any good docs on the AST that Rakudo produces? I want to look at the Rakudo:VM interface...
23:56 timotimo jnthn: here's the benchmarks - the parrot numbers surprised me a bit, though. http://t.h8.lv/p6bench/2014​-08-01-three_backends.html
23:57 timotimo i'll make a moar-only comparison now, too
23:59 timotimo http://t.h8.lv/p6bench/2014-08-01-moar.html

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

Perl 6 | Reference Documentation | Rakudo