Re: Set difference using hashes vs array

2017-11-23 Thread ToddAndMargo
On 11/23/2017 06:09 PM, Brandon Allbery wrote: On Thu, Nov 23, 2017 at 9:06 PM, ToddAndMargo > wrote: On 11/22/2017 08:41 PM, Norman Gaywood wrote: my Set $take1 = (%all (-) %remove) (-) %excludes; What does "Set" do in the above? Declares a typ

Re: Set difference using hashes vs array

2017-11-23 Thread Brandon Allbery
On Thu, Nov 23, 2017 at 9:06 PM, ToddAndMargo wrote: > On 11/22/2017 08:41 PM, Norman Gaywood wrote: > >> my Set $take1 = (%all (-) %remove) (-) %excludes; >> > > What does "Set" do in the above? > Declares a type, which helps avoid errors. Similarly `my Int $a` means $a can only take Int values

Re: Set difference using hashes vs array

2017-11-23 Thread ToddAndMargo
On 11/22/2017 08:41 PM, Norman Gaywood wrote: my Set $take1 = (%all (-) %remove) (-) %excludes; What does "Set" do in the above?

Re: Set difference using hashes vs array

2017-11-23 Thread Elizabeth Mattijsen
Fixed with https://github.com/rakudo/rakudo/commit/eacf9b2776 . Thanks for reporting! > On 23 Nov 2017, at 05:27, Norman Gaywood wrote: > > Talking to myself :-) > > Seems it has something to do with the values in the hash. If they are just > True, this works: > $ perl6 > To exit type 'exi

Re: [perl #130982] [PERF] "for $a..$b -> $i { ... }" loops are sometimes much slower than c-style loops

2017-11-23 Thread Elizabeth Mattijsen via RT
> On 22 Nov 2017, at 19:31, Timo Paulssen via RT > wrote: > On Mon, 20 Nov 2017 12:13:47 -0800, ronaldxs wrote: >> What about a native perl6 range loop? Couldn't there be some way for >> Perl 6 / Rakudo to generate code competitive on a small range with the >> "native-loop" example? >> >> perl6

Re: [perl #130982] [PERF] "for $a..$b -> $i { ... }" loops are sometimes much slower than c-style loops

2017-11-23 Thread Elizabeth Mattijsen
> On 22 Nov 2017, at 19:31, Timo Paulssen via RT > wrote: > On Mon, 20 Nov 2017 12:13:47 -0800, ronaldxs wrote: >> What about a native perl6 range loop? Couldn't there be some way for >> Perl 6 / Rakudo to generate code competitive on a small range with the >> "native-loop" example? >> >> perl6

Re: Set difference using hashes vs array

2017-11-23 Thread Elizabeth Mattijsen
Will have a look at this in about 12 hours (probably). Meanwhile, don’t let that stop anyone from figuring this out :-) > On 23 Nov 2017, at 05:27, Norman Gaywood wrote: > > Talking to myself :-) > > Seems it has something to do with the values in the hash. If they are just > True, this w