Skip to content
HomeVideosBooksBlogs
AllTop postsTopics
Podcasts
HistoryListsWatch laterLiked videosFollowing

The videos, books, blogs and podcasts Hacker News keeps recommending, all in one place.

VideosBooksBlogsPodcastsAboutPrivacySettings

Data from Hacker News, HackerTube, HackerBooks, HackerBlogs and Open Library. Credits · Not affiliated with Y Combinator.

HomeVideosBooksBlogsPodcasts
Ctrl K
    P

    Paul Battley

    po-ru.com · Personal blog · on HN since 2009

    Paul Battley, a Ruby developer, writes about Ruby parsing quirks, Rails, and the Ruby community.

    Visit blogRSSHN submissions
    Languages & CompilersProgramming
    What HN says

    HN commenters link his Ruby parsing ambiguities post in grammar discussions, and his post on Matz being nice in a debate over DHH's politics.

    Stats for nerds
    16HN people shared it
    12linked in comments
    145story points
    Aug 2026last shared
    2012people per year2026

    Top posts on HN

    1. 1
      Ruby’s magic underscore
      1 person · 113 points · first shared 2012 · 34 comments on HN
    2. 2
      Convert Ruby to JavaScript
      1 person · 15 points · first shared 2009 · 10 comments on HN
    3. 3
      Destructuring assignment in Ruby
      1 person · 3 points · first shared 2012 · Discussion on HN
    4. 4
      It doesn't matter whether "Matz is nice"
      2 people · 2 points · first shared 2026 · Discussion on HN
    5. 5
      Writing Rails apps without wanting to kill everybody
      1 person · 2 points · first shared 2013 · Discussion on HN
    6. 6
      1 error(s) prevented this form from being saved
      1 person · 2 points · first shared 2014 · Discussion on HN
    7. 7
      One does not simply … (Turbolinks edition)
      1 person · 2 points · first shared 2013 · Discussion on HN
    8. 8
      IE6 D-Day, lets give IE6 a definable lifespan
      1 person · 2 points · first shared 2009 · Discussion on HN
    9. 9
      Skimmer, deuxième partie
      1 person · 1 points · first shared 2015 · Discussion on HN
    10. 10
      Get your filthy hands off my Kernel methods
      1 person · 1 points · first shared 2009 · Discussion on HN

    What HN people wrote when they linked it

    • threedaymonkNov 2012

      Both Ruby and Perl have the same challenge, and both solve it by treating the expression differently depending on whether f is a variable or a function/method. As it turns out, you can't actually parse Perl 5 [1], but Ruby can be statically parsed [2], and resolves this ambiguity based on context.

      I don't actually know anything about CoffeeScript's parser, and I imagine that it complicates the grammar significantly, but would the same approach not be possible there?

      (Personally, I'm quite happy to type parentheses in exchange for clear syntax, and it's these very aspects of CoffeeScript that put me off it: I really find it tricky to follow what's going on when function definitions, function calls, and named parameters are mingled. At least regular JavaScript is syntactically simple, even if I do have to type function more often and worry about this.)

      [1] http://www.perlmonks.org/?node_id=663393
      [2] http://po-ru.com/diary/ruby-parsing-ambiguities/

    • stcredzeroMar 2017

      writing parsers is the least interesting part of an interpreter/compiler, and your grammar should be boring if you want your syntax to be easy to understand by humans.

      In my (admittedly limited) experience, most grammars for programming languages that are supposed to be easy on humans end up being harder to parse. (See below) One notable exception is, of course, Smalltalk.

      One criticism I have of this article, is that it is written in a way that obscures the fact a top-down parser is an LL(k) parser. I'd posit that sticking to an LL(1) grammar is a great way to wind up with a simpler syntax that lacks sticky syntactic sugar that will be hard to optimize and build software tool for later on. (AT least for your personal learning hobby project. But in that case, at least use a separate Lexer!)

      You can't introduce bullshit ambiguous extensions to your grammar

      Ruby: http://po-ru.com/diary/ruby-parsing-ambiguities/

    • xavdidAug 2026

      I would not personally sign onto (or put money) behind a DHH-run project because of his frankly abhorrent political views:

      - https://po-ru.com/2026/07/29/it-doesnt-matter-whether-matz-is-nice

      - https://blogs.gnome.org/alatiera/2025/11/06/dhh-and-omarchy-midlife-crisis/

    • edleaFeb 2012

      This is something that the BBC did with iPlayer: http://po-ru.com/diary/device-discrimination-on-the-internet/

      I've not quite worked out how to implement it though

    Related

    Rob Conerywekeroad.com125 people

    PostgreSQL Rising

    Rob Conery
    Personal · last shared 2014
    Zed Shawzedshaw.com280 people

    Dear Paul

    Zed Shaw
    Personal · last shared 2026
    Unlimited Noveltyunlimitednovelty.com42 people

    Node.js has jumped the shark

    Unlimited Novelty
    Personal · last shared 2023
    Closer to Codemensfeld.pl21 people

    Ruby concurrency is hard: how I became a Ruby on Rails contributor

    Closer to Code
    Personal · last shared 2026
    Rails at Scalerailsatscale.com59 people

    Tiny JITs for a Faster FFI

    Rails at Scale
    Company · last shared 2026
    Ryan Biggryanbigg.com35 people

    MacBook Pro Keyboard Drives Me Crazy

    Ryan Bigg
    Personal · last shared 2026
    Bob Nystromjournal.stuffwithstuff.com392 people

    The Hardest Program I've Ever Written – How a code formatter works (2015)

    Bob Nystrom
    Personal · last shared 2026
    PyPy Blogpypy.org183 people

    PyPy has moved to Git, GitHub

    PyPy Blog
    Company · last shared 2026