News for hackers. Stuff that matters.
Re:Grumpy: Go running Python by trotterdylan on Wednesday January 04, 2017 @01:01PM (#13320487)
I'm not philosophically opposed to supporting C extensions. The additional complexity just was not deemed to be warranted since the YouTube frontend doesn't use a lot of C extensions.

In principle it's possible to implement something like JyNI (http://jyni.org/) or CPyExt (https://morepypy.blogspot.de/2010/04/using-cpython-extension...) to bridge the CPython and Grumpy APIs. In practice, marshalling data across the interface can be very expensive.

Re:Grumpy: Go running Python by scrollaway on Wednesday January 04, 2017 @01:03PM (#13320514)
Out of curiosity, what C extensions does YouTube use?

If this is good enough to run YouTube's python code already it's honestly super impressive. Well done.

Re:Grumpy: Go running Python by trotterdylan on Wednesday January 04, 2017 @01:20PM (#13320661)
To be clear, Grumpy cannot yet run YouTube's Python codebase. There's still a lot of work to do on the standard library.

There are a handful of C extensions for JSON, protobufs, etc that YouTube uses, but mostly they're small utility functions written by us to optimize particularly hot code paths.

Re:Grumpy: Go running Python by driusan on Wednesday January 04, 2017 @01:51PM (#13320988)
Is the plan to use grumpc to transpile the code to Go and then work in Go in the future, or is the plan to keep coding in Python and add a grumpy step before deploying?

(If the former, you could just update the code to use the standard Go JSON/etc packages..)

Re:Grumpy: Go running Python by trotterdylan on Wednesday January 04, 2017 @02:56PM (#13321508)
The idea is to continue to write code in Python. The transpiled code is not suitable for working with directly. That said, there is the possibility of rewriting bits and pieces in Go (e.g. performance critical stuff) and then call into it from Python. Sort of a hybrid approach.
Re:Grumpy: Go running Python by statsmatscats on Wednesday January 04, 2017 @02:47PM (#13321427)
I"m also curious about this
Re:Grumpy: Go running Python by tym0 on Thursday January 05, 2017 @07:47AM (#13326676)
Will these be rewritten in go then?