Skip to content

Instantly share code, notes, and snippets.

use API::Discord;
#use IRC::Client;
use Config::Simple;
use GithubNotif;
use HTTP::Tinyish;
my $ua = HTTP::Tinyish.new;
#https://discordapp.com/api/oauth2/authorize?client_id=555485913912836106&scope=bot&permissions=2048
my $config = Config::Simple.read("auth-token.p6");
enum Command (
CMD_Copy => 0,
CMD_ByteRepeat => 1,
CMD_WordRepeat => 2,
CMD_ByteInc => 3,
CMD_CopyExisting => 4
);
grammar AlttpDecompression {
skarsnik@DESKTOP-UIA12T1:/mnt/f/Project/Perl6/tmp/gptrixie$ ../../rakudo/install/bin/perl6 -I lib -I ../exemel/lib/ -I ../p6-HTML-Escape/lib/ bin/gptrixie
BEGIN
Segmentation fault (core dumped)
skarsnik@DESKTOP-UIA12T1:/mnt/f/Project/Perl6/tmp/gptrixie$ ../../rakudo/install/bin/perl6 -I lib -I ../exemel/lib/ -I ../p6-HTML-Escape/lib/ bin/gptrixie
Segmentation fault (core dumped)
skarsnik@DESKTOP-UIA12T1:/mnt/f/Project/Perl6/tmp/gptrixie$ ../../rakudo/install/bin/perl6 --version
This is Rakudo version 2018.09-70-gab83b9d82 built on MoarVM version 2018.09-116-g80397b20f
implementing Perl 6.c.
import QtQuick 2.0
// Display the remaining time on the Nobilia market in Secret of Evermore
/* First is your 'ui' definition (use Qt creator if you don't want to do that manually and copy/paste) */
Rectangle {
width: 250
height: 150
id : window
color : "black"
I think Socket::Inet could be a bit changed on how it's implemented.
Currently it has 2 defaults :
-The SA Familly attribute is totally ignored.
This means like in a case of localhost being ipv4 and ipv6 the user has no control over what protocole will be used.
-No way to specify on wisch ip/interface you want to bind your socket when you use connect
This mean that a server with multiple ip can't use them.
Proposed changes to fix that:
Use the argument passed to nqp::socket to specify the sa family. (actually it does nothing in MoarVM, look like a parrot reliquat?)
{
"perl" : "6.*",
"name" : "Gumbo",
"license" : "Artistic-2.0",
"version" : "*",
"description" : "Binding of the gumbo C library, a html parser lib",
"author" : "Sylvain Colinet",
"provides" : {
"Gumbo" : "lib/Gumbo.pm6",
"Gumbo::Parser" : "lib/Gumbo/Parser.pm6",
skarsnik@vps300582:~/perl6/benchmark$ ./rakudo-2017.05/install/bin/perl6 -I p6-linux-proc-statm/lib/ ../testshell.p6 shell
Before shell call : 65.996 kb
html is 258974 chars
After shell call : 66.860 kb
After sleep 5 : 66.860 kb
skarsnik@vps300582:~/perl6/benchmark$ ./rakudo-2017.07/install/bin/perl6 -I p6-linux-proc-statm/lib/ ../testshell.p6 shell
Before shell call : 78.812 kb
html is 258974 chars
After shell call : 106.104 kb
After sleep 5 : 107.192 kb
xenial)skarsnik@localhost:~/perl6/rakudo$ uname -a
Linux localhost 3.14.0 #1 SMP PREEMPT Thu Jul 13 11:50:53 PDT 2017 armv7l armv7l armv7l GNU/Linux
t/spec/S17-supply/syntax.t (Wstat: 65280 Tests: 67 Failed: 0)
Non-zero exit status: 255
Parse errors: Bad plan. You planned 73 tests but ran 67.
t/spec/S03-operators/comparison.t (Wstat: 768 Tests: 112 Failed: 3)
Failed tests: 102-104
Non-zero exit status: 3
Benchmarking "normal" usage of Perl6.
Gumbo:
The first test is just parsing a sizeable HTML page (saved localy, around 260Kb, 11 000+ html elements) using the Gumbo module.
The Gumbo module use a C library that parse HTML5 quite quickly then create Perl 6 XML object from the C structures.
The *XML* result is the time for Perl 6 to go through the C object and create these XML objects (html parse is done in ~0.04 sec by C)
The *Dummy* result is a the time to goes through the C tree without creating the object.
MiniGumbo:
To try to track down a bit what is very slow in this. I created a smaller version the Gumbo module and the XML module.
Average time to transform C data to Perl6 object (xml) in seconds
"rakudo-2016.01.1" => ${:xml(5.3950312896)},
"rakudo-2016.02" => ${:xml(4.92652848062)},
"rakudo-2016.03" => ${:xml(4.7317674055)},
"rakudo-2016.04" => ${:xml(4.9266673772)},
"rakudo-2016.05" => ${:xml(4.71681947714)},
"rakudo-2016.06" => ${:xml(3.9090515814)},
"rakudo-2016.07.1" => ${:xml(2.7266115406)},
"rakudo-2016.08.1" => ${:xml(2.6801272264)},