Earlier quoted context omitted.
> It's not like there's any overlap between current web developers and ML people anyway to need an unified bridge. I guess you have completely missed people running language models on WebGPU then. I think webasm + webgpu will be a target for a lot of new ml libraries.
Well yeah, as a sort of compilation target for sure, not just for language models but all ML models need to be integrated somewhere. The ML code and web code will be independent though.
React, but in Python
151–160 of 179 posts
Re: React, but in Python
#152Could be fun to see this replacing jinja in old frameworks like django. Although inheritance had a better feel with templates..
ReactPy dev here. We're actually contributing to a WIP PEP that would add JS-like tagged template literals to Python. We think this will open up a whole new world of templating and DSL possibilities: https://github.com/jimbaker/tagstr
Good luck nonetheless
Re: React, but in Python
#153Could be fun to see this replacing jinja in old frameworks like django. Although inheritance had a better feel with templates..
Django doesn't use Jinja, does it? I thought it did its own thing.
Re: React, but in Python
#154Earlier quoted context omitted.
That is not a typical lock file. If it is, then it is a bad one. Lock files need checksums, not version numbers (oh well, both.). Version numbers do not protect from changes. At least not in all important cases or scenarios. I've had packages in the PHP world change their checksum and when I alerted them about it, they were like "So? We only changed some documentation of that version." ... Who knows what else people…
pip-compile provides exactly that: https://pip-tools.readthedocs.io
Is it a random third party package (someone just grabbing that name) or who manages it? As it is, it looks like not part of pip. (But maybe you were merely posting it as an alternative?) I've never heard of it before. I have been using various tools already, including merely pip, pipenv, poetry. Do I need to look for the newest tool every month? It begins to feel like the JS ecosystem.
Re: React, but in Python
#155Earlier quoted context omitted.
Why?
He means API calls, obviously overloaded the term "function calls" a bit In this case, I think it's also clear that most things you'd call an "application" abhor this behavior, which is why heavy clients are so popular, and small shops without frontend engineering talent are making a big push away from heavy clients which raises all the hubbub about HTMX etc
lol, no he doesn't
Re: React, but in Python
#156I created something like this inside a tech giant once. It never saw the light of day with regard to usership. It's good to see someone doing the same in the open source world. A brief summary of what I did: * Python-powered apps, like this * React was used to handle lifecycle. Basically, I avoided writing any kind of lifecycle management because I just wanted to do exactly what React would do. This was achieved via…
The way to solve session management is to just store the state in html forms and send it back to a stateless http endpoint. That way you get a website that behaves the way all websites work, and can scale easily.
Re: React, but in Python
#157I'm a little confused here, React might have a SSR component, but the thing that makes it React is that it runs client-side. So... how are you putting Python in the browser?
React doesn’t have to run client side. The DOM renderer is just one possible output, albeit the most popular. The output doesn’t even have to be human consumable.
Re: React, but in Python
#158Earlier quoted context omitted.
The most popular stable diffusion UI uses gradio, which is the same paradigm of defining a web frontend in the backend, and the performance just falls apart after the code reaches a certain size. The need for most interactivity to roundtrip to the server and back opens up tons of places where a bad connection could leave the whole app in a half-broken state. And beyond that, it's just slow . So much so that mobile us…
I mean, what if the app is only ever used by one person over localhost? Seems you would be blocked on access to the GPU, unless it also has GPU farm support?
Re: React, but in Python
#159Earlier quoted context omitted.
In Python, when comparing lists using the less than ( The first element of each list is compared, and if they are not equal, the comparison result is determined based on the comparison of the first unequal elements. In this case, [1, 2] and [10, 2] both have different first elements (1 and 10). Since 1 is less than 10, the comparison result is True. The second element of both lists (2) does not affect the comparison…
All of these could be equally valid results of your list comparison: True, False, [True, False], [[True, True], [True, False]]. I like that typescript does not rely on an implicit choice, but let’s me express exactly what comparison I care about.
This has been a suprising thread to me -- I just assumed "everyone knew" that the vast majority of languages do lexicographic comparision of lists.
I will say typescript does "rely on an implicit choice", it has a default implement (the "convert to string"), which I'm going to be honest, doesn't ever seem like a sensible choice to me -- although maybe it feels more natural to javascript/typescript people.
My personal upset (I lost like a day to this) is that if you keep your numbers under 10, you do get the lexicographic ordering, as then lexicographic = string. I had a bunch of unit tests (all using numbers under 10), just larger inputs kept breaking, and it didn't occur to me to go read the docs for < :)
Re: React, but in Python
#160I created something like this inside a tech giant once. It never saw the light of day with regard to usership. It's good to see someone doing the same in the open source world. A brief summary of what I did: * Python-powered apps, like this * React was used to handle lifecycle. Basically, I avoided writing any kind of lifecycle management because I just wanted to do exactly what React would do. This was achieved via…
https://github.com/sparckles/starfyre