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 6y ago · link · parent

It's work in progress. I was hoping to get more done on the renderer but various things have been slowing me down. But lately I've been feeling a new burst of energy, so hope to have something more to show before long.

I agree that the talk raises a lot of questions. Hopefully that's a good thing, as I think they deserve the attention of curious people!

Regarding the mismatch between 3D hardware and 2D rendering, we'll need hard empirical numbers, but the approach I'm taking is basically to write a software renderer (not unlike Cairo or even libart which predates it), just one that's designed for massive parallelism so it can run on the GPU. This will have performance characteristics more similar to Cairo (just faster as so much more throughput is available) than rasterization-based approaches. The latter really fall down when there's soft clipping and lots of blending, as that requires generation of intermediate texture buffers. I do address this in the talk :)

I hope I will have more solid answers for some of these questions before long.

comment 6y ago · link · parent

That could be the subject of a whole other talk :)

The memory model is needed to do more sophisticated communication between the parallel workgroups. The classic example is to make a queue, even a simple one such as a simple single-producer single-consumer ring buffer (for communication between a pair of workgroups). The way this works, the producer fills an element in the buffer, then bumps an index. The consumer observes the index, then reads the element from the buffer.

Without a memory model, there's no way to guarantee that this ordering is preserved, and (to map this to hardware), the write of the index bump could flow through the caches, while the write of the element could still be "dirty" in the cache on the producer, so the consumer reads stale data.

What the memory model does is provide the programmer an explicit way to express ordering constraints. So the write of the index bump is with "release" semantics and the read of that by the consumer is with "acquire" semantics, which guarantees that producer writes before the release are visible to consumer reads after the acquire.

This unlocks a whole range of sophisticated concurrent data structures, such as concurrent hash maps, fancier memory allocation (even without a memory model, a simple allocate-only bump allocator is feasible), and so on.

Thanks for the question and kind words, I hope this illuminates.

comment 6y ago · link · parent

No, precisely because I see the emerging alternatives as being based on Vulkan and SPIR-V, which I believe have momentum far greater than OpenCL. The only question is whether a compute platform based on these standards and open source tools could be anywhere nearly as good as CUDA. I believe we're far from that today, but it is possible and there's a lot of good work in that direction.

comment 6y ago · link · parent

I think this Economist visualization tracking excess mortality should give you the answers you're looking for: https://www.economist.com/graphic-detail/2020/04/16/tracking...

comment 6y ago · link · parent

This is a talk I gave at Jane Street late February on GPU compute, especially using graphics API's such as Vulkan and the upcoming WGPU. Feel free to scan through the slides [1], and to ask me anything.

[1]: https://docs.google.com/presentation/d/1FRH81IW9RffkJjm6ILFZ...

comment 6y ago · link · parent

Congrats! Enjoy your time there. There's lots of good people, including some programming language luminaries.

comment 6y ago · link · parent

Here's an expert thread (for example): https://twitter.com/richardneher/status/1250533354560159745

comment 6y ago · link · parent

Here's my attempt to validate the claim: https://trends.google.com/trends/explore?date=2019-01-01%202...

I'll leave it for readers to determine whether it holds up.

comment 6y ago · link · parent

It samples cases that are detected after the fact, from which they are able to reconstruct the phylogeny with impressive clarity. If you are not familiar with the work of nextstrain.org, I highly recommend it, they are brilliant.

comment 6y ago · link · parent

No.

We know from genomic analysis [1] that "The common ancestor of circulating viruses appears to have emerged in Wuhan, China, in late Nov or early Dec 2019."

It's fun to speculate about other possibilities, but I personally like to stick to what the science tells us.

[1]: https://twitter.com/nextstrain/status/1248707010750640128

1271.

A Taste of GPU Compute [video](youtube.com ↗)

280 points · by raphlinus · 6y ago · 165 comments

comment 6y ago · link · parent

That's a lot of interpretation from 6 cases. There's a lot of serological testing being done right now, and we'll have hard data soon, but from what I see from expert epidemiologists (disclosure: I'm not one myself), the idea that we have a vast number of completely asymptomatic cases is wishful thinking.

