timotimo can someone engineer a piece of travis yml that'll build an nqp on top of every moarvm commit and runs its tests? 01:35
i imagine that'd be helpful for finding explosions early on
(though i almost always run at least a make test in nqp when i develop stuff and i'm afraid it could bust things) 01:36
(which is also something good about CI: it even runs the tests if the programmer doesn't expect the code to bust)
timotimo → bed
01:48 ilbot3 joined 02:40 vendethiel joined 03:27 travis-ci joined
travis-ci MoarVM build passed. jnthn 'Fix "make install" to know about src/instrument. 03:27
travis-ci.org/hoelzro/MoarVM/builds/71189017 github.com/hoelzro/MoarVM/compare/...8098d1a91a
03:27 travis-ci left 03:48 vendethiel joined
dalek arVM: d46d318 | hoelzro++ | .travis.yml:
Clone NQP for testing
04:10
arVM: 4605495 | hoelzro++ | .travis.yml:
Build and run NQP tests
arVM: 7b6ccae | hoelzro++ | .travis.yml:
Unshallow our MoarVM repo in Travis

This allows git-describe (and thus MoarVM version generation) to work
hoelzro timotimo: done ^
arVM: fd135d2 | hoelzro++ | docs/moar.pod:
Document MVM_CROSS_THREAD_WRITE_LOG and co.
04:14
06:17 vendethiel joined, FROGGS joined 06:45 zakharyas joined 07:01 vendethiel joined 07:21 vendethiel- joined 07:47 vendethiel joined 08:15 FROGGS joined 08:20 rurban joined
JimmyZ jnthn: how about refactor out MVM_instrument_ API? 08:33
jnthn JimmyZ: Not yet. 08:34
But eventually, yes
JimmyZ I want to refactor out MVM_instrument_add_instrumentation and MVM_instrument_do(MVMThreadContext *tc, MVMStaticFrame *sf, (void) callback(...)) ( where callback is about profiler etc..) and MVM_instrument_undo, if it is the right way. :) 08:46
08:46 vendethiel joined
jnthn Don't. 08:47
JimmyZ OK
jnthn I want to also support HLL-level instrumentation
But that's...tricky. 08:48
Also I'm not sure the overall design of this stuff is good yet
We have composability issue. 08:49
JimmyZ yeah, I considered we don't have that too
jnthn That is, you can't compose two "meta-interpretation" components
JimmyZ so it is not the right time to do it yet. 08:50
jnthn Yeah, it's better for the two to be able to evolve as they need for now.
And yeah, I'm not sure apply/unapply is going to be the right model. 08:51
JimmyZ we also may also want to suport Dtrace and SystemTAP :P 08:52
09:20 vendethiel joined 10:28 vendethiel joined 10:31 vendethiel- joined 12:09 brrt joined
brrt \o 13:00
nwc10 o/ 13:01
brrt compilation is hard 13:28
lets go shopping?
jnthn For compiler textbooks? :) 13:30
brrt that'd be nice
actually, it's compiling well that's hard 13:31
13:35 JimmyZ_ joined
brrt compiling 'just ok' is doable ^^ 13:41
actually, this is some pretty lousy code, and wrong too; it doesn't short-circuit on ALL 13:59
hmm 14:00
dalek arVM/even-moar-jit: c451b05 | brrt++ | src/jit/ (3 files):
Add support for IF/WHEN/CALL in pseudocompiler

