»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg camelia perl6: ... | irclog: irc.perl6.org | UTF-8 is our friend!
Set by sorear on 25 June 2013.
00:05 nbrown joined 00:08 cooper_ left 00:09 nbrown left 00:10 cooper_ joined 00:11 thou left 00:14 nbrown joined 00:15 dayangkun joined 00:19 nbrown left
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␤»
timotimo i'm amazed that this works.
well, not amazed. not that surprised. but very pleased indeed. 00:22
00:25 BenGoldberg joined, iarna left 00:26 cooper_ left 00:27 cooper_ joined
jnthn grmbl...can't figure out why my regex opt thingy is spookily buggy... 00:29
ah well, sleep...can look more tomorrow :)
'night, #perl6
timotimo oooh regex opts :3 00:32
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␤␤»
timotimo m: my @a = $(1, 5, 10; say [>>+<<] @a;
camelia rakudo-moar ae2ffe: OUTPUT«===SORRY!=== Error while compiling /tmp/NVIT9ozF95␤Unable to parse expression in contextualizer; couldn't find final ')' ␤at /tmp/NVIT9ozF95:1␤------> my @a = $(1, 5, 10; say [>>+<<] @a;⏏<EOL>␤ expecting an…»
timotimo m: my @a = [1, 5, 10]; say [>>+<<] @a;
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␤␤»
timotimo m: my @a = [1, 5, 10], [2, 2, 2]; say [>>+<<] @a; 00:34
camelia rakudo-moar ae2ffe: OUTPUT«3 7 12␤»
timotimo oh.
TimToady odd, usually it just returns the single argument if there's only one 00:35
timotimo apparently >>+<< isn't satisfied with a single argument in this case 00:36
ingy greets! I'm at one of those times when I need to install a recent perl6 00:39
on ubuntu 12.04
ideas?
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
ingy but that's what perl6 is best for :)
timotimo: thx! will try it
timotimo: seems to be doing stuff :) 00:44
timotimo good :) 00:45
it'll install stuff in your home, you'll have to add something to your path
you'll most probably want to get it to build a rakudo-moar for you
but you probably already know that ;)
ingy $ rakudobrew build moar # is what I ran
timotimo yup 00:46
when that finishes, you can ask it to install panda for you, too
ingy yeah
maybe I'll update my old p6 modules
00:47 ribasushi left
ingy saw this in s02: todo(:parrøt<0.42>, :dötnet<1.2>)); 00:49
funny
p6 is a good language to steal ideas from
timotimo i remember you stumbling upon that :)
ingy thanks all!
last night, yeah
I let the synopses put me to sleepzzz
timotimo gnite! :)
ingy timotimo: no that was last night 00:55
I'm in full swing now
timotimo OK :)
ingy TimToady: how's UR <ö> doin'?
TimToady 'bout ½ gas, ½ water
very sloshy
00:55 ribasushi joined
ingy Keep UR head down! 00:55
TimToady right, though I'm allowed to sleep on one side or the other :)
pretty much impossible to sleep on my face
ingy you meed a massage table
TimToady that's not the main issue(s)
ingy with a face toilet seat
TimToady neither my GERD nor my vertigo cooperate
00:55 AndChat-188244 left
ingy wonders what is more complicated, P6 or TimToady's constitution… 00:55
TimToady BPPV, I suppose
00:56 thou joined 01:04 nbrown joined 01:12 colomon joined 01:19 SevenWolf joined 01:35 kst joined 01:39 iarna joined 01:43 klapperl joined 01:50 FROGGS_ joined 01:54 FROGGS left, rurban left 01:55 iarna left 01:56 awwaiid joined 02:15 rurban joined 02:16 noganex_ joined, iarna joined 02:17 nbrown left 02:18 lustlife joined
hoelzro say(try { 1 CATCH {} }) 02:33
oops
m: say(try { 1 CATCH {} })
camelia rakudo-moar ae2ffe: OUTPUT«===SORRY!=== Error while compiling /tmp/GCfgCMg2CA␤Two terms in a row␤at /tmp/GCfgCMg2CA:1␤------> say(try { 1 ⏏CATCH {} })␤ expecting any of:␤ postfix␤ infix stopper␤ infix or me…»
hoelzro hmm
m: sub f { try { 1 CATCH {} } } say(f())
camelia rakudo-moar ae2ffe: OUTPUT«===SORRY!=== Error while compiling /tmp/mKpnHlXCEK␤Two terms in a row␤at /tmp/mKpnHlXCEK:1␤------> sub f { try { 1 ⏏CATCH {} } } say(f())␤ expecting any of:␤ postfix␤ infix stopper␤ …»
hoelzro one more time...
m: sub f { try { 1 CATCH {} } } ; say(f())
camelia rakudo-moar ae2ffe: OUTPUT«===SORRY!=== Error while compiling /tmp/JdEE0oVcgs␤Two terms in a row␤at /tmp/JdEE0oVcgs:1␤------> sub f { try { 1 ⏏CATCH {} } } ; say(f())␤ expecting any of:␤ postfix␤ infix stopper␤ …»
hoelzro oh, I see it now 02:34
m: sub f { try { 1; CATCH {} } } ; say(f())
camelia rakudo-moar ae2ffe: OUTPUT«Nil␤»
hoelzro so I expected f to return 1
it that unreasonable?
TimToady I would expect it to return 1 as well 02:36
hoelzro n: sub f { try { 1; CATCH {} } } ; say(f())
camelia niecza v24-109-g48a8de3: OUTPUT«Nil␤»
hoelzro m: sub f { try { CATCH {} ; 1 } } ; say(f()) 02:37
camelia rakudo-moar ae2ffe: OUTPUT«1␤»
TimToady interesting
PerlJam good evening #perl6 02:39
hoelzro ahoy PerlJam
PerlJam hoelzro: so ... any LHF on S26 ? Something to ease me in? : ) 02:43
er, :)
hoelzro hmm
let's have a look
well, tests are easy =)
TimToady we could potentially spec that phasers that do not return a value are spliced out of the sequence of statements
hoelzro I started on checking $=pod in the leading comment test; that needs to be more thorough 02:44
TimToady: that makes sense to me
PerlJam TimToady: +1
hoelzro PerlJam: I don't think there are tests for certain decls, ex. regexes and grammars. So we need tests for all decl types
even documenting which ones are missing would be helpful!
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.
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
I'm a little surprised we don't have a warning for a literal in sink context 02:46
m: sub f { try { 1 + 1; CATCH {} } } ; say(f())
camelia rakudo-moar ae2ffe: OUTPUT«Nil␤»
TimToady m: sub f { try { 1 + 1; 42; CATCH {} } } ; say(f())
camelia rakudo-moar ae2ffe: OUTPUT«Nil␤»
TimToady 1+1; 42 02:47
m: 1+1; 42
camelia rakudo-moar ae2ffe: OUTPUT«WARNINGS:␤Useless use of "+" in expression "1+1" in sink context (line 1)␤»
hoelzro PerlJam: oh, and trailing space isn't tested very thoroughly either
now that I'm looking at my notes...
TimToady: do you think it would make sense to be able to do #| comment \n our $var;?
or, for that matter, my $var
TimToady m: sub f { 1+1; try { 42; CATCH {} } } ; say(f()) 02:48
camelia rakudo-moar ae2ffe: OUTPUT«Nil␤»
TimToady m: sub f { 1+1; 42; } ; say(f())
camelia rakudo-moar ae2ffe: OUTPUT«42␤»
TimToady why you no warn me?
hoelzro: why not?
hoelzro shrugs 02:49
because it's not currently in the spec? =)
TimToady especially if there's a really large initializer...
I don't see any reason to differentiate declarations by type that way
hoelzro alright 02:50
TimToady yeah, it's kind of hard to put #= on a sub, but not impossible
sub foo #= \n ($a,$b) {...}
hoelzro makes sense 02:51
TimToady and again, why make people memorize a list?
hoelzro indeed
TimToady masak: ^^ a missing warning bug
which would have at least tipped us off to what was going on in { 1; CATCH {} } 02:52
hoelzro indeed
TimToady m: 42; 43; 02:53
camelia rakudo-moar ae2ffe: OUTPUT«WARNINGS:␤Useless use of constant integer 42 in sink context (line 1)␤»
TimToady m: { 42; 43; }
camelia ( no output )
hoelzro how odd
TimToady seems silly to only do it in the mainline
02:53 raiph left
dalek ecs: 1839cd7 | TimToady++ | S04-control.pod:
start returns a value (a promise)
02:56
03:00 raiph joined 03:02 chenryn joined 03:07 kaare_ joined 03:15 iarna left
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:23
03:28 yoleaux joined, ChanServ sets mode: +v yoleaux 03:32 yoleaux left, yoleaux joined, ChanServ sets mode: +v yoleaux, ponbiki left 03:36 colomon left
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␤␤»
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␤»
raiph hoelzro ^^ ?
hoelzro raiph: hmm...I thought I'd tried the latter 03:43
hoelzro tries again
03:44 ventica joined
hoelzro hmm 03:48
that doesn't work for interpolation
m: class A { method Str (Mu \v:) { say v.VAR.name } }; my $f = A.new; "$f"
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 04:04 kaare_ left 04:06 iarna joined 04:10 rindolf joined 04:17 SevenWolf left, [Sno] left 04:20 chenryn left
gtodd m: my @weights=[57..66].say 04:22
camelia rakudo-moar ae2ffe: OUTPUT«57 58 59 60 61 62 63 64 65 66␤»
gtodd m: my @weights=[57..66] ; my $elems="LaCePrNd,Sm,,Tb,Dy ; $elems~~ /. ** 2/ 04:26
camelia rakudo-moar ae2ffe: OUTPUT«===SORRY!=== Error while compiling /tmp/VZnAsZb6DN␤Unable to parse expression in double quotes; couldn't find final '"' ␤at /tmp/VZnAsZb6DN:1␤------> ="LaCePrNd,Sm,,Tb,Dy ; $elems~~ /. ** 2/⏏<EOL>␤ expectin…»
gtodd m: my @weights=[57..66] ; my $elems="LaCePrNd,Sm,,Tb,Dy"; $elems~~ /. ** 2/ 04:27
camelia ( no output )
gtodd m: my @weights=[57..66] ; my $elems="LaCePrNd,Sm,,Tb,Dy"; $elems~~ /. ** 2/.SAY
camelia rakudo-moar ae2ffe: OUTPUT«No such method 'SAY' for invocant of type 'Regex'␤ in block at /tmp/lDjpbi43h0:1␤␤»
gtodd OOPS 04:28
/MSG CAMELIA
04:33 rurban left 04:34 Rotwang left 04:37 gfldex joined 04:41 kaare_ joined 04:42 dwarring left 04:43 chenryn joined 04:50 BenGoldberg left 05:01 dayangkun left 05:02 raiph left
masak morning, #perl6 05:13
05:14 dayangkun joined
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␤»
masak gtodd: observe the "True" at the end. that's what you end up storing in @weights.
gtodd: (because that's what .say returns) 05:15
05:16 gfldex left 05:29 ventica left 05:30 gtodd1 joined 05:31 gtodd left
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
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
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:37
05:38 [Sno] joined 05:39 SamuraiJack left 05:41 SamuraiJack joined
btyler hmm, found nqp::rebless, but foiled by the repr again "this repr cannot change type" 05:47
05:55 zengargoyle left 05:59 denis_boyun joined 06:00 zengargoyle joined 06:23 Woodi joined
sergot hi o/ 06:38
tadzik hey hey 06:39
06:41 kaleem joined
sergot tadzik: have you installed the HTTP::UserAgent successfully? 06:44
tadzik: carlin had probably the same problem 06:46
and I can't reproduce it, could you help me solving it?
06:48 brrt joined 06:49 virtualsue joined 06:55 iarna left
masak btyler: reading S12, I have the sense that the best you can hope for is a custom 'clone into subclass' method. 06:55
though I may be wrong.
btyler: it may or may not be enough to `but` in a subclass. 06:57
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…»
masak ah, interesting. 06:59
so that's one of the C3 limitations one can run up against :)
it... surprises me a little bit, because it feels like in a sense, I'm not doing anything different here than multiple inheritance. 07:00
07:02 zakharyas joined
btyler masak: thanks. the complicating factor here is NativeCall -- essentially I want to steal the CPointer and retype it into the child class 07:14
which is why something like "but" is no go - the CPointer repr doesn't allow modification like that 07:15
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
masak sounds sensible.
btyler rather than different types for different json array/object, etc
masak *nod* 07:19
btyler hmm, occurs to me that this is exactly what nativecast is for 07:21
tadzik sergot: I don't think I retried, frankly :/ 07:32
let's see if it magically started working
07:35 Akagi201 left, Akagi201 joined 07:38 avuserow joined 07:39 rurban joined 07:40 dmol joined 07:41 Akagi201 left, Akagi201 joined 07:43 rurban left
sergot ok :) 07:48
07:52 darutoko joined 08:01 Ven joined
nwc10 pugs: say 6.8598e+01 / 7.1820e+01 08:09
camelia pugs: OUTPUT«0.9551378446115288220551378446115288220551␤»
nwc10 pugs: say 4.736e+02 / 6.8598e+01 # 7.1820e+01
camelia pugs: OUTPUT«6.9039913700107874865156418554476806903991␤»
08:09 virtualsue left
nwc10 no, that's the one I wanted. Moar now 6.9 times faster than parrot at compiling the setting 08:10
Woodi hi today #perl6 08:13
Ven oh, looks like PHP is getting a specification.
nwc10 do you have a link?
Woodi btyler: is your code using nativecalls available to look at somewhere ? 08:14
08:15 FROGGS_ left
Woodi PHP specification ? why ? someone want to write his own interpreter ? :) 08:16
08:17 thou left
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:18
08:19 FROGGS joined 08:24 ponbiki joined
Ven nwc10: github.com/php/php-langspec 08:28
nwc10 Ven: thanks 08:29
Ven Woodi: php *did* kill perl, not near ...
nwc10 github.com/php/php-langspec/blob/master/LICENSE -- Facebook has dedicated all copyright to this specification ... 08:30
sergot m: use v9;
camelia ( no output )
sergot m: use v1-;
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␤»
sergot m: use v10;
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␤»
nwc10 that doesn't surprise me, as I assume that HHVM is the driver for this
sergot what is v9?
FROGGS sergot: a version literal 08:31
sergot m: say v9;
camelia rakudo-moar ae2ffe: OUTPUT«v9␤»
FROGGS m: say v9.WHAT; 08:32
camelia rakudo-moar ae2ffe: OUTPUT«(Version)␤»
FROGGS m: say v9.perl
camelia rakudo-moar ae2ffe: OUTPUT«Version.new('9')␤»
sergot m: say v9.9.perl;
camelia rakudo-moar ae2ffe: OUTPUT«Version.new('9.9')␤»
sergot ok :)
thanks
Ven
.oO( Is Perl 9 basically NuPRL? )
nwc10 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
doesn't seem to be the spec that I thought it was. But does seem to be a useful thing
sergot FROGGS: why does v10 doesnt work thne?
then8
wait.. 08:34
08:34 dayangkun left
Ven m: use v8; # this one is scala 08:34
camelia ( no output )
sergot why does it not work
08:36 dakkar joined
nwc10 oh, it *is*. That list seems to be different, despite being linked from the github repo 08:36
08:36 kurahaupo_ joined 08:37 SamuraiJack left
FROGGS sergot: `use VERSION` is a noop right now except for `use v5` 08:39
though I have no idea why v10 does not work
sergot ok :)
nwc10 ... eing 08:42
oops
08:42 rurban joined
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
that might get to be fun
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
so, to some degree, it forks the language into imlementations that can do RAII, and those that can't 08:45
and code that relies on RAII may well subtly break 08:46
08:46 rurban left
Ven nwc10: I don't think there's code that does, though. 08:46
08:46 dayangkun joined
nwc10 also "A VStore's refcount is defined as the number of unreclaimed VSlots that point to the VStore." 08:47
Ven pretty obvious
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
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:48
08:57 kivutar joined 09:05 kivutar left 09:06 SamuraiJack left, kivutar joined, SamuraiJack joined
nwc10 jnthn: rakudo master still builds for me on parrot 09:07
Ven nwc10: are you on windows, tho ? 09:08
nwc10 no, this is on x86_64 linux
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 :)
nwc10 an overnight commit message from jnthn IIRC was roughly "should work on parrot, but can't test it locally"
Ven nwc10: then a little bit later "probably because I'm on windows" 09:13
09:13 virtualsue joined, SamuraiJack left
sergot tadzik: oh, yeah, I forgot to change the plan 09:21
tadzik: fixed 09:22
I mean, the cookies.t error
09:24 brrt left 09:35 spider-mario joined 09:43 rurban joined 09:47 rurban left 09:51 aoseki joined 09:53 akaseki left 09:56 xfix joined, xfix left, xfix joined 09:58 kaare_ left 09:59 kaare_ joined 10:05 xfix left 10:07 xfix joined, xfix left, xfix joined 10:12 xfix left 10:13 pmurias joined 10:14 xfix joined, xfix left, xfix joined
pmurias do we standardize on the exception nqp-js should from with a invalid arguments to nqp::seekfh? 10:14
FROGGS I don't think so 10:16
10:16 kivutar left 10:17 Ven left
dalek p-js: dee603a | (Pawel Murias)++ | src/vm/js/nqp-runtime-node/ops/fs.js:
Implement nqp::link, nqp::symlink, nqp::seekfh.

