frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

German court rules Meta tracking technology violates European privacy laws

https://therecord.media/german-court-meta-tracking-tech
206•bundie•2h ago•65 comments

Tree Borrows

https://plf.inf.ethz.ch/research/pldi25-tree-borrows.html
466•zdw•16h ago•107 comments

Biomni: A General-Purpose Biomedical AI Agent

https://github.com/snap-stanford/Biomni
175•GavCo•12h ago•28 comments

Generic interfaces

https://go.dev/blog/generic-interfaces
26•Merovius•2d ago•7 comments

A Typology of Canadianisms

https://dchp.arts.ubc.ca/how-to-use
130•gnabgib•9h ago•142 comments

Show HN: FlopperZiro – A DIY open-source Flipper Zero clone

https://github.com/lraton/FlopperZiro
249•iraton•13h ago•58 comments

The Origin of the Research University

https://asteriskmag.com/issues/10/the-origin-of-the-research-university
54•Petiver•3d ago•1 comments

MCP-B: A Protocol for AI Browser Automation

https://mcp-b.ai/
201•bustodisgusto•8h ago•100 comments

Show HN: MCP server for searching and downloading documents from Anna's Archive

https://github.com/iosifache/annas-mcp
125•iosifache•10h ago•34 comments

The jank programming language

https://jank-lang.org/
277•akkad33•3d ago•68 comments

Show HN: BreakerMachines – Modern Circuit Breaker for Rails with Async Support

https://github.com/seuros/breaker_machines
19•seuros•3d ago•5 comments

Code and Trust: Vibrators to Pacemakers

https://punkx.org/jackdoe/code-and-trust.html
29•jackdoe•3d ago•18 comments

Evaluating the Effectiveness of Memory Safety Sanitizers

https://www.computer.org/csdl/proceedings-article/sp/2025/223600a088/21TfesaEHTy
15•signa11•2d ago•3 comments

A fast 3D collision detection algorithm

https://cairno.substack.com/p/improvements-to-the-separating-axis
216•OlympicMarmoto•17h ago•27 comments

I used to prefer permissive licenses and now favor copyleft

https://vitalik.eth.limo/general/2025/07/07/copyleft.html
54•bpierre•8h ago•8 comments

Show HN: Petrichor – a free, open-source, offline music player for macOS

https://github.com/kushalpandya/Petrichor
94•kushalpandya•9h ago•40 comments

White Noise – secure and private messenger

https://www.whitenoise.chat/
83•onhacker•9h ago•37 comments

Configuring Split Horizon DNS with Pi-Hole and Tailscale

https://www.bentasker.co.uk/posts/blog/general/configuring-pihole-to-serve-different-records-to-different-clients.html
95•gm678•14h ago•25 comments

Archaeologists unveil 3,500-year-old city in Peru

https://www.bbc.co.uk/news/articles/c07dmx38kyeo
146•neversaydie•3d ago•51 comments

Solar power has begun to transform the world’s energy system

https://www.newyorker.com/news/annals-of-a-warming-planet/46-billion-years-on-the-sun-is-having-a-moment
104•dmazin•19h ago•141 comments

Linda Yaccarino is leaving X

https://www.nytimes.com/2025/07/09/technology/linda-yaccarino-x-steps-down.html
431•donohoe•16h ago•685 comments

Show HN: I built a playground to showcase what Flux Kontext is good at

https://fluxkontextlab.com
26•Zephyrion•6h ago•4 comments

Bootstrapping a side project into a profitable seven-figure business

https://projectionlab.com/blog/we-reached-1m-arr-with-zero-funding
831•jonkuipers•2d ago•222 comments

Understand CPU Branch Instructions Better

https://chrisfeilbach.com/2025/07/05/understand-cpu-branch-instructions-better/
62•mfiguiere•3d ago•19 comments

Ruby 3.4 frozen string literals: What Rails developers need to know

https://www.prateekcodes.dev/ruby-34-frozen-string-literals-rails-upgrade-guide/
222•thomas_witt•3d ago•111 comments

The most otherworldly, mysterious forms of lightning on Earth

https://www.nationalgeographic.com/science/article/lightning-sprites-transient-luminous-events-thunderstorms
91•Anon84•3d ago•29 comments

HyAB k-means for color quantization

https://30fps.net/pages/hyab-kmeans/
37•ibobev•9h ago•10 comments

Xenharmlib: A music theory library that supports non-western harmonic systems

https://xenharmlib.readthedocs.io/en/latest/
170•retooth•1d ago•15 comments

Making Explainable Minesweeper

https://sublevelgames.github.io/blogs/2025-07-06-making-explainable-minesweeper/
37•greentec•3d ago•27 comments

Multi-Region Row Level Security in CockroachDB

https://www.cockroachlabs.com/blog/fine-grained-access-control-row-level-security/
45•rusticwizard•9h ago•10 comments
Open in hackernews

HyAB k-means for color quantization

https://30fps.net/pages/hyab-kmeans/
37•ibobev•9h ago

Comments

refulgentis•9h ago
Highly recommend Celebi's K-Means, weighted square means.

It feeds the results from a box cutting quantizer (Wu) into K-Means, giving you deterministic initial clusters and deterministic results. It leverages CIELAB distance to avoid a bunch of computation. I used it for Material 3's dynamic color and it was awesome as it enabled higher cluster counts.

mattdesl•9h ago
Surely this would be even faster and potentially better with OKLab? Especially in the context of CIELab based distance metrics like CIEDE2000 which are a bit heavy.

My own gripe with box cutting is that perceptual color spaces tend not to have cube shaped volumes. But they are very fast algorithms.

refulgentis•8h ago
I am very strongly opinionated on this, but am aware this isn't a very serious matter most of the time. Imagine my tongue in cheek, and a smile, i.e. I'm open to discussion:

