Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
T
typon
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
Tom Niget
typon
Commits
7812d2de
Commit
7812d2de
authored
Jul 12, 2022
by
Xavier Thompson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve README.md
parent
2f730962
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
96 additions
and
0 deletions
+96
-0
README.md
README.md
+96
-0
No files found.
README.md
View file @
7812d2de
# (*Working Title*) Typon
# (*Working Title*) Typon
Typon is a three-part project to bring practical GIL-free concurrency to Python:
1.
(
*in progress*
)
[
`typon/rt`
](
#typonrt-a-concurrency-runtime
)
, a C++ concurrency runtime
2.
(
*not started*
)
[
`typon/compiler`
](
#typoncompiler-a-python-to-c-compiler
)
, a compiler from Python syntax into C++
3.
(
*not started*
)
[
`typon/bindings`
](
#typonbindings-pythonc-bindings-for-typon
)
, C++/Python bindings for interoperability with actual Python
## `typon/rt`, A Concurrency Runtime
## `typon/rt`, A Concurrency Runtime
...
@@ -140,3 +145,94 @@ See `rt/examples` for hints.
...
@@ -140,3 +145,94 @@ See `rt/examples` for hints.
2021.
Nowa: a wait-free continuation-stealing concurrency platform.
2021.
Nowa: a wait-free continuation-stealing concurrency platform.
https://www4.cs.fau.de/Publications/2021/schmaus2021nowa.pdf
https://www4.cs.fau.de/Publications/2021/schmaus2021nowa.pdf
## `typon/compiler`, A Python to C++ compiler
### Status
This part has not been started yet.
### Driving Idea
Several projects show that it is quite feasible to use Python's
`ast`
module
to write compilers that take Python syntax as input language. The abstract
syntax tree can then be used to generate C++ output code. The compiler may
freely reinterpret the input syntax and give it different semantic meanings
than in the original Python. As such it is a basis to create an independent
language with a Python-compatible syntax.
In particular such a compiler may use Python's
`type hints`
syntax for type
annotations to introduce static typing in the language and generate required
typing annotations in the C++ output.
### References
##### Language Design
-
Abilian's
[
design note on syntax for a Python-derived language
](
https://github.com/abilian/cythonplus-sandbox/blob/devel/sandbox/comparison.md
)
##### Technical References
-
Python's
[
`ast` module
](
https://docs.python.org/3/library/ast.html
)
-
[
PEP 484 - Type Hints
](
https://peps.python.org/pep-0484/
)
-
[
PEP 526 – Syntax for Variable Annotations
](
https://peps.python.org/pep-0526/
)
##### Related Works
-
Lukas Martinelli's
[
`py14` project
](
https://github.com/lukasmartinelli/py14
)
-
[
The `py2many` project
](
https://github.com/py2many/py2many
)
-
[
`mypyc`
](
https://github.com/mypyc/mypyc
)
-
[
`mycpp`, a Python to C++ translator
](
https://www.oilshell.org/blog/2022/05/mycpp.html
)
## `typon/bindings`, Python/C++ bindings for Typon
### Status
This part has not been started yet.
### Driving Idea
The previous part
`typon/compiler`
, aims to produce a language that takes
Python syntax as input, but is otherwise completely independent of Python.
Using Python/C++ bindings, this language can be made to be interoperable
with true Python, allowing it to be called from standard Python and to call
standard Python code.
Using the first part
`typon/rt`
, concurrent code may acquire the Python GIL
asynchronously so as not to block the underlying worker thread, in order to
safely call standard Python code.
### References
##### Technical References
-
[
The Python Global Interpreter Lock
](
https://wiki.python.org/moin/GlobalInterpreterLock
)
##### Related Works
-
[
`nanobind`, a C++17/Python bindings library
](
https://github.com/wjakob/nanobind
)
-
[
`pybind11`, a C++11/Python bindings library
](
https://github.com/pybind/pybind11
)
-
[
Cython
](
https://cython.org/
)
-
[
The Cython+ project
](
https://www.cython.plus/
)
-
[
`mypyc`
](
https://github.com/mypyc/mypyc
)
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