5 ms·
Micro-tweet – The Twitter Client that Fits in a Tweet (Python)
- alanh 16y agoReminds me of Tweet MVC, a PHP model-view-controller framework a former co-worker created for fun. Each component (like “model”) is 140 or fewer characters. It definitely doesn’t follow many best practices ;) https://github.com/tweetmvc/tweetmvc-core https://github.com/tweetmvc/tweetmvc-core (But hey, `import twitter as t`? Abstract things enough and any super-simple program can be 140 characters)
- tptacek 16y ago"import twitter"?
- coderdude 16y agoFrom the article: "And yes, I’m aware that using a pre-existing library to interface with the Twitter API might be considered “cheating”, but it would be downright impossible to fit the script into the size constraints without it. The API endpoint URLs alone would probably be long enough to push the script over the limit." Edit: Before this turns into a gauntlet[1], I'm simply quoting the article so that people don't think the author is oblivious to this fact. [1] http://wordnetweb.princeton.edu/perl/webwn?o2=&o0=1&o7=&o5=&o1=1&o6=&o4=&o3=&s=gauntlet&i=3&h=0000#c http://wordnetweb.princeton.edu/perl/webwn?o2=&o0=1&...
- oozcitak 16y agoI don't understand this rationale: Posts are limited to 140 characters on a certain website ∴ Everything should fit in 140 chars
- jpiet 16y agoAnd that is exactly why this doesn't make sense at all... it's just not possible to code it with these few lines.
- trotsky 16y agoJust because he's aware of it doesn't mean it's any less silly. Want to see me write a fully functional optimizing c compiler in a tweet? "/usr/bin/gcc" :/
- scorpion032 16y agoMight as well do, from twitter import updae_status as u u('Yay!')
- OwlHuntr 16y agoBrilliant! I tweeted it as soon as I read it.
- eddiegroves 16y agoReminds me of: http://stackoverflow.com/questions/284797/hello-world-in-less-than-20-bytes/284898#284898 http://stackoverflow.com/questions/284797/hello-world-in-les...
- dtran 16y agoI'm fairly sure at least the posting tweets part of this won't work anymore since basic auth was turned off a few months ago. It looks like this was posted not too long before basic auth was turned off though.
- pepijndevos 16y agoSo, who will write the first OAuth Twitter client in 140 chars?
- th0ma5 16y agowell, you wouldn't really, or it would be the same code as presented here without the login information. oauth credentials are pulled from constants, a security file, or the environment, so it is just a different paradigm, but the code is actually just a little simpler, it is devoid of most login logic other than passing the keys.
- est 16y agoHow to draw an owl[1] like a master 1. declare some consts and vars 2. import owl; print owl.new() [1]: http://news.ycombinator.com/item?id=1952712 http://news.ycombinator.com/item?id=1952712
- ElbertF 16y agoMy best attempt (jQuery): $.getJSON('http://api.twitter.com/1/statuses/user_timeline.json?screen_name=ElbertF&callback=?',function(json){alert(json[0].text)}) The long API URL alone makes it pretty much impossible to make something useful, this "client" simply gets the latest tweet and can't post updates. Not much of a client, I know.