00:02 deep-book-gk_ joined, deep-book-gk_ left 01:52 ilbot3 joined 02:07 vendethiel joined 05:18 ilbot3 joined 09:24 brrt joined
brrt timotimo++ seems like a legit fix 09:35
also, wtf deny_execmem
(although yeah, we should've checked the return code)
samcv i'm thinking of having MVM_string_codes cache the number when it's called 10:14
so if the op is called again, it doesn't have to iterate through the whole string to get the value.
i guess i would need to add it to the struct and then also make sure it gets initiated in all the places we create strings 10:16
brimonk, do you know if we initiate any of the values in the struct when we create a MVMString or do we have to set up all of them each time? i know we do it with some values like storage_type num_strands, num_graphs 10:17
11:03 dogbert2 joined
jnthn samcv: I don't really want to make MVMString any bigger for something relatively rarely wanted. 11:54
So -1 to caching code
*codes
samcv ok
jnthn Plus it matches the general principle that to ask the length in something other than the current level you're working in requires O(n) work (like asking the number of bytes means doing the encoding) 11:55
MVMString is GC-allocated though, and the GC promises us zeroed memory 11:56
samcv what does that have to do with zeroed memory? 11:59
timotimo you don't have to put code everywhere that zeroes out the codes field
jnthn You were asking if we need to intialize values in MVMString
samcv ah
ok i see what you mean
though some that may need to use codes to actually find out the codes could be annoyed that it's On every time it's asked for. but i don't personally need .codes. just seeing it could be something useful for people 12:00
12:01 brrt joined
samcv jnthn, also issue: repetitions is not normalized 12:02
m: my $v = ''; for ^100 { $v ~= "\c[ZWJ]" }; say $v.chars 12:04
camelia 1?
samcv m: my $v = "\c[ZWJ] x 100; say $v.chars
camelia ===SORRY!=== Error while compiling <tmp>?Cannot use variable $v in declaration to initialize itself?at <tmp>:1?------> my $v = "\c[ZWJ] x 100; say $?v.chars? expecting any of:? double quotes? term?
samcv m: my $v = "\c[ZWJ]" x 100; say $v.chars
camelia 100?
jnthn Hmm...I thought it checked if the first and last char were concat-stable and refused to do the strand trick if so
Seems not though :(
samcv no clue
jnthn I'm just looking at the code. It doesn't check. 12:05
timotimo committable6: releases my $v = "\c[ZWJ]" x 100; say $v.chars
committable6 timotimo, gist.github.com/e1e43586a30bbfac27...7d38bf7082
jnthn I thought I'd fixed that but apparently not
samcv but i encountered that issue when i tried to concat things and so i had to make sure neither were repetitions to work around that bug
jnthn I think the same check we do for "can we just concat these without re-normalizing" should work though
samcv jnthn, i want to look in MVM_string_repeat right? want me to fix it when i get around to it?
yeah
jnthn Yeah, please do :) 12:06
samcv well with a bit more work in certain cases
jnthn I think if the answer is "no" then we can just skip the strand repetition opt
I struggle to imagine this actually coming up in any real-world use cases 12:07
samcv for what?
jnthn I can't think of any real-world situation when the x operator would be used on something that needs re-normalization
samcv by accident :-) 12:08
that is a real world case :)
jnthn Right, pretty much
timotimo "i want a hundred grave accents on this a"
samcv also i know it happens in roast
because when i did my concat optimization, i had to not allow repetitions
otherwise it would break
some tests
jnthn *nod*
Anyway, since it should be relatively rare I think we can just say that if concating two of the things we're repeating would need re-normalization, then we just produce a single flat normalized result string 12:10
Rather than a strand string with repetitions set 12:11
I think this still isn't sufficient for concat however because you can have like
'z' x 100 ~ "\c[COMBINING ACUTE]"
And the x of z is totally fine
Where the repetition was fine but the concat needs to renormalize the final repetition 12:12
So afaict even fixing MVM_string_repeat won't be sufficient alone without some extra care in concat for that case 12:13
samcv well. for that i'd take off a repetition and combine it to the acute 12:14
but it would be more work. i considered doing it though
jnthn Yeah, that's do it but...it's work :)
brrt jnthn: how would you feel about introducing even-moar-jit in this months release, or the next? 12:28
12:44 brrt joined
jnthn brrt: I think if it can be merged in the next week, that gives 2 weeks of testing before the next release, which is pretty decent. 13:04
I figure you're best placed to know if it's ready :) 13:05
13:08 stmuk_ joined 13:30 zakharyas joined 13:49 zakharyas joined
nwc10 samcv: Stage mast : No registered operation handler for 'codes' 13:52
samcv: do you have a commit or branch locally that you're using but you've not pushed? 13:53
mmm, or is this PEBKAC? 13:54
Zoffix nwc10: are you sure you're using latest and greatest of everything? Someone else had that issue and it should've been fixed by github.com/rakudo/rakudo/commit/e051dd2def 13:56
nwc10 Zoffix: I thought I was at 13:52 but by 13:54 I wasn't any more
Zoffix: yes, you/it is right, I'm mistaken. Sorry for the noise 14:19
samcv: good *, and ignore me for now :-)
15:27 leego joined, Geth___ joined, buggable joined, Zoffix joined
timotimo samcv: it seems like your implementation of codes that iterates the codepoint iterator isn't in moarvm yet 16:13
nwc10 master/master/nom works for me 16:40
timotimo what do you mean works? 16:42
nwc10 bulds, runs spectest
timotimo right
nwc10 doesn't go "No registered operation handler for 'codes'"
timotimo yeah, that part was fixed
nwc10 OK
timotimo thing is, the codes op already existed, it just wasn't registered in nqp (and thus not used in rakduo)
nwc10 I'm not very awake today, so likely I've missed soemthing else
timotimo rakudo used to create a full decoder with the full result to count the codes 16:43
right now it just outputs the number of graphemes, which is wrong, and the spec tests should have alerted us
m: say "foo\r\nbar".codes 16:44
camelia 7?
timotimo look, that's wrong, and we have a spec test that requires this to be 8
nwc10 running the spectests in parallel with an ASAN build seems to be causing some to fail (I think due to timing issues, but not dug hard to see if it's also temp filename clashes) so I've not paid massive attention to track whether the "broken windows" are increasing
I slack at that
timotimo ok :)
thing is, before last night that test should have succeeded 16:45
huh, i might have misunderstood you
nwc10 "the spectests run. not all are passing for me, but not all were yesterday either" 16:46
timotimo ah, yes
17:12 zakharyas joined 18:04 dogbert2 joined 18:59 domidumont joined 19:02 ZofBot joined
Geth MoarVM: ed84a6329b | (Samantha McVey)++ | src/strings/ops.h
Have MVM_string_codes iterate the string with codepoint iterator

Previously it just returned the number of graphemes.
19:48
jnthn blug: 6guts.wordpress.com/2017/07/30/shr...ll-frames/ 19:53
lizmat rades 20:06
timotimo nice 20:16
21:09 lizmat joined 21:26 deep-book-gk_ joined 21:28 deep-book-gk_ left
timotimo wow, a piece of code where perf shows 24% time spent in memset 21:57
jnthn timotimo: Wow o.O I just managed to get rid of two big sources of those in the last week 22:03
Off to relax a bit then sleep, but would be interested to see it :) 22:04
timotimo from frames
let me be extra sure i have latest everything
this script starts a bunch of threads while i'm expecting no threads to be started 22:36
oh, there's a part to this library that's "no precompilation" 22:41
well, core setting takes a very small amount of time in memset 23:22
many examples in Terminal::Print takes at least 15% of time in memset 23:24
okay, this one was just 11% 23:25
23:35 ilmari[m] joined