Live data from Hacker News

Launch HN: Pynecone (YC W23) – Web Apps in Pure Python

news.ycombinator.com

291–300 of 329 posts

Re: Launch HN: Pynecone (YC W23) – Web Apps in Pure Python

#291

I don't want to downplay the library, but how hard is Javascript/HTML for the majority of python programmers? You might not make the most beautiful websites, but you can make a functional website if what you're displaying is primarily data to users because you're doing big data/AI and so forth and not setting up a consumer facing marketing platform. What's the use case here?

It's a big mental hurdle. I don't really care about HTML/CSS/JS. I really don't care about React. But the four of those form this gigantic cottage industry of tribal knowledge that requires so much fiddling. In short, I don't want to be a webdev. I just want to use the browser as a dumb display device and a software delivery mechanism. I want the UI to be as simple as possible until I start getting traction, then I'l…

[deleted]

Re: Launch HN: Pynecone (YC W23) – Web Apps in Pure Python

#292
post #24
post #11

Earlier quoted context omitted.

Because the logic is being processed at the backend and the data being transferred over WebSocket

Huh it totally is. https://pynecone.io/docs/state/overview outlines that is the case but leaves out the detail that it's using Socket.io. Gather if you want to use this then and have it not suck you are going to need some form of edge compute.

Wait, it can't generate static sites? This is gonna melt if more than a few hundred users join. Python's socket.io implementation is slow at best.

Re: Launch HN: Pynecone (YC W23) – Web Apps in Pure Python

#293

It's funny that I'm currently going in the completely opposite direction of using JavaScript to build AI apps (with tensorflow.js). I'm a frontend dev of course. I think using one language for everything does have the benefit of reducing context switching. It's about picking your comfort language for higher productivity, while making sacrifices somewhere like performance and less idiomatic.

It’s pretty obvious that cloning ML APIs (which are a collection of well defined independent math operations) is a better long term solution than shoehorning an entire language into the browser.

Re: Launch HN: Pynecone (YC W23) – Web Apps in Pure Python

#294

Earlier quoted context omitted.

Would you say the same thing about web assembly and emscripten? At least one of the above is based on those. Using scientific and numeric packages from the python ecosystem is more than syntactic sugar, IMO. It seems like the JS world mostly ignores that stuff. I have yet to try a real project with any of those python web tools. I know just enough HTML, vanilla JS and DOM API to cobble together ugly sites when I need…

These tools are a waste of time. They take longer to learn then basic js and then in 3 years support is dropped you might have well learned a bit more js. It's a bit big but just run nextjs, it solves almost everything for you. Even deployment is one click away. Would take 5 mins to get started. And a few hours to understand for a seasoned dev.

I'm not familiar with nextjs, will try it out.

I honestly want to understand this viewpoint, so I can make informed decisions when looking at these tools. So let me ask...

I agree that some of these older python things are probably not worth using. But I'm a bit confused that you're entirely dismissing web assembly. I think it's well understood that using JavaScript as the foundation of front end software was a complete historical accident. It's a huge amount of inertia to compete with, but that doesn't mean it's insurmountable.

My understanding is that wasm is a major industry initiative, and it isn't going away. Emscripten seems to be nearly as stable. Now, maybe two or three non-js languages will emerge as the core of wasm-based development, and maybe python won't be in that small group. I'd rather learn, say, rust than continue writing JavaScript.

Where do you disagree? You think wasm will be shut down completely in a year? You think none of these languages will take off in terms of web-specific tooling? Something else?

Re: Launch HN: Pynecone (YC W23) – Web Apps in Pure Python

#295

Earlier quoted context omitted.

These tools are a waste of time. They take longer to learn then basic js and then in 3 years support is dropped you might have well learned a bit more js. It's a bit big but just run nextjs, it solves almost everything for you. Even deployment is one click away. Would take 5 mins to get started. And a few hours to understand for a seasoned dev.

Haha yeah its amazing how the lengths people will go to not learn something simple but new!

I have been using JavaScript for decades, and I have never liked using it. I want to enjoy making interactive browser-based apps. Sorry that I don't buy into the cult of infinitely complex front end build tooling.

Re: Launch HN: Pynecone (YC W23) – Web Apps in Pure Python

#296

