Perl 6 - the future is here, just unevenly distributed

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

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

All times shown according to UTC.

Time Nick Message
00:05 MasterDuke joined #perl6-dev
01:53 dalek joined #perl6-dev
03:09 ShimmerFairy Hm, it seems like partially-dimensioned views of shaped arrays would require some weird fiddling, especially because things like [1;3..5;2] are done as a tree-like series of calls to AT-POS, and that makes creating a "sub-shape" awkward. I can see why it's NYI :)
03:09 ShimmerFairy (though saying that, I'm now wondering if one could possibly have a 'method subshape' ...)
03:34 unmatched} s: HyperWhatever, "new"
03:34 SourceBaby unmatched}, Sauce is at https://github.com/rakudo/rakudo/blob/c587b9d/src/core/Mu.pm#L83
03:37 unmatched} s: HyperWhatever, "new", \()
03:37 SourceBaby unmatched}, Sauce is at https://github.com/rakudo/rakudo/blob/c587b9d/src/core/Whatever.pm#L10
03:39 unmatched} m: HyperWhatever.new
03:39 camelia rakudo-moar c587b9: OUTPUT«WARNINGS for <tmp>:␤Useless use of "new" in sink context (line 1)␤»
03:39 unmatched} m: say HyperWhatever.new
03:39 camelia rakudo-moar c587b9: OUTPUT«sub (*@_) { #`(Sub|61102224) ... }␤»
03:39 * unmatched} doesn't get how that happens
03:39 unmatched} It's https://rt.perl.org/Ticket/Display.html?id=128880
03:46 ShimmerFairy unmatched}: one idea would be to --profile it locally and then see the call graph tab to check the chain of functions that's actually called (I'm doing that right now for something I'm playing with)
03:48 ShimmerFairy the only downside being that you get line numbers for the big huge generated CORE.setting, instead of individual files (but that's always an issue with tracing anything through CORE :P)
07:18 [Tux] This is Rakudo version 2016.07.1-161-gc587b9d built on MoarVM version 2016.07-18-g2f269d8
07:18 [Tux] csv-ip5xs       10.088
07:18 [Tux] test            15.341
07:18 [Tux] test-t           7.380
07:18 [Tux] csv-parser      16.720
07:30 arnsholt jnthn: Are there any semantic differences (LTM-wise, for example), between a method O() that just does a $cursor.'!cursor_pass' and a `token O() { <?> }`?
07:33 gfldex m: my @a = 1..3; my %h; %h{|@a} = 1; dd %h;
07:33 camelia rakudo-moar c587b9: OUTPUT«Hash %h = {"1" => 1, "2" => Any, "3" => Any}␤»
07:36 TimToady m: my @a = 1..3; my %h; %h{|@a} = 1 xx *; dd %h;
07:36 camelia rakudo-moar c587b9: OUTPUT«Hash %h = {"1" => 1, "2" => 1, "3" => 1}␤»
07:37 gfldex if would expect {|@a} to mean {1;2;3} when it comes to subscripts
07:38 gfldex %h{@a}:multi-dim would also make sense
07:39 TimToady m: my @a = 1..3; my %h; %h{||@a} = 1; dd %h;
07:39 camelia rakudo-moar c587b9: OUTPUT«Hash %h = {"1" => 1, "2" => Any, "3" => Any}␤»
07:39 TimToady that's supposed to work there, but doesn't
07:42 dalek roast: b6012e0 | TimToady++ | S04-statements/sink.t:
07:42 dalek roast: RT #127879; map inside sunk 'for' runs as sunk
07:42 dalek roast: review: https://github.com/perl6/roast/commit/b6012e0cd7
07:42 dalek roast: 00dbf5e | TimToady++ | S (3 files):
07:42 dalek roast: Merge branch 'master' of git://github.com/perl6/roast
07:42 synopsebot6 Link:  https://rt.perl.org/rt3//Public/Bug/Display.html?id=127879
07:42 dalek roast: review: https://github.com/perl6/roast/commit/00dbf5e1bf
07:42 dalek rakudo/nom: 62881ad | TimToady++ | src/Perl6/Actions.nqp:
07:42 dalek rakudo/nom: In general, a method call should want all its args
07:42 dalek rakudo/nom:
07:42 dalek rakudo/nom: Fixes "say await start 42".
07:42 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/62881ad0cd
07:43 dalek joined #perl6-dev
07:49 RabidGravy joined #perl6-dev
07:57 gfldex m: my @a = 1..3; my %h; %h{;|@a} = 1; dd %h;
07:57 camelia rakudo-moar 7399a3: OUTPUT«Use of Nil in string context  in block <unit> at <tmp> line 1␤Hash %h = {"" => ${"1" => ${"2" => ${"3" => 1}}}}␤»
07:58 gfldex TimToady: ^^^ that's quite close :)
08:00 gfldex m: my @a = 1..3; my %h; %h{;@a} = 1; dd %h;
08:00 camelia rakudo-moar 7399a3: OUTPUT«Use of Nil in string context  in block <unit> at <tmp> line 1␤Hash %h = {"" => ${"1" => 1, "2" => Any, "3" => Any}}␤»
08:03 gfldex m: multi sub postcircumfix:<{|| }>(\SELF, @indices){ say "oi!" }; my @a = 1..3; my %h; %h{||@a} = 1;
08:03 camelia rakudo-moar 7399a3: OUTPUT«oi!␤Cannot modify an immutable Bool␤  in block <unit> at <tmp> line 1␤␤»
08:03 gfldex it's simply not implemented
08:05 sno joined #perl6-dev
08:07 dalek rakudo/nom: 4dd6223 | TimToady++ | src/Perl6/Actions.nqp:
08:07 dalek rakudo/nom: call node inside Want should propage wantedness
08:07 dalek rakudo/nom:
08:07 dalek rakudo/nom: This fixes useless use from: my @a; @a.grep({ .value andthen $_ eq "foo" })
08:07 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/4dd6223b41
08:12 TimToady m: class Sinker { method sink() { say "Blub" } }; for ^5 { Sinker.new(); }; Nil
08:12 camelia rakudo-moar 4dd622: OUTPUT«Blub␤Blub␤Blub␤Blub␤Blub␤»
08:12 TimToady this one is also now fixed
08:23 gfldex m: use nqp; multi sub postcircumfix:<{|| }>(\SELF, @indices){my \target = IterationBuffer.new; MD-HASH-SLICE-ONE-POSITION(SELF, @indices, @indices.AT-POS(0), 0, target); nqp::p6bindattrinvres(nqp::create(List), List, '$!reified', target)}; my @a = 1..3; my %h; %h{||@a} = 1; dd %h
08:23 camelia rakudo-moar 4dd622: OUTPUT«Hash %h = {"1" => ${"2" => ${"3" => 1}}}␤»
08:26 gfldex i tried to do the same in src/core/hash_slice.pm (plus, a proto and the token in Grammar.nqp) but it's not getting called
08:29 gfldex that's the code https://github.com/gfldex/rakudo/commit/18332e6d57980159b37c875a23e9d82e7de35066
08:29 gfldex would be nice if a knowledgable could have a look
09:03 gfldex m: say &prefix:<||>
09:03 camelia rakudo-moar 4dd622: OUTPUT«===SORRY!=== Error while compiling <tmp>␤Undeclared routine:␤    prefix:<||> used at line 1. Did you mean 'prefix:<|>', 'prefix:<~>', 'prefix:<->', 'prefix:<so>'?␤␤»
09:04 |Tux| joined #perl6-dev
09:28 RabidGravy joined #perl6-dev
09:41 dalek rakudo/nom: 0de8eb3 | lizmat++ | src/core/Set (2 files):
09:41 dalek rakudo/nom: Make Set/SetHash.pairs|antipairs about 10% faster
09:41 dalek rakudo/nom:
09:41 dalek rakudo/nom: By using the -> --> sig on the block
09:41 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/0de8eb334b
09:41 dalek rakudo/nom: 6c7eb38 | lizmat++ | src/core/Str.pm:
09:41 dalek rakudo/nom: Make Str.comb(Regex) a bit faster
09:41 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/6c7eb38e8d
10:16 |Tux| joined #perl6-dev
10:48 dalek rakudo/nom: 4cef9ee | lizmat++ | src/core/Promise.pm:
10:48 dalek rakudo/nom: Make sure we can return Nil as a result of Promise
10:48 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/4cef9ee082
10:58 ShimmerFairy joined #perl6-dev
11:30 |Tux| This is Rakudo version 2016.07.1-172-g4cef9ee built on MoarVM version 2016.07-18-g2f269d8
11:30 |Tux| csv-ip5xs        9.856
11:30 |Tux| test            15.284
11:30 |Tux| test-t           7.293
11:30 |Tux| csv-parser      16.094
11:31 lizmat [Tux] I think I now have some ways of making Text::CSV faster, but it would require some changes in the Text::CSV code
11:31 |Tux| lizmat, 4.2% to go to get under 7
11:31 lizmat still Perl 6 only features though  :-)
11:32 |Tux| go ahead
11:34 nine I'm sure all other incarnations have been optimized to death already, so why not the Perl 6 one :)
11:44 lizmat |Tux| ok, that was disappointing  :-(
11:54 lizmat somehow the for @a -> \x --> Type { } takes longer than just for @a { }
11:55 lizmat basically nulling out the whole optimization of not having to looking for Slips
12:24 edehont joined #perl6-dev
12:36 nine lizmat: that's odd. The same changes in Set/SetHash seem to have improved performance?
12:37 lizmat well, I'm not so sure anymore  :-(
12:37 lizmat anyways, it's a long ways away from 30% of quickmap  :-(
12:37 lizmat guess I will have to be more patient
12:37 lizmat and less doctor
12:43 lizmat m: my @a = ^100000; my $b = now; for @a { .Str }; say now - $b   # standard way
12:43 camelia rakudo-moar 4cef9e: OUTPUT«0.1266844␤»
12:43 lizmat m: my @a = ^100000; my $b = now; for @a -> \x --> Str { x.Str }; say now - $b   # optimized way
12:43 camelia rakudo-moar 4cef9e: OUTPUT«0.0802056␤»
12:44 lizmat so that *does* seem to help
12:44 lizmat apart from being a longwinded way to say the same
12:45 lizmat m: say 0.1266844 / 0.0802056
12:45 camelia rakudo-moar 4cef9e: OUTPUT«1.5794957␤»
12:49 nine m: my @a = ^100000; my $b = now; for @a { .Str }; say now - $b
12:49 camelia rakudo-moar 4cef9e: OUTPUT«0.1280199␤»
12:49 nine m: my @a = ^100000; my $b = now; for @a -> \x --> Str { x.Str }; say now - $b
12:49 camelia rakudo-moar 4cef9e: OUTPUT«0.08233568␤»
12:49 nine Yep, well reproducible
12:49 nine And yes, it's a shame that the shorter version is slower. But I can't seem to find a better solution either.
12:50 lizmat I guess we need the optimizer to introspect the block and decide .Str is the only thing that can be returned
12:50 lizmat and set the block.returns for us
12:51 lizmat I guess actually in the case of *.Str we can already do that
12:51 nine s/optimizer/spesh/
12:52 lizmat in the case of *.Str, it would be compile time doable no?
12:52 nine As the .Str is a method call the optimizer cannot statically decide what the return value will be. Spesh should be able to.
12:52 unmatched} What does "spesh" stand for?
12:52 nine x could have a Str method that returns a Slip :)
12:53 lizmat ah, yes, good point
12:53 nine unmatched}: I think type specializer or something like that
12:53 lizmat but then, how could spesh then do it reliably
12:53 unmatched} ah
12:55 nine lizmat: AFAIK observe that this always returns Strs, specialize for Str and add a guard op, so if the behavior suddenly changes we fall back to the unspecialized code
12:55 lizmat nine: ack
12:59 lizmat hmmm... aren't blocks supposed to be immutable at runtime?
12:59 lizmat *can* we actually change the .returns on a Block ?
13:03 jnthn .tell ShimmerFairy fwiw, on partially dimensioned views, I'd somewhat expected to do them by way of there being a VM-level mechanism which gives you a "view" into another array, essentially currying a dimension or two.
13:03 yoleaux2 jnthn: I'll pass your message to ShimmerFairy.
13:03 RabidGravy I have actually wanted to do that in the past
13:03 RabidGravy then got over it
13:04 jnthn lizmat: The return type should be fixed in place from the point the routine's closing curly has been parsed.
13:04 lizmat ok, so spesh messing with the return type is a no go
13:05 ShimmerFairy jnthn: ah. I've started trying something, but VM-level "view" for what's effectively a VM-level construct would make more sense :)
13:05 jnthn lizmat: If you do change it then it'll only make a different for introspection purposes, I expect, 'cus the check gets compiled into the code.
13:05 yoleaux2 13:03Z <jnthn> ShimmerFairy: fwiw, on partially dimensioned views, I'd somewhat expected to do them by way of there being a VM-level mechanism which gives you a "view" into another array, essentially currying a dimension or two.
13:05 lizmat so we need another way to get the faster iterator
13:05 jnthn spesh doesn't care in the slightest about what a Perl 6 signature object says, it cares what the bytecode says :)
13:05 ShimmerFairy especially since finding the right places to do it in rakudo code is quite awkward.
13:05 jnthn ShimmerFairy: Yeah, I'd expect that to be less than fun :)
13:05 lizmat jnthn: ah, but the iterator selection *is* done through introspection atm
13:06 arnsholt jnthn: A <?> assertion in a regex just compiles down to a `$cursor.'!cursor_pass'(...)`, right?
13:06 jnthn lizmat: That's fine, I'm just saying that if somebody changes the return type somehow at runtime, then it'd affect introspection only. But that's very far into DIHWIDT land ;)
13:06 ShimmerFairy And I was currently only working on the @array[4] case, and not yet the @array[1..3;4;*;3] case :P
13:07 jnthn arnsholt: Just saw that question in the backlog. Effectively, yes.
13:07 arnsholt Kewl. 'Cause then I can simplify HLL::Grammar.O even more
13:07 jnthn :)
13:07 arnsholt The fewer methods in HLL::Grammar, the better IMO
13:08 jnthn ShimmerFairy: fwiw, I'd got other use-cases in mind for a VM-level view thingy too. subbuf for example :)
13:08 jnthn ShimmerFairy: Though probably only on immutable blobs
13:09 ShimmerFairy jnthn: something felt off about doing it in P6 land anyway (especially the prospect of throw-away shaped arrays in one possible implementation for infix:<[; ]>).
13:11 ShimmerFairy jnthn: and the reason I'm suddenly interested in this is because the ad-hoc @a = [1,2],[4,5] doesn't feel as good for my use-case (a fixed 3D array), so I guess I'm prepared to make partial dimensioning work :P
13:11 pochi joined #perl6-dev
13:13 jnthn ShimmerFairy: Yeah, I did think about it when doing the design work and figured it'd be most naturally handled down at VM level
13:16 ShimmerFairy jnthn: Like I said, definitely can see why that's the case. The VM level doesn't have a bunch of P6-level stuff to be worried about at the same time (MMD, operators, and so on)
13:17 jnthn Right :)
13:17 jnthn Also, the multi-dim stuff is designed so the dimensionality is part of the type
13:17 jnthn Which will let us do really nice branch-free JIT of multi-dim array lookups in the future.
13:18 jnthn So we'd want to try and carry that through to the view thingy also
13:19 ShimmerFairy jnthn: one thing I noticed is that there'll be a discrepancy between @a[1;5;2] for unshaped and shaped arrays, where the shaped version returns something also shaped, but the unshaped version currently returns a flat structure. I'm not sure how I feel about that.
13:20 AlexDaniel joined #perl6-dev
13:21 jnthn I think "also shaped" probably makes sense
13:21 jnthn Consider
13:22 jnthn my @a[3;3;3]; sub foo(@b[*;*]) { }; foo(@a[1])
13:22 jnthn Or similar
13:22 jnthn We'd quite like that to work
13:23 ShimmerFairy oh, I wasn't suggesting the shaped path was wrong, but rather it feels weird that the unshaped version returns something totally flat regardless
13:23 jnthn And the signature check there is a declarative thing (tests .shape), not looking at the data shape
13:23 jnthn Got a concrete example of a case where it'd trip somebody up?
13:24 ShimmerFairy m: my @a = [1,2],[4,5]; say @a[*;1];   # part of me wonders if this wouldn't want to be [2],[5] instead
13:24 camelia rakudo-moar 4cef9e: OUTPUT«(2 5)␤»
13:24 ShimmerFairy jnthn: not at the moment, and .rotor() is always there to get back the structure you'd like to have (or just use shaped arrays, in the future ☺)
13:26 jnthn m: my @a[2;2] = [1,2],[4,5]; say @a[*;1]
13:26 camelia rakudo-moar 4cef9e: OUTPUT«Partially dimensioned views of arrays not yet implemented. Sorry. ␤  in block <unit> at <tmp> line 1␤␤»
13:26 jnthn Aww, right :)
13:26 ShimmerFairy yeah, trying that gets you that tree-like AT-POS call structure :P
13:26 jnthn But since we're reached the leaves, would the result not be(2 5)?
13:26 jnthn s/be(/be (/
13:28 ShimmerFairy True, I may be a bit too tired at this point to remember why exactly I'd like e.g. @mtx3d[0;*;0] to not be a flat list :)
13:28 jnthn :)
13:29 jnthn Yeah, my initial thinking was that if you are indexing in a way that you provide a value for all dimensions of the declared shape, then you'd get a flat list.
13:29 jnthn That is, that we need partially dimensioned views to compute @a[*;1] is really an implementation detail
13:29 jnthn It's not that I'd expect to get one back
13:30 jnthn @a[*] I would because I've missed out a dimension
13:31 ShimmerFairy I think it's more pertinent for 2D views, that's what it was. So, @a[0;*;*] would ideally be a not-flat thing in every case
13:31 ShimmerFairy m: my @a = [[1,2],[4,5]],[[6,7],[8,9]]; say @a[*;0;*];
13:31 camelia rakudo-moar 4cef9e: OUTPUT«(1 2 6 7)␤»
13:31 ShimmerFairy yeah, that's the case where the unshaped indexing seems like it will end up being at odds with what a shaped index would do.
13:37 jnthn I don't immediately see why; I tend to think of @a[*;0;*] being short-hand for (@a[0;0;0], @a[0;0;1], @a[1;0;0], @a[1;0;1])
13:37 jnthn And, after all, if you *do* want to know the paths to the elements, then my can write @a[*;0;*]:p or @a[*;0;*]:kv
13:38 ShimmerFairy hm, :p and :kv don't work on unshaped arrays
13:40 jnthn m: my @a = [1,2],[3,4]; dd @a[*;1]
13:40 camelia rakudo-moar 4cef9e: OUTPUT«(2, 4)␤»
13:40 jnthn m: my @a = [1,2],[3,4]; dd @a[*;1]:kv
13:40 camelia rakudo-moar 4cef9e: OUTPUT«Unexpected named parameter 'kv' passed␤  in block <unit> at <tmp> line 1␤␤»
13:40 jnthn m: my @a = [1,2],[3,4]; dd @a[*;1]:p
13:40 camelia rakudo-moar 4cef9e: OUTPUT«Unexpected named parameter 'p' passed␤  in block <unit> at <tmp> line 1␤␤»
13:40 jnthn Ah, don't work as in NYI. :)
13:40 jnthn Yeah...but I think we can agree they really should work? :)
13:41 jnthn m: my @a[2;2] = [1,2],[3,4]; dd @a.kv
13:41 camelia rakudo-moar 4cef9e: OUTPUT«((0, 0), 1, (0, 1), 2, (1, 0), 3, (1, 1), 4).Seq␤»
13:41 ShimmerFairy jnthn: I'm not sure what they're expected to do, but if they can easily give me that structured view I'd like, then it's good :)
13:41 ShimmerFairy ah, I see
13:41 jnthn I'd expect @a[*;*]:kv to produce output like that, I think
13:41 jnthn I'm wondering if you have a distinct use-case though
13:42 jnthn Which actually cross-cuts whether the thing is declared shaped/unshaped
13:42 ShimmerFairy jnthn: in this case, it's trying to implement the SHA-3 algorithm, which conceptually has a 3D state array that you take different views of. (Let me find a link to the diagram, if I can.)
13:42 jnthn That is, you want the original structure but trimmed to include the indices described?
13:43 ShimmerFairy http://keccak.noekeon.org/Keccak-f-PiecesOfState.png
13:43 ShimmerFairy I don't think the mathematics actually cares that much if you get the view, it's just a concern that came up while implementing a class to handle it :)
13:43 jnthn Ah, interesting :)
13:45 jnthn I get the use-case now, at least... :)
13:45 ShimmerFairy fwiw, the algorithm insists on putting the origin X and Y coordinates in the center of that diagram, but it doesn't matter to the actual algorithm either (near as I can tell so far).
13:46 ShimmerFairy Like I said, rotor-ing isn't that bad anyway :)
13:46 jnthn Aye :)
13:46 jnthn Lunch time for me...back later :)
13:47 ShimmerFairy (honestly, having .rotor built-in is *super* nice, this would be a much bigger annoyance without it)
14:09 lizmat afk&
14:19 awwaiid joined #perl6-dev
15:12 unmatched} .tell lizmat if you're looking for content for the Weekly, we got a new bot: SourceBaby. You trigger it with s: trigger, giving it arguments to give to CoreHackers::Sourcery's sourcery() sub and it gives a GitHub URL to source in question.
15:12 yoleaux2 unmatched}: I'll pass your message to lizmat.
15:12 unmatched} s: Int, "base", \(16)
15:12 SourceBaby unmatched}, Something's wrong: ␤ERR: Could not find candidate that can do \(16)␤  in sub sourcery at /home/zoffix/services/lib/CoreHackers-Sourcery/lib/CoreHackers/Sourcery.pm6 (CoreHackers::Sourcery) line 29␤  in block <unit> at -e line 6␤␤
15:12 unmatched} s: 42, "base", \(16)
15:12 SourceBaby unmatched}, Sauce is at https://github.com/rakudo/rakudo/blob/4cef9ee/src/core/Int.pm#L63
15:13 unmatched} And it refreshes the rakudo build every hour
15:13 * unmatched} leaves for a few days to study up the Internals course and how MoarVM works
15:13 unmatched} \o
15:14 lucs unmatched}: Don't forget to blog about it! Have fun :)
15:16 perlpilot s: Int abs
15:16 SourceBaby perlpilot, Something's wrong: ␤ERR: [31m===[0mSORRY![31m===[0m Error while compiling -e␤Unable to parse expression in argument list; couldn't find final ')' ␤at -e:6␤------> [32m    put sourcery( Int[33m⏏[31m abs )[1];[0m␤    expecting any of:␤        infix␤        infix stopper␤
15:25 skids joined #perl6-dev
15:31 edehont joined #perl6-dev
16:30 dalek nqp: 05e51ee | (Zoffix Znet)++ | docs/6model/overview.markdown:
16:30 dalek nqp: Fix typo
16:30 dalek nqp: review: https://github.com/perl6/nqp/commit/05e51ee1fd
16:30 arnsholt jnthn: Except O doesn't actually attach its information to the AST slot, but to the *match* slot, so my simplification doesn't work. I'm half inclined to refactor everything to use .made instead. Thoughts?
16:34 arnsholt jnthn: I guess it might increase parsing overhead, which would be bad for large compilations like the Rakudo setting?
16:36 dalek nqp: 5b4fcb5 | (Zoffix Znet)++ | docs/qast.markdown:
16:36 dalek nqp: Fix formatting
16:36 dalek nqp:
16:36 dalek nqp: POD syntax used in Markdown document.
16:36 dalek nqp: review: https://github.com/perl6/nqp/commit/5b4fcb536d
16:55 jdv79 SauceBaby would be a more amusing name but in any case "Baby" with anything seems a bit strange to me.
16:56 timotimo oh, saucebaby, like a baby sitting at one of those baby chairs with a table built-in and just sloshing sauce and soup and carrots all over the place
16:59 nine [Tux]: please try installing Inline::Perl5 again. It should install now on perls with uselongdouble :)
17:00 nine [Tux]: some problems suddenly appear ridiculously simple once you know a solution...
17:37 jnthn arnsholt: I'm not sure, but it may make sense. fwiw, the fact that places we expect to contain Match objects can suddenly contain a Hash is not only the cause of an extra test on a hot path, but also one of the most common sources of deoptimization (because it's a Match object most of the time, and deopts on the Hash case)
17:42 arnsholt jnthn: Oh, that's interesting. In that case, I'll implement it and see what falls out
18:06 sno joined #perl6-dev
18:29 AlexDaniel joined #perl6-dev
18:49 gfldex is there any documentation on how to untangle NQPMatch?
18:49 gfldex i basically got the top of https://gist.github.com/gfldex/ba813b6f0e42ef2f7cf575ffcc04b773
18:49 gfldex and I need to know if there is 'EXPR: ||'
18:59 TimToady is there some particular reason CATCH doesn't work inside List.invert?
19:00 TimToady or at least, why it doesn't work to catch Method 'value' not found for invocant of class 'Int'
19:01 [Coke] there's not a lot of moving parts in List.invert
20:01 [Tux] nine, you should probably increase its version
20:01 [Tux] All tests successful.
20:01 [Tux] Files=30, Tests=381, 29 wallclock secs ( 0.11 usr  0.02 sys + 26.41 cusr  1.18 csys = 27.72 CPU)
20:01 [Tux] Result: PASS
20:01 [Tux] ==> Installing Inline::Perl5
20:08 jnthn TimToady: You're not getting caught out by map being lazily evaluated?
20:08 jnthn Hm, I'm not at HEAD but List.invert here looks like `self.map({ nqp::decont(.value) »=>» .key }).flat`
20:09 arnsholt jnthn: The coercion thing you mention, would that be Perl6::Grammar.AS_MATCH?
20:09 jnthn So a CATCH inside the method wouldn't help 'cus it's out of dynamic scope before something evaluates the thing
20:10 jnthn arnsholt: Coercion thing?
20:10 arnsholt Sorry
20:10 arnsholt You said something about places which expect a Match object but getting Hash objects
20:10 arnsholt (In re O being more like normal rules)
20:11 arnsholt And I just found AS_MATCH in the Rakudo grammar, which looks suspiciously similar to what you talked about
20:11 jnthn Oh, I was talking about
20:11 jnthn https://github.com/perl6/nqp/blob/master/src/QRegex/Cursor.nqp#L918
20:11 jnthn Note the hash handling there too
20:11 arnsholt Oh, right. That's even hot-pathier
20:12 jnthn I *think* there's another place that has to cope too but I don't immediately see it...
20:13 arnsholt It's checking for the thing being *not* a hash though, isn't it?
20:18 [Tux] nine++, Inline::Perl5 passes all CSV tests with -Duselongdouble
20:19 [Tux] This is Rakudo version 2016.07.1-172-g4cef9ee built on MoarVM version 2016.07-18-g2f269d8
20:19 [Tux] csv-ip5xs       10.085
20:19 [Tux] test            15.403
20:19 [Tux] test-t           7.439
20:19 [Tux] csv-parser      16.674
20:20 jnthn arnsholt: Yes
20:24 arnsholt Oh, right. Because a hash in that position has is also a valid "match" object
20:24 arnsholt My brains are a bit addled, it seems
20:24 arnsholt I'll keep digging into this in the morrow. Thanks for the help!
20:26 jnthn Thanks for working on it :)
20:27 perlpilot random though because I clicked on the link:  What does it check to see if it's not an NQPMatch too?   What else is being stored in $!match?
20:27 perlpilot s/What/Why/
20:32 dalek rakudo/nom: be7ce04 | lizmat++ | src/core/REPL.pm:
20:32 dalek rakudo/nom: Make the REPL catch CONTROL-c when executing
20:32 dalek rakudo/nom:
20:32 dalek rakudo/nom: Pressing CONTROL-c while something is executing, will not wait for
20:32 dalek rakudo/nom: the result of that code to appear.  The code *will* however continue
20:32 dalek rakudo/nom: to execute at the moment, because we do not have a way to force an
20:32 dalek rakudo/nom: exception to be thrown in another thread.
20:32 dalek rakudo/nom:
20:32 dalek rakudo/nom: Fixes RT #128900  *and* RT #128595
20:32 synopsebot6 Link:  https://rt.perl.org/rt3//Public/Bug/Display.html?id=128900
20:32 synopsebot6 Link:  https://rt.perl.org/rt3//Public/Bug/Display.html?id=128595
20:32 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/be7ce041a8
20:38 lizmat hmmm... the RT #128595 still exists, the test is just not up to par :-(
20:38 synopsebot6 Link:  https://rt.perl.org/rt3//Public/Bug/Display.html?id=128595
20:38 yoleaux2 15:12Z <unmatched}> lizmat: if you're looking for content for the Weekly, we got a new bot: SourceBaby. You trigger it with s: trigger, giving it arguments to give to CoreHackers::Sourcery's sourcery() sub and it gives a GitHub URL to source in question.
20:51 jnthn perlpilot: Because O has been storing a Hash in there so far, to date. Why it does this, I'm not entirley sure; it's been that way sufficiently long it may date back to before my time in Perl 6. Certainly before the time when I understood the grammar engine. :-)
20:51 jnthn *entirely
22:14 TimToady jnthn: doh! of course it's a lazy list...
22:19 gfldex m: my %h; %h{1;2} = 42; say %h{1;2}:exists;
22:19 camelia rakudo-moar be7ce0: OUTPUT«Unexpected named parameter 'exists' passed␤  in block <unit> at <tmp> line 1␤␤»
22:41 unmatched} The test for 128595 tests just for the "not-hangingness" of the REPL. Not sure why I thought that was a good idea, considering bailing out and not starting a REPL (just like not executing any -e '' code) on missing modules is the right way to go :/
22:59 skids joined #perl6-dev

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