Better HN
topnewbestaskshowjobs
Log inSign up

raphlinus

14,081 karma · joined Mar 7, 2014 (12y ago) · 1,887 submissions

I do research on fundamental UI technology and 2D graphics, with a focus on Rust and fonts. @raph@mastodon.online
Submissions

comment 5y ago · link · parent

The first. I should have added "perceptually uniform," kelsolaar is correct.

comment 5y ago · link · parent

It's a good point, I wasn't precise in my language. A good way to understand it is that if two different colors have the same lightness (or hue, or saturation) in some color space, that "predicts" that they will be perceived to have the same lightness as well. It's impossible to get these predictions exactly right (in part because actual perception depends on so many variables), but some can be better than others.

Another useful function of a color space is to predict the threshold of when two similar colors are just barely perceptibly different.

963.

An interactive review of the Oklab perceptual color space(raphlinus.github.io ↗)

120 points · by raphlinus · 5y ago · 33 comments

comment 5y ago · link · parent

I've been watching with some interest, and feel like I don't know anywhere near the whole story. We all look for "good guys" and "bad guys" to make sense of a narrative, but I come away with the feeling that Ms Jones is not solidly in the former camp. One data point I have for this is the way she tears down others who are doing their best work, for example a very public feud with Emily Oster: https://twitter.com/GeoRebekah/status/1344067350216265729

We have some serious work to do. I'm very hopeful that we're going to have a very solid team at the national leadership level in 3 days, after a year of a vacuum, but I'm still concerned about state and local levels. I don't think these types of personality fights are very helpful.

comment 5y ago · link · parent

I don't think we should halt investigations. But the Baker article is not a serious investigation, it's a piece of pop-sci that is quite careless about scientific details. It is not helpful to those trying to understand the truth, but it might be an entertaining read or useful for other purposes.

comment 5y ago · link · parent

Of course we can and should scrutinize the claims of highly regarded people. For example, Michael Levitt has a Nobel Prize and I've publicly criticized him when I was convinced he was utterly wrong: https://twitter.com/raphlinus/status/1297182969514270721

The mask issue was a debacle from a scientific communications point of view. In the early days, there was legitimate debate among scientists regarding the value of masks. But I think the main thing that went wrong was a paternalistic attitude, trying to address supply chain issues of N95 mask usage by medical and other frontline workers by convincing people that masks weren't effective. That, I think most agree, was a huge mistake.

Of course, your actual statement that highly regarded virologists tweeting that masks were "stupid" and "couldn't be effective" is false, and you probably know that.

comment 5y ago · link · parent

Here's one such rebuttal: https://medium.com/@stoilov_77462/response-to-yuri-deigin-th...

comment 5y ago · link · parent

I should clarify, neither I nor Dr. Rasmussen are claiming that we know what the true origin is, or that zoonotic spillover is definitely what happened. There is not enough evidence to make such a definitive conclusion. I can see how people might read my comment as implicitly asserting that if people did understand the empirical facts they would come to the conclusion of zoonotic origin.

That said, there are facts, and they are relevant: the fact that COV RaTG13 has 96.2% similarity to SARS-COV-2. The incredible diversity of bat coronaviruses, and the fact that only fraction are studied and understood, despite serious study by the WIV.

Here's another good quote from another good thread: And investigating zoonotic origins can take decades, and you may NEVER find the "smoking bat" or whatever other intermediate species that may be involved. It's like looking for a needle in a planet-sized haystack. -- https://twitter.com/angie_rasmussen/status/13497545972759142...

The main point that I was trying to make, which I stand by, is that most people are going to base their beliefs about this question on essentially political considerations: do you trust the CCP or the US State Dept more? Unfortunately, both of those institutions have done terrible damage to objective scientific inquiry, and in my opinion neither one is really deserving of trust. Better to follow the science where it leads, but this is an often frustrating and time consuming process.

comment 5y ago · link · parent

This article is bullshit and real virologists are angry it's getting so much attention: https://twitter.com/angie_rasmussen/status/13462321954305105...

You may or may not have noticed, but there are some real problems we should be thinking about, including the very real probability that the B.1.1.7 variant is going to be much harder to suppress, and how to get our vaccination program on track. Instead we end up talking about these distractions that have much more speculation than evidence behind them.

comment 5y ago · link · parent

There are a lot of anecdotal stories like these, but the idea that Covid was circulating widely in the US before January just isn't consistent with the evidence on the ground. Trevor Bedford has written about this several times [1], and he would know, the phylogenetic work he and his team have been doing is one of the most sensitive instruments we have in figuring out how this thing spreads.

