+++ Preparing MOAR build directories
++++++ Building MOAR backend
+++ Generating gen/moar/stage1/nqpmo.nqp
+++ Compiling gen/moar/stage1/ModuleLoader.moarvm
+++ Generating gen/moar/stage1/NQPCORE.setting
+++ Generating gen/moar/stage1/QASTNode.nqp
+++ Generating gen/moar/stage1/QRegex.nqp
+++ Generating stage 1 nqp-config.nqp
+++ Generating gen/moar/stage1/MASTNodes.nqp
my @h = (
{
name => "albert",
age => 40,
size => 2
},
{
name => "andy",
age => 22,
I have the following C code:
#include <glibtop.h>
#include <glibtop/procwd.h>
#include <glibtop/proclist.h>
#include <stdio.h>
#include <unistd.h>
Check out this little gem!
use Raylib::Bindings;
for MY.WHO
.pairs
.grep( *.key.starts-with("\&") )
.values
.categorize(
I have a piece of asyncronous code I would like to run at a later date. I figured a Promise would suit this purpose fine.
So far this is what I have:
sub makePromise ( $o, $m, :$in = 0, :$args = @() ) {
my $p = Promise.new;
for $args {
RakuAST::StatementList.new(
RakuAST::Statement::Use.new(
module-name => RakuAST::Name.from-identifier("Cro::HTTP::Router")
),
RakuAST::Call::Name.new(
name => RakuAST::Name.from-identifier("route"),
args => RakuAST::ArgList.new(
RakuAST::Block.new(
body => RakuAST::Blockoid.new(
Over the weekend, I wrote a module to do just that. It's early days still, as I'm sure there are tags that are not covered. I'll need to find the spec and have a nice long sit down before it's complete.
Here's what I have, though.
Have fun!
use XML::Class;
The BQN list operator ‿
can readily transfer into Raku. It's basically the same as Raku's list operator: ,
.
There is a small devil in the detail and that can be illustrated in the following example:
multi sub infix:<‿> ($a, $b) {
infix:<,>($a, $b)
}
say 1‿2‿3; # ((1 2) 3)
I was just introduced to BQN, recently. While it won't be my first choice of language until I understand it a lot more, it does provide an interesting insight into all things Listy.
So I thought I might grab some low hanging fruit and bring some of that BQN goodness into Raku, a language that I -am- using on the daily.
Here's an implementation for the Range operator (↕):
multi sub prefix:<↕>(List() $l) {
I went to [bart.gooogle.com] and asked it: "How do you write lambda functions in Raku?"
Here's how it responded:
===
To write lambda functions in Raku, you can use the following syntax:
Code snippet