This implements spilling and invalidation to ensure the validity of register during execution. It generates some pretty lousy code.
14:03
brrt tl;dr, doing the write-barrier was much more than i can practically chew 14:04
hmm 14:05
i know of a way to compile ALL with short-circuiting :-)
(ALL is generalised boolean AND. boolean AND (not binary AND) is a bit weird on a machine level, and an excellent target for a clever tile) 14:06
the utility of this approach seems to be me learning how difficult this all is? 14:07
arnsholt That's more or less universal, in my experience. Kind of the technological corollary of "no plan ever survives contact with the enemy" 14:08
brrt right :-)
arnsholt When you plan it, it's pretty straightforward, and then when you implement it, you realize there are edge cases everywhere
brrt yeah... 14:10
in my case
- i should've picked a register representation that would allow me to take a subset
- boolean AND is *much more* like a conditional than like a binary operation, because of the short-circuiting 14:11
anyway, i'm planning to 'regroup' after this is working 14:12
get a new, better, shinier plan
arnsholt Plan to throw one away, right? =) 14:21
brrt right. it's just a bit scary and overwhelming at times 14:22
arnsholt I can imagine. And yeah, sometimes the only way to figure out how to do it is to start implementing it, realize that your approach sucks, and start over with a better approach
brrt nods 14:25
14:40 synbot6 joined
brrt dinner & 14:48
hoelzro Windows users: may I ask how you set up your Moar/Rakudo dev environment? I set up a VM last night with VS2013, msysgit, and Strawberry Perl, but Configure.pl wants to use gcc, and I feel like I should use cl 14:54
JimmyZ_ open msvc x64 toolbox, and run configure.pl there. 14:56
FROGGS hoelzro: you can use gcc if you want 14:57
hoelzro JimmyZ_: what's MSVC x64 toolbox?
FROGGS: I know, I just want to make sure that I'
...I'm not using GCC-isms in the code so that it doesn't compile with CL 14:58
JimmyZ_ it is in the start menu
FROGGS aye
JimmyZ_ the virtual studio group
FROGGS 'Visual Studio Command Prompt' or so... (I've got a german windows)
hoelzro ah, so you open the command prompt via VS? 14:59
FROGGS no
it is in your start menu :o) 15:00
hoelzro alright
I'll give that a shot after work =)
FROGGS or you run cmd.exe, and run vcvars64
hoelzro ooooh
FROGGS then it should autodetect cl+nmake
(it being Configure.pl)
hoelzro I haven't really used Windows since XP, so this 8.1 VM is...new to me
mhmm
FROGGS it is not that bad actually 15:01
timotimo hoelzro: grab yourself a copy of Classic Shell and it'll be much less weird :)
hoelzro FROGGS: not bad, just new =)
FROGGS aye 15:02
m: use nqp; say (-> { say nqp::where(nqp::decont(&?BLOCK)); my @a = 0..100_000; say nqp::where(nqp::decont(&?BLOCK)) })() 15:04
camelia rakudo-moar 89847f: OUTPUT«140535982791864␤63352544␤True␤»
FROGGS jnthn: might that be the problem why I don't hit the blocks I leave() ?
I thought we pin those mem addresses... 15:05
jnthn FROGGS: Only if you're failing to GC mark something
FROGGS I don't even know that I would have to GC mark something 15:06
I am just throwing an exception 15:07
and it looks like this: 15:08
leave_label (thrown_label=0x7f16e978f2d8 == block_label=(nil) == f=0x28d5d00 == f->code_ref=0x7f16e960aff0 == code_object=0x7f16e960af58)
timotimo is the f->code_ref somewhere in a gc_mark routine?
FROGGS the label (the &?BLOCK here) is quite far away from f->code_ref
timotimo the pointer will only be updated properly if the gc knows about it
jnthn Surely, but did you add an extra field to exception?
FROGGS jnthn: I.... did
jnthn And did you add code to GC mark it? 15:09
FROGGS :S
jnthn Then that's probably your bug ;)
Link to the patch where you added it?
I can tell you what to do :)
FROGGS but... I don't like bugs!
timotimo we'll put it in a glass and put it down outside, okay? :) 15:10
hoelzro www.slideshare.net/curryon/cliff-cl...hevmwriter
FROGGS jnthn: github.com/MoarVM/MoarVM/commit/f2...032a84977f
hoelzro and for those of you who prefer video: www.youtube.com/watch?v=vzzABBxo44g 15:11
jnthn In src/6model/reprs/MVMException.c find gc_mark function 15:12
and after
MVM_gc_worklist_add(tc, worklist, &body->payload);
add
MVM_gc_worklist_add(tc, worklist, &body->label);
FROGGS I see
jnthn: I did 15:13
scroll up
(in the patch)
dalek arVM/leave: 3d6d332 | FROGGS++ | / (10 files):
add op leave and change CONTROL_RETURN to CONTROL_LEAVE
15:16
timotimo hm, so that's not the bug, eh? :\
jnthn ah 15:18
FROGGS so, I pushed all my stuff if someone wants to try/look
my test case if just this, which misses the block: perl6 -e 'say (-> { 21; &?BLOCK.leave(42) })()'
for loops and while loops with labels work so far 15:19
and a bare leave() in a block
(which does not throw an exception)
and the mode for this exception is MVM_EX_THROW_DYN, which is totally right 15:24
hmmm, the first block I hit is called 'leave', which might be the method I am in 15:30
the second it called 'command_eval', which is weird 15:31
the third is called '<anon>'
and the fourth is 'leave' again O.o
ohh, it is the identical 'leave' actually
so the second block might be the outer of the method leave in Block 15:34
which makes sense
the entire output looks like this: gist.github.com/FROGGS/b4afc20535fb35164d78 15:36
jnthn: can I give my anonymous block a name? 15:44
arnsholt If it's QAST, it's just QAST::Block.new(:name(...)) 15:48
FROGGS hmmm
setcodename sounds promising 15:50
$ perl6 -e 'use nqp; say (-> { 21; nqp::setcodename(nqp::decont(&?BLOCK), nqp::unbox_s("flubber")); &?BLOCK.leave(42) })()' 15:51
setcodename needs a code ref
but I thought it *is* a code ref 15:52
timotimo i think you need &?BLOCK's "$!do" attribute or something
FROGGS timotimo: yes, I figured that, though jnthn said that th &?BLOCK is the code_ref and $!do is the code_object 15:53
timotimo oh
FROGGS setting the name via $!do works, and I dont hit that name
timotimo you could MVM_dump_backtrace(tc) in some places to see more interesting data?
FROGGS but where to look :/ 15:54
I updated the gist at: gist.github.com/FROGGS/b4afc20535fb35164d78
timotimo i actually didn't look deeply into your changes yet :S 15:55
FROGGS np
m: say Sub.^mro 15:56
camelia rakudo-moar ce8822: OUTPUT«(Sub) (Routine) (Block) (Code) (Any) (Mu)␤»
FROGGS ohh! 15:58
when I do the &?BLOCK.leave in a sub it at least shows my code name
and the frame->code_ref is identical to the &?BLOCK 15:59
are we inlining code outside of spesh? 16:01
now I need to recall what jnthn said about the handler table... 16:03
timotimo there's a bit of inlining in the static optimizer, you can check it via --target=ast vs --target=optimize 16:04
16:04 cognominal joined
FROGGS timotimo: but that would get disabled by --optimize=off, right? 16:05
timotimo right
FROGGS and that does not change my problem with blocks 16:06
timotimo mhm 16:08
16:08 nebuchadnezzar joined
FROGGS so, where the heck is The Exception Handler Table™? 16:10
does not seem to be in moar 16:11
timotimo look for MVMFrameHandler? 16:14
16:16 vendethiel joined
FROGGS that maps to MAST::HandlerScope IIRC 16:17
timotimo oh? 16:18
timotimo hasn't done terribly much with exception handler fiddling yet 16:19
FROGGS ohh 16:20
now I think I understand how return works
nice 16:27
now I can leave a Sub
... and segfault
timotimo a step forwards ... off of a cliff ;) 16:31
FROGGS :D
I bet we somewhere cheat about bare blocks 16:32
timotimo hm, do you install a handler for the "leave" thing in the block? 16:33
FROGGS no
dunno how to do that yet 16:34
timotimo hm, because i'd expect the presence of such a handler would disable cheating of the relevant kinds
FROGGS okay, I could potentially call nqp::lexotic('LEAVE')
but I don't think it is the way forward
lol 16:36
timotimo: adding nqp::lexotic("LEAVE"); actually makes my block appear :D
timotimo++
hmmm, maybe we skip frames without framehandlers?
timotimo oof; the only thing about skipping frames i recall from the close past is when we fixed skipping of autogenerated protos and such 16:41
but that's a whole different thing
FROGGS aye
okay, now I see that the function I am in only gets called for frames that have frame handlers 16:43
that explains very much
timotimo ah! 16:44
FROGGS though I guess we don't want to add frame handlers to every block 16:45
timotimo yeah, that could be ... bad :S
well, i don't know 16:46
FROGGS and --optimize=off is also needed still
16:59 JimmyZ_ joined 17:21 sivoais joined 17:26 zakharyas joined 18:41 zakharyas joined 19:13 brrt joined
brrt \o 19:14
nwc10 o/ 19:16
brrt how is it here :-)
btw, with regards to the pyston article 19:19
i... kind of think that proves llvm wasn't a good choice for us
after all, we still have JVM for a slow-start-high-performance backend
jnthn I can't hear you over my awesome new fan to keep me cool in hot weather :P
brrt still hot? in .cz? 19:20
jnthn No
I don't need it on at all at the moment :)
brrt it's been something like 18-22 degrees all week
jnthn But it's gonna hit 30 or so tomorrow
brrt yes, here too
jnthn Or 35 or whatever
The monthly average high for July is meant to be about 23C here
brrt i have a little inflatable pool standing ready for when that happens 19:21
jnthn I'm pretty sure this is turning out to be an above-average year
brrt yeah....
PerlJam some friends of mine who just got back to Texas from Switzerland said it was the hottest year on record there since the 1920s. 19:22
jnthn hopes it'll be a little cooler by the time of the Swiss Perl Workshop :) 19:25
brrt when is that?
jnthn also wonders if he'll manage to find a few days relaxation in the mountains between that and YAPC::EU
brrt: Shortly before YAPC::EU
brrt ah, ok
there's a GPW, APW, NLPW.... 19:26
is there a Belgium PW?
jnthn There has been in the past, at least 19:28
19:33 FROGGS joined
brrt btw, can i assume kyiv == kiev and that it is peaceful? 19:44
jnthn brrt: Yes :)
brrt: Kyiv is the translit of the Ukrainian spelling, Kiev of the Russian spelling
But I'd not read too much into that either. My wife goes by the translit of the Ukrainian spelling of her name, even though Russian is her primary/home language. :) 19:45
brrt aha
well, ehm, let's just say that 'western' names of remote places tend to become more like the native names as they become more relevant to the western world 19:46
case in point: beijing
jnthn :)
When I was a kid I thought it was called "peaking duck" 'cus bits of the meat "looked" out the ends of the crepe... :P 19:48
brrt has actually never had that food 19:51
jnthn It can be good. 19:52
I think the best I actually had was in Taipei...
.oO( or is that Taibei... )
brrt has no idea
jnthn The "pei" in "taipei" means "north", just as the "bei" in "beijing" does. 19:53
Thus where the "Pe" in "Peking" comes from] 19:54
As far as I grok it, anyway :)
Also, if you try and actually order a tsingtao beer in China, that's another example of a broken translit surviving...it's actually chingdao or so
brrt i can imagine that'd give problems using westernized pronounciation 19:56
hoelzro there's no way to force a GC run from Perl 6, is there? 20:29
I want to test something out later
jnthn nqp::force_gc() or so 20:30
timotimo yeah, we have some op like that, but i think it's forcegc? 20:34
no, you were right 20:35
it is force_gc indeed
jnthn: did you think at all about the op that'd allow NativeCall.pm to ask the NativeCall implementation if a given library name is available on the system? 20:36
(and maybe also query ldconfig) 20:38
jnthn timotimo: I don't have any particular opposition to it; curious if we can implement it on JVM too 20:41
timotimo querying ldconfig is basically ldconfig -p | grep libraryname ;)
but that's linux-only - no clue what the other platforms have 20:42
brrt grr, not getting my case 20:55
i'm off for tonight
21:23 TEttinger joined
timotimo ... case? 21:37
21:48 Ven joined 23:13 xiaomiao joined 23:21 timo1 joined