diff --git a/README-dev.md b/README-dev.md index 48e6fefe3..3240f3015 100644 --- a/README-dev.md +++ b/README-dev.md @@ -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. diff --git a/docs/src/manpage.md b/docs/src/manpage.md index 1fc50504e..9b0cc8c49 100644 --- a/docs/src/manpage.md +++ b/docs/src/manpage.md @@ -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. diff --git a/docs/src/manpage.txt b/docs/src/manpage.txt index 7a55b3678..a823bd0d2 100644 --- a/docs/src/manpage.txt +++ b/docs/src/manpage.txt @@ -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. diff --git a/docs/src/mlr.1 b/docs/src/mlr.1 index 846c12fa1..0a026dd4f 100644 --- a/docs/src/mlr.1 +++ b/docs/src/mlr.1 @@ -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 diff --git a/docs/src/online-help.md b/docs/src/online-help.md index cb40e17df..bdf05fb66 100644 --- a/docs/src/online-help.md +++ b/docs/src/online-help.md @@ -104,7 +104,7 @@ If you know the name of the thing you're looking for, use `mlr help`: mlr help map
-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.
 
diff --git a/docs/src/reference-dsl-variables.md b/docs/src/reference-dsl-variables.md index 40c63d8a2..85ad66051 100644 --- a/docs/src/reference-dsl-variables.md +++ b/docs/src/reference-dsl-variables.md @@ -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. diff --git a/docs/src/reference-verbs.md b/docs/src/reference-verbs.md index 92e694d3d..93bb0a60f 100644 --- a/docs/src/reference-verbs.md +++ b/docs/src/reference-verbs.md @@ -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". diff --git a/internal/pkg/dsl/cst/keyword_usage.go b/internal/pkg/dsl/cst/keyword_usage.go index 48693f26f..23340ccf8 100644 --- a/internal/pkg/dsl/cst/keyword_usage.go +++ b/internal/pkg/dsl/cst/keyword_usage.go @@ -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.`) } diff --git a/internal/pkg/mlrval/mlrmap_accessors.go b/internal/pkg/mlrval/mlrmap_accessors.go index e0553f99a..9ad8e5999 100644 --- a/internal/pkg/mlrval/mlrmap_accessors.go +++ b/internal/pkg/mlrval/mlrmap_accessors.go @@ -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 } diff --git a/internal/pkg/transformers/reshape.go b/internal/pkg/transformers/reshape.go index 29872e17c..49f7048ff 100644 --- a/internal/pkg/transformers/reshape.go +++ b/internal/pkg/transformers/reshape.go @@ -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") diff --git a/internal/pkg/transformers/step.go b/internal/pkg/transformers/step.go index 8e13deb8f..c52129fc2 100644 --- a/internal/pkg/transformers/step.go +++ b/internal/pkg/transformers/step.go @@ -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) diff --git a/man/manpage.txt b/man/manpage.txt index 7a55b3678..a823bd0d2 100644 --- a/man/manpage.txt +++ b/man/manpage.txt @@ -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. diff --git a/man/mlr.1 b/man/mlr.1 index 35b7da45b..40f9d51c0 100644 --- a/man/mlr.1 +++ b/man/mlr.1 @@ -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 diff --git a/test/cases/cli-help/0001/expout b/test/cases/cli-help/0001/expout index e96af8c8c..3605257ff 100644 --- a/test/cases/cli-help/0001/expout +++ b/test/cases/cli-help/0001/expout @@ -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".