Skip to content

Instantly share code, notes, and snippets.

pmichaud@orange:~/ng$ cat x
'abc' ~~ /b/; say $/;
pmichaud@orange:~/ng$ ./perl6 x
Method 'ACCEPTS' not found for invocant of class 'Regex'
current instr.: '&infix:<~~>' pc 155162 (src/gen/perl6-actions.pir:11359)
called from Sub '_block14' pc 29 (EVAL_1:0)
called from Sub '!UNIT_START' pc 1113 (src/glue/run.pir:17)
called from Sub 'perl6;PCT;HLLCompiler;eval' pc -1 ((unknown file):-1)
called from Sub 'perl6;PCT;HLLCompiler;evalfiles' pc 1255 (src/PCT/HLLCompiler.pir:688)
called from Sub 'perl6;PCT;HLLCompiler;command_line' pc 1441 (src/PCT/HLLCompiler.pir:775)
> say sin(1.0e0)
987 set_args PC156 (1), P3 PC156=FixedIntegerArray=PMC(0xb5dba908) P3=ResizablePMCArray=PMC(0xb5d7daa8)
990 get_results PC19 (1), P1 PC19=FixedIntegerArray=PMC(0xb5db9904) P1=Eval=PMC(0xb6225f8c)
993 invokecc P1 P1=Eval=PMC(0xb6225f8c)
0 get_params PC1 (1), P0 PC1=FixedIntegerArray=PMC(0x87b9c4c) P0=PMCNULL
3 set P3, PC28 P3=PMCNULL PC28=Sub=PMC(0xb6226068 pc:29)
6 capture_lex P3 P3=Sub=PMC(0xb6226068 pc:29)
8 get_hll_global P2, "!UNIT_START" P2=PMCNULL
11 set P3, PC28 P3=Sub=PMC(0xb6226068 pc:29) PC28=Sub=PMC(0xb6226068 pc:29)
14 capture_lex P3 P3=Sub=PMC(0xb6226068 pc:29)
0/1: START statementlist
0/1: START ws
0/1: PASS ws at pos=0
0/1: START ws
0/1: PASS ws at pos=0
0/1: START statement
0/1: Generating protoregex table for statement_control
0/1: PROTO statement_control
0/1: token1="i", token="if"
0/1: START statement_control:sym<if>
0/1: START statementlist
0/1: START ws
0/1: PASS ws at pos=0
0/1: START ws
0/1: PASS ws at pos=0
0/1: START statement
0/1: Generating protoregex table for statement_control
0/1: PROTO statement_control
0/1: token1="i", token=""
0/1: START statement_control:sym<if>
0/1: START statementlist
0/1: START ws
0/1: PASS ws at pos=0
0/1: START ws
0/1: PASS ws at pos=0
0/1: START statement
0/1: Generating protoregex table for statement_control
0/1: PROTO statement_control
0/1: token1="i", token="if"
0/1: START statement_control:sym<if>
$ ./perl6 --target=pir x
.HLL "perl6"
.namespace []
.sub "_block11" :main :anon :subid("10_1255529479")
.param pmc param_52 :slurpy
.annotate "line", 0
.const 'Sub' $P54 = "14_1255529479"
capture_lex $P54
Linus Torvalds (torvalds@cs.helsinki.fi)
Thu, 9 May 1996 17:48:56 +0300 (EET DST)
[...stuff omitted...]
Ok, so we should be thinking of a lovable, cuddly, stuffed penguin
sitting down after having gorged itself on herring. Still with me?
.
NOW comes the hard part. With this image firmly etched on your eyeballs, you
then scetch a stylizied version of it. Not a lot of detail - just a black
$ cat cards.pl
my @suits = < ♣ ♢ ♡ ♠ >;
my @ranks = 2..10, < J Q K A >;
# concatenate each rank with each suit (2♣ 2♢ 2♡ ... A♠)
my @deck = @ranks X~ @suits;
# build a hash of card names to point values
my %points = @deck Z @( (2..10, 10, 10, 10, 11) >>xx>> 4 );
Spectest results after setting INITIAL_BUCKETS to 16
x86_64:
Failed Test Stat Wstat Total Fail List of Failed
-------------------------------------------------------------------------------
t/spec/S02-literals/quoting-unicode.t 0 6 70 104 19-70
t/spec/S04-declarations/constant.rakudo 20 13 8-20
t/spec/S10-packages/basic.rakudo 0 6 22 0 ??
t/spec/S12-construction/autopairs.t 0 11 4 2 4
t/spec/S12-enums/basic.rakudo 30 1 27
Spectest results after setting INITIAL_BUCKETS to 16
x86_64:
Failed Test Stat Wstat Total Fail List of Failed
-------------------------------------------------------------------------------
t/spec/S02-literals/array-interpolation.r 0 6 12 12 7-12
t/spec/S03-operators/precedence.rakudo 0 11 52 14 46-52
t/spec/S04-declarations/constant.rakudo 20 13 8-20
t/spec/S10-packages/basic.rakudo 0 6 22 0 ??
t/spec/S12-enums/basic.rakudo 30 1 27