Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What are nqp, nqp-m, rakudo-debug, rakudo-debug-m, rakudo-gdb-m, rakudo-m, rakudo-valgrind-m?

Tags:

raku

moarvm

nqp

When I install rakudo from source:

$ git clone [email protected]: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?

like image 346
Håkon Hægland Avatar asked Mar 02 '23 15:03

Håkon Hægland


1 Answers

  • 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.

like image 55
Brad Gilbert Avatar answered Apr 30 '23 08:04

Brad Gilbert