Perl 6 - the future is here, just unevenly distributed

IRC log for #moarvm, 2017-07-14

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

All times shown according to UTC.

Time Nick Message
00:17 timotimo no, that's some unrelated process overwriting a piece of an object's header
00:17 timotimo usually when you write past the end of one object you'll corrupt the header of the next object
01:34 samcv ah
01:35 samcv the weird thing is that in this case it's crashing when it returns early. meaning before it even starts writing any extra data to places
01:37 samcv so i don't know how my code could be messing something up since it returns early and it returns a string made by another function
01:46 MasterDuke valgrind say anything?
01:50 samcv hmm let me try
02:03 samcv it doesn't appear to have any issues when i run the pertinent code section by itself
02:03 samcv "\r" ~ "\n"
02:04 samcv oh forgot valgrind prints out a ton of stderr
02:16 MasterDuke .tell jnthn clang complains about src/6model/reprs/VMArray.c:307 `if (n < 0)`, that 'comparison of unsigned expression < 0 is always false'. n is an MVMuint64, can the check be tossed?
02:16 yoleaux MasterDuke: I'll pass your message to jnthn.
02:25 samcv MasterDuke, well all the valgrind stuff is in the gc code it seems
02:27 samcv MasterDuke, https://gist.github.com/samcv/5dc340abfb93b7c5c04b1a668de84396
02:28 samcv hmm tho i guess something else could trigger hm
02:28 samcv no clue what. it doesn't make that much sense to me
02:29 samcv i'm gonna turn on strand debug
02:29 samcv same error
02:34 samcv well before (26440 errors from 5 contexts) after (26425 errors from 5 contexts)
02:34 samcv before as in master and after is my branch
02:34 samcv and lost the same number of bytes
02:48 MasterDuke do you get the same valgrind output on master?
03:13 samcv hmm i do get something
03:13 samcv well i get no valgrind output if i run it on the problematic file
03:27 samcv ok yes i do see some new stuff
03:27 samcv https://gist.github.com/samcv/91c9959d0a6b200ab1ff7f84b74c541f seems to malloc and not free
03:28 samcv and conditional jump or move depends on uninitialized values
03:28 MasterDuke whoops
03:32 samcv ah i found one memory leak
03:34 MasterDuke "gotta catch'em all!"
03:34 samcv heh
03:35 samcv :)
03:37 MasterDuke i'm off to bed again, good luck
03:37 samcv no memory leaks with my code anymore but still those jump errors i have no clue what causes them
04:03 samcv yayyyyy
04:04 samcv it's now passing that one :)
04:19 samcv so the only file failing is t/spec/S17-supply/lines.t with 4 tests failing all of them are about handling chunked lines
04:20 samcv oddly all the rest of roast passes perfectly. i'm not sure what is different about the chunked lines that might make it fail magically but pass every other concat test i have
04:28 samcv m: "a\nb\r\nc\rd\n\neeee".lines.perl.say
04:28 camelia rakudo-moar 8d5f33: OUTPUT: «("a", "b", "c", "d", "", "eeee").Seq␤»
04:28 samcv huh. that... the test is wrong maybe
04:29 samcv either that or that result is wrong
04:29 samcv the test is looking for ['a','b',"c\rd","", 'eeee']
04:29 samcv only diference is the string is delivered through a supply which has .lines called on it but i see no reason the result shuold differ
04:30 samcv if it's through a supply or not
04:30 samcv m: "a\n" "b\r\n" "c\rd\n" "\n" "eeee" though i'd also think it should go like this so the test is right? hm
04:30 camelia rakudo-moar 8d5f33: OUTPUT: «===SORRY!=== Error while compiling <tmp>␤Two terms in a row␤at <tmp>:1␤------> "a\n"⏏ "b\r\n" "c\rd\n" "\n" "eeee" though i'd␤    expecting any of:␤        infix␤        infix stopper␤        statement end␤        statement…»
04:30 samcv but hm
04:31 samcv bisectable6, "a\nb\r\nc\rd\n\neeee".lines.perl.say
04:31 bisectable6 samcv, On both starting points (old=2015.12 new=8d5f332) the exit code is 0 and the output is identical as well
04:31 bisectable6 samcv, Output on both points: «("a", "b", "c", "d", "", "eeee").Seq»
04:31 samcv where does that \r go though
04:32 samcv m: "a\nb\r\nc\rd\n\neeee".split(["\r\n", "\n"]).perl.say
04:32 camelia rakudo-moar 8d5f33: OUTPUT: «("a", "b", "c\rd", "", "eeee").Seq␤»
04:42 samcv hmm weird though the result i get
04:50 vendethiel joined #moarvm
05:51 vendethiel- joined #moarvm
06:03 samcv ok with enough printf's i think i figured out what is occuring. it's not adjusting one of the graphemes right
06:03 samcv i mean. it says it is as it prints it out. but when i dump the final string it has an extra ord
06:10 brrt joined #moarvm
06:43 samcv ok so the issue was i needed to move the strands down one in certain cases. so now i have done that and that test passes. now to run full spectest again :)
06:51 brrt \o/
06:51 brrt good * samcv
07:01 samcv good * :)
07:02 samcv ok only failing 2 tests now
07:09 samcv anddd full spectest pass!
07:16 brrt joined #moarvm
07:30 brrt i can't seem to get the final bits of the 'optimistic store insertions' in place
07:30 brrt because of the wrapping stuff
07:34 samcv wrapping?
07:45 brrt glad you asked :-)
07:46 brrt okay, so you maybe know that the 'expression' compiler starts of by converting a basic block into a tree of expressions by means of templates
07:47 brrt most operations map in a straightforward way
07:47 brrt however, some operations are annotated in some way, causing them to have some special significance
07:48 brrt for instance, an operation may represent the start of end of a frame handler, or maybe the start and end of an inline, etc.
07:48 brrt some operations need to invoke a new (possibly interpreted) subroutine
07:49 brrt and some operations may cause an exception to be thrown
07:49 brrt makes sense?
07:50 brrt so when that happens, we may need to wrap labels around the compiled code
07:53 brrt or we may need to wrap special checks to interrupt execution when the code inbetween may have caused an exception to be thrown
07:55 domidumont joined #moarvm
07:56 robertle joined #moarvm
07:57 brrt now, the legacy JIT has to insert laods and stores for every operation because it can't look at two operations at the same time
07:57 brrt the new JIT can, and I want it to not insert stores if not needed
07:58 brrt (when is it 'not needed'? that depends, but mostly when we can prove the value isn't used after, which is easiest if it is overwritten in the same basic block, and there isn't something that would use it in the meantime)
07:59 brrt so, i now have a 'flush' primitive implemented, which is what i want to extend to do this 'lazy' store insertion
07:59 brrt the complexity is mostly arround how that interacts with another mechanism, which is 'rooting'
08:01 zakharyas joined #moarvm
08:01 brrt in which i maintain a series of 'roots' that maintain the order of evaluation / compilation for the tre
08:02 brrt so, basically, i maintain a set of currently used values
08:02 domidumont joined #moarvm
08:02 brrt when we need a value (that we'd load from memory), we first check if it has already been computed/loaded, and if it has, we reference that instead
08:02 brrt that gets rid of the duplicate loads
08:03 brrt what i want to do is that when a value is computed, we insert a reference to the result of that computation, but we don't issue the STORE just yet
08:03 brrt when we have to flush to memory, we iterate over this set and issue the stores
08:04 brrt adding a STORE means creating a new node that wraps the value (with the store), and replacing the root that refered to the old computation with the node that refers to the store
08:06 * samcv reads :))
08:07 samcv very interesting :) thank you
08:29 brrt :-)
08:30 brrt anyway, wrapping 'guards' also works by replacing the computed node with a GUARD node
08:30 brrt obviously, we can't STORE the GUARD node because it doesn't yield a value
08:55 lizmat joined #moarvm
08:58 brrt it would also be bad, for instance, if we replace the root that refered to the GUARD to one refering to a STORE
09:32 Geth_ ¦ MoarVM: b28eb23530 | (Samantha McVey)++ | src/strings/nfg.c
09:32 Geth_ ¦ MoarVM: Fix memory leak in MVM_nfg_is_concat_stable
09:32 Geth_ ¦ MoarVM:
09:32 Geth_ ¦ MoarVM: MVM_unicode_normalizer_cleanup was mistakenly not called before
09:32 Geth_ ¦ MoarVM: returning.
09:32 Geth_ ¦ MoarVM: review: https://github.com/MoarVM/MoarVM/commit/b28eb23530
09:32 Geth_ ¦ MoarVM: 03c8034b12 | (Samantha McVey)++ | 2 files
09:32 Geth_ ¦ MoarVM: Rename relative_ccc to MVM_unicode_relative_ccc
09:32 Geth_ ¦ MoarVM:
09:32 Geth_ ¦ MoarVM: Rename so we can use in MVM_nfg_is_concat_stable.
09:32 Geth_ ¦ MoarVM: review: https://github.com/MoarVM/MoarVM/commit/03c8034b12
09:32 Geth_ ¦ MoarVM: 68d9ec4415 | (Samantha McVey)++ | src/strings/nfg.c
09:32 Geth_ ¦ MoarVM: If both last_a and first_b during concat are non-0 CCC re_nfg
09:32 Geth_ ¦ MoarVM:
09:32 Geth_ ¦ MoarVM: Although I haven't been able to trigger a condition which would cause
09:32 Geth_ ¦ MoarVM: incorrect concatenation
09:32 Geth_ ¦ MoarVM: review: https://github.com/MoarVM/MoarVM/commit/68d9ec4415
09:57 zakharyas joined #moarvm
10:09 vendethiel joined #moarvm
10:55 lizmat joined #moarvm
11:19 brrt joined #moarvm
11:29 brrt joined #moarvm
11:55 lizmat joined #moarvm
12:54 nebuchadnezzar joined #moarvm
13:05 Geth_ ¦ MoarVM: 4b87b0288f | (Jonathan Worthington)++ | 10 files
13:05 Geth_ ¦ MoarVM: Add a decodertakecharseof op.
13:05 Geth_ ¦ MoarVM:
13:05 Geth_ ¦ MoarVM: A variant of decodertakechars that finishes decoding/normalizing any
13:05 Geth_ ¦ MoarVM: content in the buffer before taking the chars.
13:05 Geth_ ¦ MoarVM: review: https://github.com/MoarVM/MoarVM/commit/4b87b0288f
13:44 lizmat joined #moarvm
14:14 lizmat joined #moarvm
15:03 domidumont joined #moarvm
15:04 Geth_ ¦ MoarVM: e5f22faa51 | (Jonathan Worthington)++ | src/strings/decode_stream.c
15:04 Geth_ ¦ MoarVM: Copy correct length in get_all_in_buffer.
15:04 Geth_ ¦ MoarVM:
15:04 Geth_ ¦ MoarVM: We calculated the size to copy, but then ignored it, resulting in
15:04 Geth_ ¦ MoarVM: sometimes copying off the end of the buffer.
15:04 Geth_ ¦ MoarVM: review: https://github.com/MoarVM/MoarVM/commit/e5f22faa51
15:05 jnthn That gets rid of the various invalid read/write in https://github.com/MoarVM/MoarVM/issues/611
15:05 jnthn And replaces them with an invalid free :P
15:06 dogbert17 oh no :)
15:06 jnthn That may well have been there before anyway
15:07 lizmat .oO( go back to jail, you do not receive 200 US$ )
15:10 jnthn ah, d'oh
15:12 brrt joined #moarvm
15:17 jnthn Turns out we could make an MVMString whose buffer pointed to the middle of some malloc'd memory
15:18 lizmat yikes
15:18 jnthn Spectesting now
15:22 timotimo whoops, that'd do it :)
15:23 Geth_ ¦ MoarVM: 198c72ba1d | (Jonathan Worthington)++ | src/strings/decode_stream.c
15:23 Geth_ ¦ MoarVM: Don't make string pointing into middle of buffer.
15:23 Geth_ ¦ MoarVM:
15:23 Geth_ ¦ MoarVM: This was due to a thinko when introducing an optimization that allows
15:23 Geth_ ¦ MoarVM: an existing decode buffer to be used directly as the string body.
15:23 Geth_ ¦ MoarVM: review: https://github.com/MoarVM/MoarVM/commit/198c72ba1d
15:24 jnthn Think the other one goes back much further
15:34 Geth_ ¦ MoarVM: eea7fd9328 | (Jonathan Worthington)++ | src/core/interp.c
15:34 Geth_ ¦ MoarVM: Fix ctxcode op to not leak a NULL.
15:34 Geth_ ¦ MoarVM: review: https://github.com/MoarVM/MoarVM/commit/eea7fd9328
15:38 jnthn That's https://github.com/MoarVM/MoarVM/issues/562
15:49 brrt okay, trying the optimistic store thingy..
15:50 brrt fingers crossed
15:50 jnthn Feeling optimistic about it? :)
15:50 brrt well, i did all the hard-and-long thinking one might expect
15:56 Geth_ ¦ MoarVM/even-moar-jit: fb081bc00c | (Bart Wiegmans)++ | 2 files
15:56 Geth_ ¦ MoarVM/even-moar-jit: Emit stores optimistically
15:56 Geth_ ¦ MoarVM/even-moar-jit:
15:56 Geth_ ¦ MoarVM/even-moar-jit: Previously we would always emit a store whether necessary or not. Now
15:56 Geth_ ¦ MoarVM/even-moar-jit: we only issue a store when necessary for correctness. To do this the
15:56 Geth_ ¦ MoarVM/even-moar-jit: flush_variables mechanism has been extended to replace the roots (that
15:56 Geth_ ¦ MoarVM/even-moar-jit: compute the values) with STORE operations (that store them to memory).
15:56 Geth_ ¦ MoarVM/even-moar-jit: review: https://github.com/MoarVM/MoarVM/commit/fb081bc00c
15:56 brrt okay, that will be it
16:05 robertle joined #moarvm
16:12 Geth_ ¦ MoarVM: lucasbuchala++ created pull request #614: Decoder typos
16:12 Geth_ ¦ MoarVM: review: https://github.com/MoarVM/MoarVM/pull/614
16:13 lizmat joined #moarvm
16:24 Geth_ ¦ MoarVM: 1430b5ac69 | (Lucas Buchala)++ | src/6model/reprs/Decoder.c
16:24 Geth_ ¦ MoarVM: Decoder typos
16:24 Geth_ ¦ MoarVM: review: https://github.com/MoarVM/MoarVM/commit/1430b5ac69
16:24 Geth_ ¦ MoarVM: 146c8fcca1 | (Jonathan Worthington)++ (committed using GitHub Web editor) | src/6model/reprs/Decoder.c
16:24 Geth_ ¦ MoarVM: Merge pull request #614 from lucasbuchala/typos1
16:24 Geth_ ¦ MoarVM:
16:24 Geth_ ¦ MoarVM: Decoder typos
16:24 Geth_ ¦ MoarVM: review: https://github.com/MoarVM/MoarVM/commit/146c8fcca1
16:51 eater joined #moarvm
17:19 sivoais joined #moarvm
17:42 brrt joined #moarvm
17:59 AlexDaniel joined #moarvm
18:02 stmuk joined #moarvm
19:21 Ven joined #moarvm
19:33 stmuk_ joined #moarvm
19:43 lizmat joined #moarvm
20:20 samcv good hi
20:20 timotimo eeeeey
20:22 Ven joined #moarvm
20:25 domidumont joined #moarvm
20:40 Ven_ joined #moarvm
22:02 Ven joined #moarvm
22:10 Geth_ ¦ MoarVM: 28b1419e51 | (Jonathan Worthington)++ | docs/ChangeLog
22:10 Geth_ ¦ MoarVM: Update ChangeLog for 2017.07.
22:10 Geth_ ¦ MoarVM: review: https://github.com/MoarVM/MoarVM/commit/28b1419e51
22:10 jnthn Will cut the release tomorrow; bit tired for that now. Reviewing changelog is welcome in the meantime :)
22:10 yoleaux 20:36Z <Zoffix> jnthn: FWIW, I bumped MoarVM then fresh clone and built everything and still getting 37% slower than usual roast runs.
22:10 yoleaux 20:39Z <Zoffix> jnthn: roast runs == stresstest (not spectest; not sure if that's similarly slower)
22:10 yoleaux 20:53Z <Zoffix> jnthn: false alarm. Turns out it was the nfc tests
22:14 jnthn .oO( not fast checking )
22:14 Voldenet joined #moarvm
22:14 Voldenet joined #moarvm
22:40 Geth_ ¦ MoarVM: a5cf3d7759 | (Timo Paulssen)++ | tools/trace_spesh_optimizer.gdb
22:40 Geth_ ¦ MoarVM: document the trace_spesh_optimize script a little bit
22:40 Geth_ ¦ MoarVM: review: https://github.com/MoarVM/MoarVM/commit/a5cf3d7759
22:41 timotimo ^- this is a good thing to have in the release together with the introduction of this script
22:44 * timotimo finds many typos in the changelog
22:47 Geth_ ¦ MoarVM: f95c785365 | (Timo Paulssen)++ | docs/ChangeLog
22:47 Geth_ ¦ MoarVM: minor changelog fixes and tweaks
22:47 Geth_ ¦ MoarVM: review: https://github.com/MoarVM/MoarVM/commit/f95c785365
22:52 samcv timotimo, you can add full unicode 9.0 and emoji v4.0 text segmentation support
22:52 samcv :)
22:52 samcv or should i add it
22:58 timotimo i say you should do it
22:58 timotimo celebratorily
23:01 samcv ok :)
23:04 * timotimo gets ready for the unicode-related high-fives
23:12 timotimo will you continue using the unicode "project" on github? last update end of march
23:15 Geth_ ¦ MoarVM: bccdb42344 | (Samantha McVey)++ | docs/ChangeLog
23:15 Geth_ ¦ MoarVM: ChangeLog reorganization and Unicode announcements
23:15 Geth_ ¦ MoarVM: review: https://github.com/MoarVM/MoarVM/commit/bccdb42344
23:15 samcv timotimo, uh UCD?
23:15 timotimo no i mean the "project" thingie
23:16 samcv hm
23:16 timotimo with the columns you can put stuff into
23:16 samcv oh
23:16 samcv yeah i need to check up on that
23:16 samcv i may have done some of the things there
23:16 timotimo probably
23:16 timotimo i'm considering (i think i already mentioned this in the past) making a project for my ideas, too
23:17 samcv yeah you should
23:19 samcv was able to remove two things

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