4

When I install rakudo from source:

$ git clone git@github.com:rakudo/rakudo.git
$ cd rakudo
$ perl Configure.pl --gen-moar --gen-nqp --backends=moar
$ make
$ make install

it generates the following files in ./install/bin:

$ ls -1 install/bin
moar
nqp
nqp-m
perl6
perl6-debug
perl6-debug-m
perl6-gdb-m
perl6-lldb-m
perl6-m
perl6-valgrind-m
raku
raku-debug
rakudo
rakudo-debug
rakudo-debug-m
rakudo-gdb-m
rakudo-lldb-m
rakudo-m
rakudo-valgrind-m

I know that raku, rakudo, and perl6 are the the commands used to run a .raku script, but what are the other commands and how can I use them?

raiph
  • 31,607
  • 3
  • 62
  • 111
Håkon Hægland
  • 39,012
  • 21
  • 81
  • 174

1 Answers1

7
  • moar is the vm (not very useful without a bytecode file)
  • nqp is for NQP (Not Quite Perl6). Which is a small subset of Raku that is faster / easier to optimize. (No = op for example)
    It is the bootstrap compiler for Rakudo.

For the others like rakudo-m

  • *-m means on MoarVM
  • *-j means on JVM (not installed here)
  • *-js means on JavaScript (not installed here)

  • *-debug means, use the version with debugging information
  • *-gdb means use the version with GNU Debugger information
  • *-lldb means use the version with LLDB debugging information
  • *-valgrind means use the Valgrind instrumentation framework (find memory leaks)

So then rakudo-valgrind-m means use Rakudo compiler with Valgrind instrumentation on MoarVM.

About the only ones I would use is rakudo-m, and rakudo-j or rakudo-js, and that is only if I had more than just the MoarVM version installed.

Mainly the rest are for people that are working on Rakudo/NQP/MoarVM projects themselves.

Brad Gilbert
  • 33,846
  • 11
  • 78
  • 129
  • What raiph said :-) – Elizabeth Mattijsen Apr 18 '21 at 17:25
  • 1
    @raiph Perl already has mini-perl which they use when configuring Perl. Also NQP has Raku-like semantics. So while saying Not Quite Perl6 is a bit anachronistic, saying Not Quite Perl is further from useful. – Brad Gilbert Apr 20 '21 at 00:05
  • @raiph I have yet to see **any** NQP code that would compile with Perl. Or any Perl that would compile with NQP. Most aren't even close. I have seen plenty of NQP code that would compile as Raku code. In [fib.nqp](https://github.com/Raku/nqp/blob/master/examples/fib.nqp) only 2 out of 9 lines are valid Perl. `sub fib($n) {` and `}`. The first of which is only valid after you enable the relatively new signature feature. Ignoring that, most of the underlying semantics are also different to Perl. So calling it Not Quite Perl only made sense when the name Perl included what is now called Raku. – Brad Gilbert Apr 20 '21 at 16:39
  • @raiph **NQP** means **NQP**. It used to have a reason for those specific letters. That reason is only useful to explain the historical context. Saying that the **P** stood for **Perl6**, while wrong, I think gets people to understand the history better than saying it stood for just Perl. If I could change the CSS so that the 6 was grey on white instead of black on white, I would do so. – Brad Gilbert Apr 21 '21 at 03:03