github.com/moarvm/moarvm | IRC logs at colabti.org/irclogger/irclogger_logs/moarvm
Set by AlexDaniel on 12 June 2018.
00:00 nebuchadnezzar left 00:08 nebuchadnezzar joined 06:12 robertle left 06:37 domidumont joined 07:19 domidumont left
nwc10 good *, #moarvm 07:26
08:00 domidumont joined 08:29 zakharyas joined 11:18 brrt joined
brrt \o #moarvm 11:18
nwc10 o/ 11:19
brrt ohai nwc10 11:24
brrt grumbles about how register allocation is a hateful, messy problem 11:36
If I had only sufficient time, I'd rip out the whole thing *again* 11:37
I mean, I only now find a potential bug... 11:47
12:26 zakharyas left 12:52 lucasb joined 13:01 brrt left 14:10 zakharyas joined 16:01 lucasb left 16:33 domidumont left 16:34 Kaiepi joined 16:43 zakharyas left 17:33 robertle joined 17:35 domidumont joined
timotimo oh damn today's the soft deadline for gsoc projects 17:36
can i really mentor a project?
17:56 Kaiepi left
MasterDuke timotimo: i don't actually know what is required, but you've been very helpful with all my questions 17:56
17:56 Kaiepi joined
timotimo but if i suggest a project, i'll be on the hook for whether it makes sense, is the proper size, is doable for a beginner, is useful to have ... 17:58
MasterDuke heh, i got around that by stating up front i wouldn't be able to mentor 17:59
18:02 brrt joined 18:12 brrt left 18:22 brrt joined 18:27 patrickb joined
Kaiepi same MasterDuke 18:33
timotimo, what about support for wide strings?
i tried implementing that a while ago but couldn't manage to work out how to fully do it
brrt timotimo: what project would you like to mentor? 18:34
luajit code is dense... 18:42
yay, I can compile nqp with floating point register support 18:44
timotimo brrt: maybe integrating rakudo-moar with godot, maybe an interactive online tutorial a la go playground with things like generating images and showing them in the browser directly 18:47
18:48 patrickb left
brrt hmm.... I think integrating with godot is kind of interesting 18:50
anyway, you can always suggest it
Geth MoarVM/jit-expr-float: 068130a68b | (Bart Wiegmans)++ | 10 files
[JIT] Floating point support in the register allocator

