36 points · by pavehawk2007 · 6y ago · 35 comments
If you want to make a single long version of the page that includes all three parts, I'd be happy to arrange a repost. It would be best to email hn@ycombinator.com about it.
For those not aware of the bike shedding metaphor, it's the assertion that when discussing the design of a nuclear power plant, everyone will want to discuss the color of the shed where the workers store their bikes because they understand it. Meanwhile, nobody will want to discuss the nuclear reactor itself, because that's complicated and they don't really understand what's going on with it.
In compilers, parsing is the bike shed, and code emitters are the nuclear reactor. I've read probably hundreds of articles on "compilers" at this point, and they're all actually just about parsers. I can't point to a single one that actually emitted working assembly.
Congrats on at least having an emitter, but I'm still searching for an article that shows how to emit assembly of any kind.
My favorite was always context-sensitive, interprocedural points-to analysis. And dataflow analysis in the presence of higher-order controlflow constructs.
so instead of
self.emitter.emitLine("printf(\"" + self.curToken.text + "\\n\");")
you do something like self.emitter.emitLine("STRING DB " + self.curToken.text + "', '$'")
...
self.emitter.emitLine("LEA DX,STRING")
self.emitter.emitLine("MOV AH,09H")
self.emitter.emitLine("INT 21H")i know what the bike shedding metaphor is and frankly you're stretching it a bit because all this person is trying to do is educate and they're not even saying this is the only way to do it.
seems odd to pull out the bike shed metaphor for every case there's an abundance of technical articles on a subject matter. There's lots of tutorials on for loops in X language. Do you consider that bike shedding?
there are plenty of documentation in the form of tutorials on for nearly every aspect of every programming language I can think of. I think it's important to keep in mind that we all learn differently and sometimes one explanation can make no sense while another makes a lot of sense.
That said, I think I get your frustration in that sometimes the process of _finding_ the explanation that clicks for whatever your question is (how to emit assembler?) can be really painful because all the explanations are shallow.
However, I don't think it's fair to take that frustration out on the writers (I got the impression you were, but maybe you weren't and just felt like venting). I for one encourage engineers to write if no for no other reason than to better cement their own understanding.
I do wonder, though, if maybe there's some improvements we can make to how we filter / search for long-form technical articles outside of google so that the content is more relevant