Perl 6 - the future is here, just unevenly distributed

IRC log for #p6dev, 2016-04-21

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

All times shown according to UTC.

Time Nick Message
00:33 ugexe m: grammar Foo { token TOP { <return> }; token return { .+ }; }; Foo.parse(1); # bug? or dihwidt?
00:33 camelia rakudo-moar 6df7ff: OUTPUT«Attempt to return outside of any Routine␤  in any !cursor_pass at /home/camelia/rakudo-m-inst-1/share/nqp/lib/QRegex.moarvm line 1␤  in regex return at /tmp/aWitnhteKS line 1␤  in regex TOP at /tmp/aWitnhteKS line 1␤  in block <unit> at /tmp/aWitnh…»
00:42 skids joined #p6dev
01:50 lizmat joined #p6dev
02:05 sortiz joined #p6dev
05:03 vendethiel joined #p6dev
06:53 RabidGravy joined #p6dev
07:36 [TuxCM] This is Rakudo version 2016.04-2-g6df7ff8 built on MoarVM version 2016.04
07:36 [TuxCM] test            22.332
07:36 [TuxCM] test-t          12.728
07:36 [TuxCM] csv-parser      25.649
07:59 masak ugexe: surprising, at least. a token is a kind of method, so why would that clash at all with `return` as a sub?
08:01 masak m: grammar Foo { token TOP { <return> } }; Foo.parse("1")
08:01 camelia rakudo-moar 6df7ff: OUTPUT«Attempt to return outside of any Routine␤  in regex TOP at /tmp/pIS3uINPSr line 1␤  in block <unit> at /tmp/pIS3uINPSr line 1␤␤»
08:01 masak ugexe: I think the problem isn't the declaration of `token return`, but the call `<return>`, which looks both for subs and methods... perhaps?
08:01 masak and since there is a lexical sub &return, it finds it
08:19 jnthn m: grammar Foo { token TOP { <return> } }; Foo.parse("1", actions => class { method return($/) { } })
08:19 camelia rakudo-moar 6df7ff: OUTPUT«Attempt to return outside of any Routine␤  in regex TOP at /tmp/xVJZheFumA line 1␤  in block <unit> at /tmp/xVJZheFumA line 1␤␤»
08:19 jnthn masak: But it's only meant to find things of type Regex, I thought...
08:20 * jnthn had suspected it was calling .return
08:20 jnthn As an action method
08:20 jnthn But apparently not, O did the action method wrong
08:33 masak so... I submit a rakudobug?
08:53 lizmat joined #p6dev
08:55 * masak submits rakudobug
09:02 tadzik joined #p6dev
09:03 tadzik o/
09:19 lizmat tadzik o/
09:19 * lizmat waves from the QA Hackathon in Rugby
09:19 brrt joined #p6dev
09:23 bartolin o/ lizmat  (just remembered last years QAH -- fond memories :-)
09:24 lizmat bartolin o/
09:35 RabidGravy lizmat, be sure to check out the weird conical hills dotted around
09:35 * jnthn waves to folks at the QAH
09:36 lizmat .oO( those hills look fummy )
09:42 masak hi, QAH people
09:43 masak wish I could be there
09:43 dalek rakudo/nom: a0a1e95 | lizmat++ | src/core/Main.pm:
09:43 dalek rakudo/nom: my ($a,$b) is 10x slower than my $a; my $b
09:43 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/a0a1e9534e
09:44 jnthn lizmat: Even if you don't assign?
09:44 lizmat yes
09:44 jnthn Hm, that really wants fixing :)
09:44 lizmat m: for ^10000 { my ($a,$b) }; say now - INIT now
09:44 camelia rakudo-moar 6df7ff: OUTPUT«0.02808860␤»
09:45 lizmat m: for ^10000 { my $a; my $b }; say now - INIT now
09:45 camelia rakudo-moar 6df7ff: OUTPUT«0.0051890␤»
09:46 tadzik so, there's this idea to make it easier for users to have the MAIN they expect to have, that actually allows named after positional arguments
09:47 tadzik so lizmat++ is now moving stuff from MAIN_HELPER to Rakudo::Internals so it's easier for people to write their own MAIN_HELPER without copypasting the entire thing from the setting
10:02 perlpilot_ joined #p6dev
10:14 dalek joined #p6dev
10:18 masak yay
10:19 masak named arguments after positional arguments would be verra nice
10:23 timotimo agreed
10:23 timotimo i remember the thing in some software that grepped everything that starts in two dashes and puts it in front
10:24 tadzik I'd also happily poke someone's brane about grammars and parsing :)
10:24 tadzik panda used to do that
10:24 timotimo and the obvious problem with that was named parameters with vs without parameters
10:24 tadzik right
10:26 tadzik question is, does the regular main even do that?
10:27 tadzik it seems to only notice when you do --foo=bar
10:28 sno joined #p6dev
10:29 tadzik so the reordering trick is actually quite foulproof in that regard after all
10:36 brrt joined #p6dev
10:37 tadzik oh, fun fact: spectests talk about the irc conversation to remove this, since it's a fossil
10:37 tadzik the conversation is from 2011 :) http://irclog.perlgeek.de/perl6/2011-10-17#i_4578353
10:37 tadzik seems to be gone since nom is a thing
10:37 tadzik RT #124664
10:37 synopsebot6 Link:  https://rt.perl.org/rt3//Public/Bug/Display.html?id=124664
10:37 * tadzik hugs synopsebot6 (IRC)
10:51 tadzik so, I have this: https://gist.github.com/tadzik/876ad5e3e01819f08e1cb724b7de3d8a
10:51 tadzik and it doesn't seem to break spectests
11:00 dalek roast: 222aa2d | usev6++ | S32-io/IO-Socket-Async.t:
11:00 dalek roast: Skip test for 'bytes-supply' on JVM
11:00 dalek roast:
11:00 dalek roast: ... because it often hangs in spectests
11:00 dalek roast: review: https://github.com/perl6/roast/commit/222aa2d0e1
11:09 jnthn Those of you with a good memory: did we at some point have / are we still having some unreliability in nativecall union related tests?
11:12 tadzik RT #71366
11:12 synopsebot6 Link:  https://rt.perl.org/rt3//Public/Bug/Display.html?id=71366
11:19 lizmat m: role A { method a { ::?ROLE } }; dd A.a =:= A   # shouldn't this be True ?
11:19 camelia rakudo-moar a0a1e9: OUTPUT«Bool::False␤»
11:20 lizmat jnthn: ^^^
11:20 moritz lizmat: no
11:20 moritz erm, not sure
11:21 lizmat :-)
11:21 moritz one of them might refer to the punned class, not to the role
11:21 jnthn No
11:21 jnthn What moritz said
11:21 jnthn Oh, actually
11:21 moritz though I don't know how to reason about what A refers to
11:21 jnthn It's a tad more involved than that
11:21 moritz role A { method a { ::?ROLE } }; dd A.a =:= A; say A.HOW.^name
11:21 moritz m: role A { method a { ::?ROLE } }; dd A.a =:= A; say A.HOW.^name
11:21 camelia rakudo-moar a0a1e9: OUTPUT«Bool::False␤Perl6::Metamodel::ParametricRoleGroupHOW␤»
11:22 jnthn m: role A { method a { say ::?ROLE.HOW.^name } }; A.a
11:22 camelia rakudo-moar a0a1e9: OUTPUT«Perl6::Metamodel::ParametricRoleHOW␤»
11:22 jnthn Right, it's the group/candidate distinction
11:22 moritz m: role A { method a { say ::?ROLE.HOW.^name } }; A.a; say A.HOW.^name
11:22 camelia rakudo-moar a0a1e9: OUTPUT«Perl6::Metamodel::ParametricRoleHOW␤Perl6::Metamodel::ParametricRoleGroupHOW␤»
11:22 moritz RoleHOW vs. RoleGroupHOW
11:22 moritz it seems that ::?ROLE refers to the candidate, and the name to the "proto"
11:22 lizmat then we have a faulty spectest..  :-)
11:23 lizmat in t/spec/S12-class/magical-vars.t
11:24 lizmat and possibly more of that type
11:27 dalek rakudo/nom: fe2be65 | lizmat++ | src/core/ (4 files):
11:27 dalek rakudo/nom: === should fail if not identical types
11:27 dalek rakudo/nom:
11:27 dalek rakudo/nom: http://irclog.perlgeek.de/perl6/2016-04-19#i_12363756
11:27 dalek rakudo/nom:
11:27 dalek rakudo/nom: This breaks some spectests.  Since we're just after the release, I'm
11:27 dalek rakudo/nom: going to leave them for now, hoping someone else will look at the
11:27 dalek rakudo/nom: failures.
11:27 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/fe2be65806
11:29 dalek roast: d4dd5a5 | lizmat++ | S03-operators/value_equivalence.t:
11:29 dalek roast: Unfudge now passing test
11:29 dalek roast: review: https://github.com/perl6/roast/commit/d4dd5a5a62
11:37 geekosaur joined #p6dev
11:54 astj joined #p6dev
11:55 dalek roast: e5b428d | lizmat++ | S (6 files):
11:55 dalek roast: Adjust tests because of fe2be65806d907efbbaa
11:55 dalek roast: review: https://github.com/perl6/roast/commit/e5b428d956
11:58 dalek roast/6.c-errata: 2199588 | lizmat++ | S (6 files):
11:58 dalek roast/6.c-errata: Adapt tests because of fe2be65806d907efbbaa
11:58 dalek roast/6.c-errata: review: https://github.com/perl6/roast/commit/2199588469
12:21 dalek roast: c816aad | usev6++ | S (2 files):
12:21 dalek roast: Add ticket numbers for skipped tests (JVM)
12:21 dalek roast: review: https://github.com/perl6/roast/commit/c816aad0be
12:36 nine_ IIRC it's quite easy to change MAIN to accept optionals both before and after positionals
12:49 brrt joined #p6dev
12:53 [TuxCM] joined #p6dev
12:56 dalek roast: 1da9613 | usev6++ | S02-literals/allomorphic.t:
12:56 dalek roast: Add ticket number for skipped test (JVM)
12:56 dalek roast: review: https://github.com/perl6/roast/commit/1da96138d1
13:33 tadzik nine_: from the user side?
13:38 nine_ tadzik: unfortunately not :/ AT least not without copying the code.
13:39 tadzik nine_: yeah, from within rakudo it was a 3 line patch
13:39 tadzik but since we don't accept "--argument value" now, only "--argument=value", the hack for reordering @*ARGS that panda did is actually still valid it seems
13:40 tadzik btw, I heard rumours of a document that talks in detail about CUR and Distribution and stuff: does anyone have a link to it?
13:41 skids joined #p6dev
13:45 nine_ doc/module_management.md?
13:47 tadzik (´ー` )
13:47 tadzik thanks
13:48 stmuk is someone able to progress the R* release based on http://pl6anet.org/drop/rakudo-star-2016.04-RC1.tar.gz please
13:48 stmuk its been out a day and I suspect anyone who has dl'd is likely to have done so
14:01 geekosaur joined #p6dev
14:06 tadzik nine_: was the conclusion re Distribution that each module installer is supposed to implement it itself, perhaps consuming a role that's core?
14:08 nine_ tadzik: there's an open pull request moving us in that direction, yes
14:10 tadzik I see, neat
14:33 geekosaur joined #p6dev
14:40 lizmat m: class A { method a { $!a }; has $!a }   # why does this even compile ?
14:40 camelia rakudo-moar fe2be6: ( no output )
14:40 lizmat m: class A { method a { $a }; my $a }   # this doesn't
14:40 camelia rakudo-moar fe2be6: OUTPUT«===SORRY!=== Error while compiling /tmp/JdjwqsJRd6␤Variable '$a' is not declared␤at /tmp/JdjwqsJRd6:1␤------> class A { method a { ⏏$a }; my $a }   # this doesn't␤»
14:41 masak lizmat: I could rationalize why the first one works and the second one doesn't -- but I don't know if doing so is better than conservatively saying that the first one is wrong.
14:42 jnthn It works because we check the set of attributes at class compositon time
14:42 jnthn And we check them at class composition time because that's when role composition happens
14:42 jnthn Back when you could not refer to attributes from roles inside of classes, they behaved like `my`
14:43 jnthn Anyway, "because attributes come from roles, their symbol availability is not lexical" is a decent summary
14:43 lizmat but if you would set up a class with the roles specified at class start, you would be able to tell whether an attribute existed or not?
14:44 lizmat ok, this was in relation to https://rt.perl.org/Ticket/Display.html?id=127950
14:44 jnthn No, because genericity
14:45 lizmat ok
14:46 jnthn We don't actually know precisely which role we'll be doing until we do the multi-dispatch on the role group
14:46 lizmat so we basically need to annotate attributes lines/columns whenever we encounter them to be able to create an error with a line number ?
14:47 jnthn Yeah...we already have a data structure where we track unresolved attributes
14:47 jnthn iirc :)
14:53 brrt joined #p6dev
16:01 lizmat m: my $a = 42; say $a =:= $a; say $a.WHAT =:= $a.WHAT; say $a == $a; say $a =:= $a || $a.WHAT =:= $a.WHAT   # where does the 1 come from ???
16:01 camelia rakudo-moar fe2be6: OUTPUT«True␤True␤True␤1␤»
16:03 jnthn m: my $a = 42; say $a =:= $a || $a.WHAT =:= $a.WHAT
16:03 camelia rakudo-moar fe2be6: OUTPUT«1␤»
16:03 jnthn m: my $a = 42; say ($a =:= $a) || ($a.WHAT =:= $a.WHAT)
16:03 camelia rakudo-moar fe2be6: OUTPUT«1␤»
16:03 jnthn m: my $a = 42; say 0 || ($a.WHAT =:= $a.WHAT)
16:03 camelia rakudo-moar fe2be6: OUTPUT«True␤»
16:03 jnthn m: my $a = 42; say ($a =:= $a) || (say 'huh')
16:03 camelia rakudo-moar fe2be6: OUTPUT«1␤»
16:03 jnthn m: my $a = 42; say $a =:= $a
16:03 camelia rakudo-moar fe2be6: OUTPUT«True␤»
16:04 jnthn m: my $a = 42; say ?($a =:= $a)
16:04 camelia rakudo-moar fe2be6: OUTPUT«True␤»
16:04 jnthn m: my $a = 42; say do unless $a =:= $a { 'x' }
16:04 camelia rakudo-moar fe2be6: OUTPUT«()␤»
16:04 jnthn lizmat: I...have no idea!
16:04 jnthn Does it show up with --optimize=off?
16:04 lizmat do you agree this is spooky?
16:04 jnthn Yes :)
16:05 jnthn m: my $a = 42; say (($a =:= $a) or ($a.WHAT =:= $a.WHAT))
16:05 camelia rakudo-moar fe2be6: OUTPUT«1␤»
16:05 jnthn m: my $a = 42; say (($a =:= $a) // ($a.WHAT =:= $a.WHAT))
16:05 camelia rakudo-moar fe2be6: OUTPUT«True␤»
16:05 lizmat indeed, this shows up from optimize=2
16:06 jnthn m: my $a = 42; say nqp::unless($a =:= $a, $a.WHAT =:= $a.WHAT)
16:06 camelia rakudo-moar fe2be6: OUTPUT«===SORRY!=== Error while compiling /tmp/Nz3XOBwIVX␤Could not find nqp::unless, did you forget 'use nqp;' ?␤at /tmp/Nz3XOBwIVX:1␤------> ::unless($a =:= $a, $a.WHAT =:= $a.WHAT)⏏<EOL>␤»
16:06 jnthn m: use nqp; my $a = 42; say nqp::unless($a =:= $a, $a.WHAT =:= $a.WHAT)
16:06 camelia rakudo-moar fe2be6: OUTPUT«1␤»
16:06 lizmat $ perl6 --optimize=1 -e 'my $a = 42; say $a =:= $a || $a.WHAT =:= $a.WHAT'
16:06 lizmat True
16:06 lizmat $ perl6 --optimize=2 -e 'my $a = 42; say $a =:= $a || $a.WHAT =:= $a.WHAT'
16:06 lizmat 1
16:06 jnthn Well, that isolates it a good bit, then :)
16:06 lizmat rakudobug it ?
16:06 jnthn yeah
16:06 lizmat ok, will do
16:06 jnthn I wonder if it's elimiating a nqp::p6bool thinking it's not needed
16:08 lizmat around line 1250 in Optimizer seems to be applicable
16:08 lizmat way over my head, though...
16:11 jnthn Wonder if it'll need mine :)
16:11 mops joined #p6dev
16:13 lizmat https://rt.perl.org/Ticket/Display.html?id=127951
16:21 nine_ a bit shorter: perl6 --optimize=2 -e 'my $a = 42; say $a =:= $a || True'
16:28 dalek rakudo/nom: 463e758 | lizmat++ | src/core/ (13 files):
16:28 dalek rakudo/nom: Streamline infix:<eqv>
16:28 dalek rakudo/nom:
16:28 dalek rakudo/nom: See also http://irclog.perlgeek.de/perl6/2016-04-19#i_12363756
16:28 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/463e7589a1
16:31 nine_ lizmat: why is this faster? https://github.com/rakudo/rakudo/commit/463e7589a1#diff-d39f195d1984a02f3b4566adbbb410dbR763
16:33 * lizmat admits to not closely benchmarking that one  :-)
16:39 nine_ The MAST suggests that we actually do call multi sub infix:<=:=>(Mu \a, Mu \b) for the =:=
16:39 nine_ jnthn: but I guess this ^^^ would be inlined if hit a couple of times?
16:43 jnthn nine_: Eventually
16:43 jnthn nine_: But not one time
16:43 jnthn I mean, the code that it's in lined into (so, calling it) would have to be run many times
16:43 jnthn It may be the "static" inlining
16:44 nine_ Makes me wonder if such optimizations are really worth making rakudo's code less approachable to ordinary Perl 6 users.
16:45 lizmat nine_: the new Bool:D eqv is about 10% faster
16:45 lizmat nine_: for the case where there's a difference in the last byte of two Blobs
16:47 nine_ lizmat: I guess what I mean is that I'd love our compile and runtime optimizers to be smart enough so that such manual optimizations are no longer needed and we can keep Perl 6 written mostly in Perl 6 :)
16:48 lizmat nine: in that particular case, the optimizer would have to have been pretty smart
16:49 lizmat nine_: as I just didn't think straight when writing the ternary version
16:49 lizmat as soon as you see True or False in a ternary, there's something wrong (usually)
16:50 nine_ That's....True ;)
16:50 nine_ In this particular case, I'd actually say that the new version is more readable :)
16:50 lizmat brb
17:04 awwaiid joined #p6dev
17:05 [TuxCM] This is Rakudo version 2016.04-4-gfe2be65 built on MoarVM version 2016.04
17:05 [TuxCM] test            22.735
17:05 [TuxCM] test-t          12.632
17:05 [TuxCM] csv-parser      26.696
17:05 [TuxCM] rakudobrew build moar-blead
17:09 dalek joined #p6dev
17:14 geekosaur joined #p6dev
17:16 lizmat is there a reason we don't have an IO::Handle.printf ?
17:19 [TuxCM] joined #p6dev
17:28 dalek roast: 39e0550 | lizmat++ | S32-list/c (2 files):
17:28 dalek roast: Handle more paranoid infix:<eqv> of 463e7589a1c332
17:28 dalek roast: review: https://github.com/perl6/roast/commit/39e055034f
17:28 dalek roast/6.c-errata: ae3ad50 | lizmat++ | S32-list/c (2 files):
17:28 dalek roast/6.c-errata: Handle more paranoid infix:<eqv> of 463e7589a1c332
17:28 dalek roast/6.c-errata: review: https://github.com/perl6/roast/commit/ae3ad504c6
17:33 mops left #p6dev
17:43 lizmat food&
17:44 lizmat joined #p6dev
18:11 timotimo anyone got a clever idea how we could make our division routines aware of "i know the RHS isn't zero" so we can make the division simpler? currently it has the "fail" in it, and i expect it doesn't get inlined where it could be
18:46 sno joined #p6dev
19:46 sno joined #p6dev
20:00 brrt joined #p6dev
20:05 brrt .tell jnthn: I suggest disabling the JIT by default on the reframe branch
20:06 brrt that at least would make it mergeable until i've fixed the JIT
20:10 jnthn Heh, no tell bot here
20:11 jnthn brrt: If you're reading: it's no hurry, that branch is not for merge until after part 2 of the refactors I'm doing anyway. :)
20:55 * teatime will be back tomorrowish.
21:32 sno joined #p6dev
21:47 sortiz joined #p6dev
22:14 vendethiel joined #p6dev
22:59 vendethiel joined #p6dev

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