AlexDaniel japhb: alright 00:09
can you file a bug report?
japhb: or maybe share your findings here?
u: butterfly 00:14
unicodable6 AlexDaniel, U+1F98B BUTTERFLY [So] (🦋)
AlexDaniel japhb: see this: 00:59
japhb: I'd appreciate if you can test it and get back to me
01:22 Kaiepi left, Kaiepi joined 01:24 AlexDani` joined 01:29 AlexDaniel left 01:30 AlexDani` is now known as AlexDaniel, AlexDaniel left, AlexDaniel joined
japhb AlexDaniel: Sorry, lost connectivity for a while. Taking a look at your link. 02:25
Hmmm, OK, will try using earlier zef. Strange that that would work, but *shrug* 02:26
03:34 squashable6 left 03:35 squashable6 joined 04:35 notable6 left, releasable6 left, squashable6 left, evalable6 left, tellable6 left, greppable6 left, unicodable6 joined, quotable6 joined 04:36 bisectable6 joined 04:37 squashable6 joined, statisfiable6 joined, notable6 joined, shareable6 joined, greppable6 joined, reportable6 joined, coverable6 joined 04:38 bloatable6 joined, tellable6 joined, benchable6 joined, committable6 joined, evalable6 joined, releasable6 joined, nativecallable6 joined 06:37 unicodable6 left, releasable6 left, nativecallable6 left, tellable6 left, notable6 left, greppable6 left, reportable6 left, quotable6 left, statisfiable6 left, bisectable6 left, coverable6 left, shareable6 left, evalable6 left, benchable6 left, bloatable6 left, committable6 left, squashable6 left 06:38 benchable6 joined, committable6 joined, releasable6 joined, quotable6 joined, squashable6 joined, statisfiable6 joined 06:39 notable6 joined, bisectable6 joined, bloatable6 joined, coverable6 joined, tellable6 joined, evalable6 joined, unicodable6 joined, shareable6 joined, nativecallable6 joined 06:40 reportable6 joined, greppable6 joined
japhb AlexDaniel: Added comment to bug. zef 0.7.4 worked first try; I'm a bit worried that this means the newer zef was revealing a real problem in rakudo, and the older one just doesn't happen to trigger the bug. 07:46
But at least now I have a workaround for my immediate issue.
07:57 ExtraCrispy left
MasterDuke huh. if i do `zef --list installed` i get a bunch of identities. but if i then do `zef uninstall <any of the previously listed identities>` i get "!!!> Found no matching candidates to uninstall" 08:05
even for ones where it's just a single bare word (i.e., no ver, auth, or api specified) 08:06
pmurias: ah, `./nqp-j nqp-truffle.nqp -e 'sub foo() { say("hi") }; my $a := &foo; nqp::setcodename($a, "bar"); say(nqp::getcodename($a))'` prints "bar". so when i explicitly call nqp::setcodename then nqp::getcodename works 10:40
tellable6 MasterDuke, I'll pass your message to pmurias
MasterDuke hm, so does moarvm call setcodename when creating a sub? or does the name get set some other way? 10:49
also works on regular jvm without explicitly calling setcodename... 10:50
10:58 ExtraCrispy joined 11:01 redable joined 11:12 ExtraCrispy left 11:13 redable left
MasterDuke ah, for the regular jvm version it's part of the CodeRef constructor 11:20
11:21 ExtraCrispy joined
[Tux] Rakudo version 2019.07.1-449-gefd7146c4 - MoarVM version 2019.07.1-305-g71af77b5c
csv-ip5xs0.720 - 0.760
csv-ip5xs-206.311 - 6.678
csv-parser21.299 - 21.445
csv-test-xs-200.423 - 0.431
test7.105 - 7.162
test-t1.749 - 1.880
test-t --race0.832 - 0.859
test-t-2029.966 - 31.959
test-t-20 --race9.413 - 11.174
11:45 redable joined 11:52 redable left 12:58 ExtraCrispy left
Geth_ nqp/truffle: 5d88bd949a | (Daniel Green)++ | 4 files
[truffle] Implement (g|s)etcodename

