Perl 6 - the future is here, just unevenly distributed

IRC log for #moarvm, 2015-02-23

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

All times shown according to UTC.

Time Nick Message
00:11 japhb FROGGS++ # Freakin' brilliant, as usual
00:11 vendethiel joined #moarvm
00:12 * jnthn needs to catch up on all the awesome FROGGS++ has been doing in the last week :)
01:21 vendethiel joined #moarvm
01:41 colomon joined #moarvm
01:44 colomon joined #moarvm
01:45 vendethiel joined #moarvm
02:09 vendethiel 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
02:47 colomon joined #moarvm
03:20 vendethiel joined #moarvm
03:57 vendethiel joined #moarvm
05:07 vendethiel joined #moarvm
05:35 vendethiel joined #moarvm
06:14 vendethiel joined #moarvm
06:48 vendethiel joined #moarvm
07:36 FROGGS[mobile] joined #moarvm
07:52 FROGGS joined #moarvm
07:53 rurban joined #moarvm
07:54 vendethiel joined #moarvm
07:56 zakharyas joined #moarvm
08:06 Ven joined #moarvm
10:00 kjs_ joined #moarvm
10:22 FROGGS while implementing unions:
10:22 FROGGS Program received signal SIGSEGV, Segmentation fault.
10:22 FROGGS get_int (tc=0x6036b0, st=0x2e683f8, root=0x7ffff69cc3e8, data=0x80008080) at src/6model/reprs/P6int.c:69
10:22 FROGGS 69        case 64: return ((MVMP6intBody *)data)->value.i64;
10:22 FROGGS jnthn: do you want to bet what's going on and what the conclusion is? :o)
10:23 jnthn That data pointer looks very bogus :)
10:23 FROGGS not quite :o)
10:24 jnthn It should almost certainly look like root, but a little further in memory, no? :)
10:24 FROGGS thing is that the union is inlined
10:24 jnthn Ah
10:24 FROGGS and we are expecting it to be referenced when we say: has Onion $.union
10:24 FROGGS (Onion is repr<CUnion>)
10:25 FROGGS so, we have to change our default and expect things to be inlined, not referenced
10:25 FROGGS unless stated otherwise
10:25 jnthn Um, that's quite a change from CStruct inside of CStruct
10:25 FROGGS aye
10:25 jnthn Which is a reference thing
10:26 jnthn We probably want to do the same thing for the two.
10:26 jnthn It's possible to have a pointer to a union type also
10:26 FROGGS true
10:26 jnthn (Shows up all over the place inside of Moar)
10:27 FROGGS and you'd do either 'is rw' or 'has Pointer[Onion]...' in P6 to say that
10:29 jnthn Yeah. It's gonna take quite some doing... :)
10:29 FROGGS why?
10:29 FROGGS Pointer[Onion] works already (it indirects by another pointer)
10:30 FROGGS just the default for structs and unions inside structs has to be changed IMO
10:30 jnthn class Foo is repr('CStruct') { has SomeInlinedStruct $.s }; ... $foo.s.thing = 42; # how will this work?
10:30 jnthn And is $foo.s taking a copy of the inner struct, or a pointer to it?
10:31 FROGGS hmmmm
10:31 FROGGS good point(er)
10:38 FROGGS I guess that's the same problem for: class Onion is repr<CUnion> { has int32 $.i; has num32 $.n }... will it cause trouble when both point to the same memory location?
10:39 FROGGS like that the GC frees the first attribute and explodes when freeing the second?
10:44 jnthn Well, in that particular case we're fine
10:44 jnthn Since int and num aren't GC'd
10:45 FROGGS ahh, true
10:45 jnthn But yeah, if there's 2 possible CStruct interpretations...only one of them can actually be the one that's "there"
10:51 dalek MoarVM/union: 1ca961a | FROGGS++ | / (10 files):
10:51 dalek MoarVM/union: implement CUnion representation
10:51 dalek MoarVM/union:
10:51 dalek MoarVM/union: This works for not-inlined unions only atm.
10:51 dalek MoarVM/union: review: https://github.com/MoarVM/MoarVM/commit/1ca961a86a
10:54 FROGGS that works now: https://github.com/rakudo/rakudo/commit/b64000247f#diff-ef6e68408788f3dd219d23baa37a2806R14
10:54 FROGGS though, we need to improve on that
10:57 jnthn FROGGS: Are the tests at https://github.com/rakudo/rakudo/commit/b64000247f#diff-18cf88e96a77c4af8a00ab2a07d4600cR75 not LE-dependent?
10:58 FROGGS jnthn: I have no idea :D
11:00 jnthn FROGGS: My gut feeling is yes, but I'm taking a horribly long time (and a lot of cups of coffee) to properly wake up today...
11:01 Ven joined #moarvm
11:25 * jnthn notes the YAPC::EU theme is Art+Engineering, and wonders if he should submit a talk on "The art of engineering a VM for Perl 6" or some such :)
11:29 FROGGS[mobile] ohh, please do :o)
12:06 Ven please do indeed.
12:55 kjs_ joined #moarvm
13:25 Ven joined #moarvm
14:30 brrt joined #moarvm
14:48 brrt left #moarvm
15:17 FROGGS joined #moarvm
15:30 brrt joined #moarvm
15:31 brrt \o
15:31 jnthn hi brrt
15:33 FROGGS o/
15:33 brrt hi FROGGS, jnthn
15:34 brrt did any of you see the projects I've added to the GSoC-2015-ideas documents?
15:35 jnthn brrt: No; link?
15:35 brrt .... well, that i don't know
15:35 brrt i think FROGGS sent the link to me
15:36 brrt foundsit: https://docs.google.com/document/d/120zZBQ27glXUn0vbkQPMK3mNTMo2GtMFv8lqiMca6ls/edit
15:39 jnthn brrt: Hm, I don't see any you added in there though?
15:40 FROGGS ummm, somebody has deleted the REPL idea and something else O.o
15:40 jnthn Or did they get migrated to the web page?
15:41 jnthn Yes, http://wiki2.enlightenedperl.org/index.php5?title=2015_Ideas_Page#Rakudo
15:41 jnthn And #MoarVM below
15:42 jnthn brrt++ # they look good
15:42 jnthn brrt: Considering apply for one of them? ;)
15:42 timotimo um
15:42 timotimo did rakudo suggestions disappear from that document?
15:42 FROGGS ahh, nice
15:42 jnthn timotimo: I see two of them on the page I just linked.
15:43 timotimo oh, good
15:43 brrt yes, i'm considering that :-)
15:43 jnthn The google doc is for leaving ideas if you haven't a wiki write bit
15:43 jnthn brrt: \o/
15:43 timotimo huh, i suggested myself as a mentor for the regex optimizer thing, but didn't get put there?
15:43 brrt i'm also considering the question 'how do i leave the JIT suitable for the hands of a student'
15:45 brrt and i'll also have to calculate my actual $time-available-in-summer compareed to the demands of the project and GSoC
15:45 jnthn *nod*
15:45 * jnthn should have a decent amount of time to mentor
15:45 brrt :-) ok, that's good
15:45 brrt are you anywhere around NL anytime between now and summer?
15:46 jnthn Not afaik; I won't make the NLPW this year, I'm afraid.
15:46 brrt shame. but there will be a next time
15:46 jnthn Aye
15:47 brrt i had hoped to make FOSDEM
15:47 brrt but couldn't either :-(
15:48 brrt is it by the way at all possible to student-and-backup-mentor at the same time?
15:49 FROGGS the first video looks promising wrt to quality: http://ftp.osuosl.org/pub/fosdem//2015/devroom-software_defined_radio/sdr_rds_tml.mp4
15:49 brrt is that the very first video?
15:49 brrt nice
15:49 jnthn brrt: Not sure. Officially, doubt it. Can you be a student and just happen to help out another student? Surely. :)
15:50 brrt that would work
15:50 brrt what kind of projects / project ideas get the most attention, usually?
15:51 kjs_ joined #moarvm
15:53 jnthn brrt: Hard to say. Having a decent description and sounding interesting but approachable probably helps.
15:54 brrt hmmm
15:56 jnthn You've been a student, I haven't, so you've probably a better idea than me of what's attractive :P
15:58 brrt but i'm naturally attracted to VMs and interpreters and compilers... I'm not sure I'm representative
15:59 jnthn I'm quite sure you're not the only person naturally attracted to such things. :)
16:00 jnthn Sure, maybe the majority aren't, but that's fine, we only need to draw in those interested in those areas who have various projects to choose between. :)
16:00 brrt very true
16:07 FROGGS jnthn: back to unions... say we have a union { MyStruct *foo; YourStruct *bar; } Foo; that should be no problem because CStruct->gc_cleanup does not free body->cstruct
16:07 FROGGS another issue is union { MyStruct foo; YourStruct bar; } Foo; I suppose... but perhaps not even that
16:10 FROGGS so I try to do the inlining of unions as the default now to see where we get
16:11 FROGGS the problem might be when we create these structs/unions in Perl 6 land to pass them off to C...
16:12 jnthn FROGGS: Yeah, something is worrying me, but I can't immediately put my finger on it. Maybe the best way is to try and implement it and see where it hurts...
16:17 * brrt afk until this evening
16:17 brrt left #moarvm
16:19 FROGGS tits, aye :P
16:19 jnthn I was thinking that, but didn't say it :P
16:20 jnthn *sigh*
16:20 timotimo i don't get it
16:20 jnthn "try it to see"
16:21 timotimo oh
16:21 jnthn "try it and see" is better English though, so it's a bit forced
16:26 FROGGS I never said that I'm good at English :o)
16:31 FROGGS lol, a single line patch lets me inline unions O.o
16:32 jnthn FROGGS: Heh, just twerked the storage spec?
16:32 jnthn uhhhh
16:32 jnthn *tweaked
16:32 FROGGS else if(type == MVM_CSTRUCT_ATTR_CUNION) {
16:32 FROGGS -                            obj = MVM_nativecall_make_cunion(tc, typeobj, cobj);
16:32 FROGGS +                            obj = MVM_nativecall_make_cunion(tc, typeobj, (char *)body->cstruct + repr_data->struct_offsets[slot]);
16:33 FROGGS in CStruct get_attribute
16:33 * jnthn did design 6model to cope with inlining compact structs some day :)
16:36 timotimo FROGGS: a little status summary for the weekly? :)
16:37 FROGGS timotimo: NativeCall is in rakudo, I think last week it was only announced
16:37 FROGGS the `long` type is probably new also
16:37 timotimo i know
16:37 timotimo i posted about "long" last week
16:37 timotimo i meant for the cpp branch and unions
16:38 FROGGS ahh, and nativesiveof() is there
16:38 timotimo good
16:38 FROGGS unions kinda work, and will probably land this week, when we know more about inlined unions/structs
16:38 timotimo good
16:38 FROGGS cpp is doing good
16:39 FROGGS you can map classes, call their new method, and then call other methods on the instance
16:39 FROGGS g++ only so far, though it should work with clang too
16:39 FROGGS this won't land in the next two weeks at least
16:41 FROGGS but I want to get the typed Pointer in place this week
16:43 Ven joined #moarvm
16:43 FROGGS ===SORRY!===
16:43 FROGGS A types pointer can only hold integers, numbers, strings, CStructs, CPointers or CArrays (not Onion)
16:43 FROGGS hehe, I laugh me head off!
16:44 jnthn hah :)
17:41 FROGGS[mobile] joined #moarvm
19:12 dalek MoarVM/union: 01dfa8b | FROGGS++ | src/6model/reprs/CStruct.c:
19:12 dalek MoarVM/union: treat CUnions as inlined by default
19:12 dalek MoarVM/union: review: https://github.com/MoarVM/MoarVM/commit/01dfa8be13
19:12 dalek MoarVM/union: babb3ac | FROGGS++ | src/core/nativecall.c:
19:12 dalek MoarVM/union: allow to nativecast from CPointer to CUnion
19:12 dalek MoarVM/union: review: https://github.com/MoarVM/MoarVM/commit/babb3ac9e1
20:07 brrt joined #moarvm
20:27 kjs_ joined #moarvm
20:32 brrt can i say lua is weird
20:33 jnthn m: say 'lua is weird'
20:33 camelia rakudo-moar 0966e9: OUTPUT«lua is weird␤»
20:33 jnthn Apparently.
20:35 brrt :-)
20:36 FROGGS why so?
20:38 brrt it's almost, but not quite, a conventional programming language
20:38 nwc10 nutrimatic code? :-)
20:38 brrt right :-)
20:38 brrt apparantly #foo is 'the length of array foo'
20:39 FROGGS well, $#foo in P5 is something similar :o)
20:40 brrt true
21:44 dalek joined #moarvm
22:02 avuserow today I learned that IBM offers access to POWER7/8 machines running a variety of OSes for no charge, intended for use with porting and testing applications on those architectures: http://www-304.ibm.com/partnerworld/wps/servlet/ContentHandler/stg_com_sys_power-development-platform
22:02 avuserow wanted to make sure that you guys knew about it, since it seems a useful resource for moarvm portability
22:04 FROGGS aye
22:05 FROGGS damn, I want to play with these machines now :o)
22:16 jnthn avuserow++ # thanks for pointing it out
22:19 FROGGS m: sub foo(int32) { }; foo(my $ = int32) # jnthn: do you know why that fails?
22:19 camelia rakudo-moar 0966e9: OUTPUT«Cannot unbox a type object␤  in sub foo at /tmp/KLmCgh8xWY:1␤  in block <unit> at /tmp/KLmCgh8xWY:1␤␤»
22:19 FROGGS m: sub foo(int32) { }; foo(int32) # even that
22:19 camelia rakudo-moar 0966e9: OUTPUT«Cannot unbox a type object␤  in block <unit> at /tmp/2HKqJK9TwD:1␤␤»
22:19 jnthn FROGGS: For the exact reason it says.
22:20 FROGGS but... this was working :o(
22:20 jnthn A native can't store an undefined value.
22:20 jnthn Moar had a bug a while ago where we didn't check in the arg binder if we got a non-concrete object
22:20 jnthn It then went ahead and read junk memory
22:21 timotimo joined #moarvm
22:21 FROGGS hmmm
22:21 jnthn Which sometimes caused a SEGV, and sometimes just gave you junk in the arg.
22:22 dalek joined #moarvm
22:23 jnthn Urgh. Latest Moar fails 3 NQP tests on Windows
22:23 jnthn All I/O related
22:26 FROGGS okay, easy fix is easy
22:26 jnthn For your issue, or mine? :)
22:27 FROGGS for mine
22:27 FROGGS :P
22:27 FROGGS I mean, my mine :o)
22:27 jnthn Something is really busted here :/
22:27 jnthn Build of nom hangs in CORE.setting compilation
22:28 FROGGS eww
22:29 jnthn oh wait, I compiled nom Rakudo on native-ref NQP
22:29 jnthn NQP master is bust on the same I/O tests
22:30 timotimo hum
22:30 jnthn Hang happens on NQP master too
22:31 FROGGS does it hang while copying a file? (in the tests)
22:32 jnthn No hangs in the tests
22:32 jnthn Just SEGV
22:33 jnthn Hmmm.
22:33 FROGGS I'm testing now too on windows
22:34 jnthn Hang on
22:34 jnthn I think we did a libuv bump since I last built on this box
22:34 jnthn And so I had a dirty tree
22:35 FROGGS ohh
22:35 FROGGS yes, that was me
22:35 jnthn Will know soon if it helps
22:35 jnthn We do have a new warning on msvc thanks to the bump
22:35 FROGGS my libuv is also not clean
22:35 jnthn yeah, seems to help
22:36 FROGGS is that the 'different levels of indirection' message?
22:36 jnthn It scrolleth away
22:36 jnthn Will look again in a moment
22:37 jnthn Yeah, more CORE.setting build is happy agian too
22:37 jnthn Phew!
22:37 FROGGS :o)
22:37 timotimo phew
22:37 jnthn Though by a LONG way the worst build time I've seen us having for ages :(
22:37 FROGGS but I think the libuv bump was important
22:37 jnthn Yes
22:37 FROGGS we are now using their 1.0.0
22:41 kjs_ joined #moarvm
22:42 timotimo i wonder how much the build time is influenced by new features in the core setting?
22:45 TimToady pretty sure it wasn't my change, which compiled about the same; after I git pulled I lost a second or so
22:45 jnthn FROGGS: Yes, it's that warning.
22:46 timotimo i'll start building a bare-bones "second pass" for spesh now
22:47 timotimo should set removal and other post-inline things happen before or after unused log guards are thrown out?
22:47 jnthn Hmm
22:47 jnthn Good question. Not sure.
22:48 jnthn Not sure it matter
22:48 jnthn *matters
22:50 jnthn ffs, getting dynasm to not spit out a busted .c file with bogus escape sequences is quite a pain :/
22:51 timotimo probably doesn't. if it does, we'll probably see it later
22:56 timotimo :(
23:04 dalek MoarVM: 7df4fda | jnthn++ | src/jit/emit_x64.dasc:
23:04 dalek MoarVM: Mostly quiet MSVC warnings when compiling JIT.
23:04 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/7df4fda978
23:07 jnthn Ah, they changed what uv_thread_self returns...
23:21 lizmat re CORE.setting build time: does that factor in building NativeCall also ?
23:22 lizmat $ time perl6 --target=mbc --output=lib/NativeCall.pm.moarvm lib/NativeCall.pm
23:22 lizmat real0m1.575s
23:22 lizmat user0m1.488s
23:22 lizmat sys0m0.074s
23:22 lizmat that's good for 1.5 seconds just by itself
23:23 vendethiel joined #moarvm
23:24 dalek MoarVM: 6121d2b | jnthn++ | src/ (4 files):
23:24 dalek MoarVM: Fix getting current thread ID from the OS.
23:24 dalek MoarVM:
23:24 dalek MoarVM: Not sure if what we got on Windows before for this was especially
23:24 dalek MoarVM: valid; recent libuv changes showed up a warning that made it clear
23:24 dalek MoarVM: that something certainly wasn't right now. This fixes the warnings,
23:24 dalek MoarVM: hopefully without breaking anything off Windows.
23:24 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/6121d2be9b
23:25 jnthn lizmat: I was measuring for the whole Rakudo build
23:25 lizmat so adding NativeCall added 1.5 seconds to the build
23:25 lizmat does that explain the slowdown that you saw ?
23:27 jnthn Not entirely, but partly
23:27 lizmat Test.pm got a bit bigger recently as well...
23:29 jnthn Just a bit sad that I had us on the cusp of hitting 60s on my box at one point, and now we're around 72s.
23:31 lizmat for me: real0m51.750s user0m50.276s sys0m1.119s
23:47 jnthn Well, fixed a few Moar warning annoyances and got my native-ref branches rebased on top of latest NQP/Rakudo. So, ready to dive back in. But...sleep for now. :)
23:48 jnthn o/
23:49 lizmat good night, jnthn
23:49 lizmat will do the same shortly
23:52 vendethiel joined #moarvm

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