github.com/moarvm/moarvm | IRC logs at colabti.org/irclogger/irclogger_logs/moarvm
Set by AlexDaniel on 12 June 2018.
Kaiepi what needs to be done here? github.com/MoarVM/MoarVM/blob/mast...CStr.c#L22 00:16
01:01 MasterDuke joined, MasterDuke left, MasterDuke joined
MasterDuke hm, an MVMnum64 can just be cast directly (and sensibly) to an MVMint64? 02:12
timotimo those are typedefs to the regular C types 02:31
like double and int64_t 02:32
MasterDuke cool 02:33
another question then. how come a coerce_smart_intify wasn't created initially? 02:34
timotimo because nqp doesn't have a use for that :) 02:35
MasterDuke coerce_simple_intify is only using here github.com/MoarVM/MoarVM/blob/mast...NFA.c#L410 (a couple in that source file)
*used
but then why the *smart_numify? 02:36
timotimo for when we use an object in maths
MasterDuke makes sense i guess
my new coerce_smart_intify does get called in my nqp branch (not surprisingly i guess), any reason not to just get rid of the simple version? 02:37
timotimo i'm not sure what simple_intify is. maybe it's to be used when we already know that we're looking at a boxed integer object 02:38
MasterDuke github.com/MoarVM/MoarVM/blob/mast...#L383-L405 02:39
i essentially just added an int version of github.com/MoarVM/MoarVM/blob/mast...#L383-L405 02:40
timotimo that's both the same lines :) 02:41
MasterDuke whoops. github.com/MoarVM/MoarVM/blob/mast...#L336-L360
timotimo simple_intify is adapted from smart_numify? 02:42
MasterDuke i don't know. my new smart_intify is that first part of smart_numify (adapted to int) plus simple_intify (which is pretty much the same as the end of smart_numify) 02:43
however, there's a difference between *_numify (and my new *_intify) and *_strify 02:44
strify pulls github.com/MoarVM/MoarVM/blob/mast...#L288-L293 out before the method cache check 02:45
timotimo that "just" means that for string boxes it won't ever look for a Str method 02:46
MasterDuke should that be different than for int and num boxes?
timotimo do we even ever have the case that the Str, Int, or Num methods of anything are called? 02:47
MasterDuke hm, not sure. guess i can add some fprintfs and find out
timotimo it'd be interesting 02:48
FWIW, spesh has an optimization for smart strify and numify iirc
i'm not sure if it actually emits a method call if it sees fit, or if it bails out when it perceives the presence of such a method 02:49
MasterDuke yeah, i've been trying to add an intify implementation
that's what causes that `Unable to allocate an array of 4607182418800017409 elements at gen/moar/stage2/QAST.nqp:1387 (QAST.moarvm:rxjump)` error during the nqp build i mentioned a day or two ago 02:50
timotimo oh, really? it's spesh related?
MasterDuke well yeah, i now can build nqp and pass its test and same with rakudo and roast on my branches without that spesh piece i'm working on 02:51
timotimo damn, if you had told me it was caused by spesh 02:53
the problem could very well be not marking a type fact as "used"
MasterDuke heh, Str method is called a bunch right away when building nqp
timotimo so an inappropriate access could be generated for a type that's not guaranteed
MasterDuke here's what i have so far (the spesh optimization) gist.github.com/MasterDuke17/a618b...d984af2d3e
timotimo thus giving you memory that represents something else
hmm 02:54
say, doesn't the smrt_numify generate a int-to-num right after replacing the op with an elems op? 02:55
it totally does 02:56
it mustn't do that when smrt_intify is requested, otherwise it writes a num into an int register 02:57
that's where the high bits come from!
leave it to 4am to cause sudden explosive insights
MasterDuke timotimo++
btw. the nqp build has 589560 .Str calls and 32 .Num calls, but 0 .Int calls 02:58
timotimo can you output the debug_name of the things that get .Str called on them?
this could be an interesting target for optimization 02:59
maybe also with a call stack, though that'd obviously be an incredible amount of dumpage :)
MasterDuke all are BOOTCode 03:01
timotimo oh?
well, that's interesting
are they stringified to get their name or something?
03:02 Kaiepi left
MasterDuke i just did MVM_6model_get_debug_name(tc, code), using github.com/MoarVM/MoarVM/blob/mast...rce.c#L304 03:02
oh, i probably should have used obj? 03:03
timotimo indeed
03:03 Kaiepi joined
timotimo might also be interesting to have an output for that in spesh, though there'd not be a backtrace in that case 03:04
MasterDuke 1167 .Str method called on 'NQPHashIter' 7450 .Str method called on 'NQP::Regex' 464899 .Str method called on 'NQP::Grammar'
timotimo huh. but why? 03:05
MasterDuke why is an NQPHashIter getting stringified?
timotimo surely an oversight
what does it result in, OOC?
MasterDuke npq: my %h := nqp::hash("k", "v", "foo", "bar"); say(~nqp::iterator(%h)) 03:06
nqp: my %h := nqp::hash("k", "v", "foo", "bar"); say(~nqp::iterator(%h)) 03:07
timotimo m: use nqp; my $h := nqp::hash("k", "v", "foo", "bar"); say(~nqp::iterator($h))
camelia You have not advanced to the first item of the hash iterator, or have gone past the end
at gen/moar/stage2/NQPCORE.setting:623 (/home/camelia/rakudo-m-inst-2/share/nqp/lib/NQPCORE.setting.moarvm:Str)
from <tmp>:1 (<ephemeral file>:<mainline>)
from gā€¦
Type check failed in binding to parameter '<anon>'; expected Any but got BOOTIter (?)
in block <unit> at <tmp> line 1
timotimo ooooh
is that how you get the current key? 03:08
you know what, try putting BOOTIter into the list of exceptions in the spesh function
MasterDuke btw, bunch more different things when building rakudo
timotimo actually, how does it stringify the hash iterator? 03:11
MasterDuke what do you mean how?
timotimo it definitely goes via nqp::iterkey_s, but does it do it via an actual method Str?
src/core/NQPMu.nqp 03:12
113: method key() { nqp::iterkey_s(self) }
115: method Str() { nqp::iterkey_s(self) }
there it is
in this case we may actually want to finally implement emitting method calls in that last branch in that spesh function 03:14
or put an explicit nqp::iterkey_s($foo) where performance may be of interest 03:16
MasterDuke sorry, was afk for a while 03:59
some metrics from the nqp and rakudo builds gist.github.com/MasterDuke17/531c0...2c8609f8b9 04:03
(on my branches)
timotimo: so getting back to the speshing of intify, in that elems else if branch, if we're doing an intify instead of a numify, only the `ins->info = MVM_op_get_op(MVM_OP_elems);` and `optimize_repr_op(tc, g, bb, ins, 1);` lines are needed? 04:13
04:46 KDr2 joined 07:07 domidumont joined 07:47 AlexDaniel left, AlexDaniel joined 08:00 patrickb joined 08:39 zakharyas joined
nwc10 good *, #moarvm 08:53
11:10 domidumont left 11:24 MasterDuke left 11:55 brrt joined
brrt good * #moarvm 11:57
12:21 zakharyas left 12:26 lizmat left 12:36 lizmat joined 12:48 patrickb left
brrt urgh, I can't quite get the right frame to debug the register allocator 12:58
13:10 brrt left 14:01 zakharyas joined 14:27 brrt joined 14:30 patrickb joined
brrt I'm thinking of a tester tool that directly builds a JIT graph from a frame directly 14:36
15:29 brrt left 15:31 brrt joined 15:51 brrt left 16:09 brrt joined
patrickb The "get the Perls into GSoC" project has started in earnest now. We are in need of project ideas and mentors. Getting up a place to collect stuff is in progress. 16:12
So now is a good time to think about whether to be a mentor and what might be a good project.
brrt^
jnthn Hmm :) 16:14
16:18 brrt` joined 16:19 brrt left
samcv i just signed up to GSoc 16:36
jnthn, brrt i can add you also as administrators to the group if you email with a google account details 16:37
you are required to have at least 2 admins added
16:38 brrt` is now known as brrt
brrt samcv: do we have a project page? 16:39
there's like, a ton of stuff that needs doing 16:40
samcv no we don't 16:41
brrt is this for moarvm, or for perl6 in general? 16:42
patrickb samcv: What sign up did you do exactly? 16:44
samcv well. it's not submitted. but the account is opened. and invite sent to brrt to be another administrator 16:45
so we can start making proposals
patrickb wait
I think now stuff is happening that shouldn't
You did apply as an organization? 16:46
brrt what should or should not happen?
samcv well. you first create an account with GSoC and then you have to edit the profile. and add proposals. and then feb whatever they decide which ones get in
yes as an org
i mean i didn't APPLY i uh
registered. but the full application is not complete
patrickb Not good...
samcv what's not good 16:47
patrickb JJ is into the application process since a few hours.
samcv anyway. org admins can now edit the profile on GSoC website
ah
for what? rakudo?
or moarvm
patrickb The Perl Foundation
That should cover about everything.
brrt hmm
samcv well they are separate orgs sorta. idk. 16:48
patrickb I'd say let's wait till JJ shows up and we can clear up how we want to handle this. 16:49
brrt The parrot foundation was a really separate org from the perl foundation 16:51
as far as I know, the perl foundation has been supporting MoarVM development
uhm, yeah, those are just facts
16:51 lucasb joined
brrt I don't really know what my point is with that 16:51
samcv heh
16:52 ufobat_ joined
samcv reads eligabitiy rules 16:52
To participate: run an active and viable open source software project; 16:53
so by how it states it that would be fine 16:54
since they are separate projects
patrickb What org did you apply for? 16:55
samcv MoarVM
patrickb ok 16:56
samcv google.github.io/gsocguides/mentor...rella-orgs 17:01
is the number of students that can be assigned to one org limited or not? 17:02
17:02 domidumont joined
samcv if so then we probably want to do it as perl foundation 17:02
patrickb Student slots are requested with both a min and max by the org. Google then assigns the slots. 17:03
samcv ok 17:04
patrickb But unused slots and unsuccessful projects result in a "mallus" the following year.
Thus "the more slots the better" is not really true.
samcv yeah
patrickb In any case I think we should really talk about how we want to handle this. Maybe having a separate application for each moarvm, rakudo, perl5 and TPF is a good thing, but better be sure everyone agrees on an approach. 17:06
I've invited jmerelo to drop by. 17:07
patrickb relocates 17:08
17:08 patrickb left 17:16 patrickb joined 17:36 jmerelo joined
patrickb o/ 17:36
jmerelo Hi! 17:37
patrickb Basic question to answer: What organisations do we want to apply?
Candidates: TPF, Perl 5, Rakudo, MoarVM.
jmerelo patrickb: In principle, I would say it's better to apply as The Perl Foundation
patrickb google.github.io/gsocguides/mentor...rella-orgs 17:38
jmerelo I think we increase our chances if those are "projects" within the application
patrickb: those you mention are not, per se, organizations, just individual projects within the Perl Foundation.
patrickb True. But gsoc is not necessarily about official organizations. That's why I'm unsure of what the right approach is. 17:39
jmerelo patrickb: at the end of the day, it's a free world. 17:40
patrickb I'm ok with either approach. I'd just like we all agree on the same. ;-)
jmerelo patrickb: I think it's much better, and we're most likely to achieve a critical mass of mentors and ideas, if we go together
patrickb OK.
samcv: What do you think?
jmerelo patrickb: that might imply that some particular projects might not be chosen by students (if the org is chosen), but it increases the likelihood of the whole organization being chosen, I think. 17:41
Hi, samcv!
patrickb Given we agree on this, can we get some info from "official" channels? I think that would help getting this going and reduce confusion. 17:42
jmerelo patrickb: we'll have to ping Makoto, I guess. He's in the loop.
patrickb jmerelo: The "likelihood of the whole organization being chosen" might be somewhat more important this year as TPF failed for several years now to participate... 17:43
jmerelo patrickb: I would say so.
patrickb We are kind of invading this channel... 17:44
samcv hi
so i think we should all be one org
based on the guide
patrickb OK. Then one org it is?
samcv yes 17:45
patrickb \o/
jmerelo :+1:
I created this orga (and GitHub just told me it's off the freezer) github.com/perl-gsoc-2019/
I can add you as part of the team
I send invitations, feel free to accept them.
samcv ok :D 17:46
uh you may want to change the license
since GPL isn't designed for text? 17:47
jmerelo samcv: I just chose the first one that seemed reasonable. I don't think CC is by default. I can change it if you want.
samcv I would just make it CC0 or something. given it's just ideas
jmerelo OK
patrickb jmerelo: Can you ping Makoto about the "official" post? I can write up some text if that helps... 17:48
jmerelo patrickb: sure
samcv jmerelo, can i be added as an admin to the GSoC profile page? 17:49
jmerelo samcv: sure
samcv i gotta go out and buy some food for dinner. be back in a bit 17:51
jmerelo Bye! 17:54
patrickb Project ideas should have a potential mentor with them, right? 17:56
Should we set a deadline?
... I guess we should.
18:00 brrt left 18:01 jmerelo left
samcv yeah 18:19
and yeah
timotimo how do you feel about a project for an online tutorial based on rakudo.js? 18:20
kind of like the go tour or what it's called?
patrickb is a bit flabbergasted that perl-gsoc seems to actually happen again..
samcv patrickb, when is the last time a proposal was made? 18:21
timotimo like 3 years ago? 18:22
samcv perl is back! 18:23
patrickb I think 2014
timotimo how about a project for getting perl6 to work with godot via GDNative?
samcv hmm. uh what's godot
timotimo a free-and-opensource game engine 18:24
good for 2d and 3d alike
it has its own scripting language that's python-like, gdscript, and since like half a year you can also use Mono with it
(and mix-and-match)
samcv well as long as we have a mentor then that's fine with me 18:25
timotimo i should be able to mentor for that, but who would be the fallback mentor? 18:26
patrickb Libraries can also be good candidates. E.g. A qt binding generator.
samcv ooo. qt bindings 18:27
timotimo Qt is a humongous task ...
samcv uhm. yeah
and we'd have to find a mentor for it as well
timotimo there used to be this SMOKE thing, but that disappeared long ago
patrickb Getting a p6 metacpan up and running. For that a metacpan dev should be mentor...
timotimo and there's the stuff that makes PySide, which no clue how easily that translates to p6 18:28
i'm not sure i could mentor for the "playground" idea 18:29
ufobat_ as i wrote on FB, i would like to have a feature complete openssl binding. including that modules like cro would be able to use them and dont implement parts of it on its own. 18:45
timotimo doesn't have an FB 18:47
.tell MasterDuke i'm now working on making the smart coerce optimization in spesh generate a method call in that place so that it could inline these functions 19:06
yoleaux timotimo: I'll pass your message to MasterDuke.
19:07 zakharyas left 19:13 AlexDaniel left 19:17 AlexDaniel joined 19:49 domidumont left
timotimo OK, spesh is now emitting invoke operations 19:50
ah damn, there is no deopt annotation on the smart coerce op 20:12
i wonder if it's kosher to set it to "can deopt" so i will just get one for free
oh, it's already :maycausedeopt 20:16
now i added :deoptonepoint 20:17
hum. optimize_call isn't doing it 20:23
forgot to add the known value fact %) 20:25
getting spesh to oops, but need to go AFK for groceries 20:28
20:42 brrt joined
brrt ohai. I have a GSoC mentoring idea 20:43
linking perl6 into moarvm
well, rakudo 20:44
and potentially nqp
20:45 zakharyas joined
brrt I'd like to go a little further than fakeexecutables, but I'd accept that 20:45
I'd want a self-contained binary 'perl6' that contains both MoarVM and the rakudo compiler; bonus points for CORE.setting; even more bonus point for an option that says 'perl6 --compile' and generates an executable 20:46
I'm fairly sure this is all possible
patrickb afaik "containing moar" is blocked on missing static linking 20:49
other than that: Pretty much awesome.
brrt well, that's something we can do 20:50
and even prepare for
20:51 lucasb left
brrt I'd personally start by trying to emit MBC as ELF, and link that 20:51
which is really not all that hard, ELF is a fairly straightforward format
20:57 AlexDani` joined 20:58 brrt left 21:01 AlexDaniel left 21:02 brrt joined 21:04 MasterDuke joined, MasterDuke left, MasterDuke joined 21:06 AlexDani` is now known as AlexDaniel
MasterDuke timotimo: cool. i got distracted and wasn't able to finish what i was working on yet 21:06
yoleaux 16:31Z <samcv> MasterDuke: you can just un todo those tests. that is fine
19:06Z <timotimo> MasterDuke: i'm now working on making the smart coerce optimization in spesh generate a method call in that place so that it could inline these functions
timotimo i wonder what can make return_deopt_idx fail 21:07
oh, it needs a deopt all annotation, too, huh? 21:08
brrt hey, 2-operand form conversion works... 21:09
timotimo sweet! 21:10
MasterDuke timotimo: i added a branch for intify and changed the current branch to be explicity for numify (instead of just not strify), but it's actually dieing (with the unable to allocate array error) in the numify branch 21:15
well, not in the branch, but that's the one it goes through before it does eventually die 21:20
.tell samcv the code is a bit complicated, not entirely sure how to un-todo it 21:21
yoleaux MasterDuke: I'll pass your message to samcv.
Geth MoarVM/jit-2op-form: 7f9f3e99a0 | (Bart Wiegmans)++ | 6 files
[JIT] Minor debugging / structure improvements

We'd process the tile of the live range definition before the live range itself, meaning that the output value wasn't set yet.
21:36
MoarVM/jit-2op-form: 3d2a035764 | (Bart Wiegmans)++ | 3 files
[JIT] Enforce output-operand form in register allocator

We move this from the responsibility of the individual tiles to the register allcoator, which can hopefully do a little better.
This requires a final loop over the tile list, because during the
  'linear_scan' loop, registers may be reassigned by the spilling
process.
21:44 patrickb left 21:59 zakharyas left 22:02 brrt left
timotimo MasterDuke: i'm confused. didn't we fix that by making intify no longer write a num to an int register? 22:49