Co-authored-by: John Kerl <kerl.john.r@gmail.com>
This commit is contained in:
Jakub Wilk 2022-11-30 15:27:42 +01:00 committed by GitHub
parent 3333d16708
commit 636ca8873d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 28 additions and 28 deletions

View file

@ -57,7 +57,7 @@ During the coding of Miller, I've been guided by the following:
* If you want to fix a bug, you should be able to quickly and confidently find out where and how.
* If you want to learn something about Go channels, or lexing/parsing in Go -- especially if you don't already know much about them -- the comments should help you learn what you want to.
* If you're the kind of person who reads other people's code for fun, well, the code should be fun, as well as readable.
* `README.md` files throughout the directory tree are intended to give you a sense of what is where, what to read first and and what doesn't need reading right away, and so on -- so you spend a minimum of time being confused or frustrated.
* `README.md` files throughout the directory tree are intended to give you a sense of what is where, what to read first and what doesn't need reading right away, and so on -- so you spend a minimum of time being confused or frustrated.
* Names of files, variables, functions, etc. should be fully spelled out (e.g. `NewEvaluableLeafNode`), except for a small number of most-used names where a longer name would cause unnecessary line-wraps (e.g. `Mlrval` instead of `MillerValue` since this appears very very often).
* Code should not be too clever. This includes some reasonable amounts of code duplication from time to time, to keep things inline, rather than lasagna code.
* Things should be transparent. For example, the `-v` in `mlr -n put -v '$y = 3 + 0.1 * $x'` shows you the abstract syntax tree derived from the DSL expression.

View file

@ -1627,7 +1627,7 @@ MILLER(1) MILLER(1)
-r {input field regex} -o {key-field name,value-field name}
These pivot/reshape the input data such that the input fields are removed
and separate records are emitted for each key/value pair.
Note: if you have multiplep regexes, please specify them using multiple -r,
Note: if you have multiple regexes, please specify them using multiple -r,
since regexes can contain commas within them.
Note: this works with tail -f and produces output records for each input
record seen.
@ -1927,7 +1927,7 @@ MILLER(1) MILLER(1)
As of Miller 6 this happens automatically, but the flag is accepted
as a no-op for backward compatibility with Miller 5 and below.
-d {x,y,z} Weights for EWMA. 1 means current sample gets all weight (no
smoothing), near under under 1 is light smoothing, near over 0 is
smoothing), near under 1 is light smoothing, near over 0 is
heavy smoothing. Multiple weights may be specified, e.g.
"mlr step -a ewma -f sys_load -d 0.01,0.1,0.9". Default if omitted
is "-d 0.5".
@ -3135,8 +3135,8 @@ MILLER(1) MILLER(1)
int: declares an integer local variable in the current curly-braced scope.
Type-checking happens at assignment: 'int x = 0.0' is an error.
1mmap0m
map: declares an map-valued local variable in the current curly-braced scope.
map
map: declares a map-valued local variable in the current curly-braced scope.
Type-checking happens at assignment: 'map b = 0' is an error. map b = {} is
always OK. map b = a is OK or not depending on whether a is a map.

View file

@ -1606,7 +1606,7 @@ MILLER(1) MILLER(1)
-r {input field regex} -o {key-field name,value-field name}
These pivot/reshape the input data such that the input fields are removed
and separate records are emitted for each key/value pair.
Note: if you have multiplep regexes, please specify them using multiple -r,
Note: if you have multiple regexes, please specify them using multiple -r,
since regexes can contain commas within them.
Note: this works with tail -f and produces output records for each input
record seen.
@ -1906,7 +1906,7 @@ MILLER(1) MILLER(1)
As of Miller 6 this happens automatically, but the flag is accepted
as a no-op for backward compatibility with Miller 5 and below.
-d {x,y,z} Weights for EWMA. 1 means current sample gets all weight (no
smoothing), near under under 1 is light smoothing, near over 0 is
smoothing), near under 1 is light smoothing, near over 0 is
heavy smoothing. Multiple weights may be specified, e.g.
"mlr step -a ewma -f sys_load -d 0.01,0.1,0.9". Default if omitted
is "-d 0.5".
@ -3114,8 +3114,8 @@ MILLER(1) MILLER(1)
int: declares an integer local variable in the current curly-braced scope.
Type-checking happens at assignment: 'int x = 0.0' is an error.
1mmap0m
map: declares an map-valued local variable in the current curly-braced scope.
map
map: declares a map-valued local variable in the current curly-braced scope.
Type-checking happens at assignment: 'map b = 0' is an error. map b = {} is
always OK. map b = a is OK or not depending on whether a is a map.

View file

