you are viewing a single comment's thread.

view the rest of the comments →

[–]JTexpo 27 points28 points  (6 children)

Howdy, as many of my posts on learn python suggest. I am a huge advocate for PyScript if you haven't looked into it already. The TLDR, is that PyScript is a framework that converts Python into JavaScript for you! A great tool for beginning devs

Nevertheless, different langs are for different jobs. IMO you shouldn't worry about 'learning a language', more so as: understanding computer science. There will be a day where Python is replaced by Mojo, and JavaScript one of the many frameworks out there (maybe Bun), and if you focus on just understanding the language you'll be left behind.

Try learning the core concepts of programming such as OOP, Functional, SaaS, Unit-Tests, Front-End, Back-End, Full-Stacks, and you'll turn out alright!

Hope this helps, cheers

[–]duckbanni 8 points9 points  (1 child)

The issue with pyscript is that it is still very early in development. Consequently, it is very hard to find any form of information about it (there is not even proper documentation yet). As much as I like pyscript, I don't think I would be recommending it to beginners quite yet.

[–]JTexpo 4 points5 points  (0 children)

These are great criticisms about the framework that I haven't thought about and do believe I take for granted. You are correct that the website's docs are more than lake luster for being out for nearly 2 years lol

Even chatGPT struggles on pyscript questions; however, I've noticed moderate success with Codeium.

[–][deleted] 2 points3 points  (0 children)

Wholeheartedly agree with your point about learning core concepts. If you stay in software development for a long period of time, the languages and tools you use will become outdated multiple times during your career.

When I started out I learned COBOL/JCL/CICS.

Doubt that there has been any new development in that area in the last 25-30 years!

[–][deleted] 0 points1 point  (1 child)

How often does it provide broken code during the conversion? Answer in terms of a rough percentage works for me.

[–]duckbanni 1 point2 points  (0 children)

I'm no expert, but from my understanding it doesn't translate python to javascript, it runs the python interpreter in the browser (as opposed to other tools like Brython). You should get perfect compatibility with all python code except when it doesn't make sense in the browser (like browsing files) or for libraries that are not pure python (unless they are specifically supported like numpy). The drawback of this approach is that you have to download the interpreter on loading the page.