TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

A Twitter Bot in One Line of Code

26 pointsby dominiekover 15 years ago

5 comments

noodleover 15 years ago
if the only qualifier for "one line" is that its a big chunk of code with no line breaks, i think i could do more than just a twitter bot on one line.
评论 #843706 未加载
10renover 15 years ago
oblig. challenge: twitter bot in 140 chars...<p>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.
评论 #843969 未加载
评论 #843604 未加载
评论 #843780 未加载
评论 #843558 未加载
tzuryover 15 years ago
Give me a break. Once you put ';' it cannot be consider as one line, otherwise, minified-jQuery is also a one line library.<p><a href="http://ajax.googleapis.com/ajax/libs/jquery/1.3/jquery.min.js" rel="nofollow">http://ajax.googleapis.com/ajax/libs/jquery/1.3/jquery.min.j...</a>
peterwwillisover 15 years ago
Obligatory perl example, pretty messy:<p>U="onelinebot:one.onelinebot";curl -d 'track=obama' <a href="http://stream.twitter.com/track.json" rel="nofollow">http://stream.twitter.com/track.json</a> -u$U|perl -ne'/\"screen_name\":\"([^"]+)\"/&#38;&#38;`curl -d "" <a href="http://twitter.com/friendships/create/$1.json?follow=true" rel="nofollow">http://twitter.com/friendships/create/$1.json?follow=true</a> -u$U`'
jrockwayover 15 years ago
"one line" -- the most meaningless software metric to date.