5 ms·
A while back I wrote this useless site where you put in a string and it gives you a Ruby one liner to output that string. https://monkeynumber.xyz/ https://mon
by salgorithm 2y ago
A while back I wrote this useless site where you put in a string and it gives you a Ruby one liner to output that string.
https://monkeynumber.xyz/ https://monkeynumber.xyz/
i.e. "bird" gives you
ruby -e "srand(267343);puts 4.times.map{rand(97..123).chr}.join"
which will return "bird" if you run it from your command line
I do a brute force attempt at it, but (maybe one day) will peel back Mersenne Twister and get a more optimized implementation.