Welcome to the main channel on the development of MoarVM, a virtual machine for NQP and Rakudo (moarvm.org). This channel is being logged for historical purposes.
Set by lizmat on 24 May 2021.
Nicholas [* GOOD *] 07:38
lizmat And yet another Rakudo Weekly News hits the Net: rakudoweekly.blog/2022/02/14/2022-...-released/ 15:57
m: use nqp; say nqp::iseq_i(my uint $ = 18446744073709551615,-1) # nine, I wonder if we're also going to need iseq_u and related ops 16:11
camelia 1
timo iseq_ui you mean? 16:43
nine I'm not sure that would be useful. If there was an nqp::iseq_u, then if you have to variables with values 18446744073709551615 and -1 respectively and you wanted to compare them with iseq_u, you'd have to type cast the int to uint first (QASTCompilerMAST will do that for you) and the result would still be the same, i.e. true. 21:34
lizmat I was more thinking an iseq_u would first check whether the sign bit is the same when given mixed uint int types 21:46
if they are not the same, then the values are not the same
when given two ints or two uints, just compare the bits
does that make sense? 21:47
nine No, it doesn't, because the op mandates what the input types are and an iseq_u would obviously take 2 uints and that's what the compiler has to give it 22:06
japhb nine: I think that may be why timo commented about iseq_ui
nine So the compiler has to generate the coercion code and then the iseq_u op cannot know that 18446744073709551615 once was -1
So the compiler has to generate the coercion code and then the iseq_u op cannot know that 18446744073709551615 once was -1 22:07
japhb To check if a uint and an int were the same
nine indeed
lizmat nine: ok, I now understand the problem :-) 23:23