2022-11-14 12:58 GMT+01:00, Edward Elliott <
ese...@gmail.com>:
> I've played with similar projects that compile python (or python-like code)
> to javascript. Things like pscript
> <
https://pscript.readthedocs.io/en/latest/intro.html>, pyjs, skulpt, and
> others. They all have similar issues from what I've seen:
>
> - DOM is available via the default js interface.
> - Most work is done with js libs. Little if any of python stdlib is
> available.
> - Interactions between python and js are clunky. Invariably you
> run into type conversion issues, signature mismatches, and weird syntax
> errors in transpiled code.
> - Only a subset of python language is available, and some features don't
> work as in python. Not just advanced features like generators, but
> simple
> things like list comprehension or indexing.
> - Documentation is usually sparse and incomplete.
>
> The only benefits I've seen are execution / load speed and memory usage.
> But it comes at significant cost. Brython is far more advanced in
> providing a truly python environment, both in language and standard libs
> (and documentation!). Brython is a much better general purpose environment
> unless speed or memory are major issues.
>
> Pyodide seems the most promising future challenger. WebASM could be a
> really solid base for a python implementation. But WASM is still quite new
> and untested, there are many maturity issues to sort out. And pyodide has
> been more focused on number crunching than a general purpose python
> environment.
>
> IMO it's rather troubling that a google search for 'python and javascript'
> or 'python in the browser' returns a dozen results for pyscript before the
> first result for brython. Even skulpt <
https://skulpt.org/>, which doesn't
> seem to have any activity in several years, is higher in the rankings. It
> does not bode well that such a new project sucks up so much attention.
>
> However that's not nearly as troubling as browser makers spending 20 years
> making javascript the only supported platform for client-side development.
> Such a terrible awful no good very bad language. To think of the man hours
> wasted debugging implicit string / int conversions and name scoping
> nonsense, all because someone's weekend dorm-room frankenstein language got
> transmuted into a multibillion dollar global web platform, and no one in
> the chain ever stopped to say "gee maybe this isn't such a good idea",
> really makes me weep for humanity.
Tragedy of the commons, free (for them) computation and energy for the
multibillion dollar industry.
>>
https://groups.google.com/d/msgid/brython/CAB-sx63xWukQyfZkOk6qoq5J%3DdTemN86wmD5eb7_VTNU1XzfEA%40mail.gmail.com
>> .
>>
>
> --
> You received this message because you are subscribed to the Google Groups
> "brython" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to
brython+u...@googlegroups.com.
> To view this discussion on the web visit
>
https://groups.google.com/d/msgid/brython/CAF1%3DpD%3DpGJV2rnf-iPi4qXcg8O8bYPAL8%2Bda1uEgNLiqPT4RJQ%40mail.gmail.com.
>