Rosetta Code/Run examples: Difference between revisions
→{{header|Raku}}: Update task for renamed language.
Thundergnat (talk | contribs) (Rename Perl 6 -> Raku, alphabetize, minor clean-up) |
Thundergnat (talk | contribs) (→{{header|Raku}}: Update task for renamed language.) |
||
Line 589:
(formerly Perl 6)
{{works with|Rakudo|2018.03}}
This is a fairly comprehensive task code runner. It is set up to work for
(Note that there is no dependency download code nor resource hash for Python and Go, though they can run a remarkable number of tasks without.)
By default, this will download the
There are several command line options to control its actions. See the README in the repository for details.
Line 612:
#####################################
say "Version = 2020-
#####################################
Line 621:
unit sub MAIN(
Str $run = '', #= Task or file name
Str :$lang = '
Int :$skip = 0, #= Skip # to continue partially into a list
Bool :f(:$force), #= Override any task skip parameter in %resource hash
Line 848:
" Did you perhaps mean:\n\n\t" ~
@tasknames.grep( {.lc.contains($title.lc) or dld($_, $title) < (5 min $title.chars)} ).join("\n\t");
} # Damerau Levenshtein distance ^^^
multi check-dependencies ($fn, 'perl6') {
Line 858 ⟶ 857:
if $module eq any('v6', 'v6.c', 'v6.d', 'nqp', 'NativeCall', 'Test') or $module.contains('MONKEY')
or $module.contains('experimental') or $module.starts-with('lib') or $module.contains('from<Perl5>') {
}
my $installed = $*REPO.resolve(CompUnit::DependencySpecification.new(:short-name($module)));
Line 905 ⟶ 904:
multi check-dependencies ($fn, $unknown) {
note "Sorry, don't know how to handle
};
multi load-lang ('
language => '
exe => '
ext => '.
dir => '
header => '
# tags marking blocks of code - spaced out to placate wiki formatter
# and to avoid getting tripped up when trying to run _this_ task.
# note that this tag only selects the syntax highlighting, continue to
# use 'perl6' until 'raku' as added on the site.
tag => rx/<?after '<lang ' 'perl6' '>' > .*? <?before '</' 'lang>'>/,
) }
Line 962 ⟶ 963:
<pre>Retrieving tasks
1) Determine if a string is numeric
Getting code from: http://rosettacode.org/wiki/Determine_if_a_string_is_numeric#
Testing Determine_if_a_string_is_numeric
Line 1,006 ⟶ 1,007:
<pre>Retrieving tasks
1 Lucky_and_even_lucky_numbers
Getting code from: http://rosettacode.org/wiki/Lucky_and_even_lucky_numbers#
Testing Lucky_and_even_lucky_numbers
|