Perl 6 - the future is here, just unevenly distributed

IRC log for #moarvm, 2015-07-16

| Channels | #moarvm index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
01:35 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 timotimo i imagine that'd be helpful for finding explosions early on
01:36 timotimo (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 timotimo (which is also something good about CI: it even runs the tests if the programmer doesn't expect the code to bust)
01:36 * timotimo → bed
01:48 ilbot3 joined #moarvm
01:48 Topic for #moarvm is now https://github.com/moarvm/moarvm | IRC logs at  http://irclog.perlgeek.de/moarvm/today
02:40 vendethiel joined #moarvm
03:27 travis-ci joined #moarvm
03:27 travis-ci MoarVM build passed. jnthn 'Fix "make install" to know about src/instrument.
03:27 travis-ci https://travis-ci.org/hoelzro/MoarVM/builds/71189017 https://github.com/hoelzro/MoarVM/compare/5239796674b1...938098d1a91a
03:27 travis-ci left #moarvm
03:48 vendethiel joined #moarvm
04:10 dalek MoarVM: d46d318 | hoelzro++ | .travis.yml:
04:10 dalek MoarVM: Clone NQP for testing
04:10 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/d46d31858d
04:10 dalek MoarVM: 4605495 | hoelzro++ | .travis.yml:
04:10 dalek MoarVM: Build and run NQP tests
04:10 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/4605495066
04:10 dalek MoarVM: 7b6ccae | hoelzro++ | .travis.yml:
04:10 dalek MoarVM: Unshallow our MoarVM repo in Travis
04:10 dalek MoarVM:
04:10 dalek MoarVM: This allows git-describe (and thus MoarVM version generation)
04:10 hoelzro timotimo: done ^
04:10 dalek MoarVM: to work
04:10 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/7b6ccaea63
04:14 dalek MoarVM: fd135d2 | hoelzro++ | docs/moar.pod:
04:14 dalek MoarVM: Document MVM_CROSS_THREAD_WRITE_LOG and co.
04:14 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/fd135d235d
06:17 vendethiel joined #moarvm
06:17 FROGGS joined #moarvm
06:45 zakharyas joined #moarvm
07:01 vendethiel joined #moarvm
07:21 vendethiel- joined #moarvm
07:47 vendethiel joined #moarvm
08:15 FROGGS joined #moarvm
08:20 rurban joined #moarvm
08:33 JimmyZ jnthn: how about refactor out MVM_instrument_ API?
08:34 jnthn JimmyZ: Not yet.
08:34 jnthn But eventually, yes
08:46 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 vendethiel joined #moarvm
08:47 jnthn Don't.
08:47 JimmyZ OK
08:47 jnthn I want to also support HLL-level instrumentation
08:48 jnthn But that's...tricky.
08:48 jnthn Also I'm not sure the overall design of this stuff is good yet
08:49 jnthn We have composability issue.
08:49 JimmyZ yeah, I considered we don't have that too
08:49 jnthn That is, you can't compose two "meta-interpretation" components
08:50 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.
08:51 jnthn And yeah, I'm not sure apply/unapply is going to be the right model.
08:52 JimmyZ we also may also want to suport Dtrace and SystemTAP :P
09:20 vendethiel joined #moarvm
10:28 vendethiel joined #moarvm
10:31 vendethiel- joined #moarvm
12:09 brrt joined #moarvm
13:00 brrt \o
13:01 nwc10 o/
13:28 brrt compilation is hard
13:28 brrt lets go shopping?
13:30 jnthn For compiler textbooks? :)
13:30 brrt that'd be nice
13:31 brrt actually, it's compiling well that's hard
13:35 JimmyZ_ joined #moarvm
13:41 brrt compiling 'just ok' is doable ^^
13:59 brrt actually, this is some pretty lousy code, and wrong too; it doesn't short-circuit on ALL
14:00 brrt hmm
14:03 dalek MoarVM/even-moar-jit: c451b05 | brrt++ | src/jit/ (3 files):
14:03 dalek MoarVM/even-moar-jit: Add support for IF/WHEN/CALL in pseudocompiler
14:03 dalek MoarVM/even-moar-jit:
14:03 dalek MoarVM/even-moar-jit: This implements spilling and invalidation to ensure the validity
14:03 dalek MoarVM/even-moar-jit: of register during execution. It generates some pretty lousy code.
14:03 dalek MoarVM/even-moar-jit: review: https://github.com/MoarVM/MoarVM/commit/c451b05eff
14:04 brrt tl;dr, doing the write-barrier was much more than i can practically chew
14:05 brrt hmm
14:05 brrt i know of a way to compile ALL with short-circuiting :-)
14:06 brrt (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:07 brrt the utility of this approach seems to be me learning how difficult this all is?
14:08 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 :-)
14:08 arnsholt When you plan it, it's pretty straightforward, and then when you implement it, you realize there are edge cases everywhere
14:10 brrt yeah...
14:10 brrt in my case
14:10 brrt - i should've picked a register representation that would allow me to take a subset
14:11 brrt - boolean AND is *much more* like a conditional than like a binary operation, because of the short-circuiting
14:12 brrt anyway, i'm planning to 'regroup' after this is working
14:12 brrt get a new, better, shinier plan
14:21 arnsholt Plan to throw one away, right? =)
14:22 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
14:25 * brrt nods
14:40 synbot6 joined #moarvm
14:48 brrt dinner &
14:54 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:56 JimmyZ_ open msvc x64 toolbox, and run configure.pl there.
14:57 FROGGS hoelzro: you can use gcc if you want
14:57 hoelzro JimmyZ_: what's MSVC x64 toolbox?
14:57 hoelzro FROGGS: I know, I just want to make sure that I'
14:58 hoelzro ...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
14:58 FROGGS aye
14:58 JimmyZ_ the virtual studio group
14:58 FROGGS 'Visual Studio Command Prompt' or so... (I've got a german windows)
14:59 hoelzro ah, so you open the command prompt via VS?
14:59 FROGGS no
15:00 FROGGS it is in your start menu :o)
15:00 hoelzro alright
15:00 hoelzro I'll give that a shot after work =)
15:00 FROGGS or you run cmd.exe, and run vcvars64
15:00 hoelzro ooooh
15:00 FROGGS then it should autodetect cl+nmake
15:00 FROGGS (it being Configure.pl)
15:00 hoelzro I haven't really used Windows since XP, so this 8.1 VM is...new to me
15:00 hoelzro mhmm
15:01 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 :)
15:01 hoelzro FROGGS: not bad, just new =)
15:02 FROGGS aye
15:04 FROGGS 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␤»
15:04 FROGGS jnthn: might that be the problem why I don't hit the blocks I leave() ?
15:05 FROGGS I thought we pin those mem addresses...
15:05 jnthn FROGGS: Only if you're failing to GC mark something
15:06 FROGGS I don't even know that I would have to GC mark something
15:07 FROGGS I am just throwing an exception
15:08 FROGGS and it looks like this:
15:08 FROGGS leave_label (thrown_label=0x7f16e978f2d8 == block_label=(nil) == f=0x28d5d00 == f->code_ref=0x7f16e960aff0 == code_object=0x7f16e960af58)
15:08 timotimo is the f->code_ref somewhere in a gc_mark routine?
15:08 FROGGS the label (the &?BLOCK here) is quite far away from f->code_ref
15:08 timotimo the pointer will only be updated properly if the gc knows about it
15:08 jnthn Surely, but did you add an extra field to exception?
15:08 FROGGS jnthn: I.... did
15:09 jnthn And did you add code to GC mark it?
15:09 FROGGS :S
15:09 jnthn Then that's probably your bug ;)
15:09 jnthn Link to the patch where you added it?
15:09 jnthn I can tell you what to do :)
15:09 FROGGS but... I don't like bugs!
15:10 timotimo we'll put it in a glass and put it down outside, okay? :)
15:10 hoelzro http://www.slideshare.net/curryon/cliff-clickbitsofadviceforthevmwriter
15:10 FROGGS jnthn: https://github.com/MoarVM/MoarVM/commit/f2a74808f9d3d7b69dee275e1a9eb130d101b41e#diff-ad31fa3513234328c89cbe032a84977f
15:11 hoelzro and for those of you who prefer video: https://www.youtube.com/watch?v=vzzABBxo44g
15:12 jnthn In src/6model/reprs/MVMException.c find gc_mark function
15:12 jnthn and after
15:12 jnthn MVM_gc_worklist_add(tc, worklist, &body->payload);
15:12 jnthn add
15:12 jnthn MVM_gc_worklist_add(tc, worklist, &body->label);
15:12 FROGGS I see
15:13 FROGGS jnthn: I did
15:13 FROGGS scroll up
15:13 FROGGS (in the patch)
15:16 dalek MoarVM/leave: 3d6d332 | FROGGS++ | / (10 files):
15:16 dalek MoarVM/leave: add op leave and change CONTROL_RETURN to CONTROL_LEAVE
15:16 dalek MoarVM/leave: review: https://github.com/MoarVM/MoarVM/commit/3d6d332bcf
15:16 timotimo hm, so that's not the bug, eh? :\
15:18 jnthn ah
15:18 FROGGS so, I pushed all my stuff if someone wants to try/look
15:18 FROGGS my test case if just this, which misses the block: perl6 -e 'say (-> { 21; &?BLOCK.leave(42) })()'
15:19 FROGGS for loops and while loops with labels work so far
15:19 FROGGS and a bare leave() in a block
15:19 FROGGS (which does not throw an exception)
15:24 FROGGS and the mode for this exception is MVM_EX_THROW_DYN, which is totally right
15:30 FROGGS hmmm, the first block I hit is called 'leave', which might be the method I am in
15:31 FROGGS the second it called 'command_eval', which is weird
15:31 FROGGS the third is called '<anon>'
15:31 FROGGS and the fourth is 'leave' again O.o
15:31 FROGGS ohh, it is the identical 'leave' actually
15:34 FROGGS so the second block might be the outer of the method leave in Block
15:34 FROGGS which makes sense
15:36 FROGGS the entire output looks like this: https://gist.github.com/FROGGS/b4afc20535fb35164d78
15:44 FROGGS jnthn: can I give my anonymous block a name?
15:48 arnsholt If it's QAST, it's just QAST::Block.new(:name(...))
15:48 FROGGS hmmm
15:50 FROGGS setcodename sounds promising
15:51 FROGGS $ perl6 -e 'use nqp; say (-> { 21; nqp::setcodename(nqp::decont(&?BLOCK), nqp::unbox_s("flubber")); &?BLOCK.leave(42) })()'
15:51 FROGGS setcodename needs a code ref
15:52 FROGGS but I thought it *is* a code ref
15:52 timotimo i think you need &?BLOCK's "$!do" attribute or something
15:53 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
15:53 FROGGS setting the name via $!do works, and I dont hit that name
15:53 timotimo you could MVM_dump_backtrace(tc) in some places to see more interesting data?
15:54 FROGGS but where to look :/
15:54 FROGGS I updated the gist at: https://gist.github.com/FROGGS/b4afc20535fb35164d78
15:55 timotimo i actually didn't look deeply into your changes yet :S
15:55 FROGGS np
15:56 FROGGS m: say Sub.^mro
15:56 camelia rakudo-moar ce8822: OUTPUT«(Sub) (Routine) (Block) (Code) (Any) (Mu)␤»
15:58 FROGGS ohh!
15:58 FROGGS when I do the &?BLOCK.leave in a sub it at least shows my code name
15:59 FROGGS and the frame->code_ref is identical to the &?BLOCK
16:01 FROGGS are we inlining code outside of spesh?
16:03 FROGGS now I need to recall what jnthn said about the handler table...
16:04 timotimo there's a bit of inlining in the static optimizer, you can check it via --target=ast vs --target=optimize
16:04 cognominal joined #moarvm
16:05 FROGGS timotimo: but that would get disabled by --optimize=off, right?
16:05 timotimo right
16:06 FROGGS and that does not change my problem with blocks
16:08 timotimo mhm
16:08 nebuchadnezzar joined #moarvm
16:10 FROGGS so, where the heck is The Exception Handler Table™?
16:11 FROGGS does not seem to be in moar
16:14 timotimo look for MVMFrameHandler?
16:16 vendethiel joined #moarvm
16:17 FROGGS that maps to MAST::HandlerScope IIRC
16:18 timotimo oh?
16:19 * timotimo hasn't done terribly much with exception handler fiddling yet
16:20 FROGGS ohh
16:20 FROGGS now I think I understand how return works
16:27 FROGGS nice
16:27 FROGGS now I can leave a Sub
16:27 FROGGS ... and segfault
16:31 timotimo a step forwards ... off of a cliff ;)
16:31 FROGGS :D
16:32 FROGGS I bet we somewhere cheat about bare blocks
16:33 timotimo hm, do you install a handler for the "leave" thing in the block?
16:33 FROGGS no
16:34 FROGGS 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
16:34 FROGGS okay, I could potentially call nqp::lexotic('LEAVE')
16:34 FROGGS but I don't think it is the way forward
16:36 FROGGS lol
16:36 FROGGS timotimo: adding nqp::lexotic("LEAVE"); actually makes my block appear :D
16:36 FROGGS timotimo++
16:36 FROGGS hmmm, maybe we skip frames without framehandlers?
16:41 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 timotimo but that's a whole different thing
16:41 FROGGS aye
16:43 FROGGS okay, now I see that the function I am in only gets called for frames that have frame handlers
16:43 FROGGS that explains very much
16:44 timotimo ah!
16:45 FROGGS though I guess we don't want to add frame handlers to every block
16:45 timotimo yeah, that could be ... bad :S
16:46 timotimo well, i don't know
16:46 FROGGS and --optimize=off is also needed still
16:59 JimmyZ_ joined #moarvm
17:21 sivoais joined #moarvm
17:26 zakharyas joined #moarvm
18:41 zakharyas joined #moarvm
19:13 brrt joined #moarvm
19:14 brrt \o
19:16 nwc10 o/
19:16 brrt how is it here :-)
19:19 brrt btw, with regards to the pyston article
19:19 brrt i... kind of think that proves llvm wasn't a good choice for us
19:19 brrt after all, we still have JVM for a slow-start-high-performance backend
19:19 jnthn I can't hear you over my awesome new fan to keep me cool in hot weather :P
19:20 brrt still hot? in .cz?
19:20 jnthn No
19:20 jnthn I don't need it on at all at the moment :)
19:20 brrt it's been something like 18-22 degrees all week
19:20 jnthn But it's gonna hit 30 or so tomorrow
19:20 brrt yes, here too
19:20 jnthn Or 35 or whatever
19:20 jnthn The monthly average high for July is meant to be about 23C here
19:21 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
19:21 brrt yeah....
19:22 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:25 * jnthn hopes it'll be a little cooler by the time of the Swiss Perl Workshop :)
19:25 brrt when is that?
19:25 * jnthn also wonders if he'll manage to find a few days relaxation in the mountains between that and YAPC::EU
19:25 jnthn brrt: Shortly before YAPC::EU
19:25 brrt ah, ok
19:26 brrt there's a GPW, APW, NLPW....
19:26 brrt is there a Belgium PW?
19:28 jnthn There has been in the past, at least
19:33 FROGGS joined #moarvm
19:44 brrt btw, can i assume kyiv == kiev and that it is peaceful?
19:44 jnthn brrt: Yes :)
19:44 jnthn brrt: Kyiv is the translit of the Ukrainian spelling, Kiev of the Russian spelling
19:45 jnthn 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
19:46 brrt 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 brrt case in point: beijing
19:46 jnthn :)
19:48 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:51 * brrt has actually never had that food
19:52 jnthn It can be good.
19:52 jnthn I think the best I actually had was in Taipei...
19:52 jnthn .oO( or is that Taibei... )
19:52 * brrt has no idea
19:53 jnthn The "pei" in "taipei" means "north", just as the "bei" in "beijing" does.
19:54 jnthn Thus where the "Pe" in "Peking" comes from]
19:54 jnthn As far as I grok it, anyway :)
19:54 jnthn 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
19:56 brrt i can imagine that'd give problems using westernized pronounciation
20:29 hoelzro there's no way to force a GC run from Perl 6, is there?
20:29 hoelzro I want to test something out later
20:30 jnthn nqp::force_gc() or so
20:34 timotimo yeah, we have some op like that, but i think it's forcegc?
20:35 timotimo no, you were right
20:35 timotimo it is force_gc indeed
20:36 timotimo 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:38 timotimo (and maybe also query ldconfig)
20:41 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 ;)
20:42 timotimo but that's linux-only - no clue what the other platforms have
20:55 brrt grr, not getting my case
20:55 brrt i'm off for tonight
21:23 TEttinger joined #moarvm
21:37 timotimo ... case?
21:48 Ven joined #moarvm
23:13 xiaomiao joined #moarvm
23:21 timo1 joined #moarvm

| Channels | #moarvm index | Today | | Search | Google Search | Plain-Text | summary