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.
> 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
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.
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.
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.
Right. In fact any ORM worth its salt will have methods specifically designed to let you address the N+1 problem easily.
E.G: django "select_related"
Not to mention they will will have ways to use raw SQL through the lib infrastructure, which is still better than querying SQL manually, and give you full control of the query.
Also wordpress shows that you can write manual SQL and still have terrible performances because your application is badly structured, which an ORM helps with.
In the end, I don't think there is less trap with raw SQL, the traps are just different. It's not a matter of "better".
Maybe the pressure the knots hold is enough to maintain rows of sections of the material in close enough range for the casimir effect to apply, making making some part of it flexible (the material) and some part of it super resistant (the quantum fluctuation zone) which ends up giving this property.
Guns have only one purpose: physical combat. Either commit it, or, hopefully, prevent it.
Blades and encryption main purposes are not physical combat. Blades are mostly use for cutting material we use in our daily life, encryption is mainly use to hide communications.
I don't agree with Brazil move, mind you. Flippers are not dangerous to the point I would consider seizing them a priority.
This premise is not true. But I agree, it's generally ignorance about a tool, weather it's firearms or radio, that leads to people and so governments, making false claims and so taking stupid regulatory actions.
It is really. You can use a gun as a doorstop or a paperweight, but it wasn't designed to that end. It's designed to deliver massive force to a small target at range and though that could be an object (eg in a target shooting competition), the intended target is usually an animal or person. Please don't insult people's intelligence with semantic games.
It's understandable that most people don't have the lived experience to realize that firearms are mostly for recreation. Most people live in high population density areas where firearms discharge is not allowed or feasible. But for most firearms uses the vast majority of use, and indeed the marketing by the companies that manufacture them, is about the recreational aspect, not shooting people or animals. There's certainly marketing and intent towards hunting but those are .308 rifles and larger calibres explicitly designed for it and they are not the majority of the market.
Many people use firearms for recreation, and I agree that they are great fun. They are designed to put force on a target at range. If you only care about the recreation aspects, you'll be equally happy with a paintball or BB gun.
I have paintball and pellet guns and I can assure you while they are fun it is not the same. Although high calibre (.30) precompressed pneumatic air rifles are approaching the capabilities and fun of combustion propellant firearms pretty rapidly these days. And as a plus you can fire them full auto and with noise mitigation attachments without the legal worries of combustion firearms.
I'm pretty sure the vast majority of gun owners have never actually shot anyone. More common uses are: training, hunting, collecting, and plain old having fun shooting things.
I used to be pretty anti-gun, but the 2020 home protests and Ukrainians initially training with wood guns changed that.
>I'm pretty sure the vast majority of gun owners have never actually shot anyone. More common uses are: training, hunting, collecting, and plain old having fun shooting things.
You're confusing use with purpose as if to imply the utility of firearms as tools to commit violence is merely arbitrary, rather than specific to their design. Which is weird because your second sentence makes it clear you know otherwise.
Setting aside that hunting is physical combat, the purpose of guns is not to be collected, or to shoot inanimate targets. The founding fathers didn't create the Second Amendment to protect the right of the people to keep and bear arms against watermelons on stumps. Guns may have multiple uses, but their purpose is combat.
I'm not exactly on this trend, but I noticed something going into that direction:
15 years ago, I wanted the latest everything. Now I usually want the latest minus one. Python 3.11 is out? It's finally time to use 3.10. The new phone model is ready? Let me buy the one from last year.
Because it's almost as good, but a lot more reliable.
You get all the patches, all the user report, all the ecosystem support that has accumulated since then. And this has a LOT of value.
I saw this happen in myself too. I think it has to do with experiencing things as a consumer first(the "ooh shinys") and then only later being able to work through how I'm actually using the tool towards a goal.
A lot of tasks that look like they need a computer in the loop, are actually a tiny layer of tech on top of a more traditional skillset. That is, you would actually be more capable of using the tech well by studying and planning it on paper and walking in the proverbial "recording studio" practiced and prepared, than by getting a device and expecting to be hands-on with it for hours and hours every day. This analogy works for music, for visual art, for writing, for programming, and many other tasks.
The cases where you can get a lot out of being hands-on tend to be artifacts of incidental incentive structures, because so much of computing is just an abstract UI to process and edit data you already have and publish the results, vs being an more intrinsic experience - it's supposed to speed you up, not make you dwell on every decision. Staying hands-on with the machine creates incentives to polish things mindlessly, because it will never say "no" to one more layer of processing, and it will always say "yes" to your requests to keep previous versions around.
Going traditional cuts out all the fluff - you have to put in ongoing effort to support a traditional workflow, so you automatically drop your level of polish to what the task calls for. It makes you think about handling information as a performance art, instead of an idealized production process. And when you bring the computer in on top of that, it focuses you around making basic adjustments and enhancements, instead of mitigating the need for a performative approach altogether.
One's own values may shift over time. Personally, I'm still as much a fan of bleeding edge[0] as when I was a young'un.
It's just personal preference and it's fine. The weird thing is making a big deal of it, IMO.
[0] As is tradition, I must mention that I do run Arch Linux, but I'm not on the 'testing' repositories... but I'm not sure I'd ever want to be that bleeding edge, even in my youth :)
A couple weeks ago I realized I was still running the previous version of MacOS and I honestly don't want to put any effort into upgrading. It works fine right now. What a weird departure when I used to want to upgrade on day 1 and had to consciously wait two weeks for the big bugs to be worked out.
Apple has advantages. And everything comes with tradeoffs.
I don't use Apple's hardware and software anymore. Thats my position. I won't take those tradeoffs. Works for me TM.
Others use Apple's hardware and software. It works for them.
I own enough personal and professional hardware and boatloads of software, on owned hardware and in the cloud, that has nothing to do with Apple. Clearly there's competition.
Also I can generally pick up the previous generation used at a discount as the new stock is about to come in. This is especially good on big ticket items that people seem to crave having the newest version of. i.e phones, TVs, computers.
If you code in Python, your probably should use the language as much as possible and avoid calling shell commands.
E.G:
- manipulate the file system with pathlib
- do hashes with hashlib
- zip with zipfile
- set error code with sys.exit
- use os.environ for env vars
- print to stderr with print(..., file=...)
- sometimes you'll need to install lib. Like, if you want to manipulate a git repo, instead of calling the git command, use gitpython (https://gitpython.readthedocs.io/en/stable/)
But if you don't feel like installing a too many libs, or just really want to call commands because you know them well, then the "sh" lib is going to make things smoother:
Also, enjoy the fact Python comes with argparse to parse script arguments (or if you feel like installing stuff, use typer). It sucks to do it in bash .
If what you need is more build oriented, like something to replace "make", then I would instead recommend "doit":
It's the only task runner that I haven't run away from yet.
Remember to always to everything in a venv. But you can have a giant venv for all the scripts, and just she-bang the venv python executable so that it's transparent. Things don't have to be difficult.
Finally, sometimes it's just easier to do things in ipython directly. Indeed, with a good PYTHONSTARTUP script, you don't have to import everything, you get superb completion+help, and you can call any bash command by just doing "!cmd". In fact, the result can be store in a python variable. Also you can set autocall so that you don't have to write parenthesis in simple function calls.
Going green. Affirming diversity. Giving to charities. And of course, ethic committees.
When the cost of those outgrow the benefit they get from it, they throw it out of the window.
You know Bill Bernbach's quote: "A value isn't a value unless it costs you something."
It's not just for people. It's for corporation too.