Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6-dev, 2016-10-30

| Channels | #perl6-dev index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
01:51 FROGGS joined #perl6-dev
02:18 ugjka joined #perl6-dev
07:43 [Tux] This is Rakudo version 2016.10-104-gdb61aaa built on MoarVM version 2016.10-27-g196361f
07:43 [Tux] csv-ip5xs        3.153
07:43 [Tux] test            14.272
07:43 [Tux] test-t           7.141
07:43 [Tux] csv-parser      15.633
08:45 RabidGravy joined #perl6-dev
08:46 lizmat Files=1150, Tests=53695, 211 wallclock secs (12.73 usr  3.85 sys + 1285.24 cusr 122.27 csys = 1424.09 CPU)
09:47 lizmat m: my @a = (1,2),(3,4); my @b; @b.append(@a.pop); dd @a, @b   # not entirely what I expected?
09:47 camelia rakudo-moar db61aa: OUTPUT«Array @a = [(1, 2),]␤Array @b = [(3, 4),]␤»
09:47 lizmat shouldn't that be @b = [3,4] ?
09:47 lizmat jnthn TimToady ^^^  ??
09:49 dalek rakudo/nom: fe9e92a | lizmat++ | src/core/IO/Handle.pm:
09:49 dalek rakudo/nom: Remove some superfluous Nil
09:49 dalek rakudo/nom:
09:49 dalek rakudo/nom: If we have --> Nil, we don't have to return it as well
09:49 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/fe9e92a37e
10:21 jnthn m: my @a = (1,2),(3,4); dd @a.pop
10:21 yoleaux2 29 Oct 2016 02:06Z <japhb> jnthn: Created a new OO::Monitors issue (#8) ... monitor methods swallow ad hoc exceptions and throw a 'Cannot invoke this object (REPR: Null; VMNull)' error instead.
10:21 camelia rakudo-moar fe9e92: OUTPUT«List @a = $(3, 4)␤»
10:21 yoleaux2 29 Oct 2016 04:06Z <japhb> jnthn: Went on a golfing spree from a different angle trying to figure out the underlying bug that was catching up OO::Monitors; results added to issue #8 and are humerously insane.
10:21 jnthn lizmat: That's why.
10:22 jnthn (The List is in a Scalar continer, and append respects that)
10:23 lizmat aha, the difference between:
10:23 lizmat m: my @a; @a.append( (3,4) ); dd @a
10:23 camelia rakudo-moar fe9e92: OUTPUT«Array @a = [3, 4]␤»
10:23 lizmat and:
10:23 lizmat m: my @a; @a.append( (3,4).item ); dd @a
10:23 camelia rakudo-moar fe9e92: OUTPUT«Array @a = [(3, 4),]␤»
10:24 lizmat m: dd (3,4)
10:24 camelia rakudo-moar fe9e92: OUTPUT«(3, 4)␤»
10:24 lizmat m: dd (3,4).item
10:24 camelia rakudo-moar fe9e92: OUTPUT«$(3, 4)␤»
10:24 lizmat ok, gotcha
11:12 AlexDaniel joined #perl6-dev
12:32 MasterDuke i was thinking about taking a break from BOOTSTRAP.nqp and play around with getting backtraces to give the actual source filename and line number (instead of m-CORE.setting)
12:33 MasterDuke but i'm not finding it obvious where/when that information is actually populated in a Backtrace::Frame
12:34 MasterDuke is that happening in moar?
12:41 dalek rakudo/nom: 4986d68 | lizmat++ | src/core/IO/Spec/Unix.pm:
12:41 dalek rakudo/nom: Properly handle / at beginning
12:41 dalek rakudo/nom:
12:41 dalek rakudo/nom: The nqp::ord is nice and fast, but it is based on the base character of
12:41 dalek rakudo/nom: a grapheme.  So it would also match on /'s adorned with accents.
12:41 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/4986d680ec
12:41 dalek rakudo/nom: fc47bbf | lizmat++ | src/core/Baggy.pm:
12:41 dalek rakudo/nom: Make Baggy.roll()/pick() about 10% faster
12:41 dalek rakudo/nom:
12:41 dalek rakudo/nom: Specifically on larger Bags/Mixes
12:41 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/fc47bbf6b8
12:42 lizmat MasterDuke: I think that's really in nqp::backtrace
12:42 lizmat afk&
12:57 dalek nqp: 2f839d7 | usev6++ | src/vm/jvm/runtime/org/perl6/nqp/io/FileHandle.java:
12:57 dalek nqp: [jvm] Make nqp::open throw if directory is passed
12:57 dalek nqp:
12:57 dalek nqp: Adjust to behaviour of MoarVM, cmp. #310
12:57 dalek nqp: review: https://github.com/perl6/nqp/commit/2f839d7a5a
12:57 dalek nqp: e564489 | FROGGS++ | src/vm/jvm/runtime/org/perl6/nqp/io/FileHandle.java:
12:57 dalek nqp: Merge pull request #316 from usev6/jvm_open_dir
12:57 dalek nqp:
12:57 dalek nqp: [jvm] Make nqp::open throw if directory is passed
12:57 dalek nqp: review: https://github.com/perl6/nqp/commit/e5644898c5
12:58 bartolin huh, that was fast :-)
13:00 FROGGS :o)
13:57 nine MasterDuke: nqp most likely. File names and line numbers are annotations to QAST nodes
14:15 dalek roast: fc9a4a8 | usev6++ | S04-statements/for.t:
14:15 dalek roast: Add test for RT #123506
14:15 dalek roast: review: https://github.com/perl6/roast/commit/fc9a4a8523
14:30 dalek roast: e783d93 | usev6++ | S (5 files):
14:30 dalek roast: Use ticket number RT #126524 for fudging
14:30 dalek roast: review: https://github.com/perl6/roast/commit/e783d93f50
16:20 dalek roast: b06e156 | usev6++ | S12-introspection/attributes.t:
16:20 dalek roast: Add test for RT #127059
16:20 dalek roast: review: https://github.com/perl6/roast/commit/b06e156032
16:25 FROGGS MasterDuke: I'd look in Exception.pm, there is a place where it walks the callstack, and is supposed to stop *before* reaching the setting... maybe it just does not stop early enough? (or perhaps too early)
17:03 lizmat FROGGS: I think that's in Backtrace.pm actually :)
17:09 FROGGS ohh yeah :o)
17:17 FROGGS_ joined #perl6-dev
17:25 MasterDuke lizmat, nine, FROGGS_: yeah, i've been looking at Exception.pm, Backtrace.pm, and CallFrame.pm at the Perl 6 level. nqp::backtrace just seems to be mapped to MVM_exception_backtrace and it adds the annotations that are read at the Perl 6 level (if i'm interpreting things correctly)
17:26 lizmat MasterDuke: fwiw, I think that whole area is due for a refactor
17:26 lizmat it makes warnings *way* too expensive
17:33 MasterDuke lizmat: refactoring the whole area may be beyond my scope at this point. and in fact, i suspect all of the thoughts i've had so far on how to reference the original files would slow things down. but hey, if i manage to implement it, i have no doubt you can speed it up
17:33 lizmat one can hope  :-)
17:40 mst warnings being expensive is useful though, it slows the program down so you have longer before they fill the log partition
17:43 lizmat true, but I'd rather make them fast and then slow artificially somehow, then waisting a lot of CPU needlessly as well
17:43 lizmat m: say "foo   bar   baz".samespace(" ")   # TimToady: sorta expected to have the last whitespace "stick", so "foo bar baz" as result ?
17:43 camelia rakudo-moar fc47bb: OUTPUT«foo bar   baz␤»
18:33 lizmat m: use nqp; say nqp::where($/); for 42 { say "foo".match(/foo/); say nqp::where($/); say $/ }   # inner $/ =:= outer $/
18:33 camelia rakudo-moar fc47bb: OUTPUT«29965056␤「foo」␤29965056␤Nil␤»
18:33 lizmat star: use nqp; say nqp::where($/); for 42 { say "foo".match(/foo/); say nqp::where($/); say $/ }   # inner $/ is DIFFERENT from outer $/
18:33 camelia star-m 2016.04: OUTPUT«47089312␤「foo」␤140664756450384␤「foo」␤»
18:34 lizmat so it looks like .match is assigning to a $/ in the blue
18:36 lizmat "ins blaue hinein"
18:37 dalek roast: 9fbdcc0 | usev6++ | S04-statements/loop.t:
18:37 dalek roast: Add test for RT #127238
18:37 dalek roast: review: https://github.com/perl6/roast/commit/9fbdcc0dab
18:39 lizmat m: for "foo" { /foo/; say $/ }   # *sigh*, this does work
18:39 camelia rakudo-moar fc47bb: OUTPUT«「foo」␤»
18:39 lizmat m: for "foo" { .match(/foo/); say $/ }   # this doesn't :-(
18:39 camelia rakudo-moar fc47bb: OUTPUT«Nil␤»
18:48 seatek joined #perl6-dev
18:59 lizmat m: use nqp; say nqp::where($/); for "foo" { my $/; say nqp::where($/); say .match(/foo/); say $/; say nqp::where($/) }  # the second $/ in the body of the for is different
18:59 camelia rakudo-moar fc47bb: OUTPUT«26938112␤26938568␤「foo」␤「foo」␤139623261592488␤»
18:59 lizmat m: use nqp; say nqp::where($/); for "foo" { say nqp::where($/); say .match(/foo/); say $/; say nqp::where($/) }  # the second $/ in the body of the for is different
18:59 camelia rakudo-moar fc47bb: OUTPUT«19614464␤19614464␤「foo」␤Nil␤19614464␤»
18:59 lizmat and now they're *all* the same
19:05 MasterDuke bisect: for 42 { say "foo".match(/foo/); say $/ }
19:05 bisectable6 MasterDuke, Bisecting by output (old=2015.12 new=fc47bbf) because on both starting points the exit code is 0
19:06 bisectable6 MasterDuke, bisect log: https://gist.github.com/641e9c5b129a8b88d32253c9e5a4948d
19:06 bisectable6 MasterDuke, (2016-10-23) https://github.com/rakudo/rakudo/commit/b7201a8f22338a906f2d8027a21387e8f5c77f41
19:09 lizmat MasterDuke: yeah, I already established that
19:09 lizmat :-(
19:09 MasterDuke oops, missed that
19:10 lizmat yet, the same code running in an augment class Str with slighlty different naming to prevent clashes, works as expected  :-(
19:10 FROGGS_ lizmat: is that class also Cool?
19:11 lizmat it's an "augment class Str"
19:11 FROGGS_ because the code that is failing here might involve Cool.match
19:11 FROGGS_ ahh, okay
19:11 lizmat so it's just adding stuff to it
19:12 lizmat I mean, in the for { } case, the $/ outside of the for, and inside the body of the for, should be the same $/
19:13 lizmat and looking at debug code with nqp::where, they are
19:15 lizmat m: $/ = 42; for "foo" { .match(/foo/; say $/ }; say $/
19:15 camelia rakudo-moar fc47bb: OUTPUT«===SORRY!=== Error while compiling <tmp>␤Unable to parse expression in argument list; couldn't find final ')' ␤at <tmp>:1␤------>  = 42; for "foo" { .match(/foo/; say $/ ⏏}; say $/␤    expecting any of:␤        postfix␤»
19:15 lizmat m: $/ = 42; for "foo" { .match(/foo/); say $/ }; say $/
19:15 camelia rakudo-moar fc47bb: OUTPUT«42␤42␤»
19:16 lizmat so the .match is just not assigning  :-(
19:17 lizmat if I add debug code in the private method that does the assigning, it sees the correct nqp::where
19:18 FROGGS_ and it is not spesh related?
19:19 lizmat https://gist.github.com/lizmat/4dd5117f34ff4fe2ad189a8b297d8b19
19:19 lizmat doesn't appear to be
19:20 lizmat (added diff)
19:33 lizmat FROGGS_: MVM_SPESH_DISABLE=1 to disable spesh and all optimizations, no?
19:33 lizmat or also --optimize=0 ?
19:34 FROGGS_ correct
19:34 lizmat no difference  :-(
19:34 FROGGS_ though, the setting gets compiled with --optimize=3, and you cannot set it to 0 IIRC
19:35 lizmat well, that's the thing: outside of the setting, the code works correctly
19:35 lizmat and that's with --optimize=3, right ?
19:35 FROGGS_ true
19:35 lizmat so, whenever I introspect, I see that the correct $/ is being used
19:36 lizmat yet, it does not get assigned
19:37 FROGGS_ okay, you've changed getlexcaller to getlexdyn, right?
19:37 lizmat yes, but changing it back doesn't change anything
19:37 FROGGS_ when I read both descriptions: https://github.com/perl6/nqp/blob/master/docs/ops.markdown#getlexdyn
19:37 FROGGS_ they do different things
19:38 lizmat so what is the difference?  the description doesn't make it clear to me
19:42 FROGGS_ I guess we need getlexrelcaller now, starting with a calling context
19:42 FROGGS_ because you also turned method match into a multi
19:42 FROGGS_ and that introduces a callframe, at least for these nqp ops
19:42 FROGGS_ so I'd try: nqp::getlexrelcaller(nqp::ctxcaller(nqp::ctx()), '$/')
19:42 lizmat ok, will do
19:43 FROGGS_ getlexdyn just looks at the caller of the caller of the caller of the...
19:43 FROGGS_ an the other one looks at the outer of the outer [...] of your caller
19:47 lizmat FROGGS_: but I don't think it is a lookup problem: the gist shows that the $/ is the $/ of the outer scope (outside of the for {} )
19:47 lizmat and I made sure the proto has its $/ set to its outer $/
19:47 lizmat *aliased to
19:48 lizmat replacing getlexdyn with nqp::getlexrelcaller(nqp::ctxcaller(nqp::ctx()), '$/') doesn't fix it :-(
19:48 lizmat .oO( make up das mind, viki  :-)
19:49 FROGGS_ damn
19:49 FROGGS_ no idea then
19:49 dalek rakudo/nom: d92222f | usev6++ | src/core/Date.pm:
19:49 dalek rakudo/nom: Revert "At least temporary fix for RT #127161"
19:49 dalek rakudo/nom:
19:49 dalek rakudo/nom: This reverts commit d80c728e257dbe17384c48c9a6e516158e6627a4.
19:49 dalek rakudo/nom:
19:49 dalek rakudo/nom: This temporary fix is no longer needed, since a workaround
19:49 dalek rakudo/nom: for the underlying problem was added with commit 986891f7ea
19:49 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/d92222f6eb
19:49 dalek rakudo/nom: c9730a2 | (Zoffix Znet)++ | src/core/Date.pm:
19:49 dalek rakudo/nom: Merge pull request #910 from usev6/rt127161
19:49 dalek rakudo/nom:
19:49 dalek rakudo/nom: Revert "At least temporary fix for RT #127161"
19:54 lizmat m: for "foo" { say nqp::where($/); /foo/; say $/; say nqp::where($/) }
19:54 camelia rakudo-moar fc47bb: OUTPUT«===SORRY!=== Error while compiling <tmp>␤Could not find nqp::where, did you forget 'use nqp;' ?␤at <tmp>:1␤------> for "foo" { say nqp::where($/)⏏; /foo/; say $/; say nqp::where($/) }␤»
19:54 lizmat m: use nqp; for "foo" { say nqp::where($/); /foo/; say $/; say nqp::where($/) }
19:54 camelia rakudo-moar fc47bb: OUTPUT«41724672␤「foo」␤140161577709608␤»
19:55 lizmat FROGGS_: note that in this case the memory address of $/ changed *after* the match
19:55 lizmat *within* the same scope!
19:56 lizmat hmmm... could be a code gen issue for /foo/, I guess
19:57 FROGGS_ or due to GC the $/ gets moved in memory
19:58 FROGGS_ I dunno, really
20:01 lizmat well, I guess I'm going to sleep a night over this, hoping jnthn will have some insight in the morrow
20:01 lizmat because at the moment, I'm uberfragt
20:01 FROGGS_ aye
20:02 lizmat and reverting the Str.match opts would be painful  :-(
20:02 * lizmat goes back to proofreading
20:06 FROGGS_ yeah... I guess there will be a better solution than this
20:19 bartolin bisect: constant $R = /f(oo)/; say so "foo" ~~ $R; say ~$0  # RT #126969
20:20 bisectable6 bartolin, Bisecting by output (old=2015.12 new=fc47bbf) because on both starting points the exit code is 0
20:20 bisectable6 bartolin, bisect log: https://gist.github.com/310260c8822acd531b5cf2cd0be0aada
20:20 bisectable6 bartolin, (2016-09-01) https://github.com/rakudo/rakudo/commit/631e2f770e83da5420b0b3ecfe611e6892a7df4f
20:20 lizmat looks like a false positive to me
20:21 bartolin m: constant $R = /f(oo)/; say so "foo" ~~ $R; say ~$0
20:21 camelia rakudo-moar c9730a: OUTPUT«True␤oo␤»
20:21 * bartolin nods
20:22 lizmat bartolin: that looks correct, no ?
20:22 bartolin yes, it does. I wonder what's the latest commit bisectable6 knows
20:27 MasterDuke it's just two off from HEAD (usev6 reverting d80c728e257dbe17384c48c9a6e516158e6627a4)
20:28 MasterDuke fyi, it says in the output "new=fc47bbf"
20:29 bartolin oops, my fault. I looked for fc47bbf, but my local rakudo is too old *g*
20:29 bartolin MasterDuke++
20:30 MasterDuke pebkac!
20:34 bartolin bisect: good=fc47bbf bad=631e2f770e constant $R = /f(oo)/; say so "foo" ~~ $R; say ~$0  # RT #126969
20:34 bisectable6 bartolin, bisect log: https://gist.github.com/2c916177c8bd2a2226940397c80d7675
20:34 bisectable6 bartolin, bisect init failure
20:35 bartolin :-/
20:35 bartolin one last try ...
20:36 bartolin bisect: good=631e2f770e bad=fc47bbf constant $R = /f(oo)/; say so "foo" ~~ $R; say ~$0  # RT #126969
20:36 bisectable6 bartolin, Bisecting by output (old=631e2f7 new=fc47bbf) because on both starting points the exit code is 0
20:36 bisectable6 bartolin, bisect log: https://gist.github.com/d48431a920b3d40eac7a03740fd02375
20:36 bisectable6 bartolin, (2016-10-27) https://github.com/rakudo/rakudo/commit/5ac593ee098f204ea69ef57edd9ae0925c544ea4
20:37 bartolin ha, that looks better
21:01 lizmat m: say 42[0;0;0;0]   # do we really want to hang off multi-dim indexing off off Any.AT-POS ?
21:01 camelia rakudo-moar c9730a: OUTPUT«42␤»
21:02 lizmat *of off
21:11 lizmat I guess that's to allow for any AT-POS capable class to be intermixed, eh?
21:32 dalek rakudo/nom: d3a0907 | lizmat++ | src/core/Any.pm:
21:32 dalek rakudo/nom: Make 2d/3d array accesses about 7x as fast
21:32 dalek rakudo/nom:
21:32 dalek rakudo/nom: By adding candidates handling ($,$) and ($,$,$) and adding the
21:32 dalek rakudo/nom: necessary code for AT-POS, EXISTS-POS, DELETE-POS, ASSIGN-POS and
21:32 dalek rakudo/nom: BIND-POS
21:32 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/d3a0907859
22:04 seatek joined #perl6-dev
22:09 dalek rakudo/nom: 4fdf6d7 | lizmat++ | src/core/Any.pm:
22:09 dalek rakudo/nom: Correct AT-POS cs signature to only do Any:D:
22:09 dalek rakudo/nom:
22:09 dalek rakudo/nom: This broke BIND-POS, so the two/three-dimensional cases have been
22:09 dalek rakudo/nom: removed (will revisit at a later time)
22:09 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/4fdf6d7721
22:19 lizmat good night, #perl6-dev!
23:05 llfourn joined #perl6-dev
23:06 travis-ci joined #perl6-dev
23:06 travis-ci Rakudo build errored. Elizabeth Mattijsen 'Correct AT-POS cs signature to only do Any:D:
23:06 travis-ci https://travis-ci.org/rakudo/rakudo/builds/171849317 https://github.com/rakudo/rakudo/compare/d3a0907859cd...4fdf6d7721a6
23:06 travis-ci left #perl6-dev
23:06 buggable [travis build above] ✓ All failures are due to timeout (1), missing build log (0), or GitHub connectivity (0). All failures are on JVM only.

| Channels | #perl6-dev index | Today | | Search | Google Search | Plain-Text | summary