Camelia, the Perl 6 bug

IRC log for #moarvm, 2013-07-18

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

All times shown according to UTC.

Time Nick Message
00:29 benabik joined #moarvm
00:52 dalek joined #moarvm
00:54 Util joined #moarvm
00:54 PerlJam joined #moarvm
01:01 tadzik joined #moarvm
02:05 colomon joined #moarvm
04:48 birdwindupbird joined #moarvm
05:25 FROGGS joined #moarvm
05:26 JimmyZ good morning, FROGGS
05:27 FROGGS morning JimmyZ
05:29 FROGGS later today I'm going to push MVM_{get,set}_bigint refactoring, which makes the last two bigint test fails pass
05:30 JimmyZ nice
05:31 sorear o/ FROGGS
05:31 FROGGS hi sorear
06:35 dalek MoarVM: 54b68ff | jimmy++ | / (4 files):
06:35 dalek MoarVM: added radix_I op
06:35 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/54b68ff5be
07:11 dalek MoarVM: 0c947c6 | jimmy++ | src/ (3 files):
07:11 dalek MoarVM: added isbig_I op
07:11 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/0c947c626a
07:36 dalek MoarVM: 706c550 | jimmy++ | / (7 files):
07:36 dalek MoarVM: added exp_n, log_n ops
07:36 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/706c550cd0
08:41 dalek MoarVM: b552672 | jimmy++ | / (2 files):
08:41 dalek MoarVM: fixed bug, passed 53-knowhow.t
08:41 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/b552672768
09:15 donaldh joined #moarvm
09:43 JimmyZ the CPS invocation is really tricky
09:44 jnthn That's not a bad thing :)
09:45 * jnthn would like relatively light use of that.
09:48 JimmyZ :(
09:50 jnthn The number of places it should be needed is O(10-20). If it happens more than that, I'll probably be worried.
09:53 JimmyZ yeah
09:59 FROGGS jnthn: I (locally) added a ->{get,set}_mp_int to the reprs, which doesnt convert from/to double in contrast to ->{get,set}_int
10:00 FROGGS because for some ops we converted a double to mp_int and back, totally unneeded
10:00 jnthn um, that sounds wrong...
10:00 FROGGS meh, I feared you say that
10:01 FROGGS this ->get_mp_int is only used in bigintops.c of course, if will never be returned to user land
10:02 * JimmyZ wonders how parrot/jvm does what FROGGS++ wants
10:02 * JimmyZ decommutes
10:03 jnthn There's a get_ref thingy on Parrot that is closest to right
10:04 FROGGS but then the code in bigintops.c must decide if the thing got was a P6bigint or a P6int, to call the right method
10:05 FROGGS what I did right now would just say: hey, give me a mp_int, and for a P6int it will create one, otherwise just copy its
10:06 jnthn Wait, what?
10:06 jnthn No, this sounds terribly wrong... :S
10:06 jnthn The Int type in Perl 6 is a P6opaque
10:06 jnthn Which has an mp_int inlined into its body
10:07 FROGGS the body.i, right?
10:07 FROGGS ahh, ohh
10:07 jnthn No
10:07 FROGGS hmmm
10:07 jnthn That's what the get_ref thing does; returns a pointer into the object body where a certain representation is inlined.
10:15 FROGGS lunch &
10:33 colomon joined #moarvm
11:02 FROGGS joined #moarvm
11:04 FROGGS jnthn: is it possible that you meant get_storage_spec by any chance?
11:05 FROGGS because get_boxed_ref for P6int and P6opaque will just throw an exception
11:10 FROGGS I think I could have a switch over spec.boxed_primitive, and then device from which field I read the int or mp_int value
11:14 jnthn FROGGS: https://github.com/perl6/nqp/blob/master/s​rc/vm/parrot/6model/reprs/P6opaque.c#L729
11:15 FROGGS ahh
11:15 FROGGS jnthn: so I get the mp_int * for a P6bigint and and MVMint64 * for a P6int?
11:16 jnthn FROGGS: You should never be using bigint ops on something that's a P6int.
11:17 jnthn P6int doesn't come into this stuff at all
11:17 FROGGS yeah, I see
11:17 jnthn The Int type in Perl 6 uses a P6bigint, not P6int.
11:17 FROGGS okay, I think I know what to do now
11:17 FROGGS thank you
12:31 benabik joined #moarvm
12:42 benabik joined #moarvm
12:52 colomon joined #moarvm
14:04 colomon joined #moarvm
14:44 colomon joined #moarvm
15:59 pmichaud joined #moarvm
16:35 FROGGS joined #moarvm
16:46 benabik joined #moarvm
17:48 FROGGS jnthn: how can it be that repr_data->unbox_slots is false-ish for an P6opaque holing a bigint?
17:48 FROGGS (I'm currently working on get_boxed_ref)
17:49 FROGGS holding*
18:13 jnthn FROGGS: Maybe the relevant stuff ain't deserialized?
18:13 jnthn FROGGS: Or, wait...
18:13 jnthn FROGGS: You're doing runtime type construction so probably it's just not set up
18:19 FROGGS jnthn: any hint what code I have to "steal" from vm/parrot?
18:26 jnthn FROGGS: Just search for ->unbox_slots in P6opaque :)
18:26 jnthn FROGGS: It isn't mentioned in many places, I don't imagine.
18:26 jnthn FROGGS: You're looking for the one in the codepath that originates from compose
18:26 FROGGS meh, been there, done that
18:27 jnthn /* Also list in the by-repr unbox list. */
18:27 FROGGS in function compute_allocation_strategy perhaps?
18:27 FROGGS ahh, cool
18:27 FROGGS jnthn: thanks!
19:14 FROGGS can't  believe it, it does something
19:16 colomon joined #moarvm
19:33 ggoebel joined #moarvm
19:34 cognominal joined #moarvm
19:47 donaldh joined #moarvm
20:29 FROGGS jnthn: I hope it is sane this time: https://gist.github.com/FR​OGGS/0c98a6eb54b44ba962d8
20:32 jnthn Looking much better
20:32 jnthn FROGGS++
20:32 FROGGS \o/
20:55 dalek MoarVM: 0353e3b | (Tobias Leich)++ | src/ (5 files):
20:55 dalek MoarVM: added REPR->box_func->get_boxed_ref
20:55 dalek MoarVM:
20:55 dalek MoarVM: ... especially for P6bigint, to be able to respect the REPR
20:55 dalek MoarVM: when accessing boxed and unboxed bigints.
20:55 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/0353e3ba48
20:55 dalek MoarVM: 885e9cd | (Tobias Leich)++ | nqp-cc/t/nqp/60-bigint.t:
20:55 dalek MoarVM: added (all-passing) bigint test
20:55 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/885e9cd586
21:05 * jnthn builds latest and runs tests :)
21:05 FROGGS me too (on windows)
21:21 FROGGS t\nqp\57-construction.t ............... Failed 2/2 subtests
21:21 FROGGS I'm not sure if this is new or not
21:21 FROGGS passes on linux though
21:22 jnthn Odd, it passes here for me also
21:22 jnthn On Windows
21:22 FROGGS C:\MoarVM\nqp-cc>nqp nqp-moar-cc.nqp t\nqp\57-construction.t
21:22 FROGGS 1..2
21:22 FROGGS that's all
21:22 FROGGS just followed by a newline
21:23 jnthn Hm, segv maybe?
21:23 jnthn 32 or 64 bit?
21:24 FROGGS 32
21:25 FROGGS this dies silently: my $x := A.bless(foo => [1, 2, 3], bar => 'BARBAR');
21:25 jnthn Hm
21:26 FROGGS succeeds using nqp@parrot though
21:27 FROGGS it survives if I remove the args from bless()
21:28 FROGGS ahh, the existance of arg 'bar' triggers it
21:28 FROGGS so, it dies when accessing its parent?
21:29 FROGGS (checking out an 2days old commit)
21:35 FROGGS hmmm no, failed two days ago too
21:42 * jnthn finds the throwcat* ops in MoarVM a little cruel-sounding...
21:42 jnthn Poor cats.
21:42 FROGGS hehe
21:42 FROGGS I've two huge cats :o)
21:45 dalek MoarVM: 2c3ec44 | jnthn++ | nqp-cc/src/QASTOperationsMAST.nqp:
21:45 dalek MoarVM: Map some more of the exception related ops.
21:45 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/2c3ec44c8d
21:46 FROGGS jnthn: you are working on try/catch?
21:46 jnthn yeah
21:46 FROGGS awesome :D
21:46 jnthn It's one of the big NQPHLL leftovers.
21:50 FROGGS I might pick sprintf next, that was my plan after having bigints in passings its tests
21:50 FROGGS s/in //
21:51 jnthn Well, but sprintf is implemented in NQP these days.
21:51 jnthn So we don't need a sprintf op any more. :)
21:51 jnthn In C, I mean.
21:51 jnthn We can do that Rakudo JVM does :)
21:51 colomon joined #moarvm
21:51 jnthn er, NQP JVM
21:53 FROGGS nqp@jvm has a C sprintf?
21:53 FROGGS O.o
21:55 FROGGS I thought the way to go is src/HLL/sprintf.nqp
21:55 FROGGS hmmm, maybe you said that we dont need a sprintf op in C these days
21:55 FROGGS yeah, must be it :o)
21:55 jnthn Right. :)
21:56 FROGGS I just want to get it in place and fix the last ops that are missing or broken
21:56 * diakopter pops in for a sec
21:57 * FROGGS .oO( now follows SPAGAIN? )
22:07 diakopter ?
22:44 diakopter hm, I killed the room :(
22:45 jnthn I suspect night time in Europe is more likely to blame :P

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