@ -1729,7 +1729,7 @@ Options:
-g {d,e,f} Optional group-by-field names
-F Computes integerable things (e.g. counter) in floating point.
-d {x,y,z} Weights for ewma. 1 means current sample gets all weight (no
smoothing), near under under 1 is light smoothing, near over 0 is
smoothing), near under 1 is light smoothing, near over 0 is
heavy smoothing. Multiple weights may be specified, e.g.
"mlr step -a ewma -f sys_load -d 0.01,0.1,0.9". Default if omitted
is "-d 0.5".
@ -3805,7 +3805,7 @@ Type-checking happens at assignment: 'int x = 0.0' is an error.
.RS 0
.\}
.nf
map: declares an map-valued local variable in the current curly-braced scope.
map: declares a map-valued local variable in the current curly-braced scope.
Type-checking happens at assignment: 'map b = 0' is an error. map b = {} is
always OK. map b = a is OK or not depending on whether a is a map.
.fi

View file

@ -104,7 +104,7 @@ If you know the name of the thing you're looking for, use `mlr help`:
<b>mlr help map</b>
</pre>
<pre class="pre-non-highlight-in-pair">
map: declares an map-valued local variable in the current curly-braced scope.
map: declares a map-valued local variable in the current curly-braced scope.
Type-checking happens at assignment: 'map b = 0' is an error. map b = {} is
always OK. map b = a is OK or not depending on whether a is a map.
</pre>

View file

@ -1155,7 +1155,7 @@ in: used in for-loops over stream records or out-of-stream variables.
int: declares an integer local variable in the current curly-braced scope.
Type-checking happens at assignment: 'int x = 0.0' is an error.
map: declares an map-valued local variable in the current curly-braced scope.
map: declares a map-valued local variable in the current curly-braced scope.
Type-checking happens at assignment: 'map b = 0' is an error. map b = {} is
always OK. map b = a is OK or not depending on whether a is a map.

View file

@ -2558,7 +2558,7 @@ Wide-to-long options:
-r {input field regex} -o {key-field name,value-field name}
These pivot/reshape the input data such that the input fields are removed
and separate records are emitted for each key/value pair.
Note: if you have multiplep regexes, please specify them using multiple -r,
Note: if you have multiple regexes, please specify them using multiple -r,
since regexes can contain commas within them.
Note: this works with tail -f and produces output records for each input
record seen.
@ -3398,7 +3398,7 @@ Options:
As of Miller 6 this happens automatically, but the flag is accepted
as a no-op for backward compatibility with Miller 5 and below.
-d {x,y,z} Weights for EWMA. 1 means current sample gets all weight (no
smoothing), near under under 1 is light smoothing, near over 0 is
smoothing), near under 1 is light smoothing, near over 0 is
heavy smoothing. Multiple weights may be specified, e.g.
"mlr step -a ewma -f sys_load -d 0.01,0.1,0.9". Default if omitted
is "-d 0.5".

View file

@ -428,7 +428,7 @@ Type-checking happens at assignment: 'int x = 0.0' is an error.`)
func mapKeywordUsage() {
fmt.Println(
`declares an map-valued local variable in the current curly-braced scope.
`declares a map-valued local variable in the current curly-braced scope.
Type-checking happens at assignment: 'map b = 0' is an error. map b = {} is
always OK. map b = a is OK or not depending on whether a is a map.`)
}

View file

@ -8,7 +8,7 @@ import (
"github.com/johnkerl/miller/internal/pkg/lib"
)
// IsEmpty determines if an map is empty.
// IsEmpty determines if a map is empty.
func (mlrmap *Mlrmap) IsEmpty() bool {
return mlrmap.Head == nil
}

View file

