Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
pcwalton
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
21 ms
·
241.
▲
by
pcwalton
2y ago
> the only feasible explanation is that Apple is hoping to somehow force developers into using Metal natively I'm told the problem is some legal spat between Apple and Khronos that has led to a "no Khronos standards anywhere at
242.
▲
by
pcwalton
2y ago
You're confusing device-specific APIs with OS-specific APIs. There's a big difference. DX11, DX12, Metal, etc. are themselves all abstraction layers over what are in some cases very different hardware designs. (This will eventuall
243.
▲
by
pcwalton
2y ago
> You then say that if they used Vulkan, it would mean they wouldn't have to debug on a Mac. This is overly optimistic. Sure, but supporting two variants of Vulkan is less work than having to support two incompatible APIs. It's
244.
▲
by
pcwalton
2y ago
Vulkan probably wouldn't help macOS gaming from a users' point of view, but it sure would be nice for us engine developers. There aren't many Vulkan games , but the big 3 non-in-house game engines (Unreal, Unity, Godot) ar
245.
▲
by
pcwalton
2y ago
Well, I don't know what "worse" means in this context. If it means "less memory safe", that's clearly not true: RefCell and Mutex are formally memory safe, while the C++ equivalents are not. If it means "l
246.
▲
by
pcwalton
2y ago
I do wonder whether kana might be slightly easier to read if ん were written as part of the preceding syllable like it is in hangul.
247.
▲
by
pcwalton
2y ago
70% of high severity security problems in Chrome are memory safety bugs: https://www.chromium.org/Home/chromium-security/memory-safet... You can find several papers about Rust in particular by searching for [rust
248.
▲
by
pcwalton
2y ago
Userspace-paged data is a tiny fraction of the amount of data that C++ programs, taken as a whole, process, and is a very weak argument for dropping static memory safety. Besides, because of unsafe, any Rust-like language, like Circle C++,
249.
▲
by
pcwalton
2y ago
> They handle the 80% case where compile-time safety, destructive moves, etc make things easy for the developer but then significantly worsen the complexity, and therefore safety, of the other 20%. Thankfully we have actual data on this,
250.
▲
by
pcwalton
2y ago
To nitpick the article a bit: > It's important to note that this algorithm is very much of its time. Back when Quake 3 was released in 1999, computing an inverse square root was a slow, expensive process. The game had to compute hun
251.
▲
by
pcwalton
2y ago
I agree; wasm would be a better choice, as it's specifically designed for this use case. RISC-V is designed for hardware implementation, not to be an IR, which means that things are more verbose than they need to be. For example, acces
252.
▲
by
pcwalton
2y ago
Determining the veracity of quotes and people's favorite colors are not the kinds of moderation tasks that give people PTSD.
253.
▲
by
pcwalton
2y ago
"signalfd is useless" is a good article: https://ldpreload.com/blog/signalfd-is-useless It goes into the problems with Unix signals, and then explains why Linux's attempt to solve them, signalfd, doesn&#
254.
▲
by
pcwalton
2y ago
To me the most clear-cut benefit of AI is automated content moderation. People literally get PTSD from moderating Facebook. It's no different from replacing the most hazardous factory work with robotic automation. You will still need a
255.
▲
by
pcwalton
2y ago
Looking through the repo, some of the assembler [1] looks odd: getShdwOfst: xor bh,bh mov bl,al mov di,bx shl di,1 shl di,1 shl d1,1 ... Why shift one bit at a time, like you
256.
▲
by
pcwalton
2y ago
I just benchmarked the three versions (in Rust, with criterion) on my Coffee Lake CPU. The quartiles are: Naive version, best case: [481.40 ps 487.84 ps 494.56 ps] Naive version, mid case: [751.56 ps 758.84 ps 766.17 ps] Naive version, wors
257.
▲
by
pcwalton
2y ago
One benefit would be that Rust users could use Wuffs code without having to install a C compiler. Pure-Rust solutions are much more convenient in the Cargo ecosystem than wrangling -sys crates.
258.
▲
by
pcwalton
2y ago
C has a lot of problems as a compilation target as well, from surprising UB (e.g. signed integer overflow) to debugging problems (e.g. #line is woefully inadequate compared to the ability to emit DWARF DIEs) to the inconvenience of setting
259.
▲
by
pcwalton
2y ago
> This is why most doctors refuse (non-palliative) treatment for terminal cancer diagnoses. I saw this claim a while back and looked it up and it didn't seem true. Very few people actually refuse non-palliative treatment entirely fo
260.
▲
by
pcwalton
2y ago
Rust's type system is sound. There are some known bugs in the compiler, however.
261.
▲
by
pcwalton
2y ago
mmap is unsafe in Rust.
262.
▲
by
pcwalton
2y ago
The point is that, by proving the unsafe parts of the standard library correct and Rust's safety guarantees correct, we transitively prove the memory safety (as well as data race freedom, etc.) of all safe Rust code (that uses only
263.
▲
by
pcwalton
2y ago
For one, being able to JIT Rust is nice for development, to reduce compile times.
264.
▲
by
pcwalton
2y ago
Yes. I believe that the standard workaround for this problem is to place the allocator metadata for an entire block at some fixed address boundary, so you can just mask off the bottom K bits of an address to find the allocator metadata for
265.
▲
by
pcwalton
2y ago
The goal is to start storing multiple meshes in the same vertex buffer/index buffer. (I already have a decent chunk of this code written in a branch.) This reduces binding overhead, but moreover it allows us to start using multidraw in
266.
▲
by
pcwalton
2y ago
> I'm also curious about making something like this work as a general purpose allocator (as alluded to by the README). Besides the reverse mapping, you'd also have to get rid of the Vec use in the allocator, but that's fai
267.
▲
by
pcwalton
2y ago
Author here. Didn't expect this to make HN :) I don't deserve any credit for this; @SebAaltonen did all the work to write the C++ version. I just did a line-by-line translation.
268.
▲
by
pcwalton
2y ago
Google is very explicitly doing mass layoffs throughout the year. At this time, the company has every incentive to fire liberally. They have a quota of headcount to reduce through 2024, and firing for cause is better for morale (not to ment
269.
▲
by
pcwalton
2y ago
Well, the real crime there was blatant tax evasion. It always astounds me what these kinds of people think they can get away with. In this case, a guy going by the name of "Bitcoin Jesus" reported that he didn't own any bitco
270.
▲
by
pcwalton
2y ago
> This reminds me of fasm, the only assembler immediately coming to mind that will do multi-pass branch optimisation by default. Most other assemblers either choose the long form always unless specified explicitly as "jmps" or
More ›