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

    编程与软件工程metalevel.at编辑精选

    Prolog 的力量

    The Power of Prolog

    4次上首页
    5年跨度
    1,524累计得分
    469条评论

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

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

    导读

    《The Power of Prolog》是 Markus Triska 编写的免费在线 Prolog 教程,系统介绍逻辑编程、约束逻辑编程(CLP(FD)、CLP(B))及其在排序搜索、密码学、人工智能等领域的应用。作者多年持续更新,并开源了全部内容、配套视频和论文,多次登上 HN 首页。

    为什么经久不衰:它把 Prolog 从'过时语言'重新讲成解决约束求解、类型推断等问题的利器,内容持续演进且完全免费,是学习逻辑编程最权威的中文外教程之一。

    关键词 Prolog逻辑编程约束求解免费教程

    HN 评论精选

    Prolog 的约束求解能力极强,两行代码即可秒解 7-11 问题,且天然适合写类型推断引擎

    我见过最酷的用法之一是用 Prolog 的 CLP(FD) 求解 7-11 问题:四件商品总价 7.11 美元、乘积也是 7.11(不计舍入),求各件价格。两行代码一秒内给出唯一解,连昂贵的 Mathematica 都做不到!Prolog 另一个擅长的领域是类型推断——最简单的类型推断本质上就是按语法生成约束再用合一求解,这正是 Prolog 的默认能力。用 Prolog 十分钟就能写出一个简单类型 lambda 演算的类型推断引擎,Google 曾有一个用 Prolog 写的 Python 类型推断项目。

    kccqzy查看英文原文

    One of the coolest things I've seen is to use Prolog with CLP(FD) to solve the 7-11 problem. The problem basically says the sum of the prices of four items is $7.11, and the product is $7.11 too (no rounding); find the prices of these four items. This can be solved in two lines of code that gives the (unique) solution in a second. Not even my expensive Mathematica can do this! ?- use_module(library(clpfd)). true. ?- Vs = [A,B,C,D], Vs ins 1..711, A * B * C * D #= 711000000, A + B + C + D #= 711, A #>= B, B #>= C, C #>= D, labeling([ff, down], Vs). Vs = [316, 150, 125, 120], A = 316, B = 150, C = 125, D = 120 ; false. Another great thing Prolog is good at is type inference. After all, type inference, in its simplest form, is just syntax-directed constraint generation and then using unification to solve constraints—exactly what Prolog gives you by default. You can write a type inference engine for simply typed lambda calculus in Prolog in 10 minutes. Google used to have a project to do type inference for Python written in Prolog, although they've since [switched away](https://github.com/google/pytype).

    作者(也是评论者)介绍新增章节和开源仓库,感谢读者反馈

    非常感谢大家的宣传!自上次讨论以来,我新增了 Prolog 商业案例、排序与搜索、密码学、工程实践、人工智能等章节,并对其他章节做了大量改进。几乎所有内容都放进了公开的 git 仓库,方便跟踪进度和离线阅读。读者一年来的建设性反馈让这项工作格外值得。

    triska查看英文原文

    Thank you very much for the publicity, I greatly appreciate it! This book has been discussed on HN about one year ago: https://news.ycombinator.com/item?id=14045987 Since then, I have added the following new chapters: Prolog Business Cases: https://www.metalevel.at/prolog/business Sorting and Searching: https://www.metalevel.at/prolog/sorting Cryptography with Prolog: https://www.metalevel.at/prolog/cryptography Engineering Aspects: https://www.metalevel.at/prolog/engineering Artificial Intelligence with Prolog: https://www.metalevel.at/prolog/ai I have also made many improvements and additions to the other chapters. Also, I have made almost everything available in a public git repository so that you can track the book's progress and view it offline: https://github.com/triska/the-power-of-prolog It is my sincere hope that you find this material useful, and I welcome all suggestions and comments. Also, thank you very much to all readers for the extremely constructive feedback that I have received in the past year. Your comments have made this work especially worthwhile. Enjoy!

    批评者认为 Prolog 学习成本高、ROI 低,但硬件演进可能让逻辑语言未来翻盘

    我讨厌这门语言(我是认真的,尽管这里显然是 Prolog 爱好者聚集地):它的工作模型让我难以适应,投入产出比也低。不过逻辑语言可能只是生不逢时——随着计算硬件日益复杂、越来越难预测,命令式范式契合底层物理架构的优势正在逐日减弱。假以时日,逻辑语言也许会成为普通人快速出活的更好选择,就像今天的 Python。

    restalis查看英文原文

    I hated this language (and I'm saying it knowingly, despite the fact that this is most definitely a Prolog loving group). I found its working model difficult for me and the ROI quite low. I wanted to make my critique a bit constructive though and, before spitting out something of my own, I decided to look if there's already anything available in this regard. I think Andre Vellino puts it quite well (or at least better than I cold) in his "Prolog's Death" blogpost[1]. I invite you to have a look at it. Leaving aside Prolog's language design decisions, logical languages in general may be for now just a bit precocious, something not meant to flourish in our time. However, the computing hardware evolves and with it getting more complex and harder to predict the imperative paradigm being better fit for the underlying physical architecture becomes less and less true with every passing day. Although I can't say I'm thrilled about it, in time the logical languages may become the better offer for the average Joe looking for quick results, something closer to what for now Python is. [1] https://synthese.wordpress.com/2010/08/21/prologs-death/

    质疑:嵌入式逻辑编程库(如 racklog)可能比学一门新语言更划算

    如今还有什么理由选择 Prolog 而不是用库呢?比如 Racket 的 racklog:既能获得 Prolog 的全部好处,又不用引入新语言、不用把它集成进项目。

    smabie查看英文原文

    Is there a reason why anyone would choose prolog today instead of a library? Like racklog [https://docs.racket-lang.org/racklog/]. All the benefits of prolog, with none of the cost of using a new language and integrating it into your project.

    历次讨论

    同类还值得读

    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

    关注向阳乔木

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

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

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