Perl 6 - the future is here, just unevenly distributed

IRC log for #moarvm, 2014-02-13

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

All times shown according to UTC.

Time Nick Message
00:14 FROGGS joined #moarvm
01:13 jnap joined #moarvm
02:09 cognominal__ joined #moarvm
02:12 japhb_ joined #moarvm
02:13 lizmat_ joined #moarvm
02:15 chipdude_ joined #moarvm
02:17 jnap1 joined #moarvm
02:20 FROGGS joined #moarvm
02:30 dalek joined #moarvm
02:36 chipdude joined #moarvm
02:37 d4l3k_ joined #moarvm
02:38 benabik joined #moarvm
02:39 japhb joined #moarvm
02:41 FROGGS_ joined #moarvm
02:44 rblackwe_ joined #moarvm
02:46 jnthn_ joined #moarvm
02:54 FROGGS__ joined #moarvm
03:00 __rnddim__ joined #moarvm
03:00 lizmat joined #moarvm
03:09 jnthn joined #moarvm
03:30 japhb_ joined #moarvm
04:18 ingy joined #moarvm
05:48 woosley joined #moarvm
07:33 FROGGS__ joined #moarvm
08:15 rblackwe joined #moarvm
08:21 JimmyZ joined #moarvm
08:23 dagurval joined #moarvm
08:26 JimmyZ joined #moarvm
08:42 odc joined #moarvm
10:27 lizmat joined #moarvm
10:30 woolfy joined #moarvm
10:57 woolfy left #moarvm
11:32 ingy joined #moarvm
11:59 harrow joined #moarvm
12:32 timotimo i'm thinking about adding a histogram that counts how often which REPRs have been inlined
12:32 timotimo would a p6opaque ever inline a p6opaque?
12:33 timotimo i would *think* that that would flatten out the p6opaque
12:33 * timotimo looks at the storage spec
12:36 timotimo ah yes, P6opaque says it's SPEC_REFERENCE
12:37 timotimo that's good
12:41 jnthn At present, no
12:41 jnthn In the future, maybe...to support compact structs.
12:42 timotimo mhm
12:42 timotimo hm, how should i handle this ...
12:44 timotimo should i just go through the flattened stables, grab the REPRs of each and pick out the names, then compose them into a string a la [bigint,bigint,num] or something?
12:44 timotimo (also: strip out leading P6)
12:44 jnthn You could do that to show any flattened in reprs, yeah
12:45 jnthn There's a flattened_stables array
12:45 jnthn Any slot with a NULL in there is a reference type
12:48 timotimo should i follow references at least one level as well?
12:48 timotimo another thing i could do is figure out how many buckets in VMHashes are taken and the same for VMArray perhaps
12:58 timotimo oh, VMArray can has Str or Obj slots
12:58 timotimo or ints, of course, and nums
14:03 jnap joined #moarvm
14:26 timotimo i wonder how i should display the "wastage" of VMArray slots
14:26 timotimo have 10% wide buckets for wastage? count how many times any given number of slots has gone to waste?
14:27 jnthn What's wastage, ooc?
14:27 jnthn Could just do % in use?
14:27 jnthn Trouble is that the analysis is a bit simplistic
14:28 timotimo i claim wastage is how many slots are allocated that are not being used at the moment
14:28 timotimo of course that's simplistic, but if we see a spike at 99% wastage, that would mean something :)
14:28 jnthn Right, but that doesn't mean they weren't at some point.
14:28 timotimo at least half must have been used at one point
14:28 jnthn For example, bstack/cstack in parsing typically finish up empty.
14:28 timotimo mhm
14:29 timotimo this is also an "in between" measurement
14:29 timotimo you could get the heap analysis done at any point where you have access to a tc, i'm just doing it at the beginning and end of MVM_gc_enter_from_allocator at the moment
14:32 colomon joined #moarvm
14:46 timotimo i'm not sure i'm doing this right
14:48 timotimo i'm dividing ArrayBody's elems by ArrayBody's ssize
14:48 timotimo and i get strange numbers
14:49 jnthn Hopefully between 0 and 1?
14:49 timotimo 6757408800 for example
14:50 jnthn o.O
14:50 benabik joined #moarvm
14:50 timotimo am i miscasting?
14:50 TimToady I'm getting weird numbers like that in one my RC examples
14:50 timotimo if the repr is VMArray, i cast the object to an MVMArray
14:52 timotimo that may just be completely wrong?
14:52 timotimo given the extra M?
14:53 jnthn timotimo: No, sounds right
14:53 timotimo strange. i shall investigate
14:54 timotimo {elems = 18003936, start = 36623056, ssize = 0, slots = {o = 0x15655d0, s = 0x15655d0, i64 = 0x15655d0, i32 = 0x15655d0, i16 = 0x15655d0, i8 = 0x15655d0 "", n64 = 0x15655d0, n32 = 0x15655d0, u64 = 0x15655d0, u32 = 0x15655d0, u16 = 0x15655d0, u8 = 0x15655d0 "", any = 0x15655d0}}
14:54 jnthn Sorry I can't be more help. I've 30 mins to finish the slides for my talk tonight :)
14:54 timotimo ah!
14:54 jnthn uh, that loosk hosed :P
14:54 timotimo then go forth and be productive :)
14:54 jnthn Did you case to MVMArrary or MVMArrayBody?
14:54 timotimo no
14:55 timotimo i casted MVMObjectStooge to MVMArray and got its ['body']
14:55 timotimo well, with a * after each type of course
14:55 jnthn That should work.
14:56 timotimo i tend to agree :)
14:57 timotimo well, i'll leave it be for now.
14:59 timotimo seems like sometimes it's hosed, sometimes not.
14:59 timotimo could it be that it's an stable or type object with that repr?
15:00 timotimo that doesn't make a lot of sense to me right now.
15:02 jnthn Well, type object with that repr would mean you look at junk, sure
15:02 jnthn But that's rare, I suspect.
15:03 timotimo not very, if i can trust my output
15:03 timotimo N/A  [=================================================  1297
15:03 timotimo inv  [===                                                82
15:03 timotimo N/A is division by zero
15:03 timotimo inv is "clearly invalid numbers"
15:04 timotimo (that's before the gc run)
15:07 timotimo 0    [==                                                 28
15:07 timotimo 10   [======                                             88
15:07 timotimo 20   [====                                               53
15:07 timotimo those are the highest usage percentages
15:07 timotimo er ...
15:08 timotimo the ones we found most often
15:08 timotimo (buckets of ten)
15:13 timotimo the flags of the objects that turn out to be "inv" are all 0
15:14 timotimo (4 after the collection for most of them, for obvious reasons)
15:38 jnthn commute &
15:38 * timotimo commutes as well
15:40 TimToady here's my bug: https://gist.github.com/anonymous/8977350
15:40 TimToady (it's a cut-down version of http://rosettacode.org/wiki/Numerical_integration#Perl_6)
15:42 TimToady somehow using do instead of () around the 'for' makes it reuse the &f from the previous call
15:42 TimToady you can determine this by putting a say into the functions; the second one never gets called
15:43 TimToady it's like 'do' is imposing some sort of state or global semantics
15:44 TimToady or reusing something it shouldn't
15:47 TimToady also, this is moarvm only, works fine on -j and -p
15:51 TimToady m: https://gist.github.com/anonymous/8977597
15:51 camelia rakudo-moar 0d2b68: OUTPUT«              exact result: 0.25␤     rectangle method left: 0.245025␤              exact result: 4.60517018598809␤     rectangle method left: 2378916309.88410399␤»
15:52 TimToady that's cut down some more
15:52 TimToady EVAL didn't matter
15:52 TimToady the last number there should be about 5.17098406528658
15:56 TimToady oh, and it doesn't matter if you change the 'do' to an 'eager' or a 'lazy'
16:05 TimToady and it fails differently if you flip the for loop around to a standard one, ends up with 455.427689060903 somehow
16:07 TimToady a bare map works fine, but a 'do map' fails 455 again
16:07 TimToady very odd
16:34 FROGGS jnthn: when I run the thing in gdb until it hangs, and I interrupt it, there is a uv__epoll_wait and uv__io_poll in the bt
16:35 FROGGS jnthn: I am not sure though that this information is reliable
16:38 FROGGS jnthn: you know I am a friend of printf... how do I printf the instructions that moar is processing?
16:38 FROGGS so I could see the last instruction before the hang
16:38 FROGGS ohh, hmmm, maybe --dump will do
16:38 FROGGS ummm, coredump
17:04 lizmat joined #moarvm
17:05 woolfy joined #moarvm
17:11 woolfy1 joined #moarvm
17:17 woolfy joined #moarvm
17:39 FROGGS joined #moarvm
17:42 FROGGS_ joined #moarvm
18:07 timotimo is there some simple way to register the desire to start/stop receiving line number change events through the runloop?
18:07 timotimo like, whenever execution reached a different source line
18:55 tgt joined #moarvm
19:01 jnap joined #moarvm
20:11 tgt joined #moarvm
20:21 lue joined #moarvm
21:11 jnthn FROGGS: If you look far enough down the stack, you should find a frame in interp.c
21:12 timotimo later this evening i might use an implementation of hilbert curves to illustrate the fragmentedness of the gen2 pages
21:13 FROGGS jnthn: so I can trust the bt when I hit ctrl+c?
21:13 FROGGS jnthn: btw, panda's current blocker is the STable thingy
21:14 jnthn FROGGS: OK. I'll look into it after the IO work
21:14 FROGGS cool
21:14 FROGGS I'll have a look if it happens on windows also
21:15 nwc10 jnthn: you are back from your talk?
21:15 jnthn Yes :)
21:15 jnthn It was fun. For me at least. :)
21:15 nwc10 good
21:16 jnthn Also had a rather amusing bit of audience participation
21:16 TimToady er, what were you talking about?
21:16 jnthn I was doing basic sentiment analysis on live Twitter feeds, and one guy managed to write a tweet that got into my feed. :)
21:17 jnthn TimToady: Rx, mostly. With a detour into event sourcing.
21:17 timotimo reactive extensions; that is C# i guess?
21:17 jnthn Originally, but now it's been ported all over.
21:18 jnthn And was where Supplies came from in Perl 6 :)
21:18 timotimo fair enough :)
21:18 TimToady r: https://gist.github.com/anonymous/8977597
21:18 jnthn Now I just need to get enough stuff in place in Perl 6 so I can do a Perl 6 version of the talk :)
21:18 camelia rakudo-moar 1ce379: OUTPUT«              exact result: 0.25␤     rectangle method left: 0.245025␤              exact result: 4.60517018598809␤     rectangle method left: 2378916309.88410399␤»
21:18 camelia ..rakudo-jvm 1ce379: OUTPUT«              exact result: 0.25␤     rectangle method left: 0.245025␤              exact result: 4.605170185988092␤     rectangle method left: 5.170984065286576␤»
21:18 camelia ..rakudo-parrot 1ce379: OUTPUT«              exact result: 0.25␤     rectangle method left: 0.245025␤              exact result: 4.60517018598809␤     rectangle method left: 5.17098406528658␤»
21:19 TimToady note the last number for moar
21:19 jnthn Hm, all different
21:19 jnthn uh, yes, that's veyr different
21:19 timotimo okay, time for some bikeshed painting
21:19 timotimo what should the diff'd histograms look like
21:19 jnthn You golfed it further in backlog, though?
21:19 TimToady there's a 'do' in there that works right if one uses () around the loop instead
21:19 timotimo either something like P6opaque [========--------             50/100
21:20 TimToady but otherwise gets the wrong function pointer somehow
21:20 timotimo or maybe P6opaque    =====][============         50/100
21:20 jnthn Ooops
21:20 TimToady that's the golfed one
21:20 jnthn I made Moar assume a few more things about correct code-gen with regard to outers.
21:20 jnthn It tends to show up stuff that accidentally but inefficiently works elsewhere. I suspect this is one of them.
21:21 timotimo making all backends more efficient by being more strict. i like it!
21:21 TimToady seems a bit like something got inlined as shouldn'ta
21:21 jnthn TimToady: Could also be something like that.
21:21 timotimo so --optimize=off makes it work again?
21:21 jnthn Yeah, that'd be the thing to try
21:21 jnthn Moar isn't yet doing VM level inlining
21:21 TimToady certainly &f as a param shouldn't inline
21:22 jnthn Anyway, will take a look.
21:22 jnthn timotimo: Yeah, I also plan to switch the JVM backend to the same model as Moar. 'cus currently the JVM one makes some threading mistakes...
21:24 timotimo oh oops :)
21:34 FROGGS jnthn: there seems to be an issue with panda on windows, so let me fix that before you thing about STables
21:38 jnthn FROGGS: Did you fix the dir thing?
21:38 FROGGS jnthn: at least on linux, yes
21:38 FROGGS not sure what is wrong on windows yet
21:39 jnthn k
21:40 FROGGS uhh, found it I think
21:42 lizmat joined #moarvm
22:00 dalek MoarVM/gdb-support: 1beb871 | (Timo Paulssen)++ | moar-gdb.py:
22:00 dalek MoarVM/gdb-support: started work on a gdb plugin for moar-related datastructures
22:00 dalek MoarVM/gdb-support: review: https://github.com/MoarVM/MoarVM/commit/1beb8719f5
22:00 dalek MoarVM/gdb-support: 3700036 | (Timo Paulssen)++ | / (16 files):
22:00 dalek MoarVM/gdb-support: Merge remote-tracking branch 'origin/master' into gdb-support
22:00 timotimo here comes my gdb stuff
22:00 dalek joined #moarvm
22:02 FROGGS jnthn: when I strip File::Find's weird tests it get stuck building JSON::Tiny :(
22:03 jnthn Stuck?
22:04 FROGGS it hangs
22:04 FROGGS probably in the ML too
22:05 timotimo should i push for gen2 support first or should i rather get the "what do the several P6opaques inline?" stuff going?
22:06 jnthn timotimo: Does this need to be in the root directory, or could it go in tools/ ?
22:06 timotimo sure could. as long as the user ln's it right next to the moar binary
22:06 timotimo i ln'd it to install/, too
22:06 timotimo that way, gdb will auto-load it whenever you attach something that has a moar running in it
22:06 timotimo actually ... i probably want to target libmoar instead of moar
22:06 jnthn timotimo: If you put it in tools, I'm fine with you working on it in master, fwiw.
22:07 FROGGS I'll continue tomorrow (e.g. fixing File::Find)
22:07 timotimo could do that. but before i push it into master i want to spice the code up with comments and mark things that don't work yet more clearly
22:08 jnthn FROGGS: OK. I may get a little more IO done today, but I'll probably not stay up too late...
22:08 jnthn timotimo: OK, cool :)
22:08 jnthn I'll have to try this out at some point soon :)
22:08 timotimo i hope you can make some sense out of it
22:09 timotimo you can go as fine-grained as you want with the nursery analysis, fwiw, and diff any two snapshots if you supply two integers as the argument to diff-moar-heap
22:11 timotimo "make some sense out of it" meaning "get useful information out of the analysis"
22:12 jnthn Oh... :)
22:12 jnthn I can probably make sense of the code too though :)
22:14 timotimo yeah, since you know about the internals of moarvm already, it shouldn't be too terrible
22:14 jnthn Yeah. And that helps me interpret it too. :)
22:15 timotimo oh, surely :D
22:15 jnthn the output, that is
22:15 timotimo oh, i thought you would use the references to MVMThings in the python code to understand it :3
22:16 jnthn Python mostly falls into "it's a mostly imperative, managed, OO language, so I can read it" :)
22:16 timotimo i found myself missing a few perl6y things along the way
22:16 timotimo oh well.
22:17 timotimo it's dog slow even on CPython, though, which makes me feel more at home %)
22:19 jnthn bah, of all the slides to photo from my talk... https://twitter.com/_FooCafe_/status/434015184340791296 :)
22:19 timotimo %)
22:20 FROGGS hehe
23:29 colomon joined #moarvm

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