Perl 6 - the future is here, just unevenly distributed

IRC log for #moarvm, 2017-03-26

| Channels | #moarvm index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
00:01 vendethiel- joined #moarvm
00:15 vendethiel joined #moarvm
00:47 AlexDaniel joined #moarvm
01:03 AlexDani` joined #moarvm
01:42 samcv hello all
01:47 samcv looking at ticket
01:47 samcv "UTF-8 could be extended up to 0x108430ffff" (lol)
01:47 samcv i don't even think there's enough written languages in the history of the world to fill that space
01:47 samcv if we somehow magically knew all of them
01:47 Zoffix .oO( BREAKING NEWS: we made contact with extraterrestials and all of their quintillions of worlds... )
01:47 samcv :O
01:47 samcv well by then we will be advanced enough to go beyond the confines of java's UTF-16
01:49 ilbot3 joined #moarvm
01:49 Topic for #moarvm is now https://github.com/moarvm/moarvm | IRC logs at  http://irclog.perlgeek.de/moarvm/today
01:51 samcv can't be unicode because unicode would have to do it officially :P
01:51 samcv but maybe a font mapped to asci characters or something
01:51 samcv which would be unicode incompatible :P
01:54 geekosaur lots of PUA fonts...
01:54 geekosaur (how long have geeks been trying to get Tengwar into Unicode?)
01:56 geekosaur also I have been forever ruined by http://languagelog.ldc.upenn.edu/nll/?p=29480 :p
03:35 samcv wugs
03:35 samcv kind of looks like a baby chick
05:02 Voldenet joined #moarvm
05:03 Voldenet hello
05:03 Voldenet How would I introduce my own op into moarvm + nqp?
05:04 Voldenet I've tried doing this without docs on my own, but nqp gives me "Bytecode validation error"
05:05 samcv uhm. what steps did you take
05:06 Voldenet Here's the diff: http://ix.io/pgo
05:06 samcv in mvm you ran the script to add the op after editing that file right?
05:06 Voldenet then I've ran a tool to re-generate ops
05:06 Voldenet (easy to spot - moarvm didn't really compile without that)
05:06 samcv i think you're missing some stuff? not 100% sure. should look at the last few times i added ops
05:06 samcv sec
05:08 samcv Voldenet, https://github.com/MoarVM/MoarVM/commit/1a5ee0da6d7142a7405123dc93d1650fc52961c4 this is what mine looked like.
05:09 samcv uhm Voldenet did you add your op at the END
05:09 samcv before before the spesh ops?
05:09 samcv in src/core/oplist that is
05:09 samcv see where i added it if you scroll down a bit
05:09 Voldenet nope, I added my op directly after killprocasync
05:09 samcv then you run that script
05:10 samcv then you add it to interp.c
05:10 samcv yeah. so i would copy that op and then reset everything
05:10 samcv add it after the indexic_s op (which i think is currrently the newest op)
05:11 samcv then run tools/update_ops.p6
05:11 samcv then add it to interp.c
05:11 samcv 1. 2. 3. then once you've done that and nqp compiles properly i'll help you make sure it works on the nqp side
05:12 Voldenet okay, i'll follow those steps then
05:12 samcv ok great :)
05:12 samcv Zoffix, you ever get anything done for proposed MVM logo ;)
05:14 samcv Voldenet, in interp.c you can add it wherever you want after you run the update_ops.p6 script btw. but the oplist file is order sensitive. if you put it not at the end. it will change the mapping of the opcodes and everything breaks :)
05:17 Zoffix samcv: only in my head. "MoarVM" with first "M" stylized as a sitting dragon, with its tail following the rest of the letters and looping over "VM" with either the tail's arrow-like end forming part of top of "V" or something like that.
05:17 Voldenet Ah, I see. That's why it was not the best thing to do :)
05:18 samcv i may have made that mistake before. well at least i've made multiple mistakes over the time of adding ops
05:19 TimToady joined #moarvm
05:25 Voldenet it looks like it has built, now time to check out if it really works
05:26 Zoffix OOC what sort of op are you adding?
05:27 Voldenet i needed the pid out of process spawned
05:28 Voldenet 'spawn' op doesn't really have anything like that, but the 'spawnprocasync' actually returns the object which contains reference to libuv process
06:18 samcv .oO( wonders if we should have a “private use” area of MVM ops)
06:19 samcv they're 64 bit opcodes or 32bit?
06:19 samcv oh they're 16bit
06:21 samcv so room for 65,535 ops
06:22 Voldenet Hm, most of actual 'ops' use cases could be covered by native calls
06:35 Voldenet The thing I wonder tho is if I should try pushing changes without any special meaning just because of my use case
07:26 samcv Voldenet, i read a proposa for extension ops though
07:28 samcv https://github.com/MoarVM/MoarVM/blob/master/docs/extops.markdown
07:29 Voldenet that would simplify things a bit :)
07:40 domidumont joined #moarvm
07:44 domidumont joined #moarvm
09:23 timotimo samcv: we do have a "private use area" for mvm ops, it's called "extops", you can see how rakudo uses it in src/vm/moar/ops/
09:48 geekosaur joined #moarvm
10:05 domidumont joined #moarvm
10:40 geekosaur joined #moarvm
11:18 geekosaur joined #moarvm
11:38 geekosaur joined #moarvm
11:39 geekosaur joined #moarvm
11:52 geekosaur joined #moarvm
11:55 geekosaur joined #moarvm
11:58 geekosaur joined #moarvm
12:04 geekosaur joined #moarvm
12:13 geekosaur joined #moarvm
12:21 geekosaur joined #moarvm
12:28 geekosaur joined #moarvm
12:38 MasterDuke joined #moarvm
12:49 geekosaur joined #moarvm
12:57 geekosaur joined #moarvm
13:01 geekosaur joined #moarvm
13:03 geekosaur joined #moarvm
13:06 geekosaur joined #moarvm
13:28 geekosaur joined #moarvm
13:33 geekosaur joined #moarvm
13:37 geekosaur joined #moarvm
13:38 geekosaur joined #moarvm
14:06 Ven joined #moarvm
14:07 geekosaur joined #moarvm
14:14 geekosaur joined #moarvm
14:31 Ven_ joined #moarvm
14:58 zakharyas joined #moarvm
15:13 AlexDaniel joined #moarvm
15:20 Ven joined #moarvm
15:24 AlexDaniel samcv: “but maybe a font mapped to asci characters or something” that's what private use area is for :)
15:38 AlexDaniel ah
15:38 AlexDaniel blah, that's exactly what was mentioned in the next message :)
15:44 geekosaur :)
16:48 timotimo ascii and you shall receive
16:56 geekosaur better than pulling fonts out of your ascii, I guess
16:58 timotimo do you think some people deserve a solid asciiking?
17:05 MasterDuke ascii stupid question, get a stupid ansi
17:13 geekosaur joined #moarvm
17:14 timotimo *groan*
17:42 MasterDuke timotimo: you up for native attribute questions?
17:44 domidumont1 joined #moarvm
17:45 domidumont joined #moarvm
18:06 samcv good *
18:06 Zoffix \o
18:08 Zoffix .ask brrt if a largish method that's called thousands of times doesn't get speshed/jitted is there a way to find out what's preventing it?
18:08 yoleaux2 Zoffix: I'll pass your message to brrt.
18:09 lizmat Zoffix: are you aware of MVM_JIT_LOG ?
18:09 Zoffix Only in the terms of "giant file"
18:10 lizmat hehe...  well, you *can* see in there whether a callable was rejected for jitting,  but am not sure you can see why then
18:11 lizmat timotimo has more experience in that, I think
18:11 Zoffix Thanks. I'll take a look.
18:44 MasterDuke if i do `MVM_TRACING=1 perl6-m -e 'say "hi"'`, shouldn't i get some debugging output?
18:46 timotimo MasterDuke: i should have seen this question coming!
18:46 MasterDuke timotimo: heh, i gave fair warning
18:47 chsanch joined #moarvm
18:47 timotimo if a frame doesn't get speshed, it's difficult to figure out why
18:47 timotimo if a frame gets speshed but not jitted, that's easy
18:47 timotimo oh, i think we don't spesh when there's flattening involved
18:47 timotimo that's a hint
18:48 chsanch Hi!
18:48 timotimo hi
18:49 timotimo MasterDuke: i hope you'll not be too disappointed when it turns out i have no idea what i'm talking about :)
18:49 timotimo MasterDuke: where did you get MVM_TRACING from?
18:50 MasterDuke interp.c:97 `#if MVM_TRACING`
18:50 MasterDuke oh, there also `if (tracing_enabled) {`
18:50 MasterDuke inside the #if
18:53 chsanch I'm using rakudobrew in a pocketchip computer (armv7l), and I'm trying to build 2017.03 with the command: rakudobrew build moar 2017.03, but it failed, I posted the last lines of the log here: https://gist.github.com/chsanch/5c7ff94d3cc6052b021b12992bfd828a
18:54 chsanch I don't know if there is another way to build it besides rakudobrew, which is the tool I´ve using on other machines without any issue
18:54 MasterDuke chsanch: that sort of error is usually because you ran out of memory and the OOM killer killed it
18:55 chsanch oh, I see
18:55 MasterDuke you usually need ~2G available, or sufficient swap space to compensate (but that'll be pretty slow)
18:56 chsanch Ok, yah, well this computer just have 512M of RAM
18:57 MasterDuke i know people have built it on a raspberry pi, but they had to use swap
18:57 MasterDuke i don't know who it was, you might have a better chance asking in #perl6
18:58 chsanch Ok, thanks!
18:58 MasterDuke np
18:59 timotimo MasterDuke: you tell me how an environment variable can influence the #defines that were set at compile time :)
19:00 timotimo you need to both turn tracing on and enable that tracing thingie during runtime
19:02 MasterDuke hm, did a `make tracing install` but still no output
19:04 timotimo oh i didn't know about that target
19:05 MasterDuke from build/help.txt: `tracing    rebuild executable with tracing dispatch`
19:05 MasterDuke list of makefile targets
19:05 timotimo you will also want to disable the jit
19:06 MasterDuke wait, is that really doing what i think it's doing?
19:06 timotimo there's apparently a flag you have to pass to the moar part of the invocation
19:06 timotimo it's "--tracing"
19:06 timotimo so edit your perl6-m or nqp-m depending on what you want
19:08 timotimo i have no idea what you think it's doing :)
19:09 MasterDuke ok, finally kind of got it
19:11 MasterDuke anyway, what i'm really trying to do is figure out why `perl6-m -e 'class :: { has uint64 $.foo; }.new( foo => 9223372036854775807 )'` does a decont_i, instead of decont_u
19:12 MasterDuke i think the problem is more in nqp or rakudo, but i haven't been able to figure out where exactly
19:14 timotimo i can imagine it'd be in the buildallplan and such
19:14 timotimo inside of Mu.pm
19:21 domidumont joined #moarvm
19:29 MasterDuke joined #moarvm
19:31 MasterDuke in src/Perl6/Metamodel/BUILDPLAN.nqp i see this: `my $typespec  := nqp::objprimspec($_.type); if $typespec { @plan[+@plan] := [nqp::add_i(4, $typespec), $obj, $name, $attr_name]; }`
19:32 MasterDuke could i do something here with `if nqp::objprimunsigned($_.type) { <...> }`?
19:37 samcv what do you guys think of this PR i made yesterday? https://github.com/MoarVM/MoarVM/pull/563
19:37 samcv to improve error on trying to encode a surrogate to give a more informative answer
19:37 timotimo is objprimunsigned a thing?
19:39 samcv m: chr(0xD800)
19:39 camelia rakudo-moar b4d80c: OUTPUT: «WARNINGS for <tmp>:␤Useless use of "chr(0xD800)" in expression "chr(0xD800)" in sink context (line 1)␤»
19:39 samcv m: say chr(0xD800)
19:39 camelia rakudo-moar b4d80c: OUTPUT: «Error encoding UTF-8 string: could not encode codepoint 55296␤  in block <unit> at <tmp> line 1␤␤»
19:39 timotimo or do we have an p6int object that we can just ask? about its size and signedness?
19:39 samcv would change that to be: Error encoding UTF-8 string: could not encode Unicode Surrogate codepoint %d
19:40 samcv well in the case it's a surrogate at least. if it's not a surrogate it will still use the same generic message
19:40 MasterDuke m: use nqp; say nqp::objprimunsigned(uint64)
19:40 camelia rakudo-moar b4d80c: OUTPUT: «1␤»
19:40 MasterDuke m: use nqp; say nqp::objprimunsigned(int64)
19:40 camelia rakudo-moar b4d80c: OUTPUT: «0␤»
19:42 timotimo oh! neat.
19:45 MasterDuke used exactly once in nqp
19:45 MasterDuke and not at all in rakudo
19:46 MasterDuke afk for a bit &
20:01 samcv gonna improve the out of bounds error too
20:01 samcv 99999999.chr
20:01 samcv Error encoding UTF-8 string: could not encode codepoint 199999999, codepoint out of bounds. Cannot encode higher than 1114111
20:02 samcv timotimo, what do you think i should say here? Highest Unicode codepoint is 1114111? and previously it didn't use hex just decimal so it makes sense to do the same for the highest cp
20:02 samcv m: 99999999.chr
20:02 camelia rakudo-moar b4d80c: ( no output )
20:02 samcv m: 99999999.chr.say
20:02 camelia rakudo-moar b4d80c: OUTPUT: «Error encoding UTF-8 string: could not encode codepoint 99999999␤  in block <unit> at <tmp> line 1␤␤»
20:07 timotimo the questions confuses me
20:13 samcv want to change the errror to "Error encoding UTF-8 string: could not encode codepoint 199999999 (0xBEBC1FF), codepoint out of bounds. Cannot encode higher than 1114111 (0x10FFFF)"
20:13 samcv does that sound good to you
20:17 timotimo sure
20:19 samcv k
20:20 samcv good to have it tell you why it can't encode something
20:46 timotimo joined #moarvm
20:50 MasterDuke timotimo: back again. i know nothing about build plans, what does that `nqp::add_i(4, $typespec)` in the first element mean/do?
20:51 timotimo hm, let's see
20:51 timotimo oh, you know that all the things in the buildplan are documented in Mu.pm?
20:52 timotimo oh, no, at the top of BUILDPLAN.nqp
20:52 timotimo okay, you know how objprimspec gives 0, 1, or 2?
20:52 timotimo or 3
20:52 timotimo 224539   florolf │ aber daran hat sich eigentlich auf vaporsound-seite nix geaendert
20:53 timotimo 224543    niklas │ florolf: hab schon 3x rebootet
20:53 timotimo 224547    niklas │ hmpf
20:53 timotimo ... that's not what i put into this paste buffer
20:53 timotimo #   5 class name attr_name = set a native int attribute
20:53 timotimo #   6 class name attr_name = set a native num attribute
20:53 MasterDuke heh, was going to say, i don't know german either
20:53 timotimo #   7 class name attr_name = set a native str attribute
20:53 timotimo if the primspec is 1, you end up with 5, that means "set a native int attribtue"
20:54 timotimo if the primspec is 2, nu, if the primspec is 3, str
20:54 MasterDuke hm, don't see any signed vs unsigned options there
20:55 timotimo yup
20:56 timotimo i expect the last time this was touched unsigned wasn't A Thing yet
20:56 timotimo m: use nqp; say nqp::objprimunsigned(str)
20:56 camelia rakudo-moar c3c849: OUTPUT: «0␤»
20:56 timotimo m: use nqp; say nqp::objprimunsigned(int)
20:56 camelia rakudo-moar c3c849: OUTPUT: «0␤»
20:57 timotimo m: use nqp; say nqp::objprimunsigned(uint)
20:57 camelia rakudo-moar c3c849: OUTPUT: «0␤»
20:57 timotimo m: use nqp; say nqp::objprimunsigned(uint32)
20:57 camelia rakudo-moar c3c849: OUTPUT: «1␤»
20:57 timotimo then what is uint?
20:58 MasterDuke that's annoying
20:58 timotimo what is?
20:59 MasterDuke that uint is wrong
20:59 MasterDuke or at least seems wrong
21:00 timotimo yeah, does seem wrong, doesn't it
21:00 timotimo m: use nqp; say nqp::objprimunsigned(byte)
21:00 camelia rakudo-moar c3c849: OUTPUT: «1␤»
21:00 timotimo m: use nqp; say nqp::objprimunsigned(uint8)
21:00 camelia rakudo-moar c3c849: OUTPUT: «1␤»
21:01 timotimo how in the frick?
21:01 timotimo must be a bug when you specifiy "unsigned" but no "bytesize"
21:01 MasterDuke `const MVMStorageSpec *ss = REPR(type)->get_storage_spec(tc, STABLE(type)); GET_REG(cur_op, 0).i64 = ss->boxed_primitive;`
21:02 MasterDuke that's the meat of `OP(objprimspec): {`
21:02 MasterDuke oh, i'm looking at objprimspec, not objprimunsigned
21:02 MasterDuke `const MVMStorageSpec *ss = REPR(type)->get_storage_spec(tc, STABLE(type)); GET_REG(cur_op, 0).i64 = ss->boxed_primitive == 1 ? ss->is_unsigned : 0;`
21:03 timotimo i see what's wrong
21:03 timotimo https://github.com/MoarVM/MoarVM/blob/master/src/6model/reprs/P6int.c#L158-L159
21:03 timotimo can you spot it?
21:04 MasterDuke repr_data->bits isn't set if you don't explicitly name it?
21:04 MasterDuke in the type i mean
21:04 timotimo that's right
21:04 timotimo well, i expect it to be the case
21:05 timotimo there's .^set_nativesize and .^set_unsigned
21:06 timotimo $!nativesize inside Perl6::Metamodel::NativeHOW is an object, so it can be a null object
21:06 timotimo but it looks like it sets nativesize to 0 by default
21:07 MasterDuke wait, it's just making the storage spec with the contents of ->is_unsigned, which is getting set with MVM_repr_get_int(tc, is_unsigned_o);
21:07 timotimo what is?
21:08 MasterDuke line 158-159
21:09 timotimo the point is that the if condition prevents this from happening if you don't have "is nativesize" on the type
21:10 MasterDuke so why doesn't uint cause a .^set_nativesize and .^set_unsigned
21:11 timotimo because it dosen't have a "is nativesize" in its definition
21:11 timotimo look at rakudo's src/core/natives.pm
21:11 MasterDuke ah
21:11 MasterDuke interesting
21:12 timotimo i wonder what the motivation behind being able to have a nativesize of 0 is
21:14 MasterDuke to use the machine default of wherever it was compiled?
21:16 timotimo oh, i see
21:17 timotimo there's the default_storage_spec that gets returned if repr_data->bits is set to 0
21:17 timotimo so by setting unsigned but no size, we're signaling "use the default" even though the default is actually signed
21:17 timotimo so That's Wrong™
21:19 MasterDuke ah, so any fix for e.g., uint64, would probably not have worked for uint?
21:20 MasterDuke so it should be `if (repr_data->bits) mk_storage_spec(tc, repr_data->bits, repr_data->is_unsigned, &repr_data->storage_spec); else mk_storage_spec(tc, sizeof(MVMint64) * 8, repr_data->is_unsigned, &repr_data->storage_spec);`?
21:24 timotimo huh? why a fix for uint64?
21:24 timotimo uint64 already works though?
21:24 timotimo no, that's not what it should be, i don't think
21:25 timotimo i imagined it more like "if repr_data->bits or repr_data->is_unsigned { make_storage_spec }"
21:27 MasterDuke i meant a higher level fix for uint64 as an attribute type might not have worked for uint
21:28 MasterDuke m: class :: { has uint64 $.foo; }.new( foo => 9223372036854775808 ).foo.say
21:28 camelia rakudo-moar ca2a77: OUTPUT: «-9223372036854775808␤»
21:28 MasterDuke e.g., ^^^
21:29 timotimo oh, right
21:29 timotimo yes, it's true
21:29 timotimo luckily you've been using uint64 all the time
21:35 MasterDuke hm, just changing to `if (repr_data->bits || repr_data->is_unsigned)` still gives 0 for uint
21:36 timotimo oh
21:36 timotimo when we find out that ->bits is 0, but is_unsigned is 1, we'll want to use the same value for size and alingment as the default storage spec does
21:37 timotimo i'd put that logic into an else branch of the !MVM_is_null(tc, bits_o)
21:37 timotimo with an extra if
21:44 MasterDuke hm, turns out none of that code at all is called when you do `perl6-m -e 'use nqp; say nqp::objprimunsigned(uint)'`
21:49 MasterDuke oh, i need to rebuild rakudo
21:55 MasterDuke ugh, i've gotten used to not having to rebuild rakudo when making moarvm changes
22:03 timotimo you're right
22:03 timotimo it's most probably coming from the serialized blob
22:03 timotimo and that code is only run when you compile nqp
22:05 timotimo that whole thing we were just looking at is part of the compose dance-and-song
22:06 timotimo the traits "is unsigned" and "is nativesize" will set attributes on the NativeHOW
22:06 timotimo when the { } of the class (that you use these traits on) closes, rakudo will call compose on the HOW
22:06 timotimo that's what you see in NativeHOW; it creates a nqp::hash it calls $info
22:07 timotimo that's the very same hash that we get in as MVMObject *info_hash in static void compose
22:07 MasterDuke because my earlier testing was without rebuilding nqp/rakudo, i just tried this: after the `if (repr_data->bits)` i added `else if (repr_data->is_unsigned)`, but that else if branch never gets called
22:07 timotimo does that help?
22:07 timotimo aaah
22:07 timotimo yes, need to recompile nqp
22:07 MasterDuke it does, thanks
22:07 timotimo well, that or rakudo
22:07 MasterDuke did both to be sure
22:07 timotimo or create a new class yourself that has the P6int repr and nativesize and/or unsigned
22:07 timotimo ok, it's still not getting called?
22:08 MasterDuke still not getting called
22:09 MasterDuke also, i just tried `my native   blash is repr('P6int') is Int { }`, but it complains it doesn't know P6int
22:09 timotimo huh, ok, how about the whole function in general?
22:09 timotimo oh
22:10 timotimo WFM
22:10 MasterDuke oops, that was a shell quoting error
22:10 timotimo did you accidentally use perl6 -e with '' and then put '' inside is repr, too?
22:10 timotimo yeah, F the shell
22:13 MasterDuke ok, added fprintfs in those two branches and added a final else with an fprintf also, now rebuilding
22:15 MasterDuke `my native foo is repr("P6int") is Int { }` never prints at all
22:15 MasterDuke `my native foo is repr("P6int") is Int is unsigned { }` doesn't print either
22:16 timotimo you're right, and i'm confused
22:16 MasterDuke `my native foo is repr("P6int") is Int is nativesize(32) { }` does print in the if (repr_data->bits) branch
22:17 MasterDuke so why isn't compose() being called at all for the first two?
22:17 timotimo could it be that it deduplicates equivalent classes?
22:17 timotimo oh, another interesting tidbit
22:18 timotimo NativeHOW won't call compose at all unless you have nativesize set
22:18 timotimo so that wants a check for unsigned, too
22:18 MasterDuke ah, then that would explain that
22:18 MasterDuke so int, uint, and num aren't getting composed at all?
22:19 timotimo hm, does NatveHOW also get used for num?
22:19 timotimo oh, yes, indeed
22:20 timotimo anyway, i think i'll head off to bed
22:20 timotimo i think we made some progress on stuff!
22:20 timotimo you got an idea what to do regarding the buildplan?
22:20 MasterDuke maybe
22:21 timotimo i'd suggest adding a new opcode to the end, i.e. decide on a new number to use for "set unsigned int attribute"
22:22 timotimo then if the objprimspec is 1 (aka int) but it's also objprimunsigned, you use that number instead of 4 + objprimspec-return-value
22:22 timotimo and inside the two or more "interpreters" for buildplans you add a case that handles that
22:22 MasterDuke not add an if inside the int case?
22:23 MasterDuke do you think this decont is the problem one? https://github.com/rakudo/rakudo/blob/nom/src/core/Mu.pm#L213
22:23 timotimo there is no int case
22:24 timotimo you're looking at the wrong spot
22:24 timotimo i was talking about BUILDPLAN.nqp
22:25 timotimo just like the decision between "is this native int, native num, or native string?" is encoded into the buildplan by BUILDPLAN.nqp, i suggest you give it a new number
22:25 MasterDuke yeah, i meant instead of create a new op for "set unsigned int attribute", check for unsignedness where "set int attribute" is done
22:26 timotimo i.e. the "nqp::if( # 5" you have there, that's the one for "signed int attribute"
22:26 timotimo and later on you'd add an "nqp::if # 99" for "unsigned int attribute"
22:26 timotimo i can't imagine how you could do that in a cheap way there?
22:27 MasterDuke ok, but what i need to differently, whether in a different op or not, is use a decont_u instead of decont
22:27 timotimo like, would you "if self.^attributes.grep(*.name eq $attrname).is_unsigned { bindattr_u } else { bindattr_i }"?
22:27 MasterDuke *do differently
22:28 timotimo that part i don't know anything about :)
22:28 timotimo i thought it'd have to stay "decont", but become bindattr_u instead of bindattr_i
22:28 timotimo you know that part better than me
22:29 MasterDuke probably that too, but `class :: { has uint64 $.foo; }.new( foo => 9223372036854775808 ).foo.say` dies in a decont_i for me (and will for camelia with the next moar/nqp bump)
22:30 MasterDuke thanks for the help, good luck sleeping, and i'm sure i'll bother you again tomorrow
22:30 timotimo yes, i'm glad i've been minimally useful
22:30 timotimo please also consider:
22:31 timotimo the code you're looking at, the one in Mu.pm, that's run every single time a .new (or rather, a bless) is called
22:31 timotimo i.e. if i have a class Point { has int $.x; has int $.y } and i Point.new($_, $_) for ^100_000 it better not become any slower from your patch :)
22:32 MasterDuke heh, i'll attempt to be more correct and also no slower
22:35 timotimo it'll be easy if you do it the way i described, with the new number that's generated in BUILDPLAN.nqp and checked in Mu.pm
22:35 MasterDuke yeah, starting to try it out now
22:36 timotimo yays
22:36 timotimo in the future, we'll actually generate a proper code object for executing the buildplan
22:36 timotimo i tried to do that already, but i got quite mysterious errors
22:36 timotimo anyway, bedtime!
22:37 MasterDuke oh, ugh, there is no bindattr_u
22:38 MasterDuke well, i'll create one and see what happens
22:40 MasterDuke arg, also no getattr_u, could add one of those as well. i've been down this path before...
22:47 Voldenet joined #moarvm
22:47 Voldenet joined #moarvm
23:29 agentzh joined #moarvm
23:29 agentzh joined #moarvm

| Channels | #moarvm index | Today | | Search | Google Search | Plain-Text | summary