Hello.
I think the tail call is optimized in the following Perl 5 code.
How can I do the same in Perl 6?
--
#!/usr/bin/env perl
v5;
use strict;
use warnings;
local $\ = "\n";
sub reduce_sum($$)
{
my ($sum, $range) = @_;
return $$sum unless @$range;
my $lhs = shift @$ran
On 11/16/2016 09:17 PM, Zoffix Znet via RT wrote:
On Wed, 16 Nov 2016 03:01:30 -0800, mt1...@gmail.com wrote:
Hi,
On windows the path created by method resolve on windows is prefixed
with a '\' which is wrong
e.g. in project config-datalang-refine on appveyor the statement
say 'Resolve: '
Addning to Jan's answer,
PerlMonks is still a great place for answers on Perl5 topics (and even some
Perl6) http://perlmonks.org/
> I still do not have perl 6 support on rhel 7.2
Don't know how much of an "early adopter" you want to be- if that's
an option, try building Rakudo from source, so yo
On Thu, 11 Aug 2016 09:32:31 -0700, zef...@fysh.org wrote:
> > "-0".Num.perl
> 0e0
>
> It's surprising that that's producing a floating-point positive zero,
> rather than the negative zero that is also available:
>
> > (-("0".Num)).perl
> -0e0
>
> -zefram
Thanks for the report. Are you able to
On Thu, Nov 17, 2016 at 10:13 AM, Zoffix Znet via RT <
perl6-bugs-follo...@perl.org> wrote:
>
> The reason we have a negative floating point zero at all is more due to
> underlying implementations at whose level such zeros are used to signal
> various exceptions. But such usage isn't needed on Perl
On Thu, Nov 17, 2016 at 2:08 AM, ToddAndMargo wrote:
> Would you guys tolerate a perl 5 question every so often?
Quite a few of the folks who work on Perl 6 don't know Perl 5, or at least
know it only incidentally.
--
brandon s allbery kf8nh sine nomine associate
More discussion on IRC:
https://irclog.perlgeek.de/perl6-dev/2016-11-17#i_13584755
So it seems a fix is indeed needed.
On Sat, 10 Sep 2016 23:17:33 -0700, sml...@gmail.com wrote:
> Comparison table of the different cases of "zero to the zeroeth power"
> in Rakudo:
>
> nn**00**nn**n
> - - - -
> 0 1 1 1
> 0.0 1
On 11/16/2016 11:27 PM, Jan Ingvoldstad
wrote:
On Thu, Nov 17, 2016 at 8:08 AM,
ToddAndMargo
wrote:
Hi All,
Would you guys tolerate a perl 5 question every s
On 11/17/2016 08:18 AM, Brandon Allbery
wrote:
On Thu, Nov 17, 2016 at 2:08 AM,
ToddAndMargo
wrote:
Would
you guys tolerate a perl 5 question every so often?
On Thu, Nov 17, 2016 at 3:03 PM, ToddAndMargo wrote:
> And quiet a few perl 5 programmers are REALLY GRUMPY/CRABBY
> about perl 6. I don't get it.
>
I think mostly this is history: the original perl 6 development team
languished for many years producing basically nothing while promising
everyth
On 11/17/2016 05:34 AM, yary wrote:
Addning to Jan's answer,
PerlMonks is still a great place for answers on Perl5
topics (and even some Perl6) http://perlmonks.org/
> I still do not have perl 6 suppor
Hiroki,
> On 17 Nov 2016, at 10:49, Hiroki Horiuchi wrote:
> I think the tail call is optimized in the following Perl 5 code.
Are you sure? Have you benchmarked it? I seem to recall that using goto like
that in Perl 5 only makes sure that any backtrace doesn’t get longer. But that
it comes
# New Ticket Created by Zoffix Znet
# Please include the string: [perl #130123]
# in the subject line of all future correspondence about this issue.
# https://rt.perl.org/Ticket/Display.html?id=130123 >
The Instant.from-posix adds leap seconds to the provided argument:
m: say Instant.
> On 17 Nov 2016, at 21:51, Zoffix Znet (via RT)
> wrote:
>
> # New Ticket Created by Zoffix Znet
> # Please include the string: [perl #130123]
> # in the subject line of all future correspondence about this issue.
> # https://rt.perl.org/Ticket/Display.html?id=130123 >
>
>
>
> The Instan
> On 17 Nov 2016, at 21:51, Zoffix Znet (via RT)
> wrote:
>
> # New Ticket Created by Zoffix Znet
> # Please include the string: [perl #130123]
> # in the subject line of all future correspondence about this issue.
> # https://rt.perl.org/Ticket/Display.html?id=130123 >
>
>
>
> The Instan
# New Ticket Created by Aleks-Daniel Jakimenko-Aleksejev
# Please include the string: [perl #130124]
# in the subject line of all future correspondence about this issue.
# https://rt.perl.org/Ticket/Display.html?id=130124 >
*Code:*
say ‘abcefgh’ ~~ / .**{0..NaN} /
*Result:*
This type cannot
# New Ticket Created by Aleks-Daniel Jakimenko-Aleksejev
# Please include the string: [perl #130125]
# in the subject line of all future correspondence about this issue.
# https://rt.perl.org/Ticket/Display.html?id=130125 >
*Code:*
say ‘abcefghij’ ~~ / .**{-10..-5} /
*Result:*
「abcefghij」
I
# New Ticket Created by Aleks-Daniel Jakimenko-Aleksejev
# Please include the string: [perl #130127]
# in the subject line of all future correspondence about this issue.
# https://rt.perl.org/Ticket/Display.html?id=130127 >
*Code:*
say ‘abcefghij’ ~~ / .**{0..^2} /
*Result:*
「ab」
I expected
Perl5 goto &func definitely doesn't grow the stack:
perl -E '$n = 0; sub wah { return if $_[0] < 1; $n++; @_=($_[0]-1);
goto &wah; }; wah(shift); say "done $n"' 1000
But IIRC goto &func is more about fooling caller() than TCO, so its
not that really fast thing some users expect.
On 18 Novemb
20 matches
Mail list logo