github.com/moarvm/moarvm | IRC logs at colabti.org/irclogger/irclogger_logs/moarvm
Set by AlexDaniel on 12 June 2018.
00:59 sena_kun left 05:23 robertle left 07:40 tbrowder left 07:43 tbrowder joined 08:29 zakharyas joined 08:54 brrt joined
brrt \o 08:55
09:01 robertle joined
timotimo o/ 09:01
nwc10 \o 09:40
my exuse is - was mowing the lawn
brrt :-D 09:43
09:50 brrt left 09:52 robertle left 10:40 robertle joined 11:05 sena_kun joined 11:10 zakharyas left 11:37 ggoebel joined 12:11 brrt joined 12:19 squashable6 left 12:23 squashable6 joined 13:03 brrt left 13:05 zakharyas joined 13:09 ggoebel left 13:14 pamplemousse joined
pamplemousse \o 13:17
13:30 brrt joined
brrt \o 13:30
14:03 brrt left
timotimo \o 14:08
14:39 pamplemousse left, squashable6 left 14:42 squashable6 joined 14:43 brrt joined, ggoebel joined 15:06 pamplemousse joined 15:17 robertle left 15:22 pamplemousse left 15:59 zakharyas left 16:01 pamplemousse joined
pamplemousse Hey! I'm currently trying to figure out where the code that writes the bytecode is, where the bytecode actually winds up, and where the code that loads the bytecode into memory is. I'm feeling a bit lost (I'm coming mostly from a purely compiled language background) and need a few pointers. 16:49
ugexe github.com/MoarVM/MoarVM/blob/a5dd...compunit.c might be what you are looking for 17:02
MasterDuke didn't nine++ recently re-write it in nqp? 17:05
ugexe ah yeah, that is probably what they want. not the cu bytecode loading stuff 17:06
pamplemousse Is compunit.c no longer used then? 17:09
17:09 brrt left
ugexe its still used 17:12
ggoebel is most of that found here? github.com/rakudo/rakudo/tree/mast...e/CompUnit
timotimo huh, discord bot got lost? 17:13
media.discordapp.net/attachments/5...height=733
ggoebel check out Loader.pm6 in that
timotimo cdn.discordapp.com/attachments/557...nknown.png 17:14
pamplemousse: i can walk you through it if you'd like 17:16
pamplemousse timotimo: That would be really helpful 17:17
timotimo the bytecode-making stage takes as input some QAST, which you can look at if you pass --target=ast or --target=optimize to perl6 or nqp; the latter will probably generate simpler qast trees for visual inspection 17:18
there's also a bunch of objects that just hang out in rakudo's memory at the point compilation starts. they get made available via QAST::WVal and the serialization stuff in src/6model/serialization.c and all of the 6model/reprs/*.c files puts them into the resulting file at the end 17:19
sorry, was afk for a minute there 17:24
there's the QASTOperationsMAST in nqp's repo which implements a few nqp::blah ops that are "complicated" and turn into a bunch of simple ones, but the vast majority just map 1:1 to moarvm opcodes, the ones you'd find in src/core/oplist
then there's an auto-generated file in moarvm that has a sub for every op that has the right set of "nqp::writeint" and friends to actually put bytes into the code sections of the frames 17:25
that's moarvm's lib/MAST/Ops.nqp 17:26
samcv i've decided to just merge the malloc_trim() patch
timotimo there's also lib/MAST/Nodes.nqp which does a bunch of compilation stuff as well
yo samcv did you see the images i posted! 17:27
samcv should make some people happy
nope
the cdn.discord links?
timotimo yup 17:32
i used discord because i could just ctrl-v an image i took with Shutter into it
samcv ah
timotimo but then the discord bridge bot was missing and didn't post it automatically :D
pamplemousse timotimo: I think I'm following, sorry for the delay, looking at the files you mentioned. Do you know where the generated bytecode winds up? 17:33
timotimo directly inside the moarvm files, unless it's just running the code right away, in which case they're all just in memory 17:34
MasterDuke wasn't brrt also going to merge pamplemousse's PR? i didn't see that actually happen yet
timotimo if you want to see how stuff looks with regards to instructions, i always tend to just set MVM_SPESH_LOG to a filename, the "Before:" sections have the source bytecode transformed into SSA form
ugexe #warning "test warn" ? 17:38
that doesn't seem right
samcv oh. yeah 17:39
that sounds like that thing i did :)
pamplemousse I guess what I'm trying to get at is that if I had a file that just contained "say 'Hello World!';" and I wanted to get the bytecode generated for that, where would I be able to find it on disk? 17:40
MasterDuke ugexe: while you're here. does circle-ci offer BSDs? 17:41
pamplemousse And then if I wanted to run that bytecode, what would I need to hand it to in order for it to run?
ugexe MasterDuke: I'm not sure any public cis offer BSDs, although I'm not entirely sure why that is
there was one odd-ball one that offered it, but it doesn't seem to be very popular 17:42
MasterDuke pamplemousse: i think it would have to be in a module. i don't believe there's any way to get the bytecode for a script at run-time, and only modules are pre-compiled
huh, too bad
timotimo pamplemousse: regular perl6 code will not be compiled into a file that can run on its own; automatically precompiled modules land in .precomp, though
ugexe i *think* it can technically be run on bsd... if you can get it to build (the issues with circle ci were makefile related i think) 17:43
MasterDuke but if you did put that code in a module, ugexe is just the person to tell you where to find the pre-compiled bytecode
timotimo moar --dump doesn't work on them immediately because they have a tiny header in front of them that the Precompilation Repo understands
MasterDuke ugexe: sorry, what can be run on bsd?
ugexe you can force the bytecode somewhere specific... although the option is escaping me...
MasterDuke: circle-ci worker
MasterDuke ah 17:44
ugexe like how one can run their own jenkins (which DOES work on BSD... but jenkins)
timotimo you can perl6 --target=mbc --output=blah.moarvm -e 'say "hello world"'
ugexe yea thats it^
MasterDuke timotimo: but didn't jnthn just say recently that that just dumps the startup code, not the user-supplied code? 17:45
timotimo gist.github.com/timo/6d0f3787da94a...58b1aec1ee
not sure 17:46
ugexe i dont like jenkins anymore since i found crypto miners on p6.nu
timotimo ugh :(
17:46 robertle joined
MasterDuke Kaiepi, tyil, et al.: ^^^ some info about a possible way to get BSDs added to our ci pipeline. (i don't use BSDs, but was just curious since we've have a bunch of build problems on them recently) 17:47
ugexe if the old p6c server ever gets fixed it might make a good CI server for us 17:48
pamplemousse I'll keep looking through the files timotimo, ggoebel, and ugexe mentioned, and mess around with that option. Thank you all so much, I'm feeling a bit less lost :) 17:50
timotimo fantastic 17:51
17:51 Geth left, Geth joined
rba ugexe: what is the requirement for a CI server? CPU? Ram? HD space? 17:51
17:51 discord6 joined, discord6 left, discord6 joined
timotimo good CPU and lots of ram would be great, so that many parallel jobs can run, and individual limited-to-one-core things can finish quickly, too 17:52
17:55 discord6 left 17:58 Geth_ joined, synopsebot_ joined 18:01 brrt joined
MasterDuke hm, i thought jnthn updated the moarvm repo hooks for Geth? 18:04
timotimo i believe he did 18:05
MasterDuke samcv's merge hasn't been reported yet 18:08
brrt 'twas merged though
timotimo we have both geth and geth_ at the moment 18:09
MasterDuke brrt: gonna merge pamplemousse++'s PR? 18:10
brrt Was merged, as well :-) 18:12
This morning or yesterday or.... I'm losing track of days
MasterDuke ah, nice 18:13
brrt: should github.com/MoarVM/MoarVM/issues/1068 be closed? 18:14
timotimo so, where do i put the thing that does cdn.discordapp.com/attachments/557...nknown.png ? 18:16
18:20 discord6 joined
brrt MasterDuke: if you can confirm that it is now unbroken, please feel free to close it :-) 18:21
MasterDuke brrt: `Aborted (core dumped)`. `Unhandled exception: Cannot find method 'name' on object of type Perl6::Metamodel::ClassHOW` when run in gdb 18:23
timotimo did i put any information on the issue about that?
MasterDuke oh, got the abort in gdb...
timotimo the main thread isn't joining all threads ,only the foreground threads, when it's time to destroy the instance
so that other thread continues running merrily until suddenly the main thread frees the memory right from under its feet 18:24
MasterDuke brrt: github.com/MoarVM/MoarVM/pull/1103 says it's still open?
18:25 discord6 left
timotimo commits/master also doesn't show the change 18:26
MasterDuke btw, i plan on merging github.com/perl6/nqp/pull/518 and github.com/rakudo/rakudo/pull/2670 after the next rakudo release unless i hear any objections 18:32
18:46 pamplemousse left
brrt Oh, I think 18:51
I understand
I clicked 'rebase and merge'
and my network broke at that moment 18:52
and then I forgot...
Geth_ MoarVM: 6bc095d899 | (Madeleine Goebel)++ (committed by Bart Wiegmans) | src/io/eventloop.c
Move freeing of event_loop_wakeup to after uv_loop_close
MoarVM: 2ccc20fb59 | (Madeleine Goebel)++ (committed by Bart Wiegmans) | src/io/eventloop.c
Fix placement of null assignment
brrt pamplemousse++ - first commit merged
19:20 MasterDuke left 19:21 synopsebot left 19:25 Geth left
brrt exit 19:32
19:32 brrt left 19:40 synopsebot_ left 19:43 synopsebot joined 19:51 synopsebot__ joined, Geth joined, discord6 joined 19:52 discord6 left, discord6 joined, discord6 left, discord6 joined 20:00 discord6 left 20:05 discord6 joined 20:10 discord6 left 20:17 pamplemousse joined 20:19 synopsebot left, Geth_ left 20:25 discord6 joined, discord6 left, discord6 joined 20:26 MasterDuke joined, MasterDuke left, MasterDuke joined 20:27 synopsebot joined, Geth__ joined 20:29 discord6 left 20:31 discord6 joined 20:33 discord6 left
MasterDuke hm, just rebuilt moarvm after brrt merged pamplemousse's PR and i'm getting the exact same abort stacktrace 20:33
20:37 nwc10 left
pamplemousse The issue isn't totally fixed. There's still a problem where one thread is in pthread_cond_wait on the mutex while the other is trying to uv_mutex_destroy it but the details of and decisions on how to fix that problem are beyond me. timotimo and jnthn talked about it for a bit on the 21st. 20:40
The PR fixes one smaller thing that was causing an invalid memory read because it the event_loop_wakeup was being referenced after it was freed, so the PR just moves that free-ing of event_loop_wakeup to be a little later 20:42
timotimo aye, getting that one fixed is a major task indeed
the "mutex is still in use" one
MasterDuke timotimo: see what i just added to the issue? 20:44
timotimo: btw, is that script you showed available somewhere?
20:45 nwc10 joined
timotimo it will be 20:49
i was being an immature boy and got a bit discouraged when i saw no reaction to it at all :(
20:50 discord6 joined, discord6 left, discord6 joined
MasterDuke i was afk when you posted, but i certainly want it 20:51
timotimo :)
20:51 discord6 left
timotimo is there any way to write javascript regexes in multiple lines, apart from turning it into a string, concatenating it, then using "new RegExp"? 20:52
jnthn Hm, can't template strings span multiple lines? 20:53
timotimo ah, they probably can
what does the "new RegExp" do with it?
when it sees newlines in the regex? :D
i'll try
jnthn heh
I mean, I assume you've got the "ignore whitespace" mode on, and I'd hope you don't just look for horizontal whitespace... 20:54
timotimo OK, it's equivalent to putting a newline in there
i didn't see an "ignore whitespace" mode :(
jnthn Oh noes. I think you're right. :(
timotimo graaaaahhhhh 20:55
this is absolutely terrible
of course there's also no built-in "split by matching any of these N regexes"
and doing it multiple times will certainly ruin my day 20:56
/\b((?:\S+\s\((?:tc|instance|argc|exitCode).*?\)\sat\s)?((?:gen\/moar|src\/Perl6\/|SETTING\:\:src\/core\/|src\/(?:6model|core|debug|gc|gen|instrument|io|jit|mast|math|platform|profiler|spesh|strings|moar\.|main\.))\S+?)\:(\d+))/
*barf*
putting a newline inside a regular regex, i.e. one with a / on either side, will give a syntax error because it's "missing" the / 20:58
MasterDuke rakudo.js to the rescue?
timotimo surely not :)
however
20:58 discord6 joined
timotimo perlito6 does exist 20:58
20:59 discord6 left
timotimo welp, that seems to hang... 20:59
21:00 discord6 joined
timotimo say m/foo/; ā†’ Died: missing value after operator '/' 21:00
21:10 discord6 left 21:15 patrickb joined 21:17 synopsebot left 21:22 synopsebot joined 21:29 synopsebot left 21:32 Geth__ left, pamplemousse left
timotimo codepen.io/anon/pen/gJeNpy 21:34
21:44 synopsebot__ left 21:47 synopsebot joined 21:53 Geth_ joined
MasterDuke timotimo: how do i use that? 21:57
21:57 Geth_ left 22:02 synopsebot__ joined 22:03 Geth__ joined
timotimo oh, that's just a "how i chose to get around how shitty js regexen are" 22:05
the userscript i wrote is in a middle-state between working and not 22:06
but when it's ready again, you'd use it with, for example, TamperMonkey
22:09 patrickb left
MasterDuke k 22:12
timotimo cdn.discordapp.com/attachments/557...nknown.png - MasterDuke check it out! also, I would like a bit of explicit praise if that's ok 22:58
MasterDuke oh cool. 23:01
jnthn timotimo: You built a thing that links the file/line in a github issue to the source file? 23:02
timotimo that's right
i almost went so far as to guess the right filename from the symbol name in the case of valgrind output 23:03
however ... nah.
jnthn :D
How do I get it? Is it a browser extension, or?
.oO( Is explicit praise like explicit lyrics? Like, "that looks fucking bloody useful"? :) )
23:05
timotimo i would like that! :) 23:07
gist.github.com/timo/7cfe71a667bbd...0431da45a4 here is the code 23:08
MasterDuke parental advisory, this code is so good it's banned in 5 countries... 23:09
timotimo in TamperMonkey in the settings there's a "Utilities" tab that has a "URL [input box] [Import]"
just put gist.githubusercontent.com/timo/7c...Linkify.js in there and accept the installation
actually it will potentially go into moarvm's tools/ folder 23:11
MasterDuke ooh, that does work nicely 23:12
timotimo it doesn't yet do ASAN's output
oh there's loads of console spam still in the script 23:13
23:13 Geth__ left, synopsebot__ left
timotimo fixed that bit 23:15
i see gdb backtraces are also a thing that looks a little different 23:16
i thought i had support for them though?
oh, only inside <pre></pre> tags
jnthn yay, installed it :)
timotimo++
timotimo yay 23:17
i'll see to it that it also does gists if possible 23:18
23:19 Geth___ joined, synopsebot___ joined 23:22 Geth left
timotimo that was quick 23:23
gist updated
MasterDuke you should ask lizmat to mention it in the weekly 23:25
23:27 Geth joined
timotimo aye 23:32
it ought to have a little readme 23:35
right in the gist, or maybe at the top of the code?
MasterDuke code i'd say 23:38
timotimo now what will it take to build something that knows every module in the ecosystem by its filenames :) :) 23:39
oh, it'll also want to match on github.com/*/*/pull/* 23:41
23:47 synopsebot___ left 23:49 synopsebot_ joined 23:57 Geth___ left, synopsebot_ left