This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I took an example from Data::Dump::Tree (DDT)and started playing with Promises, the | |
goal was simply educative, I am following "Parallelism, Concurrency, | |
and Asynchrony in Perl 6" document to try the different mechanisms. The final goal | |
being the parallelization of DDT as it is too sluggish and also in preparation of | |
Asciio 2.0. | |
<jnthn> | |
1 will probably because the thread pool over-subscribes the CPU. Second is 'cus you exhausted the thread pool (16 is the number of threads it has by default). Third one may be a data race that's worth reporting. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Hi Jonathan, | |
I took an example from Data::Dump::Tree (DDT)and started playing with Promises, the | |
goal was simply educative, I am following your "Parallelism, Concurrency, | |
and Asynchrony in Perl 6" document to try the different mechanisms. The final goal | |
being the parallelization of DDT as it is too sluggish and also in preparation of | |
Asciio 2.0. Tell me if you want the development branch and the example on github to | |
check the problems below. | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# prompt matching function for tmux | |
# it can be also defined elsewhere | |
if ! type -t __copy_app_match_my_prompt 1> /dev/null ; then | |
__copy_app_match_my_prompt() { printf '^(\\\\033\\[[^m]+m)?[[:digit:]]+\ ' ; } # the way it looks for me in a tmux buffer | |
fi | |
last_command() { history -p !! | perl -pe 's/^\s*[0-9]+\s*//' | tr -d '\n' ; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
use strict ; | |
use warnings ; | |
use Term::ANSIColor qw(color colorvalid) ; | |
# todo: | |
# local $Term::ANSIColor::AUTOLOCAL = 1; | |
# push /pop | |
# Xterm position |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
use strict ; | |
use warnings ; | |
use Getopt::Long; | |
use File::Find::Rule ; | |
use File::LsColor qw(ls_color); | |
tdu() ; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export bold='\e[01m' | |
export underlined='\e[04m' | |
export flashing='\e[05m' | |
export black='\e[30m' | |
export red='\e[31m' | |
export green='\e[32m' | |
export yellow='\e[33m' | |
export blue='\e[34m' | |
export magenta='\e[35m' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
file_tree() | |
{ | |
pid="$1" | |
indentation=$(printf "%${indent}s") | |
[[ "$$" -eq "$pid" ]] && printf "$yellow" | |
echo "$indentation"$(ps -o pid= -o cmd= -p $pid | perl -pe 's/^\s+// ; s/\s+/,/') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
use strict ; | |
use warnings ; | |
# 256colors display index-rgb and small cubes | |
# 256colors index display system colors on background index | |
# 256colors R G B display system colors on background RGB | |
if(@ARGV == 1) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
use strict ; | |
use warnings ; | |
use Term::ANSIColor ; | |
if (grep {/^--help/} @ARGV) | |
{ | |
print <<'EOH' ; | |
Usage: $> command | color_pipe regex color [regex color ...] | command ... |
NewerOlder