Skip to content

Instantly share code, notes, and snippets.

View donaldh's full-sized avatar
😷

Donald Hunter donaldh

😷
View GitHub Profile
@donaldh
donaldh / golf.raku
Created October 26, 2020 15:48
ENV strings embedded in bytecode
use Test;
@donaldh
donaldh / build.log
Last active October 26, 2020 15:43
Building rakudo-star-2020.05 from rakudo-star-2020.05.tar.gz
/rakudo-star-2020.05/lib/actions/install.bash: line 34: warning: setlocale: LC_ALL: cannot change locale (C.UTF-8): No such file or directory
/rakudo-star-2020.05/lib/actions/install.bash: line 43: warning: setlocale: LC_ALL: cannot change locale (C.UTF-8)
[2020-09-16T19:01:45] [INFO] Installing Raku in /opt/raku
[2020-09-16T19:01:45] [INFO] Starting build on MoarVM
[2020-09-16T19:01:45] [NOTIC] Using /rakudo-star-2020.05/tmp/tmp.RUJkmckVAF as working directory
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = "C.UTF-8",
LANG = (unset)
@donaldh
donaldh / multidim-gist.log
Last active May 12, 2020 15:28
Proposed .gist output for multidim arrays
% ./rakudo-m -e 'say my @a[100;100] = (1..100) xx 100'
[[1 2 3 4 5 6 7 8 9 10 ...]
[1 2 3 4 5 6 7 8 9 10 ...]
[1 2 3 4 5 6 7 8 9 10 ...]
[1 2 3 4 5 6 7 8 9 10 ...]
[1 2 3 4 5 6 7 8 9 10 ...]
[1 2 3 4 5 6 7 8 9 10 ...]
[1 2 3 4 5 6 7 8 9 10 ...]
[1 2 3 4 5 6 7 8 9 10 ...]
[1 2 3 4 5 6 7 8 9 10 ...]
@donaldh
donaldh / multidim-gist.log
Created May 12, 2020 15:16
Proposed .gist output for multidim arrays
% ./rakudo-m -e 'say my int @a[2;100;100]'
[[[0 0 0 0 0 0 0 0 0 0 ...]
[0 0 0 0 0 0 0 0 0 0 ...]
[0 0 0 0 0 0 0 0 0 0 ...]
[0 0 0 0 0 0 0 0 0 0 ...]
[0 0 0 0 0 0 0 0 0 0 ...]
[0 0 0 0 0 0 0 0 0 0 ...]
[0 0 0 0 0 0 0 0 0 0 ...]
[0 0 0 0 0 0 0 0 0 0 ...]
[0 0 0 0 0 0 0 0 0 0 ...]

Golfing Faster FASTA

After reading Timotimo’s excellent Faster FASTA Please blog post, I wanted to test the performance of some other Perl 6 methods.

IO.slurp.lines

This is my baseline which incorporates Timotimo’s performance improvements to the original solution, somewhat simplified.

my %seqs;
@donaldh
donaldh / proxy-env.sh
Created August 23, 2017 21:59
Building PNDA mirror behind proxy
export http_proxy=http://proxy:80
export https_proxy=http://proxy:80
export JAVA_FLAGS="-Dhttp.proxyHost=proxy -Dhttp.proxyPort=80 -Dhttps.proxyHost=proxy -Dhttps.proxyPort=80 -Dhttp.nonProxyHosts=localhost,127.0.0.1,proxy"
export JAVA_OPTS="$JAVA_FLAGS"
export MAVEN_OPTS="$JAVA_FLAGS"
@donaldh
donaldh / network-topology.json
Created July 12, 2017 15:50
OVS and openflow
{
"topology": [
{
"topology-id": "flow:1",
"node": [
{
"node-id": "openflow:3",
"opendaylight-topology-inventory:inventory-node-ref": "/opendaylight-inventory:nodes/opendaylight-inventory:node[opendaylight-inventory:id='openflow:3']",
"termination-point": [
{
# Copy a dependency from repo to current directory
mvn dependency:copy -Dartifact=donaldh:yang-validator:1.0:jar:executable -DoutputDirectory=.
@donaldh
donaldh / deployment.md
Last active March 30, 2017 15:27
PNDA deployment notes

PNDA Deployment View

           saltmaster
               
         ,- kafka-0, ..., kafka-n
        /   
bastion --- cdh-edge
        \