6
submitted 9 months ago by chrysn@chaos.social to c/jpegxl@lemmy.world

@jpegxl Will #jpegXL need additional metadata when used with HTML's srcset?
While the format's progressive rendering can do away with the need to have different files per resolution, browsers will instead need to know how much of the image they'll fetch. How would we pass that information to the browser?
Extra syntax in srcset, eg p.jxl, p.jxl \<2040 100w, p.jxl \<6974 200w to tell that for a 100px wide view the browser needs to load the first 2040 bytes? Fragment identifier tricks?

[-] chrysn@chaos.social 5 points 1 year ago

The very same type of mistakes happens in file systems even without URIs being involved. Directory traversal checks look simple but sooner or later need hard-to-understand symlink following rules. Enforcing processor policy has terrible portability there (it even only became practical on Linux with landlock), but nonetheless I think it's preferable.
Not mixing URI parsers is a good advice for when processor policies are unavailable – but let's try to make them available more often.

[-] chrysn@chaos.social 2 points 1 year ago

@snaggen I think the better lesson than "don't mix URI parses" here is "don't LBYL, rely on EAFP". Many "Look before you leap" (LBYL) schemes are subject to variations of time-of-check/time-of-use errors. It's preferable to not sanitize input, but tell the processor what the policy on processing is; when it comes to a violation, it's easier to ask forgiving (i.e. report the error) than permission (EAFP).

[-] chrysn@chaos.social 2 points 1 year ago

@0xsaksham @snaggen Last polls I saw, the #RustLang hashtag (it's case sensitive, but capitalization helps for accessibilisy) was a tad more popular than #Rust due to the latter's ambiguities.

[-] chrysn@chaos.social 2 points 1 year ago

@jvisick That process is completely intransparent to anyone approaching this without preexisting knowledge of that Lemmy instance. Do you know who runs that account? They should really make a note in its metadata.

[-] chrysn@chaos.social 0 points 1 year ago

Last time I checked, GTK could do laziness well where it matters (lists /trees), but admittedly that was some time ago.

[-] chrysn@chaos.social 1 points 1 year ago

My impression is that they are using WASM primarily from the browser, which really is a no-std shaped environment. Using WASI there would be as much of a band-aid as is emscripten.

[-] chrysn@chaos.social 3 points 1 year ago

Coroutines are one means of implementing async; the way they are implemented in Rust is more like building a state machine out of the async function. It can still be mapped to coroutines, and there are probably crates that use async and macros to make coroutines usable on stable, but the effort to have a stable language feature is still ongoing, with https://lang-team.rust-lang.org/design_notes/general_coroutines.html giving the overview.

[-] chrysn@chaos.social 2 points 1 year ago

I know painfully little of ActivityPub, but from a protocol design PoV, Lemmy altering its behavior when it sees Mastodon doesn't sound desirable. I'd rather put metadata in the toots that allow better decisions, or even have two entities (linked by metadata) for channel-top-posts and channel-everything, if the latter is needed at all.

[-] chrysn@chaos.social 0 points 1 year ago

Ah -- things do indeed start popping up once I follow it, and in mastodon terminology, the community is boosting every single comment. I'll try that for some time to see if it's practical, but it's probably overkill.

[-] chrysn@chaos.social 1 points 1 year ago

Even subscribing to the communities is a somewhat theoretical thing – I can see https://lemmyrs.org/c/meta as @meta and follow that, but none of its posts are shown. (Or do only new posts show up once someone on my server is following it?)

[-] chrysn@chaos.social 1 points 1 year ago

@Sibbo It's been a wild ride ridden with back-and-forths about where where Self: 'a goes and whether it's needed, but that's largely past (now that it's stable), and my use case (the coap-message crate) works fine with it.

view more: next ›

chrysn

joined 5 years ago