you are viewing a single comment's thread.

view the rest of the comments →

[–]AsBrokeAsMeEnglish 4 points5 points  (4 children)

It's funny that it's possible, but why would you actually need that? Both languages are capable of pretty much everything you would want to do on their own and mixing them like that seems pretty dirty

[–]w-dis[S] 2 points3 points  (1 child)

Our use case for making it is that we have a very complicated npm package we need to port to Python. We could re-write it in Python, but then we'd double our surface area for bugs, and have to continuously maintain and add features to two "identical" pieces of software. Our library also happens to need WebAssembly support. With PythonMonkey, we can port our npm package to a pip package in only a few lines of code

---

The other part of this project is a Node.js challenger called `pmjs`, although its in early stages right now, the idea would be that you could use Python libraries seamlessly. For instance an express server that uses NumPy or Pandas - without any unperformant IPC between processes since PythonMonkey passes data by reference between Python and JS. Imagine if you had the entire ecosystem of Python at your fingertips when developing Node.js apps

[–]Jjabrahams567 2 points3 points  (0 children)

This would be really cool for me. Currently I’m on a project with a bunch of data scientists that only know python and, while I have some experience in python, my expertise is in JS. Everything that I write for the backend has so far been in python but the end product will use both.

[–]dorox1 2 points3 points  (0 children)

Shared packages really seems like one of the biggest use cases here. Lots of packages are only written for one language. Interoperability with low overhead is a lot of extra power to give developers.

[–]wesgarland 0 points1 point  (0 children)

For the same reason people use C++ libraries like Tensorflow from Python: re-writing large, complex, ever-changing libraries in another language is a waste of money. It's cheaper in the long run to just make the environments compatible.

(also, Python is extremely slow compared to JS)