Re: Trying to make a new operator

2006-09-22 Thread Markus Laire
On 9/22/06, Richard Hainsworth <[EMAIL PROTECTED]> wrote: Biggest problems are the following: a) finding the symbols - I had to use two editors, and getting them to show them on screen Good place to see all of the symbols in Unicode is http://unicode.org/charts/symbols.html (a lot of PDF-files

Re: Trying to make a new operator

2006-09-22 Thread Richard Hainsworth
Steffen Schwigon wrote: Thanks for reporting the solution back. And it even works with unicode operators. Looks like we finally really get our "ankh, pentagram, and that smiley teddy bear from that Grateful Dead album". (*) :-) Thanks to Unicode, thanks to Pugs So hopefully in the same spir

Re: Trying to make a new operator

2006-09-20 Thread Steffen Schwigon
Richard Hainsworth <[EMAIL PROTECTED]> writes: > Thanks for help. For anyone else, the following works. > > sub infix: {...}; > > (32 grew_by_to 48).say; > > sub infix: ($left, $right) { > return ($right/$left - 1) * 100 ~ '%'; > }; Thanks for reporting the solution back. And it even works wi

Re: Trying to make a new operator

2006-09-20 Thread Richard Hainsworth
Thanks for help. For anyone else, the following works. sub infix: {...}; (32 grew_by_to 48).say; sub infix: ($left, $right) { return ($right/$left - 1) * 100 ~ '%'; }; Yuval Kogman wrote: On Sun, Sep 17, 2006 at 16:35:39 +0100, Daniel Hulme wrote: What am I doing wrong? Sounds

Re: Trying to make a new operator

2006-09-17 Thread Yuval Kogman
On Sun, Sep 17, 2006 at 16:35:39 +0100, Daniel Hulme wrote: > > What am I doing wrong? > Sounds like you need to define (or at least declare) the new operator > before you use it. Perl 6, like Perl 5 compiles with a single pass, so > when you are using your random operator, it hasn't yet read the >

Re: Trying to make a new operator

2006-09-17 Thread Daniel Hulme
> What am I doing wrong? Sounds like you need to define (or at least declare) the new operator before you use it. Perl 6, like Perl 5 compiles with a single pass, so when you are using your random operator, it hasn't yet read the declaration further down the file. It does its best to DTRT with mos