<commit_before>use Perl6::Grammar;
use Perl6::Actions;
use Perl6::Compiler;


# Initialize Rakudo runtime support.
nqp::p6init();

# Create and configure compiler object.
my $comp := Perl6::Compiler.new();

$comp.language('perl6');
$comp.parsegrammar(Perl6::Grammar);
$comp.parseactions(Perl6::Actions);
$comp.addstage('syntaxcheck', :before<ast>);
$comp.addstage('optimize', :after<ast>);
hll-config($comp.config);
nqp::bindhllsym('perl6', '$COMPILER_CONFIG', $comp.config);


# Determine Perl6 and NQP dirs.
my $config := nqp::backendconfig();
my $sep := $config<osname> eq 'MSWin32' ?? '\\' !! '/';
#?if jvm
my $execname := nqp::atkey(nqp::jvmgetproperties,'perl6.execname');
my $install-dir := $execname ne ''
    ?? nqp::substr($execname, 0, nqp::rindex($execname, $sep, nqp::rindex($execname, $sep) - 1))
    !! $comp.config<prefix>;
#?endif
#?if moar
my $execname := nqp::execname();
my $install-dir := $config<osname> eq 'openbsd'
    ?? $config<prefix> ~ '/bin/perl6-m'
    !! $execname ne ''
        ?? nqp::substr($execname, 0, nqp::rindex($execname, $sep, nqp::rindex($execname, $sep) - 1))
        !! $comp.config<prefix>;
#?endif
#?if js
my $execname := nqp::execname();
my $install-dir := $config<osname> eq 'openbsd'
    ?? $config<prefix> ~ '/bin/perl6-js'
    !! $execname ne ''
        ?? nqp::substr($execname, 0, nqp::rindex($execname, $sep, nqp::rindex($execname, $sep) - 1))
        !! $comp.config<prefix>;
#?endif

my $perl6-home := $comp.config<static_perl6_home>
    // nqp::getenvhash()<PERL6_HOME>
    // $install-dir ~ '/share/perl6';
if nqp::substr($perl6-home, nqp::chars($perl6-home) - 1) eq $sep {
    $perl6-home := nqp::substr($perl6-home, 0, nqp::chars($perl6-home) - 1);
}

my $nqp-home := $comp.config<static_nqp_home>
    // nqp::getenvhash()<NQP_HOME><commit_msg>Get the currect install directory with moar on OpenBSD<commit_after>use Perl6::Grammar;
use Perl6::Actions;
use Perl6::Compiler;


# Initialize Rakudo runtime support.
nqp::p6init();

# Create and configure compiler object.
my $comp := Perl6::Compiler.new();

$comp.language('perl6');
$comp.parsegrammar(Perl6::Grammar);
$comp.parseactions(Perl6::Actions);
$comp.addstage('syntaxcheck', :before<ast>);
$comp.addstage('optimize', :after<ast>);
hll-config($comp.config);
nqp::bindhllsym('perl6', '$COMPILER_CONFIG', $comp.config);


# Determine Perl6 and NQP dirs.
my $config := nqp::backendconfig();
my $sep := $config<osname> eq 'MSWin32' ?? '\\' !! '/';
#?if jvm
my $execname := nqp::atkey(nqp::jvmgetproperties,'perl6.execname');
my $install-dir := $execname ne ''
    ?? nqp::substr($execname, 0, nqp::rindex($execname, $sep, nqp::rindex($execname, $sep) - 1))
    !! $comp.config<prefix>;
#?endif
#?if moar
my $execname := nqp::execname();
my $install-dir := $config<osname> eq 'openbsd'
    ?? $comp.config<prefix>
    !! $execname ne ''
        ?? nqp::substr($execname, 0, nqp::rindex($execname, $sep, nqp::rindex($execname, $sep) - 1))
        !! $comp.config<prefix>;
#?endif
#?if js
my $execname := nqp::execname();
my $install-dir := $config<osname> eq 'openbsd'
    ?? $comp.config<prefix>
    !! $execname ne ''
        ?? nqp::substr($execname, 0, nqp::rindex($execname, $sep, nqp::rindex($execname, $sep) - 1))
        !! $comp.config<prefix>;
#?endif

my $perl6-home := $comp.config<static_perl6_home>
    // nqp::getenvhash()<PERL6_HOME>
    // $install-dir ~ '/share/perl6';
if nqp::substr($perl6-home, nqp::chars($perl6-home) - 1) eq $sep {
    $perl6-home := nqp::substr($perl6-home, 0, nqp::chars($perl6-home) - 1);
}

my $nqp-home := $comp.config<static_nqp_home>
    // nqp::getenvhash()<NQP_HOME>
{'fraction_non_alphanumeric': 0.2163355408388521, 'fraction_numerical': 0.017660044150110375, 'mean_word_length': 4.971993410214168, 'pattern_counts': {'":': 0, '<': 31, '<?xml version=': 0, '>': 31, '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': '3337625', 'n_tokens_mistral': 1470, 'n_tokens_neox': 1398, 'n_words': 261}