Perl 6 - the future is here, just unevenly distributed

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

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

All times shown according to UTC.

Time Nick Message
00:34 b2gills joined #perl6-dev
00:47 bisectable6 joined #perl6-dev
01:14 timotimo joined #perl6-dev
01:31 ggoebel 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
04:47 travis-ci joined #perl6-dev
04:47 travis-ci Rakudo build failed. lizmat 'Merge pull request #903 from dwarring/pod-table-fix
04:47 travis-ci https://travis-ci.org/rakudo/rakudo/builds/167177019 https://github.com/rakudo/rakudo/compare/faba64582221...7af9ec9d90d4
04:47 travis-ci left #perl6-dev
06:00 travis-ci joined #perl6-dev
06:00 travis-ci Rakudo build failed. Elizabeth Mattijsen 'Make 42.match(/42/) set $/'
06:00 travis-ci https://travis-ci.org/rakudo/rakudo/builds/167182211 https://github.com/rakudo/rakudo/compare/7af9ec9d90d4...8df09655534e
06:00 travis-ci left #perl6-dev
06:04 FROGGS joined #perl6-dev
06:37 nebuchadnezzar joined #perl6-dev
06:44 travis-ci joined #perl6-dev
06:44 travis-ci Rakudo build failed. Elizabeth Mattijsen '.head now uses generic R::I.SeqNextNFromIterator'
06:44 travis-ci https://travis-ci.org/rakudo/rakudo/builds/167190459 https://github.com/rakudo/rakudo/compare/8df09655534e...6996512e3c99
06:44 travis-ci left #perl6-dev
07:04 ilbot3 joined #perl6-dev
07:04 Topic for #perl6-dev is now Perl 6 language and compiler development 2.0 | Logs at http://irclog.perlgeek.de/perl6-dev/today
07:26 travis-ci joined #perl6-dev
07:26 travis-ci Rakudo build failed. Elizabeth Mattijsen 'Add Iterator.skip-at-least-pull-one
07:26 travis-ci https://travis-ci.org/rakudo/rakudo/builds/167200845 https://github.com/rakudo/rakudo/compare/6996512e3c99...a8221ee5de2a
07:26 travis-ci left #perl6-dev
07:27 [Tux] This is Rakudo version 2016.09-187-ga8221ee built on MoarVM version 2016.09-47-g736364c
07:27 [Tux] csv-ip5xs        3.239
07:27 [Tux] test            16.018
07:27 [Tux] test-t           7.066
07:27 [Tux] csv-parser      17.690
07:31 RabidGravy joined #perl6-dev
07:37 lizmat Files=1148, Tests=53321, 218 wallclock secs (12.84 usr  3.65 sys + 1321.28 cusr 122.52 csys = 1460.29 CPU)
08:36 psch uh, what's the moar equivalent of runtime.CallSiteDescriptor.explodeFlattening()..?
08:45 DrForr explodeFlattening... sounds dangerous :)
08:56 psch hm, i guess it's flatten_args() in args.c..?
08:57 psch the adhoc that gets thrown seems to mean something similar for the case i'm looking at
08:57 psch that's "Flattening named argument must have VMHash REPR" on jvm and "flattening of other hash reprs NYI." on moar
08:57 psch which, yeah, seems to mean something similar
09:08 * jnthn wonders what other REPRs we even would implement it for... :)
09:11 psch the golf that triggers that stuff like e.g. 'my ($x, %h) := (1, { a => 1, b => 2 })', fwiw
09:11 psch +is
09:12 psch and, well, it's still fallout from the BOOTSTRAPATTR -> Attribute change
09:15 jnthn m: my ($x, %h) := (1, { a => 1, b => 2 })
09:15 camelia rakudo-moar a8221e: ( no output )
09:15 psch j: my ($x, %h) := (1, { a => 1, b => 2 })
09:15 camelia rakudo-jvm 2a1605: ( no output )
09:15 jnthn m: my ($x, %h) := (1, { a => 1, b => 2 }); say $x; say %h;
09:15 camelia rakudo-moar a8221e: OUTPUT«1␤{a => 1, b => 2}␤»
09:15 psch well, it's on HEAD and doesn't build
09:15 jnthn Oh
09:15 psch because we do that kind of thing in install-core-dist.pl
09:16 psch note moar and jvm not having the same sha too
09:16 jnthn Did something like FLATTENABLE_HASH or FLATTENABLE_LIST get busted somewhere?
10:09 Hotkeys joined #perl6-dev
10:09 go|dfish joined #perl6-dev
10:09 hoelzro joined #perl6-dev
10:09 ugexe joined #perl6-dev
10:09 zostay joined #perl6-dev
10:09 jsimonet joined #perl6-dev
10:09 literal joined #perl6-dev
10:09 tbrowder joined #perl6-dev
10:09 b2gills joined #perl6-dev
10:09 pmichaud joined #perl6-dev
10:09 pochi_ joined #perl6-dev
10:09 nine joined #perl6-dev
10:09 pyrimidine joined #perl6-dev
10:09 DrForr joined #perl6-dev
10:09 btyler joined #perl6-dev
10:09 [Tux] joined #perl6-dev
10:09 llfourn joined #perl6-dev
10:09 masak joined #perl6-dev
10:09 avar joined #perl6-dev
10:09 lizmat joined #perl6-dev
10:09 tony-o joined #perl6-dev
10:09 jnthn joined #perl6-dev
10:09 gfldex joined #perl6-dev
10:09 tailgate joined #perl6-dev
10:09 mst joined #perl6-dev
10:09 Ulti joined #perl6-dev
10:09 bartolin joined #perl6-dev
10:09 japhb joined #perl6-dev
10:09 Zoffix joined #perl6-dev
10:09 |Tux| joined #perl6-dev
10:09 Woodi joined #perl6-dev
10:09 TimToady joined #perl6-dev
10:09 tadzik joined #perl6-dev
10:09 bisectable6 joined #perl6-dev
10:09 timotimo joined #perl6-dev
10:09 ggoebel joined #perl6-dev
10:09 RabidGravy joined #perl6-dev
10:09 perlpilot_ joined #perl6-dev
10:09 dalek joined #perl6-dev
10:10 p3rln00b joined #perl6-dev
10:10 committable6 joined #perl6-dev
10:28 pmichaud joined #perl6-dev
10:28 pochi_ joined #perl6-dev
10:28 nine joined #perl6-dev
10:28 pyrimidine joined #perl6-dev
10:28 DrForr joined #perl6-dev
10:28 btyler joined #perl6-dev
10:28 [Tux] joined #perl6-dev
10:28 llfourn joined #perl6-dev
10:28 masak joined #perl6-dev
10:28 avar joined #perl6-dev
10:28 lizmat joined #perl6-dev
10:28 tony-o joined #perl6-dev
10:28 jnthn joined #perl6-dev
10:28 gfldex joined #perl6-dev
10:28 tailgate joined #perl6-dev
10:28 mst joined #perl6-dev
10:28 Ulti joined #perl6-dev
10:28 bartolin joined #perl6-dev
10:28 japhb joined #perl6-dev
10:28 Zoffix joined #perl6-dev
10:28 |Tux| joined #perl6-dev
10:28 Woodi joined #perl6-dev
10:28 TimToady joined #perl6-dev
10:28 tadzik joined #perl6-dev
10:28 bisectable6 joined #perl6-dev
10:28 timotimo joined #perl6-dev
10:28 ggoebel joined #perl6-dev
10:28 RabidGravy joined #perl6-dev
10:28 perlpilot_ joined #perl6-dev
10:28 dalek joined #perl6-dev
10:28 committable6 joined #perl6-dev
10:28 p3rln00b joined #perl6-dev
10:28 Hotkeys joined #perl6-dev
10:28 go|dfish joined #perl6-dev
10:28 hoelzro joined #perl6-dev
10:28 ugexe joined #perl6-dev
10:28 zostay joined #perl6-dev
10:28 jsimonet joined #perl6-dev
10:28 literal joined #perl6-dev
10:28 tbrowder joined #perl6-dev
10:28 b2gills joined #perl6-dev
10:28 nebuchadnezzar joined #perl6-dev
10:28 cognominal joined #perl6-dev
10:28 raydiak joined #perl6-dev
10:28 sivoais joined #perl6-dev
10:28 geekosaur joined #perl6-dev
10:28 psch joined #perl6-dev
10:28 SourceBaby_ joined #perl6-dev
10:28 huggable_ joined #perl6-dev
10:28 ilmari joined #perl6-dev
10:28 stmuk_ joined #perl6-dev
10:28 camelia joined #perl6-dev
10:28 [Coke] joined #perl6-dev
10:28 arnsholt joined #perl6-dev
10:28 moritz joined #perl6-dev
10:28 jnthn What would its default implementation be?
10:29 lizmat method skip-one() { self.pull-one !=:= IterationEnd }
10:29 lizmat (worded differently of course, but you get the picture)
10:29 lizmat so return True on successful skip, else False
10:31 camelia joined #perl6-dev
10:36 sivoais joined #perl6-dev
10:42 jnthn returning Nil or IterationEnd might be better
11:17 lizmat why IterationEnd ?
11:17 lizmat Nil I could see as an optimization
11:18 lizmat but apart from the bikeshedding, you see the use case ?
11:25 lizmat thinking of reverting https://github.com/rakudo/rakudo/commit/e8c8af60c40bbbee2c9dd8d63bb9fb75fe065e30 to make the JVM build again
11:26 lizmat opinions?
11:26 psch in general i'd rather have less boot strap artifacts
11:26 psch so, i think the patch is one we rather want to have that not
11:27 psch on the other hand the fact that it is as disruptive as it is means that should probably have happened in a branch in the first place
11:28 psch so i'd go with +1 for reverting it, plus a comment requesting the work in a branch, including potential backend changes
11:32 psch because, as usual, the fact that a rakudo level change works on moar and doesn't on jvm means that we're not doing an equivalent thing
11:33 psch i'm not sure what other changes MasterDuke17 tried locally, but what i tried didn't fix it completely either, and the resulting problems are somewhere in how call captures are generated, from the looks of it
11:34 psch so this might well be some really involved thing, and not quite worth the effort just for getting rid of BOOTSTRAPATTR, depending on how important introspectability at those points is...
11:34 psch anyway, i've got some stuff to take care of \o
11:45 AlexDaniel joined #perl6-dev
11:51 lizmat psch: noted
11:51 lizmat going to be afk for the rest of the day&
11:56 ShimmerFairy joined #perl6-dev
12:13 SourceBaby joined #perl6-dev
12:13 Undercover joined #perl6-dev
12:17 NeuralAnomaly joined #perl6-dev
12:18 huggable joined #perl6-dev
12:18 yoleaux2 joined #perl6-dev
12:18 buggable joined #perl6-dev
12:19 dalek roast: c65f4fe | (Zoffix Znet)++ | S32-hash/map.t:
12:19 dalek roast: [coverage] Cover Map.clone
12:19 dalek roast: review: https://github.com/perl6/roast/commit/c65f4fedd4
12:20 p3rln00b https://travis-ci.org/rakudo/rakudo/builds/167200845
12:20 buggable [travis build above] ☠ Did not recognize some failures. Check results manually. All failures are on JVM only.
12:20 p3rln00b :) Taught it to spot JVM-only failures
12:34 p3rln00b m: my $m = (butter => 0.22, sugar => 0.1, sugar => 0.02).Mix; dd $m.Bag
12:34 camelia rakudo-moar a8221e: OUTPUT«Type check failed in assignment; expected Int but got Rat (0.22)␤  in block <unit> at <tmp> line 1␤␤»
12:38 pmurias joined #perl6-dev
13:06 dalek rakudo/nom: acd668e | (Zoffix Znet)++ | src/core/Mix (3 files):
13:06 dalek rakudo/nom: Move .Bag/.BagHash into Mixy
13:06 dalek rakudo/nom:
13:06 dalek rakudo/nom: Both Mix and MixHash have identical code in those methods, so
13:06 dalek rakudo/nom: it makes sense to move it into the role they do.
13:06 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/acd668ee90
13:22 * p3rln00b is going to make .Bag/.BagHash on Mixy work for all weights.
13:23 p3rln00b By rounding... but I'm spotting an LTAness in it: (butter => .22).Mix gives 1 key; .Bag gives 0, because it rounds to 0 and the key disapepars
13:23 p3rln00b Better than crashing with a gut spill I suppose.
13:40 dalek joined #perl6-dev
13:42 p3rln00b m: dd ('butter' => 1, 'sugar' => 1, 'sugar' => 1).Mix.Bag
13:42 camelia rakudo-moar acd668: OUTPUT«Odd number of elements found where hash initializer expected:␤Only saw: 2␤  in block <unit> at <tmp> line 1␤␤»
13:43 * p3rln00b made a booboo
13:45 p3rln00b m: class { method foo { %.elems.say } }.foo
13:45 camelia rakudo-moar acd668: OUTPUT«Odd number of elements found where hash initializer expected:␤Only saw: 1␤  in method foo at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
13:45 p3rln00b hehe
13:47 dalek rakudo/nom: 5b6f4b6 | (Zoffix Znet)++ | src/core/Mix (3 files):
13:47 dalek rakudo/nom: Revert "Move .Bag/.BagHash into Mixy"
13:47 dalek rakudo/nom:
13:47 dalek rakudo/nom: This reverts commit acd668ee90d0f9627c4f05a966e71418b3cb7d2b.
13:47 dalek rakudo/nom: The %!elems is a private attribute and so cannot be replaced with %.elems;
13:47 dalek rakudo/nom: and we can't access %!elems in the role because reasons[^1]
13:47 dalek rakudo/nom:
13:47 dalek rakudo/nom: [1] https://irclog.perlgeek.de/perl6/2016-10-13#i_13396286
13:47 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/5b6f4b6fb5
13:53 dalek joined #perl6-dev
13:55 p3rln00b ZOFVM: Files=1196, Tests=129719, 134 wallclock secs (20.29 usr  3.06 sys + 2336.09 cusr 213.69 csys = 2573.13 CPU)
13:55 dalek rakudo/nom: 2d5a2c9 | (Zoffix Znet)++ | src/Perl6/Metamodel/BOOTSTRAP.nqp:
13:55 dalek rakudo/nom: Revert "Convert some BOOTSTRAPATTRs to Attributes"
13:55 dalek rakudo/nom:
13:55 dalek rakudo/nom: This reverts commit e8c8af60c40bbbee2c9dd8d63bb9fb75fe065e30.
13:55 dalek rakudo/nom:
13:55 dalek rakudo/nom: Reverting per discussion[^1] to unbust JVM build. The work will be
13:55 dalek rakudo/nom: rethought and added at a later date.
13:55 dalek rakudo/nom:
13:55 dalek rakudo/nom: [1] https://github.com/rakudo/rakudo/pull/902#issuecomment-253501965
13:55 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/2d5a2c9d16
14:32 p3rln00b m: my $b = BagHash; $b<a> = -10; dd $b
14:32 camelia rakudo-moar 2d5a2c: OUTPUT«Hash $b = ${:a(-10)}␤»
14:33 p3rln00b m: my $b = BagHash.new-from-pairs: 'a' => -10; dd $b
14:33 camelia rakudo-moar 2d5a2c: OUTPUT«Use of Nil in string context␤  in block <unit> at <tmp> line 1␤Use of Nil in string context␤  in block <unit> at <tmp> line 1␤Found negative values for  in ␤  in block <unit> at <tmp> line 1␤␤Actually thrown at:␤  in block <unit> at <tmp> l…»
14:33 p3rln00b :)
14:39 dalek rakudo/nom: bf7945e | (Zoffix Znet)++ | src/core/Mix (2 files):
14:39 dalek rakudo/nom: Fix Mixy.Bag/.BagHash coercers
14:39 dalek rakudo/nom:
14:39 dalek rakudo/nom: The coercers work only for Mixies that were created with integer
14:39 dalek rakudo/nom: weight and spill guts if called on any other Mixy. Since non-integer
14:39 dalek rakudo/nom: weights is what defines a Mixy, most of them will likely be such.
14:39 dalek rakudo/nom:
14:39 dalek rakudo/nom: Make coercers round the weights to integers instead of crashing.
14:39 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/bf7945eec5
14:39 dalek roast: f989df5 | (Zoffix Znet)++ | S02-types/mix (2 files):
14:39 dalek roast: [coverage] Cover [Mix|MixHash].[Bag|BagHash]
14:39 dalek roast: review: https://github.com/perl6/roast/commit/f989df56dc
15:04 p3rln00b So negative weights are OK for Baggy/Mixy?
15:08 japhb p3rln00b: Seems legit at first glance.  How else would you produce the additive inverse of a bag?
15:09 p3rln00b OK. just checking :)
15:11 japhb <-- Not a set theorist, that was just the product of quick rumination
15:13 * japhb realizes that could be extended to:  <-- Not a $foo, for nearly all values of $foo
15:14 p3rln00b That would be my view too. It's just the fact that we entirely wipe any keys that are zero instead of returning zero for them. So zero felt super special if we allow negatives
15:23 FROGGS joined #perl6-dev
15:25 FROGGS o/
16:22 p3rln00b japhb: reading the speculation, I came to conclusion negatives are not allowed. For Baggy, the integer values are "replication values" and you can convert a Baggy to a List by replicating each element by the number of weights. For Mixies, it says "Negative weights are not deleted, but the implementation may complain if it notices you attempting to use such a weight."
16:25 p3rln00b And nother note for Bag/BagHash says values are restricted to UInt
16:40 p3rln00b m: my $b = Bag.new; $b<foo>++; dd $b
16:40 camelia rakudo-moar bf7945: OUTPUT«Cannot resolve caller postfix:<++>(Int); the following candidates␤match the type but require mutable arguments:␤    (Mu:D $a is rw)␤    (Int:D $a is rw)␤␤The following do not match for other reasons:␤    (Bool:D $a is rw)␤    (Bool:U $a is rw…»
16:40 p3rln00b oh wait, immutability
16:41 p3rln00b m: my $b = BagHash.new; $b<foo>++; dd $b
16:41 camelia rakudo-moar bf7945: OUTPUT«BagHash $b = ("foo"=>1).BagHash␤»
16:43 p3rln00b (it's ironic I did not bother to actually read the error message I worked so hard to improve to mention the rw match :P)
17:02 p3rln00b m: my $b = class lolwut {}; $b<foo> = -10; $b.^name.say
17:02 camelia rakudo-moar bf7945: OUTPUT«Hash␤»
17:02 p3rln00b creepy :}
17:03 p3rln00b s: Int, 'AT-KEY', \(1)
17:03 SourceBaby p3rln00b, Sauce is at https://github.com/rakudo/rakudo/blob/bf7945e/src/core/Any.pm#L362
17:04 p3rln00b The defined check does nothing there...
17:05 geekosaur pretend it's c++? :p
17:05 * p3rln00b doesn't know c++
17:06 geekosaur a class is just a special case of a struct (which semantically plays a similar role to some uses of a hash)
17:07 p3rln00b ah
17:35 dogbert17 joined #perl6-dev
17:45 p3rln00b 0.o I removed that supposedly useless .defined check and got a spectest failure.
17:47 p3rln00b m: my %weather; %weather{<Philadelphia>;<tempurature humidity description>} = 7, .54, "Mostly cloudy"; dd %weather;
17:47 camelia rakudo-moar bf7945: OUTPUT«Hash %weather = {:Philadelphia(${:description("Mostly cloudy"), :humidity(0.54), :tempurature(7)})}␤»
17:48 p3rln00b Locally now gives Hash %weather = {:Philadelphia(${:description("Mostly cloudy")})}
17:57 * p3rln00b is so confused.
17:58 p3rln00b I placed dd [ SELF, SELF.defined ]; inside AT-KEY(Any:U \SELF).... And both with { SELF.defined || (SELF = Hash.new); and with { SELF = Hash.new; it prints 3 Anys with Bool::False for .defined, YET, somehow removing that SELF.defined breaks things :/
17:59 p3rln00b s: Any:U, 'defined', \()
17:59 SourceBaby p3rln00b, Something's wrong: ␤ERR: No such method 'can' for invocant of type 'Perl6::Metamodel::DefiniteHOW'␤  in sub sourcery at /home/zoffix/services/lib/CoreHackers-Sourcery/lib/CoreHackers/Sourcery.pm6 (CoreHackers::Sourcery) line 25␤  in block <unit> at -e line 6␤␤
17:59 p3rln00b s: Any, 'defined', \()
17:59 SourceBaby p3rln00b, Sauce is at https://github.com/rakudo/rakudo/blob/bf7945e/src/core/Mu.pm#L85
17:59 p3rln00b weird shit
18:06 p3rln00b Is spectest supposed to pass with --optimize=off?
18:06 timotimo well, how badly does it fail? :)
18:08 p3rln00b Last I ran it I think there were only a couple of files where there was a repeatable failure, but I think it starts to flop more without optimizer
18:09 p3rln00b The script that generates perl6.wtf coverage runs stresstest 3 times, just to weed out all the floppers
19:32 dalek nqp: 3b26b79 | (Pawel Murias)++ | src/vm/jvm/QAST/Compiler.nqp:
19:32 dalek nqp: Implement nqp::indexingoptimized on the JVM.
19:32 dalek nqp: review: https://github.com/perl6/nqp/commit/3b26b794f3
19:33 dalek nqp: eea0044 | (Pawel Murias)++ | src/vm/js/ (2 files):
19:33 dalek nqp: [js] Respect int_box hll setting when turning native ints into objects.
19:33 dalek nqp: review: https://github.com/perl6/nqp/commit/eea004422e
19:33 dalek nqp: 682f825 | (Pawel Murias)++ | t/qast/01-qast.t:
19:33 dalek nqp: Test that the int_box hll setting works.
19:33 dalek nqp: review: https://github.com/perl6/nqp/commit/682f8253bd
19:33 dalek nqp: 5a81cc9 | (Pawel Murias)++ | src/vm/js/nqp-runtime/code-ref.js:
19:33 dalek nqp: [js] Hide warning.
19:33 dalek nqp: review: https://github.com/perl6/nqp/commit/5a81cc9412
19:33 dalek nqp: e45f27a | (Pawel Murias)++ | src/vm/js/Operations.nqp:
19:33 dalek nqp: [js] Implement a noop indexingoptimized.
19:33 dalek nqp: review: https://github.com/perl6/nqp/commit/e45f27aeb4
19:33 dalek nqp: ed68a7c | (Pawel Murias)++ | src/QRegex/Cursor.nqp:
19:33 dalek nqp: Remove workaround as indexingoptimized is now avaliable on all backends.
19:40 dalek rakudo/nom: 7f16cbb | (Zoffix Znet)++ | src/core/Cool.pm:
19:40 dalek rakudo/nom: Fix Cool.IO coercion
19:40 dalek rakudo/nom:
19:40 dalek rakudo/nom: Currently, calling .IO on a type object attempts to create a new IO::Path
19:40 dalek rakudo/nom: using it, so we end up with gut-referencing warnings. This is especially
19:40 dalek rakudo/nom: harmful with coersions on optional args, as sub (IO(Str) :$foo) {}(), for
19:40 dalek rakudo/nom: example will emit undef-in-Str warnings.
19:40 dalek rakudo/nom:
19:40 dalek rakudo/nom: Do the coersion only for :D params. For :U, return an IO::Path type object.
19:40 dalek rakudo/nom:
19:40 dalek rakudo/nom: Note: not sure what the purpose of |c was. IMO, its presents allows for users
19:40 dalek rakudo/nom: to call the method with some args, expecting the args to do something.
19:40 dalek rakudo/nom: I removed it, to prevent such silent calls with args that do nothing.
19:40 dalek rakudo/nom: Stresstest passes.
19:40 p3rln00b https://github.com/rakudo/rakudo/commit/7f16cbbc4556ff8a0e7006f3caee3bb4ac0c56b4
19:43 p3rln00b s/presents/presence/;
19:43 FROGGS pmurias++ && p3rln00b++
21:35 AlexDaniel joined #perl6-dev
23:10 lizmat Zoffix: re bf7945eec5e400d9ccef3 , I'm leaning towards .Inting rhe values, rather than .round ing
23:37 travis-ci joined #perl6-dev
23:37 travis-ci Rakudo build failed. Zoffix Znet 'Revert "Move .Bag/.BagHash into Mixy"
23:37 travis-ci https://travis-ci.org/rakudo/rakudo/builds/167361698 https://github.com/rakudo/rakudo/compare/acd668ee90d0...5b6f4b6fb522
23:37 travis-ci left #perl6-dev
23:37 buggable [travis build above] ☠ Did not recognize some failures. Check results manually. All failures are on JVM only.
23:38 Zoffix lizmat, how come?
23:38 Zoffix My reasoning was we preserve as much information as possible.
23:45 Zoffix m: my @v = ^1000_000; given now { @v.map: *.Int; say now - $_ }; given now { @v.map: *.round; say now - $_ }
23:45 camelia rakudo-moar 7f16cb: OUTPUT«0.72849114␤0.7287468␤»
23:45 Zoffix m: my @v = ^1000_000; given now { @v.map: *.Int; say now - $_ }; given now { @v.map: *.round; say now - $_ }
23:45 camelia rakudo-moar 7f16cb: OUTPUT«0.7336577␤0.7050265␤»
23:45 Zoffix m: my @v = ^1000_000; given now { @v.map: *.Int; say now - $_ }; given now { @v.map: *.round; say now - $_ }
23:45 camelia rakudo-moar 7f16cb: OUTPUT«0.7292247␤0.7043846␤»
23:46 Zoffix m: my @v = ^1000_000 .map: *+rand; given now { @v.map: *.Int; say now - $_ }; given now { @v.map: *.round; say now - $_ }
23:46 camelia rakudo-moar 7f16cb: OUTPUT«1.4653255␤7.037124␤»
23:47 Zoffix .round is a lot slower, but then we make a language design decision to sacrifice some accuracy based on a particular implementation's perfomance. ¯\_(ツ)_/¯
23:48 Zoffix lizmat, that's my reasoning basically. If you feel .Int is a better choice, please change it. You have more experience with this thing :)
23:50 TimToady if we're totally into preserving information, we shouldn't allow the coercion in the first place :)
23:50 TimToady but nowhere else in the language do we default to rounding
23:52 TimToady m: say (0..10)[4.6]
23:52 camelia rakudo-moar 7f16cb: OUTPUT«4␤»
23:52 TimToady truncation is usually more in line with modular arithmetical thinking
23:54 TimToady so we tend to require people to specify rounding explicitly when that's what they want
23:55 TimToady we could, for instance, have an explicit .round method on a Mix that returns a Bag
23:56 Zoffix OK. Changing to Int :)

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