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 生成,可能有误。

    编程与软件工程sigbus.info

    我如何在 40 天内写出自举 C 编译器

    How I wrote a self-hosting C compiler in 40 days

    2次上首页
    2年跨度
    545累计得分
    144条评论

    2015 — 2017,它一次次回到首页

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

    导读

    作者记录了自己在 40 天内从零写出一个能编译自身的 C 编译器(8cc)的全过程。文章以日志形式展开,从最初只能读入一个整数并退出的 20 行程序起步,逐步实现 C11 特性和预处理器,坦率记录了中途的迷茫、重写与自我怀疑。

    为什么经久不衰:它既是难得的编译器实战教程,也真实呈现了大型项目从最小可行版本逐步生长的过程,这种诚实叙事让它在多年后仍被反复推荐。

    关键词 C编译器自举编译原理项目日志

    HN 评论精选

    文章坦诚记录失败与自我怀疑的叙事风格在技术写作中十分罕见,令人耳目一新

    我很喜欢这篇文章:信息量大、有趣,而且语气难得地坦诚。计算机科学圈流传的故事往往是主角在关键时刻灵光一闪想出巧妙方案,很少有程序员坦白自己的后悔、自我修正,以及一路上的恐惧与怀疑。比如作者写道:“我本该从一开始就写出漂亮的代码,但因为需要通过写出能运行的代码来学习,重写不可避免。”还有他在低谷时提醒自己:一个月前编译器还只是一个用 scanf 读整数、用 printf 打印出来的单文件程序——自己已经进步了这么多,肯定能做完。

    bad-joke查看英文原文

    I really enjoyed reading this. It's informative, fun, and has a refreshingly honest tone. Too often, stories passed around by computer scientists entail clever solutions and elegant insight striking the protagonist like lightning in the hour of need. Rarely does the programmer express regret, make self-corrections, and confront fear and doubt along the way: >I should have written beautiful code from the beginning, but because I needed to learn by writing a working code, the rewriting was unavoidable. >I should probably change my mind to implement all the features from end to end. I may find it fun as I'm approaching the goal. Sometimes, I have to write more code than I want to write in order to achieve a goal. >In a tough situation like this, I probably should recall the fact that the compiler was just in one file, to see how much progress I've made in a month. It just reads an integer with scanf() and prints it out with printf(). Really, I made so much progress in one month. Yeah, I think I can do this.

    标准化的 C 语言比自创玩具语言难实现得多

    “我怀疑 Dennis Ritchie 发明了一种语法并为它写了实现,结果发现比他预想的更复杂,后来被 ANSI 委员会标准化。实现一个标准化语言很难,因为你必须把每件事都做对;而写自己的玩具语言则相当容易。”很喜欢这几句。

    jaybosamiya查看英文原文

    > I suspect that he [Dennis Ritchie] invented a syntax, wrote code for it, which turned out to be more complicated than he had expected. And that was eventually standardized by the ANSI committee. It's hard to implement a standardized language because you have to get everything right. It's rather easy to write your own toy language. Love those lines

    在 40 天内完成 C11 和预处理器是惊人的成就

    作者能在这么短时间内同时搞定 C11 和预处理器,让我有点惊讶。预处理器很难写,不过他复用了之前版本的代码,这就说得通了。总之是非常了不起的成就,祝贺作者!

    tomcam查看英文原文

    I was a little surprised that the author was able to manage both C11 and the preprocessor in that time. The preprocessor is hard. But there was existing code from a previous version of it, which makes sense. Still, a fantastic achievement! Congrats to the author!

    有经验的开发者证实这个时间量级合理,且预处理器常是最难的部分

    1998 年我为一种新指令集架构的仿真环境写自举 C 编译器和基础运行库时,也差不多花了这么长时间(它后来成了 Cray X1)。不过我是从早先项目留下的现成 C 预处理器起步的,而预处理器往往是最难写对的部分。在仿真环境中启动编译器比在真实硬件上有优势:能看到带计算值的指令轨迹,调试起来太爽了。

    pklausler查看英文原文

    That's about how long it took me to write a self-compiling C compiler and basic runtime library for a simulation environment for a new instruction set architecture back in '98 (it eventually became the Cray X-1). Although I did start with a working C preprocessor left over from an earlier project, and in many ways the preprocessor can be the hardest part to get right. Bringing up a compiler in a simulated environment has its advantages over real metal. Seeing instruction traces with computed values is awesome for debugging.

    历次讨论

    同类还值得读

    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

    关注向阳乔木

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

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

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