Re: Carp and Croak

2015-03-17 Thread Tom Browder
On Sun, Mar 15, 2015 at 8:32 PM, Tom Browder  wrote:
> How can I replace Carp and Croak in Perl 6?

According to TimToady on #perl6, "to be honest, we haven't thought
much about carp/croak yet."

So I'm using "die" until something better comes along.

-Tom


Trig Functions "to-radians" and "from-radians"

2015-03-17 Thread Tom Browder
Those two functions are documented here:

http://design.perl6.org/S32/Numeric.html#Trigonometric_functions

but I have tried to use them with no luck:

  say 10.to-radians(Degrees);

Undeclared name:
Degrees used at line 9

So how does one use the two functions?

Best,

-Tom


Re: Trig Functions "to-radians" and "from-radians"

2015-03-17 Thread Paul Cochrane
Hi Tom,

On Tue, Mar 17, 2015 at 12:52:42PM -0500, Tom Browder wrote:
> Those two functions are documented here:
> 
> http://design.perl6.org/S32/Numeric.html#Trigonometric_functions
> 
> but I have tried to use them with no luck:
> 
>   say 10.to-radians(Degrees);
> 
> Undeclared name:
> Degrees used at line 9
> 
> So how does one use the two functions?

it seems that to-radians() is specified, but not yet implemented in Rakudo
(see, for example line 71 in
https://github.com/perl6/roast/blob/master/S32-num/cool-num.t; the test is
skipped for Rakudo).

BTW: doc.perl6.org is a good resource for documentation of the currently
implemented parts of the spec.  The written spec has also come to mean
"speculation" rather than "specification".  The specification is basically
the roast test suite at present.

Hope that helps,

Paul


Re: Trig Functions "to-radians" and "from-radians"

2015-03-17 Thread Tom Browder
On Tue, Mar 17, 2015 at 1:54 PM, Paul Cochrane  wrote:
> Hi Tom,
>
> On Tue, Mar 17, 2015 at 12:52:42PM -0500, Tom Browder wrote:
>> Those two functions are documented here:
>>
>> http://design.perl6.org/S32/Numeric.html#Trigonometric_functions
>>
>> but I have tried to use them with no luck:
>>
>>   say 10.to-radians(Degrees);
>>
>> Undeclared name:
>> Degrees used at line 9
>>
>> So how does one use the two functions?
>
> it seems that to-radians() is specified, but not yet implemented in Rakudo
> (see, for example line 71 in
> https://github.com/perl6/roast/blob/master/S32-num/cool-num.t; the test is
> skipped for Rakudo).
>
> BTW: doc.perl6.org is a good resource for documentation of the currently
> implemented parts of the spec.  The written spec has also come to mean
> "speculation" rather than "specification".  The specification is basically
> the roast test suite at present.

Thanks, Paul!

-Tom