Readit News logoReadit News
shrx commented on What are OKLCH colors?   jakub.kr/components/oklch... · Posted by u/tontonius
the_af · 4 days ago
I don't understand why HN sometimes responds aggressively to an honest, puzzled question. It's as if being wrong (or confused) was a sin here, sometimes.

I thought yours was an honest question that warrants an answer (which thankfully Chris answered).

shrx · 4 days ago
It was an honest question, thank you.
shrx commented on What are OKLCH colors?   jakub.kr/components/oklch... · Posted by u/tontonius
karmakaze · 4 days ago
Why is there no documented formula to convert to from this color space? A quick google and the best I could find is this Gist[0]. Searching for Oklab has a Wikipedia page[1].

[0] https://gist.github.com/dkaraush/65d19d61396f5f3cd8ba7d1b4b3...

[1] https://en.wikipedia.org/wiki/Oklab_color_space

shrx · 4 days ago
It looks to me that all the "magic" is in the matrices used for conversion between Oklab and sRGB. The final conversion between Oklab and Oklch is trivial, and is documented in your linked Wikipedia article.
shrx commented on What are OKLCH colors?   jakub.kr/components/oklch... · Posted by u/tontonius
chrismorgan · 5 days ago
No. We’re talking about colours way beyond the ranges of human perception.

For this specific gradient, see https://oklch.com/#0.7017,0.3225,328.36,100 and https://oklch.com/#0.86644,0.294827,142.4953,100, and look at the Chroma panel, see how far out of our screen gamuts they are (even tick “Show Rec2020”, which adds a lot of chroma around blue–green and magenta–red), and try to imagine the colours between the lime and magenta (in either direction). The red direction is probably the easier to reason about: there’s just no such colour as a light, bright red. You can have bright or light, but not both. (Its 3D view can also be useful to visualise these things: you’re building a straight-line bridge between two peaks, and there’s a chasm in between.)

shrx · 5 days ago
I don't get it, why am I seeing the "out of gamut" colors if my sRGB monitor is unable to display them? Would the charts look different on a P3 monitor?

edit: Also, you mentioned the colors "beyond the ranges of human perception" but I don't think there is any such limitation here, the bottleneck is the hardware (computer monitors).

shrx commented on Everything I know about good API design   seangoedecke.com/good-api... · Posted by u/ahamez
jillesvangurp · 5 days ago
API versioning mostly just means things perpetually stuck at v1. You might have the intention to change things up, but you never will.

Putting version numbers in a URL is a bit of a kludge. v1 is the most common version, by far, you will ever see in a url. v2 is rare. v3 is more common strangely. I don't think I've seen a v4 or v5 or higher in the wild very often. That's just not a thing.

My theory is that v1 is the quick and dirty version that developers would like to forget exists. v2 is the "now we know what we're doing!" version and that's usually quickly followed by v3 because if you can change your mind once you can do it twice. After which people just tell developers to quit messing with the API already and keep things stable. v4 and v5 never happen.

Another observation is that semantic versioning for API urls here seems rare. Reason: it's inconvenient for clients to have to update all their URLs every time some developer changes their mind. Most clients will hard code the version. Because it never changes. And because it is hard coded, changing the version becomes inconvenient.

My attitude towards URL based versioning is that you could do it but it's not a tool that you get to use much. Therefore you can safely skip it and it won't be a problem. And in the worst case where you do need it, you can easily add a v2 URL space anyway. But you probably never will as you are unlikely to deprecated the entirety of your API.

There are other ways to deal with deprecating APIs. You can just add new paths or path prefixes in your API as needed. You can use a different domain. Or you can just remove them after some grace period. It depends. Versioning is more aspirational than actually a thing with APIs.

We do version our API but via client headers. Our API client sends a version header. And we check it server side and reject older versions with a version conflict response (409). This enables us to force users of our app to update to something we still support. The version number of our client library increments regularly. Anything falling behind too far we reject. This doesn't work for all use cases. But for a web app this is completely fine.

shrx · 5 days ago
Discord API [0] currently defaults to version 6, with version 10 being already available.

[0] https://discord.com/developers/docs/reference

shrx commented on Pixel 10 Phones   blog.google/products/pixe... · Posted by u/gotmedium
xenadu02 · 9 days ago
The number of people who aren't vocal tech people who actually want a smaller phone is a very small part of the market. In HN-like circles they're a notable minority but among the general population they are a smaller percentage. Especially when you consider huge segments of the market where your phone is your only computing device: a smaller phone is a massive anti-feature in large parts of the world.

Plus almost everyone who says they want a smaller phone will just buy a larger one anyway.

The sales numbers just don't justify it. Like people who pine for manual transmissions: they're vocal in car forums and publications but they're a tiny minority and making one is a money-loser even in the sports car segment.

shrx · 9 days ago
> Plus almost everyone who says they want a smaller phone will just buy a larger one anyway.

The last time I bought a phone I chose Samsung S22, which was way out of my initially intended budget, for the sole reason that there were not any smaller options available below its price range.

shrx commented on The Weight of a Cell   asimov.press/p/cell-weigh... · Posted by u/arbesman
nulld3v · 11 days ago
Most of the budget scales I've seen are accurate to <0.1g. If in doubt, grab a cheap set of calibration weights for $20, I have 2 sets from China and both are accurate to <0.01g on all the weights from 1g up to 200g.

Obviously if you have the money, you can buy actual certified ASTM weights, but they are insanely expensive.

shrx · 11 days ago
You can calibrate the scale with coins as well. They have a pretty well defined mass.
shrx commented on FFmpeg 8.0 adds Whisper support   code.ffmpeg.org/FFmpeg/FF... · Posted by u/rilawa
pawelduda · 16 days ago
Can you give an example why it made your life that much better?
shrx · 16 days ago
As a hard of hearing person, I can now download any video from the internet (e.g. youtube) and generate subtitles on the fly, not having to struggle to understand badly recorded or unintelligible speech.
shrx commented on FFmpeg 8.0 adds Whisper support   code.ffmpeg.org/FFmpeg/FF... · Posted by u/rilawa
lawik · 17 days ago
I wonder if they'll be satisfied there or add a chunk of others now that they've started. Parakeet is supposed to be good?

Should they add Voice Activity Detection? Are these separate filters or just making the whisper filter more fancy?

shrx · 17 days ago
Voice Activity Detection support is already included.
shrx commented on Germany's Fairytale Castles Added to UNESCO's World Heritage List   smithsonianmag.com/smart-... · Posted by u/ulrischa
foobarian · a month ago
If you don't mind going to fake castles made by crazy dudes check out https://www.postojnska-jama.eu/en/predjama-castle/. This one even has a torture chamber!
shrx · a month ago
What do you mean? This is very much a real castle.
shrx commented on New sphere-packing record stems from an unexpected source   quantamagazine.org/new-sp... · Posted by u/pseudolus
Someone · 2 months ago
FTA: “in 100-dimensional space, his method packs roughly 100 times as many spheres; in a million-dimensional space, it packs roughly 1 million times as many“

Nice example of how weird large-dimensional space is. Apparently, when smart minds were asked to put as many 100-dimensional oranges in a 100-dimensional crate as they could, so far, the best they managed to do was fill less than 1% of its space with oranges, and decades of searching couldn’t find a spot to put another one.

shrx · 2 months ago
This doesn't hold true for 2 and 3 dimensions, though.

u/shrx

KarmaCake day1045June 1, 2017View Original