FROGGS gnight 00:00
I am going to bed
jnthn Same... 'night 00:12
timotimo timotimo is partying 00:45
i was hoping i could perhaps re-use the party to be a rakudo-on-moarvm-does-hello-world-party, but alas ... :( 00:46
01:34 BenGoldberg joined 01:41 colomon joined 01:43 BenGoldberg joined
timotimo Missing serialize REPR function for REPR MVMStaticFrame - should i be seeing this right now? 02:03
02:24 ssutch joined 03:55 ggoebel110 joined 04:10 rurban joined 04:44 ssutch joined 08:10 ssutch joined 08:15 FROGGS joined
nwc10 currently SEGVs when compiling lib/Test.pm 08:40
1200 const MVMContainerSpec *spec = STABLE(cont)->container_spec;
cont is 0x0
I assume that this is known
10:57 dalek joined 11:55 woolfy joined 12:53 woolfy left 13:36 ggoebel110 joined 13:57 colomon joined 14:15 tgt joined 14:20 colomon joined
dalek arVM: 4cc8691 | (Tobias Leich)++ | / (2 files):
add support for --optimize=1 --debug=3

14:49
FROGGS timotimo: might be interesting for you
I'll use --optimize=1 --debug=3 now to be able to build in a reasonable time again... 14:50
timotimo oh, neat :)
FROGGS jnthn: I have no luck to hunt that bug down
timotimo what are the numbers for?
FROGGS I know that 0 == nothing and 3 == most 14:51
but I don't know what the numbers mean
timotimo OK
tadzik I think gcc has -Od these days, as in ""ptimize to make debugging easier
or maybe it's named differently
timotimo i think it's -Og
just like -g
tadzik oh, yes
FROGGS --debug adds the -g
tadzik 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
tadzik :o
timotimo oh wow
dang, my optimizations are causing fallout when parsing regexes ... how am i even doing that? 14:53
FROGGS :/ 14:54
timotimo oh, huh 14:57
is <?before <ident> > supposed to generate a scan instruction inside it?
FROGGS ohh, I have to fix -O in rakudo now :/
timotimo what's that? 14:58
FROGGS ahh no, a make clean is need in MoarVM 15:00
the optimize flag
jnthn timotimo: It could never actually scan, I guess... 15:01
FROGGS I think I make the generated config.c depend on the Makefile
timotimo it couldn't?
jnthn timotimo: It's just that we always put the scan int.
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.
timotimo ah, i didn't know that
good.
jnthn But it's mostly a "emit code we don't need" thing...
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
fortunately the p6regex grammar itself isn't super-huge
i may be able to see it in the QAST.
dalek arVM: 10cf894 | (Tobias Leich)++ | build/Makefile.in:
rebuild from source files when Makefile changed

15:05
nwc10 [A 15:25
timotimo get up 15:26
(get on up)
get up
nwc10 tadzik: I've been using ^J, ^O and ^_
timotimo (get on up)
nwc10 I think if I wanted another level of tmux, I'd try ^^
(not tried it on tmux. Worked on screen)
I don't use those control keys much for other stuff
but yes, ^a and ^b are less than awesome
tadzik I had C-z on screen
15:31 FROGGS[mobile] joined
FROGGS nwc10: I get the same error as you btw, cont is NULL in 15:40
at src/core/interp.c:1200
1200 const MVMContainerSpec *spec = STABLE(cont)->container_spec;
nwc10 gcc -c -fPIC -D_REENTRANT -D_FILE_OFFSET_BITS=64 -fPIC -O%d ... 15:42
oops, borked.
timotimo hehe
jnthn Yes, I'm working on that at the moment :) 15:46
FROGGS nwc10: reconfigure moarvm 15:49
nwc10 IIRC I did 15:50
FROGGS (and reinstall and reconfigure rakudo)
ohh, bug found 15:51
if you dont pass --optimize...
nwc10 :-) 15:52
that would explain a lot 15:53
dalek arVM: 5b77ecf | (Tobias Leich)++ | Configure.pl:
fix optiflags when --optimize is not passed

15:56
16:09 ggoebel110 joined
jnthn jnthn finally gets NQP tests clean again after the auto-viv stuff 16:36
Well, container viv really... 16:37
16:39 cxreg2 joined
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:39
FROGGS nwc10: nothing 16:41
no -Osomething and no -gsomething
at least it was like that before
nwc10 nope, pretty sure that before it was defaulting to -g 16:42
because I've not changed how I'm configuring moarvm 16:43
and I don't have debugging symbols now
debug used to default to "not optimise" 16:44
# fiddle with flags
-$args{debug} //= 0 + !$args{optimize};
-$args{optimize} //= 0 + !$args{debug};
FROGGS ahh, I see 16:52
dunno what to do about that though 16:53
nwc10 I think for most everything else I've ever met, the default is "optimise"
the assmuption is that if you're building with defaults, you're not a developer of it
timotimo that default bit me in the butt real hard recently 16:55
jnthn
.oO( bad ass-umption, eh? )
16:57
FROGGS +1 from my side 16:58
timotimo yup 17:00
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:01
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
but we're not there yet :-/ 17:03
timotimo mhm
dalek arVM: d1500d7 | jnthn++ | src/6model/reprs/P6opaque.c:
Implement attribute container auto-viv in P6opaque

