Questions tagged [nqp]

Not Quite Perl is a lightweight Perl 6-like environment for virtual machines.

Not Quite Perl is a lightweight Perl 6-like environment for virtual machines.

https://github.com/perl6/nqp

22 questions
5
votes
2 answers

Strings and Strands in MoarVM

When running Raku code on Rakudo with the MoarVM backend, is there any way to print information about how a given Str is stored in memory from inside the running program? In particular, I am curious whether there's a way to see how many Strands…
codesections
  • 8,900
  • 16
  • 50
5
votes
1 answer

It is possible to write NQP's precedence parser in Raku

I'm trying to figure out how I can rewrite NQP's Precedence Parser in Raku : The Precedence Parser is implemented here: https://github.com/Raku/nqp/blob/master/src/HLL/Grammar.nqp#L384 NQP should be a subset of Raku but the Grammar part seems to be…
Konrad Eisele
  • 3,088
  • 20
  • 35
5
votes
0 answers

Errors using Metamodel::ConcreteRoleHOW.new_type

There does not seem to be a way to use new_type in MetamodelConcreteRoleHOW, which as its name implies should be used to create new instances of a Role. The main problem is when you try to mix-in new roles, as implied by the signature ( method…
jjmerelo
  • 22,578
  • 8
  • 40
  • 86
5
votes
1 answer

Obtaining the QAST of a Perl 6 file from another program

This is related to this question on accesing the POD, but it goes further than that. You can easily access the Abstract Syntax Tree of a Perl 6 program using: perl6 --target=ast -e '"Þor is mighty!".say' This will print the whole Q abstract syntax…
jjmerelo
  • 22,578
  • 8
  • 40
  • 86
4
votes
1 answer

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

When I install rakudo from source: $ git clone git@github.com: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…
Håkon Hægland
  • 39,012
  • 21
  • 81
  • 174
4
votes
1 answer

How to tell the difference between types of nqp iterators

In nqp, you can create an iterator on an nqp hash, or on an nqp list. I would like to be able to find out if a given nqp iterator is iterating over a hash or a list. Alas, I have not find a way to do that. They even seem to share the same…
Elizabeth Mattijsen
  • 25,654
  • 3
  • 75
  • 105
3
votes
0 answers

Introspecting NQP roles

From this question in StackOverflow, I discovered Type.^roles, which includes all roles that are composed into a type. It works all over the place, but it fails to print if there are NQP roles somewhere: say Cursor.^roles# OUTPUT: «No such method…
jjmerelo
  • 22,578
  • 8
  • 40
  • 86
1
2