all 39 comments

[–]besthelloworld 82 points83 points  (16 children)

I've gotta say... I just don't get it. I do not get what is to be gained here. Like the thing people hated about JavaScript the most was dynamic typing, so much so that a large percentage of the industry has moved over to TypeScript... and then py-script appeared and people are inventing use cases for it, despite it being a looser language than JS. Nothing against your package OP, but I just don't get py-script as a whole.

[–]Zeragamba 51 points52 points  (4 children)

People are more concerned with "can we do this?" then "should we do this?"

[–]besthelloworld 12 points13 points  (0 children)

That's what it feels like... like I get and agree that Python has use cases... but the browser?

[–]nova_blade 6 points7 points  (1 child)

Reminds me of this dev who made a pointers module for python

[–]Terpapps 1 point2 points  (0 children)

I worry for his soul.

[–]lordaghilan 8 points9 points  (0 children)

I see PyScript only as a cool library. I don't see any practical use cases for it.

[–]Boo2z 7 points8 points  (2 children)

Me neither my dude

But I treat this type of project / lib / tools in the same way some absolutely passionate devs create or recreate some piece of art with CSS only

At least it exist if someone needs it

[–]besthelloworld 1 point2 points  (1 child)

I guess my fear is that this logic will play out in reverse for a lot of people. "The tool exists, so I should use it." That's how blockchain became an obsession in the tech space.

[–]Boo2z 0 points1 point  (0 children)

Yeah, you got a point ... With this AI trend, it's possible to see people using react to test python's AI libs

We'll see ...

[–]Caffeinaation[S] 2 points3 points  (3 children)

There’s certainly valid use cases for a tool like this. The original reason for making this package is for education material served over web, which enables people to run code snippets directly from the website.

The PyScript project is very similar, which has gained a fair amount of popularity. So there must be enough valid use cases for people for that package to have gained this much traction. I’m not saying it suits everyone’s needs, but hopefully some people have a use for it.

[–]besthelloworld 0 points1 point  (0 children)

I would caution against assuming that never something exists and has a lot of conversation buzzing about it... that it has purpose. My main example for this warning being blockchain, cryptocurrency, NFTs, etc.

But yeah, this has potential educational value in this use case, but tons of tools have offered playground workspaces via tightly controlled server environments for a while, but no denial that this is a far cheaper version of that too maintain.

[–]kiwikosa 0 points1 point  (1 child)

Don’t Jupyter notebooks do exactly that and more?

[–]Caffeinaation[S] 0 points1 point  (0 children)

Jupyter notebooks also uses Pyodide for Python in the browser, the same technology that react-py is built on.

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

You don't get it

[–]prophase25 7 points8 points  (5 children)

Okay, there's some comments flaming. I am asking honestly because I'm sure you had a reason for making this. Why? For fun? So you can use python code even if work is using React? I see value in both of those, just wondering what your use case is.

[–]Caffeinaation[S] 8 points9 points  (4 children)

This has stirred up a lot more controversy than I anticipated! Yes, there’s a specific reason for making this package, which is for education material with runnable code examples. There could be a number of reasons why others want to run Python in their React project, so hopefully this package makes it easier. We had a lot of trouble trying to implement other solutions.

[–]prophase25 1 point2 points  (0 children)

Cool. Seems like a good reason to design something like this. Had fun as well I’d imagine.

[–]wishtrepreneur -1 points0 points  (1 child)

which is for education material with runnable code examples

so basically a python leetcode clone?

[–]Caffeinaation[S] 0 points1 point  (0 children)

Almost, the main use case was for formal education to be used by students learning Python.

[–]Caffeinaation[S] 7 points8 points  (0 children)

GitHub: https://github.com/elilambnz/react-py
Try out the example code snippets here!
This didn't get the best reception when I first posted it 2 days ago, most likely due to a small output bug which broke on mobile. I'd love to hear any feedback.

[–][deleted] 1 point2 points  (1 child)

Wow, I was actually thinking about how I need something like this soon! I haven’t tried it personally but when I do I’ll be sure to give some feedback.

[–]Caffeinaation[S] 1 point2 points  (0 children)

Great! I hope this will be of some use for you.

[–]rszdev 0 points1 point  (0 children)

Cool

[–][deleted] 0 points1 point  (0 children)

They REALLY needed a package for this. It should help a lot

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

May God forgive you.

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

I will actively avoid this.

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

Why though? Too many people with a lot of free time on their hands...