Perl 6 - the future is here, just unevenly distributed

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

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

All times shown according to UTC.

Time Nick Message
00:37 BenGoldberg joined #perl6-dev
00:41 geekosaur joined #perl6-dev
01:50 ilbot3 joined #perl6-dev
01:50 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
04:55 geekosaur joined #perl6-dev
06:44 geekosaur joined #perl6-dev
07:10 [Tux] This is Rakudo version 2017.04.3-95-g5e74017d6 built on MoarVM version 2017.04-44-gf0db8822
07:10 [Tux] csv-ip5xs        3.110
07:10 [Tux] test            13.319
07:10 [Tux] test-t           5.209 - 5.275
07:10 [Tux] csv-parser      13.083
08:08 lizmat Files=1192, Tests=56861, 210 wallclock secs (12.21 usr  4.84 sys + 1222.40 cusr 120.80 csys = 1360.25 CPU)
08:15 Geth ¦ rakudo/nom: 4 commits pushed by (Elizabeth Mattijsen)++
08:15 Geth ¦ rakudo/nom: f2fc567485 | Add R:I.MULTIPLY-MIX-TO-MIX worker method
08:15 Geth ¦ rakudo/nom: 6641df8342 | Fix thinko in R:I.MULTIPLY-MIX-TO-MIX
08:15 Geth ¦ rakudo/nom: d6cf518c91 | Add R:I.BAGGY-CLONE-RAW
08:15 Geth ¦ rakudo/nom: 226cd8b67e | Make Mixy (.) Mixy about 35x faster
08:15 Geth ¦ rakudo/nom: review: https://github.com/rakudo/rakudo/compare/5e74017d60...226cd8b67e
08:33 Geth ¦ rakudo/nom: f18d0dc04f | (Elizabeth Mattijsen)++ | src/core/Rakudo/Internals.pm
08:33 Geth ¦ rakudo/nom: Add R:I.MULTIPLY-BAG-TO-BAG worker method
08:33 Geth ¦ rakudo/nom:
08:33 Geth ¦ rakudo/nom: To be used for Baggy (.) Baggy in various places.
08:33 Geth ¦ rakudo/nom: review: https://github.com/rakudo/rakudo/commit/f18d0dc04f
08:33 Geth ¦ rakudo/nom: 3f97831d08 | (Elizabeth Mattijsen)++ | src/core/set_operators.pm
08:33 Geth ¦ rakudo/nom: Make Baggy (.) Baggy about 35x faster
08:34 Geth ¦ rakudo/nom:
08:34 Geth ¦ rakudo/nom: - with a 100 element Bag with itself
08:34 Geth ¦ rakudo/nom: - give Baggy (.) Baggy its own candidate written using nqp ops
08:34 Geth ¦ rakudo/nom: review: https://github.com/rakudo/rakudo/commit/3f97831d08
08:52 Geth ¦ rakudo/nom: 9c9ebd0bb8 | (Elizabeth Mattijsen)++ | src/core/set_operators.pm
08:52 Geth ¦ rakudo/nom: Make Map (.) Map about 2.5x faster
08:52 Geth ¦ rakudo/nom:
08:52 Geth ¦ rakudo/nom: - with a 26 element Hash with itself
08:52 Geth ¦ rakudo/nom: - give Map (.) Map its own candidate written using nqp ops
08:52 Geth ¦ rakudo/nom: review: https://github.com/rakudo/rakudo/commit/9c9ebd0bb8
09:46 astj joined #perl6-dev
09:51 geekosaur joined #perl6-dev
10:37 pmurias joined #perl6-dev
10:38 pmurias is MVM_num_neginf(tc) different from -1 * MVM_neg_inf(tc) on some platform?
10:41 pmurias * MVM_neg_posinf
11:00 geekosaur joined #perl6-dev
11:45 stmuk joined #perl6-dev
11:49 stmuk_ joined #perl6-dev
11:55 jnthn m: use Test; is (42 but role { has int $.x = 100 }).x, 100
11:55 camelia rakudo-moar 9c9ebd: OUTPUT: «Invalid BUILD_LEAST_DERIVED plan␤  in block <unit> at <tmp> line 1␤␤»
11:59 pmurias jnthn: is the str type fully specced? it's only mentioned a few times in roast and not documented
12:01 jnthn pmurias: Yeah. We have to have *some* name for the thing inside of a Str (which is a P6opaque)
12:02 jnthn So str is that
12:02 jnthn It's not particularly widely known about/used, which is probably for the best :)
12:03 jnthn But we need it inside of CORE.setting, and some string-intensive code can - for the moment at least - get some performance wins by avoiding boxing overhead.
12:03 jnthn (In the future we should get better at optimizing away boxing in many cases.)
12:04 jnthn (Though even then there will still be cases where it can be a win.)
12:04 jnthn Funny you mention it 'cus I'm about to push another spectest that mentions it :-)
12:05 pmurias I'm working on the str to num MoarVM level conversion
12:05 pmurias jnthn: is it ok if I put it into src/strings/parse_num.c (it consists of a bunch of static functions and I don't want to clutter the coerce file)
12:06 Geth ¦ rakudo/nom: 43ad0db178 | (Jonathan Worthington)++ | src/core/Mu.pm
12:06 Geth ¦ rakudo/nom: Correct a comment.
12:06 Geth ¦ rakudo/nom: review: https://github.com/rakudo/rakudo/commit/43ad0db178
12:06 Geth ¦ rakudo/nom: 6179ab344d | (Jonathan Worthington)++ | src/core/Mu.pm
12:06 Geth ¦ rakudo/nom: Fix role mixins with native attrs with defaults.
12:06 Geth ¦ rakudo/nom:
12:06 Geth ¦ rakudo/nom: So that `42 but role { has int $.x = 100 }` works.
12:06 Geth ¦ rakudo/nom: review: https://github.com/rakudo/rakudo/commit/6179ab344d
12:06 jnthn pmurias: Seems reasonable
12:07 Geth ¦ roast: d8a07bb6f4 | (Jonathan Worthington)++ | S12-attributes/defaults.t
12:07 Geth ¦ roast: Test to cover RT #131181.
12:07 Geth ¦ roast: review: https://github.com/perl6/roast/commit/d8a07bb6f4
12:07 synopsebot6 Link:  https://rt.perl.org/rt3/Public/Bug/Display.html?id=131181
12:18 geekosaur joined #perl6-dev
12:34 pmurias jnthn: do we have a codepoint/grapheme number that can't occur in a string?
12:36 Geth ¦ rakudo/nom: 1a920dcc0d | (Elizabeth Mattijsen)++ | 2 files
12:36 Geth ¦ rakudo/nom: Make all set operator helpers take nqp hashes
12:36 Geth ¦ rakudo/nom:
12:36 Geth ¦ rakudo/nom: So that we can more easily use them internally without needing to
12:36 Geth ¦ rakudo/nom: upgrade them to proper Bags/Mixes.
12:36 Geth ¦ rakudo/nom: review: https://github.com/rakudo/rakudo/commit/1a920dcc0d
12:38 dogbert17 m: say (2,(3,5)).Set
12:38 camelia rakudo-moar 6179ab: OUTPUT: «set(5, 3, 2)␤»
12:40 dogbert17 is the above correct behaviour?
12:41 lizmat dogbert17: fwiw, I have wondered that myself, but spectest breakage occurs if it doesn't flatten
12:41 lizmat m: say (2,$(3,5)).Set
12:41 camelia rakudo-moar 6179ab: OUTPUT: «set((3 5), 2)␤»
12:42 dogbert17 m: say (2,(3,5)).Bag
12:42 camelia rakudo-moar 6179ab: OUTPUT: «bag(5, 3, 2)␤»
12:42 lizmat yeah, the behaviour is consistent  :-)
12:43 lizmat but not with arrays:
12:43 lizmat m: my @a = (2,(3,5)); dd @a
12:43 camelia rakudo-moar 6179ab: OUTPUT: «Array @a = [2, (3, 5)]␤»
12:43 dogbert17 we'll it would seem to be correct then if the flattening bahviour is in roast ...
12:43 dogbert17 was looking at RT #130973
12:43 synopsebot6 Link:  https://rt.perl.org/rt3/Public/Bug/Display.html?id=130973
12:44 lizmat perhaps we need to discuss  :-)
12:44 lizmat to me it was a bit of a WAT as well
12:44 dogbert17 :)
12:45 lizmat specifically because STORE doesn't flatten
12:45 lizmat and setifying could be considered a way of STORE
12:46 dogbert17 I couldn't say which bahaviour is the correct one but at least there should consistency (as you wrote) no?
12:46 * dogbert17 grr it's spelt behaviour
12:48 dogbert17 some input from jnthn or TimToady would be nice :)
12:50 * dogbert17 or would it be preferable to specify what behaviour the user want, e.g. (1,(2,3)).Set(:no-flat)
12:51 MasterDuke_ wouldn't that just be (1,(2,3)).flat.Set?
12:52 dogbert17 dunno, suppose you want the result to be 'Set(1, (2,3))
12:53 MasterDuke_ er, i kind of said it backwards
12:54 MasterDuke_ i would have expected Set(1, (2,3)) unless i chose to put the .flat
12:54 dogbert17 sounds reasonable
12:57 dogbert17 m: say ("Zoffix", <Frameless Broken-Robot>).Mix
12:57 camelia rakudo-moar 1a920d: OUTPUT: «mix(Broken-Robot, Zoffix, Frameless)␤»
12:59 * dogbert17 continues browsing RT looking for some LHF
13:04 Zoffix m: say mix("Zoffix", <Frameless Broken-Robot>)
13:04 camelia rakudo-moar 1a920d: OUTPUT: «mix(Broken-Robot, Zoffix, Frameless)␤»
13:05 dogbert17 Hi Zoffix
13:06 Zoffix m: ("Zoffix", <Frameless Broken-Robot>)».item.Mix.say
13:06 camelia rakudo-moar 1a920d: OUTPUT: «mix(Zoffix, (Frameless Broken-Robot))␤»
13:07 * Zoffix is -1 on `:no-flat` arg; we have methods to do that functionality
13:08 * dogbert17 shot down in flames /o :)
13:08 dogbert17 it means you disagree with RT #130973
13:08 synopsebot6 Link:  https://rt.perl.org/rt3/Public/Bug/Display.html?id=130973
13:08 Zoffix And nested lists are a pretty common sight, whereas wanting a set of lists is kind'f rarish
13:09 Zoffix m: say join '|', ("Zoffix", <Frameless Broken-Robot>)
13:09 camelia rakudo-moar 1a920d: OUTPUT: «Zoffix|Frameless|Broken-Robot␤»
13:09 Zoffix m: ("Zoffix", <Frameless Broken-Robot>).join('|').say
13:09 camelia rakudo-moar 1a920d: OUTPUT: «Zoffix|Frameless Broken-Robot␤»
13:10 Zoffix And now I wonder if I have a bug somewhere in my code, because I thought both forms flattened /o\
13:10 dogbert17 uh oh
13:10 Zoffix dogbert17: isn't it roast who disagrees with that ticket? (based on what was said above)
13:11 dogbert17 yeah, according to lizmat changing the flattening should break some tests
13:12 MasterDuke_ i thought perl 6 got rid of most auto-flattening
13:12 Zoffix m: ("Zoffix", <Frameless Broken-Robot>).Array.Mix.say # even simpler way
13:13 camelia rakudo-moar 1a920d: OUTPUT: «mix(Zoffix, (Frameless Broken-Robot))␤»
13:13 dogbert17 so it's at least simple to get the non flattening behaviour if that's what you want
13:17 dogbert17 Zoffix: so what, if anything, will you do with 'join'
13:17 Zoffix Nothing. Will just remember that only sub form flattens :)
13:19 dogbert17 that is at least consistent with the docs :)
13:24 MasterDuke_ speaking of consistency...
13:24 MasterDuke_ m: class Bar { subset Positive of Int where * >= 0; has Positive $.y; submethod TWEAK(Positive :$x = 0) { $!y = $x } }; Bar.new(x => 3).perl.say; Bar.new(x => -3).perl.say
13:24 camelia rakudo-moar 1a920d: OUTPUT: «Bar.new(y => 3)␤Constraint type check failed in binding to parameter '$x'; expected Bar::Positive but got Int (-3)␤  in submethod TWEAK at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
13:24 MasterDuke_ m: class Bar { subset Positive of Int where * >= 0; has Positive $.y; submethod BUILD(:$x = 0) { $!y = $x } }; Bar.new(x => -3).perl.say
13:24 camelia rakudo-moar 1a920d: OUTPUT: «Type check failed in assignment to $!y; expected Bar::Positive but got Int (-3)␤  in submethod BUILD at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
13:25 MasterDuke_ i noticed this over in #perl6. see the difference between the two errors? `parameter '$x'` vs `assignment to $!y`
13:26 MasterDuke_ i've noticed this other places as well. should we attempt to have consistency in how things like variable names, sub/method names, etc. are quoted or not in errors?
13:44 Zoffix ZOFVM: Files=1242, Tests=133839, 113 wallclock secs (21.57 usr  2.79 sys + 2333.10 cusr 144.71 csys = 2502.17 CPU)
13:49 Geth ¦ rakudo/nom: 475d9bcf9b | (Zoffix Znet)++ | src/core/IO/Path.pm
13:49 Geth ¦ rakudo/nom: [io grant] Fix display of backslashes in IO::Path.gist
13:49 Geth ¦ rakudo/nom:
13:49 Geth ¦ rakudo/nom: While in Str.gist we render, say, 「\fo\bo」 as just `\fo\bo`, with
13:49 Geth ¦ rakudo/nom: IO::Path.gist we show the value within double quotes and .IO coercer
13:49 Geth ¦ rakudo/nom: appended. This makes it a bit confusing, since backslashes do things
13:49 Geth ¦ rakudo/nom: when they're in double quotes.
13:49 Geth ¦ rakudo/nom:
13:49 Geth ¦ rakudo/nom: Fix by using `.perl` of the Strs.
13:49 Geth ¦ rakudo/nom: review: https://github.com/rakudo/rakudo/commit/475d9bcf9b
13:50 Geth ¦ roast: fd308be0fd | (Zoffix Znet)++ | S32-io/io-path.t
13:50 Geth ¦ roast: Move path types into file-global constant
13:50 Geth ¦ roast:
13:50 Geth ¦ roast: So all the tests can use them.
13:50 Geth ¦ roast: review: https://github.com/perl6/roast/commit/fd308be0fd
13:51 Geth ¦ roast: 95d68a2e6c | (Zoffix Znet)++ | S32-io/io-path.t
13:51 Geth ¦ roast: [io grant] Test IO::Path.gist does escapes of backslashes
13:51 Geth ¦ roast:
13:51 Geth ¦ roast: Rakudo impl: https://github.com/rakudo/rakudo/commit/475d9bcf9b
13:51 Geth ¦ roast: review: https://github.com/perl6/roast/commit/95d68a2e6c
13:51 Zoffix mmmm
13:52 Zoffix Don't like it.
13:52 Zoffix All Windows users will see backslash galore.
13:55 MasterDuke_ does that effect https://rt.perl.org/Ticket/Display.html?id=130226 at all?
13:55 Zoffix 「foo\bar」.IO would be nice, but those chars aren't rendering in default cmd.exe :/
13:55 Zoffix MasterDuke_: don't think so
13:55 timotimo then you could use Q[...]
13:55 timotimo and only escape ]
13:56 timotimo m: say Q[foo\bar\]baz].perl
13:56 camelia rakudo-moar 1a920d: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Two terms in a row␤at <tmp>:1␤------> 3say Q[foo\bar\]7⏏5baz].perl␤    expecting any of:␤        infix␤        infix stopper␤        postfix␤        statement end␤        statement mo…»
13:56 timotimo or not
13:56 timotimo m: say Q[foo\bar\q(])baz].perl
13:56 camelia rakudo-moar 1a920d: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Unexpected closing bracket␤at <tmp>:1␤------> 3say Q[foo\bar\q(]7⏏5)baz].perl␤»
13:56 Zoffix It doesn't need to be executable
13:56 Zoffix Just clear
13:56 timotimo oh, gist!
13:56 timotimo yes, yes
13:57 Zoffix IO(foo\bar)  ?
13:57 Zoffix no quotes
13:59 Zoffix eh, leave it as is.
13:59 Geth ¦ roast: de89d25536 | (Zoffix Znet)++ | S32-io/io-path.t
13:59 Geth ¦ roast: Revert "[io grant] Test IO::Path.gist does escapes of backslashes"
13:59 Geth ¦ roast:
13:59 Geth ¦ roast: This reverts commit 95d68a2e6cd01a8ef03d4d4a3bec239fc7838ac3.
13:59 Geth ¦ roast: review: https://github.com/perl6/roast/commit/de89d25536
13:59 Geth ¦ rakudo/nom: 6ef2abdfc0 | (Zoffix Znet)++ | src/core/IO/Path.pm
13:59 Geth ¦ rakudo/nom: Revert "[io grant] Fix display of backslashes in IO::Path.gist"
13:59 Geth ¦ rakudo/nom:
13:59 Geth ¦ rakudo/nom: This reverts commit 475d9bcf9bf00e858feeefb28a42e2050ee4b51d.
13:59 Geth ¦ rakudo/nom: review: https://github.com/rakudo/rakudo/commit/6ef2abdfc0
14:10 geekosaur joined #perl6-dev
14:15 Geth ¦ roast: 9e8b154f43 | (Zoffix Znet)++ | S32-io/io-handle.t
14:15 Geth ¦ roast: [io grant] Test IO::Handle.close can be...
14:15 Geth ¦ roast:
14:15 Geth ¦ roast: ...non-explosively called on an already closed handle.
14:15 Geth ¦ roast: review: https://github.com/perl6/roast/commit/9e8b154f43
14:34 Zoffix Is it possible to lose data if you don't .close your handle?
14:34 Zoffix Doesn't look like we buffer anything ATM, so it's kinda hard to check :/
14:49 jnthn In theory, yes
14:51 Zoffix hm. OK :)
14:52 * Zoffix amends .close docs
14:53 jnthn Though running out of handles is also reason enough to take care to close things :)
14:54 Zoffix Yeah
16:32 Zoffix m: class Foo { method close { say "closed" } }; for ^3 { my $fh will leave {.close} = Foo.new }
16:32 camelia rakudo-moar 6ef2ab: OUTPUT: «closed␤closed␤closed␤»
16:32 Zoffix m: class Foo { method close { say "closed" } }; for ^3 { my $fh will leave *.close = Foo.new }
16:32 camelia rakudo-moar 6ef2ab: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Missing block␤at <tmp>:1␤------> 3"closed" } }; for ^3 { my $fh will leave7⏏5 *.close = Foo.new }␤    expecting any of:␤        block or pointy block␤»
16:32 Zoffix gottabeablock?
16:34 Zoffix ZofBot: once you go block you never go back
16:34 ZofBot Zoffix, minmax(&by); # default &infix:<cmp> Produces a "Supply" that, for each value emitted, produces "Range"s with the minimum and maximum values seen thus far on the specified "Supply"
16:39 Geth ¦ roast: 853f76f719 | (Zoffix Znet)++ | S32-io/pipe.t
16:39 Geth ¦ roast: [io grant] Test IO::Pipe.close returns pipe's Proc
16:39 Geth ¦ roast: review: https://github.com/perl6/roast/commit/853f76f719
18:04 Zoffix ZofBot: rock it with me \o/ https://www.youtube.com/watch?v=09U69zGLXwE
18:04 ZofBot Zoffix, Zoffix: yes
18:04 Zoffix Good bot!
18:32 * Zoffix just learned to play the start of that song ????????????
18:32 Zoffix Not as good with one guitar :/
18:32 Zoffix ZofBot: learn to play an instrument, you bum.
18:32 ZofBot Zoffix, rakudo-moar 9cb26c: OUTPUT: «Bool::False␤»
18:32 Zoffix heh
18:39 samcv morning everyone
18:39 ZofBot joined #perl6-dev
18:39 Zoffix morning
18:54 Zoffix A while back I said `my Mu $foo` was pointless since variables are Mu anyway, but it's not pointless, it changes the `is default`
18:54 Zoffix m: my Mu $x; dd $x
18:54 camelia rakudo-moar 6ef2ab: OUTPUT: «Mu $x = Mu␤»
18:54 Zoffix m: my $x; dd $x
18:54 camelia rakudo-moar 6ef2ab: OUTPUT: «Any $x = Any␤»
19:27 geekosaur joined #perl6-dev
19:39 Zoffix m: -> +a { dd a.elems }( %(:42a, :72b, :55z) )
19:39 camelia rakudo-moar 6ef2ab: OUTPUT: «3␤»
19:39 Zoffix Is it supposed to behave this way?
19:39 Zoffix Feels like we're mis-using nqp::istype(..., Iterable) somewhere.
19:39 Zoffix or more precisely:
19:40 Zoffix m: -> +a { dd a; dd a.^name; dd a.elems }( %(:42a, :72b, :55z) )
19:40 camelia rakudo-moar 6ef2ab: OUTPUT: «(:z(55), :a(42), :b(72))␤"List"␤3␤»
19:40 Zoffix It ends up being a list of Pairs instead of a 1-el list with a Hash
19:55 pmurias joined #perl6-dev
19:55 pmurias does any of :ratchet, :sigspace, :ignorecase, :ignoremark or :dba allow a number argument?
19:56 pmurias m: my token foo { :777ignorecase } # example of argument
19:56 camelia rakudo-moar 6ef2ab: ( no output )
19:56 pmurias if none of them allow it, I'll remove this anti-feature
19:57 Zoffix pmurias: don't know about :dba, but rest of them "yes" but only in a sense that they're Bool and Bool is an Int
19:57 Zoffix m: say 'foo' ~~ m:ignorecase/FOO/
19:57 camelia rakudo-moar 6ef2ab: OUTPUT: «「foo」␤»
19:57 Zoffix m: say 'foo' ~~ m:ignorecase(0)/FOO/
19:57 camelia rakudo-moar 6ef2ab: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Adverb ignorecase value must be known at compile time␤at <tmp>:1␤------> 3say 'foo' ~~ m:ignorecase(0)7⏏5/FOO/␤»
19:57 Zoffix ... it is bruh :/
19:58 AlexDaniel joined #perl6-dev
19:58 Zoffix m: my token foo { :1ignorecase FOO }; say 'foo' ~~ &foo
19:58 camelia rakudo-moar 6ef2ab: OUTPUT: «「foo」␤»
19:58 Zoffix m: my token foo { :0ignorecase FOO }; say 'foo' ~~ &foo
19:58 camelia rakudo-moar 6ef2ab: OUTPUT: «Nil␤»
19:58 Zoffix m: my token foo { :0ignorecase foo }; say 'foo' ~~ &foo
19:58 camelia rakudo-moar 6ef2ab: OUTPUT: «「foo」␤»
19:58 Zoffix There we go
20:00 pmurias Zoffix: I forgot about :1 and :0 :(
20:00 Zoffix Maybe I'm wrong though. I was thinking of named args to Str.match. If these need to be known at compile time and it refuses to take :colon(form), then they're not even Bool but maybe just `int`s
20:03 AlexDaniel timotimo++ # trisectable XD
20:08 Zoffix Note to self: nqp::until(:nohandler, …) is not the same thing as nqp::until(…, :nohandler) :/
20:17 Zoffix \o/ I cracked the andthen->orelse chaining issue \o/
20:18 Zoffix m: say (Date.today - Date.new('2016-11-10'))/30
20:18 camelia rakudo-moar 6ef2ab: OUTPUT: «5.666667␤»
20:18 Zoffix Took almost 6 months, but went from hopelessness to a tidy solution :)
20:21 nine Zoffix++ # perseverance :)
20:25 Zoffix And as a cherry on top, `orelse` is also 2.4x faster
20:25 timotimo AlexDaniel: i'm the master of names :)
20:44 Geth ¦ rakudo/nom: 37316f8220 | (Zoffix Znet)++ | src/core/operators.pm
20:44 Geth ¦ rakudo/nom: Fix andthen-orelse chaining; make orelse 2.4x faster
20:44 Geth ¦ rakudo/nom:
20:44 Geth ¦ rakudo/nom: Fixes RT#130798: https://rt.perl.org/Ticket/Display.html?id=130798
20:44 Geth ¦ rakudo/nom:
20:44 Geth ¦ rakudo/nom: The OP issue in the ticket is due to `Empty` from andthen messing
20:44 Geth ¦ rakudo/nom: up positions of args in orelse, making the thunked args shift
20:44 synopsebot6 Link:  https://rt.perl.org/rt3/Public/Bug/Display.html?id=130798
20:44 Geth ¦ rakudo/nom: up and be returned as blocks instead of evaled.
20:44 Geth ¦ rakudo/nom: <…commit message has 6 more lines…>
20:44 Geth ¦ rakudo/nom: review: https://github.com/rakudo/rakudo/commit/37316f8220
20:45 Geth ¦ roast: 59d56a4cc1 | (Zoffix Znet)++ | S03-operators/orelse.t
20:45 Geth ¦ roast: Test andthen+orelse+orelse chaining
20:45 Geth ¦ roast:
20:45 Geth ¦ roast: RT#130798: https://rt.perl.org/Ticket/Display.html?id=130798
20:45 Geth ¦ roast: Rakudo fix: https://github.com/rakudo/rakudo/commit/37316f8220
20:45 Geth ¦ roast: review: https://github.com/perl6/roast/commit/59d56a4cc1
20:45 synopsebot6 Link:  https://rt.perl.org/rt3/Public/Bug/Display.html?id=130798
20:50 Zoffix ZOFVM: Files=1242, Tests=133841, 106 wallclock secs (18.68 usr  3.36 sys + 2057.14 cusr 216.04 csys = 2295.22 CPU)
21:08 nine Working on in-process precompilation again. Seems like the break was actually helpful, as while trying to find out where I left off, I realized that my issue is not objects leaking into the precompilation, but objects leaking out.
21:08 timotimo oh, interesting!
21:09 nine This means that when I get an error during precompilation, I just have to try again and it will get further as it can use the already precompiled files.
21:09 nine Intriguingly at least one of the issues may be connected with multis.
21:09 nine Test is: echo 'use B;' > A.pm && echo 'unit class Foo; multi method new() {}' > B.pm && rm -Rf .precomp && perl6 -I. -MA -e ''
21:10 nine If i just remove the "multi" it works fine
21:12 nine It also works if I manually create the proto!
21:23 nine Indeed. When I add the missing protos in NativeCall::Types, I can compile and load all of NativeCall in a single process
21:30 jnthn That's...intriuging, though I don't immediately have any guesses
21:31 jnthn Proto auto-generation is implemented in terms of generic instantiation
21:31 jnthn Though from a pre-comp perspective I'm not immediately seeing why that's not just a comparatively boring bit of meta-programming.
21:36 Geth ¦ rakudo/nom: 3c8822e80d | (Zoffix Znet)++ | src/core/operators.pm
21:36 Geth ¦ rakudo/nom: Fix Empty as arg to andthen; make andthen 2.5x faster
21:36 Geth ¦ rakudo/nom:
21:36 Geth ¦ rakudo/nom: Postfix `with` compiles to andthen and fix+speedup applies to it too.
21:36 Geth ¦ rakudo/nom:
21:36 Geth ¦ rakudo/nom: Empty as arg disappears in the `+@foo` slurpy, so we use
21:36 Geth ¦ rakudo/nom: nqp::p6argvarray op and emulate `+@foo` slurpy to avoid Empty
21:36 Geth ¦ rakudo/nom: dissappearance.
21:36 Geth ¦ rakudo/nom:
21:36 Geth ¦ rakudo/nom: Fixes issues mentioned in comments on RT#130798:
21:36 synopsebot6 Link:  https://rt.perl.org/rt3/Public/Bug/Display.html?id=130798
21:36 Geth ¦ rakudo/nom: https://rt.perl.org/Ticket/Display.html?id=130798
21:36 Geth ¦ rakudo/nom: review: https://github.com/rakudo/rakudo/commit/3c8822e80d
21:37 Geth ¦ roast: 8993a2434b | (Zoffix Znet)++ | S03-operators/andthen.t
21:37 Geth ¦ roast: Test `Empty` as arg to andthen/postfix with
21:37 Geth ¦ roast:
21:37 Geth ¦ roast: RT#130798: https://rt.perl.org/Ticket/Display.html?id=130798
21:37 Geth ¦ roast: Rakudo fix: https://github.com/rakudo/rakudo/commit/3c8822e80d
21:37 synopsebot6 Link:  https://rt.perl.org/rt3/Public/Bug/Display.html?id=130798
21:37 Geth ¦ roast: review: https://github.com/perl6/roast/commit/8993a2434b
21:46 BenGoldberg joined #perl6-dev
21:47 Zoffix m: use nqp; sub foo (+a) { my $a = nqp::atpos(nqp::p6argvmarray(), 0); dd $a[0]; dd a[0] }; foo %(:42a, :72b)
21:47 camelia rakudo-moar 37316f: OUTPUT: «Hash % = {:a(42), :b(72)}␤:a(42)␤»
21:47 Zoffix dammit
21:48 Zoffix m: dd [orelse] %(:42a, :72b)
21:48 camelia rakudo-moar 37316f: OUTPUT: «:a(42)␤»
21:48 Zoffix m: dd infix:<orelse>( %(:42a, :72b) )
21:48 camelia rakudo-moar 37316f: OUTPUT: «Hash % = {:a(42), :b(72)}␤»
21:49 Zoffix star: dd infix:<orelse>( %(:42a, :72b) )
21:49 camelia star-m 2016.10: OUTPUT: «:a(42)␤»
21:50 Zoffix Well, not really "dammit". It changed from how +@foo was handling it, but I think it's +@foo is wrong :/
21:51 Zoffix .ask jnthn is it normal that +a slurpy breaks up hashes into a list of pairs? e.g. -> +a { dd a; dd a.^name; dd a.elems }( %(:42a, :72b, :55z) )  gives «(:z(55), :a(42), :b(72))␤"List"␤3␤» I would've expected «(%(:z(55), :a(42), :b(72)),)␤"Hash"␤1␤»
21:51 yoleaux Zoffix: I'll pass your message to jnthn.
21:53 Zoffix m: -> *@a { dd @a }( %(:42a, :72b, :55z), 42 )
21:53 camelia rakudo-moar 3c8822: OUTPUT: «[:z(55), :a(42), :b(72), 42]␤»
21:53 Zoffix Same with *@a slurpy...
21:53 Zoffix I guess it's supposed to be this way...
21:54 geekosaur joined #perl6-dev
21:55 Zoffix .tell jnthn never mind; I see *@a does it too. I guess it's normal, since Hash is Iterable... just weird.
21:55 yoleaux Zoffix: I'll pass your message to jnthn.
21:57 Zoffix ummm... but Hashes are unordered :o
22:02 jnthn Yes, it's being Iterable that matters
22:02 yoleaux 21:51Z <Zoffix> jnthn: is it normal that +a slurpy breaks up hashes into a list of pairs? e.g. -> +a { dd a; dd a.^name; dd a.elems }( %(:42a, :72b, :55z) )  gives «(:z(55), :a(42), :b(72))␤"List"␤3␤» I would've expected «(%(:z(55), :a(42), :b(72)),)␤"Hash"␤1␤»
22:02 yoleaux 21:55Z <Zoffix> jnthn: never mind; I see *@a does it too. I guess it's normal, since Hash is Iterable... just weird.
22:02 jnthn **@a and |c are the ones that don't do it
22:03 jnthn Those just collect arguments as they are
22:03 Zoffix noted. Thanks.
22:06 nine Ah, looks like there _is_ still a leaking in issue as well, as I've just got a NativeCall::Types precomp file depending on Inline::Perl5::Interpreter
22:10 Geth ¦ rakudo/nom: e1994d94d8 | (Zoffix Znet)++ | src/core/operators.pm
22:10 Geth ¦ rakudo/nom: Fix 1-arg Hash cases for andthen and orelse
22:10 Geth ¦ rakudo/nom:
22:10 Geth ¦ rakudo/nom: The fixes in previous commits[^1][^2] did not emulate the +@foo slurpy
22:10 Geth ¦ rakudo/nom: correctly for the cases where 1-arg non-Positional, non-Seq Iterable
22:10 Geth ¦ rakudo/nom: (like a Hash) was given.
22:10 Geth ¦ rakudo/nom:
22:10 Geth ¦ rakudo/nom: Fix by .List-ifying that case.
22:10 Geth ¦ rakudo/nom:
22:10 Geth ¦ rakudo/nom: [1] https://github.com/rakudo/rakudo/commit/3c8822e80d39c6c37d1059517e
22:10 Geth ¦ rakudo/nom: [2] https://github.com/rakudo/rakudo/commit/37316f822005e88080774c0998
22:10 Geth ¦ rakudo/nom: review: https://github.com/rakudo/rakudo/commit/e1994d94d8
22:10 Geth ¦ roast: e036c4e287 | (Zoffix Znet)++ | 2 files
22:10 Geth ¦ roast: Test 1-arg Hash case for andthen and orelse
22:10 Geth ¦ roast:
22:10 Geth ¦ roast: Rakudo fix: https://github.com/rakudo/rakudo/commit/e1994d94d8
22:10 Geth ¦ roast: review: https://github.com/perl6/roast/commit/e036c4e287
22:11 BenGoldberg m: dd Empty;
22:11 camelia rakudo-moar 3c8822: OUTPUT: «Empty␤»
22:12 BenGoldberg m: dd { Empty }();
22:12 camelia rakudo-moar 3c8822: OUTPUT: «Empty␤»
22:13 BenGoldberg m: dd $_ for { Empty }();
22:13 camelia rakudo-moar 3c8822: ( no output )
22:17 Zoffix Empty is slip()
22:27 Zoffix ZOFFLOP: t/spec/S17-promise/start.t
22:31 Geth ¦ rakudo/nom: fdb2b2abad | (Zoffix Znet)++ | src/core/operators.pm
22:31 Geth ¦ rakudo/nom: Fix Empty given to notandthen; make notandthen 2.5x faster
22:31 Geth ¦ rakudo/nom:
22:31 Geth ¦ rakudo/nom: postfix `without` compiles to notandthen, so fix and speedup affects
22:31 Geth ¦ rakudo/nom: it as well.
22:31 Geth ¦ rakudo/nom:
22:31 Geth ¦ rakudo/nom: Empty as arg disappears in the `+@foo` slurpy, so we use
22:31 Geth ¦ rakudo/nom: nqp::p6argvarray op and emulate `+@foo` slurpy to avoid Empty
22:31 Geth ¦ rakudo/nom: dissappearance.
22:31 Geth ¦ rakudo/nom: review: https://github.com/rakudo/rakudo/commit/fdb2b2abad
22:31 Geth ¦ roast: 50b54916db | (Zoffix Znet)++ | S03-operators/notandthen.t
22:31 Geth ¦ roast: Test Empty given as arg to notandthen
22:31 Geth ¦ roast:
22:31 Geth ¦ roast: Rakudo fix: https://github.com/rakudo/rakudo/commit/fdb2b2abad
22:31 Geth ¦ roast: review: https://github.com/perl6/roast/commit/50b54916db
22:33 Zoffix eh, we have really poor tests for these. Just spotted another bug I introduced into all three ops and none of the tests caught it
22:33 Zoffix Well, poor-ish, I guess, it's 1-arg case it's busted up on
22:48 Geth ¦ rakudo/nom: 1ed76a9034 | (Zoffix Znet)++ | src/core/operators.pm
22:48 Geth ¦ rakudo/nom: Fix andthen, notandthen, and orelse for 1-arg Iterable case
22:48 Geth ¦ rakudo/nom:
22:48 Geth ¦ rakudo/nom: Be sure we update the $els var after we swap the 1-arg iterable
22:48 Geth ¦ rakudo/nom: to be our list of args.
22:48 Geth ¦ rakudo/nom: review: https://github.com/rakudo/rakudo/commit/1ed76a9034
22:48 Geth ¦ roast: 200a4e8fb1 | (Zoffix Znet)++ | 3 files
22:48 Geth ¦ roast: Test 1-arg Iterable arg to andthen, notandthen, and orelse
22:48 Geth ¦ roast:
22:48 Geth ¦ roast: Rakudo fix: https://github.com/rakudo/rakudo/commit/1ed76a9034
22:48 Geth ¦ roast: review: https://github.com/perl6/roast/commit/200a4e8fb1
22:49 Zoffix ZofBot: no andthen! I refuse to play your Chinese food mind games!
22:49 ZofBot Zoffix, spurt() sub spurt ($where, $what, Str :$enc = $*ENC, Bool :append = False, Bool :$createonly = False, --> Bool ) is export Writes the indicated contents (2nd positional parameter) to the location indicated by the first p
22:49 * Zoffix calls it a day
22:49 Zoffix \o
22:49 jnthn o/ Zoffix++
22:51 ZofBot joined #perl6-dev
22:57 AlexDani` joined #perl6-dev

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