Oklab is a nightmare in practice - it's not linked to any perceptual color space, but it has the sheen of such in colloquial discussion. It's a singular matmul that is supposed to emulate CAM16 as best as it can.

It reminds me of the initial state of color extraction I walked into at Google, where they were using HSL -- that is more obviously wrong, but I submit they suffer from the same exact issue: their verbiage is close enough to actual verbiage that they obfuscate discussion, and prevent people from working with the actual perceptual spaces, where all of a sudden a ton of problems just...go away.

</end rant>

In practice, quantizers are all slow enough at multimegapixel that I downscale - significantly, IIRC I used 96x96 or 112x112. IIRC you could convert all 16M of RGB to CAM16 and L* in 6 seconds, in debug mode, in Dart, transpiled to Javascript in 2021, so I try to advocate for doing things with a proper color space as much as possible, the perf just doesn't matter.

EDIT: Also, I should point out that my goal was to get a completely dynamic color system built, which required mathematically guaranteeing a given contrast ratio for two given lightness values, no matter hue and chroma, so trying to use pseudo-perceptual-lightness would have been enough to completely prevent that.

I do still think it's bad in general, i.e. if it was people doing effects on images in realtime, a couple weeks ago I finally got past what I had internally at Google, and was able to use appearance modeling (i.e. the AM in CAM-16) to do an exquisite UI whose colors change based on the lighting naturally. https://x.com/jpohhhh/status/1937698857879515450

mattdesl•8h ago
It does a pretty good job at emulating CAM16 with a fraction of the parameters, computational complexity, and processing; it’s no wonder it was adopted by CSS.

I don’t know what you mean by “not being linked to any perceptual color space” - it is derived from CAM16 & CIEDE2000, pretty similar in ethos to other spaces like ITP and the more recently published sUCS.

There’s also tons of discussion on w3c GitHub about OKLab, and it’s evolved in many ways since the original blog post such as improved matrices, new lightness estimate and OKHSV/OKHSL, and very useful cusp & gamut approximations.

I have a hard time seeing how it’s a nightmare in practice!

refulgentis•8h ago
Because it is a matmul best-effort approximation of a perceptual color space, not a perceptual one, and in my experience that's a significant difference when deployed and for design. YMMV. :)

I cringe myself, it sounds like a nitpick, but it's an extremely significant upgrade in every case.

Most concretely, if I use actual L*, design can use palettes linked to L* and vary hue / colorfulness while meeting any contrast standard.

jcelerier•7h ago
> IIRC you could convert all 16M of RGB to CAM16 and L* in 6 seconds, in debug mode, in Dart, transpiled to Javascript in 2021, so I try to advocate for doing things with a proper color space as much as possible, the perf just doesn't matter.

Coming from the "real-time graphics" world, if I read that something which is going to be a minor part of your whole pipeline would take 6 seconds (or even 600 or 60 ms) it would be instantly disqualified so I don't really understand why you'd say "the perf just doesn't matter" ?

refulgentis•6h ago
> I don't understand how "the perf just doesn't matter"

Ah, apologies, I don't mean to imply color perf never matters :)

The paragraph is discussing a color quantization algorithm to extract colors from an image, not color conversion in general. It's very hard in that situation

> "a minor part of your whole pipeline would take 6 seconds (or even 600 or 60 ms"

Ah, apologies for the lack of clarity: you don't need to ever convert the entirety of RGB to CAM16 and L*. :) That's just a rough instructive benchmark I can remember.

If I'm worried about realtime, say, I know I want to convert an 6K* wallpaper with realtime appearance modelling, at 120 fps on 2022 Android, I use a shader. 0 perf issues so far. (knock on wood)

* now that I think about it...it's probably at display res, not the original 6K. Maybe 2 megapixel? shrugs

gardaani•2h ago
> Oklab is a nightmare in practice - it's not linked to any perceptual color space, but it has the sheen of such in colloquial discussion. It's a singular matmul that is supposed to emulate CAM16 as best as it can.

Oklab is perceptually uniform and addresses issues such as unexpected hue and lightness changes in blue colors present in the CIELAB color space. https://en.wikipedia.org/wiki/Oklab_color_space

Oklab is used in CSS because it creates smoother gradients and better gamut mapping of out-of-gamut colors than Lab. Here's a picture how Oklch (on the left) creates smoother gamut mapping than CIE Lch (on the right) ("Explore OKLab gamut mapping in oklch"): https://github.com/w3c/csswg-drafts/issues/9449#issuecomment...

yorwba•23m ago
Oklab is not perceptually uniform. It's better than other color spaces with equally simple conversion functions, but in the end, it was created as a simple approximation to more complex color spaces, so compared to the best you could do, it's merely OK (hence the name).
mattdesl•8h ago
I’ve done some color quantization tests with HyAB and OKLab on this same image. A couple notes:

- what works well for this image might not work well for other images! I learned the hard way after lots of testing on this image, only to find things that did not generalize well.

- parametrizing the AB plane weight is pretty useful for color quantization; I’ve found some images will be best with more weight given to colour, and other images need more weight given to tone. OKLab creator suggests a factor of 2 in deltaEOK[1] but again this is something that should be adjustable IMHO..

- there’s another interesting and efficient color space (poorly named) sUCS and sCAM[2] that boasts impressive results in their paper for tasks like this. Although I’ve found it not much better for my needs than OKLab in my brief tests[3] (and note, both color spaces are derived using CIEDE2000)

[1] https://github.com/color-js/color.js/blob/9d812464aa318a9b47...

[2] https://opg.optica.org/oe/fulltext.cfm?uri=oe-32-3-3100&id=5...

[3] https://x.com/mattdesl/status/1902699888057446670