So this basically boils down to who to trust, your friend's uncle who works at Nintendo, or a highly regarded evolutionary biologist.

[1]: https://twitter.com/trvrb/status/1249414291297464321

comment 5y ago · link · parent

I like Carl Bergstrom's take on this:

I have reason to believe that if the outgoing administration claims to have reason to believe something but refuses to provide the evidence behind it, they are lying.

https://twitter.com/CT_Bergstrom/status/1350292056782954498

Here's a very serious, legitimate review of the possible origins of SARS-CoV-2: https://www.nature.com/articles/s41591-020-01205-5

Unfortunately, from my experience, most people are going to believe what they want to believe, based more on political affiliation more than anything else, and the empirical facts don't register too strongly.

comment 5y ago · link · parent

Another example of HN being amazing. In the interest of playing too, I did some work on reducing audio latency in Android, but that all predated AAudio/Oboe, which takes that quite a bit further and makes at least the Pixel devices a plausible platform for low-latency audio collaboration apps as suggested in this thread. I for one would love to see that happen - I miss singing hymns on Sunday mornings.

comment 5y ago · link · parent

My favorite of these was the discussion section of a popular lefty blog where any mention of "socialism" or "socialist" was routed to moderation and had to be unblocked manually. Not because of profanity, but a particularly pernicious spam problem at the time.

comment 5y ago · link · parent

I think the central claim of this article is something of a mainstream concern. For example, here's a blog by Tom Frieden, who is in my opinion one of the more credible voices: https://www.tomfriedenpublichealth.net/tom-frieden-blog#janu... . Other virologists and epidemiologists who I follow on Twitter are saying similar things.

comment 5y ago · link · parent

Doesn't compare to this one: https://twitter.com/stevennelson10/status/134690995241006284...

I have difficulty believing it's real, but it's from the account of a legit reporter. I predict, this will be one of the iconic images from the 53rd week of 2020.

comment 5y ago · link · parent

See the recent Oklab post[0] for guidance on choosing a perceptually uniform color space for gradients. It's better than CIELab and CIELuv, both of which I would consider inferior to newer alternatives. In particular CIELab has particularly bad hue shifts in the blue range.

I'm also working on a blog post on this topic (there's an issue open in the repo for my blog, for the curious).

[0]: https://news.ycombinator.com/item?id=25525726

comment 5y ago · link · parent

I'm trying to figure out whether this is a compliment, a criticism, or both. When topics related to 2D graphics come up, there's a fair chance I've done some relevant work in the area. I plan to continue shamelessly hawking my results, as that's an important part of a research pipeline :)

comment 5y ago · link · parent

Any ordered dithering algorithm will animate pretty smoothly, but techniques based on error diffusion will have a "swimming" effect. Lucas Pope's devlog goes into considerable detail. Here's a good starting point: https://forums.tigsource.com/index.php?topic=40832.msg104520...

(ETA: also the link that gruez posted. HN seems to be having some performance issues)

comment 5y ago · link · parent

Output dependent feedback is another good way to get creamy, evenly dispersed dots in highlight and shadow areas:

https://levien.com/output_dependent_feedback.pdf

comment 5y ago · link · parent

Thanks, appreciate the kind words!

Disclosure/shameless self-brag: I wrote the original synthesizer engine that became Dexed, though the team has moved it forward in lots of important ways. I did careful reverse engineering of an actual DX7 II, including disassembling its ROM, so the fact that it matches well should not be surprising.

comment 5y ago · link · parent

The problem is that if you sample a mathematical waveform such as a sawtooth wave, it contains infinitely high frequencies, so the act of sampling creates aliasing.

There are a lot of solutions to this in the literature, such as wavetables that are band-limited, but for simple virtual analog synthesizers, there's a technique that is close to magic in its simplicity and quality: PolyBLEP. Check it out.

comment 5y ago · link · parent

It's amusing. If one were to actually follow your links and start fact-checking, they would see some pretty obvious factual errors in the sources, or cases where the actual source doesn't support the argument made here.

If your mission was to be a false flag to reinforce the notion that conservatives just lie, lie, lie to support their positions, because they are incapable of supporting them with facts and reason, then: well done sir! Very good job.

In any case, I hope you have a happy new year and stay safe.

comment 5y ago · link · parent

Speaking personally, I do my best to reconcile a spiritual practice and spiritual beliefs, which I believe are separate from empirical truth, with an intellectual rigor about the latter. Again, this something I apsire to, not always achieve.

