01:48 ilbot3 joined 06:37 leedo joined 07:48 zakharyas joined 12:51 zakharyas joined
dalek arVM/wrong_run_merge: 2f6a057 | timotimo++ | src/io/procops. (2 files):
wrong attempt to make :merge work properly.
16:34
timotimo i didn't realize i hadn't pushed that WIP stuff
(it also doesn't compile, i don't think) 16:35
18:28 FROGGS joined 20:20 zakharyas joined
timotimo i believe .VAR is only an actual operation if you directly call a method on the result, right? 20:52
moritz m: say (my $x).VAR ~~ Scalar 20:53
camelia rakudo-moar 02fdcf: OUTPUT«True␤»
moritz m: say (my $x) ~~ Scalar
camelia rakudo-moar 02fdcf: OUTPUT«False␤»
moritz disproven by example
timotimo ah, hmm.
zefram is giving me a hard time; i think i should explain to him that assignment will automatically decont the RHS 20:54
but maybe $a = $b.VAR should be a special case that doesn't decont before assigning?
moritz and what would the semantics be? 20:56
binding?
timotimo nah 20:57
put a scalar in your scalar
zefram seems to want that for some reason
moritz that sounds like a Bad Idea 20:58
because automatic decont only goes one level deep
timotimo m: my $a = 3; sub ss1($s, $nv) { say $s.VAR.DUMP }; ss1($a.VAR, 7)
camelia rakudo-moar 02fdcf: OUTPUT«▶▶3␤»
moritz and so decont stops being idempotent with such values 20:59
geekosaur zefram is looking for perl 5's $y = \$x; $$y = 4
moritz $y := $x; $y = 4
geekosaur this does not strike me as the right way to do that
timotimo feel free to contribute to the discussion, please 21:05
#128842 is the ticket this is being discussed under
synopsebot6 Link: rt.perl.org/rt3//Public/Bug/Displa...?id=128842
geekosaur my problem with that one, btw, is it feels a lot like the old perl 4 hack for "references" where you assigned a glob to a `local` 21:06
and, more generally, Scalar seems to be a second class citizen of sorts, or maybe an implementation detail that should not be exposed because it's not complete enough to be used outside of the implementation 21:07
see also recent discussion of how you "undo" a bind, which would be easy if you could bind to a new Scalar, but creating a new Scalar requires delving into NQP-land
(also it strikes me this doesn't really belong in #moarvm...) 21:08
timotimo you undo a bind by doing <>, don't you? 21:10
sorry, i mis-channed this here
geekosaur no, I mean once you have done my $a := $b; how do you make $a refer to an independent Scalar later 21:11
timotimo oh 21:12
$a := Scalar.new()
or $a := (my $)
geekosaur the latter was the hack I came up with. the former throws; Scalar.new is not designed to be used from Perl 6 21:13
timotimo hm
Proxy is, though. interestingly.
geekosaur you need to set a bunchg of bootattrs in NQP
timotimo oh, huh.
jnthn The answer really is "we'd really rather you don't meddle with that, and it's no accident we're not nailed it down very strongly in 6.c"
*we've
geekosaur or rather, ise NQP to create the attrs and they are then mandatory parameters to Scalar.new
jnthn We currently implement .VAR by just wrapping the thing in an extra layer of Scalar-ness 21:18
geekosaur yes, that's hat Zefram spotted
*what
jnthn And that means that anything that decontainerizes twice will get you back to the value.
Yes. Zefram loves details. :) 21:19
I don't know that this approach will survive for the long run. For now, it's "good enough".
And so far as I know we've not spectested ourselves into a corner on the issue. 21:20
geekosaur no, and I get the impression Zefram's trying to force it to be nailed down
jnthn Then he's going to have to wait. :)
I don't disagree it wants to be, but you can't prioritize everything at the same time. 21:21
And the trick will be figuring out a solution that doesn't just involve sticking more flags to check on every code path that touches an item. 21:25
Or at least, only doing that once we're really happy we can get rid of the checks again later.
It may be that we instead want to solve it by wrapping it up in some object with an interesting meta-object. 21:26
But that'd get a tad interesting once we start hitting .WHAT 21:27
m: my $a := 42; $a := my $; $a = 100; say $a 21:29
camelia rakudo-moar 02fdcf: OUTPUT«100␤»
jnthn That's how you can easily get a fresh Scalar btw. No Scalar.new required.
lizmat github.com/rakudo/rakudo/commit/552d9cb6b6 21:49
good night, #moarvm :-)
jnthn :) 21:50
'night