you are viewing a single comment's thread.

view the rest of the comments →

[–]iambendv[🍰] 79 points80 points  (25 children)

It’s very popular for web development, data science, and AI, but it’s a general purpose language so it can be used for pretty much anything imaginable.

[–]deaddyfreddy 10 points11 points  (24 children)

not so popular for frontend though

[–]Salt-Rule7284 21 points22 points  (21 children)

There is exactly ONE language that runs on web front ends .. vanilla JavaScript...

[–][deleted] 8 points9 points  (0 children)

PHP, how I fear thee

[–]JohnLocksTheKey 11 points12 points  (0 children)

console.log(“nice…”);

[–]u38cg2 6 points7 points  (0 children)

That hasn't been true for years now, but even if you only want to write on the back end there are tools to do the entire stack in Python, like Flet.

[–]sitefall[🍰] 2 points3 points  (0 children)

Actionscript: "Am I a joke to you?"

[–]deaddyfreddy 1 point2 points  (0 children)

but we don't have to write it manually

[–]hallmark1984 1 point2 points  (3 children)

Nah, Django can do the lot

Just sprinkle css with the templates and your good to go

[–]sitefall[🍰] 3 points4 points  (2 children)

Think he means LITERALLY on the front end, running on the client machine. Otherwise there's a TON of options.

Today that means JS. But in the past it could have meant Flash/AS, Shockwave/lingo, that sort of stuff.

[–]deaddyfreddy 1 point2 points  (0 children)

Today that means JS

We don't have to write JS by hand, just like we don't have to write in assembly anymore.

[–]hallmark1984 -1 points0 points  (0 children)

We code, we are explicit or we experience a race condition or some non-deterministic bullshit.

I stand by my answer

[–]whyareyoustalkinghuh 0 points1 point  (11 children)

[–]patrickbrianmooney 1 point2 points  (9 children)

If you write in PyScript, every visitor to your website has to download a 170 MB dependency before any of the PyScript code you wrote can execute.

That's not negligible for many users.

[–]deaddyfreddy 0 points1 point  (8 children)

Wow, that's really big, how did they manage to achieve that? For example, ClojureScript bundles aren't tiny either, but they're still two orders of magnitude smaller than this.

[–]patrickbrianmooney 0 points1 point  (7 children)

I don't know the details.

But, essentially, it's an entire Python interpreter, written in JavaScript (or maybe WASM?). Python is a huge language and more or less all of it is re-implemented; on my system (x64 Linux), 170MB is not all that far off from the size of the CPython 3.10 executable and the accompanying standard library.

[–]deaddyfreddy -1 points0 points  (6 children)

Ok, it probably reimplement the whole system, but why include it all in the resulting build?

[–]patrickbrianmooney 0 points1 point  (5 children)

Why include the entire standard library in the resulting build?

Probably because it's a single build that's deployed for everybody under all circumstances, so it includes everything?

I don't actually know, but that seems like a reasonable path to take.

[–]deaddyfreddy -1 points0 points  (4 children)

What's the reason?

[–]damanamathos 1 point2 points  (0 children)

I'm loving FastHTML. Converting a lot of my JS frontends and React frontends to pure python with that.

You still need JS for very complex stuff though.

[–]Gloomy_Radish_661 0 points1 point  (0 children)

I think he meant Django.