[sf-perl] Perl 6 Informal Study Session: 1pm Sunday April 22nd, at the Oakland Museum

David Christensen dpchrist at holgerdanske.com
Sun Apr 22 19:09:03 PDT 2018


sanfrancisco-pm:

Thank you, Joe, for organizing today's meeting, and Bill for attending.  :-)


Here are the links to books I mentioned:

https://hop.perl.plover.com/

http://mitpress.mit.edu/sites/default/files/sicp/index.html

https://www.pearson.com/us/higher-education/program/Brooks-Mythical-Man-Month-The-Essays-on-Software-Engineering-Anniversary-Edition-2nd-Edition/PGM172844.html


Here is the function that grows really fast:

2018-04-22 19:03:14 dpchrist at vstretch ~/sandbox/perl
$ cat growth
sub f
{
     my $n = shift @_;
     my $r = $n;
     for (2 .. $n) {
	$r = $n ** $r;
     }
     return $r;
}

print join ' ', $_, f($_), "\n" for 1 .. 4;

2018-04-22 19:03:27 dpchrist at vstretch ~/sandbox/perl
$ perl growth
1 1
2 4
3 7625597484987
4 Inf

2018-04-22 19:03:30 dpchrist at vstretch ~/sandbox/perl
$ perl6 growth
1 1
2 4
3 7625597484987
Numeric overflow
   in sub f at growth line 6
   in block <unit> at growth line 11

Actually thrown at:
   in block <unit> at growth line 11


David


More information about the SanFrancisco-pm mailing list