Perl 6 - the future is here, just unevenly distributed

IRC log for #moarvm, 2016-10-31

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

All times shown according to UTC.

Time Nick Message
00:19 ggoebel joined #moarvm
00:30 btyler joined #moarvm
01:08 MasterDuke Attempt to divide 1 by zero using div
01:08 MasterDuke in method floor at src/core/Rational.pm line 53
01:08 MasterDuke rest of the output here: https://gist.github.com/MasterDuke17/329ef1137de503c73ef42668cd55b285
01:09 timotimo you're saying it shouldn't blow up when stringified via gist?
01:11 MasterDuke ? no, i'm just showing a backtrace with the source file+line number, instead of m-CORE.setting
01:13 timotimo oh!
01:13 MasterDuke however, it's a complete hack, completely unusable
01:13 timotimo sorry, i'm kind of tired
01:13 timotimo i didn't realize that. i even used the filename to get at the right core :D
01:13 MasterDuke ha! but that is the point!
01:16 timotimo i meant: i read the file names and clearly used one of them, but still didn't realize that's what changed
01:17 MasterDuke yep, exactly why i think it's a good thing to implement
01:17 timotimo yes
01:18 timotimo do we want to make this accessible to user scripts, too? probably. for things like FatPack?
01:18 timotimo but if the actual pre-packed source isn't available, that could become annoying
01:18 timotimo perhaps an env var that turns translations off would be necessary
01:19 MasterDuke there was some discussion about this a week or two ago
01:19 timotimo also, i wonder if this could be an attack/obfuscation vector. giving your code a different filename that it claims to have to hide evil code from investigators
01:19 MasterDuke in #perl6-dev i think
01:19 MasterDuke there seemed to be consensus for making the change
01:20 timotimo mhm
01:21 timotimo it's not easy to get spesh post-inline optimization to not explode :\
01:21 MasterDuke the problem of not having the source was explained away since the end user doesn't necessarily have the core settings either
01:21 MasterDuke so it's not like its name+line number is any more useful
01:21 timotimo mhm
01:23 MasterDuke but like i mentioned, the way it's currently implemented is completely wrong
01:24 MasterDuke in that it only works if you run perl6 from the directory where you've checked out+built the source
01:24 timotimo oh, whoops :)
01:24 timotimo don't say it actually opens the files to look for the annotationl ines?
01:24 MasterDuke i'd be lying if i said no
01:24 timotimo right
01:26 timotimo what we can do is this: have a data structure built up during compilation, put it into the serialized blob and "turn it on" for a given compilation unit with a nqp::op that gets put into the dependencies+deserialize part of the comp unit
01:26 timotimo how does that sound?
01:26 MasterDuke way over my head
01:27 MasterDuke but yeah, it obviously has to happen at compilation time
01:27 timotimo there could either be an op that gets that registered datastructure at the time we create the backtrace
01:28 timotimo or the resolution of lines/filenames would happen in C code, in which case it'd not have to go through an op to fetch the data
01:28 timotimo you were working on this in C code? or in p6/nqp land?
01:28 MasterDuke c
01:28 timotimo OK
01:28 MasterDuke src/core/exceptions.c
01:29 timotimo so imagine you could just frame->staticframe->line_annotations
01:29 timotimo and get something where you could iterate or binary-search or something
01:31 MasterDuke yeah, i've been trying to file where line_number gets set for an annotation, but haven't found it yet
01:31 timotimo oh
01:31 timotimo that one's easy
01:32 timotimo it grabs it off a QAST node's "node" attribute
01:32 timotimo which is the match object that created it
01:33 MasterDuke oh, that happens in nqp?
01:34 timotimo the code that does it lives in the QASTCompilerMAST.nqp i expect
01:38 MasterDuke hm, git grep line_number in nqp shows nothing
01:38 timotimo one sec.
01:39 timotimo src/vm/moar/QAST/QASTOperationsMAST.nqp:        nqp::bindattr_i($obj, MAST::InstructionList, '$!lineno', $lineno);
01:40 MasterDuke ah, thanks
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
06:51 geekosaur joined #moarvm
08:10 zakharyas joined #moarvm
08:24 domidumont joined #moarvm
08:26 vendethiel joined #moarvm
08:29 domidumont joined #moarvm
08:34 domidumont joined #moarvm
09:16 FROGGS joined #moarvm
09:17 FROGGS o/
09:17 nwc10 \o
09:20 jnthn o/
09:44 kjs_ joined #moarvm
10:14 * FROGGS just opened https://github.com/ivmai/libatomic_ops/issues/19
10:18 kjs_ joined #moarvm
10:21 dalek MoarVM: 0ae47f3 | FROGGS++ | src/moar.h:
10:21 dalek MoarVM: workaround missing libatomic_ops prototype on s390x
10:21 dalek MoarVM:
10:21 dalek MoarVM: See https://github.com/ivmai/libatomic_ops/issues/19
10:21 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/0ae47f3fbc
10:23 FROGGS .tell nebuchadnezzar Is there anything else I can do for you? otherwise I'd leave it in this state: https://gist.github.com/FROGGS/9c06ac23b493be80e305d7aa1687a43c
10:23 yoleaux2 FROGGS: I'll pass your message to nebuchadnezzar.
10:23 FROGGS .tell domidumont Is there anything else I can do for you? otherwise I'd leave it in this state: https://gist.github.com/FROGGS/9c06ac23b493be80e305d7aa1687a43c
10:23 yoleaux2 FROGGS: I'll pass your message to domidumont.
11:18 FROGGS[mobile] joined #moarvm
12:17 FROGGS[mobile]2 joined #moarvm
14:15 dalek joined #moarvm
14:32 kjs_ joined #moarvm
15:14 kjs_ joined #moarvm
15:27 domidumont joined #moarvm
15:29 domidumont1 joined #moarvm
15:46 dalek MoarVM: 0625555 | jnthn++ | src/6model/reprs/ReentrantMutex.c:
15:46 dalek MoarVM: Panic when trying to GC a locked mutex.
15:46 dalek MoarVM:
15:46 dalek MoarVM: Otherwise, we will end up with a SIGABRT with no explanation on some
15:46 dalek MoarVM: platforms, which will be harder to debug.
15:46 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/062555524f
15:46 dalek MoarVM: d87061f | jnthn++ | src/core/exceptions.c:
15:46 dalek MoarVM: When we panic, note that's what we're doing.
15:46 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/d87061f38f
15:47 jnthn So, an interesting nugget
15:48 jnthn I got curious how the JVM handles these cases without exploding
15:48 jnthn Thankfully, hotspot is open-source so you can find out easily these days ;)
15:48 jnthn Turns out that they keep a condvar per thread
15:48 jnthn They define two operations on a thread: park and unpark
15:49 jnthn When they park a thread, they have it block on a condvar
15:49 jnthn The unpark operation on a thread simply signals said condvar
15:49 jnthn They then implemnet things like ReentrantLock in higher-level code.
15:50 jnthn Keeping a queue of waiters, which are parked until they reach the head of the queue
15:51 jnthn Since the only "real" OS-level mutexes around are just the ones per thread for the condvar, the GC-able things are thus higher level data structures
15:51 jnthn So "no problem"
15:55 jnthn We could at some point consider doing similar :)
15:56 jnthn (Of course, real world code that locks, then lets the lock get GC'd, is busted anyway)
15:56 jnthn (So that's the real bug I need to now hunt down.)
16:05 kjs_ joined #moarvm
16:52 domidumont joined #moarvm
17:29 domidumont FROGGS[mobile]2: I'm going to use your s390x patches as well. Thanks a bunch for the work ! :-)
17:29 yoleaux2 10:23Z <FROGGS> domidumont: Is there anything else I can do for you? otherwise I'd leave it in this state: https://gist.github.com/FROGGS/9c06ac23b493be80e305d7aa1687a43c
17:31 domidumont FROGGS[mobile]2: I think we're fine. Let me upload the package and check what's going on on real hardware.
17:52 FROGGS[mobile]2 \o/
19:26 vendethiel- joined #moarvm
19:53 leedo joined #moarvm
20:32 FROGGS joined #moarvm
20:33 FROGGS o/
20:38 FROGGS t/04-nativecall/02-simple-args.t ......... ok
20:38 FROGGS Build killed with signal TERM after 150 minutes of inactivity
20:38 FROGGS :o(
20:38 FROGGS ohh, my bad
20:38 FROGGS that was from an old log!!
20:38 FROGGS phew :o)
20:41 * FROGGS watches https://buildd.debian.org/status/package.php?p=moarvm and https://buildd.debian.org/status/package.php?p=rakudo
21:15 FROGGS joined #moarvm
21:29 MasterDuke joined #moarvm

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