nqp Questions

1

Solved

I have a Module AttrX::Mooish which implements some of attribute features of Moo/Moose frameworks (lazyness, trigger, etc.). I also wanted the module to be as transparent to the end user as possibl...
Sonatina asked 31/8, 2018 at 14:33

2

Solved

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 curiou...
Padre asked 2/3, 2021 at 20:41

1

Solved

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 b...
Colorist asked 19/7, 2020 at 15:26

1

Solved

In Apocalypse #1 Larry wrote, with my added emphasis: Raku will support multiple syntaxes that map onto a single semantic model. Second, that single semantic model will in turn map to multiple pla...
Silsby asked 9/7, 2020 at 22:0

2

Solved

If I have Grammar a and define a Grammar b that have a block '{ ... }' that has syntax of Grammar a, is it possible to somehow link these grammars together? I.e. Grammar a is Tcl and Grammar b is e...
Mercurous asked 11/5, 2020 at 9:54

1

Solved

How can I augment a class with a multi-method that will be called before the already defined one ? I am trying to enable negative subscript: @arr[-1] like in this article but without changing the ...
Boni asked 12/4, 2020 at 22:30

1

Solved

... Or how to change $<sigil>.Str value from token sigil { ... } idependently from the matched text. Yes I'm asking how to cheat grammars above (i.e. calling) me. I am trying to write a Slan...
Tewell asked 2/4, 2020 at 1:37

1

Solved

I want to reuse the token parameter from Perl6::Grammar in my custom slang to add a "custom-param" parameter without cargo culting. What I mean: my $main-grammar = $*LANG.slang_grammar('MAIN'); m...
Lawn asked 1/4, 2020 at 16:6

2

Solved

How to print an object in NQP ? (For debugging purposes) It is easy in Raku: say that is calling gist in its short loop code dd The tiny Data Dumper as shown in this post class Toto { has $....
Paryavi asked 19/3, 2020 at 17:28

1

Solved

There are two types of alternation in Raku's regex: the | and ||. What is the difference ? say 'foobar' ~~ / foo || foobar / # 「foo」 say 'foobar' ~~ / foo | foobar / # 「foobar」
Giamo asked 19/3, 2020 at 2:0

1

The documentation in Perl 6 programs, using the Pod 6 DSL, are actually parsed as part of the code; this makes that documentation available, inside the program, as the $=pod variable. However, I'd...
Philis asked 5/12, 2018 at 14:12

2

Solved

In the Perl 6 world, currying is an universal term indicating partial instantiation, and it's also used in the world of (parametrized) roles. However, it's not clear how to actually use it: role ...
Riboflavin asked 13/4, 2019 at 7:44

1

Solved

From World.nqp, line 3602 : nqp::if( nqp::istype(nqp::atpos($task,3),$!Block), QAST::Op.new( :op<call>, QAST::WVal.new(:value(nqp::atpos($task,3))), $self, $getattr ), nqp::if( nqp:...
Dissertate asked 11/3, 2019 at 17:25

1

Solved

I am trying to learn myself how to debug rakudo and nqp. So this is my first attempt: cd $HOME/debug git clone https://github.com/rakudo/rakudo.git cd rakudo perl Configure.pl --gen-moar --gen-nqp...
Absurdity asked 25/1, 2019 at 19:43

1

Solved

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...
Cribble asked 17/12, 2018 at 9:51

1

Solved

I'm trying to find how the binding operation works on attributes and what makes it so different from nqp::bindattr. Consider the following example: class Foo { has @!foo; submethod TWEAK { my...
Eveevection asked 2/10, 2018 at 17:3

1

I'd like to communicate with mpv using Unix sockets, but Perl 6 doesn't offer any high level interface for doing that. So I thought I could write a little module for that, started digging deep...
Sporule asked 14/9, 2017 at 14:38

1

Solved

NQP was mainly designed to bootstrap the perl6 language, but I'm thinking whether it is possible to use it as optimization. I know that rakudo is not perfectly optimized yet, but I'm looking for a ...
Congruent asked 8/10, 2015 at 18:42
1

© 2022 - 2024 — McMap. All rights reserved.