As configured in my dotfiles.
start new:
tmux
start new with session name:
# a rewrite of http://blogs.perl.org/users/ovid/2016/01/a-naive-sql-shell.html in Perl 6 | |
use v6; | |
use DBIish; | |
use Linenoise; | |
use Text::Table::Simple; | |
my constant HIST-FILE = '.myhist'; | |
my constant HIST-LEN = 100; | |
my constant ROW-LIMIT = 100; |
#!/usr/bin/env perl | |
use warnings; | |
use 5.18.0; | |
use Term::ReadLine; | |
use Term::ReadKey; | |
use Try::Tiny; | |
use Text::Table; | |
use Term::ANSIColor; | |
use DBI; |
#!/usr/bin/env perl | |
# vim: filetype=perl | |
use 5.18.0; | |
use lib qw{lib t/lib t/tests}; | |
use warnings; | |
use autodie ':all'; | |
use Capture::Tiny 'capture'; | |
use Perl6::Junction 'any'; |
#!/usr/bin/env perl | |
use autodie ':all'; | |
use Test::Most; | |
use FindBin; | |
use Veure::Config 'config'; | |
use File::Spec::Functions 'catfile'; | |
use Capture::Tiny 'capture'; | |
bail_on_fail; |
As configured in my dotfiles.
start new:
tmux
start new with session name:
#!/usr/bin/env perl | |
use 5.10.0; | |
use strict; | |
use warnings; | |
use Getopt::Long; | |
use Data::Dumper; | |
$Data::Dumper::Indent = 0; | |
$Data::Dumper::Terse = 1; |
" Drop this into .vim/plugin.vawa.vim | |
" if you already have vawa.vim, rename appropriately | |
" automatically highlights variables under cursor, allowing you to easily see the data flow. | |
" Vawa Plugin for VIM > 7.3 version 1.00 | |
" Maintainer: Sandeep.c.r<[email protected]> | |
" Hacked for Perl by Curtis "Ovid" Poe <[email protected]> | |
function! s:vawa() | |
call clearmatches() |
SELECT thread.* | |
FROM email thread | |
JOIN email selected ON selected.email_thread_id = thread.email_thread_id | |
JOIN character recipient ON recipient.character_id = thread.recipient_id | |
JOIN station_area sa ON sa.station_area_id = recipient.station_area_id | |
JOIN station st ON st.station_id = sa.station_id | |
JOIN star origin ON origin.star_id = thread.sender_star_id | |
JOIN star destination ON destination.star_id = st.star_id | |
LEFT JOIN route | |
ON ( route.from_id = origin.star_id AND route.to_id = destination.star_id ) |
8: [RedBlack::B, Any, 8, Any] | |
6: [RedBlack::B, [RedBlack::R, Any, 6, Any], 8, Any] | |
4: [RedBlack::B, [RedBlack::B, Any, 4, Any], 6, [RedBlack::B, Any, 8, Any]] | |
7: [RedBlack::B, [RedBlack::B, Any, 4, Any], 6, [RedBlack::B, [RedBlack::R, Any, 7, Any], 8, Any]] | |
9: [RedBlack::B, [RedBlack::B, Any, 4, Any], 6, [RedBlack::B, [RedBlack::R, Any, 7, Any], 8, [RedBlack::R, Any, 9, Any]]] | |
3: [RedBlack::B, [RedBlack::B, [RedBlack::R, Any, 3, Any], 4, Any], 6, [RedBlack::B, [RedBlack::R, Any, 7, Any], 8, [RedBlack::R, Any, 9, Any]]] | |
2: [RedBlack::B, [RedBlack::R, [RedBlack::B, Any, 2, Any], 3, [RedBlack::B, Any, 4, Any]], 6, [RedBlack::B, [RedBlack::R, Any, 7, Any], 8, [RedBlack::R, Any, 9, Any]]] | |
1: [RedBlack::B, [RedBlack::R, [RedBlack::B, [RedBlack::R, Any, 1, Any], 2, Any], 3, [RedBlack::B, Any, 4, Any]], 6, [RedBlack::B, [RedBlack::R, Any, 7, Any], 8, [RedBlack::R, Any, 9, Any]]] | |
5: [RedBlack::B, [RedBlack::R, [RedBlack::B, [RedBlack::R, Any, 1, Any], 2, Any], 3, [RedBlack::B, Any, 4, [RedBlack::R, Any, 5, An |
enum RedBlack <R B>; | |
sub MAIN { | |
my $tree = Any; | |
for (1..10).pick(*) -> $node { | |
$tree = insert($node, $tree); | |
printf "%2d: %s\n", $node, $tree.perl; | |
} | |
} |