<commit_before>my class Bool { # declared in BOOTSTRAP
    # class Bool is Cool {
    #     has int $!value;

    multi method Bool(Bool:D:)    { self }
    multi method Numeric(Bool:D:) { self ?? 1 !! 0 }
    multi method Str(Bool:D:)     { self ?? 'True' !! 'False' }
    multi method gist(Bool:D:)    { self ?? 'True' !! 'False' }
    multi method DUMP(Bool:D:)    { self.Str }

    method Int()     { self ?? 1 !! 0 }

    method pred() { Bool::False }
    method succ() { Bool::True }

    method key() { self.Str }
    method value() { self.Numeric }

    proto method pick(|) { * }
    multi method pick(Bool:U:) {
       nqp::rand_n(2e0) >= 1  # can't use Rat's this early
         ?? Bool::True        # must be fully qualified this early
         !! Bool::False;
    }
    multi method pick(Bool:U: 0) { () }
    multi method pick(Bool:U: 1) {
       nqp::rand_n(2e0) >= 1
         ?? Bool::True
         !! Bool::False;
    }
    multi method pick(Bool:U: $n) {
       nqp::rand_n(2e0) >= 1
         ?? (Bool::True,Bool::False)
         !! (Bool::False,Bool::True);
    }

    proto method roll(|) { * }
    multi method roll(Bool:U:) {
       nqp::rand_n(2e0) >= 1 ?? Bool::True !! Bool::False;
    }
    multi method roll(Bool:U: 1) {
       nqp::rand_n(2e0) >= 1 ?? Bool::True !! Bool::False;
    }
    multi method roll(Bool:U: $n) {
       (nqp::rand_n(2e0) >= 1 ?? Bool::True !! Bool::False) xx $n;
    }

    multi method ACCEPTS(Bool:D: Mu \topic ) { self }

    multi method perl(Bool:D:) { self ?? 'Bool::True' !! 'Bool::False' }

    method enums() {
        my % = False => 0, True => 1
    }
}

multi prefix:<++>(Bool:U \a is rw)  { a = True; }
multi prefix:<-->(Bool:U \a is rw)  { a = False; }
multi postfix:<++>(Bool:U \a is rw) { a = True; False; }
multi postfix:<-->(Bool:U \a is rw) { a = False; }

proto prefix:<?>(Mu $) is pure { * }
multi prefix:<?>(Bool:D \a) { a }
multi prefix:<?>(Mu \a) { a.Bool }

proto prefix:<so>(Mu $) is pure { * }<commit_msg>Stay in NQP land as much as possible<commit_after>my class Bool { # declared in BOOTSTRAP
    # class Bool is Cool {
    #     has int $!value;

    multi method Bool(Bool:D:)    { self }
    multi method Numeric(Bool:D:) { self ?? 1 !! 0 }
    multi method Str(Bool:D:)     { self ?? 'True' !! 'False' }
    multi method gist(Bool:D:)    { self ?? 'True' !! 'False' }
    multi method DUMP(Bool:D:)    { self.Str }

    method Int()     { self ?? 1 !! 0 }

    method pred() { Bool::False }
    method succ() { Bool::True }

    method key() { self.Str }
    method value() { self.Numeric }

    proto method pick(|) { * }
    multi method pick(Bool:U:) {
       nqp::p6bool(nqp::rand_n(2e0) >= 1);
    }
    multi method pick(Bool:U: 0) { () }
    multi method pick(Bool:U: 1) {
       nqp::p6bool(nqp::rand_n(2e0) >= 1);
    }
    multi method pick(Bool:U: $n) {
       nqp::rand_n(2e0) >= 1
         ?? (Bool::True,Bool::False)
         !! (Bool::False,Bool::True);
    }

    proto method roll(|) { * }
    multi method roll(Bool:U:) {
       nqp::p6bool(nqp::rand_n(2e0) >= 1);
    }
    multi method roll(Bool:U: 1) {
       nqp::p6bool(nqp::rand_n(2e0) >= 1);
    }
    multi method roll(Bool:U: $n) {
       (nqp::p6bool(nqp::rand_n(2e0) >= 1)) xx $n;
    }

    multi method ACCEPTS(Bool:D: Mu \topic ) { self }

    multi method perl(Bool:D:) { self ?? 'Bool::True' !! 'Bool::False' }

    method enums() {
        my % = False => 0, True => 1
    }
}

multi prefix:<++>(Bool:U \a is rw)  { a = True; }
multi prefix:<-->(Bool:U \a is rw)  { a = False; }
multi postfix:<++>(Bool:U \a is rw) { a = True; False; }
multi postfix:<-->(Bool:U \a is rw) { a = False; }

proto prefix:<?>(Mu $) is pure { * }
multi prefix:<?>(Bool:D \a) { a }
multi prefix:<?>(Mu \a) { a.Bool }

proto prefix:<so>(Mu $) is pure { * }
{'fraction_non_alphanumeric': 0.19668682618985012, 'fraction_numerical': 0.015514067841178017, 'mean_word_length': 2.4487760652765185, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 35, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7010832', 'n_tokens_mistral': 1527, 'n_tokens_neox': 1436, 'n_words': 364}