github.com/moarvm/moarvm | IRC logs at irclog.perlgeek.de/moarvm/today
Set by moderator on 25 August 2013.
01:10 FROGGS_ joined
JimmyZ Good afternoon 04:59
benabik Good after-midnight
FROGGS_ jnthn++ # sounds like le awesomeness! \\o/ 06:16
06:55 moritz_ joined 07:04 segomos_ joined, TimToady_ joined 07:17 BinGOs joined
FROGGS_ MAST -> bytecode sounds like fun 07:27
jnthn Well, we already have most of the pieces... 09:59
Now "just" need to write it up... 10:00
FROGGS jnthn: doesn't feel like I an help with it, right? 10:17
jnthn FROGGS: No, it's mostly just wiring stuff togehter then debugging it... 10:20
Once I get through this, we can all dig into getting the NQP tests passing on selfhost, though : 10:21
:)
FROGGS +1 # I'm all for it :o) 10:23
JimmyZ That should be less pain to wait pbc => pir 10:25
dalek arVM: 095f0b4 | jnthn++ | / (4 files):
Add ops related to MAST assmebly and comp units.
10:41
arVM: e2feff7 | jnthn++ | nqp-cc/src/QASTOperationsMAST.nqp:
Map new MAST/compilation unit ops.
JimmyZ cgoto branch fib(28) is about 3x faster than perl5 10:48
jnthn JimmyZ: How is normal MoarVM? 10:49
JimmyZ: Is that fib written in NQP?
JimmyZ jnthn: \\nqp-cc\\bench\\fib.t 10:50
jnthn JimmyZ: ah, written directly in the assembly...
JimmyZ: That's not really quite fair to compare :)
JimmyZ jnthn: I din't compare the compiling time, only fib call part 10:51
jnthn JimmyZ: I meant, if we want to compare against Perl 5, we should compare the code produced from NQP at least 10:52
JimmyZ jnthn: that's really quite fair either, consider NQP outputs completely unoptimized code, while perl5 not 10:55
oh, consider perl5 doesn't support native int either... 10:59
dalek arVM: 1a9c943 | jnthn++ | nqp-cc/ (4 files):
Get backend-related code sketched out.

