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...
2
Solved
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...
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...
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...
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 ...
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...
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...
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 $....
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」
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 ...
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:...
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...
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...
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...
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 ...
1
© 2022 - 2024 — McMap. All rights reserved.