This is a complex topic, and I think a little orthogonal to the main point I was making, and also Nadia's essay. For some reason, the story of the Mormon archaeologists such as Thomas Stuart Ferguson comes to mind - they had to struggle to reconcile these two poles (which were in strong tension), and for the most part ended up keeping their cultural ties to the church while feeling a loss of their personal religious faith.

comment 5y ago · link · parent

Right. It is politically charged, and I also think climate change is an important problem which humanity needs to solve. Competing lies is not a good way to do it, but increasingly it seems like that's how a lot of people are approaching it.

comment 5y ago · link · parent

Yup, this has been a good year for me on HN. Not just that most of my posts have been featured, but also that there's been some really substantive discussion and I've learned a lot. Thanks to dang for doing the hard work of moderating the place.

comment 5y ago · link · parent

By the way, I don't say I never lie, just something that I aspire to.

The classic test case is: what if the Nazis are at the door, asking whether you're harboring a Jewish refugee in your attic. I personally would lie in this case, and I believe most Quakers would as well.

A more subtle example: exaggerating the effects of climate change to motivate people to take action, for example claiming that Miami will be underwater in our lifetimes if we don't act. A lot of people I know do fudge the truth in this way, even if it isn't a conscious act of lying. I personally am not in favor, partly as a matter of faith, partly because I don't think it's an effective longer term strategy, but at the same time I think the argument for it is defensible.

BTW, a very good inquiry using that particular example is Dan Ariely's interview on Amanpour: https://www.youtube.com/watch?v=aLheBtBpZQw ; this example comes up at about 14:10. I can really recommend watching it, as Ariely is really trying to understand human behavior, not just retconning principles to justify his personal positions.

comment 5y ago · link · parent

Speaking for myself, I believe that some truth can be known by humans, but my faith is more about the ideal to strive for it. My Quaker faith speaks of "continuing revelation," particularly in contrast to originalism. But when I use the word "lying" I am very specific about an intentional act of deception. You don't have to get deep into philosophy or theology to figure that out, though there are always shades of whether the deceptive person believes their own lies.

comment 5y ago · link · parent

I think shamelessness is a useful concept, but not really in isolation. Related topics include: the incentive structure around the strategy and whether the focus of the shame is a morally good or bad thing.

My personal moral code is that lying is bad; this is an article of faith for me, a central tenet of my religion. I find it incredibly disturbing that shameless lying is increasingly a successful political strategy. Lying has always been associated with politicians, but the shameless aspect seems newer to me.

If you were to talk about shame a few decades ago, one of the first things that would come to mind is sexual morality. Yet, some of the people I admire the most from that time are shameless homosexuals like Larry Kramer, who were incredibly effective advocates not only for AIDS health issues, but also for gay rights in general. And attitudes have indeed shifted, remarkably quickly.

The fact that a strategy is successful tells you more about the incentive structure around the strategy than it does about the person executing the strategy. And the incentive structure around lying in particular is just broken - the most effective liars are celebrated for their skill, the "owning" of their more reality-based opponents. In this incentive environment, it is inevitable that people and institutions will adapt.

I don't have a solution, but I do know that digital media in its current form is not it. When I was younger, I was idealistic about the idea that free and convenient access to the truth would make lie-based narratives harder to sustain, but now we're seeing the opposite. I personally would focus on that rather than the particular mechanism of shame and shamelessness.

comment 5y ago · link · parent

Your comments warm my heart greatly. Thanks, and I hope you continue enjoying your learning path.

comment 5y ago · link · parent

I'll say a little more, as you've obviously put some time into trying to understand the code. You're generally on the right track.

The curve family is basically the same as the 4-parameter spline curve in my thesis when bias <= 1.0, except the parametrization is different. The magic (the "seemingly bizarre function") happens when bias > 1.0, in which case it describes a curve that's inspired by an elastica as the tension goes up, though the details are a bit different. Also note that when both bias values are 1.0, the curve is an Euler spiral, which I consider especially beautiful and suitable for interactive design.

Regarding solving the curve equations, yes, it has to do some solving in order to get the curve into place. It doesn't have to be a full differential equation solver, though, fundamentally it's a doubly nested integral - the expression of curvature as a function of arclength is a Cesàro equation, and integrating that once gives a Whewell equation.

G2 continuity is enforced by the spline solver, particularly `iterate` (with some help from `adjust_tensions` for cases where an auto point is opposite on off-curve point). The current version of that solver is a bit hacky and not 100% robust. Basically it computes the curvature error at each on-curve point, then pushes the tangent at that point in the direction of reducing the error.

As I said, I'll do a full explanation of the math before long. Hopefully that will address a lot of your questions.

1
323334
63