This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Speed hasn't been a goal of the conversions however it runs pystone at
about 20% of the speed of cpython. The pi test runs quicker under
gpython as I think the Go long integer primitives are faster than the
about 20% of the speed of CPython. A [π computation test](https://github.com/go-python/gpython/tree/master/examples/pi_chudnovsky_bs.py) runs quicker under
gpython as the Go long integer primitives are likely faster than the
Python ones.
There are many directions this project could go in. I think the most
profitable would be to re-use the
[grumpy](https://github.com/grumpyhome/grumpy) runtime (which would mean
changing the object model). This would give access to the C modules
that need to be ported and would give grumpy access to a compiler and
interpreter (gpython does support `eval` for instance).
@ncw started gpython in 2013 and work on is sporadic. If you or someone
you know would be interested to take it futher, it would be much appreciated.
## Getting Started
I (@ncw) haven't had much time to work on gpython (I started it in
2013 and have worked on it very sporadically) so someone who wants to
take it in the next direction would be much appreciated.
The [embedding example](https://github.com/go-python/gpython/tree/master/examples/embedding) demonstrates how to
easily embed and invoke gpython from any Go application.
## Limitations and Bugs
Of interest, gpython is able to run multiple interpreter instances simultaneously,
allowing you to embed gpython naturally into your Go application. This makes it
possible to use gpython in a server situation where complete interpreter
independence is paramount. See this in action in the [multi-context example](https://github.com/go-python/gpython/tree/master/examples/multi-context).
If you are looking to get involved, a light and easy place to start is adding more convenience functions to [py/util.go](https://github.com/go-python/gpython/tree/master/py/util.go). See [notes.txt](https://github.com/go-python/gpython/blob/master/notes.txt) for bigger ideas.
Lots!
## Similar projects
## Other Projects of Interest
* [grumpy](https://github.com/grumpyhome/grumpy) - a python to go transpiler
Expand All
@@ -86,5 +87,5 @@ or on the [Gophers Slack](https://gophers.slack.com/) in the `#go-python` channe
## License
This is licensed under the MIT licence, however it contains code which
was ported fairly directly directly from the cpython source code under
was ported fairly directly directly from the CPython source code under
the [PSF LICENSE](https://github.com/python/cpython/blob/master/LICENSE).
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
updated README #160
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uh oh!
There was an error while loading. Please reload this page.
updated README #160
Filter by extension
Viewed files
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
There are no files selected for viewing