Perl 6 - the future is here, just unevenly distributed

IRC log for #moarvm, 2017-08-23

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

All times shown according to UTC.

Time Nick Message
01:53 ilbot3 joined #moarvm
01:53 Topic for #moarvm is now https://github.com/moarvm/moarvm | IRC logs at  http://irclog.perlgeek.de/moarvm/today
02:09 Geth ¦ MoarVM: MasterDuke17++ created pull request #656: == was a no-op, correct it to an =
02:09 Geth ¦ MoarVM: review: https://github.com/MoarVM/MoarVM/pull/656
02:22 Geth ¦ MoarVM: samcv++ created pull request #657: Rework MVMNFGSynthetic to not store base separately
02:22 Geth ¦ MoarVM: review: https://github.com/MoarVM/MoarVM/pull/657
03:30 leedo joined #moarvm
03:31 leedo joined #moarvm
03:33 Geth ¦ MoarVM: 62f66cbfd8 | (Samantha McVey)++ | src/strings/ops.c
03:33 Geth ¦ MoarVM: Ensure strings created with MVM_string_repeat are in NFG form
03:33 Geth ¦ MoarVM:
03:33 Geth ¦ MoarVM: Check that string a is stable under concatenation with itself before
03:33 Geth ¦ MoarVM: returning. If it isn't, then run it through re_nfg, similarly to
03:33 Geth ¦ MoarVM: what we do in MVM_string_concatenate.
03:33 Geth ¦ MoarVM: review: https://github.com/MoarVM/MoarVM/commit/62f66cbfd8
03:40 leedo joined #moarvm
05:02 Zoffix joined #moarvm
05:02 JimmyZ joined #moarvm
05:02 leedo_ joined #moarvm
05:03 SmokeMachine joined #moarvm
05:07 eater joined #moarvm
05:37 brrt joined #moarvm
05:41 Geth ¦ MoarVM: c5b23f15f1 | MasterDuke17++ | src/spesh/optimize.c
05:41 Geth ¦ MoarVM: == was a no-op, correct it to an =
05:41 Geth ¦ MoarVM: review: https://github.com/MoarVM/MoarVM/commit/c5b23f15f1
05:41 Geth ¦ MoarVM: 13bc298d66 | niner++ (committed using GitHub Web editor) | src/spesh/optimize.c
05:41 Geth ¦ MoarVM: Merge pull request #656 from MasterDuke17/fix_an_==_to_an_=
05:41 Geth ¦ MoarVM:
05:41 Geth ¦ MoarVM: == was a no-op, correct it to an =
05:41 Geth ¦ MoarVM: review: https://github.com/MoarVM/MoarVM/commit/13bc298d66
06:15 lizmat_ joined #moarvm
06:40 brrt joined #moarvm
07:10 domidumont joined #moarvm
07:14 domidumont joined #moarvm
07:14 brrt samcv: i'm still thinking you could initialize a grapheme iterator at the start of knuth_morris_parth
07:14 brrt also
07:14 brrt *prath
07:15 brrt and then, when the algorithm gives you a skip, you can just access that directly
07:15 brrt and maybe, also do it only for very long Haystacks
07:15 brrt (or measure it or something)
07:23 domidumont joined #moarvm
07:41 brrt (graph.c is the refactor from hell :-()
08:12 brrt i broke something in inlines handling and i can't find what
08:27 zakharyas joined #moarvm
08:31 robertle joined #moarvm
08:32 lizmat joined #moarvm
08:51 SmokeMachine joined #moarvm
08:53 lizmat_ joined #moarvm
09:05 brrt joined #moarvm
09:16 stmuk_ joined #moarvm
09:56 Zoffix joined #moarvm
10:47 brrt hey jnthn
10:47 brrt it seems as spesh can drop or skip an inline
10:47 nine Any pointers on how I get an entry label for a manually created JIT graph containing just a call of a C function?
10:48 brrt if you've created the graph, you can make it compile with MVM_jit_compile_graph
10:49 brrt which will do all the necessary stuff
10:49 brrt but
10:49 brrt since we're allocating a new page and stuff,  it is kind of heavyweight
10:49 nine You mean the compile? That's done only once anyway
10:50 nine Right now my graph consists of a single MVM_JIT_NODE_CALL_C node. I strongly suspect, I need some kind of label node, too
10:50 nine Or whatever a label actually is
10:50 brrt not really, no
10:51 brrt well, actually
10:51 brrt hmm
10:52 brrt you should add a label (0)
10:52 brrt and then, compile will dwim
10:52 nine how do I do that?
10:53 brrt you'd do something like...
10:54 brrt .tell jnthn i was kind of not expecting this; i'm mssing inline 0, and inlines not being….. initialized, i'm running into trouble
10:54 yoleaux brrt: I'll pass your message to jnthn.
10:54 brrt .tell jnthn: https://gist.github.com/bdw/815007b3e9adb5a90e34e827f8a8da62
10:54 yoleaux brrt: What kind of a name is "jnthn:"?!
10:54 brrt .tell jnthn https://gist.github.com/bdw/815007b3e9adb5a90e34e827f8a8da62
10:54 yoleaux brrt: I'll pass your message to jnthn.
11:00 timotimo brrt: the error happens inside spesh_codegen?
11:00 brrt nah, it's during JITting
11:00 brrt the inlines array in more recent version of the vector library is zeroed
11:00 timotimo the inline isn't put into the tree built by "children", but that's been that way ever since we inlined
11:01 brrt but in this old version that i'm being rebased on master, it's not
11:01 brrt *that i'm rebasing
11:01 timotimo vector library?
11:01 brrt so that's my issue
11:01 brrt dynamic array
11:01 brrt src/core/vector.h in even-moar-jit
11:01 timotimo ah
11:04 nine Holy cow! It works!
11:05 nine I just added a label node with label.name = 0 and the se segfault is gone :)
11:06 brrt https://gist.github.com/bdw/b03c3de02750f9ffd088081aab95bba9#file-make-an-adhoc-jit-graph-c
11:07 brrt cool!
11:07 brrt yeah, the jit uses a dynamic label to restore after trampolining
11:07 brrt and that has to be label[0] to be correctly initialize
11:07 brrt d
11:08 brrt although that code i just showed would never work
11:09 brrt (and i think you're going to need labels_num to be set to a correct number as well?)
11:09 nine nativecallinvoke will now use the JITed code for calling void foo(void) functions completely without dyncall
11:12 brrt are you making a new frame for it?
11:12 brrt or will you just JIT it inline?
11:14 nine Right now MVM_nativecall_build JITs and stores the code in a new field in the MVMNativeCallBody. MVM_nativecall_invoke takes it from there. But it currently has to cheat by temporarily overwriting cur_frame->jit_entry_label.
11:15 nine Ideally I will be able to get rid of the nativecallinvoke op entirely and thus of the copying of arguments into an nqp::list
11:16 timotimo oooooh
11:17 nine I already build the whole sub that contains the nativecallinvoke op at runtime. So I will probably find a way :)
11:23 brrt awesome
11:23 brrt good thing trains are slow
11:28 nine Ok, hang in t/04-nativecall/20-concurrent.t is also fixed now
11:32 nine Actually I may want to get into the avoiding nativecallinvoke business right away as handling of any arguments will be entirely different there
11:36 domidumont joined #moarvm
11:42 Geth ¦ MoarVM/jit-legacy-cleanup: 06389bd07a | (Bart Wiegmans)++ | 3 files
11:42 Geth ¦ MoarVM/jit-legacy-cleanup: Introduce a small dynamic array library
11:42 Geth ¦ MoarVM/jit-legacy-cleanup:
11:42 Geth ¦ MoarVM/jit-legacy-cleanup: This generalizes a pattern of having growing collection in a
11:42 Geth ¦ MoarVM/jit-legacy-cleanup: malloc-backed array, and is heavily used in the expression JIT
11:42 Geth ¦ MoarVM/jit-legacy-cleanup: compiler.
11:42 Geth ¦ MoarVM/jit-legacy-cleanup: review: https://github.com/MoarVM/MoarVM/commit/06389bd07a
11:42 Geth ¦ MoarVM/jit-legacy-cleanup: ddac5fdb84 | (Bart Wiegmans)++ | 3 files
11:42 Geth ¦ MoarVM/jit-legacy-cleanup: Use dynamic arrays for JIT building graph
11:42 Geth ¦ MoarVM/jit-legacy-cleanup:
11:42 Geth ¦ MoarVM/jit-legacy-cleanup: This effectively makes the JIT graph 'mutable', thereby removing much
11:42 Geth ¦ MoarVM/jit-legacy-cleanup: of the need for a specialized 'builder' object. As a result, I've
11:42 Geth ¦ MoarVM/jit-legacy-cleanup: changed the interface of the graph builder 'methods' to take a graph
11:42 Geth ¦ MoarVM/jit-legacy-cleanup: directly.
11:42 Geth ¦ MoarVM/jit-legacy-cleanup: review: https://github.com/MoarVM/MoarVM/commit/ddac5fdb84
11:48 Geth ¦ MoarVM/jit_nativecall: 187ab6207e | (Stefan Seifert)++ | 4 files
11:48 Geth ¦ MoarVM/jit_nativecall: JIT native calling void func(void) functions.
11:48 Geth ¦ MoarVM/jit_nativecall:
11:48 Geth ¦ MoarVM/jit_nativecall: MVM_nativecall_build builds a JIT graph manually and compiles it. The
11:48 Geth ¦ MoarVM/jit_nativecall: result is attached to the MVMNativeCallBody. For now nativecallinvoke
11:48 Geth ¦ MoarVM/jit_nativecall: will enter that code using a hack to replace cur_frame->jit_entry_label.
11:48 Geth ¦ MoarVM/jit_nativecall: Ideally we will replace the whole frame containing the nativecallinvoke
11:48 Geth ¦ MoarVM/jit_nativecall: by the JITed code.
11:48 Geth ¦ MoarVM/jit_nativecall: review: https://github.com/MoarVM/MoarVM/commit/187ab6207e
11:51 nine I think I will add a new nativecallinvokejit op and have nativecallbuild return whether we JITed or not. Then I can tailor the native sub body.
11:52 cognominal joined #moarvm
11:53 nine Darn....as the train is so late anyway, they decided to have it just end in Innsbruck instead of going to Zurich
12:10 nine Ok, different train now. Seat reservation was for nought. No idea how to go on past Zurich...
12:12 SmokeMachine joined #moarvm
12:20 lizmat joined #moarvm
12:26 zakharyas joined #moarvm
12:52 brrt nine, fwiw, i think you can get away with stacka-allocating all of that
12:52 brrt because your leaking :-P
12:52 brrt also, sucks to hear about the train
12:57 nine Ah, that answers the question if I need any of this after the MVM_jit_compile_graph call :) Thanks!
13:03 lizmat joined #moarvm
13:09 nine "const_iX NYI" is a rather unexpected result of adding the nativecallinvokejit op
13:10 nine Could also be the result of giving nativecallbuild a return value
13:10 brrt that is unexpected, where does it die?
13:10 brrt oh, that's probably because your offset in the bytecode stream is wrong
13:11 nine Ah, yes, forgot to adjust the cur_op +=
13:12 nine All tests successful. That's rather scary :)
13:29 domidumont joined #moarvm
13:53 Geth ¦ MoarVM/jit_nativecall: d8e7727a80 | (Stefan Seifert)++ | src/core/nativecall.c
13:53 Geth ¦ MoarVM/jit_nativecall: Fix create_caller_code leaking memory
13:53 Geth ¦ MoarVM/jit_nativecall: review: https://github.com/MoarVM/MoarVM/commit/d8e7727a80
13:53 Geth ¦ MoarVM/jit_nativecall: de3be33365 | (Stefan Seifert)++ | 8 files
13:53 Geth ¦ MoarVM/jit_nativecall: New nativecallinvokejit OP
13:53 Geth ¦ MoarVM/jit_nativecall:
13:53 Geth ¦ MoarVM/jit_nativecall: This OP just invokes the JITed code which will handle argument fetching
13:53 Geth ¦ MoarVM/jit_nativecall: on its own so we can avoid the overhead of copying arguments into an
13:53 Geth ¦ MoarVM/jit_nativecall: nqp::list.
13:53 Geth ¦ MoarVM/jit_nativecall: review: https://github.com/MoarVM/MoarVM/commit/de3be33365
13:56 nine Coming closer to Switzerland now so I will probably lose network at some point
13:57 brrt interestingly, we can't handle vargs at all
14:55 * jnthn waves from Lausanne
14:55 yoleaux 04:52Z <MasterDuke> jnthn: in the atomicint example in the docs `my atomicint $total = 0; start { for ^20000 { $total?++ } } xx 4; say $total;`, shouldn't it be `await start`? with await i always get 80000 printed, without it's always some random number less than that
14:55 yoleaux 10:03Z <Zoffix> jnthn: I added the missing `awaits` in atomic docs
14:55 yoleaux 10:54Z <brrt> jnthn: i was kind of not expecting this; i'm mssing inline 0, and inlines not being….. initialized, i'm running into trouble
14:55 yoleaux 10:54Z <brrt> jnthn: https://gist.github.com/bdw/815007b3e9adb5a90e34e827f8a8da62
14:56 jnthn .tell brrt inlines can become dead code; there's a table of which ones did
14:56 yoleaux jnthn: I'll pass your message to brrt.
15:32 Geth ¦ MoarVM: pmurias++ created pull request #658: Avoid evaluating arguments to MVM_ASSERT_NOT_FROMSPACE
15:32 Geth ¦ MoarVM: review: https://github.com/MoarVM/MoarVM/pull/658
15:35 brrt joined #moarvm
15:36 brrt thanks jnthn, i figured the bug was in my own code :-)
15:36 yoleaux 14:56Z <jnthn> brrt: inlines can become dead code; there's a table of which ones did
16:01 brrt rebasing is some scary stuff…
16:04 Geth ¦ MoarVM/jit-legacy-cleanup: 362ba7956b | (Bart Wiegmans)++ | 3 files
16:04 Geth ¦ MoarVM/jit-legacy-cleanup: Cleanup jit graph after use
16:04 Geth ¦ MoarVM/jit-legacy-cleanup:
16:04 Geth ¦ MoarVM/jit-legacy-cleanup: Since we now allocate the inlines, deopts etc. using malloc,
16:04 Geth ¦ MoarVM/jit-legacy-cleanup: we have to free them after we're done.
16:04 Geth ¦ MoarVM/jit-legacy-cleanup: review: https://github.com/MoarVM/MoarVM/commit/362ba7956b
16:04 Geth ¦ MoarVM/jit-legacy-cleanup: fa7d818ca2 | (Bart Wiegmans)++ | 6 files
16:04 Geth ¦ MoarVM/jit-legacy-cleanup: Replace explicit JIT function return frame check
16:04 Geth ¦ MoarVM/jit-legacy-cleanup:
16:04 Geth ¦ MoarVM/jit-legacy-cleanup: This greatly simplifies the JIT compiler driver and jump-out
16:04 Geth ¦ MoarVM/jit-legacy-cleanup: logic. MVM_frame_try_return is now called within the JIT-compiled
16:04 Geth ¦ MoarVM/jit-legacy-cleanup: code.
16:04 Geth ¦ MoarVM/jit-legacy-cleanup: review: https://github.com/MoarVM/MoarVM/commit/fa7d818ca2
16:19 geekosaur joined #moarvm
16:27 Geth ¦ MoarVM: Skarsnik++ created pull request #659: Add a source_address parameter to the connect instruction.
16:27 Geth ¦ MoarVM: review: https://github.com/MoarVM/MoarVM/pull/659
16:31 dogbert11 joined #moarvm
16:31 robertle joined #moarvm
17:00 domidumont joined #moarvm
17:33 samcv good * everyone :)
17:33 Zoffix \0
17:55 Geth ¦ MoarVM: de7415bc65 | MasterDuke17++ | src/io/syncsocket.c
17:55 Geth ¦ MoarVM: Add error string to 'failed to resolve' exception
17:55 Geth ¦ MoarVM: review: https://github.com/MoarVM/MoarVM/commit/de7415bc65
17:55 Geth ¦ MoarVM: 01a35b2790 | MasterDuke17++ | src/io/syncsocket.c
17:55 Geth ¦ MoarVM: Shorten text of 'failed to resolve' exception
17:55 Geth ¦ MoarVM: review: https://github.com/MoarVM/MoarVM/commit/01a35b2790
17:55 Geth ¦ MoarVM: 78b3395534 | (Samantha McVey)++ (committed using GitHub Web editor) | src/io/syncsocket.c
17:55 Geth ¦ MoarVM: Merge pull request #652 from MasterDuke17/add_error_string_to_failed_to_resolve_exception
17:55 Geth ¦ MoarVM:
17:55 Geth ¦ MoarVM: Add error string to 'failed to resolve' exception
17:55 Geth ¦ MoarVM: review: https://github.com/MoarVM/MoarVM/commit/78b3395534
17:56 AlexDaniel joined #moarvm
17:59 brrt joined #moarvm
18:04 AlexDaniel joined #moarvm
18:34 leont joined #moarvm
20:36 geekosaur joined #moarvm
21:27 lizmat joined #moarvm
21:31 MasterDuke param_op_i causes INTERPOLATE to bail. it looks like none of the param_* ops are jitted, is that because cur_op increases by a variable amount?
21:31 dalek joined #moarvm
21:32 MasterDuke oops, param_op_* ops
21:38 MasterDuke timotimo: looks like you're around, have any idea about ^^^?
21:39 timotimo param_* ops involve a function that returns a struct
21:39 timotimo the exact way that happens isn't defined sanely in any ABI
21:40 timotimo so trying to naively jit it gets you crashes
21:40 MasterDuke ah, nine's recentish commits
21:40 timotimo yeah
21:41 timotimo time for some card games
21:41 MasterDuke fun, what games?
21:55 Geth ¦ MoarVM/master: 9 commits pushed by (Samantha McVey)++
21:55 Geth ¦ MoarVM/master: 6915d80ee1 | Implement the Knuth-Morris-Pratt string search algorithm
21:55 Geth ¦ MoarVM/master: 2b3b706d4c | Use alloca to allocate KMP jump table size dynamically
21:55 Geth ¦ MoarVM/master: 7a0ef4886a | Merge branch 'master' into knuth_morris_pratt
21:55 Geth ¦ MoarVM/master: fef04761db | Make sure KMP won't overrun the pattern offset
21:55 Geth ¦ MoarVM/master: 84a4a334e1 | Rename some variables in the KMP algorithm
21:55 Geth ¦ MoarVM/master: f988f4be89 | KMP: Reformat some code across multiple lines
21:55 Geth ¦ MoarVM/master: 230beea199 | KMP index: flatten the needle if the needle is a strand
21:55 Geth ¦ MoarVM/master: 371b579a11 | Set the needle limit to 4096 for KMP algorithm
21:55 Geth ¦ MoarVM/master: 151a256347 | Merge pull request #648 from samcv/knuth_morris_pratt
21:56 Geth ¦ MoarVM/master: review: https://github.com/MoarVM/MoarVM/compare/78b3395534...151a256347
22:15 dogbert11 joined #moarvm
23:06 timotimo the "against humanity" card games
23:09 MasterDuke ah, played a couple times
23:11 MasterDuke btw, any reason i couldn't do the same thing for param_op_i that nine did for param_rp_i? i.e., return the MVMArgInfo's .i64 instead of the MVMArgInfo itself?
23:16 lizmat joined #moarvm

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