github.com/moarvm/moarvm | IRC logs at irclog.perlgeek.de/moarvm/today
Set by moderator on 19 October 2013.
BenGoldberg I think instead threads should register items which need to be cleaned up, and the shutdown procedure should deal with those items, but *not* call arbirtary user code; instead only clean up a limited number of types (files, semaphores, etc) that the shutdown procedure would know about ahead of time. If each known type takes a small, *finite*, amount of time, then there's no risk that exiting 00:02
will hang.
diakopter problem is there's not a way to distinguish that stuff from "arbitrary user code" 00:03
and the list of things to clean up is effectively the same as LEAVE blocks or DESTROY methods or object finalizers..? 00:04
00:05 MikeyG joined
BenGoldberg Sure there is... $*SHUTDOWN_SYSTEM.register_file_to_remove( "my_temp_file" ) can't call arbitrary user code, I don't think 00:05
Do the LEAVE blocks and DESTROY methods all get called when nqp::exit is called? 00:07
If that's the case, then simply thowing an X::ExitNow exception would likely be sufficient. 00:08
I think. 00:09
diakopter but LEAVE and DESTROY can call arbitrary user code.. 00:27
no, those don't get called 00:28
BenGoldberg If they don't *normally* get called, then we don't need to throw an exception and unroll the stack and call them... 00:46
Instead, we should only clean up what *needs* to get cleaned up.
Memory will be freed automatically by the OS when the process exits, file handles will get closed, and so on. 00:47
Things which we allocated from the operating system but which won't get automatically released, on the other hand, *ought to* get cleaned up when nqp::exit() is called. Temp files, for example. 00:48
Imho, LEAVE and DESTROY are important for long-running processes, but if a program chooses to cut it's own life short (via exit) we should only clean up what we must. 00:52
timotimo moarvm won't build at the moment: MoarVM op 'srand' is unknown as a core or extension 01:45
er, scratch that. nqp won't build
02:47 _ilbot joined
moderator github.com/moarvm/moarvm | IRC logs at irclog.perlgeek.de/moarvm/today
03:32 cognominal joined 07:40 woolfy left 07:44 _sri joined
FROGGS timotimo: what? 08:31
timotimo: you have to update MoarVM as well
08:48 lizmat joined
dalek arVM: c31660a | (Tobias Leich)++ | / (2 files):
unbust dynamic build on unixes

  -Wl,rpath,DIR must be passed to the moar binary so it can find its lib.