comment 6y ago · link · parent

They applied the combination of shoe leather and tech effectively. I think tech on its own without a robust public health infrastructure would be pretty ineffective, but the latter on its own could do well.

https://khn.org/news/how-do-we-exit-the-shutdown-hire-an-arm...

comment 6y ago · link · parent

https://twitter.com/MarkLevineNYC/status/1250170016504430595

@MarkLevineNYC BREAKING: NYC publishes, for first time, data on fatalities that includes "probable" cases (those without a confirmed test result).

It has pushed the death toll in NYC up by 57%.

Was 6,589 before this adjustment. Now stands at 10,367. This is a painful but necessary accounting.

comment 6y ago · link · parent

Very likely you meant https://en.wikipedia.org/wiki/FRACTRAN. Agree this is a clever beast.

comment 6y ago · link · parent

~~Please change it back. I appreciate ~dvdt's humorous yet candid explanation that they're using the simplest of machine learning techniques, but unless they explicitly say that it is indeed simple linear regression, I think it risks inaccuracy to describe it so specifically.~~

ETA: never mind, ~dvdt signed off on the change. Appreciate the collaboration!

comment 6y ago · link · parent

I'm not qualified to say either way, but here's the relevant thread: https://twitter.com/trvrb/status/1244750382338719745

Also, for people who don't know, Trevor is arguably the single most expert person in the world to weigh in on this.

And here's the specific thread where he predicts it will take a few years for the virus to mutate enough to significantly hinder a vaccine: https://twitter.com/trvrb/status/1242628550563250176

comment 6y ago · link · parent

The thought occurred to me as well, I got a strong sense of "playing with fire." However, viruses have a very high mutation rate as it is [1], so I'm not sure how much difference it makes.

Btw, one of the best markers for overconfident but uninformed analysis is overinterpreting the fact that we have all these strains of SARS-CoV-2 as suggesting they have different degrees of infectiousness or health impacts. Certainly the different flu strains do, and, thanks to fine-grained sequencing efforts (Nextstrain in particular is doing awesome work) we can see lots of strains of this one, but Trevor Bedford has estimated that we have about a year or more before the variation in strains has an impact other than being able to "fingerprint" the chains of transmission.

[1]: https://jvi.asm.org/content/92/14/e01031-17

1279.

(NHC, EIDD-1931) has broad spectrum antiviral activity against SARS-CoV-2(stm.sciencemag.org ↗)

2 points · by raphlinus · 6y ago · discuss

comment 6y ago · link · parent

I'm a fan of this review, and of Derek Lowe in general. I especially like the way he explains effect size and also the reasons why we have to be cautious when looking at promising drugs.

Another take, by James Hamblin at the Atlantic: https://www.theatlantic.com/health/archive/2020/04/hydroxych...

This is written for a more general audience, and is not shy about taking on the more political aspects, including the clashing agendas of the people promoting HCQ and those urging a more skeptical approach.

comment 6y ago · link · parent

A really excellent review, published today, of the current state of knowledge on HCQ: https://blogs.sciencemag.org/pipeline/archives/2020/04/06/hy...

Note this is by Derek Lowe of "Things I won't work with" fame, an extremely informative series about entertainingly dangerous chemicals.

And here's a new piece of candy for people who want to get their hopes up about a promising treatment: https://stm.sciencemag.org/content/early/2020/04/03/scitrans...

(h/t Helen Branswell of STAT news, who is very much worth following, who retweeted Timothy Sheahan)

comment 6y ago · link · parent

For covid-19 I've curated this list:

https://twitter.com/i/lists/1239639611694911489

All the people on it are serious experts. I've also left out some people who are worth listening to, but have a political bias or express a lot of emotion (it's hard not to be angry).

I spend way too much time getting up to speed, but (a) there's a lot of stuff I find interesting (I studied molecular and cell bio a bit during my Masters), and (b) would rather err on the side of over-learning than being misinformed.

If you want secondary sources rather than primary, try STAT news. They've been excellent.

The quality of discussion in other fora (including HN) has been quite disappointing.

