News for hackers. Stuff that matters.
Re:Launch HN: Pynecone (YC W23) – Web Apps in Pure Python by ativzzz on Monday March 13, 2023 @04:30PM (#35142069)
So ruby has a JS transpiler - opal - https://opalrb.com/

I tried using it a little bit but the reality is if you need JS to make your app more interactable it's really worth it to just learn some JS. As soon as you need something complex the extra layer of abstraction just gets in the way and becomes more of a headache, and if you don't need anything complex then you don't need a fancy JS solution in the first place.

JS only becomes complex when you are trying to create an enterprise version of your app along with a build platform. You can always just sprinkle in <script> tags in your HTML for simple one liners without getting into the weeds.

Re:Launch HN: Pynecone (YC W23) – Web Apps in Pure Python by jrumbut on Monday March 13, 2023 @05:19PM (#35142864)
JS is complicated because the browser environment is complicated.

If it's going to be rendered by and live in a web browser it will either be complicated or limited in some way (like low code/no code tools).

Re:Launch HN: Pynecone (YC W23) – Web Apps in Pure Python by DoesntMatter22 on Monday March 13, 2023 @06:41PM (#35144138)
That's not really true. It's complicated because the language is one of the worst to manage.
Re:Launch HN: Pynecone (YC W23) – Web Apps in Pure Python by eddsh1994 on Monday March 13, 2023 @10:49PM (#35146748)
It's not really any worse than Python or Ruby, but you also get TypeScript which helps
Re:Launch HN: Pynecone (YC W23) – Web Apps in Pure Python by FridgeSeal on Monday March 13, 2023 @11:07PM (#35146880)
I posit that it is both.

Dealing with interactivity in the browser is subtle, complex and full of edge cases. JavaScript is also a horrible, broken language that’s not really fit for purpose. We’ve collectively invested a lot of time and resources trying to improve the experience of working with it, but the point still stands.

Re:Launch HN: Pynecone (YC W23) – Web Apps in Pure Python by quechimba on Monday March 13, 2023 @06:39PM (#35144104)
I'm working on https://github.com/mayu-live/framework which is 100% server side Ruby. It's kinda like React/Preact, but server side, and Ruby. No JavaScript required (it's not even supported).
Re:Launch HN: Pynecone (YC W23) – Web Apps in Pure Python by ativzzz on Monday March 13, 2023 @08:15PM (#35145312)
That's pretty neat. In general I think stuff like this is cool and works pretty well as a starter kit for simple CRUD apps if you don't already know Rails + JS, but like I said in my OP, once your app gets more complex, you hire some UX designers and you try to make your app more interactive, not having easy JS access makes it hard to do interesting things.

So could be useful for small projects but I wouldn't pick a solution like this for projects I would want to grow larger

Re:Launch HN: Pynecone (YC W23) – Web Apps in Pure Python by DoesntMatter22 on Monday March 13, 2023 @06:40PM (#35144131)
You are assuming people use Opal because they don't want to learn JS. In reality it's that JS is a very messy language compared to ruby.

You can be a lot more productive if you avoid JS entirely.

Re:Launch HN: Pynecone (YC W23) – Web Apps in Pure Python by ativzzz on Monday March 13, 2023 @07:55PM (#35145086)
JS is a totally fine language. The entire browser ecosystem makes JS an incredible productive language for working on the web. You can disagree if you don't like the language personally but that doesn't change the fact JS gets the job done
Re:Launch HN: Pynecone (YC W23) – Web Apps in Pure Python by DoesntMatter22 on Tuesday March 14, 2023 @01:45AM (#35147843)
"incredible productive language for working on the web"

You can disagree if you want but that doesn't change the fact that JS is a huge pain in the neck to get the job done with.

Re:Launch HN: Pynecone (YC W23) – Web Apps in Pure Python by 1337shadow on Tuesday March 14, 2023 @04:14PM (#35157726)
Absolutely agreed, hence the many Python to JS transpilers out there.

https://transcrypt.org https://yourlabs.io/oss/ryzom#javascript https://github.com/am230/py2js

We get so much satisfaction out of writing JS in Python, it's worth all the IDEs in the world for us!