checkpoint
This commit is contained in:
parent
7833c6cc04
commit
b9d0f05d06
2 changed files with 70 additions and 5 deletions
|
@ -44,9 +44,9 @@ But by far its greatest feature is an undocumented option, `-A`, that will play
|
|||
salvo](https://gitlab.com/nebkor/katabastird/-/blob/4ccc2e4738df3f9d3af520e2d3875200534f4f6f/resources/airhorn_alarm.mp3)
|
||||
when it's done. This option is visible in the program's help text, but it's not described.
|
||||
|
||||
This is, honestly, not a great program. Once it's launched, it only understands two keyboard inputs,
|
||||
`ESC` and `q`, both of which simply cause it to exit. Using the mouse, you can pause, restart, and
|
||||
reset. And that's it, that's all the interaction you get.
|
||||
Truly honestly, this is not a great program. Once it's launched, it only understands two keyboard
|
||||
inputs, `ESC` and `q`, both of which simply cause it to exit. Using the mouse, you can pause,
|
||||
restart, and reset. And that's it, that's all the interaction you get.
|
||||
|
||||
In spite of this, I find myself using it all the time. It's easy to launch with different times (the
|
||||
commandline parsing understands things like `-h` for hours, `-m` for minutes, etc.), and its last
|
||||
|
@ -54,13 +54,76 @@ invocation is just an up-arrow in my terminal away. The airhorn cracks me up eve
|
|||
|
||||
At some point, I plan on changing it to something that uses the GPU to run a fire simulation on the
|
||||
numbers, and have the flame intensity get higher as the time remaining gets lower. I'll save that
|
||||
for when I want to get slightly more serious about graphics and shaders, though.
|
||||
for when I want to get slightly more serious about graphics and shaders, though; it would basically
|
||||
be a total re-write.
|
||||
|
||||
|
||||
As for the name, it's just a perversion of "katabasis", which means, "descent to the Underworld". I
|
||||
guess a bastardized "bastard" is in there, too. Listen, I'm gonna level with you: I'm not wild about the name, but
|
||||
what's done is done.
|
||||
|
||||
## *randical, a commandline program for generating random values*
|
||||
|
||||
Some time ago, I was [trying to work out some ways to pick random points in a
|
||||
sphere](https://blog.joeardent.net/2018/07/right-and-wrong-ways-to-pick-random-points-inside-a-sphere/),
|
||||
and during that exploration, I found myself wanting to just be able to generate random values
|
||||
outside of any program program in particular. So, I wrapped a primitive interface around [the random value
|
||||
generation library](https://docs.rs/rand/0.8.0/rand/index.html) I was using. I wound up using it
|
||||
selfishly and in a limited fashion for that project, but afterward, decided to expand it a bit and
|
||||
release it, as my first [real Rust crate](https://crates.io/crates/randical).
|
||||
|
||||
I'll reproduce the help text here, since it's fairly comprehensive:
|
||||
|
||||
- randical
|
||||
``` text
|
||||
$ randical -h
|
||||
Radical Random Value Generator 1.618033
|
||||
|
||||
Generates arbitrary numbers of uniformly distributed random values.
|
||||
|
||||
USAGE:
|
||||
randical [FLAGS] [OPTIONS]
|
||||
|
||||
FLAGS:
|
||||
--buel Prints either 'Here.' or 'Um, he's sick. My best friend's sister's boyfriend's brother's girlfriend
|
||||
heard from this guy who knows this kid who's going with the girl who saw Ferris pass out at 31
|
||||
Flavors last night. I guess it's pretty serious.', with equal probability. Not compatible with `-t`
|
||||
or `--bule`.
|
||||
--bule Prints either 'true' or 'false', with equal probability. Not compatible with `-t` or `--buel`.
|
||||
-e, --exit With equal probability, exit with either status 0, like /bin/true, or status 1, like /bin/false.
|
||||
Technically compatible with all other options, but exit status will have no relation to any
|
||||
generated output. Sets default number of values to print to 0.
|
||||
-h, --help Prints help information
|
||||
-V, --version Prints version information
|
||||
|
||||
OPTIONS:
|
||||
-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'.
|
||||
Possible values are 'b'ool, 'f'loat64, 'U'UIDv4, 'u'nsigned64, 's'igned64, and 'k'suid
|
||||
with millisecond precision.
|
||||
```
|
||||
|
||||
The [README](https://github.com/nebkor/randical/blob/main/README.md) contains some examples of using
|
||||
it to do various things, like simulate a fair coin toss, or an *unfair* coin toss, or "a *Sliding
|
||||
Doors*-style garden of forking paths alternate timeline for Ferris Bueller's presence or absence on
|
||||
that fateful day."
|
||||
|
||||
I have one actual non-shithead usecase for this program: in my [.emacs file, I use it to
|
||||
generate](https://gitlab.com/nebkor/dotfiles/-/blob/3aaf06fc66cdb541b76dfd44d25c369c4762301f/.emacs#L113-116)
|
||||
[ksuids](https://segment.com/blog/a-brief-history-of-the-uuid/). But I don't *really* use it.
|
||||
|
||||
I include it mostly because, by most measurable metrics, this is my most popular program with end
|
||||
users that I can specifically identify:
|
||||
|
||||
![randical's popularity is baffling][randical_downloads]
|
||||
|
||||
Who is downloading my software, and why? I don't know, and I don't care about knowing.
|
||||
|
||||
## *freedom-dates, a library noone needed or wanted*
|
||||
|
||||
When I started writing this post, "freedom-dates" did not exist as a concrete thing, merely as a
|
||||
shit-head suggestion by me about the dumbest possible way to represent dates as a string.
|
||||
|
||||
---
|
||||
- freedom-dates
|
||||
- bad_print
|
||||
|
||||
|
@ -76,3 +139,5 @@ for when I want to get slightly more serious about graphics and shaders, though.
|
|||
[katabastird_ending]: ./katabastird_almost_done.png "counting down with one second remaining"
|
||||
|
||||
[katabastird_predator]: ./katabastird_predator.png "get to the choppah"
|
||||
|
||||
[randical_downloads]: ./randical_installs.png "who the hell are these people?"
|
||||
|
|
BIN
content/sundries/shit-code/randical_installs.png
Normal file
BIN
content/sundries/shit-code/randical_installs.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 117 KiB |
Loading…
Reference in a new issue