Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
pcwalton
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
15 ms
·
151.
▲
by
pcwalton
2y ago
I highly suspect it won't be feasible for the same reason it isn't feasible in C++: you could technically implement it, but tons of existing patterns in the ecosystem would become impossible to express, so in practice it would end
152.
▲
by
pcwalton
2y ago
Gabbard's favorables are +43 among Republicans and RFK Jr.'s favorables are +71 among Republicans [1]. [1]: https://d3nkl3psvxxpe9.cloudfront.net/documents/econTabRepor...
153.
▲
by
pcwalton
2y ago
The reason I focus on the memory safety difference is precisely to not minimize its importance. It's far more salient of a difference than whether a language "feels big" or not. Talking about whether Zig requires "a litt
154.
▲
by
pcwalton
2y ago
I've been seeing C++ fans talk about how they never see memory safety issues in practice in C++ for a decade and a half. I even believed it sometimes. But if there's ever been a common story over those 15 years, it's that the
155.
▲
by
pcwalton
2y ago
The amount of complexity that Swift has to deal with in order to make ABI stability work is exactly what I'm talking about. It's astronomical. Furthermore, it's only partial: there are some generics in which they couldn'
156.
▲
by
pcwalton
2y ago
ABI stability is one of those things that seems obvious ("sane"), until you try to implement ABI-stable unboxed generics and discover that the amount of complexity you incur, as well as the performance tax, is absurd. The code blo
157.
▲
by
pcwalton
2y ago
Rust always cared about compile times. Much of the motivation to switch from rustboot to rustc was compile times. (Source: I wrote much of the Rust compiler.)
158.
▲
by
pcwalton
2y ago
> I was looking for a replacement for C, but Rust is actually a replacement for C++. Totally different beast - powerful but complex. I've seen this sentiment a lot, and I have to say it's always puzzled me. The difference betwe
159.
▲
by
pcwalton
2y ago
As is Rust. And the C++ compiler performance improvements in LLVM apply to Rust.
160.
▲
by
pcwalton
2y ago
Easier is just to point out that polls show that all of this DOGE stuff is deeply unpopular [1] (as is Elon himself, incidentally). We don't have to speculate as to which of the president's agenda items have a popular mandate; we
161.
▲
by
pcwalton
2y ago
This is controllable by customizing TargetLibraryInfo [1] for your target in LLVM. Note, however, that detecting memcpy is always a valid optimization in C, not just in userspace. The C language standard, not POSIX, requires that a functi
162.
▲
by
pcwalton
2y ago
> Frankly, I find it really, really dumb that everyone doesn't just implement Cocoa already, even if only in order to provide a lowest common denominator. You mean all the other OS's reverse engineering Cocoa? That exists, mor
163.
▲
by
pcwalton
2y ago
I'm guessing that f32::clone showing up in the profile isn't actually a call to f32::clone, because you have optimizations on (if it actually is a call to a "movd xmm0,dword ptr [rdi]; ret" instruction pair, that's
164.
▲
by
pcwalton
2y ago
Games themselves, not game engines. Systems code, game engines, and games. This isn't meant to be an exhaustive list--it's just the domains I have experience with that Rust was a good fit for. Lest it seem like I'm saying Rus
165.
▲
by
pcwalton
2y ago
I actually used to agree that Rust generally wasn't good for high-level application code, but working with Bevy has made me change that opinion for certain domains. I simply haven't seen a system that makes automatically paralleli
166.
▲
by
pcwalton
2y ago
Rc does solve the problem, but it often introduces interior mutability, which ends up causing usability problems. That's why at the end of the day adjacency representations (i.e. integers) are often preferred.
167.
▲
by
pcwalton
2y ago
> Now mix of two languages looks even worst than one complex. The point is that the vast majority of code doesn't have to be unsafe. Empirically, Rust code has far fewer memory safety problems than non-memory-safe languages.
168.
▲
by
pcwalton
2y ago
> I'm about 50,000 lines of Rust into a metaverse client, and my own code has zero "unsafe". I'm not even calling "mem", or transmuting anything. Yet this has both networking and graphics, and goes fast. I j
169.
▲
by
pcwalton
2y ago
> When you need efficient trees or graphs (I doubt any non-trivial software doesn’t need at least one of them), unsafe code is the only reasonable choice. To name one example, the AnimationGraph in Bevy is implemented with petgraph, whic
170.
▲
by
pcwalton
2y ago
You need lots of doctors, especially with an aging prison population. Doctors aren't cheap. Not to mention the cost of medicine, which can get very expensive when you consider things like end stage cancer drugs for elderly prisoners wh
171.
▲
by
pcwalton
2y ago
I wouldn't say that PGO is necessary to predict branches correctly. Lots of branches are exceptional control flow (error checks, bounds checks, etc.) and compilers will almost always correctly statically predict not taken for them. Any
172.
▲
by
pcwalton
2y ago
> Gameplay patents are difficult to enforce. In Japan, or in other countries?
173.
▲
by
pcwalton
2y ago
> There can be no lawsuit here without upsetting the entire gaming industry. Sue star wars survivor series for being a blatant ripoff of sekiro but based in star wars - where do you draw the line? At worst that would just result in that
174.
▲
by
pcwalton
2y ago
That's a US court precedent, which is irrelevant to the Japanese legal system.
175.
▲
by
pcwalton
2y ago
Reminder: This was filed in a Japanese court, so anything relating to the legal systems of other countries is irrelevant. The effects of the outcome of this case will be limited to Japan.
176.
▲
by
pcwalton
2y ago
You can [1]. [1]: https://www.reddit.com/r/hackintosh/comments/1fh5wez/cant_di...
177.
▲
by
pcwalton
2y ago
It's because of the Gompertz mortality law [1]--the probability of dying at a certain age is exponential. If you assume that the mortality of each age-related terminal illness itself follows the Gompertz law, then eliminating any one o
178.
▲
by
pcwalton
2y ago
> Why shouldn't China should [sic] control the South China Sea? For the same reason India shouldn't control the Indian Ocean.
179.
▲
by
pcwalton
2y ago
> slate-grey design that is so straightforward that it could be software-rasterised at 4K resolution, 144 frames per second without hiccups This is not possible (measure software blitting performance and you'll see), and for power r
180.
▲
by
pcwalton
2y ago
It's really strange to me that Microsoft has never added an ArgvToCommandLineW(). This would solve most of the problems with Windows command line parsing.
More ›