In the best case, the new ops "just" need implementing for things to work.
11:07
11:13 not_gerd joined
not_gerd o/ 11:13
jnthn o/ not_gerd
not_gerd jnthn: NQP and Perl5 end up in the same ballpark on on machine
see gist.github.com/gerdr/30f83aabd3c323249f08
test program was a basic, untyped fibonacci 11:14
jnthn not_gerd: Presumably, with a --optimize'd Moar?
not_gerd moving to a flat op set and re-ordering some of the op definitions to get better locality might possibly be enough to make up the difference 11:15
jnthn *nod*
not_gerd jnthn: yes, with optimize
mingw gcc 4.7.3, possibly 4.6.3 (but I don't think so) 11:16
depends on which shell window I used to trigger the compile ;)
jnthn :) 11:17
12:12 cognominal joined
not_gerd drops out again 12:23
I'll see about getting a bit more of the nativecall stuff converted 12:24
o/
jnthn o/
12:24 not_gerd left
nwc10 I'm pretty confident that MoarVM will beat Perl 5 in the long run 12:30
please don't compramise the design to get there sooner, but stuff the long term prospects
JimmyZ Is it a troll?
nwc10 no. 12:31
jnthn JimmyZ: What? :)
nwc10 jnthn: jnthn knows who I am.
jnthn You're telling me! :P
JimmyZ I know too :P
nwc10 good. wasn't sure
jnthn But yes, design matters.
nwc10 I'm trying to imagine the position 10 years from now 12:32
FROGGS as long as jnthn++ is here it won't get messed up I think
jnthn Whining about stuff I consider bad design is probably the most useful thing I do here...
nwc10 given that perl 5 is a 15 to 25 year old codebase
FROGGS jnthn: exactly :o)
JimmyZ Nicholas Clark, right?
nwc10 yes
JimmyZ ;) 12:33
jnthn digs in to wiring up MAST to bytecode
FROGGS and 10 is binary for Jr. ?
:P
nwc10 It's trying to avoid the known "if I were you sir, I wouldn't start from here"
avoid doing the things that came to hurt Perl 5 later on
jnthn wonders if the 10 is from a university email address :) 12:34
(Given I know how email addresses looked there, and am pretty sure nwc10 was at the same place... :))
nwc10 yeah, I got lazy and used the university allocated user ID because it was faster than figuring something else out
jnthn hah!
JimmyZ well, I still don't know what troll means :(
nwc10 yes, not "the other place" (which is a very very demeaning term, as it implies that there are only two places) 12:35
JimmyZ in english
jnthn nwc10: There are other places, there's only two that matter. The good one and the other one. :P
arnsholt Heh. I guess I now know that nwc10 and jnthn went to one of two universities ^_^
nwc10 the other one has a nicer blue. tempted by the dark side, I am...
FROGGS JimmyZ: a troll is sombody that is just here to provoke others 12:36
arnsholt Oxford is the blue one, no? 12:37
And Cambridge is some shade of red (crimson?)?
FROGGS JimmyZ: and it is a fantasy-figure like a dwarf, just taller than humans and usually very stupid
nwc10 en.wikipedia.org/wiki/Cambridge_Blu...8colour%29 -- This colour is actually a medium tone of spring green. 12:38
it's not a very pretty colour
JimmyZ I thought troll is a controversy
arnsholt nwc10: Huh. Didn't know about that one at all
nwc10 but for not-quite-the-colour-you-first thought see encrypted.google.com/images?q=stro...d=0CCcQsAQ 12:39
mmm, that's not obvious that that's "Stroudley's improved engine green"
and encrypted.google.com/search?q=pant...damine+red
which is probably a colour that BooK approves of
arnsholt Generalising from the pictures, is it that shade of mustard yellow?
I work with machine learning, so in cases like that the correct answer is obviously the 12:40
There will always be bad doctors. What's needed is transparency, but laws such as HIPAA protect them (as well as patient privacy), and many doctors now have you sign a NDA before treatment, to prevent disparaging remarks being posted online. 12:41
reply
lutusp 2 hours ago | link
Not to make light of a terrible story, but:
"Somewhere in the world is the world's worst doctor. And what's truly terrifying is that someone has an appointment with him tomorrow morning." -- George Carlin
Blah. Sorry 'bout that. Fat fingers >.<
nwc10 arnsholt: yes. Stroudley was colour blind
arnsholt Oooh, that's actually a pretty good reason for the colour being odd =)
Anyways, I work with machine learning, so picking the most prevalent option comes naturally to me =) 12:42
FROGGS gdb --args ../moarvm nqp.moarvm -e '1' 12:44
Program received signal SIGSEGV, Segmentation fault.
0x0000000000414d4d in MVM_6model_find_method (tc=0x8152c0, obj=0x0, name=0x12e9ab0) at src/6model/6model.c:14
14\t MVMObject *cache = STABLE(obj)->method_cache;
(dunno if that is helpful, I guess not)
jnthn hm
No, that's not what I get :)
JimmyZ FROGGS: you got an old build 12:45
I'm sure
an old nqp-cc
jnthn Also I have local changes...though not ones likely to influence that...
JimmyZ that's segfaut in getcomp('xxx).post 12:46
where should be as_mast
and jnthn++ fixed it
FROGGS jnthn: maybe I have to make clean... I have the last revision...
12:59 benabik joined
FROGGS no, my repo is up-to-date and build afresh, still that error 13:02
latest commit is 1a9c943b15920e85f7133cba4d451abff7ce8aa0
dalek arVM: 7216843 | jnthn++ | / (7 files):
Start getting ops wired up to MAST compiler.
13:03
JimmyZ warning: ā€˜struct _MASTNodeTypes’ declared inside parameter list 13:06
error: conflicting types for ā€˜MVM_mast_compile’ 13:07
FROGGS I get the same
jnthn Fussy compilers...
MSVC doesn't so much as warn.
JimmyZ :) 13:08
FROGGS /home/froggs/dev/MoarVM/src/mast/compiler.c:171:char * MVM_mast_compile(VM, MASTNode *node, MASTNodeTypes *types, unsigned int *size);
/home/froggs/dev/MoarVM/src/mast/compiler.h:1:char * MVM_mast_compile(MVMThreadContext *tc, MVMObject *node, ...
jnthn Right, but if you chase the mappings, they should come out about the same...
Or exactly the same... 13:09
FROGGS jnthn: node has different pointer types 13:11
jnthn FROGGS: ?
FROGGS MASTNode *node <=> MVMObject *node 13:12
jnthn typedef MVMObject MASTNode;
(in nodes_moarvm.h)
FROGGS bah 13:13
:P
maybe this is the problem then? src/mast/compiler.h:2:12: warning: 'struct _MASTNodeTypes' declared inside parameter list [enabled by default]
src/mast/compiler.h:2:12: warning: its scope is only this definition or declaration, which is probably not what you want [enabled by default] 13:14
jnthn That looks more suspect
FROGGS jnthn: hehe, that sounds like a sentence from you :o)
jnthn But then again:
typedef struct _MASTNodeTypes {
...
}
MASTNodeTypes; 13:15
oh, but nodes_moarvm.h ain't #include'd except in mast/compiler.c and mast/driver.c...
So I guess that's why 13:16
Oh, there's no good reason for anything other than driver.c to include compiler.h anyway
FROGGS meh, I wanted to ask that one right now :o) 13:17
jnthn Will do that in a moment... 13:20
JimmyZ added #include "nodes_moarvm.h" in compiler.h fixes here... 13:22
oh, not yet...
jnthn yes, but that's not a good fix :) 13:23
JimmyZ ye 13:24
aye
dalek arVM: 8407c72 | jnthn++ | / (3 files):
Distinguish coercion from typed array access.

This gets the MAST compiler sufficiently fixed up to survive compiling some simple input.
arVM: b3b19ea | jnthn++ | src/m (3 files):
Hopefully fix build on pickier compilers.
FROGGS meh, jnthn++ commits before my box finished compiling 13:33
no, I just have an input line buffering problem and re-read these commits -.- 13:38
it still segfaults here
dalek arVM: 332b707 | jnthn++ | src/core/compunit. (2 files):
Factor out bytes -> comp unit for re-use.
13:39
arVM: 02cf906 | jnthn++ | src/mast/driver.c:
Have MAST compiler driver load bytecode.

