Camelia, the Perl 6 bug

IRC log for #moarvm, 2013-08-20

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

All times shown according to UTC.

Time Nick Message
00:47 colomon joined #moarvm
01:06 colomon joined #moarvm
01:18 FROGGS joined #moarvm
01:32 FROGGS_ joined #moarvm
01:42 JimmyZ Good Moarning
01:52 benabik joined #moarvm
02:18 diakopter hi
02:19 diakopter could you review my last commit
02:24 JimmyZ I can test :P
02:24 diakopter its not showing the right line numbers or filenames
02:31 FROGGS_ joined #moarvm
02:34 benabik implicit declaration of clock_gettime
02:35 JimmyZ benabik: -lrt
02:35 benabik JimmyZ: Erm, no that won't fix compilation errors.
02:35 JimmyZ oh
02:36 benabik It appears that clock_gettime doesn't exist in OS X.
02:37 diakopter benabik: you'd think I would test on that OS since I have a mac
02:37 benabik Hm.  Probably want to start a platform/darwin.  Looks like we need to poke Mach level stuff.
02:37 diakopter but I spend all my time in the Windows VM
02:37 benabik http://stackoverflow.com/questions/51672​69/clock-gettime-alternative-in-mac-os-x
02:41 benabik Is there a particular reason we're using the realtime clock instead of just gettimeofday?
02:41 JimmyZ Confused at line 28, actually shoude be 27 :)
02:42 * diakopter wasn't part of that
02:43 JimmyZ OS X does not have clock_gettime, use clock_get_time
02:44 JimmyZ https://gist.github.com/jbenet/1087739
02:44 benabik ah.  gettimeofday goes to µs, get time is ns
02:45 diakopter ns units, but what precision
02:53 JimmyZ yeah, the line number is off-by-one
02:55 FROGGS joined #moarvm
04:54 JimmyZ https://github.com/agentzh/sregex/commit/​f77a72893526c3adce644574dab754ca5e3b099a
04:55 JimmyZ It's funny that "add TC, 1" is faster than "inc TC"
05:18 not_gerd joined #moarvm
05:18 not_gerd o/
05:21 dalek MoarVM/darwin: 1fc9e93 | (Gerhard R)++ | / (3 files):
05:21 dalek MoarVM/darwin: Add custom implementation of MVM_platform_now() for Darwin
05:21 dalek MoarVM/darwin: review: https://github.com/MoarVM/MoarVM/commit/1fc9e935f8
05:21 not_gerd benabik: could you test ^^
05:25 dalek MoarVM/darwin: e7eb44f | (Gerhard R)++ | src/platform/darwin/time.c:
05:25 dalek MoarVM/darwin: Use CALENDAR_CLOCK on Darwin.
05:25 dalek MoarVM/darwin: review: https://github.com/MoarVM/MoarVM/commit/e7eb44fed5
05:31 cognominal joined #moarvm
05:31 JimmyZ ../moarvm nqp.moarvm -e "say('Hello, MoarVM')" is stopped at futex(0x27002f0, FUTEX_WAIT_PRIVATE, 2....
05:34 * grondilu failed to noticed that nqp had been compiled to moarvm bytecode.  Is that recent?
05:34 JimmyZ yes
05:36 grondilu cool.  That's the last step until rakudo is compiled on moarvm, right?
05:37 moritz joined #moarvm
05:37 moritz oh hai
05:37 moritz I get an error building moarvm on mac os x
05:37 JimmyZ grondilu: maybe
05:37 not_gerd moritz: try darwin branch
05:37 moritz src/platform/posix/time.c:9:23: error: use of undeclared identifier 'CLOCK_REALTIME'
05:37 * moritz tries
05:38 moritz not_gerd: with that branch merge into master (locally), I get src/platform/darwin/time.c:14:29: error: use of undeclared identifier 'mts'; did you mean 'ts'?
05:38 JimmyZ not_gerd: the link said  clock_get_time is slow ,the like gettimeofday * 1000
05:39 moritz seems like a typo
05:39 not_gerd moritz: it is
05:39 * moritz can fix that
05:39 not_gerd copy-pasto
05:39 not_gerd moritz: feel free
05:40 dalek MoarVM/darwin: d8b8446 | moritz++ | src/platform/darwin/time.c:
05:40 dalek MoarVM/darwin: unbreak the build
05:40 dalek MoarVM/darwin: review: https://github.com/MoarVM/MoarVM/commit/d8b8446b8c
05:40 JimmyZ not_gerd: http://stackoverflow.com/a/8363218
05:40 not_gerd JimmyZ: then someone needs to make the call what's more important: prcision or performance
05:40 * moritz just doubled the number of his moarvm commits
05:42 JimmyZ not_gerd: thay said : ". And, what's worse, the return value has steps of 1000, i.e. it's still microsecond granularity."
05:52 dalek MoarVM/gettime: 211ab0b | (Gerhard R)++ | src/platform/posix/time.c:
05:52 dalek MoarVM/gettime: Use gettimeofday() if clock_gettime() is not available
05:52 dalek MoarVM/gettime: review: https://github.com/MoarVM/MoarVM/commit/211ab0b19f
05:53 not_gerd moritz: ^^
06:01 dalek MoarVM: 211ab0b | (Gerhard R)++ | src/platform/posix/time.c:
06:01 dalek MoarVM: Use gettimeofday() if clock_gettime() is not available
06:01 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/211ab0b19f
06:11 grondilu ../moarvm nqp.moarvm -e 'say("hello");'  # returns with no error but does not say anything
06:42 crab2313 joined #moarvm
06:51 diakopter you guys need to add the new platform files to the Makefile.in
06:52 JimmyZ or in setup.pm
06:53 diakopter just that I did git pull and it updated a source file but I hit nmake and nothing happened
06:53 diakopter oh, erm, maybe configure excluded it b/c i'm not on that platform
06:53 diakopter meh
06:56 not_gerd diakopter: the problem is, it's all POSIX - just different levels of support, that might or might not vary with OS versions
06:57 not_gerd I actually added platform-specific code for darwin in a branch, but according to stackoverflow, using the Mach API is a bad idea[tm]
06:58 JimmyZ the BSD are not friendly with each other :-)
07:00 FROGGS joined #moarvm
07:42 dalek MoarVM/libuv5: c244e89 | jimmy++ | src/ (3 files):
07:42 dalek MoarVM/libuv5: cleans up needless apr headers
07:42 dalek MoarVM/libuv5: review: https://github.com/MoarVM/MoarVM/commit/c244e899ad
08:08 cognominal joined #moarvm
09:18 JimmyZ if I changed MVM_dir_close to MVM_platform_closedir, than we don't need MVM_dir_close
09:18 JimmyZ *then
09:19 JimmyZ but there is MVM_dir_chdir
09:19 jnthn .oO( oh dir )
09:20 JimmyZ what's why I'd like mv MVM_dir_close to src/platform/XXX.c and include "platform/dir.h" in src/io/dirops.h
09:21 JimmyZ that is , platform/dir.h is part of src/io/dirops.h
09:22 JimmyZ and with same prefix: MVM_dir_
09:22 JimmyZ same for fileops.h
09:23 JimmyZ jnthn: how do you think about it?
09:24 JimmyZ I don't think we need MVM_dir_close to wrap MVM_platform_closedir again
09:24 JimmyZ or other MVM_file_ wrappers
09:27 jnthn I'm pretty sure we'll at some point want an organization for file handle stuff a little like what I did for the IO stuff on Rakudo JVM, where various operations are agnostic of the underlying handle kind... But even there the directory handling stuff doesn't fall within that...
09:27 jnthn Anything that lives in src/platform/ should probably be MVM_platform_ though.
09:28 jnthn You should be able to look at a function name and have a decent idea where to find it.
09:29 JimmyZ I'm fine with it. but then I'd like to call  MVM_platform_ instead of call MVM_dir_ or MVM_file_ wrappers which simply call MVM_platform_ functions
09:31 JimmyZ and then cause prefix chaos
09:33 JimmyZ or like apr
09:34 JimmyZ create src/io/win32/ and src/io/posix/
09:34 dalek joined #moarvm
09:35 JimmyZ and mv mmap to src/io/
09:35 jnthn Well, but then I suspect the MVM_platform_ functions end up not just being about platform abstraction, but also dealing with the MoarVM handle objects, etc.
09:35 jnthn There's probably a worthwhile separation to be had there.
09:36 JimmyZ but many wrappers simply call another function should be bad aslo
09:37 jnthn What I'm saying is we probably need a v-table for IO things, not a bunch of functions.
09:37 JimmyZ oh
09:37 jnthn The thing to keep in mind is that things like nqp::closefh($fh) could be used on all kinds of things.
09:37 jnthn From socket to file handle to stdin tty...
09:38 jnthn Same for nqp::readlinefh($fh)
09:38 jnthn Well, maybe not that one on a socket...
09:38 JimmyZ v-table, I'm not sure I like it. because of parrot :)
09:39 jnthn heh
09:39 jnthn No, v-table just means "a struct of function pointers".
09:39 jnthn It's a very generic concept. :)
09:40 JimmyZ parrot's v-table is calling another v-table, which is calling another v-table :P
09:40 JimmyZ then I'm lost :-)
09:40 jnthn Yes, I'm not proposing a bunch of layers here. :)
09:41 JimmyZ that will be much better
09:42 jnthn What I'm worried about is ending up with a bunch of, "if it's a tty, this thing, else if it's a file handle, this thing..."
09:46 JimmyZ yes
09:47 JimmyZ so much pointer there ends up we really needs a good JIT :P
09:48 jnthn Well, IO is IO bound :P
09:48 JimmyZ repr
09:48 jnthn But for REPR stuff, yes, we do, but REPRs are non-virtual. If you know the representation (or you assume you know it and do a guard clause) you can inline it.
09:48 JimmyZ aye
09:50 crab2313 joined #moarvm
09:54 * not_gerd thinks we should all just move to plan9
09:56 jnthn We've still working our way through plans 1..8 :P
09:56 not_gerd note that the parrot never got its IO factoring quite right
09:56 not_gerd (IO vtable vs PMC polymorphism and how to integrate sockets)
09:56 jnthn Last time I looked at it, I couldn't find anything anywhere :)
09:56 jnthn Well, we don't have PMCs, so there's that problem gone :)
09:57 moritz diakopter: did you push that NFG branch you talked about in Kiev?
09:57 jnthn And the only built-in thing that has any methods is KnowHOW. :)
09:58 not_gerd but the libuv API itself has some polymorphism
09:58 not_gerd they just haven't unified all types (yet?)
10:00 JimmyZ only uv_fs_
10:00 JimmyZ but will in the future, per uv.h
10:02 JimmyZ I mean only uv_fs_t hasn't be unified :P
10:02 * JimmyZ decommutes
11:04 colomon joined #moarvm
11:09 JimmyZ Good evening
11:10 JimmyZ I guess NFG branch is in private repo?
11:19 not_gerd left #moarvm
11:29 JimmyZ hmm, I saw jnthn's slide also said have a NFG branch
11:54 benabik master and darwin both build for me on OS X
11:55 JimmyZ good
11:55 JimmyZ darwin branch does not need
12:10 colomon joined #moarvm
14:01 crab2313 joined #moarvm
14:15 diakopter jnthn: I think it's running the deserialization or load frame but then not running the main frame
14:32 cognominal joined #moarvm
14:36 JimmyZ diakopter: Was there a NFG branch?
14:43 diakopter yes in jnthn's private repo
14:44 jnthn diakopter: Do you want it moved into the public one?
14:44 diakopter nah; I have a local copy; I'll merge it manually to a new public branch and hopefully hand it off to moritz
14:45 diakopter well hm, maybe should branch it from libuv5
14:45 diakopter nah
14:47 mst joined #moarvm
14:55 jlaire joined #moarvm
14:57 diakopter jnthn: you saw my comment above about MAIN?
14:58 diakopter (43 min ago)
14:58 dalek MoarVM/libuv5: 0080bda | jimmy++ | src/ (4 files):
14:58 dalek MoarVM/libuv5: fixed Linux build
14:58 dalek MoarVM/libuv5: review: https://github.com/MoarVM/MoarVM/commit/0080bda043
14:59 jnthn diakopter: yeah but I'm doing other stuff
14:59 jnthn diakopter: But yeah, ti's probably a combo of that plus not passing command line args right or something...
15:02 JimmyZ four of us are on windows ;)
15:02 not_gerd joined #moarvm
15:03 JimmyZ \o/ not_gerd
15:03 diakopter mst: I saw your presentation notebook is Windows - do you use Windows often?
15:03 not_gerd o/
15:03 mst diakopter: at this point, only for presentations until I figure out how to make the nexus do it
15:04 mst though I may prop the laptop up somewhere so I can smoke cygwin and strawberry on it
15:08 not_gerd mst: libuv doesn't support cygwin, and APR has issues on mingw64
15:08 mst I mean smoking cpan in general
15:11 not_gerd then, no worries
15:12 not_gerd I just find it somewhat ironic that by relying on portability layers, moarvm ended up being not particularly portable
15:12 not_gerd at least some of the headache will be gone once APR has kicked the bucket
15:13 jnthn Well, if somebody must run Rakudo on cygwin, they'll just have to pick another backend. :)
15:13 TimToady cygwin/jvm, yum :)
15:15 mst jnthn: but but but cygwin perl is so much less annoying than strawberry and I wanted the MoarVM module :)
15:15 jnthn argh
15:16 * grondilu used to run cygwin.  It's a nice port of GNU tools on windows.  Please don't overlook it.
15:17 * not_gerd still uses cygwin
15:17 not_gerd the mingw64 cross packages handled compiling LLVM/Clang from source just fine
15:18 jnthn Fine, hopefully somebody who understands it will give libuv patches for cygwin support. I guess Node.js on cygwin must be desirable to somebody too... :)
15:19 not_gerd well, I'm mostly interested in the --os=win32 --toolchain=gnu --shell=posix --compiler=clang combination
15:19 not_gerd why do you think my Configure.pl refactor looks like it does ;)
15:34 JimmyZ :P
15:38 JimmyZ --shell=rc
15:49 JimmyZ Good night
15:49 not_gerd ~~
15:55 lizmat gnight, JimmyZ
15:56 FROGGS joined #moarvm
16:39 colomon joined #moarvm
16:44 donaldh joined #moarvm
18:38 not_gerd bye, #moarvm
18:39 not_gerd left #moarvm
18:47 donaldh joined #moarvm
19:11 colomon joined #moarvm
20:03 donaldh joined #moarvm
21:03 ingy joined #moarvm
21:29 diakopter jnthn: hi
21:30 jnthn o/
21:35 BenGoldberg joined #moarvm
21:40 * jnthn attempts to fix the startup thing
21:44 jnthn diakopter: um, I think the backtracer segfaults...
21:44 diakopter didn't for me :P
21:44 diakopter (but I'm sure it's plausible)
21:44 diakopter I think the values it's getting from the annotations are wrong
21:44 diakopter the integers
21:45 diakopter oh; it probably should range test the string heap index it allegedly gets
21:45 jnthn It's getting something wrong with the filenames too
21:45 diakopter that's what I mean
21:45 diakopter the integers from the annotations
21:45 diakopter including the string heap index
21:45 jnthn line 39 in $*ARGS_USED
21:45 jnthn :)
21:45 diakopter right, I said this yesterday
21:45 diakopter you must not've backlogged
21:46 dalek MoarVM: 9910a6a | jnthn++ | nqp-cc/src/QASTCompilerMAST.nqp:
21:46 dalek MoarVM: Pass command line args to main.
21:46 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/9910a6a9ed
21:46 jnthn Well, or forgot what I backlogged :)
21:46 TimToady ooh, command line args!
21:52 TimToady well, at least it's different
21:52 TimToady $ ../moarvm nqp.moarvm -e 'say(42)'
21:52 TimToady Failed to tell position of filehandle: Illegal seek line 39 in $*ARGS_USED  (op <unknown>, instr 0<unknown>, frame frame_name_799, compunit ./NQPHLLMoar.moarvm) line 65 in frame_cuuid_1130  (op set, instr 32849, frame interactive, compunit ./NQPHLLMoar.moarvm) line 71 in @statements  (op bindlex, instr 32933, frame command_eval, compunit ./NQPHLLMoar.moarvm)
21:52 TimToady line 71 in$int  (op return_o, instr 32896t, frame command_line, compunit ./NQPHLLMoar.moarvm)
21:52 TimToady Segmentation fault (core dumped)
21:53 FROGGS $*ARGS_USED sounds pretty HLL::sprintf-ish
21:54 TimToady seems to get that error regardless of the args or lack thereof
21:54 jnthn aye
22:05 jnthn Somehow it's not sending the args along flattened.
22:09 jnthn oh, I think it's the cross-comp's fault...or something.
22:09 lizmat isn't it always?
22:10 TimToady could be someone instead
22:10 dalek MoarVM: 3a5b0b5 | jnthn++ | src/io/procops.c:
22:10 dalek MoarVM: Send in args boxed.
22:10 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/3a5b0b5197
22:10 dalek MoarVM: 6b65830 | jnthn++ | nqp-cc/nqp-src/NQP.nqp:
22:10 dalek MoarVM: Work around MAIN args issue.
22:10 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/6b6583013c
22:11 lizmat or the butler
22:11 jnthn Well, now it tries to start parsing.
22:12 jnthn oh, no it doesn't
22:13 jnthn Can confirm the line numbers are bunk though. :)
22:15 ingy greetings
22:15 FROGGS hi ingy
22:15 ingy hey FROGGS :)
22:15 jnthn OK, *now* we get into attempting the parse.
22:15 dalek MoarVM: 10153a3 | jnthn++ | src/io/procops.c:
22:15 dalek MoarVM: Create clargs with current HLL array type.
22:15 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/10153a3457
22:15 FROGGS cool!
22:17 jnthn oh, or it's deceiving me again :/
22:17 FROGGS O.o
22:19 jnthn yeah, think so...
22:24 dalek MoarVM: 2725332 | jnthn++ | src/core/coerce.c:
22:24 dalek MoarVM: Exceptions smart-stringify to the message.
22:24 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/2725332fe1
22:43 jnthn Back to segfaulting now; not sure where/why yet.
22:45 FROGGS Program received signal SIGSEGV, Segmentation fault.
22:45 FROGGS 0x0000000000441385 in extract_key (tc=0x81c2e0, kdata=0x7fffffffd290, klen=0x7fffffffd298, key=0x4) at src/6model/reprs/MVMHash.c:36
22:47 diakopter heh.
22:47 * diakopter feels to-blame
22:54 FROGGS gnight
22:54 diakopter well that one seems to be because the hash body is zeroed, which usually indicates a missing MVMROOT somewhere
22:58 jnthn The body just contains a null hash_head at the moment
22:58 diakopter yeah but that shouldn't be a problem
22:58 jnthn Which is the normal starting state of a hash.
22:59 jnthn It fails in extract key
22:59 jnthn The key object appears to be null
22:59 diakopter oh. yeah. the pointer is "4"
23:00 diakopter well that can't be right. :)
23:00 jnthn sure can't
23:00 diakopter .oO( never seen a pointer at address 4 before... )
23:01 diakopter jnthn: we need a function we can call from the "watch" section in VS
23:02 diakopter that returns a C string of a backtrace
23:02 diakopter ... once backtraces work
23:02 jnthn ooh, yes
23:03 diakopter TimToady: if you spec forward traces, I'll ask jnthn to implement them. :)
23:04 diakopter .oO(  I'll forward trace you ...  )
23:04 jnthn Well, this is confusing. It seems to crash earlier now...
23:04 diakopter heh, in the backtrace probably
23:04 lizmat is that forward or backward ?
23:07 diakopter "excuse me son, you're being too forward with my daughter."  "well you're being too backward with her"
23:07 jnthn hm, golfed
23:07 jnthn sub foo($x) { my %h; %h{$x} := 1; say('alive') }; foo(42)
23:08 jnthn boom segfault
23:09 jnthn O(MFG)
23:09 diakopter ?
23:10 dalek MoarVM: c13a6db | jnthn++ | src/core/coerce.c:
23:10 dalek MoarVM: Fix a stupid in earlier patch; jnthn--.
23:10 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/c13a6db4c2
23:10 * diakopter tries not to laugh a bit
23:11 diakopter (i'm allowed to laugh a bit though since I've done far worse)
23:12 diakopter oh, well that fixes that
23:12 jnthn yeah
23:12 jnthn Now it spits out a usage message. :)
23:12 diakopter whee
23:12 jnthn Something fun in arg parsing I guess :)
23:12 diakopter speaking of which, we use apr for arg parsing
23:12 diakopter er
23:12 diakopter something like that
23:13 diakopter .oO( I think I wrote a test for args )
23:13 diakopter <- *guffaw* "a test"
23:13 jnthn All we need to do is grab the stuff from argv etc.
23:14 jnthn Unless you mean "args to MoarVM itself"
23:14 diakopter no I mean to get --dump
23:14 diakopter and --help and such
23:14 jnthn ah
23:15 diakopter yeah clargs should be not too far from right
23:15 jnthn yeah...
23:15 jnthn I just fixed it up a bit and it seems to be workingish
23:16 diakopter jnthn: wait, didn't you teach today? so how is your brain even on?
23:16 jnthn No, I didn't teach
23:16 jnthn I just wrote course material :)
23:17 jnthn masak was teaching :)
23:17 jnthn I gotta teach next week. In Oslo.
23:17 diakopter quick, jnthn, what's Worse than Norse?
23:19 jnthn ...
23:19 jnthn American?
23:19 jnthn :P
23:19 jnthn Illegal option --ƭ
23:19 jnthn ...that looks broken!
23:20 diakopter you're an illegal option
23:20 diakopter push your local so I can see
23:21 jnthn Got nothing extra locally
23:21 jnthn just do
23:21 jnthn ..\moarvm.exe nqp.moarvm fake -e "say(42)"
23:21 jnthn -e "say(42)" # also gives wierd
23:21 diakopter haha
23:22 jnthn It shouldn't even be in the -- long option code path that dies that way!
23:22 diakopter wait, mine dies differently from yours
23:22 jnthn It's gotta be some corruption related to strings...
23:22 diakopter Error encoding UTF-8 string near grapheme position 17 with codepoint 48694944
23:22 diakopter line 75 in !fresh_highexpect  (op <unknown>, instr 0<unknown>, frame frame_name_896, compunit ./NQPHLLMoar.moarvm)
23:22 diakopter line 1 in <unknown>  (op null, instr 21, frame frame_name_893, compunit ./NQPHLLMoar.moarvm)
23:23 jnthn wow
23:23 jnthn That also points to corrupt strings
23:23 diakopter .oO( someone should fix those annotations )
23:23 jnthn .oO( someone should fix this ropey string impl )
23:24 diakopter hey that can't be it
23:25 jnthn It looks like it could be substr related but I'm really too tired to tell
23:26 jnthn I think things starting going awry around line 1751 of nqp-src/NQPHLL.nqp anways
23:26 jnthn *anyways
23:28 jnthn time for some rest; 'night
23:30 diakopter 'night

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