Perl 6 - the future is here, just unevenly distributed

IRC log for #moarvm, 2014-03-14

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

All times shown according to UTC.

Time Nick Message
00:05 dalek MoarVM: 2adf59f | jnthn++ | src/6model/reprs/CStruct.c:
00:05 dalek MoarVM: Some cleanups to CStruct.
00:05 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/2adf59f80b
00:25 ggoebel11113 joined #moarvm
00:51 daxim joined #moarvm
00:54 btyler joined #moarvm
00:55 ggoebel11114 joined #moarvm
01:00 btyler joined #moarvm
01:02 daxim_ joined #moarvm
01:04 btyler_ joined #moarvm
01:08 rurban joined #moarvm
01:18 rurban joined #moarvm
01:31 tokuhirom joined #moarvm
01:31 rurban joined #moarvm
01:37 woosley joined #moarvm
01:42 rurban joined #moarvm
02:11 rurban joined #moarvm
02:47 ilbot3 joined #moarvm
02:47 Topic for #moarvm is now https://github.com/moarvm/moarvm | IRC logs at  http://irclog.perlgeek.de/moarvm/today
03:03 JimmyZ .ask jnthn is it right? https://gist.github.com/zhuomingliang/9541417
03:18 woosley1 joined #moarvm
06:18 dalek MoarVM: 5867a2a | jimmy++ | src/ (5 files):
06:18 dalek MoarVM: some cleanups
06:18 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/5867a2a5b2
06:31 vincent22 joined #moarvm
07:04 dalek MoarVM: 2ef7443 | jimmy++ | src/ (6 files):
07:04 dalek MoarVM: more cleanups
07:04 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/2ef7443423
07:10 dalek MoarVM: bad4243 | jimmy++ | src/mast/compiler.c:
07:10 dalek MoarVM: Remove unused header files.
07:10 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/bad4243214
07:55 FROGGS joined #moarvm
07:56 zakharyas joined #moarvm
08:15 dalek MoarVM: b14cf56 | jimmy++ | src/ (2 files):
08:15 dalek MoarVM: Sets up some string constants a bit earlier
08:15 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/b14cf56c6d
08:27 brrt joined #moarvm
08:31 dalek MoarVM: 6c5f57b | jimmy++ | src/6model/bootstrap.c:
08:31 dalek MoarVM: updated outdated comments
08:31 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/6c5f57b1b9
10:42 brrt jnthn - if i might ask, why is ConcBlockingQueue actually a c-level construct?
10:42 brrt couldn't you implement it just as well in NQP
10:43 jnthn Not without doing other missing things first.
10:43 brrt fair enough
10:43 brrt why do you need it before fixing those other mixing things :-)
10:43 brrt missing things
10:43 jnthn Because nothing in Perl 6 depends on those missing things.
10:43 jnthn And lots (thread pool, channels) depend on having a concurrent blocking queue.
10:44 brrt i don't think channels are so obvious in concurrent blocking queue
10:44 brrt especially as your implementation only 'blocks' on reads
10:45 jnthn The Perl 6 ones are unbounded so far also. But yeah, it needs to learn to bound. On JVM too.
10:45 jnthn Then it's just a question of what our default is.
10:48 brrt in a 'threaded copy' implementation i wrote it became obvious that go-like channel behaviour (where not only the receiver but also the sender waits) is a): ideal for reasoning and b): nontrivial with locks-and-condition-variables
10:49 brrt unbounded channels are obviously ideal for message-passing / actor systems
10:49 brrt unbounded queues
10:49 brrt lets get the terminology strait :-)
10:49 brrt straight
10:49 brrt i don't know what it is with my language today
10:50 jnthn I think bounding the sender is OK with locks/condvars provided you have a condvar for the head and another for the tail.
10:50 jnthn "Just" need to signal in the right places. :)
10:55 dalek MoarVM: 9abc246 | jnthn++ | src/6model/reprs/CStruct.c:
10:55 dalek MoarVM: Correct various errors in CStruct.
10:55 dalek MoarVM:
10:55 dalek MoarVM: With this, it manages to compose.
10:55 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/9abc246060
10:57 brrt hmmm
10:57 brrt if you wish, you can check out https://github.com/bdw/lab/blob/master/java/queue/AbstractQueue.java - apologies for naming etc
10:57 brrt works with a 'get'  and 'put' lock
10:58 brrt also works remarkably well, if i might be so honest, hadn't expect it
10:59 brrt the last thing you'd want to do - it seems - is close 'queues' or channels
10:59 brrt 'close' not 'queue'
11:00 brrt and anyway, that doesn't have sender-block
11:01 jnthn The sender needs to be able to close.
11:01 jnthn Completion notification is an important part of most things.
11:02 jnthn Especially as soon as you start allowing movement between paradigms.
11:02 jnthn A supply knows when the end is, as does a lazy list.
11:02 jnthn Of course, both of those may be unending too.
11:02 jnthn And so it should be with channels.
11:03 brrt exactly
11:03 brrt but what about a fan-in channel :-)
11:03 brrt i.e. many threads writing to a single channel
11:03 brrt no single sender should be able to close it
11:04 brrt but closing it from the receiving end might make a lot of sense
11:07 jnthn Depends on the topology. If you're in a producer/consumer situation and the fan-out/in is just because one stage got multiple workers, then the thing that spawned the workers likely wants to do it.
11:08 jnthn Promise.all(@workers).then({ $c.close }) # or so
11:10 brrt i see
11:10 brrt concurrency is fun :-)
11:10 jnthn Yes :)
11:10 * jnthn spent the last couple of weeks teaching a couple of classes in it :)
11:11 brrt in sweden?
11:11 jnthn Yeah
11:12 brrt pretty nice i guess :-)
11:19 jnthn Yeah, I enjoyed it.
11:19 jnthn And weather in places I went was rather nice too :)
11:20 dalek MoarVM: 0daccb8 | jnthn++ | src/moar.h:
11:20 dalek MoarVM: First pass at an ALIGNOF macro.
11:20 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/0daccb859e
11:20 dalek MoarVM: 80158be | jnthn++ | src/6model/reprs/CStruct.c:
11:20 dalek MoarVM: Uncomment ALIGNOF use in CStruct.
11:20 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/80158bef8c
11:20 dalek MoarVM: 087f7c0 | jnthn++ | src/6model/ (10 files):
11:20 dalek MoarVM: Add align to storage_spec; set it.
11:20 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/087f7c0e87
11:29 nwc10 jnthn: what is "#eli defined"
11:29 nwc10 ie a typo'd elif?
11:32 jnthn uh...yes, which MSVC apparently compiles o.O
11:32 jnthn wtf!!
11:34 brrt whut
11:34 brrt haha
11:34 * brrt is off for lunch
11:41 JimmyZ jnthn: is it right? https://gist.github.com/zhuomingliang/9541417
11:43 jnthn JimmyZ: Well, I think we should re-work compose and the way we do the attribute stuff to look more like P6opaque's compose does.
11:45 JimmyZ how soon? :-)
11:49 jnthn JimmyZ: Well, given the current code apparently doesn't work...sooner rather than later :)
11:51 jnthn oh, that's 'cus the gc_mark_repr_data function isn't in the table
11:51 JimmyZ I have another patch to it: https://gist.github.com/zhuomingliang/9541251 , it avoids MVMROOT current_class
11:52 JimmyZ which is not MVMROOTed yet
11:52 jnthn *and* that is busted
11:53 JimmyZ the patch is busted?
11:54 jnthn No, gc_mark_repr_data...
11:54 jnthn Anyway... *sigh*
11:54 jnthn Turns out that the first test for CStruct actually wants CArray to work
11:54 jnthn So I should probably go work on that first.
11:55 jnthn Anyway, yeah, I think instead of that patch we should do it the P6opaque way.
11:55 JimmyZ oh, I lost gc_mark_repr_data in the table :(
11:56 dalek MoarVM: c1d5a41 | jnthn++ | src/moar.h:
11:56 dalek MoarVM: Correct #eli to #elif.
11:56 dalek MoarVM:
11:56 dalek MoarVM: Not sure how the original wrong spelling ever compiled on MSVC, but it
11:56 dalek MoarVM: did!
11:56 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/c1d5a41d91
11:56 dalek MoarVM: 070c1a5 | jnthn++ | src/6model/reprs/CStruct. (2 files):
11:56 dalek MoarVM: Work towards attribute bind support in CStruct.
11:56 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/070c1a5010
11:56 jnthn JimmyZ: 070c1a5 fixes that; it missed a null check too.
11:57 jnthn JimmyZ: I'm going to look at CArray first, though.
12:34 colomon joined #moarvm
12:36 JimmyZ jnthn: can I port bind_attribute_boxed to bind_attribute in CSturct?
12:44 jnthn JimmyZ: Yeah, should go in the place I left die_no_attrs
12:44 jnthn JimmyZ: Moar doesn't break binding of attributes up into two pieces.
12:49 lizmat joined #moarvm
12:51 dalek MoarVM: b96bc03 | jimmy++ | src/6model/reprs/CStruct.c:
12:51 dalek MoarVM: Complete attribute bind support in CStruct
12:51 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/b96bc03598
12:52 lizmat joined #moarvm
12:58 dalek MoarVM: a4d32f0 | jnthn++ | src/6model/reprs/CArray.c:
12:58 dalek MoarVM: Move CArray setup logic into compose.
12:58 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/a4d32f0652
12:59 jnthn "CArray representation does not fully positional storage yet"
12:59 jnthn :D
13:00 JimmyZ :D
13:08 dalek MoarVM: 0180a21 | jimmy++ | src/6model/reprs/CArray.c:
13:08 dalek MoarVM: small cleanups to CArray
13:08 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/0180a218c7
13:15 lizmat joined #moarvm
13:53 btyler joined #moarvm
13:54 lizmat joined #moarvm
13:58 tgt joined #moarvm
13:59 flussence joined #moarvm
14:21 dalek MoarVM: cea751f | jnthn++ | src/core/nativecall.c:
14:21 dalek MoarVM: Handle CArray and CStruct returns.
14:21 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/cea751fc27
14:21 dalek MoarVM: 26b7844 | jnthn++ | src/core/nativecall.c:
14:21 dalek MoarVM: Avoid initialization when we've unmanaged result.
14:21 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/26b7844b06
14:21 dalek MoarVM: ea3877d | jnthn++ | src/6model/reprs/CArray.c:
14:21 dalek MoarVM: Implement numeric case of atpos for CArray.
14:21 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/ea3877d814
14:22 jnthn We now pass first 3 tests in 05-array.t
14:29 FROGGS \o/
14:29 nwc10 \o/
14:29 nwc10 tests are spectests or what? It's not obvious to me
14:30 jnthn No, NativeCall tests.
14:31 jnthn We don't include NativeCall in Rakudo core; it lives in a separate repo and is installable as a normal module
14:31 jnthn To give a Git analogy, it's the Perl 6 porcelain to the NQP-op native call plumbing.
14:33 dalek MoarVM: 7047838 | jnthn++ | src/6model/reprs/CArray.c:
14:33 dalek MoarVM: bindpos for CArray of numeric type.
14:33 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/7047838d37
14:33 dalek MoarVM: 945a8b9 | jnthn++ | src/core/nativecall.c:
14:33 dalek MoarVM: Support passing of CStruct and CArray.
14:33 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/945a8b9ca3
14:33 jnthn 1 more test pass from those :)
14:43 JimmyZ I just updated linenoise to latest version...
14:50 retupmoca joined #moarvm
15:01 dalek MoarVM: a896b55 | jnthn++ | src/6model/reprs/CArray.c:
15:01 dalek MoarVM: Support looking up strings from a CArray.
15:01 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/a896b55c0b
15:08 JimmyZ so what's the blocker to use lineniose? it works well on linux as far as I know...
15:08 jnthn JimmyZ: It hadn't used to work well.
15:08 jnthn JimmyZ: It was spewing prompts.
15:09 jnthn Dunno if the update fixes it.
15:09 JimmyZ hmm, I have linux box and it didn't do that
15:10 jnthn We can certainly try re-enabling it.
15:10 JimmyZ maybe it's on mac?
15:10 jnthn No, it did it on my Linux box.
15:10 jnthn And sure others reported it did so on Linux too
15:15 dalek MoarVM: 3f08640 | jnthn++ | src/6model/reprs/CArray.c:
15:15 dalek MoarVM: Support binding strings into a CArray.
15:15 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/3f08640690
15:15 dalek MoarVM: 1ce7228 | jnthn++ | src/6model/reprs/CArray.c:
15:15 dalek MoarVM: CArray bindpos of CArray/CPointer/CStruct elements
15:15 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/1ce72280c6
15:16 JimmyZ jnthn: I just tested, it works on CentOS release 6.2 (Final) X64
15:16 JimmyZ tested by nqp
15:17 FROGGS wasn't it that it just printed a gazillion of ">\n" ?
15:17 JimmyZ hmm
15:17 FROGGS I'm not sure I remember correctly
15:17 FROGGS (as always)
15:18 JimmyZ not sure about it, seems that nqp uses readline
15:18 jnthn FROGGS: Yes, that's exactly it.
15:19 jnthn JimmyZ: The readlineint op in Moar is currently mapped to a normal readline instead
15:21 JimmyZ I don't think so
15:22 JimmyZ I mean the libreadline
15:22 btyler I'll be happy to test that on osx - I certainly had the infinite ">\n" problem
15:24 JimmyZ hmm, I don't know why nqp repl is using lib-readline on my linux box
15:25 jnthn JimmyZ: Yeah, I meant "just uses syncfile.c" or whatever
15:26 jnthn I'm not sure there's a codepath that can reach the libreadline or linenoise code today
15:31 dalek MoarVM: 0552364 | jnthn++ | src/core/nativecall. (2 files):
15:31 dalek MoarVM: Expose functions to make C[Array|Pointer|Struct].
15:31 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/05523648fb
15:31 dalek MoarVM: 63fc411 | jnthn++ | src/6model/reprs/CArray.c:
15:31 dalek MoarVM: Fix missing REPR mark function in CArray.
15:31 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/63fc411edb
15:31 dalek MoarVM: 45e1e0d | jnthn++ | src/6model/reprs/CArray.c:
15:31 dalek MoarVM: atpos of CStruct/CArray/CPointer in CArray.
15:31 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/45e1e0db75
15:33 jnthn Up to 9 passing tests in 05-arrays.t now.
15:35 JimmyZ nice
15:36 jnthn And the next one blocks on CStruct getting better :)
15:37 JimmyZ get attr
15:37 jnthn Right.
15:57 dalek MoarVM: 076ab4c | jnthn++ | src/6model/reprs/CStruct.c:
15:57 dalek MoarVM: Implement numeric case of CStruct attr lookup.
15:57 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/076ab4c54f
15:57 dalek MoarVM: 10d08e1 | jnthn++ | src/6model/reprs/CStruct.c:
15:57 dalek MoarVM: Missing GC mark of CStruct REPR data members.
15:57 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/10d08e1db5
15:57 dalek MoarVM: f74ca9d | jnthn++ | src/6model/reprs/CStruct.h:
15:57 dalek MoarVM: Remove unused field.
15:57 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/f74ca9d503
16:27 dalek MoarVM: cfac7eb | jnthn++ | src/6model/reprs/P6 (4 files):
16:27 dalek MoarVM: Fix storage of sized int/num types.
16:27 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/cfac7eb828
16:28 jnthn Passing first 4 of 06-struct.t now.
16:29 jnthn And 19 out of 26 of 05-array.t
16:35 FROGGS O.o
16:36 FROGGS That Is Nice®
16:46 dalek MoarVM: 00123d7 | jnthn++ | src/ (2 files):
16:46 dalek MoarVM: Handle C[Struct|Array|Pointer] CStruct fields.
16:46 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/00123d7e03
17:26 dalek MoarVM: 13d7493 | jnthn++ | src/6model/reprs/CStruct.c:
17:26 dalek MoarVM: Cleanup, missing barrier, add sanity checks.
17:26 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/13d74932aa
17:30 woolfy joined #moarvm
17:33 woolfy left #moarvm
18:21 timotimo (o/
18:21 timotimo \o)
18:22 timotimo (kermit arm flail emoticon)
18:24 FROGGS joined #moarvm
18:33 tgt joined #moarvm
18:39 jnthn If anybody fancies building latest Moar/NQP/Rakudo and trying out the NativeCall test suite, that'd be great. To see how it's progressing on other platforms :)
18:43 dalek MoarVM: 911dd19 | jnthn++ | src/6model/reprs/CStruct.c:
18:43 dalek MoarVM: Hack to avoid crashes.
18:43 dalek MoarVM:
18:43 dalek MoarVM: Really obscure ones. Maybe on another platform we get some better info
18:43 dalek MoarVM: on why uncommenting this causes issues.
18:43 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/911dd19ce8
18:44 jnthn Dinner time; after it I'll look at 07-writebarrier.t.
18:53 zakharyas joined #moarvm
19:03 nwc10 I guess ~/Sandpit/moar-g/bin/perl6-m -Ilib t/01-argles
19:03 nwc10 s.t
19:06 nwc10 0: Big shouty lines about "/bin/sh: PREFIX: command not found" but this does not cause failures
19:06 nwc10 0.5: t/01-argless.t
19:06 nwc10 is missing a terminating newline in its output
19:11 nwc10 t/02-simple-args.t SEGVs
19:11 nwc10 but valgrind reports errors on -e0
19:11 nwc10 so all bets are off
19:13 nwc10 (dynamic linking)-- # I have no line numbers
19:13 nwc10 yes, technically this is the toolchain's fault
19:19 retupmoca Terminal dump of my results on 64bit linux: https://gist.github.com/retupmoca/00328e01ee438ee94126
19:20 nwc10 that was what I got
19:20 nwc10 bollocks. Configuring MoarVM with --static breaks the Rakudo build
19:54 colomon joined #moarvm
19:54 nwc10 OK. tried on a debian box. Same frustrations as the CentOS box
19:54 nwc10 http://paste.scsys.co.uk/325137
19:54 nwc10 but NO LINE NUMBERS :-(
19:54 nwc10 and --db-attach=yes fails
19:55 nwc10 I suspect that libuv is doing something evil to STDIN, but that's a WAG and therefore wrong
19:55 nwc10 but whatever is doing whatever, it's annoying
19:55 nwc10 because it stops my plan B to get line numbers.
19:58 jnthn The results seem to match my ones
19:58 jnthn 02 segfaults here also
19:58 jnthn The interesting thing is what the failure mode is, if any, with 911dd19 reverted
20:26 dalek MoarVM: ca7996f | jnthn++ | src/core/nativecall.c:
20:26 dalek MoarVM: Implement nativecall write barriers.
20:26 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/ca7996f332
20:27 nwc10 aaaaaaaaaaaaaaaaaaaaaaaaaaaaargh. Even with ASAN under gdb no $expletive line numbers.
20:27 nwc10 so, sigh. There is a BUG.
20:28 nwc10 but other crap is getting in the way of being able to find it
20:28 jnthn urgh
20:28 nwc10 yes
20:28 jnthn The debugger here doesn't get upset over the dynamic loading...
20:28 nwc10 neither valgrind nor gdb get line numbers from libmoar.so
20:29 nwc10 my suspicion is that it doesn't have debugging info in it
20:29 jnthn Do they normally for you?
20:29 nwc10 this is a good question. I rarely build perl 5 that way
20:29 jnthn Is it specific to when running code with nativecall?
20:29 nwc10 no
20:29 nwc10 ./perl6-m -e0 has the bug
20:29 jnthn As in, no line numbers in valgrind?
20:30 nwc10 as in, valgrind reporting a read beyond an allocated region, and not giving line numbers
20:30 jnthn oh hang on
20:30 nwc10 I haven't even *got* back to the SEGV
20:30 jnthn I think we're talking about two different bug hunts...
20:30 nwc10 yes.
20:30 jnthn d'oh :)
20:31 nwc10 I'm not going to even try to read the valgrind report on the zavolaj problems until the earlier valgrind stuff is cleared up
20:31 nwc10 because I have no clue what screwed up what
20:31 nwc10 and the nasal demons are already painful enough
20:32 jnthn Hmmm... MVM_args_proc_to_callsite eh.
20:32 jnthn I fixed a memory leak involving that a week or two ago, I think.
20:41 nwc10 with that commit reverted NQP and Rakduo pass tests
20:42 nwc10 t/02-simple-args.t still goes SEGV
20:42 nwc10 gdb says:
20:42 nwc10 #0  0x00007ffff79e1762 in MVM_string_equal () from /home/nick/Sandpit/moar-g/lib/libmoar.so
20:42 nwc10 #1  0x00007ffff79e5314 in MVM_string_find_encoding () from /home/nick/Sandpit/moar-g/lib/libmoar.so
20:42 nwc10 #2  0x00007ffff79c26b9 in set_str () from /home/nick/Sandpit/moar-g/lib/libmoar.so
20:42 nwc10 #3  0x00007ffff7955a5b in MVM_interp_run () from /home/nick/Sandpit/moar-g/lib/libmoar.so
20:42 nwc10 #4  0x00007ffff79f741f in MVM_vm_run_file () from /home/nick/Sandpit/moar-g/lib/libmoar.so
20:42 nwc10 #5  0x0000000000400e01 in main ()
20:43 jnthn nwc10: https://gist.github.com/jnthn/619fb15326bebd9dc250
20:43 jnthn nwc10: Try that for the args thingy
20:43 jnthn nwc10: Yes, 02 fails either way...I know what one is still to fix.
20:44 jnthn nwc10: It's 05/06 that blew up here with that commit reverted.
20:44 jnthn nwc10: And pass with it.
20:44 nwc10 ah OK. Having a rebuild with different debugging options.
20:44 nwc10 "there will be a short delay"
20:45 jnthn nwc10: np, I've plenty to do here ;)
20:50 nwc10 ooh, PEBKAC
20:51 nwc10 don't use --debug=1
20:51 nwc10 your SEGV in 02 is:
20:51 nwc10 (gdb) where
20:51 nwc10 #0  0x00007ffff79e1666 in MVM_string_equal (tc=0x6024f0, a=0x0, b=0x1cac428) at src/strings/ops.c:610
20:51 nwc10 #1  0x00007ffff79e520c in MVM_string_find_encoding (tc=0x6024f0, name=0x0) at src/strings/ops.c:1561
20:51 nwc10 #2  0x00007ffff79c25d1 in set_str (tc=0x6024f0, st=0x49adfe0,  root=0x7ffff68eb8c0, data=0x7ffff68eb8d8, value=0x589f510) at src/6model/reprs/CStr.c:57
20:51 nwc10 #3  0x00007ffff7955a52 in MVM_interp_run (tc=0x6024f0,  initial_invoke=0x7ffff79f71d7 <toplevel_initial_invoke>,  invoke_data=0x661f10) at src/core/interp.c:2358
20:51 nwc10 #4  0x00007ffff79f730f in MVM_vm_run_file (instance=0x602010,  filename=0x7fffffffeca9 "/home/nick/Sandpit/moar-g/languages/perl6/runtime/perl6.moarvm") at src/moar.c:153
20:51 nwc10 #5  0x0000000000400e01 in main (argc=7, argv=0x7fffffffe948) at src/main.c:146
20:51 jnthn Hmmm.
20:52 * jnthn looks
20:52 nwc10 t/05-arrays.t and t/06-struct.t are (I think) unchanged.
20:52 nwc10 No crash, fewer tests than planned
20:53 nwc10 I can haz line numbers
20:53 nwc10 --debug=1 is bogus :-(
20:53 jnthn I think the 1 sets some kind of "level"
20:53 jnthn The fewer tests than planned disappears under prove
20:53 jnthn Thing is that the tests from C land say "ok" but without a number
20:54 jnthn That seems legal TAP
20:54 jnthn But Rakudo's Test.pm likes to warn that *it* didn't see enough tests.
20:54 nwc10 the report for just -e0 http://paste.scsys.co.uk/325168
20:54 nwc10 I see
20:55 jnthn nwc10: Is that with the patch I just provided, or before it?
20:55 nwc10 anyway, not sure if it's legal TAP to have bad counts
20:55 jnthn Yeah. prove happily copes, though, it seems...
20:56 nwc10 it's for rakudo at 4a3a406840ba87da7d10ccb1d8dbcf6e132d26ba, nqp at 4a3a406840ba87da7d10ccb1d8dbcf6e132d26ba, MoarVM at 911dd19ce8a566b6eca98fdb70a09f6e16420e2e plus 911dd19ce8a566b6eca98fdb70a09f6e16420e2e reverted
20:56 nwc10 I'm not sure what answer you needed
20:56 jnthn < jnthn> nwc10: https://gist.github.com/jnthn/619fb15326bebd9dc250
20:56 jnthn Trying that fix for the valgrind issues on -e0
20:58 nwc10 that patch cures all valgrind issues for -e0
20:58 nwc10 will now go back to HEAD/HEAD/HEAD, add it and test
20:59 jnthn arrrghh...set_str fail
21:00 jnthn Dear everybody, you can NEVER EVER EVER EVER invoke user-land code within a REPR function.
21:00 nwc10 not even Chuck Noris would get away with this?
21:01 jnthn Well, Chuck Norris can probably handle the resulting SEGV...
21:02 nwc10 mmm, maybe Chuck Norris is secretly a VAX.
21:04 nwc10 jnthn: is it possible to enforce that? Is there a way to have a "DEBUGGING" build that tracks state and abort()s on such an invoke attempt?
21:04 nwc10 if it is possible, is it worth it?
21:05 jnthn nwc10: tbh, if you do it you're so likely to ruin the interpreter state anyway...
21:05 nwc10 patch at https://gist.githubusercontent.com/jnthn/619fb15326bebd9dc250/raw/a998f5d6d050c632b5dd47f6f08eca5cd291a600/gistfile1.txt works
21:05 nwc10 NQP and Rakudo pass tests
21:06 jnthn nwc10: though the rest of the VM may actually be robust enough to let you sort-of surive it...
21:06 nwc10 By abort() I meant abort()
21:06 jnthn Yeah. It's not too easy to detect it's happening, tbh.
21:06 nwc10 "exit, coredump, you know about it" sort of thing
21:06 nwc10 oh :-(
21:06 jnthn Very easy to spot by reading the code, though.
21:07 jnthn I suspect you typically end up writing to a bit of the C stack
21:07 jnthn But the VM typically runs very shallow, so you might be too shallow for it to matter when it all goes wrong.
21:09 nwc10 valgrind report for t/02*.t now starts with this just after ok 9:
21:09 nwc10 ==15590== Use of uninitialised value of size 8==15590==    at 0x4F96C91: MVM_repr_get_str (reprconv.c:216)
21:09 nwc10 ==15590==    by 0x4FB6A62: set_str (CStr.c:57)
21:09 nwc10 ==15590==    by 0x4F49A7D: MVM_interp_run (interp.c:2358)
21:09 nwc10 ==15590==    by 0x4FEB796: MVM_vm_run_file (moar.c:153)==15590==    by 0x400E00: main (main.c:146)
21:09 nwc10 ==15590==
21:09 jnthn yeah, I've got a nearly-done re-write of all that code
21:09 nwc10 OK.
21:09 nwc10 but good news is that it's clean to that point
21:09 nwc10 so it's back to being a useful tool
21:11 * nwc10 applies gist patch and tries with ASAN
21:11 nwc10 "to the pain"
21:24 jnthn Whee. Bye bye SEGV, it seems...
21:24 nwc10 http://paste.scsys.co.uk/325179 makes valgrind unhappy, but it sort of looks like it's what the test is trying to do
21:25 nwc10 OK, all Rakudo build and tests pass with ASAN after that patch
21:27 dalek MoarVM: 6ca39c9 | jnthn++ | src/6model/reprs/CStr. (2 files):
21:27 dalek MoarVM: Fix CStr REPR.
21:27 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/6ca39c9e7a
21:27 dalek MoarVM: 7086858 | jnthn++ | src/core/nativecall.c:
21:27 dalek MoarVM: Add CStr handling to string marshal code.
21:27 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/708685876d
21:29 dalek MoarVM: d517939 | jnthn++ | src/core/args.c:
21:29 dalek MoarVM: Copy correct size of arg flags buffer.
21:29 dalek MoarVM:
21:29 dalek MoarVM: Fixes error discovered by nwc10++ and makes Valgrind clean again.
21:29 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/d517939212
21:54 flussence joined #moarvm
22:15 nwc10 http://paste.scsys.co.uk/325196 -- unhappiness on 32 bit linux
22:15 nwc10 x86, hence little endian
22:18 colomon joined #moarvm
22:20 nwc10 r: printf "%x\n", 911352958828937218
22:20 camelia rakudo-parrot a2db06, rakudo-jvm a2db06: OUTPUT«ca5c6b000000002␤»
22:20 camelia ..rakudo-moar a2db06: OUTPUT«ca5c6b000000000␤»
22:20 nwc10 that would be a MoarVM bug
22:20 nwc10 and it's ca5c6b000000002, expected 2
22:21 nwc10 similar for the other wrongness in t/05-arrays.t
22:21 nwc10 top 32 bits are garbage
22:21 nwc10 size issue?
22:23 jnap joined #moarvm
22:24 nwc10 valgrind is like an explody thing on 06...t
22:24 nwc10 http://paste.scsys.co.uk/325200
22:24 jnthn nwc10: "just" on 32-bit?
22:25 nwc10 yes.
22:25 nwc10 64 bit x86_64 systems are 100% happy
22:25 jnthn What is sizeof(long)?
22:25 nwc10 on that machine, 4
22:25 jnthn oh hmm.
22:25 nwc10 bog standard x86 Linux
22:25 jnthn Right.
22:26 jnthn So the thing I ran and worked around on Windows earlier needs a general solution.
22:26 nwc10 "upgrade everyone to Win 8.1, er, x86_64"? :-)
22:27 nwc10 since 2006 "get a Mac" won't work, as they're no longer PPC
22:27 nwc10 general solution is "go to bed, use a fresh head tomorrow" ?
22:28 jnthn Well, it's mostly that we need a way to convey what "long" is
22:29 jnthn (stash it in configuration or so)
22:43 dalek MoarVM: 42be074 | jnthn++ | / (2 files):
22:43 dalek MoarVM: Reference and install dyncallback header.
22:43 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/42be07401a
22:43 dalek MoarVM: b6e4a61 | jnthn++ | src/ (3 files):
22:43 dalek MoarVM: Add data structure for representing a callback.
22:43 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/b6e4a6168b
22:51 dalek MoarVM: b9b540d | jnthn++ | src/gc/roots.c:
22:51 dalek MoarVM: GC marking for callback cache.
22:51 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/b9b540d4ea
22:51 dalek MoarVM: 2546910 | jnthn++ | src/ (3 files):
22:51 dalek MoarVM: Implement callback setup work.
22:51 dalek MoarVM:
22:51 dalek MoarVM: Gets us to the point of having a dyncallback callback object to pass,
22:51 dalek MoarVM: which then does get invoked by the C function we called. For now, it
22:51 dalek MoarVM: does nothing, however.
22:51 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/2546910e7e
23:39 dalek MoarVM: 0dde848 | jnthn++ | src/core/nativecall.c:
23:39 dalek MoarVM: Basic callback invocation with arguments.
23:39 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/0dde84841f
23:43 timotimo want me to try zavolaj with moarvm now? :)
23:44 jnthn timotimo: Gimme a little more time :)

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