I think if you interpret it charitably it means that any bug in the emitted machine code is already a likely memory-unsafe miscompilation if it is ran.
The compiler itself might be perfectly "memory safe" but the generated binary fundamentally is always at risk (besides WebAssembly I suppose).
I'm fully aware of the separation of compiler and binary, and being able to compile untrusted code safely is nice, but a perfectly safe compiler that generates vulnerable binaries isn't that much better.
I do think that is a good point, it's just not what the line actually says. But that's why I wasn't saying "zomg this is WRONG!!!!" but instead, trying to point out that there are subtleties here. For people who aren't as deep in the weeds in this subject, I think the details matter. But again, as I said, I like the post, this is just one thing.
I am also probably in a more pedantic mindset because, well, I'm writing a compiler in Rust, and the words as written do not resonate with me at all.
> a perfectly safe compiler that generates vulnerable binaries isn't that much better.
I do think it's much better. Eliminating classes of bugs in one component is a good thing, even if it's not every component. This is a core lesson of Rust! unsafe still exists, but going from "I don't know what is unsafe" to "only this part is unsafe" is a major improvement.
In context that's clearly not what he's saying, the next sentence is this:
> Zig has more features than Rust for making memory-unsafe code work correctly, and that was the area where we wanted the most help.
Zig definitely does not have more features for successfully emitting memory-unsafe machine code than Rust does. I can emit memory-unsafe machine code from typescript if I really want to and nothing at all in the language will get in my way. So the sentence quoted above must refer to the idea that the compiler itself needs to be unsafe, which Steve is right is simply untrue.
That's a GCC skill issue. You can do it in five branchless instructions for unsigned by splitting the unsigned up in two 32-bit halves, converting those to floats simply by inserting their values as mantissa into constants 2^52 and 2^(52 + 32). This conversion is exact.
Then to finish the conversion you subtract 2^52 and 2^(52 + 32) respectively from the halves and add them together.
Second, I have independently invented this (quicksort on string prefixes) at my time at CWI, although I didn't end up publishing it, because...
Third, this was already published in the original 1961 Quicksort paper by Hoare: https://www.cs.ox.ac.uk/files/6226/H2006%20-%20Historic%20Qu.... Near the end, the section on "Multi-word keys" describes a quicksort that partitions on just the first word, and only accesses the next word for the equality partition. And funnily enough this paper credits P. Shackleton for this, thus this idea was thought of even before the Quicksort paper came out.
So as is usual for software patents, this patent never should have been awarded.
Do you pay import duties in the UK on items purchased for personal use? The situation is changing constantly in the US, but generally speaking you do pay duties only over a certain dollar amount in value if you intend to keep the item in country after importation (and a MBP would be over that amount), but it's a fairly small percentage (around $400 in duties on $3149 saved here). I'm not sure how it'd work in the UK.
> Is there really anything about them that's bad? Or any worse than other things?
A full-on nuclear war will literally make a large portion of our planet uninhabitable for anyone for centuries, and leave the rest severely crippled and contaminated.
Sorry I know we're supposed to be kind and whatnot in these comments but I can't help but explicitly state that your comment is one of the dumbest things I've read on this site in a while. I hope you otherwise have a good day.
The compiler itself might be perfectly "memory safe" but the generated binary fundamentally is always at risk (besides WebAssembly I suppose).
I'm fully aware of the separation of compiler and binary, and being able to compile untrusted code safely is nice, but a perfectly safe compiler that generates vulnerable binaries isn't that much better.
reply