Live data from Hacker News

A Python 3 implementation for client-side web programming

brython.info

11–20 of 120 posts

Re: A Python 3 implementation for client-side web programming

#14
I do like the idea, but it inevitably suffers from the same flaw that afflicts all other compile-to-js libraries: making sense of errors will still require knowledge of how the underlying javascript works.

Perhaps a development plugin for Chrome would allow debugging in python?

Re: A Python 3 implementation for client-side web programming

#16
post #14

I do like the idea, but it inevitably suffers from the same flaw that afflicts all other compile-to-js libraries: making sense of errors will still require knowledge of how the underlying javascript works. Perhaps a development plugin for Chrome would allow debugging in python?

Source maps should resolve this issue

Re: A Python 3 implementation for client-side web programming

#17
post #14

I do like the idea, but it inevitably suffers from the same flaw that afflicts all other compile-to-js libraries: making sense of errors will still require knowledge of how the underlying javascript works. Perhaps a development plugin for Chrome would allow debugging in python?

Source maps should resolve this issue

Good point! I ashamed to say I hadn't thought much about how source maps will pave the way for anything-to-javascript web programming... very cool.

Re: A Python 3 implementation for client-side web programming

#19
The way they position Brython is pretty off-putting and kind of confuses the issue.

CoffeeScript page: "CoffeeScript is a little language that compiles into JavaScript."

Brython page: "Brython is designed to replace Javascript as the scripting language for the Web."

Maybe that's the end goal, but the reality is far from it. Of course JS is still required, and of course the Python gets compiled into JS.

Finally, the approach seems a bit off. I would think it would be better for the Python to be compiled with a pre-processor, not done on the client.

Re: A Python 3 implementation for client-side web programming

#20
post #13

Is it possible to minify and obfuscate python code?

Python 'compiles' to .pyc files, but I'm not show how much that compresses them, or if it's possible to reconstruct the source from it.

.pyc files are very reversible.

there are open source projects that decompile them to runnable code, the original symbol names are even intact - this means you don't lose the original naming of variables, functions, arguments, etc.

Post reply on HN