14,081 karma · joined Mar 7, 2014 (12y ago) · 1,887 submissions
comment 3y ago · link · parent
[1]: https://www.bellingcat.com/news/2023/04/09/from-discord-to-4...
[2]: https://www.washingtonpost.com/technology/2023/04/12/discord...
[3]: https://www.emptywheel.net/2023/04/13/bear-versus-pig-on-the...
comment 3y ago · link · parent
comment 3y ago · link · parent
It never went anywhere. One flaw is that it doesn't help with certain glyphs with complex shapes, like the 'g' in Times Roman. These days, even smaller devices tend to have high resolution displays, so the need is not as strong.
comment 3y ago · link · parent
comment 3y ago · link · parent
WebGPU 1.0 is a lowest common denominator product. As 'FL33TW00D points out, matrix multiplication performance is much lower than you'd hope from native. However, it is possible to run machine learning workloads, and getting that performance back is merely an engineering challenge. A few extensions are needed, in particular cooperative matrix multiply (also known as tensor cores, WMMA, or simd_matrix). That in turn depends on subgroups, which have some complex portability concerns[1].
Bindless is another thing everybody wants. The wgpu team is working on a native extension[2], which will inform web standardization as well. I am confident this will happen.
The future looks bright. If you are learning GPU, I now highly recommend WebGPU, as it lets you learn modern techniques (including compute), and those skills will transfer to native APIs including Vulkan, Metal, and D3D12.
Disclosure: I work at Google and have been involved in WebGPU development, but on a different team and as one who has been quite critical of aspects of WebGPU.
(*): If you're writing a serious, high quality textbook on compute with WebGPU, then I will collaborate on a chapter on prefix sums / scan.
[1]: https://github.com/gpuweb/gpuweb/issues/3950
[2]: https://docs.rs/wgpu/latest/wgpu/struct.Features.html#associ...*
comment 3y ago · link · parent
https://fuchsia.googlesource.com/fuchsia/+/master/tools/carg...
comment 3y ago · link · parent
However, the experience when doing pure Rust is night and day compared with stuff like CMake. And even in a polyglot build, the Cargo manifest is a reasonably good starting point, as argued recently by matklad[1].
Obviously, build systems and package managers at large scale are very challenging to get right, otherwise we'd have a good solution by now. I personally think Bazel is a pretty good step in the right direction, but it's very clunky and awkward for smaller projects. I found Neil Mitchell's classification[2] useful. Cargo is best-in-class for the "small" and arguably "medium" cases, but starts showing its limitations beyond that. Bazel is the reverse, one of the few really workable choices for "huge" but not a great experience otherwise.
[1]: https://matklad.github.io/2023/03/28/rust-is-a-scalable-lang...
[2]: https://neilmitchell.blogspot.com/2021/09/small-project-buil...
comment 3y ago · link · parent
C++, by contrast, has a tradition of maintaining backwards compatibility, but it is not enforced systematically, and in practice migrating to newer versions of C++ can be a painful process. Thus, in many application domains (especially embedded), developers are stuck on very old versions of the language. There's also a very sticky issue of whether binary (ABI) compatibility is guaranteed. There's nothing in the standards process that guarantees this, but there has been huge resistance to proposed improvements that break ABI. This was a particular sticking point for Google[1], as it affects unique_ptr, making it not so much the zero cost abstraction as originally hoped.
Language evolution is a difficult problem, and there is no magic, obviously correct answer to it. But I think Rust has a good, pragmatic approach, and the flaws such as Range are a very small part of the overall language surface area.
Modules are a particularly disruptive to the ecosystem. It's taking a long time to get them properly implemented in C++, and it also requires fairly major changes to code bases, build systems, and other infrastructure to migrate to them. By contrast, Rust has had a decent module system since 1.0 (with various tweaks and changes through the edition mechanism).
Edit: and as 'wongarsu says in a sibling comment, another part of the joke is that Rust doesn't need as much evolution as C++, as it already has a lot of the advantages such as a working module system.
[1]: https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2020/p20...
comment 3y ago · link · parent
comment 3y ago · link · parent
comment 3y ago · link · parent
In this particular case, what's being satirized are a fairly complex mix of perceptions about community and what actually builds a programming language ecosystem. I was able to poke gentle fun at myself (the Android font vulnerability) while also taking down some of the worst arguments out there, sadly common though. All this would be hard to express as a straight opinion piece.
Probably the biggest problem with this piece is that it has a moderately specialized audience. If you follow the adoption of Rust closely, hopefully you'll get a good chuckle. If you're only dimly aware of that, then there are too many insider jokes.
[I had intended to be "in character" in the comments here today, but have reconsidered. Appreciate the feedback, and happy to discuss substantive points]
347.
Moving from Rust to C++(raphlinus.github.io ↗)
280 points · by raphlinus · 3y ago · 132 comments
comment 3y ago · link · parent
comment 3y ago · link · parent
By all means, please write the brilliant take yourself, and I will happily upvote and reference it.
comment 3y ago · link · parent
Thomas Phinney, Font Detective[2] is the first person I'd ask, as he's done this professionally, though I have done a bit of it myself.
comment 3y ago · link · parent
comment 3y ago · link · parent
comment 3y ago · link · parent
Now consider a binary operator combining two such values. It is associative and has X as an identity element, thus is a monoid:
\ 0 1 X
+------
0 | 0 0 0
1 | 1 1 1
X | 0 1 X
Now you can express the carry output of bit i as the inclusive scan (prefix sum) of these values from 0 to i. Because it's a monoid, you can implement it efficiently in parallel. There's a nontrivial literature in digital electronics exploiting this basic fact.Of course, to me everything is a monoid (including rendering vector graphics paths), so it should come as no surprise that I see things this way.
comment 3y ago · link · parent
[1]: https://developer.apple.com/library/archive/documentation/Pe...
comment 3y ago · link · parent
Last week I had occasion to dig deeply into the microarchitecture of the Apple M1 and M2 GPUs (which are very similar to the A series on mobile). I found the metal-benchmarks[1] repo to be very useful, and, relevant to this article, it contains a comparison to the RDNA generations. From that it appears that GPU microarchitectures are starting to converge, even if terminology is not. The standard configuration these days seems to be blocks of 128 threads (WGP's in AMD terminology, "cores" in Apple), organized into 4 SIMDs. Resources like workgroup memory (LDS in AMD lingo) are shared among each of these 128-blocks.
The linked repo also has links to other resources, including the incredible work being done by the Asahi Linux people to reverse engineer M1 and deliver working open source GPU drivers.