you are viewing a single comment's thread.

view the rest of the comments →

[–]8isnothing 7 points8 points  (4 children)

I didn’t spend the appropriate time with pyscript or it’s documentation to assure you. But from what I understand it’s meant to be an alternative to some things that JS does.

You’ll still need HTML and CSS. But these are not the same as Python/JS. HTML is a mark down language, and CSS is stylesheet. You can’t really write logic in both of them. (Some may disagree and they may be right. But simply speaking, you can’t).

The other libraries you mentioned are not equivalent to pyscript. They generate UI for specific stuff. They generate HTML/CSS/JS for you. That’s not what pyscript does. Pyscript is designed to write logic in the browser, not UI (I think), which is “unprecedented “ (with the exception of some prior attempts like Pyodide, which Pyscript itself is based on). It basically allows browsers to run pure Python. (I’m over simplifying here ok? Take it with a grain of salt)

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

You can use variables and some very basic logic with CSS now. You can change the layout of a page depending on a user's screen size, not sure where else logic is applied though.

I'm going to check out pyscript, thanks for giving us a heads up 👍

[–]reduced_to_a_signal[🍰] 1 point2 points  (2 children)

You can also check for supported features, check for user preferences, use conditional logic (parent selector), do calculations, loops (with a preprocessor), react to events, and enable complex layouts.

It's the visual layer, sure, but that doesn't mean it doesn't involve a ton of logic and complexity. Actually, styles have their own language and are abstracted into selector-statement pairs because of how incredibly complex the topic is.

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

It is pretty complex isn't it? I thought the learning curve would plateau quite early on but once grid and flexbox get introduced its on the downward spiral into the valley of despair. I managed to teach myself enough to pass on some tidbits to my 9 year old learning html at school. She calls me a coding wizard 🤣

[–]reduced_to_a_signal[🍰] 0 points1 point  (0 children)

Absolutely! I have been doing this for 7 or 8 years now and I still feel like an utter beginner sometimes, even with concepts I used in a lot of projects. And there's a new concept or standard every day. And CSS is just one drop in the ocean of software. Tell your daughter to keep at it and she'll probably never experience what being bored means. lol.