cespare
Joined 13 years ago
Joined 13 years ago
> Instead, we use ANTLR, a state-of-the-art, open source parser generator.
I don't agree with this (pre-AI-coding) take. Hand-rolled parsers are much easier to write well and maintain than people think. They also tend to be much faster and produce much better errors than parser generators. I guess if the language you're trying to parse is, say, C++, then you're going to have a miserable time (probably no matter what). But an SQL parser is very doable. (I say this as the author and maintainer of an in-house SQL dialect thingy at work.)
What makes building and maintaining a hand-written parser such a tractable task is:
- The code size can be large, but you can start with a core of a few well-chosen abstractions and then you add lots of parsing code for various language constructs but it's all kind of orthogonal and doesn't add compounding complexity as you go. - It's just about the most testable kind of code there is. You can cover all the various corner cases with tests and really lock in the behavior so that you can very confidently make changes. One approach I like is to make zillions of tiny test files in the target language accompanied by some golden representation of the AST.
And of course, as the author found out, these properties make writing a parser a really good task for AI coding, too. These tools are very, very good at generating a bunch of new code based on existing abstractions and covering it with lots of test cases.
So I agree with where they ended up, just not where they started :)
I'm going to place the blame on the party committing the crimes, not the person exercising free expression.
No. We need spam filters for this stuff. If it isn't obvious to you yet, it will be soon. (Or else you're one of the spammers.)
They are:
470k feet is 143 km. The altitude record for an air-breathing aircraft is 38 km. There are some very low earth orbit satellites that orbit in the sub-200 km range (https://en.wikipedia.org/wiki/Very_low_Earth_orbit). The ISS orbits at about 400 km and typical LEO is 800 km. ICBMs have an apogee altitude of 1000 km or more.
(Of course, the energy required to get up to some altitude is only a small fraction of the energy required to get into orbit at that altitude. https://what-if.xkcd.com/58/ is a relevant read.)
The alternative requires a scenario where waymo is especially likely to get into fatal accidents while being very good at avoiding non-fatal ones, right? Seems far-fetched.