03:39 KDr2_c joined 03:58 Zoffix joined 06:48 brrt joined
brrt good *, #moarvm 06:56
and samvc, who is usually here at this point
06:58 domidumont joined
samcv hey brrt 06:59
brrt hey :-) 07:00
up to anything today?
samcv uhm was going to try and come up with some concatenation tests/benchmarks
brrt seems like a good plan 07:01
isn't our string concatenation logic pretty optimized already? 07:03
samcv yeah. uhm. let's see mvm string compare doesn't take graphemes into account i think. so if concatenation fucks something up it should not compare right
brrt hmmm
samcv well i optimized it some. but it needs more. and more testing. and not to renormalize the WHOLE of the string just because the last char of a and first char of b need renormalization
brrt hmmmā€¦. 07:04
what exactly does renormalization do?
samcv that last question will be more complicated to do. but want to get some testing and think reallllyyy hard about ways concatenation could go wrong and tests to write
07:04 mst joined
samcv like puts cp's into graphees. so "\r\n" becomes a single grapheme. which is a single 32bit int 07:04
same with anything that is a grapheme 07:05
will probably end up writing a simple test and breaking the MVM code on purpose just to make sure i know i can make the test fail 07:06
brrt :-)
that's a good plan
samcv otherwise whatever work i do is useless if i don't know which part of the code can cause the test to fail or not. or looking in the wrong place
cause currently i have some tests, but i am a skeptical person. and it is hard to believe in a test until it has been broken sometimes :P 07:07
brrt yeah 07:08
good tests are essential
and sometimes kind of hard with a system like moarvm
samcv oh yeah and i was optimizing MVM_string_equal a bit
possibly
trying to reduce it checking args multiple times and such passing through multiple functions needlessly 07:09
since that seems to be a high cpu usageish one
on certain jobs
brrt uhuh
i was somewhat hoping we could simplify that to a jittable level at some point
samcv how can we JIT it?
anything that needs to be done in the C functions themselves? 07:10
brrt well, we can call the function (as we do now), but ideally, you could lower the power to a memory compare
or at least the bulk of it 07:16
samcv yeah 07:17
08:01 brrt joined
timotimo the whateverable people have a nice present for us 08:25
samcv brrt, gonna start out with some korean
timotimo gist.github.com/Whateverable/94f2c...a04f10871c
samcv those are made up of usually 3 cp's per grapheme
chop it at all possible places and concat it, then check if they're still the same synthetics/cp's 08:26
brrt (are they? I had no idea)
samcv yep
timotimo we currently don't re-assign synthetic codepoints when they are no longer used
samcv korean is cool (hangul script). unlike basically all scripts it was actually designed and engineered by academics. funded by some korean king who wanted to improve literacy in korea
timotimo and the trie structure ought to make sure the same grapheme always ends up with the same synthetic 08:27
samcv since before that they only had borrowed chinese characters and only the elites knew how to read
brrt imho latin script is awesome. it's just that nobody wants to conform to it
and it may have a few to few letters
samcv heh brrt
timotimo of course something related to storing unnormalization-conserving stuff could throw a wrench in that machine
samcv well korean each character is a syllable
and you add the shapes and overlay them 08:28
and there you have that syllable, made up of whatever subshapes
and they are shaped by how they sound
brrt, keytokorean.com/wp-content/uploads/...etters.jpg 08:29
was designed to be as easy to learn as possible 08:30
and it's kind of pretty neat
timotimo it did wonders for the country at the time
samcv kings after him tried to supress it cause they didn't want the poor peoeple to rise up or something, but then came back into use in the 1900's 08:31
timotimo >:(
samcv before that it was hangul/chinese chars were both used
depending on context
haters gonna hate
similar sounding parts are shaped. if you say themh out loud, along the line, you'll start to sort of get it 08:32
and see how they're shaped based on sound
plus they look super futuristic and stuff 08:33
brrt it is pretty cool, i admit that
08:38 zakharyas joined
samcv yay got a should not be reachable error :) 08:43
but only with \r\n line endings on this korean text 08:44
gist.github.com/0df9fcc0c119f5ada4...fbee6f24d7 btw
wow nice! it detected my .t file as perl 6 :) \o/ (due to my work on github's linguist which detects languages and such) 08:46
was a month or two ago, but forgot about it
timotimo Usage: perf c2c {record|report} 08:59
<3 <3 <3 <3 <3
samcv well i found a bug introduced by my speed boost
with korean and \r\n line endings
timotimo very good!
samcv improving test coverage is supreme!
actually fails with should not be reachable. because idk why. gonna set break point 09:00
timotimo :D
samcv want to write it in nqp but seems inconvenient. idk you tell me timotimo 09:01
timotimo "it"?
samcv see the gist and how i can do .chrs in nqp directly. and shift
gist.github.com/0df9fcc0c119f5ada4...fbee6f24d7
half is in nqp already
timotimo s: Str. "chrs", \() 09:02
SourceBaby timotimo, Something's wrong: ā¤ERR: ===SORRY!=== Error while compiling -eā¤Unsupported use of . to concatenate strings; in Perl 6 please use ~ā¤at -e:6ā¤------> put sourcery( Str.<HERE> "chrs", \() )[1];ā¤
timotimo s: Str, "chrs", \()
SourceBaby timotimo, Something's wrong: ā¤ERR: Could not find candidate that can do \()ā¤ in sub sourcery at /home/zoffix/services/lib/CoreHackers-Sourcery/lib/CoreHackers/Sourcery.pm6 (CoreHackers::Sourcery) line 29ā¤ in block <unit> at -e line 6ā¤ā¤
timotimo s: Str, "chrs", \(Str:)
SourceBaby timotimo, Something's wrong: ā¤ERR: ===SORRY!=== Error while compiling -eā¤Unexpected closing bracketā¤at -e:6ā¤------> put sourcery( Str, "chrs", \(Str:<HERE>) )[1];ā¤
timotimo i'm not smart enough to remember this bot
samcv ^
everybody but Zoffix :P
SourceBaby, Str, "chrs" 09:03
SourceBaby, Str, ".chrs"
timotimo nqp::strtocodes(nqp::unbox_s(self), nqp::const::NORMALIZE_NFC, nqp::create(NFC))
samcv sub chrs has so many ternary's 09:10
3 in a chain. i wonder what the highest number in rakudo is
timotimo we could probably find out by instrumenting DrForr's Perl6::Parser 09:11
samcv i'm so confused reading this 09:16
timotimo it's not so bad 09:17
if it's an int, put its chr into the result string, if not, try to numify 09:18
samcv no i get that part but trying to read the trinary
timotimo at least it's indented %)
samcv cause it has !! and then !! right after
yeah
timotimo be glad it's not php code :P
samcv i don't get the ?? and ?? on 3022 and 3023 09:19
why does the parser parse it as indented
or does it go until the next !!
and uh. idk
timotimo because precedence parser? :) 09:20
samcv ok 09:21
that makes it much easier to read
was making my head hurt scanning it linearly
and thinking why it would parse how it parses
timotimo :D
samcv ok gonna fix rakudo's code 09:26
timotimo, `while condition { }` is no slower than `code here while condition` right? 09:27
timotimo it could be slower
samcv or does the closure bring in more slow
timotimo braces have semantics :)
samcv but it makes it so bad to read
timotimo if we're lucky then the optimizer makes both the same
samcv i could test it
timotimo definitely don't put a "my" inside these braces if you want it to be inlined
aye
samcv ok what --target should i compare
yeah ofk
*ofc
timotimo the --target=optimize of foo while cond vs while cond { foo } 09:28
samcv timotimo, well won't optimize show differences if optimization changes are made 09:33
even if the same bytecode is made?
it shows the optimization process somewhat right?
timotimo no, only the output 09:34
samcv o
k
timotimo the perl6 optimizer stage is a QAST to QAST thingie
samcv yeah they are different 09:42
timotimo they always are :D 09:43
samcv i'll just use nqp::while i guess 09:44
basically the same and saves a few bytes 09:45
3 bytes in the output=optimize lol
timotimo fair enough :)
samcv the other ones had 869 vs 800 lines extra lines 09:46
do you think we could use more optimizer work?
i mean as far as making perl 6 faster. compared to other things
dogbert17_ samcv: have you seen this perl6.party/post/Perl-6-S---Substi...n-Operator 09:47
timotimo we could
samcv yeah ithink dogbert17_ 09:48
dogbert17_ I saw your comment here irclog.perlgeek.de/perl6/2017-03-23#i_14309800
samcv yeah dogbert17_ but i want methods tho :( 09:53
also why does .match make more code than ~~ m/blah/
err compiled
timotimo because m/blah/ isn't supposed to be used with ~~
samcv docs say ~~ m/blah/ sets left hand side as $_ then calls .match on it
timotimo er, i guess you can do that 09:54
samcv but it must not being doing that
if it produces such different code
timotimo can you paste both outputs you're looking at?
and maybe also the inputs?
samcv this was a week or two ago. will do when i finish whatever i am doing now 09:55
oh timotimo i know why the ?? !! were confusing. the placing of parenthesis was horrible
didn't show the inner ?? !! was in parenthesis easily at all since there were so many other parens in that area 09:56
timotimo oh, ok
i'm going to lose my mind here 09:57
samcv kk
10:13 brrt joined
timotimo i was about to write a blacklist for "structs that start with MVM, but aren't valid MVMObjects" 10:19
but it looks like i want a whitelist instead %)
samcv timotimo, how do i fix this Type check failed in binding to 'listy'; expected Any but got BOOTIntArray (?) 10:21
my variable is \listy `sub chrs (\listy) { }`
jnthn Mu
samcv how can i fix this
timotimo yeah, Mu \listy
samcv kk
timotimo every time you get types from nqp, you'll want to use Mu, because nqp stuff isn't part of perl6's type hierarchy
samcv i thought \listy already disabled that stuff but thx
timotimo except Mu is "deep" enough that it works out
Zoffix m: ''.chrs 10:22
yoleaux2 09:06Z <lizmat> Zoffix: looking at your approach, but perhaps reverting github.com/rakudo/rakudo/commit/362f674 and adding redo support there would be a better (and ultimately faster) approach
camelia ( no output )
Zoffix huh
s: Str, "chrs", \()
SourceBaby Zoffix, Something's wrong: ā¤ERR: Could not find candidate that can do \()ā¤ in sub sourcery at /home/zoffix/services/lib/CoreHackers-Sourcery/lib/CoreHackers/Sourcery.pm6 (CoreHackers::Sourcery) line 29ā¤ in block <unit> at -e line 6ā¤ā¤
Zoffix s: Str, "chrs"
SourceBaby Zoffix, Sauce is at github.com/rakudo/rakudo/blob/43e0...ol.pm#L122
Zoffix Ah
For a second I thought it was an alternate version of .chars 10:23
s: "", "chrs", \()
SourceBaby Zoffix, Sauce is at github.com/rakudo/rakudo/blob/43e0...ol.pm#L122
Zoffix ^ the Str fails, because the candidate is Cool:D and Str isn't a :D
timotimo ah, i had to give it a Str:D on the first one
yeah
now i get it :)
samcv i think imma give up on nqpizing this
being a waste of my time atm 10:24
just gonna keep it perl 6
gonna just convert the stuff i had always as nqp to perl 6 10:25
brrt but nqp is so cool :-o
timotimo it can be :)
it can also drive you up the wall :)
samcv lol brrt 10:26
Geth MoarVM/master: 6 commits pushed by (Daniel Green)++, (Jonathan Worthington)++
samcv hmm breaking at MVM_panic doesn't catch "should eventually be unreachable" 10:31
well it's happening in the unicode database. did not expect that. but i really had no clue why it did what it did 10:33
timotimo can you set a breakpoint on the line in the unicode db instead?
samcv well i did that's how i know where it went
got a backtrace
if (codepoint < 0) { 10:34
MVM_exception_throw_adhoc(tc, "should eventually be unreachable");
uh oh
hehe in MVM_codepoint_to_row_index
that.. is really weird
should be caught earlier and it must be checking synthetics or something
yeah it dies in MVM_unicode_get_property_int. super weird 10:35
i guess i can see how this could happen but it should not have happened because of protections.
timotimo okay, just use "up" until you see a function that should check for < 0 and doesn't? 10:39
samcv well need to figure out where it should go. i mean maybe should just change the error message
cause if this happens it means something in moar should not have requested it
but gives no clue as wtf the problem is 10:40
timotimo of course
you've got that from concat.t?
samcv i guess this line did not properly guard 10:41
if ((last_a != crlf && last_a < 0) || (first_b != crlf && first_b < 0))
yeah timotimo
tis happening from MVM_nfg_is_concat_stable when it checks the property of cp's at the very end of the function
timotimo i ... can't breakpoint that line?! 10:44
samcv uh which one 10:45
10:45 ZofBot joined
timotimo the one that panics 10:45
in fact, gdb doesn't think unicode_db.c exists 10:46
samcv yeah it desn't
you can't break it
look in unicode.c file. `make` concats a counple files togather 10:47
timotimo oh
d'oh :)
samcv also i need to sleep
very soon
timotimo OK, so we could if (last_a < 0) last_a = MVM_nfg_get_base_char(tc, last_a); if (last_b < 0) ... ... 10:48
samcv oh i ddin't break it. it was MasterDuke
hehe 10:49
if i remove the crlf checks then it is fine
timotimo oh, so maybe crlf is exactly what it checks there 10:50
samcv yeah. 10:51
it only has the bug with crlf lines
jnthn Hmm, rt.perl.org/Ticket/Display.html?id=130951 shows up mis-sharing of an SC, but I don't see how on earth that can happen...
samcv well timotimo it's just the if condition
i didn't remove the MVM_nfg_crlf_grapheme(tc) part
so it still stores the value, just isn't part of the if condition
oh wait. nvmt i get what you mean 10:52
yeah it's checking the property of the crlf and it's not having any fun
timotimo yup yup
samcv ok fixed. yay 10:56
timotimo cool
samcv gonna spectest then should be good
then will add the new tests to roast
though the roast tests may come tomorrow or something. brb when spectest completes 10:57
ok spectest is a-ok 11:09
timotimo okay. enough gdb-python-madness for today 11:16
or maybe i found a way out of this rabbit-hole 11:18
(well, through it, actually)
samcv :) 11:19
Geth MoarVM: a00278e611 | (Samantha McVey)++ | src/strings/nfg.c
Fix exception concatā€™ing some strings with \r\n line endings

