Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 91 lines (70 sloc) 3.884 kb
2414dc1 Patrick R. Michaud first commit
pmichaud authored
1 =head1 NQP - Not Quite Perl (6)
2
bcde9c4 Moritz Lenz bump copyright year in README
moritz authored
3 NQP is Copyright (C) 2009-2012 by The Perl Foundation. See F<LICENSE>
836ec72 Patrick R. Michaud Some licensing and copyright information.
pmichaud authored
4 for licensing details.
5
13b550b Patrick R. Michaud Update README to eliminate "for quickly generating PIR routines".
pmichaud authored
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
2414dc1 Patrick R. Michaud first commit
pmichaud authored
9 or Rakudo) and is focused on being a high-level way to create
4933c8c Patrick R. Michaud Update README, explain differences between nqp and nqp-rx.
pmichaud authored
10 compilers and libraries for virtual machines (such as the Parrot
11 Virtual Machine [1]). Unlike a full-fledged implementation of Perl 6,
12 NQP strives to have as small a runtime footprint as it can, while
13 still providing a Perl 6 object model and regular expression engine
14 for the virtual machine.
2414dc1 Patrick R. Michaud first commit
pmichaud authored
15
4933c8c Patrick R. Michaud Update README, explain differences between nqp and nqp-rx.
pmichaud authored
16 [1] http://parrot.org/
d7dfef8 Patrick R. Michaud Add some notes about differences from previous NQP.
pmichaud authored
17
4933c8c Patrick R. Michaud Update README, explain differences between nqp and nqp-rx.
pmichaud authored
18 =head2 Building from source
3795f33 Patrick R. Michaud README update.
pmichaud authored
19
20 To build NQP from source, you'll just need a C<make> utility
21 and Perl 5.8 or newer. To automatically obtain and build Parrot
4933c8c Patrick R. Michaud Update README, explain differences between nqp and nqp-rx.
pmichaud authored
22 you may also need a git client.
3795f33 Patrick R. Michaud README update.
pmichaud authored
23
24 To obtain NQP directly from its repository:
25
4933c8c Patrick R. Michaud Update README, explain differences between nqp and nqp-rx.
pmichaud authored
26 $ git clone git://github.com/perl6/nqp.git
3795f33 Patrick R. Michaud README update.
pmichaud authored
27
28 If you don't have git installed, you can get a tarball or zip
4933c8c Patrick R. Michaud Update README, explain differences between nqp and nqp-rx.
pmichaud authored
29 of NQP from github by visiting http://github.com/perl6/nqp/tree/master
3795f33 Patrick R. Michaud README update.
pmichaud authored
30 and clicking "Download". Then unpack the tarball or zip.
31
32 Once you have a copy of NQP, build it as follows:
33
4933c8c Patrick R. Michaud Update README, explain differences between nqp and nqp-rx.
pmichaud authored
34 $ cd nqp
3795f33 Patrick R. Michaud README update.
pmichaud authored
35 $ perl Configure.pl --gen-parrot
36 $ make
37
0b3c754 Patrick R. Michaud Remove trailing spaces from a lot of files, to make Parrot happier.
pmichaud authored
38 This will create a "nqp" or "nqp.exe" executable in the
4933c8c Patrick R. Michaud Update README, explain differences between nqp and nqp-rx.
pmichaud authored
39 current directory. Programs can then be run from the build
40 directory using a command like:
3795f33 Patrick R. Michaud README update.
pmichaud authored
41
4933c8c Patrick R. Michaud Update README, explain differences between nqp and nqp-rx.
pmichaud authored
42 $ ./nqp hello.nqp
3795f33 Patrick R. Michaud README update.
pmichaud authored
43
44 The C<--gen-parrot> option above tells Configure.pl to automatically
45 download and build the most appropriate version of Parrot into a
46 local "parrot/" subdirectory, install that Parrot into the
47 "parrot_install/" subdirectory, and use that for building NQP.
0b3c754 Patrick R. Michaud Remove trailing spaces from a lot of files, to make Parrot happier.
pmichaud authored
48 It's okay to use the C<--gen-parrot> option on later invocations
49 of Configure.pl; the configure system will re-build Parrot only
50 if a newer version is needed for whatever version of Rakudo you're
3795f33 Patrick R. Michaud README update.
pmichaud authored
51 working with.
52
53 You can use C<--parrot-config=/path/to/parrot_config> instead
54 of C<--gen-parrot> to use an already installed Parrot for building
55 NQP. This installed Parrot must include its development
56 environment; typically this is done via Parrot's C<make install>
57 target or by installing prebuilt C<parrot-devel> and/or C<libparrot-dev>
58 packages. The version of the already installed Parrot must satisfy a
59 minimum specified by the NQP being built -- Configure.pl will
60 verify this for you. Released versions of NQP always build
61 against the latest release of Parrot; checkouts of the HEAD revision
62 from github often require a version of Parrot that is newer than
63 the most recent Parrot monthly release.
64
65 Once built, NQP's C<make install> target will install NQP
66 and its libraries into the Parrot installation that was used to
67 create it. Until this step is performed, the "nqp" executable
68 created by C<make> above can only be reliably run from the root of
69 NQP's build directory. After C<make install> is performed
70 the executable can be run from any directory (as long as the
71 Parrot installation that was used to create it remains intact).
72
73 If the NQP compiler is invoked without an explicit script to
74 run, it enters a small interactive mode that allows statements
75 to be executed from the command line. Each line entered is treated
76 as a separate compilation unit, however (which means that subroutines
77 are preserved after they are defined, but variables are not).
78
4933c8c Patrick R. Michaud Update README, explain differences between nqp and nqp-rx.
pmichaud authored
79 =head2 Differences from nqp-rx
7df80c2 Patrick R. Michaud README update with note that double-quoted strings now interpolate $-var...
pmichaud authored
80
4933c8c Patrick R. Michaud Update README, explain differences between nqp and nqp-rx.
pmichaud authored
81 NQP is the successor implementation of "nqp-rx" [2]. Unlike nqp-rx,
82 which aimed to have almost no runtime component whatsoever, this new
83 version of NQP accepts that a minimal Perl 6 object metamodel,
84 multidispatcher, and regular expression engine are needed on top of
85 the underlying virtual machine. Also, nqp-rx is likely to only run
86 on Parrot, whereas we expect NQP to eventually run on other virtual
87 machine backends.
3795f33 Patrick R. Michaud README update.
pmichaud authored
88
4933c8c Patrick R. Michaud Update README, explain differences between nqp and nqp-rx.
pmichaud authored
89 [2] http://github.com/perl6/nqp-rx
3795f33 Patrick R. Michaud README update.
pmichaud authored
90
Something went wrong with that request. Please try again.