"How to sell a rewrite of your compiler that made it slower"
Not really. https://talks.golang.org/2015/state-of-go-may.slide#11
Go in Go
121–130 of 156 posts
Re: Go in Go
#122Re: Go in Go
#123Sorry for the noob question, but could someone help me understand how this is (conceptual) possible? I get that you can write a program which compiles language X to machine code, e.g. how python interpreting Go to write the assembly necessary would be technically possible. My question is, how is the compiler generated? If it's written in c, gcc -o compiler, but what is the piece I'm missing when it comes to Go compil…
The bootstrapping process can therefore take advantage of the fact that go1.4 will continue to build as it does today, and use that to get a working go installation to build go1.5+.
Re: Go in Go
#124Earlier quoted context omitted.
I never understood this sentiment. C isn't assembly exactly because there isn't necessarily a direct correlation between the instructions the programmer writes and the resulting machine code. To me, this is as contrived as the idea that Javascript is "LISP in Java's clothing" In what possible sense can it be described as an assembler?
> because there isn't necessarily a direct correlation between the instructions the programmer writes and the resulting machine code If there was, then it wouldn't be "portable"
Re: Go in Go
#125Sorry for the noob question, but could someone help me understand how this is (conceptual) possible? I get that you can write a program which compiles language X to machine code, e.g. how python interpreting Go to write the assembly necessary would be technically possible. My question is, how is the compiler generated? If it's written in c, gcc -o compiler, but what is the piece I'm missing when it comes to Go compil…
Simple, you need a working version of go1.4 to compile go1.5. The bootstrapping process can therefore take advantage of the fact that go1.4 will continue to build as it does today, and use that to get a working go installation to build go1.5+.
Re: Go in Go
#126There is no slide about writing the GC in Go. How do you write a GC in a GC'd language?
For example, Pre-Scheme and RPython.
http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.3.40...
Re: Go in Go
#127Earlier quoted context omitted.
Well, C is essentially "portable assembly", so it's to be expected...
I never understood this sentiment. C isn't assembly exactly because there isn't necessarily a direct correlation between the instructions the programmer writes and the resulting machine code. To me, this is as contrived as the idea that Javascript is "LISP in Java's clothing" In what possible sense can it be described as an assembler?
Only when I’m writing very performance-sensitive code do I actually think “here’s a branch, there’s a load, yonder is a divide”. Most of the time it’s “eh, compiler’ll get it”.
Re: Go in Go
#128Earlier quoted context omitted.
Well, C is essentially "portable assembly", so it's to be expected...
I never understood this sentiment. C isn't assembly exactly because there isn't necessarily a direct correlation between the instructions the programmer writes and the resulting machine code. To me, this is as contrived as the idea that Javascript is "LISP in Java's clothing" In what possible sense can it be described as an assembler?
For example, you wouldn't want to implement a garbage collector in a garbage collected language; C won't get in your way.
This is also why there are loads of C libraries out there: they can be used with bindings from essentially any other language, which is generally not true for libraries implemented in non-C languages (in particular, C++).
Re: Go in Go
#129Sorry for the noob question, but could someone help me understand how this is (conceptual) possible? I get that you can write a program which compiles language X to machine code, e.g. how python interpreting Go to write the assembly necessary would be technically possible. My question is, how is the compiler generated? If it's written in c, gcc -o compiler, but what is the piece I'm missing when it comes to Go compil…
Instead, any Linux distribution etc. that wants to integrate the language into its build system has to start by importing a binary from somewhere else. In general this isn't a problem, because that binary is used only to compile the compiler from source (and then that compiler recompiles itself, usually), so any bugs in it are unlikely to affect the final product. However, the topic tends to come up of Ken Thompson's famous paper [2] describing a hypothetical scenario where a compiler binary is intentionally backdoored to insert a vulnerability when it's compiling some security-critical program, plus a copy of the same backdoor whenever it detects it's compiling itself. In that case, the backdoor could theoretically infect the final result of a bootstrap, despite it being compiled from pristine source; no attack of that nature has ever been detected in the wild, though.
[1] https://docs.google.com/document/d/1OaatvGhEAq7VseQ9kkavxKNA...
[2] https://www.ece.cmu.edu/~ganger/712.fall02/papers/p761-thomp...
Re: Go in Go
#130Earlier quoted context omitted.
I never understood this sentiment. C isn't assembly exactly because there isn't necessarily a direct correlation between the instructions the programmer writes and the resulting machine code. To me, this is as contrived as the idea that Javascript is "LISP in Java's clothing" In what possible sense can it be described as an assembler?
There is very little difference to the machine code (traditionally, before CPUs got so complex)