Live data from Hacker News

Rio: Web apps in pure Python

github.com

151–160 of 205 posts

Re: Rio: Web apps in pure Python

#151
post #74
post #50

While I'm not certain if the world needs more Javascript, I am certain it does not need more Python.

That's overly harsh IMO. Python is not perfect—no language is—but it arguably has the lowest barrier to entry for new programmers, with far fewer "wats" than languages of its kind and era (certainly less than JS). Sure, its reference implementation is not the most performant, but it easily interoperates with C/C++, and alternative implementations like PyPy are also relatively easy to switch to, so it can be performan…

I don't know if its overly harsh, but ill give you harsh.

The thing is Python deserves all the hate JS gets and more.

1. The foot guns are real and mean (look up Mutable Default Arguments)

2. The language pushes beginners towards some bad habits (Deep inheritance) and away from good ones (Functional)

3. The performance is very poor (both single and multi threaded)

4. There are no real safe guards, and unexpected type behaviour

5. The packaging story is archaic with no fix in site. (There exist no standard out of the box way to guarantee deterministic builds)

Sure its good at Data, but that is a cultural accident, not by design.

Re: Rio: Web apps in pure Python

#152
post #83

It's a bit sad that most of the comments here are negative. Most of them seem to be some variation of, "Nobody needs a tool like this, all you have to do is simply dedicate yourself to multiple years of writing corporate CRUD apps in both vanilla soul-crushing Javascript and web frameworks. You know, like I did." So, I am the target audience of this. I have a LOT of experience writing tools and automation and that is…

I agree frameworks like this are great to see. I wonder how it compares with https://nicegui.io which is something I've used to build several small web applications in pure python (and wrap one up with their included pyinstaller based packer into an executable).. Either way, also glad to see competition in the space.

Re: Rio: Web apps in pure Python

#153

Earlier quoted context omitted.

If you count Rust as a "functional language", my personal favorite is iced, which is bloody brilliant and blazing fast https://github.com/iced-rs/iced It's desktop-first but compiles to WASM It's honestly "just Rust", so I guess if you're looking for a DSL-type declarative, it doesn't quite fit the bill... but there are design reasons for why it's "just rust" and honestly I much prefer it. It still feels declarative…

slint is more declarative, supports Rust and Python

I prefer less declarative

Re: Rio: Web apps in pure Python

#154
post #122

Earlier quoted context omitted.

Back in the day we did plenty of "real world professional projects" with jQuery. I don't see why you couldn't with Alpine. Yeah at some point you may need a more sophisticated solution but plenty of projects don't need React. This very forum you're using is just a very simple vanilla js file.

>Back in the day we did plenty of "real world professional projects" with jQuery. And they were terribly unperformant, bug ridden, messes of spaghetti that I wouldn't wish on anyone in the year 2024. Things evolved past that for a reason.

Bold of you to assume that modern web dev isn’t also a terribly unperformant, bug-ridden mess of spaghetti.

Re: Rio: Web apps in pure Python

#155

The biggest tragedy in the history of software engineering was back in the mid 1990s when they failed to get Java (Applets) to run in the browser so they had to invent JavaScript, which was purely nothing but a hack put together over a weekend by one guy and it "stuck" like napalm onto humanity and has been burning us ever since. I would say at least one billion man hours (100 billion? Trillion?) has been wasted tryi…

Java is the new COBOL in many places, thanks God it is not part of the browser. Such a terrible development of language, terribly slow for anything desktop, terribly slow as DX. We would have 100x more people complaining if there weren't a script attached to that Java.

Most people just can't objectively do the "Counterfactual Thinking" of what if only Java had ever existed and JavaScript never did.

Any developer who has loved JS all their lives would've also loved Java if that's what was available to them all their life. It's largely just what you're used to.

Running JS on the server side is just a mess, and has only been popular to do since NodeJS was invented. Imagine if it was always the SAME code on both client and server starting since 1995. That would've definitely been a better world by far.

Re: Rio: Web apps in pure Python

#156
post #83

It's a bit sad that most of the comments here are negative. Most of them seem to be some variation of, "Nobody needs a tool like this, all you have to do is simply dedicate yourself to multiple years of writing corporate CRUD apps in both vanilla soul-crushing Javascript and web frameworks. You know, like I did." So, I am the target audience of this. I have a LOT of experience writing tools and automation and that is…

It is very useful to me, even though I know some webdev. For projects where you need to expose majorly python functionality on the web, and don't want to add whole other dimension and toolkits to your python code, this is brilliant.

Re: Rio: Web apps in pure Python

#157
post #64

I will start using this once a startup raises millions in VC funding and their whole app is built with this.

The VC bit is the entire reason I would not use something like this.

Just waiting for them to want their money out and then I am stuck deep in a product fast headed for enshitifaction or abandonment when it fails to make a billion dollars in 2 years.

Re: Rio: Web apps in pure Python

#158
so, uh, how does this work?

liveview kinda deal? python to js compiler? something else?

it drives me nuts when this isn’t in the readme, or from what i can find the docs

this is a major implementation detail that will determine the usecases for apps written in rio

Re: Rio: Web apps in pure Python

#159
post #87

Earlier quoted context omitted.

> If I need a database, I'll grab SQLAlchemy. I wish there were a mature lightweight solution here; maybe Tortoise ORM will get there soon? [Peewee ORM]( https://docs.peewee-orm.com/ )

Peewee never quite got there IMO, and it hasn't kept up with the times (modern asyncio, etc.)

Is there really an “etc”? Beyond asyncio, I haven’t found anything that SQLAlchemy can do that Peewee can’t even more easily.

Re: Rio: Web apps in pure Python

#160

The biggest tragedy in the history of software engineering was back in the mid 1990s when they failed to get Java (Applets) to run in the browser so they had to invent JavaScript, which was purely nothing but a hack put together over a weekend by one guy and it "stuck" like napalm onto humanity and has been burning us ever since. I would say at least one billion man hours (100 billion? Trillion?) has been wasted tryi…

[flagged]

I don't appear to be the one who's angry.
Post reply on HN