Perl 6 - the future is here, just unevenly distributed

IRC log for #moarvm, 2017-10-25

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

All times shown according to UTC.

Time Nick Message
01:56 ilbot3 joined #moarvm
01:56 Topic for #moarvm is now https://github.com/moarvm/moarvm | IRC logs at  http://irclog.perlgeek.de/moarvm/today
03:06 ZofBot joined #moarvm
03:07 ZofBot joined #moarvm
05:45 AlexDaniel` joined #moarvm
05:49 AlexDaniel` joined #moarvm
06:31 brrt joined #moarvm
06:41 brrt good * #moarvm
06:44 Geth ¦ MoarVM/jit-expr-optimizer: a4b3e25c9f | (Bart Wiegmans)++ | 5 files
06:44 Geth ¦ MoarVM/jit-expr-optimizer: Remove op_info pointer
06:44 Geth ¦ MoarVM/jit-expr-optimizer:
06:44 Geth ¦ MoarVM/jit-expr-optimizer: The op_info pointer is always going to be identical to that which is
06:44 Geth ¦ MoarVM/jit-expr-optimizer: loaded from the MVM_jit_expr_op_info function, which is itself just a
06:44 Geth ¦ MoarVM/jit-expr-optimizer: constant table lookup. So there's no need to keep it arround.
06:44 Geth ¦ MoarVM/jit-expr-optimizer: review: https://github.com/MoarVM/MoarVM/commit/a4b3e25c9f
06:49 brrt this was actually the least important problem i had
06:57 domidumont joined #moarvm
07:06 domidumont joined #moarvm
07:37 brrt joined #moarvm
07:39 AlexDaniel` joined #moarvm
07:40 brrt i don't know if i already told you, but i decided that it is probably the best idea to extend the expr template compiler to protect against conditional-use-before-unconditional-use
08:03 JimmyZ joined #moarvm
08:06 zakharyas joined #moarvm
08:14 zakharyas joined #moarvm
09:07 zakharyas1 joined #moarvm
09:09 SourceBaby joined #moarvm
09:36 zakharyas joined #moarvm
09:51 samcv good * brrt :)
09:57 brrt hi samcv
10:03 brrt oh, part of what i still wanted to say, is that if i want that, i'll need a separate stage between macro expansion and name substition in the template compiler
11:18 samcv brrt, which JIT documents are up to date?
11:18 samcv ir.md, overview.org, runtime.md, tiles.md, todo.org
11:19 samcv which ones or possibly all of them?
11:20 brrt overview.org is most up to date
11:20 brrt actually, all of them, except tiles.md
11:20 samcv ok
11:21 samcv i will add those to the current docs list
11:21 brrt todo.org is arguably not a 'document' per se
11:21 brrt eh, not documentation
11:22 samcv that's fine
11:23 zakharyas joined #moarvm
11:30 Geth ¦ MoarVM: 9a0ad37a40 | (Samantha McVey)++ | docs/README.md
11:30 Geth ¦ MoarVM: Update docs/README.md with links to current documentation
11:30 Geth ¦ MoarVM:
11:30 Geth ¦ MoarVM: Since the new JIT expression engine and overview are current, they
11:30 Geth ¦ MoarVM: should be added to README.md.
11:30 Geth ¦ MoarVM:
11:30 Geth ¦ MoarVM: Also add the Release Guide and the Changelog as well.
11:30 Geth ¦ MoarVM: review: https://github.com/MoarVM/MoarVM/commit/9a0ad37a40
11:33 Geth ¦ MoarVM: 3c0a318157 | (Samantha McVey)++ | docs/README.md
11:33 Geth ¦ MoarVM: Fix link to docs/jit/ir.md in docs README.md
11:33 Geth ¦ MoarVM: review: https://github.com/MoarVM/MoarVM/commit/3c0a318157
11:33 samcv yay!
11:46 brrt \o/
11:56 AlexDaniel` joined #moarvm
11:58 * samcv heads off to bed &
11:59 lizmat night!
12:05 brrt good night samcv
12:13 lizmat is MoarVM a register based VM ?
12:21 lizmat https://news.ycombinator.com/item?id=15549265  # reason I'm asking
12:21 lizmat feels like that is referring to Parrot, rather than MoarVM
12:34 brrt yes, MoarVM is register-based
12:34 Zoffix AFAIK yeah. It got registers and I recall brrt I think in the past saying register VMs are good or
12:34 Zoffix https://irclog.perlgeek.de/moarvm/search/?nick=brrt&q=register
12:35 brrt I don't want to go into hackernews 'debates' at any rate
12:35 brrt but, register VMs have a few advantages
12:35 Zoffix :)
12:35 brrt it might be referring to parrot, eys
12:36 brrt so the difference is basically this;
12:36 brrt in a stack vm, your referring to a 'stack', so  that's an ever-changing memory base
12:36 brrt your stack top is always moving about
12:37 brrt all operations 'implicitly' take stack operands
12:37 brrt and return them also implicitly
12:38 brrt this means, among ohter things, that your compiler must guard against stack overflows and underflows
12:38 brrt and indeed, the notion that at the end of a subroutine, the stack has to be at the same spot it left off from
12:39 brrt i.e.: for (1..10) { push }; pop; # this is possible but illegal
12:39 lizmat brrt: thanks for clearing that up
12:39 brrt np :-)
12:40 brrt it also means that for a JIT, you have to give a name all the stack positions you might see in a program run. and make sure you're referring to the correct one while working
12:40 brrt not impossible to do, but not the nicest thing either
12:41 brrt it also means that for a GC, you're going to have to be either imprecise, tag your pointers, or have a 'gc safe points' for which you make maps that give you the layout of the stack at that point
12:41 brrt and that also sucks
12:41 brrt or, you're going to have boxed everything
12:42 brrt i.e. you can't just have a native integer on the stack if you don't know at every point that you might need to inspect it, what operand that actually is
12:43 Zoffix How do you know all of this stuff? Got books to recommend?
12:44 brrt ehm.....
12:44 brrt i dunno, actually. experience i guess
12:44 brrt which means that i might be wrong about some aspects
12:44 brrt i did read 'Engineering a compiler' by… well, there's only one famous book by that name
12:44 Zoffix :}
12:44 brrt and Aho's compiler
12:44 brrt s
12:45 * Zoffix adds those to the list :)
12:45 brrt but to make a long story short.. I think register vms are the way to go :-)
12:45 brrt and i also think they make writing a JIT easier, because every local value already has a 'true' name
12:45 brrt so there's a whole bunch of analysis that you just don't have to do
12:55 zakharyas joined #moarvm
13:12 zakharyas joined #moarvm
13:48 dogbert17 .seen timotimo
13:48 yoleaux I saw timotimo 08:59Z in #perl6: <timotimo> a look-around assertion
14:05 AlexDaniel` joined #moarvm
14:32 dogbert17 any cool c-programmers around?
14:34 dogbert17 my question is: how can we be certain that 'test' is not null at https://github.com/MoarVM/MoarVM/blob/master/src/spesh/arg_guard.c#L411
14:34 * dogbert17 is getting a SEGV on line 411 while running /spec/S12-attributes/undeclared.t
14:36 Zoffix I'm an uncool c-programmer, but is `test != NULL` a thing maybe?
14:37 eater `!test` even
14:37 * eater is also uncool
14:37 dogbert17 as is I
14:40 dogbert17 I guess null should be tested for or there's a statement missing whose purpose is to retrieve 'test'
14:43 dogbert17 here's what I ran:   while MVM_SPESH_NODELAY=1 ./perl6 t/spec/S12-attributes/undeclared.t; do true; done
15:18 brrt joined #moarvm
15:41 brrt joined #moarvm
16:36 buggable joined #moarvm
17:07 domidumont joined #moarvm
19:25 evalable6 joined #moarvm
20:29 evalable6 joined #moarvm
20:37 samcv i want to add a function called MVM_reg_get_debug_name similar to MVM_6model_get_debug_name
20:38 samcv but am not sure where to put it. MVMreg* are defined in src/core/interph
20:38 samcv interp.h that is. i also want MVM_string_get_debug_name though that will be easier to find a place for
20:39 samcv hmm 6model may be a good place to put both?
20:40 samcv well not sure about MVMreg since it doesn't have its own file and is defined in interp.h
20:42 jnthn samcv: What could the functions do?
20:42 samcv return the name of the item
20:42 jnthn "the item"?
20:42 samcv MVM_STRING_GRAPHEME32 or MVM_reg_uint32 etc
20:43 samcv atm many of the errors don't tell you what it encountered
20:43 samcv returns a string of the type name
20:43 jnthn Hm, example of an error to improve?
20:43 samcv so instead of "Unknown lexical type encountered while building context iterator"
20:43 samcv "MVM_reg_uint8 lexical type encountered while building context iterator"
20:44 samcv and it will say Unknown if it's actually "unknown" and not just not handled in that function
20:44 jnthn Ah
20:44 jnthn I guess it'd be "Unexpected uint8 lexical encountered..." etc.
20:44 jnthn That one I'd probably put in interp.h though
20:45 samcv ok
20:45 samcv and leave out the reg part?
20:46 jnthn I guess MVM_reg_type_name is fine enough
20:46 jnthn Matches the consts
20:47 samcv cool
20:48 samcv damn getting multiple definitions error
20:49 samcv even though it's only in interp.h
20:49 samcv things must be including interp.h multiple times
20:50 samcv hmm not seeing that grepping the source though
20:59 samcv jnthn, any clue how to fix that?
21:00 samcv i just added MVM_reg_get_debug_name to interp.c
21:04 jnthn No, that sounds odd :S
21:05 samcv having moar.h #include foo/bar.h and having foo/bar.c #include "moar.h" should be ok right?
21:06 samcv ah i forgot to declare it static :)
21:06 jnthn Yeah
21:06 jnthn oh :)
21:34 Geth ¦ MoarVM: samcv++ created pull request #732: Include the type of unhandled register in error messages
21:34 Geth ¦ MoarVM: review: https://github.com/MoarVM/MoarVM/pull/732
21:44 samcv jnthn, if i do `my int8 $var = 255';` `"$var";` in REPL i get an error btw
21:45 Geth ¦ MoarVM/jit-expr-optimizer: 8d0bdb4b68 | (Bart Wiegmans)++ | src/jit/optimize.c
21:45 Geth ¦ MoarVM/jit-expr-optimizer: Fix C89 compatibility
21:45 Geth ¦ MoarVM/jit-expr-optimizer:
21:45 Geth ¦ MoarVM/jit-expr-optimizer: Can't declare a variable after statements
21:45 Geth ¦ MoarVM/jit-expr-optimizer: review: https://github.com/MoarVM/MoarVM/commit/8d0bdb4b68
21:45 samcv not sure what's going on
21:50 samcv also doing `my uint16 $var = 255'; "$var"` also gives an issue in repl (doing first and second line separately)
21:52 jnthn samcv: Probably some NYI somewhere or other
21:52 jnthn Waht's the error?
21:52 samcv lexical type encountered while building context iterator # before adding it to MVMIter.c
21:53 samcv but after i do, or for types already there (intx types)
21:53 samcv Unhandled lexical type 'int16' in lexprimspec for '$var'
21:53 samcv this is the more updated error
21:54 samcv should be Unhandled lexical type in lexprimspec for '$var' for you if you assign to `my int16 $var` and then on the next line do `say $var`
21:55 jnthn Ah, hmm
21:57 samcv here's the backtrace if i make it an oops https://gist.github.com/samcv/043f8254281c48a5762b068e92b1df66
21:57 samcv not sure if it should be making an iterator, it probably should
21:57 Geth ¦ MoarVM: samcv++ created pull request #733: Handle unsigned types to switch in MVM_iter()
21:57 Geth ¦ MoarVM: review: https://github.com/MoarVM/MoarVM/pull/733
21:58 samcv anyway making a PR for you to look at handling those types in MVM_iter()
21:58 samcv though still shows the error somewhere else, showing the same error as using the signed int types do
22:02 jnthn Will take a look, though tomorrow 'cus I'm super tired
22:03 jnthn 'night o/
22:03 samcv np
22:03 samcv night o/
23:05 evalable6 joined #moarvm

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