Perl 6 - the future is here, just unevenly distributed

IRC log for #moarvm, 2017-05-01

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

All times shown according to UTC.

Time Nick Message
00:03 Geth joined #moarvm
00:19 stmuk joined #moarvm
01:07 Voldenet joined #moarvm
01:07 Voldenet joined #moarvm
01:13 stmuk_ joined #moarvm
01:49 ilbot3 joined #moarvm
01:49 Topic for #moarvm is now https://github.com/moarvm/moarvm | IRC logs at  http://irclog.perlgeek.de/moarvm/today
03:16 eater joined #moarvm
03:28 MasterDuke_ m: my $a = "a" x 2**30;
03:28 camelia rakudo-moar a2602b: ( no output )
03:28 MasterDuke_ m: my $a = "a" x 2**31;
03:28 camelia rakudo-moar a2602b: OUTPUT: «repeat count > 1073741824 arbitrarily unsupported...␤  in block <unit> at <tmp> line 1␤␤»
03:29 MasterDuke_ m: my $a = "a" x 2**30; my $b = $a x 2**30
03:29 camelia rakudo-moar a2602b: OUTPUT: «Can't repeat string, required number of graphemes 1152921504606846976 > max allowed of 4294967295␤  in block <unit> at <tmp> line 1␤␤»
03:29 MasterDuke_ given that we now have the error about required greater than max, couldn't we remove the arbitrary limit on x?
05:30 cantstanya joined #moarvm
05:41 brrt joined #moarvm
05:42 brrt good *, #moarvm
05:44 nwc10 joined #moarvm
05:56 samcv good *
05:59 brrt ohai samcv
05:59 brrt how are you this morning
06:00 samcv well
06:08 brrt wait, it's not at all morning for you
06:08 brrt did you get to see my blog post?
07:15 brrt joined #moarvm
07:49 samcv i have not yet
07:49 samcv looking in a sec
07:53 samcv i'm working on a SPDX -license identifier parser using grammars
07:53 brrt joined #moarvm
07:54 samcv finally passing more than a few of my tests. finally :)
07:55 brrt \o/
07:56 brrt hmm, sp_p6obind_o does work if i remove the redundant let:
07:56 brrt that's odd
07:56 samcv sp == spesh?
07:59 brrt yes
07:59 brrt it's an instruction that is inserted by spesh if it can prove the layout of an object
07:59 brrt so that we don't have to do dynamic dispatch
08:02 samcv oo
08:06 brrt it requires a write barrier, which makes it relatively complex
08:06 brrt so it's a good test for the JIT
08:06 brrt yesterday i had one implementation that consistently blew up in a weird way
08:06 brrt now i've changed that in what should be an equivalent way, and now it doesn't blow up anymore
08:12 samcv so there's something that you aren't seeing i guess is the point right
08:13 samcv reading your post now :-)
08:23 samcv .tell brrt very cool post
08:23 yoleaux samcv: I'll pass your message to brrt.
08:30 brrt joined #moarvm
08:47 Ven joined #moarvm
09:22 Ven joined #moarvm
09:26 Ven_ joined #moarvm
10:19 Ven joined #moarvm
10:31 brrt joined #moarvm
10:32 brrt1 joined #moarvm
10:56 jnthn brrt1: Great post! One typo: "That is very inconvenience"
10:57 brrt1 oh, thanks, i'll fix it :-)
11:01 brrt joined #moarvm
11:10 brrt fixed :-)
11:10 yoleaux 08:23Z <samcv> brrt: very cool post
11:10 brrt thx samcv
11:15 Ven_ joined #moarvm
11:34 Ven joined #moarvm
11:41 AlexDaniel joined #moarvm
11:47 brrt joined #moarvm
12:40 zakharyas joined #moarvm
12:47 brrt oh wow, all sorts of stuff goes wrong with the compilation of sp_p6bind_o
12:48 brrt that's interesting...
12:51 timotimo i only saw sp_p6oget_o in the blog post, though :P
12:52 brrt yeah, i was experimenting with sp_p6obind yesterday afternoon
12:53 timotimo mhm
12:53 brrt it currently has this redundant let expression. with the let expression, it breaks grandly. without it, it works
12:53 brrt (it's redundant because there is just a single ref)
12:55 brrt i'm wondering what the 'working' version looks like, though
12:56 timotimo good thing we have a whole bunch of different debug outputs at our disposal :P
12:56 timotimo i was chasing a bug that 100% stumped me the day before yesterday, and i felt that gdb in moarvm still needs much improved :|
13:00 brrt always room for improvement
13:00 timotimo right
13:07 zakharyas joined #moarvm
13:20 nine Is there a way to initiate dumping a heap snapshot from within MoarVM so I could use the heap analyzer to find out where an object is referenced from?
13:20 nine In a place where we'd otherwise just throw an exception
13:20 timotimo the heap snapshot tool depends on a piece of perl6 code to run :\
14:29 TimToady joined #moarvm
14:41 ggoebel joined #moarvm
14:54 jnthn nine: It takes a snapshot each time a GC happens, so just trigger GC
14:54 jnthn (nqp::force_gc or so)
14:55 jnthn Uh, or if you're inside of MoarVM then just call MVM_gc_enter_from_allocator(tc) or so
14:57 MasterDuke_ jnthn: what do you think about removing the arbitrary limit on string repeats since we now check that the resulting string wouldn't be too long anyway?
14:58 jnthn MasterDuke_: Well, we need to make sure that the repetition count in the strand will work out also
15:00 MasterDuke_ is that what `STRAND_CHECK(tc, result);` does?
15:00 jnthn No, there's a field that holds the repeat count
15:01 jnthn Which I think is a 32-bit value
15:01 MasterDuke_ ah. `result->body.storage.strands[0].repetitions = count - 1;` this need to be correct?
15:01 jnthn Yes
15:02 jnthn So we need a bound check
15:02 MasterDuke_ `MVMuint32 repetitions;` in struct MVMStringStrand
15:03 jnthn Right, so is the range check we're doing for soemthing smaller than we can fit in there?
15:03 jnthn We need one, but if it's for a smaller value then there's little need for that.
15:03 nine jnthn: I guess moarvm only writes the heap profile file in an orderly exit?
15:03 MasterDuke_ `repeat count > 1073741824 arbitrarily unsupported...`
15:05 MasterDuke_ jnthn: repetitions and num_graphs are both MVMuint32, so we should be good
15:05 jnthn nine: Yeah, well, actually it forms a string that is then written back in NQP land
15:06 jnthn m: say 1 +< 32
15:06 camelia rakudo-moar eb8d00: OUTPUT: «4294967296␤»
15:06 timotimo oh, really? i was convinced we were assembling the data in nqp land from an array or something
15:06 jnthn Hmm
15:06 timotimo well, convinced is a bit much
15:06 jnthn Most of the concat is done in C land at least
15:07 MasterDuke_ m: my $a = "a" x 2**31;
15:07 camelia rakudo-moar eb8d00: OUTPUT: «repeat count > 1073741824 arbitrarily unsupported...␤  in block <unit> at <tmp> line 1␤␤»
15:07 MasterDuke_ m: my $a = "a" x 2**30; my $b = $a x 2**30
15:07 camelia rakudo-moar eb8d00: OUTPUT: «Can't repeat string, required number of graphemes 1152921504606846976 > max allowed of 4294967295␤  in block <unit> at <tmp> line 1␤␤»
15:07 brrt joined #moarvm
15:07 timotimo jnthn is right
15:08 jnthn So it shouldn't be too much code to write a C function that dumps it out
15:11 MasterDuke_ jnthn: i'll create a PR to increase that repeat count limit, but feel free to reject
15:15 nine I tried just catching the exception, but still don't get a profile written.
15:17 domidumont joined #moarvm
15:20 brrt i wonder if it's time to start writing the optimizer
15:20 jnthn brrt: For the JIT? :)
15:20 brrt yes
15:20 timotimo yes! always optimize! :D
15:21 brrt hehe
15:21 jnthn Maybe would be better to aim for merging it/enabling it by default first? :)
15:21 timotimo yeah, probably
15:21 brrt yeah, probably
15:21 brrt hmm
15:21 brrt i'm missing the stuff in arglist, it seems
15:21 jnthn I mean, the better quality code should already get us some speedups?
15:21 brrt well, some of the code is decidedly worse
15:23 brrt okay, i've discovered what is wrong about the codegen, but not why
15:23 brrt (of sp_p6obind_o)
15:23 timotimo how much worse?
15:24 timotimo do you have some examples? :)
15:26 brrt ehm, sure
15:27 timotimo also: good post
15:29 brrt ty
15:32 brrt https://gist.github.com/bdw/1f5a6c07e8db33dfb54d27d8c9fa329d
15:32 brrt the reason is that the tiling doesn't pick the 'optimal' choice, whihc is a cost issue i think
15:34 timotimo now you're comparing exprjit vs hand-written, i thought we were going to compare template jit vs expr jit
15:36 brrt well, the template jit is hand-written code
15:36 brrt for segments like these (write barrier)
15:36 brrt and that is its strength
15:45 timotimo ah
15:46 brrt i've found my bug
15:47 brrt i don't run special-tile code for stuff after the last live range start
15:47 timotimo that'll cause p6obind_o to work better?
15:50 brrt i hope
15:50 brrt yes
15:52 [Coke] so, not knowing where this project is, status wise - how close are we to a new jit?
15:54 brrt hmm, i want to expand with a very complete answer
15:55 brrt the short answer is 'pretty close, but i don't know a good timeframe, since i'm time-limited'
15:55 brrt the complete answer includes: note that the new jit is actually embedded in the old one
15:56 brrt and relies - for so long as that is reasonable - on the old jit to handle some particularly nasty stuff (e.g. exceptions)
15:56 brrt that can be done by the expr jit eventually as well, but i'm in no hurry
15:56 [Coke] OK. are you at a point where having more hands would be helpful?
15:59 brrt almost
15:59 brrt :-)
15:59 brrt i'm nailing down the final pieces of mechanism
15:59 Geth ¦ MoarVM/even-moar-jit: e1529f462c | (Bart Wiegmans)++ | src/jit/linear_scan.c
15:59 Geth ¦ MoarVM/even-moar-jit: Make sure we run 'special tile' code after last live range
15:59 Geth ¦ MoarVM/even-moar-jit:
15:59 Geth ¦ MoarVM/even-moar-jit: If we don't, we can miss ARGLIST argument setup and other
15:59 Geth ¦ MoarVM/even-moar-jit: essentials. This would break a write-barrier case in sp_p6obind_o.
15:59 Geth ¦ MoarVM/even-moar-jit: review: https://github.com/MoarVM/MoarVM/commit/e1529f462c
16:01 [Coke] sweet. well, let us know. thanks for keeping at it.
16:33 Ven joined #moarvm
16:33 nebuchad` joined #moarvm
16:36 Geth ¦ MoarVM/even-moar-jit: 7a631fb7f2 | (Bart Wiegmans)++ | 2 files
16:36 Geth ¦ MoarVM/even-moar-jit: Take requirement handling out of loop
16:36 Geth ¦ MoarVM/even-moar-jit:
16:36 Geth ¦ MoarVM/even-moar-jit: So that we don't have to duplicate it, just the call. Also,
16:36 Geth ¦ MoarVM/even-moar-jit: enable sp_p6obind_o, and watch it not burn.
16:36 Geth ¦ MoarVM/even-moar-jit: review: https://github.com/MoarVM/MoarVM/commit/7a631fb7f2
16:36 Geth ¦ MoarVM/even-moar-jit: 2593e26ad3 | (Bart Wiegmans)++ | src/jit/core.expr
16:36 Geth ¦ MoarVM/even-moar-jit: Remove 'let' in sp_p6obind_o
16:36 Geth ¦ MoarVM/even-moar-jit:
16:36 Geth ¦ MoarVM/even-moar-jit: Not necessary to have it, so let's get rid of it, it'll make the
16:36 Geth ¦ MoarVM/even-moar-jit: generated code simpler.
16:36 Geth ¦ MoarVM/even-moar-jit: review: https://github.com/MoarVM/MoarVM/commit/2593e26ad3
16:42 ilmari joined #moarvm
16:59 zakharyas joined #moarvm
18:42 ggoebel joined #moarvm
18:48 zakharyas joined #moarvm
19:49 ggoebel joined #moarvm
19:57 Ven joined #moarvm
20:18 Zoffix joined #moarvm
20:20 Ven_ joined #moarvm
20:37 geekosaur joined #moarvm
21:15 geekosaur joined #moarvm

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