HN Simulatornew | past | comments | lists | submit | shevy-java's commentslogin

> Maybe re-encoding my website JPEGs to gain 20% size is not worth the 33% longer decode

I changed all my .jpg files to .avif a few years ago. The benefit I get is much more than 20%. Now there is some loss when I use high compression with .avif, in particular via gimp - but other than that, I gained a lot of file size here, definitely much more than 20%. It also depends on the image at hand; I noticed that images with a ton of details, such as if you photograph a garden, takes more space. But for simpler images, I have easily gains of about 60% or 70% compared to jpeg, with no or almost no loss in quality. Whereas if I were to use jpeg compression, the quality loss would be insanely high. When I noticed this, I decided to abandon .jpg for my own use cases. I had to choose back then between avif and webp and while webp is fine, I found .avif was slightly better for the use cases I had.

I don't quite know how much jpeg xl performs, but you mentioned JPEG so I had to comment on that 20% statement as I found it way too low.

I also find the claim "longer decode" not correct. I have some photographs of gardens and the file size is huge, in JPG. When I compressed and changed these into .avif, the resulting page loads soooooooo much faster now when having used avif and a considerable but acceptable compression of it. It is just no comparison at all - avif beats jpg with its eyes closed.


Sorry if that was confusing, I have edited my post to clarify a bit: That sentence was about a feature specific to JPEG XL, which is that if you have JPEG files you can re-encode then as JPEG XL to save space without any loss of quality. It's nice for peace of mind, you can bulk convert a large archive and you know you still have the same pixels everywhere (later you can even turn them back to JPEG without loss if you want). AVIF cannot do that. Now if you are OK with some loss in the conversion, you can also do much better than 20% with JPEG XL.


Worth mentioning that someone else in the comments converted their large library of JPEGs to JPEG XL for exactly this reason and only realized afterwards that they lost a ton of image metadata from the EXIF tags. This probably isn't what you would assume would happen for a bulk 'lossless conversion' so if you're going to do this then make sure you're validating the metadata too (if it matters to you).


That's probably not the case. `cjxl` preserves metadata, but early on, some popular metadata extractors (exiftool, exiv2) silently ignored it.


I have no issue with EXIF here. Compressed JPEGs were reverted with zero data lost


That 20% gain is for the lossless re-encoding. It's not possible with .avif AFAIK. If you allow minor loss, jxl can save much more space.


It sounds like you lossily re-encoded lossy JPEGs to AVIF, am I reading that right? If so, you're automatically suffering from generational loss there, it can't be the basis of any coherent argument.


AI Skynet now beats humans.


I don't see the comparison though.

In the case of the Commonwealth, the UK empire was going strong and the guy was a royalist, aka supporter. The message "end the illegal war in Ukrain" aka Putin's genocide, does not really share a lot of commonalities here. If the message were to stop the Commonwealth from colonising everywhere and killing people then perhaps there would be a similarity, but I don't see the connection in the statement made here.


The UK did not exist in 1652. It was formed by the Acts of Union 1800. In 1652, England was (briefly) not even a monarchy - that is what Commonwealth refers to here, not the modern one.

Urquhart was imprisoned from 1651-1652 for fighting on behalf of Charles II, who was King of Scotland until his defeat in 1651, and trying to take the English throne. He didn't get the English throne until 1660.


The first English civil war started in 1642, Charles I was beheaded in 1649 and his son Charles II would not be king in England before 1660 at the restoration.

So in 1653, a 'royalist' was against the 'Commonwealth', which was the anti-monarchist side.


I kind of settled on avif. I am not at all implying avif is perfect, in particular at high compression I notice the quality isn't quite as good as often advertised. For similar size compared to jpeg, avif is divine; and I also found avid better than webp in my own tests, so I switched to it. I don't quite see JPEG XL being really significantly better though. I think a really big problem here, even aside from Google trying to force deadlock people into its evil monopoly structure, is that we have competing formats (avif, jpeg-xl, webp) and that's IMO not so great when we want to have "one format to rule them all" that's better than jpg or png or gif. JPEG-XL is kind of a late starter here; if it is not really significantly better than avif or webp then I do not see it will gain any real foothold in the coming years.


To me it seems as if scripting languages have it hard right now, aside from Python.

AI seems to have changed how people find and use new languages. The influx of new people kind of ... died down for many older languages here.


Even before AI the trend was moving toward increasingly static languages (JS->TS and even a lot more typed Python). Once you accept the static typing benefits, you start to wonder if you could leverage the constraints to drive performance improvements.


RL works better / easier to implement with static typed languages.


That's way too broad of a statement.

Static typing makes it easier to do RL targeting the sorts of things that static types encode, but it doesn't help at all with things that aren't really type constrained, like for instance writing accurate numerical programs.


Agreed. AI doesn’t level the playing field but turns it more in a winner takes all situation. AI is currently best in Python programming from what I hear and this is because it has seen the most Python code.


No matter how much code it has “seen” during training, it still makes mistakes during inference. Therefore AI is most well-suited to write in languages with feedback loops that catch mistakes earlier.

Moreover, no matter how good it is at writing Python, Python is not a language you want to use everywhere. “The right tool for the job” still applies in the age of ai.


Good point. I had great success with Rust indeed, which can catch errors early.


> AI is really good at detecting deceptive adverts - why isn’t Google using it?

Because Google is an adCompany. It will not do anything about ads - quite the opposite, it has fought down ublock origin. Everyone sees that.


> To me this is about the slow death of display advertising.

That's good. I hate ads. I will fight them down until they are gone.

But I don't think this is the case here. Ads are still pushed down onto the people willy-nilly style.


I don't understand the distinction you use here.

Then again I use versioned AppDirs on Linux since +20 years anyway, so I am not really into any arbitrary disctinction random linux distributions try to push down onto the (downstream) userbase. Besides, if you compile from source, why would you want to rely on the distribution package manager to begin with?

None of them allow for versioned AppDirs by default as far as I know; NixOS uses a hashed name, so that is the only exception I can think of (and GoboLinux of course), but as far as I know if you are on e. g. a debian system, you can not use it for a versioned AppDir layout.


> NixOS uses a hashed name, so that is the only exception I can think of (and GoboLinux of course)

Also Guix, which is inspired by Nix. Don’t know about AppDir support, though. Are AppDirs more of a general concept or a formalised standard? In what capacity are you using them?



> I don't understand the distinction you use here.

Distinction: https://news.ycombinator.com/item?id=49683258

I use "dnf" to upgrade my system and "flatpak update" and "brew upgrade" to upgrade the apps I've installed.

An app like VirtualBox does not install using Flatpak or Homebrew, so I would use dnf for that. It's usually an app or two that doesn't work via Flatpak/Homebrew/AppImage that I need to install using dnf.


That's so sad. These companies try to ruin Linux by spying on the user here.


It's not about Linux.


How so? If you can break out of a sandbox then by definition it is not a sandbox.

There are ways to force sandbox jail. For instance, giving processes only a partial view of the computer system. GoboLinux did this years ago via ViewFS (https://linuxphilia.blogspot.com/2009/07/gobolinux-is-linux-... search for ViewFS). There are many other similar solutions, some probably better.


X itself is the problem here, not the process attached to


You need to sandbox X11 which requires giving up X11 capabilities just like Wayland did.


Guidelines | FAQ | Lists | API | Security | DMCA | Apply to YC | Contact

Search: