Perl 6 - the future is here, just unevenly distributed

IRC log for #moarvm, 2017-06-21

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

All times shown according to UTC.

Time Nick Message
00:21 timotimo wow, tc being 0 inside an MVM_interp_run
00:21 timotimo that's novel
00:25 timotimo with --optimize=0 tc stays non-0, but here i have an unbox_i that blows because the object is low-level-null
00:27 timotimo all of this while i'm trying to profile a thing
00:29 timotimo looks like it's trying to throw an exception of type X::Multi::NoMatch
00:30 timotimo without the profiler it - unsurprisingly - works
00:31 timotimo the explosion with the unbox_i happens inside a piece of regex code used by the message method via a few layers of indirection
01:48 ilbot3 joined #moarvm
01:48 Topic for #moarvm is now https://github.com/moarvm/moarvm | IRC logs at  http://irclog.perlgeek.de/moarvm/today
01:58 samcv wow
03:08 geekosaur joined #moarvm
07:12 brrt joined #moarvm
07:41 domidumont joined #moarvm
07:47 domidumont joined #moarvm
07:59 zakharyas joined #moarvm
08:41 robertle joined #moarvm
09:23 AlexDaniel joined #moarvm
09:41 geekosaur joined #moarvm
09:51 geekosaur joined #moarvm
09:52 brrt good hi #moarvm
09:52 Geth ¦ MoarVM/even-moar-jit: ae9607697a | (Bart Wiegmans)++ | src/jit/linear_scan.c
09:52 Geth ¦ MoarVM/even-moar-jit: Factor comparison out of live range heap
09:52 Geth ¦ MoarVM/even-moar-jit:
09:52 Geth ¦ MoarVM/even-moar-jit: I want to maintain two different orders for the live range heap,
09:52 Geth ¦ MoarVM/even-moar-jit: i.e. on the first_ref ascending order, and on last_ref ascending
09:52 Geth ¦ MoarVM/even-moar-jit: order, for the values that are supposed to become active and for the
09:52 Geth ¦ MoarVM/even-moar-jit: values that have been spilled respectively. So I've factored the
09:52 Geth ¦ MoarVM/even-moar-jit: comparison function out of the live range heap.
09:52 Geth ¦ MoarVM/even-moar-jit:
09:52 Geth ¦ MoarVM/even-moar-jit: A 'generic' binary heap in C would either require dynamic
09:53 Geth ¦ MoarVM/even-moar-jit: allocation (to maintain space for the temporary when swapping) or be
09:53 Geth ¦ MoarVM/even-moar-jit: written with macros. I don't find either solution very appealing.
09:53 Geth ¦ MoarVM/even-moar-jit: review: https://github.com/MoarVM/MoarVM/commit/ae9607697a
09:53 Geth ¦ MoarVM/even-moar-jit: b06409d258 | (Bart Wiegmans)++ | 5 files
09:53 Geth ¦ MoarVM/even-moar-jit: Register type of allocated spill memory
09:53 Geth ¦ MoarVM/even-moar-jit:
09:53 Geth ¦ MoarVM/even-moar-jit: Use a bucketed free list to manage spill locations, and construct the
09:53 Geth ¦ MoarVM/even-moar-jit: new local types array during JIT assembly. The GC still needs to be
09:53 Geth ¦ MoarVM/even-moar-jit: convinced to look at it.
09:53 Geth ¦ MoarVM/even-moar-jit: review: https://github.com/MoarVM/MoarVM/commit/b06409d258
10:01 brrt the binary heap thing finally got me to see some of the benefits of c++
10:54 brrt joined #moarvm
12:48 brrt joined #moarvm
13:30 Geth ¦ MoarVM: 78bed96569 | (Jonathan Worthington)++ | 16 files
13:30 Geth ¦ MoarVM: Stub in setbuffersizefh and IO vtable entry for it
13:30 Geth ¦ MoarVM:
13:30 Geth ¦ MoarVM: Will be used to enable output buffering and to pick the size of the
13:30 Geth ¦ MoarVM: output buffer.
13:30 Geth ¦ MoarVM: review: https://github.com/MoarVM/MoarVM/commit/78bed96569
13:35 Geth ¦ MoarVM: 67f718a6e5 | (Jonathan Worthington)++ | 6 files
13:35 Geth ¦ MoarVM: Follow op naming conventions consistently.
13:35 Geth ¦ MoarVM: review: https://github.com/MoarVM/MoarVM/commit/67f718a6e5
14:13 AlexDaniel joined #moarvm
14:17 Geth ¦ MoarVM: 7405dfa9e0 | (Jonathan Worthington)++ | 2 files
14:17 Geth ¦ MoarVM: Implement output buffering for sync file handles.
14:17 Geth ¦ MoarVM:
14:17 Geth ¦ MoarVM: Which can give a big performance improvement when writing lots of
14:17 Geth ¦ MoarVM: small pieces (like a line at a time) to a file.
14:17 Geth ¦ MoarVM: review: https://github.com/MoarVM/MoarVM/commit/7405dfa9e0
14:21 nine So each output handle will now have a malloced buffer. Does that mean the GC has to be made aware of that to correctly estimate memory consumption?
14:23 jnthn We've only typically applied pressure where it's liable to be an issue
14:23 colomon joined #moarvm
14:23 jnthn Also going to add in logic to free the buffer at .close
14:23 jnthn (And GC if last gasp)
14:23 timotimo if you make gigantic buffers per file, it could even cause a problem, but if we delete the buffer when you close the fh, it's no problem, because you got the file descriptor limit anyway
14:24 jnthn But since you run out of handles anyway if you don't .close, and the buffer is not typically large, you'd run out of handles first
14:25 nwc10 you get into this interesting thing here that doesn't seem to be a mandated "feature" of stdio libraries, but all the "sane" ones I've found seem to do it
14:25 nwc10 which is to flush the output buffer of STDOUT when attempting a read from STDIN
14:25 jnthn We
14:25 jnthn d'oh
14:25 jnthn We'll have to see if we really need that I guess
14:25 nwc10 or, more nuanced, seems to be "flush the output buffer of anything outputing to  tty when about to block on the read from a tty"
14:25 jnthn If we do then it would be implemented at Perl 6 level
14:26 jnthn Oh
14:26 nwc10 you need it to make interactive programs behave the was the user expects
14:26 domidumont joined #moarvm
14:26 jnthn I thought stdio didn't buffer *at all* when it's a tty?
14:26 nwc10 you might be right, but I thought that it tended to be "line buffering"
14:26 jnthn Ah, right
14:26 nwc10 but the trick described is needed to make "line buffering" work when they did (pseudcode):
14:26 jnthn Any feeling is, for now, we'll just not buffer to tty at all
14:26 nwc10 print "Tell me your number:";
14:27 nwc10 $number = <>;
14:27 nwc10 where there's no newline on the prompt string, but the programmer sort of magically assumed that somehow it will appear on the screen before the user starts to type stuff in
14:27 jnthn The other thing we need to arrange for is to .flush $*OUT and $*ERR at exit, which I guess we can do with an END block
14:28 nwc10 anyway, I should stop being PEBKAC for this keyboard and chair, and go get a train to a different keyboard and chair
14:28 jnthn Ah, and that's why the write-on-read would help
14:28 jnthn So much output to stdout/stderr is lines already though
14:29 jnthn So if you are only ever buffering until a line break...I'm wondering when that's even a win
14:42 jnthn I figure we'll introduce it slowly, anyways
14:42 jnthn For now, so slowly that you need to say :buffer or :4096buffer or so
14:42 jnthn After that we can switch it on by default for anything you open that isn't a TTY
14:43 jnthn And then with time for standard handles if they're not bound to a TTY
14:44 travis-ci joined #moarvm
14:44 travis-ci MoarVM build failed. Jonathan Worthington 'Follow op naming conventions consistently.'
14:44 travis-ci https://travis-ci.org/MoarVM/MoarVM/builds/245373104 https://github.com/MoarVM/MoarVM/compare/78bed9656948...67f718a6e586
14:44 travis-ci left #moarvm
14:45 jnthn ah, was a MOAR_REVISION bump race
14:47 nine I wonder if nowadays buffering is even important on ttys. Well maybe for ssh sessions over crappy mobile connections.
14:48 timotimo let mosh handle that problem :)
14:48 jnthn nine: iiuc, line buffering means you can only buffer one line at a time
14:48 timotimo did you see that thing where you can figure out the password someone's typing based on timing from the ssh packets?
14:49 jnthn But 99% of the output people will do with TTYs in Perl 6 is with `say`, I reckon
14:50 timotimo and for the situation "print half a line the nask for input" we have "prmpt" anyway
14:50 timotimo which could do the flush for you
14:50 jnthn It already does
14:50 timotimo splendid
14:50 jnthn But I'm saying we won't buffer TTYs *at all* anyway :)
14:50 jnthn We'll just take the path we do today
14:50 jnthn So no change
14:57 * brrt hasn't yet switched to mosh in spite of its obvious benefits
14:57 Geth ¦ MoarVM: 888b33d199 | (Jonathan Worthington)++ | src/io/syncfile.c
14:57 Geth ¦ MoarVM: Clean up output buffer on close and GC free.
14:57 Geth ¦ MoarVM: review: https://github.com/MoarVM/MoarVM/commit/888b33d199
15:14 domidumont joined #moarvm
16:09 travis-ci joined #moarvm
16:09 travis-ci MoarVM build passed. Jonathan Worthington 'Clean up output buffer on close and GC free.'
16:09 travis-ci https://travis-ci.org/MoarVM/MoarVM/builds/245405485 https://github.com/MoarVM/MoarVM/compare/7405dfa9e0a7...888b33d199ce
16:09 travis-ci left #moarvm
16:56 colomon_ joined #moarvm
17:17 TimToady joined #moarvm
17:25 AlexDaniel joined #moarvm
17:37 brrt joined #moarvm
20:39 AlexDaniel joined #moarvm
21:04 AlexDaniel joined #moarvm

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