Camelia, the Perl 6 bug

IRC log for #moarvm, 2013-10-07

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

All times shown according to UTC.

Time Nick Message
00:01 jnthn C:\consulting\rakudo\nqp\src\stage1>\c​onsulting\MoarVM\install\bin\moar.exe nqp.moarvm -e "say('omg stage 1')"
00:01 jnthn omg stage 1
00:04 lue Congratulations! Where's stage 2? :P
00:05 jnthn Working on it...
00:09 lue But seriously, glad you got that darn bug or two wrangled.
00:10 jnthn Yes, the GC ones took some finding...
00:18 cognominal joined #moarvm
00:18 dalek MoarVM: f2cb396 | jnthn++ | src/core/interp.c:
00:18 dalek MoarVM: objprimspec should tolerate null.
00:18 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/f2cb396279
00:20 jnthn C:\consulting\rakudo\nqp\src\stage2>\c​onsulting\MoarVM\install\bin\moar.exe nqp.moarvm -e "say('yay stage 2')"
00:20 jnthn yay stage 2
00:21 jnthn lue: ^^ :P
00:22 lue That's cool. So it's like, what, a week until stage 8 is done? ;)
00:22 TimToady \o/
00:23 TimToady lue: I believe it's called stage "six"
00:24 lue Stage 7 is where nqp can build compilers for other languages by itself. Stage 8 is where those compilers bootstrap :)
00:31 jnthn oops, it's 2:30 AM and I gotta get up tomorrow to write a talk to give on Tuesday that, for some reaosn, 100+ people have signed up to see...
00:31 jnthn .oO( Maybe they're in it for the promise of free Thai food, like me... ))) )
00:32 jnthn ah well, I'll hack until my beer's depleted...
00:34 lue You're writing a talk the day you're giving it? That's an impressive goal. :P
00:35 TimToady Do not torment the implementor.  That's my job.  :)
00:35 jnthn no no, tomorrow is Monday (I hope!) and the talk is Tuesday :P
00:35 jnthn uh, well, today is Monday technically, but... :P
00:36 jnthn ooh
00:36 jnthn ok, this went well...
00:36 lue TimToady: sorry. That was one joke I couldn't resist though. :)
00:39 jnthn See #perl6 for commit message. :)
00:40 jnthn Long story short: October's NQP will ship with MoarVM support.
00:42 jnthn Todo tasks: add p5regex library to the build, triage t/qregex test failures :)
00:42 lee_ woohoo jnthn++ :)
00:43 jnthn Also we probably want some kind of runner like JVM has (but thankfully a load simpler...no epic classpath :P)
00:43 jnthn I'll get to these but I suspect I'll be relatively tied up until Wednesday.
00:43 jnthn uh, I'll get to these if nobody else does :)
00:44 lue jnthn++ jnthn++ [ one for each functioning stage :) ]
00:44 lue s/func/now-func/
00:52 jnthn ok, enough for today :)
00:52 jnthn 'night o/
00:54 lue good ♞ jnthn o/
01:07 ssutch joined #moarvm
02:02 colomon joined #moarvm
02:41 eternaleye joined #moarvm
04:28 diakopter .
05:03 harrow joined #moarvm
06:29 masak diakopter: ,
07:17 FROGGS joined #moarvm
07:18 moritz |
07:34 FROGGS .tell jnthn \o/
07:34 yoleaux FROGGS: I'll pass your message to jnthn.
07:35 moritz fatal: reference is not a tree: a9e6eec70785f43f63ef17189fc2733d4ceb8446
07:35 moritz Unable to checkout 'a9e6eec70785f43f63ef17189fc2733d4ceb8446' in submodule path '3rdparty/dyncall'
07:35 moritz what do I do to fix that?
07:36 moritz ah, git submodule sync
08:14 FROGGS joined #moarvm
09:23 donaldh joined #moarvm
09:23 wsri joined #moarvm
09:24 grondilu joined #moarvm
09:36 cognominal joined #moarvm
09:46 diakopter masak: ,
09:51 diakopter wheels up, ish... &
09:53 arnsholt diakopter: Any objections to closing the "Strange loop" NQP bug?
09:54 arnsholt More info, courtesy of jnthn++, at http://irclog.perlgeek.de/​perl6/2013-10-06#i_7678311
09:59 nwc10 jnthn++ # bootstrapping
10:02 grondilu jnthn++ awesome work.  Looking forward to reading a report in 6guts, hopefully with an estimated date for a MoarVM port of rakudo :)
10:04 masak jnthn++ # blog post coming up? :)
10:04 * nwc10 assumes that slides happen first
10:04 jnthn yeah, I need to focus on my reactive programming talk for tomorrow evening first :)
12:01 FROGGS joined #moarvm
12:30 [Coke] jnthn++
12:32 FROGGS joined #moarvm
12:45 FROGGS jnthn: this is why qregex hangs:
12:45 FROGGS zero_slots elems=343035904 ssize=343040000
12:45 FROGGS zero_slots elems=343040000 ssize=343044096
12:45 FROGGS zero_slots elems=343044096 ssize=343048192
12:45 FROGGS zero_slots elems=343048192 ssize=343052288
12:45 FROGGS in MVMArray.c
12:45 tadzik that's plenty of elems
12:45 FROGGS it increases, increases, increases
12:46 FROGGS tadzik: and it kills my box when running in gdb :P
12:46 tadzik MOAR RAM
12:47 FROGGS yeah
12:48 FROGGS r: say (343048192 + 0x1000) & ~0xfff
12:48 camelia rakudo 70f2ae: OUTPUT«all(343052288, 4095)␤»
12:48 FROGGS r: say (343048192 + 0x1000) +& ~0xfff
12:48 camelia rakudo 70f2ae: OUTPUT«0␤»
12:49 FROGGS r: say ~0xfff
12:49 camelia rakudo 70f2ae: OUTPUT«4095␤»
12:49 FROGGS what is binary negation again?
12:50 moritz +^ iirc
12:50 moritz r: say +^ 4
12:50 camelia rakudo 70f2ae: OUTPUT«-5␤»
12:50 FROGGS ahh
12:50 moritz yep
12:50 FROGGS r: say (343048192 + 0x1000) +& (+^ 0xfff)
12:50 camelia rakudo 70f2ae: OUTPUT«343052288␤»
12:50 FROGGS that would fit
12:51 FROGGS so, it is called by set_size_internal
13:05 jnthn I'm guessing something is pushing endlessly or so
13:38 FROGGS jnthn: I'll now in 3minutes, compiling right now
13:39 FROGGS gah, almost missed the bus top the airport by not finding it
13:40 FROGGS to*
13:42 timotimo my @parts  := match($line, /\T+/, :global);
13:42 timotimo this line makes it consume infinite amounts of memory
13:42 FROGGS k
13:44 FROGGS push body->elems=8244775
13:44 FROGGS push body->elems=8244776
13:44 FROGGS push body->elems=8244777
13:44 FROGGS push body->elems=8244778
13:44 FROGGS push body->elems=8244779
13:44 FROGGS yes, push
13:45 timotimo so the :global match is either not advancing properly, or it's not terminating at the end-of-line properly; the latter seems unlikely
13:47 ggoebel3 joined #moarvm
13:48 FROGGS install/bin/moar nqp.moarvm -e 'my $line := ""; my @parts := match($line, /T+/, :global);' # passes
13:48 FROGGS install/bin/moar nqp.moarvm -e 'my $line := ""; my @parts := match($line, /\T+/, :global);' # hangs
13:49 FROGGS install/bin/moar nqp.moarvm -e 'my $line := ""; my @parts := match($line, /\T/, :global);' # passes
13:49 timotimo strange
13:49 FROGGS so, it even might be a problem with quantifying cclasses
13:49 timotimo can you compare the qast dump of the two regexes from different backends?
13:50 * timotimo doesn't have a nqp.moarvm yet
13:50 FROGGS I should be able to, yes
13:50 FROGGS no, it segfaults
13:50 timotimo oh, bummer :(
13:50 timotimo well, let's compare matches without :global
13:50 FROGGS Program received signal SIGSEGV, Segmentation fault.
13:50 FROGGS 0x000000000043614a in MVM_string_concatenate (tc=0x829310, a=0x7ffff6fcec98, b=0x0) at src/strings/ops.c:413
13:50 FROGGS 413    MVMStringIndex agraphs = NUM_GRAPHS(a), bgraphs = NUM_GRAPHS(b), rgraphs;
13:51 timotimo oh, so a null string got concatenated to a string
13:51 timotimo or a null object i guess?
13:51 FROGGS bt is https://gist.github.com/ano​nymous/eba3683fb19c83732026
13:52 FROGGS should be an MVMString *
13:53 timotimo i still can't build moarvm-nqp: While looking for 'QAST.moarvm': no such file or directory at nqp-src\ModuleLoader.pm:52  (src/vm/moar/stage0/ModuleLoa​der.moarvm:frame_name_33:96)
13:53 FROGGS seems like regex dumping is faulty
13:54 FROGGS I have dev/MoarVM and dev/nqp, in MoarVM I do: perl Configure.pl --prefix=../nqp/install && make install
13:54 FROGGS then in nqp: perl ConfigureMoar.pl --prefix=install && make
13:54 timotimo OK
13:54 timotimo i have build/MoarVM and build/rakudo/nqp/
13:55 timotimo and i had the prefix set to ......./build/MoarVM
13:55 FROGGS install/bin/moar nqp.moarvm --target=ast -e 'match("", /abc/)'
13:55 FROGGS Speicherzugriffsfehler (Speicherabzug geschrieben)
13:56 FROGGS using -e '1 ~~ 2' works
13:56 timotimo "speicherabzug" >_<
13:56 FROGGS :o)
13:57 timotimo i still get the 404 from stage0/ModuleLoader
14:00 FROGGS hmmm
14:00 FROGGS but you are on moarboot branch, yes?
14:00 FROGGS do you have whitespace in prefix?
14:02 timotimo yes i am, no i don't
14:29 JimmyZ Routine declaration requires a signature at line 4093, near "(MAST::Nod"
14:29 JimmyZ so you got While looking for 'QAST.moarvm': no such file or directory
14:31 JimmyZ /MoarVM/bin/moar --libpath=src/vm/moar/stage0 src/vm/moar/stage0/nqp.moarvm --bootstrap --module-path=src/stage1 \ --setting=NQPCORE --no-regex-lib --target=mbc \ --output=src/stage1/QAST.moarvm src/stage1/gen/QAST.nqp
14:31 JimmyZ Routine declaration requires a signature at line 4093, near "(MAST::Nod"
14:38 masak oh! "Speicher-abzug". that took me far too long to parse right :)
14:38 masak literally "space/room extract".
14:38 masak so, "memory dump" :)
14:39 masak and a "Speicherzugriffsfehler" must be a "memory access error"...
14:47 benabik joined #moarvm
14:55 timotimo yeah
14:56 timotimo "speicher" used to refer to a room in a house used to store stuff, but nowadays it refers to any kind of storage
15:11 masak aha, like a storage a company uses for putting boxes in, for example.
15:12 timotimo hmm
15:16 masak GT says memory/store/reservoir/attic/loft/storehouse.
15:17 timotimo mhm
15:17 timotimo i'm not the authority on word use in german :)
15:17 jnthn .oO( I've got a sinking feeling about this reservoir access error... )
15:17 arnsholt timotimo: Google Translate isn't an authority on anything at all =)
15:21 masak *gasp*
15:23 timotimo jnthn: so, any idea why the :global match with /\T+/ would fail? dumping the qast for that doesn't seem to work at all
15:25 masak timotimo: are you saying that the non-:global match with /\T+/ doesn't fail?
15:27 timotimo i can't try :(
15:28 * masak is confused by that response
15:28 timotimo building moarvm doesn't work on my box
15:28 masak how about on feather?
15:28 timotimo don't have access there
15:30 masak pity. :/
15:35 TimToady I'm guessing it's missing the implied . after the <![\t]>
15:38 masak that sounds highly plausible.
15:42 not_gerd joined #moarvm
15:42 not_gerd o/
15:44 JimmyZ \o
15:44 timotimo oh, is that how it's created internally?
15:45 jnthn Don't think so
15:46 masak it was back in PGE, methinks.
15:46 masak \T was basically <![\t]>.
15:46 not_gerd jnthn: any thoughts on making the interpreter stage extop operands and just pass on a MVMRegister* ?
15:47 not_gerd con: probably worse interpreter performance
15:47 not_gerd pro: cleaner API, possibly more JIT friendly
15:48 diakopter not_gerd: hi :)
15:48 diakopter not_gerd: my first reaction is it doesn't feel as safe
15:49 not_gerd diakopter: hi
15:49 not_gerd diakopter: less safe than poking into the bytecode stream?
15:49 diakopter I didn't think we were doing that
15:51 not_gerd out extops signature right now is just MVMThreadContext *tc
15:51 not_gerd ie we'll have to read operands from the stream via tc->interp_cur_op
15:51 diakopter right
15:51 not_gerd *our
15:52 diakopter the jit/optimizer will know that it can cache &tc->interp_cur_op somewhere if it wants
15:52 diakopter (since it doesn't change)
15:52 not_gerd but it'll have to emulate the whole interp shebang
15:53 diakopter I don't know what you mean
15:53 not_gerd with staging, it could just push values to the stack and pass a pointer to the first one
15:53 diakopter how would this be a cleaner API and possibly more JIT friendly
15:54 diakopter the JIT can do whatever it wants :P
15:54 jnthn yeah but if the API for writing an extop and having it called is JIT-hostile...
15:55 not_gerd cleaner insofar as the extop wouldn't have to poke into the bytecode stream and reg_base array
15:55 not_gerd it just takes operands from the stage and puts results back into it
15:55 jnthn We limit the arg count anyway
15:55 jnthn So we could easily switch on that (8 cases)
15:55 jnthn And then pass pointers to each register.
15:56 jnthn void my_op(ThreadContext *tc, MVMRegister *a, MVMRegister *b) { } # for a 2-op one
15:56 diakopter not_gerd: why would it have to poke into the bytecode stream?
15:56 jnthn diakopter: To know the register numbers
15:56 FROGGS joined #moarvm
15:56 diakopter oh yeah. :)
16:00 FROGGS timotimo: fwiw, if you comment the if $node.negate { ... } in method enumcharlist in qastregexcommpilermast.nqp, then, at least, it does not push endlessly
16:00 FROGGS so either there is something wrong what the quant might need, or... dunno
16:01 timotimo but that stuff isn't per-backend, right?
16:01 FROGGS diakopter: do you spot an error here? https://github.com/perl6/nqp/blob/moarboot/src/v​m/moar/QAST/QASTRegexCompilerMAST.nqp#L435-L441
16:01 not_gerd jnthn: I could live with that, though it's still a bit less jit friendly than explicit staging
16:02 FROGGS timotimo: the regex-to-op compiler is backend specific
16:02 not_gerd with an explicit stage, the jit is free to rake the operand from $wherever
16:02 timotimo uh oh
16:02 not_gerd (in particular hardware registers)
16:02 not_gerd but we could always tell our users if you want max performance, provide jitable op definitions which we can inline
16:03 jnthn not_gerd: Yeah, I'd imaigned we'll have a JITTree-producing mechanism for dynops too
16:03 jnthn uh, extops
16:04 diakopter FROGGS: no..
16:04 FROGGS :/
16:04 diakopter why
16:04 FROGGS diakopter: because \t and \T happens to be an enumcharlist, and \t+ passes while \T+ hangs
16:05 FROGGS hangs means, it pushes onto an array, again and again and ...
16:05 FROGGS diakopter: I know that you can't remember what you wrote there :o)
16:05 FROGGS if I finally understand parts of it I might even add comments
16:06 FROGGS CAUSE THERE ARE NONE!
16:06 jnthn That's 'cus regex compilers are, like, just obvious man... :P
16:06 jnap joined #moarvm
16:06 benabik joined #moarvm
16:06 FROGGS jnthn: bah
16:06 FROGGS not to me "bro"
16:06 FROGGS :P
16:08 not_gerd jnthn: wouldn't passing
16:08 not_gerd up..
16:08 not_gerd s
16:09 jnthn ...wat?
16:09 not_gerd oO(too much Federweißer...)
16:09 not_gerd wouldn't  void my_op(ThreadContext *tc, MVMRegister *a, MVMRegister *b) actually be the worst of both worlds
16:09 not_gerd is you'd have to first stage the pointers before you could pass them
16:09 not_gerd if you already do that, why not just pass the values
16:10 jnthn You need to be able to write also
16:10 jnthn *but* we could constrain that to "only the first register"
16:10 arnsholt FROGGS: If \t+ works but \T+ doesn't I'd look in the direction of negated enumcharlists
16:11 arnsholt They're represented as the same AST node, but with a flag set for negation
16:11 FROGGS arnsholt: exactly
16:11 FROGGS arnsholt: that is why I pasted https://github.com/perl6/nqp/blob/moarboot/src/v​m/moar/QAST/QASTRegexCompilerMAST.nqp#L435-L441
16:11 FROGGS which is exactly that
16:12 diakopter FROGGS: it's almost entirely transliterated from pmichaud's ->pir compiler in pir
16:12 FROGGS hmmm
16:13 diakopter any departures from that were solely small refactorings and adaptation
16:14 jnthn It looks right at first glance
16:14 jnthn If we match, we always increment pos
16:15 timotimo i bet it increments the wrong pos
16:15 jnthn There can only be one
16:15 arnsholt diakopter: I asked in #perl6 as well, but since you're here: Any objections to closing NQP #66?
16:16 timotimo the number of the bea!
16:16 timotimo the increment of pos seems to be after the goto op for failure
16:16 timotimo is that right?
16:17 jnthn Yeah. If we fail we don't progress
16:17 timotimo OK
16:17 timotimo this wouldn't end up being zerowidth, would it?
16:17 FROGGS what does indexat_scb?
16:17 not_gerd timotimo: according to the website, the number of bea is 1-800-633-0925 at oracle
16:18 not_gerd if that's better or worse than hell - you decide ;)
16:18 timotimo heh
16:22 FROGGS ohh, if indexat_scb fails, it does a goto $ok
16:22 FROGGS s/ohh/ahh/
16:23 timotimo so if that part is right, what part is wrong?
16:23 FROGGS dunno yet
16:23 FROGGS nqp-m: nqp::indexat_scb()
16:23 camelia nqp-moarvm: OUTPUT«No registered operation handler for 'indexat_scb'␤compile_op»
16:24 FROGGS I wanted to check if the first pir stmt would work, which is: $ops.push_pirop('ge', %*REG<pos>, %*REG<eos>, %*REG<fail>);
16:24 jnthn nqp-m: say('abc' ~~ /\T/)
16:24 camelia nqp-moarvm: OUTPUT«a␤»
16:25 jnthn nqp-m: say('abc' ~~ /\T+/)
16:25 camelia nqp-moarvm: OUTPUT«(timeout)»
16:25 FROGGS but moarvm only calls indexat_scb, and I'd like to check that it fails when pos > eos
16:25 jnthn nqp-m: say('abc' ~~ /\T{3}/)
16:25 camelia nqp-moarvm: OUTPUT«Unsupported use of {N,M} as general quantifier; in Perl 6 please use ** N..M (or ** N..*) at line 2, near "/)"␤panic»
16:25 jnthn nqp-m: say('abc' ~~ /\T ** /)
16:25 camelia nqp-moarvm: OUTPUT«Quantifier quantifies nothing at line 2, near " /)"␤panic»
16:25 jnthn nqp-m: say('abc' ~~ /\T ** 3 /)
16:25 camelia nqp-moarvm: OUTPUT«abc␤»
16:25 jnthn FROGGS: Yeah, I'm wondering what its eos semantics are
16:26 FROGGS nqp-m: say('abc' ~~ /\T*/)
16:26 timotimo that may well be the problem
16:26 camelia nqp-moarvm: OUTPUT«(timeout)»
16:26 jnthn nqp-m: say("abc\t" ~~ /\T+/) # this may make it clear
16:26 camelia nqp-moarvm: OUTPUT«abc␤»
16:26 timotimo nqp-m: say('abc' ~~ /\T ** 4/)
16:26 camelia nqp-moarvm: OUTPUT«abc␤»
16:26 TimToady surely there's a tab *somewhere* in memory...
16:26 jnthn :P
16:26 FROGGS if (offset < 0 || offset >= NUM_GRAPHS(a))
16:26 FROGGS return -1;
16:26 FROGGS :o(
16:26 timotimo i don't understand why i can just build moarvm-nqp on host07, but not on my machine
16:26 FROGGS and in interp.c it checks for >= 0
16:26 timotimo with about the same setup
16:27 FROGGS timotimo: check the git versions
16:27 FROGGS (of the repos)
16:27 timotimo i pulled until nothing more came out
16:29 diakopter FROGGS: what does "return -1" mean there
16:29 FROGGS I can insert a nqp::push(@ins, 'say', %*REG<pos>); right?
16:29 diakopter sure
16:29 FROGGS diakopter: failure
16:29 diakopter FROGGS: I figured that.
16:29 diakopter FROGGS: but what does it do if it's -1
16:30 FROGGS as I said, in interp.c it treats >= 0 as success, and does the goto
16:30 FROGGS ohh, no, it does the goto when it fails?
16:30 diakopter right
16:32 diakopter oh, that's the problem
16:32 diakopter heh.
16:33 diakopter FROGGS: you see the problem? :)
16:33 FROGGS not really
16:33 FROGGS it is just weird :o)
16:33 diakopter if it's at eos, it fails, which makes it succeed
16:34 timotimo oh
16:34 diakopter so the eos check needs to be in the interp.c
16:34 diakopter as well
16:34 timotimo hehehe
16:34 jnthn Alternatuvely, add anaap o;p that does the negative check
16:34 diakopter that too
16:34 FROGGS a what?
16:34 timotimo we're at the end of string, so let's go a bit further until we are not past the end of string any more!
16:34 jnthn wtf
16:35 jnthn *add an op
16:35 FROGGS ahh
16:36 diakopter jnthn's alternatuve would be slightly more efficient
16:36 jnthn @}
16:36 jnthn uh, :P
16:36 jnthn keyboard I am disappoint
16:36 FROGGS I am a bit puzzled
16:37 FROGGS we want a indexnotat_scb or something now?
16:37 diakopter well it needs to express that it did find a characdter there
16:37 diakopter I forget what scb stands for
16:37 FROGGS somethingelseat_scb?
16:37 FROGGS :P
16:37 jnthn I always wondered what scb stood for :)
16:37 FROGGS *g*
16:38 jnthn oh
16:38 jnthn string constant + branch I guess :P
16:38 diakopter oh hee.
16:38 diakopter FROGGS: feel free to rename them...
16:38 diakopter well it's not a string constant tho
16:39 FROGGS indexat might be nice enough
16:39 FROGGS damn, I dont know what to do
16:39 FROGGS err, how, I mean
16:40 diakopter oh maybe it was a string constant
16:40 diakopter meh
16:40 FROGGS can somebody paste pseudo-code?
16:41 timotimo make a copy of the scb op thingie that negates the check, but does the EOS check the same way
16:41 timotimo and then emit that op in the thingie
16:41 diakopter FROGGS: I can fix it
16:41 FROGGS diakopter++
16:41 diakopter if you want
16:42 FROGGS ohh yes
16:42 timotimo thank you! :)
16:42 timotimo i'm surprised this didn't blow up during any parsing of code before
16:43 FROGGS timotimo: I just an guess that there are no negated enumcharlists
16:43 FROGGS can*
16:43 jnthn It needs that *and* the eos issue
16:43 diakopter ?
16:44 FROGGS ahh
16:44 diakopter oh.
16:46 diakopter timotimo: I went exploring in your homedir
16:46 diakopter timotimo@host07:~/nqp$ install/bin/moar nqp.moarvm -e 'my $a:=1000000;while $a-- { }'
16:46 diakopter Invalid string index: max 28, got 29
16:46 timotimo i didn't do anything wrong! :)
16:46 diakopter (fails during paring)
16:47 diakopter is it just me or is bootstrapping kindof magical
16:47 timotimo no, it is
16:47 diakopter nqp-m: my $a:=1000000;while $a-- { }
16:47 camelia nqp-moarvm: ( no output )
16:48 diakopter nqp-m: my $s:=nqp::time_n;my $a:=1000000;while $a-- { }; say(nqp::time_n - $s)'
16:48 camelia nqp-moarvm: OUTPUT«Confused at line 2, near "say(nqp::t"␤panic»
16:48 timotimo perhaps that code *is* suffering from the wrongness we just uncovered?
16:48 FROGGS nqp-m: my $a:=1000000;while $a-- { }; say(nqp::time_n() - BEGIN nqp::time_n())
16:48 camelia nqp-moarvm: OUTPUT«Method isdecl not found in cache, and late-bound dispatch NYI␤   at nqp-src/QASTNodes.nqp:52  (./QASTNodesMoar.moarvm:frame_name_9:4294967295)␤ from nqp-src/QASTNodes.nqp:51  (./QASTNodesMoar.moarvm:new:40)␤ from nqp-src/NQP.nqp:466  (nqp.moarvm:frame_name_7…»
16:48 jnthn Whenever I've see the string index thing it was out of date files somewhere
16:49 diakopter hm
16:49 FROGGS nqp-m: my $s:=nqp::time_n(); my $a:=1000000; while $a-- { }; say(nqp::time_n() - $s)'
16:49 camelia nqp-moarvm: OUTPUT«Confused at line 2, near "say(nqp::t"␤panic»
16:49 FROGGS gah
16:49 timotimo oh, interesting
16:49 FROGGS nqp: my $s:=nqp::time_n(); my $a:=1000000; while $a-- { }; say(nqp::time_n() - $s)'
16:49 camelia nqp: OUTPUT«Confused at line 2, near "say(nqp::t"␤current instr.: 'panic' pc 14748 (src/stage2/gen/NQPHLL.pir:5229) (src/stage2/gen/NQPHLL.nqp:279)␤»
16:50 FROGGS what is wrong?
16:50 FROGGS nqp: my $s:=nqp::time_n(); my $a:=1000000; while $a-- { 1 }; say(nqp::time_n() - $s)'
16:50 camelia nqp: OUTPUT«Confused at line 2, near "say(nqp::t"␤current instr.: 'panic' pc 14748 (src/stage2/gen/NQPHLL.pir:5229) (src/stage2/gen/NQPHLL.nqp:279)␤»
16:50 jnthn The ' at the end
16:50 FROGGS nqp: my $s:=nqp::time_n(); my $a:=1000000; while $a-- { 1 }; say(nqp::time_n() - $s)
16:50 FROGGS -.-
16:50 camelia nqp: OUTPUT«0.621707201004028␤»
16:50 diakopter hee.
16:50 FROGGS nqp-m: my $s:=nqp::time_n(); my $a:=1000000; while $a-- { 1 }; say(nqp::time_n() - $s)
16:50 camelia nqp-moarvm: OUTPUT«0.595968␤»
16:50 diakopter nqp-j: my $s:=nqp::time_n(); my $a:=1000000; while $a-- { 1 }; say(nqp::time_n() - $s)
16:50 diakopter nqp-jvm: my $s:=nqp::time_n(); my $a:=1000000; while $a-- { 1 }; say(nqp::time_n() - $s)
16:51 camelia nqp-jvm: OUTPUT«0.16300010681152344␤»
16:51 jnthn JIT :)
16:51 FROGGS I guess the 6model stuff will show a bigger difference
16:52 timotimo cool that the jit has enough time to warm up in just 0.1 seconds
16:52 jnthn timotimo: you missed the startup time :P
16:52 diakopter 5-6 seconds
16:52 timotimo oh, of course, it doesn't measure that part
16:53 diakopter nqp: my $s:=nqp::time_n(); my $a:=1000000; while --$a { 1 }; say(nqp::time_n() - $s)
16:53 camelia nqp: OUTPUT«0.66899299621582␤»
16:53 diakopter nqp-m: my $s:=nqp::time_n(); my $a:=1000000; while --$a { 1 }; say(nqp::time_n() - $s)
16:53 camelia nqp-moarvm: OUTPUT«0.673368␤»
16:53 diakopter <shrug>
16:54 timotimo ah, parrot and moar are very close on that, but we have no idea about the startup time there either
16:54 diakopter nqp-m: my $s:=nqp::time_n(); my int $a:=1000000; while --$a { 1 }; say(nqp::time_n() - $s)
16:54 camelia nqp-moarvm: OUTPUT«0.655229␤»
16:54 timotimo i'm just guessing here, but moar should start up faster :)
16:54 diakopter nqp: my $s:=nqp::time_n(); my int $a:=1000000; while --$a { 1 }; say(nqp::time_n() - $s)
16:54 camelia nqp: OUTPUT«0.712493896484375␤»
16:54 diakopter timotimo: nah not by much I don't think
16:54 timotimo hm. well it *does* mmap the pbcs, doesn't it?
16:54 timotimo anyway, i'll afk for a bit
16:55 jnthn Somehow Moar passes t/nqp faster than Parrot; it could be in the startup time for or runtime or both.
16:56 jnthn That we're doing so at this point *before* we've had chance to profile how it runs NQP and really dig into optimization or implement the clever stuff is kinda nice. :)
16:57 diakopter would someone like to do this for MoarVM https://github.com/blog/11​84-contributing-guidelines
16:58 diakopter CONTRIBUTING.md
16:58 ggoebel4 joined #moarvm
17:02 not_gerd .oO( nqp-m-cgoto )
17:13 FROGGS okay, so I tried it but without luck
17:13 FROGGS would it be: if $node.negate { op indexnat } else { op indexat }... or do I need to leave the goto's in the negate-block?
17:15 jnthn FROGGS: No, if you do a negated version of the op you can clear thatup
17:15 jnthn FROGGS: The goto and label in the negate block is only coping with the lack of a negated version of the op
17:15 FROGGS okay
17:18 FROGGS dunno if somebody wanna see that :o) https://gist.github.com/FR​OGGS/db53df3844dc98dd6b58
17:20 FROGGS didnt properly hanged the regex compiler in nqp-cc, because I didn't made another stage0
17:23 FROGGS another try
17:24 jnthn FROGGS: I'd add indexnat after indexat fwiw
17:24 jnthn though of course needs re-build of all things :)
17:24 jnthn and stage0 update
17:24 FROGGS yeah, I can do that when it works :o)
17:25 jnthn aye
17:26 jnthn Getting t/qregex passing would be l'awesome
17:26 FROGGS timotimo: I remember: I had it too that it wasn't able to find moduleloader, that was due to the fact that it didnt build it
17:26 FROGGS timotimo: there ware a syntax error hidden in the build-output-mess
17:26 jnthn Lemme see if I can add P5Regex building while my dinner cooks
17:26 jnthn Though need to get back to my Rx talk after dinner...
17:27 * jnthn is liking Rx and should do a P6Rx port :)
17:27 FROGGS *g*
17:27 FROGGS install/bin/moar nqp.moarvm t/qregex/01-qregex.t
17:27 FROGGS Unsupported use of - as character range; in Perl 6 please use .. for range, for explicit - in character class, escape it or place as last thing at line 29, near "> $m { %ex"
17:27 FROGGS :o(
17:28 jnthn :(
17:29 FROGGS[mobile] joined #moarvm
17:35 FROGGS[mobile]2 joined #moarvm
17:42 FROGGS jnthn++
17:43 FROGGS ahhh, kilkenny++
17:46 jnthn FROGGS: So, if you manage a fix for the \T+ thing then we may get the t/p5regex passing also :)
17:47 FROGGS yeah I've seen the msg
17:48 FROGGS froggs@TL02L-R8RXTCW-linux:~/dev/nqp$ install/bin/moar nqp.moarvm -e 'say("abc" ~~ /\w+/)'
17:48 FROGGS abc
17:48 FROGGS froggs@TL02L-R8RXTCW-linux:~/dev/nqp$ install/bin/moar nqp.moarvm -e 'say("abc" ~~ /\W+/)'
17:48 FROGGS Substring length (-6) cannot be negative
17:48 FROGGS O.o
17:49 nwc10 dinner *cooks*? Not brews? :-)
17:49 FROGGS because he is a sorcerer?
17:50 jnthn FROGGS: i think that may be busted NQPMatch.Str...
17:50 FROGGS ohh: install/bin/moar nqp.moarvm -e 'say("abc" ~~ /\T+/)'
17:50 FROGGS abc
17:50 FROGGS that is nice
17:51 FROGGS install/bin/moar nqp.moarvm -e 'say("" ~~ /\T+/)'
17:51 FROGGS Substring length (-3) cannot be negative
17:51 FROGGS so, a failed match is busting it
17:53 timotimo yes, -3 is the "no match" value
17:54 FROGGS yeah, and nqp@parrot is a bit lax when it comes to negative lengths in substr
17:54 timotimo hehe
17:54 FROGGS compiling...
17:54 timotimo i remember thinking, during the RaNIW, "that can't possibly cause strange errors"
17:54 FROGGS nqp: say(substr("abc", 0, -3))
17:54 camelia nqp: OUTPUT«Could not find sub &substr␤current instr.: '' pc 48 ((file unknown):64016775) (/tmp/PTtvgkfP4s:1)␤»
17:54 FROGGS nqp: say(nqp::substr("abc", 0, -3))
17:54 camelia nqp: OUTPUT«␤»
17:55 FROGGS nqp-jvm: say(nqp::substr("abc", 0, -3))
17:55 camelia nqp-jvm: OUTPUT«java.lang.StringIndexOutOfBoundsException: String index out of range: -3␤  in  (/tmp/kBbhjDjInJ:1)␤  in  (src/stage2/gen/NQPHLL.nqp:1091)␤  in eval (src/stage2/gen/NQPHLL.nqp:1077)␤  in evalfiles (src/stage2/gen/NQPHLL.nqp:1283)␤  in command_eval (src/stage…»
17:55 FROGGS nqp-m: say(nqp::substr("abc", 0, -3))
17:55 camelia nqp-moarvm: OUTPUT«Substring length (-3) cannot be negative␤   at /tmp/wT8W6o2rzh:2  (<ephemeral file>:frame_name_0:4294967295)␤ from nqp-src/NQPHLL.nqp:1084  (./NQPHLLMoar.moarvm:frame_name_671:97)␤ from nqp-src/NQPHLL.nqp:1070  (./NQPHLLMoar.moarvm:eval:87)␤ from nqp-src/N…»
17:55 timotimo nqp-jvm: say("abc" ~~ /\W+/)
17:55 camelia nqp-jvm: OUTPUT«␤»
17:55 timotimo interesting
17:55 FROGGS hmmm, that should'nt have worken for jvm either
17:55 jnthn hm, yeah
17:55 jnthn odd
17:55 FROGGS even
17:56 FROGGS trying this now just to be sure: method Str() { $!to > $!from ?? nqp::substr($!orig, $!from, $!to-$!from) !! '' }
17:58 FROGGS install/bin/moar nqp.moarvm -e 'say("" ~~ /\T+/)'
17:58 FROGGS err
17:58 timotimo it says "err"? that's odd
17:58 FROGGS well, this passes, but qregex is still busted
17:58 FROGGS that was me :o)
17:58 timotimo the same "unsupported use of -" thing?
17:58 FROGGS yes
18:00 timotimo it doesn't seem to see the end of the regex or something?
18:00 FROGGS the very first path already broke test t/nqp/32-protoregex.t btw
18:00 FROGGS patch*
18:00 timotimo that line is $s := subst($s, /\\(<[nretf]>)/, -> { %expansions{$m[0]} }, :global);
18:00 timotimo that's probably a better place to look at, then
18:01 FROGGS yeah
18:08 FROGGS timotimo: can you paste your build output btw?
18:08 FROGGS (of nqp)#
18:08 FROGGS -#
18:11 timotimo oh, locally? sure, hold on
18:11 FROGGS yeah
18:11 timotimo https://gist.github.com/timo/5dddacb5b8a6835a0e0d - there you go
18:11 FROGGS we must fix this :o)
18:11 timotimo you just want to force me to help you! :P
18:12 FROGGS Routine declaration requires a signature at line 4092, near "(MAST::Nod"
18:12 FROGGS hmmm, I had that too
18:13 FROGGS timotimo: have you build the nqp-cc by any chance?
18:13 FROGGS you could copy over the *.moarvm as your stage0
18:15 FROGGS see you in hotel &
18:18 timotimo i can't seem to get the right nqp version for the crosscompiler to be happy
18:23 timotimo now i got it :)
18:25 ggoebel4 joined #moarvm
18:27 FROGGS what exactly? the cc?
18:27 timotimo yes
18:27 timotimo only that
18:27 FROGGS k
18:27 timotimo oh, but it won't build
18:27 timotimo /home/timo/build/rakudo/install/bin/nqp --target=pir src/QASTRegexCompilerMAST.nqp > QASTRegexCompilerMAST.pir
18:27 FROGGS :o(
18:27 timotimo This type does not support positional operations
18:27 FROGGS I had that too once
18:28 FROGGS hmmm
18:30 timotimo bootstrapping is really very sensitive to all changes it seems
18:30 benabik Pulling ones self up by your bootstraps is inherently difficult.  Most people never manage it.
18:30 timotimo indeed
18:30 timotimo we've (as a collective) already done it a couple times
18:54 dalek MoarVM/ext: 4b02034 | (Gerhard R)++ | src/core/ext.c:
18:54 dalek MoarVM/ext: Fix extop validation (hopefully)
18:54 dalek MoarVM/ext: review: https://github.com/MoarVM/MoarVM/commit/4b02034708
18:54 dalek MoarVM/ext: a08d772 | (Gerhard R)++ | src/core/bytecode.c:
18:54 dalek MoarVM/ext: Load extension op records from bytecode stream
18:54 dalek MoarVM/ext:
18:54 dalek MoarVM/ext: Operand descriptor validation might need some
18:54 dalek MoarVM/ext: changes, in particular for sized constants
18:54 dalek MoarVM/ext: which we don't yet support properly.
18:54 dalek MoarVM/ext: review: https://github.com/MoarVM/MoarVM/commit/a08d772f28
19:10 not_gerd afk
19:10 not_gerd probably good night o/
19:11 jnap joined #moarvm
19:11 not_gerd left #moarvm
19:22 FROGGS this is the latest state of the patch: https://gist.github.com/FR​OGGS/db53df3844dc98dd6b58
19:22 FROGGS it seems it does not break and does not quite fix anything
19:23 FROGGS install/bin/moar nqp.moarvm t/qregex/01-qregex.t
19:23 FROGGS Use of undeclared variable '$expect_substr' at line 55, near ") >= 0;\n  "
19:34 timotimo o_O
19:35 timotimo i wonder. it's declared a few lines before that. how does that b0rk?
19:35 FROGGS i dunno
19:35 timotimo does it perhaps for some weird reason declare $expect instead?
19:36 FROGGS or the stash gets screwed up
19:36 timotimo i wouldn't know anything about that :P
19:38 FROGGS what really weird is, is that I refactor something that really does not change its behaviour, but now it breaks differently
19:40 benabik Erm.  `make selftest` is now just giving "Bytecode validation error at offset 30"
19:40 benabik And `make nqptest` says it can't find ModuleLoader.moarvm
19:41 FROGGS benabik: do you have a ModuleLoader.moarvm? or a .class?
19:41 benabik Hm.  selftest is trying to run ../moarvm instead of ../moar
19:42 FROGGS ohh
19:42 timotimo well, that would probably do it :)
19:42 benabik Ah.  I have a ModuleLoader.class.
19:42 * benabik re-configures
19:42 benabik I thought I had done that
19:42 FROGGS then we must tweak the makefile.in, so it creates the .moarvm now
19:43 benabik FROGGS: It might do that, I think I hadn't reconfigured nqp-cc.
19:43 FROGGS this is a leftover from moving to nqp repo
19:43 FROGGS ahh, okay
19:45 benabik Now it's building a ModuleLoader.moarvm, so I think that was it.
19:45 FROGGS benabik: make selftest works here
19:45 benabik Sorry for the false alarm.  :-/
19:45 FROGGS np :o)
19:46 timotimo not quite a problem? :)
19:48 FROGGS okay, I can't use my produced stage0:
19:48 FROGGS --output=src/stage1/QAST.moarvm src/stage1/gen/QAST.nqp
19:48 FROGGS Use of undeclared variable '$qastcomp' at line 1953, near ".as_mast(@"
19:48 timotimo huh, what's with all these variables getting undeclared?
19:48 timotimo is that one of the earliest files it tries?
19:48 FROGGS I have no idea
19:48 FROGGS no
19:48 FROGGS it is one of the last of stage1
19:52 timotimo that's strange
19:52 timotimo and at a very late line, too
19:52 timotimo so what kind of error hides for that long and *suddenly* shows its head? if it's to do with lexpads/stashes/whatever is at play here
19:54 FROGGS well, for QAST.nqp it concats several files
19:54 FROGGS one of them is the qastompilermast.nqp I am editing
19:54 FROGGS so maybe it has a problem there
19:54 FROGGS like, filesize or chunksizes or something
19:55 benabik Hm.  selftest errors. 19-file-ops.t: "Failed to stat file: no such file or directory" and 82-decode.t: "No registered operation handler for 'encode'""
19:55 FROGGS benabik: this is expeted and fine
19:56 FROGGS it works in the nqp repo because it expects a file in a specific location
19:56 benabik FROGGS: And the no encode handler?
19:57 FROGGS NYI
19:57 benabik Ah.  Don't remember seeing those before, but hey it works.
19:58 FROGGS benabik: the test file was missing :o)
19:58 FROGGS I updated the gist again: https://gist.github.com/FR​OGGS/db53df3844dc98dd6b58
19:59 FROGGS @all: feel free to take it and play, I'm at an dead end atm with this
19:59 timotimo that nqp.diff isn't terribly helpful, it just says "these binary files differ"
20:00 timotimo how do we get to those binary files?
20:00 timotimo just re-run the cross compiler?
20:00 FROGGS yes
20:01 timotimo did you change anything in dyncall/ ?
20:01 FROGGS cd nqp-cc && make && cp *.moarvm ../../nqp/src/stage0
20:01 FROGGS no
20:01 FROGGS that shows up for ages now
20:01 timotimo ok
20:04 timotimo what commit is your nqp on?
20:04 timotimo ah, moarboot of course
20:06 timotimo /home/timo/build/rakudo/install/bin/parrot --output=MASTOps.pbc MASTOps.pir
20:06 timotimo error:imcc:syntax error, unexpected IDENTIFIER ('going') in file 'MASTOps.pir' line 1
20:06 timotimo the what now? o_O
20:07 FROGGS works for me
20:08 FROGGS and there is no 'going' in that file
20:08 FROGGS do you have debug output that lands in that file perhaps?
20:08 timotimo oh!
20:08 timotimo duuuuuh
20:09 timotimo but i put that somewhere entirely else
20:09 timotimo how did this ...
20:09 timotimo ah, of course
20:10 timotimo it was using my system nqp that had the debug output to show me if my optimization disabling thing works or not
20:25 timotimo fwiw, i still cannot build it locally, same error as way earlier
20:26 FROGGS :/
20:43 foo_bar_baz joined #moarvm
21:30 colomon joined #moarvm
21:30 flussence_ joined #moarvm
21:33 jnap joined #moarvm
21:35 eternaleye joined #moarvm
22:18 jnap joined #moarvm
22:45 jnthn woo, I finished my slides and demo code :)
22:51 timotimo are you going to continue hacking on nqp? you must hate sleep! :)
22:53 jnthn hm, I wonder when my train goes in the morning...
22:53 jnthn timotimo: I don't think I'll get any NQP tuits tonight, sadly.
22:56 TimToady then maybe you should work on rakudo instead :)
22:57 TimToady seriously, I've very \o/ about all the recent progress
22:57 jnthn :P
22:57 TimToady so it's okay if you sleep occasionally
22:57 jnap joined #moarvm
23:46 jnthn TimToady: btw, I was in the Rx source earlier today and saw they declared a "class ι". :) One of the few times I've seen Unicode put to use in C# source (outside of string literals, etc.) :)
23:48 * jnthn wonders whether such things will become more common in the future, or remain an oddity :)
23:48 jnap joined #moarvm

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