It now returns a compilation unit.
arVM: e2f1486 | jnthn++ | src/core/interp.c:
Implement iscompunit op.
13:43
nwc10 jnthn++ # progress on getting to -e "say("hello world")'
dalek arVM: d8a0a5d | jnthn++ | src/core/interp.c:
Implement compunitmainline.
13:52
jnthn I need to fix up the load/deserialize stuff for comp units assembled out of MAST, but... 13:53
C:\\consulting\\MoarVM\\nqp-cc>..\\moarvm.exe nqp.moarvm -e "nqp::say(42)"
42
(can't do say yet, as load is what puts the setting in place)
lizmat jnthn++ 13:57
FROGGS $ ../moarvm nqp.moarvm -e 'nqp::say(42)' 14:15
42
diakopter wat.
FROGGS jnthn++ # it doesnt segfault anymore! (since the last two commits or so)
jnthn *dromroll* 14:17
dalek arVM: caaaa1f | jnthn++ | src/ (3 files):
Preparatory refactor for CU deserialize/load.
arVM: 2fa5099 | jnthn++ | src/ (2 files):
Run deserialize for MAST-compiled comp units.

Don't actaully need to do load, that's a loadbytecode thing while this is a more eval-like case where the invocation happens later. Now, the setting is put in place, and thus the cross-compiler can do 'say(42)'.
jnthn C:\\consulting\\MoarVM\\nqp-cc>..\\moarvm.exe nqp.moarvm -e "say('Hello, Moar')" 14:18
Hello, Moar
\\o/
JimmyZ jnthn++
FROGGS yeah!!
jnthn++
diakopter does it work when --optimize
jnthn No idea :)
jnthn tries
diakopter: yes 14:19
FROGGS $ time ../moarvm nqp.moarvm -e 'say("\\x65")' 14:20
e
real\t0m0.393s
I like it :o)
diakopter 393?!
jnthn FROGGS: Is that optimized or unoptimized?
FROGGS the default, whatever that means 14:21
jnthn Unoptimized.
We didn't deal with serializing the MAST::Ops data structure yet, though, let alone the huge table QAST::CompilerMAST builds up. 14:22
That'll save some. But can worry about that some way down the line :)
diakopter that'll save a lot 14:23
JimmyZ ../moarvm nqp.moarvm -e "nqp::say(42)"
Segmentation fault (core dumped)
diakopter also the op() sub is HORRIBLY inefficient (diakopter--)
in the qast->mast compiler
jnthn, I got my new microsoft sculpt keyboard in the mail; it's worth its weight in gold
node_hash should access a lexical 14:24
jnthn diakopter: nice :) 14:25
FROGGS JimmyZ: maybe do git clean xdf?
jnthn Hm. If you feed it a file x.nqp containing exactly "say('Hello, Moar');" it works, but add a newline and it hangs. D'oh. :) 14:28
diakopter :)
oh, the innumerable little things
jnthn Yes, there'll be a bunch of those. :)
Anyway, nice that selfhost actually manages something 14:29
diakopter yes jnthn++ 14:30
FROGGS what is up next? merge it into nqp repo or fix these nice little things? 14:31
diakopter my boss asked me yesterday what I thought about moving to South Carolina. my reaction: "yes"
JimmyZ ../moarvm nqp.moarvm -e "say('Hello, Moar')" 14:32
No lexical found with name '&say'
diakopter need to nmake nqp-cc
jnthn need to nmake moarvm itself again, I susepct 14:33
JimmyZ nqp::say works \\o/
jnthn that means setting not loaded
FROGGS: No, we need to get selfhost passing t/nqp and t/serialization first :)
FROGGS: Then we can attempt the bootstrap
And yes, then nqp-cc goes away.
FROGGS k 14:35
JimmyZ will moar.exe be short for moarvm? :P
diakopter it'll rarely be run like that; usually it'll be from perl6.exe 14:36
or perl.exe ;)
we can very easily do a similar fakecuteable trick to parrot's 14:37
bbl& 14:40
jnthn aye
what diakopter said
jnthn afk for a bit too
diakopter JimmyZ: to compile NQP.nqp, parrot nqp uses 500MB ram here 14:42
JimmyZ yes 14:43
14:48 cognominal__ joined
JimmyZ hmm, I got No lexical found with name '&say' again 14:49
dalek arVM: bc8b6cf | (Tobias Leich)++ | build/Makefile.in:
simple test target, might need to be improved
14:51
FROGGS segfault in MVM_string_index_of_codepoint called from nqp_nfa_run 14:53
I think I know what I do this night :o)
JimmyZ works now, forgot git pull :/ 14:54
FROGGS the MVM_GRAPHS in src/string/ops.c:L618 something random/uninitialized 15:14
JimmyZ missing MVM_string_flatten? 15:16
FROGGS no idea, I'm off to buy something to eat 15:18
TimToady_ JimmyZ: controversy by itself is not the problem; I would say that a troll is more interested in stirring the controversy than in solving the controversy 15:24
the dishonest part of it is that a troll pretends to be interested in the subject of a controversy when they are not really 15:25
ooh, I have a tail; I must be a troll :) 15:26
JimmyZ hmm, my english dictionary say troll is something about fish
FROGGS no
I dont see a relation between troll and fish
JimmyZ fishing 15:27
TimToady the "troll" means to drag a fishing line behind a boat
*the verb
FROGGS ahh
TimToady but that's also part of the "trolling" metaphor online
it means you are dragging "bait" through a channel to see if anyone bites and fights you 15:28
JimmyZ I didn't see it in my dicts...
TimToady the bait is just saying controversial things you don't necessarily even believe
JimmyZ but I see it said troll is role in some online game 15:29
is a role
TimToady so the online definition of "troll" is really a pun on both the mythical beast that lives under a bridge, and the act of fishing from a boat
JimmyZ oh, I see another one, troll is a network term 15:30
yes, this is what I'm look for 15:31
TimToady but anyway, the two original meanings of "troll" are apparently unrelated to each other 15:34
15:39 ggoebel joined
JimmyZ Good night 15:51
15:55 colomon joined
TimToady huh, my new moarvm still segfaults 16:09
doesn't look like jnthn++ was working in a branch...
maybe I need a reconfig 16:10
jnthn Re-configure the cc also...I fixed a missing Makefile dep last night
TimToady that's what I'm doing 16:11
github having loading issue? I'm getting a lot of "connection refused" 16:14
maybe it's my router crapping out 16:16
looks like it 16:18
still get nothing but segfaults after reconfigging, make clean, make in both directories :( 16:35
(linux, 64-bit) 16:36
FROGGS TimToady: I git cleaned 16:37
TimToady I tend not to do that because I put some of my own files into directories, but I guess it'd work here 16:39
FROGGS yeah :/
well, you could clone the repo afresh, this isnt too bad 16:40
TimToady: btw, -e 'say(1)' should be file while executing a file should segfault atm 16:42
be fine*
TimToady segfaults with -e 16:43
I know about the newline thing
jnthn TimToady: Any chance of a gdb backtrace? 16:44
FROGGS my segfault before git clean was:
0x0000000000414d4d in MVM_6model_find_method (tc=0x81c2c0, obj=0x0, name=0x12f0ab0) at src/6model/6model.c:1
TimToady now configure fails: 16:45
Updating submodules .................................... FAIL git error: fatal: reference is not a tree: a9e6eec70785f43f63ef17189fc2733d4ceb8446
Unable to checkout 'a9e6eec70785f43f63ef17189fc2733d4ceb8446' in submodule path '3rdparty/dyncall'
sync fixed that 16:46
FROGGS I've seen that one too
TimToady maybe that was the problem all along
FROGGS yeah, that would make sense 16:47
jnthn FROGGS: Think I found the reason for the SEGV in the NFA evaluator... 16:50
FROGGS: gc_mark isn't yet implemented in the NFA REPR!
FROGGS jnthn: okay, then I understand why I did not spot the error *g*
TimToady $ ../moarvm nqp.moarvm -e '$_ := 42; say($_)' 16:53
No lexical found with name '$_'
aww
FROGGS too bad
TimToady but say(42) works now \\o/ 16:54
FROGGS that is awesome isnt it? and it is hard to explain this cool stuff (a number gets printed) to a non-hacker... 16:55
"See, it prints 42!! \\o/" - "So what?" 16:56
dalek arVM: a85eec6 | jnthn++ | src/6model/reprs/NFA.c:
Implement missing NFA GC-related functions.
17:12
jnthn dinner &
diakopter back 17:45
it prints 42. so what? 17:46
FROGGS *g*
diakopter <- must not be a hacker
"I can make something print 42, too" 17:48
"surely I could just build on that and make it do all the other things your thing can do"
we should make configure run git submodule sync and update every time 17:49
FROGGS that is like the big bang theory where they control the stereo via internet and satelite-uplink
diakopter also every make target.
FROGGS sounds sane, yeah
jnthn not on every make 17:50
That'll be teh slow... :/
diakopter oh
FROGGS make submodules ?
jnthn Fine
It already takes a bit to re-Configure :)
diakopter I wish compilers were smart enough to infer all dependencies 17:51
.oO( someday... )
FROGGS 22s on my box... the nqp-cc stuff however takes ages 17:52
diakopter jnthn: why does the nfa gc_free free nfa->num_state_edges... shouldn't it free nfa->body.states instead 17:53
jnthn Um, should free both, by the looks of it 17:57
diakopter ah yes
num_state_edges should be renamed state_edges_counts 17:58
dalek arVM: d1100dd | jnthn++ | src/6model/reprs/NFA.c:
Missing free(); diakopter++.
17:59
diakopter leaves that renaming to sum1else 18:00
jnthn: hm I guess I should finish that serialize soon
jnthn: anything else I should work on before that though? 18:02
jnthn diakopter: we'll need it for bootstrap, but we need to get t/nqp passing on selfhost first :)
diakopter: Well, there's probably quite a few little bits to hunt down. The current one is that feeding it a file with a newline at the end hangs :) 18:03
(put "say(42);" in a file and it works; add a newline and it hangs)
Appears to hang in the quantified alternation in token ws 18:04
18:05 Ulti joined
diakopter works on a little smarter tracer 18:07
jnthn ah, golfed 18:09
Running gist.github.com/jnthn/6399764 under nqp-moar-cc.nqp also hangs 18:10
Removing the quant does too
diakopter try removing the $ 18:11
jnthn oh wow, it really golfs 18:12
say("foo;\\n" ~~ /^ 'foo;' \\v+/); # hangs 18:13
diakopter C:\\Users\\mwilson\\src\\MoarVM\\nqp-cc>..\\moarvm nqp.moarvm -e "say(""foo;\\n"" ~~ /^ 'foo;' \\v+/);" 18:17
Method "!dba" not found in cache, and late-bound dispatch NYI at <unknown>:1 (./NQPP6QRegexMoar.moarvm:infixstopper:0)
jnthn no no, run it under the cc 18:18
diakopter oh heh
jnthn wonders what indexat_scb does 18:21
diakopter C:\\Users\\mwilson\\src\\MoarVM\\nqp-cc>nqp nqp-moar-cc.nqp -e "'' ~~ /\\v+/" #hangs
jnthn ohhh
Note that say("foo;\\na" ~~ /^ 'foo;' \\v+/); does not hang
Meaning it's a "oh noes end of string" thing.
diakopter k
jnthn In MVM_string_char_at_in_string 18:22
if (offset < 0 || offset >= NUM_GRAPHS(a)) 18:23
return 0;
But in the op:
if (MVM_string_char_at_in_string(tc, GET_REG(cur_op, 0).s,
GET_REG(cur_op, 2).i64, cu->body.strings[GET_UI16(cur_op, 4)]) >= 0)
cur_op += 10;
diakopter hm oops 18:24
jnthn I guess it should return -1?
diakopter off by -1
jnthn Seems to help 18:25
yayz
..\\moarvm.exe nqp.moarvm t\\nqp\\01-literals.t
...now passes. :)
diakopter awesome
FROGGS O.o
jnthn Next one fials though 18:27
diakopter better than failing.. 18:28
jnthn wow, it's another "how did that ever work" one 18:30
FROGGS hehe
diakopter :)
me hopes jnthn pushes soon 18:31
diakopter too
dalek arVM: 3c85cc2 | jnthn++ | src/strings/ops.c:
An index search returns -1 for not found, not 0.

