Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Fixed dice.pl #1

Closed
wants to merge 1 commit into from

4 participants

@tadzik
Collaborator

pick :replace is now .roll

@colomon
Collaborator

The problem with this is that (at least in theory) the scripts are supposed to run on older versions of Rakudo as well as the current versions. Did the first R* release have .roll?

@colomon
Collaborator

Whoops, didn't mean to close that. Still not quite used to this interface.

@nunorc
Collaborator

Right, for example, for rakudo-star-2010.07:

Method 'roll' not found for invocant of class 'Range'

@colomon
Collaborator

smashz, it seems like we might need some sort of meta-data that would allow us to select different versions of the source code for different Rakudos. Could you make the benchmark testing code available so we can take a stab at implementing that? (Not to mention let the rest of us run the code at home?)

Thanks!

@tadzik
Collaborator

Well, we can always either try{}, or use $*PERL in the beginning of the script

@nunorc
Collaborator

@colomon sure, i'll make the scripts available has soon has i have some time, but don't expect anything fancy

@xfix xfix closed this pull request from a commit
GlitchMr Fix #1 by conditional roll subroutine. 45e025b
@xfix xfix closed this in 45e025b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Dec 5, 2010
  1. @tadzik

    Fixed dice.pl

    tadzik authored
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 1 deletion.
  1. +1 −1  dice.pl
View
2  dice.pl
@@ -2,7 +2,7 @@
my @count = 0 xx 20;
for ^$chars-to-roll {
- my @a = (^6).map({ [+] (1..6).pick(4, :replace).sort(-*)[^3] }).sort(-*);
+ my @a = (^6).map({ [+] (1..6).roll(4).sort(-*)[^3] }).sort(-*);
for @a { @count[$_]++ };
# say ~@a;
}
Something went wrong with that request. Please try again.