Perl 6 - the future is here, just unevenly distributed

IRC log for #moarvm, 2017-03-03

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

All times shown according to UTC.

Time Nick Message
00:05 KDr2_m joined #moarvm
00:08 MasterDuke timotimo: i have a hypothesis, that figuring out how to debug spesh+EVAL bugs cures the common cold
00:09 timotimo wow, i should try that!
00:09 timotimo sorry for being so unavailabel the recent days
00:11 MasterDuke i know, what am i paying you for !?!?!
00:11 timotimo yes, what indeed.
00:12 MasterDuke s/for//
00:13 MasterDuke but aside from the joking, and if you're up for it, any ideas?
00:14 KDr2_c joined #moarvm
00:15 timotimo right, please bring me up to speed again, because my head is currently not able to concentrate
00:17 timotimo we were evaling what now?
00:18 MasterDuke well, to start at the beginning, i made this change: https://gist.github.com/MasterDuke17/5d63c32bae0c719df31370b78bc65c66
00:18 timotimo ah, we were making div faster?
00:18 MasterDuke yep
00:18 MasterDuke (which it was, slightly)
00:18 MasterDuke but some tests broke
00:19 timotimo ok, and those had eval in them?
00:19 MasterDuke when running a `make spectest` or `make <the test file>`
00:19 MasterDuke yep
00:19 MasterDuke and i got really confused, because the tests worked on the command line
00:19 MasterDuke when i ran what was being EVALed
00:20 MasterDuke the particular tests were for ceil, floor, trunc, etc. (which all use div under the hood)
00:21 timotimo is it using eval_lives_ok?
00:21 MasterDuke IOninja++ figured out it was a spesh/JIT thing. disabling either made the bug go away, but not disabling just the more specific spesh options
00:21 timotimo OK, yeah
00:22 MasterDuke no, getting the result of the EVAL and doing an ok() on that
00:22 timotimo mhm
00:22 MasterDuke so i've done MVM_SPESH_LOG of before and after my change, but the logs are large and i don't know how to read them/what to look for
00:23 timotimo they are extremely large, yes
00:23 timotimo i've been meaning to write a tool that diffs them properly by picking the log apart into chunks and giving them a canonical ordering
00:23 timotimo so you can actually see what's what
00:23 MasterDuke and another interesting thing, when doing an EVAL in a loop from the command line, it takes several iterations before the result changes
00:23 timotimo that also requires more output from the spesh log
00:24 timotimo right, spesh runs on what it thinks is "hot code"
00:24 timotimo i once put in a flag "SPESH_NODELAY" which would make it run for cold code, too
00:24 timotimo it caused rakudo to not even be able to start before it crashes and burns ;)
00:24 MasterDuke right, but what i thought was weird is that the test isn't running all that many iterations
00:24 timotimo spesh isn't perfect, that much is clear ;(
00:24 MasterDuke but it always happens with the test
00:25 timotimo if the div thing gets called from a bunch of places that are similar it'll be considered hot
00:27 MasterDuke ah, of course
00:28 timotimo for determining how hot a piece of code is, it'll consider calls to the same routine as "one counter" if their "callsite" is equal
00:28 timotimo callsite includes things like "how many arguments", "which named arguments", "any native types?"
00:29 MasterDuke interesting, good to know
00:29 timotimo that's also the little thing it always spits out at the beginning of a section of the log
00:30 timotimo okay so i apply your patch, what's next? which test to run?
00:30 MasterDuke 'Callsite 0xf44a90 (3 args, 3 pos) Positional flags: obj, str, obj' this?
00:30 timotimo yeah
00:30 MasterDuke t/spec/S32-num/rounders.t
00:32 timotimo doesn't let me apply the patch right now
00:32 timotimo seems like i have to do it manually?
00:32 timotimo patch unexpectedly ends in middle of line
00:32 timotimo what.
00:33 timotimo but it looks like it applied fine, so yay
00:35 timotimo rakudo built
00:35 MasterDuke dunno, i just copied the `git diff` output
00:36 timotimo should be okay
00:36 timotimo # Failed test '(-0.1).truncate == 0'
00:36 timotimo # at t/spec/S32-num/rounders.t line 88
00:36 timotimo it should look something like that?
00:36 MasterDuke yep
00:39 timotimo so what confuses me is this
00:39 timotimo turning the jit off fixes it
00:39 timotimo so we must be compiling something wrong?!
00:39 MasterDuke compiling?
00:40 timotimo yeah, you know, actually writing x86_64 binary code
00:40 MasterDuke not good
00:41 timotimo maybe it's easy. but my x86_64 assembly knowledge is quite limited
00:41 vendethiel joined #moarvm
00:41 timotimo especially when it comes to the FPU
00:41 timotimo i'll sprinkle some debug statements
00:42 MasterDuke heh, mine is almost completely limited. don't think i've ever written any x86* assembly
00:42 timotimo another question:
00:42 MasterDuke i've read a tiny bit, and written a tiny bit of MIPs for a class, but that's it
00:43 timotimo why does a patch to Int.pm cause trouble with methods from Num.pm? :)
00:43 MasterDuke they call div, maybe there's no Num.div (i haven't looked)?
00:44 MasterDuke no `method div` in Num.pm or Numeric.pm
00:44 timotimo well, here's a case where ceiling on a Num fails
00:45 MasterDuke ah, there is is 'proto sub infix:<div>' in Numeric.div
00:45 MasterDuke but then a comment: # rest of infix:<div> is in Int.pm
00:45 timotimo right
00:45 timotimo i mean
00:45 timotimo file boundaries mean nothing really
00:45 timotimo but still
00:46 timotimo ceiling begins to fail when you change div, but ceiling definitely doesn't use div
00:46 pyrimidine joined #moarvm
00:47 MasterDuke ah, right, Num.ceiling just calls nqp::ceil_n
00:47 timotimo yup
00:49 MasterDuke interesting, only Real, Cool, and Complex have truncate()
00:50 timotimo changing the contents of the ceiling method in Num.pm makes the bug disappear for the one(?) ceiling test that used to fail
00:50 timotimo of course changing the size of a function like i just did makes it a whole lot bigger
00:51 timotimo which makes it less likely to be inlined and such
00:51 timotimo i don't even see ceil anywhere in the jit?!
00:53 MasterDuke i'd MVM_SPESH_LOGged a truncate() call, but no ceil there
00:53 timotimo ugh. ugh. ugh.
00:53 timotimo "ceil" doesn't appear in the jitlog *anywhere*
00:53 timotimo maybe because my changes prevented jitting in the first place?
00:54 * timotimo tries again
00:54 timotimo (without my added code)
00:54 timotimo i'd expect the ceiling method to be bailed from jitting because ceil_n isn't implemented
00:55 timotimo which also means that the jit can't be responsible here ... ?!?!
00:56 timotimo okay, the ceiling method doesn't even get considered for jitting
00:56 MasterDuke well, it can't be only the jit that's responsible if disabling spesh also fixes it, right?
00:56 timotimo disabling spesh also disables the jit
00:57 MasterDuke ah
00:58 timotimo asdfasdfasdf
01:01 MasterDuke anything i could try in parallel?
01:03 timotimo i'd like to have some cooked dinner :S
01:04 timotimo This type cannot unbox to a native integer: P6opaque, Slip
01:04 timotimo in block <unit> at tools/build/create-moar-runner.pl line 10
01:04 timotimo fantastic
01:05 timotimo oh yeah
01:05 MasterDuke you made some change?
01:05 timotimo i straight-up broke div completely %)
01:06 timotimo by having it no longer return the result
01:06 timotimo so that's fun :) :)
01:07 ilmari[m] joined #moarvm
01:08 MasterDuke huh, div is used during a `make install`?
01:09 timotimo not sure what file it actually was trying to compile
01:09 timotimo -- expected to get -1 for -1 div 2, but got 0
01:09 timotimo you'll have to answer for this
01:11 MasterDuke ? i get that locally
01:12 timotimo https://gist.github.com/timo/57a5e93c21d6c98640dcc0ead1c5ff4a
01:13 timotimo -- expected to get -1 for -1 div 10, but got 0
01:13 timotimo that's kinda weird
01:13 timotimo m: say -1 div 10
01:13 camelia rakudo-moar 2cf9b5: OUTPUT: «-1␤»
01:14 MasterDuke `./perl6-m -e 'say -1 div 2'` gives -1
01:15 timotimo i'm not sure if isbig_I is actually a good thing to have at all
01:16 timotimo but the values here aren't really big at all
01:16 timotimo i mean the test values we're dealing with
01:17 MasterDuke you mean isbig_I is not a good thing ever, or with the optimization i was attempting?
01:17 timotimo maybe even ever ...
01:18 MasterDuke why's that?
01:20 timotimo i don't remember writing that code, but it does say "somebody please check ..."
01:21 MasterDuke not suspicious at all
01:21 timotimo never returning "not big" from the true branch in there makes everything work
01:21 MasterDuke wonder if it's at all related to the mp_get_int64 problem
01:23 timotimo which one is that?
01:23 MasterDuke we can store -(2**63) in a native, but not 2**63 (because 2's complement)
01:23 timotimo right
01:24 timotimo it's still giving a bunch of "it's not big" results
01:25 MasterDuke i've had some conversations with nine and jnthn about it recently, and been playing around with trying to fix, but this really isn't my area of expertise
01:25 MasterDuke you're giving it "big" numbers?
01:26 timotimo no, it's just running the test file
01:26 timotimo right now with the true branch just unconditionally returning 1, it'll just tell you if the Int is stored internally as a 32bit integer
01:28 timotimo i must have at one point understood the internals of the mp_int struct
01:28 timotimo to write that code ...
01:29 MasterDuke `/* the infamous mp_int structure */ typedef struct  { int used, alloc, sign; mp_digit *dp; } mp_int;`
01:29 MasterDuke right from 3rdparty/libtommath/tommath.h
01:31 timotimo yeah
01:31 timotimo but also, mp_digit is allowed to be different sizes
01:31 timotimo based on what you #define
01:32 timotimo hm. having the is_big based on mp->used alone is also b0rked
01:32 agentzh joined #moarvm
01:33 timotimo like, the other if in there is an extra condition under which it can give you "it's not big"
01:33 timotimo oh, hold on, that's wrong
01:34 timotimo it's still puzzling to me :)
01:36 timotimo i still don't get why your patch would cause these other things to asploded
01:37 timotimo why exactly is it using div for those things in the first place
01:37 timotimo maybe it happens during parsing? could that be possible?
01:37 timotimo i could output a backtrace, that's what i could do
01:38 MasterDuke oooh, interesting idea, could parsing be at fault
01:39 timotimo oh
01:39 timotimo did we realize that many of these tests are actually using Rat?
01:39 timotimo ah, they're supposed to do some rats, yeah
01:39 timotimo and rats totally do use div for a lot of stuff
01:40 MasterDuke oh wow, even for +/-
01:40 timotimo yuppers
01:41 timotimo i think the mystery is getting resolved little by little
01:41 MasterDuke ah, and in Rational.(floor|ceiling)
01:42 MasterDuke and Rational.new
01:44 timotimo i really am feeling a little bit better
01:45 MasterDuke ha. hard to bottle this though
01:46 timotimo i still have no good theory as to why the div results only b0rk when jit is enabled, though.
01:48 MasterDuke i find it hard to understand that repeated calls with the same "small" number fail
01:48 pyrimidine joined #moarvm
01:48 timotimo what exactly?
01:49 MasterDuke i could sort of see how there might be problems if we first called it with "small" numbers, such that only the "not isbig_I" branch was taken, and then it failed with a "big" number
01:50 MasterDuke i.e., the JIT code somehow thought div_i was only ever going to be called, not div_I conditionally
01:51 timotimo the jit also just calls the same function that the interpeter calls
01:51 timotimo and i see no obvious problem with the way it generates the call
01:53 timotimo do you think we can get better code if we use istrue_I(b) instead of just b inside the if's first branch?
01:53 MasterDuke huh, don't think i've ever used istrue_I
01:54 MasterDuke don't see it in the nqp ops doc
01:54 timotimo at the moment the code is using unless_o
01:54 timotimo which is "virtual"
01:58 timotimo i.e. whenever it's called it'll first try to figure out what kind of object it is, and in what way you figure out the truthness of the type in question
01:58 MasterDuke i made it `nqp::istrue(b)`, but same results
01:58 timotimo well, that's also a virtual one
01:58 timotimo hm. there's actually no istrue_I?
01:59 timotimo it's bool_I
02:01 timotimo MVM_bigint_bool is also theoretically a candidate for a direct jit implementation in assembly
02:01 timotimo it's a very small function, so the function call overhead would be noticable
02:01 timotimo probably something for the exprjit, though :)
02:02 MasterDuke same with nqp::bool_I
02:02 timotimo that's a performance optimization; did you measure run time or something? :)
02:02 timotimo i mean, since the test uses EVAL a bunch, there's probably a crazy amount of overhead
02:02 MasterDuke ha, no, just count of errors
02:03 timotimo i don't see why the code should continue using EVAL, since we have indirect method call syntax
02:03 timotimo i.e. instead of EVAL "myobj.$methodname()", we can literally myobj."$methodname"()
02:03 MasterDuke pretty sure that's a very old test file
02:03 timotimo right
02:04 timotimo should we modernize it?
02:04 timotimo it currently runs in about 1.8s on my machine
02:04 timotimo if we use indirect method calls, i'd expect it to run in like 0.5s
02:06 MasterDuke don't see the harm
02:06 timotimo you wanna try it, or should i?
02:07 MasterDuke go for it, you know what you have in mind
02:07 timotimo i'll try
02:09 timotimo i'm a little bit confused by the code actually
02:10 timotimo oh, "$type" isn't meant to be a type, like Int, it's the sub it's trying to use
02:10 timotimo so the first loop does floor($foo), the other loop does $foo.floor()
02:11 MasterDuke ah, i hadn't noticed that distinction either
02:12 timotimo oooh
02:12 timotimo there's also values like "-0.499.Num"
02:13 timotimo honestly i don't know why it'd be like that, though?
02:13 timotimo like, i could just put the values in the list of tests like that?
02:14 MasterDuke i don't know why not
02:14 timotimo right ..
02:15 MasterDuke i mean, the point of this file isn't really to test parsing...
02:15 timotimo right
02:16 timotimo only got it down to 1s though
02:17 timotimo kind of disappointing
02:17 timotimo well, 0.9s
02:17 timotimo but ram consumption is way down
02:17 MasterDuke 50% of the runtime is a nice improvement
02:17 timotimo used to be like 126meg, now it's 90meg
02:18 MasterDuke btw, did you see that heaptrack app i mentioned? think you would find it interesting
02:19 timotimo i saw, i didn't try it yet
02:19 timotimo the output you posted was kind of not that interesting
02:19 timotimo as it just says "this fixedsize allocator, it's allocating a bunch of memory!"
02:19 timotimo but it'd be more interesting to know what uses the fsa to allocate what kinds of stuff
02:20 timotimo not sure if we can teach that tool about our multiple allocators
02:20 MasterDuke no idea. that screenshot was just of the summary tab, it does have a bunch more info
02:21 timotimo it's also doing the "get stuff out of the hash" in a very roundabout way
02:22 MasterDuke oh yeah, i checked, .[] works now
02:22 MasterDuke and has for all build the *ables know about
02:22 MasterDuke i think that comment is from the pugs times
02:22 timotimo yeah, but also:
02:22 timotimo we grab the keys and sort 'em
02:22 timotimo then we pull the values out of the hash with access
02:23 timotimo rather than iterating over .pairs or .kv
02:23 MasterDuke whoops, i gotta afk for a bit, will be back though
02:23 timotimo using .kv, then .sort, that's a recipe for ... fun :D
02:27 timotimo oh wow
02:27 timotimo --profile says the code ran for only 73ms
02:27 timotimo so the majority of the time seems to be in parsing and optimization i suppose
02:27 timotimo Stage parse      :   0.677
02:29 timotimo the --profile-compile tab is quite busy %)
02:34 timotimo crashed, yay.
02:35 timotimo was it you who made the sql version of our profiler?
02:35 timotimo i mean the output format, not actually something that uses the sql data
02:38 Geth ¦ MoarVM: 152337ab0c | (Timo Paulssen)++ | src/math/bigintops.c
02:38 Geth ¦ MoarVM: throw out flawed parts of bigint_is_big
02:38 Geth ¦ MoarVM:
02:38 Geth ¦ MoarVM: this caused trouble for an optimization of the div infix in rakudo
02:38 Geth ¦ MoarVM: that caused t/S32-num/rounders.t to fail in mysterious ways.
02:38 Geth ¦ MoarVM: review: https://github.com/MoarVM/MoarVM/commit/152337ab0c
02:49 samcv good *
02:49 timotimo greetings samcv
02:49 timotimo how are you today?
02:49 samcv good
02:49 samcv just had food
02:49 timotimo glad to hear
02:51 timotimo i'm now sick
02:51 timotimo a very good german satire site recently had an article about a women who wanted to go through childbirth in order to find out for herself how bad a man-flu is
02:51 timotimo didn't translate that very well
02:51 samcv what is man-flu
02:52 timotimo it's when a man has the flu
02:52 samcv is that different from normal flu lol?
02:52 timotimo it's separate from woman-flu or basically-anybody-flu because men tend to be really whiny when they get a flu
02:52 samcv lol.
02:53 timotimo and so the meme is that man-flu is a really terrible disease
02:53 samcv oh i am sure. millions get it every year
02:53 timotimo i don't think i have an actual flu, just a cold maybe. but damn i feel bad
02:53 samcv probably an epidemic
02:53 samcv aww :(
02:54 timotimo i'm not supposed to suffer this much from a sickness this trivial
02:54 timotimo anyway, you up for coding today?
02:54 samcv yes
02:54 * timotimo "git pull" latest UCD
02:54 samcv :)
02:56 timotimo hm, what code was i supposed to write again
02:56 timotimo the code in C to get from codepoint to its name?
02:56 samcv yeah
02:56 samcv the name code hasn't been touched in a while
02:56 samcv so it's basically as it was before
02:56 samcv --names-only to only make names
02:56 timotimo good good
02:57 timotimo any reason to download-ucd again?
02:57 samcv like the files from unicode.org? nope
02:58 timotimo TIMER UnicodeData 23.2968431 seconds
02:58 timotimo X::TypeCheck::Binding exception produced no message
02:58 timotimo in method saw-line at /home/timo/perl6/ecosystem/UCD/lib/seenwords.pm6 (seenwords) line 15
02:58 timotimo hum.
02:59 timotimo Registering binary properties:  Any, Bidi_Mirrored …
02:59 timotimo ^- that looks wrong
02:59 samcv got an exception?
02:59 samcv naw that happens
02:59 samcv ignore that
02:59 samcv also curious about the exception.
02:59 timotimo that's Generate_Name_List
02:59 timotimo inside get_shift_levels
03:00 samcv oh crap
03:00 samcv not sure when that happened.
03:00 samcv i see it on travis
03:00 timotimo where it does saw-line for the $s
03:01 samcv lemme see the last change i made
03:01 samcv was a month ago
03:01 samcv investigating now
03:02 MasterDuke timotimo: yeah, i did the sql stuff
03:02 timotimo did i give you a good direction for what to do next?
03:02 timotimo to fix the problem i was having?
03:02 MasterDuke that moar commit fixes the div problem?
03:03 timotimo it ought to
03:03 MasterDuke well, i remember you said change the `// 'NULL'`s to `// 0`
03:03 timotimo right, that was the easiest part
03:03 timotimo you know about NULL in SQL? it's quite ... special
03:03 MasterDuke but then you said something about foreign keys
03:03 MasterDuke yeah, there be dragons
03:04 timotimo yeah, foreign keys is not that important
03:04 timotimo it'd probably be enough to have more descriptive field names
03:05 timotimo like, there's an id field in callee that tells us what the id of that particular callee is, there's one that links the callee to the table that has routine name, filename, and line number
03:05 timotimo and one that tells us which entry in the callee table is our parent
03:05 samcv uh timotimo it might be flapping
03:05 timotimo i found it a little hard to figure out what was what
03:05 samcv on travis it fails and doesn't fail like every other build or something
03:06 MasterDuke sure. i wanted to keep things as close as possible to the json initially for ease of comparing to make sure i did things correctly, but it doesn't have to stay that way
03:08 * timotimo rebuilds rakudo with a more verbose error there
03:08 timotimo m: "foo-bar baz".split(["-", " "]);
03:08 camelia rakudo-moar 2cf9b5: ( no output )
03:08 timotimo m: for "foo-bar baz".split(["-", " "]) -> $line { }
03:08 camelia rakudo-moar 2cf9b5: ( no output )
03:09 timotimo m: for "foo-bar baz".split(["-", " "]) { }
03:09 camelia rakudo-moar 2cf9b5: ( no output )
03:09 timotimo m: for "LESS-THAN SIGN".split(["-", " "]) { }
03:09 camelia rakudo-moar 2cf9b5: ( no output )
03:09 timotimo m: for ^1000 {  for "LESS-THAN SIGN".split(["-", " "]) { } }
03:09 camelia rakudo-moar 2cf9b5: ( no output )
03:09 timotimo weird.
03:10 timotimo oh, rakudo compiles so slowly because my moar is --optimize=0
03:12 timotimo Nominal type check failed for parameter 'one'; expected Any but got BOOTIntArray
03:14 timotimo this could be golfable and RTable
03:15 timotimo m: for ^1000 { for "LESS-THAN SIGN".split([" ", "-"]) { } }
03:15 camelia rakudo-moar 2cf9b5: OUTPUT: «X::TypeCheck::Binding exception produced no message␤  in block <unit> at <tmp> line 1␤␤»
03:15 timotimo there we go.
03:15 timotimo m: for ^1000 -> $time { for "LESS-THAN SIGN".split([" ", "-"]) { }; CATCH { say $time }}
03:15 camelia rakudo-moar 2cf9b5: OUTPUT: «0␤X::TypeCheck::Binding exception produced no message␤  in block <unit> at <tmp> line 1␤␤»
03:15 timotimo it immediately fails, too
03:15 timotimo m: for ^1000 -> $time { for "LESS-THAN SIGN".split([" ", "-", "A"]) { }; CATCH { say $time }}
03:16 camelia rakudo-moar 2cf9b5: ( no output )
03:16 timotimo m: for ^1000 -> $time { for "LESS-THAN SIGN".split([" ", "A"]) { }; CATCH { say $time }}
03:16 camelia rakudo-moar 2cf9b5: OUTPUT: «0␤X::TypeCheck::Binding exception produced no message␤  in block <unit> at <tmp> line 1␤␤»
03:16 timotimo so basically if we have an occurence of needle 0 after an occurence of needle 1, it'll try to swap the values around inside the mergesort impl
03:16 timotimo and that goes asploded
03:16 samcv ah so that's what's causing the problem?
03:17 timotimo yup.
03:17 samcv yay finding bugs
03:17 timotimo deep deep deep inside the bowels of rakudo :)
03:17 timotimo you want to do the honors?
03:17 samcv of fixing it? lol. not really :P
03:17 timotimo no, RTing it
03:17 samcv ah. you should RT it. i think you understand more what's causing it and can write something better than I
03:18 timotimo ok, maybe
03:19 samcv oh lizmat broke it a day ago https://github.com/rakudo/rakudo/commit/9d497e9dbc16b18fcd0e9a9beeac4429a8af0cc1
03:19 samcv see bisect in #perl6-dev
03:19 timotimo very interesting that it failed in your travis a few times?
03:19 timotimo yes, i saw
03:19 samcv i think i have it set to nom
03:19 timotimo does the travis log show the rakudo (and others) revision used?
03:19 timotimo or is it just "nom"?
03:19 timotimo i mean, you set it to nom, but does it output the exact version somewhere?
03:20 timotimo maybe it was ok, broken, ok, broken
03:20 timotimo and we just found the last time it brokened
03:20 samcv This is Rakudo version 2017.02-156-g2cf9b53 built on MoarVM version 2017.02-18-g5f9d698
03:21 vendethiel joined #moarvm
03:25 MasterDuke timotimo: interesting, now my changes to div don't make it any faster
03:26 timotimo what are our changes like now?
03:28 timotimo Use of uninitialized value of type Str in string context.
03:28 timotimo Methods .^name, .perl, .gist, or .say can be used to stringify it to something meaningful.
03:28 timotimo in method done at /home/timo/perl6/ecosystem/UCD/lib/EncodeBase40.pm6 (EncodeBase40) line 52
03:28 timotimo Use of uninitialized value $!to-encode-str of type Str in string context.
03:29 timotimo Methods .^name, .perl, .gist, or .say can be used to stringify it to something meaningful.
03:29 timotimo in method done at /home/timo/perl6/ecosystem/UCD/lib/EncodeBase40.pm6 (EncodeBase40) line 52
03:29 timotimo samcv: ^ get this, too?
03:29 samcv yeah ignore that
03:29 timotimo haha :D
03:29 samcv i fixed that tho if you pull
03:29 samcv was a harmless problem but better to reduce warnings
03:30 timotimo OK
03:31 timotimo my fix for the exception message didn't work
03:32 pyrimidi_ joined #moarvm
03:33 timotimo i actually think i'll try going to bed soon-ish
03:33 timotimo i'm already feeling noticably better than last time i laid down
03:35 samcv kk
03:35 timotimo but i'm now very hungry apparently
03:44 KDr2 joined #moarvm
03:49 MasterDuke timotimo: i'm testing the same changes as before (with this `use nqp; my $a = -1; nqp::while(nqp::islt_i(++$a, 5_000_000), ($ = $a div 17))`)
03:50 MasterDuke and now the unmodified div is faster
03:50 MasterDuke also, using nqp::bool_I in my changed version is slightly slower
03:50 timotimo huh
03:50 timotimo huh!
03:51 MasterDuke 1657ms vs 1740ms
03:52 timotimo can you send over a spesh log?
03:52 timotimo actually, maybe i'll take the diffs
03:55 MasterDuke you want the diffs of spesh logs between the change with nqp::bool_I and without?
03:56 timotimo oh, no
03:56 timotimo the diffs for the code
04:00 MasterDuke same as the gist i linked earlier
04:01 timotimo OK, good
04:01 MasterDuke i just also tested with `nqp::bool_I(b)` instead of `b`
04:26 timotimo i'll go sleep now, but maybe i'll look into that s'more
04:26 timotimo it could be of course that spesh was already turning that thing into essentially bool_I for us
04:27 timotimo and using bool_I gave us the bool_I, but also a "if_i" on top of that?
04:27 timotimo that's possible
04:27 timotimo anyway, seeya!
04:30 MasterDuke later...
06:00 pyrimidine joined #moarvm
06:38 brrt joined #moarvm
06:48 brrt good *, #moarvm
07:10 KDr2 joined #moarvm
07:40 domidumont joined #moarvm
07:56 brrt joined #moarvm
08:21 ilmari[m] joined #moarvm
08:36 zakharyas joined #moarvm
09:08 samcv good morn-er *
09:50 pyrimidine joined #moarvm
09:59 jnthn morning o/
10:02 brrt joined #moarvm
10:13 brrt joined #moarvm
10:29 brrt joined #moarvm
10:34 zakharyas joined #moarvm
10:43 dogbert17_ very silent around here
10:53 * IOninja blasts https://www.youtube.com/watch?v=vfu9UBsPAxs
10:54 * dogbert17_ indeed shouldn't IOninja be asleep at this time?
10:54 IOninja 6am. Just woke up
11:13 pyrimidine joined #moarvm
11:19 brrt yeah, there's $dayjob issues to take care of
12:02 pyrimidine joined #moarvm
12:07 dogbert17_ jnthn, are you around?
12:08 jnthn About to go have lunch :)
12:08 dogbert17_ do you think this will work? https://gist.github.com/dogbert17/fd8f2ca807c4e57256f389c5deb87871
12:09 * dogbert17_ multithreading is not my speciality :)
12:10 jnthn Looks OK
12:10 jnthn I'd be a bit surprised if it hit :)
12:10 dogbert17_ t/spec/S19-command-line/repl.rakudo.moar .......................... ok
12:10 dogbert17_ ===(       0;293  13/17  12/13  3/335  1/52  0/?  0/?)===tc's are equal
12:11 jnthn Hmm
12:11 dogbert17_ indeed
12:11 jnthn o.O
12:11 jnthn How on earth... :-)
12:11 dogbert17_ maybe something to contemplate over lunch :)
12:11 jnthn Aye
12:11 jnthn Talking of which, bbiab
12:19 * timotimo falls out of bed
12:21 dogbert17_ timotimo, time to take care of ENOCOFFEE then :)
12:22 timotimo so we're basically failing to account for reentrant usage of the decoder, or perhaps we're throwing an exception or otherwise leaving the decoder's single-user section without clearing the bit?
12:23 timotimo MasterDuke: it occurs to me that the div improvement can only really help if it prevents bunches of boxing/unboxing. perhaps when your div returns an int, it's immediately turned back into Int by the caller?
12:35 dogbert17_ timotimo, yes something fishy is definitely going on
12:36 timotimo i wonder if it's sane to create watchpoints whenever the decodestream is entered
12:37 timotimo but you can't "break when some code is not run"
12:41 jnthn timotimo: Reentrant use is in theory impossible - the decoder does work then returns results
12:42 jnthn Though it can throw exceptions in some cases which we'd not account for
12:42 jnthn But that in turn would mean the decoder is useless from then on
12:43 timotimo right ...
12:43 jnthn And anyway, we'd probably see those exceptions
12:43 timotimo probably
12:46 dogbert17_ so what's going on, is my code borked?
12:49 timotimo i haven't the slightest
13:03 IOninja Wasn't following the discussion, but I see mention of t/spec/S19-command-line/repl.t .... that test file can give false negatives on slow boxes. Set ROAST_TIMING_SCALE=2 or higher numbers to make the tests wait longer before assuming stuff hanged.
13:04 pyrimidine joined #moarvm
13:09 pyrimidi_ joined #moarvm
13:10 pyrimidine joined #moarvm
13:35 dogbert17_ ok ultrastupid question: do the calls MVM_string_decodestream_get_until_sep_* here have to be protected? https://github.com/MoarVM/MoarVM/blob/master/src/6model/reprs/Decoder.c#L246
13:37 jnthn No, those are immutable after decoder initialization
13:37 jnthn (Also, not ultrastupid :))
13:38 dogbert17_ thx, I was wondering because of this: https://github.com/MoarVM/MoarVM/blob/master/src/io/syncfile.c#L145
13:53 KDr2 joined #moarvm
13:55 KDr2 joined #moarvm
14:04 brrt joined #moarvm
14:12 MasterDuke_ joined #moarvm
14:14 MasterDuke_ timotimo: even though you made a fix in https://github.com/MoarVM/MoarVM/commit/152337ab0c, there still is a bug in the JIT, correct?
14:14 MasterDuke_ and if so, doesn't brrt have a JIT bisect tool?
14:16 timotimo only for the exprjit
14:16 timotimo at least i think so
14:16 pyrimidine joined #moarvm
14:16 brrt yeah, it only works for the expr JIT
14:17 timotimo oh hey brrt
14:17 brrt hey timotimo
14:17 brrt i lurk :-)
14:18 brrt it'd be interesting to make it work for non-expr jit, though
14:19 MasterDuke_ ha, so i was technically correct (the best kind), but that still doesn't help us
14:23 MasterDuke_ brrt: is that a 5min or 5day job?
14:50 zakharyas joined #moarvm
14:57 pyrimidine joined #moarvm
15:08 ggoebel joined #moarvm
15:28 brrt joined #moarvm
15:29 brrt .tell MasterDuke_ it's a one day job
15:29 yoleaux2 brrt: I'll pass your message to MasterDuke_.
15:40 brrt but the question is to figure out which piece of code breaks
15:41 brrt and then, if you have that, it's probably an issue of figuring out which instruction makes that code break
15:41 brrt which is a bit more difficult because the 'lego' JIT has no fallback method like the expr JIT has
15:42 timotimo hm
15:42 timotimo can't the lego jit just say "oh, errr, i gotta deopt now!"
15:44 jnthn Deopt points are explicit thing
15:44 jnthn *things
15:44 jnthn e.g. we have a mapping table set up at the time we produce bytecode
15:46 timotimo mhh
15:47 timotimo i expect the exprjit falls back to the lego jit when it hits the bisection point?
15:56 pyrimidine joined #moarvm
16:11 brrt joined #moarvm
16:12 brrt timotimo: yes
16:12 timotimo right. the lego can't do it
16:31 ZofBot joined #moarvm
16:50 pyrimidine joined #moarvm
16:50 brrt well, it could, with sufficient additional hacking
16:51 brrt i can't recall how i wanted to resolve my conflict bitmap…
17:01 pyrimidine joined #moarvm
17:09 pyrimidine joined #moarvm
17:22 ZofBot joined #moarvm
17:24 pyrimidine joined #moarvm
17:36 d4l3k_ joined #moarvm
17:40 domidumont joined #moarvm
17:41 moritz_ joined #moarvm
17:43 camelia joined #moarvm
17:50 moritz joined #moarvm
17:56 pyrimidine joined #moarvm
19:06 zakharyas joined #moarvm
19:24 agentzh joined #moarvm
20:12 pyrimidine joined #moarvm
21:31 pyrimidine joined #moarvm
21:43 ggoebel joined #moarvm
21:55 agentzh joined #moarvm
22:08 pyrimidine joined #moarvm
23:07 MasterDuke .tell brrt fyi, if you're interested in the JIT bug, there's a bunch of discussion here: https://irclog.perlgeek.de/moarvm/2017-03-03#i_14196620
23:07 yoleaux2 MasterDuke: I'll pass your message to brrt.
23:10 MasterDuke timotimo: i think i was just hoping that div_i is so much faster than div_I, that it was worth a bit of effort (e.g., conditionals, boxing/unboxing) to try and use it when possible
23:17 pyrimidine joined #moarvm

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