From 48f78adfd400663b794a25efcf0ef982a2724662 Mon Sep 17 00:00:00 2001 From: Joe Ardent Date: Tue, 23 Oct 2018 16:23:53 -0700 Subject: [PATCH] Adds version information. --- Cargo.lock | 2 +- Cargo.toml | 2 +- README | 17 ----------- README.md | 83 +++++++++++++++++++++++++++++++++++++++++++++++++++ VERSION | 1 + VERSIONING.md | 27 +++++++++++++++++ 6 files changed, 113 insertions(+), 19 deletions(-) delete mode 100644 README create mode 100644 README.md create mode 100644 VERSION create mode 100644 VERSIONING.md diff --git a/Cargo.lock b/Cargo.lock index a8b60b5..466ad91 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -89,7 +89,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "randical" -version = "1.0.0" +version = "0.1.0" dependencies = [ "clap 2.32.0 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)", diff --git a/Cargo.toml b/Cargo.toml index e8252f8..423d342 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "randical" -version = "1" +version = "0.1.0" authors = ["Joe Ardent "] edition = "2018" diff --git a/README b/README deleted file mode 100644 index 4d01f47..0000000 --- a/README +++ /dev/null @@ -1,17 +0,0 @@ -Radical Random Value Generator 1.0.0 - -USAGE: - randical [FLAGS] [OPTIONS] - -FLAGS: - -e, --exit Randomly exit with either status 0, like /bin/true, or status 1, like /bin/false. Technically - compatible with all other options, but doing so could obscure potential errors. Sets default number - of values to print out to 0. - -h, --help Prints help information - -V, --version Prints version information - -OPTIONS: - -n, --num-vals Number of random values to print out. Defaults to 1. - -t, --type Type of random value to print. Defaults to 'bool', with true represented as '1', and - false as '0'. - Possible values accepted are 'b'ool, 'f'loat64, 'u'nsigned64, and 's'igned64 diff --git a/README.md b/README.md new file mode 100644 index 0000000..47b8fcc --- /dev/null +++ b/README.md @@ -0,0 +1,83 @@ +# Radical Random Value Generator + +```randical``` is a simple unix commandline utility to generate a series of +random values of varying types. See below for usage and examples. + + + +```text +USAGE: + randical [FLAGS] [OPTIONS] + +FLAGS: + -e, --exit Randomly exit with either status 0, like /bin/true, or status 1, like /bin/false. Technically + compatible with all other options, but doing so could obscure potential errors. Sets default number + of values to print out to 0. + -h, --help Prints help information + -V, --version Prints version information + +OPTIONS: + -n, --num-vals Number of random values to print out. Defaults to 1. + -t, --type Type of random value to print. Defaults to 'bool', with true represented as '1', and + false as '0'. + Possible values accepted are 'b'ool, 'f'loat64, 'u'nsigned64, and 's'igned64 + +``` + +Some examples: + +``` text +$ randical -t u -n 10 # print out ten 64-bit unsigned integers +5787939472744910229 +3687549088276320089 +5895623703396652260 +1132852924593482146 +15071579321211626745 +17449511910217057014 +15100162199599245434 +16771457972349018485 +7609614558571403402 +8284410620633392032 +$ randical -n 10 -t s # print out ten 64-bit signed integers +-3655402238002064604 +7349054970592683859 +-4119878930309679607 +3670604787450187343 +7596830659839314972 +-3642333771475302770 +2921931257318542851 +-4580256882393100929 +3009966650832330749 +6676004827997477043 +$ randical -n 10 -t f # print out ten 64-bit floating-point numbers in [0,1) +0.603028217883161 +0.004087838255832366 +0.07830762695977944 +0.8930433328568959 +0.6985875655193886 +0.8088176723597311 +0.747504385125212 +0.4487145473864015 +0.3171660044903156 +0.29296569910381276 +$ randical -n 10 # print out ten "bools" +0 +0 +0 +1 +0 +0 +1 +1 +1 +0 +$ randical -n 1 -t f -e # print out one float and exit with a status randomly true or false, in the unix exit status sense. +0.9543066009689831 +$ echo $? +1 +$ randical -n 1 -t f -e +0.6178924136785371 +$ echo $? +0 +$ +``` diff --git a/VERSION b/VERSION new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/VERSION @@ -0,0 +1 @@ +1 diff --git a/VERSIONING.md b/VERSIONING.md new file mode 100644 index 0000000..9413722 --- /dev/null +++ b/VERSIONING.md @@ -0,0 +1,27 @@ +# Golden Versioning + +```randical``` is versioned under a scheme I call "goldver", as an homage to the +vastly inferior [semver](https://semver.org). + +## What does "goldver" mean? + +When projects are versioned with goldver, the first version is "1". Note that it +is not "1.0", or, "1.0-prealpha-release-preview", or anything nonsensical like +that. As new versions are released, decimals from *phi*, the [Golden +Ratio](https://en.wikipedia.org/wiki/Golden_ratio), are appended after an +initial decimal point. So the second released version will be "1.6", the third +would be "1.61", etc., and on until perfection is asymptotically approached as +the number of released versions goes to infinity. + +## Wait, didn't Donald Knuth do this? + +No! He uses [pi for TeX and e for MetaFont](https://texfaq.org/FAQ-TeXfuture), +obviously COMPLETELY different. + +## Ok. + +Cool. + +## What version is randical now? + +See the ```VERSION``` file.