The bug was introduced in f2731339, and is resolved by this commit. Bug would cause ā€œshould eventually be unreachableā€ message upon MVM throwing an adhoc exception from inside unicode_db.c
This was caused by checking property values for codepoints under 0 ... (5 more lines)
11:20
dogbert17_ jnthn: are you doing Perl6 work today?
jnthn dogbert17_: Yeah
dogbert17_ perhaps I can help a tiny bit if you're hunting SEGV's :) 11:22
dogbert17_ but first a quick lunch ... 11:23
jnthn Well, think I'll look at hyper/race some too
But wanted to look into the EVAL SEGV
dogbert17_ I can do some gdb/valgrind stuff when I get back, might save you some time perhaps 11:24
timotimo it's spectacularly difficult to just get an ipython session that has the gdb module loaded to work 11:43
dogbert17_ back, I when I run the 130951 example it bugs out spectacularly e.g. 'MoarVM panic: Internal error: invalid thread ID -1343260952 in GC work pass' 12:18
timotimo you mean #130951 12:19
synopsebot6 Link: rt.perl.org/rt3/Public/Bug/Display...?id=130951
timotimo synopsebot6: ^5
jnthn dogbert17_: Did you grab the latest Rakudo fix I pushed for that? :) 12:20
dogbert17_ hmm, no, does that mean this is a problem of the past? 12:21
will give it a once over anyway :) 12:22
jnthn Yeah, I hope it is :) 12:25
dogbert17_ jnthn: I can't get it to crash either :) 12:37
18:33 domidumont joined 19:08 FROGGS joined
dogbert17 jnthn: any idea why the last test in this file still flaps? github.com/perl6/roast/blob/master...eserving.t 20:01
jnthn dogbert17: No, that's pretty strange 20:16
I haven't seen it do so, though haven't ran the test in a loop to provoke it either
dogbert17 I only have to run it a few times before it fails with: # Failed test 'Close called as expected' # at t/spec/S17-supply/supplier-preserving.t line 32 # expected: 'xxxxxxxxxx' # got: 'xxxxxxxxx' 20:18
jnthn Odd
I wonder where the race is
dogbert17 you removed one a few weeks ago 20:19
when the Channel was introduced
jnthn Right
Thus my confusion; I don't see a race in there 20:20
dogbert17 ohh, I see a a bug ... hold on
jnthn So it must be some other kind of bug
Unless somehow the .close isn't completed before the react hands back control.
dogbert17 gist.github.com/dogbert17/96bd5e34...e5f6179b81
jnthn What on earth? o.O 20:21
dogbert17 hmm, forgot --debug, will fix
timotimo well, we havent put a cubesat up into space that has p6 on it :)
jnthn Not sure if that'd be a race cause, but that looks very busted 20:22
timotimo so definitely on earth
dogbert17 Bigint something, wasn't there a PR about that?
timotimo pr about properly barking when a bigint gets unboxed into an unsigned int register 20:23
dogbert17 ok reload the gist 20:24
github.com/MoarVM/MoarVM/pull/551 ? 20:27
dogbert17 is still running on a 32 bit vm 20:32
the invalid reads appear regardless of which p6 program I run 20:45
MasterDuke dogbert17: even `-e ''`? 21:55
the first line the error in your gist mentions is bigintops.c:13, which is just `int adjustment = MIN(used, 32768) & ~0x7;` 21:58
i can't reproduce the error, but i'm on a 64-bit machine 22:05
dogbert17 MasterDuke: the problems appear on the minimal program as well 22:08
do you see anything in your code which might be bust on 32 bit?
MasterDuke nothing obvious to me (but that's not saying much) 22:09
timotimo: do you have any ideas?
dogbert17: see anything yourself? 22:10
dogbert17 recompiling with no-optimize atm, when I set a breakpoint at bigintops.c:13 it stopped at a totally different line, or so it looked anyway 22:13
timotimo i have a maybe-idea 22:14
dogbert17 with optimization off it points to MVM_bigint_radix (bigintops.c:1072) 22:15
timotimo since i'm the one who wrote smallbigint :)
dogbert17 timotimo to the rescue
timotimo yeah, EZPZ
adjust_nursery is called on the bigint without checking that perhaps it's actually a smallint 22:16
would it be okay if i changed adjust_nursery to take an mp_int instead of the int size?
then it could do the check itself
MasterDuke you'd know better than i 22:17
timotimo ok, sure 22:18
dogbert17 I can test :)
timotimo laptop is currently used for something else so cant code 22:19
dogbert17 do it like Zoffix, code on your phone :) 22:20
MasterDuke i tried to make sure i only did it when it was actually big, e.g., in `if MVM_BIGINT_IS_BIG` branches, but i see that `store_bigint_result` for example sometimes uses ->u.smallint 22:22
timotimo s 22:24
er
dogbert17 store_bigint_result is always present in the stack traces I get 22:25
timotimo sorry, what?
BIGINT_IS_BIG is something else
oh
no, i meant MVM_bigint_is_big 22:26
#define MVM_BIGINT_IS_BIG(body) ((body)->u.smallint.flag != 0xFFFFFFFF)
that's the interesting one
anyway, it's not enough to take an mp_int, it has to take a P6BigintBody 22:29
P6bigintBody*
MasterDuke: got an idea if it makes sense to also adjust_nursery based on the bbase in bigint_radix? 22:32
i'll build my patch and see if it's good
22:32 benchable6 joined, committable6 joined, evalable6 joined, bisectable6 joined, unicodable6 joined, statisfiable6 joined
timotimo oh, interesting 22:35
an invalid read inside of pow
22:36 committable6 joined, bisectable6 joined, benchable6 joined, unicodable6 joined, evalable6 joined, statisfiable6 joined
timotimo right, use before init 22:36
22:36 AlexDaniel joined
AlexDaniel *knock knock* 22:36
hello :) 22:37
timotimo greetings
how are you today?
22:37 bloatable6 joined
AlexDaniel great! Welcome our new bot! 22:37
timotimo yay! hello bloatable6!
AlexDaniel timotimo++ for the idea
MasterDuke timotimo: wouldn't the bbase pretty much always be rather small?
AlexDaniel bloatable6: HEAD
timotimo MasterDuke: i have no idea :)
bloatable6 AlexDaniel, gist.github.com/3b6b9ee10b9d28fd38...55c5bd2974
AlexDaniel bloatable6: 2017.01,HEAD
bloatable6 AlexDaniel, gist.github.com/74b5556d3b03ba960c...94ac28e575
AlexDaniel bloatable6: releases
timotimo what does base store?
bloatable6 AlexDaniel, gist.github.com/11ee3f696261c7f9a2...99b549528c 22:38
timotimo ooooh you did end up making the "releases" thing!
AlexDaniel so it is basically running this github.com/google/bloaty on libmoar.so files
timotimo: didn't really do it, got it for free becauseā€¦ whateverable!
note that it accepts moarvm shas, not rakudo shas
timotimo <3 22:39
rakudo also has an .o file that we could inspect, but i see absolutely no use for that :)
(it's the containers.o and the ops.o that have their source in src/vm/moar/ops or something)
AlexDaniel oh yeah, and bloatable is not well-tested yet :) I just did it this night 22:40
so bug reports are welcome!
timotimo <3 22:41
Geth MoarVM: c4de954b70 | (Timo Paulssen)++ | src/math/bigintops.c
teach adjust_nursery about smallbigints
timotimo dogbert17: feel free to test things ^
dogbert17 so your fix is on master? 22:42
timotimo yup
dogbert17 gbert@dogbert-VirtualBox ~/repos/rakudo/nqp/MoarVM $ git checkout master 22:43
error: The following untracked working tree files would be overwritten by checkout:
3rdparty/libtommath/LICENSE
why is it complaining about libtommath?
dogbert17 removes those files 22:44
smallbigint, is there suck a type? 22:45
timotimo kill the full 3rdparty/libtommath folder
yup, it's when we store a 32bit integer inside the lower bits of the mp_int pointer
quite a worthwhile optimization 22:46
dogbert17 and .... your fix works, timotimo++
hopefully it works on 64 bit as well 22:47
timotimo ought to 22:50
give me some code that makes it asplode?
dogbert17 sure, ./perl6-valgrind-m -e '' 22:51
super complex program
timotimo heh.
MasterDuke good for me. dogbert17++, timotimo++
dogbert17 it actually failed before your fix
timotimo that gives no output at all
i mean 22:52
it directly goes from "hello i'm memcheck" to "heap summary"
AlexDaniel bloatable6: wiki
bloatable6 AlexDaniel, github.com/perl6/whateverable/wiki/Bloatable
AlexDaniel timotimo: perhaps you might want to edit this page :) 22:53
dogbert17 yes, because you have fixed the bug
timotimo AlexDaniel: what about it should i edit?
it seems correct to me?
AlexDaniel timotimo: I don't know! I thought you'd know! 22:54
timotimo ah, it doesn't say anything about how you can supply -d stuff
AlexDaniel hmmm but you can't? :)
timotimo oh
i wanted to see the source code, but it seems like it isn't pushed yet?
AlexDaniel timotimo: not yet, but here it is: gist.github.com/AlexDaniel/76a4aa8...5eb7e2a987 22:55
timotimo: so you want -d option to be configurable? 22:56
timotimo i think i'm about to go to bed or something
eyup
bloaty tells you what it'll accept from --list-sources (oslt) and it'll allow multiple comma-separated ones 22:57
AlexDaniel timotimo: what would be the syntax? bloatable: d=armembers HEAD~100,HEAD
timotimo maybe that, maybe -d armembers
though d= would be more in line with other whateverables
so that's favorable
AlexDaniel I can do both, don't think it's a problem
timotimo and perhaps pass on the output from --list-sources if you supply something bloaty doesn't understand 22:58
AlexDaniel right, right
anything else? :)
timotimo other than that i have no further suggestions
...for now :P
AlexDaniel ah-ha, okay :)
timotimo thanks again 22:59
whateverable is a really cool system
AlexDaniel yup, I love it. Now that I have a bunch of moarvm builds, maybe it will be possible to bisect moarvm too somehow, hmm :) 23:00
timotimo there's just a little problem :P
remember these .o files i mentioned above? 23:01
AlexDaniel yees?
timotimo github.com/MoarVM/MoarVM/issues/293 23:02
took me a lot of scrolling to find this
AlexDaniel timotimo: well, that doesn't sound very encouraging :) 23:03
timotimo it can give mysterious errors when mixing different versions of moar-at-rakudo-build-time and moar-at-rakudo-run-time 23:04
like "random opcode needs an argument of type something"