timotimo MrJones: yeah, should be possible 01:21
02:48 ilbot3 joined 07:30 zakharyas joined 07:45 FROGGS joined 09:18 ilbot3 joined 10:31 moritz joined 11:43 domidumont joined 11:44 domidumont joined 11:50 domidumont joined
FROGGS hmmm 12:46
inf on aix allows me to add 1 and becomes 2139095041...
what shall I do? 12:47
jnthn FROGGS: Example code to demonstrate what it's doing?
We're talking floating point here, I assume? 12:48
FROGGS $ ./nqp-m -e 'nqp::say(nqp::inf()); nqp::say(nqp::inf() + 1)'
Inf
2139095041
timotimo what happens if you use 1e0 there? 12:49
FROGGS $ ./nqp-m -e 'nqp::say(nqp::inf()); nqp::say(nqp::inf() + 1e0)'
Inf
2139095041
timotimo mhm, ok 12:50
jnthn Just to be really sure: nqp::say(nqp::add_n(nqp::inf(), 1e0)) ?
If that also gives the wrong answer, I'd write a C program and see if you can reproduce it in that also
If so...well, wtf
FROGGS add_n needs three operands 12:51
jnthn m: nqp::say(nqp::add_n(nqp::inf(), 1e0))
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))ā¤Ā»
jnthn m: use nqp; nqp::say(nqp::add_n(nqp::inf(), 1e0))
camelia rakudo-moar 3dcc52: OUTPUTĀ«Infā¤Ā»
FROGGS err
jnthn nqp: nqp::say(nqp::add_n(nqp::inf(), 1e0))
camelia nqp-moarvm: OUTPUTĀ«Infā¤Ā»
jnthn Even more odd...works there
FROGGS ahh, my bad
$ ./nqp-m -e 'nqp::say(nqp::add_n(nqp::inf(), 1e0))' 12:52
2139095041
jnthn o.O
I, uh...WHAT? :)
FROGGS hehe
btw, INFINITY is:
static const unsigned int _SINFINITY = 0x7f800000;
#define INFINITY (*((float *)(&_SINFINITY)))
timotimo well, yeah, what indeed
FROGGS and unsing 1.0 / 0.0 instead of INFINITY does the same also
using* 12:53
jnthn Can you reproduce it in a small C program also?
FROGGS sure... 12:54
jnthn Which compiler, ooc? 12:55
FROGGS gcc 12:56
timotimo hm. maybe we're getting a soft-FPU compiled into moar and ... something ends up going wrong?! 12:57
FROGGS hmm, cant reproduce in C 12:59
jnthn has no idea :)
FROGGS: Interesting... 13:01
FROGGS aye
jnthn add_n just uses the C + operator
I guess maybe try dumping the operands we give to that 13:02
FROGGS I'll add debug statements to add_n now
jnthn In interp.c
Yeah :)
timotimo i expect i don't have to tell you to disable the jit ;)
jnthn Won't get hot enough anyway 13:03
timotimo that's true, too
FROGGS ummm, is it possible that nqp caches inf? 13:07
so that recompiling + installing moar does not have an effect until I recompile nqp?
jnthn Pretty sure nqp::inf compiles into the op 13:09
You can moar --dump foo.mbc and check I guess :)
FROGGS thing is, I added a printf to op inf in interp.c and one to MVM_num_posinf in math/num.c 13:10
and I see none printed 13:11
ewww, libmoar.so is four days old in the install path...
$ cp ../MoarVM/libmoar.so install/lib/ 13:13
cp: cannot create regular file `install/lib/libmoar.so': Cannot open or remove a file containing a running program.
huh, was able to unlink it...
lol, now it works >.< 13:14
sorry for the not quite infinite noise ;o) 13:15
jnthn Wow, that's Windows-y behavior :P 13:16
FROGGS and again it did not copy that lib over :o( 13:18
-bash-4.2$ perl -MExtUtils::Command -e unlink "/home/f/froggs/nqp/install/lib/libmoar.so" 13:46
-bash-4.2$ ls -l /home/f/froggs/nqp/install/lib/libmoar.so
-rwxr-xr-x 1 froggs usr 4943980 Nov 19 14:13 /home/f/froggs/nqp/install/lib/libmoar.so
nqp passes all test now... 14:10
jnthn will be intersted to see teh patch :) 14:33
*the
dalek arVM/aix: 3053175 | FROGGS++ | src/math/num.c:
AIX's INFINITY is not constant

We're using 1.0/0.0 instead.
15:11
arVM/aix: d68178a | FROGGS++ | build/Makefile.in:
unlink libmoar before (re)installing it

We cannot just replace this library on AIX, so we have to delete if first.
arVM/aix: 37a65ca | FROGGS++ | build/ (2 files):
add configuration for AIX

support perls older than 5.10
FROGGS jnthn: it is this plus making build/mk-moar-pc.in and Configure.pl work with perl 5.8.8
so, not much really 15:12
jnthn FROGGS++ 15:14
19:27 ggoebel joined 20:08 Ven joined 20:22 Ven joined
arVM/aix: 42df62f | FROGGS++ | Configure.pl:
use "pkgconfig --libs libffi" additionally to --cflags

This is needed when libffi is present in a non-standard path.
21:34
21:36 mtj_ joined
MrJones timotimo: is there a tutorial for using moarvm as a library? 21:48
21:53 Ven joined
timotimo i'm afraid not 21:57
try main.c
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:06
22:09 Ven joined
dalek arVM/aix: e9df523 | FROGGS++ | Configure.pl:
support perls older than 5.10
22:15
arVM/aix: c951297 | FROGGS++ | 3rdparty/libatomic_ops/src/atomic_ops.h:
Fix powerpc detection on AIX (gcc)

GCC/powerpc-ibm-aix does not define any of __powerpc__, __ppc__, __PPC__, __powerpc64__, __ppc64__; but it does define _ARCH_PPC (and _POWER).
  * src/atomic_ops.h [_ARCH_PPC]: Include gcc/powerpc.h.
  github.com/ivmai/libatomic_ops/commit/b6bfe95
Author: Tobias Leich [email@hidden.address] Date: Fri Nov 18 01:05:42 2016 +0300
22:20
arVM/aix: b582aeb | FROGGS++ | Configure.pl:
turn another // op into defined_or sub call
22:26
arVM: 3053175 | FROGGS++ | src/math/num.c:
AIX's INFINITY is not constant

We're using 1.0/0.0 instead.
22:32
22:33 dalek joined
FROGGS gnight 22:34