<commit_before>Perl 6 cheat sheet v2                                                »ö«

SIGILS    MAJOR/MINOR CONTEXTS         ACCESS ARRAYS      HASHES
$scalar   item   list       sink       whole: @array[]    %hash{}
@array     Str    flat/slice         element: @array[0]   %hash{'a'}
%hash      Num    lazy/eager/hyper       (or)             %hash<a>
&code      Bool                        slice: @array[0,2] %hash{'a','b'}
                       COMPOSERS         (or)             %hash<a b>
TWIGILS                [ ] array
$normal-lexical        { } block/hash     AUTOMATIC DEREFERENCE
$?compiler-constant    < > quotewords     &($foo)(1,2)     == $foo(1,2)
$*dynamic-or-global    (,) parcel         @($foo)[1]       == $foo[1]
$.public-accessor      :() signature      %($foo){'bar'}   == $foo<bar>
$!private-attribute    \() capture        @(@($foo)[1])[2] == $foo[1][2]
$^positional-param
$:named-parameter         CONTROL SYNTAX
$=pod-info                for LIST { }                # implicit $_ arg
$<named-match-capture>    for LIST -> $a, $b { }      # explicit args
$~slang-variable          while/until EXPR { }
                          repeat while/until EXPR { } # do at least once
OPERATOR PRECEDENCE       loop { }   loop (a;b;c) { } # parens required!
.method .[] i             if EXPR { } elsif EXPR { } else { }
++ --                     unless EXPR { }             # no else allowed!
**                        given EXPR { when EXPR { } default { } }
unary + - ~ ! ? ^         EXPR if EXPR for LIST;    # list comprehension
* / % %% div              next, last, redo            # loop controls
+ -                       proceed, succeed            # switch controls
x xx       TYPES
~          Bool Bit Int Rat FatRat UInt Num Complex int32 complex64 etc.
&          Str Cat Blob Char Byte Codepoint Grapheme Buf buf8 buf32 utf8
| ^                               IO Mu Any Cool Junction Whatever Match
sleep abs sin temp                              Parcel Capture Signature
<=> leg cmp .. but          SCOPE DECLARATORS         Pair Range Set Bag
~~ > == gt eq === eqv !op   my  lexical scope      KeyHash KeySet KeyBag
&&                         our  package scope     Scalar Array Hash Code
|| ^^ // min max           has  instance scope       Enum Order TrigBase
??!! ff                   anon  no scope at all        Block Routine Sub
= := op= =>              state  persistent lexical          Method Regex
so not                 augment  benign parasitic       Failure Exception
, :                  supersede  deadly parasitic        Instant Duration
X Xop Z Zop ...                                            Date DateTime
say die map etc.  OPERATOR DOMAINS
and               Numeric: ==  !==(!=) + <      >     <=> <=     >=
or xor            Stringy: eq  !eq(ne) ~ lt     gt    leg le     ge
<== ==>             Value: eqv  !eqv     before after cmp !after !before
                 ObjectID: ===  !===
METAOPERATORS                         LINKS      IRC
[op] reduce listop to A op B op C...  perl6.org  #perl6 irc.freenode.net
op=  A = A op B                       rakudo.org #moarvm irc.freenode.net
!op  !(A op B)
»op« hyper/vectorize    REGEX  METACHARS          REGEX MODIFIERS
Zop  zip with op        ^ $    string begin/end   :i   ignore case
Xop  cross with op      ^^ $$  line begin/end     :m   ignore marks
Rop  reverse args       +      one or more        :g   global
Sop  sequentialize      *      zero or more       :r   ratchet
                        ?      zero or one        :s   sigspace
SPECIAL VARIABLES       **1..3 repeat in range    :4th nth occurrence
$_     current topic    ()     capture to $0,$1   :4x  n times
$/     regex result     []     no capture
$!     error object     <foo>  subrule          REGEX CHARCLASSES
@*ARGS command line     <[]>   character class  .  == anychar, \N non \n
@*INC  include path     |      parallel or      \s == <space>, \S non
%*ENV  environment      ||     serial or        \d == <digit>, \D non
$*PID  process id       « »    word boundary    \w == <+alpha+digit+[_]>
<commit_msg>parcel is now list and keep comma<commit_after>Perl 6 cheat sheet v2                                                »ö«

