Re: bitwise paper?

2018-10-05 Thread ToddAndMargo via perl6-users
On 10/2/18 9:15 PM, David Green wrote: On 2018-10-02 9:57 pm, ToddAndMargo wrote: Does anyone know of a paper out in web land showing how to do bitwise operations? $ p6 'my $v = 32 & 16; say $v;' If you search docs.perl6.org for "bitwise" you will find "+&": https://docs.perl6.org/language/op

Re: bitwise paper?

2018-10-05 Thread David Green
On 2018-10-02 9:57 pm, ToddAndMargo wrote: Does anyone know of a paper out in web land showing how to do bitwise operations? Trying to AND 0010 with 0001 $ p6 'my $v = 32 & 16; say $v;' If you search docs.perl6.org for "bitwise" you will find "+&": https://docs.perl6.org/language/op

Re: bitwise paper?

2018-10-05 Thread David Green
On 2018-10-02 9:57 pm, ToddAndMargo wrote: Does anyone know of a paper out in web land showing how to do bitwise operations? $ p6 'my $v = 32 & 16; say $v;' If you search docs.perl6.org for "bitwise" you will find "+&": https://docs.perl6.org/language/operators#infix_+&; And sure enough, 'say

Re: bitwise paper?

2018-10-04 Thread ToddAndMargo
On 10/4/18 10:01 AM, ToddAndMargo wrote: On 10/3/18 7:16 PM, ToddAndMargo wrote: Bitwise "IN" (Does y exist in x): $ p6 'my $x=0b1001; my $y=0b0101; my $z=$x +& $y; say so $y == $z;' False $ p6 'my $x=0b1001; my $y=0b1001; my $z=$x +& $y; say so $y == $z;' True p5 not

Re: bitwise paper?

2018-10-04 Thread ToddAndMargo
On 10/3/18 7:16 PM, ToddAndMargo wrote: Bitwise "IN" (Does y exist in x):     $ p6 'my $x=0b1001; my $y=0b0101; my $z=$x +& $y; say so $y == $z;'     False     $ p6 'my $x=0b1001; my $y=0b1001; my $z=$x +& $y; say so $y == $z;'     True     p5 not figured out yet $ p5 'my $x = 0b100

Re: bitwise paper?

2018-10-03 Thread ToddAndMargo
On 10/3/18 7:46 PM, Trey Harris wrote: Assuming you are suggesting your examples are showing differences between the languages, in all your examples of differences between Perl 6 and Perl 5 below, you are using the wrong operator or you changed one of the arguments between the Perl 5 and Perl 6

Re: bitwise paper?

2018-10-03 Thread Trey Harris
Todd, Assuming you are suggesting your examples are showing differences between the languages, in all your examples of differences between Perl 6 and Perl 5 below, you are using the wrong operator or you changed one of the arguments between the Perl 5 and Perl 6 examples. I won't go through them

Re: bitwise paper?

2018-10-03 Thread ToddAndMargo
My keeper file so far: Perl: bitwise operators: alias p5='perl6 -E' alias p6='perl6 -e' Bitwise AND: $ p6 'my $v = 32 +& 16; say $v;' 0 $ p5 'my $v = 32 & 16; say $v;' 0 Bitwise OR: $ p5 'my $v = 32 | 16; say $v;' 48 $ p6 'my $v = 32 +| 16; say $v;' 48 Bit

Re: bitwise paper?

2018-10-03 Thread ToddAndMargo
> I'm looking at > https://docs.perl6.org/language/operators#index-entry-Numeric_bitwise_AND_operator > right now and it has entries for every bitwise operator. I suggest you > hold down the SHIFT key and press reload to clear your browser cache. > > > > But, now that I know what to look f

Re: bitwise paper?

2018-10-03 Thread Trey Harris
On Wed, Oct 3, 2018 at 20:56 ToddAndMargo wrote: > On 10/3/18 1:50 PM, Trey Harris wrote: > > > > On Wed, Oct 3, 2018 at 13:38 ToddAndMargo > > wrote: > > > > > Go to docs.perl6.org > > . Type "bitwise" into th

Re: bitwise paper?

2018-10-03 Thread ToddAndMargo
On 10/3/18 1:50 PM, Trey Harris wrote: On Wed, Oct 3, 2018 at 13:38 ToddAndMargo > wrote: > Go to docs.perl6.org . Type "bitwise" into the > search box. You will see a popup, "Numeric bitwise AND operato

Re: bitwise paper?

2018-10-03 Thread Trey Harris
On Wed, Oct 3, 2018 at 13:38 ToddAndMargo wrote: > > Go to docs.perl6.org . Type "bitwise" into the > > search box. You will see a popup, "Numeric bitwise AND operator". Click > > it to be taken to > > > https://docs.perl6.org/language/operators#index-entry-Numeric_bitwise_

Re: bitwise paper?

2018-10-03 Thread ToddAndMargo
On 10/2/18 9:46 PM, Trey Harris wrote: On Tue, Oct 2, 2018 at 23:57 ToddAndMargo > wrote: Hi All, Does anyone know of a paper out in web land showing how to do bitwise operations?  DuckDuckGo give me tons of hits for Perl 5. Trying to AND 001

Re: bitwise paper?

2018-10-03 Thread ToddAndMargo
On 10/2/18 10:16 PM, David Green wrote: On 2018-10-02 9:57 pm, ToddAndMargo wrote: Does anyone know of a paper out in web land showing how to do bitwise operations? Trying to AND 0010 with 0001 $ p6 'my $v = 32 & 16; say $v;' If you search docs.perl6.org for "bitwise" you will find

Re: bitwise paper?

2018-10-02 Thread David Green
On 2018-10-02 9:57 pm, ToddAndMargo wrote: Does anyone know of a paper out in web land showing how to do bitwise operations? Trying to AND 0010 with 0001 $ p6 'my $v = 32 & 16; say $v;' If you search docs.perl6.org for "bitwise" you will find "+&": https://docs.perl6.org/language/op

Re: bitwise paper?

2018-10-02 Thread Trey Harris
On Tue, Oct 2, 2018 at 23:57 ToddAndMargo wrote: > Hi All, > > Does anyone know of a paper out in web land showing how to > do bitwise operations? DuckDuckGo give me tons of hits > for Perl 5. > > Trying to AND 0010 with 0001 > > $ p6 'my $v = 32 & 16; say $v;' > all(32, 16) > > should

bitwise paper?

2018-10-02 Thread ToddAndMargo
Hi All, Does anyone know of a paper out in web land showing how to do bitwise operations? DuckDuckGo give me tons of hits for Perl 5. Trying to AND 0010 with 0001 $ p6 'my $v = 32 & 16; say $v;' all(32, 16) should give me . I have a nice paper on Perl 5. I don't think th