4 ms·
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
by trotterdylan 10y ago
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/ http://jyni.org/) or CPyExt (https://morepypy.blogspot.de/2010/04/using-cpython-extension-modules-with.html 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.
- scrollaway 10y agoOut 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.
- trotterdylan 10y agoTo 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.
- driusan 10y agoIs 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..)
- statsmatscats 10y agoI"m also curious about this
- statsmatscats 10y agoI"m also curious about this
- trotterdylan 10y agoThe 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.
- tym0 10y agoWill these be rewritten in go then?