Perl 6 - the future is here, just unevenly distributed

IRC log for #moarvm, 2017-09-29

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

All times shown according to UTC.

Time Nick Message
01:18 samcv MasterDuke, is it ready to go? Do you want to rebase it?
01:55 ilbot3 joined #moarvm
01:55 Topic for #moarvm is now https://github.com/moarvm/moarvm | IRC logs at  http://irclog.perlgeek.de/moarvm/today
01:58 samcv i'd push result onto mvmroot at 1716 and pop it before returning
01:58 MasterDuke the MVMROOTing seems a little suspect in general
01:58 samcv hmm?
02:00 MasterDuke why are separator and input rooted, but not result, with the only line inside the roots `result = (MVMString *)MVM_repr_alloc_init(tc, tc->instance->VMString);`?
02:01 samcv oh. because you are allocating a new string. and when that happens it can trigger gc
02:02 samcv which is why NFG_CHECK needs to be rooted. because it creates a new string and checks it against it
02:03 samcv and since result doesn't exist yet it doesn't need to be rooted there
02:04 MasterDuke so could i just do `MVMROOT(tc, result, { NFG_CHECK(tc, result, "MVM_string_join"); })`
02:04 MasterDuke right before the return?
02:05 samcv well i would just MVMROOT more than that. and make sure STRAND_CHECK is also rooted. since i will likely be optimizing it to not need renormalization. and if i do that we will need that section rooted
02:06 samcv since it will allocate new strings and renormalize only specific sections
02:06 samcv so 1715-right before return. and include STRAND_CHECk in the root too
02:07 samcv you don't have to indent everything you contain. just put the MVMROOT with the same indent as the code
02:08 MasterDuke k
02:14 MasterDuke committed, rebased, pushed
02:15 samcv awesome :)
02:16 samcv oh i don't see it rebased. i see the last commit though adding NFG_CHECK AND MVMROOT
02:19 MasterDuke 054ad4e1d6f6204fc6bbd1facf9387a51ad2e8b6 is the last one before my commits in my git log
02:20 samcv oh sorry i meant to squash it. you still run the rebase command to do it
02:20 samcv either that or you can make some of the commit descriptions less parse. like "Some cosmetic changes" is not at all a good commit title
02:21 samcv and most of them don't say the function you're doing the changes in
02:21 samcv if it were me i'd squash it to one commit or a few. or change the description of the commits
02:22 samcv so you can know which function the changes are in
02:31 MasterDuke redone
02:34 Geth ¦ MoarVM: c6dd41e137 | (Daniel Green)++ | src/strings/ops.c
02:34 Geth ¦ MoarVM: Just copy strands in MVM_string_join if able
02:34 Geth ¦ MoarVM:
02:34 Geth ¦ MoarVM: When everything to be joined are strands, just copy them directly
02:34 Geth ¦ MoarVM: instead of creating a single flat string. For small strings the
02:34 Geth ¦ MoarVM: overhead of being strands counteracts the saving in copying, so leave
02:34 Geth ¦ MoarVM: them them in the flat processing path, but for large strings it's much
02:34 Geth ¦ MoarVM: faster to copy the strands.
02:34 samcv merged :-)
02:34 Geth ¦ MoarVM: <…commit message has 13 more lines…>
02:34 Geth ¦ MoarVM: review: https://github.com/MoarVM/MoarVM/commit/c6dd41e137
02:34 Geth ¦ MoarVM: fee4ddfa5b | (Daniel Green)++ | src/strings/ops.c
02:34 Geth ¦ MoarVM: If only one item is to be joined, just return it
02:34 Geth ¦ MoarVM: review: https://github.com/MoarVM/MoarVM/commit/fee4ddfa5b
02:34 Geth ¦ MoarVM: 9053a1d715 | (Samantha McVey)++ (committed using GitHub Web editor) | src/strings/ops.c
02:34 Geth ¦ MoarVM: Merge pull request #705 from MasterDuke17/just_copy_strands_in_join_if_able
02:34 Geth ¦ MoarVM:
02:34 Geth ¦ MoarVM: Optimize MVM_string_join in both case of all strands and case of a single element to join
02:34 Geth ¦ MoarVM: review: https://github.com/MoarVM/MoarVM/commit/9053a1d715
02:35 MasterDuke cool, thanks
02:36 samcv thanks for the work :)
02:37 samcv join is one thing i haven't taken too much of a look at. eventually it might make sense to create a flat string depending on what % of each strand. since strands can refer to a string, and refer to the start and end positions. so they could be 1 grapheme or refer to the entire string. and smartly decide, if the strand makes up all or most of the whole string, then just join them. but if it's only a fractional part of it, maybe it's better to make a flat
02:37 samcv string so GC can happen if the other strings aren't used anymore
02:38 samcv something to think of at least
03:02 Ven`` joined #moarvm
03:15 zakharyas joined #moarvm
05:42 brrt joined #moarvm
05:42 brrt good * #moarvm
05:55 domidumont joined #moarvm
06:03 domidumont joined #moarvm
06:07 brrt joined #moarvm
06:10 domidumont joined #moarvm
06:43 brrt joined #moarvm
07:00 Ven joined #moarvm
07:41 Ven`` joined #moarvm
07:54 nativecallable6 joined #moarvm
07:54 quotable6 joined #moarvm
07:54 greppable6 joined #moarvm
07:54 releasable6 joined #moarvm
07:54 coverable6 joined #moarvm
07:54 unicodable6 joined #moarvm
07:54 evalable6 joined #moarvm
07:54 benchable6 joined #moarvm
07:54 bisectable6 joined #moarvm
07:54 committable6 joined #moarvm
07:54 squashable6 joined #moarvm
07:54 bloatable6 joined #moarvm
07:54 statisfiable6 joined #moarvm
08:20 robertle joined #moarvm
08:25 Ven joined #moarvm
08:45 brrt joined #moarvm
09:04 Ven joined #moarvm
09:44 Ven_ joined #moarvm
10:33 Ven joined #moarvm
11:06 lizmat joined #moarvm
11:52 evalable6 joined #moarvm
12:02 Geth ¦ MoarVM: 799bcb3b79 | (Timo Paulssen)++ | tools/graph_spesh.p6
12:02 Geth ¦ MoarVM: put state inside $() instead of {} to prevent undersharing
12:02 Geth ¦ MoarVM:
12:02 Geth ¦ MoarVM: the graph became quite funky when multiple annotations in the
12:02 Geth ¦ MoarVM: same BB turned into just one node and contorl flow threaded
12:02 Geth ¦ MoarVM: back and forth through it
12:02 Geth ¦ MoarVM: review: https://github.com/MoarVM/MoarVM/commit/799bcb3b79
12:07 Geth ¦ MoarVM: 9d6c97d306 | (Timo Paulssen)++ | src/spesh/dump.c
12:07 Geth ¦ MoarVM: missed a closing paren in spesh log
12:07 Geth ¦ MoarVM: review: https://github.com/MoarVM/MoarVM/commit/9d6c97d306
12:14 Geth ¦ MoarVM: d4aeb72351 | (Timo Paulssen)++ | tools/graph_spesh.p6
12:14 Geth ¦ MoarVM: need more explicit state for annotations, also include extra text
12:14 Geth ¦ MoarVM: review: https://github.com/MoarVM/MoarVM/commit/d4aeb72351
12:20 buggable joined #moarvm
12:27 buggable joined #moarvm
12:50 timotimo there are all manner of problems with the graph script %)
13:16 timotimo won't get around parsing FH starts and ends to make the call graph not look terrible
13:21 cognominal joined #moarvm
13:32 Ven joined #moarvm
13:54 Ven_ joined #moarvm
14:53 Ven joined #moarvm
15:08 brrt joined #moarvm
15:18 timotimo dot isn't so happy about the nesting of frame handlers
15:18 timotimo but the call graph now resembles what's really going on somewhat without killing your eyes
15:26 japhb But only somewhat?
15:27 timotimo yeah, it's still got issues
15:31 brrt left #moarvm
15:42 timotimo i uploaded it for your viewing pleasure
15:43 timotimo http://t.h8.lv/nqp_loop_graph.svg - the name is misleading, i just happened to have that still in my ctrl-r shell history %)
15:47 domidumont joined #moarvm
15:52 timotimo bleh. i can assign an id to nodes that will be translated into the svg output
15:52 timotimo but i can't use that as an anchor by putting #blah_id at the end of the file path and have the browser scroll to it
15:53 domidumont1 joined #moarvm
15:54 timotimo let's see if i can "just" put a javascript: url into the svg and have it work
15:59 timotimo <a xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="javscript:document.getElementById('bb_entry_32').scrollIntoView()" xlink:title="32">
15:59 timotimo is this obviously wrong?
16:01 * Zoffix would expect browsers to block that
16:01 timotimo why?
16:01 timotimo aren't javascript links bread and butter?
16:01 Zoffix Dunno, someone posts an SVG image with JS in it and all of a sudden site steals everyone's cookies
16:02 Zoffix Does it work?
16:02 timotimo it asks me if i want to run xdg-open to open a javascript: link
16:02 Zoffix heh
16:03 timotimo graphviz is super useful and powerful, but its limitations infuriate me sometimes
16:07 jnthn joined #moarvm
16:10 timotimo if i put the "generate an svg from this" part into the program, i can "just" post-process the file with a simple search-replace ...
16:14 camelia joined #moarvm
16:16 evalable6 joined #moarvm
16:17 releasable6 joined #moarvm
16:17 statisfiable6 joined #moarvm
16:18 MasterDuke .ask jnthn not to distract from concurrency stuff, but when you've got some time, any thoughts on https://github.com/MoarVM/MoarVM/pull/689?
16:18 yoleaux MasterDuke: I'll pass your message to jnthn.
16:19 MasterDuke any and all feel free to comment ^^^
16:25 camelia joined #moarvm
16:27 robertle joined #moarvm
16:38 timotimo why didn't anybody tell me that my mistake was to spell it "javscript" instead of "javascript"? :\
16:39 * Zoffix didn't see it :o
16:41 timotimo now it executes
16:41 timotimo "properly"
16:41 timotimo except it scrolls to god-knows-where
16:43 camelia joined #moarvm
16:46 timotimo oooh, it puts the id on the group
16:46 timotimo and the group probably doesn't have geometry or anything
16:48 timotimo even if i use the text or rectangle child i can't get it to properly scroll into view
16:48 timotimo why are you like this, javscript ;_;
16:59 camelia joined #moarvm
17:10 camelia joined #moarvm
17:34 avar joined #moarvm
18:45 buggable joined #moarvm
18:52 buggable joined #moarvm
18:52 buggable joined #moarvm
18:53 buggable joined #moarvm
19:06 synopsebot6 joined #moarvm
19:08 domidumont joined #moarvm
19:48 MasterDuke timotimo: any idea how to debug `Unhandled exception: Cannot find meth    at gen/moar/main.nqp:23  (/home/dan/Source/perl6/install/share/perl6/runtime/perl6.moarvm:<mainline>)`
19:49 MasterDuke gdb and valgrind aren't showing me anything useful (i can't get a backtrace from gdb)
19:58 AlexDaniel timotimo: holy shit. This is beautiful
20:00 AlexDaniel timotimo: maybe add a few words explaining what that is and why, and mention it in the weekly?
20:01 AlexDaniel and by “mention” I mean write something lizmat can use :)
20:01 AlexDaniel I didn't even look at what this graph is about and already I feel a bit happy somewhere inside
20:04 * MasterDuke makes a note not to sit too close to AlexDaniel if we ever end up in the same Edward Tufte class
20:07 samcv timotimo, are you gonna add a file to ./docs?
20:08 AlexDaniel oh, speaking of that, is there a list of perl 6 events somewhere? I'd love to meet people. Wondering if there's something that's not too far. This is too outdated: http://www.perlfoundation.org/perl6/index.cgi/index.cgi?upcoming_events
20:08 domidumont joined #moarvm
20:08 samcv wow that's pretty old!
20:36 timotimo why is this suddenly cool and fancy? i've made this tool like 3 years ago :)
20:38 timotimo maybe AD wasn't there yet
20:39 AlexDaniel I was there, just not here :)
20:44 timotimo heh, okay
20:44 samcv i don't know how to use it
20:44 timotimo yeah, it's not meant for users yet
20:45 timotimo what you have to do is copypaste a piece of speshlog into it and pipe the result into dot -Tsvg
20:48 timotimo i wanted a full-speshlog solution because it's super tedious to go through the file and cut out what you want
20:48 timotimo it didn't make it into the grant's scope, so i'll be working on something like that on the side, probably rather slowly in comparison
20:58 timotimo i've gotta check how fast i can plow through a big speshlog by only keeping around the locations of interesting bits
21:00 timotimo that reminds me i wanted to build dup2 support into moarvm
21:20 timotimo hum. with a decoder in play, can .tell be trusted at all, i wonder
21:44 geekosaur that question is why posix also has fgetpos/fsetpos and caveats on both interfaces
21:48 timotimo i haven't heard of that yet
22:06 jnthn timotimo: See the .tell method in IO::Handle, but tl;dr it depends on the encoding and also what the last grapheme you got back was
22:07 jnthn In general, it will always be accurate at positions where the normalization buffer is empty, which is after a normalization terminator, and those are controls
22:09 MasterDuke anybody have an idea why trying to use the FSA for string storage would give the problem shown in the following gist when running `perl6 -e ''`: https://gist.github.com/MasterDuke17/f29bc6caa2aae6417e0eda676e545a81
22:09 timotimo ah, if i get line after line it should be fine
22:10 jnthn timotimo: Yeah, if you're reading line by line (for some \n-ending definition of line), things will be good
22:10 jnthn Thankfully you won't have \r line-terminators to deal with :)
22:10 jnthn \r turns out to be the only control that's not a normalization terminator, 'cus it combines with a following \n
22:10 timotimo aye
22:10 timotimo since i write this stuff out from inside moarvm with simplest file i/o c functions it'll be fine
22:12 jnthn MasterDuke: Not really, unless somehow your change coulda broken hash value caching or calculation on the string
22:13 MasterDuke i wouldn't think so, but i'll look there. thanks
22:14 jnthn yeah, feels a long shot to me too
22:15 timotimo it's not somehow doing an MVM_fixed_size_free on a malloced blob
22:15 timotimo or something?
22:16 MasterDuke fwiw, gist updated with diff
22:16 jnthn If you ain't already, try with MVM_FSA_DEBUG=1 turned on, and also with that turend on + valgrind
22:16 timotimo does the ... yes
22:17 jnthn (Or ASAN)
22:21 samcv i like asan :)
22:22 timotimo so, um, was it the case that an inlined body doesn't keep its own header?
22:22 timotimo i.e. would a class with "has str $.a; has str $.b" have just one header that both would install flags into?
22:23 jnthn str is a reference type
22:23 jnthn So it can't be flattened in
22:24 jnthn It's P6str that can be
22:25 samcv interestingly if we use FSA we don't get asan errors if we don't end up freeing things
22:30 timotimo good to know
22:33 samcv so that could not be good hm
22:33 samcv maybe we need some ifdefable thing so that it will record and make sure it ends up getting freed
22:33 samcv or something...
22:34 timotimo you mean during full cleanup?
22:37 jnthn Just compile with MVM_FSA_DEBUG=1
22:37 jnthn It delegates everything to malloc but sticks a size at the start
22:38 MasterDuke as an env variable?
22:39 samcv ah
22:39 timotimo no, it's an ifdef
22:39 timotimo well, a #define
22:40 MasterDuke MVM_FSA_REDZONE_BYTES?
22:41 leont joined #moarvm
22:41 MasterDuke that's the only *_FSA_* thing that looks relevant
22:42 timotimo hm, no, not that
22:42 MasterDuke ah, FSA_SIZE_DEBUG?
22:42 timotimo yes
22:42 timotimo FSA_REDZONE_BYTES is about --valgrind support
22:43 MasterDuke thought so
22:45 MasterDuke ah, `MoarVM panic: Fixed size allocator: wrong size in free`
22:45 MasterDuke but where!
22:46 timotimo well, gdb break MVM_panic
22:46 MasterDuke i did, i just wanted the computer to do it for me
22:47 timotimo hehe.
23:13 jnthn Well, good luck. I'm off to rest. :) o/
23:18 MasterDuke thanka, making progress. found a couple places i forgot to multiply by sizeof(MVMGrapheme32)
23:18 samcv that will do it
23:19 timotimo with the redzones from --valgrind and valgrind that could have been found, too, perhaps
23:41 committable6 joined #moarvm

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