News for hackers. Stuff that matters.
Re:A Twitter Bot in One Line of Code by 10ren on Friday September 25, 2009 @10:37AM (#843527)
oblig. challenge: twitter bot in 140 chars...

BTW: great twitter API, and demo of bash as a JSON webservice server implementation language. It repays careful study. Also "bash" has got to be the best name for a hacker's language.

Re:A Twitter Bot in One Line of Code by idm on Friday September 25, 2009 @02:06PM (#843969)
Here's what I have so far:

o=onelinebot;u=$o:one.$o;t=twitter.com;h=http://;alias a=alias;a w=while\ read;a c="curl -u$u -d";c track=$o ${h}stream.$t/track.json>t&tail -f t|w t;do echo $t|grep -Eo '"screen_name":"[[:alnum:]]+"'|cut -d\" -f4|w s;do c '' $h$t/friendships/create/$s.json?follow=true;done;done

It's two tweets (280 chars, down from 417) and it's not quite functional... This one will track "onelinebot" instead of "one line." It's basically the same as the original post, but with lots of nasty substitutions.

I figured I'd share, because I really need to get back to some other work - if you can get it working, please share.

Re:A Twitter Bot in One Line of Code by dominiek on Friday September 25, 2009 @02:27PM (#844005)
Nice!
Re:A Twitter Bot in One Line of Code by amalcon on Friday September 25, 2009 @11:20AM (#843604)
For bonus points, make a twitter-quine: as some part of its operation, have the bot tweet its own source code.
Re:A Twitter Bot in One Line of Code by tesseract on Friday September 25, 2009 @03:49PM (#844181)

    curl -F"status=$BASH_COMMAND" -utq_:pass12 -HExpect: 'http://twitter.com/statuses/update.xml'
Re:A Twitter Bot in One Line of Code by _b8r0 on Friday September 25, 2009 @12:39PM (#843780)
I've tried, but the lowest I could get is around the 230-240 mark for something that tweets hi $n (where $n is the name of the person tweeting something you're interested in) for bash. It seems the URLs are the killer. URL Shorteners would help but bleh security. Any ideas for different languages?
Re:A Twitter Bot in One Line of Code by InclinedPlane on Friday September 25, 2009 @10:56AM (#843558)
In APL that just might be possible.