News for hackers. Stuff that matters.
Re:Grumpy: Go running Python by jerf on Wednesday January 04, 2017 @12:36PM (#13320248)
Ask yourself how much Python code you think Google has. Then multiply it by some large single-digit number, minimum. Then compare the effort of spending 30 seconds per line on that code vs. writing a new Python interpreter/compiler/runtime, especially when you can trivially get people who are capable of doing that.

There's a reason why the large companies often end up working on new runtimes/interpreters/compilers like HipHop for PHP, Hack, and so on, rather than working on the code bases written in those languages. It is very easy for it to not just be easier to leverage in at that level, but an order of magnitude or two easier. Or three.

Re:Grumpy: Go running Python by weberc2 on Wednesday January 04, 2017 @05:07PM (#13322557)
It's interesting to think of the dynamics of developing an application (presumably) many times more complex than its host language. At a certain point, changing the language implementation becomes cheaper than making sweeping changes to the application.
Re:Grumpy: Go running Python by throwaway9912 on Wednesday January 04, 2017 @02:26PM (#13321249)
I don't know PHP, but in the case of Python you will spend the next ten years ironing out subtle incompatibilities between CPython and this new thing.

Added up, it is easily more than 30s per line.

Re:Grumpy: Go running Python by jerf on Wednesday January 04, 2017 @03:11PM (#13321625)
"Added up, it is easily more than 30s per line."

30s per line of current Python code, not compiler code.

And I'm just providing a number to put some numbers out there. 30s/line to convert a Python program to something fundamentally different like Go is probably an underestimate, yes, but then, if it's an underestimate that means the budget for the Python reimplementation is that much larger.

It also really helps the "subtle issues" when you control both the implementation and the code running on it; it means for every subtle issue discovered you have the option of either fixing the implementation or fixing the original code not to tickle the corner case. It's much harder when you only control one side or the other. It's not Google that will be having massive problems with corner cases.

Re:Grumpy: Go running Python by falcolas on Wednesday January 04, 2017 @01:06PM (#13320534)
I wouldn't think that a tool for transpiling Python to Go would be harder than creating a whole new runtime. Most of the work is already done; you can get the compiled ASTs directly out of Python itself.

Of course, if it started out as a "this seems like a cool project", that skews the "a is more efficient than b" ratio significantly.

Re:Grumpy: Go running Python by jerf on Wednesday January 04, 2017 @01:14PM (#13320613)
Sorry, I think my post may have been excessively specific; I've edited it to say "writing a new Python interpreter/compiler/runtime" instead of just "writing a new Python interpreter". I was trying to make a generic point, not one specifically about a Python interpreter. (At least, if I'm interpreting your reply correctly.)
Re:Grumpy: Go running Python by throwaway91111 on Wednesday January 04, 2017 @01:47PM (#13320942)
I mean, you can get something out of transpilers--not typically maintainable code.