Here we have the code of the program.
<((1,2,3,4,5,6,7,8,9,10,'J','Q','K') X ("♠","♥","♦","♣")).roll>
<((1,2,3,4,5,6,7,8,9,10,'J','Q','K') X ("♠","♥","♦","♣")).pick(52)>
<roll>
is used for picking any card randomly.
TLDR: | |
https://github.com/skids/rakudo/tree/rolevolution3 | |
... is a spectest-passing branch of rakudo with: | |
A) Working diamond role composition | |
B) A solution to Ovid's complaint about role method overrides | |
...but the code needs a bit of work. |
#Deck of cards First we pick a random card, then in the second line we shuffle the whole deck of cards, including the one chosen
((1,2,3,4,5,6,7,8,9,10,'j','q','k') X~ <♥,♦,♣,♠>).roll
((1,2,3,4,5,6,7,8,9,10,'j','q','k') X~ <♥,♦,♣,♠>).pick(52)
#!/usr/bin/env perl6 | |
my Int $len = 16; | |
my $maxlen = 32768; | |
my $how-many =100000; | |
while $len < $maxlen { | |
my $start = now; | |
my int @ones[$len]; | |
for 1..$how-many { | |
loop (my int $i = 0; $i < $len; $i++) { |
# Add this snippet to the top of your playbook. | |
# It will install python2 if missing (but checks first so no expensive repeated apt updates) | |
# [email protected] | |
- hosts: all | |
gather_facts: False | |
tasks: | |
- name: install python 2 | |
raw: test -e /usr/bin/python || (apt -y update && apt install -y python-minimal) |
use v6; | |
# Hex => Dec | |
:16("ff").base(10); # 255 | |
# Dec => Bin | |
:10("10").base(2); # 1010 | |
# Bin => Hex | |
:2("1111").base(16); # F |
$ perl6 -MBioInfo | |
To exit type 'exit' or '^D' | |
> my @dna = ` | |
* >id comment | |
* CCCGAACGGCTT | |
* `; | |
[>id comment | |
CCCGAACGGCTT | |
] | |
> @dna[0].translate |
use File::Find; | |
.say for find(dir => "lib", name => /\.pm6$/)».Str.map({"\"{.subst("lib/","").subst("\.pm6","").subst("/","::",:g)}\" : \"$_\","} |
os: Visual Studio 2015 | |
platform: x64 | |
install: | |
- '"C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.cmd" /x64' | |
- choco install strawberryperl | |
- SET PATH=C:\strawberry\c\bin;C:\strawberry\perl\site\bin;C:\strawberry\perl\bin;%PATH% | |
- git clone https://github.com/rakudo/rakudo.git %APPVEYOR_BUILD_FOLDER%\..\rakudo | |
- cd %APPVEYOR_BUILD_FOLDER%\..\rakudo |
I moved this page to rakudo wiki. A lot of people wanted to add stuff, but gists are not editable. A wiki is a more appropriate place for this kind of stuff. Rakudo wiki is possibly not the best place for it, but for now that will do.
Plus, GitHub gists totally suck when unicode characters are involved. There's also no preview option here. So I'm glad that it is being moved.
Recently Perl 6 got support for various unicode characters (½ ¹ ∞ × ÷, see this link for a full list), but I don't think that we are done. Here is a list of things to think about.