This is still fairly brittle and will not work with generic register requirements. But it seems to work decently so far, with NQP compiling succesfully.
18:54
MoarVM/jit-expr-float: 15 commits pushed by (Bart Wiegmans)++
review: github.com/MoarVM/MoarVM/compare/0...f4092d945a
brrt brittle as hell, but it works, I think
jnthn Fist make it work, I guess... :) 18:56
Um, first :)
timotimo ohai jnthn :) 18:58
jnthn o/ 18:59
jnthn is sort of back
brrt ohai jnthn
welcome back
jnthn Rather tired, but that's nothing a good night's sleep won't fix :)
brrt where'd you go?
jnthn Jesenik and Ostrava, for a couple of nights each :) 19:01
There was snow, which made me happy. And some nice food too. :) 19:02
brrt :-) 19:03
timotimo \o/ 19:04
you can also eat snow!
19:08 brrt left
timotimo writes documentation for someone else's module 19:10
19:11 patrickb joined
MasterDuke hm, it goes into github.com/perl6/nqp/blob/master/s...r.nqp#L664 for postcircumfix again (and again...) 19:15
is the self not the same maybe...
timotimo oh 19:20
i can imagine the cursor would be a different one all the time
but i don't know how the HOW implements cache_get
hopefully via the parse_shared
MasterDuke github.com/perl6/nqp/blob/master/s...#L709-L712 19:24
timotimo: i don't see a parse_shared anywhere 19:25
timotimo ah, it's ParseShared 19:27
MasterDuke but ClassHOW wouldn't know about ParseShared, right? 19:30
timotimo i'd expect GrammarHOW or so to be involved 19:31
hm
doesn't exist, eh?
MasterDuke doesn't look like it 19:32
timotimo aha
NQPClassHOW has it
MasterDuke has what? 19:33
timotimo cache_get and cache_add 19:35
MasterDuke right
hm, so what happens if i instead use $!shared, which is a ParseShared as the cache? 19:47
timotimo well, with cache_get, the self shouldn't matter, right? 19:48
oh 19:49
maybe mixing in the operator actually causes the type to change, because mixins, you know?
that would mean that the cache actually doesn't get carried over
MasterDuke oh, you're right, since it's self.HOW. but yes, invalidated because of the mixin
hm, create a new cache? or is there a way to transfer/copy the cache on mixin? 19:50
timotimo: heh, github.com/perl6/nqp/blob/master/s...#L747-L748 19:53
timotimo i'm not sure what the proper fix is :(
MasterDuke i wonder if there's a way to tell what NFA don't need to be invalided and those could be copied to the new cache right away 19:58
20:05 domidumont left 20:06 patrickb left
MasterDuke jnthn: are you back enough for a question about cached NFA invalidation because of type mixins? 20:27
after all, isn't cache invalidation famously one of the easy problems of CS?
timotimo totally 20:28
MasterDuke timotimo: btw, speaking of caching, didn't you have something in the works to make nqp::getenvhash() cache its rv? 20:32
timotimo it already does i believe 20:33
what i had was constant folding values from the envhash at spesh time 20:34
MasterDuke ah. becuase i added a bunch of `<...> if nqp::existskey(nqp::getenvhash(),'<my made up env var>')` for debugging in QRegex/Cursor.nqp, but it does noticeably slow down building rakudo 20:36
timotimo mhhh
the branch should still exist but i think it needs to be adapted to the new definition-usage API spesh got now 20:37
and it was a little fiddly anyway
MasterDuke oh, the type name `Perl6::Grammar+{Postcircumfix}` is the same for all those cache misses 20:38
nm, it does seem to change. now it's `Perl6::Grammar+{Postcircumfix}+{stop}`
and now `Perl6::Grammar+{Postcircumfix}+{stop}+{stop}` 20:39
but it does look like it tries to look up the same name once and fail 20:40
i.e., i see two failed attempts for the same name, then to failed attempts for the next version of the same name
that i can't explain 20:41
20:50 brrt joined
jnthn MasterDuke: Maybe sort of... :) 20:55
MasterDuke: I do know that the invalidation there is extremely coarse
MasterDuke i'm not sure where the problem is best solved, timotimo++ and i have sort of been working our way up/back, and that cache invalidation seems like it might be where we've ended up so far 20:57
the backstory is that i was looking at rt.perl.org/Public/Bug/Display.html?id=128760 again
so went and read colabti.org/irclogger/irclogger_lo...07-23#l106
and now i'm not sure if i've slipped into the second issue mentioned 20:58
or am still working on the first 20:59
jnthn Solving the second needs assembling a directed graph of what uses what
So that when we produce a new token, we can then use the graph to work out what other things will be invalidated 21:00
The first problem is in theory easier
github.com/rakudo/rakudo/blob/mast....nqp#L4427 21:01
I'm guessing this condition fails bogusly? 21:02
MasterDuke i think so, we were looking there a day or two ago, but i don't remember exactly what we found
colabti.org/irclogger/irclogger_lo...-02-03#l90 21:03
"MasterDuke ah. add_categorical is being called four times, but after the first it doesn't get past this: if nqp::can(self, $canname) { return 1; }" 21:04
jnthn Hm, but if it doesn't get past that, do we still have the first problem?
MasterDuke that sounds like it isn't failing
well, the example still behaves exactly the same as in the ticket 21:05
jnthn Hmm 21:12
As in, it takes a long time for each operator?
MasterDuke yep 21:13
about 2s per 21:14
jnthn Odd. I wonder what it is doing per operator to cause that... 21:17
MasterDuke well, it runs this line github.com/perl6/nqp/blob/master/s...r.nqp#L665 29 times for `postcircumfix:sym<⦋ ⦌>` 21:21
to be exact, !protoregex_nfa() is run 29 times for that (not 100% certain they're all from that line) 21:22
it doesn't seem to take any longer per operator the more there are, so i don't think it's redoing everything with each new one 21:51
21:54 robertle left
jnthn MasterDuke: Hm, I'm confused; you said "about 2s per" operator, but then "it doesn't seem to take any longer per operator" :) 21:57
(I'm also tired and probably missing something)
bbiab 21:58
MasterDuke any *extra* longer per operator. i.e., not .5s for the first, 1s for the second, 2s for the third, 4s for the fourth 22:04
it doesn't *seem* like factorial or exponential growth in processing time with each added operator, just linear growth 22:09
22:23 brrt left
Geth MoarVM: ffontaine++ created pull request #1045:
Configure.pl: fix cross-compilation
22:26
jnthn MasterDuke: Ah, I see 22:44
MasterDuke: And is it per operator or per instance of the same operator with different multi candidates? 22:45
timotimo our testing so far has been for &postcircumfix:<[ ]> multiple times in a row i believe 22:50
MasterDuke jnthn: same with a mix of type of operators and different terms (e.g., `multi postcircumfix:« ⦋ ⦌ »`, `multi postcircumfix:« | | »`, `multi infix:«qwerty»`, and `multi postfix:«asdf»`) 23:09
also doesn't matter their their multi or not 23:35
jnthn Yeah, in theory the nqp::can check should prevent the multi case repeatedly triggering the operator generation... 23:38
MasterDuke *if they're 23:40
jnthn: any thoughts on how to figure out why that isn't happening? 23:43
jnthn MasterDuke: Dunno, could we instrument where the mixin stuff takes place and dump a stack trace there? 23:46
MasterDuke jnthn: here? github.com/perl6/nqp/blob/master/s...W.nqp#L731
jnthn MasterDuke: Yeah 23:48
There'll be loads of hits on named parameters too I guess, but maybe you could filter on the name of the type being mixed in to
MasterDuke building rakudo now... 23:52
huh, my breakpoint only hit once 23:56
`nqp::sech_n(1.0) if nqp::existskey(nqp::getenvhash(),'NQP_OPT_DEB') && self.name($obj) eq 'Perl6::Grammar';`
and gdb complained when trying to print a backtrace
jnthn Missing or optimize-busted debug symbols? 23:57
(You can recompile MoarVM with --debug=3 --optimize=0 if so without having to build Rakudo again) 23:58
MasterDuke gist.github.com/MasterDuke17/07de1...5eea18983e
i pretty much always have moar built with --debug=3, but i don't touch --optimize 23:59
maybe cosh isn't a great thing to try and break on?