github.com/moarvm/moarvm | IRC logs at colabti.org/irclogger/irclogger_logs/moarvm
Set by AlexDaniel on 12 June 2018.
01:37 MasterDuke joined, p6bannerbot sets mode: +v MasterDuke 01:38 MasterDuke left, MasterDuke joined, herbert.freenode.net sets mode: +v MasterDuke, p6bannerbot sets mode: +v MasterDuke 02:38 evalable6 left 02:42 evalable6 joined 02:43 p6bannerbot sets mode: +v evalable6 05:22 MasterDuke left 05:45 robertle left 06:34 domidumont joined, p6bannerbot sets mode: +v domidumont 06:40 robertle joined 06:41 p6bannerbot sets mode: +v robertle 07:08 domidumont1 joined 07:09 p6bannerbot sets mode: +v domidumont1 07:11 domidumont left 08:00 robertle left 08:10 dogbert17 left 08:16 domidumont1 left 08:33 robertle joined, p6bannerbot sets mode: +v robertle 08:43 robertle left 08:55 domidumont joined 08:56 p6bannerbot sets mode: +v domidumont 09:14 robertle joined, p6bannerbot sets mode: +v robertle 09:33 zakharyas joined 09:34 p6bannerbot sets mode: +v zakharyas 09:35 zakharyas1 joined, p6bannerbot sets mode: +v zakharyas1 09:37 zakharyas left 10:46 domidumont left 10:50 brrt joined 10:51 p6bannerbot sets mode: +v brrt 11:44 dogbert17 joined 11:45 p6bannerbot sets mode: +v dogbert17
brrt ohai #moarvm 11:55
nwc10 good *, brrt
brrt .tell jnthn I thought about it some more; I have, for my side, two topics that I might be able to say something about, one being the concept of a 'hackable' JIT; you might weigh in about that (spesh plugins)
yoleaux brrt: I'll pass your message to jnthn.
brrt good * nwc10 11:56
the other being, bringing fork() to the threading masses
(I have a cunning plan to make it more general using the GC, but I'm not going to claim it is a universally good idea)
11:57 lucasb joined, p6bannerbot sets mode: +v lucasb 12:13 zakharyas1 left
lucasb m: my str @a; @a[5] = 'x'; say @a[0] 12:25
camelia concatenate requires a concrete string, but got null
in block <unit> at <tmp> line 1
lucasb ^^ sorry to ask again, this issue is old, but can something be done about it? Is there some technical impediment? 12:27
Just noticed a interesting detail, .Str populates those 'null' slots:
m: my str @a; @a[5] = 'x'; say @a; @a.Str; say @a
camelia [x]
[ x]
brrt lucasb: I know nothing abou tit 12:28
lizmat lucasb: ticket ?
lucasb github.com/MoarVM/MoarVM/pull/767 12:30
lizmat m: use nqp; my str @a; @a[5] = "a"; say nqp::atposref_s(@a,0) # seem atposref_s is at fault here
camelia concatenate requires a concrete string, but got null
in block <unit> at <tmp> line 1
lizmat lucasb: I think the atposref_s didn't even exist at the time the ticket was made 12:32
jnthn: ^^^
guess we need some magic at lib/MAST/Ops.nqp line 10926 12:40
ah no, not
lizmat goes off to look at something else 12:43
hmmm... nqp::atposref_s does return a container 12:52
m: use nqp; my str @a; @a[5] = "a"; say nqp::iscont(nqp::atposref_s(@a,0))
camelia 1
lizmat m: use nqp; my str @a; @a[5] = "a"; say nqp::isnull_s(nqp::atposref_s(@a,0)) # but the container returns a null_s 12:53
camelia 1
12:56 robertle left
lizmat thinking more about this, I think nqp::concat needs work: 13:31
m: use nqp; my str @a; nqp::concat(@a[0],"") # should that work or not ? 13:32
camelia concatenate requires a concrete string, but got null
in block <unit> at <tmp> line 1
lizmat jnthn: ^^^
jnthn Hmm
yoleaux 11:55Z <brrt> jnthn: I thought about it some more; I have, for my side, two topics that I might be able to say something about, one being the concept of a 'hackable' JIT; you might weigh in about that (spesh plugins)
jnthn I think maybe it's more to do with the array access
brrt (I was talking about the MoreVM conference, btw)
lizmat jnthn: you want it to return nqp::isnull_s so you can check for that
otherwise the point of null_s becomes rather moot 13:33
this only really becomes a problem as soon as we try to concatenate it with something
and in the setting that happens all over the place
jnthn No, it'll be a problem with every single string op
Since they all do a concreteness check
lizmat ah... hmmm
then atposref_s should return a conainer that returns "" if it is isnull_s 13:34
jnthn m: my str @a; use nqp; dd nqp::atpos_s(@a, 0) 13:35
camelia ""
jnthn m: my str @a; use nqp; dd nqp::atposref_s(@a, 0)
camelia ""
jnthn huh :)
m: my str @a; @a[5] = 'x'; use nqp; dd nqp::atpos_s(@a, 0)
camelia ""
jnthn m: my str @a; @a[5] = 'x'; use nqp; dd nqp::atposref_s(@a, 0)
camelia ""
jnthn Is dd lying, or? :) 13:36
lizmat no, that's the hack we put in place I think 13:38
m: my str @a; @a[5] = 'x'; use nqp; say nqp::atposref_s(@a, 0) 13:39
camelia concatenate requires a concrete string, but got null
in block <unit> at <tmp> line 1
lizmat m: my str @a; @a[5] = 'x'; use nqp; say nqp::atposref_s(@a, 0).perl
camelia ""
13:44 robertle joined, p6bannerbot sets mode: +v robertle 14:04 zakharyas joined, p6bannerbot sets mode: +v zakharyas 14:06 brrt left
timotimo jnthn: do you think it would be a bad idea to start implementing a "force thread $foo to 'throw' an exception the next chance it gets" feature in moarvm? based on the GC signaling mechanism just like the suspend/resume stuff in the debugserver? 14:09
lizmat timotimo: that sounds like an excellent feature :-) 14:11
with a typed exception and a CATCH in the thread, it could also be used for a graceful exit 14:12
dogbert17 timotimo, jnthn: S17-supply/return-in-tap.t flaps sometime with the gisted message: gist.github.com/dogbert17/3f54c8c5...bb1bd902f0 14:17
any theories as to why?
timotimo that's weird 14:19
oh, another thing we should probably have ... aaaand i forgot what i wanted to say 14:20
ah, right, "manually" invoking the debugger's "unhandled exception" mode, so that the HLL can put that into the thread pool scheduler as well as in the top exception handler that gets everything
jnthn timotimo: Probably it'd have to be done with the GC signalling mechanism to make it safe/efficient, yes 14:21
timotimo IIRC we already decidde on that much
i assume the API will want a thread object, or maybe it should just take the thread ID?
jnthn But what's the goal for doing it?
Thread object for sure 14:22
That said, it *is* going to be a bit awkward
Because basically any allocation would potentially throw 14:23
And a lot of code inside of the VM won't be expecting that.
timotimo yeah :\ 14:24
jnthn So we'd be adding something with a list of caveats ("won't help if you're blocked in I/O", "won't help if you're blocked on a mutex", "won't help if you're in a native call", etc.) and that if used even those aside is liable to leak memory.
timotimo leak memory, or just system resources in general? 14:25
jnthn Maybe the latter if we're unlucky
At the moemnt, there's an expectation that any allocation failure is fatal (so, panic, not throw) 14:26
timotimo oof, yeah
and not everything is "throwish" in the jit, especially
jnthn That also
So it'll be expensive to do right
And I fear folks will treat it like "ooh I can use this to cancel a thread uncooperatively"
timotimo in theory we could have a separate check that we emit when we do the "goto upwards or frame entry/exit" 14:27
jnthn I mean, it's a bit more cooperative than some things :)
timotimo i kind of wish we could interrupt most IO sanely ... i mean there is signal handlers but ...
jnthn .Net has similar, for what it's wrorth. The result is people with catch-all handlers catch the exception. They've made it so that it keeps on throwing even if caught, curiously. :) 14:28
Which means with logging and a deep stack it can produce quite a lot of log entries. :-)
Czech class time, bbl
timotimo see what .net has wroth 14:29
i'm actually not entirely sure what we'd use "send an exception to a thread" for rather than "kill a worker" if we don't want to offer "i can abort this code!" to users 14:44
15:28 domidumont joined 15:29 p6bannerbot sets mode: +v domidumont 15:35 brrt joined 15:36 p6bannerbot sets mode: +v brrt 15:43 zakharyas left 15:48 lizmat left
timotimo oh, i can't just give rakudo an op that eats an exception and invokes the "unhandled exception" handler of the debugserver, right? because then the stack would have the handler on top of it and that'd be weird? maybe? 16:05
hmm. that doesn't give me a way to "properly" handle rethrows? 16:10
do we put another stack frame on top of the existing handler when the handler rethrows, i wonder?
16:23 brrt left 17:54 brrt joined 17:55 p6bannerbot sets mode: +v brrt 18:22 zakharyas joined 18:23 p6bannerbot sets mode: +v zakharyas 18:26 lucasb left 18:45 brrt left 19:10 zakharyas left 19:23 lizmat joined, p6bannerbot sets mode: +v lizmat 19:54 brrt joined 19:55 p6bannerbot sets mode: +v brrt, brrt left 20:02 zakharyas joined 20:03 p6bannerbot sets mode: +v zakharyas
Geth MoarVM/jit-expr-float: 6 commits pushed by (Bart Wiegmans)++ 20:39
20:40 domidumont left 21:15 zakharyas left 21:30 robertle left 22:12 lucasb joined, p6bannerbot sets mode: +v lucasb
Geth MoarVM: caf1070327 | (Timo Paulssen)++ | tools/trace_spesh_optimizer.gdb
Bring Trace Spesh Optimizer GDB Script Up To Date
22:12
MoarVM: e73556499d | (Timo Paulssen)++ | src/spesh/optimize.c
Rename optimize_coerce To _in, Add coerce_ni

