TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

A Twitter Bot in One Line of Code

26 点作者 dominiek超过 15 年前

5 条评论

noodle超过 15 年前
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 未加载
10ren超过 15 年前
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 未加载
tzury超过 15 年前
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>
peterwwillis超过 15 年前
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`'
jrockway超过 15 年前
"one line" -- the most meaningless software metric to date.