Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6-dev, 2017-06-15

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

All times shown according to UTC.

Time Nick Message
00:00 AlexDaniel ah… okay…
00:03 eveo ZOFFLOP: t/spec/S32-io/pipe.t
00:07 eveo ZOFFLOP: t/spec/S11-modules/require.t
00:23 Geth ¦ rakudo/nom: e4468c610c | (Zoffix Znet)++ | src/core/Proc.pm
00:23 Geth ¦ rakudo/nom: Polish Proc methods that expect the Proc to be done
00:23 Geth ¦ rakudo/nom:
00:23 Geth ¦ rakudo/nom: Affects methods .status, .Numeric, .Bool, .exitcode, and .sink.
00:23 Geth ¦ rakudo/nom: Fixes module build installation failures and RT#125757:
00:23 Geth ¦ rakudo/nom: https://rt.perl.org/Ticket/Display.html?id=125757#ticket-history
00:23 Geth ¦ rakudo/nom:
00:23 Geth ¦ rakudo/nom: Even before Proc refactor, we had some issues where users would call, say,
00:23 Geth ¦ rakudo/nom: <…commit message has 12 more lines…>
00:23 Geth ¦ rakudo/nom: review: https://github.com/rakudo/rakudo/commit/e4468c610c
00:23 eveo There. Fixed forever! Gonna write tests tomorrow.
00:23 * eveo goes to $relax()
00:30 Geth ¦ roast/6.c-errata: 2c8d5c7704 | (Samantha McVey)++ | S15-nfg/grapheme-break-test-gen.p6
00:30 Geth ¦ roast/6.c-errata: Add a die to grapheme-break-test-gen.p6 since tests were altered
00:30 Geth ¦ roast/6.c-errata:
00:30 Geth ¦ roast/6.c-errata: 2 tests that were generated with this script were altered, since
00:30 Geth ¦ roast/6.c-errata: they were incorrect. Since this is in 6.c-errata the tests should
00:30 Geth ¦ roast/6.c-errata: not change unless they are incorrect, so rewriting the script or
00:30 Geth ¦ roast/6.c-errata: taking it from master would not be the best idea.
00:30 Geth ¦ roast/6.c-errata: review: https://github.com/perl6/roast/commit/2c8d5c7704
00:53 geekosaur joined #perl6-dev
00:56 samcv hmm having some weird testing errors
00:56 samcv with my font info query module
00:56 samcv # expected: :!autohint
00:56 samcv #      got: :!autohint
00:56 samcv using is-deeply
00:56 samcv odd
01:00 samcv ok i think i got it. looks like .perl is the same... but they're actually not the same
01:00 eveo Then it's a bug in .perl, innit?
01:00 eveo they is what? Pair objects?
01:01 eveo s: &[eqv], \(:!autohint.Pair, :!autohint.Pair)
01:01 SourceBaby eveo, Sauce is at https://github.com/rakudo/rakudo/blob/14d7571/src/core/Pair.pm#L91
01:01 samcv yep
01:01 samcv hash
01:02 samcv this is the .gist:
01:02 samcv verticallayout => (Bool)
01:02 samcv which is correct. but the .perl is :!verticallayout
01:02 samcv is the same code that does hash pairs the same that does other Pairs?
01:02 eveo Ah, I see it
01:02 eveo m: (Pair.new: "foo", Bool).perl.say
01:02 camelia rakudo-moar e4468c: OUTPUT: «:!foo␤»
01:02 eveo s: :2a.Pair, 'perl', \()
01:02 SourceBaby eveo, Sauce is at https://github.com/rakudo/rakudo/blob/14d7571/src/core/Pair.pm#L65
01:03 samcv yep
01:03 * eveo fixes
01:03 samcv :-)
01:03 samcv bisectable6, (Pair.new: "foo", Bool).perl.say
01:03 bisectable6 samcv, On both starting points (old=2015.12 new=e4468c6) the exit code is 0 and the output is identical as well
01:03 bisectable6 samcv, Output on both points: «:!foo»
01:05 eveo huh... "!(nqp::istype($!key,Num) && nqp::isnanorinf($!key))"  that'll never be true, will it?
01:06 samcv weird
01:06 samcv maybe want to check when that was added
01:07 samcv if there was some reason
01:08 eveo ah, yeah, git blame suggests that ! shouldn't be there
01:08 eveo Oh wait
01:08 eveo I need to start wearing my glasses. Totally missed the extra layer of parens there -_-
01:09 samcv heh
01:11 samcv eveo, what $* variable gets me what rakudo version is running?
01:15 eveo m: $*PERL.compiler.version
01:15 camelia rakudo-moar e4468c: ( no output )
01:15 eveo m: $*PERL.compiler.version.say
01:15 camelia rakudo-moar e4468c: OUTPUT: «v2017.05.440.ge.4468.c.610␤»
01:16 samcv very good. thanks :)
01:16 eveo m: Pair.new(Complex, 42).perl.say
01:16 camelia rakudo-moar e4468c: OUTPUT: «Complex => 42␤»
01:16 eveo Another bug
01:24 Geth ¦ rakudo/nom: c6b03c45c7 | (Zoffix Znet)++ | src/core/Pair.pm
01:24 Geth ¦ rakudo/nom: Fix Pair.perl
01:24 Geth ¦ rakudo/nom:
01:24 Geth ¦ rakudo/nom: - Do not assume all Str keys are Str:D
01:24 Geth ¦ rakudo/nom: - Do not assume all false Bool values are Bool:D
01:24 Geth ¦ rakudo/nom: - Do not assume all Numeric keys are Numeric:D
01:24 Geth ¦ rakudo/nom:
01:24 Geth ¦ rakudo/nom: Bug find: https://irclog.perlgeek.de/perl6-dev/2017-06-15#i_14734597
01:24 Geth ¦ rakudo/nom: review: https://github.com/rakudo/rakudo/commit/c6b03c45c7
01:24 Geth ¦ roast: 9e351a224a | (Zoffix Znet)++ | S02-types/pair.t
01:24 Geth ¦ roast: Test Pair.perl with typeobject components
01:24 Geth ¦ roast:
01:24 Geth ¦ roast: Rakudo fix: https://github.com/rakudo/rakudo/commit/c6b03c45c7
01:24 Geth ¦ roast: Bug find: https://irclog.perlgeek.de/perl6-dev/2017-06-15#i_14734597
01:24 Geth ¦ roast: review: https://github.com/perl6/roast/commit/9e351a224a
01:24 * eveo powersdown
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 | For toolchain/installation stuff see #perl6-toolchain | For MoarVM see #moarvm
02:26 ugexe perl6 -e "prompt('y/n')" # can anyone try this on windows with moar-blead?
02:28 ugexe y/nCannot flush handle: Failed to flush filehandle: No such device or address
02:29 ugexe it works with just "prompt()" though (the other multi)
02:32 ugexe `my $out := $*OUT; $out.print(42); $out.flush()` reproduces - ok except on windows
03:00 samcv hmm something is tried to convert to a num on /gen/moar/ModuleLoader.nqp on my travis build environment
03:00 samcv i'm guessing it tries to convert some ENV var to a number
03:00 samcv my $DEBUG := +nqp::ifnull(nqp::atkey(nqp::getenvhash(), 'RAKUDO_MODULE_DEBUG'), 0) i see this on line 32 which is what the error is from
03:01 samcv is it another line or could you get Unhandled exception: Can't convert 'yes' to num: expecting a number from that line?
03:01 samcv oh. i see the + there
03:01 samcv yeah that seems to be it
03:02 ugexe Proc might need to use CLONE-HASH-DECONTAINERIZED(%env)
03:02 ugexe it used to be used, but got removed
03:03 ugexe well no i guess its just in proc::async now
03:11 samcv ugexe, RAKUDO_MODULE_DEBUG is supposed to be a number yes?
03:12 samcv as it converts to a number with the +, it seems if the variable is set to a string that can't be converted to a number, perl6 won't even compile
03:12 samcv have a fix but just want to confirm that. or should it set to 1 if there is a defined string?
03:12 samcv or just accept numbers, if not a number set to 0?
03:13 ugexe well if this is a new bug then should probably find out what caused it
03:13 samcv it's not new
03:13 samcv well. actually it could be
03:13 samcv but i fixed it.
03:14 ugexe RAKUDO_MODULE_DEBUG is an env var, so it will always be a string representation
03:14 samcv as long as RAKUDO_MODULE_DEBUG accepts numbers. if it's not able to convert to a number then it sets to 0
03:14 samcv i understand this
03:14 samcv all i'm asking is if it should accept anything that isn't a number
03:14 samcv because that's how it currently works
03:15 samcv atm if it's not able to convert to a number then rakudo won't work, or at minimum won't compile. so my fix sets it to 0 if it can't be converted to a number instead of breaking
03:17 samcv actually yeah this bug is old. that line was added in 2013
03:17 ugexe i dunno, im included to say anything but 0 and '' are true but ' ' makes me reconsider
03:17 ugexe inclined^
03:18 samcv i would say so too. though that is not currently how it works atm. but i could always try and do that hmm
03:18 samcv i'm going to commit this fix, which won't change any behavior except stopping the crash, and we can figure out if we want to do that
03:20 samcv actually not too much to that, so i'll go ahead and do that
03:26 samcv ugexe, it seems other places in the codebase accept things not 0 and not '' as true
03:26 samcv i just figured out. so this should be changed to match
03:41 BenGoldberg joined #perl6-dev
04:00 ugexe hmm zef is able to install itself on windows now, but using `zef ...` always results in a precomp error due to not being able to rename a file. `perl6 -Ilib bin/zef ...` works, just not `zef ...`
05:06 samcv did more work to make sure it emulated it properly. wrote about 10 tests testing various scenarios and checked how the Perl 6 code checked if the env would be set
05:06 samcv so finally got it so both things agree with each other instead of in certain cases them not being set the same
05:32 Geth ¦ rakudo: samcv++ created pull request #1101: Fix ModuleLoader.nqp so RAKUDO_MODULE_DEBUG works the same as elsewhere
05:32 Geth ¦ rakudo: review: https://github.com/rakudo/rakudo/pull/1101
05:32 samcv ugexe, code is a bit longer than i had hoped, but i wanted to make sure it matched in practically all cases with the Perl 6
05:32 samcv Full description of everything in the PR description
06:14 [Tux] This is Rakudo version 2017.05-441-gc6b03c45c built on MoarVM version 2017.05-85-g21ee1a50
06:14 [Tux] csv-ip5xs        3.043
06:14 [Tux] test            13.002
06:14 [Tux] test-t           4.224 - 4.533
06:14 [Tux] csv-parser      13.196
07:10 nine samcv: I'm really not sure the debug output in ModuleLoader.nqp has helped anyone in the past 3 years. And I've thought about trimming RAKUDO_MODULE_DEBUG output to the parts that I usually need a couple of times already. Just left everything in in case somebody would at some point benefit from it.
07:11 nine samcv: but without knowing that anyone benefits and instead knowing that it can harm, I'd go for removing it.
07:20 [TuxCM] joined #perl6-dev
07:36 lizmat Files=1204, Tests=62034, 216 wallclock secs (13.24 usr  5.10 sys + 1319.83 cusr 131.33 csys = 1469.50 CPU)
07:36 yoleaux 14 Jun 2017 16:14Z <eveo> lizmat: this commit change the time of DateTime.second from a Rat to Num. Does it matter? https://github.com/rakudo/rakudo/commit/74ab0526f2718e44c8d6331c33d29a46bb6891bf
07:36 yoleaux 14 Jun 2017 16:46Z <perlawhirl> lizmat: re: eveo's msg... i think the real question is, should *.seconds type be consistent, eg: ( DateTime.new('2012-02-29T12:34:56Z'), DateTime.now ).map( *.second.^name )
07:40 sivoais joined #perl6-dev
08:34 robertle_ joined #perl6-dev
08:45 geekosaur joined #perl6-dev
09:04 [TuxCM] joined #perl6-dev
10:16 eveo NeuralAnomaly: status
10:16 yoleaux 10:09Z <zengargoyle> eveo: yay, thanks much.
10:16 NeuralAnomaly eveo, [✘] Next release will be in 1 day and 18 hours. Since last release, there are 65 new still-open tickets (3 unreviewed and 1 blockers) and 43 unreviewed commits. See http://perl6.fail/release/stats for details
10:17 eveo buggable: speed 10
10:17 buggable eveo, ▂▂▂▁▁▁▁▁↓▄ data for 2017-06-11–2017-06-15; range: 4.224s–4.533s; 3% slower
10:19 eveo FWIW, I don't have %*ENV<ComSpec> set to anything on my windows box: https://github.com/rakudo/rakudo/blob/nom/src/core/Proc.pm#L127
10:20 eveo Oh wait I do
10:20 eveo would help if I printed the value -_-
10:22 Geth ¦ rakudo/nom: 241d292568 | (Jonathan Worthington)++ | src/vm/moar/Perl6/Ops.nqp
10:22 Geth ¦ rakudo/nom: Generate much better code for p6bool in some cases
10:22 Geth ¦ rakudo/nom:
10:22 Geth ¦ rakudo/nom: An earlier optimization to make it better handle the case of native
10:22 Geth ¦ rakudo/nom: lexicals unfortunately also made it works for native intermediates,
10:22 Geth ¦ rakudo/nom: such that things like `nqp::p6bool(nqp::isconcrete($foo))` would
10:22 Geth ¦ rakudo/nom: generate bad code. While it's true that VM-level box interning meant
10:22 Geth ¦ rakudo/nom: it didn't actually allocate, it still produced much more costly code
10:22 Geth ¦ rakudo/nom: than it should have. This fixes it using the recently added decont
10:22 Geth ¦ rakudo/nom: context mechanism, giving simpler code that still produces a good
10:22 Geth ¦ rakudo/nom: result on native lexicals.
10:22 Geth ¦ rakudo/nom: review: https://github.com/rakudo/rakudo/commit/241d292568
10:36 Geth ¦ rakudo/nom: 7e8bac9bcc | (Jonathan Worthington)++ | src/core/IO/Handle.pm
10:36 Geth ¦ rakudo/nom: Optimize lines pull-one a little.
10:36 Geth ¦ rakudo/nom:
10:36 Geth ¦ rakudo/nom: It turns out that `a // b // c` compiles as `(a // b) // c`. Add some
10:36 Geth ¦ rakudo/nom: parens to make it `a // (b // c)`, which saves an extra .defined call.
10:36 Geth ¦ rakudo/nom: review: https://github.com/rakudo/rakudo/commit/7e8bac9bcc
10:36 jnthn eveo: I translit'd the C code we've had in place for some years there
10:38 eveo jnthn: what about CLONE-HASH-DECONTAINERIZED thing ugexe++ mentioned? Is it no longer needed?
10:39 jnthn Hm, I can't see where that was mentioned
10:39 jnthn Oh, I see
10:40 jnthn No, it's done in Proc::Async
10:40 jnthn We don't need to do it twice. :)
10:41 eveo cool
12:12 [Coke] Note that I didn't see the proc/in/out issue on my version of nom. Updating to head, trying again.
12:13 Geth ¦ nqp/master: 6 commits pushed by pmurias++
12:13 Geth ¦ nqp/master: 0cc9fc3aad | Support getting versions from the JDK 9 that is in ubuntu
12:13 Geth ¦ nqp/master: ca54cf00a2 | [js] Implement lexical_handler_not_found in the HLL
12:13 Geth ¦ nqp/master: 37b50d7107 | Test lexical_handler_not_found
12:13 Geth ¦ nqp/master: 5ebb431c9e | [js] Fixup some stuff eslint complains about
12:13 Geth ¦ nqp/master: 7a323f810f | [js] Remove dead code
12:13 Geth ¦ nqp/master: be2279d34b | [js] Serialize low level arrays using the REPR
12:13 Geth ¦ nqp/master: review: https://github.com/perl6/nqp/compare/cabe421f02...be2279d34b
12:15 [Coke] updated, still not getting the errors.
12:15 [Coke] (testing by running perl6 xt/aspell.t in perl6/doc)
12:20 eveo What sort of errors?
12:20 eveo Ah, the ones dogbert17 had last night
12:22 [Coke] Did find more new spelling words, though.
12:29 Geth ¦ rakudo/nom: b03d8044a4 | (Elizabeth Mattijsen)++ | src/core/set_operators.pm
12:29 Geth ¦ rakudo/nom: Fix various issues with Map (<) Map
12:29 Geth ¦ rakudo/nom:
12:29 Geth ¦ rakudo/nom: Mostly to do with the fact that we didn't check for the values in the
12:29 Geth ¦ rakudo/nom: Map, which we should, as they are when coercing to .Set.
12:29 Geth ¦ rakudo/nom: review: https://github.com/rakudo/rakudo/commit/b03d8044a4
12:29 Geth ¦ roast: 2a147f38f3 | (Elizabeth Mattijsen)++ | S03-operators/proper-subset.t
12:29 Geth ¦ roast: Add a number of Map (<) Map tests
12:29 Geth ¦ roast:
12:29 Geth ¦ roast: Because we had a bug there that wasn't covered by tests yet.
12:29 Geth ¦ roast: review: https://github.com/perl6/roast/commit/2a147f38f3
12:38 dogbert17 [Coke] I just fixed #1375
12:38 eveo m: say 948/874
12:38 camelia rakudo-moar 7e8bac: OUTPUT: «1.084668␤»
12:39 eveo Interesting.... doing $*OUT.encoding: Nil; before doing my $s := "y\n".encode; and a bunch of $*OUT.write: $s; makes the writes 8% slower :S
12:39 eveo s: IO::Handle, 'write'
12:39 SourceBaby eveo, Sauce is at https://github.com/rakudo/rakudo/blob/7e8bac9/src/core/IO/Handle.pm#L530
12:39 dogbert17 [Coke] the discussion yesterday (wrt spurious spelling errors) sort of ended here: https://rt.perl.org/Public/Bug/Display.html?id=131576
12:41 eveo well, maybe.. seems there's some variance
12:55 [Coke] dogbert17: I'm on OS X, and am not seeing that particular problem.
12:56 [Coke] (just fyi)
12:57 [Coke] dogbert17: thanks for the fix. Can you take https://github.com/perl6/doc/issues/1381 as long as you're in there?
13:01 dogbert17 sure, do you want me to add foooooooobar to code.pws?
13:05 * dogbert17 does that
13:09 [Coke] +1
13:10 eater eveo: intresting :) I just did it /after/ because I was thinking .write may had additionial checks
13:16 mst eveo: not convinced you're right on reddit
13:16 mst Printing to dynamically set filehandle
13:16 mst Using filehandle that's an object that can be anything really
13:16 mst both of those are doable in perl5 AFAICT albeit not as prettily
13:17 eveo mst: doable != being done in that code
13:17 timotimo right, the code that just uses say("foo") pays that cost without the user benefitting at all
13:17 timotimo whereas the perl5 code doesn't pay for that
13:17 eveo say() literally looks up what's in $*OUT dynvar and calls that object's .say method
13:17 mst eveo: well, certainly, "Printing to dynamically set filehandle" is true of both
13:17 * timotimo AFK for half a day
13:17 mst yeah, and perl5's say() looks up the currently selected filehandle and prints to that
13:18 eveo mst: how to change it?
13:18 ilmari select($fh)
13:18 mst select($fh);
13:18 eveo And that's dynamic?
13:18 mst it's a global, but it's still a lookup
13:18 eveo :/
13:18 mst in perl5 a dynamic variable would cost exactly the same to look up
13:19 ilmari tehre's SelectSaver, which is basically a scope guard that restores it on DESTROY
13:19 mst since 'local' is handled via stack annotations, so looking it up is just a variable lookup
13:19 mst eveo: I do wish you'd actually learn perl5 before criticising it.
13:20 mst it gets quite old when a bunch of your "look at how much cooler perl6 is" stuff turns out to just be that you'd never learned how to do that in perl5 :(
13:21 eveo That's not at all what that post is saying.
13:21 mst this is a general complaint
13:22 lizmat mst eveo afaik everybody has the best intentions here
13:22 mst well, yes, duh
13:22 eveo Fine, then I do wish perl5 people would actually try perl6 and stop telling people it doesn't even compile
13:22 eveo You know, just a general complaint.
13:23 lizmat well, yes, duh  :-)
13:23 mst I have tried perl6. the last time resulted in TWEAK getting added because I got annoyed that perl6 was more typing than perl5 ;)
13:23 mst so complained until you stole it and were better again :D
13:24 lizmat there you go, we need more of mst in Perl 6  :)
13:24 eveo mst: what do I need to `local` to make the behaviour dynamic and not global?
13:25 mst eveo: that isn't directly exposed, but you're talking about performance, and 'local' has no effect on perl5 variable lookup performance, so that still seemed odd
13:25 mst the fact that perl6 actually handles unicode sensibly is probably the biggest hit anyway, and also the hugest advantage perl6 has over perl5 of the things you listed
13:25 eveo So there *isn't* a way to dynamically set the variagble in perl 5?
13:26 eveo *the handle
13:26 mst it's "just a global", but so are dynamically scoped variables
13:27 eveo No, they're not.
13:27 mst in perl5, they are.
13:27 mst hence if it *was* local()ed the performance wouldn't change
13:28 mst (local in perl5 pushes an entry onto the savestack which is restored when that frame's unwound; read/write to the local()ed variable is a plain access)
13:28 ilmari the issue is that PL_defoutgv isn't available as an actual perl variable, only indirectly via select()
13:28 eveo mst: so it goes through dynamic scopes, trying to find a global?
13:29 mst no
13:29 eveo Perl 6 does as I understand it
13:29 eveo *to find a dynvar
13:29 mst that's probably a cleaner implementation but (uneducated guess) potentially slower than the way perl5 handles it
13:30 ilmari when you local()-ise a global variable its value gets replaced in-place, and an entry to restore it gets pushed on the save stack
13:30 eveo Does perl5 even have dynamic variables?
13:30 ilmari any variable can be set for the current dynamic scope
13:30 eveo How?
13:30 ilmari any non-lexical variable, that is
13:30 ilmari local $foo = 42;
13:30 mst with 'local'
13:30 ilmari will be restored to its old value at the end of the enclosing scope
13:31 lizmat but $foo needs to exist already, right ?
13:31 ilmari global variables exist by virtue of being mentioned
13:31 mst it being perl5, it probably autovivifies the stash entry
13:32 ilmari under strict 'vars' it needs to be fully-qualified or declared with 'our'
13:32 mst or use vars'ed
13:32 eveo ilmari: you said it's non-lexicals only, get one?
13:32 ilmari eveo: "get one"?
13:32 mst 'my $foo;' can't be local()ed, but given 'my %foo;' $foo{bar} can
13:32 ilmari lexicals as in variables declared with 'my'
13:32 eveo How to make a dynamic varaible in Perl 5
13:33 ilmari mention it
13:33 mst again, anything except a pad entry can be made dynamic with local
13:33 ilmari and use 'local' to assign a value dynamically scoped
13:33 eveo OK
13:33 lizmat in Perl 6, a dynamic var is always a pad entry
13:34 lizmat be it in MY:: or PROCESS::
13:34 mst basically, 'local' in perl5 works roughly like 'my $saved = $foo; $foo = undef; LEAVE { $foo = $saved }'
13:34 ilmari that sounds like a stash entry, not a pad entry
13:34 mst except it's at the VM level
13:34 ilmari a pad belongs to a scope, a stash to a namespace
13:34 mst in soviet perl6, ALL variables live in pads
13:34 mst EQUALITY!
13:34 mst (sorry)
13:34 lizmat mst: isn't that more like "our $saved = $foo" ?
13:35 mst lizmat: I said 'roughly' because honestly it's C-level fuckery in the VM so any description is going to be at least slightly wrong :)
13:35 lizmat gotcha  :-)
13:36 mst it's actually more like push @SAVE_STACK, [ \$foo, $foo ] in terms of how the C works
13:36 mst except it's probably a struct
13:36 mst but we're now into "you can pick 'roughly' or you can read the source" territory, I suspect, and it's a while since I read the source :D
13:37 mst for the record, my goal here is "it annoys me when I see a perl6 to perl5 comparison, and the perl5 is basically sucky, so I first have to mentally rewrite the perl5 to be good perl5, and only then can I appreciate that the perl6 is still nicer, and I'd like to be able to skip that step and go straight to the appreciating the perl6 being nicer"
13:38 mst this seems like a goal we can all find useful :)
13:40 lizmat agree  :-)
13:42 eveo Wonder if there's anyway to make dynamic vars cheaper in Perl 6.
13:43 eveo s: &DYNAMIC
13:43 lizmat eveo: in general, or for builtin dynamic vars ?
13:43 SourceBaby eveo, Sauce is at https://github.com/rakudo/rakudo/blob/b03d804/src/core/stubs.pm#L30
13:43 eveo lizmat: built-in would be enough. In some IO benches I did in the past, &DYNAMIC was usually high on the list
13:44 jnthn Yes. iirc, $*OUT is expensive because at present it doesn't actually live on the call stack at all
13:44 mst assuming 'whenever' blocks preserve their dynamic environment, you probably can't do the simple-but-stupid version that perl5 does?
13:44 jnthn But falls back to looking in PROCESS
13:44 eveo + $*SPEC + $*CWD
13:44 jnthn And that fallback isn't something we can presently cache
13:45 jnthn Which means it ends up a bunch worse than it really should
13:45 eveo Cool.
13:46 eveo mst: and yes, TIL I learned `local` was dynamic
13:46 eveo s/I learned/
13:47 * eveo &
13:47 mst also, while you're right that the perl5 STDOUT isn't an object, the VM *does* have to check the currently selected filehandle isn't
13:47 mst so we're still paying some cost for it being allowed to be
13:48 Geth ¦ rakudo/nom: 3363c7b93b | (Elizabeth Mattijsen)++ | 3 files
13:48 Geth ¦ rakudo/nom: Streamline unknown .WHY handling
13:48 Geth ¦ rakudo/nom:
13:48 Geth ¦ rakudo/nom: It shouldn't matter whether something is a Block, or an Attribute
13:48 Geth ¦ rakudo/nom: or something else.  If no doc could be found, it should return
13:48 Geth ¦ rakudo/nom: something consistent (Nil for now).
13:48 Geth ¦ rakudo/nom: review: https://github.com/rakudo/rakudo/commit/3363c7b93b
13:49 eveo ok, I removed that from the list
13:57 lizmat is GLOBAL.WHO collapsed at compile time ?
14:01 lizmat eveo: perhaps this change has a positive effect on that yes benchmark: https://gist.github.com/lizmat/f8978bee4ec54232702d06bddcf50efa
14:01 lizmat it spectests clean
14:05 jnthn lizmat: What does "collapsed" mean?
14:05 lizmat I meant, is the lookup done once at compile time, or every time at runtime
14:06 eveo lizmat: cool
14:06 lizmat if the former, we could save it somewhere
14:10 lizmat FWIW, &DYNAMIC is called for $*OUT  for *every* say
14:11 lizmat eveo: ah, found a way to benchmark it
14:11 eveo Sweet
14:15 ugexe any idea what broke `prompt("y/n")` on windows?
14:15 lizmat jnthn's IO refactor ?
14:15 jnthn Yes
14:16 jnthn Saw it earlier. No Windows on this machine.
14:16 jnthn But will try and remember to look at it tonight
14:16 ugexe its because it does $*OUT.flush essentially. need to fake it?
14:17 jnthn Need to just ignore it rather than error on things that it doesn't make sense to flush
14:19 ugexe try { $out.flush } or $out.?flush ? (in case i see this pattern in modules somewhere)
14:19 jnthn Oh, I meant ignore it down at VM level
14:20 jnthn That'll be much cheaper
15:01 dogbert17 eveo: considering you recent IO++ work, do you think that doc issue https://github.com/perl6/doc/issues/931 can be closed?
15:03 eveo well, the $COLON$COLON URL no longer works.
15:03 eveo I thought we had .htaccess stuff to make old colon URLs work
15:06 dogbert17 which link on that page are you referring to?
15:06 eveo dogbert17: closed the issue
15:07 dogbert17 eveo++
15:07 eveo dogbert17: the OP in the issue links to https://docs.perl6.org/type/IO$COLON$COLONPath and https://docs.perl6.org/type/IO$COLON$COLONPath$COLON$COLONUnix
15:07 eveo Both of those are 404s, because of the $COLON crap. But are fine if you change them to proper colons
15:07 dogbert17 only 262 issues left ...
15:08 eveo Looks like this needs updating: https://github.com/perl6/doc/blob/master/html/.htaccess#L9-L18
15:08 eveo To make these links work
15:12 * dogbert17 wonders if we're still generating these erroneous links
15:12 Geth ¦ rakudo/nom: 74242e5532 | (Elizabeth Mattijsen)++ | src/core/stubs.pm
15:12 Geth ¦ rakudo/nom: Make &DYNAMIC about 1% faster
15:12 Geth ¦ rakudo/nom:
15:12 Geth ¦ rakudo/nom: Hardly measurable, but important as this is a hot code path in looking
15:12 Geth ¦ rakudo/nom: up dynamic variables, such as $*OUT and %*ENV.
15:12 Geth ¦ rakudo/nom:
15:12 Geth ¦ rakudo/nom: Other things I tried but that didn't give a positive effect:
15:12 Geth ¦ rakudo/nom: - replace nqp::replace by nqp::concat(nqp::substr,nqp::substr)
15:12 Geth ¦ rakudo/nom: - replace assign to native str by binding
15:12 Geth ¦ rakudo/nom: - use "str $name" in signature
15:12 Geth ¦ rakudo/nom:
15:12 Geth ¦ rakudo/nom: For now, nqp::getlexreldyn is blocking &DYNAMIC from being JITted.
15:12 Geth ¦ rakudo/nom: review: https://github.com/rakudo/rakudo/commit/74242e5532
15:14 eveo Filed as https://github.com/perl6/doc/issues/1382
15:15 AlexDaniel joined #perl6-dev
15:15 Geth ¦ rakudo/nom: 98b9eae9e6 | (Jonathan Worthington)++ | src/vm/moar/Perl6/Ops.nqp
15:15 Geth ¦ rakudo/nom: Comment cleanup; ven++.
15:15 Geth ¦ rakudo/nom: review: https://github.com/rakudo/rakudo/commit/98b9eae9e6
15:15 Geth ¦ rakudo/nom: 9b0b9effe5 | (Jonathan Worthington)++ | 3 files
15:15 Geth ¦ rakudo/nom: Change the way we code-gen simple for loops.
15:15 Geth ¦ rakudo/nom:
15:15 Geth ¦ rakudo/nom: For a for loop with a single argument and no phasers, we can generate
15:15 Geth ¦ rakudo/nom: inline code that calls .pull-one and invokes the block. This will turn
15:15 Geth ¦ rakudo/nom: megamorphic callsites inside of sink-all into typically monomorphic
15:15 Geth ¦ rakudo/nom: ones, which should enable the specializer - at least, once it has had
15:15 Geth ¦ rakudo/nom: some tweaks - to do a better job.
15:15 Geth ¦ rakudo/nom: review: https://github.com/rakudo/rakudo/commit/9b0b9effe5
15:16 evalable6 joined #perl6-dev
15:17 bisectable6 joined #perl6-dev
15:17 greppable6 joined #perl6-dev
15:22 Geth ¦ rakudo/nom: 6f9326877c | (Jonathan Worthington)++ | src/Perl6/Optimizer.nqp
15:22 Geth ¦ rakudo/nom: Re-instate for range optimization.
15:22 Geth ¦ rakudo/nom: review: https://github.com/rakudo/rakudo/commit/6f9326877c
15:31 lizmat jnthn: spectests clean on MacOS
15:31 lizmat afk&
15:34 dogbert17 m: dd [[1,2,3],[4,5]]>>.elems # is this a bad 'is nodal' examples?
15:34 camelia rakudo-moar 6f9326: OUTPUT: «(3, 2)␤»
15:35 dogbert17 m: dd [[1,2,[3, 3]],[4,[5, 6, 7]]]>>.elems # would this be better?
15:35 camelia rakudo-moar 6f9326: OUTPUT: «(3, 2)␤»
15:35 dogbert17 this is https://github.com/perl6/doc/issues/966
15:37 eveo m: dd ("a", "b", ("c", "d", "e"), [<c d e>])».elems
15:37 camelia rakudo-moar 6f9326: OUTPUT: «(1, 1, 3, 3)␤»
15:37 eveo m: dd ("a", "b", ("c", "d", "e"), $[<c d e>])».elems
15:37 camelia rakudo-moar 6f9326: OUTPUT: «(1, 1, 3, 3)␤»
15:38 eveo m: dd ("a", "b", ("c", "d", "e"), [ "g", "h", [<c d e>]])».elems
15:38 camelia rakudo-moar 6f9326: OUTPUT: «(1, 1, 3, 3)␤»
15:38 eveo m: dd ("a", "b", ("c", "d", "e", [<c d e>]), [ "g", "h", [<c d e>]])».elems
15:38 camelia rakudo-moar 6f9326: OUTPUT: «(1, 1, 4, 3)␤»
15:39 dogbert17 eveo: which one of these should I pick?
15:39 dogbert17 all of them?
15:39 eveo None, probably. 1 sec, I had a good one somewhere
15:40 eveo m: say (^3, [^4], '5')».Numeric
15:40 camelia rakudo-moar 6f9326: OUTPUT: «((0 1 2) [0 1 2 3] 5)␤»
15:41 eveo There we go
15:41 dogbert17 taken, thx
15:41 eveo m: say (^3, [^4], '5').map: *.Numeric
15:41 camelia rakudo-moar 6f9326: OUTPUT: «(3 4 5)␤»
15:41 eveo ^ with that for contrast
15:41 dogbert17 contrast is good :)
15:42 eveo or even more clearer
15:42 eveo m: say ((1.0, "2", 3e0), [^4], '5')».Int
15:42 camelia rakudo-moar 6f9326: OUTPUT: «((1 2 3) [0 1 2 3] 5)␤»
15:43 eveo To show that it actualy discends into iterables instead of just ignoring them
15:45 dogbert17 so >> is not nodal?
15:45 dogbert17 according to current docs we have 'is nodal: Mark a method for hyperoperators as to be avoided for descending into.'
15:46 eveo *avoided*? I thought it was the reverse
15:46 dogbert17 me too :)
15:46 eveo >> (and ») are the hyper operators; .Int and .Numeric above are the methods that are or aren't nodal
15:47 dogbert17 ah
15:47 eveo s: &deepmap
15:47 SourceBaby eveo, Sauce is at https://github.com/rakudo/rakudo/blob/9b0b9ef/src/core/metaops.pm#L646
15:47 eveo s: &HYPER
15:47 SourceBaby eveo, Sauce is at https://github.com/rakudo/rakudo/blob/9b0b9ef/src/core/metaops.pm#L529
15:48 eveo m: 42.^lookup('Int').can('nodal').say
15:48 camelia rakudo-moar 6f9326: OUTPUT: «()␤»
15:48 eveo Ok, yeah, nodal means not descend
15:50 dogbert17 so which examples should we settle for then
15:50 eveo m: .^lookup('Int') does role { method nodal {} } for Str, Int, Range, Array, List, Rat, Num; say ((1.0, "2", 3e0), [^4], '5')».Int
15:50 camelia rakudo-moar 6f9326: OUTPUT: «(3 4 5)␤»
15:50 eveo Same as before
15:51 eveo Except just say that .Int isn't nodal and then find some nodal method and use it to show that it's nodal
15:51 eveo m: say ((1.0, "2", 3e0), [^4], '5')».elems
15:51 camelia rakudo-moar 6f9326: OUTPUT: «(3 4 1)␤»
15:51 eveo there. Compare Int vs elems and say elems is nodal, but Int ain't
15:51 eveo m: say ((1.0, "2", 3e0), [^4], '5')».Int
15:51 camelia rakudo-moar 6f9326: OUTPUT: «((1 2 3) [0 1 2 3] 5)␤»
15:52 dogbert17 eveo++, it will be done
15:52 eveo dogbert17++ doing it
16:17 dogbert17 eveo: here's the first attempt at 'is nodal', now incorporating [Coke]'s more readable description: https://gist.github.com/dogbert17/a0a3057f59b4263753968c4367afcde2
16:17 * dogbert17 still thinks it's a bit iffy
17:04 [Coke] dogbert17: wait, what did I do?
17:35 travis-ci joined #perl6-dev
17:35 travis-ci Rakudo build failed. Jonathan Worthington 'Change the way we code-gen simple for loops.
17:35 travis-ci https://travis-ci.org/rakudo/rakudo/builds/243306922 https://github.com/rakudo/rakudo/compare/74242e5532aa...9b0b9effe5fe
17:35 travis-ci left #perl6-dev
17:35 buggable [travis build above] ☠ Did not recognize some failures. Check results manually.
17:37 eveo github connect issue "error: RPC failed; curl 56 SSLRead() return error -36"
17:40 jnthn I promise I didn't break github :P
17:40 eveo :)
17:40 [Coke] wonder if that's the cause of my Bailador issues in toolchain.
17:50 dogbert17 [Coke]: you suggested another text in the issue
17:51 [TuxCM] joined #perl6-dev
17:55 jnthn ugexe: MoarVM HEAD has Windows prompt fix
18:00 [Coke] dogbert17: ah, cool.
18:03 [Coke] also asking in toolchain, but: I can't install Bailador with zef. it grabs all the deps, and then just exits.
18:04 [Coke] I have zef 0.1.17
18:05 [Coke] (using rakudobrew, just did a self-upgrade there and a rehash)
18:06 eveo [Coke]: what's perl6 -v ?
18:07 [Coke] This is Rakudo version 2017.05-443-g7e8bac9bc built on MoarVM version 2017.05-85-g21ee1a50
18:07 eveo m: $*PERL.compiler.version.say
18:07 camelia rakudo-moar 6f9326: OUTPUT: «v2017.05.449.g.6.f.9326877␤»
18:07 [Coke] so, pretty close.
18:07 eveo c: e4468c6 $*PERL.compiler.version.say
18:07 committable6 eveo, ¦e4468c6: «v2017.05.440.ge.4468.c.610»
18:07 eveo Yeah, you should already have the fix for yesterday's issues...
18:09 * eveo builds and tests
18:14 eveo Well, I see it successfully toasted in https://toaster.perl6.party/module?module=Bailador&amp;commit=2017.05-439-g14d7571
18:15 eveo [Coke]: ===> Install [OK] for Bailador:ver('0.0.4')
18:16 eveo On the same commit you're using.
18:16 eveo I mean ^ that's me just now trying it. And it also toasted fine.
18:16 [Coke] I can install panda. installing panda and using that to install Bailador.
18:16 eveo :S
18:16 eveo Weird
18:17 [Coke] eveo: did you get the cpan version or the github version, OOC?
18:17 [Coke] might be able to tell after the fact by ls ~/.zef/tmp/Bail* if it's .git or .tar.gz
18:18 eveo [Coke]: no idea. here's full output: https://gist.github.com/zoffixznet/795d8ed97cb9005b12fa4154e534fc1d
18:18 eveo It sas ===> Fetching [OK]: Bailador:ver('0.0.4') to /home/cpan/.zef/tmp/Bailador-0.0.4.tar.gz
18:18 eveo So I guess cpan
18:18 [Coke] right.
18:19 * eveo does the version bumps to get latest and greast moaaar
18:21 [Coke] panda missed that bailador required YAMLish
18:24 [Coke] eveo: my version of that gist basically ends after the last Fetching.
18:24 [Coke] no indication of any error, exitcode=0
18:25 [Coke] I was able to get bailador installed with panda, back to $dayjob. :|
18:29 eveo ZOFVM: Files=1254, Tests=139491, 113 wallclock secs (19.55 usr  3.19 sys + 2198.82 cusr 168.46 csys = 2390.02 CPU)
18:29 Geth ¦ nqp: 06586046cb | (Zoffix Znet)++ | tools/build/MOAR_REVISION
18:29 Geth ¦ nqp: Bump MoarVM
18:29 Geth ¦ nqp:
18:29 Geth ¦ nqp: MoarVM bump brought commits:
18:29 Geth ¦ nqp: https://github.com/MoarVM/MoarVM/compare/2017.05-85-g21ee1a5...2017.05-100-g5ea6aaa
18:29 Geth ¦ nqp:
18:29 Geth ¦ nqp: 5ea6aaa Don't barf on things we can't flush on Windows.
18:29 Geth ¦ nqp: 1f5be6a Make find_separator only look at the last chars.
18:29 Geth ¦ nqp: <…commit message has 13 more lines…>
18:29 Geth ¦ nqp: review: https://github.com/perl6/nqp/commit/06586046cb
18:29 Geth ¦ nqp: version bump brought these changes: https://github.com/MoarVM/MoarVM/compare/2017.05-85-g21ee1a5...2017.05-100-g5ea6aaa
18:30 Geth ¦ rakudo/nom: e9b30933b4 | (Zoffix Znet)++ | tools/build/NQP_REVISION
18:30 Geth ¦ rakudo/nom: Bump NQP
18:30 Geth ¦ rakudo/nom:
18:30 Geth ¦ rakudo/nom: NQP bump brought commits:
18:30 Geth ¦ rakudo/nom: https://github.com/perl6/nqp/compare/2017.05-184-gcabe421...2017.05-191-g0658604
18:30 Geth ¦ rakudo/nom:
18:30 Geth ¦ rakudo/nom: 0658604 Bump MoarVM
18:30 Geth ¦ rakudo/nom: be2279d [js] Serialize low level arrays using the REPR
18:30 Geth ¦ rakudo/nom: <…commit message has 24 more lines…>
18:30 Geth ¦ rakudo/nom: review: https://github.com/rakudo/rakudo/commit/e9b30933b4
18:30 Geth ¦ rakudo/nom: version bump brought these changes: https://github.com/perl6/nqp/compare/2017.05-184-gcabe421...2017.05-191-g0658604
18:30 eveo Time for another toaster run.
18:51 eveo "*** Error in `/home/cpan/toaster/build/nom/install/bin/moar': free(): invalid pointer: 0x000000000416b4c0 ***
18:51 eveo Crawled among the toast output :)
19:04 stmuk joined #perl6-dev
19:11 timotimo oh, good one
19:11 timotimo eveo: can you isolate that explosion?
19:12 eveo timotimo: don't think so. I don't even know which module caused it
19:17 timotimo OK
19:29 AlexDaniel joined #perl6-dev
19:29 AlexDaniel timotimo: if you want to investigate into a module explosion that has a reliable way to reproduce it, and which actually affects people… see https://rt.perl.org/Public/Bug/Display.html?id=131003
19:40 timotimo oh lord, gumbo
19:42 timotimo i'm not actually convinced moar is to blame for it exploding
19:42 timotimo but now i can try it under rr and reverse-step
19:47 eveo New toast run: https://toaster.perl6.party/  11 burns 13 unsuccs
19:47 eveo Haven't looked at whether any of them are false negatives
19:47 * eveo relocates
19:50 timotimo anyway, i'm building a fresh rakudo and see that i can install gumbo
19:53 stmuk_ joined #perl6-dev
20:03 * timotimo also reduces the nursery size
21:30 cognominal joined #perl6-dev
22:06 eveo New blog post: "Perl 6 Release Quality Assurance: Full Ecosystem Toaster": https://perl6.party/post/Perl-6-Release-Quality-Assurance-Full-Ecosystem-Toaster
22:12 samcv eveo++
22:21 jnthn eveo: I'm wondering if that crash you saw came from File::Temp; I see a few things are burned because of it
22:21 jnthn Will see if I can reproduce that tomorrow
22:21 jnthn Curiously enough, File::Temp itself installed fine
22:21 jnthn Ominously, the failure is in a test called gc_stress.t :P
22:25 MasterDuke eveo++ nice post
22:26 jnthn Nice post and even nicer tool for helping us ship better releases :)
22:27 MasterDuke jnthn: btw, do you have any suggestions for https://github.com/rakudo/rakudo/pull/1098 ?
22:30 jnthn Well, it's just one of the classic things that happens because we're implementing Perl 6 in Perl 6 :)
22:32 jnthn Maybe a non-awful general solution would be to add some kind of parameter trait
22:32 jnthn will bind-error { ... }
22:33 jnthn And then X::TypeCheck::Binding::Parameter can invoke it to get a better message
22:33 MasterDuke to Hash's key and value?
22:33 jnthn Yeah
22:33 jnthn Note that it's a trait though, not a runtime closure
22:34 jnthn So we'll have to pass in something to the block (perhaps the exception object itself)
22:34 jnthn That'd give us a general solution to this kind of problem
22:35 MasterDuke little bit more involved than the change in that PR... :)
22:36 MasterDuke think i should just close it until the general solution exists? which maybe i could do, but can't make promises
22:36 lizmat eveo++
22:37 lizmat eveo: s/similarly elimited/similarly eliminated/  ?
22:40 Geth ¦ rakudo/nom: 23d6d42d91 | (Elizabeth Mattijsen)++ | src/core/Mu.pm
22:40 Geth ¦ rakudo/nom: Make sure WHY returns *something* that can be said
22:40 Geth ¦ rakudo/nom:
22:40 Geth ¦ rakudo/nom: So, in the REPL, you can now do:
22:40 Geth ¦ rakudo/nom:
22:41 Geth ¦ rakudo/nom:   > 42.WHY
22:41 Geth ¦ rakudo/nom:   No documentation available for type 'Int'
22:41 Geth ¦ rakudo/nom:   Perhaps it can be found at https://docs.perl6.org/type/Int
22:41 Geth ¦ rakudo/nom:
22:41 Geth ¦ rakudo/nom: Meanwhile, the value returned is still Nil for every other purpose.
22:41 Geth ¦ rakudo/nom: review: https://github.com/rakudo/rakudo/commit/23d6d42d91
22:42 MasterDuke on a different topic, is anybody going to YAPC::NA 2017? i didn't manage to get $work to pay for it, but they might let me count the time as work time. or if not maybe i'll just come down for a dinner if anything like that is going on
22:43 lizmat MasterDuke: sadly, won't be able to make it :-(
22:43 jnthn MasterDuke: Yeah, I'd rather we solve the general case
22:45 MasterDuke jnthn: ok, i'll close and include your suggestion in a comment
22:46 MasterDuke lizmat: too bad, know if any of the P6 core devs are gonna make it?
22:46 jnthn lizmat: 23d6d42d91 is a great idea but does fall into the "role is not a closure" trap
22:47 lizmat MasterDuke: TimToady will be there
22:47 jnthn (Though probably will get away with it too)
22:47 lizmat argh, I see your point
22:48 lizmat jnthn: it does seem to work ?
22:48 MasterDuke lizmat: nice, now to figure out who i lent my Programming Perl to... and can i get it back before then...
22:48 jnthn Yeah, these things "work" because the scope is captured by the latest outer invocation
22:49 MasterDuke should probably ask in #perl6 also
22:49 jnthn Which basically means they work until you have two threads or recursion or something :)
22:50 lizmat jnthn: do you have any suggestion to do this properly?
22:50 lizmat having .WHY just return a Str by default breaks just about everything  :-(
22:51 jnthn lizmat: Parametric role
22:51 jnthn my role Suggestion[$type] { method ... }; Nil but Suggestion[$type] or so
22:51 lizmat ah, duh
23:02 Geth ¦ rakudo/nom: cc4d9091d7 | (Elizabeth Mattijsen)++ | src/core/Mu.pm
23:02 Geth ¦ rakudo/nom: Use a proper typed role for Mu.WHY  jnthn++
23:02 Geth ¦ rakudo/nom:
23:02 Geth ¦ rakudo/nom: See https://irclog.perlgeek.de/perl6-dev/2017-06-15#i_14739446
23:02 Geth ¦ rakudo/nom: review: https://github.com/rakudo/rakudo/commit/cc4d9091d7
23:02 lizmat jnthn: better?  ^^^
23:03 lizmat apart from the commit message: s/typed/parametric/  :-(
23:04 jnthn Yeah, that'll do it :)
23:04 lizmat ok, then that concludes my hacking for today
23:04 lizmat good night, #perl6-dev!
23:05 japhb g'night, lizmat!
23:08 jnthn 'night, lizmat
23:12 jnthn Think I'll go rest up too...hoping to get some more perf improvements in tomorrow :)
23:12 jnthn o/
23:15 japhb 'night jnthn!
23:15 japhb So happy to see perf improvements.  :-)

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