HackerPapers

HN 二十年,最值得读的论文。

从 Hacker News 2006 年以来的全部投稿里,挑出链接本身就是论文的帖子:arXiv、期刊、会议论文、技术报告。每篇附中文标题,讨论最热的那些再加上中文导读和高赞评论翻译。

从必读开始
  • 8,000+篇被 HN 讨论过的论文

Essential

必读 30 篇

在论文库里看全部精选

编辑精选里 HN 讨论最热的 30 篇,每篇都有中文导读。不知道从哪读起,就从这里开始。

  1. 正在载入论文…

Archive

论文库

点柱子按年份筛选。注:源数据里 2023 年的帖子分数记录不全,2026 年尚未过完,这两年收录偏少。

难度
排序

    About

    这些论文是怎么挑出来的

    1. 01

      全量扫一遍

      读取 Hacker News 自 2006 年以来的全部 446 万条链接投稿,找出指向 arXiv、期刊、会议、技术报告和学术 PDF 的帖子。

    2. 02

      只留论文本身

      由 AI 逐条判断,剔除介绍论文的新闻、博客和幻灯片,同一篇论文的多次投稿合并计算,并统计它在评论区被引用的次数。

    3. 03

      写导读、译评论

      讨论最热的 1,500 篇配上中文导读,并精选、翻译 HN 高赞评论。导读由 AI 生成,可能有误,请以原文为准。

    编程语言与软件工程2010arxiv.org

    Yacc 已死

    Yacc is dead

    进阶 · 约 40 分钟读完前置知识:编译原理、形式语言与自动机、函数式编程基础

    读论文 HN 讨论
    154HN 得分
    44条评论
    2次被评论区引用

    导读

    这篇论文指出传统解析器生成器 Yacc 存在局限,并提出一种新的解析技术(基于导数)来更灵活地处理语法。作者在 HN 评论中分享了论文未能正式发表的背景,并呼吁社区参与实现和改进。

    HN 关注点:HN 读者被“Yacc is dead”这一挑衅性标题吸引,同时作者亲自参与讨论并提供了论文评审和实现细节,引发了关于解析技术现状和未来发展的讨论。

    关键词 Yaccparsingderivative parsingScala

    HN 评论精选

    这几条评论里:补充 3 亲历 1

    亲历作者说明论文未正式发表的缘由,并呼吁社区参与实现和优化,以推动技术获得科学界认可。

    (本文作者)很高兴看到这篇文章受到关注。我非常喜欢这些解析技术,但我的主要研究领域是静态分析,所以一直没时间修改并重新提交论文。照目前情况看,我可能永远没时间了。我把论文发在 arXiv 上是为了让 David 能在博士申请中引用。既然有人问起,这里是评审意见:http://matt.might.net/papers/reviews/esop2010-derivatives.txt。我有一个更新、更干净且更快的实现,一直计划写篇博客文章介绍(可惜还没机会)。David 还用 Haskell 做了一个实现,在很多受限文法类(如 LL(k))上速度极快且高效。我会鼓励他也发布出来。如果你有兴趣在科学出版物上署名,并帮助这项技术获得科学界关注,你可以用你喜欢的语言实现这两种技术中的任意一种,并反复测试以帮助发现低效之处。(例如,本文链接的原始 Scala 版本由于缓存导数的方式存在内存泄漏。我们通过手动展开顶层重复来规避。)如果你有兴趣,请给我发邮件。HN 能做科学吗?我很想看看。

    mattmight查看英文原文

    (Article author here.) I'm delighted to see this get some attention here. I absolutely love these techniques for parsing, but as my primary research areas is static analysis, I haven't had time to revise this paper and resubmit. As it stands, I may never get the time to do so. :( I posted it on arxiv so that David could reference it for his Ph.D. school apps. Since some of you have asked, here are the reviews: http://matt.might.net/papers/reviews/esop2010-derivatives.txt I do have an updated implementation that's much cleaner and faster, and I've been planning to do that in a blog post. (Alas, no opportunity yet.) David's also done another implementation in Haskell that's screaming fast and efficient on many restricted classes of grammars (like LL(k)). I'll encourage him to post that as well. If you're interested in getting your name on a scientific publication and helping this get the attention of the scientific community, you can help us by creating an implementation of either technique in your favorite language and beating on it to help find the inefficiencies. (For instance, the original Scala version linked from this paper has memory leaks from the way it caches derivatives. We got around them by rolling top-level repetition by hand.) Please email me if that's something you're interested in doing. Can HN do science? I'd love to find out.

    补充展示该解析技术在 Scala 中的具体语法写法,并指出实现中类型转换可能多余。

    这是他们 Scala 版本中语法实际的样子。这个语法用于处理 x 代表 1、s 代表 + 的算术语言,只生成解析树,不计算最终结果。注释是我加的:(代码略)// 解析树节点 abstract class Exp; case object One extends Exp; case class Sum(e1: Exp, e2: Exp) extends Exp; // 终结符 lazy val S: Parser[Char,Char] = new EqT[Char]('s'); lazy val X: Parser[Char,Char] = new EqT[Char]('x'); // 表达式定义 lazy val EXP: Parser[Char,Exp] = rule(X) ==> { case x => One.asInstanceOf[Exp] } || rule(EXP ~ S ~ EXP) ==> { case e1 ~ s ~ e2 => Sum(e1,e2).asInstanceOf[Exp] } || ... // 运行 val xin = Stream.fromIterator("xsxsxsxsx".elements); EXP.parseFull(xin) // 返回值 => Stream(Sum(One,Sum(Sum(One,One),Sum(One,One))), ?)。我认为所有 asInstanceOf 都可以避免。

    fizx查看英文原文

    Here's what a grammar actually looks like in their scala version. This grammar is for arithmetic over the language where x represents 1, and s represents +. This only generates the parse tree, not the final answer. Comments are added by me: // The Nodes in the parse tree abstract class Exp case object One extends Exp case class Sum(e1 : Exp, e2 : Exp) extends Exp // Terminals lazy val S : Parser[Char,Char] = new EqT[Char] ('s') lazy val X : Parser[Char,Char] = new EqT[Char] ('x') // Definition of an expression // I'm pretty sure all the asInstanceOfs are avoidable/unnecessary. lazy val EXP : Parser[Char,Exp] = rule(X) ==> { case x => One.asInstanceOf[Exp] } || rule(EXP ~ S ~ EXP) ==> { case e1 ~ s ~ e2 => Sum(e1,e2).asInstanceOf[Exp] } || rule(EXP ~ S ~ X) ==> { case e1 ~ s ~ e2 => Sum(e1,One).asInstanceOf[Exp] } || rule(X ~ S ~ EXP) ==> { case e1 ~ s ~ e2 => Sum(One,e2).asInstanceOf[Exp] } || rule(X) ==> { case x => One.asInstanceOf[Exp] } || rule(EXP) ==> { case e => e } || rule(Epsilon[Char]) ==> { case () => One } // Actually run the rule val xin = Stream.fromIterator("xsxsxsxsx".elements) EXP.parseFull(xin) // return value => Stream(Sum(One,Sum(Sum(One,One),Sum(One,One))), ?)

    补充询问当前解析技术的最先进方案,并提及 PEG、OMeta 和 Parsec。

    解析领域最先进的技术究竟是什么?作为业余爱好者,我上次研究时发现 PEG 和 OMeta 之类的扩展似乎是最好的选择,也听说过 Parsec 不错。

    johkra查看英文原文

    What is actually state-of-the-art in parsing? When I, as an Amateur, last looked into it, PEG[1] and extensions like OMeta[2] seemed to be the best options. I've heard good things about Parsec[3], too. [1](http://en.wikipedia.org/wiki/Parsing_expression_grammar) [2](http://www.tinlizzie.org/ometa/) [3](http://legacy.cs.uu.nl/daan/parsec.html)

    补充指出 Antlr 已取代 yacc,并提到 parser combinators 和 GLL 解析器的优势,但新技术的实际采用仍然缓慢。

    Antlr 已经在大多数实际工作中取代了 yacc。Daniel Spiewak 也提到 parser combinators,以及 GLL 解析器如何更易用且多数时候足够快。他提到 parser combinators 是创建解析器的领域特定语言。尽管如此,更好的技术采用起来真的很慢,一如既往。

    DanielRibeiro查看英文原文

    Well, Antlr (http://www.antlr.org/) has replaced yacc for most of the practical work already. Daniel Spiewak also mentions parser combinators and how GLL parsers can be much easier to use and yet fast enough most of the time (http://www.codecommit.com/blog/scala/unveiling-the-mysteries-of-gll-part-1). He mentions parser combinators as domain specif languages for creating parsers (http://www.codecommit.com/blog/scala/the-magic-behind-parser-combinators). Despite all of these, adoption of better techniques is really slow. As usual.

    历次讨论

    同领域还值得读

    1. Google 的软件工程(2017)

      Software Engineering at Google (2017)

      介绍了 Google 的软件工程实践,包括其单一代码库(monorepo)、几乎全部开发在主干进行而非分支、代码审查、构建系统 Blaze、协议缓冲区等工具与流程,并讨论了频繁重…

      编程语言与软件工程2017 · 1,127 分 · 465 评 · 引用 15入门 · 约 45 分钟编辑精选
    2. Peter Naur:编程作为理论构建 (1985)

      Peter Naur – Programming as Theory Building (1985)

      Peter Naur 1985 年的经典论文《Programming as Theory Building》提出:编程的本质不是写代码或文档,而是在程序员头脑中构建对程序及其运行…

      编程语言与软件工程2016 · 629 分 · 74 评入门 · 约 45 分钟编辑精选
    3. SciPy 1.0:Python 科学计算的基础算法

      SciPy 1.0: fundamental algorithms for scientific computing in Python

      这篇发表于 Nature Methods 的论文介绍了 SciPy 1.0——Python 科学计算生态的基石库,涵盖其核心算法模块(优化、积分、插值、线性代数等)、软件架构与社…

      编程语言与软件工程2020 · 387 分 · 98 评入门 · 约 45 分钟编辑精选
    4. Lisp 的历史(1979)

      History of Lisp (1979)

      这是 Lisp 发明者 John McCarthy 于 1979 年为 HOPL(编程语言史)会议撰写的回顾文章,讲述 Lisp 的起源、设计动机与早期演进,文中也涉及 if 表…

      编程语言与软件工程2018 · 352 分 · 44 评入门 · 约 45 分钟编辑精选
    5. 使用 NumPy 进行数组编程

      Array Programming with NumPy

      这篇 Nature 文章介绍 NumPy 的数组编程模型及其在科学计算中的核心作用:以 ndarray 为中心,通过向量化操作让 Python 高效处理多维数组。

      编程语言与软件工程2020 · 318 分 · 134 评入门 · 约 40 分钟编辑精选

    打赏支持

    打赏二维码

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

    WeChat

    关注向阳乔木

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

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

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