08:58
09:12 ssutch joined
jnthn moarning o/ 09:33
lizmat jnthn o/
09:34 woolfy joined
jnthn hi lizmat 09:39
jnthn goes for some exploring :) 09:51
&
lizmat assumes this is the more physical type of exploring using mountain boots and so
FROGGS lizmat: you dont need mountain boots everywhere in .at :o) 09:57
lizmat I'm not sure jnthn is in .at at the moment...
FROGGS lizmat: I thought he is here: act.useperl.at/apw2013/ 10:01
lizmat that only starts *next* weekend
FROGGS would be a bit early though
yes
hmmm
so, where might this be? italy? jnthn.net/tmp/by-night.jpg 10:02
hmmm, no gps coord embedded 10:03
lizmat knowing jnthn I would guess some former YU country on the mediterranean 10:04
FROGGS @all: how would you implement nqp::inf, nqp::neginf and nqp::nan? I tend to add another element to github.com/MoarVM/MoarVM/blob/mast...P6num.h#L2 10:38
this element would be set to: MVMP6num_NORMAL=0, MVMP6num_nan=1, MVMP6num_inf=2, MVMP6num_neginf=3 10:40
and would be queried by nqp::isnanorinf
ahh w/e, I give it a try 10:47
nqp: say(+nqp::inf) 10:51
camelia nqp-jvm, nqp-parrot: OUTPUT«Inf␤»
..nqp-moarvm: OUTPUT«No registered operation handler for 'inf'␤compile_op␤»
FROGGS r: say Inf.^mro 10:52
camelia rakudo-parrot ec29c0, rakudo-jvm 882e33: OUTPUT«(Num) (Cool) (Any) (Mu)␤»
FROGGS r: say Inf.WHAT 10:53
camelia rakudo-parrot ec29c0, rakudo-jvm 882e33: OUTPUT«(Num)␤»
FROGGS damn, this does not work out... this would break serialization when I add another element to the body 10:54
diakopter FROGGS: I thought a native num could store those values 11:59
dagurval I get lot's of errors when running nmake on nqp (win8). I see that you guys have nqp running, so these are windows specific? 12:36
diakopter dagurval: I build it on win8; which compiler are you using 12:37
12:37 _sri joined
dagurval VS2012 12:37
diakopter ok
dagurval let me gist the errors, just a moment. Takes a while to copy paste from cmd.exe :)
diakopter can you nopaste your configure/build output? add NOISY=1 to nmake invocation 12:38
dagurval just add the line NOISY=1 to Makefile?
diakopter no; type nmake NOISY=1 12:39
also echo your %PATH% 12:41
dagurval gist.github.com/dagurval/4a795787bf0a9b77f2ff 12:42
diakopter thanks; looking 12:44
ah; you're using strawberry perl.. I *think* everyone who's using msvc is using activeperl... I can definitely try to reproduce this though 12:45
which nqp repo revision do you have checked out? 12:46
dagurval master, last pull 18 hours ago ("Add gethostname op" was the last commit) 12:47
I can repull and rerun configure just for fun 12:48
diakopter yes plz
er same with moarvm repo revision 12:49
also show me your configure invocations? 12:55
dagurval gist.github.com/dagurval/9e7912d0f2f0950d37c6
for moar, i used --debug --prefix=..\\inst
diakopter are you sure you did nmake install for moar? 12:58
dagurval yes, the moar.exe was modified just a few minutes ago 12:59
diakopter hm
dagurval but I can delete it and rerun to make sure
didn't help 13:00
diakopter what about nmake test under moar 13:01
dagurval "MoarVM does not come with its own test suite"
diakopter er, I knew that.. (oops) :) 13:02
dagurval hehe
I wouldn't mind looking at those errors, but not sure where to start :). 13:06
moritz at the first error, usually :-) 13:08
diakopter dagurval: can I see the full moar build with NOISY=1 13:09
(so I can try to reproduce)
moritz it looks to me like there are lots of errors, and the build tries to continue regardless 13:10
which is kind of odd/stupid
line 27 has the first error, and yet it produces more than 100 additional lines after that 13:11
diakopter moritz: I mentioned that to jnthn here yesterday
he sees it too
(it=the problem) 13:13
moritz ok
you can tell I'm not a comprehensive backlogger :-)
diakopter it's possible one of the exit paths is not communicating the nonzero exitcode
dagurval gist.github.com/dagurval/371448a2484880bd5e42 13:17
diakopter dagurval: what is your %PATH% 13:18
dagurval gist.github.com/dagurval/8b1193fdddf2cdf5226d
diakopter heh 13:19
07/04/2013 11:06 AM <DIR> Microsoft Visual Studio 10.0
09/07/2013 04:05 PM <DIR> Microsoft Visual Studio 11.0
10/18/2013 08:12 PM <DIR> Microsoft Visual Studio 12.0
07/04/2013 11:03 AM <DIR> Microsoft Visual Studio 9.0
dagurval: I wonder if just for an experiment you could remove C:\\strawberry\\c\\bin from the path and then reconfigure/rebuild both moar and nqp? 13:21
FROGGS diakopter: btw, I am adding nqp::bitand_s now
diakopter FROGGS: oh! :) I noticed the _s and immediately gave up because I didn't even know what the op does
FROGGS just rename the strawberry folder
diakopter: the java implementation is pretty readable :o)
diakopter he needs a perl :P 13:22
dagurval yup, error for not having perl :P
FROGGS I heard you can download an ActivePerl installer 13:23
dagurval I can point it to the git version of perl if that makes any difference
diakopter sure, but I'm pretty curious if just removing the c\\bin one helps
dagurval did that, same errors, now it's using c:\\strawberry\\perl\\bin\\perl.exe 13:29
(same as before I think)
FROGGS <diakopter> FROGGS: I thought a native num could store those values <---- but how? 13:43
r: say "a" ~& "b" 13:50
camelia rakudo-parrot 0026bf, rakudo-jvm 882e33: OUTPUT«`␤»
dagurval I tried activeperl as suggested, also tried without --debug, same errors. I'll dig some more... :) 13:51
FROGGS weird 13:52
diakopter dagurval: make try renaming the whole ..\\inst dir and starting over also with realcleaning? 13:59
14:22 colomon joined
dalek arVM: 031e5c9 | (Tobias Leich)++ | / (8 files):
added bitand_s, bitor_s and bitxor_s
14:44
diakopter FROGGS: updated todogist :) 15:02
FROGGS diakopter: thanks! 15:05
I'd love to do the inf/-inf/nan thingies, but I need a hint :/ 15:08
diakopter FROGGS: see how it's in parrot? 15:11
FROGGS hmmm good point
bitand_s, bitor_s and bitxor_s 15:12
err
diakopter but probably finite(x) and isnan(x) and class(x)
FROGGS :pirop('set Ns'),
QAST::SVal.new( :value('-Inf') )
diakopter #if defined( MSVC ) || defined( MINGW ) 15:14
# define finite _finite
# define isnan _isnan
+#ifdef _MSC_VER 15:15
+#include <float.h>
+#endif
FROGGS: actually, this looks helpfuler: www.opensource.apple.com/source/Ja...tras.h?txt 15:16
FROGGS so, a double an already store these values? 15:17
can*
diakopter yeah..
FROGGS that is not what I would have expected :o) 15:18
but it makes me happy
thank you!
diakopter FROGGS: otoh, maybe we should include one of the nice ieee754 compat layers 15:19
timotimo that was a fresh moarvm clone, btw 15:38
diakopter timotimo: what was? {did I miss a msg?}
timotimo the one that gave me the srand problem on nqp last night 15:45
FROGGS timotimo: it builds fine for me... can pull afresh and try again? 15:47
I am almost sure it will work
timotimo will do 15:49
oh, it wasn't moarvm master
--gen-moar apparently checks out some revision 15:50
sorry
FROGGS it checks out tools/build/MOAR_REVISION 15:51
I updated these with the last commits, so that --gen-moar will work
it was just outdated I think 15:52
timotimo good thanks 15:53
i still get the srand thing, though. i wonder what i'm doing wrong 16:10
ah, of course
no, i don't get it. it's on the newest revision, but it still complains about srand 16:11
ah yes. --gen-moar looked like it succeeded, but it didn't: /usr/bin/ld: 3rdparty/sha1/libsha1.a(sha1.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC 16:12
dalek arVM: 99f2311 | (Tobias Leich)++ | / (10 files):
added inf, neginf, nan and isnanorinf
16:20
FROGGS note: this needs improvement 16:21
16:22 woolfy left
diakopter FROGGS: you saw timotimo's mention of -fPIC 16:34
FROGGS hmmm
timotimo: can you paste your makefile?
timotimo can do 16:36
gist.github.com/timo/bfcc03cc1a52a560db94
FROGGS it gets -fPIC gist.github.com/timo/bfcc03cc1a52a...1-txt-L391 16:38
ahh
diakopter FROGGS: isn't that saying libsha1 needs compiled with -fPIC ?
FROGGS timotimo: please make realclean in momarvm
moarvm*
diakopter: yes
timotimo will do
FROGGS the -fPIC was added by me yesterday, and the 3rdparty libs do not get rebuild if they exist 16:39
timotimo ah, that makes sense 16:40
now it works :)
FROGGS \\o/ 16:45
jnthn evening o/ 16:47
FROGGS jnthn: windows build is broken *cough* 16:48
but...
jnthn: hi, how ist it?
is*
jnthn ugh, worked fine for me yesterday :/
Do I need to track it down and revert something? 16:49
FROGGS hehe, well
github.com/MoarVM/MoarVM/commit/99...d75#diff-7
src\\math\\num.c(12) : error C2099: initializer is not a constant
src\\math\\num.c(13) : error C2099: initializer is not a constant
src\\math\\num.c(19) : error C2099: initializer is not a constant
I guess it is just a matter of seconds
jnthn ah, hmm 16:50
I guess you can't do that with const... 16:51
FROGGS ahh, found somthing to try... 16:52
jnthn grr, #define them also gives nasty error 16:53
FROGGS ha, it compiles 16:56
dalek arVM: 7520c7a | (Tobias Leich)++ | src/math/num.c:
unbust windows build
16:58
jnthn oh, nice :) 16:59
FROGGS don't wanna spoil your evening :o) 17:00
jnthn :) 17:02
Yeah, gonna go out for dinner in a little bit, then after that it'll be beer and hacking again :) 17:03
Yes, that fixes it here \\o/
FROGGS :o)
cool!
that is one thing I need to fix though: 17:04
nqp-m -e 'say(nqp::nan)'
nan
nqp: say(nqp::nan)
camelia nqp-moarvm: OUTPUT«No registered operation handler for 'nan'␤compile_op␤»
..nqp-jvm, nqp-parrot: OUTPUT«NaN␤»
FROGGS same for inf/neginf
jnthn Hm, we may wanna standardize the stringification, or we'll get Rakudo spectest fials 17:06
FROGGS ahh, this is done using C's sprintf? 17:12
then I have found the place
yay, it works 17:22
dalek arVM: 6e1ca3a | (Tobias Leich)++ | / (3 files):
stringify Inf, -Inf and Nan correctly
17:25
moritz nopes it's NaN, not Nan :-) 17:26
looks correctly 17:27
*correct
FROGGS typos all over the wolrd :o)
jnthn :P 17:30
FROGGS diakopter: can you strip inf/neginf/nan please? :o) 17:32
dinner &
17:43 ssutch joined
diakopter evalbot control rebuild nqp-moarvm 17:49
nqp-m: say(nqp::nan)
camelia nqp-moarvm: OUTPUT«No registered operation handler for 'nan'␤compile_op␤»
diakopter nqp-m: say(nqp::NaN)
camelia nqp-moarvm: OUTPUT«No registered operation handler for 'NaN'␤compile_op␤»
diakopter nqp-m: say(nqp::inf)
camelia nqp-moarvm: OUTPUT«No registered operation handler for 'inf'␤compile_op␤»
FROGGS diakopter: what do you mean by ieee754 compat layers btw? 17:59
diakopter for ieee754-2008 18:12
there's some open-source library to implement all those functions in an extremely cross-platform way; can't find it though 18:13
(still using hardware floats/doubles as much as possible, I mean)
(it's not the software-only one)
nqp-m: say(nqp::inf) 19:25
camelia nqp-moarvm: OUTPUT«Inf␤»
diakopter \\o/
jnthn yays
FROGGS nqp: say(nqp::inf); say(nqp::neginf); say(nqp::nan); # all in all?
camelia nqp-jvm, nqp-parrot: OUTPUT«Inf␤-Inf␤NaN␤» 19:26
..nqp-moarvm: OUTPUT«Inf␤-Inf␤nan ␤»
FROGGS ohh
benabik nan ?
jnthn aww
So close
tadzik nyan nyan nyan nyan
nqp::nyan 19:27
jnthn wonders if we fell into the "NaN is never equal to itself" trap :)
FROGGS jnthn: looks like 19:28
nqp-m: say( nqp::isnanorinf( nqp::nan ) )
camelia nqp-moarvm: OUTPUT«0␤»
FROGGS yeah
so, I'll use isnan()
moritz isnanbread() 19:29
tadzik :D
FROGGS nanbread++
jnthn or just !(foo == foo) :) 19:30
FROGGS hmmm, good point!
jnthn "Yes, this bread is certainly not a number."
FROGGS that is better
ooc, why !(n == n) and not (n != n) ?
diakopter nqp-m: say(nqp::nan==nqp::nan) 19:31
camelia nqp-moarvm: OUTPUT«0␤» 19:32
FROGGS works nicely :o)
diakopter -_
-_-
nqp-m: say(nqp::nan!=nqp::nan)
camelia nqp-moarvm: OUTPUT«1␤»
diakopter nqp-m: say(nqp::nan-nqp::nan)
camelia nqp-moarvm: OUTPUT«␤»
diakopter hahaha
nqp-m: say(nqp::what(nqp::nan-nqp::nan))
camelia nqp-moarvm: OUTPUT«␤»
diakopter -_-
nqp-m: nqp::what 19:33
camelia nqp-moarvm: OUTPUT«Error while compiling op what (source text: "nqp::what"): Arg count 0 doesn't equal required operand count 2 for op 'getwhat'␤frame_name_1083␤»
dalek arVM: 7976a88 | (Tobias Leich)++ | src/ (2 files):
fix checks for NaN, jnthn++
moritz nqp::WAT
diakopter erm.
FROGGS nqp-m -e 'say(nqp::nan)' # NaN
nqp-m -e 'say(nqp::isnanorinf(nqp::nan))' # 1
\\o/ 19:34
jnthn Including the result reg in the arg count may prove confusing ;)
diakopter yeah but at that point it's not sure whether it's supposed to have an output register
er
maybe
FROGGS diakopter: you started to work on nqp::chain, right? 19:37
diakopter yeah a bit
I'll get back to it now 19:38
FROGGS I think I'll look at xor again
diakopter FROGGS: can I do xor? 19:39
FROGGS diakopter: sure
diakopter ok thanks 19:40
FROGGS np, I was a bit scared anyway when seeing the other implementation(s) :o) 19:41
FROGGS tries to do getlexrel now 19:53
wait, that is already there... 19:54
[Coke] FROGGS: if you're implementing it for moar, can you throw in some docs if they're not already done? (in nqp)
FROGGS [Coke]: will do 19:55
20:24 woolfy joined
dalek arVM: 5d09849 | (Tobias Leich)++ | / (6 files):
added getlexrel
20:27
arVM: a77dca9 | (Tobias Leich)++ | / (8 files):
added getlexreldyn
20:49
jnthn ooh! 20:58
FROGGS jnthn: when MVM_frame_find_lexical_by_name_rel returns a MVMRegister*, is it correct to stuff that into GET_REG(cur_op, 0).o? 21:02
jnthn FROGGS: Yes 'cus it already validated it's a .o inside the function 21:04
FROGGS k
jnthn Glad you spotted htat one can be reused for the outer case of the rel ofp 21:09
FROGGS yeah
right now I am thinking about how to put getlexrelcaller together
diakopter FROGGS: there's already a dynamic searcher 21:10
jnthn caller is fun
'cus it's like, a outer at each caller
mebbe I did something sane and stealable in the JVM backend 21:11
diakopter quadratic all the things
FROGGS I guess taking MVM_frame_find_contextual_by_name as a pattern, and adopt it like the jvm does it, will do 21:12
I think I meant MVM_frame_find_lexical_by_name_rel 21:17
I might have something to push 21:27
dalek arVM: 9b2d43b | (Tobias Leich)++ | / (8 files):
added getlexrelcaller
21:31
FROGGS let's see where we trip now :o) 21:39
hmmm, I still need this hack gist.github.com/FROGGS/603692fde738639fc0d3 21:42
(so that building rakudo doesn't segfault)
Unknown QAST node type QAST::Want 21:55
as_mast
jnthn That may be quite easy to borrow from elsewhere :) 21:59
FROGGS then we would just need something blue and something old, and we are done :o) 22:02
jnthn: is that just something along the lines of: 22:05
multi method as_mast(QAST::Want $node, :$want) {
# If we're not in a coercive context, take the default.
self.as_mast($node[0])
?
Error while compiling op p6capturelex: No registered operation handler for 'p6capturelex' 22:11
k, this was my last commit for today :o) 22:12
jnthn FROGGS++ 22:14
FROGGS this was a fun and productive day :o)
and the good thing is: I've got two weeks off now
jnthn wow!
Enjoy :) 22:15
FROGGS I will :o)
tadzik hah, vacation season :)
I start mine on thursday :)
FROGGS nice *g*
jnthn :) 22:19
jnthn only has until Friday :)
But I seem to have picked a nice place to spend my free week so far. :) 22:20
FROGGS well, then there is the APW which, I suppose, will be fun too
jnthn: where are you btw?
jnthn FROGGS: Croatia :) 22:35
FROGGS: Whcih will be quite convenient for reaching APW :) 22:36
The only downside of this place is that the wifi is a little iffy.
FROGGS ohh, I always wanted to get to Croatia (especially because of the food of course) 22:37
jnthn: that happens in frankfurt in crappy hotels too :o)
jnthn Yes, I ate well so far :) 22:38
22:39 cognominal__ joined 23:00 BenGoldberg joined 23:34 benabik joined
benabik Whee.... invalid numbers are back! 23:41
jnthn oh noes 23:42
I feared it wasn't gonna be the overflow GC bug...
benabik Huh. nqp-cc isn't compiling anymore? To compile on the MoarVM backend, QAST::VM must have an alternative 'moar' or 'moarop' 23:50
diakopter oh, heh, needs the new 'qast
'
benabik: why you need nqp-cc :) 23:52
benabik diakopter: Because nqp-m isn't building, so I need to alter stage0 23:53
diakopter why not build one from a few revisions back?
:P
lee_ when i try to build nqp with moar i get "dyld: Library not loaded: libmoar.dylib" 23:54
hm, if i set DYLD_LIBRARY_PATH with the configure command it works 23:58
diakopter lee_: sounds like you could make a patch :) 23:59