Skip to content

Instantly share code, notes, and snippets.

View nic-hartley's full-sized avatar
👀
Definitely working... I promise.

Nic Hartley nic-hartley

👀
Definitely working... I promise.
  • Cyberspace
View GitHub Profile

Keybase proof

I hereby claim:

  • I am nic-hartley on github.
  • I am nichartley (https://keybase.io/nichartley) on keybase.
  • I have a public key whose fingerprint is 7A66 2C29 83BD 687C B737 4B50 5DB5 846B 8EDA 60D1

To claim this, I am signing this object:

// TODO: Replace with real crypto
#[derive(Debug, Clone)]
pub struct PublicKey(u8, String);
impl PublicKey {
pub fn of(name: &str) -> PublicKey {
let sum = name.as_bytes().iter().fold(0u8, |a, i| a.wrapping_add(*i));
PublicKey(sum, name.to_owned())
}
@nic-hartley
nic-hartley / englishish.py
Last active March 20, 2021 01:54
Englishish generator
#!/usr/bin/env python3
"""
englishish.py is a quick-and-dirty prototype of a project I plan to work on
more later: A generator for text which obeys English spelling and grammar
rules, but whose output is nonsensical. The output of this script does tend
to make sense, but that's a product of the dictionary. If it was larger, it
would generate sentences which are grammatical but not sensical.
The next step is implementing this with a bigger dictionary, cleaner code, and