Perl 6 - the future is here, just unevenly distributed

IRC log for #moarvm, 2013-12-01

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

All times shown according to UTC.

Time Nick Message
00:00 FROGGS gnight
00:00 FROGGS I am going to bed
00:12 jnthn Same... 'night
00:45 * timotimo is partying
00:46 timotimo i was hoping i could perhaps re-use the party to be a rakudo-on-moarvm-does-hello-world-party, but alas ... :(
01:34 BenGoldberg joined #moarvm
01:41 colomon joined #moarvm
01:43 BenGoldberg joined #moarvm
02:03 timotimo Missing serialize REPR function for REPR MVMStaticFrame - should i be seeing this right now?
02:24 ssutch joined #moarvm
03:55 ggoebel110 joined #moarvm
04:10 rurban joined #moarvm
04:44 ssutch joined #moarvm
08:10 ssutch joined #moarvm
08:15 FROGGS joined #moarvm
08:40 nwc10 currently SEGVs when compiling lib/Test.pm
08:40 nwc10 1200                    const MVMContainerSpec *spec = STABLE(cont)->container_spec;
08:40 nwc10 cont is 0x0
08:40 nwc10 I assume that this is known
10:57 dalek joined #moarvm
11:55 woolfy joined #moarvm
12:53 woolfy left #moarvm
13:36 ggoebel110 joined #moarvm
13:57 colomon joined #moarvm
14:15 tgt joined #moarvm
14:20 colomon joined #moarvm
14:49 dalek MoarVM: 4cc8691 | (Tobias Leich)++ | / (2 files):
14:49 dalek MoarVM: add support for --optimize=1 --debug=3
14:49 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/4cc86910a4
14:49 FROGGS timotimo: might be interesting for you
14:50 FROGGS I'll use --optimize=1 --debug=3 now to be able to build in a reasonable time again...
14:50 timotimo oh, neat :)
14:50 FROGGS jnthn: I have no luck to hunt that bug down
14:50 timotimo what are the numbers for?
14:51 FROGGS I know that 0 == nothing and 3 == most
14:51 FROGGS but I don't know what the numbers mean
14:51 timotimo OK
14:51 tadzik I think gcc has -Od these days, as in ""ptimize to make debugging easier
14:51 tadzik or maybe it's named differently
14:51 timotimo i think it's -Og
14:51 timotimo just like -g
14:51 tadzik oh, yes
14:51 FROGGS --debug adds the -g
14:52 * tadzik resists the urge to rant about screen and tmux's default keybindings
14:52 FROGGS and according to arnsholt++ -g3 even let you use macros in gdb
14:52 tadzik :o
14:52 timotimo oh wow
14:53 timotimo dang, my optimizations are causing fallout when parsing regexes ... how am i even doing that?
14:54 FROGGS :/
14:57 timotimo oh, huh
14:57 timotimo is <?before <ident> > supposed to generate a scan instruction inside it?
14:57 FROGGS ohh, I have to fix -O in rakudo now :/
14:58 timotimo what's that?
15:00 FROGGS ahh no, a make clean is need in MoarVM
15:00 FROGGS the optimize flag
15:01 jnthn timotimo: It could never actually scan, I guess...
15:01 FROGGS I think I make the generated config.c depend on the Makefile
15:01 timotimo it couldn't?
15:01 jnthn timotimo: It's just that we always put the scan int.
15:02 timotimo i think i'm confused about something
15:02 jnthn timotimo: Well, the thunk passed to <?before ...> must always be anchored so can never scan.
15:02 timotimo ah, i didn't know that
15:02 timotimo good.
15:02 jnthn But it's mostly a "emit code we don't need" thing...
15:03 timotimo i'm trying to figure out which of my changes is causing errors like "unrecognized metacharacter +, must be quoted to match literally"
15:03 timotimo fortunately the p6regex grammar itself isn't super-huge
15:03 timotimo i may be able to see it in the QAST.
15:05 dalek MoarVM: 10cf894 | (Tobias Leich)++ | build/Makefile.in:
15:05 dalek MoarVM: rebuild from source files when Makefile changed
15:05 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/10cf89453d
15:25 nwc10 [A
15:26 timotimo get up
15:26 timotimo (get on up)
15:26 timotimo get up
15:26 nwc10 tadzik: I've been using ^J, ^O and ^_
15:26 timotimo (get on up)
15:26 nwc10 I think if I wanted another level of tmux, I'd try ^^
15:26 nwc10 (not tried it on tmux. Worked on screen)
15:26 nwc10 I don't use those control keys much for other stuff
15:26 nwc10 but yes, ^a and ^b are less than awesome
15:26 tadzik I had C-z on screen
15:31 FROGGS[mobile] joined #moarvm
15:40 FROGGS nwc10: I get the same error as you btw, cont is NULL in
15:40 FROGGS at src/core/interp.c:1200
15:40 FROGGS 1200                const MVMContainerSpec *spec = STABLE(cont)->container_spec;
15:42 nwc10 gcc -c -fPIC -D_REENTRANT -D_FILE_OFFSET_BITS=64 -fPIC  -O%d  ...
15:42 nwc10 oops, borked.
15:42 timotimo hehe
15:46 jnthn Yes, I'm working on that at the moment :)
15:49 FROGGS nwc10: reconfigure moarvm
15:50 nwc10 IIRC I did
15:50 FROGGS (and reinstall and reconfigure rakudo)
15:51 FROGGS ohh, bug found
15:51 FROGGS if you dont pass --optimize...
15:52 nwc10 :-)
15:53 nwc10 that would explain a lot
15:56 dalek MoarVM: 5b77ecf | (Tobias Leich)++ | Configure.pl:
15:56 dalek MoarVM: fix optiflags when --optimize is not passed
15:56 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/5b77ecf80d
16:09 ggoebel110 joined #moarvm
16:36 * jnthn finally gets NQP tests clean again after the auto-viv stuff
16:37 jnthn Well, container viv really...
16:39 cxreg2 joined #moarvm
16:39 nwc10 FROGGS: works on my machine *but*, if I don't pass --optimize or anything, what compiler flags is moarvm supposed to be using now?
16:41 FROGGS nwc10: nothing
16:41 FROGGS no -Osomething and no -gsomething
16:41 FROGGS at least it was like that before
16:42 nwc10 nope, pretty sure that before it was defaulting to -g
16:43 nwc10 because I've not changed how I'm configuring moarvm
16:43 nwc10 and I don't have debugging symbols now
16:44 nwc10 debug used to default to "not optimise"
16:44 nwc10 # fiddle with flags
16:44 nwc10 -$args{debug}      //= 0 + !$args{optimize};
16:44 nwc10 -$args{optimize}   //= 0 + !$args{debug};
16:52 FROGGS ahh, I see
16:53 FROGGS dunno what to do about that though
16:53 nwc10 I think for most everything else I've ever met, the default is "optimise"
16:53 nwc10 the assmuption is that if you're building with defaults, you're not a developer of it
16:55 timotimo that default bit me in the butt real hard recently
16:57 jnthn .oO( bad ass-umption, eh? )
16:58 FROGGS +1 from my side
17:00 timotimo yup
17:01 nwc10 if your default is the one that makes more sense to your own developers than to end users, you're implicitly saying that you're not ready for prime time
17:02 timotimo fwiw, the end users would be using --gen-nqp anyway, which does pass --optimize to the parrot generating step and the same goes for moarvm.
17:02 nwc10 not necessarily. I suspect that OS packagers (and equivalent, such as *ports) will build each of the 3 in turn
17:03 nwc10 but we're not there yet :-/
17:03 timotimo mhm
17:05 dalek MoarVM: d1500d7 | jnthn++ | src/6model/reprs/P6opaque.c:
17:05 dalek MoarVM: Implement attribute container auto-viv in P6opaque
17:05 dalek MoarVM:
17:05 dalek MoarVM: We need to be able to differentiate an assigned null from unvivified.
17:05 dalek MoarVM: We'll get this for free in the future when we improve null handling;
17:05 dalek MoarVM: for now, this will do us.
17:05 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/d1500d7061
17:05 jnthn nwc10: When we haven't actually reached the point where we run Rakudo yet, I think claiming to be ready for prime time would be a bit premature... :)
17:05 nwc10 I'm still in Stage mast from last time! :-)
17:06 nwc10 jnthn: me too on that metric. But I'm still thinking that by that point, the default should be optimize, so avoiding redoing work would imply to default to that currently
17:06 nwc10 or at least, on non-gcc, default to optmise
17:06 jnthn nwc10: Yes, by then...
17:06 nwc10 and on gcc and gcc-wannabes, try for -g and -O
17:08 arnsholt For gcc-like I'd even argue for -g3
17:09 nwc10 some debuggers choke on it, but I think that that's "buyer beware"
17:09 arnsholt Oh, in that case maybe not
17:09 nwc10 I don't think that any distro is daft enough to ship a gcc which is too new for its gdb
17:10 arnsholt I was really happy when I discovered -g3 at the YAPC::NA hackathon this year. Makes debugging macro-heavy code so much less of a chore =)
17:11 timotimo i can't build nqp at the moment, at least in my branch
17:11 timotimo This type does not support elems
17:11 timotimo is that my branch's fault?
17:12 jnthn timotimo: On Moar? You need the stuff from master.
17:12 timotimo OK.
17:12 timotimo ah yes, i see.
17:15 jnthn We're up to line 6568 of the setting loading.
17:15 timotimo \o/
17:15 timotimo what's stopping us now?
17:15 jnthn Another "This type does not support elems" :)
17:16 arnsholt 6.5k, that's about a third of the setting, no?
17:17 jnthn arnsholt: Yeah, though this is all the pieces that run at startup
17:17 jnthn arnsholt: So it's really about where we hit those.
17:17 arnsholt Right, right
17:17 jnthn We're mostly hitting missing bits of the binder and list guts so far.
17:17 jnthn So, just NYIs.
17:20 arnsholt Right, that sounds reasonable
18:03 jnthn Ah...the current blocker seems to have been a thinko in p6shiftpush
18:04 FROGGS pfusch, as I said :o)
18:12 jnthn OK, 11,970 now.
18:12 FROGGS !!!
18:12 FROGGS \o/
18:12 FROGGS jnthn++
18:12 arnsholt Nice!
18:12 timotimo that's ossum! :)
18:13 jnthn Capture binding NYI
18:13 jnthn bah :)
18:13 FROGGS :D
18:31 jnthn Done that and now 13,499
18:32 jnthn $PROCESS::IN  = open('-');
18:32 FROGGS O.o
18:32 FROGGS how does that explode?
18:32 FROGGS I'll know in about 7 or 8 minutes
18:33 jnthn Trying to get to the bottom of that right now.
18:33 jnthn Deep, anyway
18:33 FROGGS k
18:33 jnthn Somewhere in IO::Handle.new
18:34 jnthn And within there, in BUILDALL
18:37 jnthn Something to do with attribute defaults, I think.
18:37 FROGGS the Bool::True?
18:38 FROGGS /home/froggs/dev/rakudo/src/core/IO.pm:92:    has $.chomp = Bool::True;
18:38 jnthn Or the 0...not sure.
18:39 jnthn It's somehow landing in the default invocation fallback
18:44 jnthn Got a guess...trying a patch.
18:45 FROGGS I get:
18:45 FROGGS Unhandled exception: Cannot find method 'Nil'
18:45 FROGGS at src/gen/m-BOOTSTRAP.nqp:2222  (blib/Perl6/BOOTSTRAP.moarvm:frame_name_735:18)
18:47 jnthn Yeah, that's a failing fail
18:47 jnthn Do a perl6-m -e "say 'hi'"
18:47 jnthn uh
18:47 jnthn Do a perl6-m --ll-exception -e "say 'hi'"
18:48 FROGGS Cannot find method 'postcircumfix:<( )>'
18:48 FROGGS I see
18:54 jnthn Yeah, got a fix for that now
18:54 jnthn Onto the next thing... :)
18:55 jnthn Still in open, but at least we get a bit further now...
18:55 jnthn default cont desc NYI
18:57 FROGGS ahh, yeah
19:13 jnthn "Internal error: invalid thread ID in GC work pass"
19:13 jnthn :(
19:14 jnthn oh, duh
19:14 jnthn I didn't root
19:14 FROGGS might that be the bug I've seen?
19:17 jnthn It *may* be, but the code I just wrote has a bug that could cause it too...
19:17 FROGGS mhm
19:20 jnthn I'm betting if I get us past this IO stuff, we next block in temporal...
19:22 jnthn Um, we hang...
19:22 FROGGS I hope we don't block for long there :o)
19:22 FROGGS uhh
19:55 jnthn Who worked on nqp::replace, ooc?
19:56 jnthn hm, doesn't look it could hang...
20:01 FROGGS was it timotimo++?
20:02 FROGGS yes, see https://github.com/MoarVM/MoarVM/commit/b2da0b7cfc26161aa86553ec6e6eb0442aa31b95
20:02 timotimo oh?
20:02 timotimo yes, i did that
20:03 timotimo did i forget to increment a counter in a loop or something?
20:03 jnthn timotimo: I can't see hwo
20:04 timotimo i got lots of help with that piece of code
20:04 jnthn Yeah, it's not guilty.
20:04 timotimo phew
20:04 jnthn It's C<fail> that's doing the wrong thing, it seems
20:06 moritz that does sound like something that could be backend dependent.
20:12 jnthn Um...
20:12 jnthn How does this ever work normally...
20:12 timotimo :D
20:12 jnthn DYNAMIC, if it doesn't find what it's after, calls fail
20:13 jnthn fail contains die $value if $*FATAL;
20:13 timotimo :D
20:13 jnthn which calls DYNAMIC, which... :)
20:14 jnthn ah, 'cus $PROCESS::FATAL = False;
20:16 moritz stage parse under valgrind not finished, after nearly 18 minutes runtime :(
20:16 FROGGS is that what a bootstrapping compiler does? a calls b that calls  that calls a? :P
20:16 FROGGS moritz: it can take hours
20:17 timotimo i do not evny you.
20:27 jnthn Oh, damn, I know what it is...
20:27 jnthn the WHENCE thing isn't implemented yet...
20:30 moritz jnthn: http://perlpunks.de/paste/show/529b9c35.797d.2ae the first valgrind output while parsing the setting
20:36 jnthn ooh
20:36 jnthn That looks like soemthing to fix.
20:56 BenGoldberg joined #moarvm
20:57 * moritz can't seem to figure it out
20:59 moritz result = malloc(lengthu + 1);
20:59 moritz for (i = 0; i < lengthu; i++) { ... }; result[i] = 0;
21:00 moritz that looks like result is \0-terminated
21:01 moritz and MVM_coerce_s_n just calls atof() on result
21:01 moritz and I don't think atof reads past the string, does it?
21:02 moritz unless my libc is, like, totally b0rked
21:02 jnthn ____strtod_l_internal is what's marked as guilty...I guess atof maybe using that?
21:02 moritz I guess too, because the man page for atof says "The behavior is the same as strtod(nptr, (char **) NULL);"
21:03 moritz ... "except that atof() does not detect errors."
21:03 jnthn OK, well somehow we're reading past the end...
21:03 nwc10 yes, atof() is awesome. I baked you a result, but maybe I eated it. Or maybe not.
21:03 dalek joined #moarvm
21:03 nwc10 and atoi
21:04 jnthn nwc10: What's the Right Thing to use? :)
21:04 nwc10 probably strtod() or strtol() or strtoul()
21:04 jnthn I'm a bit distrubted it'd read past the end of a null terminated thing though...
21:05 moritz well, maybe my analysis was just wrong :-)
21:05 nwc10 but, of course, they will parse stuff-you-probably-didn't-want if the locale isn' "C"
21:05 nwc10 and seems that there's a bug in the MSVC runtime where strtol() and stroul() *clear* errno if nothing is wrong
21:06 moritz well, this is, like, totally gcc land here :-)
21:06 jnthn FROGGS: Um, I think 10cf89453 busted the Windows build :(
21:07 jnthn makefile(392) : fatal error U1086: inference rule cannot have dependents
21:07 nwc10 moritz: when you say "looks like the result is NUL terminated" did oyu mean that gdb shows the value as a 0 byte at that address read from? Or that you can see that the address read from is definately in range, and it wasn't just gdb getting lucky?
21:07 FROGGS jnthn: :o(
21:07 FROGGS revert it please
21:08 moritz nwc10: I meant that, reading the code, I see no way it would *not* be 0-terminated
21:09 moritz nwc10: which isn't best debugging practise, I know :-)
21:09 nwc10 ah OK. hmm.
21:10 jnthn FROGGS: Will do
21:11 moritz https://github.com/MoarVM/MoarVM/blob/master/src/strings/ascii.c#L52 that's the code that generates the string
21:13 nwc10 moritz: no, I can't see how it won't. But MVM_string_ascii_decode is going to leak the memory from malloc() if it throws its exception.
21:14 nwc10 and none of those functions document that it's the caller's responsbility to free() the thing they were given.
21:14 FROGGS that is why valgrind is not helpful if the program exits not cleanly
21:14 nwc10 although I'm not sure if that sort of thing is implied as the default in MoarVM
21:15 cognominal joined #moarvm
21:16 jnthn It shouldn't leak if it throws, but certainly all of the encoding things give back something you need to free.
21:16 nwc10 jnthn: oh, right, I think I see. The MVMString is rooted somewhere, so the malloc() doesn't get lost?
21:17 jnthn nwc10: When I say "it shoudln't leak" I mean "it soudns buggy at present"
21:17 nwc10 I might have misread it
21:18 nwc10 but I'm with moritz - I can't see how the problem can be there.
21:19 jnthn *nod*
21:19 jnthn I don't immediately see it either, though I'm doing about 3 others patches at the moment, so... :)
21:29 dalek MoarVM: 4a939f3 | jnthn++ | build/Makefile.in:
21:29 dalek MoarVM: Revert "rebuild from source files when Makefile changed"
21:29 dalek MoarVM:
21:29 dalek MoarVM: This reverts commit 10cf89453d1e5599b7191c6b22fbc7d97c5e628c, which
21:29 dalek MoarVM: breaks the makefile for nmake.
21:29 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/4a939f3ab4
21:29 dalek MoarVM: b7c8f26 | jnthn++ | src/6model/reprs/P6opaque.c:
21:29 dalek MoarVM: Make the P6opaque null sentinel more robust.
21:29 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/b7c8f26210
21:29 dalek MoarVM: fc2bedc | jnthn++ | src/core/interp.c:
21:29 dalek MoarVM: Avoid segfault on bad outer indexing.
21:29 dalek MoarVM:
21:29 dalek MoarVM: We'll be able to optimize this away in the future, but should not just
21:29 dalek MoarVM: blindly trust the bytecode.
21:29 dalek MoarVM: 80f8b53 | jnthn++ | src/strings/ops.c:
21:29 dalek MoarVM: Add a flatten call, as other string ops have.
21:29 dalek MoarVM:
21:29 dalek MoarVM: Just to be on the safe side, while ropes are still a bit ropey.
21:29 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/80f8b533e9
21:39 timotimo whoa
21:44 jnthn bah, now we need p6routinereturn :)
21:52 FROGGS Unhandled exception: Cannot invoke this object
21:52 FROGGS at src/gen/m-CORE.setting:12138  (./CORE.setting.moarvm:MATCH_SAVE:41)
21:52 FROGGS from src/gen/m-CORE.setting:12320  (./CORE.setting.moarvm:ACCEPTS:56)
21:54 * FROGGS dares to run it again with -O3
21:54 FROGGS umm:
21:55 FROGGS src/vm/moar/ops/container.c: In function ‘Rakudo_containers_get_scalar’:
21:55 FROGGS src/vm/moar/ops/container.c:84:5: warning: return discards ‘const’ qualifier from pointer target type [enabled by default]
21:55 FROGGS return &rakudo_scalar_spec;
21:55 FROGGS that is new I think
21:55 FROGGS ^
21:55 FROGGS (forgot about the hint :o)
21:56 FROGGS k, -O gives me this now: Heap corruption detected: pointer 0x2b5e89d47650 to past fromspace
22:05 dalek MoarVM: e50ef3a | jnthn++ | src/core/frame.h:
22:05 dalek MoarVM: Add lexical lookups to public API.
22:05 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/e50ef3a2a6
22:23 jnthn Ugh, next one seems weird...
22:54 woolfy joined #moarvm
23:26 lizmat joined #moarvm
23:38 woolfy left #moarvm

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