The definition of "passable compiler" in 1992 must have been very different from what it is today; while third year students write interpreters and compilers, nobody would call them useful or passable.
My 1992 view of the problems of computer programming in 1992
21–30 of 56 posts
Re: My 1992 view of the problems of computer programming in 1992
#22How did we get so much better at writing compilers? Was it a better understanding of how to make syntax trees with ADTs etc?
I think significant improvements are - not writing compilers in assembly - not requiring overlays - knowing how previous compilers produced fast code (Web search doesn’t give me conclusive answers, but that Fortran compiler may have been the first to do loop unrolling and common subexpression elimination) - having way more memory, CPU and disk available - possibly: spending less time looking at optimizations. I expec…
>> - not writing compilers in assembly
Sure, but you still generate the machine code, right? You still have to master the instructions and their specifics of the target CPUs.
Re: My 1992 view of the problems of computer programming in 1992
#23Earlier quoted context omitted.
I think significant improvements are - not writing compilers in assembly - not requiring overlays - knowing how previous compilers produced fast code (Web search doesn’t give me conclusive answers, but that Fortran compiler may have been the first to do loop unrolling and common subexpression elimination) - having way more memory, CPU and disk available - possibly: spending less time looking at optimizations. I expec…
Writing an optimizing production ready compiler doesn't seem to be an easy task, even today. I mean you can fork a compiler or look at the code, but maintaining your own one alone doesn't seem to be realistic. >> - not writing compilers in assembly Sure, but you still generate the machine code, right? You still have to master the instructions and their specifics of the target CPUs.
You do, but self-hosted compilers tend to have two huge benefits:
1) they tend to be easier to reason about, being written in a high-level language
2) they exercise the code, and usually even seldom-used parts of the code, to make problems more noticeable
Re: My 1992 view of the problems of computer programming in 1992
#24Earlier quoted context omitted.
Writing an optimizing production ready compiler doesn't seem to be an easy task, even today. I mean you can fork a compiler or look at the code, but maintaining your own one alone doesn't seem to be realistic. >> - not writing compilers in assembly Sure, but you still generate the machine code, right? You still have to master the instructions and their specifics of the target CPUs.
> Sure, but you still generate the machine code, right? You still have to master the instructions and their specifics of the target CPUs. You do, but self-hosted compilers tend to have two huge benefits: 1) they tend to be easier to reason about, being written in a high-level language 2) they exercise the code, and usually even seldom-used parts of the code, to make problems more noticeable
Re: My 1992 view of the problems of computer programming in 1992
#25The definition of "passable compiler" in 1992 must have been very different from what it is today; while third year students write interpreters and compilers, nobody would call them useful or passable.
Languages were simpler (except for certain ones, like C++ which was a beast even in 1992), and incredibly complex and magical optimizers weren’t yet a thing, never mind a feature expected of a "passable" compiler. One could still write a reasonable non-optimizing Pascal or C89 compiler in a weekend more or less, and it would be both faster to write (thanks to more expressive languages) and faster at compiling (thanks…
Re: My 1992 view of the problems of computer programming in 1992
#26Nowadays it's all about optimizing the same old algorithms but on a GPU.
Re: My 1992 view of the problems of computer programming in 1992
#27How did we get so much better at writing compilers? Was it a better understanding of how to make syntax trees with ADTs etc?
I was just doing some research and apparently all of this stuff was invented around the late 60s and so in the 70s it was still new and by the 90s it was standard practice. The dragon book came out in 1986 and spelled it all out in one place.
Today we have the benefit of knowing the right ideas to use from the start and confidence that if you follow the formula it will all work out.
Re: My 1992 view of the problems of computer programming in 1992
#28How did we get so much better at writing compilers? Was it a better understanding of how to make syntax trees with ADTs etc?
There is a second shift that occurs around 2000-2005-ish, which is the transition of optimizing compilers from an instruction-based semantics to a more value-based semantics, in that modern optimizers make no real attempt or guarantee to preserve the structure of code. For example, an if statement may happily be converted into an expression lacking an if entirely.
Re: My 1992 view of the problems of computer programming in 1992
#29I never hear anyone talk about big-O notation anymore ... Nowadays it's all about optimizing the same old algorithms but on a GPU.
Re: My 1992 view of the problems of computer programming in 1992
#30I think this is still true today. Software is only just starting and there is a lot of room to find better ways of doing things.