»ö« 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:01
Mouq joined,
nbrown joined
|
|||
Mouq | jnthn++ | 00:01 | |
yoleaux | 14 Aug 2014 17:08Z <jnthn> Mouq: MoarVM HEAD fixes the htmlify grapheme iter crash | ||
00:01
immortal joined,
immortal left,
immortal joined
00:02
erkan left,
zakharyas left
00:05
nbrown left
|
|||
rurban | I had to read a lot of wrong things about parrot here .2013-02-07#i_6423589 on reddit. First parrot threading is better than moar threading. No blocking, it scales linearily. Second, parrot is actively being maintained. | 00:09 | |
Missing async and signals is a good point though | 00:10 | ||
00:26
iarna left
00:33
BenGoldberg joined
|
|||
Mouq | What's missing to make "LoL" a + on perl6.org/compilers/features ? | 00:36 | |
m: my @a = [ [5,3], [6,2] ]; @a[*;1] = @a[*;0] X+ 1; say @a.perl | 00:37 | ||
camelia | rakudo-moar f4ed49: OUTPUT«Array.new([[5, 3], 3])» | ||
Mouq | m: my @a = [5,3], [6,2]; @a[*;1] = @a[*;0] X+ 1; say @a.perl | ||
camelia | rakudo-moar f4ed49: OUTPUT«Array.new([5, 6], [6, 7])» | ||
00:41
jnap joined
|
|||
TimToady | I guess we just need to rewrite all the 2d logic on RC to use the new notation, but so far it looks pretty good to me :) | 00:56 | |
00:57
thou joined
|
|||
TimToady | will also be nice when we get this integrated with shaped array support eventually | 00:57 | |
but it's looking pretty LoLish to me | |||
00:58
BenGoldberg left
|
|||
TimToady | it's really cool to see things that were specced a decade ago finally coming into being | 00:59 | |
01:00
jnap left
01:01
nbrown joined,
thou left
01:04
AforAcronym left
01:05
nbrown left
01:08
BenGoldberg joined,
dayangkun joined
01:11
psch left
|
|||
Mouq | Hm.. Looks like we still need &lol, and we could use better integration with the subs and Cool.methods | 01:13 | |
S29:413 shouldn't that be --> LoL | 01:14 | ||
synopsebot | Link: perlcabal.org/syn/S29.html#line_413 | ||
01:14
iarna joined
|
|||
TimToady | yeah, I suspect so | 01:16 | |
we probably need to make sure that ** params bind nicely to a LoL | 01:17 | ||
Mouq | Oh, that's another thing too, they hyper-thingies | ||
TimToady | alternately, lol doesn't really produce a LoL, but just an itemized list of lists | 01:18 | |
er, a list of itemized lists | |||
but that's what ** is supposed to do anyway | |||
yeah, also hyperwhatever, and || interpolation | |||
01:19
psch joined
|
|||
TimToady | so the other theory is that lol is simply a binder to a **@lists param, and returns that | 01:20 | |
but this whole business is something we need to feel our way into | |||
psch | with $/ being implicit without an argument, i think? | ||
S05 suggests something like that -- that's one of the things missing for m:g// | 01:21 | ||
S05:"Capturing from repeated matches" | |||
or is that just topicalization inside the if? | |||
TimToady doesn't understand what you're asking | 01:22 | ||
this doesn't seem to have much to do with LoL | |||
psch | yeah, i misremembered. :g doesn't do anything with LoL, :ex and :ov do | ||
or maybe i'm just misunderstanding in general :) | |||
it doesn't directly relate i guess | 01:23 | ||
TimToady | we were talking about LoL and ** binding just before you came on | ||
not ** as in regex | |||
but I can how you might misread what I said | |||
psch | i did catch the backlog, i was wondering about lol() in the example in S05 under "Capturing from repeated matches" | ||
TimToady | okay | 01:24 | |
psch | say "Match { +lol() } times" | ||
TimToady | it's certainly true that submatches may themselves be lists | ||
but as I say, we're still kinda feeling our way into this multidimensional thing | 01:25 | ||
and it's not always clear at what point we want to switch from a structural definition to a typed definition | |||
we use the LoL type to distinguish a .[1,2,3] subscript from a .[1,2,3;4,5,6] subscript | 01:26 | ||
but outside of that, we probably want to define things as structural, so if we can get away with not creating a LoL object every time we don't flatten (or however you say that positively), then I think that's probably a good thing | 01:27 | ||
Mouq | TimToady, would **@lol simplify, e.g., infix:<Z>? | 01:28 | |
TimToady | so maybe lol itself doesn't want to return a LoL, just something that is a list of individually lazy sublists that won't automatically flatten | ||
well, that's generally a list of two lists, but it could be more, since it's list associative | 01:29 | ||
@foo Z @bar Z @baz | |||
and each of them is potentially lazy | |||
01:30
FROGGS_ joined
|
|||
Mouq | m: my @a = 1,2,3; my @b = 4,5,6; sub foo (*@a) { say @a.perl }; foo @a, @b | 01:30 | |
camelia | rakudo-moar f4ed49: OUTPUT«Array.new(1, 2, 3, 4, 5, 6)» | ||
Mouq | Ahh | ||
TimToady | it's a bit of an intrusion for the grammar to install a LoL coercion, but it arises in subscripts because we don't want to wrap up every single-dimensional slice up as if it's multi-dimensional | ||
m: my @a = 1,2,3; my @b = 4,5,6; sub foo (**@a) { say @a.perl }; foo @a, @b | 01:31 | ||
camelia | rakudo-moar f4ed49: OUTPUT«LoL.new([1, 2, 3], [4, 5, 6])» | ||
TimToady | I guess ** does automatically make a LoL | ||
Mouq | Oh! I thought it was NYI | ||
TimToady | no, we've actually had that part for a long time :D | ||
psch | the other ** is NYI though | ||
TimToady | right, HyperWhatever | 01:32 | |
and prefix:<||>, to interplate at the dimensional level rather than the list level | |||
Mouq | Hm, how would you use that in a closure? | ||
psch | TimToady: i think the spec example i mentioned above wants to be .lol then? seeing as it's supposed to act on $/, which should be the topic in the if | ||
Mouq | psch: Might be a typo or artifact | 01:33 | |
01:33
FROGGS left
|
|||
psch | m: say (******)([1,2,3],[1,2,3]) | 01:33 | |
camelia | rakudo-moar f4ed49: OUTPUT«===SORRY!=== Error while compiling /tmp/OASF04oczFHyperWhatever (**) not yet implemented. Sorry. at /tmp/OASF04oczF:1------> say (**⏏****)([1,2,3],[1,2,3])» | ||
01:33
Sqirrel left
|
|||
psch | somewhat like that, i think | 01:33 | |
BenGoldberg | std: say (******)([1,2,3],[1,2,3]) | 01:34 | |
camelia | std 81e0d07: OUTPUT«ok 00:01 129m» | ||
Mouq | m: say (1,2,{@_.&sum}...*)[^5] | ||
camelia | rakudo-moar f4ed49: OUTPUT«===SORRY!=== Error while compiling /tmp/hmyCV5USHaUndeclared routine: &sum used at line 1» | ||
TimToady | m: say [Z+] (1,2,3),(4,5,6),(7,8,9); | ||
camelia | rakudo-moar f4ed49: OUTPUT«12 15 18» | ||
TimToady | there's a hidden ** | ||
but you'll notice that the lists are not separated by ; there | 01:35 | ||
Mouq | m: say (1,2,{@_.join.Int}...*)[^5] | ||
camelia | rakudo-moar f4ed49: OUTPUT«1 2 12 1212 12121212» | ||
Mouq | m: say (1,2,**.join.Int...*)[^5] # Is this right? | 01:36 | |
camelia | rakudo-moar f4ed49: OUTPUT«===SORRY!=== Error while compiling /tmp/I9LNI4s4nmHyperWhatever (**) not yet implemented. Sorry. at /tmp/I9LNI4s4nm:1------> say (1,2,**⏏.join.Int...*)[^5] # Is this right?» | ||
Mouq | (On my part, not rakudo's) | ||
TimToady | well, if 1 and 2 were both lists, it might make more sense | 01:37 | |
01:37
obra left
|
|||
Mouq | Right... | 01:37 | |
I just have trouble wrapping my head around some of this stuff | |||
psch | m: class A { method Str() { "foo" }; method list() { <a b c> } }; my $a = A.new; .say for $a | 01:38 | |
camelia | rakudo-moar f4ed49: OUTPUT«A.new()» | ||
psch | that's even differenter than i expected | ||
Mouq | Is there a use case for a currying HyperWhatever? | 01:39 | |
TimToady | beats me | ||
psch | i came across the combination of .Str() and .list() with m:g// and wondered which it should be in e.g. for | ||
Mouq | m: class A { method Str() { "foo" }; method list() { <a b c> } }; my $a = A.new; .print for $a | ||
camelia | rakudo-moar f4ed49: OUTPUT«foo» | ||
Mouq | m: class A { method Str() { "foo" }; method list() { <a b c> } }; my $a = A.new; .say for @$a | ||
camelia | rakudo-moar f4ed49: OUTPUT«abc» | ||
psch | Mouq++: thanks | 01:40 | |
TimToady: should $/ after a m:g// prefer .list over .Str? | |||
in a for, as in Mouq's two examples | 01:41 | ||
01:41
chenryn left
|
|||
TimToady | that's an excellent question, except that $/ is an item, so maybe it's more like @/ | 01:41 | |
psch | the actual case i'm worrying about is 'for m:g/./ { ... }' | 01:42 | |
which, as i have it, gives the whole match once | |||
TimToady | m: class A { method Str() { "foo" }; method list() { <a b c> } }; my \a = A.new; .say for a | ||
camelia | rakudo-moar f4ed49: OUTPUT«A.new()» | ||
TimToady | m: class A { method Str() { "foo" }; method list() { <a b c> } }; my \a = A.new; .say for a, | ||
camelia | rakudo-moar f4ed49: OUTPUT«A.new()» | ||
TimToady | m: class A { method Str() { "foo" }; method list() { <a b c> } }; my \a = A.new; .say for a,a | ||
camelia | rakudo-moar f4ed49: OUTPUT«A.new()A.new()» | ||
PerlJam | psch: That's a "say what you mean" situation to me. i.e. you need to say .list if that's what you mean. | ||
01:42
rindolf left
|
|||
TimToady | for something that isn't an item, it sure keeps acting like an item :) | 01:43 | |
01:43
chenryn joined
|
|||
Mouq | m: class A { method Str() { "foo" }; method list() { <a b c> } }; my @a := A.new; .say for @a | 01:43 | |
camelia | rakudo-moar f4ed49: OUTPUT«Type check failed in binding; expected 'Positional' but got 'A' in any bind_error at src/vm/moar/Perl6/Ops.nqp:221 in block at /tmp/mT47VeaoYx:1» | ||
TimToady | m: class A { method Str() { "foo" }; method list() { <a b c> } }; my \a = A.new; say list(a).WHAT | ||
camelia | rakudo-moar f4ed49: OUTPUT«(List)» | ||
TimToady | arguably, things in a list context should prefer a .list interpretation | 01:44 | |
m: class A { method Str() { "foo" }; method list() { <a b c> } }; my \a = A.new; say a.list.WHAT | |||
camelia | rakudo-moar f4ed49: OUTPUT«(Parcel)» | ||
psch | PerlJam: that's the assumption i was operating under, and how the branch works currently. still, i'm not really happy with it | ||
dalek | kudo/nom: f9f7464 | Mouq++ | src/core/LoL.pm: Add &lol |
||
Mouq | One of my more complicated commits | 01:45 | |
TimToady | you're getting cynical in your old age :) | ||
01:45
klapperl_ joined
|
|||
psch | fwiw, github.com/perl6/roast/compare/mat..._quote_ops are the spectest changes to get those tests to pass for github.com/peschwa/rakudo/tree/rt82108 | 01:45 | |
Mouq | TimToady, how's they eye btw? | 01:46 | |
TimToady | the bubble keeps getting smaller | ||
still somewhat inflamed as long as I'm reabsorbing stitches, but it doesn't seem to be sending too many leucocytes in the direction of my cornea graft | 01:47 | ||
Mouq | Glad to hear it's improving though! :) | ||
psch | PerlJam: the break-neck case is just 'for m:g/$pat/ { }' and 'for s:g/$pat/$rep/ { }', where .list or @(...) don't really seem idiomatic | ||
Mouq | psch++ | ||
TimToady | yeah, likewise when you return something from a @a[1][2] and have to add a .list or [] on the end to get it to work | 01:48 | |
01:48
klapperl left
|
|||
PerlJam | aye, I guess that's true. Perhaps I've gotten too used to saying @() or .list :) | 01:49 | |
TimToady | it's like, we don't really want to have a .list method that returns a Parcel, but a Match is a kind of Parcel, or Capture, or some such | ||
or contrariwise, things in list context should automatically have .list called on 'em at some point | 01:50 | ||
TimToady thinks we're confusing two different things under .list currently | |||
PerlJam | TimToady: how so? | 01:51 | |
TimToady | all these different list contexts turned into mere methods, and that's part of why we need a list refactor, so that we can negotiate up and down a list whether it's eager, hyper, sunk, etc | ||
PerlJam | Hmm. That rings true. | 01:52 | |
TimToady | and the whole point of having Parcels returned was to let it decide later whether it was in list or item context later | 01:53 | |
but we're using .list both to indicate context and to return a Parcel, so it doesn't work right | |||
once we actually have parcels, it works out fine: | |||
m: say [Z+] (1,2,3),(4,5,6),(7,8,9); | 01:54 | ||
camelia | rakudo-moar f4ed49: OUTPUT«12 15 18» | ||
TimToady | those Parcels can wait until they get into [Z+] to decide whether to flatten or lol | ||
but the ideal of return a Parcel to be used within a list seems to have come on hard times | 01:55 | ||
*returning | |||
01:55
psch left
|
|||
TimToady | I've kinda been putting off thinking about this till we do the list refactor, but now that pmichaud++ is availabler, and I've been getting ichier about list efficiency, it's probably time to work that out better | 01:56 | |
PerlJam | n: say [Z+] (1,2,3),(4,5,6),(7,8,9); # curious | ||
camelia | niecza v24-109-g48a8de3: OUTPUT«45» | ||
01:57
psch joined
|
|||
TimToady | it takes special magic to get that to work, which I hacked into rakudo several months ago, but not into niecza | 01:57 | |
dalek | kudo/S26-WHY: 9843893 | (Rob Hoelz)++ | src/Perl6/ (2 files): Implement docs for subset types |
01:58 | |
kudo/S26-WHY: 12bbede | (Rob Hoelz)++ | src/Perl6/Grammar.nqp: Fix our Mu check nqp::isnull(Mu)? That's not true! THAT'S IMPOSSIBLE |
|||
Mouq | (TimToady++) | 01:59 | |
psch | i guess that means that for m:g// isn't really a Match issue, but a list context issue | ||
Mouq is entertained that we can get ** to autocurry just by making HyperWhatever is Whatever | |||
m: class Whyever is Whatever { }; say Whyever.perl | 02:00 | ||
camelia | rakudo-moar f4ed49: OUTPUT«WhateverCode.new()» | ||
dalek | ast/S26-WHY: 0b9fb38 | (Rob Hoelz)++ | S26-documentation/why- (3 files): Test docs on subset types |
||
ast/S26-WHY: bf5de42 | (Rob Hoelz)++ | S26-TODO.md: Check off subset types from the list |
|||
ast/S26-WHY: 0639ccf | (Rob Hoelz)++ | S26-TODO.md: Document weirdness |
|||
TimToady | psch: it might also mean that Match is Parcel, or that the both share a role | 02:01 | |
02:02
nbrown joined
|
|||
PerlJam | hoelzro++ that todo is almost todone it seems :) | 02:04 | |
hoelzro | it's close! | ||
there are a few bugs | |||
but I can start working on them after the matrix is full | |||
02:06
nbrown left
|
|||
Mouq | TimToady: @a[**] should basically completely flatten the array, right? | 02:09 | |
TimToady | I don't think of it that way | ||
I think of it as meaning @a[*;*;*;*...] however many * you need | |||
02:10
kurahaupo_ left
|
|||
TimToady | whereas @a[*] only gives you top dimension | 02:10 | |
psch | TimToady: maybe "should i start trying to make it work or wait for the list refactor" is the better utterance | 02:11 | |
as in, aside from the behavior of m:g// in a for i don't have anything that's not to-spec for my branch, but that's a pretty big "aside" | |||
(also, landline is having trouble and my mobile is droppy, sorry for delays and rejoins) | |||
TimToady | no problem, I'm interleaving dinner prep :) | ||
psch: if it requires a .list currently, we may well be able to relax that later, if things work out | 02:13 | ||
Mouq | But that's the effect, isn't it? Unless we want @a[**;0] to grab the first element of the last dimension... | ||
*elements | 02:14 | ||
TimToady | but we need to rethink how lists policies are distributed | ||
the thinking was that ** in a subscript could represent an arbitrary number of * in a row, potentially with normal dimensions on either or both ends | |||
that probably can't work unless you know the actual shape | 02:15 | ||
otherwise you don't know the boundary to stop at | |||
Mouq | We can try guessing :P but that's probably not wise in the long run | 02:16 | |
TimToady | I'd think that @a[**] would return the dimensional info as parcels, and then it's someone else's decision whether to flatten | 02:17 | |
there's always @a.flat if you need it :) | |||
psch | oh, i just noticed one other thing that was a bit wonky with my changes. RT #121789, where github.com/perl6/roast/commit/500a...70c84d8416 has my thoughts on it | ||
synopsebot | Link: rt.perl.org/rt3//Public/Bug/Displa...?id=121789 | ||
psch | those should maybe also go into the ticket | ||
Mouq | m: my @a = [ [1,2,3], [4,5,6] ], [ [7,8,9], [10,11,12] ]; say @a[*;*;*].perl | 02:19 | |
camelia | rakudo-moar f4ed49: OUTPUT«(((1, 2, 3),), ((4, 5, 6),), ((7, 8, 9),), ((10, 11, 12),)).list» | ||
Mouq | TimToady: Something like that ^ then? | ||
TimToady | er, yeah :) | 02:20 | |
hope you don't have much trouble implementing that, oh wait | |||
Mouq | LoL | ||
TimToady | though in the absence of shape, you'd have to guess from structure that [**] means [*;*;*] | 02:21 | |
m: my @a = [ [1,2,3], [4,5,6] ], [ [7,8,9], [10,11,12] ]; say @a[*;*;*].tree.perl | 02:22 | ||
camelia | rakudo-moar f4ed49: OUTPUT«([1, 2, 3], [4, 5, 6], [7, 8, 9], [10, 11, 12]).list» | ||
02:22
iarna left
|
|||
TimToady | as you see, .tree is only defaulting to lol semantics at the moment | 02:22 | |
spec says it should default to all levels, not first level | 02:23 | ||
in fact, it's very difficult to emulate that behavior in the absence of recursive .tree | 02:24 | ||
which may be why .tree hasn't done it yet :) | 02:26 | ||
but really, when you think about it, .tree is standing in for another one of those list negotiators that really wants to tell the originating code how to produce it, rather than actually going through the () intermediate form, at least on the optimizer level | 02:28 | ||
02:29
iarna joined
|
|||
TimToady | it's almost like these are pseudomethods that are trying to shove adverbs back upstream to pick a different algo | 02:32 | |
or wrapping different line disciplines or layers around a handle | 02:33 | ||
but we have to do it lazily depending on eventual bound context, so it's worse than just treating the contextualizers as fancy macros, because macros would pass adverbs at compile time, which is too early | 02:35 | ||
02:36
iarna left
|
|||
TimToady | we also want to be able to distribute list policy over multiple list items, with optional recursion (a là .tree) | 02:36 | |
*à la | 02:38 | ||
worse, you might have a contextualizer that depends on yet another contextualizer downstream lazily, so the the negotiation may include multiple hops | 02:40 | ||
02:41
prevost left,
iarna joined
|
|||
TimToady | a lazy inside an eager is probably going to want to promote to eager, unless you're depending on side effects happening in a particular order | 02:43 | |
but a lazy inside a sink (think 'for' loops) is almost certainly evaluating the lazy for its side effects, and you might want to 'last' out before getting all those side effects | 02:45 | ||
02:45
thou joined
|
|||
TimToady | so all we really need to do is solve the halting problem for the loop :) | 02:46 | |
02:49
thou left
02:50
Sqirrel joined
|
|||
Mouq | Can we ()[^5]:eager? | 02:51 | |
02:51
noganex_ joined
|
|||
TimToady | syntactically, sure | 02:52 | |
Mouq | :P | ||
TimToady | but that's not gonna be lazy | ||
02:53
kurahaupo joined
|
|||
TimToady | you'd (perhaps) like 'lazy ()[^5]' to behave differently from 'eager ()[^5]', where those contexts might not be determinable statically | 02:53 | |
if it is determinable, you just put the particular output function, but if not, you return a meta-function that you talk to that gives you the appropriate output function to call | 02:54 | ||
02:54
noganex left
|
|||
TimToady | it's all higher-order functions in the abstract, but those are hard to optimize before you know how they're boudn | 02:54 | |
we want to avoid list functions remaking the same decisions each time they're called; that needs to come out into the meta-function, and the actual functions we eventually use to process a list can be simple | 02:56 | ||
we started to get there with .gimme but it's view of iterators is just not quite abstract enough | 02:57 | ||
these meta-functions might almost behave like junctions that leap outside the Any domain into the conceptual domain of Mu, then rewire the program for you | 02:58 | ||
only they'd do it for list args rather than items | |||
that's kinda why we have Mu outside of Any, to allow more conceptual types like junctions, but so far all we've used it for is junctions | 02:59 | ||
but as you might imagine, this is not a small refactor | 03:00 | ||
03:00
AforAcronym joined
|
|||
TimToady | but given the Mu space, we can probably prototype it there and migrate list processing piecemeal | 03:00 | |
gotta think more about this though... | |||
it's quite possible that this will make static analysis harder, but provide simpler semantics for the inliner and jitter | 03:01 | ||
03:02
Akagi201 left
03:03
nbrown joined
|
|||
psch | i don't have the brains anymore to add my thoughts to the ticket linked above; sleep it is o/ | 03:05 | |
TimToady | o/ | ||
03:05
psch left
03:07
nbrown left
03:13
lxmahyar joined
|
|||
Mouq is trying to make sense of S02:1281 | 03:16 | ||
synopsebot Link: perlcabal.org/syn/S02.html#line_1281 | |||
03:17
lxmahyar left
|
|||
TimToady doesn't think we necessarily have to implement multidimensional ranges for ^** if ** means the same thing | 03:19 | ||
^** is a bit out there | 03:20 | ||
it's sort of a ||( ^* xx *) | |||
might eventually be a useful idea, but might well not | 03:21 | ||
in any case, ** is already a multidimensional whatever, so maybe we don't need to generate multidim ranges | |||
Mouq | Still, I'm not sure "@array[{ map { ^* }, @_ }]" makes sense. It doesn't to me, anyway | 03:22 | |
03:22
dayangkun left
|
|||
TimToady | especially since @a[**]:keys would give us something similar | 03:22 | |
I think it's probably confusing autopriming with Inf there | |||
Mouq | m: my @a = [ [1,2,3], [4,5,6] ], [ [7,8,9], [10,11,12] ]; say (@a[*;*;*]:keys).perl | 03:23 | |
camelia | rakudo-moar f9f746: OUTPUT«Unexpected named parameter 'keys' passed in sub postcircumfix:<[ ]> at src/gen/m-CORE.setting:2507 in sub postcircumfix:<[ ]> at src/gen/m-CORE.setting:2663 in sub postcircumfix:<[ ]> at src/gen/m-CORE.setting:2663 in sub postcircumfix:<[ ]…» | ||
TimToady | m: say (^*).WHAT | ||
camelia | rakudo-moar f9f746: OUTPUT«(WhateverCode)» | ||
TimToady | well, I guess it autoprimes | ||
Mouq | m: my @a = [ [1,2,3], [4,5,6] ], [ [7,8,9], [10,11,12] ]; say (@a[*;*;*]:kv).perl | ||
camelia | rakudo-moar f9f746: OUTPUT«Cannot call 'Real'; none of these signatures match::(Mu:U \v: *%_) in sub infix:<<> at src/gen/m-CORE.setting:4286 in method exists_pos at src/gen/m-CORE.setting:8127 in block at src/gen/m-CORE.setting:2356 in sub SLICE_MORE at src/gen/…» | ||
TimToady | since excluding Inf from 0..Inf is not terribly meaningful | ||
so maybe it does make sense(ish) | |||
presumably each key from the :kv has to be multidimensional [0,0,0] => 1, [0,0,1] => 2, etc | 03:25 | ||
presumably in the same parcel structure the values woulda come out | 03:26 | ||
03:26
xenoterracide joined
|
|||
TimToady | well, $(0,0,0) => 1 mabye | 03:26 | |
03:27
chenryn left
|
|||
TimToady | or even just (0,0,0) => 1 | 03:27 | |
the pair kindof itemized its own self without help | |||
m: say ((0,0,0) => 1).perl | 03:28 | ||
camelia | rakudo-moar f9f746: OUTPUT«$(0, 0, 0) => 1» | ||
TimToady | yeah | ||
03:28
chenryn joined
|
|||
TimToady | arguably it should be syntactically an item, but just use \ semantics on the key and value | 03:28 | |
Mouq | m: my @a = [ [1,2,3], [4,5,6] ], [ [7,8,9], [10,11,12] ]; say (@a[*;*;*]:delete).perl | 03:29 | |
camelia | rakudo-moar f9f746: OUTPUT«Cannot call 'Real'; none of these signatures match::(Mu:U \v: *%_) in sub infix:<<> at src/gen/m-CORE.setting:4286 in method delete_pos at src/gen/m-CORE.setting:8851 in block at src/gen/m-CORE.setting:2207 in sub SLICE_MORE at src/gen/…» | ||
Mouq | Huh | ||
TimToady | that...might require a different visitation order... | 03:30 | |
Mouq | m: my @a = [ [1,2,3], [4,5,6] ], [ [7,8,9], [10,11,12] ]; say (@a[*;*;1]:delete).perl | ||
camelia | rakudo-moar f9f746: OUTPUT«((2,), (5,), (8,), (11,)).list» | ||
Mouq | m: my @a = [ [1,2,3], [4,5,6] ], [ [7,8,9], [10,11,12] ]; say (@a[*;*;1]:delete).perl; say @a.perl | ||
camelia | rakudo-moar f9f746: OUTPUT«((2,), (5,), (8,), (11,)).listArray.new([[1, Any, 3], [4, Any, 6]], [[7, Any, 9], [10, Any, 12]])» | ||
TimToady | just can't wildcard the last dim, I guess | 03:31 | |
Mouq | m: my @a = [ [1,2,3], [4,5,6] ], [ [7,8,9], [10,11,12] ]; say (@a[*;*;1]:kv).perl; say @a.perl | 03:32 | |
camelia | rakudo-moar f9f746: OUTPUT«(((1, 2),), ((1, 5),), ((1, 8),), ((1, 11),)).listArray.new([[1, 2, 3], [4, 5, 6]], [[7, 8, 9], [10, 11, 12]])» | ||
Mouq | m: my @a = [ [1,2,3], [4,5,6] ], [ [7,8,9], [10,11,12] ]; say (@a[*;*;1]:pairs).perl; | ||
camelia | rakudo-moar f9f746: OUTPUT«Unexpected named parameter 'pairs' passed in sub postcircumfix:<[ ]> at src/gen/m-CORE.setting:2507 in sub postcircumfix:<[ ]> at src/gen/m-CORE.setting:2663 in sub postcircumfix:<[ ]> at src/gen/m-CORE.setting:2663 in sub postcircumfix:<[ …» | ||
Mouq | m: my @a = [ [1,2,3], [4,5,6] ], [ [7,8,9], [10,11,12] ]; say (@a[*;*;1]:p).perl; | ||
camelia | rakudo-moar f9f746: OUTPUT«((1 => 2,), (1 => 5,), (1 => 8,), (1 => 11,)).list» | ||
Mouq will stop spamming | |||
03:32
rurban1 joined
|
|||
TimToady | is it distributing :kv etc to the subarrays? | 03:32 | |
Mouq | Yes | 03:33 | |
TimToady | I wouldn't want that for shaped arrays, but maybe it makes more sense for ad hoc | ||
for shaped arrays, (0,0,0) is the real key, and there's no key to the subarrays that is meaningful | 03:34 | ||
however, if you flatten a distributed :kv it's not going to make much sense, since it loses the key context | |||
so I'm not sure it makes much sense there either | |||
03:35
dayangkun joined
|
|||
TimToady | you could still get that behavior wish something like a deepmap | 03:35 | |
if you wanted it | |||
but I suspect multidim subscripts should return multidim keys | |||
whether shaped or not | 03:36 | ||
someting you could bind to -> $x, $y, $z and get back to the original element | |||
dunno how hard that is given your current setup | 03:37 | ||
@line[*-6] ~~ s/wish/with/ | 03:38 | ||
Mouq | I think it'll be easier than getting @a[**] to work right | 03:40 | |
TimToady | well, arguably the key should be (0;0;0) in case they turn into slices :D | ||
'course, that syntax is taken... | 03:41 | ||
Not only are there not enough brackets in ASCII, there are not enough semicolons... | 03:42 | ||
Mouq | It's still written that (@a;@b;@c) is a LoL in spec, I just didn't implement it for fear of breaking code | ||
:P | |||
TimToady | yeah, that's fossilic | 03:43 | |
fossilacious? | |||
fossilly, even | |||
sjohnson | hey timtoday, how're things? | ||
oops, timtoady* | 03:44 | ||
TimToady | I been worse | ||
barely | |||
been a while | |||
sjohnson | Timothy Toadstool | ||
TimToady | never met 'im | 03:45 | |
sjohnson | "could be better, could be worse" is a good way to be. | ||
TimToady | well, bad eye chose to get badder last month, but we're on the mend, for the most part | ||
sjohnson | hmm, i might have to backlog. | 03:46 | |
wasn't aware of any eye problems. | |||
TimToady | it remains to be seen whether I'll be able to give people the stinkeye better with my good eye or my bad eye :) | ||
yeah, search the logs for 'detachment' | 03:47 | ||
or 'retina' | |||
or 'bubble' :) | |||
or heck, just read everything I wrote for the last five years :) | 03:48 | ||
PerlJam | .oO( bubble, bubble, toil and trouble ) |
||
Mouq | m: my %h = :a, :b, :c; given %h { when :q { die ":(" }; when :a { say ":)" }} | 03:50 | |
camelia | rakudo-moar f9f746: OUTPUT«:( in block at /tmp/eCDU0dY62D:1» | ||
03:51
chenryn left
03:55
chenryn joined
03:57
chenryn left
04:00
chenryn joined,
davido__ left
04:02
kaare_ joined,
davido__ joined
04:04
nbrown joined
04:06
BenGoldberg left
04:08
nbrown left
|
|||
TimToady | hmm, unfortunately, :q returns True, which is always True | 04:16 | |
04:17
thou joined
04:22
[Sno] left
04:30
xinming left
04:31
xinming joined,
thou left
04:32
kaare_ left,
ren1us left
04:33
ventica2 left
04:40
molaf_ left
04:41
rindolf joined
|
|||
Mouq manages to reduce Stage Parse to Inf | 04:41 | ||
m: my %h = :a, :b, :c; given %h { when :q{so $_} { die ":(" }; when :a{so $_} { say ":)" }} | 04:42 | ||
camelia | rakudo-moar f9f746: OUTPUT«:)» | ||
Mouq | :P | ||
04:47
ventica2 joined
04:50
chenryn left
04:58
kaare_ joined
05:04
nbrown joined
05:09
nbrown left
|
|||
moritz | \o | 05:13 | |
05:13
psch joined
05:19
rurban1 left
05:27
xenoterracide left
05:40
[Sno] joined
|
|||
Mouq has spent close to 60x more time debugging this than he did writing it :( | 05:49 | ||
05:50
kurahaupo left
06:03
anaeem1 joined
06:05
nbrown joined
06:06
thou joined
06:10
nbrown left,
denis_boyun_ joined
06:11
thou left
06:32
xenoterracide joined
06:49
anaeem1__ joined
06:51
xenoterracide left
06:52
anaeem1 left
07:00
dmol joined
07:06
nbrown joined
07:09
dayangkun left
07:10
nbrown left
07:11
dayangkun joined
07:14
Alula_ left
07:15
Alula_ joined
07:21
brrt joined
07:30
PotatoGim left
|
|||
dalek | kudo/nom: 02277af | Mouq++ | src/core/ (3 files): Have [;] and {;} return LoL-y indices for :{p,k,kv} |
07:32 | |
07:33
klaas-janstol joined
|
|||
Mouq | Oh, wtf, that's not the code I wanted to push | 07:33 | |
Now I have to try to remake what I want, debug it, because everything inexplicably buildfails or is extremely touchy, and test that it doesn't regress. Lucky this is not a highly used feature yet | 07:38 | ||
07:41
klaas-janstol left
|
|||
Mouq | i don't even know what the issue is, moar keeps segfaulting in stage parse if I hand it some valid setting code that it doesn't like :/ | 07:43 | |
07:46
klaas-janstol joined
07:47
Akagi201 joined
07:49
donaldh joined,
donaldh left
07:55
thou joined
07:56
FROGGS[mobile] joined
07:59
thou left
|
|||
FROGGS[mobile] | rurban: at at the time you said that parrot's threading was better than moar's moar had no threading support | 08:02 | |
rurban: so it was just rediculous to say that | |||
08:03
klaas-janstol left
|
|||
FROGGS[mobile] | rurban: and parrot's developement took a quite long pause, and until this year's gsoc I thought it was stalled | 08:04 | |
rurban: and non-blocking threading is nice but does not help much when the lexpad slows down everything | 08:05 | ||
dalek | kudo/nom: 39f7354 | Mouq++ | src/core/ (2 files): Bugfixes to the last commit |
08:07 | |
08:07
nbrown joined
|
|||
Mouq | Only took 4 hours /o\ | 08:08 | |
moritz | Mouq: I know that feeling very well | 08:10 | |
Mouq++ # for doing it anyway | |||
FROGGS[mobile] | Has this something todo with a build fail I've seen about 10 hours ago? | ||
08:11
dmol left
08:13
nbrown left
|
|||
Mouq | FROGGS[mobile]: My latest commit was to fix my own commit from 40 minutes ago | 08:13 | |
FROGGS[mobile] | ahh, okay :o) | ||
08:15
darutoko joined
|
|||
Mouq | m: 1[3]:kv # this was one thing that caused me a lot of pain; i didn't realize it wasn't (directly) my fault | 08:15 | |
camelia | rakudo-moar f9f746: OUTPUT«Invocant requires a type object, but an object instance was passed in method exists_pos at src/gen/m-CORE.setting:1491 in block at src/gen/m-CORE.setting:2139 in sub postcircumfix:<[ ]> at src/gen/m-CORE.setting:2493 in block at /tmp/RPmX…» | ||
08:16
dayangkun left
08:22
dayangkun joined
|
|||
Mouq | m: 1[3]:exists | 08:24 | |
camelia | rakudo-moar f9f746: OUTPUT«Invocant requires a type object, but an object instance was passed in method exists_pos at src/gen/m-CORE.setting:1491 in block at src/gen/m-CORE.setting:2106 in sub postcircumfix:<[ ]> at src/gen/m-CORE.setting:2490 in block at /tmp/N5V6…» | ||
dalek | kudo/nom: 976f5c4 | Mouq++ | src/core/Any.pm: Fix 1[1]:exists and 1<foo>:exists |
08:26 | |
Mouq | However... This begs the question of why we only return a value for :kv, :k, or :p if the element exists | 08:34 | |
m: my @a = 2,3,4; my ($k, $v) := @a[1]:kv; $v = 5 | 08:35 | ||
camelia | rakudo-moar f9f746: OUTPUT«Cannot assign to a readonly variable or a value in block at /tmp/0EdAUI3bhx:1» | ||
Mouq | m: my @a = 2,3,4; say @a[3]:kv; | ||
camelia | rakudo-moar f9f746: OUTPUT«» | ||
Mouq | I'd expect 3 => Any, but maybe my expectations are wrong here | 08:36 | |
ChoHag | Why doesn't this work? | 08:40 | |
grammar Lines { rule TOP { ^ <line>+ $ }; rule line { ^^ <( \N* )> $$ } } | |||
08:41
Ven joined
|
|||
FROGGS_ | m: grammar Lines { rule TOP { ^ <line>+ $ }; rule line { ^^ <( \N* )> $$ } }; say Lines.subparse("a\n\b\n") | 08:41 | |
camelia | rakudo-moar 39f735: OUTPUT«#<failed match>» | ||
FROGGS_ | m: grammar Lines { rule TOP { ^ <line>+ % \n $ }; rule line { ^^ <( \N* )> $$ } }; say Lines.subparse("a\n\b\n") | ||
camelia | rakudo-moar 39f735: OUTPUT«#<failed match>» | ||
FROGGS_ | m: grammar Lines { rule TOP { ^ <line>+ % \n $ }; rule line { \N* } }; say Lines.subparse("a\n\b\n") | ||
camelia | rakudo-moar 39f735: OUTPUT«#<failed match>» | ||
Mouq | s/rule/token/? | 08:42 | |
It's eating the \n's before you can match them | 08:43 | ||
FROGGS_ | m: grammar Lines { rule TOP { ^ <line>+ % \n $ }; token line { ^^ <( \N* )> $$ } }; say Lines.subparse("a\nb\n") | ||
camelia | rakudo-moar 39f735: OUTPUT«「ab」 line => 「a」 line => 「b」» | ||
Ven | o/ | ||
FROGGS_ | and I also did \b sadly :o) | ||
Mouq | m: "\b".perl.say | 08:44 | |
camelia | rakudo-moar 39f735: OUTPUT«"\b"» | ||
Mouq | informative | ||
Also \o Ven! | 08:45 | ||
Ven | isn't it <|b> in perl6 ? | ||
the word boundary one, that is. | |||
Mouq | Ven: He wrote "a\n\b\n" :) | 08:46 | |
Ven | fair enough :o) | ||
Ven has been reading and re-reading s05 | |||
Mouq | Ven: I think so, though | ||
Mouq tends to use « and » more often when a boundary is needed | 08:47 | ||
masak | good antenoon, #perl6 | 08:49 | |
m: my $r = /foo<\w>/; say so "foo" ~~ $r; say so "foobar" ~~ $r | 08:50 | ||
camelia | rakudo-moar 39f735: OUTPUT«===SORRY!===Unrecognized regex metacharacter < (must be quoted to match literally)at /tmp/X1pxv7FMEx:1------> my $r = /foo<⏏\w>/; say so "foo" ~~ $r; say so "foobarUnable to parse regex; couldn't find fina…» | ||
masak | m: my $r = /foo<|w>/; say so "foo" ~~ $r; say so "foobar" ~~ $r | ||
camelia | rakudo-moar 39f735: OUTPUT«TrueFalse» | ||
masak | Ven: <|w>, not <|b> -- to parallel \w | ||
Ven | ah, alrighty. | 08:51 | |
guess I still havn't read it enough times :o) | |||
moritz | m: say so m/foo<.wb>/ for <foo foobar> | 08:52 | |
camelia | rakudo-moar 39f735: OUTPUT«TrueFalse» | ||
Mouq | So **+1 means {@_.map(*+1)}. What does **+** mean? | 08:57 | |
dalek | kudo/HyperWat: 412920f | Mouq++ | src/ (5 files): Add HyperWhatever, move NYIs |
09:00 | |
kudo/HyperWat: fbae5fd | Mouq++ | src/core/ (4 files): Merge branch 'nom' into HyperWat |
|||
Mouq | (so others can stare at the code and wonder what it's supposed to do, too ;) | ||
09:05
donaldh joined
09:09
nbrown joined
|
|||
Mouq | hoelzro++ for continuing to work on #| and #= | 09:11 | |
09:12
spider-mario joined,
pmurias joined
09:13
nbrown left
09:14
PotatoGim joined
|
|||
PotatoGim | Hi | 09:15 | |
Mouq | Hiya | ||
:) | |||
perlcabal.org/syn/S13.html#Type_Casting needs to be fixed to represet the method -> sub change | 09:17 | ||
And mention at_pos, exists_pos, and delete_pos | 09:18 | ||
m: say Any.^methods.grep(*.name ~~ /pos/) # that's all of them, right? | 09:19 | ||
camelia | rakudo-moar 39f735: OUTPUT«» | ||
Mouq | m: say Any.^methods.grep({.name ~~ /pos/}) # that's all of them, right? | ||
camelia | rakudo-moar 39f735: OUTPUT«exists_pos delete_pos at_pos assign_pos» | ||
moritz | bind_pos maybe? | 09:20 | |
m: say Array.^methods(:all).grep({.name ~~ /pos/}) | 09:21 | ||
camelia | rakudo-moar 39f735: OUTPUT«bind_pos delete_pos at_pos assign_pos exists_pos at_pos exists_pos delete_pos at_pos assign_pos» | ||
moritz | m: say Array.^methods(:all).map(*.name).grep(/pos/).uniq | ||
camelia | rakudo-moar 39f735: OUTPUT«bind_pos delete_pos at_pos assign_pos exists_pos» | ||
Ven | m: <foo bar baroo>.grep(/oo/) | 09:25 | |
camelia | ( no output ) | ||
Ven | m: <foo bar baroo>.grep(/oo/).say # ENOSAY. | ||
camelia | rakudo-moar 39f735: OUTPUT«foo baroo» | ||
Ven | oh, moritz++ was faster, eh. | 09:26 | |
spider-mario | m: macro hello($name) {quasi { say "Hello { {{{$name}}} } !"; };} | 09:34 | |
camelia | rakudo-moar 39f735: OUTPUT«===SORRY!===Unknown QAST node type QAST::Unquote» | ||
spider-mario | I think it used to work, a while back | ||
09:34
cognome left
|
|||
Mouq | star: macro hello($name) {quasi { say "Hello { {{{$name}}} } !"; };} | 09:36 | |
camelia | star-{m,p} 2014.04: OUTPUT«===SORRY!===Error while compiling op call: Unknown QAST node type QAST::Unquote» | ||
Mouq | spider-mario: I've come across it a bunch with macros, I'm not sure what the issue is :( | 09:37 | |
spider-mario | :/ | 09:38 | |
09:38
dmol joined
09:43
thou joined
|
|||
Ven | maybe masak knows | 09:47 | |
09:47
thou left
|
|||
Mouq | I poked him and he made a bug report about it | 09:48 | |
So he may or may not :) | |||
09:49
dmol left
|
|||
Ven | .o( masak only knows if masak knows ) | 09:49 | |
Mouq | method postcircumfix:<( )> -> method invoke was really easy, just a few spectest fails that still use method postcircumfix:<( )> | 09:50 | |
09:51
dmol joined
|
|||
Mouq | We should probably emit a warning upon parsing a method postcircumfix:<*> | 09:51 | |
09:52
brrt left,
dmol left
09:53
Ven left,
dmol joined
|
|||
dalek | kudo/nom: d7808f5 | Mouq++ | src/ (5 files): method postcircumfix:<( )> becomes method invoke per irclog.perlgeek.de/perl6/2014-07-08#i_8992020 |
09:57 | |
jnthn | Mouq: We probably coulda done with a deprecation cycle there. That patch will almost certainly have to be backed out, because it's being landed less than a week to a release and will totally bust multiple modules in the ecosystem. | 10:02 | |
Mouq | O_O oh | ||
kay | |||
jnthn | NativeCall being one of them | ||
That one I can update in time | |||
But I suspect there will be wider fallout. | |||
10:02
klaas-janstol joined
|
|||
jnthn | I think still supporting postcircumfix:<( )> if there's no invoke should be possible. | 10:03 | |
And then we can put in some kind of deprecation notice if you do use one. | |||
(There's already a system for doing that). | 10:04 | ||
Mouq | jnthn: I'll try to make it fall back to postcircumfix:<( )>, there's only 2 or 3 places that call it | 10:05 | |
jnthn | The other thing is that I think the spec doesn't want us to pass a Capture, but rather just the args directly. | ||
So we might want to break that while we're also breaking this :) | |||
10:06
dmol left
10:07
dmol joined
|
|||
jnthn | Anyway, yeah, looking at the patch, there's just 2 places that'll need the fallback thing. | 10:07 | |
10:08
dmol left
|
|||
jnthn | (And updating the spectests to the new thing is sensible too, of course.) | 10:09 | |
10:09
dmol joined
|
|||
timotimo | i'm looking forward to actually understanding what hyperwhatever actually does when it's implemented %) | 10:10 | |
jnthn | Same :D | ||
Happy to see Mouq++ taking on the multi-dim stuff :) | |||
10:10
nbrown joined
|
|||
timotimo | me, too | 10:10 | |
and when we have native/packed multi-dim arrays that have access to them speshed (and jitted!), we'll be unstoppable! | 10:11 | ||
jnthn | Yeah, much better native stuff is on my roadmap for autumn :) | ||
dalek | kudo/nom: 08fec13 | Mouq++ | src/Perl6/Metamodel/ (2 files): Allow old postcircumfix:<( )> to work too, for now |
10:12 | |
10:15
nbrown left,
dmol left
10:16
dmol joined
10:17
cognome joined,
dmol left
10:20
dmol joined
|
|||
dalek | kudo/nom: 9062e4c | Mouq++ | src/Perl6/Metamodel/InvocationProtocol.nqp: Uh, don't look in other classes if postcircumfix:<( )> is defined |
10:20 | |
Mouq | m: my @a = [ [1,2,3], [4,5,6] ], [ [7,8,9], [10,11,12] ]; say @a[*;*;1]:p; # btw :) | 10:25 | |
camelia | rakudo-moar 976f5c: OUTPUT«LoL.new(0, 0, 1).item => 2 LoL.new(0, 1, 1).item => 5 LoL.new(1, 0, 1).item => 8 LoL.new(1, 1, 1).item => 11» | ||
jnthn | Mouq: Looks good; thanks! :) | 10:39 | |
lizmat | is the .item there really necessary ? | 10:40 | |
Mouq | m: say (LoL.new(0,0,1) => 2).perl | 10:42 | |
camelia | rakudo-moar d7808f: OUTPUT«LoL.new(0, 0, 1).item => 2» | ||
lizmat | so an artefact somehow | 10:43 | |
10:43
grondilu joined
|
|||
jnthn | Without it, a LoL would flatten, I guess? | 10:43 | |
10:44
AforAcronym left
|
|||
lizmat | I thought it shouldn't? | 10:44 | |
10:45
AforAcronym joined,
dmol1 joined
|
|||
lizmat | r: say EVAL'(LoL.new(0,0,1) => 2').perl | 10:45 | |
camelia | rakudo-jvm d7808f: OUTPUT«(timeout)» | ||
..rakudo-{parrot,moar} d7808f: OUTPUT«===SORRY!=== Error while compiling /tmp/tmpfileTwo terms in a rowat /tmp/tmpfile:1------> say EVAL⏏'(LoL.new(0,0,1) => 2').perl expecting any of: argument list postfix …» | |||
lizmat | r: say EVAL'((LoL.new(0,0,1) => 2)').perl | 10:46 | |
camelia | rakudo-{parrot,jvm,moar} d7808f: OUTPUT«===SORRY!=== Error while compiling /tmp/tmpfileTwo terms in a rowat /tmp/tmpfile:1------> say EVAL⏏'((LoL.new(0,0,1) => 2)').perl expecting any of: argument list postfix…» | ||
lizmat | r: say EVAL('LoL.new(0,0,1) => 2').perl | ||
10:46
dmol left
|
|||
camelia | rakudo-{parrot,jvm,moar} d7808f: OUTPUT«LoL.new(0, 0, 1).item => 2» | 10:46 | |
lizmat | doesn't seem to be necessary for rountripping ? | ||
jnthn | In that particular context, no. | 10:47 | |
Not sure that always applies.. | |||
lizmat | ah, ok, in that way | ||
r: say EVAL('(LoL.new(0,0,1),3,4).list').perl | |||
camelia | rakudo-{parrot,jvm,moar} d7808f: OUTPUT«(0, 0, 1, 3, 4).list» | ||
lizmat | r: say EVAL('(LoL.new(0,0,1).item,3,4).list').perl | 10:48 | |
camelia | rakudo-{parrot,jvm,moar} d7808f: OUTPUT«(LoL.new(0, 0, 1).item, 3, 4).list» | ||
lizmat | I see what you mean :-) | ||
Mouq . o O ( [0, 0, 1]:lol ) | 10:51 | ||
Mouq wonders, actually how many WATs [0; 0; 1] -> LoL.new(0, 0, 1).item would be | 10:53 | ||
s/actually)>/,/ | 10:54 | ||
s/')>'/<( :P | |||
10:59
donaldh left
|
|||
masak | Mouq: the issue with the macros is that it gets confused as soon as you have a block or a sub in there. | 11:01 | |
Mouq: I'm pretty sure I know where to start looking for a solution to that. | 11:02 | ||
Mouq | Ok :) ++masak ;) | ||
grondilu | m: say { $^X }("hi") | 11:08 | |
camelia | rakudo-moar d7808f: OUTPUT«===SORRY!=== Error while compiling /tmp/ibDEw7b6AxUnsupported use of $^X variable; in Perl 6 please use $*EXECUTABLE_NAMEat /tmp/ibDEw7b6Ax:1------> say { $^X⏏ }("hi")» | ||
grondilu | ^that's a bit inconvenient | 11:09 | |
11:11
nbrown joined
|
|||
psch | grondilu: S06:1953 "Positional placeholder names consisting of a single uppercase letter are disallowed, [...]" | 11:12 | |
synopsebot | Link: perlcabal.org/syn/S06.html#line_1953 | ||
11:12
PacoLinux joined
|
|||
psch | i think $^X only has the problem of a wrong error there? | 11:12 | |
m: { say $^Q }("hi") | 11:13 | ||
camelia | rakudo-moar d7808f: OUTPUT«===SORRY!=== Error while compiling /tmp/i7dG3FyW_qUnsupported use of $^Q variableat /tmp/i7dG3FyW_q:1------> { say $^Q⏏ }("hi")» | ||
psch | hm, no. should probably still be more precise | ||
grondilu | psch: OK, noted. | ||
psch | well, the $^X error is definitely wrong; it should probably be something like "if you mean a placeholder use lowercase, if you mean Perl 5's $^X use $*EXECUTEABLE_NAME" or somesuch | 11:14 | |
grondilu | I've just realised I don't have to use uppercase anyway | 11:15 | |
11:15
nbrown left
|
|||
psch | Mouq++ # HyperWat | 11:16 | |
lizmat | psch: that text is more geared towards people coming from Perl 5 | 11:17 | |
$^X is quite common for some uses in Perl 5 | |||
specifically testing related | |||
psch | lizmat: i understand that. i just think that the placeholder intent should be mentioned in the error message for both cases as well | 11:18 | |
lizmat | working on that | 11:19 | |
psch | ah, ok, i was just about to look into it :) | ||
lizmat | src/core/Exception.pm, line 711 | ||
ChoHag | FROGGS_: Thanks. Didn't mean to ignore you - got kicked off the net. | ||
lizmat | be my guest :-) | ||
11:31
thou joined
11:33
klaas-janstol left
|
|||
hoelzro | morning #perl6 | 11:35 | |
timotimo | hey hoe :P | 11:36 | |
11:36
thou left
|
|||
hoelzro | ahoy timotimo! | 11:36 | |
timotimo | i think at this point i'll just do a 2-week weekly again ... | 11:37 | |
lizmat | timotimo: that seems wise | ||
hoelzro | agreed - unless the activity level merits it | 11:38 | |
11:39
donaldh joined
|
|||
timotimo | there was lots of activity, but later in the week it feels hard to keep the changes since monday to yourself and it seems silly to do a weekly on friday and then another on monday | 11:39 | |
even though it feels like jnthn does a lot of his amazing work on weekends and mondays %) | |||
hoelzro | heh | 11:40 | |
timotimo: is there anything people can do to help? I mean, we can all PM you and brag about ourselves =) | |||
timotimo | i'd actually appreciate that :P | ||
lizmat | r: my $a = 42; { my $a = 16; EVAL "say $a", :context(OUTER::); } # shouldn't this say "42" ? | 11:46 | |
camelia | rakudo-jvm 9062e4: OUTPUT«(timeout)» | 11:47 | |
..rakudo-{parrot,moar} 9062e4: OUTPUT«16» | |||
Mouq | jnthn, timotimo: If either of you have a sec, could you check the logic of src/Perl6/Metamodel/BOOTSTRAP.nqp L 1820 to the end of that loop? I don't really understand what it's doing that well | 11:48 | |
timotimo | r: my $a = 42; { my $a = 16; EVAL "say $a", :context(OUTER::OUTER::); } | ||
camelia | rakudo-{parrot,jvm,moar} 9062e4: OUTPUT«16» | ||
timotimo | hm. | ||
lizmat | hmmm indeed, no? | 11:49 | |
timotimo | hmm indeed, yes. | 11:50 | |
moritz | the $a interpolates into the string you pass to EVAL | 11:52 | |
lizmat | grrr | ||
of course | |||
m: my $a = 42; { my $a = 16; EVAL q[say $a], :context(CALLER::); } | |||
camelia | rakudo-moar 9062e4: OUTPUT«42» | ||
lizmat | moritz++ | ||
m: my $a = 42; { my $a = 16; EVAL q[say $a], :context(OUTER:); } | 11:53 | ||
camelia | rakudo-moar 9062e4: OUTPUT«===SORRY!=== Error while compiling /tmp/gx5BBgEAkkTwo terms in a rowat /tmp/gx5BBgEAkk:1------> $a = 16; EVAL q[say $a], :context(OUTER⏏:); } expecting any of: postfix infix stopper…» | ||
lizmat | m: my $a = 42; { my $a = 16; EVAL q[say $a], :context(OUTER::); } | ||
camelia | rakudo-moar 9062e4: OUTPUT«42» | ||
timotimo | moritz: aaaaah m) | ||
Mouq | (nvm, it seems to be an otherwise ungolfable setting bug -_-) | 11:55 | |
11:55
iarna left,
iarna joined
|
|||
timotimo | d'oh | 11:56 | |
lizmat | m: sub a { say $^a }; { say OUTER::.keys } # shouldn't this also list &a ? | 12:00 | |
camelia | rakudo-moar 9062e4: OUTPUT«$! $/ $_ GLOBALish EXPORT $?PACKAGE ::?PACKAGE &a $=pod !UNIT_MARKER» | ||
lizmat | ah, but it does ? | ||
timotimo | m: sub a { say $^a }; say ::.keys | 12:05 | |
camelia | rakudo-moar 9062e4: OUTPUT«$! $/ $_ GLOBALish EXPORT $?PACKAGE ::?PACKAGE &a $=pod !UNIT_MARKER» | ||
timotimo | yeah, both do | ||
m: sub HERE_I_AM_LOOK_AT_ME { say $^a }; say ::.keys # much easier to spot | 12:06 | ||
camelia | rakudo-moar 9062e4: OUTPUT«$! $/ $_ GLOBALish EXPORT $?PACKAGE ::?PACKAGE &HERE_I_AM_LOOK_AT_ME $=pod !UNIT_MARKER» | ||
dalek | kudo/nom: 13df800 | (Elizabeth Mattijsen)++ | lib/Test.pm: Make sure EVAL is done in right context |
12:08 | |
jnthn | lizmat: Wait wait wait... | 12:09 | |
12:09
klaas-janstol joined
|
|||
jnthn | lizmat: We have eval_lives_ok and eval_dies_ok taking blocks for things like this, I thought? | 12:09 | |
lizmat: But moreover: the optimizer looks for EVAL to appear | |||
And since the test doesn't contain a call to EVAL, it's free to optimize lexicals out. | 12:10 | ||
So this will be highly unreliable. | |||
12:12
nbrown joined,
AforAcronym left
|
|||
lizmat | hmmm.... | 12:13 | |
so maybe then the "context" option should be taken from EVAL ? | |||
FWIW, I unspecced "eval_dies/lives_ok" in favour of handling this with dies_ok/lives_ok (taking a string to EVAL) | 12:14 | ||
jnthn | context is not spec'd at all | 12:15 | |
lizmat | but if what you say is true, then *any* sub doing an EVAL and referencing things in an OUTER:: scope is fragile | ||
jnthn | It exists purely to make .EVAL work | ||
12:16
nbrown left
|
|||
jnthn | my $a; ... if x { while y { EVAL 'blah $a' } } # fine because the EVAL poisons optimizations for everything in the surrounding scopes | 12:16 | |
lizmat | and the same goes for .EVAL ? | 12:17 | |
jnthn | Right | ||
The optimizer specifically looks for them | |||
This is why the change to uppercase | |||
lizmat | and eval_dies/lives_ok then? | 12:18 | |
is that checked for as well, by name ? | |||
jnthn | No | 12:19 | |
lizmat | but that would have the same problem, no ? | ||
jnthn | Hm...we don't actually have thsoe, do we? | ||
moritz | those currently eval in their own scope | ||
(and I had to fix many tests that implicitly assumed otherwise) | 12:20 | ||
jnthn | oh, we do | ||
Right | |||
moritz | ("it fails at compile time? let's just put an eval around it") | ||
lizmat | eval_dies_ok uses a sub: eval_exception($code); | ||
jnthn | I do wonder if we should just encourage lives_ok { EVAL '...' } | ||
lizmat | well, that's fine by me | ||
jnthn | Which is reliable and not a lot longer | ||
lizmat | and I'll deprecate eval_lives/dies_ok | 12:21 | |
moritz | and viable since EVAL doesn't catch exceptions any longer | ||
jnthn | moritz: aye, good point | ||
lizmat | and handle the test-suite, because I want to basically use throws_like wherever possible | ||
to make sure things die for the right reason | 12:22 | ||
12:22
jnap joined
|
|||
jnthn | Well, yes, that's preferable anyway | 12:22 | |
FROGGS_ | ChoHag: np, I don't expect that the ppl I am talking are at the keyboard all the time :o) | ||
lizmat | shall I rewrite .EVAL so that it won't need the :context parameter anymore, and remove it from sub EVAL ? | ||
12:24
PacoLinux left
|
|||
moritz | that sounds somewhat wrong | 12:24 | |
12:25
brrt joined
|
|||
lizmat | otoh, if there would be an easy way to "poison" a scope | 12:25 | |
timotimo | EVAL "" | 12:26 | |
or CALLER:: | |||
lizmat | then we could e.g. have "use Test" poison the scope in which it is loaded automaticaly | ||
timotimo | i don't like the sound of that | ||
jnthn | Me either... | ||
lizmat: Well, the point of :context(...) is that .EVAL can be implemented in terms of EVAL | 12:27 | ||
lizmat | perhaps we should have a EVAL() candidate that does nothing | ||
can be removed itself, but poisons the scope ? | |||
and spec it as such ? | |||
jnthn | No, I don't see how that helps much | 12:29 | |
12:29
Mouq left
|
|||
jnthn | I mean, why would you want to prevent optimizations if you aren't going to do something that they would make a problem for? | 12:30 | |
lizmat | the reason for all of this was this code: | 12:31 | |
throws_like q[fac('oh noes i am a string')], X::TypeCheck::Argument; | |||
the eval was done in the wrong scope, and therefore it didn't see the fac() definition | |||
so it was failing because of Undeclared Symboils, rather than because of the type check | 12:32 | ||
in this particular case, I could only see a problem if the enitre sub fac() was optimized away | 12:33 | ||
(file in question: t/spec/integration/advent2009-day04.t ) | |||
12:34
kurahaupo joined
|
|||
lizmat | if you're saying we should always do: | 12:34 | |
throws_like { EVAL q[fac('oh noes i am a string')] }, X::TypeCheck::Argument; | |||
that's fine by me... but then we will need to get rid of eval_lives/dies_ok | |||
and replace that with lives/dies_ok and the necessary { EVAL ... } | |||
jnthn | It's only an issue for things that want symbols in the outer scope | 12:35 | |
So for testing parse errors the string form of throws_like isn't so bad | |||
I think eval_lives_ok and eval_dies_ok could happily go, though. | 12:36 | ||
lizmat | but from a naive user point of view, why need { EVAL ... } in this case, and not in others ? | ||
I'd rather then remove the string eval option from throws_like | 12:37 | ||
and be clear about it | |||
"yeah, you can specify a string, and it may work now, but not in the future when we optimize differently" | |||
jnthn | Um, it reliably fails to work today, no? | 12:38 | |
cognome | github.com/rakudo/rakudo/blob/nom/...ute.pm#L33 nqp::die("Cannot create rw-accessors for natively typed attribute '$name'"); | ||
Is this a limitation of the rakudo implementation or is it specified? | |||
jnthn | The optimization fragility was to do with passing context => CALLER::CALLER:: | ||
moritz | cognome: implementation limit | ||
timotimo | cognome: implementation limit | ||
lizmat | well, if "dies_ok" dies for the wrong reason, you're not testing right | 12:39 | |
timotimo | yeah | ||
cognome: jnthn has that on his "to do" list for autumn | |||
jnthn | lizmat: Yes, that's why I don't worry much about throws_like and the string case. | ||
lizmat: Because you specify the mode of failure | |||
lizmat: So false positives are much less likely | |||
lizmat | true | ||
jnthn | Agree eval_[dies|lives]_ok are fragile | 12:40 | |
moritz d'accord | |||
cognome | thx, moritz++, timotimo++ Where is that TODO list, jnhtn specific, or not? | ||
lizmat | still, hard to explain why sometimes you would need to use { EVAL ... } for throws_like, and when not | ||
moritz | cognome: there's a docs/ROADMAP in the rakudo repository | ||
lizmat | so I'd rather remove the string option for clarity | 12:41 | |
moritz | lizmat: don't remove it; just explain it in the docs | ||
lizmat: it's very convenient to have | |||
jnthn | lizmat: "If you will use any symbols in the surrouding scope, use the block and EVAL form. If you are purely testing ability to parse, the string form is fine." | 12:42 | |
moritz | cognome: it says "missing native operators, including ++/--", which requires rw-access to natives | ||
cognome: so it's a bit hidden in the ROADMAP | |||
jnthn | Well, unless the parse depends on things in the outer scope :P | ||
lizmat | moritz, jnthn: in the S24 spec? as there is hardly any docs inside lib/Test.pm | ||
jnthn | So probably drop the second aprt of what I said :) | ||
lizmat | nor do I know a way to easily look up the pod | ||
moritz | lizmat: in S24, yes | ||
lizmat: we might want to import S24 (or parts thereof) into Test.pm eventually | 12:43 | ||
lizmat | it feels wrong to me, but will do so | 12:44 | |
12:44
brrt left
12:45
brrt joined
12:46
guru joined,
guru is now known as ajr_
|
|||
masak | recursively removing a directory in a platform-independent way? | 12:50 | |
dalek | ecs: 2128e89 | (Elizabeth Mattijsen)++ | S24-testing.pod: Only throws_like accepts a string as well |
||
ecs: c80388e | (Elizabeth Mattijsen)++ | S24-testing.pod: Mention caveat with symbols when using string |
|||
masak | guess there is a File::Utils somewhere that does that, right? | ||
masak goes with `shell("rm -r dir")` for now | 12:51 | ||
dalek | kudo/nom: 1378792 | (Elizabeth Mattijsen)++ | lib/Test.pm: Using an internal EVAL feature considerd BAD(TM) |
12:53 | |
13:06
kaare_ left
13:09
_sri left
13:12
nbrown joined
13:16
nbrown left
|
|||
psch | hm, the $^X thing is a tad more complicated than it appears on the surface i fear | 13:18 | |
m: EVAL "{ $^X }"; CATCH { default { .^name.say } } | |||
camelia | rakudo-moar 9062e4: OUTPUT«===SORRY!=== Error while compiling /tmp/bqGQ1jdkKyUnsupported use of $^X variable; in Perl 6 please use $*EXECUTABLE_NAMEat /tmp/bqGQ1jdkKy:1------> EVAL "{ $^X⏏ }"; CATCH { default { .^name.say } }» | ||
psch | m: { EVAL "{ $^X }"; CATCH { default { .^name.say } } } | ||
camelia | rakudo-moar 9062e4: OUTPUT«===SORRY!=== Error while compiling /tmp/ZY6QToC9HhUnsupported use of $^X variable; in Perl 6 please use $*EXECUTABLE_NAMEat /tmp/ZY6QToC9Hh:1------> { EVAL "{ $^X⏏ }"; CATCH { default { .^name.say } } }» | ||
psch | ehh, double quotes :) | ||
m: { EVAL '{ $^X }'; CATCH { default { .^name.say } } } | |||
camelia | rakudo-moar 9062e4: OUTPUT«X::Syntax::Perl5Var» | ||
psch | m: { EVAL '$^X'; CATCH { default { .^name.say } } } | 13:19 | |
camelia | rakudo-moar 9062e4: OUTPUT«X::Syntax::Perl5Var» | ||
psch | what i have now groups X::Placeholder::Mainline and X::Syntax::Perl5Var instead of always throwing Perl5Var for any possible Perl5Var | ||
13:19
thou joined
|
|||
psch | but that breaks about 29 spectest tests, because those don't expect a Comp::Group | 13:20 | |
13:20
FROGGS_ left,
itz left,
BooK_ left
|
|||
lizmat | isn't it just a matter of changing the messages in those two classes if it matches $^[A-Z] ? | 13:20 | |
$^<[A..Z]> (excuse my p5) | 13:21 | ||
psch | right, i added the message for Perl5Var | ||
moritz | maybe throws_like should special-case Comp::Group, and go into the list of exceptions in that case | ||
it's a recurring theme | |||
lizmat | is this a throws_like problem ? | ||
moritz | well | 13:22 | |
psch | kindasorta, i think | ||
moritz | maybe it's a more general exception classification problem | ||
usually we ask "is this exception a X::Foo?" | |||
dalek | kudo/nom: dd8679e | (Elizabeth Mattijsen)++ | lib/Test.pm: No longer allow strings with dies_ok/lives_ok |
||
moritz | but in the case of group exception, we ought to ask "is there an exception of type X::Foo in there?" | ||
lizmat | we do $_ ~~ ex_type | ||
so it is not an isa relationship | 13:23 | ||
moritz | not always | ||
lizmat | are you saying the test should also .isa($ex_type) ? | ||
13:24
BooK joined,
thou left
|
|||
pmichaud | good morning, #perl6 | 13:24 | |
lizmat | morning pmichaud | 13:25 | |
13:25
itz joined
|
|||
pmichaud | lizmat o/ | 13:25 | |
psch | hi pmichaud \o | ||
moritz: just having throws_like go into the group seems a bit magicy to me | 13:26 | ||
pmichaud | note to yapceu folks: I've decided not to make it to sofia... I have a few other things going on here and I can't quite justify the 30 hours of air travel | ||
but salzburg is definitely on my calendar | |||
psch | and smartmatch in general against a Comp::Group on the lhs probably shouldn't do that, even though i kind of would like it to | ||
jnthn | pmichaud: Aww, ok. | ||
13:27
dmol1 left
|
|||
jnthn | 30 hours *is* quite a bit. | 13:27 | |
dalek | Heuristic branch merge: pushed 86 commits to rakudo/S26-WHY by hoelzro | ||
13:28
_sri joined
|
|||
psch | m: { EVAL "infix:<>() {}"; CATCH { when X::Comp::Group { .^name.say for .worries, .panic } } } | 13:29 | |
camelia | rakudo-moar 9062e4: OUTPUT«X::Comp::AdHocX::Undeclared::Symbols» | ||
psch | m: { EVAL "/m ** 1..-1/"; CATCH { when X::Comp::Group { .^name.say for .worries, .sorrows, .panic } } } | ||
camelia | rakudo-moar 9062e4: OUTPUT«X::Syntax::Regex::MalformedRangeX::Syntax::Regex::UnrecognizedMetacharX::Comp::AdHoc» | ||
psch | anyway, the core issue i had with adding the hint about the placeholder was, that placeholders that produce a Perl5Var swallow other issues with the placeholder at the moment, e.g. X::Placeholder::Mainline | 13:31 | |
13:31
dmol joined
|
|||
psch | that's not really an issue with the hint, but more about Comp::Group and how we process them | 13:32 | |
how does grouping interact with NYI .pending, anyway? Comp::Group doesn't seem specced | 13:33 | ||
13:33
anaeem1__ left
|
|||
dalek | ecs: 455c422 | (Elizabeth Mattijsen)++ | S24-testing.pod: throws_like also can have a description |
13:34 | |
13:35
ivanshmakov| left
|
|||
dalek | kudo/nom: eb1df63 | (Elizabeth Mattijsen)++ | lib/Test.pm: throws_like can also have a description |
13:36 | |
masak | some newlines missing in this error message? gist.github.com/masak/f4a2feb098e28197c1fa | 13:37 | |
13:37
iarna left
13:38
FROGGS_ joined
|
|||
masak | the extra space before each signature indicates to me the newlines were intended? | 13:38 | |
shall I open a ticket for this? | |||
13:38
xusia left,
iarna joined
|
|||
masak | also, ++ to everyone who was involved in the Levenshtein distance thing. it's a thing of beauty. | 13:38 | |
it's so obviously what an error message should have. | 13:39 | ||
lizmat | do we have that for methods now? | ||
13:40
brrt left
|
|||
lizmat remembers putting that on her list once, a while ago, but got blocked | 13:40 | ||
13:41
AforAcronym joined
|
|||
pmurias | jnthn: is :$want supposed to influence semantics or is it just an optimalization hint? | 13:43 | |
13:43
ivanshmakov| joined
|
|||
jnthn | pmurias: It can influence semantics. Of note, it can control the choice of a QAST::Want node branch, and Rakudo (maybe NQP too) uses it to do different things in/out of sink context. | 13:44 | |
psch | masak: the newline is missing in Optimizer.nqp:1534 in the for | ||
psch .oO( i don't want to open a PR for 4 characters... ) | 13:45 | ||
pmurias | jnthn: what I care about is when compiling ifs do I have to pass the want (context?) to both branches in exactly the same way | ||
masak | psch: thanks. fixing. | 13:46 | |
jnthn | pmurias: Well, they're both in the same context, so I'd say so | ||
pmurias: Though given you're asking I think I'm missing some subtlety in your question :) | 13:47 | ||
13:47
anaeem1_ joined
13:48
anaeem1_ left
|
|||
pmurias | I seem to have got confused about something, too much looking at all the $il.append(...) ;) | 13:48 | |
timotimo | tadzik: btw, you should totally run your steroids game on moar-jit and tell us what the bail log looks like, as well as the performance :) | 13:49 | |
jnthn | Hm, some day we really should JIT native calls... | ||
timotimo | yeah, that'd be neat | 13:50 | |
13:50
rurban1 joined
|
|||
timotimo | masak: i'm glad you're enjoying the hell out of the levenshtein error message thing i kicked off :D | 13:51 | |
.o( yeah! i'm taking all the praise! ) | |||
masak | timotimo++ # Levenshtein | ||
psch++ # finsing that place in Optimizer.nqp -- building a fix now | 13:52 | ||
pmurias | I'm jealous of the nice rakudo error messages, as I'm mostly using nqp :( | ||
timotimo | masak: twitter.com/loltimo/status/417302567236816897 ← :D | 13:53 | |
13:53
kurahaupo left
|
|||
masak | timotimo: :) | 13:53 | |
dalek | kudo/nom: 287e49e | masak++ | src/Perl6/Optimizer.nqp: spread some newline love in between signatures |
13:56 | |
jnthn | timotimo: *lol* | ||
13:58
thou joined
|
|||
lizmat | :-) | 14:01 | |
too bad the Levenshtein distance is not 666 :-) | |||
lizmat just found another case of 'dies_ok' that was dying for the wrong reason | 14:02 | ||
jnthn: related, do we want to check for X::AdHoc exceptions? | 14:03 | ||
as generated by nqp::die() | |||
e.g. in src/Perl6/Metamodel/RoleToClassApplier.nqp | |||
or do you think it makes sense to turn these into proper Exceptions ? | 14:04 | ||
14:04
treehug88 joined
|
|||
jnthn | lizmat: I think we'd like to converge towards everything the langauge/compiler produces being typed | 14:05 | |
masak | heh -- under what conditions does one get "Premature heredoc consumption"? | ||
timotimo | the langauge is up to 11 | ||
masak | (also, why no file and line number? grmbl.) | ||
masak injects `BEGIN say` into his code | |||
timotimo | masak: it occurs to me that it's pretty cool we can even do that | 14:06 | |
jnthn | masak: Anything that tries to run an expression at BEGIN time I guess | ||
masak: And the heredoc text is after the expr or blorst in question | |||
So we didn't parse it befoer trying to use it | |||
masak | ah, found it. | ||
golfing. | 14:07 | ||
timotimo | that error message could get the LTA treatment | ||
jnthn | Weird it misses a file/line | ||
Well, the error tells you what's wrong. | |||
I mean, you know it's about a heredoc at least :) | |||
timotimo | yeah, but "premature" could mean anything | ||
jnthn | Mebbe the word doesn't conjure the right idea, yeah... Hmm. | 14:08 | |
timotimo | "tried to use a heredoc's content before it was parsed fully" | ||
jnthn | Yeah | ||
masak | golfed: gist.github.com/masak/83df9c4ad3a859730109 | 14:10 | |
if I can get a ruling on whether that is OK, I can submit a rakudobug. | |||
jnthn | Oh, I wondered if it's constant | 14:12 | |
No, I can't see that being OK. | |||
masak | you can't? | ||
jnthn | No; we evaluate constants at BEGIN time | ||
14:13
nbrown joined
|
|||
jnthn | It's one of those "would be nice if it could work but I can't see how to pull it off" things | 14:13 | |
masak | oh, so if I do `constant B = qq:to/END/ ~ <newline> <heredoc> END <newline> "";`, then we're all fine? | 14:14 | |
yeah, that works here. | |||
jnthn | If it's finished parsing the heredoc by the time it compiles the expression, you're good. | ||
masak | something here is exceedingly silly. | ||
I mean, I hear what you're saying. | |||
but... | |||
jnthn | Heredocs are, from a parsing perspective, exceedingly silly. :/ | 14:15 | |
masak | the failure mode seems to be "compiler can't be arsed to parse the heredoc because the constant needs the value right now and looking at the next few lines is a really hard problem" :P | ||
jnthn | Well, what if the constant gets used later on on the same line? | 14:16 | |
masak | point. | ||
m: constant W = W; say "alive" | |||
camelia | rakudo-moar 137879: OUTPUT«===SORRY!===Cannot invoke null object» | ||
masak submits rakudobug | |||
:D | |||
jnthn | That one *is* a bug, but already in there :P | ||
masak | m: constant W = W * 18; say "alive" | ||
camelia | rakudo-moar 137879: OUTPUT«===SORRY!===Cannot invoke null object» | ||
jnthn | I *think* | ||
masak | m: constant W = "hey, does {W} work?"; say "alive" | 14:17 | |
camelia | rakudo-moar 137879: OUTPUT«===SORRY!===Cannot invoke null object» | ||
14:17
iarna left,
kaare_ joined
|
|||
masak | m: constant W = EVAL "W"; say "alive" | 14:17 | |
camelia | rakudo-moar 137879: OUTPUT«===SORRY!=== Error while compiling EVAL_0Undeclared name: W used at line 1» | ||
masak | meh. | ||
14:18
iarna joined
|
|||
masak | anyway, the answer to "what if the constant is used in the heredoc" seems to me to be "well, *then* we give an error. not in the general case!" | 14:18 | |
14:18
nbrown left
|
|||
pmurias | why isn't the SORRY! error message style used in nqp? | 14:19 | |
masak | m: class C { has $x, $y } | ||
camelia | rakudo-moar 137879: OUTPUT«===SORRY!=== Error while compiling /tmp/LU5fSc5GbTVariable '$y' is not declaredat /tmp/LU5fSc5GbT:1------> class C { has $x, $y⏏ } expecting any of: postfix» | ||
jnthn | I'd be happy to be shown a sane solution to heredoc in constant. I don't *like* it. | 14:20 | |
masak | that one could do with a better error message -- like "did you mean to put parens around those variables? `has ($x, $y);`" | ||
jnthn | I just don't see a good way to do it that doesn't have a bunch of other issues... | ||
std: class C { has $x, $y } | 14:21 | ||
camelia | std 81e0d07: OUTPUT«===SORRY!===Variable $y is not predeclared (declarators are tighter than comma, so maybe your 'has' signature needs parens?) at /tmp/irz2GByYeC line 1:------> class C { has $x, ⏏$y }Check failedFAILED 00:01 126m» | ||
jnthn | Steal that error! :) | ||
pmurias: Because nobody implemented it yet. | |||
pmurias: Because implementing things takes time and NQP isn't user-facing enough for it to be worth spending the time on this compared to other things. | 14:22 | ||
masak | jnthn: suggested way to make it work: parser sees that it's about to give a value to the constant, but in order to do that it needs to parse a heredoc first, so it parses the heredoc and then sets the value of the constant. | ||
moritz | that kinda goes against both our control flow, and the concept of compile time being immediate compile time | ||
jnthn | masak: Yes, when I said "suggestion" I meant "patch". I can see how to do it waving my hands. :) | ||
masak | ok, got it ;) | 14:23 | |
jnthn | pmurias: If it annoys you enough you want to patch it, please do go ahead. | ||
masak | moritz: I see it as breaking a rule in order to reach up to user expectations. | ||
timotimo | and then we put a { BEGIN 1234 } inside the heredoc's string :D | ||
masak | moritz: I certainly expected that one to work; only after having it explained to me did I even perceive the problem. | 14:24 | |
jnthn | timotimo: Yes, I'm seeing us "fixing" this and then masak finding 20 new things to submit because of the hack to make it work... :) | ||
pmurias | what I thinking is shouldn't the "fancy" SORRY error messages be something that can be reused by different grammar | 14:25 | |
* grammars | |||
jnthn | As moritz said, it does break a relatively deep assumption... | ||
pmurias: I'm not sure. Exposing the highwater stuff is something we've pondered in the past... | |||
masak | ok, if you think the fix isn't going to lead anywhere good, then let's skip it. | 14:26 | |
I'm aware I'm discussing this with people who are better versed in the internals than I. | 14:27 | ||
I'm just reporting the expectations of a lowly userland coder. :> | |||
jnthn | Well, I agree on the expectations... I'm just struggling on how to meet them without making some nice problems. | 14:28 | |
uh | |||
some *new* problems | |||
:) | |||
dalek | p-js: c707a6d | (Pawel Murias)++ | src/vm/js/ (2 files): Implement the if and unless ops. (pass tests 2,3,4) |
14:30 | |
p-js: dfa81ce | (Pawel Murias)++ | TODO: Update TODO. |
|||
14:42
iarna left,
ggoebel1111118 joined
14:44
FROGGS[mobile] left,
ggoebel1111117 left
14:45
chenryn joined
14:47
guru joined,
ajr_ left,
guru is now known as Guest81950,
Guest81950 is now known as ajr_
14:53
itz_ joined
14:56
itz left
|
|||
masak | std: class C { has ($.x, $.y) is rw; } | 15:00 | |
camelia | std 81e0d07: OUTPUT«ok 00:01 125m» | ||
masak | m: class C { has ($.x, $.y) is rw; } | 15:01 | |
camelia | rakudo-moar 287e49: OUTPUT«===SORRY!=== Error while compiling /tmp/OCu5FIHkCzTwo terms in a rowat /tmp/OCu5FIHkCz:1------> class C { has ($.x, $.y) ⏏is rw; } expecting any of: scoped declarator formal paramete…» | ||
masak submits rakudobug | |||
15:08
xylixy joined
15:09
xylixy left
15:10
chenryn left
15:13
denis_boyun_ left
15:14
nbrown joined
15:17
chenryn joined
15:18
nbrown left
|
|||
dalek | ast: 3076e09 | (Elizabeth Mattijsen)++ | integration/advent20 (15 files): dies_ok -> throws_like cleanup, part 1 |
15:19 | |
lizmat | FWIW, this fixes several cases of dies_ok tests that were dying for the wrong reason | ||
15:20
en is now known as enp3s0,
enp3s0 is now known as en
15:24
chenryn left
15:26
chenryn joined
|
|||
masak throws one more coin into the "masak was golfing something, but it turned out to be a bug in masak, not in Rakudo" piggy-bank | 15:28 | ||
15:29
iarna joined,
xfix is now known as GlitchMr
15:30
chenryn left
15:35
chenryn joined
15:36
dmol left
15:44
dayangkun left
15:50
chenryn left
15:51
chenryn joined
|
|||
donaldh | Truly bizarre. If I add an int field to SixModelObject then the JVM crashes, If I add a long or object field then it's fine. | 15:58 | |
jnthn | o.O | 15:59 | |
Some weird alignment fail, maybe... | |||
donaldh | Well I was thinking that, but object references are the same size as ints, no? | ||
compressed oops and all. | 16:01 | ||
16:01
[Sno] left
|
|||
jnthn | ah, true | 16:03 | |
OK, so it's just bizzare :) | |||
.oO( That's why they call it "oops"... ) |
16:04 | ||
16:06
ajr_ left
|
|||
donaldh | So I can store SC indices in SixModelObject using an Integer, which sucks, but is still more efficient than a separate HashMap, both in space and time. | 16:06 | |
jnthn | Well, space ways, for objects that are in an SC... | 16:14 | |
16:15
nbrown joined
|
|||
jnthn | *space wise | 16:15 | |
16:19
nbrown left,
Rotwang joined,
guru joined,
telex left
16:20
guru is now known as Guest75357,
telex joined,
Guest75357 is now known as ajr_
16:26
dmol joined
|
|||
sjn | yay, bfoy is tweeting about a 2013 jnthn-rant \o/ | 16:29 | |
bdfoy* | |||
sjn wonders if this is a good thing; twitter.com/briandfoy_perl/status/...9311715330 | 16:31 | ||
hm. maybe it is. /me goes back to lurk-mode | 16:32 | ||
jnthn | Well, I vastly prefer where we are now than where we were then. | ||
sjn | jnthn: yeah, figured that | ||
geekosaur | we left pugs behind but it played a very important role in getting us here,,, | 16:34 | |
FROGGS_ | like Parrot | ||
sjn has managed to stay optimistic about perl6 mostly because of being proficient at putting history into the "let's learn from that" box | 16:35 | ||
FROGGS_ | there wouldn't be a good Perl 6 implementation without Parrot | ||
sjn: true | |||
pmurias | it's hard to say if the other Perl 6 implementations couldn't evolve towards what rakudo is today via a different route | 16:39 | |
s/couldn't evolve/couldn't have evolved/ | 16:40 | ||
what's good about rakudo is that it got a lot of different people working together | 16:41 | ||
TimToady | m: say (*.name).Str | 16:52 | |
camelia | rakudo-moar 287e49: OUTPUT«WhateverCode.new()» | ||
TimToady | m: say *.name | ||
camelia | rakudo-moar 287e49: OUTPUT«WhateverCode.new()» | ||
TimToady | I'm thinking the first of those should warn, rather than just delegating to .gist | 16:53 | |
then maybe *.name ~~ /pos/ would have given better feedback | |||
donaldh | Okay, so turned off compressed oops with -XX:-UseCompressedOops and no longer get a JVM crash. Almost enough info for a useful bug report to Oracle. | 16:54 | |
dalek | blets: ae3d871 | (Herbert Breunung)++ | docs/ (5 files): chapter assignement on ops tablet |
16:56 | |
diakopter | "here's my golfed repro instance; sorry for the 9MB .jar" | ||
16:57
raiph left,
denis_boyun_ joined
|
|||
donaldh was thinking more along the lines of "Here's a github repo, knock yourselves out." | 16:58 | ||
donaldh will try a different arch first, to see if it's OSX specific. | 16:59 | ||
17:07
kaare_ left
17:13
raiph joined
17:14
chenryn left
|
|||
dalek | blets: 805bc72 | (Herbert Breunung)++ | docs/tablet-4-operators.txt: links cant touch headings |
17:15 | |
17:15
nbrown joined
17:19
nbrown left
17:22
brrt joined
|
|||
dalek | blets: 85efc32 | (Herbert Breunung)++ | docs/tablet-4-operators.txt: new op order |
17:22 | |
17:23
lichtkind joined
17:24
nbrown joined,
itz_ is now known as itz
17:25
donaldh left
17:29
nbrown left
17:36
[Sno] joined
17:37
ajr_ left
|
|||
TimToady | m: class A { has $!foo = 42; multi sub sayfoo(A \this) is export { say this!foo } }; import A; sayfoo(A.new) | 17:44 | |
camelia | rakudo-moar 287e49: OUTPUT«===SORRY!=== Error while compiling /tmp/dxSiySVjvSNo such private method 'foo' for invocant of type 'A'at /tmp/dxSiySVjvS:1------> ub sayfoo(A \this) is export { say this!⏏foo } }; import A; sayfoo(A.new)» | ||
TimToady | hmm | 17:45 | |
should that work? | |||
(we were discussing this on #moarvm, but it's more of a language issue) | 17:46 | ||
that is, should a multi sub defined inside a class have private trusted access to a parameter object's attributes | 17:47 | ||
I can't think of a good reason why not, offhand, other than we'd have to implement it :) | 17:48 | ||
jnthn | Other question is if we're meant to create private methods per attribute...or some other trick :) | ||
TimToady | could perhaps autogen on seeing this!foo | ||
jnthn | Really we'd like to optimize it into nqp::getattr(...), of course | 17:50 | |
Which in turn under spesh/JIT can become something that's a pointer offset | |||
TimToady | right, we want it fast, and there's no reason not to trust code inside the class | 17:51 | |
so it's really a matter of notation | |||
is this!foo sufficient notation given we know it's A, or do we need to annotate the parameter somehow further | 17:52 | ||
and many of these will have both a this and a that parameter | |||
currently I suppose many things are written this.foo that are really intended to be this!foo, that is, non-virtual | 17:54 | ||
jnthn | At present, if you don't quality it, I think we take the encosing package | ||
So class Foo { ...blah... self!x() } really means self!Foo::x | |||
TimToady | so the trust already there, but not the mechanism, maybe | ||
jnthn | Since they're non-virtual, the (static) optimizer already resolves them into, essentially, sub calls. | ||
The missing mechanism is for accessing attributes via private method syntax. | 17:55 | ||
TimToady | I'm thinking that would be very useful for optimization of our operators | ||
so we know which ones don't have to take virtuality into account, and which do, based on ! vs . | 17:56 | ||
instead of relying on class finality to decide that, which is hard | |||
jnthn | Well, many operators today are expressed in nqp:: ops ;) | ||
17:57
zakharyas joined
|
|||
TimToady | indeed, so maybe this is really a way to write them in something that is a little less not quite :) | 17:57 | |
jnthn | If we put this in *and* optimize it well, we might be able to make them prettier and keep the speed benefit and give others writing custom ops a good way to do it :) | ||
'cus we don't want folks using nqp::foo outside of the Rakudo built-ins, really... | |||
TimToady | nodnod | 17:58 | |
or is that shakeshake... | |||
m: class A { has $!foo = 42; multi sub sayfoo(A \this) is export { say this!A::foo } }; import A; sayfoo(A.new) | 18:00 | ||
camelia | rakudo-moar 287e49: OUTPUT«===SORRY!=== Error while compiling /tmp/5qDYSQNCC3No such private method 'foo' for invocant of type 'A'at /tmp/5qDYSQNCC3:1------> ub sayfoo(A \this) is export { say this!⏏A::foo } }; import A; sayfoo(A.new)» | ||
TimToady | m: class A { trusts A; has $!foo = 42; multi sub sayfoo(A \this) is export { say this!A::foo } }; import A; sayfoo(A.new) | 18:01 | |
camelia | rakudo-moar 287e49: OUTPUT«===SORRY!=== Error while compiling /tmp/BRnCGlkcR8No such private method 'foo' for invocant of type 'A'at /tmp/BRnCGlkcR8:1------> ub sayfoo(A \this) is export { say this!⏏A::foo } }; import A; sayfoo(A.new)» | ||
TimToady | how do we support private methods in the general case? or is that NYI? | 18:02 | |
jnthn | m: class A { method !private() { say 'shhh!' }; method public() { self!private() } }; A.public | 18:03 | |
camelia | rakudo-moar 287e49: OUTPUT«shhh!» | ||
jnthn | m: class A { method !private() { say 'shhh!' }; method public() { self!privates() } }; A.public | 18:04 | |
camelia | rakudo-moar 287e49: OUTPUT«===SORRY!=== Error while compiling /tmp/tUCeZT4CUKNo such private method 'privates' for invocant of type 'A'at /tmp/tUCeZT4CUK:1------> hh!' }; method public() { self!privates(⏏) } }; A.public» | ||
diakopter | hehehe | ||
jnthn | Take advantage of non-virtualness to give errors on typos :) | ||
TimToady | but we don't have an autogen of a !private accessor yet for attrs? | ||
jnthn | Correct. | ||
TimToady | gotcha | ||
but as you say, we almost don't need on, if we just translate to nqp:: | 18:05 | ||
*one | |||
offhand I don't see a problem with bypassing the autogen entirely | 18:06 | ||
jnthn | Yeah, only trouble is if folks try and access it from the outside...otoh then there'd have to be a "trusts" | ||
So maybe we just auto-gen them if we see that | |||
TimToady | well, but a class implicitly trusts itself... | ||
so you'd always autogen them :) | 18:07 | ||
18:07
klaas-janstol left
|
|||
jnthn | I meant "a use of the trusts trait" :P | 18:07 | |
TimToady | well, you could remark upon the presence of this!foo | ||
oh, okay | |||
jnthn | Oh, I think I see the confusion... | ||
18:07
brrt left
|
|||
TimToady | me too :) | 18:07 | |
jnthn | What I more meant was that within a class, we can easily know which attributes we might need private accessors for. | ||
So it's only in the trusts FooOtherThing case that we might want to auto-gen them to make things we can't have figured out by composition time (at the closing }) work out. | 18:08 | ||
TimToady | right, though we might have noticed the !foo usages in the other class as well, unless we want to allow !"$foo"() | 18:09 | |
in which case we'd have to generate all of them | |||
jnthn | Yeah, I was hoping we might get away with having to generate all of them... | 18:10 | |
TimToady | well, generating all of them is easier on some level than generating some of them :) | ||
and it's not like they're huge | |||
TimToady will leave that decision up to the Harried Implementor :) | 18:11 | ||
jnthn | True, though across the whole CORE.setting they add up... | 18:12 | |
18:12
molaf joined
|
|||
TimToady takes off the hat of Lazy Language Designer, and starts thinking about list abstraction again, and sweating... | 18:12 | ||
but in general, I like it whenever the circularity saw can be moved from the setting to the codegen :) | 18:14 | ||
jnthn thinks its time for some dinner :) | 18:15 | ||
bbiab | |||
TimToady | it's still a longterm goal of mine to get the setting written in Pure Perl 6, but I understand the usefulness of the nqp model too | 18:16 | |
18:16
dmol left
|
|||
TimToady goes back to coffee/backlog mode | 18:16 | ||
18:17
GlitchMr is now known as xfix
18:22
molaf left
18:25
nbrown joined
|
|||
timotimo | o/ | 18:26 | |
TimToady | \o | 18:28 | |
avuserow | hey, someone mentioned a bug with Compress::Snappy a few days ago IIRC? If someone could open an issue, I'll see about fixing it | ||
(also one of these days, I should muse about Bufs and Blobs and my interactions/pains with them when writing Compress::Snappy) | 18:29 | ||
18:29
nbrown left
|
|||
TimToady considers Bufs and Blobs to still be a WIP | 18:30 | ||
timotimo | sadly they seem to be | ||
dalek | ecs: 4c7c7d0 | TimToady++ | S99-glossary.pod: define WIP |
18:32 | |
raiph | Anyone comments? "rakudo is still pretty damn slow, frankly. ... From my personal experiments, from the first day moarvm came out to now, the speed is at best twice as good, when what would be hoped would be ten times as good. Or even one hundred times." www.reddit.com/r/perl6/comments/2co...proves_at/ | 18:33 | |
cjqwesc | |||
TimToady | we agree completely :) | 18:34 | |
timotimo | i'm writing a little bit on that | 18:35 | |
TimToady | however, when we improve the compiler to the point where it runs P6 as fast as NQP, we'll definitely be pretty zippy | ||
avuserow | TimToady: I'm fine with Bufs and Blobs being WIP. I'm hoping that sharing what I ran into previously will positively influence how they interact with NativeCall and other things :) | 18:36 | |
TimToady | sure, we want to know where the sticky wickets are | 18:37 | |
18:38
kaare_ joined
|
|||
diakopter | raiph: u just looking to stimulate downvotes? :) | 18:39 | |
"57 seconds for a Rakudo build (used to be 1:15)" ... I thought it used to be 5-6 minutes | 18:42 | ||
jnthn | diakopter: That was talking about improvement in the space of a 1-2 week period... | 18:43 | |
diakopter | ah :) | ||
<- reading too slowly/quickly | |||
timotimo | i posted on that thread | 18:44 | |
jnthn | "Rakudo's speed/ram performance improves at fastest rate since optimization work began" makes a bunch of improvements that mostly affect compilation speed sound more general than many of them were, tbh. | 18:46 | |
They helped with some grammars. | |||
And of course, compilation speed influences how fast things feel. | 18:47 | ||
timotimo | did anybody build the rakudo-specific caphash thing yet? i seem to recall froggs did that? | ||
jnthn | timotimo: I didn't do it... | ||
I don't remember seeing it done but maybe it was. | |||
18:47
denis_boyun_ left
|
|||
timotimo | hmm, seems like i was wrong | 18:48 | |
hm. i'm sitting next to two 3d printers | |||
i don't have an idea what i could print, though :\ | |||
TimToady | obviously, another 3d printer | 18:49 | |
extra credit for working sex into it | |||
18:52
spider-mario left
|
|||
diakopter | want: "3d printer" that makes large things from duct tape and baling wire and glue and trash | 18:53 | |
timotimo | that would be way cool. | ||
TimToady | I thought you were supposed to feed those things to Mr Fusion | ||
masak | std: constant (a, b, c) = 1, 2, 3; | ||
camelia | std 81e0d07: OUTPUT«===SORRY!===Missing symbol in constant declaration at /tmp/T1vqsNO_Z3 line 1:------> constant ⏏(a, b, c) = 1, 2, 3;Missing initializer on constant declaration at /tmp/T1vqsNO_Z3 line 1:------> constant …» | 18:54 | |
TimToady | hey, enum has to be better at something | ||
on top of which, I really hate it when people use list initialization to set up a bunch of complete unrelated items, especially since it decouples the name from the value, unless you line them up on the next line | 18:57 | ||
so if the constants are in fact unrelated, I'd much rather see three constant declarations on three lines | |||
that's not to say we couldn't support the notation here, but I'm not in a hurry :) | 18:58 | ||
masak | *nod* | 19:00 | |
TimToady | but if the constants are in fact related, you might well get more bang for the buck out of an enum, like a typename | ||
masak | I just have a piece of code here with literally 10 lines, all starting with `constant` | ||
TimToady | maybe you should write a macro :P | 19:01 | |
masak | they're all constants, to be sure, but the JavaScript programmer in me helpfully suggested that those 10 declarations maybe could be 1. | ||
19:01
klaas-janstol joined
|
|||
masak | TimToady: that should totally be writable as a macro, yes. | 19:01 | |
by the way, I can feel my focus turn back to macros. I fully intent to bring that grant to completion. ^H | |||
though we already know we want something a fair bit different from what the grant talks about. | 19:02 | ||
(which is fine, IMO) | |||
timotimo | glad to hear it :) | ||
TimToady | Cool! I mean...Mu! | ||
19:08
darutoko left
|
|||
diakopter | want: macros that can use regex-genex-ish to permute names and types/formulas | 19:11 | |
masak | yeah, it's increasingly clear that macros should hook into the grammar level. | 19:12 | |
tadzik | timotimo: hehe, will try :) | ||
masak | right now we have them as hooking into (parsed) function calls, which is right for some things but not for a big class of things. | 19:13 | |
19:13
klaas-janstol left
19:14
AforAcronym left
19:17
guru joined
19:18
guru is now known as Guest22875
|
|||
tadzik | timotimo: do you happen to have a rakudobrew config for moar-jit? | 19:18 | |
19:18
Guest22875 is now known as ajr_
|
|||
timotimo | no; --moar-option=--enable-jit should be enough | 19:18 | |
you can supply that even for rakudo-Configure.pl | 19:19 | ||
19:19
ggoebel1111119 joined
|
|||
timotimo | hm. so what do i supply for bench time to get accurate data and lots of it? | 19:19 | |
19:20
ggoebel1111118 left
|
|||
timotimo | i suppose i'll up the --runs and up the --enough-time | 19:20 | |
tadzik | so master branches are alright? | 19:22 | |
timotimo | yes | ||
tadzik | awesome :) | ||
19:22
klaas-janstol joined
|
|||
timotimo | we merged moar-jit into master at the beginning of the week | 19:22 | |
jnthn | Aye. Still needs explicit --enable-jit, bu tit's in theer | 19:23 | |
so typing... | |||
tadzik | tit's in there? :> | 19:24 | |
I mean, :o | |||
diakopter | :O | ||
19:25
AforAcronym joined
|
|||
masak | IRC needs a spell checker. | 19:25 | |
19:26
nbrown joined
|
|||
timotimo | this might take a long while, but i have no use for my desktop otherwise. | 19:26 | |
timotimo runs rakudo-moar from 2014.01 through 2014.07 | |||
diakopter | (space heater)++ | ||
FROGGS_ | timotimo++ # levenshtein | 19:29 | |
masak | timotimo++ # levhensetin :) | 19:30 | |
19:30
nbrown left
19:32
klaas-janstol left
19:33
treehug88 left
|
|||
timotimo | diakopter: i'm far away from it at the moment, so it's of no consequence to me personally :) | 19:34 | |
dalek | kudo/nom: af5df3e | TimToady++ | src/core/Code.pm: Warn on Str(Code) coercion This almost always indicates a mistake, and the message can be suppressed by use of .gist or .perl, if the behavior is intended. |
||
TimToady | $ ./perl6 -e '*.name ~~ /pos/' | 19:39 | |
Code object coerced to string (please use .gist or .perl to do that in any !cursor_init at gen/moar/stage2/QRegex.nqp:598 | |||
dalek | kudo/nom: ed7e8d3 | TimToady++ | src/core/Code.pm: lost closing paren |
19:40 | |
19:40
ssutch joined
|
|||
TimToady | the traceback leaves something to be desired though | 19:40 | |
jnthn | Yes, I'm curious why it ends up there... | 19:41 | |
19:41
nbrown joined
19:42
nbrown_ joined
|
|||
TimToady | apparently doesn't escape nqp-land | 19:44 | |
a normal coercion produces a correct traceback, so somethingin QRegex maybe | |||
is there a CONTROL that is trapping warnings inadvertently? | 19:45 | ||
jnthn | Can't think of one | ||
19:45
nbrown left
|
|||
TimToady | well, you'd think it would just disappear in that case anyway | 19:45 | |
timotimo | m: next | 19:46 | |
camelia | ( no output ) | ||
timotimo | m: last | ||
camelia | ( no output ) | ||
TimToady | m: nextsame | 19:47 | |
camelia | rakudo-moar 287e49: OUTPUT«nextsame is not in the dynamic scope of a dispatcher in block at src/gen/m-CORE.setting:639 in block at /tmp/LqNijE9RBZ:1» | ||
19:47
nbrown_ left
|
|||
TimToady | m: say "here"; redo | 19:47 | |
camelia | rakudo-moar 287e49: OUTPUT«here» | ||
TimToady | o.O | ||
19:47
kaare_ left
|
|||
timotimo | haha, wat. | 19:47 | |
jnthn | m: say "here"; redo; say 'survived'; | ||
camelia | rakudo-moar 287e49: OUTPUT«here» | ||
FROGGS_ | it misses its handler and then exits | 19:48 | |
jnthn | hm, should be an error... | ||
timotimo | TimToady: i suppose you tried that in the repl, too? | ||
jnthn | Yes, it should end up in print_control... | ||
19:48
gfldex joined
|
|||
TimToady | well, our repl is still really just a total kludge | 19:49 | |
it wants to be integrated with the parser | 19:50 | ||
timotimo | gist.github.com/timo/2b490027d6473340e4e1 | ||
jnthn | bah...did it do a "redo" in the REPL loop and confuse itself? | 19:51 | |
timotimo | :D | ||
it'd really be good if our repl would be more clever, then the iperl6 kernel thingie wouldn't be as kludgy as well (hopefully) | |||
TimToady | we should rely on the parse to tell the repl when to execute the next top-level statement | 19:52 | |
jnthn | The REPL is one of the least changed things since I started working on Rakudo :) | 19:53 | |
TimToady | that would be a good mid-level project for someone trying to move on from LHF | ||
19:53
ventica2 left
|
|||
jnthn | aye | 19:54 | |
TimToady | basically, at the point where STD calls .moreinput is where the REPL would decide whether to E | ||
FROGGS_ | we have no .moreinput in rakudo :/ | 19:55 | |
(yet) | |||
TimToady | the L part is implicit in parsing statements at the top level | 19:56 | |
19:56
brrt joined
|
|||
TimToady | yes, that's one of the dusty corners where rakudo has yet to catch up to STD | 19:57 | |
FROGGS_ | hmmm, I almost think I've produced a measurable speedup of rakudo's stage parse O.o | ||
timotimo | well ... it'll have to parse a new statement and then directly execute it, even though it's not supposed to be BEGIN time ... no? | 19:58 | |
jnthn | FROGGS_: ooh? | 19:59 | |
20:00
brrt left
|
|||
FROGGS_ | jnthn: yeah, in method_def it does not call $*W.dissect_longname now when it sees a colonpair, it just builds the method name string like deflongname does it | 20:00 | |
TimToady | timotimo: well, it only happens at the top level, so unless there's something that has to happen at CHECK time (like deal with forward refs on sub calls), it's equivalent | ||
20:00
lichtkind left
|
|||
timotimo | ah | 20:00 | |
fair enough | 20:01 | ||
20:01
rurban1 left
|
|||
TimToady | and of course anything BEGIN that happens later will be out of sequence with what came before, but that's the price for a repl | 20:02 | |
the other tricky bit is going on when there's a parse error | 20:04 | ||
20:05
ventica joined
|
|||
TimToady | now I'm imagining a repl that can suspend on delayed decls "previous execution suspended on call to foo(); please define it to continue" | 20:06 | |
dalek | kudo/nom: 3c6bcff | (Tobias Leich)++ | src/Perl6/Actions.nqp: canonicalize method names with colonpairs, to fit grammar rule names We turned rule names like term:sym«<=» into term:sym<<=> internally but we forgot to do the same with action methods. This meant that when the rule matched the action method was *not* called. |
20:07 | |
TimToady | at some point a repl becomes a self-parody though | ||
the pythonistas haven't got the joke yet | 20:08 | ||
20:08
AforAcronym left
|
|||
FROGGS_ | >>> if you say so :o) | 20:09 | |
nwc10 | FROGGS_: I'm not quite following (what's new then) - is that commit a behaviour bugfix, or just a performance bug fix? | ||
FROGGS_ | nwc10: behaviour | 20:10 | |
m: grammar G { token TOP { <a> }; proto token a {*}; token a:sym«<foo>» { <sym> } }; class A { method a:sym«<foo>»($/) { say("awesome") } }; G.parse("<foo>", :actions(A) ) | |||
camelia | ( no output ) | ||
FROGGS_ | this is meant to say "awesome" | ||
nwc10 | are there tests for this? | ||
FROGGS_ | no | ||
nwc10 | oh. | 20:11 | |
jnthn | (But there should be... :)) | ||
FROGGS_ | as always :o) | 20:12 | |
PerlJam | FROGGS_: you've been working on that one for at least 3 days. FROGGS++ for finally finding and fixing it. | ||
20:12
rindolf left
|
|||
FROGGS_ | but yeah, I will add one in a sec... # nwc10++ :o) | 20:12 | |
PerlJam: well, I got a almost-fix yesternight, but was too tired | |||
jnthn | FROGGS_++ is a very persistent bug fixer :) | 20:14 | |
20:14
nbrown_ joined
20:15
jnap left
20:16
jnap joined
|
|||
timotimo | it sounds great that it also improves performance :) | 20:17 | |
20:18
zakharyas left,
nbrown_ left
|
|||
FROGGS_ | m: class Foo { method special_variable:sym['$<'] { } } | 20:18 | |
camelia | ( no output ) | ||
20:19
iarna left
20:20
iarna joined
|
|||
FROGGS_ | m: grammar Foo { token special_variable:sym["foo"] { } }; say Foo.^methods(:local) | 20:23 | |
camelia | rakudo-moar 287e49: OUTPUT«===SORRY!===Cannot find method 'ast'» | ||
FROGGS_ | (that is not due to my patch) | ||
20:26
spider-mario joined
20:31
mj41 joined
20:34
rurban1 joined
|
|||
dalek | blets: afdf4bb | (Herbert Breunung)++ | docs/tablet-4-operators.txt: even better ordering |
20:34 | |
kudo/nom: 50c7653 | (Tobias Leich)++ | src/Perl6/Actions.nqp: point out that we cannot handle all colonpairs yet Before a token foo:sym["bar"] leaked internal information, now it states that "bar" is too complex to use it as a name. This also makes the behaviour consistant in grammars and classes. |
20:38 | ||
20:38
kurahaupo_ joined
20:42
klaas-janstol joined
20:45
en is now known as eo
20:46
eo is now known as en,
rurban2 joined
|
|||
dalek | rl6-bench: 807c8e8 | jnthn++ | bench: Don't assume #! handling is portable. This is one tiny, easily applyable, improvement that helps get things working on Windows. |
20:47 | |
20:49
rurban1 left
20:54
colomon left
|
|||
dalek | ast: 20d6f3b | (Tobias Leich)++ | S05-grammar/action-stubs.t: test colonpairs in tokens/ation methods |
21:00 | |
21:03
colomon joined
21:04
nbrown_ joined
21:08
gfldex left,
nbrown_ left
|
|||
dalek | ecs: 3625f13 | (Stéphane Payrard)++ | S99-glossary.pod: Update S99-glossary.pod Added MI as short for Multiple inheritance (used in github.com/MoarVM/MoarVM/blob/mast...6opaque.h) |
21:10 | |
21:14
davido__ left
21:16
Mouq joined
|
|||
dalek | kudo/nom: b982bdd | Mouq++ | src/Perl6/Metamodel/BOOTSTRAP.nqp: Somewhat improve rare error |
21:19 | |
rl6-bench: 9ebd6cd | jnthn++ | timeall: A quotes fixup for invoking with Windows shell. |
21:21 | ||
rl6-bench: 32b35bf | jnthn++ | compilers.pl: Fix to cope with Perl 5 on Windows install path. Still have to build this quite manually on Windows for perl6-bench, but this does at least mean once you've done that it'll be invoked correctly. |
|||
21:22
aindilis joined
|
|||
TimToady | m: *.name ~~ /pos/ | 21:25 | |
camelia | rakudo-moar 3c6bcf: OUTPUT«Code object coerced to string (please use .gist or .perl to do that) in any !cursor_init at gen/moar/stage2/QRegex.nqp:598» | ||
Mouq | m: [ (1,2,3), (4,) ].tree.perl.say | 21:26 | |
camelia | rakudo-moar 3c6bcf: OUTPUT«(1, 2, 3, 4).list» | ||
Mouq | m: [ (1,2,3), (4,) ].tree(2).perl.say | ||
camelia | rakudo-moar 3c6bcf: OUTPUT«(1, 2, 3, 4).list» | ||
Mouq | ...? | ||
21:28
BenGoldberg joined
|
|||
Mouq | m: ( (1,2,3), (4,) ).tree(2).perl.say #wtf | 21:28 | |
camelia | rakudo-moar 3c6bcf: OUTPUT«(LoL.new(1, 2, 3).item, LoL.new(4).item).list» | ||
Mouq | That doesn't seem right at *all* | 21:29 | |
21:30
rurban2 left
|
|||
TimToady | [] flattens | 21:30 | |
m: ( (1,2,3), (4,) ).tree(1..2).perl.say | 21:31 | ||
camelia | rakudo-moar 3c6bcf: OUTPUT«(LoL.new(1, 2, 3).item, LoL.new(4).item).list» | ||
TimToady | m: ( (1,2,3), (4,) ).tree(1).perl.say | ||
camelia | rakudo-moar 3c6bcf: OUTPUT«LoL.new($(1, 2, 3), $(4,))» | ||
Mouq | m: ( (1,2,3), (4,) ).tree({$_ ~~ 1..2|).perl.say | 21:32 | |
camelia | rakudo-moar 50c765: OUTPUT«===SORRY!=== Error while compiling /tmp/CPznxAUEYiBogus statementat /tmp/CPznxAUEYi:1------> ( (1,2,3), (4,) ).tree({$_ ~~ 1..2|⏏).perl.say expecting any of: postfix infix stopper…» | ||
TimToady | m: ( (1,2,3), (4,) ).tree(1,2).perl.say | ||
camelia | rakudo-moar 50c765: OUTPUT«Cannot call 'tree'; none of these signatures match::(Any:U: *%_):(Any:D: *%_):(Any:D: Cool $count, *%_):(Any:D: &c, *%_) in block at /tmp/LfrM4zPY9s:1» | ||
Mouq | m: ( (1,2,3), (4,) ).tree({$_ ~~ 1..2}).perl.say | ||
camelia | rakudo-moar 50c765: OUTPUT«(Bool::True, Bool::False).list» | ||
BenGoldberg | m: say $(1..3); | ||
camelia | rakudo-moar 50c765: OUTPUT«1..3» | ||
TimToady | m: ( (1,2,3), (4,) ).tree(1000..1001).perl.say | ||
camelia | rakudo-moar 50c765: OUTPUT«(LoL.new(1, 2, 3).item, LoL.new(4).item).list» | ||
TimToady | that's +(1000..1001) :/ | ||
I don't think .tree is implemented anywhere close to spec yet | 21:33 | ||
last I knew, it could only do a lol impression | |||
dalek | p-js: 44817ff | (Pawel Murias)++ | src/vm/js/ (4 files): Pass test 7. Add a special $T_BOOL want type which produces something we can test for truth in javascript. QAST::Compiler.boolify is replaced with coersions to this type. Implement nqp::istrue, nqp::falsey, nqp::isle_n, nqp::concat. Add &ok and &plan to the mini-setting. |
21:39 | |
p-js: c75badb | (Pawel Murias)++ | src/vm/js/bin/run_tests: Add passing test 8 to run_tests. |
21:41 | ||
21:42
en left,
en joined,
en left
21:43
en joined
|
|||
dalek | ecs: 63a4830 | (Stéphane Payrard)++ | S99-glossary.pod: Glossary: opcode, role, stable... |
21:44 | |
Mouq | pmurias++ | 21:46 | |
dalek | ast: bf6c3cb | (Elizabeth Mattijsen)++ | integration/ (6 files): More dies_ok -> throws_like cleanup |
21:48 | |
21:50
kurahaupo_ left
21:54
rurban1 joined
|
|||
dalek | kudo/HyperWat: d7808f5 | Mouq++ | src/ (5 files): method postcircumfix:<( )> becomes method invoke per irclog.perlgeek.de/perl6/2014-07-08#i_8992020 |
21:56 | |
21:56
dalek left
|
|||
Mouq | Sorry dalek :( | 21:56 | |
21:57
dalek joined,
ChanServ sets mode: +v dalek
|
|||
Mouq | Relevant commit: github.com/rakudo/rakudo/commit/87...d16fc3566e | 21:57 | |
So that means that ** + 1 works, and ** + ** is the same as * + ** or ** + ** becase I don't know exactly what either of things should mean | 21:58 | ||
masak | the conservative thing would be to make it a compile error until we do know what they should mean :) | 21:59 | |
I'd rather we guess right later without having guessed wrong first. | |||
Mouq | I considered that, I was hoping there would be somekind of epiphany from #perl6 :) I guess that's the way to go for now | 22:00 | |
masak | Mouq: when I saw you write about it earlier today, I almost replied "no-one knows what ** does because no-one's ever implemented it". then I noticed that you *were* implementing it, so I didn't say anything. but I think it still holds. :) | 22:01 | |
TimToady | well, it makes no sense to write a subscript [1; **; 2; **; 3] either | ||
22:01
Rotwang left
|
|||
TimToady | so I think ** is 'non associative' | 22:02 | |
unless we go whole hog on pattern matching | |||
lizmat | TimToady: wrt to EVAL not poisoning | ||
wouldn't a simple flag already serve a lot of this? | |||
EVAL "foo" :clean | 22:03 | ||
EVAL "foo" :remedy # as opposed to poisoning | |||
TimToady | that does some of it, but I'm thinking more EVAL "$a", :uses<$a> | ||
er, '$a' | |||
lizmat | hehe.. -) | 22:04 | |
22:04
mj41 left
22:05
nbrown_ joined
|
|||
lizmat | OTOH, would an EVAL be able to deopt a previously jitted scope at runtime? | 22:05 | |
jnthn: ^^^ | |||
timotimo | we can deopt out of both jitted and spesh'd bytecode | 22:06 | |
masak | I had it as it never trying to opt in the first place if there's an EVAL in there. | ||
timotimo | and invocations get a deoptpoint | ||
the qast-level optimizer bails out when it sees EVAL | |||
lizmat | I'm more thinking on what I did earlier today: | ||
TimToady | I thought it had more to do with turning lexicals into locals | ||
timotimo | exactly | ||
jnthn | lizmat: Level error | ||
lizmat | EVAL "foo", :context(CALLER::CALLER::CALLER::CALLER::) | ||
timotimo | and inlining frames | ||
jnthn | lizmat: EVAL is about Perl6::Optimizer | 22:07 | |
timotimo | what TimToady said | ||
TimToady | and if you know which lexicals will be used in the EVAL, then a :uses<$a> can pessimize just that lexical | ||
22:07
rurban2 joined
|
|||
TimToady | alternately, if the intend of 'my $a' is to be used in an eval, we could mark it on that end | 22:07 | |
*tent | 22:08 | ||
jnthn | TimToady: "my $a is context" or whatever we call that nowadays is enough for that :) | ||
timotimo | maybe even "is dynamic" | ||
TimToady | well, but maybe we don't want to make it visible to callees | ||
lizmat is losing visibility and gets some sleep& | 22:09 | ||
TimToady | though I guess in the case of the testers it's off in a different scope anyway | ||
22:09
Ven joined,
nbrown_ left,
autark left
|
|||
TimToady | anyway, doesn't seem like it always needs to be an all-or-nothing decision | 22:09 | |
22:11
rurban1 left
|
|||
masak | CALLER::CALLER::CALLER::CALLER:: isn't worrying to me because it uses an internal thing. it's worrying because it couples that statement with the dynamic state of the call stack. (making refactors error-prone.) | 22:11 | |
22:11
ventica left
22:14
treehug88 joined
|
|||
Ven | o/o\o/, people. | 22:14 | |
masak | look behind you, a three-headed monkey! | ||
timotimo | hey ven! :) | 22:16 | |
enjoying your vacation? | 22:17 | ||
22:17
treehug88 left
|
|||
Ven | I pushed the learnxiny and am currently fighting with agda | 22:17 | |
so, yeah :D. | |||
diakopter | can you do anything with agda other than fight? | 22:23 | |
TimToady | masak: the fundamental problem with making the constant lookahead for the heredoc is that it violates the one-pass parsing rule | ||
masak | TimToady: yes, I realize that. | 22:24 | |
TimToady | in fact, STD used to do the lookahead like P5 does, and I rewrote it to avoid that :) | 22:25 | |
22:25
nbrown_ joined
|
|||
TimToady | in fact, the discussion at S02:4474 stems from that time | 22:26 | |
synopsebot | Link: perlcabal.org/syn/S02.html#line_4474 | ||
masak | there are a couple of cases where we deviate from one-pass parsing. | 22:27 | |
what would be the nasty WAT of doing it in this case, and allowing constants to have heredocs? | |||
dalek | kudo/HyperWat: adc2971 | Mouq++ | src/ (3 files): Make multiple **s or *s fail Also make HyperWhatever !== Whatever due to issues it caused with multis that had candidates for both |
||
masak reads that discussion | |||
right, that "slight restriction" is OK by me. | 22:28 | ||
and I realize `constant` has BEGIN semantics. | |||
but... still... I wouldn't have expected constant + q:to to fail. | |||
22:29
nbrown_ left
|
|||
TimToady | nobody expects the spanish influenza | 22:29 | |
masak | OK, let me put it like this: | ||
when this becomes a FAQ, what will be the recommended workaround? | 22:30 | ||
TimToady | put the ; after the END | ||
masak | huh. | ||
22:31
Psyche^ joined
|
|||
masak | OK, I can live with that, I think. | 22:31 | |
22:33
ivanshmakov| left
22:35
Psyche^_ left
22:38
ivanshmakov| joined
|
|||
dalek | ecs: 9a3ba4d | (Stéphane Payrard)++ | S99-glossary.pod: Update S99-glossary.pod too many changes to track. |
22:38 | |
Mouq | Getting @a[**] to work on an unshaped @a is really tricky... I'm not sure it should be allowed | ||
TimToady either, feel free to stub it out for now | 22:39 | ||
it would probably have to be based on deepmap semantics, if allowed | 22:40 | ||
22:40
rurban2 left
|
|||
TimToady compares the insides of his eyelids & | 22:46 | ||
22:46
pmurias left
22:48
ventica joined
|
|||
masak | 'night, #perl6 | 22:48 | |
22:48
klaas-janstol left
|
|||
dalek | kudo/HyperWat: 2856ec6 | Mouq++ | src/core/array_slice.pm: Uncomment NYI for ** in postcircumfix:<[ ]> |
22:49 | |
Mouq | 'night masak | ||
Ven | diakopter: no. There's actually a theory that says that, once your program typechecks, you don't gain any information running it :) | 22:51 | |
diakopter is familiar with this theory | 22:52 | ||
en | When this channel gets really quite for a prolonged period of time, dalek should yell "exterminate" into this channel. | 22:55 | |
tadzik | hah | ||
en | And on the offchance that a random number between 1 and 10 is 3, it yells "explain" into the channel. | 22:56 | |
Along with the previous statement. | |||
diakopter | "exterminate" is more a command-to-self than statement :p | 22:57 | |
dalek | ecs: fe908aa | duff++ | S99-glossary.pod: minor typos |
22:58 | |
timotimo | tadzik: did you try steroids jitted yet? :) | 22:59 | |
23:00
iarna left
|
|||
tadzik | timotimo: www.meemes.com/sites/default/files/...k=zlZ2eZAU | 23:00 | |
timotimo | :) | 23:02 | |
tadzik | it ran without problems, apparently | ||
timotimo | as it should | ||
tadzik | it seems to run at about the same speed as HEAD | 23:03 | |
2 "Too Slow" frames on jit vs 3 on HEAD | |||
and of course I played it differently each time | |||
I should design a steroids benchmark | |||
timotimo | did you build an MVM_JIT_LOG? | ||
tadzik | nope | 23:04 | |
23:04
iarna joined
|
|||
tadzik | how do I do that? | 23:04 | |
timotimo | env MVM_JIT_LOG=foobar.txt perl6-m ... | ||
tadzik | Segmentation fault (core dumped) | ||
:) | |||
timotimo: feather.perl6.nl/~tjs/foo.txt | 23:05 | ||
23:08
rom1504 joined
23:09
klaas-janstol joined,
klaas-janstol left
|
|||
timotimo | just adding the log should not make it segfault :\ | 23:10 | |
23:10
rom1504 left
|
|||
timotimo | oh | 23:10 | |
we haven't bumped moarvm/nqp recently | 23:11 | ||
at least existspos has been implemented. probably more importantly: paramnamesused | |||
23:13
raiph left
|
|||
timotimo | 6 BAIL: op <bool_I> | 23:15 | |
jnthn | May be easy. | ||
23:16
spider-mario left
|
|||
timotimo | add_sprite bails with getlex_no | 23:16 | |
23:18
klaas-janstol joined
|
|||
timotimo | remove_sprite does the same | 23:18 | |
div_In makes a Num method bail | 23:19 | ||
23:19
klaas-janstol left
|
|||
timotimo | wow, we get not only to speshing, but also to jitting METAOP_NEGATE | 23:22 | |
(fairly far towards the end, so it's probably barely prominent enough to make the cut or something | |||
23:26
jnap left,
bjz joined
23:42
grondilu left
23:43
kurahaupo joined
|