in cases where a coerce_ni is used on the result of a coerce_in, we can just use the original integer.
Normally, the combination of these ops would cause truncation of integers to only ~52 bits of precision, ... (5 more lines)
MoarVM: 640a146115 | (Timo Paulssen)++ | src/spesh/optimize.c
Teach optimize_smart_coerce About Boot Types

BOOTInt, BOOTNum, and BOOTStr wouldn't be recognized to not have a Str or Num method, but since we made them, we can be sure (if the user didn't meddle).
... (7 more lines)
timotimo whoops, i forgot to kick the one in the middle out
timotimo also, we're going to build a release soon? 22:13
lizmat like last Saturday ? :-)
timotimo i might want to revert them until then?
oh, we already did?
jnthn Probably new opts should not go in
Prior to release
lizmat no, that's the point :-)
jnthn But just mention to samcv++ to make a release branch before them :)
timotimo OK, i'll push a revert commit 22:23
also, the one about in and ni shouldn't have gone into master 22:24
22:25 Kaiepi is now known as Highpie
Geth MoarVM: fe4b6c45ad | (Timo Paulssen)++ | src/spesh/optimize.c
Revert "Teach optimize_smart_coerce About Boot Types"

This reverts commit 640a146115d945c122e98e8576767862ac6e3353.
Shouldn't have gone into master just before a release
22:26
MoarVM: 7b1eacea99 | (Timo Paulssen)++ | src/spesh/optimize.c
Revert "Rename optimize_coerce To _in, Add coerce_ni"

This reverts commit e73556499d47b52125add4b1c19c8c70633cd002.
Shouldn't go into master until it's clear how it impacts perl6 code on top of just nqp.
23:15 Highpie is now known as Highpi