timotimo well, i could just implement GatherIter! that's probably totally easy and simple!!!!!kkk 00:25
01:06 benabik joined 02:24 Ben_Goldberg joined 08:08 woolfy left 08:18 tadzik joined 09:01 tadzik joined 09:19 tadzik joined 09:40 tadzik joined 11:37 tgt joined 11:47 tadzik joined 11:53 tgt joined
jnthn timotimo: To help with GatherIter, just implement continuations... 12:44
timotimo sometimes i implement ten continuations before breakfast! 12:46
FROGGS[mobile] I implemented continuations in PHP and VBA for fun! 12:52
jnthn take_a_continuation_here() 12:55
So, no dalek reported them, but last night I pushed two commits starting to work on the serialization reposession stuff. 12:56
FROGGS[mobile] Ohh, nice 12:58
I have no tuits till late evening
jnthn I have some tuits this afternoon, but am kinda in recovery mode from the last weeks being busy... 12:59
So, how did repo work... :) 13:01
FROGGS[mobile] Yeah, I feel the same... >8h work plus >4h hackory plus kids is not ideal when you have a cold for weeks 13:03
I actually started last night glueing it to panda 13:04
Works nice so far
jnthn Oh, I was talking about repossession... :) 13:05
But cool that *that* repo work is going well... :)
FROGGS[mobile] Ahh, w/e :o)
14:51 FROGGS[mobile] joined 14:52 FROGGS[mobile] joined 15:05 grondilu joined
jnthn Hm, a half-implemented stable reposession thing actually gets us further... 15:12
Oh...I can guess why. But we really need the other bit. :) 15:13
timotimo at least it's stable 15:15
jnthn :P 15:16
"Gaps in STable root set not allowed" 15:39
OH YES IT IS
diakopter ? 15:42
jnthn diakopter: I'm just implementing stuff 15:43
And running into my own lack of foresight. Or maybe laziness :)
Seems we reach line 2560 when loading the setting now... 15:46
Implemented slurpy/LoL-slurpy biding, but then the same thing soon runs into needed nqp::p6listitems doing. :) 16:08
FROGGS[mobile] slurpy biding? 16:10
jnthn *@foo
FROGGS[mobile] sounds like I am missing all the fun
jnthn p6listitems done 16:32
Next: p6arrfindtypes NYI
nwc10 when I run it under valgrind, I'm getting grumblings about the base64 writing routine 16:38
simplest fix - get rid of base64? :-)
jnthn That's on my hit list at some point in the not too distant future. 16:39
We already spec'd the alternative storage mechanism in the bytecode file, after all...
FROGGS[mobile] does that play well with MVMString?
ahh
jnthn Well, the idea is to just shove the binary blob directly into a segment of the bytecode file. 16:40
timotimo that should improve our bytecode file sizes significantly 16:42
jnthn Aye. 16:43
And our startup time. :)
timotimo and our valgrind time 16:44
jnthn Though sorting out the bottlenecks in CORE.setting compilation is more pressing.
I need to focus on some indy stuff on Mon/Tue though. 16:45
nwc10 is killing base64 clear enough and sufficiently spec'd that someone else could do it?
jnthn Not really...
I'm not quite sure how it should look... 16:46
Like, the getting the blob between serializer and file...
timotimo stash it away until a later point, together with a stubbed forwards reference, then when emitting, spit out the data and go back in the file to fix the reference? :\ 16:48
that sounds bad.
jnthn Yes, it does :P 16:49
So yeah, it's more a design task...
timotimo emit a length field and skip that many bytes when deserializing?
jnthn p6arrfindtypes done
timotimo \o/
jnthn timotimo: We probably want to just pass a compunit into the deserializer or something in that direction...
The other direction - I guess a byte array could do it... 16:50
P6opaque: no such attribute '$!storage'
Hmm. Innerestin...
d'oh... 17:12
Think I found it.
port-o
OK, up to line 3239 of the setting load now 17:19
p6setautothreader NYI
timotimo mhhh junctions 17:21
setautothreader just passes a reference to a sub to a statically known location, so that the dispatcher can find it when a dispatch fails?
you'll be able to implement that in a minute or two :)
jnthn Yeah, it won't take long
But I also should head out soon 17:22
timotimo maybe i'll do it for you :)
a few hints and i'll see what i can do
jnthn Meeting a friend for l'öl
Well, it's a binder thing
So it wants handling by turning it into a method call on the Binder in BOOTSTRAP 17:23
Which can then stash it
TimToady
.oO(a 3-ring circus binder)
jnthn In a lexical.
timotimo that BOOTSTRAP is backend-agnostic? 17:24
jnthn ish
The bit in question is maor only
Writing the binder in C on Moar would be an epic disaster for my sanity... :) 17:25
Nobody should do that much CPS transforming by hand... :)
timotimo hah, ok
TimToady 'course, you wanna talk about hot spots then...
jnthn TimToady: Well, the Evil Plan is to optimize away the full-blown binder in the common case of signature binding. 17:26
TimToady sometimes sanity is overrated
jnthn TimToady: So if you end up in the full thing you're already going to be doing lots of more costly sutff anyway.
TimToady watches out for excess foil
jnthn I'll probably actually work on that optimizing away this week, given I probably need it to for taking advantage of the indy stuff I'm plotting. 17:27
Nice that the need to do it for JVM means we get it for Moar too. :)
TimToady indystuff++ 17:28
timotimo \o/
jnthn Anyway, by putting the binder into BOOTSTRAP, the symbols are all handily available and once we get the specializer stuff into Moar it should be able to do nice things on this code. It's also full of native types where possible, which is nice for JIT when we get that. :)
TimToady reminder to folks following along at home: "indy" is short for invoke dynamic
timotimo \o/
so, er, i could just implement p6setautothreader with QAST instead of C, right? 17:29
can i just find Binder with Var/WVal? 17:30
jnthn timotimo: oh, totally
timotimo it'll be a lexical, aye?
jnthn timotimo: Yes, see many other examples in src/vm/moar/Perl6/Ops.nqp
Aye, inside class Binder 17:31
timotimo perfect :)
i meant Binder, rather than the lexical for the autothreader 17:32
the latter is already a my $autothreader inside the Binder class
arnsholt What's invoke dynamic entail on Moar, OOC? 17:33
jnthn arnsholt: invoke dynamic is a JVM thing, not a Moar thing.
arnsholt: It's used to teach the JVM about other languages and how they work, so its JIT can make sensibler decisions about that to do with them. 17:34
Moar is just built with 6model stuff right in the core
timotimo do i need to update moar and nqp to get from 7c81a62..7832310?
jnthn You certainly need a new moar
timotimo OK
TimToady do any of the VMs allow storage layout at the bit level yet? 17:35
s/allow/provide/ :)
jnthn Not from Perl 6 land...I suspect the JVM must have classes in the library for bit buffers...
TimToady and I suppose we also don't have compact int arrays smaller than 8 bits yet either 17:37
timotimo i don't think we do, no
jnthn No
Well, we don't have native arrays anywhere yet really. 17:38
TimToady btw, who actually does commit bits? I have a combinations routine that runs 6 times faster
jnthn Buf and Blob are like that
Oh wow...
TimToady: github ID?
TimToady TimToady
jnthn lemme see if I can
timotimo oh that seems like a nice addition :3
TimToady well, I showed it to quietfanatic++, and he said "Why don't you make the recursive solution faster instead?" 17:39
jnthn TimToady: You should be able to push now
timotimo hah :)
well, when jnthn makes the binder "inlinable" on jvm and moar, recursive stuff should be a lot faster for everything, no? 17:40
TimToady oops, pushed to moar-support instead of nom
oh well, I guess it'll all end up the same place
timotimo eventually, sure
Internal error: invalid thread ID in GC work pass 17:41
... huh
jnthn Yeah. Well, merge early, merge often...once you can "say 'hi'" on Moar, there'll be little reason not to merge the moar-support branch, provided it regresses no other backend.
timotimo: That error tends to mean "memory corruption".
timotimo yeah :(
so re-build without --optimize?
(trying a clean first)
diakopter . 17:44
jnthn gotta go now...bbl
&
diakopter :'( 17:45
17:52 FROGGS[mobile] joined 17:58 cognominal joined
timotimo this is taking sooo looong :\ 18:06
270 seconds just to parse
diakopter boo 18:07
timotimo soon i'll probably be able to implement the charrange codegen on moarvm, that'll give us ... half a second?
FROGGS[mobile] hehe 18:08
timotimo Error while compiling op p6setautothreader: Cannot invoke null object - oh no! :( 18:09
Var.new( :name('Binder'), :scope('lexical') ) didn't work :( 18:10
oh, wait
this is during generating the QAST
not running it
oh well. i'll work on it some more in ~30 minutes 18:11
18:30 ssutch joined 18:34 colomon joined
timotimo i don't understand why i'm getting "cannot invoke null object" 18:36
gist.github.com/timo/4232f378ec4d07f9eb8e - it's probably very obvious, but i'm not getting it 18:40
FROGGS[mobile]: an idea? 18:41
i've removed the op from the other files it existed in already
FROGGS[mobile] timotimo: getting kids to bed, no time atm 18:42
timotimo no problem
timotimo tries adding a :want to as_mast 18:45
TimToady
.oO(Two Years Before the Mast)
18:46
timotimo i don't understand that reference :(
TimToady en.wikipedia.org/wiki/Two_Years_Before_the_Mast 18:47
18:51 FROGGS[mobile] joined
timotimo ah 18:51
oh, duh 18:54
of course Binder isn't available in the lexical scope 18:55
of the setting %)
FROGGS[mobile] Maybe WVal?
timotimo yup, that's what i have now
will take like 5 minutes to try, though
FROGGS[mobile] yeah :/ 18:56
timotimo Segmentation fault (core dumped) 18:59
i wonder why.
but now i've changed the op's implementation anyway
another 10 minutes of compilation ... :|
FROGGS[mobile] you are using $*W.find_sym?
timotimo no 19:00
i'm getting it directly from nqp-land
which may very well be wrong
but i won't have it in the world, will i?
because $*W.find_sym is what gets used when you have a Var with :scope<lexical> 19:01
afaict
FROGGS[mobile] no, dont think you get lexicals that way
timotimo oh? 19:02
oh, there's $Binder
this time i'm relatively certain i have the right incantation 19:03
19:07 FROGGS joined
timotimo 5 minutes to go 19:10
FROGGS timotimo: why don't you steal from p6bindsig? 19:13
timotimo that's pretty much what i have now
FROGGS k
jnthn: here I temp_push but I never pop, where should I do that? github.com/MoarVM/MoarVM/commit/05...0fa4804R62 19:16
ohh, dalek is still absent :/ 19:17
timotimo er, don't you perm_add there? 19:18
FROGGS ohh, I do, right
I hope that is fine then :o)
--vmlibs=dynext/libperl6_ops_moar.so=Rakudo_ops_init src/gen/m-BOOTSTRAP.nqp
Internal error: invalid thread ID in GC work pass
timotimo m) i made sub set_autothreader instead of method set_autothreader
FROGGS eww 19:19
does it fail for you too that way?
I guess not
timotimo yes, i tfails for me that way as well
that's why i don't have --optimize set
FROGGS ahh 19:20
good to know
timotimo feel free to valgrind if you have a few hours to spare :P
FROGGS *g*
I might do that later, yes 19:21
damnit, I do that now 19:23
timotimo P6opaque: get_boxed_ref could not unbox for the given representation 19:29
at src/gen/m-CORE.setting:4499 (./CORE.setting.moarvm:frame_name_1647:11708)
FROGGS that sounds good 19:30
timotimo up from 3234 before i implemented setautothreader
FROGGS timotimo++
timotimo i didn't implement the actual autothreading fallback, though ;) 19:31
FROGGS hmmm, but an XXX there? :P 19:32
timotimo there is an XXX? 19:33
FROGGS O.o 19:34
just put a comment there if it is too hard
or let it die with an NYI when it hits that branh 19:35
branch*
timotimo it already does :) 19:36
FROGGS is it pushed then? *g* 19:37
timotimo yes 19:38
FROGGS :o)
umm, there is such an object in the worklist: {header = {owner = 27885928, flags = 0, size = 0, forwarder = 0x0, sc = 0x28000000000000}, st = 0x0} 20:26
"sending a handle 0x1a9a958 to object 0x7ffff6ac85d8 to thread 27885928" 20:27
timotimo i don't understand ... 20:36
FROGGS this object has a threadid of 27885928
that is why it is blowing up
should be 0
timotimo ah 20:37
oops :)
FROGGS: are you about to fix it? should i try to valgrind as well? 21:08
FROGGS valgrind does not help 21:09
timotimo i can't spend a lot of attention on it, though
mhk
FROGGS gdb does a bit, but I am not sure what to do
timotimo :(
FROGGS I mean, it looks like we pass a pointer of the thing we actually want to add to the worklist 21:10
21:10 ggoebel110 joined
FROGGS but I am not sure how likely that is 21:10
the good thing is, that pointer is always the same, even when you rebuild moarvm 21:11
timotimo you can search the whole binary for that value :)
FROGGS I am bisecting now because I am out of ideas
:o)
jnthn back 21:17
FROGGS o/
21:18 tgt joined
FROGGS ó.Ò 21:26
this is to blame: github.com/MoarVM/MoarVM/commit/05...c3051ba4d2
jnthn: can you review that patch please? github.com/MoarVM/MoarVM/commit/05...c3051ba4d2
yeah, it must be that: github.com/MoarVM/MoarVM/commit/05...0fa4804R61 21:28
if I comment that out, the error goes away
jnthn FROGGS: wrt github.com/MoarVM/MoarVM/commit/05...5dae81R831 how can that condition ever be false? 21:45
Given you assign them at startup?
FROGGS jnthn: it will be false for the very first time, no? 21:49
jnthn If you do
instance->stdin = MVM_file_get_stdin(instance->main_thread);
It will never be NULL after taht? 21:50
And startup occurs before we run any ops...
oh, ahng on, I see...
But if we're only meant to call them once...
FROGGS I can do it better, yes
jnthn If's safer to complain about a second call...
Or just write a setup_std_handles function in there that is called from bootstrap that does it. 21:51
uv_run(tc->loop, UV_RUN_NOWAIT);
What's the NOWIAT actually mean here?
FROGGS it won't block if there are no pending requests
jnthn OK, seem reasonable, now I glance the docs 21:53
(I was worried it may mean "don't wait for callbacks")
jnthn is at the get_boxed_ref also 22:12
22:21 colomon joined
FROGGS jnthn: I pushed 22:21
though, it does not help with my problem 22:22
jnthn Does look better, though... 22:23
What exaclty is the problem?
FROGGS ROGGS> --vmlibs=dynext/libperl6_ops_moar.so=Rakudo_ops_init src/gen/m-BOOTSTRAP.nqp
<FROGGS> Internal error: invalid thread ID in GC work pass
there is an item in the worklist that has a weird owner 22:24
if I dereference it once more, it almost looks sane (before it had size=0, afterwards it had size=168 and type=10) 22:25
jnthn Weird..
FROGGS except that its REPR name if unreadable
yeah
jnthn Yeah, sounds corrupte
FROGGS and this seems to introduce it: github.com/MoarVM/MoarVM/commit/05...0fa4804R61 22:26
especially what now is in setup_std_handles
jnthn Odd. Looks like they're correctly added as perm roots... 22:27
FROGGS hmmm, when I comment out the setup_std_handles now, it complains about STDERR not beeing initialized... so something is "using" it 22:28
ahh, that still might be the stuff in nqp 22:30
jnthn Hm, something is weird with the pow_I impl 22:36
FROGGS what exactly? 22:40
I could imagine that Inf and -Inf are not corret
jnthn github.com/MoarVM/MoarVM/issues/65 22:41
That task should be accessible to somebody other than me :)
FROGGS sounds doable, yes :o) 22:47
btw, what makes me think that my filehandles are to blame is that the corrupt item in the worklist appears after calling MVM_gc_root_add_permanents_to_worklist in collect.c line 73 22:50
jnthn Does the filehandle thing itself have a gc_mark? 22:51
FROGGS the MVMOSFilehandle? no 22:52
err, MVMOSHandle
so, it needs to add something to the worklist? yes? 22:53
jnthn Well, only if it refs anything...
FROGGS no, don't think so 22:54
jnthn oh wow, how on earth did we get away without having attribute auto-viv stuff this long... 22:57
FROGGS :o)
jnthn Building a hopeful fix for this...we should be past line 6000 at startup with this... 23:03
FROGGS cool!
23:08 colomon joined
jnthn Grr. 23:10
Fixing the misisng auto-viv breaks stuff.
FROGGS :( 23:11
jnthn: this adds the corrupt obj to the worklist: MoarVM/src/gc/collect.c:355: MVM_gc_worklist_add(tc, worklist, &new_addr_st->WHO); 23:27
jnthn o.O 23:29
Odd 23:30
FROGGS I added that right before the mentioned line: 23:32
if (new_addr_st->WHO && new_addr_st->WHO->header.owner > 0)
printf("ohh noes! %d\n", new_addr_st->WHO->header.owner);
and it comes out like:
ohh noes! 28410216
sending a handle 0x1b1a958 to object 0x7f2a04d085d8 to thread 28410216
Internal error: invalid thread ID in GC work pass
this was called by MoarVM/src/gc/collect.c:288 23:44
jnthn Thing is, it probably copied that corruption from the object's old location... 23:46
FROGGS yeah :/
jnthn Meanwhile, I might have some progress on the auto-viv container thing 23:48
But getting tired...
FROGGS me too (not the progress, the other thing)
okay, the thing comes from the if (item_gen2) { branch 23:49
23:49 BenGoldberg joined
jnthn grrr 23:51
FROGGS so all I know is that it already is in the worklist :/
jnthn My fix didn't help at all...
FROGGS ó.ò
diakopter jnthb: are you spawning threads? 23:54
jnthn diakopter: Me? No...though it's FROGGS looking at the thing with the owner. But no threads... 23:55
Just corruption.
Oh...I see what's up... 23:56
diakopter whew
jnthn (with the auto-viv thing)
(not FROGGS's thing) 23:57
Grr, that's gonna be some "fun"...
diakopter wut
FROGGS ":/"
jnthn I didn't get around to putting in the attribute auto-viv thing
And we're accidentally relying on it not working in one place in regex code-gen
"fun" 'cus I think it may need a trip around the bootstrap loop to fix 23:58
Anyway, too tired to do that today. 23:59