@ -63,7 +63,7 @@ func transformerReshapeUsage(
fmt.Fprintf(o, " -r {input field regex} -o {key-field name,value-field name}\n")
fmt.Fprintf(o, " These pivot/reshape the input data such that the input fields are removed\n")
fmt.Fprintf(o, " and separate records are emitted for each key/value pair.\n")
fmt.Fprintf(o, " Note: if you have multiplep regexes, please specify them using multiple -r,\n")
fmt.Fprintf(o, " Note: if you have multiple regexes, please specify them using multiple -r,\n")
fmt.Fprintf(o, " since regexes can contain commas within them.\n")
fmt.Fprintf(o, " Note: this works with tail -f and produces output records for each input\n")
fmt.Fprintf(o, " record seen.\n")

View file

@ -116,7 +116,7 @@ func transformerStepUsage(
fmt.Fprintf(o, " as a no-op for backward compatibility with Miller 5 and below.\n")
fmt.Fprintf(o, "-d {x,y,z} Weights for EWMA. 1 means current sample gets all weight (no\n")
fmt.Fprintf(o, " smoothing), near under under 1 is light smoothing, near over 0 is\n")
fmt.Fprintf(o, " smoothing), near under 1 is light smoothing, near over 0 is\n")
fmt.Fprintf(o, " heavy smoothing. Multiple weights may be specified, e.g.\n")
fmt.Fprintf(o, " \"mlr %s -a ewma -f sys_load -d 0.01,0.1,0.9\". Default if omitted\n", verbNameStep)
fmt.Fprintf(o, " is \"-d %s\".\n", DEFAULT_STRING_ALPHA)

View file

@ -1606,7 +1606,7 @@ MILLER(1) MILLER(1)
-r {input field regex} -o {key-field name,value-field name}
These pivot/reshape the input data such that the input fields are removed
and separate records are emitted for each key/value pair.
Note: if you have multiplep regexes, please specify them using multiple -r,
Note: if you have multiple regexes, please specify them using multiple -r,
since regexes can contain commas within them.
Note: this works with tail -f and produces output records for each input
record seen.
@ -1906,7 +1906,7 @@ MILLER(1) MILLER(1)
As of Miller 6 this happens automatically, but the flag is accepted
as a no-op for backward compatibility with Miller 5 and below.
-d {x,y,z} Weights for EWMA. 1 means current sample gets all weight (no
smoothing), near under under 1 is light smoothing, near over 0 is
smoothing), near under 1 is light smoothing, near over 0 is
heavy smoothing. Multiple weights may be specified, e.g.
"mlr step -a ewma -f sys_load -d 0.01,0.1,0.9". Default if omitted
is "-d 0.5".
@ -3114,8 +3114,8 @@ MILLER(1) MILLER(1)
int: declares an integer local variable in the current curly-braced scope.
Type-checking happens at assignment: 'int x = 0.0' is an error.
1mmap0m
map: declares an map-valued local variable in the current curly-braced scope.
map
map: declares a map-valued local variable in the current curly-braced scope.
Type-checking happens at assignment: 'map b = 0' is an error. map b = {} is
always OK. map b = a is OK or not depending on whether a is a map.

View file

@ -2023,7 +2023,7 @@ Wide-to-long options:
-r {input field regex} -o {key-field name,value-field name}
These pivot/reshape the input data such that the input fields are removed
and separate records are emitted for each key/value pair.
Note: if you have multiplep regexes, please specify them using multiple -r,
Note: if you have multiple regexes, please specify them using multiple -r,
since regexes can contain commas within them.
Note: this works with tail -f and produces output records for each input
record seen.
@ -2395,7 +2395,7 @@ Options:
As of Miller 6 this happens automatically, but the flag is accepted
as a no-op for backward compatibility with Miller 5 and below.
-d {x,y,z} Weights for EWMA. 1 means current sample gets all weight (no
smoothing), near under under 1 is light smoothing, near over 0 is
smoothing), near under 1 is light smoothing, near over 0 is
heavy smoothing. Multiple weights may be specified, e.g.
"mlr step -a ewma -f sys_load -d 0.01,0.1,0.9". Default if omitted
is "-d 0.5".
@ -5126,7 +5126,7 @@ Type-checking happens at assignment: 'int x = 0.0' is an error.
.RS 0
.\}
.nf
map: declares an map-valued local variable in the current curly-braced scope.
map: declares a map-valued local variable in the current curly-braced scope.
Type-checking happens at assignment: 'map b = 0' is an error. map b = {} is
always OK. map b = a is OK or not depending on whether a is a map.
.fi

View file

@ -797,7 +797,7 @@ Wide-to-long options:
-r {input field regex} -o {key-field name,value-field name}
These pivot/reshape the input data such that the input fields are removed
and separate records are emitted for each key/value pair.
Note: if you have multiplep regexes, please specify them using multiple -r,
Note: if you have multiple regexes, please specify them using multiple -r,
since regexes can contain commas within them.
Note: this works with tail -f and produces output records for each input
record seen.
@ -1109,7 +1109,7 @@ Options:
As of Miller 6 this happens automatically, but the flag is accepted
as a no-op for backward compatibility with Miller 5 and below.
-d {x,y,z} Weights for EWMA. 1 means current sample gets all weight (no
smoothing), near under under 1 is light smoothing, near over 0 is
smoothing), near under 1 is light smoothing, near over 0 is
heavy smoothing. Multiple weights may be specified, e.g.
"mlr step -a ewma -f sys_load -d 0.01,0.1,0.9". Default if omitted
is "-d 0.5".