However, currently getcodename only works if you've explicitly called setcodename on the code ref first. Setting the name needs to be added to the NQPCodeRef constructor (which is easy), but actually getting a real value to put in there I haven't figured out how to do yet, and may require implementing something like CodeRefAnnotation in/for truffle.
13:15 squashable6 left 13:16 squashable6 joined
MasterDuke hm. the truffle currently has a couple different types of blocks it creates (Block, StaticBlock, ForcedOuterBlock). i somehow need to know when a block is a sub or method vs a non-named block 13:16
13:21 lucasb joined
MasterDuke is that going to be a new block type? or a new constructor to the existing type(s)? 13:27
oh, nqp creates a regular block, but just binds a new lexical with the sub's name? 13:33
13:34 ggoebel left
samcv wondering if anyone can help me a bit with this code. i am getting 'This type (List) does not support positional operations' which is an error created by MoarVM. it says it happened on line 47, but i don't think the number is telling the truth, because when i add print statements it's not there the error in generated 14:12
this file
my $pattern-prepends := nqp::atpos($pattern-parts, 0); is i guess where the warning where it came from, wondering if there is a better way other than putting prints every other line 14:18
14:34 evalable6 left 14:36 evalable6 joined 15:13 evalable6_ joined, evalable6_ left 15:15 tellable6 left, evalable6 left 15:16 tellable6 joined, evalable6 joined
timotimo samcv: you probably need to get the $!reified or whatever attribute of the object 15:18
line numbers with heavily nqp-ified code are often not right 15:19
so even if you can breakpoint the error position in gdb, the stacktrace isn't very helpful. but maybe MVM_dump_bytecode(tc) can help
15:23 Voldenet left 15:28 Voldenet joined, Voldenet left, Voldenet joined
samcv timotimo, i think it's because i have a helper `sub get-parts`, so it turns into a p6 object. is there a way I can have a sub but without p6ifying it? 15:35
timotimo is there something like nqp::invoke?
i think using nqp ops to invoke something was in some circumstance the right way to prevent hllization of arguments
samcv timotimo, hmm. there is nqp::callmethod. but idk about subs? 15:39
maybe nqp::getlexcaller('&get-parts') and nqp::call?
timotimo i'd have to try myself, but i'm working on other moar stuff right now 15:40
samcv it's refered to once in the callmethod nqp routine, but not documented in ops.markdown
timotimo how do i even compile. and how do i read bytecode. and why am i deadly tired even after having an energy drink 16:08
ahahaha, it helps to run the code you're working on instead of the version you had installed 16:10
AlexDaniel kawaii: hello? :) 16:14
16:43 pmurias joined
pmurias timotimo: hllization of arguments is done on the callee side 16:43
tellable6 16:44
timotimo ah dang
AlexDaniel so what's the actual limit 16:45
wow that fits
01234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345 16:58
.seen AlexDaniel
tellable6 AlexDaniel,
pmurias MasterDuke: the name of the block is on QAST::Block as name 17:00
MasterDuke: anonymous blocks just get a "" name 17:08
MasterDuke pmurias: i see NQPCodeRefs getting created at and,91,100 17:56
but i don't know where to get a name from to add to those calls (assuming i add a name parameter to the NQPCodeRef constructor) 17:58
pmurias looks into that 18:16
japhb has discovered that ... GAH! ... the incredibly infuriating crash he beat on for hours was actually a trivially testable precomp bug. 18:17
Except by "trivially testable" I mean "take the original script, copy it entirely into a module, change sub MAIN to `is export`, then create a new script that contains only `use Module;` and nothing else, watch everything break, add `no precompilation;` to the module, watch everything work." 18:18
Now to figure out how to turn the several hundred line script, and the hundreds of lines of libraries *it* depends on, into a short test case. 18:19
japhb wonders if caffeine qualifies as "liquid courage" 18:20
pmurias MasterDuke: you see the @Deserializer annotation? When we are deserializing TAST (see --target=tast) the things that's annotated with it gets the tast elements
japhb AlexDaniel: Oh wait, my bug may actually be fixed. It looks like the fix for MoarVM #1209 fixed Rakudo #2897 and we just need a bump? 18:28
Not sure that's the same problem as I'm facing, but it looks similar.
MasterDuke pmurias: `Unknown compilation target 'tast'` 18:35
18:38 tobs joined
MasterDuke pmurias: ah-ha! i had my --target before the 'nqp-truffle.nqp' 18:40
pmurias MasterDuke: so if you add $new_arg something to a$type, [$op, $arg1, $arg2, $new_arg...]) in Truffle.nqp you than add need to add it to the thing with the corresponding @Deserializer 18:42
MasterDuke pmurias: so i might need to do something like somewhere? 18:46
oh. or add a '$!name' here ? 18:48
pmurias MasterDuke: don't $!name to BlockInfo 19:03
* don't add
the name is available as $! if it's ever need from there 19:04
(BlockInfo is stored in $*BLOCK and contains the stuff we infer about the block we are compiling) 19:05
MasterDuke: I would add it without wrapping it into an ['sval'] like 19:06
MasterDuke thanks, i'll give that a try 19:07
pmurias src/vm/jvm/dsl contains the code responsible for generating code from the @Deserializer annotations 19:10
(if you are curious how that works but that's fairly boring code) 19:12
MasterDuke should it be `@tree.push($` instead? 19:16
this seems like it should be simple and i'm just not connecting some dots... 19:19
pmurias MasterDuke: yes 19:23
MasterDuke how come NQPBlockNodes don't have a name and cuid? 19:24
pmurias names are just NYI 19:26
MasterDuke ah, but that's where it belongs? 19:27
pmurias MasterDuke: yes I would put add the name there 19:29
the cuid isn't put on NQPCodeRef because that's not needed atm 19:30
MasterDuke ah 19:32
ok, so i've added a name (with default value of '') to NQPBlock and NQPCodeRef and now `./nqp-j nqp-truffle.nqp -e 'sub foo() { say("hi") }; my $a := &foo; say(nqp::getcodename($a))'` just prints that empty string instead of dying 19:37
Geth_ nqp: 40ffec8194 | (Aleks-Daniel Jakimenko-Aleksejev)++ | tools/templates/MOAR_REVISION
[MoarVM Bump] Brings 5 commits

MoarVM bump brought: 0b531f9ce say hello to MVM_CONFPROG_DEBUG env var 71af77b5c Merge pull request #1209 from vrurg/rakudo_2897_fix 8a5cc88a7 Re-fix the previous fix af76729dc Fix incorrect conditional 59fa3b822 Fix for run-away CORE context on closures
rakudo: 7e3d023b4b | (Aleks-Daniel Jakimenko-Aleksejev)++ | tools/templates/NQP_REVISION
[NQP Bump] 40ffec819 [MoarVM Bump] Brings 5 co […]

NQP bump brought:
MasterDuke pmurias: so i somehow need to modify the generated create*Block() calls in bin/org/perl6/nqp/truffle/ and bin/org/perl6/nqp/truffle/adapters/ 19:39
19:52 redable joined, pmurias left
AlexDaniel japhb: bumped, can you test it? 19:53
japhb: this is different from the zef issue, correct? 19:54
19:54 pmurias joined
pmurias MasterDuke: how do you want to modify that? 19:55
MasterDuke pmurias: to add a name parameter. and just got it working 19:56
`./nqp-j nqp-truffle.nqp -e 'sub foo() { say("hi") }; my $a := &foo; say(nqp::getcodename($a))'` now prints 'foo'
pmurias awesome
MasterDuke doing a (not so) quick to confirm that didn't break anything... 19:59
20:01 lucasb left
Geth_ nqp/truffle: a76b34f5e3 | (Daniel Green)++ | 5 files
[truffle] Add support for a Block's name

nqp::getcodename now works without requiring nqp::setcodename to be explicitly called beforehand.
MasterDuke pmurias: ^^^ please take a look and make sure i didn't do anything terrible
pmurias MasterDuke: looks fine, thanks 20:05
Geth_ nqp/truffle: e99b653d3e | (Paweł Murias)++ | src/vm/jvm/runtime/org/perl6/nqp/truffle/nodes/control/
[truffle] Remove unused default value
MasterDuke cool 20:07
Geth_ nqp/truffle: 8b50ad70ee | (Paweł Murias)++ | 2 files
[truffle] Turn fields that shouldn't be public into private ones
20:13 pmurias left 20:14 pmurias joined
MasterDuke huh. why does an nqp version of jnthn's Point benchmark take 2s when the perl6 version takes 0.5s? 20:21
20:27 Kaeipi joined 20:28 Kaiepi left 20:30 redable left
MasterDuke pmurias: any idea how hard (bind|get)attr are going to be to implement? 20:36
20:37 Kaiepi joined 20:38 Kaeipi left
timotimo MasterDuke: can you show your translation of it? 20:45
MasterDuke 'class Point { has $!x; has $!y; method x() { $!x }; method y() { $!y } }; my $total := 0; my int $i := -1; while ++$i < 1000000 { my $p := => 2, y => 3); $total := $total + $p.x + $p.y; }; say($total)' 20:46
a profile shows '6001010 call frames were entered' for it, and only '1072916 call frames were entered' for the perl6 version 20:47
timotimo m: say 6001010 / 1072916 20:49
camelia 5.5931778
timotimo whew 20:50
a speshlog of the nqp version may show what wasn't being inlined
20:53 Kaiepi left 20:55 [Coke] left
MasterDuke "could not inline 'MATCH' (138) candidate 0: bytecode is too large to inline" 20:55
"could not inline 'prepare-hash' (17) candidate 0: bytecode is too large to inline" 20:56
pmurias MasterDuke: for the truffle part that will mostly be hooking stuff up to DynamicObject
MasterDuke ./src/vm/jvm/runtime/org/perl6/nqp/truffle/runtime/ ? 20:57
pmurias nope, we use 20:59
MasterDuke ah 21:00
pmurias P6opaque instances end up DynamicObjects in truffle
* in nqp-truffle
21:00 Kaiepi joined
pmurias this has info how objects are supposed to be implemented 21:01
(search for DynamicObject) in it 21:02
MasterDuke wait, what's this then?
timotimo MasterDuke: that looks a little like stuff from the compiler rather than the main run; wonder what's going on with the main loop part then 21:03
pmurias MasterDuke: that's a partially correct and unoptimized implemantion of setting an attribute 21:04
MasterDuke: it's emitted as attribute-bind if you search for it in Truffle.nqp
MasterDuke pmurias: ah. should it be expanded/optimized? or something new written? 21:05
pmurias: but it could serve as nqp::bindattr right now?
pmurias MasterDuke: yes, an incorrect and slow one 21:06
21:07 [Coke] joined
MasterDuke timotimo: i see 'x', and 'y', and 'new' being optimized. the after does look better (but i couldn't say if better enough) 21:07
timotimo if they aren't inlined, that'd be bad :)
for the scalar replacement to happen, the value in question must not escape 21:08
calling a method on it without it being inlined, that'll be an escape
MasterDuke there's only one 'inline of' in the spesh log and it says "inline of '!reduce' (94) candidate 0" 21:09
21:10 Kaiepi left
MasterDuke setting MVM_SPESH_NODELAY=1 causes a lot more inlines. but isn't any faster 21:11
pmurias MasterDuke: that node can't be directly used for nqp::bindattr 21:13
MasterDuke: because nqp::bindattr can take a classHandle/name computed at runtime
21:13 Kaiepi joined
MasterDuke timotimo: but most of those attempted inlines cause a 'could not inline <foo> : bytecode is too large to inline' 21:14
21:15 [Coke] left
pmurias MasterDuke: but the way it sets attributes is fine for now just to get tests working 21:16
pmurias is fairly confused today and likely needs sleep to get back to thinking clearly
timotimo MasterDuke: the new method of the object isn't inlined 21:17
MasterDuke same here. don't think i'm going to get anything more than that Block name business done this evening
timotimo can you try giving it an explicit new method?
21:20 [Coke] joined
MasterDuke 'class Point { has $!x; has $!y; method new(:$x, :$y) { my $obj := nqp::create(self); nqp::bindattr($obj, Point, q|$!x|, $x); nqp::bindattr($obj, Point, q|$!y|, $y); $obj; }; method x() { $!x }; method y() { $!y } }; my $total := 0; my int $i := -1; while ++$i < 1000000 { my $p := => 2, y => 3); $total := $total + $p.x + $p.y; }; 21:22
that takes 0.1s
'8639 call frames were entered' 21:23
timotimo good 21:27
try using bindattrinvres to have a tiny bit better code 21:28
MasterDuke that's just a rakudo thing 21:30
fwiw, if you up the repetitions to 10000000 (add a 0), the moarvm backend takes 0.51s and the (regular) jvm backend takes 3.5s 21:32
21:35 pmurias left 21:42 pmurias joined 21:52 brrt joined
MasterDuke pmurias: btw, i just built the js nqp backend, but it complains `/home/dan/Source/perl6/nqp/src/vm/js/nqp-runtime/runtime.js:201 throw e; ^Unsupported serialization format version: 22` if i try to run anything 22:00
pmurias: i just changed the value on this line ( to 22 and the code ran fine 22:08
at 10000000 repetitions the js backend takes 19s 22:09
pmurias MasterDuke: I'll update the js to handle the new serialization format changes tommorow 22:34
MasterDuke cool
22:46 brrt left 22:49 pmurias left 23:33 Kaiepi left 23:34 Kaiepi joined
vrurg greppable6: X::Caller::NotDynamic 23:44
greppable6 vrurg, 5 lines, 2 modules: