yuzuquat
Joined 11 years ago
Joined 11 years ago
Effectively this it what it does - intercept links to other pages, loads them in the background, then swaps out the contents of the current page with the new page. Your MPA effectively becomes an SPA with just some minor rejiggering
The trouble for browsers, is if certain DOM apis have a dependency on the layout of another element. My naive and unvalidated understanding:
// Good: These DOM calls in a single frame will trigger layout-paint-composite (1 loop)
- e.style.backgroundColor = "red";
- e.style.width = "20px";
- e.style.transform = "translateX(10px);
// Bad: These DOM calls in a single frame will trigger layout-?-layout-paint-composite (2 loops)
- ...
- e.style.height = otherElement.offsetWidth + 200 + "px"
- ...
The reason being that without knowing the width of "otherElement", there's no way for the js runtime to execute the "e.style.height" line and execution needs to be paused while layout occurs.If you're looking for a transactional syntax (similar to what you've proposed) that also addresses this though, fastdom looks like a good option:
fastdom.mutate(() => { element.style.width = "20px" });
I'm not a browser expert though so if I"m misunderstanding something, would love to know.My naive take on this is that browsers have overall gotten a lot more consistent with the layout-paint-composite loop, and it's not worthwhile to swap out all your appendChild calls with fragments. On the other hand, making sure your all your layout reads (.clientWidth) are batched before the layout writes (appendChild) is much more important (fastdom)
edit: something like documentFragment/append(...children) would help guarantee the layout trashing addressed by fastdom
The benchmark is here: https://sansyrox.github.io/robyn/#/comparison
I took a brief look into the internals and turns out it wraps actix web (https://github.com/sansyrox/robyn/blob/main/src/server.rs), one of the more dominant web servers on techempower.
tldr: I dont have a good reason to doubt the performance but seems pretty interesting if you want to use actix web without having to go through rust
If you’re totally new and getting started, just throw in some code into an html file and double click it!
1) DA tos stipulates that works of art needs to be opt-in for inclusion into AI datasets 2) scraping/downloading art will include a response header with "X-Robots-Tag: noimageai" to indicate individuals building models should not use the downloaded image in a dataset.
As someone overall empathetic to the artist community (who have had to deal with NFTs, copycats, difficult industry), I have no illusions that this will have a hard time standing up against fair-use laws. That being said, if you're looking to build an ai-art model, this might be worth paying attention to regardless if you decide to comply or not.
[1] https://www.deviantart.com/team/journal/Tell-AI-Datasets-If-...
As some back of the envelope math, Openai claimed to have used ~300b output tokens to solve navier-stokes. 4x$200 plans allows me to burn ~2-3b input/output tokens a day. What's to stop a few highly motivated individuals with a reasonable background in mathematics from spinning up their own massive agent swarms in 6-12 months?
I think this fragile truce between ai-powered mathematics and overarching mathematical community is just that - fragile. In the same way the stable diffusion broke the dam with the artist community, we're seeing the same here.