Perl 6 - the future is here, just unevenly distributed

IRC log for #moarvm, 2016-11-19

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

All times shown according to UTC.

Time Nick Message
01:21 timotimo MrJones: yeah, should be possible
02:48 ilbot3 joined #moarvm
02:48 Topic for #moarvm is now https://github.com/moarvm/moarvm | IRC logs at  http://irclog.perlgeek.de/moarvm/today
07:30 zakharyas joined #moarvm
07:45 FROGGS joined #moarvm
09:18 ilbot3 joined #moarvm
09:18 Topic for #moarvm is now https://github.com/moarvm/moarvm | IRC logs at  http://irclog.perlgeek.de/moarvm/today
10:31 moritz joined #moarvm
11:43 domidumont joined #moarvm
11:44 domidumont joined #moarvm
11:50 domidumont joined #moarvm
12:46 FROGGS hmmm
12:46 FROGGS inf on aix allows me to add 1 and becomes 2139095041...
12:47 FROGGS what shall I do?
12:47 jnthn FROGGS: Example code to demonstrate what it's doing?
12:48 jnthn We're talking floating point here, I assume?
12:48 FROGGS $ ./nqp-m -e 'nqp::say(nqp::inf()); nqp::say(nqp::inf() + 1)'
12:48 FROGGS Inf
12:48 FROGGS 2139095041
12:49 timotimo what happens if you use 1e0 there?
12:49 FROGGS $ ./nqp-m -e 'nqp::say(nqp::inf()); nqp::say(nqp::inf() + 1e0)'
12:49 FROGGS Inf
12:49 FROGGS 2139095041
12:50 timotimo mhm, ok
12:50 jnthn Just to be really sure: nqp::say(nqp::add_n(nqp::inf(), 1e0)) ?
12:50 jnthn If that also gives the wrong answer, I'd write a C program and see if you can reproduce it in that also
12:50 jnthn If so...well, wtf
12:51 FROGGS add_n needs three operands
12:51 jnthn m: nqp::say(nqp::add_n(nqp::inf(), 1e0))
12:51 camelia rakudo-moar 3dcc52: OUTPUT«===SORRY!=== Error while compiling <tmp>␤Could not find nqp::inf, did you forget 'use nqp;' ?␤at <tmp>:1␤------> nqp::say(nqp::add_n(nqp::inf()⏏, 1e0))␤»
12:51 jnthn m: use nqp; nqp::say(nqp::add_n(nqp::inf(), 1e0))
12:51 camelia rakudo-moar 3dcc52: OUTPUT«Inf␤»
12:51 FROGGS err
12:51 jnthn nqp: nqp::say(nqp::add_n(nqp::inf(), 1e0))
12:51 camelia nqp-moarvm: OUTPUT«Inf␤»
12:51 jnthn Even more odd...works there
12:51 FROGGS ahh, my bad
12:52 FROGGS $ ./nqp-m -e 'nqp::say(nqp::add_n(nqp::inf(), 1e0))'
12:52 FROGGS 2139095041
12:52 jnthn o.O
12:52 jnthn I, uh...WHAT? :)
12:52 FROGGS hehe
12:52 FROGGS btw, INFINITY is:
12:52 FROGGS static  const unsigned int _SINFINITY = 0x7f800000;
12:52 FROGGS #define INFINITY  (*((float *)(&_SINFINITY)))
12:52 timotimo well, yeah, what indeed
12:52 FROGGS and unsing 1.0 / 0.0 instead of INFINITY does the same also
12:53 FROGGS using*
12:53 jnthn Can you reproduce it in a small C program also?
12:54 FROGGS sure...
12:55 jnthn Which compiler, ooc?
12:56 FROGGS gcc
12:57 timotimo hm. maybe we're getting a soft-FPU compiled into moar and ... something ends up going wrong?!
12:59 FROGGS hmm, cant reproduce in C
12:59 * jnthn has no idea :)
13:01 jnthn FROGGS: Interesting...
13:01 FROGGS aye
13:01 jnthn add_n just uses the C + operator
13:02 jnthn I guess maybe try dumping the operands we give to that
13:02 FROGGS I'll add debug statements to add_n now
13:02 jnthn In interp.c
13:02 jnthn Yeah :)
13:02 timotimo i expect i don't have to tell you to disable the jit ;)
13:03 jnthn Won't get hot enough anyway
13:03 timotimo that's true, too
13:07 FROGGS ummm, is it possible that nqp caches inf?
13:07 FROGGS so that recompiling + installing moar does not have an effect until I recompile nqp?
13:09 jnthn Pretty sure nqp::inf compiles into the op
13:09 jnthn You can moar --dump foo.mbc and check I guess :)
13:10 FROGGS thing is, I added a printf to op inf in interp.c and one to MVM_num_posinf in math/num.c
13:11 FROGGS and I see none printed
13:11 FROGGS ewww, libmoar.so is four days old in the install path...
13:13 FROGGS $ cp ../MoarVM/libmoar.so install/lib/
13:13 FROGGS cp: cannot create regular file `install/lib/libmoar.so': Cannot open or remove a file containing a running program.
13:13 FROGGS huh, was able to unlink it...
13:14 FROGGS lol, now it works >.<
13:15 FROGGS sorry for the not quite infinite noise ;o)
13:16 jnthn Wow, that's Windows-y behavior :P
13:18 FROGGS and again it did not copy that lib over :o(
13:46 FROGGS -bash-4.2$ perl -MExtUtils::Command -e unlink "/home/f/froggs/nqp/install/lib/libmoar.so"
13:46 FROGGS -bash-4.2$ ls -l /home/f/froggs/nqp/install/lib/libmoar.so
13:46 FROGGS -rwxr-xr-x 1 froggs usr 4943980 Nov 19 14:13 /home/f/froggs/nqp/install/lib/libmoar.so
14:10 FROGGS nqp passes all test now...
14:33 * jnthn will be intersted to see teh patch :)
14:33 jnthn *the
15:11 dalek MoarVM/aix: 3053175 | FROGGS++ | src/math/num.c:
15:11 dalek MoarVM/aix: AIX's INFINITY is not constant
15:11 dalek MoarVM/aix:
15:11 dalek MoarVM/aix: We're using 1.0/0.0 instead.
15:11 dalek MoarVM/aix: review: https://github.com/MoarVM/MoarVM/commit/3053175f03
15:11 dalek MoarVM/aix: d68178a | FROGGS++ | build/Makefile.in:
15:11 dalek MoarVM/aix: unlink libmoar before (re)installing it
15:11 dalek MoarVM/aix:
15:11 dalek MoarVM/aix: We cannot just replace this library on AIX, so we have to delete if first.
15:11 dalek MoarVM/aix: review: https://github.com/MoarVM/MoarVM/commit/d68178ad23
15:11 dalek MoarVM/aix: 37a65ca | FROGGS++ | build/ (2 files):
15:11 dalek MoarVM/aix: add configuration for AIX
15:11 FROGGS jnthn: it is this plus making build/mk-moar-pc.in and Configure.pl work with perl 5.8.8
15:12 FROGGS so, not much really
15:14 jnthn FROGGS++
19:27 ggoebel joined #moarvm
20:08 Ven joined #moarvm
20:22 Ven joined #moarvm
21:24 dalek MoarVM/aix: 8033714 | FROGGS++ | build/mk-moar-pc.in:
21:24 dalek MoarVM/aix: support perls older than 5.10
21:24 dalek MoarVM/aix: review: https://github.com/MoarVM/MoarVM/commit/8033714970
21:34 dalek MoarVM/aix: 42df62f | FROGGS++ | Configure.pl:
21:34 dalek MoarVM/aix: use "pkgconfig --libs libffi" additionally to --cflags
21:34 dalek MoarVM/aix:
21:34 dalek MoarVM/aix: This is needed when libffi is present in a non-standard path.
21:34 dalek MoarVM/aix: review: https://github.com/MoarVM/MoarVM/commit/42df62f56a
21:36 mtj_ joined #moarvm
21:48 MrJones timotimo: is there a tutorial for using moarvm as a library?
21:53 Ven joined #moarvm
21:57 timotimo i'm afraid not
21:57 timotimo try main.c
22:06 mst MrJones: also look at the C code inside the Inline::Perl6 module on cpan, since it sets up moarvm in a way that it can then call back into it, rather than having moarvm 'in charge'
22:09 Ven joined #moarvm
22:15 dalek MoarVM/aix: e9df523 | FROGGS++ | Configure.pl:
22:15 dalek MoarVM/aix: support perls older than 5.10
22:15 dalek MoarVM/aix: review: https://github.com/MoarVM/MoarVM/commit/e9df523ae3
22:20 dalek MoarVM/aix: c951297 | FROGGS++ | 3rdparty/libatomic_ops/src/atomic_ops.h:
22:20 dalek MoarVM/aix: Fix powerpc detection on AIX (gcc)
22:20 dalek MoarVM/aix:
22:20 dalek MoarVM/aix: GCC/powerpc-ibm-aix does not define any of __powerpc__, __ppc__,
22:20 dalek MoarVM/aix: __PPC__, __powerpc64__, __ppc64__; but it does define _ARCH_PPC (and
22:20 dalek MoarVM/aix: _POWER).
22:20 dalek MoarVM/aix:
22:20 dalek MoarVM/aix: * src/atomic_ops.h [_ARCH_PPC]: Include gcc/powerpc.h.
22:20 dalek MoarVM/aix: https://github.com/ivmai/libatomic_ops/commit/b6bfe95
22:20 dalek MoarVM/aix: Author: Tobias Leich <email@froggs.de>
22:20 dalek MoarVM/aix: Date:   Fri Nov 18 01:05:42 2016 +0300
22:20 dalek MoarVM/aix: review: https://github.com/MoarVM/MoarVM/commit/c951297ccd
22:26 dalek MoarVM/aix: b582aeb | FROGGS++ | Configure.pl:
22:26 dalek MoarVM/aix: turn another // op into defined_or sub call
22:26 dalek MoarVM/aix: review: https://github.com/MoarVM/MoarVM/commit/b582aebb37
22:32 dalek MoarVM: 3053175 | FROGGS++ | src/math/num.c:
22:32 dalek MoarVM: AIX's INFINITY is not constant
22:32 dalek MoarVM:
22:32 dalek MoarVM: We're using 1.0/0.0 instead.
22:32 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/3053175f03
22:33 dalek joined #moarvm
22:34 FROGGS gnight

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