HackerURLs

一次又一次被重新发现的经典。

同一个链接,相隔一年以上,一次又一次被人重新发现、再次冲上 Hacker News 首页。能经受住这种时间检验的,大多是值得一读再读的文章。每篇附中文标题,讨论最热的那些再加上中文导读和高赞评论翻译。

从名人堂开始
  • 4,700+篇经过时间检验的经典

Hall of fame

名人堂

在经典库里看全部精选

上首页次数最多、而且有中文导读的 30 篇。时间轴上每个黑点是一次上首页,空心点是一次没冲上去的投稿。

  1. 正在载入经典…

Archive

经典库

按第一次上首页的年份分布,点柱子筛选。

排序

    About

    这些经典是怎么挑出来的

    1. 01

      合并同一个链接

      读取 Hacker News 自 2006 年以来的全部链接投稿,把 http/https、www、跟踪参数等写法不同的同一篇文章合并成一条。

    2. 02

      只留经得起时间的

      同一链接至少两次拿到 50 分以上(约等于上首页),而且两次相隔一年以上;再由 AI 剔除状态页、产品首页和新闻事件。

    3. 03

      写导读、译评论

      上首页次数最多的 2,000 篇配上中文导读、"为什么经久不衰",并精选翻译 HN 高赞评论。导读由 AI 生成,可能有误。

    编程与软件工程andregarzia.com

    Lua:一门被误解的语言(2021)

    Lua, a Misunderstood Language (2021)

    3次上首页
    4年跨度
    375累计得分
    394条评论

    2021 — 2025,它一次次回到首页

    黑点是上首页(≥ 50 分)的那次投稿,空心点是没冲上去的投稿,点越大分数越高。

    导读

    作者为 Lua 辩护,认为它常被误解:1 起始索引、无内建面向对象等“怪异”设计其实是刻意取舍。Lua 是一门极小、可嵌入的脚本语言,源码仅约 70 个 C 文件,非常适合作为领域工具的扩展脚本层。文章多次登上 HN 首页,每次都引发关于 0/1 索引的热议。

    为什么经久不衰:它澄清了人们对 Lua 的常见偏见,并展示了“小而可嵌入”的语言设计哲学,对今天思考语言取舍和嵌入式脚本方案仍有启发。

    关键词 Lua嵌入式脚本语言设计1-based索引

    HN 评论精选

    作者认为索引之争无关紧要,Lua 真正的价值在于源码极小且易于维护

    作者现身致谢,并吐槽每次文章被转发,讨论都会跑偏到 0 起始索引之争。他的观点是“这根本不重要”——用你所处语言的既有范式就好,切换成本不比换语言更大;如果 JS 当初用 1 起始索引,这批人多半会反过来夸 1 起始索引的好处。他还补充:Lua 源码只有约 70 个纯 C 文件,任何 C99 编译器都能编译,这种简洁与灵活性值得珍惜。

    soapdog查看英文原文

    Author here, thanks for linking my article. It is a bit of a curse that every time this article ends up anywhere, the discussion quickly devolves onto the merits of 0-based indexing. I have a very strong opinion on this which is that "it doesn't matter". You use whatever paradigm is real in the language you're working. The context switch is not larger than the context switch between languages anyway. Lua is not the single 1-based indexing language out there, it used to be much more prevalent. I bet if JS had used 1-based indexing, half the people on this comment threads would just be praising the benefits of 1-based indexing. Sorry for the rant, but the reason I wrote that article in the first place is because I of such threads. One thing I agree with many people here is that my baby example is not the best example. It is not wrong, but it is phrased in a confusing way. I'm tempted to edit the article and fix it or replace the example with something better. After all, the example is not important, it was just an example. One aspect that many people don't realise, one that I couldn't really dive into in the article, is how simple and small the Lua source-code actually is. IIRC it is about 70 files of plain old C that can be compiled by any C99 compiler. That is very refreshing. The amount of power and flexibility you have with Lua when paired with the simplicity and maintainability of the Lua source-code itself is something we should all cherish and praise. Lua is small and nimble, it is small enough that you can vendor all of it in your project if you so want. Anyway, I like 1-based indexing, they make my loops prettier. And yes, it was just a joke, I'm using iterators like everyone else and indexing hardly matter.

    Lua 极适合做嵌入式脚本层,但默认全局变量是最大隐患

    日常大量使用 Lua 的开发者表示,文章说它是“给领域工具加脚本能力的极简工具箱”完全正确,这正是 Lua 的闪光点。他最喜欢用表和闭包按需搭建 OOP,非常自由;但独自开发才能自定约定,大团队这么做会很危险。他惊讶作者没提他最大的抱怨:变量默认全局且未声明即用,拼错变量名会静默初始化为 nil,往往导致隐蔽的错误行为而非报错。

    intrepidhero查看英文原文

    I use Lua a fair bit in my day job. The comment about it being a minimalist toolkit that allows you add scripting on top of domain specific tools is spot on. That is exactly the use case that Lua shines in. My favorite feature is the way that tables and closures allow you build up just as much of OOP as you need for the application. It feels very empowering. I'm working mostly solo, so I've been able to establish my own conventions and stick to them. Doing this as a large team would be fraught with peril and require strict standard practices to maintain an intelligible code base. I was surprised the author didn't mention my #1 complaint, variables default to global scope AND initialized. If you misspell a variable name Lua will happily initialize it to nil and run with it. This almost always results in subtle incorrect behavior instead of an error.

    Lua 的核心优势是小而易学,特别适合非程序员使用

    “Lua 小到新手也能理解其内部实现并装进脑子”——这是 Lua 最好的特性。会编程的人 15 分钟就能学会 90% 的 Lua(元表和 C 接口稍慢)。对一门面向非程序员的语言来说,这至关重要。他还列举了 Hammerspoon、OpenResty、Wireshark 等由 Lua 驱动的工具。

    diego_moita查看英文原文

    > Lua is small enough that newbie developers can understand its internals well and keep it in their mind. This is, by far, Lua's best "feature". If you know programming you can learn 90% of Lua in 15 minutes (metatables and the C stack interface takes more time). For a language meant to be used by non-programmers this is more than precious, it is essential. Edit: my favourite Lua-enabled tools: 1) Hammerspoon, an automation tool for OS-X (like Windows' AutoHotkey) https://www.hammerspoon.org/ 2) Openresty, Nginx turbo-charged in Lua: https://openresty.org/en/ 3) Wireshark, a powerful network traffic analyzer: https://www.wireshark.org/ Many others at: https://github.com/LewisJEllis/awesome-lua PS: on Windows I highly recommend the ZeroBrane Studio IDE. It is really fantastic.

    从嵌入式开发实战看,Lua 极小、极快、极易移植

    曾在嵌入式设备上开发 LuaJIT 的人分享经验:Lua 为小体积、可移植、高可嵌入性而设计,解释器易理解、易从系统侧集成,整个运行时几乎不占资源。作为嵌入式语言它跑得飞快——只有约 10 个操作码,而当时的 Python 有 100 多个。他们把 Android 版 LuaJIT 移植到 Windows Phone 7 只花了一天。

    virtue3查看英文原文

    As someone that worked on LuaJIT for embeded devices (IE phones), I have some strong opinions / context. Lua is designed to be small and portable and highly embeddable. It's not the greatest language in the world, but understanding it's interpreter and how to use it from your system side is pretty easy as these things go. It's really REALLY well suited to be embedded into whatever system you need it in. The whole runtime is like nothing. And it runs damn fast for an embedded language, there's like 10 opcodes or something? compared to pythons 100+ (at the time we did the comparison like 10 years ago). Further context, I think we ported our android luaJIT to windows phone 7 in like, a day? It was super trivial.

    历次讨论

    同类还值得读

    1. 开源应用架构

      The Architecture of Open Source Applications

      《开源软件架构》(AOSA)是一本在线免费书,邀请知名开源项目的作者亲自剖析其内部设计,涵盖 SQLAlchemy、LLVM、Audacity、Apache、Bash 等系统。

      编程与软件工程上首页 9 次 · 2011–2024aosabook.org编辑精选
    2. 编程语言简史:简短、不完整且多半错误

      A Brief, Incomplete, and Mostly Wrong History of Programming Languages

      一篇以戏谑、故意不准确的方式回顾编程语言史的博客文章,用夸张轶事和讽刺定义串起 Lisp、C、C++、Java、JavaScript、PHP 等语言。

      编程与软件工程上首页 8 次 · 2009–2021james-iry.blogspot.com
    3. SQLite 是如何测试的

      How SQLite is tested

      SQLite 官方文档页,系统介绍 SQLite 的测试体系:多种测试方法(TCL 测试、模糊测试、回归测试、静态分析等)和海量测试用例,展示了这个小型开源项目如何靠极致测试获得…

      编程与软件工程上首页 8 次 · 2009–2025sqlite.org编辑精选
    4. 高级编程语言(2009)

      Advanced programming languages (2009)

      Matt Might 的经典文章,按用途推荐“高级编程语言”:如果追求就业就选主流语言,如果追求表达力、学术研究或创业,则推荐 Haskell、OCaml、Scala 等函数式语…

      编程与软件工程上首页 8 次 · 2009–2022matt.might.net
    5. 我的 Forth 与栈机器经历

      Yosefk - My history with Forth & stack machines

      作者以亲身经历回顾了使用 Forth 语言和栈式机器的历程:既赞叹其简洁优雅、代码量小、可自举的优点,也坦率指出栈操作在实际编程中的痛苦,以及 Forth 社区文化中的问题。

      编程与软件工程上首页 8 次 · 2010–2024yosefk.com编辑精选

    打赏支持

    打赏二维码

    觉得有用,请作者喝杯咖啡。

    WeChat

    关注向阳乔木

    微信公众号「向阳乔木推荐看」

    微信公众号「向阳乔木推荐看」二维码

    微信扫一扫;在微信里打开本页时,长按二维码识别。