Skip to content

Instantly share code, notes, and snippets.

print "I can execute gists, too"
[Event "Rated Blitz game"]
[Site "https://lichess.org/a3rW8t2w"]
[Date "2018.05.23"]
[Round "-"]
[White "RonaldFranco"]
[Black "makokha"]
[Result "0-1"]
[UTCDate "2018.05.23"]
[UTCTime "02:43:14"]
[WhiteElo "1743"]
[Event "New York State Open"]
[Site "Poughkeepsie, NY USA"]
[Date "1963.09.01"]
[EventDate "?"]
[Round "5"]
[Result "1-0"]
[White "Robert James Fischer"]
[Black "Arthur Bisguier"]
[ECO "C59"]
[WhiteElo "?"]
[Event "?"]
[Site "?"]
[Date "????.??.??"]
[Round "?"]
[White "?"]
[Black "?"]
[Result "*"]
1.e4 e5 2.Nf3 Nc6 3.Nc3 Nf6 4.Bc4 Bc5 5.Nxe5 Nxe5 6.d4 Nxc4 7.dxc5 O-O 8.Bg5 Re8 9.Qd4 Nxb2 10.O-O h6 11.Bh4 d6 12.Rab1 dxc5 13.Qxc5 b6 14.Qc6 Rb8 15.Rxb2 Bb7 16.Qc4 Qe7 17.f3 g5 18.Bg3 Nh5 19.Bxc7 Rbc8 20.Nb5 a6 21.Na7 Rxc7 22.Qd4 Qc5 23.c3 Qxc3 24.Qxc3 Rxc3 25.Rxb6 Re7 26.Rd1 Rc2 27.Rd8+ Kg7 28.a4 Ra2 29.Rd4 Nf4 30.g3 Ne2+ *
module := RDF-Turtle
version := $(shell jq -r .version META6.json)
test:
TEST_AUTHOR=1 prove -e'perl6 -Ilib' t/*
dist:
echo "Making $(version)"
git archive --prefix=$(module)-$(version)/ -o $(module)-$(version).tar.gz $(version)
use nqp;
# see https://rt.perl.org/Public/Bug/Display.html?id=131530
# search for add_categorical in src/Perl6/Grammar.nqp
my $compiler = nqp::getcomp("perl6");
my $outer_ctx;
my $*MAIN_CTX;
sub reval($code) {
my $*CTXSAVE = class {
<!DOCTYPE html>
<html lang="en" ng-app="moarProfApp" ng-controller="NavigationController">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>MoarVM Profiler Results</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap-theme.min.css">
<style>
<!DOCTYPE html>
<html lang="en" ng-app="moarProfApp" ng-controller="NavigationController">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>MoarVM Profiler Results</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap-theme.min.css">
<style>
@bduggan
bduggan / tailgrep.p6
Last active September 11, 2018 22:33
#!/usr/bin/env perl6
use JSON::Fast;
use Terminal::ANSIColor;
my @frames = < / - | - \ - >;
sub spinner {
@frames[$++ % +@frames];
}
sub download-spinners {
#!/usr/bin/env perl6
sub spinner() {
<\ - | - / ->[$++ % 6]
}
sub MAIN($expr, $filename) {
shell "tput 'civis'";
my $proc = Proc::Async.new:
<<tail -f $filename>>;