Perl 6 - the future is here, just unevenly distributed

IRC log for #moarvm, 2013-11-29

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

All times shown according to UTC.

Time Nick Message
00:00 FROGGS TimToady: you maybe need to make realclean in MoarVM and then a git submodule update
00:01 FROGGS I can't imagine that it is something else because Ubuntu-ish x86_64 should just work
00:18 cognominal__ joined #moarvm
00:48 [Coke] jnthn++
01:24 diakopter TimToady: ping
01:27 diakopter TimToady: I've seen a problen like that when there is a conflicting nqp or parrot or something in the path. I'd try it with no p6 stuff in thr path if it is
01:41 jnap joined #moarvm
02:07 TimToady jnthn: backtrace is at https://gist.github.com/TimToady/7700634
02:13 diakopter oh ok.
02:13 diakopter (yay that it's tracked down that far ;)
02:15 TimToady something funny going on with git though
02:16 TimToady if I switch to MoarVM and do git checkout master, it says I have something changed and unresolved, lib/MAST/Ops.nqp
02:16 TimToady which I dint change
02:16 TimToady trying to blow away MoarVM and reclone
02:20 diakopter sounds like someone did a force push or something
02:24 TimToady if I blow away and --gen-nqp (in nqp's Configure), it fails
02:24 TimToady if I --gen-nqp=master, it succeeds
02:25 * TimToady guesses that nom's --gen-nqp isn't passing down it's option correctly to nqp's Configure
02:25 TimToady *its
02:27 TimToady trying nom's Configure again now that nqp has bootstrapped on moar
02:31 TimToady it seems to do a deeply suboptimal amount of work re-genning jvm and parrot backends before attempting moar
02:32 TimToady something is badly wrong with our configuration model
02:35 TimToady yes, doing --gen-moar from nom level breaks again; only cd nqp; perl Configure.pl --gen-moar=master fixes it
02:35 TimToady despite the fact that after the first, it thinks it's on master, and shows no diffs
02:35 * TimToady scratches brane
02:36 * TimToady will try the top level with --with instead this time
02:38 TimToady actually, just trying with only --backends now, and maybe it'll use everything nqp put together
02:39 BenGoldberg joined #moarvm
02:39 TimToady the makefile seems to know how to build perl6-j, so that's a hopeful sign...
02:48 TimToady nope, doesn't find nqp-m, it's in nqp's install direction, not nom's
02:51 TimToady going back to rebuilding nqp with: perl Configure.pl --gen-moar=master --prefix=../install
02:52 TimToady after blowing away MoarVM again, because it segvs again
02:54 TimToady and of course, if you pass a --prefix to nqp's Configure, it doesn't add a .. to moar's prefix
02:54 TimToady lesson: don't use relative paths in prefix?
03:08 TimToady crumb, failed compiling BOOTSTRAP, moar: 3rdparty/libuv/src/unix/loop.c:150: uv__loop_delete: Assertion `!((((*(&(loop)->active_reqs))[0]) == (&(loop)->active_reqs)) == 0)' failed.
03:11 lue TimToady: ISTR getting that error a while back. If memory serves, that's not the source of the error.
03:11 * TimToady vaguely recalls reading that too
03:12 * lue tries the rakudo-moar process
03:13 colomon joined #moarvm
03:14 * TimToady first tries a make clean
03:27 TimToady duh, never did a git pull to get jnthn++'s fix, I think
03:31 TimToady nope, still fails to compile m-BOOTSTRAP
03:37 TimToady FROGGS++ was talking about m-BOOTSTRAP at http://irclog.perlgeek.de/moarvm/2013-11-26#i_7916795 but I don't know if that's germaine
03:46 TimToady okay, can't think of anything else, so here's the gist: https://gist.github.com/TimToady/7701310
04:16 colomon joined #moarvm
04:28 woosley joined #moarvm
05:40 BenGoldberg joined #moarvm
06:11 ssutch joined #moarvm
07:24 FROGGS TimToady: can you paste rakudo's Makefile? because that message is weird: failed to load library 'dynext/'
07:26 FROGGS I guess your lines are different to these:
07:26 FROGGS M_PERL6_OPS_DIR  = dynext
07:26 FROGGS M_PERL6_OPS_DLL  = $(M_PERL6_OPS_DIR)/libperl6_ops_moar.so
07:27 FROGGS nqp-m: say(nqp::backendconfig<dll>)
07:27 camelia nqp-moarvm: OUTPUT«lib%s.so␤»
07:27 FROGGS do you get that?
07:29 TimToady sec
07:30 TimToady https://gist.github.com/TimToady/7702585
07:31 TimToady lib%s.so
07:36 FROGGS okay, so I think it is either rakudo's Configure.pl's fault, or we have a problem spitting out nqp-m --dump-config again
07:37 FROGGS what is your nqp-m --show-config | wc
07:47 jnthn morning o/
07:48 FROGGS morning jnthn
07:48 jnthn So....what am I teaching today...
07:50 FROGGS jnthn: just ask your students how much they know about the topic and in what they are interested most :o)
07:51 jnthn :)
07:53 jnthn Seems that today we'll be adding shiny Ajax-powered stuff to our demo app (which is actually a beer review website) and conducting CSRF exploits...then hopefully fixing them. :)
07:54 FROGGS who had that website idea? :P
07:55 jnthn The course material author, apparently :P
07:55 FROGGS hmmm, why can I now close filehandles now again? it crashed last time badly...
07:55 FROGGS hehe
07:55 FROGGS :o)
07:57 FROGGS ahh no, when I close stdhandles, the it is all fine  in a test script after nqp was built, but I can't build nqp nor rakudo
08:06 TimToady I get    117     336    8685
08:06 jnthn bbiab &
08:50 nwc10 I get
08:50 nwc10 Stage mbc        :   1.980
08:50 nwc10 and then the assertion abort from libuv
08:51 nwc10 this is expected? And why is libuv still upset?
08:52 FROGGS TimToady: that is alright
08:53 FROGGS would be interesting to know what happens here:
08:54 FROGGS rakudo/Configure.pl:236:        $config{'perl6_ops_dll'} = sprintf($nqp_config{'moar::dll'}, 'perl6_ops_moar');
08:54 jnthn nwc10: Not sure on the libuv thing. I've been hoping somebody else will take care of it, but maybe I'll have to take a look at it sometime soon...
08:55 FROGGS nwc10: libuv is upset because there are unclosed and not cleaned up filehandles flying around... (from printing stagestats to stderr)
08:56 jnthn FROGGS: But don't they get cleaned up in global destruction?
08:56 FROGGS jnthn: no
08:56 FROGGS see https://github.com/MoarVM/MoarVM/blob/master/src/6model/reprs/MVMOSHandle.c#L48
08:57 FROGGS jnthn: if I walk the filehandles in tc_destroy, and do the same magic as in the linked section, it still blows up
08:57 FROGGS I mean, I still can't build nqp or rakudo
08:58 jnthn Hmm
08:58 FROGGS it is like we need to distinguish between stdhandles in user code and nqp/rakudo build code
09:05 jnthn We shouldn't need to do that...just need to be a bit more careful over lifetime management of them, I'd guess.
09:08 FROGGS hmmmm
09:08 FROGGS :/
09:11 nwc10 I'm not *sure*. You both might be right. Or I might be teapot, or something
09:11 nwc10 but there is this fun with "embedding" where "you" (the embedded program) don't own stdin, stdout, stderr
09:11 nwc10 and you need to avoid closing them, unless the user program code explicitly told you to
09:12 nwc10 the real quote is "If that's justice, then I'm a banana" -- http://news.bbc.co.uk/onthisday/hi/dates/stories/may/24/newsid_2503000/2503595.stm
09:12 nwc10 but it doesn't an HTTP status code
09:13 nwc10 (and gosh, Ian Hislop looks young in that photo)
09:13 nwc10 IIRC that page is incomplete - it later turned out that the allegation deemed to be libelous was true
09:16 FROGGS nwc10: the current code (HEAD) does not close stdhandles, and this is why libuv explodes when deleting its event loop
09:16 FROGGS btw:
09:16 FROGGS nqp-m -e 'my $fh := nqp::getstderr; nqp::printfh($fh, "ohh noes!\n")' # explodes
09:17 FROGGS nqp-m -e 'my $fh := nqp::getstderr;' # does not
09:17 FROGGS when we close the handles (yes, even stderr), both commands do not explode
09:17 FROGGS but this borks building nqp/rakudo
09:17 FROGGS and that is something I dont understand
09:22 retupmoc1 joined #moarvm
09:35 cxreg joined #moarvm
10:03 woolfy left #moarvm
10:07 woosley left #moarvm
10:09 FROGGS joined #moarvm
11:04 timotimo how far are we getting today? :)
11:06 jnthn Same as when I went to bed last night, I think :)
11:06 timotimo so ... no advance?
11:06 timotimo or the same amount of advancement as yesterday? :P
11:08 jnthn Well, we get to loading the setting and fail around line 500 afaict
11:11 timotimo oh, i worded my question poorly
11:12 timotimo i meant: at the end of today, where do you imagine the progress to be?
11:15 jnthn I really dunno
11:15 jnthn for me, I got a 4+ hour train journey home. Which sounds productive, but I can't work comfortably on a laptop on a train really...
11:15 jnthn So it'll be whatever time exists between getting home and needing to sleep :)
11:16 nwc10 does the train have beer? If so, is it decent? If so, is it anything other than insanely expensive?
11:16 FROGGS how does it fail actually? I just got a meaningless segfault IIRC
11:21 jnthn nwc10: Um...you can't take your own beer on the train. And what they have is probably both expensive and, like, stor stark or some crap...
11:23 nwc10 not that it matters for this question, but is that "you can't take beer onto the train" or "you can't drink your own beer on the train"?
11:24 jnthn uh...the latter :)
11:24 jnthn Hadnt' used to be this way
11:25 jnthn But then I guess stupid people ruined it.
11:25 nwc10 The former would be somewhat crazy.
11:25 jnthn aye
11:25 nwc10 In that in the UK there is provision for "dry trains" but they really are "no booze anywhere"
11:25 nwc10 (not even carried unopened in the guard's van)
11:26 jnthn Who's gonna know if there's a bottle of something in your rucksack,though, if you keep it there? :)
11:26 jnthn ok, time to take @class to lunch...
12:09 tgt joined #moarvm
12:15 FROGGS ahh
12:16 FROGGS I have to twiddle perl6-m's libpath
12:39 FROGGS TimToady: you have not a single moarvm config item in your generated makefile: https://gist.github.com/TimToady/7702585#file-gistfile1-txt-L985
12:41 FROGGS I'll test if that is due to your prefix... (mine is nqp/install, and moarvm, nqp and rakudo are on the same directory level)
13:09 nwc10 vagrlind is reporting errors for current HEAD: http://paste.scsys.co.uk/282100
13:10 nwc10 er, ex-current HEAD
13:10 nwc10 I think that that was 66bf730ff695b5fb4c88ea60eb0b77bbf9fa2d0f - Implement SIG_ELEM_DEFAULT_FROM_OUTER.
13:20 FROGGS umm, I think I've got a patch for libuv's sadness
13:39 FROGGS diakopter: ping
13:47 FROGGS why does that what perl6-m do after stage mbc takes no cpu?
14:03 tgt joined #moarvm
14:18 FROGGS looks my closing file handle patch is ending in a deadlock :/
14:37 diakopter pong
14:37 FROGGS diakopter: hi
14:37 FROGGS you remember that I once closed the stdhandles?
14:38 FROGGS what were the problems with that on windows?
14:38 FROGGS because I am testing a patch that would close all unclosed handles when shutting down
14:38 diakopter don't know the specifics
14:39 diakopter cool
14:39 FROGGS and it seems to work nicely on windows
14:39 FROGGS (and linux)
14:39 FROGGS k
14:39 diakopter but the global destruct phase is supposed to do that by calling gc_free on everything
14:39 FROGGS then I will commit after a bit more testing
14:40 FROGGS diakopter: that does not seem to work here
14:40 FROGGS I am closing opened handles in tc_destroy now
14:40 diakopter are their gc_free not being run?
14:40 FROGGS (right before deleting the libuv loop)
14:41 diakopter well it's supposed to clean them via the gc
14:41 FROGGS I think gc_frees got run, but maybe to early in some cases?
14:41 diakopter so that should be fixed instead
14:41 tgt joined #moarvm
14:41 FROGGS but this particular thing works in tc_destroy but not in gc_free
14:42 FROGGS the same code that is
14:42 diakopter what I'm saying is when the destruct phase or gc problem gets fixed, they will be closed then
14:43 diakopter it doesn't make sense for them to run "too early"
14:44 FROGGS what if you create a stderr fh in your test script that goes out of scope? when will gc_free on it be called?
14:46 FROGGS damnit, not it hangs again after stage mbc -.-
14:46 FROGGS s/not/now/
14:48 jnthn Once we reach global destruction we run no more code.
14:49 diakopter FROGGS: that's why I said a while ago the standard filehandles need globally created and rooted globally.
14:50 diakopter and then jnthn saif the same thing a few weeks later
14:50 jnthn Did we not already do that?
14:50 jnthn I remember it beign discussed
14:50 jnthn Not sure if it happened.
14:51 diakopter I don't think anyone did it
14:51 FROGGS I tested stashing them, without change in behaviour, so I not committed that patch
14:51 diakopter stashing?
14:52 FROGGS stashing
14:52 diakopter what is stashing
14:52 FROGGS https://gist.github.com/FROGGS/d245bd7f983e0b5c138f
14:52 diakopter can't click links on this phine terminal
14:53 jnthn phine is a curious spelling of effing... :P
14:53 diakopter I just wanted to know whether yiur patch rooted them
14:54 diakopter also, what "behavior" was your patch trying to solve
14:54 diakopter jnthn: lololol
14:54 FROGGS diakopter: that there is only one filehandle for stderr for example
14:55 diakopter oh, that's necessary to enforce too
14:55 jnthn It appears to fail to root them
14:55 diakopter wel
14:55 diakopter well
14:55 diakopter well then
14:56 jnthn Which certainly won't work out well :)
14:56 FROGGS k
14:56 FROGGS retrying
14:56 diakopter FROGGS: but thr thing about them not being closed in global destruct is troublong
14:57 diakopter umless the closing thing in gc_free was removed
14:59 FROGGS diakopter: it was commented out because it caused trouble
14:59 FROGGS might be related to not perm rooting the handles though
15:00 diakopter I'm sure that could be described very differently (without implyong it was that code to blsme) :p
15:00 FROGGS :o)
15:01 FROGGS okay, nqp seems to build atm
15:03 benabik joined #moarvm
15:22 FROGGS yay, rakudo built until the "cannot invoke null object" and then got stuck after printing the backtrace -.-
15:24 FROGGS k, "nqp-m -e '1 1'" hangs too after the backtrace
15:24 jnthn aww
15:25 * jnthn enourages FROGGS to hang on in there...
16:17 * FROGGS does not dare to hope
16:37 FROGGS joined #moarvm
17:06 dalek MoarVM/hope: 05eaefe | (Tobias Leich)++ | src/ (5 files):
17:06 dalek MoarVM/hope: stash and free std filehandles
17:06 dalek MoarVM/hope:
17:06 dalek MoarVM/hope: STDIN, STDOUT and STDERR are created once per instance, and handed
17:06 dalek MoarVM/hope: out on request. We now clean up all handles but the previously
17:06 dalek MoarVM/hope: mentioned when gc_free-ing a filehandle.
17:06 dalek MoarVM/hope: review: https://github.com/MoarVM/MoarVM/commit/05eaefe843
17:13 dalek MoarVM/hope: 5b3efce | (Tobias Leich)++ | src/ (4 files):
17:13 dalek MoarVM/hope: msvc does not like names like stdin
17:13 dalek MoarVM/hope: review: https://github.com/MoarVM/MoarVM/commit/5b3efce5f2
17:16 timotimo "hope" :)
17:21 FROGGS yeah :/
17:21 FROGGS would be cool if you could check that out
17:21 FROGGS and rebuild nqp and rakudo or so
17:26 timotimo oh, sure thing
17:31 FROGGS that seems to work on windows too
17:31 timotimo i'm up to actions now.
17:32 FROGGS timotimo: btw, that libuv error will show up if we panic in moarvm land which does not gc_free the MVMOSFilehandes
17:32 timotimo ah, ok
17:32 timotimo i remember seeing that panic function show up in a stacktrace
17:33 FROGGS but this will only ever occur if we panic anyway, so there will be a proper error message above libuv's
17:33 timotimo yeah
17:33 timotimo that's acceptable
17:33 FROGGS I think so too
17:33 FROGGS atm we die after printing stagestats even when the CORE.setting.moarvm got created successfully
17:34 FROGGS now we get to the "Cannot invoke null object" straight ahead
17:36 FROGGS do we actually know why it explodes like that?
17:39 timotimo it's about to finish.
17:40 timotimo i think i forgot to pass --optimize
17:48 retupmoca .
17:50 timotimo yeah, it does segfault.
17:50 timotimo i don't get that message you mentioned, FROGGS
17:50 timotimo 4195926 9,9M -rw-r--r-- 1 timo timo 9,9M Nov 29 18:45 CORE.setting.moarvm
17:51 timotimo huh, we're still putting base64-encoded stuff into the .moarvm file?
17:52 timotimo my xxd just froze... wat?
17:53 FROGGS[mobile] joined #moarvm
17:56 timotimo however, this is a thing: Unhandled exception: While looking for 'ModuleLoader.moarvm': no such file or directory at <unknown>:1  (perl6.moarvm:frame_name_9:6)
18:09 FROGGS[mobile] did you pull in rakudo too?
18:09 FROGGS[mobile] I'd guess you are missing the runner patch
18:13 timotimo oh, i didn't pull rakudo
18:27 FROGGS[mobile] Ohh, what a relief
18:28 timotimo Cannot invoke null object
18:28 timotimo :)
18:29 timotimo are the line numbers kind of off?
18:30 FROGGS[mobile] No idea
18:30 timotimo also, can i dump moarvm bytecode to a pretty-printed format easily?
18:30 FROGGS[mobile] There was no patch about that afaik
18:30 timotimo OK
18:30 timotimo what's with "frame_name_1901", is that very hard to improve?
18:30 diakopter yes
18:31 FROGGS[mobile] there is a --dump
18:31 diakopter --dump
18:31 timotimo moarvm --dump foo.moarvm?
18:31 FROGGS[mobile] Yes
18:31 timotimo [1]    14615 segmentation fault (core dumped)  moar --dump CORE.setting.moarvm
18:31 timotimo yeah, it *did* dump
18:31 diakopter it may take a dump instead though
18:31 diakopter yes
18:32 FROGGS[mobile] And moar --dump nqp.moarvm -e '...'
18:32 diakopter no
18:32 diakopter that doesn't dwim
18:53 lizmat joined #moarvm
19:02 woolfy joined #moarvm
19:27 dalek MoarVM: 05eaefe | (Tobias Leich)++ | src/ (5 files):
19:27 dalek MoarVM: stash and free std filehandles
19:27 dalek MoarVM:
19:27 dalek MoarVM: STDIN, STDOUT and STDERR are created once per instance, and handed
19:27 dalek MoarVM: out on request. We now clean up all handles but the previously
19:27 dalek MoarVM: mentioned when gc_free-ing a filehandle.
19:27 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/05eaefe843
19:27 dalek MoarVM: 5b3efce | (Tobias Leich)++ | src/ (4 files):
19:27 dalek MoarVM: msvc does not like names like stdin
19:27 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/5b3efce5f2
19:33 FROGGS TimToady: I am trying now to reproduce you bug
19:40 timotimo tee hee
19:40 timotimo TimToady: yeah, that's right! you bug!
19:41 FROGGS ohh, hehe
19:41 FROGGS silly me :o)
19:43 ssutch joined #moarvm
19:43 FROGGS hmmm, I dont get that error
19:43 FROGGS TimToady: you are on MoarVM=master, nqp=master and rakudo=moar-support, right?
19:44 FROGGS and you do something like: perl Configure.pl --backend=parrot,jvm,moar --prefix=/home/larry/nom/install && make m-install
19:45 TimToady I gave a relative prefix, which may be the problem
19:46 FROGGS no, I do that usually
19:46 TimToady I can try it again with an absolute path
19:46 camelia joined #moarvm
19:46 TimToady but you're not doing --gen-moar
19:46 FROGGS I'd like to get the output of rakudo's configure and build then :o)
19:46 FROGGS hmm
19:46 FROGGS true
19:47 FROGGS where is your moarvm repo?
19:47 FROGGS in the nom folder?
19:47 TimToady gen-moar delegates to nqp, which makes nqp/MoarVM
19:47 benabik joined #moarvm
19:47 FROGGS I know...
19:48 FROGGS okay, I'll try
19:52 FROGGS ummm, --gen-moar checks out an old version on moar
19:52 FROGGS of*
19:52 TimToady you need --gen-moar=master, but the branch doesn't get through to nqp
19:52 FROGGS ahh, yes
20:41 grondilu joined #moarvm
20:41 tgt joined #moarvm
21:15 cognominal joined #moarvm
22:14 timotimo so, we're basically waiting for nthn to fix repossession?
22:15 FROGGS sort of, yeah
22:19 FROGGS rp: say 'CREDITS'.IO.m
22:19 camelia rakudo-parrot e5fd34: OUTPUT«No such method 'm' for invocant of type 'IO::Handle'␤  in block  at /tmp/XMhNXf3MYb:1␤  in any  at /tmp/XMhNXf3MYb:1␤  in any  at gen/parrot/stage2/NQPHLL.nqp:1146␤  in any eval at gen/parrot/stage2/NQPHLL.nqp:1133␤  in any evalfiles at gen/par…»
22:19 FROGGS rp: say 'CREDITS'.IO.^methods
22:19 camelia rakudo-parrot e5fd34: OUTPUT«open close eof get getc lines read seek tell write opened t print slurp spurt copy chmod IO path flush encoding d e f s l r w x z modified accessed changed say Str gist perl <anon> <anon>␤»
22:19 FROGGS rp: say 'CREDITS'.IO.modified
22:19 camelia rakudo-parrot e5fd34: OUTPUT«stat failed: No such file or directory␤  in method modified at gen/parrot/CORE.setting:12967␤  in block  at /tmp/_kqCbGfAXK:1␤  in any  at /tmp/_kqCbGfAXK:1␤  in any  at gen/parrot/stage2/NQPHLL.nqp:1146␤  in any eval at gen/parrot/stage2/NQPHL…»
22:25 timotimo in theory i could just grab a random op that's NYI and implement that
22:25 timotimo any suggestions?
22:26 FROGGS dunno, p6listiter?
22:35 timotimo didn't i already implement that?
22:36 FROGGS doesnt seem like
22:36 jnthn static void p6listiter(MVMThreadContext *tc) { MVMObject  *arr = GET_REG(tc, 2).o; MVMObject *list = GET_REG(tc, 4).o; MVM_exception_throw_adhoc(tc, "p6listiter NYI");
22:36 jnthn gah, paste fial
22:36 jnthn Notice the make_listiter that I already wrote, though ;)
22:37 jnthn You basically just need to call that. :)
22:37 jnthn And then shove what it returns into the result register.
22:37 jnthn Done. :)
22:37 timotimo ah, it may be uncommitted or unpushed
22:38 timotimo indeed.
22:38 timotimo that's my implementation. potentially lacks something, but what do i know :)
23:06 jnthn Things work just as well on my machine here at home as on my laptop, btw
23:09 FROGGS good to know
23:10 ssutch joined #moarvm
23:10 tadzik joined #moarvm
23:13 jnthn Will have some tuits tomorrow.
23:13 timotimo \o/
23:23 sricloud joined #moarvm
23:25 BenGoldberg joined #moarvm
23:40 FROGGS gnight
23:46 jnthn 'night, FROGGS

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