01:38
colomon joined
|
|||
timotimo | clever bit of the day: | 01:52 | |
how do you compare an int with an Int? | |||
obviously you box the int into an Int and do eq_I | 01:53 | ||
02:21
colomon joined
|
|||
timotimo | same for subtraction of a num and a Num ... :( | 02:37 | |
it even boxes, then immediately unboxes again | |||
02:46
geekosaur joined
04:26
vendethiel joined
|
|||
diakopter | timotimo: well, the compiler can't prove that the Int isn't bigger than the max int | 05:50 | |
(yet?) | 05:51 | ||
07:46
domidumont joined
09:02
vendethiel joined
10:32
kjs_ joined
11:10
kjs_ joined
13:20
colomon joined
16:10
lucasb joined
|
|||
lucasb | hello there | 16:20 | |
I was trying to understand that string ropes bug | |||
moritz | howdy | ||
lucasb | oh, hey moritz. thanks for fixing that empty signarture smartmatch bug :) | ||
moritz | lucasb: you're welcome. It turned out to be easy enough for me to do with my rusty skills :-) | 16:21 | |
now I'm fighting with vagrant, virtual networks, ansible and debian instead :-) | 16:22 | ||
lucasb | I just wanted to describe my understanding of the string bug. | 16:27 | |
It seems it only happens on the special situation when there's a string with 2 or more strands, with repetitions and when you ask substr for a specific offset into the string. | |||
I tried to read the source code of MVM_string_{concatenate,repeat,substring} to understand, but it looks ok. | |||
So, my guess is that the bug may live in the MVMGraphemeIter functions, maybe more specific in the MVM_string_gi_move_to function, which is called by the substr function. | |||
here is a section of the code: github.com/MoarVM/MoarVM/blob/mast....h#L89-L97 | 16:28 | ||
in there, you can see 2 lines: | 16:29 | ||
MVMuint32 remaining_reps = remaining / rep_graphs | |||
gi->repetitions -= remaining_reps | |||
konobi | how goes things on the moarvm front? | ||
moritz: sounds like you need to get on the docker train | 16:30 | ||
lucasb | when remaining is 1 and rep_graphs is greater than 1, than remaining_reps gets assigned 0 | 16:31 | |
and then 0 repetitions is decremented, that's where I think may lie some bug | |||
moritz | konobi: then I struggler with docker, virtual networks, ansible and debian :-) | ||
*struggle | 16:32 | ||
konobi | moritz: github.com/mobify/dmit | ||
and a lot of what you do with ansible can be done with docker build | 16:33 | ||
moritz | well, I'll eventually jump onto the docker wagon, but not yet | 16:35 | |
konobi | would be nice to have a perl6/moarvm docker image | ||
easy dev env for anyone | 16:36 | ||
moritz | konobi: like hub.docker.com/r/pmakholm/perl6/ ? | ||
konobi | nice | 16:37 | |
16:43
mst joined
17:05
domidumont joined
17:08
domidumont joined
|
|||
timotimo | lucasb: i'm glad you're looking into this bug | 17:08 | |
sadly i'm no wiser than you | 17:09 | ||
17:15
zakharyas joined
|
|||
lucasb | timotimo: I think you're much more wiser than me :) | 17:15 | |
I took several days to read the source and try to understand | 17:16 | ||
I hope jnthn can have some time to take a look at it later | |||
jnthn: ^^^ | |||
the commit that introduced that code was github.com/MoarVM/MoarVM/commit/56...db03558342 | 17:17 | ||
in summary, I think the issue is blindly dividing "remaining / rep_graphs" and expecting that the result will always be greater than 0 | 17:20 | ||
timotimo | right, so we want a float division and a ceil? | 17:24 | |
lucasb | or maybe just a special case: if (remaining < rep_graphs) then ... else do the usual thing | 17:26 | |
timotimo | seems a little bit smelly to have that. i dunno | ||
18:06
cognominal joined
18:21
vendethiel joined
19:30
FROGGS joined
19:40
geekosaur joined
20:38
vendethiel joined
21:01
colomon joined
|
|||
jnthn is too tired to look at code (been tired all day :S) | 21:53 | ||
But I suspect lucasb++ has got it tracked down to the right place...it makes sense | |||
Will see if I can make more sense of it once I've more brane :) | |||
21:59
vendethiel joined
22:04
geekosaur joined
23:01
vendethiel joined
23:28
vendethiel joined
|