comment 6y ago · link · parent

That was true a few years ago, but fortunately the state of the art for 2D rendering on GPU has been moving forward. Among others, Pathfinder 3 is quite comparable in quality to Freetype, and there are lots of good results coming out for performant vector drawing on GPU, including my own piet-metal work.

comment 6y ago · link · parent

Agreed. I've been following Scott Gottlieb for a while, he's one of the favorite experts on my Twitter list[1] (carefully curated to avoid political bias). We should be evaluating these kinds of proposals on the basis of competence, and they deliver.

There seems to be a convergence of expert opinion around these kinds of proposals, see [2] for a quick survey. ("These two roadmaps are the same as all the others. Variations on a theme.")

[1]: https://twitter.com/i/lists/1239639611694911489

[2]: https://twitter.com/j_g_allen/status/1244371548410175501

comment 6y ago · link · parent

The word "surveillance" in healthcare is a little different than in regular politics - it basically means gathering information from the field. See [1].

However, we're going to be seeing a lot of discussion about infectious disease surveillance and the more nefarious types. As Maciej Cegłowski has pointed out, we are already doing the nefarious kind on a massive scale in order to target ads more effectively.

I do believe there's a middle ground, that this stuff can be done in a way that preserves human rights. But it will require attention and holding those who have the power to abuse the system accountable.

[1]: https://journalofethics.ama-assn.org/article/surveillance-in...

comment 6y ago · link · parent

I consider it not in-RAM.

There's another variant, iirc sorting telephone numbers, in "Programming Pearls," but it requires a different approach.

comment 6y ago · link · parent

I'm a fan of the actual (in-RAM, no tricks) problem and its variants. The entropy of the sorted list is 0.96MiB so it is theoretically possible (see https://news.ycombinator.com/item?id=4679756), but I've not seen a good writeup of an actual algorithm.

My personal favorite variant of this is sorting 1M 32-bit integers using 2MiB of RAM. This is possible and I coded it up for fun a few years ago. Here's the specific encoding I used for the sorted list: A '0' bit followed by 12 bits of payload generates a number which is those 12 bits added to a global state counter. A '1' bit increments the global state counter by 2^12. It's easy to work out the memory requirements (it's constant for all sorted lists of the same length): 2^20 bits for the '1' bits (to reach a maximum value of 2^32) plus 10^6 * 13 bits for the integers. This is exactly 1,756,072 bytes, which leaves plenty of extra space.

ETA: unfortunately a simple adaptation of this technique doesn't quite work for this problem; the optimum payload size for 1e6 integers up to 1e8 is 6 bits, but even with that the representation takes 1046kiB, and the budget is 1024kiB.

comment 6y ago · link · parent

It's the same platform as runs an existing flu test. Obviously the Covid-19 version was done in a rush, so it might not be quite as good, but the sensitivity and specificity rates for influenza are amazing: sensitivity above 95% and specificity near 100%.

Source: https://www.ncbi.nlm.nih.gov/pubmed/31558351

comment 6y ago · link · parent

Another test, from BioFire. These look like they're rolling out pretty rapidly now: https://www.biomerieux-usa.com/biomerieux-receives-emergency...

comment 6y ago · link · parent

Here some more facts I found interesting:

* It works on isothermal amplification [1] rather than temperature-cycling PCR, so it's much faster.

* It detects the viral RNA directly, so it should be detecting pretty much the same thing as existing PCR-based tests, just much faster.

* It's the same platform as a flu test. Obviously the Covid-19 version was done in a rush, so it might not be quite as good, but the sensitivity and specificity rates for influenza are amazing: sensitivity above 95% and specificity near 100%. If the numbers for Covid-19 are close, I can see why Gottlieb is calling it a game changer.

I really have to be impressed by our collective technical ingenuity, both the scientists figuring this stuff out in near real-time, equipment manufacturers such as Abbott who can do this, and of course the front-line health providers.

[1] https://en.wikipedia.org/wiki/Loop-mediated_isothermal_ampli...

[2] https://www.ncbi.nlm.nih.gov/pubmed/31558351

1
424344
63