Live data from Hacker News

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

news.ycombinator.com

271–280 of 329 posts

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

#271

Earlier quoted context omitted.

Why is the frontend state stored on the backend?

The state is updated through Python functions that are run on the server, so the state needs to be on the server

Why don't you just transpile the frontend Python code to JS at build time and just have normal HMTL/JS/CSS in the final deployed web app with a Python backend?

You've mentioned no-code tools. For a client, I had to work with the no-code tool Bubble a lot. They do something similar, where the front-end is not built statically but dynamically and uses WebSockets to communicate with the back-end. I don't think this is a good idea (and that's why Bubble is also trying to switch to static pages now, but you can imagine what it takes to do that once you reach a certain size).

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

#273
I get get benefit from it, and I saw what Dash and plotly can do for people with a bit of Python and a need for a quick UI.

So I get the point of the project, I can see a mathematicians getting value out of this.

Still, I would advice against using this for anything else than a small project (in the current state):

- any action your perform means a round trip to the server. This is why the counter seems so slow. Everytime you click on increment, it goes through the entire internet, ask for +1, and get the answer, then update the page.

- easy things will be easy, but even the average things are going to be hard. Every time you will want something that is not provided out of the box, the workaround is going to be painful.

- you are coding with react, one of the most complicated framework there is, but with a layer of indirection turning it into a black box. You better hope everything goes well because I don't wish debugging that on anyone.

- the database layer is going to bite you if you start to get fancy. Guaranteed.

- if you need this, you probably can't assess security. So no way to know if your website is secured. In fact, you can pretty much bet it is not.

This means if you use it for something big, you will eventually hit some kind of a big wall. Or something kind of painful experience that will possibly harm the project.

But of course, if the alternative is to never having started the project in the first place, you should definitely go for it.

The deployment being a pain for most python dev, this alone will make your life way easier, and 99% of projects don't have more that a few requests per minutes and a couple of pages anyway.

Just know what you get into: this is a trade off, as everything in engineering, not a unicorn.

Also, this is the Y combinator, so I assume there is a bigger plan behind this.

Good luck to the creators though, anything that move the needle even is good to attempt.

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

#274

Earlier quoted context omitted.

You may not realise this, but TS is just JS + Types.

You may not realize this, but that makes all the difference in the world.

You may not realise this, but this post is about a framework that let's python devs make modern web apps without touching the JS ecosystem.

The root comment appreciates the framework, and shares their unwillingness to write JavaScript and HTML. The reply to that comment asks why don't they try TypeScript.

I think that reply is absurd because asking someone to write TypeScript when they dislike JavaScript in the first place is absurd.

I know and realise the fact that JS+Types is way better than plain JS, and infact I write TypeScript on everyday basis.

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

#275

I get get benefit from it, and I saw what Dash and plotly can do for people with a bit of Python and a need for a quick UI. So I get the point of the project, I can see a mathematicians getting value out of this. Still, I would advice against using this for anything else than a small project (in the current state): - any action your perform means a round trip to the server. This is why the counter seems so slow. Ever…

Plan probably is around a hosted apps model where apps can be embedded in iframes or similar. Vercel to fly, everyone is basically selling a flavour of Heroku with a desirable outcome of lower maintenance overhead.

But yes, it is a tradeoff and the abstractions underneath are leaky. It is not just React but NextJS and then the whole NodeJS ecosystem which is surely one of the most challenging ones.

That client/web part could have been tackled by writing a micro library in pure JS with no transpilers of any sort - and probably they might do it in future not sure how, but something like Brython[0] could be interesting.

[0] https://brython.info

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

#276

I went to the button component page [1] and to the section of the counter and two increment and decrement buttons. Clicking on either takes something like 0.5 seconds for the counter to update it's value. Using Android and Samsung internet. Edit: I took a video screenshot https://voicer.com/v/HSpS9 [1] https://pynecone.io/docs/library/forms/button

Same here, but I think it's because that's not really a good use case. If you are going to use it to actually run some computations in the backend (that have to be in the backend, say, GPU-powered ML stuff maybe? Or anything else that you can run easily in Python but not in JS) then it sounds like a good alternative.

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

#277

I get get benefit from it, and I saw what Dash and plotly can do for people with a bit of Python and a need for a quick UI. So I get the point of the project, I can see a mathematicians getting value out of this. Still, I would advice against using this for anything else than a small project (in the current state): - any action your perform means a round trip to the server. This is why the counter seems so slow. Ever…

Your

> any action your perform means a round trip to the server. This is why the counter seems so slow. Everytime you click on increment, it goes through the entire internet, ask for +1, and get the answer, then update the page.

Seems inconsistent with OP's

> the frontend compiles down to a React/NextJS app, so from the end-user’s perspective it looks like any other website

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

#278

I get get benefit from it, and I saw what Dash and plotly can do for people with a bit of Python and a need for a quick UI. So I get the point of the project, I can see a mathematicians getting value out of this. Still, I would advice against using this for anything else than a small project (in the current state): - any action your perform means a round trip to the server. This is why the counter seems so slow. Ever…

Your > any action your perform means a round trip to the server. This is why the counter seems so slow. Everytime you click on increment, it goes through the entire internet, ask for +1, and get the answer, then update the page. Seems inconsistent with OP's > the frontend compiles down to a React/NextJS app, so from the end-user’s perspective it looks like any other website

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

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

#279

I get get benefit from it, and I saw what Dash and plotly can do for people with a bit of Python and a need for a quick UI. So I get the point of the project, I can see a mathematicians getting value out of this. Still, I would advice against using this for anything else than a small project (in the current state): - any action your perform means a round trip to the server. This is why the counter seems so slow. Ever…

Your > any action your perform means a round trip to the server. This is why the counter seems so slow. Everytime you click on increment, it goes through the entire internet, ask for +1, and get the answer, then update the page. Seems inconsistent with OP's > the frontend compiles down to a React/NextJS app, so from the end-user’s perspective it looks like any other website

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.

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

#280

I'm not exaggerating but this might just be the highest impact library I've seen. As a backend developer who has lots of great project ideas but bail at the thought of having to use JavaScript and HTML, this library is a godsend! My only question is why it took so long for someone to implement it? And where are the equivalent libraries for Go, Rust and Java?

Java does have Vaadin but it's a mostly proprietary software. But it is very good and largely under appreciated.

Maybe I am an optimist, but I'd say Vaadin is mostly Open Source (Apache License). You can build complete web applications with the open source version. Only some advanced components (e.g. an Excel-like grid, a WYSIWYG editor, Highcharts components) are proprietary and require a subscription for development, while the builds can be freely distributed.
Post reply on HN