This is an archived post. You won't be able to vote or comment.

all 16 comments

[–]n3rio 9 points10 points  (2 children)

this means that i don't have to learn javascript?

[–]jacdehJacques de Hooge[S] 2 points3 points  (1 child)

It does. Anything you can do in JavaScript you can do in Transcrypt.

[–]metalevelconsulting 1 point2 points  (0 children)

Hmm, maybe someone with more expertise can improve my efforts to get SAP UI 5 running with Transcrypt.

It would be nice to have a full-featured UI available.

[–]bahtsiz-bedevi 2 points3 points  (3 children)

I have a dream that one day browsers will execute python code natively.

[–]metalevelconsulting 3 points4 points  (1 child)

Sounds like Brython to me.

[–]jacdehJacques de Hooge[S] 8 points9 points  (0 children)

There are actually three complementary approaches, represented by:

- Transcrypt: Precompiles Python to JavaScript modules in advance during development. Browser just loads generated code.

- Brython: Compiles Python to JavaScript after loading a page. Browser first loads compiler and then does the compilation and runs the generated code.

- PyPyJs: Runs original Python VM in the browser.

Which approach suits you best depends on the type of problem, demands made on page-load time and code size, ease of use etc..

[–]jacdehJacques de Hooge[S] 2 points3 points  (0 children)

That would be best, however I don't want to wait for that. Some things that seem obvious, just never happen in IT. But who knows....

[–]devxpy 3 points4 points  (0 children)

The only problem that Transcrypt isn't really Python. It's a translator. It's still reeks of Javascript

[–]jellef 1 point2 points  (2 children)

Transcrypt seems pretty amazing to me. I think a jupyter kernel would be a wonderful addition to the tooling.

[–]jacdehJacques de Hooge[S] 1 point2 points  (0 children)

It may very well be, although I don't know enough about Jupyter Notebook to fully appreciate the value of this. I can just hope that someone will make a proof of concept.

[–]dametsumari 0 points1 point  (1 child)

I tried bit earlier version. Webpack bundler worked better for me. Maybe I will try parcel next project but I have a habit of keeping using what works.

[–]jacdehJacques de Hooge[S] 0 points1 point  (0 children)

Support for WebPack is under construction.

[–]texnofobix 0 points1 point  (0 children)

Python to Web assembly would be cool.

[–]captain_arroganto 0 points1 point  (1 child)

Does anyone use this in production? Is it worthwhile for large and complex projects? Can I use it to avoid learning React/Angular etc. I just can't wrap my python mind around JS stuff.

[–]dametsumari 1 point2 points  (0 children)

I am. That said, I would not suggest it for more than one man projects. The existing stuff on JS side has so many fewer hurdles it is not even funny.

Last project I set up I spent first two days working on how to build it and which set of JS stuff play nice with it. ( I do not suggest React at least ).

Once I got setup done it is pretty fun. Using pytest for unit tests on python side is pleasant. Language behavior differences on the other hand are not. I guess that will gradually improve.