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

    编程与软件工程queue.acm.org

    面向大众的 OCaml(2011)

    OCaml for the Masses (2011)

    4次上首页
    7年跨度
    593累计得分
    387条评论

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

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

    导读

    这是 Yaron Minsky(Jane Street)2011 年发表在 ACM Queue 上的文章,向大众介绍 OCaml 这门 ML 系函数式语言:它兼具强静态类型推断与实用性,适合构建大型可靠系统。文章也坦承了当时 OCaml 在工具链和生态上的不足。多年后作者在讨论中补充:Merlin、Dune 等工具已大幅改善,且 Facebook、Bloomberg、Docker 等公司都在生产环境中使用 OCaml。

    为什么经久不衰:它以从业者的实战视角讲清了 OCaml 的核心价值与真实短板,而类型化函数式编程如今正是主流趋势,这篇老文依然是理解 ML 系类型系统的好入门。

    关键词 OCaml函数式编程静态类型编程语言

    HN 评论精选

    作者亲自回应:工具链已大幅改善,OCaml 在工业界应用远比想象中广泛

    我是本文作者。文章写就后不少情况已变化:工具链改善很多——Merlin 为各类编辑器提供 IDE 功能,Dune 是出色的构建系统,统一了 Jane Street 内部与开源社区的 OCaml 体验;调试工具也有进展。此外 OCaml 在工业界落地显著:Facebook 有多个大型项目(Hack、Flow、Infer)以及基于 OCaml 的 Reason,Bloomberg、Docker、Ahrefs 等也都是真实用户。有人以为 Jane Street 是唯一用户、语言优先级只为我们服务,其实不然。

    yminsky查看英文原文

    Hey, author of the linked post here. A few thoughts, since some things have changed since that post was written: First, the tooling limitations that I mentioned in the article have gotten a lot better. In particular: Merlin now provides IDE-like functionality for your editor of choice (including code, vim, and emacs). Also, Dune is an excellent build system for OCaml that does an enormous amount to simplify the build process, and tie a bunch of different tools in the ecosystem together. One great thing about Dune is it does a lot to unify the experience we've long had inside of Jane Street with the open-source OCaml experience. It's really a big upgrade. We've also made some progress on debugging tools, like the spacetime allocation profiler. There's also active work on making GDB/LLDB debugging in OCaml really first class. Also, OCaml has had some major industrial uptake. Notably, Facebook has several major projects built in OCaml (Hack, Flow, Infer) as well as their own syntactic-skin-plus-tooling on top of OCaml, in the form of Reason. Reason has gotten a lot of traction in the webdev world, which is awesome. Bloomberg, and Docker are some other big names that have real dependencies on OCaml, along with some more names you probably don't know like Ahrefs, LexiFi, and SimCorp. People sometimes feel like Jane Street is the only real user of OCaml, so they imagine that Jane Street's needs are the ones that drive the language priorities. So, the thinking goes, if you're not a trading firm, you should look elsewhere. But this is the wrong picture. First, there are other serious users, as discussed above. Besides, the community doesn't just roll over and do what we say. If you don't believe it, go and see how often our PRs to OCaml get rejected. And even our interests in the language have grown beyond what you might imagine a trading firm would care about. We use OCaml for building traditional UNIX system software, like MTAs, for designing hardware (via HardCaml), and for building dynamic browser-based applications (via Incr_dom). For sure, there are still challenges of being a minority language (and there's still no multicore GC, despite some exciting progress). But I believe OCaml is a yet better choice than it was in 2011 when I wrote the article.

    脚本语言主导大型系统是历史偶然,ML 式静态类型被 Java 的局限所误名

    我迫不及待希望类型化函数式编程成为主流。如今大型系统普遍使用脚本语言只是历史的偶然:2000 年代初 Web 兴起时唯一实用的静态类型语言是 Java,当时它没有泛型和 lambda,还深陷 J2EE 泥潭,选 Ruby/Python 是一种反叛。但 Java 的类型系统是面向对象的——创建类型的唯一方式是创建类,抽象能力有限,人们却把账算到静态类型头上。OCaml 的静态类型完全是另一回事:类型只关乎数据,而非类。

    jasim查看英文原文

    I for one can't wait for Typed FP to become mainstream as soon as possible. I think the prevalence of scripting languages in large systems today is a quirk of history. In early 2000s, as the web was growing to be an application delivery platform, the only practical statically typed language was Java. It didn't have generics or lambdas at the time, and was infested with the sprawl of J2EE. Choosing Ruby/Python over Java was at the time an act of rebellion and a show of technical superiority. To quote pg: "if they wanted Perl or Python programmers, that would be a bit frightening-- that's starting to sound like a company where the technical side, at least, is run by real hackers." The static type system in Java is object-oriented: the only way to create a type is to create a class. I believe it was limited in abstraction power and everyone attributed it to the rigidity of static types. Java has come a long way since, but the sense that dynamic typing is superior to static types lingers. But OCaml's static types are a completely different kind of type. There is a kind of "procedural" static typing in Go, C, and to some extent C++ where primitives are typed and you can construct structs and unions without much ceremony. Then there is object-oriented static typing in Java and C#, which traces its origin back to Simula through C++ where types and classes are the same. Then you have functional static types where types are just and only about data. Almost all Typed FP languages use a form of Hindley-Milner inference, support algebraic data types and pattern matching, have generics (they were invented by Milner for ML in 1973), and allows for code organization and encapsulation through modules and opaque types. Algebraic data types alone is a tool for thought like no other. You'll start reifying concepts that would've otherwise gone implicit in your codebase thanks to ADT. The languages are solid, ecosystems are vibrant but small and that can only be fixed with more people. Come on in, the water is fine!

    想用 OCaml 但被生态和库维护状况劝退,这是选型的现实顾虑

    我正为下一个项目选语言,很想用函数式语言,也真心想用 OCaml,但生态实在欠缺:很多库无人维护、最后一次提交已是几年前。选 OCaml 可能意味着把大量时间花在补库上,而不是开发应用本身。F# 的 SAFE 栈有 Windows 历史包袱,Scala 能用 Java 生态但我更偏爱 OCaml/F# 的 ML 风格。

    raphinou查看英文原文

    I'm currently looking for the language and framework to use for a project, and I'd like to go with a functional language. I really, really want to do my next project in Ocaml, but... I find the ecosystem seriously lacking. You find Ocaml libs for a lot of needs, but a lot of those a unmaintained and have their last commit a couple of years ago. I'm afraid that choosing Ocaml would mean spending quite some time on libraries I need, and less on the app I want to develop. There's F# and the SAFE stack, but I don't feel home there. A lot of docs/libs still are (or have quirks due to having been) Windows specific, and joining the most popular f# community communication channels requires you to join the F# Software Foundation.... Then there's Scala, with functional programming and access to Java's ecosystem. But I prefer the ML style of Ocaml and F#.

    模块函子是 OCaml 被低估的杀手锏:同时声明提供与依赖,实现大规模抽象

    文章漏了 OCaml 的一个关键特性:模块函子。它让你把一组函数和类型打包成模块,不仅声明提供什么,还声明需要什么,然后像搭积木一样把供需互补的模块拼在一起。很多语言只支持“提供”这半边(如 Java 接口),很少支持“需要”这半边。好处包括替换等价实现、大规模抽象、以及一行代码就能用假模块替换单测中的底层依赖。2020 年的语言会有这种大规模抽象机制,或更好的独立于语言的方案。

    colanderman查看英文原文

    This is missing one key feature of OCaml: module functors. Briefly stated, module functors allow you to wrap up a set of functions and types as a module, and state not only which functions and types this module provides but also which functions and types the modules requires. You can plug together module functors with complementary provides and requires, like building with toy bricks. Many languages support the provides half of this feature (e.g. Java's interfaces) but few support the requires half (Scheme's units are one of the few that come to mind). The advantage of supporting both provides and requires include ability to swap out equivalent implementations of some module, perform massive code abstraction, and to better isolate unit tests without resorting to conditional compilation. (You can quite literally plug a high-level module into a fake lower-level module in order to test the high-level one using one line of code.) The "language of 2020" will have this, or an equivalent, means of massive abstraction. Or better still, such a mechanism will exist as a separate language unto itself which can work with multiple languages. (Think C-style symbolic linking combined with a .NET ABI.)

    历次讨论

    同类还值得读

    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

    关注向阳乔木

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

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

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