Camelia, the Perl 6 bug

IRC log for #moarvm, 2013-09-04

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

All times shown according to UTC.

Time Nick Message
00:02 jnap joined #moarvm
01:00 diakopter TimToady: remember those million linear searches?
01:00 diakopter turns out they were expensive.
01:01 diakopter hrm.
01:02 diakopter *sigh*
01:02 diakopter Confused at line 2, near "\ufeff# This fi"
01:02 diakopter *facepalm* parrot
01:02 FROGGS_ joined #moarvm
01:03 diakopter *facepalm* parrot
01:03 diakopter Confused at line 2, near "\ufeff# This fi"
01:03 diakopter oh. *facepalm* me
01:03 diakopter wait no, *facepalm* parrot
01:05 cognominal joined #moarvm
01:06 diakopter had to manually remove the BOM...
01:10 diakopter well...
01:11 Guest1337 joined #moarvm
01:23 diakopter heh heh.
01:23 diakopter off by a billion error
01:25 TimToady What's an order of magnitude of orders of magnitude among friends?
01:26 diakopter "yay much" in decimal
01:29 TimToady depends mightily on your font size
01:29 dalek MoarVM/nobank: 963608e | diakopter++ | / (11 files):
01:29 dalek MoarVM/nobank: progress?
01:29 dalek MoarVM/nobank: review: https://github.com/MoarVM/MoarVM/commit/963608eccd
01:31 diakopter the build at least completes now..
01:31 diakopter *shrug*
01:31 diakopter Bytecode validation error: non-existent operation op 38209
01:32 diakopter yeah, I didn't think we had that many ops yet
01:32 diakopter 524, this says
01:32 diakopter not thirty eight thousand
01:33 * diakopter daftly (deftly?) wonders what the bitshift operators are in nqp or rakudo
01:34 benabik Perhaps that's an op with a bank?
01:34 diakopter we're not doing it that way
01:34 benabik 0x9541...  probably not
01:34 diakopter all ops are 16 bits
01:34 benabik Well, it's not reading it that way...  But I was wondering if it was reading an old file or such.
01:34 diakopter "it"?
01:35 JimmyZ diakopter: https://github.com/MoarVM/Moa​rVM/commit/963608eccd#L9L582
01:35 yoleaux 3 Sep 2013 23:09Z <diakopter> JimmyZ: I'm still claiming the nobank branch... just a few more hours at the max..
01:36 benabik the VM isn't reading the bytecode with a bank, but perhaps the file still had the bank, creating a crazy op number.  But given that the hex value is 0x9541 and we didn't have 0x95 banks, probably not.
01:36 JimmyZ diakopter: there are many places that does write op
01:36 diakopter oh.
01:36 * diakopter goes to fix
01:36 diakopter JimmyZ: how are you awake? :)
01:37 JimmyZ diakopter: https://github.com/MoarVM/MoarVM/commit/4877​52e3d3f08fbdd3ed4a608f69d0dd56f0c0d7#L6R559 for a quick view that needs +=2
01:37 JimmyZ diakopter: it's 8 hour later ..
01:37 JimmyZ 9 hours actually
01:38 TimToady it's 9 hours earlier, but tomorrow :)
01:38 JimmyZ I'm from tomorrow, the future :P
01:38 TimToady how is Wednesday so far?
01:38 JimmyZ rains...
01:39 TimToady we could use some of that here
01:39 dalek MoarVM/nobank: 6c67cec | diakopter++ | src/mast/compiler.c:
01:39 dalek MoarVM/nobank: moar fixes JimmyZ++
01:39 dalek MoarVM/nobank: review: https://github.com/MoarVM/MoarVM/commit/6c67cec095
01:40 diakopter I was wondering why the .moarvm were smaller :)
01:41 JimmyZ smaller than?
01:41 diakopter master branch
01:41 JimmyZ not sure...
01:42 JimmyZ because of miracle
01:42 diakopter b/c it was overwriting the 2nd byte..
01:44 dalek MoarVM/nobank: 55d7228 | diakopter++ | src/core/validation.c:
01:44 dalek MoarVM/nobank: remove debugging output.  hrm.
01:44 dalek MoarVM/nobank: review: https://github.com/MoarVM/MoarVM/commit/55d72286b0
01:44 JimmyZ should eq actullay
01:44 diakopter well in other news the annotation off-ness seems to have fixed itself..
01:44 diakopter C:\Users\mwilson\src\MoarVM\nqp-cc>..\moarvm nqp.moarvm -e "say(332)"
01:44 diakopter MVMArray: atpos expected int register
01:45 diakopter but there's that..
01:46 diakopter --dump of nqp.moarvm is only 111000 lines... !?
01:46 diakopter seems very low
01:46 diakopter but exitcode was 0
01:48 * diakopter guesses there is a missing "break;" line in interp.c
01:50 cognominal joined #moarvm
01:52 diakopter JimmyZ: I turn the branch back over to you..
01:52 diakopter :)
01:52 diakopter afk a while &
02:16 diakopter back, ish
02:17 diakopter JimmyZ: I'm curious if you're working on it... if not, I'll do so..
02:17 JimmyZ diakopter: wait a moment
02:17 diakopter ok :)
02:18 JimmyZ compiling is sooooooo slllllooooowww
02:18 diakopter it seemed faster for me
02:18 diakopter (maybe not though)
02:20 diakopter JimmyZ: you're saying that branch seems slower to compile than master?
02:21 JimmyZ diakopter: go ahead, I didn't get a working patch
02:22 diakopter did you learn/discover/uncover anything?
02:22 JimmyZ diakopter: nope, I load 3M PHP code only 1s, while NQP needs 10m
02:22 JimmyZ ok, lets say 1M
02:22 diakopter same with p5; it's quite fast.
02:23 JimmyZ diakopter: didn't got anything, most time was waiting
02:24 JimmyZ every edit, I needs waiting at least about 5m
02:24 JimmyZ and no debugger :(
02:37 diakopter hrm.
02:43 diakopter oh, it's b/c native arrays are only faked still, I think.
02:46 diakopter no
02:46 JimmyZ diakopter: I know why
02:46 diakopter I found it
02:46 diakopter needs atpos_i instead of []
02:47 JimmyZ yes, because you're using list_i
02:50 diakopter JimmyZ++ # simultaneous discovery
02:58 dalek MoarVM/nobank: 05d02a2 | diakopter++ | nqp-cc/src/QASTOperationsMAST.nqp:
02:58 dalek MoarVM/nobank: nqp::atpos_i; branch now builds and ... mostly passes nqptest like before.
02:58 dalek MoarVM/nobank: review: https://github.com/MoarVM/MoarVM/commit/05d02a2271
02:59 diakopter p6opaque must be *really* slow to create..
02:59 diakopter that's the only difference I can think of in the new factoring
03:00 diakopter maybe it's the string creation ...
03:14 JimmyZ consider it a merge?
03:21 diakopter no, it's significantly slower
03:21 diakopter my "optimizations" aren't
03:23 diakopter .. back to the drawing board.
03:23 diakopter *sigh* eliminate all these objects and replace with arrays
03:24 diakopter for one thing, all these calculations can be constants instead *duh*
03:25 diakopter okay yeah... I know how to fix it... dramatically.
03:30 JimmyZ great
03:30 JimmyZ make them only 1s ?
03:30 JimmyZ ;)
03:30 diakopter ha.
03:33 JimmyZ Ops.nqp is bigger than before, and so QASTMoar.moarvm
03:34 diakopter yes... fixing
03:34 JimmyZ 580K vs 665K
03:35 diakopter it'll be much smaller
04:02 dalek joined #moarvm
05:54 dalek MoarVM: 6677977 | jimmy++ | src/io/procops.c:
05:54 dalek MoarVM: added MVM_proc_spawn function
05:54 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/6677977ef5
06:46 diakopter hi
06:47 diakopter JimmyZ: free(command); ?
06:51 JimmyZ diakopter: on working
07:01 FROGGS_ joined #moarvm
07:11 diakopter on working?
07:23 dalek MoarVM: b63c5bc | jimmy++ | src/io/procops.c:
07:23 dalek MoarVM: got a basically working MVM_proc_spawn(hopefully)
07:23 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/b63c5bc878
07:26 JimmyZ so, I don't know how to iter a MVMHash in C
07:27 diakopter long term the most stable way is to create an iter
07:27 diakopter nqp::iter
07:27 diakopter look in the source for where MVM_iter is used
07:32 JimmyZ used in interp.c
07:43 diakopter pseudocode:
07:44 diakopter my $iter = nqp::iter(%stuff); while $iter { my $key = nqp::iterkey_s($iter); my $val = nqp::iterval($iter); }
07:45 FROGGS morning
07:45 FROGGS JimmyZ: MVM_proc_spawn is about nqp::shell() ?
07:46 JimmyZ FROGGS: yes
07:46 FROGGS JimmyZ++
07:46 FROGGS :o)
07:47 FROGGS diakopter: I think a nextiter or a shift is missing in your pseudocode, no?
07:51 FROGGS my $iter = nqp::iterator(%stuff); while $iter { $iter := nqp::shift($iter); my $key = nqp::iterkey_s($iter); my $val = nqp::iterval($iter); }
07:51 FROGGS I'd think it is more like that
07:56 dalek MoarVM: 4d155ff | jimmy++ | src/io/procops.c:
07:56 dalek MoarVM: added env to MVM_proc_spawn
07:56 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/4d155ff71a
07:57 * FROGGS pulls and builds
07:57 JimmyZ FROGGS: ^^ your turn
07:58 JimmyZ i.e: bug fix
08:01 FROGGS JimmyZ: okay, so wire it to nqp::shell now?
08:02 FROGGS JimmyZ: or was that your plan?
08:02 dalek MoarVM: 3649d11 | jimmy++ | src/io/procops.c:
08:02 dalek MoarVM: free _env after spawn
08:02 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/3649d11fb0
08:02 JimmyZ FROGGS: I have no plan
08:02 FROGGS *g*
08:02 FROGGS JimmyZ: I mean, do you wanna do that?
08:02 JimmyZ ;)
08:02 JimmyZ FROGGS: I don't
08:02 FROGGS I don't want to steal your stuff
08:02 FROGGS k
08:03 JimmyZ the parrot nqp::shell doesn't support unicode(also GBK in chinese)
08:04 JimmyZ so I worked on it, make sure it support GBK well enough
08:04 FROGGS that's cool
08:07 dalek MoarVM: 98c3fa5 | jimmy++ | src/io/procops.c:
08:07 dalek MoarVM: added env to spawn actually
08:07 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/98c3fa54bd
08:07 FROGGS JimmyZ: is that sane? https://gist.github.com/ano​nymous/3d8536e736289963d15f
08:08 JimmyZ Is there some warinnings?
08:10 FROGGS yeah
08:10 odc joined #moarvm
08:11 FROGGS JimmyZ: added as a comment here: https://gist.github.com/ano​nymous/3d8536e736289963d15f
08:12 JimmyZ FROGGS: chagne     const char        **_env = malloc(size + 1); to     char        **_env = malloc(size + 1);
08:12 JimmyZ FROGGS: it will work
08:13 dalek MoarVM: fb480e2 | jimmy++ | src/io/procops.c:
08:13 dalek MoarVM: avoids a warning
08:13 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/fb480e283b
08:14 JimmyZ FROGGS: ^^ should avoid it
08:14 FROGGS JimmyZ++
08:16 diakopter your malloc needs a sizeof() something
08:17 diakopter malloc((size+1)*sizeof(char *))
08:19 JimmyZ diakopter: you're right
08:19 JimmyZ FROGGS: free change to malloc((size+1) * sizeof(char *))
08:20 FROGGS later, $work got me :o(
08:20 JimmyZ e
08:21 donaldh joined #moarvm
08:23 dalek MoarVM: df8db31 | jimmy++ | src/io/procops.c:
08:23 dalek MoarVM: bug fix, diakopter++
08:23 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/df8db31ef0
08:47 jnthn On teh BOM, we patched Rakudo's grammar to ignore that. Could steal the patch for NQP's. :)
08:48 FROGGS https://github.com/rakudo/rakudo/b​lob/nom/src/Perl6/Grammar.nqp#L913
08:49 * FROGGS is also known as GrammarBot
09:14 not_gerd joined #moarvm
09:15 not_gerd o/
09:15 yoleaux 3 Sep 2013 23:10Z <diakopter> not_gerd: I'm still claiming the nobank branch... just a few more hours at the max..
09:15 dalek MoarVM: 5efa492 | (Gerhard R)++ | src/ (5 files):
09:15 dalek MoarVM: Add MVM_platform_sleep()
09:15 dalek MoarVM:
09:15 dalek MoarVM: The function tries to guarantee a delay of at least
09:15 dalek MoarVM: the requested amount of time.
09:15 dalek MoarVM:
09:15 dalek MoarVM: The nanosecond resolution is somehwat 'optimistic', but
09:15 dalek MoarVM: so is the POSIX API it wraps.
09:15 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/5efa492c6f
09:15 JimmyZ not_gerd: tinyMT :P
09:16 jnthn Note that nqp::sleep op currently uses the wrong units compared to other backends...
09:17 not_gerd well, the MVM_platform_sleep() is nanos (same as platform_now)
09:17 not_gerd NQP can use whatever it deems appropriate
09:18 JimmyZ not_gerd: AIX doesn't support nanosleep
09:18 jnthn not_gerd: Yes, I mean whatever nqp::sleep maps to.
09:20 not_gerd JimmyZ: http://pic.dhe.ibm.com/infocenter/aix/v7r1/topic/c​om.ibm.aix.basetechref/doc/basetrf1/nanosleep.htm
09:21 JimmyZ oh, they support it now
09:21 not_gerd progress \o/
09:23 JimmyZ not_gerd: http://lists.libsdl.org/pipermail/sd​l-libsdl.org/2000-April/007804.html
09:23 JimmyZ not_gerd: FYI
09:24 JimmyZ not_gerd: and http://www.linuxquestions.org/questions/​programming-9/nanosleep-problem-269563/
09:25 not_gerd JimmyZ: SLD2 uses nanosleep() instead of select() now
09:25 not_gerd I just assumed they knew what they were doing ;)
09:25 not_gerd *SDL2
09:26 JimmyZ oh 2000 years..
09:26 JimmyZ but the sencod one said prefer select in realtime system :P
09:28 not_gerd JimmyZ: http://www.atl.lmco.com/projects/QoS/RTOS_ht​ml/timer_gran/select_nanosleep_compared.html
09:28 not_gerd also out of date, but I'd like to keep nanosleep()
09:29 not_gerd in particular the last graph
09:29 JimmyZ I saw this one too :P
09:30 not_gerd with nanosleep(), you get a guaranteed minimal delay
09:30 JimmyZ not_gerd: I have a plan to re-do tinyMT?
09:30 not_gerd I htought that was the most sensible thing to shoot for
09:30 JimmyZ s/I/you/
09:30 not_gerd JimmyZ: now that we have stdint.h, no problem
09:30 JimmyZ great
09:30 not_gerd what's missing is basically generating the algorithm parameters
09:31 not_gerd I... don't think usgin 0 everytwhere is the right thing to do ;)
09:31 not_gerd *using
09:31 JimmyZ e
09:33 JimmyZ jnthn: btw, looks like MoarVM intened to separate ifeq to eq and if op?
09:33 JimmyZ *intended
09:34 JimmyZ parrot's ifeq etc...
09:39 not_gerd shouldn't NQP/JVM return something like (System.currentTimeMillis() - now)/1e3 from sleep?
09:39 not_gerd ie the amount of time actually slept
09:42 moritz now - ENTER now
09:42 lizmat joined #moarvm
09:42 moritz r: sub mysleep($x) { sleep $x; return now - ENTER new }; say mysleep 2
09:42 lizmat ww?
09:43 moritz yes
09:58 foo_bar_baz joined #moarvm
10:45 woolfy joined #moarvm
10:45 dalek MoarVM: fd43828 | (Gerhard R)++ | / (9 files):
10:45 dalek MoarVM: Implement proper nqp::sleep() and keep current version as nqp::microsleep()
10:45 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/fd43828a37
10:46 woolfy left #moarvm
10:48 woolfy joined #moarvm
11:20 JimmyZ Good evening
11:21 lizmat JimmyZ o/
11:32 not_gerd so, what's your preferred number between 2..20?
11:32 JimmyZ 18
11:32 moritz 2
11:33 JimmyZ 13
11:33 not_gerd oO(but I only need a single 1)
11:33 JimmyZ gold point?
11:34 not_gerd I need to choose some parameters for tinymt
11:34 not_gerd I'm lazy, so I'm going with one os these: https://github.com/jj1bdx/tinymtdc-longbatch/blob​/master/example-20lines.tinymt64dc.0.1048576.txt
11:34 JimmyZ I don't like nqp::sleep really
11:34 JimmyZ which returns now - begin now
11:36 JimmyZ not_gerd: that's tinyMTDC
11:38 not_gerd JimmyZ: dc is just the parameter generator
11:38 jnthn JimmyZ: Well, nqp:: ops also have if and iseq separated out, so yeah, that's just the VM following the way the stuff targetting it works.
11:39 jnthn JimmyZ: I think it's a consistent approach, at least.
11:39 JimmyZ yeah
11:40 jnthn The JVM is *horrible* at this; the way you compile if (a == b) ... differs depending on the type a and b have
11:40 jnthn (for int, a combined comp/branch instruction, for long two separate ones, for example)
11:40 jnthn I guess it was for bytecode compactness, but still... :)
11:42 JimmyZ it's good to do if(nextop == if) goto XXX; in eq/lt/gt ops
11:42 JimmyZ heh
11:43 crab2313 joined #moarvm
11:50 jnap joined #moarvm
11:57 colomon joined #moarvm
12:21 not_gerd so, tinymt
12:21 not_gerd should that get its own repository as well?
12:29 JimmyZ jnthn: ^^
12:29 jnthn how tiny is it? :)
12:29 not_gerd https://github.com/MoarVM/MoarV​M/tree/tinymt/3rdparty/tinymt64
12:30 dalek MoarVM: b3e39d2 | jimmy++ | / (10 files):
12:30 dalek MoarVM: update sleep as per discuss in #perl6
12:30 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/b3e39d2028
12:32 not_gerd note that there's a lot of dead code in the C file
12:33 not_gerd if we don't use a separate repository, I'd remove the codepaths we don't use
12:41 benabik joined #moarvm
13:15 dalek MoarVM: 63ec815 | jimmy++ | / (3 files):
13:15 dalek MoarVM: fixed test after new sleep
13:15 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/63ec815a94
13:16 nwc10 JimmyZ: that test fix being "avoid a hang in t/moar/threads.t" ?
13:17 JimmyZ nwc10: diakopter++ already fixed it
13:17 JimmyZ he addex an exit before hang
13:17 JimmyZ *added
13:32 dalek Heuristic branch merge: pushed 16 commits to MoarVM/nobank by zhuomingliang
13:51 benabik joined #moarvm
13:52 sorear joined #moarvm
14:02 diakopter nwc10: yeah "fixed" ;)
14:22 segomos_ left #moarvm
14:33 not_gerd diakopter: what'S the status of nobank?
14:34 diakopter not_gerd: just awoke.
14:34 diakopter well... yeah.
14:34 diakopter a bit ago.
14:35 diakopter not_gerd: I'm in the middle of totally redoing the .p6 tool and Ops.nqp.. for speed
14:35 diakopter first attempt was quite poor
14:41 diakopter not_gerd: I don't understand what you're proposing in that .md
14:41 diakopter you're proposing all three of those code blocks? or those already exist?
14:44 FROGGS joined #moarvm
14:45 FROGGS O7
14:45 FROGGS o/
14:45 FROGGS -.-
14:46 not_gerd diakopter: MVM_platform_nanosleep_retry() currently exists under a different name
14:46 not_gerd thet .md shows how I'd do the factoring going from low to high-level
14:48 diakopter what's the current name of MVM_platform_nanosleep_retry
14:49 not_gerd just _sleep()
14:49 diakopter I don't understand why you want to change the nqp op api.. I thought jnthn was saying he wanted to keep it the way it is..
14:49 diakopter (if you want to change it, I haven't seen the explanation why)
14:50 not_gerd diakopter: right now, the nqp::sleep() takes a num64 and returns a num64, like p5 sleep()
14:50 diakopter right
14:50 not_gerd on JVM, we always return the requested time and not the actually used time
14:51 not_gerd on MoarVM, we used a microsecond integer argument and returned nothing
14:51 diakopter that was purely experimental
14:51 JimmyZ not_gerd: not always
14:51 diakopter throwaway
14:51 diakopter junk
14:51 diakopter trsah
14:51 diakopter trash
14:51 diakopter play
14:51 diakopter junk code
14:51 diakopter meaningless
14:51 diakopter arbitrary
14:51 diakopter simply for testing purposes
14:52 not_gerd what I was getting at that the moarvm op is less insane than the existing one
14:52 JimmyZ on JVM return only in non-sink context
14:52 diakopter I had absolutely no regard for what nqp wanted
14:52 not_gerd basically, we need t different sleep primitives
14:52 diakopter when I made it take microseconds
14:52 JimmyZ not_gerd: and now ,MOarvm does the same
14:52 diakopter I wasn't trying to make the nqp op
14:52 not_gerd one that is interruptible, one that it not
14:52 not_gerd * is
14:52 diakopter I was just trying to make a sleep I could test stuff with
14:52 diakopter so don't use it at all when considering what to do
14:53 not_gerd I'm trying to make a sleep that's sane - more so than the existing one
14:53 diakopter "less insane" is just name calling without an explanation why
14:53 FROGGS are there already guesses why 56-role is failing?
14:53 diakopter I haven't seen that
14:53 FROGGS diakopter^^ ?
14:53 JimmyZ not_gerd: MoarVM does the same as JVM now. returns on non-sink context
14:54 diakopter JimmyZ: don't use what MoarVM does right now at all
14:54 diakopter delete the op
14:54 diakopter in fact, I'll delete it
14:54 JimmyZ diakopter: why?
14:54 diakopter why are you guys not getting this.... it was totally temporary
14:54 not_gerd diakopter: taking float arguments when all low-level apis as well as many users want integers is questionable
14:54 not_gerd diakopter: sure, but imo it was better
14:55 JimmyZ diakopter: I already update the sleep same as JVM
14:55 not_gerd parrot just did what p5 does
14:55 JimmyZ why you delete it?
14:55 JimmyZ is p5 wrong?
14:55 not_gerd and everything else went with that
14:55 diakopter not_gerd is saying p5 is wrong
14:55 not_gerd it's an ok high-level interface
14:55 not_gerd that's why my proposal reproduces it
14:56 not_gerd there are 3 levels: platform abstarction, NQP ops, user-facing API
14:56 not_gerd what makes sense for one doesn't necessarily do so for the other 2
14:56 JimmyZ diakopter: don't delete it until you got go-head from jnthn
14:56 diakopter jnthn's already made it very clear what he wants....
14:57 JimmyZ wants to delete it?
14:57 diakopter can you just do it the way he wants (like rakudo/parrot) and then propose changing it?
14:57 not_gerd diakopter: that is waht I'm doing right now? oO
14:58 not_gerd at the moment, everything matches
14:58 not_gerd (mostly)
14:58 diakopter okay, I thought jnthn was saying above that the moarvm op takes integers
14:58 diakopter (still)
14:59 diakopter does the moarvm op not still take integers?
14:59 * FROGGS tries to debug 56-role now
14:59 JimmyZ diakopter: nope
14:59 FROGGS if somebody has suggestion, please please tell
14:59 FROGGS suggestions even
14:59 JimmyZ diakopter: I updated it
15:00 JimmyZ diakopter: and it can return 0 args in non-slink context
15:01 diakopter ok
15:01 diakopter I misread the irclog, mostly.
15:02 diakopter and I still don't know which commit you meant by "the new sleep commit"
15:02 diakopter at http://irclog.perlgeek.de/​perl6/2013-09-04#i_7540834
15:02 JimmyZ it takes float args now
15:03 JimmyZ diakopter: I meant https://github.com/MoarVM/MoarVM/commit/​fd43828a370987975b80f77a2a8a93ab97f27dfa
15:04 JimmyZ diakopter: and I updated to https://github.com/MoarVM/MoarVM/commit/​b3e39d2028461770e51f0c05faef68a12a0ec50b
15:04 not_gerd diakopter: I renamed the existing sleep to microsleep and implemented p5 semantics
15:04 diakopter ok
15:04 JimmyZ QAST::MASTOperations.add_co​re_moarop_mapping('sleep', 'sleep', 0);
15:04 not_gerd JimmyZ then removed microsleep and made sleep not return anything
15:04 JimmyZ 0 for especially
15:04 diakopter ok, somehow I missed all of that
15:05 JimmyZ not_gerd: it returns
15:05 diakopter omg.
15:05 diakopter +            op(@ins, 'const_n64', $r1, nval(1000000));
15:05 diakopter +            op(@ins, 'sleep', $r1);
15:05 JimmyZ not_gerd: QAST::MASTOperations.add_co​re_moarop_mapping('sleep', 'sleep', 0); here
15:06 diakopter why is the test sleeping 2 years?
15:06 not_gerd JimmyZ: https://github.com/MoarVM/MoarVM/commit/b3e3​9d2028461770e51f0c05faef68a12a0ec50b#L4R1240
15:06 TimToady p5 sleep semantics are just integer seconds, afaik
15:06 JimmyZ not_gerd: it return the 0 args when it needs
15:06 not_gerd JimmyZ: my code returned the time actually slept
15:06 not_gerd now, it does not
15:06 diakopter nwc10: *facepalm* remember that hang in the threads test?
15:06 JimmyZ not_gerd: now it returns the args
15:07 not_gerd JimmyZ: that's useless
15:07 JimmyZ not_gerd: that's JVM does, and jnthn said should be
15:07 not_gerd see http://irclog.perlgeek.de/m​oarvm/2013-09-04#i_7540373
15:07 not_gerd JimmyZ: doesn't make it not uselees
15:09 JimmyZ not_gerd: http://irclog.perlgeek.de/​perl6/2013-09-04#i_7540865
15:09 diakopter why is the test now sleeping 0.001 seconds??
15:09 diakopter should be 1,2 seconds, etc
15:10 not_gerd sure, we can make all existing backends equally bad
15:10 not_gerd I want to discuss a better interface and make all backends equally good
15:10 JimmyZ not_gerd: great
15:10 JimmyZ not_gerd: but we are missing jnthn now
15:11 not_gerd I was thinking about 2 use cases:
15:11 not_gerd 1. sleep x microseconds, don't care it we're interrupted
15:11 not_gerd (mostly used for testing, in loops etc)
15:12 JimmyZ not_gerd: I'm +1 to your .md gist
15:12 not_gerd 2. simulations: try to sleep x (floating-point) seconds and tell me how long you actually took so I can adjust my state
15:12 JimmyZ but needs an +1 from jnthn ...
15:13 JimmyZ not_gerd: but -1 to your second one
15:14 JimmyZ the sleep should return how much time it sleeps
15:14 JimmyZ shouldn't
15:15 JimmyZ the use can get it themself
15:15 JimmyZ *user
15:16 JimmyZ_ joined #moarvm
15:17 diakopter JimmyZ_: how??
15:17 JimmyZ_ not_gerd: but the trysleep and sleep are OK
15:17 JimmyZ_ diakopter: my $i = now; sleep(xxx); say now - $i
15:18 diakopter JimmyZ_: I agree with not_gerd; it's much better for it to return how long it slept
15:19 not_gerd JimmyZ_: it you want to wait a minimal amout of time, you'll need to wrap that in a loop
15:19 not_gerd that translates to lots ot ops that need to be dispatched, destroying any accuracy
15:20 not_gerd the problem we're dealing with here is than windows might return early, and posix can be interrupted
15:21 not_gerd sometimes we don't care about that or actually want that behaviour
15:22 not_gerd if we do care and need to write NQP code to fix it, we can say goodbye to accuracy until theJIT arrives ;)
15:26 nwc10 diakopter: well, remember that it did hang, and then I updated and rebuilt, and it does not now
15:26 diakopter oh; yes, I just skipped the test
15:26 diakopter now it crashes :)
15:26 diakopter (when not skipped)
15:36 dalek MoarVM: 1bd00d5 | diakopter++ | nqp-cc/t/moar/threads.t:
15:36 dalek MoarVM: put test sleep timings back the way they were intended
15:36 dalek MoarVM: review: https://github.com/MoarVM/MoarVM/commit/1bd00d5366
15:44 ingy morning
15:59 diakopter o/
16:00 JimmyZ_ good night
16:03 crab2313_ joined #moarvm
16:09 ingy sorry… *moarning*
16:09 ingy :)
16:22 diakopter mwahaha
16:25 diakopter bah.
16:25 diakopter Serialization Error: Unimplemented case of read_ref
16:33 dalek MoarVM/nobank: 613eb95 | diakopter++ | / (8 files):
16:33 dalek MoarVM/nobank: better, I think
16:33 dalek MoarVM/nobank: review: https://github.com/MoarVM/MoarVM/commit/613eb95aec
16:45 diakopter would someone do me a favor and time the cross-compiler build from scratch on master branch versus the nobank branch? plz? :)
16:58 eternaleye joined #moarvm
17:04 eternaleye joined #moarvm
17:11 diakopter nobank nmake nqpcc time: 193.250 s
17:11 jnthn And master?
17:11 diakopter trying
17:12 diakopter I have a feeling I will be crying soon.
17:14 TimToady lemme guess, something's O(n**m) in the switch parser...
17:15 diakopter heh exponential
17:16 diakopter jnthn: master branch: 236.493 s
17:16 diakopter \o/
17:16 TimToady maybe m is less than 1 :)
17:16 jnthn yay it got le faster!
17:16 jnthn diakopter++
17:16 jnthn diakopter: Is our startup time better too?
17:16 jnthn (in selfhost)
17:16 diakopter can't tell, b/c the arr_int deserialization isn't implemented yet
17:16 jnthn Oh.
17:17 jnthn I should prolly eat something, but can do that if you're not sure how
17:17 TimToady well, we're waiting <tap> <tap> <tap>
17:17 diakopter but those compile times are *including* all that stuff compiling to .pir and .pbc, which this didn't affect
17:17 jnthn But you can prolly steal it from the Parrot deserialization code.
17:17 jnthn It's a BOOTIntArray that you'll want to be creating.
17:17 diakopter figured
17:18 diakopter lib\MAST\Ops.nqp is.... interesting, now. jnthn: I recommend not looking at it until you've had a few
17:18 nwc10 On master, this:
17:18 nwc10 time sh -c 'perl Configure.pl && make && cd nqp-cc && perl Configure.pl --gen-nqp --gen-parrot && make; echo $?'
17:18 jnthn diakopter: A few...what? :)
17:18 nwc10 real    9m9.763s
17:18 nwc10 user    8m8.884s
17:18 nwc10 sys     0m55.238s
17:19 diakopter nwc10: oh. I didn't quite mean "from that granular a scratch"
17:19 diakopter just nmake clean
17:20 jnthn Maybe nwc10 just did it on a reall slow box :D
17:20 diakopter haha.  granular scratch.  I kill me.
17:21 diakopter jnthn: bee-uhs
17:21 nwc10 well, it would be less slow if I used more of the cores
17:22 nwc10 but moarvm itself builds pretty damn fast
17:22 nwc10 it's the other stuff...
17:22 diakopter my pto balance at $work is not benefitting from me being so sick..
17:22 diakopter nwc10: hey, 3 min, now :)
17:23 diakopter just a few more days.... "all that other stuff" won't exist....
17:23 nwc10 there may be a delay on the other answer as I have been volunteered for taxi duty
17:23 diakopter (few == 5-30)
17:24 jnthn Better than tax duty...
17:24 * jnthn goes to acquire nom
17:24 jnthn bbiab
17:24 * diakopter goes to a non-Great Physician
17:25 nwc10 jnthn: yeah, but then, "should five percent seem too small, be thankful I don't take it all" etc
17:28 not_gerd joined #moarvm
17:28 nwc10 same command from clean on origin/nobank gives:
17:28 nwc10 real    8m29.083s
17:28 nwc10 user    7m28.108s
17:28 nwc10 sys     0m55.424s
17:30 nwc10 8% less user time. If I got my maths right
17:30 nwc10 a.k.a. "Win!"
17:35 not_gerd we could probably speed up the moarvm build if our approach to header inclusion was less holistic
17:35 not_gerd not everyone has these fancy SSD machines ;)
17:36 diakopter super star destroyer?
17:40 not_gerd diakopter: of course not
17:40 not_gerd obviously, I was talking about the 80s rock band from Boston
17:47 tadzik Supersonic Drums
17:50 diakopter not_gerd: do you have msvc?
17:53 not_gerd diakopter: I'm using the Windows SDK
17:53 not_gerd so yes to the compiler, no to the IDE
18:15 FROGGS ../moarvm nqp.moarvm t/nqp/56-role.t
18:15 FROGGS Cannot locate an outer frame for the call
18:15 FROGGS at nqp-src/NQP.nqp:251  (nqp.moarvm:�l8Y:137)
18:15 FROGGS from nqp-src/nqp-mo.pm:569  (./nqp-mo.moarvm:specialize:29)
18:15 FROGGS what I dont understand, how can the filename be okay when the frame name is garbage?
18:15 FROGGS filename is: cur_frame->static_info->body.cu->body.filename
18:15 FROGGS and frame name is: cur_frame->static_info->body.name
18:16 FROGGS if the cur_frame->static_info->body was moved by a gc run, then both should be crap, right?
18:17 not_gerd FROGGS: actually, both should be ok, I'd guess
18:17 not_gerd the pointers don't care where they are moved to
18:19 FROGGS err, yes
18:22 TimToady fyi, I've just refactored P6's sleep function into three functions
18:24 TimToady to better convey programmer intent
18:25 * not_gerd wonders how to get the time we overslept in the new factoring
18:26 not_gerd and if it's actually as useful as I imagined it to be
18:26 TimToady sleep-till returns the actual current time, not the target time
18:27 TimToady if you're working in absolutes
18:27 TimToady sleep-timer could conceivably return a negative Duration, I suppose, except the system calls tend not to support that
18:29 TimToady anyway, people worried about oversleeping should probably be doing all calculations on an absolute Instant scale
18:29 not_gerd I was thinking that sleep-till could return the time we overslept instead of the current time - but as we had to pass in the start time, we already know it
18:30 arnsholt People worrying about oversleeping are going to have lots of problems in general, I think
18:30 arnsholt IIRC even sleep(3) has limited guarantees on the how long you end up sleeping
18:31 TimToady yeah, sleep(3) ends up not being able to guarantee much of anything really
18:32 TimToady might wake up earlier, might wake up later...
18:32 not_gerd it's easy for us to guarantee the lower bound (just go back to sleep if we wake early)
18:32 arnsholt I guess there's stuff in (2) that can give you better guarantees, but that feels like overkill for a core HLL setting
18:33 not_gerd at the upper bound, we can just make it easy to tell the user how off we are
18:33 TimToady but the relative time left is (relatively) useless, really
18:33 TimToady which is why you should use an absolute target time in that case
18:34 FROGGS not_gerd: the pointer for body.name is just bogus as it seems
18:34 diakopter hrm.
18:34 TimToady if you rely on the time remaining, and sleep repeatedly, you can suffer drift
18:34 TimToady drift might not matter for, say, a game, so we do provide the sleep-timer for relative timing
18:35 jnthn ooh, the sleep discussion made it up to langauge design level :)
18:35 TimToady but it's not really appropriate when you really want to do something at a particular time
18:35 * jnthn was gonna try to kick it there :P
18:35 FROGGS for the second name 'specialize', I see a pointer addr that I see too in bytecode.c/get_heap_string(), but the messed up body.name has a pointer addr which does not get set in this function
18:36 FROGGS so I am still thinking that the original addr was moved by the gc, the the backtrace printing function still has an old addr
18:36 diakopter FROGGS: make sure to verify there actually was a valid name there at one point
18:37 FROGGS diakopter: I trying to do that currently, dunno how atm
18:37 FROGGS because I dont see a movement of the body or something else in the gc's debug output
18:38 FROGGS s/something else/something else related/
18:38 lizmat TimToady: to counter drift, I've specced and implemented "interval"
18:39 diakopter you might make the gc debugger more verbose.. have it output whether it's moving [a pointer to] an s-table, an mvmobject (and which repr if so), etc
18:40 FROGGS if body.name should be 'create_code' IMO, but bytecode.c/get_heap_string() hit two, so I dont know which maybe is it
18:40 FROGGS s/^if //
18:41 diakopter "hit two"?
18:41 TimToady lizmat: interval looks overly complicated to me
18:42 lizmat in implementation or in usage ?
18:42 TimToady implicit knowledge of the last time you called it seems bogus
18:42 FROGGS diakopter: I print the string which it fetches including its pointer, and it fetches 'create_code' twice
18:43 jnthn FROGGS: What are you debugging, ooc?
18:43 FROGGS jnthn: 56-role
18:43 lizmat TimToady: but that is the whole point ?
18:43 jnthn FROGGS: ah
18:44 TimToady lizmat: much better to encourage the user to use an absolute timescale, I think, in those cases
18:44 jnthn FROGGS: I think there may be some incompletenesses in copy_to of MVMStaticCode
18:44 FROGGS "Cannot locate an outer frame for the call" and the body.name is bogus
18:44 * FROGGS looks
18:44 lizmat TimToady: by forcing the user to specify an epoch ?
18:45 FROGGS jnthn: do you mean MVMStatiFrame by any chance?
18:45 FROGGS gah, my 'c'-key is crap :o(
18:45 jnthn FROGGS: yes
18:45 jnthn FROGGS: How did it get so rap?
18:46 FROGGS kids plus me having coffee in my left hand while sitting on the couch hacking :/
18:46 FROGGS and I need 'c' pretty often
18:49 TimToady lizmat: I don't mean "absolute" in any kind of civic sense; I merely mean that any now can serve as a base time for an absolute calculation of Duration
18:50 TimToady it could just as easily be the first 'now' called by the program, or the last time we did something with 'now'
18:50 TimToady but it's up to the user to remember that 'epoch', not the function
18:51 TimToady alternately, the can attach it to civic time (translated to an Instant) if they want to
18:51 TimToady *they
18:52 lizmat I'm not sure I understand the "problem"
18:53 lizmat my idea about "interval", is, is that you can specify when the next call to "interval" will "fall through"
18:53 lizmat relative to the *previous* time interval was called
18:54 TimToady I think that's a smelly design
18:54 TimToady too much one purpose
18:54 lizmat on a timeline: make sure that calls to "interval" finish at equidistant moments
18:54 TimToady and the implicit knowledge would be better explicit
18:54 diakopter javascript's setinterval skips the run if the thread is busy
18:55 diakopter just sayin'
18:55 lizmat fwiw, it has helped me with animations in the past
18:55 lizmat but maybe it is too much MS-DOS thinking in the modern age  :-)
18:56 diakopter TimToady: s/sleep-till/sleep-til/ ?
18:56 TimToady there is no word til in English
18:56 diakopter TimToady: s/sleep-till/sleep-'til/ ?
18:56 diakopter :)
18:57 diakopter "there is no word ____ [oh wait, now there is..]
18:57 diakopter "
18:58 diakopter (I kid, I kid)
18:58 TimToady how 'bout sleep-till returns true if the time is futurey, but false if you're trying to sleep till the past
18:58 TimToady then you can easily skip a past-due action
18:58 TimToady next unless sleep-till($nexttime)
18:59 lizmat but interval returns false if it didn't wait, so you can already do that
19:00 TimToady so it'll be pretty easy to turn interval into sleep-till, if you just make the timing absolute
19:00 PerlJam Is the sleep-till where you put all of your sleep?
19:01 diakopter :)
19:01 lizmat sorry, but I'm still not following the absolute time part
19:02 lizmat but basically, you want sleep-till to just retiurn Bool ?
19:02 lizmat *return
19:03 diakopter so sleep-till is simply a timer for the current callstack
19:04 lizmat current thread
19:04 diakopter oh hm nm
19:04 diakopter lizmat: yeah, but the spec doesn't specify the whole OS thread actually sleeps
19:04 diakopter the green thread could sleep
19:05 lizmat should that matter in the spec ?
19:05 diakopter not imho
19:06 lizmat fwiw, interval / sleep-till uses nqp:sleep, so whatever it does, is what happens  :-)
19:06 diakopter I just mean the spec doesn't specify whether to use the OS's scheduler for the switching or its own multiplexer if it has one
19:06 ingy do-every?
19:07 lizmat diakopter: that feels like artistic license for the implementer to me
19:07 ingy lizmat: 1.0 or 2.0 ?
19:07 nwc10 it's known that origin/nobank can't run selftest?
19:07 ingy ;)
19:08 diakopter lizmat: I know.. I'm just defending my use of 'callstack' where you corrected 'thread'
19:08 FROGGS nwc10: I think so... last message I heard was "it compiles now"
19:08 diakopter nwc10: yep; it needs vm_int_arr deserialization; I'm doing it now
19:08 FROGGS Arr!!
19:09 diakopter [copying from parrot]
19:11 diakopter jnthn: I'm pushing this #define PARROT_INTERP MVMThreadContext *tc
19:11 diakopter *cackle*
19:14 TimToady sleep just talks to a different scheduler in a green thread than in an OS thread
19:14 TimToady I think that's how Go does it, anyway
19:14 TimToady green threads have to know how not to block accidentally
19:15 diakopter interruptible
19:15 FROGGS jnthn: I don't think it is MVMStaticFrame->copy_to, it gets called six times for nqp.moarvm/frame_name_66
19:16 FROGGS ohh, hmmm
19:16 FROGGS jnthn: nvm
19:16 foo_bar_baz joined #moarvm
19:18 diakopter wat.
19:19 diakopter nmake selftest runs in under 21s
19:20 jnap joined #moarvm
19:20 dalek MoarVM/nobank: 732d7e8 | diakopter++ | src/6model/serialization.c:
19:20 dalek MoarVM/nobank: read_array_int and read_array_str
19:20 dalek MoarVM/nobank: review: https://github.com/MoarVM/MoarVM/commit/732d7e857b
19:20 jnthn diakopter: What was it before?
19:20 jnthn It was 24s on my box before... :)
19:21 * diakopter switches branches and measures
19:24 diakopter oh heh. my laptop's on power-saving since it's on battery
19:26 diakopter jnthn: 27s
19:26 diakopter hooray for deserialized integer arrays
19:28 dalek Heuristic branch merge: pushed 24 commits to MoarVM by diakopter
19:28 diakopter merged nobank to master
19:29 diakopter not_gerd++ JimmyZ++ # lots of wins possible with nobank
19:31 diakopter merged master to serialize
19:31 dalek Heuristic branch merge: pushed 73 commits to MoarVM/serialize by diakopter
19:32 cognominal joined #moarvm
19:33 FROGGS before: 0m30.781s  now: 0m24.494s
19:34 FROGGS I like it
19:44 diakopter joined #moarvm
19:44 diakopter O_O
19:44 TimToady joined #moarvm
19:46 diakopter jnthn: with --optimize, selftest runs in... 12 seconds.
19:46 FROGGS jnthn: I dont see the incompleteness in MVMStaticFrame... ->name gets REF_ASSIGN-ed for example
19:47 FROGGS in copy_to
19:48 FROGGS diakopter: and nqp@parrot?
19:48 FROGGS sure, it runs 4 tests that nqp@moarvm fails but ...
19:54 FROGGS 0m13.300s optimized  nqp@parrot needs 0m20.311s
19:54 jnthn woo
19:54 jnthn moar faster
19:54 FROGGS and I guess that rakudo should much much faster on moarvm than on parrot then
19:55 jnthn Well, maybe... :)
19:55 * lizmat can't wait!  :-)
19:55 FROGGS because of the 6model implementation
19:55 jnthn We've not really scratched the surface of what we can do in Moar yet.
19:55 FROGGS jnthn: true
19:55 nwc10 is MoarVM going to get panda before the JVM? :-)
19:55 * nwc10 ducks
19:55 FROGGS but first it must work (damn you failing tests!)
19:55 FROGGS nwc10: dont think so :o)
19:56 jnthn At some point I should hide for a week with loads of beer and design/implement the REPR specialization stuffs...
19:56 jnthn Alas, autumn tends to be the time of year where good chunks of time are hard to come by...
19:56 FROGGS jnthn: do you thought of the name 'BeerVM' once?
19:56 FROGGS :/
19:57 jnthn Didn't consider that one. :)
19:57 jnthn .oO( Best Ever Evaluator for Rakudo VM )
19:57 FROGGS *g*
19:58 * FROGGS orders the official BeerVM t-shirt
19:58 FROGGS ahh, and t
19:58 FROGGS meh
19:58 FROGGS it wouldn't be 6model but 6pack based
19:59 jnthn Not sure if I mentioned this before, but the other name I was pondering at one point was Broom (Build Runtime Out Of MOP) :)
19:59 jnthn The code woulda been very clean
19:59 jnthn And of course, potential for puns on mark-and-sweep GC :)
20:00 FROGGS hehe
20:00 FROGGS and a Mopp is a Broom in germany
20:00 jnthn oh wow!
20:00 FROGGS Wischmopp
20:01 tgt joined #moarvm
20:01 jnthn Wisch I'd know that... :)
20:01 jnthn *known
20:01 diakopter :P
20:02 lizmat just goes to show that GC is not just wischful thinking
20:02 jnthn No, but rooting sometimes is... :)
20:02 * jnthn hopes we've got most of those issues ironed out now... :)
20:03 * TimToady gets board and wanders off...
20:10 nwc10 if pressed, I'm sure we can find more puns
20:10 TimToady that one was kinda flat
20:11 jnthn I'm sure we can iron out the pun quality
20:11 * TimToady wrinkles his nose
20:12 nwc10 the punning will continue until morale in-crease-s
20:13 * TimToady is now steamed
20:13 lizmat I think it's time to fold
20:13 nwc10 :-)
20:16 PerlJam .oO( ... and now the puns switch to poker themed  ;)
20:17 jnthn I wouldn't bet on it...
20:20 FROGGS I'm all-in for this
20:20 FROGGS even if the odds are against it
20:21 jnthn .oO( If you trip while carrying french fries in a casino, the chips are truly down... )
20:23 * lizmat refrains from mentioning garbage collection
20:23 FROGGS hehe
20:24 FROGGS lizmat: you'd say that a guy comes and does a GC run?
20:24 lizmat I wisch
20:26 PerlJam lizmat++
21:59 not_gerd good night o/
23:41 dalek MoarVM/serialize: 1d46d67 | diakopter++ | src/ (4 files):
23:41 dalek MoarVM/serialize: progress. nice commit message.
23:41 dalek MoarVM/serialize: review: https://github.com/MoarVM/MoarVM/commit/1d46d67c99
23:52 dalek MoarVM/serialize: c955075 | diakopter++ | src/ (8 files):
23:52 dalek MoarVM/serialize: emphasize the dual of frame_inc_ref by assigning null from dec_ref's return
23:52 dalek MoarVM/serialize: review: https://github.com/MoarVM/MoarVM/commit/c9550754c2

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