Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

This is a laudable effort, but I'm not a fan of shipping the entire interpreter. I looked around a few weeks ago and found https://transcrypt.org, which compiles your Python script to JS, so size is minimal.

It's great for shipping small, internal tools/apps, I love how maintainable they are by all the Python devs, plus they're very fast to load and execute.



I agree. I've been using Transcrypt to create React applications using Python. It allows you to take advantage of existing JS libraries and bundlers but still code in Python. I have to say, it has been really nice not having to switch languages between front-end and back-end on a fullstack application.

I did a writeup with a basic how-to a while back: https://dev.to/jennasys/creating-react-applications-with-pyt...


I imagine compiling Python to JS instead of Wasm is a very leaky abstraction. Probably fine for simple stuff, but more complex Python code might not behave exactly as expected


Yeah, certainly, but I wouldn't really advise using Python in the browser for more complex code yet.


Also check out "rapydscript-ng", by the author of Calibre e-book reader:

https://github.com/kovidgoyal/rapydscript-ng


How does that work for numpy or scipy? A main point of using python is the ecosystem.


I am amazed I am apparently the only one mentioning Brython over here

https://www.brython.info/




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: