I hereby claim:
- I am KrisShannon on github.
- I am krisshannon (https://keybase.io/krisshannon) on keybase.
- I have a public key whose fingerprint is 80D7 BCE7 50DD 755E 3BA0 5313 EF0B 86E7 85CC F24B
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
iostat | iostat definition | node_exporter definition |
---|---|---|
rd_ios |
reads_completed_total |
|
rd_merges |
reads_merged_total |
|
rd_sectors |
read_bytes_total / 512 |
|
rd_ticks |
read_time_seconds_total * 1000 |
|
wr_ios |
writes_completed_total |
|
wr_merges |
writes_merged_total |
|
wr_sector |
written_bytes_total / 512 |
|
wr_ticks |
write_time_seconds_total * 1000 |
L.T.M.P. = Longest Term Matching Prefix | |
P.P. = Partially procedural (the L.T.M.P. cannot extend beyond this construct) | |
L.T.M.P. will match the whole construct of anything which is not P.P. | |
FOO BAR | |
P.P. if either FOO or BAR are P.P. | |
if FOO is not P.P. then the L.T.M.P is FOO followed by the L.T.M.P of BAR | |
otherwise the L.T.M.P is the L.T.M.P of FOO |
grammar LTM-Hell { | |
rule TOP { [ <a> | <b> ] } | |
token a { [ xxxxx { fail } | xxx {} xx ] } | |
token b { [ xxxx {} x ] } | |
} |
Test Summary Report | |
------------------- | |
t/nqp/34-rxcodeblock.t (Wstat: 256 Tests: 2 Failed: 0) | |
Non-zero exit status: 1 | |
Parse errors: Bad plan. You planned 12 tests but ran 2. | |
t/nqp/38-quotes.t (Wstat: 0 Tests: 7 Failed: 3) | |
Failed tests: 5-7 | |
t/nqp/39-pointy.t (Wstat: 256 Tests: 17 Failed: 13) | |
Failed tests: 5-17 | |
Non-zero exit status: 1 |
Macros and closures are a bit alike. Here's I'll try to nail down one of their differences.
A closure is a function which carries with it a lexical environment. The returned block below, for example, carries around the lexical environment containing the variable $counter
:
sub create-counter(Int $start-value) {
my Int $counter = $start-value;
return { $counter++ };
}
constant @primes = 2, 3, -> $n is copy { repeat { $n += 2 } until $n %% none @primes ... * > sqrt $n; $n; } ... *; | |
multi factors(1) { 1 } | |
multi factors(Int $remainder is copy) { | |
gather for @primes -> $factor { | |
if $factor * $factor > $remainder { | |
take $remainder if $remainder > 1; | |
last; | |
} |
#! /usr/bin/env perl6 | |
class Vocab { | |
has Str $.word; | |
has Str @.synonyms = []; | |
my %words; | |
submethod BUILD(:$!word, :@!synonyms, *@pos, *%nam) { | |
note "Vocab BUILD(): ", @pos.perl, %nam.perl; |