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/operators#infix_+;

And sure enough, 'say 32 +& 16' will return '0'.

The other bitwise operators work likewise: almost the same as Perl 5, 
but with a "+" in front (to indicate that they are numeric operators, as 
opposed to plain "&", "|", etc., which are now junctions... and yes, 
there is https://docs.perl6.org/type/Junction for those who dare!).



-David


P.S. Actually, the search returns:
https://docs.perl6.org/language/operators#index-entry-Numeric_bitwise_AND_operator 


...instead of the correct fragment: "#infix_+&"



Hi Brad,

Thank you.  I did find that.  I was hoping to find them all in the
same place, but instead kept searching until I found the ones
I use.  I posted them somewhere else in this thread.

Did I miss a pattern test?

$ 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

It is an easy sub to write, if not.

-T


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 32 +& 16' will return '0'.

The other bitwise operators work likewise: almost the same as Perl 5, 
but with a "+" in front (to indicate that they are numeric operators, as 
opposed to plain "&", "|", etc., which are now junctions... and yes, 
there is https://docs.perl6.org/type/Junction for those who dare!).



-David


P.S. Actually, the search returns:
https://docs.perl6.org/language/operators#index-entry-Numeric_bitwise_AND_operator
...instead of the correct fragment: "#infix_+&"


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 figured out yet


     $ p5 'my $x = 0b1001; my $y = 0b1000; say qw(false true)[($x & $y) 
== $y]'

     true

     $ p5 'my $x = 0b1001; my $y = 0b0100; say qw(false true)[($x & $y) 
== $y]'

     false


The above is a thing of beauty.  But Perl 6's is even prettier!


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 = 0b1001; my $y = 0b1000; say qw(false true)[($x & $y) 
== $y]'

true

$ p5 'my $x = 0b1001; my $y = 0b0100; say qw(false true)[($x & $y) 
== $y]'

false


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 examples.


I won't go through them each, but for example '> 3' is the greater-than 
operator in Perl 5; 0b0001_0100 (20) is greater than 3, so the answer is 
1 (true). And in your bitwise shift left, you're shifting by 2 in Perl 6 
but by 3 in Perl 5. And so on.




Hi Trey,

Ah poop!  I made another booboo.  Mumble, mumble.

corrected:
$ p5 'my $v = 0b0100 << 3; say $v;'
32

This is my own reference.  I do still maintain a few p5 programs
so I was writing a one size fits all.

Thank you for the catch!

-T


My Keepers is basically a directory by subject:

perl6.String.to.Integer.txt
perl6.string.words.example.txt
perl6.string.zeros.remove.leading.txt
perl6.subroutines.passing.arrays.and.hashes.html
perl6.subroutines.txt
perl6.subs.calling.ones.self.txt
perl6.subs.name.of.sub.txt
perl6.succ.successor.txt
perl6.syntax.check.txt
perl6.syntax.txt

145 of them now.  They are my first line of reference when programming.

For instance: perl6.String.to.Integer.txt  (notice how I start
simple and them more up):



Perl 6: convert String to Integer and Integer to String:


String to Integer:
   $ p6 'my Str $x = "122333"; my Int $y = $x.Int; say $y;'
   122333

   $ p6 'my Int $x; my Str $y = "5"; $x = "$y" + 0; say "$x";'
   5


Integer to String:
   $ p6 'my Int $x = 122333; my Str $y = $x.Str; say $y;'
   122333

   $ p6 'my Str $x; my Int $y = 9; $x = "$y"; say "$x";'
   9

   $ p6 'my Str $x = "1\n22\n333\n"; my Int @y; @y = ( split "\n", $x, 
:skip-empty )>>.Int; for @y -> Int $i {say $i;}'

   1
   22
   333

   $ p6 'my Str $x = "1\n22\n333\n"; my Int @y; for ( split "\n", $x, 
:skip-empty )>>.Int -> $i {say $i;}'

   1
   22
   333


"dd":
   $ p6 'my Str $x = "5"; my Int $y = dd +$x; say $y'
   5
   (Int)

   $ p6 'my Int $y = 7; my Str $x = dd ~$y; say $x'
   "7"
   (Str)


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 each, but for example '> 3' is the greater-than
operator in Perl 5; 0b0001_0100 (20) is greater than 3, so the answer is 1
(true). And in your bitwise shift left, you're shifting by 2 in Perl 6 but
by 3 in Perl 5. And so on.

