Skip to content

Commit 998fef4

Browse files
committed
Update README - add tldr, simplify goals
1 parent 5148e1e commit 998fef4

File tree

1 file changed

+19
-8
lines changed

1 file changed

+19
-8
lines changed

README.md

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,28 @@
33
![Testing Suite](https://github.com/Kings-Distributed-Systems/PythonMonkey/actions/workflows/tests.yaml/badge.svg)
44

55
## About
6-
PythonMonkey is a Mozilla [SpiderMonkey](https://firefox-source-docs.mozilla.org/js/index.html) JavaScript engine embedded into the Python VM,
6+
[PythonMonkey](https://pythonmonkey.io) is a Mozilla [SpiderMonkey](https://firefox-source-docs.mozilla.org/js/index.html) JavaScript engine embedded into the Python VM,
77
using the Python engine to provide the JS host environment.
88

9-
This product is in an early stage, approximately 80% to MVP as of July 2023. It is under active development by Distributive Corp.,
10-
https://distributive.network/. External contributions and feedback are welcome and encouraged.
9+
This product is in an early stage, approximately 80% to MVP as of July 2023. It is under active development by [Distributive](https://distributive.network/).
10+
External contributions and feedback are welcome and encouraged.
1111

12-
The goal is to make writing code in either JS or Python a developer preference, with libraries commonly used in either language
13-
available eveywhere, with no significant data exchange or transformation penalties. For example, it should be possible to use NumPy
14-
methods from a JS library, or to refactor a slow "hot loop" written in Python to execute in JS instead, taking advantage of
15-
SpiderMonkey's JIT for near-native speed, rather than writing a C-language module for Python. At Distributive, we intend to use
16-
this package to execute our complex `dcp-client` library, which is written in JS and enables distributed computing on the web stack.
12+
### tl;dr
13+
```bash
14+
$ pip install pythonmonkey
15+
```
16+
```python
17+
from pythonmonkey import eval as js_eval
18+
19+
js_eval("console.log")('hello, world')
20+
```
21+
22+
### Goals
23+
- **Fast** and memory-efficient
24+
- Make writing code in either JS or Python a developer preference
25+
- Use JavaScript libraries from Python
26+
- Use Python libraries from JavaScript
27+
- Same process runs both JS and Python VMs - no serialization, pipes, etc
1728

1829
### Data Interchange
1930
- Strings share immutable backing stores whenever possible (when allocating engine choses UCS-2 or Latin-1 internal string representation) to keep memory consumption under control, and to make it possible to move very large strings between JS and Python library code without memory-copy overhead.

0 commit comments

Comments
 (0)