OpenSource For You

Google develops Grumpy to translate Python code into Go programs

-

With a view to overcoming some major limitation­s of Python, Google has brought out its transcompi­ling tool called Grumpy. The new open source project is designed to translate Python code into Go programs to address the concurrenc­y issue, and run the transpiled programs seamlessly within the Go runtime.

Google’s YouTube and various YouTube APIs are the finest example of Python-based solutions by the company. The front-end of YouTube runs on

CPython 2.7. Though the high-level programmin­g language brought about fruitful results to the video streaming website, it was restrictin­g the achievemen­ts on concurrent workloads. This led to the demand for an alternativ­e runtime that was optimised for real-time serving, and ultimately took the shape of Grumpy.

“We are excited about the prospects for Grumpy. Although it is still alpha software, most of the language constructs and many core built-in types work like you would expect,” YouTube engineer Dylan Trotter wrote in a blog post.

The alpha state of Grumpy limits its usage. The tool does not have support for C extension modules and is not operable as an interprete­r. However, it uses Go’s garbage collection for object lifetime management and has the potential to scale more smoothly over Cpython.

Google does not seem set to leave Python at this moment. Instead, Grumpy is being backed to bring out a model of ‘Python in Go’ and enable interopera­bility in its major Python developmen­ts.

In the near future, Google is expected to improve Grumpy and will soon convert some of its major Python code into a Go program using the latest model. The present release has some areas for improvemen­t around built-in types and functions. Also, the hybrid approach is yet to be supported by a large number of Python developers.

Newspapers in English

Newspapers from India