Perl 6 - the future is here, just unevenly distributed

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

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

All times shown according to UTC.

Time Nick Message
01:14 vendethiel joined #perl6-dev
01:19 astj joined #perl6-dev
01:22 astj joined #perl6-dev
01:48 ilbot3 joined #perl6-dev
01:48 Topic for #perl6-dev is now Perl 6 language and compiler development 2.0 | Logs at http://irclog.perlgeek.de/perl6-dev/today
02:41 agentzh joined #perl6-dev
03:09 astj_ joined #perl6-dev
03:15 vendethiel joined #perl6-dev
03:52 Geth ¦ rakudo: LLFourn++ created pull request #1056: Pass the argument to Code.ACCEPTS raw (RT #131106)
03:52 Geth ¦ rakudo: review: https://github.com/rakudo/rakudo/pull/1056
03:52 synopsebot6 Link:  https://rt.perl.org/rt3/Public/Bug/Display.html?id=131106
04:02 Geth ¦ roast: LLFourn++ created pull request #260: Tests for RT #131106
04:02 Geth ¦ roast: review: https://github.com/perl6/roast/pull/260
04:15 Geth ¦ roast: LLFourn++ created pull request #261: Tests for RT #131106
04:15 Geth ¦ roast: review: https://github.com/perl6/roast/pull/261
04:54 astj joined #perl6-dev
05:46 RabidGravy joined #perl6-dev
06:23 [Tux] This is Rakudo version 2017.03-141-gad01ed767 built on MoarVM version 2017.03-88-g21fc7a22
06:23 [Tux] csv-ip5xs        3.113
06:23 [Tux] test            12.517
06:23 [Tux] test-t           4.949 - 4.955
06:23 [Tux] csv-parser      13.036
06:37 geekosaur joined #perl6-dev
08:03 lizmat Files=1184, Tests=56200, 199 wallclock secs (11.98 usr  4.54 sys + 1183.56 cusr 112.35 csys = 1312.43 CPU)
08:15 Geth ¦ rakudo/nom: c0eb9bd10f | LLFourn++ | src/core/Code.pm
08:15 Geth ¦ rakudo/nom: Pass the argument to Code.ACCEPTS raw (RT #131106)
08:15 Geth ¦ rakudo/nom:
08:15 Geth ¦ rakudo/nom: before this:
08:15 Geth ¦ rakudo/nom:
08:15 Geth ¦ rakudo/nom: my $foo = "foo";
08:15 Geth ¦ rakudo/nom: my \t = (* =:= $foo);
08:15 Geth ¦ rakudo/nom: say $foo ~~ t; # False
08:16 Geth ¦ rakudo/nom: say t.($foo); # True
08:16 Geth ¦ rakudo/nom: review: https://github.com/rakudo/rakudo/commit/c0eb9bd10f
08:16 Geth ¦ rakudo/nom: 5704e5fea4 | lizmat++ | src/core/Code.pm
08:16 Geth ¦ rakudo/nom: Merge pull request #1056 from LLFourn/RT131106
08:16 Geth ¦ rakudo/nom:
08:16 Geth ¦ rakudo/nom: Pass the argument to Code.ACCEPTS raw (RT #131106)
08:16 Geth ¦ rakudo/nom: review: https://github.com/rakudo/rakudo/commit/5704e5fea4
09:18 Geth ¦ roast: c0870cab72 | (Lloyd Fournier)++ | S02-types/whatever.t
09:18 Geth ¦ roast: Tests for RT #131106 (#261)
09:18 Geth ¦ roast: review: https://github.com/perl6/roast/commit/c0870cab72
10:36 Geth ¦ rakudo/nom: 4683e838b6 | (Elizabeth Mattijsen)++ | src/core/Map.pm
10:36 Geth ¦ rakudo/nom: Make coercion of Map to Set(|Hash) about 8x faster
10:36 Geth ¦ rakudo/nom:
10:36 Geth ¦ rakudo/nom: - give Map its own .Set/.SetHash
10:36 Geth ¦ rakudo/nom: - iterates directly over the hash
10:37 Geth ¦ rakudo/nom: - rewritten using nqp ops
10:37 Geth ¦ rakudo/nom: review: https://github.com/rakudo/rakudo/commit/4683e838b6
10:43 vendethiel- joined #perl6-dev
11:43 astj joined #perl6-dev
12:23 astj joined #perl6-dev
12:27 Zoffix m: my int $x = int.Range.max; dd $x
12:27 camelia rakudo-moar 4683e8: OUTPUT: «9223372036854775807␤»
12:27 Zoffix m: my uint $x = uint.Range.max; dd $x
12:27 camelia rakudo-moar 4683e8: OUTPUT: «-1␤»
12:27 Zoffix s: uint.Range, 'max', \()
12:29 MasterDuke Zoffix: that's one of the things i'm (slowly) working on
12:30 Zoffix MasterDuke: ah, so the number *is* right, it just can't fit it?
12:30 MasterDuke yeah
12:30 Zoffix OK
12:30 MasterDuke m: dd uint.Range.max;
12:30 camelia rakudo-moar 4683e8: OUTPUT: «18446744073709551615␤»
12:31 MasterDuke m: dd 2**64-1
12:31 camelia rakudo-moar 4683e8: OUTPUT: «18446744073709551615␤»
12:31 MasterDuke that's the correct max
12:31 Zoffix m: my uint $x = 18446744073709551614; dd $x
12:31 camelia rakudo-moar 4683e8: OUTPUT: «-2␤»
12:31 Zoffix :S
12:32 Zoffix ok, so it's just an int.
12:33 Zoffix well, fits just an int
12:34 MasterDuke it's complicated, but yeah. the bits are kind of being interpreted as an int, instead of uint
12:37 MasterDuke Zoffix: are you interested in fixing it? if so i can fill you in on what i+timotimo have done/tried so far
12:39 Zoffix MasterDuke: nah, I'm merely using a large int to fake infinity
12:39 MasterDuke k
12:54 Zoffix m: use nqp; my int $x = int.Range.max; dd nqp::isbig_I(nqp::decont($x))
12:54 camelia rakudo-moar 4683e8: OUTPUT: «1␤»
12:54 * Zoffix wonders what isbig_I is all about
12:55 Zoffix or rather what's its relation to `int` is... I thought it was a way to tell when a stuff can't fit into `int` so you have to do with it with `Int`
12:55 lizmat Zoffix: I think the isbig_I gets triggered on the 32bit boundary atm
12:56 Zoffix Ah. Indeed. Thanks.
12:59 Geth ¦ rakudo/nom: f532f815a7 | (Elizabeth Mattijsen)++ | src/core/Iterable.pm
12:59 Geth ¦ rakudo/nom: Make Iterable.flat about 20% faster
12:59 Geth ¦ rakudo/nom:
12:59 Geth ¦ rakudo/nom: - for a Seq based on a 100 element Array
12:59 Geth ¦ rakudo/nom: review: https://github.com/rakudo/rakudo/commit/f532f815a7
13:04 Zoffix We don't have an nqp::if-type sort of op, do we?   To replicate this without a variable: nqp::if( nqp::istype(($_ := something), Something), $_, 42 )
13:06 lizmat .tell jnthn looking at https://github.com/rakudo/rakudo/blob/nom/src/core/Iterable.pm#L82  , I'm not sure how Iterable.lazy actually works.  Feels to me at least the comments are incorrect
13:06 yoleaux2 lizmat: I'll pass your message to jnthn.
13:06 lizmat Zoffix: that's how I usually do it: if there's another way, I'd like to know  :)
13:14 lizmat .tell jnthn I also don't grok why Iterable.lazy is not initialized with the iterator to start with
13:14 yoleaux2 lizmat: I'll pass your message to jnthn.
13:25 Zoffix That's it. nqp broke me
13:25 * Zoffix switches to 2-space tabs
13:26 * lizmat does nqp with 2 space, and HLL with 4 space
13:27 Zoffix I've no idea how to eaily switch tab width in atom :/
13:28 Zoffix *easilyt
13:39 pmurias joined #perl6-dev
13:44 Zoffix All 265 tests for new and extended IO::Path.extension pass \o/
13:44 Zoffix It's 16 times slower /o\
13:44 Zoffix :)
13:44 Zoffix Oh wait, 9.22x slower
13:44 timotimo whoops
13:45 Zoffix Luckily most of it is the UInt constraint. Just switching that to Int makes it only 2.14x slower
13:45 * Zoffix starts optimizing stuff
13:54 Zoffix m: my subset UInt2 of Int where {not .defined or $_ >= 0}; for ^100_000 { $ = 42 ~~ UInt2 }; say now - INIT now;
13:54 camelia rakudo-moar f532f8: OUTPUT: «0.56012696␤»
13:55 Zoffix m: my subset UInt3 of Int where nqp::unless(nqp::isfalse(nqp::defined($_)), nqp::isge_I(nqp::decont($_), 0)); for ^100_000 { $ = 42 ~~ UInt3 }; say now - INIT now;
13:55 camelia rakudo-moar f532f8: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Could not find nqp::defined, did you forget 'use nqp;' ?␤at <tmp>:1␤------> 3qp::unless(nqp::isfalse(nqp::defined($_)7⏏5), nqp::isge_I(nqp::decont($_), 0)); for␤»
13:55 Zoffix m: use nqp; my subset UInt3 of Int where nqp::unless(nqp::isfalse(nqp::defined($_)), nqp::isge_I(nqp::decont($_), 0)); for ^100_000 { $ = 42 ~~ UInt3 }; say now - INIT now;
13:55 camelia rakudo-moar f532f8: OUTPUT: «0.786176␤»
13:55 Zoffix Kinda weird that nqp version is slower, eh?
13:55 Zoffix 30% slower on my 32-bit box
14:02 pmurias int is 32-bit on 32-bit boxes?
14:02 yoleaux2 5 Apr 2017 17:18Z <[Coke]> pmurias: back when we were getting pugs and niecza up to date with roast, we had a bunch of scripts to help onboard more test files either via fudging or identifying files that were close (so we could easily get some wins). let me know if you want me to take a whack at anything.
14:02 Zoffix pmurias: no, 64
14:04 pmurias is int being at least 64bits something that's "specced"?
14:04 Zoffix no idea
14:08 timotimo int is native 64bit int, cint is 32bit on 32bit machines
14:09 Zoffix m: my cint $
14:09 camelia rakudo-moar f532f8: OUTPUT: «5===SORRY!5===␤Type 'cint' is not declared. Did you mean any of these?␤    int␤    Int␤    uint␤    UInt␤␤at <tmp>:1␤------> 3my cint7⏏5 $␤Malformed my␤at <tmp>:1␤------> 3my7⏏5 cint $␤␤»
14:10 timotimo only in NativeCall
14:10 timotimo .o( is it actually cint, though? )
14:10 nine_ joined #perl6-dev
14:10 timotimo oh it's "long" inside NativeCall
14:11 Woodi_ joined #perl6-dev
14:13 SmokeMachine joined #perl6-dev
14:13 chansen_ joined #perl6-dev
14:17 Zoffix Interesting. If I run my 265 tests before the bench, new method is ~3.5% slower, but if I don't run them, its ~3.5% faster
14:17 Zoffix Pretty consistently too
14:18 Zoffix something gets speshed or whatever vOv
14:26 [Coke] Zoffix: that's a plus, then.
14:28 Zoffix What is?
14:29 [Coke] ... that it goes faster.
14:30 Zoffix But the indication is that it gets ~6% slower after you use it a few thousand times :/
14:31 [Coke] I thought it was that "you are doing more work, and the particular work you're doing is slower, but everything that was before that is faster than it would have been otherwises"
14:31 [Coke] s:last/s//
14:32 [Coke] ah well
14:33 Geth ¦ rakudo/nom: 189615c09f | (Elizabeth Mattijsen)++ | 5 files
14:33 Geth ¦ rakudo/nom: Make sure .Set/.SetHash are always nodal
14:33 Geth ¦ rakudo/nom: review: https://github.com/rakudo/rakudo/commit/189615c09f
14:37 Geth ¦ rakudo/nom: f849df323c | (Elizabeth Mattijsen)++ | src/core/Iterable.pm
14:37 Geth ¦ rakudo/nom: Make Iterable.Set(|Hash) about 4x faster
14:37 Geth ¦ rakudo/nom:
14:37 Geth ¦ rakudo/nom: - create .Set(|Hash) method in role Iterable
14:37 Geth ¦ rakudo/nom: - which shortcuts to Setty.fill_IterationSet
14:37 Geth ¦ rakudo/nom: - timing based on a 100 element array
14:37 Geth ¦ rakudo/nom: review: https://github.com/rakudo/rakudo/commit/f849df323c
14:39 Geth ¦ rakudo/nom: 80062b066b | (Elizabeth Mattijsen)++ | src/core/set_operators.pm
14:39 Geth ¦ rakudo/nom: Make Iterable (|) Iterable about 9x faster
14:39 Geth ¦ rakudo/nom:
14:39 Geth ¦ rakudo/nom: - by adding an optimized candidate
14:39 Geth ¦ rakudo/nom: - which shortcuts to Setty.fill_IterationSet
14:39 Geth ¦ rakudo/nom: - timing based on a 100 element array
14:39 Geth ¦ rakudo/nom: review: https://github.com/rakudo/rakudo/commit/80062b066b
14:44 Zoffix lizmat: do you have any tips for how to take `int` sized Ints, so you could use `int` nqp ops, but yet avoid LTA errors about not unboxing to int?
14:44 Zoffix m: sub (int $x) {}(999999999999999999999999999999999)
14:44 camelia rakudo-moar f532f8: ( no output )
14:44 Zoffix uhhh
14:45 Zoffix m: sub (int $x) {}(999999999999999999999999999999999999999999999)
14:45 camelia rakudo-moar f532f8: ( no output )
14:45 Zoffix interesting. On my box I get "Cannot unbox 150 bit wide bigint into native integer"
14:45 Zoffix m: sub (int $x) { dd $x }(999999999999999999999999999999999999999999999)
14:45 camelia rakudo-moar f532f8: OUTPUT: «802379605485813759␤»
14:45 lizmat m: sub (int $x) {dd $x}(999999999999999999999999999999999999999999999)
14:45 camelia rakudo-moar f532f8: OUTPUT: «802379605485813759␤»
14:45 lizmat it silently truncates
14:45 Zoffix star: sub (int $x) {dd $x}(999999999999999999999999999999999999999999999)
14:45 camelia star-m 2016.10: OUTPUT: «Cannot unbox 150 bit wide bigint into native integer␤  in sub  at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
14:45 lizmat which is intentional, afaik
14:45 lizmat ah?
14:46 Zoffix bisect: sub (int $x) {dd $x}(999999999999999999999999999999999999999999999)
14:46 bisectable6 Zoffix, Bisecting by exit code (old=2015.12 new=b62d1a7). Old exit code: 1
14:46 bisectable6 Zoffix, bisect log: https://gist.github.com/35d47aae3d439fca421091b19b318330
14:46 bisectable6 Zoffix, (2017-03-27) https://github.com/rakudo/rakudo/commit/666ce35dd7d416842c98014e5de097ac225ab260
14:46 Zoffix Well, either way. It's no good. LTA error on one and and wrong behaviour on ther other.
14:47 Zoffix It don't make any sense for .extension(:parts) to be larger than `int`, but due to these truncations/LTA errors, I have to slow everything down by quite a bit :/
14:47 MasterDuke huh, i'll see if i can figure out what happened
14:49 Zoffix kinda wish we had an op for.. um... nqp::limit_i($x). Gives you int.Range.max if it's > it and int.Range.min if it's < it and self if it's in Range.
15:01 Zoffix I guess the nqp::p6* are added right in rakudo's repo?
15:01 * Zoffix gonna take a look into that
15:02 Zoffix nqp::p6limitIntto_i(); nqp::p6limitNumto_i()
15:05 Zoffix nqp::p6int_I(); nqp::p6int_N();
15:05 Zoffix (make an Int fit into int); (name a Num fit into int);
15:05 Zoffix ugh, tho the Num one still has the NaNs to deal  with that can't really be limited sanely
15:09 Zoffix holy crap. lunch time already :/
15:13 Zoffix .ask jnthn I'd like to add nqp::p6int_I(); that truncates an Int to fit into `int`. There are many places where super large values don't make sense, but to give PDG errors we stick to Int nqp ops, and lose some perf. With nqp::p6int_I() we'll truncate all super large Ints into int and use the int p6 ops on them. Do you see problems with adding such a thing? In .extension() using int instead of Int gives a
15:13 yoleaux2 Zoffix: I'll pass your message to jnthn.
15:13 Zoffix ~30% perf boost
15:13 Zoffix .tell jnthn ~30% perf boost
15:13 yoleaux2 Zoffix: I'll pass your message to jnthn.
15:15 Zoffix Right now I added it as a Rakudo::Internals method but all the benefits get lost due to overhead of the method call :/
15:17 Zoffix .tell jnthn or rather... in my bench: using Ints is 2x slower than old method; using ints is 1.66x slower; whatever the diff there is is the benefit of ints that I want to capture.
15:17 yoleaux2 Zoffix: I'll pass your message to jnthn.
15:22 astj joined #perl6-dev
15:22 [Coke] Zoffix: if you inline it instead of making it a method call, does that avoid the speed hit
15:22 [Coke] ?
15:23 [Coke] I know macros were meant to fill that niche, but we also have a history of doing what's fast in core and not necessarily writing idiomatic perl 6 there.
15:24 Zoffix [Coke]: yeah, it avoids it, but it's a 4-line chunk nqp code. Inlining it all over the place makes an already-noisy nqp code noiser: https://gist.github.com/zoffixznet/6cb9496ee8f5f3d5d1b299db7735aac6
15:25 Zoffix And repeats the constant all over the place
15:27 [Coke] Could be a fallback of last resort. (maybe along with a comment with a unique string that includes 'changing this, change everything else'. very bad, I know, but like I said, last resort.
15:28 Zoffix Or just add an op.
15:37 [Coke] +1
15:40 Geth ¦ rakudo/nom: e8cb9a2f52 | (Elizabeth Mattijsen)++ | src/core/set_operators.pm
15:40 Geth ¦ rakudo/nom: Make infix:<(&)> a multi and add basic candidates
15:40 Geth ¦ rakudo/nom: review: https://github.com/rakudo/rakudo/commit/e8cb9a2f52
15:41 lizmat Zoffix: fwiw, I think the problem with adding nqp ops is that spesh / JIT need to be told about them as well, otherwise they won't get optimised
15:41 lizmat and thus don't have the performance benefit that you're looking for
15:41 lizmat (at least that was the gist I remember the last time I suggested adding an nqp op :-)
15:43 Zoffix Ahhh
15:45 Zoffix m: my $x = "foo.txt".IO; $x.parts<basename> = "foo.tar"; dd $x; dd $x.extension
15:45 camelia rakudo-moar 80062b: OUTPUT: «IO::Path $x = "foo.txt".IO(:SPEC(IO::Spec::Unix),:CWD("/home/camelia"))␤"tar"␤»
15:45 * Zoffix frowns
15:53 Zoffix .extension vs .new-extension( :parts(1..1) ) is 11x slower
15:54 Zoffix .extension vs .new-extension( :1parts ) is 1.86x slower
15:54 Zoffix .extension vs .new-extension is 3% slower
15:54 Zoffix Functionally, all three are equivalent :/
15:57 * Zoffix knocks it on the head
15:57 Zoffix Optimization is a young person's game :)
15:57 * Zoffix sticks to rightiness
15:58 perlpilot that particular optimization seems more of a spesh thing than something a human needs modify
15:58 Zoffix perlpilot: the int thing? Definitely not.
15:59 Zoffix Well, not definitely, but automatically truncating an Int the second it enters an int seems very wrong.
15:59 Zoffix .oO( tint type )
16:00 perlpilot I dunno, that's kind of what I expect from low-level types.
16:01 Zoffix Isn't overflowing is the typical behaviour? IIRC some crypto applications depend on that even
16:02 perlpilot actually ... I haven't had to deal with such things in so long, my "instincts" are probably off  :)
16:02 perlpilot Perl++
16:02 lizmat m: multi a(Int $) { "Int" }; multi a(int $) { "int" }; dd a 9999999999999999999999999999999   # can be handled by MMD
16:02 camelia rakudo-moar e8cb9a: OUTPUT: «"Int"␤»
16:03 lizmat m: multi a(Int $) { "Int" }; multi a(int $) { "int" }; dd a 42
16:03 camelia rakudo-moar e8cb9a: OUTPUT: «"int"␤»
16:04 Zoffix m: multi a(Int $) { "Int" }; multi a(int $) { "int" }; my $x = 42; dd a $x # not really
16:04 camelia rakudo-moar e8cb9a: OUTPUT: «"Int"␤»
16:04 lizmat m: multi a(Int $) { "Int" }; multi a(int $) { "int" }; my int $x = 42; dd a $x
16:04 camelia rakudo-moar e8cb9a: OUTPUT: «"int"␤»
16:04 lizmat needs to be a native
16:05 Zoffix But you're back at square #1 with that; my int $x will explode the minute you stick something larger than int into it
16:05 lizmat true
16:21 Geth ¦ rakudo/nom: 89b5d65ca5 | (Elizabeth Mattijsen)++ | src/core/set_operators.pm
16:21 Geth ¦ rakudo/nom: Make Setty (&) Setty about 40x faster
16:21 Geth ¦ rakudo/nom:
16:21 Geth ¦ rakudo/nom: - add a candidate for it
16:21 Geth ¦ rakudo/nom: - that is highly optimized and written in nqp
16:21 Geth ¦ rakudo/nom: - prevents potentially expensive .WHICH calculation
16:21 Geth ¦ rakudo/nom: - so many real live situations could be faster still
16:21 Geth ¦ rakudo/nom: review: https://github.com/rakudo/rakudo/commit/89b5d65ca5
16:21 timotimo hm. from inside a module's code, what's a sensible way to get at the version field inside the META6.json file?
16:22 timotimo i thought we had something similar to %*RESOURCES for that
16:22 lizmat %?RESOURCES ?
16:22 lizmat nine would know if that's at all implemented already
16:22 timotimo that one, yeah
16:23 lizmat actually, it appears implemented as %*RESOURCES atm
16:23 timotimo oh, huh?
16:23 timotimo i thought that'd only give you the "resources" part of the meta6.info file
16:23 lizmat ack RESOURCES src/core
16:24 lizmat ah, hmmm...
16:24 timotimo oh, oyu mean %?RESOURCES is implemented as accessing %*RESOURCES
16:24 timotimo well, $*RESOURCES really
16:24 lizmat ah, yes
16:24 lizmat I'm not sure what the state is of that
16:24 timotimo but that accesses the compiler's idea of what that is
16:24 lizmat but isn't the associated Distribution object also available?
16:25 timotimo not sure how to reliably get that
16:25 * lizmat neither  :-(
16:25 timotimo i mean, there's $*REPO, but that's just my installation repo for ~/.perl6
16:26 timotimo perhaps by knowing the module name i can just ask repo to give me "me"
16:27 lizmat that was definitely speculated about at one time  :-)
16:31 timotimo i seemed to recall something along those lines
16:31 timotimo in this case, i can - since i know what "me" is - ask for it literally
16:45 timotimo well, i found a path to the version
16:45 timotimo so that'? good
16:46 timotimo $*REPO.resolve(CompUnit::DependencySpecification.new(:short-name("MyModule"))).distribution.read-dist.().<ver>.perl.say
16:47 lizmat feels like a $*REPO.Distribution("MyModule") would be a nice shortcut
16:47 Geth ¦ rakudo/nom: 5072377262 | (Zoffix Znet)++ | src/core/Rakudo/Internals.pm
16:47 Geth ¦ rakudo/nom: Implement Rakudo::Internals.RANGE-AS-ints
16:47 Geth ¦ rakudo/nom:
16:47 Geth ¦ rakudo/nom: Converts a Range to min/max values that can fit into an `int`
16:47 Geth ¦ rakudo/nom: Treats values smaller than int.Range.min as int.Range.min
16:47 Geth ¦ rakudo/nom: Treats values larger than int.Range.max as int.Range.max
16:47 Geth ¦ rakudo/nom: Throws $exception for non-Numeric ranges or ranges with any NaN endpoints
16:47 Geth ¦ rakudo/nom: If $exception is a Str, calls `die $exception`
16:47 Geth ¦ rakudo/nom: review: https://github.com/rakudo/rakudo/commit/5072377262
16:53 timotimo am i getting tired? because i legit just called it 'multi MATCH("version")' ...
17:03 Geth ¦ rakudo/nom: 03ef4be252 | (Elizabeth Mattijsen)++ | src/core/set_operators.pm
17:03 Geth ¦ rakudo/nom: Make Mixy (&) Mixy about 60x faster
17:03 Geth ¦ rakudo/nom:
17:03 Geth ¦ rakudo/nom: - add a candidate for it
17:03 Geth ¦ rakudo/nom: - that is highly optimized and written in nqp
17:03 Geth ¦ rakudo/nom: - prevents potentially expensive .WHICH calculation
17:03 Geth ¦ rakudo/nom: - so many real live situations could be faster still
17:03 Geth ¦ rakudo/nom: review: https://github.com/rakudo/rakudo/commit/03ef4be252
17:11 Geth ¦ rakudo/nom: b1e7a01f87 | (Zoffix Znet)++ | 3 files
17:11 Geth ¦ rakudo/nom: [io grant] Implement IO::Path.extension 2.0
17:11 Geth ¦ rakudo/nom:
17:11 Geth ¦ rakudo/nom: - Add `:parts` parameter to control number of extension parts to find
17:11 Geth ¦ rakudo/nom: - Add a means to replace an extension, with an optional parameter
17:11 Geth ¦ rakudo/nom: - Add an optional `:joiner` parameter, specifying the string to
17:11 Geth ¦ rakudo/nom:     use when joining the replacement extension to the rest of the
17:11 Geth ¦ rakudo/nom:     filename
17:11 Geth ¦ rakudo/nom: - Remove Rakudo::Internals.MAKE-EXT. It no longer does what
17:11 Geth ¦ rakudo/nom:     IO::Path.extension does and isn't used anywhere else in the sauce
17:11 Geth ¦ rakudo/nom: review: https://github.com/rakudo/rakudo/commit/b1e7a01f87
17:12 Geth ¦ roast: b23e53eb79 | (Zoffix Znet)++ | S32-io/io-path-extension.t
17:12 Geth ¦ roast: [io grant] Test IO::Path.extension
17:12 Geth ¦ roast:
17:12 Geth ¦ roast: - Add 271 tests for the previously untested method
17:12 Geth ¦ roast: - Test the new functionality added by the IO grant
17:12 Geth ¦ roast:
17:12 Geth ¦ roast: Rakudo impl: https://github.com/rakudo/rakudo/commit/b1e7a01f87
17:12 Geth ¦ roast: review: https://github.com/perl6/roast/commit/b23e53eb79
17:16 * Zoffix glances at #perl6
17:17 Zoffix The wat of visual diff in $^i vs $i is overriden by usefulness of being able to use an $^i param in inner blocks
17:17 Zoffix And $:i params
17:17 Zoffix Their utility is limited as it is, restricting them further for sake of aesthetics is LTA IMO
17:18 Zoffix And pretty sure I documented it somewhere arleady
17:18 lizmat m: my $i; { $^i + $i }   # ok
17:18 camelia rakudo-moar 03ef4b: OUTPUT: «WARNINGS for <tmp>:␤Useless use of "+" in expression "$^i + $i" in sink context (line 1)␤Too few positionals passed; expected 1 argument but got 0␤  in block <unit> at <tmp> line 1␤␤»
17:18 lizmat m: my $i; { $^i + $i }(42)   # ok
17:18 camelia rakudo-moar 03ef4b: ( no output )
17:18 TimToady that is very much designed to be a DIHWIDT kind of thing
17:18 lizmat m: my $i; { $i + $^i }(42)   #
17:18 camelia rakudo-moar 03ef4b: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤$i has already been used as a non-placeholder in the surrounding block,␤  so you will confuse the reader if you suddenly declare $^i here␤at <tmp>:1␤------> 3my $i; { $i + $^i7⏏5 }(42)   #␤»
17:19 Zoffix haha :D
17:19 TimToady it's the "suddenly" that I like the best
17:19 Zoffix Yeah, $^ is docced "If you have self-declared a parameter using $^a once, you may refer to it using only $a thereafter."
17:19 * Zoffix looks at $:
17:20 Zoffix Also is " the same things that apply to variables declared using the ^ twigil"
17:20 TimToady it's really easy to abuse the ordering as well :)
17:21 go|dfish joined #perl6-dev
17:21 TimToady convenient that "first", "second", "third" are the correct order, but don't try "fourth" :)
17:23 lizmat guess that'll be a WAT I'll have to live with  :-)
17:23 lizmat dinner&
17:24 samcv good *
17:24 Zoffix \o
17:24 timotimo what am i doing wrong if %?RESOURCES is just Nil?
17:25 Zoffix timotimo: try adding/removing "S" at the end; both in variable and in the metafile
17:25 timotimo mhm
17:25 Zoffix like the key, in the metafile. "resourse" vs "resources"
17:25 timotimo right
17:26 Zoffix "resources": ["foo", "bar"]. This one works: https://github.com/ugexe/zef/blob/master/META6.json#L50-L55
17:27 Zoffix And grepping the sauces, it's %?RESOURCES<scripts/win32unzip.ps1> in the sauce
17:28 timotimo thanks
17:30 timotimo oh
17:30 timotimo can it be %?RESOURCE just doesn't work inside bin scripts?
17:30 Zoffix maybe
17:30 Zoffix I vaguelly recall ugexe mentioned something along those lines
17:31 Zoffix And you make a module's routine that returns %?RESOURCE for use in the script
17:31 timotimo right, i'm just about to do that
17:31 timotimo this was annoying to figure out :(
17:42 Zoffix t/spec/S11-modules/nested.t flopping
17:43 Zoffix hah... I accidentally created a nom branch on docs :S
17:43 Zoffix switched to "nom" on github, by habit
17:44 Zoffix clearly we should replace all "master" branches with "nom" on all Perl 6 repos :)
17:45 MasterDuke you know, i'm surprised i've never done that before
17:48 robertle joined #perl6-dev
17:48 timotimo i think i've done that same thing at least once, too
17:50 Zoffix ZOFVM: Files=1234, Tests=133447, 118 wallclock secs (22.95 usr  3.50 sys + 2448.46 cusr 153.82 csys = 2628.73 CPU)
17:54 * Zoffix & # for rest of day
18:04 ugexe yeah %?RESOURCES only works inside modules
18:04 yoleaux2 5 Apr 2017 19:28Z <Zoffix> ugexe: FYI: https://irclog.perlgeek.de/perl6-dev/2017-04-05#i_14380970
18:05 ugexe you can just put your bin script in a module though https://github.com/ugexe/zef/blob/master/bin/zef (this also means your bin script gets precompiled)
18:16 AlexDaniel joined #perl6-dev
18:22 Zoffix m: dd [ <author extended interactive online release smoke>.words.sort eqv <smoke extended interactive release author online>.words.sort ]
18:22 camelia rakudo-moar b1e7a0: OUTPUT: «[Bool::True]␤»
18:23 Zoffix Set.Str is not specced to be ordered is it:?
18:23 Zoffix Man, I changed it to .keys.sort but a test is still failing on hack because apparently it ends up in the wrong order there :S
18:25 Zoffix This line: https://github.com/zoffixznet/perl6-Test-When/blob/master/lib/Test/When.pm6#L8
18:26 Zoffix Positional arguments to Test::When can only be author extended interactive online release smoke
18:26 Zoffix m: my $valid-env-keywords = set <smoke interactive extended release author online>; die "Positional arguments to Test::When can only be " ~ $valid-env-keywords.keys.sort
18:26 camelia rakudo-moar b1e7a0: OUTPUT: «Positional arguments to Test::When can only be author extended interactive online release smoke␤  in block <unit> at <tmp> line 1␤␤»
18:27 Zoffix Oh
18:27 Zoffix brain fart. I made it sort, but didn't adjust the test to test for sorted version >_<
18:27 * Zoffix re-disappears
18:56 jdv79 bye
19:22 Geth ¦ rakudo/nom: e9a30756c8 | (Elizabeth Mattijsen)++ | src/core/set_operators.pm
19:22 Geth ¦ rakudo/nom: Make Baggy (&) Baggy about 80x faster
19:22 Geth ¦ rakudo/nom:
19:22 Geth ¦ rakudo/nom: - add a candidate for it
19:22 Geth ¦ rakudo/nom: - that is highly optimized and written in nqp
19:22 Geth ¦ rakudo/nom: - prevents potentially expensive .WHICH calculation
19:22 Geth ¦ rakudo/nom: - so many real live situations could be faster still
19:22 Geth ¦ rakudo/nom: review: https://github.com/rakudo/rakudo/commit/e9a30756c8
19:32 Geth ¦ rakudo/nom: 48619f8364 | (Elizabeth Mattijsen)++ | src/core/set_operators.pm
19:32 Geth ¦ rakudo/nom: Handle Baggy (|) Mixy, Mixy (|) Baggy in dispatch
19:32 Geth ¦ rakudo/nom:
19:32 Geth ¦ rakudo/nom: Rather than incorrectly checking in the Baggy (|) Baggy candidate.
19:32 Geth ¦ rakudo/nom: review: https://github.com/rakudo/rakudo/commit/48619f8364
19:44 Geth ¦ rakudo/nom: 6377d9252a | (Elizabeth Mattijsen)++ | src/core/set_operators.pm
19:44 Geth ¦ rakudo/nom: Fix 2 thinko's in Map (|) Map
19:44 Geth ¦ rakudo/nom: review: https://github.com/rakudo/rakudo/commit/6377d9252a
19:44 dalek joined #perl6-dev
19:44 SourceBaby joined #perl6-dev
19:45 Undercover joined #perl6-dev
20:17 Geth ¦ rakudo/nom: 605e9e963c | (Elizabeth Mattijsen)++ | src/core/set_operators.pm
20:17 Geth ¦ rakudo/nom: Make Map (&) Map about 7x faster
20:17 Geth ¦ rakudo/nom:
20:17 Geth ¦ rakudo/nom: - add a candidate for it
20:17 Geth ¦ rakudo/nom: - that is highly optimized and written in nqp
20:17 Geth ¦ rakudo/nom: - prevents potentially expensive .WHICH calculation
20:17 Geth ¦ rakudo/nom: - so many real live situations could be faster still
20:17 Geth ¦ rakudo/nom: review: https://github.com/rakudo/rakudo/commit/605e9e963c
21:36 Geth ¦ rakudo/nom: 0fc375160f | (Elizabeth Mattijsen)++ | src/core/set_operators.pm
21:36 Geth ¦ rakudo/nom: Make Iterable (&) Iterable about 2x faster
21:36 Geth ¦ rakudo/nom:
21:36 Geth ¦ rakudo/nom: - add a candidate for it
21:36 Geth ¦ rakudo/nom: - prevents potentially expensive .WHICH calculation
21:36 Geth ¦ rakudo/nom: - so many real live situations could be faster still
21:36 Geth ¦ rakudo/nom: review: https://github.com/rakudo/rakudo/commit/0fc375160f
21:38 astj joined #perl6-dev
22:26 agentzh_ joined #perl6-dev
22:37 Geth ¦ rakudo/nom: bbfb28d490 | (Elizabeth Mattijsen)++ | src/core/Rakudo/Iterator.pm
22:37 Geth ¦ rakudo/nom: Introducing R.It.AllButLastNValues
22:37 Geth ¦ rakudo/nom:
22:37 Geth ¦ rakudo/nom: Iterator that produces all values of an iterator *except* the last N
22:37 Geth ¦ rakudo/nom: ones.  The work horse for Seq.tail(*-N).
22:37 Geth ¦ rakudo/nom: review: https://github.com/rakudo/rakudo/commit/bbfb28d490
23:52 Geth ¦ nqp: 252d21fe77 | (Samantha McVey)++ | 3 files
23:52 Geth ¦ nqp: Untodo two tests, and remove a debug message
23:52 Geth ¦ nqp: review: https://github.com/perl6/nqp/commit/252d21fe77

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