Pass the updated version of test 19.
10:17
10:18 xfix left 10:24 xfix joined, xfix left, xfix joined 10:35 xfix left
pmurias jnthn: typevar's are just normal lexicals that just don't change the type? 10:36
jnthn pmurias: They're normal lexicals that are invariant wrt the invocant of the enclosing routine. 10:38
10:39 akaseki joined 10:41 aoseki left 10:42 xfix joined, xragnar is now known as Guest2231, xragnar_ joined, Guest2231 left, xragnar_ is now known as xragnar
pmurias isn't $?CLASS immutable? 10:43
jnthn Not in a role 10:44
But you can compile it to a completely normal lexical lookup
It compiles to something a tiny bit different on Moar that gives a hint to the type specializer. 10:45
Which enables it to strip away a bunch of virtual calling.
But the pre-specialized code is just a normal lexical lookup 10:46
10:55 rurban joined 10:56 colomon joined 10:59 aoseki joined
pmurias jnthn: what does a set_compile_time_value do on a QAST::Var? 11:01
11:02 akaseki left
lizmat latest and greatest gives 2 spectest errors: 11:02
t/spec/S03-operators/short-circuit.t, 53 11:03
t/spec/S06-routine-modifiers/lvalue-subroutines.t, 10,11
jnthn pmurias: Hm, I'm curious where that happens. But it inherits something from QAST::Node that mixes in.
11:03 chenryn left
pmurias it happens when $?CLASS is seen? 11:03
s/\?//
jnthn Oh, interesting. :) 11:04
In NQP, or Rakudo?
pmurias NQP/Actions.nqp:526
in nqp
11:04 fhelmberger joined
lizmat r: (0 ^^ ^7).WHAT.say # test expects Range, gets Nil 11:04
jnthn uhhh 11:05
camelia rakudo-jvm ae2ffe: OUTPUT«(timeout)»
..rakudo-parrot ae2ffe: OUTPUT«(Range)␤»
..rakudo-moar ae2ffe: OUTPUT«Nil␤»
jnthn I'm fairly sure that set_compile_time_value calls wants to be in the else branch.
lizmat seems moar only
jnthn oh, no... 11:06
The other branch is a WVal which doesn't need it.
Hmmmm
I think it's probably just wrong.
11:06 aoseki left
jnthn ^ is for pmurias btw :) 11:06
lizmat yeah, I got that 11:07
11:07 akaseki joined
jnthn Not sure about your one, lizmat. The last spectest run I did yesterday didn't fail those... 11:07
And I *thought* it was against latest committed things. 11:08
lizmat it's repeatable for me
the other one seems to be related to using an lvalue sub in a proxy FETCH/STORE
11:09 xfix left
jnthn oh... 11:09
FROGGS is looking at an issue related to FETCH/STORE
11:10 xfix joined, xfix left, xfix joined
FROGGS when I am not totally off the compunit itself made in Perl6::Actions line 406 is it 11:10
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
hmm no, that seems to be correct 11:13
11:13 xfix left 11:14 denis_boyun left
timotimo pmurias: yes, just a hint 11:14
11:14 denis_boyun joined
timotimo but i believe it'd also be declared as typevar 11:14
pmurias not in nqp
jnthn I think it's installed as a normal lexical 11:15
It's a little stronger than a hint.
timotimo ah, ok
11:15 kivutar joined
jnthn 'cus the optimizer can rely on it 11:15
timotimo so not a static one.
pmurias a guaranteed hint
11:16 xfix_ joined
dalek p-js: 2a414f1 | (Pawel Murias)++ | src/vm/js/QAST/Compiler.nqp:
Add comment.
11:17
p-js: 52b8fbb | (Pawel Murias)++ | src/vm/js/QAST/Compiler.nqp:
Fix typo.
p-js: 3f3f4cf | (Pawel Murias)++ | src/vm/js/QAST/Compiler.nqp:
Fix typevar handling, that fixes the failing tests in t/nqp.
11:20 Ven joined, xfix_ left, xfix_ joined
dalek p-js: b6e4ec8 | (Pawel Murias)++ | TODO:
Add a port nqp-js to cross-compile on top of the faster MoarVM TODO item.
11:21
p-js: 315c795 | (Pawel Murias)++ | TODO:
Add a port to windows TODO item.
11:22
Ven ah, I could try it under windows 11:23
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
(which should really be porting stuff in the Makefile)
Ven I think my make works okay 11:28
pmurias you mean your make binary or 'make test' in nqp-js? 11:29
Ven my make binary. 11:30
nwc10 jnthn: was 4.736e+02 now 2.0379e+02
timotimo i remember when i got excited about rakudo-parrot doing stage parse in under 100 seconds
... look at us now ...
nwc10 pugs: say 2.0379e+02/ 4.736e+02
camelia pugs: OUTPUT«0.4302998310810810810810810810810810810811␤»
jnthn nwc10: What are we comparing here? :) 11:31
nwc10 jnthn: you seem to have reduced the *parrot* setting compilation time by 57%
jnthn Wow.
FROGGS WAT?
nwc10 yes, that's what I thought
fewer GC runs, maybe?
jnthn It must be insanely slow at doing something Moar was just a little slow at...
nwc10 yes, it has to be something like that. I have no idea what 11:32
and no great desire to go figure it out
jnthn wonders if JVM got a bunch faster at it too
timotimo is that for stage pir?
dalek p-js: 9e63c27 | (Pawel Murias)++ | tools/build/ (2 files):
Replace 'mkdir -p' with $(MKPATH) which seems more portable.
nwc10 r: 2.0379e+02/ 6.8598e+01 11:33
camelia ( no output )
nwc10 r: say 2.0379e+02/ 6.8598e+01
camelia rakudo-{parrot,moar} ae2ffe: OUTPUT«2.97078632030088␤»
..rakudo-jvm ae2ffe: OUTPUT«2.9707863203008835␤»
nwc10 OK, MoarVM now only 3 times slower
it was this:
dumbbench -- ./perl6-p --setting=NULL --optimize=3 --target=pir --stagestats --output=src/gen/p-CORE.setting.pir gen/parrot/CORE.setting
jnthn MoarVM is 3 times slower?
Or 3 times faster?
nwc10 er, faster
PEBKAC
jnthn Important difference :P
nwc10 wonly a fac 11:34
er PEBKAC
what's almost a factor of 10, between friends? :-)
11:34 telex left
jnthn Anyway, faster build on Parrot = faster turnaround for those building stuff on multiple backends. :) 11:34
I imagine we got a bit faster on JVM too.
timotimo we could develop so much faster on parrot if we cross-compiled pbc from moar :P 11:35
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
11:36 telex joined
hoelzro morning #perl6 11:36
FROGGS my local stage parse is 116s, and I though it was not that much slower is the past
hi hoelzro 11:37
masak morn'n, hoelzro
jnthn shopping &
Ven pulls, reconfigures and tries 11:39
I need to reconfigure if the backends changed stuff, rite ?
or, actually, I need --gen-foo if foo changed
pmurias yes 11:43
perl Configure.pl --backends=parrot,js 11:44
Ven parse, 38.7
pmurias: sorry, not in my windows here. I'll do it at home :) 11:45
pmurias np
I didn't read the context before answering ;)
11:46 xfix_ left
hoelzro module MyModule:ver<0.0.1> # <- that should set the version for the module, right? 11:46
Ven hoelzro: NYI, afaik
hoelzro such that is MyModule.^ver, '0.0.1'
ok, just confirming =) 11:47
Ven "basic module versioning" is red in the matrix, if I remember correctly
11:48 xfix_ joined
spider-mario php developers appear to call us a failure 11:49
wiki.php.net/rfc/php6#strong_reaso...n_6_into_7
“Version 6 is generally associated with failure in the world of dynamic languages. PHP 6 was a failure.”
oops
“Version 6 is generally associated with failure in the world of dynamic languages. PHP 6 was a failure; Perl 6 was a failure.”
(the first one was my “fixed” quote)
Juerd Worse things have been said about Perl 6 11:50
Ven :P
spider-mario: I'm fine with being called "a failure" by PHP guys :P
they should call it 6.5, really
pmurias Worse things have been said about PHP by Perl developers ;)
Juerd They suggest that the failure is in the version number, and I may even agree with that :)
pmurias: My favourite PHP/Perl quote: juerd.nl/site.plp/perl_php 11:51
Ven pmurias: "PHP is a failure, no specific version" ? :P
Juerd Ven: phpsadness.com/ :D
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
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 ._.
I don't really care, though, I'm the one laughing with my Perl 6 :D.
Juerd Unfortunately, I no longer have the high res photo I need for a reprint
So I may actually have to buy training wheels and make a new one 11:54
tnx.nl/php.jpg
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:55
lizmat r: (0 ^^ ^7).WHAT.say # should I create a rakudobug for this one? 11:56
camelia rakudo-{parrot,jvm} ae2ffe: OUTPUT«(Range)␤»
..rakudo-moar ae2ffe: OUTPUT«Nil␤»
masak lizmat: yes, please.
lizmat r: (^7 ^^ 0).WHAT.say # this appears to work 11:57
camelia rakudo-{parrot,jvm,moar} ae2ffe: OUTPUT«(Range)␤»
dalek ast: c57d4ff | (Elizabeth Mattijsen)++ | S03-operators/short-circuit.t:
Fudge for #122448
12:00
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...?id=122448
hoelzro PerlJam: ping 12:08
12:08 xfix_ left
FROGGS p: say (0 ^^ ^7) 12:09
camelia rakudo-parrot ae2ffe: OUTPUT«0..^7␤»
12:10 xfix joined, xfix left, xfix joined
lizmat I've golfed down the problem in t/spec/S06-routine-modifiers/lvalue-subroutines.t to gist.github.com/lizmat/8d04b65573200ec70f08 12:13
if you take out the "die", it works
with MVM_SPESH_DISABLE=1, I get the same problem
Ven
.oO( Let's start a php backend for p6, everything will be fine then )
12:14
lizmat the die probably fails because $passwd is Mu
12:17 xfix left 12:19 xfix joined, xfix left, xfix joined
jnthn lizmat: What about with perl6-m --optimize=off or so? 12:19
pmurias Ven: what would be the use of a php backend?
Ven pmurias: having it run Everywhere(TM).
lizmat works ok with --optimize=off 12:20
jnthn Ah, ok
lizmat so it appears to be an optimizer bug
jnthn --optimize=1 ?
lizmat actually, both spectest failures go away with --optimize < 2 12:22
so the #122448 is also an optimizer issue
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...?id=122448
jnthn ah, ok 12:24
pmurias Ven: Everywhere(TM) = cheap hostings?
Ven pmurias: nooo! Everyyyyyyywheeeeere.
jnthn lizmat: So possibly even related
12:24 brother joined
lizmat yes, that would not be unlikely 12:25
I wouldn't be surprised that the parameter to the outer rw sub 12:26
is optimized away because it doesn't see that is used inside the STORE block 12:27
It comes out Mu inside the STORE block
(the $passwd in my gist) 12:28
12:28 xragnar left 12:29 xragnar joined
lizmat jnthn: I think it's related to a398910b4a6a1bdd42cd5a3cc33d8dfad0e3501f 12:30
as when I put a "my $a = " before the call to checklastval() 12:31
the problem goes away
so it's related to some sink context optimization 12:32
pmurias nqp integers are 64bit? 12:33
12:35 kaare_ left
jnthn lizmat: OK; will take a look this evening 12:40
pmurias: Always on Moar and JVM; by CPU on Parrot, iirc.
pmurias javascript seems to only have integers up to 2**53 :( 12:41
kurahaupo_ pmurias: that sounds like the mantissa of a floating point number 12:42
Ven try 0.4 + .2 in JS, and get suprised :)
sur*, even 12:43
pmurias kurahaupo_: yes, the language itself has only doubles :(
kurahaupo_ or maybe they're using the other bits for type-tagging?
pmurias jnthn: so I have three choices: 12:48
Ven nqp-js-jvm that runs on rhino :D
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:49
jnthn: with misbehave meaning $big+1 == $big 12:50
jnthn pmurias: 1 and 2 are both slow, I guess? 12:51
pmurias 2 should be fast
12:51 lustlife left
jnthn Ah, it's just a bit mask? 12:51
pmurias yes
jnthn That could be least surprising...
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')
Ven hoelzro: .kv ? 12:53
hoelzro thanks Ven
that's perfect!
Ven notes he should tell that in this tutorial
pmurias jnthn: option 3 seems like it could cause extreme frustration to someone 12:54
Ven pmurias: related www.scala-js.org/doc/semantics.html 12:55
pmurias jnthn: according to the spec the Perl 6 'int' type is the largest that runs at full speed 12:57
so it should be 32bit
jnthn: the big question is does nqp/rakudo depend on int being 64bit somewhere? 12:58
12:58 kivutar left
jnthn pmurias: I highly doubt it, given it runs on Parrot where that can't be promised. 12:59
nwc10 I honestly forget if it tests cleanly on a 32 bit parrot 13:00
pmurias so option 2 seems resonable?
hoelzro I'm surprised that scala.js thing doesn't mention threading at all
pmurias it should fail on 32bit
nwc10 (at such times as all the tests were passing cleanly on a 64 bit parrot)
jnthn pmurias: Seems reasonable to me and probably most sane
nwc10 "JS threading" is an Xemacs release codename?
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:01
Ven hoelzro: well, it doesn't compile. not a semantic diff :P 13:02
hoelzro heh
pmurias currently the performance penalty of emulating 64bit wouldn't matter match, but once the code gen stops being extremely stupid it could 13:03
Ven You're just producing JS strings, right ? 13:04
pmurias yes
Ven that means no source mapping then
13:04 takesako joined
pmurias that would need to be changed for source maps 13:06
Ven: but to get source maps just producing (JS string + Perl6 source position) should be enough 13:08
13:11 darutoko- joined 13:13 carlin_ joined, lizmat_ joined
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
well, if you have to read it, I mean. Opal (ruby to js) generates terrible code ... 13:15
13:15 dmol left, cooper_ left, darutoko left, tadzik left, takesako left, revdiablo left, kst left, Psyche^_ left, tadzik joined, cooper_ joined, Psyche^ joined, jlaire joined, kst joined, revdiablo joined 13:16 TimToady joined, anocelot joined, sunnavy joined, xiaomiao joined, takesako joined
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:17
13:18 dmol joined
Ven pmurias: yeah, it's really hard with semantics being so different 13:18
hoelzro why can't source maps be achieved?
13:18 lizmat_ is now known as lizmat
hoelzro wonders if there would be a benefit to generating asm.js 13:19
pmurias hoelzro: they can
hoelzro: very little
hoelzro: asm.js has basically the semantics of an assembler 13:20
PerlJam hoelzro: pong
pmurias so when generating asm.js we would also need a moarvm
hoelzro: maybe for small numeric low level parts 13:21
13:21 kivutar joined
timotimo how well is that going to work out %) 13:21
hoelzro PerlJam: just wanted to let you know that I'm working on cleaning up the TODO file 13:22
pmurias timotimo: ?
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 =)
pmurias: I was thinking about using it for "native" numeric types
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
in general, it seems like getting rid of too many containers is worth much more, etc
so i'm looking at the range, xor, Nil thingie
13:24 silug joined
timotimo the optimizer is actually for some reason appending a Nil as the third argument to xor 13:25
oh, actually, that's also in the non-optimized ast
pmurias timotimo: it seems important when doing number crunching, which admittedly is not something we are focusing at the moment 13:26
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:27
pmurias timotimo: that for sure, generating "asm.js" isn't even in my long term plans 13:33
13:33 iarna joined
timotimo :) 13:33
13:34 FROGGS[mobile] joined
ChoHag Why am I getting Internal error: inconsistent bind result? 13:37
Non-deterministicly. 13:38
13:39 PotatoGim joined, raiph joined
timotimo non-deterministicly sounds like spesh is stumbling 13:39
can you try with MVM_SPESH_DISABLE=1 in your environment? 13:40
ChoHag What's spesh?
Sounds Special.
timotimo bytecode specialization framework
ChoHag Ooh that's a fun one: 13:41
Type check failed in binding <anon>; expected 'Str' but got 'Str'
(With MVM_*)
Could be related. The inconsistent bind error seems to come from the same function (which stringifies and returns some attributes+methods). 13:42
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
dalek p-js: 680e4da | (Pawel Murias)++ | src/vm/js/nqp-runtime-core/runtime.js:
Turn some of integer operations into 32bit ones, convert stuff to 32bit when converting to an integer.