If you weren't trying to show differences between the languages but had
some other reason for changing multiple controls at once, never mind me; I
don't know how your "keeper file" works.

(But I should point out that since you at least at some point suggested
it's the sort of stuff you'd like to see in the docs, we don't give Perl 5
comparisons in the part of the docs that don't relate to Perl 5 (just in
the Perl 5 to Perl 6 Guide docs and _very_ rarely in a couple of other
cases that represent bad traps for those who might assume something works
like it does in Perl 5), and when we do give side-by-side examples of two
things, authors have tried to give example that change the minimum required
to show the difference and no more.)


On Wed, Oct 3, 2018 at 22:16 ToddAndMargo  wrote:

> 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
>
>
> Bitwise shift left:
>  $ p6 'my $v = 0b0100 +< 2; say $v;'
>  16
>
>  $ p5 'my $v = 0b0100 << 3; say $v;'
>  32
>
>
>
> Bitwise shift right:
>  $ p5 'my $v = 0b00010100 > 3; say $v;'
>  1
>
>  $ p6 'my $v = 0b00110100 +> 3; say $v;'
>  6
>
>
> Bitwise XOR:
>  $ p5 'my $v = 0b00101101 ^ 0b1001; say $v;'
>  36
>
>  $ p6 'my $v = 0b1101 +^ 0b1001; say $v;'
>  4
>
>
> Bitwise Compliment (flip the bits):
>  $ p5 'my $x = 0b00101101; my $y= (~$x); my $z= (~$y); say
> "$x\n$y\n$z"; '
>  45
>  18446744073709551570
>  45
>
>  $ p6 'my $x = 0b00101101; my $y= (+^$x); my $z= (+^$y); say
> "$x\n$y\n$z"; '
>  45
>  -46
>  45
>
>
> 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
>


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


Bitwise shift left:
$ p6 'my $v = 0b0100 +< 2; say $v;'
16

$ p5 'my $v = 0b0100 << 3; say $v;'
32



Bitwise shift right:
$ p5 'my $v = 0b00010100 > 3; say $v;'
1

$ p6 'my $v = 0b00110100 +> 3; say $v;'
6


Bitwise XOR:
$ p5 'my $v = 0b00101101 ^ 0b1001; say $v;'
36

$ p6 'my $v = 0b1101 +^ 0b1001; say $v;'
4


Bitwise Compliment (flip the bits):
$ p5 'my $x = 0b00101101; my $y= (~$x); my $z= (~$y); say 
"$x\n$y\n$z"; '

45
18446744073709551570
45

$ p6 'my $x = 0b00101101; my $y= (+^$x); my $z= (+^$y); say 
"$x\n$y\n$z"; '

45
-46
45


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


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 for, I will find the rest, so
> no one offer additional help, unless they just want to.
>
> My goal is to write up a Keeper file for this.  I will post it
> back on this thread when I finish.
>
> -T
>

On 10/3/18 6:00 PM, Trey Harris wrote:


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 mailto:toddandma...@zoho.com>
 > >> 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_AND_operator,
 >
 >      > which will tell you the bitwise AND operator in Perl 6 is +&.
 >      >
 >      > Run the same command with +& and you will get the answer 0.
 >      >
 >      > If, on the other hand, you go to docs.perl6.org

 >      ,
 >      > and type "&" into the search box, you will see under "Infix"
 >     (since you
 >      > used the operator between two things, it is Infix, as the docs
 >     say if
 >      > you type "infix" into the search box and click the first
entry under
 >      > "Reference"; I have no idea how you'd divine that such a
thing is
 >     called
 >      > an infix operator aside from common programming parlance,
but if you
 >      > have an idea how that might be expressed it can easily be
added
 >     to the
 >      > index) that the first entry is "&".
 >      >
 >      > Click on this "&" and you are taken to
 > https://docs.perl6.org/routine/;
 >      > which rather clearly says it returns an all Junction.
 >      >
 >      > So I wonder why were you under the impression that the
