The future will be... special
So we can run python in a web browser. Last week we were told how to install linux into the Windows directory. Is everyone sure this is all a good idea?
Python, one of the world's most popular programming languages, may soon become even more ubiquitous as it finds a home within web browsers. Ethan Smith, a Berkeley-based software developer, recently revealed a project that allows CPython, the default implementation of the Python programming language, to run within web browsers …
<sarcasm>How naive of you sir! of course its a good idea. </sarcasm>
Personally I think this is developer masturbation and a way of drawing attention to themselves.
I don't want Python in my browser it'll be no better than Javascript and will carry all of the library package management nightmares Javascript has.
I think Python in your browser is probably a bit more likely to work as intended than Javascript which seems often not to do quite what the website author intended. I mean, why would one intentionally put an ad with a non-functioning Close button on top of the order form I am trying to fill out? But I agree that working better not necessarily a good thing.
... human sacrifice, dogs and cats living together, mass hysteria!
I thought the idea of running malicious python in a restricted environment had been bombed to extinction with targeted asteroid strikes over a decade ago. This "recent" cobweb for restricted python comes from 2008. Has a large team of dedicated security experts fixed the numerous design issues with cpython that make the very concept of restricted subset of it effectively impossible while I was not looking?
Don't get me wrong. Python in a browser seems an RBI (Really Bad Idea) from a security viewpoint if nothing else. But also it sounds like the real problem is the WASM capability that enables Python to run.
Does WASM have anything much to offer users other than a probably small rendering speed improvement and potential bundle of major grief?
I have a much better idea. Run web apps natively on the OS. You can then write them in any old language by calling up the installed libraries. And, of course, have all those pesky dependencies auto-managed by an AI service - itself managed by an AI firewall. No need for bug-ridden, insecure browsers, no dependency hell, just good, honest hopelessness.
Javascript was not enough for non-devs to pound the crap out of our browsers now these non-devs needed new weapons, so we've handed them a data miner's scripting language! May God have mercy on our souls!
All I've seen Python used for is to annoy our DBs! Some muppet in data management trying to flood DB systems with some Python coded nonsense, sure 1 session swas OK so surely 87 sessions must be 87 times better and faster right? FFS!
This is pretty cool and useful to port software with an embedded python interpreter.
However this does demonstrate one of the best advantages of using C and C++. It is so much more portable.
For example, Emscripten allowed C, C++ ----> JS, ASM.js, WASM almost a decade before other languages. And before that we had Adobe Alchemy / CrossBridge C, C++ -----> Flash Bytecode.
Where I used to work, I even had to re-write much of Unity3D (https://github.com/osen/mutiny) to port some of our games over 4 years before Unity Technologies managed to port .NET (or transpile CSharp.NET to C++).
Don't get me wrong, web browsers are pretty amazing - not to mention, extremely complex. What was once a thin client for remotely viewing and navigating documents has become a rather fat thin-client.
In fact. each passing iteration seems to be inching the browser closer and closer to being a full OS running as a guest on some target hardware (something Google anticipated back in 2009 with the release of ChromeOS).
Mainly a FE dev myself, but I really respect Python's simple approach and regularity.
Only downside is that the IDEs aren't quite as advanced as they are with JS and Java. Also the lack of inbuilt typing makes things more confusing (same problem with JS, but at least Typescript exists). I know Python has some optional typing tools, so we'll see.
Would be awesome to be able to use Java directly in the browser too, static typing FTW.
We can't shame and insult these ignorant kids to STFU because they might kill themselves after they ban you and they can't tell fact from opinion if not dismiss all wisdom with "ok boomer."
Somebody has to stop them from WASM from getting ANY access outside it's jail. Javascript is great duct tape for slapping components together and it should stay that way. WASM is fine for components; could be better for that maybe... I think they should hash and version them with UUIDs (URLs) which would promote caching, filtering/scanning and security. I tried PERL WASM and waiting for MB of perl to download and start before anything could be done was not practical... and PERL is a level beyond python (usability is different topic.)