Skip t/serialization/01-basic.t as we don't support 64bit integers.
moritz the bytecode specializer/optimizer 13:44
13:44 rurban left
ChoHag Ah. Yes that one would definitely fall under the category of often. 13:44
hoelzro hmm
why is it $=pod and not @=pod?
13:46 carlin_ is now known as carlin
Ven pmurias: you sure that |0 actually optimizes ? 13:48
it probably does under chrome (who did not want to follow asm.js), but for firefox and ie ?
PerlJam hoelzro: isn't it because $=pod is an object (That happens to stringify to the text)
hoelzro but it's always an Array
isn't it? 13:49
pmurias Ven: currently the optimalization doesn't really matter
Ven: as the rest of the code gen is so bad
hoelzro Ven: if you're using 'use "asm"', that should optimize
under Fx, and now Chrome
but asm.js is definitely more of a long term thing, I agree
PerlJam hoelzro: I thought it was some Pod::Whatever thingy. Pod::Document maybe?
Ven hoelzro: "if you"
hoelzro PerlJam: it's an Array of Pod::Blocks 13:50
Ven: ?
Ven hoelzro: asm.js is not targeted.
hoelzro Ven: right
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 colomon left
timotimo can't you also access $=pod<typeofblock>? 13:51
hoelzro oh, ok
hoelzro hushes
timotimo: hmm...I don't know
ChoHag I wish this code would either work or not. 13:52
timotimo ChoHag: i understand your frustration :( 13:53
can you golf it down perhaps? it sounds like you really hit a nasty bug we definitely should look at more closely
ChoHag With some difficulty. 13:54
timotimo your description, "stringifies and returns some attributes+methods", doesn't tell me much, unfortunately 13:55
can you get at the explody line number with say statements perhaps?
ChoHag Apparently I have done before.
13:56 rurban joined
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.
hoelzro oh, that's a good analogy
13:56 kaare_ joined
ChoHag method id { $.noun ~ (self.^attributes.grep({$_.name ~~ "\$!name"}) ?? "[$.name]" !! "" ) } 13:56
$.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?
code cleanup, document internals... 13:58
moritz pmurias: rakudo-js
timotimo ChoHag: do you know of the "can" method on the metaobject?
ChoHag No.
timotimo it might be more elegant than self.^attributes.grep
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
I'm not expecting much by way of sanity.
timotimo also, have a look at this:
m: say ("foobar".?undefinedmethod).perl
camelia rakudo-moar ae2ffe: OUTPUT«Nil␤»
timotimo so if you self.?name // "", you'll get either the result of name or ""
ChoHag But I want the result of "[" ~ name ~ "]", or "" 14:00
timotimo oh
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'
dalek ast/S26-WHY: ae257cb | (Rob Hoelz)++ | S26-documentation/why-leading.t:
Check $=pod throughly in why-leading
14:01
ast/S26-WHY: d93eeb3 | (Rob Hoelz)++ | S26-TODO:
Mention more things todo for S26
ast/S26-WHY: 1f5510d | (Rob Hoelz)++ | S26-TODO:
Elaborate on S26-TODO
moritz self.^can($name) ?? "[$name]" !! '';
timotimo m: for Nil, "hello" { say ($_ // "" andthen "[$_]") }
camelia rakudo-moar ae2ffe: OUTPUT«[hello]␤»
timotimo m: $_ = Nil; say ($_ // "" andthen "[$_]")
camelia rakudo-moar ae2ffe: OUTPUT«[]␤»
dalek ast/S26-WHY: 3b47fd0 | (Rob Hoelz)++ | S26-TODO (2 files):
Make my TODO a markdown file
timotimo d'oh
m: $_ = Nil; say ($_ andthen "[$_]") // ""
camelia rakudo-moar ae2ffe: OUTPUT«␤»
ChoHag Learning a language while it keeps breaking underneath you is a lot of fun.
timotimo m: $_ = "hello"; say ($_ andthen "[$_]") // "" 14:02
camelia rakudo-moar ae2ffe: OUTPUT«[hello]␤»
PerlJam the "can"ned solution will work for things that are not attributes though. (I dunno if that's desired or not)
hoelzro if anyone's curious about my ideas for S26 (including PerlJam), I've elaborated on them here: github.com/perl6/roast/blob/S26-WHY/S26-TODO.md
ChoHag PerlJam: There's that to consider.
PerlJam: Also, badum tish.
PerlJam :-) 14:03
ChoHag God damn it it keeps working fine.
Why won't software break when you want it to?
PerlJam ChoHag: are you *complaining* that P6 Just Works?!?
timotimo PerlJam: ChoHag is calling $.name anyway, so might as well rely on the public accessor at that point, too.
PerlJam Someone should quote *That* and post to reddit ;) 14:04
timotimo PerlJam: i'd consider that borderline feeding the trolls
ChoHag Just Works with threads, no less.
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
PerlJam timotimo++ good idea! 14:05
ChoHag It's somewhat frustrating, in a pervertedly wrong way.
Now I need to go and pretend to do some paid work though.
timotimo that's fine :)
14:05 thou joined
ChoHag And then get the train, and then deal with a daughter, so that's about it for programming today. 14:05
carlin there is a lot of broken links on doc.perl6.org/language/operators 14:15
such as infix % and prefix ?
because the URLs aren't encoded 14:16
eg. doc.perl6.org/routine/% needs to be doc.perl6.org/routine/%25
moritz .tell Mouq about broken links on doc.perl6.org, see irclog.perlgeek.de/perl6/2014-07-31#i_9113080 14:17
yoleaux moritz: I'll pass your message to Mouq.
14:28 iarna left 14:29 iarna joined 14:31 virtualsue left 14:37 kaare__ joined 14:38 kaare_ left, virtualsue joined
timotimo gtodd1: would you be interested to first make a interface-compatible json thingie as a drop-in replacement for JSON::Tiny? 14:39
even if only the parsing part; i'd like that :)
14:40 molaf joined
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
14:40 gtodd1 is now known as gtodd
gtodd timotimo: would take weeks ... :-D 14:40
timotimo docs is certainly something we're lacking a lot of ;(
OK, maybe i can make it work
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?
jnthn: nope; i'll do one today :)
jnthn timotimo: parse-json may be faster
Also the sink context improvements may show up
timotimo rakudo only, or nqp as well?
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)?
jnthn Well, if there's NQP version of the arsping benchmark...
uh, parsing.
timotimo yes
14:41 virtualsue left
jnthn ...how on earth did the p move so far... 14:41
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 ...
gtodd: aye, if a perl6-pro looks at the docs, it's very hard for them to see what's missing where :(
afk for a bit
14:43 iarna left
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:44
14:44 kaleem left 14:45 treehug88 joined, virtualsue joined, kaare__ left, kaare__ joined 14:46 iarna joined
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 ....
Ven is building pugs for some reason 14:48
gtodd so I started documenting them as notes to to $self :-)
14:49 kaleem joined
moritz gtodd: add them to perl6/doc 14:49
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
moritz: ok
when I get back from vacation this will be a way I contribute to the perl6 project ! 14:51
moritz \o/
++gtodd
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
s/use/us/
btyler if anyone has some nativecall chops: gist.github.com/kanatohodets/494fb...ts-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
the code is p6 bindings for libjansson, a JSON library
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: doc.perl6.org/routine/subst#class_Str ...
pmurias are there any nqp benchmarks? 14:54
gtodd moritz: doc.perl6.org/routine/subst#class_Str is excellent and clear and at least partly autogenerated from the source, correct?
14:58 [particle] left, rurban left
dalek kudo/nom: ccda7d9 | duff++ | tools/build/ (4 files):
convert gen-cat.pl to nqp and use it
14:59
moritz gtodd: it's generated from types/Str.pod in the perl6/doc repo 15:01
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 iarna left
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:03
15:05 cognome left, cognominal__ left, cognome joined 15:08 denis_boyun left
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:09
15:09 cognome left
moritz gtodd: I don't think it can meaningfullly be autogenerated 15:11
15:11 chenryn joined
moritz gtodd: but yes, I expect there to be language/syntax document into which one can reference 15:11
timotimo PerlJam++ # dogfooding 15:12
gtodd ok good .... for now 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)
timotimo gtodd: you may have to give JSON::Array and JSON::Object "is repr('CPointer') as well? 15:13
though i'd almost suggest you make those regular classes that have "has JSON $!jansson_obj" or something
btyler timotimo: gtodd might be confused :P but yes, I tried making them repr cpointer, same deal 15:14
delegating might work, yeah
timotimo er ...
damnit, did i confuse you two?
btyler both working on JSON-ish things
timotimo indeed >_> 15:15
15:15 dayangkun left
timotimo so what is gtodd working on? :S 15:15
.o( but then who was phone ?!?! )
15:15 [particle] joined
carlin and they have nicks of single initial + name :p 15:15
FROGGS PerlJam: s:g/// is broken I think 15:18
15:18 zakharyas left
FROGGS the method form works though 15:18
m: say "abc" ~~ m:g/\w/
camelia rakudo-moar ae2ffe: OUTPUT«False␤»
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
timotimo: not much ... you would not want to confuse me further :-)
timotimo d'aaw :)
gtodd heh
timotimo you're still contributing valuable insights
btyler anyways, I'll take a crack at restructuring things to delegate to a jansson pointer
moritz gtodd: I'm having trouble with your notion of "autogenerated"
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
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
gtodd moritz: ok
moritz: "autogenerated" is the wrong usage ... :-) 15:21
15:22 Ven left
PerlJam gtodd: auto-assembled :) 15:23
PerlJam wants composable docs.
gtodd :-)
15:24 fhelmberger left
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
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
moritz: I'm just venting in general, not specifically about docs.perl6.org :)
moritz oh :-)
gtodd heh
moritz doc.perl6.org/type/Str has "Methods supplied by class Any" and "Methods supplied by class Mu"
PerlJam moritz++ docs.perl6.org++ :-) 15:27
gtodd humans can haz witerly qualities
++ docs.perl6.org++
moritz Mouq++ # for making it pretty
gtodd true
huf "witerly"?
i like this word, what does it mean?
dalek c: 9cb4baa | moritz++ | lib/Type/Str.pod:
fix small formatting inconsistency
15:28
gtodd and google very often points to docs.perl6.org now .... this must mean something
moritz it's SEO-optimized :-)
gtodd huf: I guess it is a sort of general quality of being an expressive writer 15:29
moritz (SE-optimized, akshually)
huf gtodd: quite the upperclass word :)
gtodd PerlJam: glad I notice that you noticed that s/// thing : 15:31
m: my $str="string of foo"; $str ~~ s:g/foo/baz/.say
camelia rakudo-moar ccda7d: OUTPUT«string of baz␤»
gtodd m: "string of foo" ~~ s:g/foo/baz/.say
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␤␤»
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␤␤»
gtodd are those last two supposed to work?
FROGGS don't think so
jnthn No
FROGGS you need to put it in a variable
jnthn Use .subst on immutable values
gtodd ok good
phew ... I had figured it out and was afraid it was broken or unimplemented :-) 15:33
after what PerlJam said 15:34
15:37 Alula_ left
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
gtodd is ss/foo/baz/ a sugary form of s:s ? 15:41
dalek kudo-star-daily: ed2e474 | coke++ | log/ (14 files):
today (automated commit)
15:43
rl6-roast-data: 70cd1e6 | coke++ | / (5 files):
today (automated commit)
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:46
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 rindolf left
carlin and in Java you get a SugarFactoryFactory 15:47
gtodd heh 15:48
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:49
15:52 anaeem1 joined
timotimo jnthn: i'll commute now; in about an hour i'll probably be ready to run the benchmarks 15:53
well, actually ... why not let my computer work while i'm gone 15:54
is anybody else getting test failures in nativecall? 15:55
planned n tests, but ran m (with m < n)
15:56 anaeem1 left, Alula_ joined
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
06-struct.t .......... 1/30 # Looks like you planned 30 tests, but ran 19
yeah, something definitely wrong
jnthn hm, how does it cope with the fact that C code emits some of the oks, iirc? 15:58
16:00 Rotwang joined
jnthn If the behavior has just changed, though, then soemthing is wrong... 16:01
16:04 autark joined 16:07 virtualsue left 16:10 denis_boyun joined 16:11 chenryn left 16:13 kaleem left
[Coke] spectest failures: n: 1385; j: 21; m: 3; p: 1798 16:15
16:19 takesako left 16:21 kivutar left
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
that pointers warning is new though
nope, they weren't always there. Doing the tests with rakudo 32e8b4ae92372d8c7 (June 2) gives no warnings 16:30
16:30 gfldex joined
carlin (that's with zavolaj 265e5046408e795acb) 16:33
16:34 takesako joined 16:37 ventica joined
dalek ast/S26-WHY: 2dc957c | duff++ | S26-TODO.md:
Update S26-TODO.md
16:41
timotimo the benchmarks are already running, but i'm apparently stuck on the very first rakudo-moar at the moment 16:45
but it is not stuck 16:46
i think i want to put timestamps in front of the outputs of perl6-bench
16:47 [Sno] left
carlin what changed that broke the JSON::Tiny test? 16:48
# got: [1.3, 2.8, 32323423.4, 4]
# expected: [1.3, 2.8, 32323423.4, 4.0]
FROGGS carlin: do you see offhand why the nativecall tests abort?
timotimo that's expected
it should be marked todo
FROGGS timotimo: but what changed it?
timotimo it changed? 16:49
FROGGS yes
carlin it wasn't happening with older rakudo
FROGGS I did not update that module but when I rebootstrap my old panda checkout that test fails
though it says that all were successful and it continues
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 16:54
16:56 dakkar left
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:03
it looks like it is so I guess I mean does one *use* ".hash" like that or ... 17:04
17:07 Alula_ left, Alula_ joined
FROGGS gtodd: no, it there is a difference 17:10
.hash flattens an itemized hash ("hashref") to a hash, and then you can assign it to a var with a % sigil 17:11
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
because you assign then a single item to a hash that expects key/value pairs
gtodd ah ok I think I recall that ... so far I just use it for inspecting a %hash data-structure ... 17:13
17:14 Ven joined
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
FROGGS thanks
17:29 denis_boyun left
ChoHag Eugh. Travel. 17:30
17:31 denis_boyun joined
ChoHag What would be the most appropriate answer to the vague question 'how complete is threading in moar'? 17:31
Ven "nested signatures / object unpacking in signatures" <- what's the diff between those ? 17:32
oh, :() for a sub signature ?
17:33 treehug88 left
FROGGS ChoHag: jnthn and lizmat can probably answer best 17:42
lizmat I would say: pretty complete feature wise, not battletested under stress yet
some features may still change
e.g. I'm still not happy about winner { } 17:43
ChoHag Well good I don't use that one.
lizmat all things related to Supplies will probably remain unchanged 17:44
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 ?
carlin rakudo 1b25025ccd4110cda t/04-roundtrip.t .. ok
Ven graphs, even.
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]
lizmat Ven: it's open source, afaik
Ven gonna use it then, they're cool :).
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.
FROGGS carlin++
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.
FROGGS carlin: but how can that patch mess it up? 17:47
carlin FROGGS: exactly :/
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?
I know that I ran the zavolaj tests verbose a month ago, and all single tests passed
Ven erm, are regexy-stuff operators ? like [] and () 17:49
FROGGS Ven: err what? 17:50
Ven FROGGS: what do I call [] and () in regexps ?
FROGGS [] is a non-capturing group
and () is a capturing group
carlin ugh, gist.github.com/carbin/7f2b0ab6c3c317e0c803 17:52
FROGGS ahh, that explains it 17:53
carlin: that is a never (bad) version?
carlin that's rakudo 1b25025ccd4110cda25a
gtodd are %hash{'$0'}{'$1'} and %hash<$0><$1> intended to be equivalent?
FROGGS gtodd: yes
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
gtodd FROGGS oh
FROGGS strip the quotes
carlin running panda-test that version just gives
t/04-roundtrip.t .. ok
FROGGS carlin: it should be okay when it is a TODO test... 17:55
carlin but the next rakudo version up shows the error
FROGGS I guess we have to look closer at how prove wants to have its TAP
17:56 denis_boyun left
eiro ls 17:57
17:57 rindolf joined
eiro oops sorry 17:57
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
nwc10 blog.circleci.com/critiquing-facebo...-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
Ven I must be explaining myself poorly
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
sorry thanks ... :)
FROGGS np :o)
gtodd m: my %hash<$0><$1>="34abcd42xxyyzz".comb(/(\d**2)(\D**2)+/) 18:01
camelia rakudo-moar ccda7d: OUTPUT«===SORRY!=== Error while compiling /tmp/kojn2tywCm␤Shaped variable declarations not yet implemented. Sorry. ␤at /tmp/kojn2tywCm:1␤------> my %hash<$0>⏏<$1>="34abcd42xxyyzz".comb(/(\d**2)(\D**␤»
TimToady you have to say (my %hash)<$0><$1> =
otherwise the my eats the <> or {} as part of the declaration 18:02
ChoHag I thought <> was a string a la ''?
TimToady and your expression makes no sense
it is, when it's a subscript
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
you can't distribute $0 and $1 like that
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
TimToady m: "34abcd42xxyyzz".comb(/(\d**2)(\D**2)+/); say "$0 $1" 18:05
camelia rakudo-moar ccda7d: OUTPUT« ␤»
gtodd TimToady: it's shiny :) ... try
TimToady or not
it only sets $0 and $1 down in the comb method
which ignores it
oh wait, that one matches twice 18:06
misread \D as \d
also $str ~~ s/foo/bar/.say will not work once s/// is fixed 18:07
and in some sense it's not working now, because ~~ is returning False
well, or maybe True in this case 18:08
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 Ven left
TimToady so it would say 「foo」 18:10
gtodd I'm just trying too hard to be tricky ... instead I should be patiently translating the little lines of perl5 that work 18:11
18:12 cognome joined, cognominal joined, [Sno] joined
gtodd into their perl6 equivalents ... even if I don't get to use .comb :) 18:14
18:19 FROGGS[mobile] left 18:22 treehug88 joined, pecastro left
TimToady m: "34abcd42xxyyzz".comb(/(\d**2)(\D**2)+/)[0].WHAT.say 18:23
camelia rakudo-moar ccda7d: OUTPUT«(Str)␤»
TimToady in any case, .comb just returns a list of strings
18:33 Alula_ left 18:34 Alula_ joined, pecastro joined 18:35 Ven joined 18:41 dwarring joined 18:48 akaseki left, aoseki joined
cxreg so after several years of some node.js development, I've been tinkering with the concurrency primitives in rakudo/moar 19:15
my god, it's made of actual unicorns
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:16
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:17
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 :)
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
jnthn Don't want to fall afoul of the International Society for the Protection of Unicorns :)
lue would prefer a multihorned animal...
cxreg it automatically makes as many horns as is necessary 19:19
TimToady how 'bout antennae?
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" ?
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.
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*.
cxreg jnthn++ thanks, I'll try to read up on how it works
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
Where (b) applies in around 90% of cases
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
19:22 integral_ joined, integral_ left, integral_ joined
jnthn The *really* scary one is the .Net scheduler. 19:22
19:23 integral_ is now known as integral
jnthn Which actually measures throughput and then smooths it using DSP techniques. 19:23
19:23 darutoko- left
jnthn And uses that to decide to add/remove threads. 19:23
Which sounds crazy but I'm so far failed to get it to do something insane.
Maybe I'm not creative enough :)
Ven Intelligent Thread Pool 19:31
:D
timotimo the benchmarks are still running ... 19:36
jnthn What did you benchmark? :)
timotimo all three backends ;)
jnthn ah
JVM :)
timotimo yes ;)
jnthn Must be taking its time, enjoying the summer pastures... :) 19:37
timotimo not only all three backends, but also all two frontends ;) 19:40
jnthn cool
bbiab
TimToady imagines a beast with three backends and two frontends... 19:41
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 :-)
FROGGS *g*
19:43 SevenWolf joined
geekosaur sounds more like everyone's favorite puppy, kerberos... 19:43
(or cerberus if you must) 19:44
TimToady not to be confused with aardvarks 19:45
19:45 cooper_ left
Ven clones nqp-js on windows 19:47
19:47 cooper_ joined 19:48 SevenWolf left, Ven left 19:49 akaseki joined, Ven joined
vendethiel pmurias: oh, you're using nmake ? 19:50
dalek ast: d2e7215 | (David Warring [email@hidden.address] | S03-operators/relational.t:
Added test cases for RT121987

Negated relational operators not chaining correctly.
19:51 aoseki left
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:04 treehug88 left 20:07 Ven left 20:22 gfldex left 20:26 anaeem1 joined
cxreg i think "extra virgin" is rather like "extra marital" 20:28
20:29 SevenWolf joined
pmurias vendethiel: I supposed nmake is used on windows 20:32
vendethiel erm, but I don't have nmake, I have make :( 20:33
20:36 Ven joined
FROGGS vendethiel: get nmake 20:38
really
vendethiel I probably do, I have VS for C# stuff 20:40
might not be in my path
20:57 araujo joined 21:00 cooper_ left, cooper_ joined
pmurias are vendethiel and Ven the same person? 21:05
Ven pmurias: not sure
vendethiel are they ?
Ven you actually managed to
vendethiel get both my pc ding'ing at the same time
21:07 molaf left
dalek kudo/nom: 89c8e4a | (Tobias Leich)++ | docs/ROADMAP:
fix roadmap entry about label handling
21:09
vendethiel "1 *** basic Perl 5 interop (use, eval, etc.) (diakopter)" <- diakopter ? 21:10
FROGGS: can't tr/// be removed from that list :-) ? 21:11
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
FROGGS I dunno about the interop... others should judge
Ven 2014 really flew by ...
FROGGS true
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:17 kaare__ left
dalek ast: 1e3997c | (David Warring [email@hidden.address] | S03-operators/relational.t:
typo
21:20
21:29 Ven left
masak 'night, #perl6 21:31
hoelzro night masak
PerlJam gutennacht masak
pmurias what's the state of the rakudo-perl5 interop? 21:38
psch m: $_ = "foO"; tr:i/o/u/ # re: "can tr/// be taken off the ROADMAP" 21:42
camelia rakudo-moar ccda7d: OUTPUT«===SORRY!=== Error while compiling /tmp/f7qapJ9flD␤tr/// adverbs not yet implemented. Sorry. ␤at /tmp/f7qapJ9flD:1␤------> $_ = "foO"; tr:i/o/u/⏏ # re: "can tr/// be taken off the ROADM␤»
psch afaiu, :i and maybe :ii might be the only adverbs that even make sense for tr/// 21:43
(i also recently realized that my PR for "s/// to spec" relies on .match creating a "multi-match", which it doesn't) 21:45
(for :g, that is)
lue don't forget :m and :mm :) 21:51
psch oh, obviously i did. those probably should go in there as well, yes. 21:53
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:55
21:56 rurban joined
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: perlcabal.org/syn/S05.html#line_4646
psch lue: afaiu, all of the matches from :g are actual matches, and they get replaced 22:00
m: $_ = "abc"; s:g/./z/; .say
camelia rakudo-moar ccda7d: OUTPUT«zzz␤»
psch m: $_ = "abc"; s:g/./z/; #`[[ but!: ]] say $/
camelia rakudo-moar ccda7d: OUTPUT«「c」␤␤»
psch m: $_ = "abc"; s:g/.{ say $/ }/z/; 22:01
camelia rakudo-moar ccda7d: OUTPUT«「a」␤␤「b」␤␤「c」␤␤»
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:02
22:04 spider-mario left
psch my understanding is that :g is :ex without :ov 22:07
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)
TimToady but "exhaustive" does not simply mean "keep trying"; all three of these mean that 22:10
it's more of a singular/plural distinction; with three different sorts of plural semantics 22:12
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:16
22:20 SevenWolf left
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:26
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
TimToady that's what I just said 22:29
lue oh, I misread what you said there.
22:31 Psyche^_ joined
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:32
22:34 raiph left
TimToady m: s:ov/foo/bar/ 22:34
camelia rakudo-moar 89c8e4: OUTPUT«===SORRY!=== Error while compiling /tmp/JkXwm6EJkx␤Adverb ov not allowed on substitution␤at /tmp/JkXwm6EJkx:1␤------> s:ov/foo/bar/⏏<EOL>␤»
22:35 Psyche^ left 22:37 virtualsue joined
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…»
TimToady oh, right s/// doesn't return the right thing yet
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␤»
TimToady m: $_ = 'fooooooooooooood'; my $pos = 0; $pos = $/.from + 5 * rand while s:c($pos)/ooo/foo/ and $/; .say
camelia rakudo-moar 89c8e4: OUTPUT«ffoooffoofoooood␤»
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␤»
TimToady that really needs and exclamation mark
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!␤»
22:47 DarthGandalf left 23:03 iarna left, fling joined 23:04 iarna joined
dalek p: 72e0753 | jnthn++ | src/ (2 files):
Optimize NQP code blocks inside regexes.

Before, we just did away with various kinds of optimization if we saw this. Now we can flatten various blocks away and apply other kinds of lowering optimizations.
23:08
23:09 DarthGandalf joined 23:16 bjz left 23:25 anaeem1 left 23:26 anaeem1 joined 23:30 anaeem1 left 23:31 ivanshmakov joined 23:33 iarna left 23:41 rurban left, rurban joined 23:42 rurban left 23:46 dmol left 23:49 thou left 23:54 chenryn joined
ventica are there any good docs on the AST that Rakudo produces? I want to look at the Rakudo:VM interface... 23:55
timotimo jnthn: here's the benchmarks - the parrot numbers surprised me a bit, though. t.h8.lv/p6bench/2014-08-01-three_backends.html 23:56
i'll make a moar-only comparison now, too 23:57
t.h8.lv/p6bench/2014-08-01-moar.html 23:59