Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
pcwalton
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
55 ms
·
631.
▲
by
pcwalton
4y ago
> It's intentional sabotage, more than probably covertly initiated and maintained by Microsoft Do you have any evidence for this? I would like to think that HN is above making these kinds of totally unfounded accusations. (I'm
632.
▲
by
pcwalton
4y ago
C++ doesn't have a formal specification either. What C++ has is a document that says in informal prose how the compiler is supposed to behave. Rust in fact has such a document too: the reference manual [1]. It even uses spec language
633.
▲
by
pcwalton
4y ago
Right. I actually do understand and accept the security argument for the locked-down nature of iOS. But with iSH already approved by Apple, WebAssembly already providing a sandboxed VM for untrusted native code, and Google offering VMs on t
634.
▲
by
pcwalton
4y ago
> You miss some opportunities this way but you feel better when you look in the mirror. Regardless, as others have noted, Coinbase has some specific issues that aren't indicative of a broader industry probem. They seem to be handlin
635.
▲
by
pcwalton
4y ago
macOS malloc was incredibly slow for Pathfinder, far behind every other OS. Everything became bottlenecked on it. It was a free 2x speedup if not more to switch to jemalloc. I suspect this is because Pathfinder's CPU portion is a mul
636.
▲
by
pcwalton
4y ago
There are curated lists of Rust crates to help with the second issue: https://github.com/rust-unofficial/awesome-rust And those two options don't strike me as equally unattractive. Writing everything that isn'
637.
▲
by
pcwalton
4y ago
Yeah, Gecko is one of the most hardened browser engines out there at this point. Fission and the win32k.sys isolation basically bring the general architecture up to par with Chromium. Chromium got those features earlier and hence has more m
638.
▲
by
pcwalton
4y ago
I absolutely agree that modern programming languages need generics, but this particular issue with qsort is only a problem if you're not using link-time optimization (LTO). If you care about performance, you should be using LTO (all th
639.
▲
by
pcwalton
4y ago
The main reason behind the panic/Result distinction is that systems programmers, particularly those working in embedded, want to be able to turn off unwinding support entirely. Unwinding adds control flow edges everywhere, inhibiting o
640.
▲
by
pcwalton
4y ago
This would break the principle that you always know how to invoke a function by looking at its signature. Option of T and Result of T are not the same type as T. You would have to look at the body of the function, or rustdoc, to know how to
641.
▲
by
pcwalton
4y ago
The first 4 bytes are the magic number and the last 4 bytes are the checksum [1] which you could always just chop off if you wanted (it's legal to omit the checksum, see the spec). That would get the total overhead down to 5 bytes. [1]
642.
▲
by
pcwalton
4y ago
The syscalls necessary to do so are blocked by seccomp-bpf.
643.
▲
by
pcwalton
4y ago
Google [seccomp bpf].
644.
▲
by
pcwalton
4y ago
The best idea would be to use Wayland in addition to these new Firefox process isolation features. That provides multiple layers of defense against possible sandbox escapes and exploitable bugs in the Wayland server.
645.
▲
by
pcwalton
4y ago
I'm pretty sure that there's nothing preventing other apps on your desktop from listening to keystrokes that are supposed to go into Firefox, unfortunately. This is a fundamental problem with the X11 protocol and as far as I know
646.
▲
by
pcwalton
4y ago
You are vastly overstating the difficulty of pivoting X11 access to complete system compromise with the "somehow gets all the right details to work" phrase. It's trivial. People have literally gotten killed because of this ty
647.
▲
by
pcwalton
4y ago
Scenario: evil.com wants to take advantage of a use-after-free in some DOM API to install a keylogger. Before X11 isolation, it can: (1) get RCE in content process; (2) send events to your GNOME Shell to open a terminal; (3) send keyboard e
648.
▲
by
pcwalton
4y ago
I don't see why you wouldn't still be able to do that. Firefox still uses X11; it's just that the content processes can't directly speak the protocol now, and must go over IPC to a more trusted process to do so.
649.
▲
by
pcwalton
4y ago
This is a bit buried at the bottom, but: > For Linux users, we removed the connection from content processes to the X11 Server, which stops attackers from exploiting the unsecured X11 protocol. It's hard to overstate how much of a b
650.
▲
by
pcwalton
4y ago
> After a while of confused debugging, we eventually discovered that the RNG was a linear congruential generator, which, when used the way we did to generate N-tuples, tends to produce points that tend to lie on a small number of N-1 dim
651.
▲
by
pcwalton
4y ago
Correct, you can use an RNG. It's no coincidence that many RNGs and hashes (and, for that matter, ciphers) have similar constructions.
652.
▲
by
pcwalton
4y ago
FNV is slow because it only goes one byte at a time. An easy improvement for basically no extra complexity is the FxHash, which is popular in Rust for simple non-secure workloads: https://nnethercote.github.io/2021/12&#
653.
▲
by
pcwalton
4y ago
The Burrows-Wheeler transform, which was the main innovation of bzip2 over gzip, and which this bzip3 retains, is one of the most fascinating algorithms to study: https://en.wikipedia.org/wiki/Burrows-Wheeler_transform
654.
▲
by
pcwalton
4y ago
Because the quality of the discussion is awful.
655.
▲
by
pcwalton
4y ago
Cryptocurrency is worse than electric cars because cryptocurrency can be mined everywhere in the world, whereas electric cars require the use of the electrical grid near the location they're being driven. This means that local governme
656.
▲
by
pcwalton
4y ago
This is not true. Nor is the post you're replying to, for what it's worth. Rust and C++ are roughly equally expressive for high-performance, high-scale software. The reasons to use one or the other for new code have little to do w
657.
▲
by
pcwalton
5y ago
How does this handle cycles? It seems to me that if JS holds on to a WebAssembly object, and that WebAssembly object holds on to another JS object that in turn has a reference to the same WebAssembly object, this solution will leak. This ma
658.
▲
by
pcwalton
5y ago
As I recall, that MVG video was incorrect—Nintendo could have compiled with optimizations and the game would have worked. The most plausible explanation to me (and, IIRC, the one that Giles Goddard speculated was the case) is that they si
659.
▲
by
pcwalton
5y ago
WebRender is certainly "GPU related" and is shipping to millions of happy Firefox users. And yes, LLVM is written in C++. So what? C++ compilers depend on C code in libc. Portions of libc are written in assembler. Some assembly in
660.
▲
by
pcwalton
5y ago
SPARK doesn't provide the same feature set as Rust. If you want safe heap allocation in SPARK, then you get a garbage collector (unless you're talking really recent experimental extensions IIRC). If you want to forego the GC and r
More ›