Fixes the hang in \\v+ at end of string.
jnthn Working on the next one at the moment 18:32
Can somebody add a make selftest target?
prove --exec="../moarvm nqp.maorvm" t/nqp or so
diakopter volunteers FROGGS 18:33
FROGGS jnthn: make test
in main dir
dunno if that works under windows
we pass quite a few test already
jnthn FROGGS: That's the wrong place.
FROGGS ohh, okay 18:34
jnthn make test in the main directory should say somethin glike "build nqp-cc and run tests in there" for now
FROGGS k, I'll change it back
jnthn In the end, we should ship a bunch of .moarvm bytecode files
(Which we generate from something)
diakopter and they'll be stage0?
jnthn So you can test the VM in isolation after building it.
diakopter: No, I just mean test files. 18:35
diakopter oh, heh.
but will stage0 be .moarvm files?
jnthn diakopter: So you can sanity-test that you have a working MoarVM.
diakopter: yes
diakopter: But they go in the NQP repo
diakopter whee
jnthn With upcoming fix, we pass some more of the test files :) 18:36
dalek arVM: dbdabfb | (Tobias Leich)++ | build/Makefile.in:
reverted `make test` patch, wrong place here
18:37
arVM: 992723e | (Tobias Leich)++ | nqp-cc/tools/build/Makefile.in:
added `make selftest` target
diakopter jnthn: are you using the tracing at all to debug?
jnthn No
:)
Though I did throw a one-liner into find_method to print out all the called methods :)
diakopter you can probably tell where something is in the program just by how long it seems to take
FROGGS t/nqp/01-literals.t ................... ok
t/nqp/06-args-pos.t ................... ok
t/nqp/46-charspec.t ................... ok
most of them complain about redeclarations 18:38
brb
dalek arVM: 87a28b3 | jnthn++ | nqp-cc/src/QASTOperationsMAST.nqp:
If return is used, should be sub, not pointy.
jnthn That should get a bunch more
diakopter ohhh.. didn't know that
I thought they were equivalent 18:39
didn't see a reason for them to be different
jnthn need a break, getting sore... 18:45
&
(if somebody wants to hunt the redecl bug, go for it)
FROGGS I'll give my best :o) 18:46
it already passes 10 test files 18:56
jnthn back for a moment 18:58
I think I just realized what the redecl thing may boil down to
FROGGS $ ../moarvm nqp.moarvm -e 'my $x' 18:59
Redeclaration of symbol $x at line 2, near ""
it does it twice?
(just a stupid guess)
jnthn No, it relies on ?%h being false when %h is empty, and Moar gives true 19:01
Got a fix here
dalek arVM: 8df1a0e | jnthn++ | src/6model/bootstrap.c:
Fix thinko in BOOTHash boolification.
FROGGS is that related?
$ ../moarvm nqp.moarvm t/nqp/07-boolean.t 19:02
falsey NYI
jnthn No, that's separate
Trying a fix for that 19:03
FROGGS hehe
$ make selftest 2>/dev/null | grep '.. ok' | wc -l
32
^^
jnthn We pass 32 of the test files already?! 19:04
FROGGS yesh
jnthn 32 out of 68 :)
Just under half
nwc10 are we going to skip Autumn and jump straight to Christmas?
jnthn Not bad on the day it became self-aware
uh, I mean...self-hosting
FROGGS *g*
nwc10 check - does it have a bad Austrian accent and a future in poltics? 19:05
oh wait, that's its minion.
FROGGS ohh, it passes 33 files, I had fiddled with #9, and now unfiddled it :o) 19:06
diakopter no, but it's made of liquidmetal 19:07
FROGGS I guess we pass another 20 when fixing 'falsey NYI'
diakopter there's a lot more left of the day, too 19:08
FROGGS less than 3 hours here
diakopter
.oO( worldwide days are twice as long
)
dalek arVM: 11bd2d4 | jnthn++ | nqp-cc/nqp-src/NQP.nqp:
Get nqp::falsey working on self-host.
19:09
jnthn Really afk for a bit, and no, I didn't spot the next failure to worry about, so I will actually take a break :P
&
19:12 cognominal joined
FROGGS we pass 38 test files now 19:14
(of 67 files) 19:15
19:26 cognominal joined
TimToady wow 19:30
19:31 woolfy joined 19:36 Guest1337 joined 19:41 cognominal joined 19:50 cognominal joined
TimToady looks like a bunch of 'em want $!named 19:53
20:06 colomon joined
FROGGS yeah, this condition is (accidentally?) false in this case: github.com/MoarVM/MoarVM/blob/mast...aque.c#L62 20:06
jnthn back 20:23
20:30 benabik joined
FROGGS I really think there is something missing when mixin in in QAST::SpecialArg 20:33
jnthn Yeah, something is wrong there...not sure quite what yet
Tried to get it down to a simple test case, but no luck yet
(as in, just a class and a role)
FROGGS do you have an attribute in that class/role? 20:34
jnthn yeah
Even tried adding a parent class with an attr
FROGGS: Stranger, if you just do: 20:50
named('lol')
oops
use QASTNodesMoar;
my $op := QAST::Op.new( :op('null'), :named('no_handler') );
It works...
um, works under the cross-comp. 20:51
And same error on self-host. Weird.
FROGGS IMO the while loop triggers it 20:52
jnthn oh, stranger still... 20:53
oh, for sure
It sets :no_handler(1)
Weird. 20:54
FROGGS I'd say it calls get_attribute with an unkown class_key, which is not the one the class was changed to 20:55
(just comparing the pointers)
jnthn What's really odd is that I can write a program that simply sits in a loop making QAST::Op nodes with a named set on them, and it just works 21:02
Yet when it's done from, say, the actions, it goes wrong.
FROGGS you're mixin in something in QAST::SpecialArg in your test? 21:03
or in your classes?
jnthn gist.github.com/jnthn/6400630 21:04
That works 21:05
FROGGS Invalid string index: max 166, got 167 21:06
at <unknown>:1 (nqp.moarvm:ENDSTMT:0)
I get that
jnthn ohhh 21:07
Well, no idea what that is :)
But I think I found the smoking gun...
FROGGS O.o
jnthn yah 21:08
gist.github.com/jnthn/6400648 does it 21:09
Either on selfhost or cross-comp.
FROGGS true
jnthn So, role environment handling is wrong somewhere 21:10
FROGGS ohh waht the, the produced ast is huuuuuuuge 21:11
(from the nqp-cc)
and it doesnt even contain the script as it seems 21:13
when running it via gdb and --crash it looks like it fails in bind_attribute this time 21:15
makes sense
jnthn cross-references nqp-jvm 21:20
aha 21:25
grmbl
FROGGS what is it? 21:31
dalek arVM: 6bcce7b | jnthn++ | src/6model/reprs/MVMCode.c:
Fix role environment handling.