above "should
 >      > give [you]  "?
 >      >
 >      > Trey
 >
 >
 >     Thank you.
 >
 >     Looks like I am going to have to look them up one at a time.
 >
 >
 > Just because you get to a specific place on a page by typing
something
 > into the search box doesn't mean you can't scroll up and down on the
 > page anyway. You can do the same from +& and see the other
operators, too.
 >

Hi Trey,

That page only give me one page and nothing to scroll up or down on.






Oh, you know what, I had clicked on

https://docs.perl6.org/routine/;

Thank you!


--
~
I am Windows
I am the Blue Screen of Death
No one hears your screams
~


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 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_AND_operator
> ,
> >
> >  > which will tell you the bitwise AND operator in Perl 6 is +&.
> >  >
> >  > Run the same command with +& and you will get the answer 0.
> >  >
> >  > If, on the other hand, you go to docs.perl6.org
> >  ,
> >  > and type "&" into the search box, you will see under "Infix"
> > (since you
> >  > used the operator between two things, it is Infix, as the docs
> > say if
> >  > you type "infix" into the search box and click the first entry
> under
> >  > "Reference"; I have no idea how you'd divine that such a thing is
> > called
> >  > an infix operator aside from common programming parlance, but if
> you
> >  > have an idea how that might be expressed it can easily be added
> > to the
> >  > index) that the first entry is "&".
> >  >
> >  > Click on this "&" and you are taken to
> > https://docs.perl6.org/routine/;
> >  > which rather clearly says it returns an all Junction.
> >  >
> >  > So I wonder why were you under the impression that the above
> "should
> >  > give [you]  "?
> >  >
> >  > Trey
> >
> >
> > Thank you.
> >
> > Looks like I am going to have to look them up one at a time.
> >
> >
> > Just because you get to a specific place on a page by typing something
> > into the search box doesn't mean you can't scroll up and down on the
> > page anyway. You can do the same from +& and see the other operators,
> too.
> >
>
> Hi Trey,
>
> That page only give me one page and nothing to scroll up or down on.



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 for, I will find the rest, so
> no one offer additional help, unless they just want to.
>
> My goal is to write up a Keeper file for this.  I will post it
> back on this thread when I finish.
>
> -T
>


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 operator".
Click
 > it to be taken to
 >

https://docs.perl6.org/language/operators#index-entry-Numeric_bitwise_AND_operator,

 > which will tell you the bitwise AND operator in Perl 6 is +&.
 >
 > Run the same command with +& and you will get the answer 0.
 >
 > If, on the other hand, you go to docs.perl6.org
 ,
 > and type "&" into the search box, you will see under "Infix"
(since you
 > used the operator between two things, it is Infix, as the docs
say if
 > you type "infix" into the search box and click the first entry under
 > "Reference"; I have no idea how you'd divine that such a thing is
called
 > an infix operator aside from common programming parlance, but if you
 > have an idea how that might be expressed it can easily be added
to the
 > index) that the first entry is "&".
 >
 > Click on this "&" and you are taken to
https://docs.perl6.org/routine/;
 > which rather clearly says it returns an all Junction.
 >
 > So I wonder why were you under the impression that the above "should
 > give [you]  "?
 >
 > Trey


Thank you.

Looks like I am going to have to look them up one at a time.


Just because you get to a specific place on a page by typing something 
into the search box doesn't mean you can't scroll up and down on the 
page anyway. You can do the same from +& and see the other operators, too.




Hi Trey,

That page only give me one page and nothing to scroll up or down on.

But, now that I know what to look for, I will find the rest, so
no one offer additional help, unless they just want to.

My goal is to write up a Keeper file for this.  I will post it
back on this thread when I finish.

-T


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_AND_operator,
>
> > which will tell you the bitwise AND operator in Perl 6 is +&.
> >
> > Run the same command with +& and you will get the answer 0.
> >
> > If, on the other hand, you go to docs.perl6.org ,
>
> > and type "&" into the search box, you will see under "Infix" (since you
> > used the operator between two things, it is Infix, as the docs say if
> > you type "infix" into the search box and click the first entry under
> > "Reference"; I have no idea how you'd divine that such a thing is called
> > an infix operator aside from common programming parlance, but if you
> > have an idea how that might be expressed it can easily be added to the
> > index) that the first entry is "&".
> >
> > Click on this "&" and you are taken to https://docs.perl6.org/routine/;
> > which rather clearly says it returns an all Junction.
> >
> > So I wonder why were you under the impression that the above "should
> > give [you]  "?
> >
> > Trey
>
>
> Thank you.
>
> Looks like I am going to have to look them up one at a time.