Earlier quoted context omitted.

Try using the example with WiFi off. The counter increments when WiFi is turned back on. OP is misleading.

That sounds like something you could write either way (update first, update after success, update in a gray or provisional-looking way until server success or error) in any react app, depending on your needs rather than a property of this framework. Sibling comment about Websockets perhaps more interesting explanation

If the update business logic is server-side (which it probably is if it's written in Python), there's no way the front end can update without connectivity. Anything else would imply some neat but difficult transpiling of Python to JS/webasm to make that update code available in the frontend.

Re: Launch HN: Pynecone (YC W23) – Web Apps in Pure Python

#297

Earlier quoted context omitted.

Well, I haven't looked into this one deeply yet, so I'm not sure what the differences are exactly. But there are many existing, broadly similar, projects. I see this as a solution to "I want to make an interactive website, and I don't want to touch the JS ecosystem at all and/or I really prefer python-specific libraries". This is my position exactly, so I sort of keep track of what's available. From that perspective,…

Bokeh, Dash, Gradio, Pglet, Idom, Anvil

I think all LiveView frameworks should be part of this.

Here are two Python ones I've tried:

https://www.django-unicorn.com/ https://github.com/edelvalle/reactor

Re: Launch HN: Pynecone (YC W23) – Web Apps in Pure Python

#299

Earlier quoted context omitted.

These tools are a waste of time. They take longer to learn then basic js and then in 3 years support is dropped you might have well learned a bit more js. It's a bit big but just run nextjs, it solves almost everything for you. Even deployment is one click away. Would take 5 mins to get started. And a few hours to understand for a seasoned dev.

I'm not familiar with nextjs, will try it out. I honestly want to understand this viewpoint, so I can make informed decisions when looking at these tools. So let me ask... I agree that some of these older python things are probably not worth using. But I'm a bit confused that you're entirely dismissing web assembly. I think it's well understood that using JavaScript as the foundation of front end software was a compl…

Whether it was a mistake or not. It's taken over. And many people have worked hard to make it a modern language the last 20 years.

I've seen many attempts to take over js, thusfar they all failed. At the same time JS got more and more powerful.

Js is so integrated in every corporate it will not go away any time soon.

JS solves so many issues know and the css layout is much more mature than then any under native system (native apps, flash etc are much worse at responsive layouts)

Wasp sounds fun, it's very early stage and doesnt sound like it has anything to do with webpages but runs a binary in a browser sandbox. Kind of like flash without a plugin. Can have a lot of cool features, mainly games etc. But sounds like an addition not a replacement. But who knows!

Re: Launch HN: Pynecone (YC W23) – Web Apps in Pure Python

#300

Earlier quoted context omitted.

In another comment, OP explains the framework uses websocket to send and get values from the python functions you declare. The python functions are NOT executed on the frontend.

Gotcha. So the basic "structural" stuff is translated to JS but any non trivial logic remains on server?

That's my understanding.

While it is possible to run Python on the browser, the typical solutions to do so has a lot of drawbacks:

- brython (https://brython.info/) doesn't work with pip, doesn't implement full python spec, and has very limited tooling. I never could find a use for it professionally.

- pyodide (https://pyodide.org/en/stable/) is very slow to load and execute. It's mostly (but very) useful for teaching.

Plus, pynecone would have to solve the complicated problem of finding out how to delimitate what's python on the server side and on the client side, which we don't see in the API (and would complicate things for their target customer, somebody with little web dev experience).

So the decision makes sense knowing their goals and constraints.

You just have to understand the price you pay for it: anything calling a python function will cost a roundtrip. You will have to write you app with that in mind, and don't expect miracles either.

I can see myself using the product when I need to hack something quickly that is a one page interactive program. Or for some one of my clients with quants, geographers and the likes, that often needs to make a small utility available but have only knowledge of basic python.

It also could be a good companion to tauri (https://tauri.app/) to create desktop app. To me that would be even more valuable to have finally an easy way to do a decent UI in python. Because QT, WX, GTK and Tkinter are not fun at all, and the web is an amazing platform.

I just hope they are not going to eventually lock you into their hosting solution. But given that it's on github and open source, I feel confident. Plus the doc is very good, which is a sure sign of good human beings presents in the team.

Post reply on HN