Perl 6 - the future is here, just unevenly distributed

IRC log for #moarvm, 2017-07-18

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

All times shown according to UTC.

Time Nick Message
00:18 samcv nice timotimo thanks for the tips :)
00:18 samcv so i'm getting a 2.4x speed boost with this:
00:18 samcv my $boy = "\c[BOY]"; for ^100000 { $ = "aa$boy" ~ "\c[ZWJ]" }
00:19 samcv that's not even that long a string even
00:20 timotimo nice.
00:20 samcv yeah 2.4 ran again got 2.5x
00:20 samcv looks like 4x faster concatting "$boy" and "\c[ZWJ]"
00:20 samcv i have to put in a variable or it won't concat each time
00:26 timotimo right, it probably does that at compile time or something
00:26 timotimo well, optimize time raelly
00:30 samcv yep
00:31 samcv timotimo, i want to pop before return and before throwing?
00:33 timotimo yes
00:33 timotimo having the temporary root on the stack while the stack frame it belongs to is gone is a very bad idea
00:34 samcv yep
00:50 samcv timotimo, whelp. now i get segfault when compiling rakudo
00:51 samcv and failing nqp tests
00:51 samcv well segfault on the tests
00:54 samcv i think i figured out what i did wrong though
00:55 timotimo sounds good, then
00:56 timotimo i'll hopefully get to bed soon
01:03 lizmat joined #moarvm
01:03 samcv ok i was running strandcheck before i poped it
01:03 samcv and it was very not happy
01:33 lizmat joined #moarvm
02:09 jnthn_ joined #moarvm
02:14 timotimo joined #moarvm
02:53 evanm joined #moarvm
02:58 ingy joined #moarvm
03:22 evanm joined #moarvm
03:33 lizmat joined #moarvm
04:46 samcv ok my concatenation patch is ready for people to look at it
04:50 Geth_ ¦ MoarVM: samcv++ created pull request #615: Don't re_nfg string a + string b when concatenating in many cases, instead add only the section needing renormalization in as another strand
04:50 Geth_ ¦ MoarVM: review: https://github.com/MoarVM/MoarVM/pull/615
06:09 brrt joined #moarvm
06:22 domidumont joined #moarvm
06:29 domidumont joined #moarvm
06:38 brrt good *
06:40 brrt i'll take a look as well if you don't mind samcv
06:54 Geth_ ¦ MoarVM/even-moar-jit: c98e59b119 | (Bart Wiegmans)++ | 3 files
06:54 Geth_ ¦ MoarVM/even-moar-jit: Move macros from parser to the expr compiler
06:54 Geth_ ¦ MoarVM/even-moar-jit:
06:54 Geth_ ¦ MoarVM/even-moar-jit: The syntax is entirely application-dependent so it doesn't really
06:54 Geth_ ¦ MoarVM/even-moar-jit: belong in the parser. In preparation for enabling an 'include:'
06:54 Geth_ ¦ MoarVM/even-moar-jit: statement, which should enable reuse of macros.
06:54 Geth_ ¦ MoarVM/even-moar-jit: review: https://github.com/MoarVM/MoarVM/commit/c98e59b119
07:01 domidumont joined #moarvm
07:13 brrt joined #moarvm
07:30 samcv thanks brrt :)
07:36 brrt hmm. i can't say i dare make an assesement
07:50 zakharyas joined #moarvm
07:50 committable6 joined #moarvm
07:51 unicodable6 joined #moarvm
07:51 bisectable6 joined #moarvm
07:51 coverable6 joined #moarvm
07:51 quotable6 joined #moarvm
07:51 evalable6 joined #moarvm
07:51 greppable6 joined #moarvm
07:51 bloatable6 joined #moarvm
07:51 benchable6 joined #moarvm
07:51 statisfiable6 joined #moarvm
07:54 lizmat joined #moarvm
08:23 samcv :P
08:23 samcv jnthn_ can maybe do it
08:40 lizmat joined #moarvm
08:46 jnthn_ morning o/
08:48 nwc10 good *, *
08:55 * jnthn tries to figure out what he can maybe do :)
08:55 jnthn Ah, the concat PR
08:55 jnthn :)
09:00 samcv it's ready for review. haven't yet squashed it but
09:08 jnthn Yeah, reviewing it now :)
09:10 lizmat joined #moarvm
09:20 jnthn Review done :)
09:25 samcv cool
09:25 samcv is MVMROOT ok if i pass it NULL ?
09:25 samcv because it's going to be NULL in most cases
09:25 samcv tht's why i didn't use MVMROOT
09:26 jnthn Yeah
09:26 jnthn The MVMROOT macro actually shoves an & in front of its second argument for you
09:26 jnthn So it's really pushing the address of the variable which just happens to be NULL
09:28 jnthn (It needs the address so that if there is an object there and GC moves it, then it can update the pointer.)
09:36 Geth_ ¦ MoarVM/spesh-worker: 9897b37826 | (Jonathan Worthington)++ | 2 files
09:36 Geth_ ¦ MoarVM/spesh-worker: Remove spesh candidate logging leftovers.
09:36 Geth_ ¦ MoarVM/spesh-worker: review: https://github.com/MoarVM/MoarVM/commit/9897b37826
09:45 samcv jnthn, well it seems to work
09:45 jnthn The NULL thing? Yeah, we rely on it in various places :)
09:46 samcv :) ok
09:49 domidumont joined #moarvm
10:04 Geth_ ¦ MoarVM/spesh-worker: a85ea214a2 | (Jonathan Worthington)++ | src/gc/worklist.h
10:04 Geth_ ¦ MoarVM/spesh-worker: Add thread ID range check to GC debug mode.
10:04 Geth_ ¦ MoarVM/spesh-worker:
10:04 Geth_ ¦ MoarVM/spesh-worker: Catches adding to worklist with obviously out of range owner, rather
10:04 Geth_ ¦ MoarVM/spesh-worker: than discovering this later on in the work pass code when we've no
10:04 Geth_ ¦ MoarVM/spesh-worker: idea where the bad memory address came from.
10:04 Geth_ ¦ MoarVM/spesh-worker: review: https://github.com/MoarVM/MoarVM/commit/a85ea214a2
10:13 Geth_ ¦ MoarVM/spesh-worker: 4632487481 | (Jonathan Worthington)++ | src/spesh/stats.c
10:13 Geth_ ¦ MoarVM/spesh-worker: Don't dupe-mark the by offset section of stats.
10:13 Geth_ ¦ MoarVM/spesh-worker: review: https://github.com/MoarVM/MoarVM/commit/4632487481
10:17 samcv jnthn, making a strand_move function and running spectest again
10:20 jnthn samcv++ # nice :)
10:22 samcv all good so far
10:25 samcv valgrind is ok at least
10:25 Geth_ ¦ MoarVM/spesh-worker: 024d04a1aa | (Jonathan Worthington)++ | 2 files
10:25 Geth_ ¦ MoarVM/spesh-worker: Add GC/spesh debug flag to stats/planning stage.
10:25 Geth_ ¦ MoarVM/spesh-worker: review: https://github.com/MoarVM/MoarVM/commit/024d04a1aa
10:26 samcv jnthn, ok any other changes needed now? pushed the update
10:28 jnthn Yeah
10:28 jnthn renormalized_section = MVM_unicode_codepoints_c_array_to_nfg_string(tc, last_a_first_b, 2);
10:29 jnthn My comment on that line (that it allocates an MVMString and so may invalidate a and b, which are not rooted at that point) still stands
10:29 zakharyas joined #moarvm
10:44 samcv so should i move MVMROOT earlier for a and b?
10:44 samcv yeah i saw that
10:44 jnthn Well, except then you've got the return problem
10:45 jnthn I'd just root them around that one line
10:45 samcv ah ok
10:45 jnthn Yes, we have to do it again later, but it's not all that costly
10:45 jnthn Especially given that if we're on that path we're already doing the more costly ne-normalizing
10:46 timotimo if we know we've just popped a temporary root and are about to add another, we could totally do an unchecked assignment into the stack since we know it's already big enough
10:46 timotimo and save like a hundred cpu cycles every billion trillion cpu cycles
10:50 samcv jnthn, do you think it's a good idea to return a new string for string a and string b both being one codepoint
10:50 samcv i guess i can time it easily
10:51 jnthn I'd meassure, and see what it adds to the implementation complexity
10:54 Geth_ ¦ MoarVM/spesh-worker: cd292bcf05 | (Jonathan Worthington)++ | src/spesh/plan.c
10:54 Geth_ ¦ MoarVM/spesh-worker: The spesh plan must get its own type tuple copy.
10:54 Geth_ ¦ MoarVM/spesh-worker:
10:54 Geth_ ¦ MoarVM/spesh-worker: Otherwise we run into memory management problems.
10:54 Geth_ ¦ MoarVM/spesh-worker: review: https://github.com/MoarVM/MoarVM/commit/cd292bcf05
10:54 Geth_ ¦ MoarVM/spesh-worker: d2c1726e68 | (Jonathan Worthington)++ | 3 files
10:54 Geth_ ¦ MoarVM/spesh-worker: Create/dump/destory spesh graph per planned spesh
10:54 Geth_ ¦ MoarVM/spesh-worker: review: https://github.com/MoarVM/MoarVM/commit/d2c1726e68
11:02 Geth_ ¦ MoarVM/spesh-worker: 797bdc8f4f | (Jonathan Worthington)++ | src/spesh/candidate.c
11:02 Geth_ ¦ MoarVM/spesh-worker: Optimize graph per plan and dump it out.
11:02 Geth_ ¦ MoarVM/spesh-worker: review: https://github.com/MoarVM/MoarVM/commit/797bdc8f4f
11:02 samcv ok so i get 1.13s instead of 0.87s so slower
11:03 samcv though idk how it translates since we have to squash things less? idk
11:05 * jnthn goes for lunch
11:39 brrt argh, ffs mscv
11:39 brrt MSVC doesn't take kindly to inline struct declarations it seems
11:50 * jnthn back
11:50 jnthn The joy of MSVC...
11:50 brrt okay, so, hmmm
11:51 brrt MSVC does accept them in another script...
11:51 brrt egh, script, source file
11:51 jnthn ;)
11:52 brrt that's odd though
11:57 brrt in an isolated source file, i don't get the same weird error at all
11:58 brrt (MSVC seems to struggle with MVM_VECTOR_DECL(struct { int foo; int bar; }, quam);
12:12 jnthn Hm, darn, just realized that we hold references into the spesh candidates array so I can't grow it as needed without changing that...
12:14 evanm joined #moarvm
12:14 nwc10 jnthn: I tried building your branch:
12:14 nwc10 src/spesh/candidate.c: In function ‘MVM_spesh_candidate_add’:
12:14 nwc10 src/spesh/candidate.c:88:18: error: ‘guard_dump’ undeclared (first use in this function) MVM_free(guard_dump);
12:15 jnthn nwc10: Yeah, not sure how I managed to commit that
12:15 nwc10 in the rush for lunch?
12:15 jnthn Probably :)
12:16 samcv sleep &
12:16 jnthn Rest well, samcv
12:23 brrt sleep well yes
12:23 brrt (jnthn, the old array+offset trick then?)
12:28 jnthn brrt: Yeah, but later :)
12:35 Geth_ ¦ MoarVM/spesh-worker: a4234e8641 | (Jonathan Worthington)++ | src/spesh/candidate.c
12:35 Geth_ ¦ MoarVM/spesh-worker: Code-gen and install planned specializations.
12:35 Geth_ ¦ MoarVM/spesh-worker:
12:35 Geth_ ¦ MoarVM/spesh-worker: With this, spesh now starts to work again, with other threads able to
12:35 Geth_ ¦ MoarVM/spesh-worker: run the specializations generated by the worker thread. It still only
12:35 Geth_ ¦ MoarVM/spesh-worker: does a single collection/planning run, however, and all of the logged
12:35 Geth_ ¦ MoarVM/spesh-worker: data is not yet being incorporated into the facts yet. OSR will also
12:35 Geth_ ¦ MoarVM/spesh-worker: need to be put back in place.
12:35 Geth_ ¦ MoarVM/spesh-worker: review: https://github.com/MoarVM/MoarVM/commit/a4234e8641
12:35 Geth_ ¦ MoarVM/spesh-worker: 3ababe8ffb | (Jonathan Worthington)++ | src/core/frame.c
12:35 Geth_ ¦ MoarVM/spesh-worker: Remove no longer applicable comment.
12:35 Geth_ ¦ MoarVM/spesh-worker: review: https://github.com/MoarVM/MoarVM/commit/3ababe8ffb
12:36 jnthn Yes, that means that spesh/JIT are now - at least to a limited degree - done on the worker
12:39 timotimo fantastic
12:40 brrt \o/
12:40 * brrt sips orange juice to celebrate
12:40 lizmat joined #moarvm
12:41 nwc10 so soon MoarVM will be able to utilise both cores of the smartwatch, even for single threaded user code :-)
12:41 jnthn :-)
12:41 nwc10 eat that Perl 3
12:42 jnthn Perl 4 could use both cores of the smartwatch for single threaded user code already? :)
12:42 timotimo now we can even allow ourselves to spend way more time doing spesh compared to before
12:51 Geth_ ¦ MoarVM/spesh-worker: f99d66ff9b | (Jonathan Worthington)++ | 3 files
12:51 Geth_ ¦ MoarVM/spesh-worker: Remove synchronous candidate production from OSR.
12:51 Geth_ ¦ MoarVM/spesh-worker:
12:51 Geth_ ¦ MoarVM/spesh-worker: This re-works the OSR code in preparation for it obtaining specialized
12:51 Geth_ ¦ MoarVM/spesh-worker: code produced by the worker thread. The installation code remains as
12:51 Geth_ ¦ MoarVM/spesh-worker: it was, though it's easier now as we don't have to do a logging and
12:51 Geth_ ¦ MoarVM/spesh-worker: then a final installation. The polling for a result will come later;
12:51 Geth_ ¦ MoarVM/spesh-worker: this just removes OSR's calls to the previous specialization handling.
12:51 Geth_ ¦ MoarVM/spesh-worker: review: https://github.com/MoarVM/MoarVM/commit/f99d66ff9b
12:51 nwc10 jnthn: (at the previous commit in MoarVM) was it supposed to SEGV whilst compiling the setting?
12:52 jnthn No, though I only tried the NQP test suite so far
12:52 nwc10 ah OK
12:52 nwc10 also, I'm failing to figure out a witty response to the Perl 4 question.
12:52 jnthn "It was a marketting release, so it only had to sound good?" :P
12:53 jnthn (If I'm remembering my history correctly, anyways... :))
12:53 nwc10 that was the only topic that seemed to have any traction
12:53 nwc10 (because it was/you are - the version number was bumped for the book)
12:55 Geth_ ¦ MoarVM/spesh-worker: 8087af0534 | (Jonathan Worthington)++ | 2 files
12:55 Geth_ ¦ MoarVM/spesh-worker: Remove synchronous spesh setup/finalize code.
12:55 Geth_ ¦ MoarVM/spesh-worker: review: https://github.com/MoarVM/MoarVM/commit/8087af0534
13:01 Geth_ ¦ MoarVM/spesh-worker: 10db2b0c4b | (Jonathan Worthington)++ | 5 files
13:01 Geth_ ¦ MoarVM/spesh-worker: Candidates no longer hold a spesh graph.
13:01 Geth_ ¦ MoarVM/spesh-worker:
13:01 Geth_ ¦ MoarVM/spesh-worker: This was only needed thanks to the graph surviving for some time
13:01 Geth_ ¦ MoarVM/spesh-worker: while we did spesh logging. Now logging is done differently, this is
13:01 Geth_ ¦ MoarVM/spesh-worker: no longer needed.
13:01 Geth_ ¦ MoarVM/spesh-worker: review: https://github.com/MoarVM/MoarVM/commit/10db2b0c4b
13:01 jnthn Always nice when a new design removes checks from a hot path
13:02 * jnthn tries a Rakudo build with HEAD to see what happens
13:02 jnthn SEGV
13:02 nwc10 mine was this http://paste.scsys.co.uk/564630
13:03 nwc10 but that's from MoarVM about 3 commits back
13:03 nwc10 with
13:03 nwc10 +#define MVM_ARRAY_CONC_DEBUG 1
13:03 nwc10 +#define FSA_SIZE_DEBUG 1
13:03 nwc10 because I like pain
13:04 jnthn Ah
13:04 jnthn I think it's 'cus we now won't always have a type tuple
13:04 jnthn But the args code still assumes we will
13:11 robertle joined #moarvm
13:16 Geth_ ¦ MoarVM/spesh-worker: 017751504a | (Jonathan Worthington)++ | src/spesh/args.c
13:16 Geth_ ¦ MoarVM/spesh-worker: Make args spesh cope with no type information.
13:16 Geth_ ¦ MoarVM/spesh-worker:
13:16 Geth_ ¦ MoarVM/spesh-worker: This happens when we are producing certain specializations (which do
13:16 Geth_ ¦ MoarVM/spesh-worker: not use logged types) - something that could not happen before the
13:16 Geth_ ¦ MoarVM/spesh-worker: recent spesh changes.
13:16 Geth_ ¦ MoarVM/spesh-worker: review: https://github.com/MoarVM/MoarVM/commit/017751504a
13:16 Geth_ ¦ MoarVM/spesh-worker: e8fe33e486 | (Jonathan Worthington)++ | src/spesh/args.c
13:16 Geth_ ¦ MoarVM/spesh-worker: Remove lonely comment; tweak another.
13:16 Geth_ ¦ MoarVM/spesh-worker: review: https://github.com/MoarVM/MoarVM/commit/e8fe33e486
13:25 Geth_ ¦ MoarVM/spesh-worker: 2ce14767d5 | (Jonathan Worthington)++ | src/spesh/arg_guard.c
13:25 Geth_ ¦ MoarVM/spesh-worker: Support arg guards for certain specialization.
13:25 Geth_ ¦ MoarVM/spesh-worker:
13:25 Geth_ ¦ MoarVM/spesh-worker: By allowing a type not to be provided. This will need some further
13:25 Geth_ ¦ MoarVM/spesh-worker: work, since we want to treat this as a fallback, meaning we need to
13:25 Geth_ ¦ MoarVM/spesh-worker: further tweak the tree. For now, it unbusts things.
13:25 Geth_ ¦ MoarVM/spesh-worker: review: https://github.com/MoarVM/MoarVM/commit/2ce14767d5
13:25 jnthn That gets Rakudo building again for me.
13:26 jnthn Though seems some spectests aren't happy
13:28 jnthn oh, it's about the thing that's next in my todo list anyway :)
13:28 nwc10 "drink tea" ?
13:29 jnthn No, more like "don't produce specializations we already did produce
13:31 brrt (on my to do list; make even-moar-jit compile under msvc; support include: statement for expr tree compiler, validate types for expr tree templates, validate types for tiles)
13:31 jnthn Ah, though turns out that right now I'm meant to go take some documents to $lawyer so she can watch me sign them, which apparently imbues my signature with magical properties. :)
13:31 jnthn ++brrt :)
13:32 brrt good luck with the magic
13:32 jnthn bbiab
13:32 nwc10 good luck with forging your own signature
13:33 nwc10 (I'm not very good at doing mine reliably)
14:02 dogbert17 Tried the spesh-worker branch. Building MoarVM went well as did building Rakudo. The install step, i.e. 'make install' failed with the message 'MoarVM panic: Spesh arg guard: trying to add duplicate result for same guard'
14:13 zakharyas joined #moarvm
14:48 brrt joined #moarvm
14:50 * jnthn back
14:51 jnthn dogbert17: Yup, that's 'cus the planner doesn't check if it's already done the work yet :)
14:52 dogbert17 cool, so it's not quite in a testable condition currently then?
14:54 jnthn No, not really
14:57 jnthn Though it turns out you can only really trip over the missing piece when the program runs multiple threads.
14:57 jnthn Which is why so much works despite something so important being missing. :)
15:05 brrt joined #moarvm
15:14 brrt in msvc's defense, it did find actual bugs
15:14 brrt or at least, things that obviously weren't correct
15:19 brrt in nmake-s undefence, it doesn't understand inference rules
15:19 brrt which explains why these weren't used
15:20 brrt joined #moarvm
15:23 brrt srsly though...
15:24 mst nmake is fucking terrible
15:24 mst lots of people seem to've decided they prefer dmake on win32
15:24 mst I don't do enough win32 to have an informed opinion
15:32 brrt nmake is a disaster
15:34 jnthn It is, alas, what's in the Win32 SDK
15:34 brrt … hmmm
15:44 zakharyas joined #moarvm
15:52 brrt so, that takes some dumbing down of the makefile
15:52 brrt but i can eventually get it to build
15:53 Geth_ ¦ MoarVM/spesh-worker: 8e6f7b81d1 | (Jonathan Worthington)++ | src/spesh/arg_guard.c
15:53 Geth_ ¦ MoarVM/spesh-worker: Add missing `static` markers.
15:53 Geth_ ¦ MoarVM/spesh-worker: review: https://github.com/MoarVM/MoarVM/commit/8e6f7b81d1
15:54 jnthn bah, it forgot about one commit :P
15:54 jnthn https://github.com/MoarVM/MoarVM/commit/51008a10be5d13c684a14fe6c5c3264da60e8cc8 fwiw
16:34 Geth_ ¦ MoarVM/spesh-worker: 8cc5c26ee7 | (Jonathan Worthington)++ | 6 files
16:34 Geth_ ¦ MoarVM/spesh-worker: Enable collection of spesh log data over time.
16:34 Geth_ ¦ MoarVM/spesh-worker:
16:34 Geth_ ¦ MoarVM/spesh-worker: This establishes a kind of quota mechanism so that we can fill up to
16:34 Geth_ ¦ MoarVM/spesh-worker: 3 (by default) buffers of log data per thread. The thread sending will
16:34 Geth_ ¦ MoarVM/spesh-worker: decrement the quota when it sends a buffer. Once the spesh worker
16:34 Geth_ ¦ MoarVM/spesh-worker: has processed a buffer, it increments the quota again. This limits the
16:34 Geth_ ¦ MoarVM/spesh-worker: amount of logged data around at the same time, but allows us to keep
16:34 Geth_ ¦ MoarVM/spesh-worker: accumulating data and doing more specialization over time.
16:34 Geth_ ¦ MoarVM/spesh-worker: review: https://github.com/MoarVM/MoarVM/commit/8cc5c26ee7
16:35 jnthn This also utterly busts things because it makes almost certain we run into the guard tree bug, but I ain't got the energy to hunt that one down today. So, tomorrow.
17:01 domidumont joined #moarvm
17:16 zakharyas joined #moarvm
17:24 statisfiable6 joined #moarvm
18:20 domidumont joined #moarvm
18:40 deep-book-gk_ joined #moarvm
18:42 deep-book-gk_ left #moarvm
19:07 domidumont joined #moarvm
19:10 lizmat joined #moarvm
19:13 zakharyas joined #moarvm
19:39 hoelzro joined #moarvm
19:40 lizmat joined #moarvm
20:40 lizmat joined #moarvm
21:10 lizmat joined #moarvm
21:59 lizmat joined #moarvm
22:33 samcv good *
22:33 yoleaux 18:44Z <AlexDaniel> samcv: Any chance you have a quick answer for https://github.com/perl6/whateverable/issues/167 ? Unicodable adds ◌ for combiners, but how can I easily know if ◌ should be prepended? Like, is there some property or something? Or is there any other check I can perform? Like “(“◌” ~ $x).chars == 1” or something?
22:40 unicodable6 joined #moarvm
23:29 lizmat joined #moarvm
23:54 MasterDuke joined #moarvm

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