Just because you get to a specific place on a page by typing something into
the search box doesn't mean you can't scroll up and down on the page
anyway. You can do the same from +& and see the other operators, too.


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 0010  with 0001 

$ p6 'my $v = 32 & 16; say $v;'
all(32, 16)

should give me  .


"Should give you"? Why do you say that?


If P6 was asked correctly to do a bitwise AND,
it would give that result.  Obviously, it is
not being asked correctly.



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_AND_operator, 
which will tell you the bitwise AND operator in Perl 6 is +&.


Run the same command with +& and you will get the answer 0.

If, on the other hand, you go to docs.perl6.org , 
and type "&" into the search box, you will see under "Infix" (since you 
used the operator between two things, it is Infix, as the docs say if 
you type "infix" into the search box and click the first entry under 
"Reference"; I have no idea how you'd divine that such a thing is called 
an infix operator aside from common programming parlance, but if you 
have an idea how that might be expressed it can easily be added to the 
index) that the first entry is "&".


Click on this "&" and you are taken to https://docs.perl6.org/routine/; 
which rather clearly says it returns an all Junction.


So I wonder why were you under the impression that the above "should 
give [you]  "?


Trey



Thank you.

Looks like I am going to have to look them up one at a time.
The paper I had from Perl 5 had them all in a table.  AND, OR, NOR,
NAND, XOR, IN, shift left, shift right, etc..

-T


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 "+&":

https://docs.perl6.org/language/operators#infix_+;

And sure enough, 'say 32 +& 16' will return '0'.

The other bitwise operators work likewise: almost the same as Perl 5, 
but with a "+" in front (to indicate that they are numeric operators, as 
opposed to plain "&", "|", etc., which are now junctions... and yes, 
there is https://docs.perl6.org/type/Junction for those who dare!).



-David


P.S. Actually, the search returns:
https://docs.perl6.org/language/operators#index-entry-Numeric_bitwise_AND_operator 

...instead of the correct fragment: "#infix_+&" -- is that generated 
automatically?


Thank you.

Looks like I am going to have to look them up one at a time.
The paper I had from Perl 5 had hem in a table.  AND, OR, NOR,
NAND, XOR, IN, shift left, shift right, etc..

-T


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/operators#infix_+;

And sure enough, 'say 32 +& 16' will return '0'.

The other bitwise operators work likewise: almost the same as Perl 5, 
but with a "+" in front (to indicate that they are numeric operators, as 
opposed to plain "&", "|", etc., which are now junctions... and yes, 
there is https://docs.perl6.org/type/Junction for those who dare!).



-David


P.S. Actually, the search returns:
https://docs.perl6.org/language/operators#index-entry-Numeric_bitwise_AND_operator
...instead of the correct fragment: "#infix_+&" -- is that generated 
automatically?


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 give me  .


"Should give you"? Why do you say that?

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_AND_operator,
which will tell you the bitwise AND operator in Perl 6 is +&.

Run the same command with +& and you will get the answer 0.

If, on the other hand, you go to docs.perl6.org, and type "&" into the
search box, you will see under "Infix" (since you used the operator between
two things, it is Infix, as the docs say if you type "infix" into the
search box and click the first entry under "Reference"; I have no idea how
you'd divine that such a thing is called an infix operator aside from
common programming parlance, but if you have an idea how that might be
expressed it can easily be added to the index) that the first entry is "&".

Click on this "&" and you are taken to https://docs.perl6.org/routine/;
which rather clearly says it returns an all Junction.

So I wonder why were you under the impression that the above "should give
[you]  "?

Trey


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 they the same?

$ perl -E 'my $v = 32 & 16; say $v;'
0

$ perl -E 'my $v = 32 | 16; say $v;'
48



Many thanks,
-T