FizzyOrange

joined 1 year ago
[–] FizzyOrange 2 points 1 month ago (2 children)

Standard ring buffers or circular buffers are implemented as continuous vectors, with a read and write pointer.

Rust's VecDeque is a ring buffer: https://doc.rust-lang.org/std/collections/struct.VecDeque.html

[–] FizzyOrange 8 points 1 month ago (7 children)

Zero surprises. It's the same as in any other language.

[–] FizzyOrange 4 points 1 month ago

Carrying puppy fat doesn’t mean they’re unhealthy.

We're not talking about puppy fat here. The girl in the article gained 100 lb of fat and then lost half her body weight after surgery. You can't say "we can't call her overweight because that might be healthy for her".

Come on dude.

[–] FizzyOrange 3 points 1 month ago (1 children)

Overweight literally means over the weight that you should be. If you have a high BMI but are super muscly then you aren't overweight.

Measurements that only account for BMI might say you are but that's just a limitation of the measurement method. You can use body fat measurement, hip waist ratios etc. to get a more precise idea of whether you are overweight.

There's no issue with the word "overweight" anyway.

[–] FizzyOrange 5 points 1 month ago

Yeah I mean it's definitely a reference volume of last resort, rather than a tutorial you would read cover to cover. Clearly a genius but he explains things as if you already understand them, and can also read his mind.

That said, for a lot of the content the only alternative is research papers and they are even less accessible. I definitely would only use it if I couldn't find answers anywhere else though.

[–] FizzyOrange 7 points 1 month ago

This is about Spectre, not about buggy hardware implementations.

Spectre is a fundamental flaw in speculative execution that means it can leak information, so it's a security vulnerability. Apparently Intel has been imposing draconian requirements on software to work around the issue rather than fixing it in hardware, which is obviously what they should do, but is not at all trivial.

[–] FizzyOrange 17 points 1 month ago (4 children)

Unless the binary size difference is insane, who would say "oh well we were going to pick the library that wasn't riddled with security issues but we decided to save 2MB instead, hope that makes you feel better about your $12m cybersecurity fine!".

[–] FizzyOrange 3 points 1 month ago

Not the kinds of bugs he is talking about. This is about spectre mitigations.

[–] FizzyOrange 2 points 1 month ago (1 children)

The biggest issue is move constructors. Explanation here: https://cxx.rs/binding/cxxstring.html#restrictions

Probably seems like a little thing but I found it quite annoying in practice, and there are other things like not being able to combine serde-derive and cxx FFI on the same struct.

[–] FizzyOrange -2 points 1 month ago

Oof found the Java developer. No thanks.

[–] FizzyOrange 19 points 1 month ago

The C++ standards committee don't see memory safety or UB as a problem. If they did they wouldn't keep introducing new footguns, e.g. forgetting return_void() in a coroutine. They still think everyone should just learn the entire C++ spec and not make mistakes.

[–] FizzyOrange 8 points 1 month ago (4 children)

Interop between Rust and C++ is pretty bad actually - I can understand wanting to avoid that.

However I still agree. I can't see opt-in mechanisms like this moving the needle.

view more: ‹ prev next ›