All Projects → Raku → Nqp

Raku / Nqp

Licence: other
NQP

Projects that are alternatives of or similar to Nqp

Documentation
📘 Nextcloud documentation
Stars: ✭ 268 (-1.83%)
Mutual labels:  hacktoberfest
Cryptoexchange
[UNMAINTAINED] Ruby library to query market data from cryptocurrency exchanges (https://www.coingecko.com)
Stars: ✭ 272 (-0.37%)
Mutual labels:  hacktoberfest
Dexcount Gradle Plugin
A Gradle plugin to report the number of method references in your APK on every build.
Stars: ✭ 2,935 (+975.09%)
Mutual labels:  hacktoberfest
Openms
The codebase of the OpenMS project
Stars: ✭ 270 (-1.1%)
Mutual labels:  hacktoberfest
Yii2 Imagine
Yii 2 imagine extension
Stars: ✭ 271 (-0.73%)
Mutual labels:  hacktoberfest
Php
All Algorithms implemented in Php
Stars: ✭ 272 (-0.37%)
Mutual labels:  hacktoberfest
Devdocs Desktop
🗂 A full-featured desktop app for DevDocs.io.
Stars: ✭ 3,040 (+1013.55%)
Mutual labels:  hacktoberfest
Node Sass Magic Importer
Custom node-sass importer for selector specific imports, module importing, globbing support and importing files only once.
Stars: ✭ 273 (+0%)
Mutual labels:  hacktoberfest
Starcli
✨ Browse GitHub trending projects from your command line
Stars: ✭ 269 (-1.47%)
Mutual labels:  hacktoberfest
Awesome Go Storage
A curated list of awesome Go storage projects and libraries
Stars: ✭ 3,224 (+1080.95%)
Mutual labels:  hacktoberfest
Github Tag Action
A Github Action to tag a repo on merge.
Stars: ✭ 270 (-1.1%)
Mutual labels:  hacktoberfest
Laravel Gamp
📊 Laravel Google Analytics Measurement Protocol Package
Stars: ✭ 271 (-0.73%)
Mutual labels:  hacktoberfest
Javascript Patterns
A collection of javascript algorithms, patterns, and techniques
Stars: ✭ 273 (+0%)
Mutual labels:  hacktoberfest
Github Stats
📈 Visualize stats about GitHub users and projects in your terminal.
Stars: ✭ 271 (-0.73%)
Mutual labels:  hacktoberfest
Travis Ci Discord Webhook
⛓ Here's your serverless solution for sending build status from Travis CI to Discord as webhooks.
Stars: ✭ 273 (+0%)
Mutual labels:  hacktoberfest
Eloquent Power Joins
The Laravel magic you know, now applied to joins.
Stars: ✭ 264 (-3.3%)
Mutual labels:  hacktoberfest
Fluentresults
A generalised Result object implementation for .NET/C#
Stars: ✭ 266 (-2.56%)
Mutual labels:  hacktoberfest
Base
Base environment for Red Eclipse and associated source files.
Stars: ✭ 273 (+0%)
Mutual labels:  hacktoberfest
Tlint
Tighten linter for Laravel conventions
Stars: ✭ 274 (+0.37%)
Mutual labels:  hacktoberfest
Protein
💊 Protein is an IntelliJ Plugin to generate Kotlin code for Retrofit 2 and RxJava 2 based on a Swagger definition
Stars: ✭ 273 (+0%)
Mutual labels:  hacktoberfest

=pod

=head1 NQP - Not Quite Perl

NQP is Copyright (C) 2009-2020 by The Perl Foundation. See F for licensing details.

This is "Not Quite Perl" -- a lightweight Raku-like environment for virtual machines. The key feature of NQP is that it's designed to be a very small environment (as compared with, say, raku or Rakudo) and is focused on being a high-level way to create compilers and libraries for virtual machines like MoarVM [1], the JVM, and others.

Unlike a full-fledged implementation of Raku, NQP strives to have as small a runtime footprint as it can, while still providing a Raku object model and regular expression engine for the virtual machine.

[1] https://github.com/MoarVM/MoarVM

=head2 Building from source

=for HTML

=for HTML

To build NQP from source, you'll just need a C utility and C 5.8 or newer. To automatically obtain and build MoarVM you may also need a C client.

To obtain C directly from its repository:

$ git clone git://github.com/Raku/nqp.git

If you don't have git installed, you can get a tarball or zip of NQP from github by visiting http://github.com/Raku/nqp/tree/master and clicking "Download". Then unpack the tarball or zip.

C can run on three different backends: C, the C, and C. The C and C backends are currently experimental. The JVM backend requires C<JDK 1.9> (also known as C<JDK 9>) or higher.

Once you have a copy of NQP, decide which backends you want to run, and configure and build it as follows:

$ cd nqp
$ perl Configure.pl --backends=moar,jvm
$ make

If you don't have an installed MoarVM, you can have C<Configure.pl> download and build one for you by passing the C<--gen-moar> option to it as well.

The C step will create a C or C<nqp.exe> executable in the current directory. Programs can then be run from the build directory using a command like:

$ ./nqp hello.nqp

By default, NQP searches for the MoarVM executable and installs to the directory C<./install>. You can change that with the C<--prefix> option to Configure.pl.

Once built, NQP's C target will install NQP and its libraries into the same location as the MoarVM installation that was used to create it. Until this step is performed, the C executable created by C above can only be reliably run from the root of NQP's build directory. After C is performed the executable can be run from any directory.

If the C compiler is invoked without an explicit script to run, it enters a small interactive mode that allows statements to be executed from the command line. Each line entered is treated as a separate compilation unit, however (which means that subroutines are preserved after they are defined, but variables are not).

=head2 Troubleshooting

=head3 OS X

On OS X, it appears that configuration fails in some configurations:

3rdparty/libuv/include/uv-darwin.h:26:11: fatal error: 'mach/mach.h' file not found

Should this happen to you, then a solution might be the following:

$ cd MoarVM/3rdparty/libuv/include
$ ln -s /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/mach
$ cd ../../../..
$ # run the Configure again

Note that the 10.9 in the above, represents the major version of OS X being used. On Mavericks use 10.9 (like above), on Yosemite use 10.10.

=head3 JVM

If attempting to run NQP on the JVM results in NQP claiming it couldn't reserve enough memory, you may need to increase the memory limit of your shell like so:

$ ulimit -d 6144000

=head2 Using NQP

BNOTE: there's B for NQP and the behaviour can change without notice. It's a tool for writing Raku compilers, not a low-level module for Raku programmers.

The L<examples directory|https://github.com/perl6/nqp/tree/master/examples> is a good place to start, with the L<loops|https://github.com/perl6/nqp/blob/master/examples/loops.nqp> and other files. Opcodes are listed in L<the docs directory|https://github.com/perl6/nqp/blob/master/docs/ops.markdown>. NQP also has built-in routines listed in L<the docs directory|https://github.com/perl6/nqp/blob/master/docs/built-ins.md>. You can use NQP from this release, it will be already installed if you have built Raku from scratch.

=head2 JavaScript backend

The best thing before playing with it/hacking on it is to contact pmurias via IRC at C<#raku> on L<irc.freenode.org|https://webchat.freenode.net/?channels=#raku>. We depend on C<node.js> at least 10.10.0

Building the JavaScript backend currently requires building the moar backend:

$ perl Configure.pl --backends=moar,js
$ make

Currently it needs to be run like:

$ ./nqp-js file.nqp

If you are developing C, you may want to pass the C<--link> option to configure to have the C linked instead of installed

$ cd src/vm/js/nqp-runtime; npm link .
$ perl Configure --backends=moar,js

=cut

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].