5 ms·
At the risk of arousing some people's ire, I really like these tidbits that try to squeeze maximum functionality (albeit a bit dangerous) into a minimum span of
by eksith 13y ago
At the risk of arousing some people's ire, I really like these tidbits that try to squeeze maximum functionality (albeit a bit dangerous) into a minimum span of characters. It feels a bit like the underhanded C contest in a way since there are so many magnificent ways to self-destruct doing this, but at the same time it's a fun challenge.
A while ago, I put together a dirt-simple URL shortener https://twitter.com/eksith/statuses/275709375665037312 https://twitter.com/eksith/statuses/275709375665037312
A bit of background: http://eksith.wordpress.com/2012/12/03/id-obfuscation http://eksith.wordpress.com/2012/12/03/id-obfuscation
- mappu 13y agoAbout ID obfuscation: i like to use a small-width block cipher (e.g. 32-bit skipjack). A reversible int->int transform means you don't need an extra DB column, you're never prone to CRC32 collisions, you can still use base36 (why not case-sensitive base62?) for URLs, and with an application secret key there's no chance of reversal. Well, maybe someone could aim to get many sequential keys and then reverse-engineer the state of the cipher, but that's also possible with your method.
- k3n 13y agoYou might also like: http://www.reddit.com/r/tinycode http://www.reddit.com/r/tinycode
- eksith 13y agoWow! I do also like that. I like that very much! Thank you for pointing me to that.
- icebraining 13y agoThe Code Golf SE site is fun too: http://codegolf.stackexchange.com/ http://codegolf.stackexchange.com/
- draegtun 13y agoYou might find Rebmu interesting, its a Rebol dialect designed for code golfing - https://github.com/hostilefork/rebmu https://github.com/hostilefork/rebmu Here's a fun(!) presentation of Rebmu given by Dr. Rebmuthalamonious Golfstanipetrovitch (!!) given at the recent Rebol/Red conference - http://www.youtube.com/watch?v=iDKaz1iB9wQ http://www.youtube.com/watch?v=iDKaz1iB9wQ Enjoy! :)
- eksith 13y agoThat was wonderful. Thank you! :D