Browse Source

Initial commit

master
Michael Pfaff 1 year ago
commit
b2e477a04c
Signed by: michael GPG Key ID: E53B118B12B5C7F9
  1. 1
      .gitignore
  2. 84
      Cargo.lock
  3. 10
      Cargo.toml
  4. 4
      README.md
  5. 48
      src/lib.rs
  6. 5
      src/main.rs

1
.gitignore

@ -0,0 +1 @@
/target

84
Cargo.lock

@ -0,0 +1,84 @@
# This file is automatically @generated by Cargo.
# It is not intended for manual editing.
[[package]]
name = "cfg-if"
version = "0.1.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822"
[[package]]
name = "getrandom"
version = "0.1.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fc587bc0ec293155d5bfa6b9891ec18a1e330c234f896ea47fbada4cadbe47e6"
dependencies = [
"cfg-if",
"libc",
"wasi",
]
[[package]]
name = "libc"
version = "0.2.77"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f2f96b10ec2560088a8e76961b00d47107b3a625fecb76dedb29ee7ccbf98235"
[[package]]
name = "ppv-lite86"
version = "0.2.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c36fa947111f5c62a733b652544dd0016a43ce89619538a8ef92724a6f501a20"
[[package]]
name = "rand"
version = "0.7.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03"
dependencies = [
"getrandom",
"libc",
"rand_chacha",
"rand_core",
"rand_hc",
]
[[package]]
name = "rand_chacha"
version = "0.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402"
dependencies = [
"ppv-lite86",
"rand_core",
]
[[package]]
name = "rand_core"
version = "0.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19"
dependencies = [
"getrandom",
]
[[package]]
name = "rand_hc"
version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c"
dependencies = [
"rand_core",
]
[[package]]
name = "wasi"
version = "0.9.0+wasi-snapshot-preview1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519"
[[package]]
name = "whatami"
version = "0.1.0"
dependencies = [
"rand",
]

10
Cargo.toml

@ -0,0 +1,10 @@
[package]
name = "whatami"
version = "0.1.0"
authors = ["Michael Pfaff <michael@pfaff.dev>"]
edition = "2018"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
rand = "0.7"

4
README.md

@ -0,0 +1,4 @@
# whatami
Implementation of https://github.com/kz6fittycent/whatami/ in Rust.

48
src/lib.rs

@ -0,0 +1,48 @@
pub const QUOTES: &'static [&'static str] = &[
"A big dummy",
"Fat and stupid",
"Not worth mentioning...",
"A waste of time",
"A waste of space",
"A complete and utter failure",
"A winner! Just kidding...",
"A loser",
"An accident",
"Here's a hint: you're dumb",
"Fascinating...it speaks",
"A blight on humanity. Wait, are you human?",
"Less than an amoeba",
"A disease",
"An idiot",
"What are you?",
"Someone who messes everything up!",
"Fact: You = nothing",
"The outcome of stupid + dumb",
"I have no idea...",
"Awesome. SIKE!",
"The sum of two wrongs...",
"Useless",
"It hurts me to tell you...no it doesn't",
"Sigh...",
"You're the equivelent of a Hawaiian pizza - a.k.a. no one likes you.",
"Your mom + your dad = you, and you = dumb",
"It's incredible that you keep using me...it's like you prefer insults to having a life",
"If a dog vomited rancid bratwurst, then ate it, and threw it up again, it'd still be better than you",
"If Gomer Pyle were your dad, your name would be Stee Ming Pyle",
"Your job interviews must be pity interviews",
"I heard your song on the radio - \"Dumb, dumb, dumb, dumb....\"",
"Nature too must have turned its back the day you were born",
"I met a brick with more intelligence than you",
"I read that fish is good brain food. You should eat a whale.",
"Does it hurt when you think?",
"Can you please turn the webcam away from your....is that your face?",
"If I could be precise in my description of you, I say you're a blackhole of intelligence",
"\"I love you so much. You bring joy to my life.\" - A filthy liar",
"Seriously, I think you might need to get this checked out - why do you keep using me?",
"DISCLAIMER: I am not responsible for your dumb.",
];
pub fn random_quote() -> &'static str {
use rand::{thread_rng, Rng};
QUOTES[thread_rng().gen_range(0, QUOTES.len())]
}

5
src/main.rs

@ -0,0 +1,5 @@
pub use whatami::random_quote;
fn main() {
println!("{}", random_quote());
}
Loading…
Cancel
Save