Skip to content

Instantly share code, notes, and snippets.

@timo
timo / Perl6-Github-Linkify.js
Last active September 3, 2020 14:48
linkify filename/line-number entries in github issues in a couple different formats
// ==UserScript==
// @name Perl6-Github-Linkify
// @namespace http://tampermonkey.net/
// @version 0.3.4
// @description Turns paths to perl6 source (core setting, grammar, actions) and moarvm code to clickable links on github issue/PR pages as well as gists
// @author Timo 'timotimo' Paulssen
// @match https://github.com/*/*/issues/*
// @match https://github.com/*/*/pull/*
// @match https://gist.github.com/*
// @match https://pastebin.com/*
@cjfields
cjfields / Simple benchmark run
Last active September 8, 2016 22:04
Parsing a FASTA file
[cjfields@Chriss-MacBook-Air bioperl6]$ time perl fasta.pl sequence.fasta
Count: 12097
real 0m0.434s
user 0m0.416s
sys 0m0.014s
[cjfields@Chriss-MacBook-Air bioperl6]$ time perl6 fasta.pl6 sequence.fasta
Count: 12097
real 0m4.406s
@jnthn
jnthn / glr.p6
Last active August 29, 2015 14:26
Great List Re-implementation: initial draft/exploration
# This file contains some work-in-progress bottom-up design work for the GLR.
# All types and operators introduced are prefixed with GLR, so there are no
# conflicts with those in core (the GLR prefix has even been used where there
# isn't anything in core to conflict with, to make clear what's being added).
# There's no syntax sugar, but rather explanations of what some syntax will
# desugar to are included. The various MAIN subs do tests to check correctness
# and various benchmarks to compare with what we have in Rakudo today.
# Up-front summary:
# * (1, 2, 3) makes a List; there is no Parcel. List supports laziness and
anonymous
anonymous / gist:4348324
Created December 20, 2012 20:34
sub try_nqp_transform($code, $transform) {
pir::load_language__0s('NQP');
my $nqp := pir::compreg__Ps('nqp');
my $p6 := pir::compreg__Ps('perl6');
my $qast := $p6.compile($code, :target('past'));
my $comp := $nqp.compile($transform);
my $res := nqp::atpos($comp, 1)($qast);
my $pbc := $p6.evalpmc($p6.pir($p6.post($res)));
$pbc();