Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6-dev, 2016-08-13

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

All times shown according to UTC.

Time Nick Message
00:02 TimToady m: say WHAT (|42)
00:02 camelia rakudo-moar be7ce0: OUTPUT«(Slip)␤»
00:02 TimToady arguably, that could just return 42
00:03 TimToady I wonder how many single-element slips we generate on the average day...
00:59 dalek roast: bc8fa4f | TimToady++ | S04-statements/for.t:
00:59 dalek roast: test for RT #123072
00:59 dalek roast:
00:59 dalek roast: "for loop properly sinks final statement method call"
00:59 dalek roast: review: https://github.com/perl6/roast/commit/bc8fa4fd8d
00:59 synopsebot6 Link:  https://rt.perl.org/rt3//Public/Bug/Display.html?id=123072
01:14 gfldex m: my %multi-dim; %multi-dim{1;2;3} = 42; dd %multi-dim{1;2;3}
01:14 camelia rakudo-moar be7ce0: OUTPUT«(42,)␤»
01:15 gfldex m: my %multi-dim; %multi-dim{1;2;3} = 42; dd %multi-dim{1;2;3}.WHAT
01:15 camelia rakudo-moar be7ce0: OUTPUT«Cannot look up attributes in a type object␤  in block <unit> at <tmp> line 1␤␤»
01:15 gfldex m: my %multi-dim; %multi-dim{1;2;3} = 42; dd %multi-dim{1;2;3}.^nameT
01:15 camelia rakudo-moar be7ce0: OUTPUT«Method 'nameT' not found for invocant of class 'Perl6::Metamodel::ClassHOW'␤  in block <unit> at <tmp> line 1␤␤»
01:15 gfldex m: my %multi-dim; %multi-dim{1;2;3} = 42; dd %multi-dim{1;2;3}.^name
01:15 camelia rakudo-moar be7ce0: OUTPUT«"List"␤»
01:15 gfldex i don't think that should be a list
01:27 awwaiid lizmat: in your recent REPL.pm changes, I am surprised to see the threading bit -- is there a way to catch the SIGINT without that, or what does it add?
01:41 awwaiid lizmat: ok, now I've read the previous irc and your comments on 128900 and understand better. Still not quite all the way understand though
01:48 ilbot3 joined #perl6-dev
01:48 Topic for #perl6-dev is now Perl 6 language and compiler development 2.0 | Logs at http://irclog.perlgeek.de/perl6-dev/today
01:54 dalek roast: 63c1f00 | TimToady++ | S02-types/pair.t:
01:54 dalek roast: test for RT #128860
01:54 dalek roast:
01:54 dalek roast: "List.invert maps via a required Pair binding"
01:54 dalek roast: review: https://github.com/perl6/roast/commit/63c1f009b9
01:54 synopsebot6 Link:  https://rt.perl.org/rt3//Public/Bug/Display.html?id=128860
01:54 dalek rakudo/nom: baeabb4 | TimToady++ | src/core/List.pm:
01:54 dalek rakudo/nom: Improve message on (1,2,3).invert to mention Pair
01:54 dalek rakudo/nom:
01:54 dalek rakudo/nom: Binding of the map routine internally now requires list elements to bind
01:54 dalek rakudo/nom: as Pair.  Fixes RT #128860, insofar as it improves the error message.
01:54 synopsebot6 Link:  https://rt.perl.org/rt3//Public/Bug/Display.html?id=128860
01:54 dalek rakudo/nom:
01:54 dalek rakudo/nom: (The alternate approach of inserting a CATCH into the map closure could in
01:54 dalek rakudo/nom: theory produce an even better message, but it appeared to slow things down
01:54 dalek rakudo/nom: more than the Pair binding approach.)
01:54 dalek rakudo/nom:
01:54 dalek rakudo/nom: Also, we now propagate is-lazy correctly through .invert and .antipairs.
01:54 dalek rakudo/nom: Note that we cannot make the degenerate case of .invert the same as .antipairs,
01:54 dalek rakudo/nom: because .invert must expand list values into multiple antipairs.  In any
02:59 ShimmerFairy ooc, is there an easy way to ask for a particular Method object from a class, without resorting to the MOP? That is, I know I can do  Foo.^methods.grep(*.name eq 'bar')  or whatnot, but it'd be nice if it were easier to do, e.g.  &Foo::bar  for example.
03:03 ShimmerFairy I know Foo::bar won't work because you can put a 'sub bar' in a class, but something like that would be nice :)
03:05 TimToady if only we had mechanisms for adding syntactic sugar to the language... ;)
03:13 ShimmerFairy And I also just remembered that Foo."bar"() is a thing too, and keeping a list of strings would be easier :P
03:14 gfldex m: class C { multi method m1 {}; multi method m2 {} }; dd C::.keys
03:14 camelia rakudo-moar baeabb: OUTPUT«().Seq␤»
03:14 ShimmerFairy TimToady: but yeah, I can't wait for slangs and especially macros to get more fleshed out and fully-featured :)
03:15 * ShimmerFairy still thinks slangs and macros should be intertwined like grammars+actions in most other cases, fwiw
03:15 gfldex i did expect .keys to return a list of stuff or Any
03:17 ShimmerFairy m: class C { method m1 {}; method m2 {} }; dd C::.keys # just checking if it's the multis by chance
03:17 camelia rakudo-moar baeabb: OUTPUT«().Seq␤»
03:19 TimToady methods never go into the package namespace unless declared our
03:20 TimToady and if you don that, they aren't installed in the metaclass
03:20 TimToady *do
03:20 gfldex so many things to doc, so little time…
03:21 ShimmerFairy Ah, interesting. I suppose the reason why .^methods() feels LTA is just because I don't think Method objects should need MOP fiddling, since you can access other kinds of Routines by just &foo. :P
03:27 TimToady that's the nice thing about lexicals, you can treat them as static due to early binding even when they're anonymous; methods are late binding, and classes can also be anonymous, so there's no consistent way to find a name other than through the metaclass
03:28 TimToady meaning the lexical scopes themselves are anonymous, unless you count OUTER::
03:29 TimToady but you don't need an object to know which outer lexical scopes to search
03:33 ShimmerFairy makes sense. And like you said, there's always the possibility of syntactic sugar you can add yourself :) .  .oO(Foo.^&bar ?)
06:42 AlexDaniel joined #perl6-dev
06:43 AlexDaniel joined #perl6-dev
08:15 hankache joined #perl6-dev
08:28 RabidGravy joined #perl6-dev
08:59 [Tux] This is Rakudo version 2016.07.1-174-gbaeabb4 built on MoarVM version 2016.07-18-g2f269d8
08:59 [Tux] csv-ip5xs       10.060
08:59 [Tux] test            15.262
08:59 [Tux] test-t           7.457
08:59 [Tux] csv-parser      16.341
09:07 gfldex @designers: FYI: https://github.com/perl6/doc/commit/0dc31dfd40
09:08 gfldex util/ignored-methods.txt may very well contain mistakes (or may get some in the future)
09:57 dalek rakudo/nom: c5eb876 | (Wenzel P. P. Peppmeyer)++ | src/core/hash_slice.pm:
09:57 dalek rakudo/nom: implement :exists on multi-dim assoc subscript literals
09:57 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/c5eb87695e
09:57 dalek rakudo/nom: b76ffbb | lizmat++ | src/core/hash_slice.pm:
09:57 dalek rakudo/nom: Merge pull request #835 from gfldex/multidim-assoc-exists
09:57 dalek rakudo/nom:
09:57 dalek rakudo/nom: implement :exists on multi-dim assoc subscript literals
09:57 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/b76ffbbb38
09:57 dalek roast: e0d318a | (Wenzel P. P. Peppmeyer)++ | S32-hash/exists-adverb.t:
09:57 dalek roast: add test for :exists on multi-dim assoc subscript literals
09:57 dalek roast: review: https://github.com/perl6/roast/commit/e0d318a7d4
09:57 dalek roast: 922ee0d | lizmat++ | S32-hash/exists-adverb.t:
09:57 dalek roast: Merge pull request #139 from gfldex/multidim-assoc-exists
09:57 dalek roast:
09:57 dalek roast: add test for :exists on multi-dim assoc subscript literals
09:57 dalek roast: review: https://github.com/perl6/roast/commit/922ee0da20
10:06 jnthn ShimmerFairy: Foo.^methods.grep(*.name eq 'bar') might, if you're just after the "closest" method, be replaced by Foo.^lookup('bar')
10:07 ShimmerFairy jnthn: ah, that seems shorter :) . And yes, I'd more-or-less prefer similar MRO to what occurs normally :)
10:08 jnthn That'll get you it
10:08 jnthn There's also Foo.^find_method('bar')
10:08 jnthn lookup = look this method up, giving me the declared Method object from the class
10:09 jnthn find_method = give me something that, if I inovke it, would do the same thing as calling the method"
10:10 jnthn In a boring class with a normal method they will give the same answer.
10:10 ShimmerFairy jnthn: I'm guessing the find_method version has the original object "attached" to it in some way, then? Or is that not it?
10:10 jnthn But if you do it with a role, lookup will give you back a Method object (good for introspection), while find_method will give you back something that, when invoked, puns the role and then invokes
10:11 ShimmerFairy ah
10:11 jnthn No, we don't do attachment of that find at the MOP level
10:11 jnthn *of that kind
10:11 jnthn Other MOP modules will leave lookup alone (unless they are especially antisocial :P) but overriding find_method is a common trick :)
10:13 ShimmerFairy So the difference comes in where the metaobject needs extra steps to give you an invokable thing (e.g. role punning)
10:14 lizmat m: class A { method a(\SELF:) { SELF = Mu } }; my $a = A.new; dd $a; $a.a; dd $a   # jnthn
10:14 camelia rakudo-moar b76ffb: OUTPUT«A $a = A.new␤Mu $a = Mu␤»
10:15 lizmat jnthn: is there a reason why the above doesn't work if the $a is a private attribute ?
10:16 lizmat reason I'm asking, is I'd like to be able to reset $!todo if e.g. reify-at-least finds out it has exhausted $!todo
10:16 lizmat now, the callers seem to be responsible for this, which I think is a bad design  :-)
10:27 jnthn ShimmerFairy: Yeah, pretty much
10:29 jnthn "the callers seem to be responsible" - where, ooc?
10:29 jnthn Note that if said private attribute was bound there'll be nothing to bind in to
10:30 jnthn I'm pretty sure assigning to the Scalar holding an object's invocant isn't good design either. :P
10:30 jnthn uh, *nothing to assign in to
10:38 lizmat jnthn: e.g. https://github.com/rakudo/rakudo/blob/nom/src/core/List.pm#L470
10:39 lizmat I think it would be simpler if "reify-until-lazy" would reset its object when it was fully reified
10:39 lizmat instead of the caller needing to do this (and in many cases not doing that, thus selecting the slower iterator when it isn't necessary)
10:44 jnthn Maybe, but I suspect we bind $!todo in so many places...
10:45 dalek rakudo/nom: e4d5384 | lizmat++ | CREDITS:
10:45 dalek rakudo/nom: Add gfldex++ to CREDITS
10:45 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/e4d538492a
11:34 nine jnthn: will find_method also return a FALLBACK?
11:48 dalek rakudo/nom: 6dcee99 | lizmat++ | src/core/ (9 files):
11:48 dalek rakudo/nom: .push-all *always* returns IterationEnd
11:48 dalek rakudo/nom:
11:48 dalek rakudo/nom: So mark as such in the Signature.  Currently, there seems to be no
11:48 dalek rakudo/nom: difference in JITting between this way and just returning IterationEnd.
11:48 dalek rakudo/nom: But this should hopefully change sometime in the future.  In any case,
11:48 dalek rakudo/nom: I think it improves readability.
11:48 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/6dcee99685
11:59 dalek rakudo/nom: 32902f2 | lizmat++ | src/core/ (4 files):
11:59 dalek rakudo/nom: .sink-all *always* returns IterationEnd
11:59 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/32902f25ca
12:03 gfldex is submethodness introspectable?
12:04 lizmat ~~ SubMethod ??
12:04 lizmat *Submethod actually
12:05 lizmat m: class A { submethod a {} }; say A.^methods[0] ~~ Submethod   #gfldex
12:05 camelia rakudo-moar e4d538: OUTPUT«True␤»
12:05 gfldex thx
12:05 lizmat m: class A { method a {} }; say A.^methods[0] ~~ Submethod   #gfldex
12:05 camelia rakudo-moar e4d538: OUTPUT«False␤»
12:08 gfldex is there any difference between a method and a submethod, both from user side and the compiler, sans the name?
12:09 gfldex beside the none-inheritance of submethods
12:15 lizmat I think that's the only difference
12:15 lizmat looking at te code, both Method and Submethod are just Routines, with a different gist
12:15 lizmat *the
12:15 lizmat at least on the P6 level
12:17 dalek rakudo/nom: e89721d | lizmat++ | / (2 files):
12:17 dalek rakudo/nom: native array's push-all only returns IterationEnd
12:17 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/e89721d6d6
12:17 masak gfldex: the "sub" refers to "shouldn't assume there's a fully-built `self`" and the "method" refers to "called like a method"
12:17 masak gfldex: near as I can figure out, submethods exist because BUILD needs to be one.
12:18 masak gfldex: DESTROY used to be on that list too, but DESTROY is useless.
12:23 lizmat afk&
12:29 gfldex should prefix:<||>(Positional) return SemiList (to be invented) for %h{||@a} and @a{||@b} ?
12:29 gfldex m: say LoL
12:29 camelia rakudo-moar 32902f: OUTPUT«===SORRY!=== Error while compiling <tmp>␤Undeclared name:␤    LoL used at line 1␤␤»
12:31 dalek nqp/no-eval: 6866e12 | (Pawel Murias)++ | src/vm/js/ (4 files):
12:31 dalek nqp/no-eval: [js] Start of transition towards using nqp::forceouterctx. Fails test 24.
12:31 dalek nqp/no-eval: review: https://github.com/perl6/nqp/commit/6866e12e8e
12:31 dalek nqp/no-eval: 8b84c39 | (Pawel Murias)++ | src/vm/js/ (5 files):
12:31 dalek nqp/no-eval: [js] When evaling up a context less codeRef make it use a wrapped forced ctx.
12:31 dalek nqp/no-eval: review: https://github.com/perl6/nqp/commit/8b84c39249
12:33 gfldex i found %cache{||some-capture.Array} very useful in https://github.com/gfldex/perl6-rakudo-slippy-semilists/blob/master/example/cached.p6#L9
12:38 pmurias joined #perl6-dev
12:38 dalek nqp/no-eval: 4377458 | (Pawel Murias)++ | src/vm/js/ (2 files):
12:38 dalek nqp/no-eval: [js] Don't attach the setting setup code on CodeRefs.
12:38 dalek nqp/no-eval: review: https://github.com/perl6/nqp/commit/4377458239
13:04 skids joined #perl6-dev
13:33 masak lizmat: got some bad news -- splice is broken in 007 again
13:33 masak lizmat: the short golf I used as an informal test works, but the use of splice in the 007 code base fails.
13:34 masak lizmat: stand by for new failing golfed version.
13:36 masak m: my @a; @a.splice(0, 0, "x"); say +@a
13:36 camelia rakudo-moar e89721: OUTPUT«0␤»
13:36 masak m: my @a; @a.splice(0, 0, "x"); @a.splice(1, 0, "y")
13:36 camelia rakudo-moar e89721: OUTPUT«Offset argument to splice out of range. Is: 1, should be in 0..0␤  in block <unit> at <tmp> line 1␤␤Actually thrown at:␤  in block <unit> at <tmp> line 1␤␤»
13:36 masak lizmat: ^
13:36 masak I'm happy to again be enough at the forefront of Perl 6 app development to be running headlong into these things :>
13:37 masak thanks also go out to TravisCI, which always tests against latest Rakudo, forcing me to upgrade to bleeding-edge sometimes ;)
13:37 * masak submits rakudobug
13:38 masak heck, let's re-open RT #128736
13:38 synopsebot6 Link:  https://rt.perl.org/rt3//Public/Bug/Display.html?id=128736
13:38 masak need to conserve our natural numbers a little
13:40 masak oh, it wasn't closed, it was needstest
13:44 masak ...test number 10 is TODO-passed in t/spec/S19-command-line/repl.rakudo.moar -- can we unmark it TODO?
13:44 masak happily, re-applying the previous workaround to 007 has it passing again on Rakudo HEAD
13:57 travis-ci joined #perl6-dev
13:57 travis-ci Rakudo build errored. Elizabeth Mattijsen 'native array's push-all only returns IterationEnd'
13:57 travis-ci https://travis-ci.org/rakudo/rakudo/builds/152036785 https://github.com/rakudo/rakudo/compare/32902f25ca75...e89721d6d69c
13:57 travis-ci left #perl6-dev
13:57 buggable ✓ [travis build above] One job failed due to the timeout. No other failures.
15:17 jnthn nine: Yes, or at least, if there is a FALLBACK find_method will return something that tries to delegate there.
16:00 AlexDaniel buggable: hehe :)
16:00 AlexDaniel buggable++
17:36 japhb joined #perl6-dev
19:20 dalek nqp: 2df0a06 | TimToady++ | src/vm/moar/QAST/QASTRegexCompilerMAST.nqp:
19:20 dalek nqp: charrange without :m should avoid ordat/ordfirst
19:20 dalek nqp:
19:20 dalek nqp: Synthetics wrongly look like they're in a character range if we strip the
19:20 dalek nqp: combining information, so instead we'll just use the raw char code, and the
19:20 dalek nqp: synthetic will naturally fall out of the range by virtue of being negative.
19:20 dalek nqp: Fixes RT #128550.
19:20 synopsebot6 Link:  https://rt.perl.org/rt3//Public/Bug/Display.html?id=128550
19:20 dalek nqp: review: https://github.com/perl6/nqp/commit/2df0a0656e
19:23 dalek rakudo/nom: fe90be0 | TimToady++ | tools/build/NQP_REVISION:
19:23 dalek rakudo/nom: bump NQP to get fix for RT #128550
19:23 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/fe90be01c6
19:23 synopsebot6 Link:  https://rt.perl.org/rt3//Public/Bug/Display.html?id=128550
19:23 dalek roast: 172f694 | TimToady++ | S15-nfg/regex.t:
19:23 dalek roast: update charrange tests for RT #128550
19:23 dalek roast:
19:23 dalek roast: Removed todo on base case; also added test for :i case, which had also been
19:23 dalek roast: doing it wrong.
19:23 synopsebot6 Link:  https://rt.perl.org/rt3//Public/Bug/Display.html?id=128550
19:23 dalek roast: review: https://github.com/perl6/roast/commit/172f694565
19:32 TimToady m: say /^<[a..z]>$/.ACCEPTS("n\x[308]");
19:32 camelia rakudo-moar fe90be: OUTPUT«Nil␤»
19:32 TimToady m: say /:i ^<[a..z]>$/.ACCEPTS("n\x[308]");
19:32 camelia rakudo-moar fe90be: OUTPUT«Nil␤»
19:32 TimToady m: say /:i:m ^<[a..z]>$/.ACCEPTS("n\x[308]");
19:32 camelia rakudo-moar fe90be: OUTPUT«「n̈」␤»
19:33 TimToady m: say /:m ^<[a..z]>$/.ACCEPTS("n\x[308]");
19:33 camelia rakudo-moar fe90be: OUTPUT«「n̈」␤»
19:34 TimToady my initial scan for other occurrences of ordat didn't turn up any other obvious deficiencies
20:15 travis-ci joined #perl6-dev
20:15 travis-ci Rakudo build passed. TimToady 'bump NQP to get fix for RT #128550'
20:15 travis-ci https://travis-ci.org/rakudo/rakudo/builds/152093416 https://github.com/rakudo/rakudo/compare/e89721d6d69c...fe90be01c654
20:15 travis-ci left #perl6-dev
20:15 synopsebot6 Link:  https://rt.perl.org/rt3//Public/Bug/Display.html?id=128550
21:17 brrt joined #perl6-dev
22:12 lizmat masak: will look at the .splice issue tomorrow
22:14 masak \o/
22:15 masak is there a way for the RT ticket to be marked up with "needs to tests"? :)
22:15 jnthn There's a testneeded tag
22:16 lizmat anyways, today was an eventful day for us
22:16 lizmat 1. we broke the record for number of 50km+ rides in the month of August
22:16 lizmat 2. we broke the total km cycled for the month of August
22:17 lizmat 3. it was the bloodiest trip we've ever made
22:17 lizmat on account of me hitting the concrete at 25km / hour
22:17 jnthn Ouch!! :(
22:18 masak :(
22:18 lizmat yeah, pretty will be looking more oddly at me for the coming 3 weeks than they normally do  :-)
22:18 lizmat anyways, nothing broken, just a lot of scratches and bruises
22:18 masak lizmat: here's hoping for a speedy recovery
22:18 masak "needs two* tests"
22:18 jnthn Glad you're at least in shape to be on IRC the evening after it...
22:18 brrt oh, ouch indeed
22:19 lizmat yeah...  also, we still needed to cycle 25km after this happened
22:19 lizmat and that was no problem..
22:19 jnthn o.O
22:19 lizmat did make me feel like a professional cyclist doing the Tour de France a bit  :-)
22:20 gfldex you ran home?
22:20 lizmat cycled home
22:20 lizmat cleaned up, got a checkup at the first aid station at the hospital
22:21 lizmat anyways,
22:21 lizmat going to try to get some sleep now...
22:21 lizmat so, good night, #perl6-dev!
22:21 gfldex sweet dreams
22:21 jnthn Glad you're safe. Rest well!
22:21 lizmat thanks!
22:22 gfldex another reason to go to mars. Less gravity.
22:22 brrt sleep well

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