Re: can a method name contain a funny character?

2016-04-11 Thread Parrot Raiser
I hope I never run across code written by someone who thinks this is a good idea. On 4/11/16, Theo van den Heuvel wrote: > Thanks Larry for the answer and the great language. > > It is quite ok for me to start alphabetically. I use the funny char to > indicate a particular

Re: can a method name contain a funny character?

2016-04-11 Thread Theo van den Heuvel
Thanks Larry for the answer and the great language. It is quite ok for me to start alphabetically. I use the funny char to indicate a particular aspect shared by a bunch of subs operators and methods. So I tried: method term: { "Mel G.".say } However, that gives me: Bogus postfix

Re: can a method name contain a funny character?

2016-04-11 Thread Larry Wall
You have to write it like this: class Foo { method ::('❤') { "mem heart".say } } my Foo $foo .= new; $foo.'❤'(); Other than that, only names beginning alphabetically are allowed. You could work around this on the caller end with a postfix:<❤>, but that would be an

Re: Union

2016-04-11 Thread David Warring
Hi Marcel, With regard to checking for endianess. I don't think there's anything built in NativeCall that directly determines this, but hopefuly the following should do it, without resorting to a C compiler. use NativeCall; sub little-endian returns Bool { my $i = CArray[uint32].new:

Re: Union

2016-04-11 Thread Marcel Timmerman
Hi Thanks for your answer. I was thinking in perl6, I should have been more  explicit. At the moment I am converting Num to a float representation in my  BSON module and was wondering if there where easier ways and maybe faster too. Regards, Marcel --- Forwarded message --- From: Marcel

Union

2016-04-11 Thread Marcel Timmerman
Hi, While the perl language already offers so much I have a question not found in perl Is there anything like the C union to do an easy mapping from some native variable to a buf of the same number of bytes? This is a nice helper for pack/unpack for native values. It is important to know