Perl 6 - the future is here, just unevenly distributed

IRC log for #moarvm, 2015-07-07

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

All times shown according to UTC.

Time Nick Message
00:39 timotimo i can't find any mention of the MVMProfileCallNode being involved in GC; does that mean i should put the name of the library in there as a char pointer rather than an MVMString, as that could potentially moves
00:39 timotimo ?
00:39 timotimo i'll do it like that for a start
01:14 timotimo i don't get it ... my prof_enternative is being called with a null pointer as first arg :o
01:14 timotimo ooooooh
01:14 timotimo wow
01:14 timotimo a single operand lives at GET_REG(cur_op, 0).o, not with a 2 in it
01:30 vendethiel joined #moarvm
01:47 timotimo i don't get this ... the dump code for native call targets gets run and it has a proper name in the debug output, but it doesn't show up in the profile at all :(
01:49 dalek MoarVM/profile_native_calls: 499d4c2 | timotimo++ | / (12 files):
01:49 dalek MoarVM/profile_native_calls: add special support for nativecallinvoke to profiler
01:49 dalek MoarVM/profile_native_calls: review: https://github.com/MoarVM/MoarVM/commit/499d4c2eff
01:50 timotimo ^- maybe someone sees what's wrong with it?
02:00 timotimo i also see nothing in particular in nqp's src/vm/moar/HLL/Backend.nqp that'd be problematic :|
02:01 * timotimo goes to bed
06:27 FROGGS joined #moarvm
06:32 FROGGS brrt: can you gist how it would look like? a short example?
06:46 brrt joined #moarvm
06:49 dalek MoarVM: cd4564e | Sue++ | src/core/validation.c:
06:49 dalek MoarVM: Modify int format specifications to get rid of warnings in clang.
06:49 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/cd4564e050
06:49 dalek MoarVM: 5ada013 | (Sue Spence)++ | src/ (4 files):
06:49 dalek MoarVM: Casts which get rid of warnings in clang.
06:49 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/5ada013330
06:49 dalek MoarVM: f090305 | FROGGS++ | src/ (2 files):
06:49 dalek MoarVM: silence MVMint64 printf format warnings
06:49 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/f090305760
07:31 brrt FROGGS: sure, https://gist.github.com/bdw/736b57fe772fc0269dbe
07:41 FROGGS uhh
07:41 FROGGS I've problems reading it :o)
07:41 FROGGS (which might not mean much)
07:53 brrt know lisp/
07:53 brrt ?
08:31 FROGGS no :/
08:36 brrt well that explains :-)
08:37 FROGGS :o)
08:37 brrt long story short; lisp is written as s-expressions, which are just trees in a in-order notation format; i need trees, hence i reused s-expressions
08:38 brrt a lisp sexp is something like (function-name arg1 arg2)
08:38 brrt i.e. function preceedes arguments in a space-delimited list
08:38 FROGGS okay, so far so sane
08:39 FROGGS so, (foo (bar 1 2)) means that foo gets the result of bar(1, 2) ?
08:40 JimmyZ brrt: how about something like defops and defmacro
08:40 brrt aye
08:40 brrt nah, simpler than that
08:40 brrt i'm much to lazy to type def this and def that
08:40 JimmyZ like cloujure
08:40 brrt more to the point
08:40 JimmyZ *clojure
08:41 brrt i already have a syntax; i've decided that the best way is to define the expression in the same sexp as the  macro name
08:42 brrt so i now have MACRO! (^foo (,bar ,baz) (quix (quam ,bar) ,baz))
08:42 brrt of course, that means i have to fix up the exprlist parsing a bit
08:43 JimmyZ how about :macro ?
08:46 brrt hmm, that's also possible, but confusing because i use the : to separate opcode names from their sexps
08:46 JimmyZ oh
08:47 JimmyZ then ^ sounds good enough
08:47 brrt anyway, thanks for the thoughts :-)
08:56 brrt bbl
09:15 rurban joined #moarvm
09:37 brrt joined #moarvm
10:07 brrt hmm
10:08 brrt if i make the whole thing a s-exp parsing becomes much simpler
10:15 brrt NO ignore that thought
10:15 * lizmat can do that :-)
10:16 brrt :-)
10:16 brrt i'm being a bit spammy, am i not?
10:27 JimmyZ then you can have defops, defmacro, defconst :P
10:37 brrt yes... but i'm not trying to make a whole lisp
10:38 brrt if i did that, why not use lisp
11:05 brrt hmm
11:05 brrt maybe i should relax the double let restriction
11:05 brrt doesn't work well with macros
11:57 dalek MoarVM/even-moar-jit: e6a8266 | brrt++ | / (3 files):
11:57 dalek MoarVM/even-moar-jit: Add macro facility to tree-compiler
11:57 dalek MoarVM/even-moar-jit:
11:57 dalek MoarVM/even-moar-jit: The expression tree compiler can now deal with (simple) macro's.
11:57 dalek MoarVM/even-moar-jit: This makes implementing a lot of ops a lot more tractable.
11:57 dalek MoarVM/even-moar-jit: review: https://github.com/MoarVM/MoarVM/commit/e6a82663d6
12:11 brrt i'm kind-of dreading writing the code generator
12:59 zakharyas joined #moarvm
13:19 timotimo :S
13:21 brrt why that face? :-)
13:21 brrt it's a hard problem, and i'm not 100% sure how to attack it yet
13:21 brrt it's a problem of known unknowns
13:21 timotimo mhm
13:23 brrt you can advice me, if you want
13:24 brrt basically, i want to implement a 'simplest possible' code generator
13:24 brrt i... think i need two things for that
13:25 brrt three things, maybe
13:25 brrt 1): current register states
13:25 brrt 2): current value states.... or not.... hmmm
13:26 brrt 3): the tree structure in terms of register states...
13:26 brrt hmmm
13:26 brrt ok, let's rubber-duck this a bit
13:26 brrt suppose i have a node, (load a b)
13:26 brrt a refers to another node
13:27 brrt b refers to the size
13:27 brrt supposing i know the register that holds the value of a, this can be compiled into the instruction
13:27 brrt mov sizeparm(b) Rq(result), [Rq(a)]
13:28 brrt where sizeparm(b) is either qword dword word or byte
13:28 brrt lets suppose it's just qword :-)
13:28 timotimo mhm
13:29 timotimo and Rq is what exactly?
13:31 timotimo so ... in my profiler stuff i just double-checked that the name of the given ProfilerCallNode actually gets encoded to a MVMString correctly, so searching through the json blob should turn it up
13:32 timotimo my first thought was that something somewhere must be messing up the tree structure, but the bits that build the successors and such are all shared between regular nodes and ones refering to native calls
13:32 brrt dynasm name for Register holding a Quadword (64 bit value)
13:32 brrt hmmm
13:33 timotimo ah, ok
13:34 timotimo and the nqp code that's there to dump profiler data doesn't care about the inner structure of the tree, it just dumps it all to json :|
13:36 brrt that's alright, isn't it? keep knowledge to a minimum
13:36 zakharyas joined #moarvm
13:36 timotimo aha!
13:37 timotimo when i set the line number to -2, it shows that the entries do make it into the output
13:37 timotimo but the names don't survive for some reason
13:38 timotimo so ... wat?
13:45 brrt i have no idea, sorry :-(
13:46 timotimo if my hair wasn't so gorgeous, i'd be starting to pull at it >_<
13:49 timotimo i can only imagine the string somehow ends up getting allocated in the nursery rather than the gen2, but the profiler dump function explicitly sets the "allocate in gen2" bit, the utf8_decode function uses REPR(..)->allocate properly and the string is supposed to be rooted indirectly by the hash we're constructing ...
13:49 timotimo and on top of that, things would probably asplode if the string would just move underneith my feet
13:51 timotimo oh!
13:51 * brrt nods
13:51 brrt your clearly doing it wrong :-P
13:51 timotimo i was using BOOTStr instead of VMString for utf8_decode
13:51 timotimo well, that's awkward :)
13:51 brrt oh, you have an eureka
13:51 brrt that would break things, yes
13:52 brrt but i'm afk
13:52 timotimo SDL_SetRenderDrawColor
13:52 timotimo native library:<unknown> 68544
13:52 timotimo 1.48% (123.88ms)
13:52 timotimo 1.48% (123.88ms)
13:52 timotimo <3
13:55 dalek MoarVM/profile_native_calls: b0e6608 | timotimo++ | src/profiler/profile.c:
13:55 dalek MoarVM/profile_native_calls: fix output of profiler wrt. native function names
13:55 dalek MoarVM/profile_native_calls: review: https://github.com/MoarVM/MoarVM/commit/b0e6608362
13:56 timotimo that's pretty cool
13:57 tadzik I wonder if the qt profiler will need fixing
13:57 tadzik prolly not, from the looks of it
13:59 timotimo i'm hoping to give native subs a different color for their bars
13:59 timotimo so that they stand out a little; currently they are red like non-speshed calls
14:00 timotimo and i'd like to have a little bar for how much time was spent in native code on the overview page
14:04 tadzik is it included in the profiling josn?
14:04 tadzik json
14:05 timotimo i set the line number to -2 for those; i haven't looked if we calculate the total time when we load the .html or put that directly into the json
14:06 timotimo ah, we have total time and spesh time
14:06 timotimo total time is just the time from "start profiling" to "finish profiling"
14:06 timotimo that makes sense
14:08 timotimo *sigh*
14:09 timotimo find_method takes about 500 ms out of my 9600ms, but it still frustrates me to look at its spesh code
14:10 timotimo it gets a "known to be str" argument, boxes it, then unboxes it back to a native string on two different BBs in a row, basically
14:12 timotimo it's just these little things that sometimes really bother me %)
14:13 timotimo BBIAB
14:50 vendethiel joined #moarvm
15:26 timotimo not so much activity today, eh?
15:35 nebuchadnezzar timotimo: to hot in Dijon to have activity ;-)
15:35 timotimo yeah, that heat wave ... :(
15:36 timotimo it's currently about 31 degC in my room and tthat's already more than enough for me, thank you very much
15:36 timotimo i'm going to visit a friend who has wifi to the basement ;)
15:36 timotimo bbiab
15:46 FROGGS joined #moarvm
16:17 nebuchadnezzar timotimo: 34°C
16:26 timotimo argh
16:27 timotimo that's how warm it is outside 'round here
18:19 lizmat joined #moarvm
20:00 rurban joined #moarvm
20:06 timotimo i wonder if i should merge profile_native_calls
22:40 ggoebel joined #moarvm
22:43 lizmat joined #moarvm
23:15 TEttinger joined #moarvm

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