Update docs, move to 2021 edition.

This commit is contained in:
Joe Ardent 2021-11-07 13:31:24 -08:00
parent 1c2f6256cf
commit dd116baa14
4 changed files with 20 additions and 33 deletions

2
Cargo.lock generated
View file

@ -123,7 +123,7 @@ dependencies = [
[[package]] [[package]]
name = "randical" name = "randical"
version = "1.6.18" version = "1.6.180"
dependencies = [ dependencies = [
"clap", "clap",
"rand", "rand",

View file

@ -1,8 +1,8 @@
[package] [package]
name = "randical" name = "randical"
version = "1.6.18" version = "1.6.180"
authors = ["Joe Ardent <code@ardent.nebcorp.com>"] authors = ["Joe Ardent <code@ardent.nebcorp.com>"]
edition = "2018" edition = "2021"
description = "A simple UNIX commandline utility to generate sequences of random values of different types." description = "A simple UNIX commandline utility to generate sequences of random values of different types."
@ -21,4 +21,4 @@ maintenance = { status = "actively-developed" }
[dependencies] [dependencies]
rand = "0.8" rand = "0.8"
clap = "2" clap = "2"
uuid = "0.8" uuid = { version = "0.8", default-features = false }

View file

@ -5,7 +5,8 @@ random values of varying types, with uniform distribution. See below for usage a
```text ```text
Radical Random Value Generator 1.61 Radical Random Value Generator 1.6180
Generates arbitrary numbers of uniformly distributed random values. Generates arbitrary numbers of uniformly distributed random values.
USAGE: USAGE:
@ -25,61 +26,47 @@ FLAGS:
OPTIONS: OPTIONS:
-n, --num-vals <NUM_VALS> Number of random values to print out. Defaults to 1. -n, --num-vals <NUM_VALS> Number of random values to print out. Defaults to 1.
-t, --type <TYPE> Type of random value to print. Defaults to 'bool', with true represented as 'Radical!', -t, --type <TYPE> Type of random value to print. Defaults to 'bool'.
and false as 'Bogus.'. Possible values are 'b'ool, 'f'loat64, 'U'UIDv4, 'u'nsigned64, and 's'igned64
Possible values are 'b'ool, 'f'loat64, 'u'nsigned64, and 's'igned64
``` ```
Some examples: Some examples:
``` text ``` text
$ randical -n 10 # print out ten bools $ randical -n 5 # print out five bools
Bogus. Bogus.
Radical! Radical!
Radical! Radical!
Bogus. Bogus.
Radical! Radical!
Bogus.
Radical!
Bogus.
Radical!
Radical!
$ randical -t u -n 10 # print out ten 64-bit unsigned integers $ randical -t u -n 5 # print out five 64-bit unsigned integers
5787939472744910229 5787939472744910229
3687549088276320089 3687549088276320089
5895623703396652260 5895623703396652260
1132852924593482146 1132852924593482146
15071579321211626745 15071579321211626745
17449511910217057014
15100162199599245434
16771457972349018485
7609614558571403402
8284410620633392032
$ randical -n 10 -t s # print out ten 64-bit signed integers $ randical -n 5 -t s # print out five 64-bit signed integers
-3655402238002064604 -3655402238002064604
7349054970592683859 7349054970592683859
-4119878930309679607 -4119878930309679607
3670604787450187343 3670604787450187343
7596830659839314972 7596830659839314972
-3642333771475302770
2921931257318542851
-4580256882393100929
3009966650832330749
6676004827997477043
$ randical -n 10 -t f # print out ten 64-bit floating-point numbers in [0,1) $ randical -n 5 -t f # print out five 64-bit floating-point numbers in [0,1)
0.603028217883161 0.603028217883161
0.004087838255832366 0.004087838255832366
0.07830762695977944 0.07830762695977944
0.8930433328568959 0.8930433328568959
0.6985875655193886 0.6985875655193886
0.8088176723597311
0.747504385125212 $ randical -n 5 -t U # print out five v4 UUIDs
0.4487145473864015 0237bf92-a629-440a-a1b5-ae32741b8ebd
0.3171660044903156 a88a5c2a-88c5-4b48-849b-656831eb7fc5
0.29296569910381276 56ac8f8c-4e67-4418-bf0c-84a5442804c4
c82162d6-80e5-4d3e-819b-b350dba74d5e
d8194b0b-246f-4c0a-8897-cb9cdee27a99
$ randical -e # exit with status 0 or 1, with equal probability $ randical -e # exit with status 0 or 1, with equal probability
$ echo $? $ echo $?

View file

@ -1 +1 @@
1.618 1.6180