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

    编程与软件工程aiai.ed.ac.uk

    CLOS 简明指南(1998)

    A Brief Guide to CLOS (1998)

    3次上首页
    3年跨度
    241累计得分
    45条评论

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

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

    导读

    这篇 1998 年的短文简要介绍 Common Lisp Object System(CLOS),涵盖类、泛型函数、方法以及方法组合等核心机制。它更像一份面向已有 Lisp 或面向对象背景读者的快速导览,帮助理解 CLOS 与主流 OO 语言不同的组织方式。

    为什么经久不衰:它篇幅短小却抓住了 CLOS 最独特的部分——泛型函数与方法组合,让有 OO 经验的读者重新思考方法分派和继承的边界。

    关键词 Common LispCLOS面向对象泛型函数

    HN 评论精选

    CLOS 很强大,但作者在生产中并未真正需要其高级特性,怀疑普通 OO 已够用。

    我在高中学习了 Common Lisp 和“够用”的 CLOS,被它的能力震撼,整个职业生涯都希望能参与一个用上 CLOS 各种有趣特性的复杂 CL 系统,但一直没遇到(我 80% 在 Ruby,20% 在 Clojure)。奇怪的是,我也没真正渴望过 AOP、多方法、MOP 等。是我做过的系统太无聊,还是 Ruby 的 OO 和库生态已经够用?我很想听听资深 Lisp 程序员在生产中使用 CLOS 的经验。

    tsm查看英文原文

    I learned Common Lisp and "enough" CLOS in high school, was blown away by CLOS's power†, and have spent the entirety of my professional career wishing that I could have a job working on a complex system in CL that used all of CLOS's interesting features. This has not happened (I've been 80% in Ruby-land and 20% doing Clojure), but what's weird is that I haven't even had situations where I really yearned for AOP, multi-methods, the MOP, etc. I can't decide if the systems I've worked in have just been too boring (they certainly solved the business problem though) or if Ruby's object-orientation (and library ecosystem) is good enough that I just don't need the full power of CLOS. (Designing Clojure programs is a totally separate kettle of fish.) I'd be interested to hear from more seasoned Lispers about their experience with CLOS in production. † I took an FP class during my first semester of college. The professor wrote the book himself, and had an extended sidebar comparing the design considerations of OO systems (easy to add another class; tedious to reopen n subclasses to add another method to each one) and FP systems (easy to add another function dispatching on type; tedious to reopen n functions and make them dispatch on a new type). I pointed out that CLOS handled both situations equally well, and in the final edition of the book he tossed in a footnote saying as much and thanking me.

    通过 CLOS 的显式机制能更深刻地理解 OO 方法分派与继承的可塑性和通用性。

    强烈推荐没试过 CLOS 的 OO 程序员玩一玩 CLOS(或 Guile 的 GOOPS、Racket 的 Swindle 这类 Scheme 方言仿制品)。你可能整天处理方法分派和继承这些 OO 概念,但在 CLOS 中它们被显式地摆出来,与底层 Lisp 分离,能帮你内化这些概念,看清它们多么任意、可塑,以及按 CLOS 那样宽泛解释时多么通用(日常语言的 OO 系统堵死了很多路)。

    CamTin查看英文原文

    I highly recommend playing with CLOS (or one of the Scheme flavored knockoffs like GOOPS in Guile or Swindle in Racket) for anyone who hasn't but works in OO languages (probably most working programmers). You probably spend all day dealing with OO ideas like method dispatch and inheritance, but to see them laid out explicitly in CLOS, as distinct from the underlying Lisp language, really helps you to internalize them and how arbitrary and malleable they are, as well as how astoundingly general they are when interpreted as broadly as CLOS does (the object systems in workaday languages cut off a lot of the avenues open to systems defined in terms of CLOS). You can get a similar "aha" moment by looking at how Perl does OO if you already know Perl, or reading the implementations of one of its dozens of different user-implemented object systems. Perl has some language-level support for OO but it is very minimal so these object systems have to do most of the work that a Common Lisp object system would. I think the main benefit is in seeing OO implemented in a language with no built-in support for it, rather than a language built around the concept of classes and inheritance or some version of it.

    方法组合器强大但容易失控,CLOS 限制为三种常用组合器是吸取历史教训。

    我好奇作者会不会提方法组合器,他提了。它们非常强大、有用,也是制造意大利面代码的绝佳机会。CLOS 的组合器吸取了早期教训,只允许 :before、:after 和 :around 这些最有用、最可理解的组合器。Lisp Machine Lisp 有大量方法组合器,包括完整控制结构::or、:and、:progn 等。它们让代码可扩展、紧凑,也完全不可预测(如果你不精确理解运行时方法层级,:or 组合会运行哪些方法?)。尽管如此,我有时到今天还怀念它们,哪怕在 C++17 代码库里。

    gumby查看英文原文

    I wondered if the author would mention method combinators, which he did. They are super powerful, very useful...and a marvelous opportunity for spaghetti code. Actually the CLOS combinators show learning from earlier mistakes and allow only :before, :after and :around, the most useful and the most comprehensible combinators. Lisp Machine Lisp (including the "zetalisp" variant dreamt up by Symbolics' marketing department) had an enormous panoply of method combinators including full control structures: IIRC I had cause to resort at one time or another to :or, :and and :progn combinators (the latter being somewhat like :around, I suppose, but not the same). They made the code extensible, compact, and completely unpredicatable (if you didn't understand the runtime method hierarchy precisely which combined methods would be run in an :or combination? Nevertheless I sometimes miss them to this day, even in my C++17 codebase!

    CLOS 应协议优先:先定义泛型函数,再用方法和类实现协议。

    从类出发、把泛型函数描述成发送消息的方式,对 CLOS 来说相当本末倒置。CLOS 的最佳用法主要是先用泛型函数定义协议,再用方法和(可选的)类实现协议。http://xach.com/lisp/jrm-clos-guide.html 有 Joe Marshall 的“Warp Speed” CLOS 指南副本。

    zachbeane查看英文原文

    Starting from classes and describing generic functions as a way to send messages is pretty backwards for CLOS. CLOS is best used primarily by defining a protocol with generic functions, then using methods and (optionally) classes to implement the protocol. http://xach.com/lisp/jrm-clos-guide.html has a copy of Joe Marshall's "Warp Speed" CLOS guide.

    历次讨论

    同类还值得读

    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

    关注向阳乔木

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

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

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