Perl 6 - the future is here, just unevenly distributed

IRC log for #moarvm, 2016-06-11

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

All times shown according to UTC.

Time Nick Message
01:10 TimToady joined #moarvm
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:02 MasterDuke joined #moarvm
02:05 MasterDuke how do i get printf statements in moarvm code to show up when running nqp-m?
07:15 cognominal joined #moarvm
08:10 domidumont joined #moarvm
08:10 domidumont joined #moarvm
08:12 rurban_ joined #moarvm
08:15 domidumont joined #moarvm
09:01 cognominal joined #moarvm
09:21 camelia joined #moarvm
10:01 FROGGS joined #moarvm
10:15 jnthn MasterDuke: Shouldn't have to do anything special, except make sure you're doing "make install" and that it's installing over the MoarVM NQP was built against.
10:17 FROGGS o/
10:22 jnthn hi FROGGS :)
10:22 jnthn Nice to see you about again :)
10:22 FROGGS aye :o)
10:22 FROGGS nice to have some time to be here again :o)
10:22 jnthn :-)
10:23 FROGGS I even wrote some perl 6 the other day *g*
10:25 jnthn Lucky. My current Perl 6 related tasks need me to write C and Java :P
10:25 FROGGS eww
10:26 FROGGS well, C is fun at least
10:26 jnthn Yeah, I don't mind C :)
10:26 FROGGS at work I often port php stuff to p5 these days...
10:27 FROGGS making me wonder how some parts of the old code could have actually worked
10:27 FROGGS I mean, I wrote that php code about ten years ago :o)
10:27 nwc10 poor FROGGS - might have to do a talk about Perl 5 soon :-)
10:27 FROGGS hehe
10:34 jnthn When I look at code I wrote long ago, I at least take comfort I learned something since writing it. :-)
10:34 FROGGS ohh yes
10:35 FROGGS would be odd to look at a decade old code and being happy with it
11:06 dalek MoarVM: ef3a804 | jnthn++ | src/core/ (5 files):
11:06 dalek MoarVM: Allow HLL handler for unhandled lexical exception.
11:06 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/ef3a804d7c
11:08 MasterDuke jnthn: i see the print output when "make install"ing nqp, but then not when i actually run nqp-m
11:09 jnthn Then it's not being hit or you're running the wrong thing I guess...
11:09 MasterDuke if i stick in a MVM_exception_throw_adhoc i get output, but that's an unwieldy debug method
11:09 jnthn Or the output is being redirected somewhere
11:10 jnthn I guess it's also possible that there's some weird things going on because all actual program output goes via libuv. Could try adding a flush
11:10 jnthn Though it'd be odd in that I've not run into issues like that and I use logging printfs plenty while debugging
11:12 MasterDuke i thought about a flush, but haven't seriously written C in a while and was under the impression that having "\n" in my output would trigger that (and also the program exiting)
11:12 FROGGS I usually do fprintf(stderr, ...)
11:13 FROGGS because stdout might be redirected into precomp files
11:13 FROGGS (sorry if I talk rubbish, I didnt catch the entire discussion)
11:14 MasterDuke yeah, tried that too, think it had the same behavior
11:14 jnthn Yeah, stderr is safter if you're doing a build
11:16 jnthn Argh, what... Some tests I thought I'd fixed up involving lexical handlers for return are failing again due to inlining :/
11:17 jnthn Ah, phew, I busted it in a silly way
11:19 MasterDuke what's odd is that a printf in ascii.c works all the time, but the printf in coerce.c only during the build
11:19 dalek MoarVM: 4a40a01 | jnthn++ | src/core/exceptions.c:
11:19 dalek MoarVM: Fix lexical inlined handler regression.
11:19 dalek MoarVM:
11:19 dalek MoarVM: We used to tweak the mode; now we just fall through, so pass the mode
11:19 dalek MoarVM: we really want.
11:19 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/4a40a0107b
11:20 * jnthn spectests again :)
11:20 jnthn But fingers crossed the return improvements will be clean on MoarVM now
11:22 * lizmat hopes jnthn will see a TODO pass  :)
11:22 jnthn Oh?
11:22 jnthn We'll see
11:23 lizmat https://github.com/perl6/roast/commit/834afc7a26
11:24 jnthn Ah, yeah
11:24 jnthn Hopefully :)
11:25 * jnthn runs it manually
11:26 jnthn Fails
11:26 jnthn expected 948, got 984
11:26 cognominal joined #moarvm
11:26 jnthn Curious.
11:30 jnthn Huh, and if I take the test out of the larger test file it doesn't fail
11:31 lizmat yeah, I also found that if you put that code in a block, it doesn't fail either
11:32 jnthn Ah, I can make it fail by upping the iteration count
11:32 lizmat m: sub bar() { foo; return 6 }; sub foo() { return 42 }; my $a; for ^158 { $a += bar }; say $a
11:32 camelia rakudo-moar 926f1d: OUTPUT«984␤»
11:33 lizmat m: { sub bar() { foo; return 6 }; sub foo() { return 42 }; my $a; for ^158 { $a += bar }; say $a }
11:33 camelia rakudo-moar 926f1d: OUTPUT«948␤»
11:36 jnthn Oh, duh...
11:37 jnthn Inlining `return` by rewriting throwpayloadlexcaller into throwpayloadlex ain't going to work...'cus it'll run straight into the inlined handler
11:41 FROGGS MasterDuke: when you see output during build and not during runtime, then maybe that code path is not taken at runtime?
11:44 MasterDuke except when i replace the print with MVM_exception_throw_adhoc (and add a conditional so it doesn't hit the exception during build) the exception gets thrown
11:44 * FROGGS .oO( Boy look straight! You're about to run into the inlined handler! )
11:45 FROGGS weird
11:46 jnthn Guess I'll ponder the best way to fix this over lunch... :) bbl
11:47 MasterDuke yeah, it's been interesting trying to figure out what's going on
11:48 MasterDuke i like Perl[5,6] much better than C
11:49 travis-ci joined #moarvm
11:49 travis-ci MoarVM build errored. Jonathan Worthington 'Fix lexical inlined handler regression.
11:49 travis-ci https://travis-ci.org/MoarVM/MoarVM/builds/136905575 https://github.com/MoarVM/MoarVM/compare/ef3a804d7cd5...4a40a0107b19
11:49 travis-ci left #moarvm
11:50 MasterDuke actually, another question, how do i print a MVMString? '%s' in *printf doesn't seem to do it
12:00 MasterDuke nm, MVM_string_utf8_encode_C_string seems to do the trick
12:29 jnthn That's th eone
12:29 jnthn *the one
12:30 jnthn I've pondered the inlining thing enough over lunch to realize it's a bit tricky, and more tricky than I'll find time for today, given it's competing with making momos and chilli sauce, and crashing on the sofa with a beer to watch the euro footy :)
12:31 lizmat :-)
12:31 * lizmat is glad the underlying cause has been found  :-)
12:31 jnthn Well, it raises the more general interesting question of inlining and lexical-y things.
12:32 jnthn Which we've sorta dodged so far.
12:55 cognominal joined #moarvm
13:44 rurban_ joined #moarvm
13:55 timotimo invoke_lexical_handler_hll_erorr  -  tee hee
16:58 domidumont joined #moarvm
17:58 cognominal joined #moarvm
18:58 cognominal joined #moarvm
18:59 rurban_ joined #moarvm
19:06 edehont joined #moarvm

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