编程与软件工程oisinmoran.com
我做了一条自引用推文
I Made a Self-Quoting Tweet
2020 — 2022,它一次次回到首页
黑点是上首页(≥ 50 分)的那次投稿,空心点是没冲上去的投稿,点越大分数越高。
导读
作者讲述了自己如何制作一条“引用自己”的推文:通过估算 Twitter 推文 ID 的增长速度,预测并抢先引用一条尚未发出的推文,最终让推文引用了它自己。文章详细记录了这一有趣的技术实验过程。
为什么经久不衰:它把 ID 预测、竞态条件和自引用这些技术概念玩成了一个巧妙的谜题,读起来轻松又有启发性。
HN 评论精选
自引用推文会打破推文网络的 DAG 假设,可能让依赖该假设的代码出 bug
> 对于 Twitter 里任何依赖推文网络是有向无环图(DAG)的人,我深表歉意。我喜欢这个想法:某处有人用递归代码解析转推链,即将遇到一个让他抓破头的 bug。
showerst查看英文原文
> And for anyone at Twitter who was depending on the network of tweets being a Directed Acyclic Graph, I'm so terribly sorry. I love the idea that there's someone out there with code that resolves retweet chains recursively, who's about to be in for a great head scratcher of a bug.
概括了实现原理:通过推文 ID 增速预测未来推文的 ID
为节省大家时间,推文在这里:https://twitter.com/quinetweet/status/1309951041321013248 方法本质上是:查一条最近推文的 ID,再查稍后一条推文的 ID,估算新推文出现的速率,然后发一条引用“当前时间+猜测的 ID”对应推文的推文。文章写得不错但有点啰嗦。
alblue查看英文原文
To save people some time, here’s the tweet: https://twitter.com/quinetweet/status/1309951041321013248 In essence, the approach was: * Find out what the tweet id is of a recent tweet * Find out what a tweet is shortly after * Estimate the rate of new tweets appearing * Publish a tweet with a reference to a tweet with a now+guess id The write up is well done and interesting but a little long winded.
有人把这一思路扩展成互相引用的推文对,模拟生命游戏振荡子
我做了两条互相引用的推文,运行生命游戏中的蟾蜍振荡子:https://twitter.com/mauritscorneIis/status/1266834697256087552
pomber查看英文原文
I made two mutual-quoting tweets that run the toad oscillator from the Game of Life https://twitter.com/mauritscorneIis/status/1266834697256087552
自引用推文早有先例,可追溯到 2009 年
此前(2018):https://news.ybinator.com/item?id=16978913 此前(2009):https://twitter.com/selfrefer/status/3128391843 https://twitter.com/spoonhenge/status/2878871344 https://news.ybinator.com/item?id=743144 (后两条当时是自引用的,但后来 Twitter 改变了链接规则)
bazzargh查看英文原文
Previously (2018): https://news.ycombinator.com/item?id=16978913 Previously (2009): https://twitter.com/selfrefer/status/3128391843 https://twitter.com/spoonhenge/status/2878871344 https://news.ycombinator.com/item?id=743144 (last 2 were self-referential at the time, but then twitter changed the rules for linking; I recalled seeing these at the time)
历次讨论
同类还值得读
开源应用架构
The Architecture of Open Source Applications
《开源软件架构》(AOSA)是一本在线免费书,邀请知名开源项目的作者亲自剖析其内部设计,涵盖 SQLAlchemy、LLVM、Audacity、Apache、Bash 等系统。
编程与软件工程上首页 9 次 · 2011–2024aosabook.org编辑精选编程语言简史:简短、不完整且多半错误
A Brief, Incomplete, and Mostly Wrong History of Programming Languages
一篇以戏谑、故意不准确的方式回顾编程语言史的博客文章,用夸张轶事和讽刺定义串起 Lisp、C、C++、Java、JavaScript、PHP 等语言。
编程与软件工程上首页 8 次 · 2009–2021james-iry.blogspot.comSQLite 是如何测试的
How SQLite is tested
SQLite 官方文档页,系统介绍 SQLite 的测试体系:多种测试方法(TCL 测试、模糊测试、回归测试、静态分析等)和海量测试用例,展示了这个小型开源项目如何靠极致测试获得…
编程与软件工程上首页 8 次 · 2009–2025sqlite.org编辑精选高级编程语言(2009)
Advanced programming languages (2009)
Matt Might 的经典文章,按用途推荐“高级编程语言”:如果追求就业就选主流语言,如果追求表达力、学术研究或创业,则推荐 Haskell、OCaml、Scala 等函数式语…
编程与软件工程上首页 8 次 · 2009–2022matt.might.net我的 Forth 与栈机器经历
Yosefk - My history with Forth & stack machines
作者以亲身经历回顾了使用 Forth 语言和栈式机器的历程:既赞叹其简洁优雅、代码量小、可自举的优点,也坦率指出栈操作在实际编程中的痛苦,以及 Forth 社区文化中的问题。
编程与软件工程上首页 8 次 · 2010–2024yosefk.com编辑精选