This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(1) git clone http://github.com/rakudo/rakudo.git | |
(2) cd rakudo | |
(3) git checkout --track -b ins origin/ins | |
(4) perl Configure.pl --gen-parrot | |
(5) make |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(1) clone rakudo repo | |
(2) git checkout --track -b ins origin/ins | |
(3) perl Configure.pl --gen-parrot | |
(4) make |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pmichaud@orange:~/rakudo$ cat z | |
my $a = "你好"; | |
Q:PIR { | |
$P0 = find_lex '$a' | |
$S0 = $P0 | |
$I0 = bytelength $S0 | |
say $I0 | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pmichaud@orange:~/rakudo$ cat y | |
my $r = 1..5; | |
Q:PIR { | |
$P0 = find_lex '$r' | |
$S0 = $P0.'Str'() | |
say $S0 | |
$S0 = $P0 | |
say $S0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.HLL 'foo' | |
.sub 'main' | |
$P0 = get_root_namespace ['parrot';'Integer'] | |
$P0 = get_class $P0 | |
$P1 = subclass $P0, 'MyInt' | |
$P2 = getinterp | |
# $P2.'hll_map'($P0, $P1) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ cat m1.pir | |
.HLL 'foo' | |
.sub 'main' | |
$P0 = get_root_namespace ['parrot';'Integer'] | |
$P0 = get_class $P0 | |
$P1 = subclass $P0, 'MyInt' | |
$P2 = getinterp | |
$P2.'hll_map'($P0, $P1) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ cat x2.pir | |
.HLL 'foo' | |
.sub 'main' | |
.local pmc obj | |
$P0 = newclass 'P6object' | |
$P1 = subclass $P0, 'Object' | |
$P2 = subclass $P1, 'Any' | |
$P3 = subclass $P2, 'Range' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ cat x1.pir | |
.HLL 'foo' | |
.sub 'main' | |
.local pmc obj | |
$P0 = newclass 'P6object' | |
$P1 = subclass $P0, 'Object' | |
$P2 = subclass $P1, 'Any' | |
$P3 = subclass $P2, 'Range' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pmichaud@orange:~/rakudo$ cat k-nucleotide.p6.pl | |
# The Computer Language Benchmarks Game | |
# | |
# Based on the submission for Perl 5. | |
# contributed by Daniel carrera | |
# | |
# USAGE: perl6 k-nucleotide.p6.pl < k-nucleotide.input | |
# Read FASTA file from stdin and extract DNA sequence THREE. | |
my $sequence = ''; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ cat x.pir | |
.sub 'main' | |
$S0 = "140" | |
$N0 = $S0 | |
say $N0 | |
$I0 = find_encoding 'ucs2' | |
$S0 = trans_encoding $S0, $I0 | |
$N0 = $S0 | |
say $N0 | |
.end |