constant term:<$ab> = $; say $ab;
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
my atomicint $limit = 8; | |
sub spawn(&c, |args) { | |
# dd $limit; | |
⚛$limit > 0 | |
?? start { ENTER $limit⚛--; LEAVE $limit⚛++; c(|args) } | |
!! c(|args) | |
} | |
sub collect(*@things) { | |
slip @things.map: -> $thing { $thing ~~ Promise ?? await $thing !! $thing } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
constant &auto-enum = BEGIN (Q:to /◻/).EVAL; | |
proto sub quasi-enum($str, |opts ( :$DEFAULT, :$SOURCEPOS, :$HARDBREAKS, :$UNSAFE, :$NOBREAKS, :$NORMALIZE, :$VALIDATE_UTF8, :$SMART, :$GITHUB_PRE_LANG, :$LIBERAL_HTML_TAG, :$FOOTNOTES, :$STRIKETHROUGH_DOUBLE_TILDE, :$TABLE_PREFER_STYLE_ATTRIBUTES, :$FULL_INFO_STRING )) { | |
constant %CMARK_OPTIONS = | |
DEFAULT => 0, | |
SOURCEPOS => 1 +< 1, | |
HARDBREAKS => 1 +< 2, | |
UNSAFE => 1 +< 17, | |
NOBREAKS => 1 +< 4, | |
NORMALIZE => 1 +< 8, | |
VALIDATE_UTF8 => 1 +< 9 , |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class C { | |
method m(Int $i) { } | |
method new(::?CLASS:U: *%extra-methods) { | |
my $replacer = my role :: {}; | |
for %extra-methods.kv -> $name, $code { | |
$replacer.^add_method($name, $code) if $code.signature ~~ self.^lookup($name).signature; | |
} | |
$replacer.^compose; | |
callwith() but $replacer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export PATH="/usr/local/src/rakudo/install/share/perl6/site/bin:/usr/local/src/rakudo/install/bin:$PATH" | |
export RAKUDO_MAX_THREADS=16 | |
export RAKUDO_ERROR_COLOR=yes | |
export TEST_JOBS=12 | |
export ZEF_TEST_DEGREE=12 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
role Perl6::Metamodel::MultipleInheritance { | |
# Array of parents. | |
has @!parents; | |
# MARK | |
has @!children; | |
method add_child($obj, $child) { | |
say($obj.HOW.name($child)); | |
say($obj.HOW.HOW.name($child)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use v6.d; | |
use lib '.'; | |
use seepy 'seepy'; | |
seepy Root { } | |
seepy Base is Root { | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html><body><div class='index'> | |
<div class='entry'><a href="issues.html#374"><span class='number'>374</span></a> [open] <span class='title'>Errors should not be adhoc in core</span></div> | |
<div class='entry'><a href="issues.html#370"><span class='number'>370</span></a> [open] <span class='title'>A way around "multi-level classification"</span></div> | |
<div class='entry'><a href="issues.html#366"><span class='number'>366</span></a> [open] <span class='title'>`next`, `last`, `redo` shouldn't fall through subroutines</span></div> | |
<div class='entry'><a href="issues.html#362"><span class='number'>362</span></a> [open] <span class='title'>Expand DEPRECATED functionality.</span></div> | |
<div class='entry'><a href="issues.html#369"><span class='number'>369</span></a> [open] <span class='title'>Provide `sort` with `:k` adverb (returns ordinal index)</span></div> | |
<div class='entry'><a href="issues.html#368"><span class='number'>368</span></a> [open] <span class='title'>LinkedIn does not recognize "Raku Developer" as a job |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
multi sub trait_mod:<is>(Routine \r, :$renamed) { | |
role RenamedMulti[$name] { | |
method name { $name } | |
} | |
use nqp; | |
my Mu $do := nqp::getattr(nqp::decont(r), ForeignCode, '$!do'); | |
nqp::setcodename($do, nqp::decont_s($renamed)); | |
r does RenamedMulti[$renamed] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
multi sub trait_mod:<is>(Routine \r, :$renamed) { r does role :: { method name { $renamed } } } | |
multi sub foo(Int $) { say &?ROUTINE.name } | |
multi sub foo(Str $) is renamed<stringer> { say &?ROUTINE.name } | |
foo(42); | |
foo('answer'); | |
} |