Show HN: Monkeys.zip (Infinite Monkeys Writing Shakespeare)
7 points
1 day ago
| 1 comment
| monkeys.zip
| HN
Hey HN! I've been working on this concept on and off for about a year, and challenged myself to actually release it in time for April Fools as I tend to just hoard projects.

It's a simulator of the Infinite Monkey Theorem! You can browse our grid of monkeys that are busily typing away randomly on their keyboards, and see what words they've written - how many of those words appear in the works of Shakespeare.

If you want, you can join in for free and get a monkey of your own. Monkeys get special rewards for typing special words - which can be used to customize their appearance. I just wiped the simulation this morning so we're starting from scratch!

It's a little rough around the edges in some spots, if some content doesn't load right, just give it a refresh. I hope you get a kick out of it - it's been an absolute labor of love for me!

kinduff
22 hours ago
[-]
Made me giggle initially then I clicked a grey monkey and I was blown away! Great job with the project.

Are you storing everything they are typing? I'm very curious about how you are handling the data.

reply
yathern
21 hours ago
[-]
I'll definitely do a technical write-up in the coming days! I'm storing any valid word they type, though I'll probably quite quickly put in a TTL for words <= 3 letters long. But every thing they write is from a deterministic seeded RNG, with a tick that is randomly generated every 15 seconds, combined with the monkey salt (that I may rotate on a schedule). So you can technically go back in time and regenerate all of the content.

Supabase/postgres backend. First time for me, I actually was using firestore a week ago and migrated in a delirious frenzy at the last moment - which I think was a good call. Firebase charges per document write, and I had words as documents... which would get out of hand quickly. There's ways to be more clever than that (I also would store 16 monkeys to a single doc) but it just wasn't a good fit for what I was trying to do

reply
kinduff
15 hours ago
[-]
Thanks for the response! The combination of a seeded rng and some randomness is pretty cleaver.

Can't wait for the write up. Very interesting project and well executed.

PS: The console.log messages made me laugh

reply