We need to be able to differentiate an assigned null from unvivified. We'll get this for free in the future when we improve null handling; for now, this will do us.
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... :)
nwc10 I'm still in Stage mast from last time! :-)
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
or at least, on non-gcc, default to optmise
jnthn nwc10: Yes, by then...
nwc10 and on gcc and gcc-wannabes, try for -g and -O
arnsholt For gcc-like I'd even argue for -g3 17:08
nwc10 some debuggers choke on it, but I think that that's "buyer beware" 17:09
arnsholt Oh, in that case maybe not
nwc10 I don't think that any distro is daft enough to ship a gcc which is too new for its gdb
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:10
timotimo i can't build nqp at the moment, at least in my branch 17:11
This type does not support elems
is that my branch's fault?
jnthn timotimo: On Moar? You need the stuff from master. 17:12
timotimo OK.
ah yes, i see.
jnthn We're up to line 6568 of the setting loading. 17:15
timotimo \o/
what's stopping us now?
jnthn Another "This type does not support elems" :)
arnsholt 6.5k, that's about a third of the setting, no? 17:16
jnthn arnsholt: Yeah, though this is all the pieces that run at startup 17:17
arnsholt: So it's really about where we hit those.
arnsholt Right, right
jnthn We're mostly hitting missing bits of the binder and list guts so far.
So, just NYIs.
arnsholt Right, that sounds reasonable 17:20
jnthn Ah...the current blocker seems to have been a thinko in p6shiftpush 18:03
FROGGS pfusch, as I said :o) 18:04
jnthn OK, 11,970 now. 18:12
FROGGS !!!
\o/
jnthn++
arnsholt Nice!
timotimo that's ossum! :)
jnthn Capture binding NYI 18:13
bah :)
FROGGS :D
jnthn Done that and now 13,499 18:31
$PROCESS::IN = open('-'); 18:32
FROGGS O.o
how does that explode?
I'll know in about 7 or 8 minutes
jnthn Trying to get to the bottom of that right now. 18:33
Deep, anyway
FROGGS k
jnthn Somewhere in IO::Handle.new
And within there, in BUILDALL 18:34
Something to do with attribute defaults, I think. 18:37
FROGGS the Bool::True?
/home/froggs/dev/rakudo/src/core/IO.pm:92: has $.chomp = Bool::True; 18:38
jnthn Or the 0...not sure.
It's somehow landing in the default invocation fallback 18:39
Got a guess...trying a patch. 18:44
FROGGS I get: 18:45
Unhandled exception: Cannot find method 'Nil'
at src/gen/m-BOOTSTRAP.nqp:2222 (blib/Perl6/BOOTSTRAP.moarvm:frame_name_735:18)
jnthn Yeah, that's a failing fail 18:47
Do a perl6-m -e "say 'hi'"
uh
Do a perl6-m --ll-exception -e "say 'hi'"
FROGGS Cannot find method 'postcircumfix:<( )>' 18:48
I see
jnthn Yeah, got a fix for that now 18:54
Onto the next thing... :)
Still in open, but at least we get a bit further now... 18:55
default cont desc NYI
FROGGS ahh, yeah 18:57
jnthn "Internal error: invalid thread ID in GC work pass" 19:13
:(
oh, duh 19:14
I didn't root
FROGGS might that be the bug I've seen?
jnthn It *may* be, but the code I just wrote has a bug that could cause it too... 19:17
FROGGS mhm
jnthn I'm betting if I get us past this IO stuff, we next block in temporal... 19:20
Um, we hang... 19:22
FROGGS I hope we don't block for long there :o)
uhh
jnthn Who worked on nqp::replace, ooc? 19:55
hm, doesn't look it could hang... 19:56
FROGGS was it timotimo++? 20:01
yes, see github.com/MoarVM/MoarVM/commit/b2...442aa31b95 20:02
timotimo oh?
yes, i did that
did i forget to increment a counter in a loop or something? 20:03
jnthn timotimo: I can't see hwo
timotimo i got lots of help with that piece of code 20:04
jnthn Yeah, it's not guilty.
timotimo phew
jnthn It's C<fail> that's doing the wrong thing, it seems
moritz that does sound like something that could be backend dependent. 20:06
jnthn Um... 20:12
How does this ever work normally...
timotimo :D
jnthn DYNAMIC, if it doesn't find what it's after, calls fail
fail contains die $value if $*FATAL; 20:13
timotimo :D
jnthn which calls DYNAMIC, which... :)
ah, 'cus $PROCESS::FATAL = False; 20:14
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
moritz: it can take hours
timotimo i do not evny you. 20:17
jnthn Oh, damn, I know what it is... 20:27
the WHENCE thing isn't implemented yet...
moritz jnthn: perlpunks.de/paste/show/529b9c35.797d.2ae the first valgrind output while parsing the setting 20:30
jnthn ooh 20:36
That looks like soemthing to fix.
20:56 BenGoldberg joined
moritz moritz can't seem to figure it out 20:57
result = malloc(lengthu + 1); 20:59
for (i = 0; i < lengthu; i++) { ... }; result[i] = 0;
that looks like result is \0-terminated 21:00
and MVM_coerce_s_n just calls atof() on result 21:01
and I don't think atof reads past the string, does it?
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?
moritz I guess too, because the man page for atof says "The behavior is the same as strtod(nptr, (char **) NULL);"
... "except that atof() does not detect errors." 21:03
jnthn OK, well somehow we're reading past the end...
nwc10 yes, atof() is awesome. I baked you a result, but maybe I eated it. Or maybe not.
21:03 dalek joined
nwc10 and atoi 21:03
jnthn nwc10: What's the Right Thing to use? :) 21:04
nwc10 probably strtod() or strtol() or strtoul()
jnthn I'm a bit distrubted it'd read past the end of a null terminated thing though...
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"
and seems that there's a bug in the MSVC runtime where strtol() and stroul() *clear* errno if nothing is wrong
moritz well, this is, like, totally gcc land here :-) 21:06
jnthn FROGGS: Um, I think 10cf89453 busted the Windows build :(
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?
FROGGS jnthn: :o(
revert it please
moritz nwc10: I meant that, reading the code, I see no way it would *not* be 0-terminated 21:08
nwc10: which isn't best debugging practise, I know :-) 21:09
nwc10 ah OK. hmm.
jnthn FROGGS: Will do 21:10
moritz github.com/MoarVM/MoarVM/blob/mast...scii.c#L52 that's the code that generates the string 21:11
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:13
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
nwc10 although I'm not sure if that sort of thing is implied as the default in MoarVM
21:15 cognominal joined
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?
jnthn nwc10: When I say "it shoudln't leak" I mean "it soudns buggy at present" 21:17
nwc10 I might have misread it
but I'm with moritz - I can't see how the problem can be there. 21:18
jnthn *nod* 21:19
I don't immediately see it either, though I'm doing about 3 others patches at the moment, so... :)
dalek arVM: 4a939f3 | jnthn++ | build/Makefile.in:
Revert "rebuild from source files when Makefile changed"

This reverts commit 10cf89453d1e5599b7191c6b22fbc7d97c5e628c, which breaks the makefile for nmake.
21:29
arVM: b7c8f26 | jnthn++ | src/6model/reprs/P6opaque.c:
Make the P6opaque null sentinel more robust.

arVM: fc2bedc | jnthn++ | src/core/interp.c:
Avoid segfault on bad outer indexing.

We'll be able to optimize this away in the future, but should not just blindly trust the bytecode. 80f8b53 | jnthn++ | src/strings/ops.c: Add a flatten call, as other string ops have.
Just to be on the safe side, while ropes are still a bit ropey.
timotimo whoa 21:39
jnthn bah, now we need p6routinereturn :) 21:44
FROGGS Unhandled exception: Cannot invoke this object 21:52
at src/gen/m-CORE.setting:12138 (./CORE.setting.moarvm:MATCH_SAVE:41)
from src/gen/m-CORE.setting:12320 (./CORE.setting.moarvm:ACCEPTS:56)
FROGGS dares to run it again with -O3 21:54
umm:
src/vm/moar/ops/container.c: In function ‘Rakudo_containers_get_scalar’: 21:55
src/vm/moar/ops/container.c:84:5: warning: return discards ‘const’ qualifier from pointer target type [enabled by default]
return &rakudo_scalar_spec;
that is new I think
^
(forgot about the hint :o)
k, -O gives me this now: Heap corruption detected: pointer 0x2b5e89d47650 to past fromspace 21:56
dalek arVM: e50ef3a | jnthn++ | src/core/frame.h:
Add lexical lookups to public API.

22:05
jnthn Ugh, next one seems weird... 22:23
22:54 woolfy joined 23:26 lizmat joined 23:38 woolfy left