samcv hmm let me take a loot at the null-normalization branch. just got home, way away. still need to read all the scrollback 00:32
timotimo uh oh :) 00:34
lots of spam
me not understanding stuff, then jn explaining
fwiw, the discussion about normalization and Uni vs Str and such started in #perl6-dev
and then suddenly moved over here
samcv ah 00:35
so basically we want to get to the point where we can have no normalization of strings for our various string operators right?
timotimo oh, i'm not entirely sure if "no normalization" is also supposed to go into Str 00:36
samcv at least from the MVM side i'm talking about.
yeh no it may not be
timotimo i thought "no normalization" goes straight into Uni, but i just didn't think about it at all
samcv but regardless, the MVM functions need the ability to deal with this
timotimo it'd still be nice to have a way to get from bytes ditrectly to Uni
aye
samcv also can we UTF-8 encode strings without normalizing atm jnthn ? 00:37
idk the Uni datatype doesn't act like a string
m: Uni.new(55,55).say
camelia Uni:0x<0037 0037>
samcv i mean there should be a way to convert that into a utf-8 outputtable string for output without normalization 00:38
jnthn would know if we have or don't have that since i don't know that much about the utf8 stuff other than the minor look at i've don
timotimo we can't utf-8 encode strings without normalization because NFG isn't a thing we can encode into utf8 00:40
samcv and then we need to support string indexing and such with no normalization, which won't be that hard
timotimo and we can only put nfg-normalized stuff into strings in the first place 00:41
only with utf8-c8's magic is it possible to get differently-normalized stuff through from Str to Blob
samcv yeah
idk maybe we need to rethink things for 6.d or further on or something 00:42
cause this could be a big problem for people adopting perl 6
i mean there are many cases when you want everything to just be not normalized. and if it's not normalized we can still have it put it into graphemes but there's a lot of places we try and keep things normalized so not sure how we would do it 00:43
timotimo, but it seems that we are trying to add a NULL normalization option so we can not do normalization? and store it in a MVMString?
idk maybe have some attribute of the MVMString to denote if it is nfg form or un-normalized or whatever form it wants to be kept at 00:44
since you're supposed to be able to do Q:NFD/blah nfd string/
timotimo having null normalization is a prerequisite to go from utf8 directly to Uni 00:45
samcv ok great
timotimo in the backlog jnthn is speculating a bit about Str with different normalization to behave the same as NFG, but work at O(n) complexity rather than O(1) 00:46
(for direct indexing i mean)
samcv where n is what? 00:47
having to normalize it before matching? or what
timotimo nah, indexing into the string 00:48
samcv yeah but what changes the n 00:49
timotimo length of the string 00:50
geekosaur "behaves like NFG" implies you still index by graphemes.. which are not fixed width in other normalizations
so you'd have to iterate through the string instead of direct indexing
timotimo right. i don't think i understood the question
geekosaur samcv, that's big-O notation 00:51
samcv yeah i know what that is
i just don't understand how that would be n based on length of the string
so was wondering if it had to due with complexity of the composition state
i mean you can put non nfg in graphemes 00:52
it would just be a synthetic
and any synthetics we would have to maybe put in NFG form before doing part of the indexing 00:53
so it could depend on how many synthetics there are there
that is my thinking
geekosaur well, in this case O(n) is bounded by the length of the string, but in an actual use case you only know n after you've iterated to find it 00:54
but "bounded" is what big-O is about 00:55
samcv yeah for sure 00:56
geekosaur we're basically asserting the worst-case behavior, because best case is O(1) (always the first grapheme) and average case depends on exactly how it's being used and can't really be estimated over all use cases 00:57
02:48 ilbot3 joined
MasterDuke how do i get a backtrace with gdb after my perl6 code has died. it dies and then i try `bt full`, but i just keep getting `no stack` 03:04
geekosaur you would need to set a breakpoint in perl6's exception handler; from gdb's point of view, perl6 has exited so there is no stack 03:05
(unless it is dying on a signal) 03:07
MasterDuke not a signal, just a standard moar exception_adhoc 03:08
geekosaur right, gdb doesn't know about those
MasterDuke `break <rakudo file:line number>` doesn't work 03:10
geekosaur gdb is not a perl 6 debugger, it is a C / C++ debugger
no it does not intercept perl 6 exceptions, no it does not understand perl 6 source files or even moarvm bytecode files 03:11
MasterDuke right. so how do i "set a breakpoint in perl6's exception handler"? 03:12
geekosaur if you want it to stop on a moarvm exception, find the C function in moarvm that is invoked on moarvm exceptions and set a breakpoint there
MasterDuke i just set a breakpoint on MVM_exception_throw_adhoc, and now `bt full` has some info, but it also keeps saying `No symbol table info available.` 03:13
geekosaur that means your moarvm executable doesn't have a symbol table in it. I don;t know offhand how you build moarvm with debug symbols 03:15
MasterDuke i did build it with --debug=3 03:16
doh, i was running my system perl6 with gdb, not my local version 03:23
m: class :: { has uint64 $.x; }.new( x => 2**64-1 ).x.say 04:14
camelia -1
MasterDuke jnthn: ^^^ that's what i'm stuck on now. i have two passing todos in t/spec/S02-types/int-uint.t, but the above test in t/spec/S02-types/native.t now dies 04:16
the annoying thing is it's a todo test because it normally gives -1 as you see above, when it should give 2**64-1. the problem i'm running into is that even though the attribute is a uint64, attribute creation/assignment/etc uses signed ops 04:18
so dies with `Cannot unbox 64 bit wide bigint into signed native integer`, which would be correct if it were an int64 attribute 04:19
.tell jnthn some comments here irclog.perlgeek.de/moarvm/2017-03-17#i_14279344 if they get lost in your backscroll 04:24
yoleaux2 MasterDuke: I'll pass your message to jnthn.
06:35 domidumont joined 06:41 domidumont joined 07:01 domidumont joined 07:18 domidumont joined 07:57 brrt joined
brrt good * #moarvm 07:58
i need to rubberduck a bit 08:25
so, before a call, all active values that 'survive' the call need to be spilled 08:26
samcv hello brrt 08:45
09:00 zakharyas joined 09:36 domidumont joined
jnthn brrt: Aren't there some caller-save registers? 09:53
yoleaux2 04:24Z <MasterDuke> jnthn: some comments here irclog.perlgeek.de/moarvm/2017-03-17#i_14279344 if they get lost in your backscroll
jnthn brrt: Or is the point "we can't really take advantage of those for anything pointing to GC-managed objects"? 09:54
timotimo that was a very short rubber ducking session 10:42
jnthn Or a very asynchronous one :) 10:43
timotimo or that 10:44
nwc10 jnthn: I got this one again: paste.scsys.co.uk/557532
it's identical. (diff says so) 10:45
timotimo impressive
jnthn Once in 3 days. Arrgh. 10:46
nwc10 yes. enough that it repeats
not enough to be easily repeatable in a debugging session
and ASAN does not barf
actually, 5.5 days from first to second 10:47
brrt hi samcv, jnthn, timotimo, nwc10 11:07
it was interrupted by $work
anyway
jnthn; yes there are, we could use them, but, in general, you need to restore them prior to returning 11:09
it is not always a clear win to do this
(it would make my job a *bunch* simpler, though) 11:10
jnthn Not if we can only use them for natives, though, I guess :) 11:11
brrt well, that's a thing too 11:14
but that is actually more complicated
jnthn Yeah, I figured :)
Something for later once the "just always spill" case works, I guess
brrt right 11:16
that's basically precisely why i didn't implement some very easy optimizations yet
if i did that, i wouldn't have known if the 'bad case' ever worked 11:17
anyway, the difficulty that started my sessions
*session
I've approached this as 'shuffling' problem, i.e. the basis is that I use a graph of where each value has to move to, and where they are, and then use topological sort to get there 11:19
so, suppose the value in %rdi has to go to %r8 and some stack location; and the value in %r14 has to go to %rdi, and the value in %rsi has to go to the stack location 11:20
or, some value from 'local' space has to go to %rsi
all sorts of edges, things 11:21
jnthn Think I get the idea of how topological sort would help with that 11:22
It's basically a dependency thing
brrt right
jnthn "we need to have got the value in rdi handled before we can use that register"
brrt so; there can be cycles though
%rdi -> %rsi and %rsi to %rdi
got that covered as well
jnthn Yeah, that'll upset a toposort unless broken :)
How do you do it? Temporary register and extra edge? 11:23
brrt so one of the benefits that we have is that I know that I only get 'cycles' at the end
yes
i push the cycling nodes on a stack, move the first register in the cycle to a spare register, insert transfers while popping, and insert a transfer from the spare register to the stack 11:24
but the problem is that my detection 'do i need to handle this thing' doesn't work with values that are live, but not used 11:26
because they are not used, they are never marked as done, and so the toposort thinks it's not safe to proceed, and that it can't resolve the cycles
because I know I'm spilling them, I can just mark them as done anyway 11:27
but that means that I 'delay' the spillage until i've started the topological sort
jnthn Live but not used as in, live but are not needed for the call that is being generated? 11:28
timotimo hm, so an extra pass that determines at what point a value becomes forever-dead might help?
brrt yeah
live but not *currently used*
re: extra pass, that's not necessary, because I already know that 11:29
from the live range determination step
timotimo oh, OK 11:30
brrt the simplest thing from the perspective of the process currently is to spill such registers directly, and never mark their registers, even *if* the surviving value may be used 11:31
jnthn In some sense aren't those the "easy cases" in that we know we have to spill them and they're always going somewhere non-register?
brrt right
jnthn Are we in a position to just spill 'em up-front and not even involve them in the topsort? 11:34
brrt we could surely do that, it'd just be wasteful 11:35
jnthn How so? 11:36
Wasteful in terms of compilation time, or in the generated code?
brrt generated code 11:38
basically, you'd argue to lay out your argument s on the stack, and then load them into registers directly, totally neglecting if any of those values need to be live afterwards or ever need to be on the stack 11:39
for few-argument function calls, that would be pretty wasteful 11:40
jnthn Oh, I meant just doing it for those that we know are live but that are not going to be involved in the call 11:41
timotimo can we just count how many spots we need to open up and only spill a random subset of stuff? 11:42
jnthn Essentially, partitioning register contents into three: those things that are used in the call, those that are live but not used in the call, and those that are dead
Doing nothing for the dead, spilling the live-but-not-used-in-call directly, then using toposort to efficiently shuffle around those used in the call 11:43
brrt no, we need to spill every survivor 11:44
jnthn, that is indeed the correct solution, *but* we then need to check if a value is used, and that'sā€¦ annooying 11:45
timotimo trespassers will be spilled. survivors will be spilled again.
brrt hehehe 11:46
so i was kind of hoping, if i move it into another part of the process, will things be nicer? 11:47
jnthn brrt: What makes it annoying, ooc?
brrt 'is this value used' means i need to iterate over an array (arglist_values) to see if my value is there; i don't have a cheap O(1) way to do that, whereas for registers, I do, because the number of rtegisters is small enough to make a bitmap 11:49
matter of fact 11:51
that could simplify a bunch of things potentially
let me thinks
MasterDuke would this be an ok time to jump in with a question about how values are assigned to class attributes, particularly native uint ones? 11:53
brrt always :-) 11:54
MasterDuke excellent. the question is, how do i get the assignment to use decont_u? 11:55
m: class :: { has uint64 $.x; }.new( x => 2**64-1 ).x.say 11:56
camelia -1
MasterDuke m: my $a = class :: { has uint64 $.x is rw; }.new; $a.x = 2**64-1; $a.x.say
camelia -1
MasterDuke the -1 is the problem i'm trying to solve 11:57
and i believe i have. however, my local build (same rakudo, just modified moar) dies with `Cannot unbox 64 bit wide bigint into signed native integer` in both cases
m: my uint64 $a = 2**64-1; $a.say 11:58
camelia -1
MasterDuke i have (had) that working, but not the attribute case 11:59
oh, and the moar backtrace for when it dies locally start in OP(decont_i) in interp.c -> MVM_6model_container_decont_i -> get_int -> mp_get_int64 12:06
where i think it should be OP(decont_u) in interp.c -> MVM_6model_container_decont_u -> get_uint -> mp_get_int64 12:07
brrt what's the coodegen like 12:11
MasterDuke gist.github.com/MasterDuke17/35cc2...928bfdafdd 12:13
brrt anyway, i'd like to coin a term for something i've seen to many times: the 'Horror Interpretas', when you realize that instead of a solution to a business problem, someone's made an interpreter for solutions to the business problem
closely related to the Entity Value Model
MasterDuke updated gist, first file is --target=ast, second is --target=optimize 12:14
brrt ā€”target=mast? 12:18
MasterDuke updated. i've never looked at that output before 12:19
i see three `bindattr_o`, which is better than _i 12:20
brrt hmmm 12:22
well, it's not native
MasterDuke gist.github.com/MasterDuke17/35cc2...3-txt-L242 that doesn't look good 12:25
brrt so, it's a codegen issue it seems 12:27
MasterDuke yeah, and i think this is where i started going down the path of adding a lot of _u ops 12:32
but if there's an easier solution i'd be all for it
brrt okay, so, our basic integer size is 64 bits always 12:33
64 bit 'move' operations are sign-free
so, it doesn't matter
as long as you don't have to cast to a larger number 12:34
what does matter is artithmetic and interpretation
MasterDuke this is where i've been working github.com/MoarVM/MoarVM/blob/mast...igint.c#L9 12:36
the `if (bits > 64) {` line is incorrect for signed ints 12:38
12:57 lizmat joined 14:48 hoelzro joined 15:17 Ven joined 15:54 brrt joined 16:13 brrt joined 17:18 Ven joined
jnthn Anyone got anything in the way of me cutting a release? 19:24
(As in, reasons I shouldn't :)) 19:25
Geth MoarVM: 35ca96dc8f | (Jonathan Worthington)++ | docs/ChangeLog
Update ChangeLog for 2017.03.
19:35
MoarVM: fe15a1aa86 | (Jonathan Worthington)++ | VERSION
Bump VERSION.
19:41
jnthn Will do the rest later; feel free to spot any mistakes I missed in the changelog 19:42
19:47 domidumont joined
timotimo "grapehemian rhapsody"? :3 19:52
i'd reword "when string `a` changes length" to "when the needle changes length" 19:54
jnthn Hm, a'd be the haystack, no?
"Are these real code points? Is this just fantasy? Caught in NFG...a synthetic reality" 19:55
timotimo well, that's a good reason to reword the entry :D
the function has haystack first, then needle
so i expect you're right 19:56
Geth MoarVM: 6472908d0d | (Jonathan Worthington)++ | docs/ChangeLog
Improve wording; timotimo++.
19:57
19:57 domidumont joined
Geth MoarVM: e964a2c43c | (Jonathan Worthington)++ | docs/ChangeLog
Fix typo; MasterDuke++.
19:58
jnthn Alrighty, walk now; will cut the release later this evening 20:00
nwc10 it's not raining? 20:09
samcv good * everyone 20:21
wooo is it release time now
fun
jnthn It was making an attempt at raining 21:46
But it wasn't even drizzle, just the odd drop 21:47
Tomorrow is rain and gales
If it's as icky as forecast, I suspect I'll walk about as far as the pub next door :P
samcv ā˜” ā›† ā›ˆšŸŒ¦šŸŒ§ 21:50
jnthn Oh dear, make release now produces a busted tarball :(
Wow, the only one of those I can see anywhere is the umbrella at the start 21:51
Neither the font I use for my IRC client nor whatever Chrome uses in the IRC log as the others 21:52
m: say uninames('ā›†ā›ˆļæ½ļæ½')
camelia (RAIN THUNDER CLOUD AND RAIN REPLACEMENT CHARACTER REPLACEMENT CHARACTER)
samcv what distro do you have jnthn
jnthn Oh, interesting 21:53
Ubuntu 16.04
And in Firefox on that they all render fine :)
samcv what is your irc displayed in? 21:54
jnthn I run Windows as the host OS, and do the majority of my dev work in an Ubuntu VM. Since the virtualization costs something, stuff that usually doesn't matter ends up run outside of the VM. 21:55
So the Chrome I looked at was Chrome on Windows
IRC is PuTTY + screen + irssi
samcv ah ok
jnthn So there's 3 places for things to be confused :) 21:56
The machine running screen + irssi is some Debian
samcv i would install noto fonts on windows
jnthn I suspect I'll have some new hardware soon, and am trying to decide whether to flip the host/guest in the process
samcv jnthn, see here www.google.com/get/noto/help/install/ 21:57
will give you almost full unicode coverage
jnthn ooh, cool, thanks! :)
samcv :)
jnthn So, lemme try and figure out why make release got busted during the month...
ah 21:58
src/6model/reprs/P6bigint.h:1:21: fatal error: tommath.h: No such file or directory
Bet that'll be something to do with the submodule switch
samcv oo yeah 21:59
jnthn Yeah, release.sh needs an update
src/core/interp.c:1514:42: warning: implicit declaration of function ā€˜MVM_string_index_ignore_caseā€™ [-Wimplicit-function-declaration] GET_REG(cur_op, 0).i64 = MVM_string_index_ignore_case(tc,
Not a blocker, but did we forget a .h file addition? 22:00
samcv there is no .h addition
jnthn Ah, that'll be why there's the warning. 22:01
Geth MoarVM: 77b9195ecf | (Jonathan Worthington)++ | tools/release.sh
Fix `make release` now libtommath is a submodule
22:02
MoarVM: bb8eae83ab | (Jonathan Worthington)++ | src/strings/ops.h
Add missing prototype, to fix a warning.
22:04
jnthn That fixes it
Seems we introduced a couple with the concat/repeat result bound checks too 22:06
But those are just format string type warnings
MasterDuke: If you fancy fixing a couple of warnings, gist.github.com/jnthn/92b96619b20c...373cac3df9 :) 22:07
We're warning-clean on gcc once those are fixed :)
www.moarvm.org/releases/MoarVM-2017.03.tar.gz :) 22:09
IOninja w00t 22:10
jnthn I was worrying over a failing S17-supply/basic.t spectest failure 22:14
Turned out it's an uncommited local test for a bug I got half way through fixing a week ago :P
IOninja :)
jnthn++
jnthn Other than that, spectest is clean for me
IOninja I think there are a bunch of failures on 6.c-errata. I don't recall anyone pushing a fix to them. 22:15
These irclog.perlgeek.de/perl6-dev/2017-...i_14261864
jnthn Hmm... t/spec/S17-supply/map.t 22:16
Oh 22:17
commit 93bd430e1a7b62ac6a78ff5835624ec3b3741ea1
Author: Elizabeth Mattijsen [email@hidden.address]
Date: Wed Mar 1 13:52:06 2017 +0100
Handle fallout of List.reverse -> Seq migration
IOninja Yea
Same needs in 6.c-errata
IOninja will do later
jnthn Yeah, I think that one can just be cherry-picked
Heh, .reverse :) 22:18
It returning a Seq brought it into consideration for .hyper and .race
Funny thing is that you can implement .reverse as identity under .race 22:19
Because how would anybody know :P
(I've suggested it warn too, though, 'cus it almost certainly indicates confusion)
IOninja :D 22:20
MasterDuke huh, don't get those warnings with gcc 6.3.1 on arch linux. but yeah, i'll fix them 22:24
jnthn MasterDuke++ # thanks :) 22:25
Geth MoarVM: MasterDuke17++ created pull request #555:
Use correct format for repeat/concat errors
22:33
moarvm.org: 57ba9761bb | jnthn++ | 2 files
Update site for 2017.03 release.
jnthn samcv: D'oh, only just saw you left some more ChangeLog comments...sorry 'bou tthat 22:47
samcv np 22:50
jnthn Alright, think I should relax now. Will look at PRs tomorrow or so :) 22:52
timotimo good 'laxin, jnthn :) 22:53
jnthn Hm, even after switching PuTTY to use the Noto font, I don't see the rain stuff properly 23:01
So maybe it's irssi or screen
timotimo yeah, both of these things aren't terribly fantastic :P 23:16
i use weechat and tmux for some reason :P
IOninja jnthn: TimToady are you around? Is this a bug? rt.perl.org/Ticket/Display.html?id...xn-1453443 The current behaviour breaks 6.c-errata, and we need to know if the new change is a bug or if the old behaviour is the bug and the 6.c-errata can be changed 23:44
m: my $a = 0; my @a = ($a++,) Zxx 42; say $a; say @a; say $a 23:50
camelia 0
[(0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41)]
42
IOninja (note the $a being first zero then 42) 23:51
This looks buggish to me: 23:52
m: my $a = 0; @ = eager ($a++,) Zxx 42; say $a;
camelia 0
IOninja leaves to play games for a bit...
timotimo glhf 23:53