In turn, fixes .named(...) on QAST nodes.
21:32
jnthn was that
FROGGS looks totally unrelated to me :o) 21:34
well, not totally
jnthn Well, if you understand role type environment == lexical scope, maybe it's less weird :) 21:35
And $?CLASS in a role comes from the type env.
And that's what goes into class_handle
21:37 colomon joined
jnthn More fixes coming soon :) 21:38
FROGGS :o)
diakopter yeah, my attempts at the static frame ops were... wild guesses.
with about 5% certainty they were correct 21:39
oh, someone needs to add the moarvm executable as a dependency on the cross-compiler targets that invoke it 21:41
someone != me, right now
diakopter looks at TimToady and wonders if he has a commit bit
FROGGS diakopter: the moarvm executable is only used by selftest, and that depends on all which makes it 21:43
diakopter I meant the cross-compiler makefile 21:44
FROGGS right
diakopter nqp-cc/Makefile
FROGGS yes
me too
selftest: all 21:45
prove -e "../moarvm nqp.moarvm" t/nqp
jnthn wonders what we're up to now after his last patch :)
diakopter I must not have reconfigured
FROGGS running it already
diakopter has no idea how fast it runs 21:46
FROGGS 46
jnthn We pass 46 in selfhost, cross-comp does 68?
FROGGS 67 test files in t/nqp
diakopter 46 light years per year?
jnthn Working on fixes for 3 different things here 21:47
diakopter heh.
FROGGS yes, we pass 46 test files, and their bytecode is a light year long
(if you write big enough)
diakopter guesses jnthn is working on static frame ops
the travel on the Esc key on this keyboard is... like 1mm 21:48
same for all the top-row keys, actually.
interesting. the travel gets shorter the higher you go on the keyboard 21:49
fingers have less leverage on the end I guess
diakopter waits for jnthn's patches 21:50
"wouldn't want to duplicate work; ho hum. ;)"
^ me quoting myself
FROGGS I guess he is working on the segfault in type_to_local_type
diakopter FROGGS: how does the all target in nqp-cc/Makefile build moarvm.exe ? 21:51
dalek arVM: 35402b8 | jnthn++ | src/mast/compiler.c:
Handle null type.
21:52
arVM: 9cb280d | jnthn++ | src/6model/reprs/P6opaque.c:
Pre-compose P6opaque has no REPR data.
arVM: da05a3a | jnthn++ | nqp-cc/src/QASTRegexCompilerMAST.nqp:
Fix thinko in dba compilation.
FROGGS ahh, no, it just builds nqp.moarvm for example
ohh, the dba thing too
jnthn++
diakopter I said "the moarvm executable"
jnthn Note that rebuilding the moarvm executable doesn't automatically imply we need to re-build anything else... 21:53
In fact, I rely on being able to re-build that separately at the moment to be productive :)
FROGGS jnthn: absolutely
building nqp.moarvm takes ages (feels like 10 minutes), will it stay that way? 21:54
diakopter takes 2 min here
FROGGS hmmm
jnthn FROGGS: Probably not, given the cross-comp is a throwaway on the way to bootstrap
FROGGS awesome 21:55
dalek Heuristic branch merge: pushed 66 commits to MoarVM/serialize by diakopter 22:00
TimToady looks like something's trying to use VMArray as a match object or some such 22:04
dalek arVM: dcf55bc | jnthn++ | nqp-cc/src/QASTRegexCompilerMAST.nqp:
Fix to regex op compiler.
jnthn TimToady: ^
diakopter ah.
bah.
TimToady jnthn++
diakopter start to work on something... need to pull/rebuild again... 22:05
repeat
FROGGS 57 passing O.o
TimToady just don't be in a lather, speaking of horses
FROGGS pulls+builds
diakopter slather your blather flather 22:06
TimToady rinses 22:07
diakopter "why do you need a new shampoo bottle every day?" "I just follow its instructions" 22:08
TimToady there's a salsa band next door; getting a free concert here :) 22:09
diakopter jnthn: speaking of push_op, it takes..... FOREVER
and it's called ... a million times, literally 22:10
jnthn diakopter: aye...
diakopter building .moarvm would speed up immensely...
it does a ... linear search.
*facepalm*
TimToady now fails 6 tests 22:11
diakopter crazy. 22:12
'course, not all the tests from nqp are imported yet
FROGGS .oO( yeah, some are more imported than others... )
TimToady the nqp tests are unevenly distributed 22:13
diakopter heh heh "Substring length (-5) cannot be negative"
TimToady yes, that one's entertaining
diakopter nqp: say(substr("hhhhhh", 5, -5)) 22:14
...
diakopter decides to work on profiling/optimization since jnthn is fixing things too fast 22:18
:D :D :D
jnthn diakopter: t\\nqp\\42-cond-loop.t I'll happily delegate
diakopter: It explodes in the GC ;)
diakopter bah 22:22
FROGGS only 5 failing test files, can't believe it 22:23
diakopter the object pointer address is 0x0028000000000000
*headdesk*
means something's not being marked..
FROGGS you typecast integers to pointers?
humm, okay
TimToady is that where your stack is?
diakopter heh
yes I have oodles of ram
oh, you were serious 22:24
TimToady virtual address doesn't have to have anything to do with physical ram
most systems put their stacks way up high
diakopter +\t\t&item_gen2\t0x000000000039e370 "Ć£9"\tunsigned char *
current stack 22:25
I think.
jnthn eek 22:26
That's odd
diakopter looks up one C callframe
+\t\t&tc\t0x000000000039e430\tMVMThreadContext * *
yep, building downward 22:27
TimToady well, it's probably too "clean" a number to be your stack, unless it's the root 22:28
diakopter hunh.. I can actually look at register values
weeuhd
jnthn ah, got to the root of the proto-regex failure... 22:29
TimToady diakopter: maybe you found the NSA's special location in memory :)
I mean, after all, where does all that garbage go? 22:30
FROGGS jnthn: this line? nqp-src/NQP.nqp:3374: my str $rxname := nqp::substr($fullrxname, $loc + 5, nqp::chars($fullrxname) - $loc - 6);
jnthn FROGGS: Yeah, but the problem is that %*RX<name> is empty 22:31
FROGGS that was my guess 22:32
jnthn it's 'cus:
token nibbler {
:my $OLDRX := nqp::getlexdyn('%*RX');
:my %*RX;
:my $*SEQ := 0;
{
for $OLDRX { %*RX{$_.key} := $_.value; }
}
On Parrot and JVM, nqp::getlexdyn starts a frame out from the current one.
diakopter hee
oops.
jnthn And contextuals in the current frame are identified as such.
diakopter <- must've not've read the nqp spec closely enough... oh wait... 22:33
jnthn Fixing it to start one out works *but* breaks other things 'cus lexicals that happen to be $*FOO but are declared in the current frame are not compiled as simple lexical lookups... P)
diakopter augh
TimToady we have to redesign P6 now? 22:34
diakopter might as well start from the RFCs again
FROGGS that is the point where I am looking up the frame of my bed...
gnight all
TimToady could we skip the mugs this time?
timotimo let's base it on google go this time
diakopter FROGGS: :) 22:35
diakopter is somehow reading the source of msvcrt 22:36
crt0.c - C runtime initialization routine
TimToady virtual CRTs, yum
diakopter * This is the actual startup routine for apps. It calls the user's main
* routine [w]main() or [w]WinMain after performing C Run-Time Library
* initialization.
#include <dos.h>
TimToady ooh, copyright violation :) 22:37
you have to include the copyright notice before legally commiting a copyright violation like that :P 22:38
benabik DMCA takedown for the irc logs in 3...2...
TimToady *mitting
timotimo no copyright intended 22:39
TimToady doubtless someone has patented crt files too, and probably trademarked it too
benabik Only copy wrongs? 22:40
TimToady remembers when /bin/false, an empty file, had to have a copyright notice put into it... 22:41
jnthn Think I've got 32-protoregex.t fixed locally; making sure I didn't regress anything. 22:44
sorear an empty file? they didn't even bother with the shebang? 22:45
sorear thinks everything in /bin should be execveable
TimToady no #! line defaulted to /bin/sh 22:46
besides, they didn't invent the shebang, berkeley did
sorear was that a kernel feature back then, or is it still that way and I'm just crazy
TimToady I think the library figgered it out 22:47
iirc
sorear (why wouldn't an empty file be "true" ?)
TimToady oh, yeah, it was /bin/true
/bin/false was just 'exit 1'
diakopter probably exit(1) 22:48
sorear is suddenly reminded of the old joke about false being the most portable and reliable Unix program since it works even when it's not installed
TimToady diakopter: probably not, considering it was shell code, not C
diakopter oh heh.
sorear [gt@sorear1 gt-import]$ /bin/false --version 22:49
false (GNU coreutils) 8.4
Copyright (C) 2010 Free Software Foundation, Inc.
~progress~
diakopter disregards jnthn's plea to indulge GC insanity and instead goes a'profiling
TimToady $ sh /dev/null; echo $? 22:50
0
diakopter it's hard to know which function calls to optimize when none takes longer than 0.0099 ms and your profiler won't show more significant digits 22:54
TimToady the ones with a million linear searches? 22:55
diakopter that's at the nqp level
dont' have a profiler for that yet
jnthn The GC bug moves around, it seems...
dalek arVM: 22d8e75 | jnthn++ | / (2 files):
Fixes to dynamic variable handling.

Brings things inline with other backends, fixing the bug affecting 32-protoregex.t.
22:56
diakopter well if there's corrupt data it can sometimes not fail certain places
jnthn (e.g. the one that crashed before works but others fail)
diakopter TimToady: but yes, that needs fixed too 22:58
TimToady yeah, back up to 12 23:02
should make it easier to dodecangulate the problem 23:04
diakopter 1 million calls to MVM_string_get_codepoint_at_nocheck in 55-multi-method.t 23:07
jnthn ell, it happens when it's scanning the old space post-GC, and curiously before the thing it chokes on is (so far) always an array... 23:08
diakopter unrelatedly, also 1 million calls to decode_utf8_byte
WAT.
what in the world is it decoding....... 23:09
23:09 foo_bar_baz joined
diakopter oh. deserialize. 23:10
!!!!!!!!
sorear base64 encoded utf8 encoded text?
diakopter goes to time deserialize
sorear: yes :D
sorear er, other way around
jnthn I'm pretty sure we can assume it's ASCII... :) 23:11
sorear gotta watch out for those bytes that base64 as ƶ
jnthn ƶh-oh...
diakopter the serializer should look in its sc dependencies for dupe strings 23:14
because this is just crazy.
deserialize_strings called MVM_string_utf8_decode 9,317 times 23:17
what, is the vast majority of a .moarvm serialized strings? 23:19
at least 1MB worth of what was loaded..
exactly 1/3 23:20
of the bytes of all the .moarvm in nqp are serialized strings
"exactly" used loosely
jnthn: we really need a version of compiler.c that compiles directly to a compunit in memory... eventually 23:22
meh, I take that back 23:23
jnthn diakopter: There's probably some saving to be had there...
(on compiler.c) 23:24
diakopter there was only 221ms inclusive in MVM_load_bytecode of its 10 calls
(total run 15.5 seconds, profiled)
there has got to be a way to turn off this "feature" of visual studio profiling. 23:27
where it treats every loop through the interpreter runloop as a separate function call 23:28
but doesn't tell me which case it went to
jnthn: oops, actually total run time 10 seconds 23:29
oh! but it does differentiate the interp_run calls by memory address. 23:40
WEIRD.
.. but I have no access to those addresses once the process ends.. 23:42
diakopter goes to find a better profiler 23:49
jnthn ain't having much luck finding the bug 23:50
TimToady obviously you are not at the Balmer peak, but then again, neither was Balmer, apparently... 23:53
23:54 benabik joined
jnthn Think I'll put it aside for today. Can't do "hello world" to passing 50+ of t/nqp isn't bad for a day's work :) 23:57
timotimo ooooh 23:58
TimToady fershure 23:59