Skip to content

Commit

Permalink
Give "raku -v" a pure ASCII version
Browse files Browse the repository at this point in the history
The message displayed when starting the REPL stays the same.
This is a slightly hacky use of the :short-versions flag, but
I guess it will do for now at least.
  • Loading branch information
lizmat committed Oct 28, 2020
1 parent 87ef76a commit 329e47f
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions src/Perl6/Compiler.nqp
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ class Perl6::Compiler is HLL::Compiler {
my $config-version := self.config()<version>;
my $backend-version := nqp::getattr(self,HLL::Compiler,'$!backend').version_string;

my $raku;
my $rakudo;
if $shorten-versions {
my $index := nqp::index($config-version,"-");
$config-version := nqp::substr($config-version,0,$index)
Expand All @@ -36,11 +38,22 @@ class Perl6::Compiler is HLL::Compiler {
$index := nqp::index($backend-version,"-");
$backend-version := nqp::substr($backend-version,0,$index)
unless $index == -1;

$raku := "๐‘๐š๐ค๐ฎโ„ข";
$rakudo := "๐‘๐š๐ค๐ฎ๐๐จโ„ข";
}
else {
$raku := "Raku(tm)";
$rakudo := "Rakudo(tm)";
}

"Welcome to ๐‘๐š๐ค๐ฎ๐๐จโ„ข v"
"Welcome to "
~ $rakudo
~ " v"
~ $config-version
~ ".\nImplementing the ๐‘๐š๐ค๐ฎโ„ข programming language v"
~ ".\nImplementing the "
~ $raku
~ " programming language v"
~ self.language_version()
~ ".\nBuilt on "
~ $backend-version
Expand Down

0 comments on commit 329e47f

Please sign in to comment.