15,556 karma · joined Jun 8, 2017 (9y ago) · 4,714 submissions
comment 1mo ago · link · parent
comment 1mo ago · link · parent
For example, the C++ replacement for a Java program bottlenecking my CI takes 1/3rd as long (with less variance) and runs on a smaller instance.
comment 1mo ago · link · parent
comment 1mo ago · link · parent
comment 1mo ago · link · parent
The beeswax I get from a local apiarist looks nothing like that under a blacklight, and in fact is quite (pale) orange. Carnuba wax mixtures fluoresce yellow. My box of paraffin fluoresces blue brightly enough to be visible in full sunlight, much brighter than the image. Rosin fluoresces bright, radioactive orange in case you're wondering.
comment 1mo ago · link · parent
I don't know why nepali version is dried so much, but it becomes impossible to rehydrate and hence, unusable.
comment 1mo ago · link · parent
The obvious follow-up is to find a minimal set of rules that allow us to express what we want without permitting temporal unsafety. The borrow checker is one set of fairly minimal rules that works pretty damn well. Alternatively you could define away the unsafety by giving it semantics, like fil-C does.
comment 1mo ago · link · parent
std::unique_ptr<int> p(foo());
std::print("{}\n", *p);
The answer depends on how foo() is implemented. You can't reason about it locally, and strictly speaking it's not possible to determine at compile time. Now, I should be declaring this gsl::not_null<std::unique_ptr<int>> to comply with the core guidelines, but I think we can agree that optional support libraries aren't relevant to this discussion.comment 1mo ago · link · parent
YubiKeys have been a thing at Google and other major tech companies for almost two decades now and the effects are well-studied.
My experience is that yubikeys have a tendency to get lost, get cleared, get mixed up (which of my 4 identical yubikeys has the right passkey?), stop working reliably from random USB issues, etc. And worse, yubikeys are awful to use. Like am I seriously supposed to take off my phone case every time I want to plug in a yubikey to the USB-C port (which may or may not be working depending on whether moisture has condensed in the port) so I can use the one mobile browser that supports them to retrieve a passkey every time I want to log in?No, fuck that. Just let me use an SSH cert at that point. The existence of phishing is a comparatively minor evil.
comment 1mo ago · link · parent
So for example:
let mut data = vec!['a', 'b', 'c'];
let b: &noaccess [char] = &data[..];
data.push('d'); // Does this error?
Hence the questioncomment 1mo ago · link · parent
I've occasionally contemplated whether Rust would benefit from another flavor of reference: no-access.
Most of the uses for this I can think of are best solved by opaque pointers for FFI. Having a rust-native reference just seems incongruous. Like, does it have size and alignment info? How would it interact with NLL? The only way I can imagine it working is if it extended referent lifetime throughout the lexical lifetime of the reference, but that defeats the purpose of NLL.Rust solves a similar problem in closures with unique immutable references, but they're not quite the same.
comment 1mo ago · link · parent
This comes up frequently in housing, for example.