SIGILS    MAJOR/MINOR CONTEXTS         ACCESS ARRAYS      HASHES
$scalar   item   list       sink       whole: @array[]    %hash{}
@array     Str    flat/slice         element: @array[0]   %hash{'a'}
%hash      Num    lazy/eager/hyper       (or)             %hash<a>
&code      Bool                        slice: @array[0,2] %hash{'a','b'}
                       COMPOSERS         (or)             %hash<a b>
TWIGILS                [ ] array
$normal-lexical        { } block/hash     AUTOMATIC DEREFERENCE
$?compiler-constant    < > quotewords     &($foo)(1,2)     == $foo(1,2)
$*dynamic-or-global    (,) list           @($foo)[1]       == $foo[1]
$.public-accessor      :() signature      %($foo){'bar'}   == $foo<bar>
$!private-attribute    \() capture        @(@($foo)[1])[2] == $foo[1][2]
$^positional-param
$:named-parameter         CONTROL SYNTAX
$=pod-info                for LIST { }                # implicit $_ arg
$<named-match-capture>    for LIST -> $a, $b { }      # explicit args
$~slang-variable          while/until EXPR { }
                          repeat while/until EXPR { } # do at least once
OPERATOR PRECEDENCE       loop { }   loop (a;b;c) { } # parens required!
.method .[] i             if EXPR { } elsif EXPR { } else { }
++ --                     unless EXPR { }             # no else allowed!
**                        given EXPR { when EXPR { } default { } }
unary + - ~ ! ? ^         EXPR if EXPR for LIST;    # list comprehension
* / % %% div              next, last, redo            # loop controls
+ -                       proceed, succeed            # switch controls
x xx       TYPES
~          Bool Bit Int Rat FatRat UInt Num Complex int32 complex64 etc.
&          Str Cat Blob Char Byte Codepoint Grapheme Buf buf8 buf32 utf8
| ^                               IO Mu Any Cool Junction Whatever Match
sleep abs sin temp                                List Capture Signature
<=> leg cmp .. but          SCOPE DECLARATORS         Pair Range Set Bag
~~ > == gt eq === eqv !op   my  lexical scope      KeyHash KeySet KeyBag
&&                         our  package scope     Scalar Array Hash Code
|| ^^ // min max           has  instance scope       Enum Order TrigBase
??!! ff                   anon  no scope at all        Block Routine Sub
= := op= =>              state  persistent lexical          Method Regex
so not                 augment  benign parasitic       Failure Exception
, :                  supersede  deadly parasitic        Instant Duration
X Xop Z Zop ...                                            Date DateTime
say die map etc.  OPERATOR DOMAINS
and               Numeric: ==  !==(!=) + <      >     <=> <=     >=
or xor            Stringy: eq  !eq(ne) ~ lt     gt    leg le     ge
<== ==>             Value: eqv  !eqv     before after cmp !after !before
                 ObjectID: ===  !===
METAOPERATORS                         LINKS      IRC
[op] reduce listop to A op B op C...  perl6.org  #perl6 irc.freenode.net
op=  A = A op B                       rakudo.org #moarvm irc.freenode.net
!op  !(A op B)
»op« hyper/vectorize    REGEX  METACHARS          REGEX MODIFIERS
Zop  zip with op        ^ $    string begin/end   :i   ignore case
Xop  cross with op      ^^ $$  line begin/end     :m   ignore marks
Rop  reverse args       +      one or more        :g   global
Sop  sequentialize      *      zero or more       :r   ratchet
                        ?      zero or one        :s   sigspace
SPECIAL VARIABLES       **1..3 repeat in range    :4th nth occurrence
$_     current topic    ()     capture to $0,$1   :4x  n times
$/     regex result     []     no capture
$!     error object     <foo>  subrule          REGEX CHARCLASSES
@*ARGS command line     <[]>   character class  .  == anychar, \N non \n
@*INC  include path     |      parallel or      \s == <space>, \S non
%*ENV  environment      ||     serial or        \d == <digit>, \D non
$*PID  process id       « »    word boundary    \w == <+alpha+digit+[_]>

{'fraction_non_alphanumeric': 0.1028083028083028, 'fraction_numerical': 0.00757020757020757, 'mean_word_length': 1.3544121874101753, 'pattern_counts': {'":': 0, '<': 33, '<?xml version=': 0, '>': 39, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 10, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3470311', 'n_tokens_mistral': 2470, 'n_tokens_neox': 2356, 'n_words': 804}