Top all-time · #2119
Bryan Ford's Home Page
Personal blog · bford.infoprogrammingsecurity
Bryan Ford's Home Page is a personal blog at bford.info about programming and security. Since 2010, 38 different Hacker News readers have linked it 46 times, most often “Cache Directory Tagging Specification (2004)”. It is still writing: the last post was on 2026-10-25, and you can follow it by feed.
Most-linked posts?
- Cache Directory Tagging Specification (2004)10 people · 10 mentions · first linked 2021-01-31
- Peer-to-Peer Communication Across Network Address Translators5 people · 6 mentions · first linked 2019-06-25
- Packrat Parsing and Parsing Expression Grammars5 people · 5 mentions · first linked 2014-10-25
- The Packrat Parsing and Parsing Expression Grammars Page2 people · 4 mentions · first linked 2019-09-01
- Microkernels Meet Recursive Virtual Machines (2007) [pdf]2 people · 2 mentions · first linked 2024-05-09
- /pub/lang/peg/2 people · 2 mentions · first linked 2023-10-31
- /pub/lang/peg.pdf2 people · 2 mentions · first linked 2022-07-31
- MinML: Concise but General Markup Syntax2 people · 2 mentions · first linked 2022-12-29
- State of P2P communications across NATs (2008)2 people · 2 mentions · first linked 2022-05-06
- Rationality Is Self-Defeating in Permissionless Systems2 people · 2 mentions · first linked 2019-09-24
What Hacker News says?
This is a really well written write-up, but I do want to point out that NAT traversal like this is not a new idea at all and this is by no means the first such write-up. Here is one from 2014: https://www.zerotier.com/2014/08/25/the-state-of-nat-travers... Here's an earlier one from what seems to be the late 2000s: https://bford.info/pub/net/p2pnat/ Here's an RFC from 2010 describing not only NAT traversal but a pro…
Comment linking /pub/net/p2pnat/
on “How NAT traversal works (2020)”Submitted The Packrat Parsing and Parsing Expression Grammars Page as a story · 47 points
HN discussionthis seems to be how PEG parsing became popular during the last couple of decades, for example; see https://bford.info/pub/lang/peg/ (peg.pdf p11: "This work is inspired by and heavily based on Birman’s TS/TDPL and gTS/GTDPL systems [from the 1970s ...] Unfortunately it appears TDPL and GTDPL have not seen much practical use, perhaps in large measure because they were originally developed and presented as formal mod…
Comment linking /pub/lang/peg/
on “Zen 5's 2-ahead branch predictor: how a 30 year old idea allows for new tricks”Submitted Cache Directory Tagging Specification (2004) as a story · 21 points
HN discussion> PEGs are ambiguous You're misunderstanding the rhetoric there - they're unambiguous by construction because they deterministically resolve earliest-match-first - a well-defined rule. It's impossible to write an ambiguous PEG. Any grammar you write in a PEG is never ambiguous. A grammar you write using a CFG can be ambiguous. As your own link says "Unlike CFGs, PEGs cannot be ambiguous". Or read Ford's original pap…
Comment linking /pub/lang/peg.pdf
on “Carbon’s most exciting feature is its calling convention”Submitted Packrat Parsing and Parsing Expression Grammars as a story · 18 points
HN discussion> Implementing UPnP and NAT punching is trivial It's possible if and only if you have control of the router. Good luck doing that when it's your ISP doing CGNAT. This is already impossible in some areas (e.g. parts of China) that are behind multiple (5+) layers of NAT. This isn't a theoretical concern; there are already many places on the IPv4 network that cannot get any kind of port forwarding (including UPnP). Als…
Comment linking /pub/net/p2pnat/
on “Allow 0.0.0.0/8 as a valid address range”Submitted Peer-to-Peer Communication Across Network Address Translators as a story · 7 points
HN discussionThis is for building a compiler for the language tiny: http://thinkingeek.com/gcc-tiny/ Otherwise, get your hands dirty with a parser generator(PEG parser generators[1] tend to be fairly forgiving). It is pretty easy to get started making an interpreter that way, and it is quick to prototype with. [1]: http://bford.info/packrat/
Comment linking /packrat/
on “Ask HN: Resources for building a programming language?”Submitted Microkernels Meet Recursive Virtual Machines (2007) [pdf] as a story · 5 points
HN discussionThat's generally what the Cache Directory Specification attempts to cover: https://bford.info/cachedir/ Lots of things like the Rust tool chain now create the CACHEDIR.TAG files so that backup tools can ignore that part of the hierarchy. Alas, I believe the rsync folks refuse to implement it.
Comment linking /cachedir/
on “Show HN: I made an SSH tunnel manager to learn Go”Submitted The Packrat Parsing and Parsing Expression Grammars Page as a story · 4 points
HN discussionAs far as backup is concerned, a well-supported (by Borg, restic, and others) way of excluding directories is by putting a file that conforms to the CACHEDIR.TAG standard. https://bford.info/cachedir/
Comment linking /cachedir/
on “RFC 8959: The “secret-token” URI Scheme”Submitted Microkernels Meet Recursive Virtual Machines (2007) [pdf] as a story · 3 points
HN discussionNatural follow up question - does NAT traversal actually work? I've tried to replicate the NAT traversal paper[1] a couple of times in python, but it never really got it to work. Maybe my ISP's network topology just inlcudes multiple NATs which is messing things up. [1] https://bford.info/pub/net/p2pnat/
Comment linking /pub/net/p2pnat/
on “How NAT Traversal Works”Submitted State of P2P communications across NATs (2008) as a story · 3 points
HN discussion> Packrat isn't really a parsing algorithm - the PEG is the parsing algorithm. The way I've seen it presented, PEG is primarily a style of grammar (basically, prioritized choice instead of normal alternation) and Packrat is a parsing algorithm. http://bford.info/packrat/
Comment linking /packrat/
on “PEG Parsers”Submitted Rationality Is Self-Defeating in Permissionless Systems as a story · 3 points
HN discussionBryan Ford has the most comprehensive information about PEG and how they're parsed http://bford.info/packrat/ . They've become somewhat unfashionable over the last decade - not really sure why.
Comment linking /packrat/
on “PEG Parsers”Submitted Peer-to-Peer Communication Across Network Address Translators as a story · 2 points
HN discussion"Parsing expression grammars (PEGs) are an alternative to context free grammars for formally specifying syntax" [1] Basically, you have tools for context free grammars such as GNU Bison or Yacc. This is an alternative, but with PEG. For more in-depth info, there's the original PEG paper. [2] [1]: http://bford.info/packrat [2]: http://bford.info/pub/lang/peg
Comment linking /pub/lang/peg
on “Show HN: Pest – Fast parser generator written in Rust”Submitted Cache Directory Tagging Specification (2004) as a story · 2 points
HN discussionI worked this out by hand and I'd recommend you do the same. The paper defining the behavior of PEGs is here: https://bford.info/pub/lang/peg.pdf . Section 3.3 is the relevant one, defining all the parsing rules. As for the simple explanation of what's going wrong: 1. We try to parse `aaaaa` as if it opened with the pattern `a STR a`. [And, with foresight, let's observe that this is true of the way we want the parse…
Comment linking /pub/lang/peg.pdf
on “Use context-free grammars instead of parser combinators and PEG”Submitted Cryptocurrency's root engineering problem: Rationality and small game fallacy as a story · 2 points
HN discussionBoth are based in Bryan Ford's packrat (PEG is Ford's too). OMeta is more like PEGTL in that it's a set of facilities/library at a highish level, more than a particular grammar system (they're all packrat parsers). http://bford.info/packrat/ It's all about descent parsing and memoisation (thus the name).
Comment linking /packrat/
on “Parsing: The Solved Problem That Isn't (2011)”Submitted The Packrat Parsing and Parsing Expression Grammars Page as a story · 2 points
HN discussionThere's a really good VM-based PEG parsing system called LPEG ( http://www.inf.puc-rio.br/~roberto/lpeg/lpeg.html ). Paper: http://www.inf.puc-rio.br/~roberto/docs/peg.pdf It's for Lua, but there isn't anything in the VM design that requires Lua per se - porting it to another language's C API wouldn't be difficult. In my experience, LPEG has been quite easy to use for the sort of tasks one would normally apply regul…
Comment linking /pub/lang/peg.pdf
on “PEG.js - parser generator for JavaScript”Submitted Packrat Parsing and Parsing Expression Grammars as a story · 2 points
HN discussionHere's a couple of papers describing metadata resistant anonymity systems that may help you understand how "chaff" traffic can help obfuscate real traffic. It's not as simple as generating random noise because real traffic patterns can be identified with confirmation or intersection attacks. Aqua: http://conferences.sigcomm.org/sigcomm/2013/papers/sigcomm/p... Dissent: http://bford.info/pub/net/panopticon-cacm.pdf O…
Comment linking /pub/net/panopticon-cacm.pdf
on “Ask HN: Generate random traffic for metadata obfuscation?”Submitted Parsing Expression Grammars: A Recognition-Based Syntactic Foundation (2004) as a story · 2 points
HN discussion