Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6-dev, 2017-04-21

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

All times shown according to UTC.

Time Nick Message
01:09 sasheto joined #perl6-dev
01:13 sasheto joined #perl6-dev
01:49 ilbot3 joined #perl6-dev
01:49 Topic for #perl6-dev is now Perl 6 language and compiler development 2.0 | Logs at http://irclog.perlgeek.de/perl6-dev/today
03:04 BenGoldberg joined #perl6-dev
05:50 RabidGravy joined #perl6-dev
06:06 [Tux] This is Rakudo version 2017.04.2-13-gce37b31a3 built on MoarVM version 2017.04
06:06 [Tux] csv-ip5xs        3.053
06:06 [Tux] test            13.086
06:06 [Tux] test-t           5.181 - 5.351
06:06 [Tux] csv-parser      13.294
07:15 astj joined #perl6-dev
08:32 robertle joined #perl6-dev
08:55 lizmat Files=1191, Tests=56772, 215 wallclock secs (12.43 usr  4.61 sys + 1254.92 cusr 126.41 csys = 1398.37 CPU)
09:16 Ven joined #perl6-dev
09:20 jnthn lizmat: Hm, that was 198s yesterday, no? :)
09:20 jnthn I remember 'cus I was like "huh, sub-200s, nice" :)
09:23 lizmat yeah, could be an artefact of something else going on on my computer at the same time
09:23 lizmat still, test-t was rather high as well
09:24 lizmat I run this always like 5am in the morning when my MBP has been dormant for a few hours
09:24 lizmat to give it the benefit of not getting throttled because the CPU is running hot
09:50 AlexDaniel joined #perl6-dev
09:51 Ven joined #perl6-dev
09:56 Geth ¦ rakudo/nom: 3b0dec3255 | (Elizabeth Mattijsen)++ | src/core/Exception.pm
09:56 Geth ¦ rakudo/nom: Use pointy blocks for exceptions
09:56 Geth ¦ rakudo/nom:
09:56 Geth ¦ rakudo/nom: And initialize at compile time.  Should shave a little off of startup.
09:56 Geth ¦ rakudo/nom: review: https://github.com/rakudo/rakudo/commit/3b0dec3255
09:59 Zoffix .
09:59 yoleaux 08:31Z <samcv> Zoffix: is there anyway we could have `dir :d` or `dir :f` to get all directories or all files etc?
10:00 jnthn Isn't there a test parameter for that?
10:00 Zoffix jnthn: lizmat we added more tests. The new locking test file take 20s to run, for example
10:01 jnthn Locking test file?
10:01 jnthn .say for dir(:test(*.IO.d))
10:01 Zoffix samcv: no, I don't want to add an overengineered routine to core, which is exactly what it'll end up being after we implement everything it's meant to do for recursive file search.
10:01 jnthn Works :)
10:01 samcv ok. you know better than i do
10:01 Zoffix jnthn: IO::Handle.lock tests
10:01 jnthn Oh, that kind of lock :)
10:01 samcv i will defer to your judgment
10:02 jnthn It's a little unfortunate the test parameter is passed a string in dir though
10:02 jnthn I'd hoped I could just write dir(:test(*.d))
10:03 jnthn *.IO.d means you need to be really careful if you're not doing the CWD
10:03 jnthn (And so maybe have to prepend something to it before .IO-ing)
10:04 jnthn At which point it'd have been easier to just "next unless .d" :)
10:04 jnthn Or .grep(!*.d) I guess :)
10:04 jnthn uh, just *.d :)
10:05 Zoffix ... why does it have :Str param -_-
10:05 jnthn But yeah, I agree with Zoffix++; it's only a few more chars to grep it out
10:05 jnthn Zoffix: I don't know. Maybe from when IO::Path was costly to construct so you could filter cheaper just on Str?
10:05 jnthn But...that's not really a good reason :)
10:14 lizmat Zoffix: is that test file marked as "slow" ?
10:15 Zoffix samcv: There's depth-first or breadth-first; follow symlinks or not follow them, if you follow them, detect loops or not detect; stop when you find something or keep recursing; stop when you've recursed $n levels deep or keep going forever; stop when you found $X files or keep going, etc.
10:16 Zoffix samcv: after gdflex submitted his PR I proposed a module be made first. Don't recall anyone ever making one (other than File::Find)
10:16 Zoffix lizmat: yup
10:17 lizmat :-)
10:18 samcv well then.
10:18 samcv a module must surely be made!
10:18 samcv by someone! eventually
10:31 Geth ¦ rakudo/nom: 736be4d40f | (Elizabeth Mattijsen)++ | src/core/List.pm
10:31 Geth ¦ rakudo/nom: Make List.AT-POS about 5% faster for common path
10:31 Geth ¦ rakudo/nom:
10:31 Geth ¦ rakudo/nom: Not a lot, but could very well noticeable in some situations.
10:31 Geth ¦ rakudo/nom: review: https://github.com/rakudo/rakudo/commit/736be4d40f
10:41 Zoffix Maybe I'm gonna start one. Just make a basic implementation that people are proposing and then open a bunch of Issues every time I think of a usecase it doesn't handle :P
10:51 samcv :)
11:02 Ven joined #perl6-dev
11:18 Zoffix samcv: it took me until now to realize your weren't asking for recursive dir.....
11:18 samcv nope
11:18 samcv not recursive
11:20 samcv but that could be cool too i guess. but. i think getting all the files in a folder should be very simple to do
11:20 samcv or all the directories as determined by .d or .f
11:21 samcv i'm not expecting anything except the exact same evaluation the .d or .f things already check for
11:28 samcv night o/ Zoffix keep up the good fight
11:28 Zoffix The dir '/foo/bar', :test(none '.', '..', *.IO.d) would be it, but there's a bit of a tweak needed. Even if you give :CWD to dir, it only uses it for making paths and test doesn't use it
11:29 Zoffix Even strangely... the test doesn't use $*CWD set by &indir either :S
11:29 Zoffix night
11:30 Zoffix dir('/foo/bar').grep(*.d) should work too
11:31 Zoffix actually cheaper too, since you don't need to make Io::Paths twice
11:42 Zoffix m: indir '/tmp', { say $*CWD; dir :test{ say $*CWD; exit}}
11:42 camelia rakudo-moar 736be4: OUTPUT: «"/tmp".IO␤"/home/camelia".IO␤»
11:42 * Zoffix doesn't get how that happens
12:01 Zoffix m: sub dir2 ($test) { gather { $test.ACCEPTS: "foo" } }; indir '/tmp', { say $*CWD; dir2 { say $*CWD; exit} }
12:01 camelia rakudo-moar 736be4: OUTPUT: «"/tmp".IO␤"/home/camelia".IO␤»
12:01 Zoffix m: sub dir2 ($test) { gather { $test.ACCEPTS: "foo" } }; indir '/tmp', { say $*CWD; @ = dir2 { say $*CWD; exit} }
12:01 camelia rakudo-moar 736be4: OUTPUT: «"/tmp".IO␤"/tmp".IO␤»
12:01 Zoffix That's some caveat :S
12:02 Zoffix m: sub dir2 ($test) { gather { temp $*CWD = "/tmp";  $test.ACCEPTS: "foo" } }; indir '/tmp', { say $*CWD; dir2 { say $*CWD; exit} }
12:02 camelia rakudo-moar 736be4: OUTPUT: «"/tmp".IO␤/tmp␤»
12:02 Zoffix Luckily fixable..
12:07 Ven joined #perl6-dev
12:35 Ven_ joined #perl6-dev
12:35 * nine likes composable APIs
12:46 jnthn TimToady: I think https://rt.perl.org/Ticket/Display.html?id=131187 may be uncurse fallout, if you get chance to take a look
12:48 pmurias joined #perl6-dev
12:48 Geth ¦ nqp/master: 6 commits pushed by (Pawel Murias)++
12:48 Geth ¦ nqp/master: cc1ed4642e | [js] Cleanup leftovers of the old closure handling model.
12:48 Geth ¦ nqp/master: ff9a667f59 | [js] Clean up wval setup
12:48 Geth ¦ nqp/master: 9a52897fe6 | [js] Remove old closure model leftover
12:48 Geth ¦ nqp/master: 32f20bf055 | [js] Fix deserialization of static lexicals
12:48 Geth ¦ nqp/master: 70061a0a67 | Test using a static variable that was unused prior to serialization
12:48 Geth ¦ nqp/master: 152a56159e | [js] Make multicacheadd/multicachefind more lenient
12:48 Geth ¦ nqp/master: review: https://github.com/perl6/nqp/compare/c594acaf4c...152a56159e
12:49 Geth ¦ nqp: 8700dcc6aa | (Pawel Murias)++ | src/vm/js/nqp-runtime/deserialization.js
12:49 Geth ¦ nqp: [js] Update comment
12:49 Geth ¦ nqp: review: https://github.com/perl6/nqp/commit/8700dcc6aa
12:54 Ven_ joined #perl6-dev
13:19 AlexDaniel yes, if I recall correctly these 20 unbuildable commits are due to uncurse merge
13:25 nine m: Lock.new.protect: 1
13:25 camelia rakudo-moar 736be4: OUTPUT: «Attempt to unlock mutex by thread not holding it␤  in block <unit> at <tmp> line 1␤␤»
13:26 nine Now that's an odd error, considering that protect has a signature of rotect(Lock:D: &code)
13:26 astj joined #perl6-dev
13:28 Zoffix m: Lock.new.^lookup('protect').candidates».signature.say
13:28 camelia rakudo-moar 736be4: OUTPUT: «((Lock:D $: &code, *%_))␤»
13:28 Zoffix m: with Lock.new { .protect: 42 }
13:28 camelia rakudo-moar 736be4: OUTPUT: «Attempt to unlock mutex by thread not holding it␤  in block <unit> at <tmp> line 1␤␤»
13:29 jnthn m: class C { method m(&foo) { LEAVE say 'lol' } }; C.m(1)
13:29 camelia rakudo-moar 736be4: OUTPUT: «lol␤Type check failed in binding to parameter '&foo'; expected Callable but got Int (1)␤  in method m at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
13:29 jnthn That's why :)
13:30 nine In case anyone wonders: discovered this by commenting out the code in the block when debugging. Turning the block into an empty hash.
13:32 Zoffix oh wow
13:33 Zoffix jnthn: is that considered a bug?
13:33 Zoffix ZOFVM: Files=1241, Tests=133747, 110 wallclock secs (21.48 usr  3.07 sys + 2283.75 cusr 133.53 csys = 2441.83 CPU)
13:33 jnthn I don't think so
13:33 jnthn I mean
13:34 jnthn sub foo($handle = open('foo', :r)) { LEAVE $handle.?close; blah }
13:34 Zoffix Ah right :)
13:34 jnthn Wouldn't work and could be also reported as a bug if we did things the other way :)
13:35 Ven joined #perl6-dev
13:36 nine m: class C { multi method m(&foo) { LEAVE say 'lol' } }; C.m(1)
13:36 camelia rakudo-moar 736be4: OUTPUT: «Cannot resolve caller m(C: Int); none of these signatures match:␤    (C $: &foo, *%_)␤  in block <unit> at <tmp> line 1␤␤»
13:36 nine An easy workaround ;)
13:36 Zoffix heh
13:37 jnthn heh, yes :)
13:38 jnthn I think the LEAVE behavior is OK, but Lock.protect wants hardening
13:38 nine Would be a lovely example for some advanced Perl 6 class, I guess.
13:38 jnthn It'd at present also try to release it if we somehow got an exception when trying to acquire it
13:38 AlexDaniel c: 2016.10,2016.11 Lock.new.protect: 1
13:38 committable6 AlexDaniel, https://gist.github.com/a799a3f15ddb370497d1dc36987c7cae
13:40 AlexDaniel fwiw https://github.com/rakudo/rakudo/commit/48c2af6d059c6446d35f68f70d415c8fe593eaca
13:40 nine Ah, used to be a CATCH block but now uses LEAVE
13:40 jnthn Yes
13:40 jnthn That fixed a nasty bug :)
13:41 jnthn Where a control exception causing an unwind wouldn't unlock things
13:41 nine m: class C { method m(&foo) { { LEAVE say "lol" } } }; C.m(1)
13:41 camelia rakudo-moar 736be4: OUTPUT: «Type check failed in binding to parameter '&foo'; expected Callable but got Int (1)␤  in method m at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
13:41 nine Another very simple workaround
13:41 nine Also easy to find, once you accept that argument checking is really just part of the method body.
13:42 nine jnthn: anything against committing that block workaround?
13:42 jnthn It doesn't solve the second thing I mentioned :)
13:42 jnthn I was going to have a my int $acquired; npq::lock(...); $acquired = 1; LEAVE $acquired && nqp::unlock(...)
13:42 nine Ah, just now read that
13:43 nine I guess that's also far more self documenting :)
13:43 * nine is back to fixing that precomp unit cache invalidation issue
13:44 * jnthn has been hunting down why SSH::LibSSH just effectively hangs on connection errors
13:48 astj joined #perl6-dev
13:54 Ven_ joined #perl6-dev
13:56 cowens joined #perl6-dev
13:59 Zoffix oh boy
13:59 Zoffix IO::Path.dir has an annoying bug it
13:59 Zoffix in it
13:59 Zoffix $ perl6 -e 'my @a = (item (dir "/tmp")) xx 2000; put @a».[2]'
13:59 Zoffix Failed to get the directory contents of '/tmp': Failed to open dir: 24
14:00 Zoffix If you don't exhaust the iterator, it never closes the open dir. And looks like you can open at most 1024 dirs or something
14:00 dogbert17_ you're using up your process file handles
14:01 Zoffix No, Perl 6 does. I'm not dealing with any handles
14:04 * Zoffix contemplates :$limit argument
14:11 * dogbert17_ how will Zoffix get a handle on this problem :)
14:13 Zoffix And the recursive &dir PR also has this issue. Would crash on trees with lots of dirs: https://github.com/rakudo/rakudo/pull/1045
14:13 * Zoffix doesn't feel bad about rejecting it
14:13 dogbert17_ incidentally, spectest with harness6 and the default TEST_JOBS=1 also suffers from this, one handle per test file is used up so if your limit is 1024 you're out of luck
14:13 Zoffix uhh
14:14 Zoffix dogbert17_: I don't get why TEST_JOBS would affect it
14:14 Zoffix Or why that problem is there. Sounds like someone's forgetting to close the handles
14:14 dogbert17_ test
14:14 dogbert17_ TEST_JOBS=1 and TEST_JOBS=1+ have different code paths
14:16 dogbert17_ to be more specific, the problem is in TAP.pm6
14:17 Zoffix yeah
14:17 * Zoffix gives up trying to find where it opens files
14:17 Zoffix Wonder if it's just me. TAP.pm is a bowl of spaghetti
14:18 * dogbert17_ agrees with Zoffix
14:19 Ven joined #perl6-dev
14:19 Geth ¦ rakudo/nom: b2a64a1383 | (Zoffix Znet)++ | src/core/IO/Path.pm
14:19 Geth ¦ rakudo/nom: [io grant] Fix $*CWD inside IO::Path.dir's :test Callable
14:19 Geth ¦ rakudo/nom:
14:19 Geth ¦ rakudo/nom: Fixes two issues:
14:19 Geth ¦ rakudo/nom: 1) When user passes :CWD arg, the expectation would be that
14:19 Geth ¦ rakudo/nom:     :CWD is available as $*CWD inside :test
14:19 Geth ¦ rakudo/nom: 2) Because we use `gather` by the time we get to run the :test
14:19 Geth ¦ rakudo/nom:     Callable, we might already be outside even a user-set $*CWD,
14:20 Geth ¦ rakudo/nom: <…commit message has 7 more lines…>
14:20 Geth ¦ rakudo/nom: review: https://github.com/rakudo/rakudo/commit/b2a64a1383
14:21 Geth ¦ roast: 41b7f9f6aa | (Zoffix Znet)++ | S32-io/dir.t
14:21 Geth ¦ roast: [io grant] Test $*CWD in IO::Path.dir(:test) Callable
14:21 Geth ¦ roast:
14:21 Geth ¦ roast: Rakudo fix: https://github.com/rakudo/rakudo/commit/b2a64a1383
14:21 Geth ¦ roast: review: https://github.com/perl6/roast/commit/41b7f9f6aa
14:22 Zoffix dogbert17_: does it crash right away or do I need to wait for it to do 1000+ test files?
14:22 Zoffix which is basically the whole test suite... and is about 40m run, I'm guessing
14:22 dogbert17_ Zoffix: you'll have to wait :(
14:23 Zoffix OK. Plan B: make 2000 small test files and use them
14:23 dogbert17_ a nifty trick
14:24 dogbert17_ even if you do it the slow way, the problem is easy to observe by means of peeking into /proc/<main perl6 pid>/fd
14:26 Zoffix hmm, it isn't much faster with small files :o
14:26 Zoffix only 10 files per second or so
14:28 dogbert17_ so two minutes then :)
14:29 * Zoffix cheats with ulimit -n 50
14:29 dogbert17_ :)
14:30 Zoffix Well, just says "Aborted" I was hoping --ll-exception would give me the line with open call
14:31 dogbert17_ perhaps it's libuv which does the aborting
14:32 nine break on abort() in gdb and then do call MVM_dump_backtrace(tc)
14:34 Zoffix doesn't seem to be working with perl6-gdb-m just stops right away with "[Inferior 1 (process 18237) exited normally]"
14:35 nine set follow-fork-mode child
14:35 Zoffix no effect
14:37 MasterDuke_ anyone know the history behind "Inferior 1"? does gdb just have a really high opinion of itself?  what does it say if you try to run gdb inside gdb?
14:40 Zoffix dogbert17_: has this problem existed 2 months ago?
14:40 dogbert17_ Zoffix: what happens if you type 'q' followed by enter after you receive the Inferior message
14:41 dogbert17_ Zoffix: yes
14:41 * dogbert17_ I think
14:42 lizmat Zoffix: TAP.pm was someone's first attempt at writing idiomatic Perl 6 code, afaik
14:42 lizmat and I, for one, am glad he did that
14:43 Zoffix dogbert17_: seems to be running, but glacial pace
14:43 Zoffix lizmat: I'd be gladder if it at least came with docs :|
14:44 Zoffix lizmat: I'm just thinking.. is all of this stuff necessary? We're just running a bunch of tests. leont made p5's harness didn't he? So I guess he knows better, but this code is really hard to follow
14:45 Zoffix dogbert17_: well, it ran one file and isn't doing anything else it seems
14:45 Zoffix Just stuck
14:46 MasterDuke_ lizmat: did you see my comment on your Exceptions.pm commit?
14:47 MasterDuke_ nine: you said you were interested in seeing which routines called a specific other routine in a profile? i think i have it, but do you a use case or something i could test with?
14:47 Zoffix I only see 2 slurps and no opens() in TAP... Wonder
14:48 dogbert17_ multi get_runner(Source::File $file; TAP::Entry::Handler @handlers) ...
14:49 nine MasterDuke_: Inline::Perl5 spends most of its time in NativeCall code, so CALL is usually on the top of the list. But there's plenty of places which call into NativeCall.
14:50 Zoffix dogbert17_: is that were it crashes at?
14:51 MasterDuke_ nine: so i could just do some random stuff with Inline::Perl5, profile it, and see if i can tell where CALL is called?
14:52 nine yep
14:52 lizmat Zoffix: re doc, most of internals suffers from not enough doc  :-(
14:53 lizmat Zoffix: re leont, last time I spoke to him, he said he wanted to spend more time on it again, perhaps doccing could be an attention point  :-)
14:53 Zoffix \o/
14:54 lizmat the last time I looked at TAP.pm, it wasn't easy to get into
14:54 Zoffix dogbert17_: hm, when I set TEST_JOBS=2, and strace it, it crashes with  write(12, "Could not create a new Thread: t"..., 50Could not create a new Thread: too many open files) = 50
14:54 lizmat but then, HARNESS_TYPE=6 didn't work very well either because of many race issues
14:54 lizmat so I didn't pursue at the time
14:56 Zoffix This crashes with too many open files: my @procs = ^2000 .map: {Proc::Async.new("cal").start}; sleep 10
14:57 Zoffix dogbert17_: so maybe the crash in TEST_JOBS=1 is due to that and when you use more JOBS you don't hit the limit, because they finish off faster.
14:57 Zoffix dogbert17_: but I do get the crassh with TEST_JOBS=1+ when I ulimit -n 50
15:04 lizmat Zoffix: is lib/TAP.pm6 still tracked in the rakudo repo ?
15:05 MasterDuke_ nine: do i need to install Inline::Perl5? or should just `-I <path/to/>/Inline-Perl5/lib/ -e 'use Inline::Perl5; use List::Util:from<Perl5>' work?
15:06 nine Both should be fine
15:06 nine Even perl6 -I <path/to/>/Inline-Perl5/lib/ -e 'use List::Util:from<Perl5>'
15:07 MasterDuke_ ooh, do i need perl5-dev (i'm on ubuntu) or something like that installed?
15:07 nine yes
15:07 nine If the README is missing some part about installation, please tell me :)
15:07 Geth ¦ rakudo/nom: ca0a74398b | (Stefan Seifert)++ | 3 files
15:07 Geth ¦ rakudo/nom: Replace error-prone file timestamp check by checksum when loading deps
15:07 Geth ¦ rakudo/nom:
15:07 Geth ¦ rakudo/nom: File modification timestamps are unreliable as file systems may have a
15:07 Geth ¦ rakudo/nom: granularity of 2 seconds. In addition, packagers may limit time stamps to
15:07 Geth ¦ rakudo/nom: certain ranges for making build results reproducible.
15:07 Geth ¦ rakudo/nom:
15:07 ilmari MasterDuke_: libperl-dev
15:07 Geth ¦ rakudo/nom: We've already used checksums instead of timestamps for precompilation units
15:07 Geth ¦ rakudo/nom: themselves. Now we also use checksums for checking a precompilation unit's
15:07 Geth ¦ rakudo/nom: source file.
15:07 Geth ¦ rakudo/nom: review: https://github.com/rakudo/rakudo/commit/ca0a74398b
15:07 Geth ¦ rakudo/nom: 89f2ae4f14 | (Stefan Seifert)++ | src/core/CompUnit/PrecompilationRepository.pm
15:08 Geth ¦ rakudo/nom: Simplify code for loading a precomp unit's dependencies
15:08 Geth ¦ rakudo/nom:
15:08 Geth ¦ rakudo/nom: We're not supposed to know that the precompilation store deals with files
15:08 Geth ¦ rakudo/nom: and anyway, load-unit will just return Nil if the store doesn't contain
15:08 Geth ¦ rakudo/nom: the unit. So instead of looking for a store that has an existing file
15:08 Geth ¦ rakudo/nom: for the dependency and then loading the unit from that store, just take
15:08 Geth ¦ rakudo/nom: the first unit any of our stores gives us.
15:08 Geth ¦ rakudo/nom: review: https://github.com/rakudo/rakudo/commit/89f2ae4f14
15:08 MasterDuke_ ilmari: thanks
15:09 Zoffix dogbert17_: without messign with you limit, I ran TEST_JOBS=1 with 2000 `ok 1` test files without trouble
15:10 MasterDuke_ nine: i just checked and i do have libperl-dev installed, but i'm getting an error trying to use I::P5
15:10 nine what error?
15:10 MasterDuke_ https://gist.github.com/MasterDuke17/ab04dd2e2eedd9372059463f63fb3637
15:11 nine MasterDuke_: you don't have to install it, but at least build it: perl6 configure.pl6 && make
15:12 MasterDuke_ ah, good to go now, thanks
15:13 MasterDuke_ and that is in the Building section of the readme, i didn't read far enough
15:14 nine Maybe I really should move that section up. But OTOH I've always hated READMEs that tell me how to install first, because usually I have the software installed already (from a distro package or CPAN)
15:15 MasterDuke_ maybe just a link at the top down to that section?
15:16 MasterDuke_ "if installing manually, instructions <here>"
15:16 MasterDuke_ and yeah, last time i used Inline::Perl5 it had been installed from a distro package, so i had never seen that error before
15:21 MasterDuke_ star: use Inline::Perl5; use List::Util:from<Perl5> <shuffle>; my @a = shuffle ^10; dd @a
15:21 camelia star-m 2016.10: OUTPUT: «===SORRY!===␤Could not find Inline::Perl5 at line 1 in:␤    /home/camelia/.perl6␤    /home/camelia/star-2016.10/share/perl6/site␤    /home/camelia/star-2016.10/share/perl6/vendor␤    /home/camelia/star-2016.10/share/perl6␤    CompUnit::Repository…»
15:22 MasterDuke_ nine: should ^^^ shuffle the array? it doesn't locally
15:24 MasterDuke_ oh, i have to slip it
15:28 buggable joined #perl6-dev
15:31 buggable joined #perl6-dev
15:37 MasterDuke_ nine: CALL-ME?
15:39 nine ah, yes
15:40 Zoffix ZofBot: but here's my object, so CALL-ME maybe
15:40 ZofBot Zoffix, ) It's also possible to explicitly specify a normal autoextending array: my @vices[*]; # Length is: "whatever" # Valid indices are 0
15:40 nine It's been a while since I have looked at performance :) Looks like I've still a comfortabl 2 second lead ;)
15:55 nine Scary: we're actually rather close to being able to ship binary packages for modules...
15:56 Zoffix lizmat: I missed the question. Currently yes, but I'm hoping to remove it this weekend and make `make` pull the version from https://github.com/perl6/tap-harness6
15:56 lizmat Zoffix: ok, just wanted to make sure I hadn't missed anything in that respect
15:56 lizmat no hurry from my side  :-)
15:57 nine Zoffix: please don't!
15:57 nine Zoffix: building rakudo should not do any network access. That won't fly with distro build services
15:59 lizmat nine: but roast is also fetched over the network
15:59 lizmat so ?
15:59 nine lizmat: not as part of a plain build.
15:59 lizmat TAP.pm6 is only needed for testing
15:59 lizmat not as part of the build, afaik
15:59 nine For make test?
16:00 lizmat but for make test we don't need TAP.pm6 do qwe ?
16:02 nine If only make spectest pulls tap-harness6, I'm of course completely fine with it :)
16:03 Zoffix Yeah, only spectest
16:03 Zoffix I'm guessing we could even shove the pulling it into t/harness6 itself
16:03 Zoffix rather than make
16:03 nine But....TAP is currently part of the CORE dist
16:03 Zoffix Yeah, it'll be removed
16:03 lizmat dinner&
16:09 Zoffix Unless we plan for Rakudo's `make test` to use Perl 6 harness too?
16:16 MasterDuke_ nine: i profiled this `use Inline::Perl5; use List::Util:from<Perl5> <shuffle>; use List::MoreUtils:from<Perl5> <minmax>; my @a = shuffle |(^10); my @b = minmax |@a; dd @b;`, and found CALL-ME was only called here https://github.com/rakudo/rakudo/blob/nom/src/Perl6/Metamodel/BOOTSTRAP.nqp#L2992
16:17 MasterDuke_ does that seem right?
16:24 astj joined #perl6-dev
16:25 nine This CALL-ME? https://github.com/rakudo/rakudo/blob/nom/lib/NativeCall.pm6#L327
16:30 robertle joined #perl6-dev
16:40 MasterDuke_ yep
17:24 TimToady jnthn: yes, that's almost certainly uncurse related; unifying $!to with $!pos was a slight overreach
17:25 TimToady I've been thinking about disunifying those anyway to save allocation of a bunch of position-only cursors for trailing ws
17:25 TimToady and <( )> can probably use the same distinction between $!to and $!pos
17:26 TimToady it's one more attribute but a bunch fewer cursors
17:26 TimToady which is probably a win
17:27 TimToady but I'll probably just add in the $!to first on the first-make-it-work-right principle
17:29 Geth ¦ roast: a8f1b96dd5 | (Stefan Seifert)++ | S10-packages/precompilation.t
17:29 Geth ¦ roast: We no longer depend on time stamps when checking dependencies
17:29 Geth ¦ roast: review: https://github.com/perl6/roast/commit/a8f1b96dd5
17:30 nine MasterDuke_: do you get different callers for that BOOTSTRAP code? I've never looked closely at what's between Inline::Perl5 and that CALL-ME.
17:39 astj joined #perl6-dev
17:43 MasterDuke_ call-args on line 757, p6_to_p5 on line 279, Array on line 545, p5_to_p6 on line 621, and some anonymous block on line 626 (all from Inline-Perl5/lib/Inline/Perl5.pm6)
18:05 jnthn TimToady: Ah, that would explain it, yes.
18:50 MasterDuke_ timotimo: if you see my conversation with nine earlier, i think i can now find the routines that call a specific routine in a profile. can you give me a use case to test with?
19:25 Geth ¦ nqp: a5337ff305 | TimToady++ | 3 files
19:25 Geth ¦ nqp: separate the $!to concept back out from $!pos
19:25 Geth ¦ nqp:
19:25 Geth ¦ nqp: This will allow )> to work correctly again. It may also give us the
19:25 Geth ¦ nqp: opportunity to optimize away <.ws> cursor creation by just tacking it onto
19:25 Geth ¦ nqp: the previous capture cursor as a $!pos update that doesn't affect $!to.
19:25 Geth ¦ nqp: This in turn will cut down on $!cstack usage and scanning overhead. In
19:25 Geth ¦ nqp: some cases it may allow us to steal the cstack directly for a match list,
19:25 Geth ¦ nqp: without having to grep out the non-capture cursors.
19:25 Geth ¦ nqp:
19:25 Geth ¦ nqp: Also did some Num suppression on subtractions that might not know their
19:25 Geth ¦ nqp: operand types and default to Num.
19:25 Geth ¦ nqp: review: https://github.com/perl6/nqp/commit/a5337ff305
19:25 Geth ¦ rakudo/nom: 5d68f1ff1a | TimToady++ | 2 files
19:25 Geth ¦ rakudo/nom: fix )> to work again whenever .MATCH is called
19:25 Geth ¦ rakudo/nom:
19:25 Geth ¦ rakudo/nom: The unification of $!to and $!pos in the uncurse branch caused the )>
19:25 Geth ¦ rakudo/nom: construct to malfunction if .MATCH was not called at the right time.  This
19:25 Geth ¦ rakudo/nom: version uses the newly patched nqp that distinguishes $!to from $!pos again.
19:25 Geth ¦ rakudo/nom: (Note that all internal access to $!to should be through the .to method,
19:25 Geth ¦ rakudo/nom: since it might or might not defer to $!pos.)
19:26 Geth ¦ rakudo/nom: review: https://github.com/rakudo/rakudo/commit/5d68f1ff1a
19:26 Geth ¦ rakudo/nom: version bump brought these changes: https://github.com/perl6/nqp/compare/2017.04...2017.04-12-ga5337ff
19:26 Geth ¦ rakudo/nom: 3cff74cf5a | TimToady++ | tools/build/NQP_REVISION
19:26 Geth ¦ rakudo/nom: bump NQP to get $!to fix for )> construct
19:26 Geth ¦ rakudo/nom:
19:26 Geth ¦ rakudo/nom: fixes #131187
19:26 synopsebot6 Link:  https://rt.perl.org/rt3/Public/Bug/Display.html?id=131187
19:26 Geth ¦ rakudo/nom: review: https://github.com/rakudo/rakudo/commit/3cff74cf5a
19:26 Geth ¦ rakudo/nom: version bump brought these changes: https://github.com/perl6/nqp/compare/2017.04...2017.04-12-ga5337ff
19:26 TimToady dunno if that merits a point release or not...
19:27 TimToady certainly worth getting into Star though
19:27 lizmat which would imply a point release
19:27 lizmat feels to me anyway
19:27 TimToady nod
19:30 * TimToady wonders which modules that fixes...
19:30 MasterDuke_ lizmat: did you see my earlier question about your Exception.pm commit?
19:31 lizmat MasterDuke_: no, I haven't
19:32 MasterDuke_ ok, was wondering if there was a reason you didn't make the same change to the exception i added?
19:32 TimToady fixes File::Ignore anyway...
19:32 lizmat MasterDuke_: no reason, I just git stash popped something that was from before you added that one
19:33 lizmat and I didn't notice
19:33 lizmat will do so now
19:33 MasterDuke_ ah ha, i suspected that exact cause
19:34 Geth ¦ rakudo/nom: 9962d2b652 | (Elizabeth Mattijsen)++ | src/core/Setty.pm
19:34 Geth ¦ rakudo/nom: Cannot create Setties from a lazy iterator
19:34 Geth ¦ rakudo/nom: review: https://github.com/rakudo/rakudo/commit/9962d2b652
19:37 TimToady .oO(SETI has found infinite Setties on Alpha Settari!)
19:42 Geth ¦ rakudo/nom: 9ed89d9472 | (Elizabeth Mattijsen)++ | src/core/Exception.pm
19:42 Geth ¦ rakudo/nom: Oops, forgot X::Trait::Invalid
19:42 Geth ¦ rakudo/nom:
19:42 Geth ¦ rakudo/nom: MasterDuke++ for pointing out
19:42 Geth ¦ rakudo/nom: review: https://github.com/rakudo/rakudo/commit/9ed89d9472
19:45 * [Coke] is super concerned about the fact that we had not one but multiple point releases and are continually talking bout more.
19:45 [Coke] might be time to think about moving to a more structure branch and release strategy.
20:13 astj joined #perl6-dev
20:15 Zoffix [Coke]: sounds good. How about adding a 1-month delay for released stuff? So, if we start now, make a release branch and nothing gets into it for a month. Beta testers are encouraged to use the release branch (would be nice to make rakudobrew to default to it). Then, on next release, we release from release branch the stuff that marinated and seen some use for a month to weed out all issues. In addition,
20:15 Zoffix we add a bot that stresstest and tries rakudo HEAD on a bunch of trusted modules daily. This way we'll find any ecosystem fallout. The release requirement will also be to test modules installation as well as multi-OS testing (this can ne automated by making NeuralAnomaly spin up a bunch of VMs with different OSes on release)
20:16 Zoffix And we only fix breaking stuff in release branch. All other features and bug fixes go to HEAD
20:16 Zoffix and by HEAD I mean HEAD of nom branch
20:19 lizmat FWIW, I think the current release's breakage would have been covered had we had a cpan-testers like thing for the ecosystem
20:20 timotimo oof, #perl6-dev is the slower of the two and it's still too much for me to backlog over comfortably >_<
20:21 nine I'm with lizmat. Noone tests release branches.
20:22 nine Linux distributions are learning that lesson, too. openSUSE is moving towards their rolling release distro which helped greatly by their openQA automated integration testing.
20:22 timotimo MasterDuke_: you see, while "repairing" rc-forest-fire off of rosettacode's Forest Fire page, i stumbled upon "bind" being called a crapton. let me see what it was before i changed stuff around
20:23 nine So we should at least include emmentaler in the release process but much better would be fully automated testing of every single commit.
20:23 timotimo "for @!coords -> ($i, $j) {"
20:23 timotimo this one asploded it
20:23 nine That could be a good topic for the Perl Toolchain Summit
20:24 timotimo so i changed @!coords to have a "flat" in front when it was generated, and then removed the ( ) around $i, $j
20:24 timotimo and that made it a crapton better
20:24 lizmat nine: agree
20:26 Zoffix lizmat, the Repl bug would't as neither we nor linenoise had tests covering it. The left over debug print... hard to test, again this would rely on test coverage; do any tests test for extraneous output during program run; especially in a somewhat uncommon usecase
20:27 Zoffix And I don't know if latest uncurse bug was found by tests
20:27 japhb timotimo: Is your rc-forest-fire change a correctness problem or a performance bug?
20:27 japhb *to fix a
20:28 Zoffix nine, even with zero user testing of release branch we wouldn't have had any point releases this month as all the bugs would be found by users testing nom
20:29 Zoffix as well as devs have a chance to realise there's a bug or LTAness in their recent commit and fix it
20:30 Zoffix And I know some devs stop committing a few days before release; with a release branch they wouldn't need to
20:31 timotimo japhb: errrr, i'm not sure any more. but i did get it blazing fast by the end
20:31 Zoffix hell, it don't have to be a month wait. freeze release branch 1-2 weeks before release.
20:32 timotimo japhb: it turned out at some point Enum ~~ Enum got mangled so it went via Num ~~ Num, which had not only two blocks inside it, but also had to isinfornan self before going on
20:32 timotimo the Enum ~~ Enum candidate i created for this reason is in the recent releases iirc, and the improved Num ~~ Num candidate, too
20:33 * japhb wonders what "blazing fast" actually means in this case ....
20:33 timotimo hm
20:33 japhb I have high standards on that one.  ;-)
20:34 timotimo 21.62user 0.19system 0:21.91elapsed 99%CPU (0avgtext+0avgdata 111900maxresident)k - this is a 40x40 field at 1_000 iterations
20:34 timotimo not shabby.
20:36 japhb So about 50 fps at 40x40?  Yeah, that's a decent start.
20:37 timotimo now that our profiler output is fixed ...
20:38 timotimo it's a good sign when the first four routines are all green :)
20:38 japhb :-)
20:42 timotimo i should be fixing the random seed
20:43 timotimo wow, we have a frame <anon> in file <unknown> at line <unknown> that's creating a crapton of Int objects
20:44 timotimo oh my. the ratios for whether a tree should be made or a tree should catch fire are Rat objects, we're comparing a whole lot of Num objects generated by rand against them
20:45 timotimo turning these into Num cut off like half a second only, though
20:46 timotimo not such a huge impact either way.
20:48 timotimo the step function takes 70% of time, show 30%
20:52 timotimo hello, 16.7s
20:52 timotimo @foo[$i;$j] is a bit more expensive than @foo.AT-POS($i).AT-POS($j)
20:52 Zoffix Another problem with releases we have: think of all the features we added since Dec 2015. None of them are "official" Perl 6. Policy-wise, we could nix parse-base and parse-names and anything else we added. Yet all this stuff is both documented and in use. In 6.d we should try to do more point releases of language or something. Non-breaking changes that declare that feature XYZ can officially be used
20:53 [Coke] Agreed, that can be part of the 6.d plan (and release announcement about how we're tightening the policy a bit)
20:53 timotimo the innermost block, which is four "when" inside a "given", spends 27.67% of its time in "succeed"
20:55 timotimo ugh, all succeed does is call THROW, but only 73% of its time is spent inside THROW
20:59 Zoffix [Coke]: xtest... yeah. I'll be doing more grant work this weekend and will ensure to run xtest by end of Monday
20:59 Zoffix And will run one today, when I get home
20:59 timotimo oh hello 14 seconds (turned the whens into an if/elsif
20:59 [Coke] danke. just getting p6doc building on my new mactop.
21:14 timotimo aha, it doesn't matter to put a --> Nil on the block we're for-ing if it has two arguments because we only specialcase for one argument when "not slippy"
21:15 timotimo though actually the problem isn't that. i's going through sink-all already
21:15 timotimo i guess i was hoping the return value of Nil would cause it to sink without calling .sink on anything
21:18 timotimo succeed tries to sink the return value of THROW-NIL, which is defined to be Nil :(
21:19 timotimo actually, the throw isn't supposed to return at all
21:19 timotimo so where does the overhead come from ...
21:20 timotimo oh, i didn't realize it was calling succeed($x) all this time
21:43 jnthn TimToady: Thanks for the fix; did I miss a test going in, or shall I add my golfed example to roast?
21:43 TimToady I did not add a test
21:44 jnthn k, will do, so we've got it covered in roast as well as a module :)
21:44 timotimo Zoffix: i think the multiple dispatch explodes when it's trying to invoke the here clause
21:44 timotimo maybe we have to put Any:D in front so it'll refuse to try to run the where clause
21:44 timotimo i'll ask robertle to try that locally
21:45 timotimo Zoffix: thanks for giving that tool the much-needed cleanup!
21:45 timotimo i'm not sure if i Zoffix++ when you did
21:49 Zoffix Ah, right.
21:49 Zoffix m: sub (Str $x where try .IO.e) {}(Str)
21:49 camelia rakudo-moar 9ed89d: OUTPUT: «Constraint type check failed in binding to parameter '$x'; expected anonymous constraint to be met but got Str (Str)␤  in sub  at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
21:50 Zoffix m: multi foo (Str $x where try .IO.e) { say "here"}; multi foo ($) { say "there" }; foo Str
21:50 camelia rakudo-moar 9ed89d: OUTPUT: «there␤»
21:50 Zoffix m: multi foo (Str $x where try .IO.e) { say "here"}; multi foo ($) { say "there" }; foo "/tmp"
21:50 camelia rakudo-moar 9ed89d: OUTPUT: «there␤»
21:51 timotimo anyway, i committed a little patch for it
21:51 timotimo oh, you PR'd it, too
21:51 timotimo sorry
21:52 Zoffix I liked your fix better
21:52 timotimo oh
21:53 timotimo it ended up with a combination of both, it seems like?
21:53 timotimo i.e. the :D and the try
21:53 Zoffix timotimo: 'cause I used online editor and didn't realize you commited a fix
21:54 Geth ¦ roast: 09d099bae3 | (Jonathan Worthington)++ | S05-metasyntax/angle-brackets.t
21:54 Geth ¦ roast: Test to cover RT #131187.
21:54 Geth ¦ roast: review: https://github.com/perl6/roast/commit/09d099bae3
21:54 synopsebot6 Link:  https://rt.perl.org/rt3/Public/Bug/Display.html?id=131187
21:54 ugexe $ perl6 -e '\
21:54 ugexe say 1;\
21:54 ugexe '
21:54 ugexe why doesn't that work? (same with perl 5)
21:55 Zoffix Some shell escaping stuff? Works fine without those slashes
21:57 ugexe its the same in the repl
21:57 Zoffix How do you make it in the repl?
21:57 ugexe just say 1;\ return
21:57 Zoffix I get {}
21:57 ugexe yeah
21:58 Zoffix Dunno
21:59 Zoffix $ perl6 --target=parse
21:59 Zoffix ===SORRY!===
21:59 Zoffix Too many positionals passed; expected 1 argument but got 3
22:00 Zoffix There's this ticket that feels to be somewhat in similar vein: https://rt.perl.org/Ticket/Display.html?id=130425#ticket-history
22:01 timotimo Zoffix: i put the greps for SETTING:: (well, what it was before the names changed) in there mostly because i didn't want to see coverage of the .t files from the test suite. maybe the greps are unnecessary in total because you can just preprocess the coverage reports?
22:02 Zoffix dunno
22:02 timotimo you think a --usermode switch would be a good idea?
22:04 Zoffix ¯\_(ツ)_/¯
22:04 Zoffix Maybe --coremode?
22:04 Zoffix and usermode be default
22:05 * Zoffix &
22:07 timotimo that's sensible, as we core haxors know What We Are Doing (and we know What We Are Doing Is Kinda Bad)
23:04 BenGoldberg joined #perl6-dev
23:45 TimToady joined #perl6-dev

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