~ubuntu-branches/ubuntu/vivid/nqp/vivid-proposed

« back to all changes in this revision

Viewing changes to README.pod

  • Committer: Package Import Robot
  • Author(s): Alessandro Ghedini
  • Date: 2013-11-01 12:09:18 UTC
  • mfrom: (1.1.4)
  • Revision ID: package-import@ubuntu.com-20131101120918-kx51sl0sxl3exsxi
Tags: 2013.10-1
* New upstream release
* Bump versioned (Build-)Depends on parrot
* Update patches
* Install new README.pod
* Fix vcs-field-not-canonical
* Do not install rubyish examples
* Do not Depends on parrot-devel anymore
* Add 07_disable-serialization-tests.patch

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
=head1 NQP - Not Quite Perl (6)
 
2
 
 
3
NQP is Copyright (C) 2009-2013 by The Perl Foundation.  See F<LICENSE>
 
4
for licensing details.
 
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.
 
15
 
 
16
    [1] http://parrot.org/
 
17
    [2] https://github.com/MoarVM/MoarVM
 
18
 
 
19
=head2 Building from source
 
20
 
 
21
To build NQP from source, you'll just need a C<make> utility
 
22
and Perl 5.8 or newer.  To automatically obtain and build Parrot
 
23
you may also need a git client.
 
24
 
 
25
To obtain NQP directly from its repository:
 
26
 
 
27
    $ git clone git://github.com/perl6/nqp.git
 
28
 
 
29
If you don't have git installed, you can get a tarball or zip
 
30
of NQP from github by visiting http://github.com/perl6/nqp/tree/master
 
31
and clicking "Download".  Then unpack the tarball or zip.
 
32
 
 
33
Once you have a copy of NQP, build it as follows:
 
34
 
 
35
    $ cd nqp
 
36
    $ perl Configure.pl --gen-parrot
 
37
    $ make
 
38
 
 
39
This will create a "nqp" or "nqp.exe" executable in the
 
40
current directory.  Programs can then be run from the build 
 
41
directory using a command like:
 
42
 
 
43
    $ ./nqp hello.nqp
 
44
 
 
45
The C<--gen-parrot> option above tells Configure.pl to automatically
 
46
download and build the most appropriate version of Parrot into a
 
47
local "parrot/" subdirectory, install that Parrot into the
 
48
"parrot_install/" subdirectory, and use that for building NQP.
 
49
It's okay to use the C<--gen-parrot> option on later invocations
 
50
of Configure.pl; the configure system will re-build Parrot only
 
51
if a newer version is needed for whatever version of Rakudo you're
 
52
working with.
 
53
 
 
54
You can use C<--parrot-config=/path/to/parrot_config> instead
 
55
of C<--gen-parrot> to use an already installed Parrot for building
 
56
NQP.  This installed Parrot must include its development
 
57
environment; typically this is done via Parrot's C<make install>
 
58
target or by installing prebuilt C<parrot-devel> and/or C<libparrot-dev>
 
59
packages.  The version of the already installed Parrot must satisfy a
 
60
minimum specified by the NQP being built -- Configure.pl will
 
61
verify this for you.  Released versions of NQP always build
 
62
against the latest release of Parrot; checkouts of the HEAD revision
 
63
from github often require a version of Parrot that is newer than
 
64
the most recent Parrot monthly release.
 
65
 
 
66
Once built, NQP's C<make install> target will install NQP
 
67
and its libraries into the Parrot installation that was used to
 
68
create it.  Until this step is performed, the "nqp" executable
 
69
created by C<make> above can only be reliably run from the root of
 
70
NQP's build directory.  After C<make install> is performed
 
71
the executable can be run from any directory (as long as the
 
72
Parrot installation that was used to create it remains intact).
 
73
 
 
74
If the NQP compiler is invoked without an explicit script to
 
75
run, it enters a small interactive mode that allows statements
 
76
to be executed from the command line.  Each line entered is treated
 
77
as a separate compilation unit, however (which means that subroutines
 
78
are preserved after they are defined, but variables are not).
 
79
 
 
80
=head2 Differences from nqp-rx
 
81
 
 
82
NQP is the successor implementation of "nqp-rx" [2].  Unlike nqp-rx,
 
83
which aimed to have almost no runtime component whatsoever, this new
 
84
version of NQP accepts that a minimal Perl 6 object metamodel,
 
85
multidispatcher, and regular expression engine are needed on top of
 
86
the underlying virtual machine.  Also, nqp-rx only ran on Parrot,
 
87
whereas NQP also runs on the JVM and is designed to be portable to
 
88
more.
 
89
 
 
90
    [2] http://github.com/perl6/nqp-rx