3
3
NQP is Copyright (C) 2009-2015 by The Perl Foundation. See F<LICENSE>
4
4
for licensing details.
5
5
6
- This is "Not Quite Perl" -- a lightweight Perl 6-like environment
7
- for virtual machines. The key feature of NQP is that it's
8
- designed to be a very small environment (as compared with, say, perl6
9
- or Rakudo) and is focused on being a high-level way to create
10
- compilers and libraries for virtual machines (such as the Parrot
11
- Virtual Machine [1], the JVM, and MoarVM [2]). Unlike a full-fledged
12
- implementation of Perl 6, NQP strives to have as small a runtime footprint
13
- as it can, while still providing a Perl 6 object model and regular expression
14
- engine for the virtual machine.
6
+ This is "Not Quite Perl" -- a lightweight Perl 6-like environment for
7
+ virtual machines. The key feature of NQP is that it's designed to be a very
8
+ small environment (as compared with, say, perl6 or Rakudo) and is focused on
9
+ being a high-level way to create compilers and libraries for virtual
10
+ machines (such as the Parrot Virtual Machine [1], the JVM, and MoarVM [2]).
11
+ Unlike a full-fledged implementation of Perl 6, NQP strives to have as small
12
+ a runtime footprint as it can, while still providing a Perl 6 object model
13
+ and regular expression engine for the virtual machine.
15
14
16
15
[1] http://parrot.org/
17
16
[2] https://github.com/MoarVM/MoarVM
@@ -20,56 +19,55 @@ engine for the virtual machine.
20
19
21
20
=for HTML <a href="https://travis-ci.org/perl6/nqp"><img src="https://travis-ci.org/perl6/nqp.svg?branch=master"></a>
22
21
23
- To build NQP from source, you'll just need a C<make> utility
24
- and Perl 5.8 or newer. To automatically obtain and build Parrot
25
- you may also need a git client.
22
+ To build NQP from source, you'll just need a C<make> utility and Perl 5.8 or
23
+ newer. To automatically obtain and build Parrot you may also need a git
24
+ client.
26
25
27
26
To obtain NQP directly from its repository:
28
27
29
28
$ git clone git://github.com/perl6/nqp.git
30
29
31
- If you don't have git installed, you can get a tarball or zip
32
- of NQP from github by visiting http://github.com/perl6/nqp/tree/master
33
- and clicking "Download". Then unpack the tarball or zip.
30
+ If you don't have git installed, you can get a tarball or zip of NQP from
31
+ github by visiting http://github.com/perl6/nqp/tree/master and clicking
32
+ "Download". Then unpack the tarball or zip.
34
33
35
34
NQP can run on three different backends: Parrot, MoarVM and the Java Virtual
36
- Machine (JVM). Decide on which backends you want it to run, and configure and
37
- build it as follows:
35
+ Machine (JVM). Decide on which backends you want it to run, and configure
36
+ and build it as follows:
38
37
39
38
Once you have a copy of NQP, build it as follows:
40
39
41
40
$ cd nqp
42
41
$ perl Configure.pl --backends=moar,parrot,jvm
43
42
$ make
44
43
45
- If you don't have parrot installed, you can have Configure.pl generate one for
46
- you by passing the C<--gen-parrot> option to it as well. If you don't have
47
- MoarVM installed, you can have Configure.pl generate one for you by passing
48
- the C<--gen-moar> option to it as well.
44
+ If you don't have parrot installed, you can have Configure.pl generate one
45
+ for you by passing the C<--gen-parrot> option to it as well. If you don't
46
+ have MoarVM installed, you can have Configure.pl generate one for you by
47
+ passing the C<--gen-moar> option to it as well.
49
48
50
- The C<make> step will create a "nqp" or "nqp.exe" executable in the
51
- current directory. Programs can then be run from the build
52
- directory using a command like:
49
+ The C<make> step will create a "nqp" or "nqp.exe" executable in the current
50
+ directory. Programs can then be run from the build directory using a
51
+ command like:
53
52
54
53
$ ./nqp hello.nqp
55
54
56
55
By default, NQP searches for the parrot executable and installs to the
57
56
directory C<./install>. You can change that with the C<--prefix> option to
58
57
Configure.pl.
59
58
60
- Once built, NQP's C<make install> target will install NQP
61
- and its libraries into the Parrot installation that was used to
62
- create it. Until this step is performed, the "nqp" executable
63
- created by C<make> above can only be reliably run from the root of
64
- NQP's build directory. After C<make install> is performed
65
- the executable can be run from any directory (as long as the
59
+ Once built, NQP's C<make install> target will install NQP and its libraries
60
+ into the Parrot installation that was used to create it. Until this step is
61
+ performed, the "nqp" executable created by C<make> above can only be
62
+ reliably run from the root of NQP's build directory. After C<make install>
63
+ is performed the executable can be run from any directory (as long as the
66
64
Parrot installation that was used to create it remains intact).
67
65
68
- If the NQP compiler is invoked without an explicit script to
69
- run, it enters a small interactive mode that allows statements
70
- to be executed from the command line. Each line entered is treated
71
- as a separate compilation unit, however (which means that subroutines
72
- are preserved after they are defined, but variables are not).
66
+ If the NQP compiler is invoked without an explicit script to run, it enters
67
+ a small interactive mode that allows statements to be executed from the
68
+ command line. Each line entered is treated as a separate compilation unit,
69
+ however (which means that subroutines are preserved after they are defined,
70
+ but variables are not).
73
71
74
72
=head2 Troubleshooting
75
73
@@ -91,13 +89,12 @@ used. On Mavericks use 10.9 (like above), on Yosemite use 10.10.
91
89
92
90
=head2 Differences from nqp-rx
93
91
94
- NQP is the successor implementation of "nqp-rx" [2]. Unlike nqp-rx,
95
- which aimed to have almost no runtime component whatsoever, this new
96
- version of NQP accepts that a minimal Perl 6 object metamodel,
97
- multidispatcher, and regular expression engine are needed on top of
98
- the underlying virtual machine. Also, nqp-rx only ran on Parrot,
99
- whereas NQP also runs on the JVM and MoarVM and is designed to be
100
- portable to more.
92
+ NQP is the successor implementation of "nqp-rx" [2]. Unlike nqp-rx, which
93
+ aimed to have almost no runtime component whatsoever, this new version of
94
+ NQP accepts that a minimal Perl 6 object metamodel, multidispatcher, and
95
+ regular expression engine are needed on top of the underlying virtual
96
+ machine. Also, nqp-rx only ran on Parrot, whereas NQP also runs on the JVM
97
+ and MoarVM and is designed to be portable to more.
101
98
102
99
[2] http://github.com/perl6/nqp-rx
103
100
0 commit comments