Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
grumpy
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
grumpy
Commits
cc56ad21
Commit
cc56ad21
authored
Mar 28, 2017
by
Dylan Trotter
Committed by
GitHub
Mar 28, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update README.md
parent
91ffc9fd
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
18 deletions
+23
-18
README.md
README.md
+23
-18
No files found.
README.md
View file @
cc56ad21
...
...
@@ -10,8 +10,8 @@ to be a near drop-in replacement for CPython 2.7. The key difference is that it
compiles Python source code to Go source code which is then compiled to native
code, rather than to bytecode. This means that Grumpy has no VM. The compiled Go
source code is a series of calls to the Grumpy runtime, a Go library serving a
similar purpose to the Python C API (although the
C API is not directly
supported
).
similar purpose to the Python C API (although the
API is incompatible with
CPython's
).
## Limitations
...
...
@@ -34,26 +34,26 @@ supported).
There are three basic categories of incomplete functionality:
1.
Language features: Most language features are implemented with the notable
exception of decorators. There are also a handful of operators that aren't
yet supported.
1.
[
Language features
](
https://github.com/google/grumpy/wiki/Missing-features#language-features
)
:
Most language features are implemented with the notable exception of
[
old-style classes
](
http://stackoverflow.com/questions/54867/what-is-the-difference-between-old-style-and-new-style-classes-in-python
)
.
There are also a handful of operators that aren't yet supported.
2.
Builtin functions and types: There are a number of missing functions and
types in
`__builtins__`
that have not yet been implemented. There are also a
lot of methods on builtin types that are missing.
2.
[
Builtin functions and types
](
https://github.com/google/grumpy/wiki/Missing-features#builtins
)
:
There are a number of missing functions and types in
`__builtins__`
that have
not yet been implemented. There are also a lot of methods on builtin types
that are missing.
3.
Standard library: The Python standard library is very large and much of it
is pure Python, so as the language features and builtins get filled out, many
modules will just work. But there are also a number of libraries in CPython
that are C extension modules which will need to be rewritten.
3.
[
Standard library
](
https://github.com/google/grumpy/wiki/Missing-features#standard-libraries
)
:
The Python standard library is very large and much of it is pure Python, so
as the language features and builtins get filled out, many modules will
just work. But there are also a number of libraries in CPython that are C
extension modules which will need to be rewritten.
4.
C locale support: Go doesn't support locales in the same way that C does. As such,
some functionality that is locale-dependent may not currently work the same as in
CPython.
To see the status of a particular feature or standard library module, click
[
here
](
https://github.com/google/grumpy/wiki/Missing-Features
)
.
## Running Grumpy Programs
### Method 1: grumprun:
...
...
@@ -104,7 +104,8 @@ writing, you may need to change one or more of these.
Grumpy converts Python programs into Go programs and
`grumpc`
is the tool
responsible for parsing Python code and generating Go code from it.
`grumpc`
is
written in Python and uses the
`ast`
module to accomplish parsing.
written in Python and uses the
[
`pythonparser`
](
https://github.com/m-labs/pythonparser
)
module to accomplish parsing.
The grumpc script itself lives at
`tools/grumpc`
. It is supported by a number of
Python modules in the
`compiler`
subdir.
...
...
@@ -123,7 +124,7 @@ counterparts in CPython.
Much of the Python standard library is written in Python and thus "just works"
in Grumpy. These parts of the standard library are copied from CPython 2.7
(possibly with light modifications). For licensing reasons, these files are kept
in the
`third_party
/stdlib
`
subdir.
in the
`third_party`
subdir.
The parts of the standard library that cannot be written in pure Python, e.g.
file and directory operations, are kept in the
`lib`
subdir. In CPython these
...
...
@@ -136,9 +137,13 @@ available in Python.
-
`compiler`
: Python package implementating Python -> Go transcompilation logic.
-
`lib`
: Grumpy-specific Python standard library implementation.
-
`runtime`
: Go source code for the Grumpy runtime library.
-
`third_party/ouroboros`
: Pure Python standard libraries copied from the
[
Ouroboros project
](
https://github.com/pybee/ouroboros
)
.
-
`third_party/pypy`
: Pure Python standard libraries copied from PyPy.
-
`third_party/stdlib`
: Pure Python standard libraries copied from CPython.
-
`tools`
: Transcompilation and utility binaries.
## Contact
Questions? Comments? Drop us a line at
[
grumpy-users@googlegroups.com
](
https://groups.google.com/forum/#!forum/grumpy-users
)
.
Questions? Comments? Drop us a line at
[
grumpy-users@googlegroups.com
](
https://groups.google.com/forum/#!forum/grumpy-users
)
or join our
[
Gitter channel
](
https://gitter.im/grumpy-devel/Lobby
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment